summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2019-05-20 15:16:27 -0400
committerHenrik Edin <henrik.edin@mongodb.com>2019-05-22 09:27:54 -0400
commit5c12c52f6f9e7371b37e43d3cf5145d61ffa70d3 (patch)
tree2b07eb318ec88fda315a3039779e5b8231768264 /src/third_party
parent48ea7f8532c6390cad46c0e81bbf3dee79229eab (diff)
downloadmongo-5c12c52f6f9e7371b37e43d3cf5145d61ffa70d3.tar.gz
SERVER-40834 Upgrade boost to version 1.70
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/SConscript2
-rw-r--r--src/third_party/boost-1.69.0/boost/any.hpp337
-rw-r--r--src/third_party/boost-1.69.0/boost/array.hpp457
-rw-r--r--src/third_party/boost-1.69.0/boost/asio.hpp151
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp133
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp151
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/async_result.hpp223
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp1042
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp630
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp292
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp1032
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp620
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp690
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp393
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp1759
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp1988
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp432
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp709
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp923
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp454
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp38
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp707
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp613
-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.hpp259
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp280
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp251
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp523
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp220
-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.hpp330
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp468
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp175
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/defer.hpp109
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/array.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp34
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp32
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp47
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/base_from_completion_cond.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp818
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp68
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp546
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp128
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp127
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp68
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp192
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp85
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp94
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp114
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp151
-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.hpp416
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp33
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp62
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp34
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp280
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp38
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp130
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp130
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp220
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp268
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/event.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp85
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp86
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp41
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp82
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp40
-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.hpp93
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_hppa_fenced_block.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_sync_fenced_block.hpp67
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_x86_fenced_block.hpp101
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/global.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp237
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp57
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp242
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp558
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp97
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp333
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp120
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp476
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.hpp93
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.ipp448
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp91
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp789
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp167
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp360
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp95
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp568
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp76
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/pipe_select_interrupter.ipp126
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp61
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp48
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp86
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_tss_ptr.ipp48
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_descriptor_service.ipp224
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_serial_port_service.ipp154
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_socket_service_base.ipp302
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/resolver_service_base.ipp156
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp573
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp102
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp335
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp96
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp199
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/signal_set_service.ipp671
-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.ipp178
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.hpp181
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.ipp136
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp120
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp179
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp47
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_ptime.ipp93
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_set.ipp103
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp78
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_handle_service.ipp527
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.hpp105
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.ipp556
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp183
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp801
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp86
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_object_handle_service.ipp451
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_static_mutex.ipp138
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp152
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_tss_ptr.ipp59
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp631
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp94
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp124
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp84
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp86
-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.hpp128
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp244
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/local_free_on_block_exit.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp102
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp66
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp71
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp510
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp62
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp173
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/old_win_sdk_compat.hpp216
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp164
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp91
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp135
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp164
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_fd_set_adapter.hpp120
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp82
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp78
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp87
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp66
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp111
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp81
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp175
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp390
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_null_buffers_op.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_serial_port_service.hpp238
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_accept_op.hpp219
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_connect_op.hpp115
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recv_op.hpp137
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp140
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp134
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_send_op.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_sendto_op.hpp132
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp528
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service_base.hpp513
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp32
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp42
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp67
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp170
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp106
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp124
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp47
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp147
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp142
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp215
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp80
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp42
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp103
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp89
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp48
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp240
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp166
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp46
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp88
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp51
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp219
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp100
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp339
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp318
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp93
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp418
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp178
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp75
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp83
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp73
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp144
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp144
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp62
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp91
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp55
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp53
-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.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp101
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp68
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp42
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp71
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp88
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp119
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp87
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp47
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp153
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_fd_set_adapter.hpp151
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp92
-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.hpp113
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_service.hpp325
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_write_op.hpp105
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_io_context.hpp330
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_null_buffers_op.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp98
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_op.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp145
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_serial_port_service.hpp232
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_accept_op.hpp299
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_connect_op.hpp129
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recv_op.hpp119
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp127
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp120
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_send_op.hpp113
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service.hpp601
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service_base.hpp593
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_thread_info.hpp36
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_wait_op.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp80
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_object_handle_service.hpp186
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp76
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp149
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp81
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp126
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp126
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp296
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp67
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp120
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp200
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_connect_op.hpp94
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_recv_op.hpp114
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_send_op.hpp105
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp243
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service_base.hpp361
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp108
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp130
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp74
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp293
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/dispatch.hpp110
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/error.hpp361
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/execution_context.hpp413
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/executor.hpp343
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp172
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental.hpp22
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp228
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp67
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp878
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp93
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp296
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp195
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp125
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp135
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp112
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp124
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp129
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp83
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp56
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp87
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_type.hpp52
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp46
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp431
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp413
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp862
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp79
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp80
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/error.ipp130
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp109
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp84
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp388
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp40
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp54
-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.ipp176
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/post.hpp79
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/read.hpp717
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp642
-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.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp556
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp537
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/src.cpp25
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/src.hpp81
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp36
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp75
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp87
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp129
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp78
-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.hpp676
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp574
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_context.hpp878
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp386
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_service.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp20
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address.hpp262
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp331
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp164
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp338
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp185
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp131
-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.hpp265
-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.hpp115
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp194
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp246
-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.hpp141
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp201
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp568
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp117
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp236
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp212
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp352
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp56
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp56
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp218
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp55
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp187
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp263
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp237
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp131
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp202
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp157
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp113
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp71
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/is_executor.hpp48
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp241
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp108
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp82
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp135
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp131
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp92
-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.hpp153
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp584
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp364
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp646
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp362
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp281
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/post.hpp109
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp468
-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.hpp418
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/serial_port.hpp771
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp169
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp251
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/signal_set.hpp449
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp144
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp374
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/socket_base.hpp561
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/spawn.hpp338
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp760
-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.hpp116
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp162
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp324
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/openssl_init.ipp167
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp374
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp103
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp30
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp68
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp56
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp115
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp69
-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.ipp102
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp162
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp28
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp96
-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.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp69
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/strand.hpp288
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp414
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/streambuf.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/system_context.hpp80
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/system_executor.hpp131
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/system_timer.hpp44
-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.hpp88
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp24
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp20
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/net.hpp26
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp199
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp26
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/unyield.hpp21
-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.hpp73
-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.hpp58
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp212
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp275
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp184
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_random_access_handle.hpp378
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp361
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp383
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp185
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp333
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp118
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp380
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle_service.hpp216
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp364
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp212
-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.hpp23
-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/system_clocks.hpp233
-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/clang.hpp340
-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/platform/cygwin.hpp68
-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.hpp296
-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/block_list.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp157
-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/container_or_allocator_rebind.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp461
-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/is_container.hpp55
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp875
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/pair.hpp614
-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/version_type.hpp110
-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/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/pmr/global_resource.hpp66
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp101
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp182
-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/string.hpp3504
-rw-r--r--src/third_party/boost-1.69.0/boost/container/throw_exception.hpp181
-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/context/detail/config.hpp118
-rw-r--r--src/third_party/boost-1.69.0/boost/core/checked_delete.hpp69
-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/coroutine/asymmetric_coroutine.hpp2416
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp310
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp322
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp66
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp43
-rw-r--r--src/third_party/boost-1.69.0/boost/current_function.hpp75
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp509
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp391
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp75
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp71
-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_zone_base.hpp100
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp98
-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/dynamic_bitset/detail/dynamic_bitset.hpp293
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem.hpp21
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/config.hpp110
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp58
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp182
-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.hpp1015
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp352
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp43
-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/interprocess/streams/bufferstream.hpp491
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp87
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp97
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp1073
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp588
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp1069
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp2246
-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/detail/ebo_functor_holder.hpp292
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp223
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp286
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp187
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp262
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp125
-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/math.hpp295
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp216
-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/tree_iterator.hpp172
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/workaround.hpp53
-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.hpp763
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/list.hpp1516
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/options.hpp256
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp318
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp82
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp591
-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.hpp1073
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp1094
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp1081
-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/splay_set.hpp1110
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp666
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/treap.hpp1344
-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.hpp1106
-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/iostreams/detail/config/fpos.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/detail/facade_iterator_category.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp358
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp981
-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/math/constants/constants.hpp348
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i0.hpp554
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i1.hpp582
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j0.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j1.hpp199
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k0.hpp509
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k1.hpp551
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y0.hpp230
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y1.hpp202
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_large.hpp768
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/lgamma_small.hpp522
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_factorial.hpp805
-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.hpp347
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp2080
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp1296
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp509
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp132
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp1100
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/config.hpp469
-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/move/algo/adaptive_merge.hpp343
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp631
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/adaptive_sort_merge.hpp1690
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp553
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp86
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp132
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp106
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/bidir_node_iterator.hpp114
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp243
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp163
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp120
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_iterator.hpp166
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_node.hpp789
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp297
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl.hpp1585
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_node.hpp669
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_loader.hpp173
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_node.hpp283
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ptr_array.hpp152
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_node_iterator.hpp140
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnk_index_ops.hpp300
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_node.hpp221
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp1743
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp1185
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp382
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp1080
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index_container.hpp1407
-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/transcendental.hpp148
-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/serialize.hpp199
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp525
-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/generic_interconvert.hpp590
-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/precision.hpp139
-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.hpp367
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp90
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp33
-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/predef/architecture/arm.h80
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os.h33
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/android.h45
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd.h103
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h84
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/linux.h46
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform.h28
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/ios.h58
-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/progress.hpp142
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp84
-rw-r--r--src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp636
-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/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/bad_weak_ptr.hpp70
-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.hpp91
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp667
-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_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_std_atomic.hpp139
-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/spinlock_std_atomic.hpp83
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp183
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_array.hpp67
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_object.hpp199
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp66
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp110
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp1184
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner.hpp329
-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/static_assert.hpp180
-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/test/detail/config.hpp127
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp46
-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.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp56
-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/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/debug.ipp1009
-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.ipp840
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp207
-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/test_tools.ipp823
-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.ipp312
-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/xml_log_formatter.ipp223
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp111
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp167
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp72
-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/tools/context.hpp65
-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/fpc_op.hpp214
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/old/impl.hpp358
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp282
-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/global_fixture.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/observer.hpp116
-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/unit_test_log.hpp280
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test_log_formatter.hpp322
-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_suite.hpp405
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring.hpp749
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp316
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp128
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp63
-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/errors.hpp195
-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/thread/detail/config.hpp531
-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/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/wait_for_any.hpp161
-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/thread_data.hpp405
-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/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/timer.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/timer/config.hpp84
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index.hpp265
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp213
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/detail/compile_time_type_info.hpp299
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/detail/ctti_register_class.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/detail/stl_register_class.hpp40
-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.hpp297
-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/detail/config.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/has_binary_operator.hpp279
-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_11.hpp501
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_tester.hpp449
-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_tester.hpp1800
-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/has_minus.hpp158
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp163
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp161
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp90
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp98
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp69
-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/version.hpp32
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/handles.hpp70
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp106
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp84
-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.cpp953
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp200
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp119
-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.cpp27
-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.hpp56
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/regex.cpp229
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp183
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp652
-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/win32/thread.cpp977
-rw-r--r--src/third_party/boost-1.69.0/libs/timer/src/cpu_timer.cpp265
-rw-r--r--src/third_party/boost-1.70.0/SConscript (renamed from src/third_party/boost-1.69.0/SConscript)0
-rw-r--r--src/third_party/boost-1.70.0/boost.css (renamed from src/third_party/boost-1.69.0/boost.css)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/apply_permutation.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/apply_permutation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/clamp.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/clamp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/all_of.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/all_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/any_of.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/any_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/copy_if.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/copy_n.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/find_if_not.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/find_if_not.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/iota.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/iota.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_partitioned.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_partitioned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_permutation.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_permutation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_sorted.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_sorted.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/none_of.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/none_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/one_of.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/one_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/partition_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx11/partition_point.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_point.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx14/equal.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx14/equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx14/is_permutation.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx14/is_permutation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx14/mismatch.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx14/mismatch.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/exclusive_scan.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/exclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/for_each_n.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/for_each_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/inclusive_scan.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/inclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/reduce.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/reduce.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_reduce.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_reduce.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/find_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/find_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/find_not.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/find_not.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/gather.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/gather.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/hex.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/hex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/is_palindrome.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/is_palindrome.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/is_partitioned_until.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/is_partitioned_until.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/minmax.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/minmax.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/minmax_element.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/minmax_element.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/searching/boyer_moore.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/searching/boyer_moore_horspool.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore_horspool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/searching/detail/bm_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/searching/detail/bm_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/searching/detail/debugging.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/searching/detail/debugging.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/searching/knuth_morris_pratt.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/searching/knuth_morris_pratt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/sort_subrange.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/sort_subrange.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/case_conv.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/case_conv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/classification.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/classification.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/compare.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/compare.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/concept.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/concept.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/config.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/constants.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/constants.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/case_conv.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/case_conv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/classification.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/classification.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format_all.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_all.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format_store.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_store.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/finder.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/finder_regex.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder_regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/formatter_regex.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter_regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/predicate.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/predicate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/replace_storage.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/replace_storage.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/trim.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/trim.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/detail/util.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/detail/util.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/erase.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/erase.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/find.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/find.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/find_format.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/find_format.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/find_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/find_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/finder.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/finder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/iter_find.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/iter_find.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/join.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/join.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/predicate.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/predicate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/predicate_facade.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/predicate_facade.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/regex.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/regex_find_format.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/regex_find_format.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/replace.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/replace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/sequence_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/sequence_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/split.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/split.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/std/list_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/std/list_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/std/rope_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/std/rope_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/std/slist_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/std/slist_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/std/string_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/std/string_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/std_containers_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/std_containers_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/trim.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/trim.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/trim_all.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/trim_all.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string/yes_no_type.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string/yes_no_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/algorithm/string_regex.hpp (renamed from src/third_party/boost-1.69.0/boost/algorithm/string_regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align.hpp (renamed from src/third_party/boost-1.69.0/boost/align.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/align.hpp (renamed from src/third_party/boost-1.69.0/boost/align/align.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/align_down.hpp (renamed from src/third_party/boost-1.69.0/boost/align/align_down.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/align_up.hpp (renamed from src/third_party/boost-1.69.0/boost/align/align_up.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_alloc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_allocator_adaptor.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_allocator_adaptor_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_allocator_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_allocator_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_delete.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_delete.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/aligned_delete_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/align/aligned_delete_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/alignment_of.hpp (renamed from src/third_party/boost-1.69.0/boost/align/alignment_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/alignment_of_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/align/alignment_of_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/assume_aligned.hpp (renamed from src/third_party/boost-1.69.0/boost/align/assume_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/addressof.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/align.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/align.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/align_cxx11.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/align_cxx11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/align_down.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/align_down.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/align_up.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/align_up.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_android.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_android.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_macos.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_macos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_msvc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_posix.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_posix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_sunos.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_sunos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/alignment_of.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/alignment_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/alignment_of_clang.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/alignment_of_clang.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/alignment_of_codegear.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/alignment_of_codegear.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/alignment_of_cxx11.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/alignment_of_cxx11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/alignment_of_gcc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/alignment_of_gcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/alignment_of_msvc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/alignment_of_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/assume_aligned.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/assume_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_clang.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_clang.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_gcc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_gcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_intel.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_intel.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_msvc.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/element_type.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/element_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/integral_constant.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/integral_constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/is_aligned.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/is_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/is_alignment.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/is_alignment.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/is_alignment_constant.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/is_alignment_constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/max_align.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/max_align.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/max_objects.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/max_objects.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/max_size.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/max_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/detail/min_size.hpp (renamed from src/third_party/boost-1.69.0/boost/align/detail/min_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/align/is_aligned.hpp (renamed from src/third_party/boost-1.69.0/boost/align/is_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/aligned_storage.hpp (renamed from src/third_party/boost-1.69.0/boost/aligned_storage.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/any.hpp338
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/archive_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/archive_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_archive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_archive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_binary_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_binary_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_binary_iprimitive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_binary_iprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_binary_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_binary_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_binary_oprimitive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_binary_oprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_streambuf_locale_saver.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_streambuf_locale_saver.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_text_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_text_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_text_iprimitive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_text_iprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_text_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_text_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_text_oprimitive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_text_oprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_xml_archive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_xml_archive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_xml_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_xml_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/basic_xml_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/basic_xml_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/binary_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/binary_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/binary_iarchive_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/binary_iarchive_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/binary_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/binary_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/binary_oarchive_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/binary_oarchive_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/binary_wiarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/binary_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/binary_woarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/binary_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/codecvt_null.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/codecvt_null.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/abi_prefix.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/abi_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/abi_suffix.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/abi_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/archive_serializer_map.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/archive_serializer_map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/auto_link_archive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/auto_link_archive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/auto_link_warchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/auto_link_warchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_iserializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_iserializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_oserializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_oserializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_pointer_iserializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_iserializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_pointer_oserializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_oserializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_serializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/basic_serializer_map.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer_map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/check.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/check.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/common_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/common_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/common_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/common_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/decl.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/decl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/helper_collection.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/helper_collection.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/interface_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/interface_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/interface_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/interface_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/iserializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/iserializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/oserializer.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/oserializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/polymorphic_iarchive_route.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_iarchive_route.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/polymorphic_oarchive_route.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/register_archive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/register_archive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/dinkumware.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/dinkumware.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/archive_serializer_map.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/archive_serializer_map.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_iarchive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iarchive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_iprimitive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_oarchive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oarchive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_oprimitive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_text_iarchive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iarchive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_text_iprimitive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_text_oarchive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oarchive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_text_oprimitive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_grammar.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_grammar.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_iarchive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_iarchive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_oarchive.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_oarchive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/text_iarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/text_iarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/text_oarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/text_oarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/text_wiarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/text_wiarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/text_woarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/text_woarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/xml_iarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/xml_iarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/xml_oarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/xml_oarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/xml_wiarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/xml_wiarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/impl/xml_woarchive_impl.ipp (renamed from src/third_party/boost-1.69.0/boost/archive/impl/xml_woarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/base64_from_binary.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/base64_from_binary.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/binary_from_base64.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/binary_from_base64.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/dataflow_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/dataflow_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/escape.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/escape.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/insert_linebreaks.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/insert_linebreaks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/istream_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/istream_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/mb_from_wchar.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/mb_from_wchar.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/ostream_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/ostream_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/remove_whitespace.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/remove_whitespace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/transform_width.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/transform_width.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/unescape.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/unescape.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/wchar_from_mb.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/wchar_from_mb.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/xml_escape.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/xml_escape.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/iterators/xml_unescape.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/iterators/xml_unescape.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_binary_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_binary_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_text_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_text_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_text_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_text_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_text_wiarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_text_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_text_woarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_text_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_xml_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_xml_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_xml_wiarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/polymorphic_xml_woarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/text_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/text_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/text_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/text_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/text_wiarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/text_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/text_woarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/text_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/wcslen.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/wcslen.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/xml_archive_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/xml_archive_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/xml_iarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/xml_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/xml_oarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/xml_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/xml_wiarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/xml_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/archive/xml_woarchive.hpp (renamed from src/third_party/boost-1.69.0/boost/archive/xml_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/array.hpp457
-rw-r--r--src/third_party/boost-1.70.0/boost/asio.hpp146
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/associated_allocator.hpp133
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/associated_executor.hpp151
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/async_result.hpp358
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/awaitable.hpp125
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_datagram_socket.hpp1117
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_deadline_timer.hpp668
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_io_object.hpp292
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_raw_socket.hpp1109
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_seq_packet_socket.hpp714
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_serial_port.hpp861
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_signal_set.hpp543
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_socket.hpp1858
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_socket_acceptor.hpp2380
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_socket_iostream.hpp409
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_socket_streambuf.hpp689
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_stream_socket.hpp995
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_streambuf.hpp454
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_streambuf_fwd.hpp38
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/basic_waitable_timer.hpp738
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/bind_executor.hpp582
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffer.hpp2498
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffered_read_stream.hpp242
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffered_read_stream_fwd.hpp27
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffered_stream.hpp263
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffered_stream_fwd.hpp27
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffered_write_stream.hpp234
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffered_write_stream_fwd.hpp27
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/buffers_iterator.hpp523
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/co_spawn.hpp90
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/completion_condition.hpp220
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/compose.hpp138
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/connect.hpp1057
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/coroutine.hpp330
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/deadline_timer.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/defer.hpp119
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detached.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/array.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/array_fwd.hpp34
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/assert.hpp32
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/atomic_count.hpp47
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/base_from_completion_cond.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/bind_handler.hpp818
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/buffer_resize_guard.hpp68
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/buffer_sequence_adapter.hpp546
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/buffered_stream_storage.hpp128
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/call_stack.hpp127
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/chrono.hpp68
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/chrono_time_traits.hpp192
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/completion_handler.hpp85
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/concurrency_hint.hpp94
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_event.hpp114
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_mutex.hpp151
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/config.hpp1438
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/consuming_buffers.hpp416
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/cstddef.hpp33
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/cstdint.hpp62
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/date_time_fwd.hpp34
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/deadline_timer_service.hpp282
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/dependent_type.hpp38
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/descriptor_ops.hpp123
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/descriptor_read_op.hpp132
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/descriptor_write_op.hpp132
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/dev_poll_reactor.hpp220
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/epoll_reactor.hpp268
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/event.hpp50
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/eventfd_select_interrupter.hpp85
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/executor_function.hpp106
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/executor_op.hpp86
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/fd_set_adapter.hpp41
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/fenced_block.hpp82
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/functional.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/future.hpp33
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/gcc_arm_fenced_block.hpp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/gcc_hppa_fenced_block.hpp70
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/gcc_sync_fenced_block.hpp67
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/gcc_x86_fenced_block.hpp101
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/global.hpp54
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/handler_alloc_helpers.hpp244
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/handler_cont_helpers.hpp45
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/handler_invoke_helpers.hpp57
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/handler_tracking.hpp242
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/handler_type_requirements.hpp558
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/handler_work.hpp115
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/hash_map.hpp333
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp120
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/descriptor_ops.ipp476
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.hpp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.ipp448
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.hpp91
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.ipp789
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp167
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/handler_tracking.ipp360
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.hpp95
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.ipp568
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/null_event.ipp76
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/pipe_select_interrupter.ipp126
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_event.ipp61
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_mutex.ipp48
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_thread.ipp86
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_tss_ptr.ipp48
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_descriptor_service.ipp224
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_serial_port_service.ipp154
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_socket_service_base.ipp301
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/resolver_service_base.ipp162
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/scheduler.ipp619
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.hpp102
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.ipp335
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.hpp96
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.ipp199
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/signal_set_service.ipp669
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_ops.ipp3574
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_select_interrupter.ipp178
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.hpp181
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.ipp136
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.hpp120
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.ipp179
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/throw_error.ipp47
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_ptime.ipp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_set.ipp103
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_event.ipp78
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_handle_service.ipp526
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.hpp105
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.ipp595
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp183
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp801
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_mutex.ipp86
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_object_handle_service.ipp450
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_static_mutex.ipp138
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_thread.ipp152
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/win_tss_ptr.ipp59
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp631
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp94
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp123
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/impl/winsock_init.ipp84
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/io_control.hpp86
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/io_object_executor.hpp162
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/io_object_impl.hpp195
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/is_buffer_sequence.hpp308
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/is_executor.hpp128
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/keyword_tss_ptr.hpp72
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/kqueue_reactor.hpp244
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/asio/detail/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/local_free_on_block_exit.hpp61
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/macos_fenced_block.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/memory.hpp72
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/mutex.hpp50
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/non_const_lvalue.hpp56
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/noncopyable.hpp45
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_event.hpp102
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_fenced_block.hpp49
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_global.hpp61
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_mutex.hpp66
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_reactor.hpp70
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_signal_blocker.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_socket_service.hpp521
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_static_mutex.hpp62
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_thread.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/null_tss_ptr.hpp70
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/object_pool.hpp173
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/old_win_sdk_compat.hpp216
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/op_queue.hpp164
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/operation.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/pipe_select_interrupter.hpp91
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/pop_options.hpp141
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_event.hpp164
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_fd_set_adapter.hpp120
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_global.hpp82
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_mutex.hpp78
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_signal_blocker.hpp87
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_static_mutex.hpp66
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_thread.hpp111
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/posix_tss_ptr.hpp81
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/push_options.hpp181
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_descriptor_service.hpp393
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_null_buffers_op.hpp94
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_serial_port_service.hpp240
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_accept_op.hpp232
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_connect_op.hpp118
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recv_op.hpp139
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp144
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp137
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_send_op.hpp138
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_sendto_op.hpp136
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service.hpp507
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service_base.hpp520
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactive_wait_op.hpp94
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactor.hpp32
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactor_fwd.hpp42
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactor_op.hpp67
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/reactor_op_queue.hpp170
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/recycling_allocator.hpp108
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/regex_fwd.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/resolve_endpoint_op.hpp138
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/resolve_op.hpp47
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/resolve_query_op.hpp150
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/resolver_service.hpp147
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/resolver_service_base.hpp145
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/scheduler.hpp226
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/scheduler_operation.hpp80
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/scheduler_thread_info.hpp42
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/scoped_lock.hpp103
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/scoped_ptr.hpp89
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/select_interrupter.hpp48
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/select_reactor.hpp240
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/service_registry.hpp166
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/signal_blocker.hpp46
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/signal_handler.hpp90
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/signal_init.hpp49
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/signal_op.hpp51
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/signal_set_service.hpp231
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/socket_holder.hpp100
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/socket_ops.hpp339
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/socket_option.hpp318
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/socket_select_interrupter.hpp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/socket_types.hpp418
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/solaris_fenced_block.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/static_mutex.hpp54
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/std_event.hpp178
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/std_fenced_block.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/std_global.hpp72
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/std_mutex.hpp75
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/std_static_mutex.hpp83
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/std_thread.hpp73
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/strand_executor_service.hpp144
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/strand_service.hpp144
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/string_view.hpp49
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/thread.hpp62
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/thread_context.hpp44
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/thread_group.hpp97
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/thread_info_base.hpp128
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/throw_error.hpp55
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/throw_exception.hpp53
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/timer_queue.hpp362
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_base.hpp70
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_ptime.hpp101
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_set.hpp68
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler_fwd.hpp42
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/tss_ptr.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/type_traits.hpp88
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/variadic_templates.hpp133
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/wait_handler.hpp89
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/wait_op.hpp47
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_event.hpp153
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_fd_set_adapter.hpp151
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_fenced_block.hpp92
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_global.hpp73
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_read_op.hpp115
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_service.hpp337
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_write_op.hpp108
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_io_context.hpp340
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_null_buffers_op.hpp125
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_operation.hpp98
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_op.hpp94
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp161
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_serial_port_service.hpp234
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_accept_op.hpp308
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_connect_op.hpp132
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recv_op.hpp122
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp131
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp123
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_send_op.hpp116
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service.hpp583
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service_base.hpp602
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_thread_info.hpp36
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_wait_op.hpp125
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_mutex.hpp80
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_object_handle_service.hpp197
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_static_mutex.hpp76
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_thread.hpp149
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/win_tss_ptr.hpp81
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winapp_thread.hpp126
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/wince_thread.hpp126
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_manager.hpp307
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_op.hpp67
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolve_op.hpp123
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolver_service.hpp214
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_connect_op.hpp96
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_recv_op.hpp117
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_send_op.hpp108
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service.hpp244
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service_base.hpp372
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_timer_scheduler.hpp149
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winrt_utils.hpp108
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/winsock_init.hpp130
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/work_dispatcher.hpp75
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/detail/wrapped_handler.hpp293
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/dispatch.hpp110
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/error.hpp361
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/execution_context.hpp414
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/executor.hpp343
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/executor_work_guard.hpp172
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/basic_endpoint.hpp195
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/datagram_protocol.hpp125
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/detail/endpoint.hpp135
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/detail/impl/endpoint.ipp112
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/raw_protocol.hpp123
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/seq_packet_protocol.hpp124
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/generic/stream_protocol.hpp129
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/handler_alloc_hook.hpp83
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/handler_continuation_hook.hpp56
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/handler_invoke_hook.hpp87
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/high_resolution_timer.hpp46
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/awaitable.hpp424
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/buffered_read_stream.hpp450
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/buffered_write_stream.hpp432
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/co_spawn.hpp140
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/compose.hpp421
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/connect.hpp830
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/defer.hpp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/detached.hpp132
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/dispatch.hpp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/error.ipp130
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/execution_context.hpp111
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/execution_context.ipp84
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/executor.hpp389
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/executor.ipp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/handler_alloc_hook.ipp54
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/io_context.hpp357
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/io_context.ipp177
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/post.hpp93
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/read.hpp1081
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/read_at.hpp657
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/read_until.hpp3006
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/redirect_error.hpp374
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.hpp61
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.ipp556
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/spawn.hpp492
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/src.cpp25
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/src.hpp81
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/system_context.hpp36
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/system_context.ipp82
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/system_executor.hpp87
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.hpp129
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.ipp89
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/use_awaitable.hpp278
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/use_future.hpp889
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/write.hpp980
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/impl/write_at.hpp580
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/io_context.hpp874
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/io_context_strand.hpp376
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/io_service.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/io_service_strand.hpp20
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address.hpp270
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address_v4.hpp337
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address_v4_iterator.hpp164
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address_v4_range.hpp136
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address_v6.hpp343
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address_v6_iterator.hpp185
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/address_v6_range.hpp131
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/bad_address_cast.hpp55
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/basic_endpoint.hpp266
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver.hpp984
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_entry.hpp115
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_iterator.hpp194
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_query.hpp246
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_results.hpp313
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/detail/endpoint.hpp143
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/detail/impl/endpoint.ipp201
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/detail/socket_option.hpp568
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/host_name.hpp44
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/icmp.hpp117
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/address.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/address.ipp241
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.ipp212
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.ipp352
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/basic_endpoint.hpp45
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/host_name.ipp56
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.hpp56
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.ipp218
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.hpp55
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.ipp187
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/multicast.hpp193
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/network_v4.hpp263
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/network_v6.hpp237
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/resolver_base.hpp131
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/resolver_query_base.hpp45
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/tcp.hpp157
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/udp.hpp113
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/unicast.hpp72
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ip/v6_only.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/is_executor.hpp48
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/is_read_buffered.hpp61
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/is_write_buffered.hpp61
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/local/basic_endpoint.hpp249
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/local/connect_pair.hpp103
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/local/datagram_protocol.hpp82
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/local/detail/endpoint.hpp141
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/local/detail/impl/endpoint.ipp138
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/local/stream_protocol.hpp92
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/packaged_task.hpp128
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/placeholders.hpp153
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/posix/basic_descriptor.hpp672
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/posix/basic_stream_descriptor.hpp426
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/posix/descriptor.hpp39
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/posix/descriptor_base.hpp92
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/posix/stream_descriptor.hpp39
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/post.hpp115
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/read.hpp1245
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/read_at.hpp673
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/read_until.hpp2797
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/redirect_error.hpp68
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/serial_port.hpp38
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/serial_port_base.hpp169
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/signal_set.hpp30
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/socket_base.hpp561
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/spawn.hpp338
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl.hpp27
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/context.hpp760
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/context_base.hpp211
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/buffered_handshake_op.hpp116
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/engine.hpp162
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/handshake_op.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/engine.ipp338
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/openssl_init.ipp167
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/io.hpp383
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_init.hpp103
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_types.hpp30
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/password_callback.hpp68
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/read_op.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/shutdown_op.hpp66
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/stream_core.hpp137
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/verify_callback.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/detail/write_op.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/error.hpp127
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.ipp1206
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/impl/error.ipp104
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/impl/rfc2818_verification.ipp162
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/impl/src.hpp28
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/rfc2818_verification.hpp96
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/stream.hpp788
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/stream_base.hpp54
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/verify_context.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ssl/verify_mode.hpp65
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/steady_timer.hpp44
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/strand.hpp315
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/streambuf.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/system_context.hpp83
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/system_executor.hpp131
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/system_timer.hpp44
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/this_coro.hpp47
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/thread_pool.hpp237
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/time_traits.hpp88
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/buffer.hpp24
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/executor.hpp34
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/internet.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/io_context.hpp20
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/net.hpp26
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/netfwd.hpp205
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/socket.hpp27
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/ts/timer.hpp26
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/unyield.hpp21
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/use_awaitable.hpp73
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/use_future.hpp162
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/uses_executor.hpp73
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/version.hpp23
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/wait_traits.hpp58
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/basic_object_handle.hpp398
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/basic_overlapped_handle.hpp355
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/basic_random_access_handle.hpp429
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/basic_stream_handle.hpp413
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/object_handle.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/overlapped_handle.hpp41
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/overlapped_ptr.hpp145
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/random_access_handle.hpp39
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/windows/stream_handle.hpp39
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/write.hpp1219
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/write_at.hpp681
-rw-r--r--src/third_party/boost-1.70.0/boost/asio/yield.hpp23
-rw-r--r--src/third_party/boost-1.70.0/boost/assert.hpp (renamed from src/third_party/boost-1.69.0/boost/assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/assign/assignment_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/assign/assignment_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/assign/list_of.hpp (renamed from src/third_party/boost-1.69.0/boost/assign/list_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/atomic_flag.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/atomic_flag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/capabilities.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/capabilities.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/addressof.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/atomic_flag.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/atomic_flag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/atomic_template.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/atomic_template.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/bitwise_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/bitwise_fp_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_fp_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_alpha.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_alpha.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_sparc.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sparc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_linux_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_linux_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_msvc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_msvc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/caps_windows.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/caps_windows.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/config.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_operations.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_operations_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_ops_emulated.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_ops_generic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_generic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_operations.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_operations_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_emulated.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_generic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_generic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_msvc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_msvc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/float_sizes.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/float_sizes.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/fp_operations.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/fp_operations_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/fp_ops_emulated.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/fp_ops_generic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_generic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/int_sizes.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/int_sizes.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/integral_extend.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/integral_extend.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/interlocked.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/interlocked.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/link.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/link.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/lockpool.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/lockpool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/operations.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/operations.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/operations_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/operations_lockfree.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/operations_lockfree.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_cas_based.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_cas_based.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_emulated.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_extending_cas_based.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_extending_cas_based.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_alpha.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_alpha.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_arm_common.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_ppc_common.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_sparc.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sparc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_linux_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_linux_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_common.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/ops_windows.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/ops_windows.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/pause.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/pause.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/platform.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/platform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/storage_type.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/storage_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/string_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/string_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/conditional.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/conditional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/integral_constant.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/integral_constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_floating_point.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_floating_point.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_function.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_function.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_iec559.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_iec559.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_integral.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_integral.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_signed.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_signed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/make_signed.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_signed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/make_unsigned.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_unsigned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/atomic/fences.hpp (renamed from src/third_party/boost-1.69.0/boost/atomic/fences.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/apply.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/arg.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/bind_cc.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/bind_cc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/bind_mf2_cc.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/bind_mf2_cc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/bind_mf_cc.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/bind_mf_cc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/bind_template.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/bind_template.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/make_adaptable.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/make_adaptable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/mem_fn.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/mem_fn.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/mem_fn_cc.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/mem_fn_cc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/mem_fn_template.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/mem_fn_template.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/mem_fn_vw.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/mem_fn_vw.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/placeholders.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/protect.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/protect.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/bind/storage.hpp (renamed from src/third_party/boost-1.69.0/boost/bind/storage.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/call_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/call_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/cerrno.hpp (renamed from src/third_party/boost-1.69.0/boost/cerrno.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/checked_delete.hpp (renamed from src/third_party/boost-1.69.0/boost/checked_delete.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/ceil.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/ceil.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/chrono.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/chrono_io.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/chrono_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/clock_string.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/clock_string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/config.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/chrono.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/chrono.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/thread_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/chrono.hpp141
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/thread_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/thread_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/chrono.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/thread_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/is_evenly_divisible_by.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/is_evenly_divisible_by.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/scan_keyword.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/scan_keyword.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/static_assert.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/static_assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/detail/system.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/detail/system.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/duration.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/duration.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/floor.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/floor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/include.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/include.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/duration_get.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/duration_get.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/duration_io.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/duration_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/duration_put.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/duration_put.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/duration_style.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/duration_style.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/duration_units.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/duration_units.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/ios_base_state.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/ios_base_state.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/time_point_get.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/time_point_get.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/time_point_io.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/time_point_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/time_point_put.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/time_point_put.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/time_point_units.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/time_point_units.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/timezone.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/timezone.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/utility/ios_base_state_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/utility/ios_base_state_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/utility/manip_base.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/utility/manip_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io/utility/to_string.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io/utility/to_string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/io_v1/chrono_io.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/io_v1/chrono_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/round.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/round.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/system_clocks.hpp233
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/thread_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/chrono/time_point.hpp (renamed from src/third_party/boost-1.69.0/boost/chrono/time_point.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/compressed_pair.hpp (renamed from src/third_party/boost-1.69.0/boost/compressed_pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/assert.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/backward_compatibility.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/backward_compatibility.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/borland.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/borland.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/concept_def.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/concept_def.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/concept_undef.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/concept_undef.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/general.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/general.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/has_constraints.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/detail/msvc.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/requires.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/requires.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept/usage.hpp (renamed from src/third_party/boost-1.69.0/boost/concept/usage.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept_archetype.hpp (renamed from src/third_party/boost-1.69.0/boost/concept_archetype.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/concept_check.hpp (renamed from src/third_party/boost-1.69.0/boost/concept_check.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config.hpp (renamed from src/third_party/boost-1.69.0/boost/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/abi/borland_prefix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/abi/borland_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/abi/borland_suffix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/abi/borland_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/abi/msvc_prefix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/abi/msvc_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/abi/msvc_suffix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/abi/msvc_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/abi_prefix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/abi_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/abi_suffix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/abi_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/auto_link.hpp479
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/borland.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/borland.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/clang.hpp348
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/codegear.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/codegear.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/comeau.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/common_edg.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/common_edg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/compaq_cxx.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/compaq_cxx.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/cray.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/cray.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/diab.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/diab.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/digitalmars.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/digitalmars.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/gcc.hpp361
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/gcc_xml.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/gcc_xml.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/greenhills.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/greenhills.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/hp_acc.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/intel.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/kai.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/metrowerks.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/mpw.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/nvcc.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/nvcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/pathscale.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/pathscale.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/pgi.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/pgi.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/sgi_mipspro.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/sgi_mipspro.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/sunpro_cc.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/sunpro_cc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/vacpp.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/vacpp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/visualc.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/xlcpp.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/xlcpp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/compiler/xlcpp_zos.hpp (renamed from src/third_party/boost-1.69.0/boost/config/compiler/xlcpp_zos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/detail/posix_features.hpp (renamed from src/third_party/boost-1.69.0/boost/config/detail/posix_features.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/detail/select_compiler_config.hpp (renamed from src/third_party/boost-1.69.0/boost/config/detail/select_compiler_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/detail/select_platform_config.hpp (renamed from src/third_party/boost-1.69.0/boost/config/detail/select_platform_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/detail/select_stdlib_config.hpp (renamed from src/third_party/boost-1.69.0/boost/config/detail/select_stdlib_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/detail/suffix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/detail/suffix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/header_deprecated.hpp (renamed from src/third_party/boost-1.69.0/boost/config/header_deprecated.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/helper_macros.hpp (renamed from src/third_party/boost-1.69.0/boost/config/helper_macros.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/no_tr1/cmath.hpp (renamed from src/third_party/boost-1.69.0/boost/config/no_tr1/cmath.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/no_tr1/complex.hpp (renamed from src/third_party/boost-1.69.0/boost/config/no_tr1/complex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/no_tr1/functional.hpp (renamed from src/third_party/boost-1.69.0/boost/config/no_tr1/functional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/no_tr1/memory.hpp (renamed from src/third_party/boost-1.69.0/boost/config/no_tr1/memory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/no_tr1/utility.hpp (renamed from src/third_party/boost-1.69.0/boost/config/no_tr1/utility.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/aix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/aix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/amigaos.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/amigaos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/beos.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/beos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/bsd.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/bsd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/cloudabi.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/cloudabi.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/cray.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/cray.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/cygwin.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/haiku.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/haiku.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/hpux.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/hpux.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/irix.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/irix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/linux.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/linux.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/macos.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/macos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/qnxnto.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/qnxnto.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/solaris.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/solaris.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/symbian.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/symbian.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/vms.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/vms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/vxworks.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/vxworks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/win32.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/win32.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/platform/zos.hpp (renamed from src/third_party/boost-1.69.0/boost/config/platform/zos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/pragma_message.hpp (renamed from src/third_party/boost-1.69.0/boost/config/pragma_message.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/requires_threads.hpp (renamed from src/third_party/boost-1.69.0/boost/config/requires_threads.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/dinkumware.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/dinkumware.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/libcomo.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/libcomo.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/libcpp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/libstdcpp3.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/modena.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/modena.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/msl.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/msl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/roguewave.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/roguewave.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/sgi.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/sgi.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/stlport.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/stlport.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/vacpp.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/vacpp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/stdlib/xlcpp_zos.hpp (renamed from src/third_party/boost-1.69.0/boost/config/stdlib/xlcpp_zos.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/user.hpp (renamed from src/third_party/boost-1.69.0/boost/config/user.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/warning_disable.hpp (renamed from src/third_party/boost-1.69.0/boost/config/warning_disable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/config/workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/config/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/adaptive_pool.hpp (renamed from src/third_party/boost-1.69.0/boost/container/adaptive_pool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/allocator.hpp369
-rw-r--r--src/third_party/boost-1.70.0/boost/container/allocator_traits.hpp493
-rw-r--r--src/third_party/boost-1.70.0/boost/container/container_fwd.hpp290
-rw-r--r--src/third_party/boost-1.70.0/boost/container/deque.hpp2283
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/adaptive_node_pool.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/adaptive_node_pool_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/addressof.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/advanced_insert_int.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/advanced_insert_int.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/alloc_helpers.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/alloc_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/alloc_lib.h (renamed from src/third_party/boost-1.69.0/boost/container/detail/alloc_lib.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/allocation_type.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/allocation_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/allocator_version_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/allocator_version_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/auto_link.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/auto_link.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/block_list.hpp140
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/block_slist.hpp158
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/compare_functors.hpp130
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/config_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/config_end.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/construct_in_place.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/construct_in_place.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/container_or_allocator_rebind.hpp53
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/container_rebind.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/container_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/copy_move_algo.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/copy_move_algo.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/destroyers.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/destroyers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/dispatch_uses_allocator.hpp461
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/dlmalloc.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/dlmalloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/flat_tree.hpp1632
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/function_detector.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/function_detector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/is_container.hpp62
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/is_contiguous_container.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/is_contiguous_container.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/is_sorted.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/is_sorted.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/iterator_to_raw_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/iterator_to_raw_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/iterators.hpp891
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/math_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/math_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/min_max.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/minimal_char_traits_header.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/minimal_char_traits_header.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/mpl.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/mpl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/multiallocation_chain.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/multiallocation_chain.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/next_capacity.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/next_capacity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/node_alloc_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/node_alloc_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/node_pool.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/node_pool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/node_pool_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/node_pool_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/pair.hpp679
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/pair_key_mapped_of_value.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/pair_key_mapped_of_value.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/placement_new.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/placement_new.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/pool_common.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/pool_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/pool_common_alloc.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/pool_common_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/pool_resource.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/pool_resource.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/singleton.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/singleton.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/std_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/std_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/thread_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/thread_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/transform_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/tree.hpp1528
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/type_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/value_functors.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/value_functors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/value_init.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/value_init.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/variadic_templates_tools.hpp (renamed from src/third_party/boost-1.69.0/boost/container/detail/variadic_templates_tools.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/version_type.hpp100
-rw-r--r--src/third_party/boost-1.70.0/boost/container/detail/workaround.hpp133
-rw-r--r--src/third_party/boost-1.70.0/boost/container/flat_map.hpp2976
-rw-r--r--src/third_party/boost-1.70.0/boost/container/flat_set.hpp (renamed from src/third_party/boost-1.69.0/boost/container/flat_set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/list.hpp1537
-rw-r--r--src/third_party/boost-1.70.0/boost/container/map.hpp2313
-rw-r--r--src/third_party/boost-1.70.0/boost/container/new_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/new_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/node_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/node_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/node_handle.hpp (renamed from src/third_party/boost-1.69.0/boost/container/node_handle.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/options.hpp (renamed from src/third_party/boost-1.69.0/boost/container/options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/deque.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/deque.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/flat_map.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/flat_map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/flat_set.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/flat_set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/global_resource.hpp63
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/list.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/map.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/memory_resource.hpp102
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/monotonic_buffer_resource.hpp183
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/polymorphic_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/polymorphic_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/pool_options.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/pool_options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/resource_adaptor.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/resource_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/set.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/slist.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/slist.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/small_vector.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/small_vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/stable_vector.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/stable_vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/string.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/synchronized_pool_resource.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/synchronized_pool_resource.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/unsynchronized_pool_resource.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/unsynchronized_pool_resource.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/pmr/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/container/pmr/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/scoped_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/scoped_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/scoped_allocator_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/container/scoped_allocator_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/set.hpp1710
-rw-r--r--src/third_party/boost-1.70.0/boost/container/slist.hpp1754
-rw-r--r--src/third_party/boost-1.70.0/boost/container/small_vector.hpp673
-rw-r--r--src/third_party/boost-1.70.0/boost/container/stable_vector.hpp2198
-rw-r--r--src/third_party/boost-1.70.0/boost/container/static_vector.hpp (renamed from src/third_party/boost-1.69.0/boost/container/static_vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/string.hpp3505
-rw-r--r--src/third_party/boost-1.70.0/boost/container/throw_exception.hpp181
-rw-r--r--src/third_party/boost-1.70.0/boost/container/uses_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/container/uses_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/uses_allocator_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/container/uses_allocator_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container/vector.hpp3435
-rw-r--r--src/third_party/boost-1.70.0/boost/container_hash/detail/float_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/container_hash/detail/float_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container_hash/detail/hash_float.hpp (renamed from src/third_party/boost-1.69.0/boost/container_hash/detail/hash_float.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container_hash/detail/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/container_hash/detail/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container_hash/extensions.hpp (renamed from src/third_party/boost-1.69.0/boost/container_hash/extensions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container_hash/hash.hpp (renamed from src/third_party/boost-1.69.0/boost/container_hash/hash.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/container_hash/hash_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/container_hash/hash_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/context/detail/config.hpp127
-rw-r--r--src/third_party/boost-1.70.0/boost/context/detail/fcontext.hpp (renamed from src/third_party/boost-1.69.0/boost/context/detail/fcontext.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/addressof.hpp (renamed from src/third_party/boost-1.69.0/boost/core/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/checked_delete.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/core/demangle.hpp (renamed from src/third_party/boost-1.69.0/boost/core/demangle.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/empty_value.hpp (renamed from src/third_party/boost-1.69.0/boost/core/empty_value.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/enable_if.hpp (renamed from src/third_party/boost-1.69.0/boost/core/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/explicit_operator_bool.hpp (renamed from src/third_party/boost-1.69.0/boost/core/explicit_operator_bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/ignore_unused.hpp (renamed from src/third_party/boost-1.69.0/boost/core/ignore_unused.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/is_same.hpp (renamed from src/third_party/boost-1.69.0/boost/core/is_same.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/lightweight_test.hpp (renamed from src/third_party/boost-1.69.0/boost/core/lightweight_test.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/lightweight_test_trait.hpp83
-rw-r--r--src/third_party/boost-1.70.0/boost/core/no_exceptions_support.hpp (renamed from src/third_party/boost-1.69.0/boost/core/no_exceptions_support.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/noncopyable.hpp (renamed from src/third_party/boost-1.69.0/boost/core/noncopyable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/pointer_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/core/pointer_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/ref.hpp (renamed from src/third_party/boost-1.69.0/boost/core/ref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/scoped_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/core/scoped_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/swap.hpp (renamed from src/third_party/boost-1.69.0/boost/core/swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/typeinfo.hpp (renamed from src/third_party/boost-1.69.0/boost/core/typeinfo.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/core/use_default.hpp17
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/all.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/all.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/asymmetric_coroutine.hpp2408
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/attributes.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/attributes.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/coroutine.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/coroutine.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/config.hpp41
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/coroutine_context.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/coroutine_context.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/data.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/data.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/flags.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/flags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/parameters.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/parameters.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/preallocated.hpp45
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_object.hpp323
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_object.hpp335
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_synthesized.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_synthesized.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/setup.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/setup.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_call.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_call.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_object.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_object.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline_pull.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_pull.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline_push.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_push.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/exceptions.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/exceptions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/flags.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/flags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/posix/protected_stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/posix/protected_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/posix/segmented_stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/posix/segmented_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/protected_stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/protected_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/segmented_stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/segmented_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/stack_context.hpp66
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/stack_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/stack_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/standard_stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/standard_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/symmetric_coroutine.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/coroutine/windows/protected_stack_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/coroutine/windows/protected_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/cregex.hpp (renamed from src/third_party/boost-1.69.0/boost/cregex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/cstdint.hpp (renamed from src/third_party/boost-1.69.0/boost/cstdint.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/cstdlib.hpp (renamed from src/third_party/boost-1.69.0/boost/cstdlib.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/current_function.hpp75
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/adjust_functors.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/adjust_functors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/c_local_time_adjustor.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/c_local_time_adjustor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/c_time.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/c_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/compiler_config.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/compiler_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/constrained_value.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/constrained_value.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_clock_device.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_clock_device.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_defs.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_defs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_duration.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_duration.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_duration_types.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_duration_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_format_simple.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_format_simple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_formatting.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_formatting.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_formatting_limited.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_formatting_limited.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_formatting_locales.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_formatting_locales.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_generator_formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_generator_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_generator_parser.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_generator_parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_generators.hpp509
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_names_put.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_names_put.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/date_parsing.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/date_parsing.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/dst_rules.hpp391
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/dst_transition_generators.hpp75
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/filetime_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/filetime_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/format_date_parser.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/format_date_parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/conversion.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/conversion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/formatters.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/formatters_limited.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters_limited.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_calendar.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_calendar.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_date.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_date.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_day.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_day_of_year.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day_of_year.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_duration.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_duration_types.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_month.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_month.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_serialize.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_serialize.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_weekday.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_weekday.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_year.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_year.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_ymd.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_ymd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian_io.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian_types.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian/parsers.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian/parsers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.hpp71
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.ipp (renamed from src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/int_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/int_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/iso_format.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/iso_format.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/conversion.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/conversion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/custom_time_zone.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/custom_time_zone.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/date_duration_operators.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/date_duration_operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/dst_transition_day_rules.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/dst_transition_day_rules.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/local_date_time.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/local_date_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/local_time.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/local_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/local_time_io.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/local_time_types.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/posix_time_zone.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/posix_time_zone.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time/tz_database.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time/tz_database.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_time_adjustor.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_time_adjustor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/local_timezone_defs.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/local_timezone_defs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/locale_config.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/locale_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/microsec_time_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/microsec_time_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/parse_format_base.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/parse_format_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/period.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/period.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/period_formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/period_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/period_parser.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/period_parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/conversion.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/conversion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/date_duration_operators.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/date_duration_operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_config.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_duration.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_duration.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_io.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_legacy_io.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_legacy_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_system.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_system.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_types.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/ptime.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/ptime.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/time_formatters.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/time_formatters_limited.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters_limited.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/time_parsers.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/time_parsers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/time_period.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/time_period.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/posix_time/time_serialize.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/posix_time/time_serialize.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/special_defs.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/special_defs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/special_values_formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/special_values_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/special_values_parser.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/special_values_parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/string_convert.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/string_convert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/string_parse_tree.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/string_parse_tree.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/strings_from_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/strings_from_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_clock.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_clock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_defs.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_defs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_duration.hpp298
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_formatting_streams.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_formatting_streams.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_parsing.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_parsing.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_resolution_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_resolution_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_system_counted.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_system_counted.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_system_split.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/time_system_split.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_zone_base.hpp100
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/time_zone_names.hpp98
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/tz_db_base.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/tz_db_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/wrapping_int.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/wrapping_int.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/date_time/year_month_day.hpp (renamed from src/third_party/boost-1.69.0/boost/date_time/year_month_day.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/atomic_count.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/atomic_count.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/basic_pointerbuf.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/basic_pointerbuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/bitmask.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/bitmask.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/call_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/call_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/compressed_pair.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/compressed_pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/container_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/container_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/endian.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/endian.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/fenv.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/fenv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/indirect_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/indirect_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/interlocked.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/interlocked.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/is_incrementable.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/lcast_precision.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/lcast_precision.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/lightweight_main.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/lightweight_main.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/lightweight_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/lightweight_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/lightweight_test.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/lightweight_test.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/lightweight_test_report.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/lightweight_test_report.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/lightweight_thread.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/lightweight_thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/no_exceptions_support.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/no_exceptions_support.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/numeric_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/numeric_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/quick_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/quick_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/reference_content.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/reference_content.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/scoped_enum_emulation.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/scoped_enum_emulation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/select_type.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/select_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/sp_typeinfo.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/sp_typeinfo.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/utf8_codecvt_facet.ipp (renamed from src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/detail/deprecated_namespace.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/detail/deprecated_namespace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/get_current_process.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/get_current_process.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/get_current_thread.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/get_current_thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/get_last_error.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/get_last_error.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/get_process_times.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/get_process_times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/get_thread_times.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/get_thread_times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/time.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/winapi/timers.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/winapi/timers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/detail/workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/dynamic_bitset.hpp (renamed from src/third_party/boost-1.69.0/boost/dynamic_bitset.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/dynamic_bitset/config.hpp (renamed from src/third_party/boost-1.69.0/boost/dynamic_bitset/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp300
-rw-r--r--src/third_party/boost-1.70.0/boost/dynamic_bitset/detail/lowest_bit.hpp (renamed from src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/lowest_bit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/dynamic_bitset/dynamic_bitset.hpp (renamed from src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/dynamic_bitset_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/dynamic_bitset_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/enable_shared_from_this.hpp (renamed from src/third_party/boost-1.69.0/boost/enable_shared_from_this.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/current_exception_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/current_exception_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/clone_current_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/clone_current_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/error_info_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/error_info_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/exception_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/exception_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/is_output_streamable.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/is_output_streamable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/object_hex_dump.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/object_hex_dump.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/shared_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/detail/type_info.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/detail/type_info.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/diagnostic_information.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/diagnostic_information.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/exception.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/get_error_info.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/get_error_info.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/info.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/info.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/to_string.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/to_string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception/to_string_stub.hpp (renamed from src/third_party/boost-1.69.0/boost/exception/to_string_stub.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/exception_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/exception_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem.hpp21
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/config.hpp110
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/convenience.hpp58
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/detail/macro_value.hpp44
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/filesystem/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/exception.hpp (renamed from src/third_party/boost-1.69.0/boost/filesystem/exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/fstream.hpp192
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/operations.hpp1426
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/path.hpp1026
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/path_traits.hpp352
-rw-r--r--src/third_party/boost-1.70.0/boost/filesystem/string_file.hpp43
-rw-r--r--src/third_party/boost-1.70.0/boost/foreach.hpp (renamed from src/third_party/boost-1.69.0/boost/foreach.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/foreach_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/foreach_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format.hpp (renamed from src/third_party/boost-1.69.0/boost/format.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/alt_sstream.hpp (renamed from src/third_party/boost-1.69.0/boost/format/alt_sstream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/alt_sstream_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/format/alt_sstream_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/detail/compat_workarounds.hpp (renamed from src/third_party/boost-1.69.0/boost/format/detail/compat_workarounds.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/detail/config_macros.hpp (renamed from src/third_party/boost-1.69.0/boost/format/detail/config_macros.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/detail/msvc_disambiguater.hpp (renamed from src/third_party/boost-1.69.0/boost/format/detail/msvc_disambiguater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/detail/unset_macros.hpp (renamed from src/third_party/boost-1.69.0/boost/format/detail/unset_macros.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/detail/workarounds_gcc-2_95.hpp (renamed from src/third_party/boost-1.69.0/boost/format/detail/workarounds_gcc-2_95.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/detail/workarounds_stlport.hpp (renamed from src/third_party/boost-1.69.0/boost/format/detail/workarounds_stlport.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/exceptions.hpp (renamed from src/third_party/boost-1.69.0/boost/format/exceptions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/feed_args.hpp (renamed from src/third_party/boost-1.69.0/boost/format/feed_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/format_class.hpp (renamed from src/third_party/boost-1.69.0/boost/format/format_class.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/format_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/format/format_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/format_implementation.hpp (renamed from src/third_party/boost-1.69.0/boost/format/format_implementation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/free_funcs.hpp (renamed from src/third_party/boost-1.69.0/boost/format/free_funcs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/group.hpp (renamed from src/third_party/boost-1.69.0/boost/format/group.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/internals.hpp (renamed from src/third_party/boost-1.69.0/boost/format/internals.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/internals_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/format/internals_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/format/parsing.hpp (renamed from src/third_party/boost-1.69.0/boost/format/parsing.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function.hpp (renamed from src/third_party/boost-1.69.0/boost/function.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/detail/function_iterate.hpp (renamed from src/third_party/boost-1.69.0/boost/function/detail/function_iterate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/detail/gen_maybe_include.pl (renamed from src/third_party/boost-1.69.0/boost/function/detail/gen_maybe_include.pl)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/detail/maybe_include.hpp (renamed from src/third_party/boost-1.69.0/boost/function/detail/maybe_include.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/detail/prologue.hpp (renamed from src/third_party/boost-1.69.0/boost/function/detail/prologue.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function0.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function0.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function1.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function10.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function2.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function3.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function4.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function5.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function6.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function7.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function8.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function9.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function_base.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function_template.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function_template.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/function_typeof.hpp (renamed from src/third_party/boost-1.69.0/boost/function/function_typeof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function/gen_function_N.pl (renamed from src/third_party/boost-1.69.0/boost/function/gen_function_N.pl)0
-rw-r--r--src/third_party/boost-1.70.0/boost/function_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/function_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/functional/hash.hpp (renamed from src/third_party/boost-1.69.0/boost/functional/hash.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/functional/hash/hash.hpp (renamed from src/third_party/boost-1.69.0/boost/functional/hash/hash.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/functional/hash_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/functional/hash_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/mpl_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/mpl_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/std_pair.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/std_pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/adapt_struct.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/adapt_struct.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_base.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/deref_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/extension.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/extension.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/size_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/algorithm/transformation/push_back.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/algorithm/transformation/push_front.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/generation/ignore.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/generation/ignore.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/cons.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/cons.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/cons_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/cons_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/cons_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/cons_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/deref_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/empty_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/empty_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/equal_to_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/equal_to_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/next_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/reverse_cons.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/reverse_cons.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/list_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/list_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/list/nil.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/list/nil.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/advance_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/advance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/config.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/deref_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/distance_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/distance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/equal_to_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/equal_to_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/next_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/prior_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/prior_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/vector_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/container/vector/vector_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/include/std_pair.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/include/std_pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/include/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/include/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/advance.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/advance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/basic_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/basic_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/deref.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/deref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/deref_data.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/deref_data.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/adapt_value_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/advance.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/advance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/distance.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/distance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segment_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segment_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_next_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/distance.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/distance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/iterator_facade.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/iterator_facade.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/key_of.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/key_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/mpl/convert_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/convert_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/mpl/fusion_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/fusion_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/next.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/next.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/prior.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/prior.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/segmented_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/segmented_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/value_of.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/value_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/iterator/value_of_data.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/iterator/value_of_data.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/mpl/begin.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/mpl/begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/mpl/end.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/mpl/end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/less.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/enable_comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/enable_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/less.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/at.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/at.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/begin.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/end.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/segments.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/segments.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/size.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/value_at.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/value_at.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/io.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/in.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/in.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/manip.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/out.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/out.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/io/in.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/io/in.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/sequence/io/out.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/sequence/io/out.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/as_const.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/as_const.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/category_of.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/category_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/config.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/access.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/access.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/and.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/as_fusion_element.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/as_fusion_element.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/enabler.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/enabler.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/index_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/index_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/is_mpl_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/is_mpl_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/mpl_iterator_category.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/mpl_iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/pp_round.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/pp_round.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/is_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/is_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/is_segmented.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/is_segmented.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/is_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/is_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/is_view.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/is_view.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/iterator_base.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/iterator_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/sequence_base.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/sequence_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/tag_of.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/tag_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/tag_of_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/tag_of_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/support/void.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/support/void.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/make_tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/make_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_expand.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_expand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_tie.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_tie.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/make_tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/make_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/tuple_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/tuple/tuple_tie.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_tie.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/size_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/iterator_range.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/deref_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/next_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/advance_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/advance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/begin_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/deref_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/distance_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/distance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/next_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/prior_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/prior_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/size_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/single_view.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/fusion/view/single_view/single_view_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/generator_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/generator_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/get_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/get_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/indirect_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/indirect_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer.hpp (renamed from src/third_party/boost-1.69.0/boost/integer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/common_factor.hpp (renamed from src/third_party/boost-1.69.0/boost/integer/common_factor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/common_factor_ct.hpp (renamed from src/third_party/boost-1.69.0/boost/integer/common_factor_ct.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/common_factor_rt.hpp580
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/extended_euclidean.hpp83
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/integer_log2.hpp (renamed from src/third_party/boost-1.69.0/boost/integer/integer_log2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/integer_mask.hpp (renamed from src/third_party/boost-1.69.0/boost/integer/integer_mask.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/mod_inverse.hpp53
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/static_log2.hpp (renamed from src/third_party/boost-1.69.0/boost/integer/static_log2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer/static_min_max.hpp (renamed from src/third_party/boost-1.69.0/boost/integer/static_min_max.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/integer_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/integer_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/integer_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/allocators/allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/allocators/allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/allocators/detail/allocator_common.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/allocators/detail/allocator_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/containers/allocation_type.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/containers/allocation_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/containers/containers_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/containers/containers_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/containers/string.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/containers/string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/containers/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/containers/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/containers/version_type.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/containers/version_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/creation_tags.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/creation_tags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/cast_tags.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/cast_tags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/config_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/config_end.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/config_external_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/config_external_end.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/file_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/file_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/in_place_interface.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/in_place_interface.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/intermodule_singleton_common.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/intermodule_singleton_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/interprocess_tester.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/interprocess_tester.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/managed_memory_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/managed_memory_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/managed_open_or_create_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/managed_open_or_create_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/math_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/math_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/min_max.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/mpl.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/mpl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/named_proxy.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/named_proxy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/nothrow.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/nothrow.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/os_file_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/os_file_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/os_thread_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/os_thread_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/posix_time_types_wrk.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/posix_time_types_wrk.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/segment_manager_helper.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/segment_manager_helper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/shared_dir_helpers.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/shared_dir_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/simple_swap.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/simple_swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/std_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/std_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/transform_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/type_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/utilities.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/utilities.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/variadic_templates_tools.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/variadic_templates_tools.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/win32_api.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/win32_api.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/windows_intermodule_singleton.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/windows_intermodule_singleton.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/detail/workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/errors.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/errors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/exceptions.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/exceptions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/file_mapping.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/file_mapping.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/indexes/iset_index.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/indexes/iset_index.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/interprocess_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/interprocess_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/managed_mapped_file.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/managed_mapped_file.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/managed_shared_memory.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/managed_shared_memory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/mapped_region.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/mapped_region.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/offset_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/offset_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/permissions.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/permissions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/segment_manager.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/segment_manager.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/shared_memory_object.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/shared_memory_object.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/smart_ptr/deleter.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/smart_ptr/deleter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/streams/bufferstream.hpp491
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/detail/common_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/detail/common_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/detail/locks.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/detail/locks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/interprocess_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/lock_options.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/lock_options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/mutex_family.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/mutex_family.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/named_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/null_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/null_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/named_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/named_semaphore.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_semaphore.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/pthread_helpers.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/pthread_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/scoped_lock.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/scoped_lock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/shm/named_creation_functor.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_creation_functor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/shm/named_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/spin/mutex.hpp101
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/spin/recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/spin/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/spin/wait.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/spin/wait.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/named_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/named_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/sync_utils.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/sync_utils.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp82
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/any_hook.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/any_hook.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/avl_set.hpp1073
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/avl_set_hook.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/avl_set_hook.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/avltree.hpp588
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/avltree_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/avltree_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/bs_set.hpp1069
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/bs_set_hook.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/bs_set_hook.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/bstree.hpp2246
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/bstree_algorithms.hpp2097
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/circular_list_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/circular_list_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/circular_slist_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/circular_slist_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/derivation_value_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/derivation_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/algo_type.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/algo_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/any_node_and_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/any_node_and_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/array_initializer.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/array_initializer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/assert.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/avltree_node.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/avltree_node.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/bstree_algorithms_base.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/bstree_algorithms_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/common_slist_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/common_slist_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/config_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/config_end.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/default_header_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/default_header_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/ebo_functor_holder.hpp292
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/empty_node_checker.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/empty_node_checker.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/equal_to_value.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/equal_to_value.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/exception_disposer.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/exception_disposer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/function_detector.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/function_detector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/generic_hook.hpp223
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/get_value_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/get_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/has_member_function_callable_with.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/has_member_function_callable_with.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/hashtable_node.hpp295
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/hook_traits.hpp195
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/iiterator.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/iiterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/is_stateful_value_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/is_stateful_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/iterator.hpp262
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/key_nodeptr_comp.hpp125
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/list_iterator.hpp146
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/list_node.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/list_node.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/math.hpp295
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/minimal_less_equal_header.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_less_equal_header.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/minimal_pair_header.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_pair_header.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/mpl.hpp217
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/node_cloner_disposer.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/node_cloner_disposer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/node_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/node_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/node_to_value.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/node_to_value.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/parent_from_member.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/parent_from_member.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/rbtree_node.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/rbtree_node.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/reverse_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/simple_disposers.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/simple_disposers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/size_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/size_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/slist_iterator.hpp137
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/slist_node.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/slist_node.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/std_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/std_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/transform_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/tree_iterator.hpp184
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/tree_node.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/tree_node.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/tree_value_compare.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/tree_value_compare.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/uncast.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/detail/uncast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/detail/workaround.hpp53
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/hashtable.hpp3664
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/intrusive_fwd.hpp766
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/linear_slist_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/linear_slist_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/link_mode.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/link_mode.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/list.hpp1516
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/list_hook.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/list_hook.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/member_value_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/member_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/options.hpp264
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/pack_options.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/pack_options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/parent_from_member.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/parent_from_member.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/pointer_plus_bits.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/pointer_plus_bits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/pointer_rebind.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/pointer_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/pointer_traits.hpp318
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/priority_compare.hpp82
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/rbtree.hpp591
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/rbtree_algorithms.hpp622
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/set.hpp1073
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/set_hook.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/set_hook.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/sg_set.hpp1094
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/sgtree.hpp1081
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/sgtree_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/sgtree_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/slist.hpp2254
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/slist_hook.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/slist_hook.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/splay_set.hpp1110
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/splaytree.hpp666
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/splaytree_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/splaytree_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/treap.hpp1371
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/treap_algorithms.hpp702
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/treap_set.hpp1113
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/trivial_value_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/trivial_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/unordered_set.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive/unordered_set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive/unordered_set_hook.hpp459
-rw-r--r--src/third_party/boost-1.70.0/boost/intrusive_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/intrusive_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/io/detail/quoted_manip.hpp (renamed from src/third_party/boost-1.69.0/boost/io/detail/quoted_manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/io/ios_state.hpp (renamed from src/third_party/boost-1.69.0/boost/io/ios_state.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/io_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/io_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/categories.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/categories.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/chain.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/chain.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/char_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/char_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/checked_operations.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/checked_operations.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/close.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/close.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/code_converter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/code_converter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/combine.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/combine.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/compose.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/compose.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/concepts.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/concepts.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/constants.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/constants.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/copy.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/absolute_path.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/absolute_path.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/access_control.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/access_control.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/concept_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/concept_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/device_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/device_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/direct_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/direct_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/filter_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/filter_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/mode_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/mode_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/range_adapter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/range_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/add_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/add_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/bool_trait_def.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/bool_trait_def.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/buffer.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/buffer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/call_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/call_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/char_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/char_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/codecvt_helper.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_helper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/codecvt_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/auto_link.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/auto_link.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/bzip2.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/bzip2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/codecvt.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/codecvt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/disable_warnings.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/disable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/dyn_link.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/dyn_link.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/enable_warnings.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/enable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/fpos.hpp44
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/gcc.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/gcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/overload_resolution.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/overload_resolution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/rtl.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/rtl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/unreachable_return.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/unreachable_return.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/wide_streams.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/wide_streams.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/windows_posix.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/windows_posix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/config/zlib.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/config/zlib.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/counted_array.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/counted_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/current_directory.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/current_directory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/default_arg.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/default_arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/dispatch.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/dispatch.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/double_object.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/double_object.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/enable_if_stream.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/enable_if_stream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/error.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/error.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/execute.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/execute.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/file_handle.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/file_handle.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/forward.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/fstream.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/fstream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/functional.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/functional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/ios.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/ios.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/iostream.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/iostream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/is_dereferenceable.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/is_dereferenceable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/is_iterator_range.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/is_iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/newline.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/newline.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/optional.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/optional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/param_type.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/param_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/path.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/path.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/push.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/push.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/push_params.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/push_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/resolve.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/resolve.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/restrict_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/restrict_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/select.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/select.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/select_by_size.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/select_by_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/chainbuf.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/chainbuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/system_failure.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/system_failure.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/template_params.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/template_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/translate_int_type.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/translate_int_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/detail/wrap_unwrap.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/detail/wrap_unwrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/device/array.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/device/array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/device/back_inserter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/device/back_inserter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/device/file.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/device/file.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/device/file_descriptor.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/device/file_descriptor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/device/mapped_file.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/device/mapped_file.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/device/null.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/device/null.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/aggregate.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/aggregate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/bzip2.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/bzip2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/counter.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/counter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/grep.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/grep.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/gzip.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/gzip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/line.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/line.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/lzma.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/lzma.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/newline.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/newline.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/regex.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/stdio.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/stdio.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/symmetric.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/symmetric.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/test.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/test.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/zlib.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/zlib.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filter/zstd.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filter/zstd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filtering_stream.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filtering_stream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/filtering_streambuf.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/filtering_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/flush.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/flush.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/get.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/get.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/imbue.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/imbue.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/input_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/input_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/invert.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/invert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/operations.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/operations.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/operations_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/optimal_buffer_size.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/optimal_buffer_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/output_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/output_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/pipeline.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/pipeline.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/positioning.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/positioning.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/put.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/put.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/putback.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/putback.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/read.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/read.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/restrict.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/restrict.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/seek.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/seek.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/skip.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/skip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/slice.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/slice.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/stream.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/stream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/stream_buffer.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/stream_buffer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/tee.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/tee.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/traits.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/traits_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/traits_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iostreams/write.hpp (renamed from src/third_party/boost-1.69.0/boost/iostreams/write.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/is_placeholder.hpp (renamed from src/third_party/boost-1.69.0/boost/is_placeholder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/advance.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/advance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/counting_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/detail/config_def.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/detail/config_def.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/detail/config_undef.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/detail/config_undef.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/detail/enable_if.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/detail/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/detail/facade_iterator_category.hpp194
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/distance.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/distance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/filter_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/filter_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/indirect_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/indirect_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/interoperable.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/interoperable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/iterator_adaptor.hpp358
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/iterator_categories.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/iterator_categories.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/iterator_concepts.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/iterator_concepts.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/iterator_facade.hpp981
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/iterator_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/iterator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/minimum_category.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/minimum_category.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/reverse_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/iterator/transform_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/iterator/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/core.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/core.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/actions.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/actions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/arity_code.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/arity_code.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/bind_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/bind_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/function_adaptors.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/function_adaptors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/is_instance_of.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/is_instance_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/lambda_config.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/lambda_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/lambda_functor_base.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functor_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/lambda_functors.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/lambda_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/lambda_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/lambda_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/lambda_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/member_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/member_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/operator_actions.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/operator_actions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/operator_lambda_func_base.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/operator_lambda_func_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/operator_return_type_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/operator_return_type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/operators.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/ret.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/ret.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/return_type_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/return_type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/detail/select_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/detail/select_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/if.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lambda/lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/lambda/lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast.hpp105
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/bad_lexical_cast.hpp101
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/converter_lexical.hpp498
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/converter_lexical_streams.hpp786
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/converter_numeric.hpp172
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/inf_nan.hpp197
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/is_character.hpp59
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/lcast_char_constants.hpp46
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp294
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/detail/widest_char.hpp43
-rw-r--r--src/third_party/boost-1.70.0/boost/lexical_cast/try_lexical_convert.hpp232
-rw-r--r--src/third_party/boost-1.70.0/boost/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/logic/tribool.hpp (renamed from src/third_party/boost-1.69.0/boost/logic/tribool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/logic/tribool_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/logic/tribool_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/make_shared.hpp (renamed from src/third_party/boost-1.69.0/boost/make_shared.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/constants/calculate_constants.hpp (renamed from src/third_party/boost-1.69.0/boost/math/constants/calculate_constants.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/constants/constants.hpp357
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/beta.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/beta.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/binomial.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/binomial.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/cauchy.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/cauchy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/chi_squared.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/chi_squared.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/complement.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/complement.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/detail/common_error_handling.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/detail/common_error_handling.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/detail/derived_accessors.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/detail/derived_accessors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/detail/generic_mode.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_mode.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/detail/generic_quantile.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_quantile.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/detail/inv_discrete_quantile.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/detail/inv_discrete_quantile.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/exponential.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/exponential.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/extreme_value.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/extreme_value.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/fisher_f.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/fisher_f.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/gamma.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/gamma.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/geometric.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/geometric.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/hyperexponential.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/hyperexponential.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/laplace.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/laplace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/lognormal.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/lognormal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/negative_binomial.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/negative_binomial.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/non_central_chi_squared.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/non_central_chi_squared.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/normal.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/normal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/poisson.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/poisson.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/students_t.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/students_t.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/triangular.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/triangular.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/uniform.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/uniform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/distributions/weibull.hpp (renamed from src/third_party/boost-1.69.0/boost/math/distributions/weibull.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/policies/error_handling.hpp (renamed from src/third_party/boost-1.69.0/boost/math/policies/error_handling.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/policies/policy.hpp (renamed from src/third_party/boost-1.69.0/boost/math/policies/policy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/acosh.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/acosh.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/asinh.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/asinh.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/atanh.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/atanh.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/bernoulli.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/bernoulli.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/bessel.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/bessel.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/beta.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/beta.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/binomial.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/binomial.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/cbrt.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/cbrt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/cos_pi.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/cos_pi.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bernoulli_details.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bernoulli_details.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i0.hpp564
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i1.hpp592
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_ik.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_ik.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j0.hpp203
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j1.hpp209
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jn.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jn.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_asym.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_asym.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_series.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_series.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_zero.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_zero.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k0.hpp519
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k1.hpp561
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_kn.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_kn.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y0.hpp240
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y1.hpp212
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_yn.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_yn.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/erf_inv.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/erf_inv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/fp_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/fp_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/gamma_inva.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/gamma_inva.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/ibeta_inverse.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inverse.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/iconv.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/iconv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_inverse.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_inverse.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_large.hpp778
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/lanczos_sse2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/lanczos_sse2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/lgamma_small.hpp532
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/round_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/round_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/t_distribution_inv.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/t_distribution_inv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_factorial.hpp815
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/erf.hpp1286
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/expm1.hpp357
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/factorials.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/factorials.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/fpclassify.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/fpclassify.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/gamma.hpp2135
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/hypot.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/hypot.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/lanczos.hpp1306
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/log1p.hpp519
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/math_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/next.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/next.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/pow.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/pow.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/powm1.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/powm1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/round.hpp132
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/sign.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/sign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/sin_pi.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/sin_pi.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/sinc.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/sinc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/sqrt1pm1.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/sqrt1pm1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/trunc.hpp (renamed from src/third_party/boost-1.69.0/boost/math/special_functions/trunc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/special_functions/zeta.hpp1110
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/big_constant.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/big_constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/complex.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/complex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/config.hpp469
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/convert_from_string.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/convert_from_string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/is_const_iterable.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_10.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_11.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_12.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_12.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_13.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_13.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_14.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_14.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_15.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_15.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_16.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_16.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_17.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_17.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_18.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_18.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_19.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_19.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_20.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_3.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_4.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_5.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_6.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_7.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_8.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_9.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_10.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_11.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_12.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_12.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_13.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_13.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_14.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_14.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_15.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_15.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_16.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_16.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_17.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_17.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_18.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_18.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_19.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_19.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_20.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_3.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_4.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_5.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_6.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_7.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_8.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_9.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_10.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_11.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_12.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_12.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_13.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_13.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_14.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_14.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_15.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_15.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_16.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_16.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_17.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_17.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_18.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_18.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_19.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_19.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_20.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_3.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_4.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_5.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_6.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_7.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_8.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_9.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_10.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_11.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_12.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_12.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_13.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_13.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_14.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_14.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_15.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_15.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_16.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_16.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_17.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_17.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_18.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_18.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_19.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_19.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_20.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_3.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_4.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_5.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_6.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_7.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_8.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_9.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_10.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_11.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_12.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_12.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_13.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_13.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_14.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_14.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_15.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_15.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_16.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_16.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_17.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_17.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_18.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_18.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_19.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_19.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_20.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_3.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_4.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_5.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_6.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_7.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_8.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_9.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_10.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_11.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_11.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_12.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_12.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_13.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_13.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_14.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_14.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_15.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_15.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_16.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_16.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_17.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_17.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_18.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_18.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_19.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_19.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_2.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_20.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_3.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_4.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_5.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_6.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_6.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_7.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_7.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_8.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_8.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_9.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_9.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/fraction.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/fraction.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/minima.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/minima.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/precision.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/precision.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/promotion.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/promotion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/rational.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/rational.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/real_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/real_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/roots.hpp831
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/series.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/series.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/toms748_solve.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/math/tools/user.hpp (renamed from src/third_party/boost-1.69.0/boost/math/tools/user.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mem_fn.hpp (renamed from src/third_party/boost-1.69.0/boost/mem_fn.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/memory_order.hpp (renamed from src/third_party/boost-1.69.0/boost/memory_order.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/adl_move_swap.hpp (renamed from src/third_party/boost-1.69.0/boost/move/adl_move_swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/adaptive_merge.hpp352
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/adaptive_sort.hpp631
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/adaptive_sort_merge.hpp1475
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/basic_op.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/detail/basic_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/heap_sort.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/detail/heap_sort.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/insertion_sort.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/detail/insertion_sort.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/is_sorted.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/detail/is_sorted.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/merge.hpp980
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/merge_sort.hpp207
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/pdqsort.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/detail/pdqsort.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/detail/set_difference.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/detail/set_difference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/move.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/move.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/predicate.hpp101
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algo/unique.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algo/unique.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/move/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/core.hpp (renamed from src/third_party/boost-1.69.0/boost/move/core.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/default_delete.hpp (renamed from src/third_party/boost-1.69.0/boost/move/default_delete.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/config_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/config_end.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/destruct_n.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/destruct_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/fwd_macros.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/fwd_macros.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/iterator_to_raw_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/iterator_to_raw_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/iterator_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/iterator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/meta_utils.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/meta_utils.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/meta_utils_core.hpp137
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/move_helpers.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/move_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/placement_new.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/placement_new.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/pointer_element.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/pointer_element.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/reverse_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/std_ns_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/std_ns_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/std_ns_end.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/std_ns_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/to_raw_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/to_raw_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/type_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/unique_ptr_meta_utils.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/unique_ptr_meta_utils.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/detail/workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/move/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/move/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/make_unique.hpp (renamed from src/third_party/boost-1.69.0/boost/move/make_unique.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/move.hpp (renamed from src/third_party/boost-1.69.0/boost/move/move.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/traits.hpp (renamed from src/third_party/boost-1.69.0/boost/move/traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/unique_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/move/unique_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/utility.hpp (renamed from src/third_party/boost-1.69.0/boost/move/utility.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/move/utility_core.hpp (renamed from src/third_party/boost-1.69.0/boost/move/utility_core.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/O1_size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/O1_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/O1_size_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/O1_size_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/advance.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/advance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/advance_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/advance_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/always.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/always.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/and.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/apply_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/apply_wrap.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/arg.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/arg_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/arg_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/assert.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/at.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/at.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/at_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/at_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/O1_size_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/O1_size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/adl_barrier.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/adl_barrier.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/advance_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/advance_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/arg_typedef.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/arg_typedef.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/arithmetic_op.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/arithmetic_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/arity_spec.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/arity_spec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/begin_end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/begin_end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/clear_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/clear_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/common_name_wknd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/common_name_wknd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/comparison_op.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/comparison_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/adl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/adl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/arrays.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/arrays.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/bcc.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/bcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/compiler.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/compiler.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/dependent_nttp.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/dependent_nttp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/dtp.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/dtp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/eti.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/eti.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/forwarding.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/forwarding.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/gcc.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/gcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/gpu.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/gpu.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/has_apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/has_xxx.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_xxx.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/integral.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/integral.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/intel.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/intel.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/msvc.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/msvc_typename.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc_typename.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/nttp.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/nttp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/operators.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/overload_resolution.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/overload_resolution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/pp_counter.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/pp_counter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/preprocessor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/preprocessor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/static_constant.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/static_constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/ttp.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/ttp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/typeof.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/typeof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/use_preprocessed.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/use_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/config/workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/config/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/contains_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/contains_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/count_args.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/count_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/empty_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/empty_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/find_if_pred.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/find_if_pred.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/fold_impl_body.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl_body.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/front_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/front_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/full_lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_begin.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_key_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_key_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_rebind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/has_type.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/has_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/include_preprocessed.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/include_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/insert_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/insert_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/inserter_algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/inserter_algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/integral_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/is_msvc_eti_arg.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/is_msvc_eti_arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/iter_apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/iter_apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_arity_param.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_arity_param.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_spec.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_spec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_support.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_support.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/largest_int.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/largest_int.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/logical_op.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/logical_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_dtw.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_dtw.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_eti_base.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_eti_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_is_class.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_is_class.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_never_true.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_never_true.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_type.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/na.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/na.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/na_assert.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/na_assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/na_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/na_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/na_spec.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/na_spec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/nested_type_wknd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/nested_type_wknd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/nttp_decl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/nttp_decl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/numeric_cast_utils.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_cast_utils.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/numeric_op.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/overload_names.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/overload_names.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/and.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/less.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/list.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/map.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/or.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/set.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/times.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/and.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/arg.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/deque.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/deque.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/divides.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/divides.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/less.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/list.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/map.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/minus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/minus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/or.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/plus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/quote.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/quote.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/set.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/times.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/add.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/add.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/default_params.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/default_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/enum.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/ext_params.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/ext_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/filter_params.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/filter_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/is_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/is_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/params.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/range.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/repeat.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/repeat.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/sub.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/sub.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/token_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/token_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/ptr_to_ref.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/ptr_to_ref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/push_back_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/push_back_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/push_front_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/push_front_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_fold_impl_body.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl_body.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/sequence_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/sequence_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/size_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/static_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/static_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/template_arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/template_arity_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/traits_lambda_spec.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/traits_lambda_spec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/type_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/type_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/unwrap.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/unwrap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/value_wknd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/value_wknd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/aux_/yes_no.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/aux_/yes_no.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/back_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/back_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/back_inserter.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/back_inserter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/base.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/begin.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/begin_end.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/begin_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/begin_end_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/begin_end_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/bind.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/bind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/bind_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/bool.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/bool_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/bool_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/clear.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/clear.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/clear_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/clear_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/contains.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/contains.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/contains_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/contains_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/deref.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/deref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/distance.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/distance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/distance_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/distance_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/divides.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/divides.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/empty_base.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/empty_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/empty_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/empty_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/end.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/erase_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/erase_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/erase_key_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/erase_key_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/eval_if.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/eval_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/find.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/find.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/find_if.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/find_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/fold.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/fold.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/for_each.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/for_each.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/front_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/front_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/front_inserter.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/front_inserter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/has_key.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/has_key.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/has_key_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/has_key_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/has_xxx.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/has_xxx.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/identity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/identity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/if.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/inherit.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/insert.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/insert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/insert_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/insert_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/insert_range_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/insert_range_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/inserter.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/inserter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/int.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/int.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/int_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/int_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/integral_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/integral_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/integral_c_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/integral_c_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/integral_c_tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/integral_c_tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/is_placeholder.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/is_placeholder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/is_sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/is_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/iter_fold.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/iter_fold.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/iter_fold_if.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/iter_fold_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/iterator_category.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/iterator_range.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/iterator_tags.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/iterator_tags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/key_type_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/key_type_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/lambda.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/lambda.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/lambda_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/lambda_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/less.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/limits/arity.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/limits/arity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/limits/list.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/limits/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/limits/unrolling.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/limits/unrolling.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/limits/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/limits/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/O1_size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/O1_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/begin_end.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/begin_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/clear.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/clear.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/include_preprocessed.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/include_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/item.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/item.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/numbered.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/numbered_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/pop_front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/pop_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/push_back.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/push_front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/aux_/tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/aux_/tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list0.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list0.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list0_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list0_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list10.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list10_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list10_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list20.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list20_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list20_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list30.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list30_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list30_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list40.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list40_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list40_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list50.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/list/list50_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/list/list50_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/logical.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/logical.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/long.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/long.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/long_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/long_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/max.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/max.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/min_max.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/minus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/minus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/multiplies.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/multiplies.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/negate.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/negate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/next.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/next.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/next_prior.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/next_prior.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/not.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/not.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/numeric_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/numeric_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/or.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/pair.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/pair_view.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/pair_view.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/placeholders.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/plus.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/pop_back_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/pop_back_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/pop_front_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/pop_front_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/print.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/print.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/prior.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/prior.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/protect.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/protect.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/push_back.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/push_back_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/push_back_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/push_front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/push_front_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/push_front_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/quote.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/quote.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/remove_if.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/remove_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/reverse_fold.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/reverse_fold.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/reverse_iter_fold.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/reverse_iter_fold.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/same_as.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/same_as.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/sequence_tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/sequence_tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/sequence_tag_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/sequence_tag_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/at_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/begin_end_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/begin_end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/clear_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/clear_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/empty_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/empty_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/erase_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/erase_key_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_key_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/has_key_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/has_key_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/insert_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/insert_range_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_range_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/item.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/item.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/key_type_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/key_type_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/set0.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/set0.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/size_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/aux_/value_type_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/aux_/value_type_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/set/set0.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/set/set0.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/size_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/size_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/size_t.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/size_t.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/size_t_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/size_t_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/times.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/transform.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/transform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/value_type_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/value_type_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/O1_size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/O1_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/at.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/at.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/back.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/begin_end.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/begin_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/clear.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/clear.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/include_preprocessed.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/include_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/item.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/item.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/numbered.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/numbered_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/pop_back.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/pop_front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/push_back.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/push_front.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/size.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/tag.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/aux_/vector0.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/aux_/vector0.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector0.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector0.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector0_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector0_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector10.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector10_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector20.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector20_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector30.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector30_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector40.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector40_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/vector/vector50_c.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/vector/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/void.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/void.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/mpl/void_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/mpl/void_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/composite_key.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/composite_key.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/access_specifier.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/access_specifier.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/adl_swap.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/adl_swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/allocator_traits.hpp143
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/archive_constructed.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/archive_constructed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/auto_space.hpp90
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/base_type.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/base_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/bidir_node_iterator.hpp114
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/bucket_array.hpp247
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/cons_stdtuple.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/cons_stdtuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/converter.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/converter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/copy_map.hpp151
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/duplicates_iterator.hpp119
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/has_tag.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/has_tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_args.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_iterator.hpp166
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_node.hpp772
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/header_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/header_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/index_base.hpp289
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/index_loader.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/index_loader.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/index_matcher.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/index_matcher.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/index_node_base.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/index_node_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/index_saver.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/index_saver.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/invariant_assert.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/invariant_assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/is_index_list.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/is_index_list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/is_transparent.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/is_transparent.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/iter_adaptor.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/iter_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/modify_key_adaptor.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/modify_key_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/no_duplicate_tags.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/no_duplicate_tags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/node_type.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/node_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_args.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_args.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl.hpp1578
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_node.hpp674
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/promotes_arg.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/promotes_arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/raw_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/raw_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_loader.hpp175
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_node.hpp274
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ptr_array.hpp146
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_node_iterator.hpp140
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/rnk_index_ops.hpp325
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/safe_mode.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/safe_mode.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/scope_guard.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/scope_guard.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_node.hpp217
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/serialization_version.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/serialization_version.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/uintptr_type.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/uintptr_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/unbounded.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/unbounded.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/value_compare.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/value_compare.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/detail/vartempl_support.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/detail/vartempl_support.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/global_fun.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/global_fun.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/hashed_index.hpp1743
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/hashed_index_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/hashed_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/identity.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/identity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/identity_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/identity_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/indexed_by.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/indexed_by.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/key.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/key.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/key_extractors.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/key_extractors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/mem_fun.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/mem_fun.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/member.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/member.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/ordered_index.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/ordered_index.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/ordered_index_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/ordered_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/random_access_index.hpp1177
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/random_access_index_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/random_access_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/ranked_index.hpp385
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/ranked_index_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/ranked_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/safe_mode_errors.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/safe_mode_errors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/sequenced_index.hpp1071
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/sequenced_index_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/sequenced_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index/tag.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index/tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index_container.hpp1419
-rw-r--r--src/third_party/boost-1.70.0/boost/multi_index_container_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/multi_index_container_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float.hpp2047
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/io.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/transcendental.hpp156
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int.hpp1986
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/add.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/add.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/bitwise.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/bitwise.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/checked.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/checked.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/cpp_int_config.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/cpp_int_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/divide.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/divide.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/import_export.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/import_export.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/limits.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/limits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/literals.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/literals.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/misc.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/misc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/multiply.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/multiply.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/serialize.hpp203
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/value_pack.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/value_pack.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/debug_adaptor.hpp525
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/bitscan.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/default_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/digits.hpp23
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/et_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/et_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/float_string_cvt.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/float_string_cvt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/constants.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/constants.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/pow.hpp910
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/trig.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/trig.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/generic_interconvert.hpp598
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/integer_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/integer_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/min_max.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/no_et_ops.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/no_et_ops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/number_base.hpp1650
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/number_compare.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/number_compare.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/precision.hpp190
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/rebind.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/rebind.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/detail/ublas_interop.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/detail/ublas_interop.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/integer.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/integer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/number.hpp2252
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/rational_adaptor.hpp367
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/traits/explicit_conversion.hpp99
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/traits/extract_exponent_type.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/traits/extract_exponent_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/traits/is_backend.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/traits/is_backend.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/traits/is_byte_container.hpp36
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/traits/is_restricted_conversion.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/traits/is_restricted_conversion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/multiprecision/traits/is_variable_precision.hpp (renamed from src/third_party/boost-1.69.0/boost/multiprecision/traits/is_variable_precision.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/next_prior.hpp (renamed from src/third_party/boost-1.69.0/boost/next_prior.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/non_type.hpp (renamed from src/third_party/boost-1.69.0/boost/non_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/noncopyable.hpp (renamed from src/third_party/boost-1.69.0/boost/noncopyable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/none.hpp (renamed from src/third_party/boost-1.69.0/boost/none.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/none_t.hpp (renamed from src/third_party/boost-1.69.0/boost/none_t.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/bounds.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/bounds.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/cast.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/conversion_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/conversion_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/converter.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/converter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/converter_policies.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/converter_policies.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/bounds.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/bounds.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/conversion_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/conversion_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/converter.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/converter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/int_float_mixture.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/int_float_mixture.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/is_subranged.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/is_subranged.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/meta.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/meta.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/old_numeric_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/old_numeric_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/sign_mixture.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/sign_mixture.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/int_float_mixture_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/int_float_mixture_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/numeric_cast_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/numeric_cast_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/sign_mixture_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/sign_mixture_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/operators.hpp (renamed from src/third_party/boost-1.69.0/boost/operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional.hpp (renamed from src/third_party/boost-1.69.0/boost/optional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/bad_optional_access.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/bad_optional_access.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/experimental_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/experimental_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/old_optional_implementation.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/old_optional_implementation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_aligned_storage.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_aligned_storage.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_config.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_factory_support.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_factory_support.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_reference_spec.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_reference_spec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_relops.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_relops.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_swap.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/detail/optional_trivially_copyable_base.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/detail/optional_trivially_copyable_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/optional.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/optional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/optional_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/optional_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/optional/optional_io.hpp (renamed from src/third_party/boost-1.69.0/boost/optional/optional_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/pointee.hpp (renamed from src/third_party/boost-1.69.0/boost/pointee.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/pointer_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/pointer_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/pointer_to_other.hpp (renamed from src/third_party/boost-1.69.0/boost/pointer_to_other.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef.h (renamed from src/third_party/boost-1.69.0/boost/predef.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/alpha.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/alpha.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/arm.h133
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/blackfin.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/blackfin.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/convex.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/convex.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/ia64.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/ia64.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/m68k.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/m68k.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/mips.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/mips.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/parisc.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/parisc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/ppc.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/ppc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/ptx.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/ptx.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/pyramid.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/pyramid.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/rs6k.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/rs6k.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/sparc.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/sparc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/superh.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/superh.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/sys370.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/sys370.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/sys390.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/sys390.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/x86.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/x86.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/x86/32.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/x86/32.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/x86/64.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/x86/64.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/architecture/z.h (renamed from src/third_party/boost-1.69.0/boost/predef/architecture/z.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/borland.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/borland.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/clang.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/clang.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/comeau.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/comeau.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/compaq.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/compaq.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/diab.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/diab.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/digitalmars.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/digitalmars.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/dignus.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/dignus.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/edg.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/edg.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/ekopath.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/ekopath.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/gcc.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/gcc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/gcc_xml.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/gcc_xml.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/greenhills.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/greenhills.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/hp_acc.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/hp_acc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/iar.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/iar.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/ibm.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/ibm.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/intel.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/intel.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/kai.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/kai.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/llvm.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/llvm.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/metaware.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/metaware.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/metrowerks.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/metrowerks.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/microtec.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/microtec.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/mpw.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/mpw.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/nvcc.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/nvcc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/palm.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/palm.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/pgi.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/pgi.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/sgi_mipspro.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/sgi_mipspro.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/sunpro.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/sunpro.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/tendra.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/tendra.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/visualc.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/visualc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/compiler/watcom.h (renamed from src/third_party/boost-1.69.0/boost/predef/compiler/watcom.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/_cassert.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/_cassert.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/_exception.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/_exception.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/comp_detected.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/comp_detected.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/endian_compat.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/endian_compat.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/os_detected.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/os_detected.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/platform_detected.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/platform_detected.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/detail/test.h (renamed from src/third_party/boost-1.69.0/boost/predef/detail/test.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/arm.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/arm/versions.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm/versions.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/ppc.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/ppc/versions.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc/versions.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86/versions.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86/versions.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86_amd.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86_amd/versions.h (renamed from src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd/versions.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/language.h (renamed from src/third_party/boost-1.69.0/boost/predef/language.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/language/cuda.h (renamed from src/third_party/boost-1.69.0/boost/predef/language/cuda.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/language/objc.h (renamed from src/third_party/boost-1.69.0/boost/predef/language/objc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/language/stdc.h (renamed from src/third_party/boost-1.69.0/boost/predef/language/stdc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/language/stdcpp.h (renamed from src/third_party/boost-1.69.0/boost/predef/language/stdcpp.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library.h (renamed from src/third_party/boost-1.69.0/boost/predef/library.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c/_prefix.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c/_prefix.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c/cloudabi.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c/cloudabi.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c/gnu.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c/gnu.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c/uc.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c/uc.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c/vms.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c/vms.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/c/zos.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/c/zos.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/_prefix.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/_prefix.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/cxx.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/cxx.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/dinkumware.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/dinkumware.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/libcomo.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/libcomo.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/modena.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/modena.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/msl.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/msl.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/roguewave.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/roguewave.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/sgi.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/sgi.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/stdcpp3.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/stdcpp3.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/stlport.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/stlport.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/library/std/vacpp.h (renamed from src/third_party/boost-1.69.0/boost/predef/library/std/vacpp.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/make.h (renamed from src/third_party/boost-1.69.0/boost/predef/make.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os.h34
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/aix.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/aix.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/amigaos.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/amigaos.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/android.h48
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/beos.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/beos.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/bsd.h101
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/bsd/bsdi.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/bsd/bsdi.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/bsd/dragonfly.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/bsd/dragonfly.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/bsd/free.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/bsd/free.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/bsd/net.h84
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/bsd/open.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/bsd/open.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/cygwin.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/cygwin.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/haiku.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/haiku.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/hpux.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/hpux.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/ios.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/ios.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/irix.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/irix.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/linux.h49
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/macos.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/macos.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/os400.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/os400.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/qnxnto.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/qnxnto.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/solaris.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/solaris.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/unix.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/unix.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/vms.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/vms.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/os/windows.h (renamed from src/third_party/boost-1.69.0/boost/predef/os/windows.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/other.h (renamed from src/third_party/boost-1.69.0/boost/predef/other.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/other/endian.h (renamed from src/third_party/boost-1.69.0/boost/predef/other/endian.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform.h29
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/android.h43
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/cloudabi.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/cloudabi.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/ios.h62
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/mingw.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/mingw.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/mingw32.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/mingw32.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/mingw64.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/mingw64.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_desktop.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_desktop.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_phone.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_phone.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_runtime.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_runtime.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_server.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_server.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_store.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_store.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_system.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_system.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/platform/windows_uwp.h (renamed from src/third_party/boost-1.69.0/boost/predef/platform/windows_uwp.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/version.h15
-rw-r--r--src/third_party/boost-1.70.0/boost/predef/version_number.h (renamed from src/third_party/boost-1.69.0/boost/predef/version_number.h)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/add.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/add.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/dec.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/dec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/detail/div_base.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/detail/div_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/inc.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/inc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/mod.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/mod.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/sub.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/sub.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/array/data.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/array/data.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/array/elem.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/array/elem.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/array/size.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/array/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/cat.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/cat.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/comma_if.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/comma_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/comparison/equal.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/comparison/equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/comparison/greater.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/comparison/greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/comparison/less.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/comparison/less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/comparison/less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/comparison/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/comparison/not_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/comparison/not_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/config/config.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/config/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/deduce_d.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/deduce_d.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/detail/edg/while.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/detail/edg/while.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/detail/msvc/while.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/detail/msvc/while.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/detail/while.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/detail/while.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/expr_if.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/expr_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/expr_iif.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/expr_iif.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/if.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/iif.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/iif.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/control/while.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/control/while.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/debug/error.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/debug/error.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/dec.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/dec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/detail/auto_rec.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/detail/auto_rec.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/detail/check.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/detail/check.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/detail/is_binary.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/detail/is_binary.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/detail/is_unary.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/detail/is_unary.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/detail/split.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/detail/split.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/enum.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/enum_params.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/enum_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/enum_params_with_a_default.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_a_default.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/enum_params_with_defaults.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_defaults.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/enum_shifted_params.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/enum_shifted_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/expr_if.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/expr_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/detail/is_empty.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/detail/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/expand.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/expand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/identity.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/identity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/intercept.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/intercept.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_1.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_empty.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_empty_variadic.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty_variadic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/facilities/overload.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/facilities/overload.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/identity.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/identity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/if.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/inc.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/inc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iterate.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iterate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/finish.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/finish.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward1.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward2.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward3.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward4.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward5.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/local.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/local.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/rlocal.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/rlocal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/self.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/self.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/start.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/start.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/iterate.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/iterate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/local.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/local.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/iteration/self.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/iteration/self.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/adt.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/adt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/at.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/at.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/detail/edg/fold_left.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/detail/edg/fold_right.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/detail/fold_left.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/detail/fold_right.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/fold_left.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/fold_right.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/for_each_i.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/for_each_i.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/rest_n.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/rest_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/list/reverse.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/list/reverse.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/and.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/bitand.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/bitor.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/bool.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/compl.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/compl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/not.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/not.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/logical/or.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/logical/or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/punctuation/comma.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/punctuation/comma_if.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/punctuation/is_begin_parens.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/punctuation/is_begin_parens.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/punctuation/paren.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/punctuation/paren.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repeat.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repeat.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repeat_2nd.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repeat_2nd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repeat_from_to.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repeat_from_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/edg/for.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/edg/for.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/for.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/for.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/msvc/for.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/msvc/for.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_binary_params.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_binary_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_shifted.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_shifted_params.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_trailing.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_trailing_params.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/for.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/for.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/repeat.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/repetition/repeat_from_to.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat_from_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/cat.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/cat.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/binary_transform.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/binary_transform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/is_empty.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/split.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/split.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/to_list_msvc.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/to_list_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/elem.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/elem.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/enum.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/filter.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/filter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/first_n.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/first_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/fold_left.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/fold_right.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each_i.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_i.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each_product.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_product.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/insert.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/insert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/pop_back.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/pop_front.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/push_back.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/push_front.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/remove.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/remove.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/replace.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/replace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/rest_n.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/rest_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/reverse.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/reverse.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/seq.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/size.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/subseq.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/subseq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/to_array.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/to_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/to_list.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/to_list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/to_tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/to_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/transform.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/transform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/counter.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/counter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/def.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/def.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/shared.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/shared.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot1.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot1.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot2.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot3.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot4.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot4.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot5.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot5.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/slot/slot.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/slot/slot.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/stringize.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/stringize.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/detail/is_single_return.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/detail/is_single_return.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/eat.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/eat.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/elem.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/elem.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/rem.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/rem.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/size.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/to_list.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/tuple/to_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/variadic/detail/is_single_return.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/variadic/detail/is_single_return.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/variadic/elem.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/variadic/elem.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/variadic/size.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/variadic/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/preprocessor/variadic/to_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/preprocessor/variadic/to_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/cmdline.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/cmdline.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/config.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/detail/cmdline.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/detail/cmdline.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/detail/config_file.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/detail/config_file.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/detail/convert.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/detail/convert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/detail/parsers.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/detail/parsers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/detail/value_semantic.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/detail/value_semantic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/environment_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/environment_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/eof_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/eof_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/errors.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/errors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/option.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/option.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/options_description.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/options_description.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/parsers.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/parsers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/positional_options.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/positional_options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/value_semantic.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/value_semantic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/variables_map.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/variables_map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/program_options/version.hpp (renamed from src/third_party/boost-1.69.0/boost/program_options/version.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/progress.hpp145
-rw-r--r--src/third_party/boost-1.70.0/boost/random.hpp (renamed from src/third_party/boost-1.69.0/boost/random.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/additive_combine.hpp (renamed from src/third_party/boost-1.69.0/boost/random/additive_combine.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/bernoulli_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/bernoulli_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/beta_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/beta_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/binomial_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/binomial_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/cauchy_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/cauchy_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/chi_squared_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/chi_squared_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/auto_link.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/auto_link.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/config.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/const_mod.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/const_mod.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/disable_warnings.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/disable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/enable_warnings.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/enable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/generator_bits.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/generator_bits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/generator_seed_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/generator_seed_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/gray_coded_qrng.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/gray_coded_qrng.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/int_float_pair.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/int_float_pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/integer_log2.hpp84
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/iterator_mixin.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/iterator_mixin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/large_arithmetic.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/large_arithmetic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/niederreiter_base2_table.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/niederreiter_base2_table.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/operators.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/polynomial.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/polynomial.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/ptr_helper.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/ptr_helper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/qrng_base.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/qrng_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/seed.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/seed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/seed_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/seed_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/signed_unsigned_tools.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/signed_unsigned_tools.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/sobol_table.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/sobol_table.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/uniform_int_float.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/uniform_int_float.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/detail/vector_io.hpp (renamed from src/third_party/boost-1.69.0/boost/random/detail/vector_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/discard_block.hpp (renamed from src/third_party/boost-1.69.0/boost/random/discard_block.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/discrete_distribution.hpp640
-rw-r--r--src/third_party/boost-1.70.0/boost/random/exponential_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/exponential_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/extreme_value_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/extreme_value_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/faure.hpp (renamed from src/third_party/boost-1.69.0/boost/random/faure.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/fisher_f_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/fisher_f_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/gamma_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/gamma_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/generate_canonical.hpp (renamed from src/third_party/boost-1.69.0/boost/random/generate_canonical.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/geometric_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/geometric_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/hyperexponential_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/hyperexponential_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/independent_bits.hpp (renamed from src/third_party/boost-1.69.0/boost/random/independent_bits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/inversive_congruential.hpp (renamed from src/third_party/boost-1.69.0/boost/random/inversive_congruential.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/lagged_fibonacci.hpp (renamed from src/third_party/boost-1.69.0/boost/random/lagged_fibonacci.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/laplace_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/laplace_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/linear_congruential.hpp (renamed from src/third_party/boost-1.69.0/boost/random/linear_congruential.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/linear_feedback_shift.hpp (renamed from src/third_party/boost-1.69.0/boost/random/linear_feedback_shift.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/lognormal_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/lognormal_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/mersenne_twister.hpp (renamed from src/third_party/boost-1.69.0/boost/random/mersenne_twister.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/negative_binomial_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/negative_binomial_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/niederreiter_base2.hpp (renamed from src/third_party/boost-1.69.0/boost/random/niederreiter_base2.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/non_central_chi_squared_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/non_central_chi_squared_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/normal_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/normal_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/piecewise_constant_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/piecewise_constant_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/piecewise_linear_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/piecewise_linear_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/poisson_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/poisson_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/random_device.hpp (renamed from src/third_party/boost-1.69.0/boost/random/random_device.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/random_number_generator.hpp (renamed from src/third_party/boost-1.69.0/boost/random/random_number_generator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/ranlux.hpp (renamed from src/third_party/boost-1.69.0/boost/random/ranlux.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/seed_seq.hpp (renamed from src/third_party/boost-1.69.0/boost/random/seed_seq.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/shuffle_order.hpp (renamed from src/third_party/boost-1.69.0/boost/random/shuffle_order.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/shuffle_output.hpp (renamed from src/third_party/boost-1.69.0/boost/random/shuffle_output.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/sobol.hpp (renamed from src/third_party/boost-1.69.0/boost/random/sobol.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/student_t_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/student_t_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/subtract_with_carry.hpp (renamed from src/third_party/boost-1.69.0/boost/random/subtract_with_carry.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/taus88.hpp (renamed from src/third_party/boost-1.69.0/boost/random/taus88.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/traits.hpp (renamed from src/third_party/boost-1.69.0/boost/random/traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/triangle_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/triangle_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_01.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_01.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_int.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_int.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_int_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_int_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_on_sphere.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_on_sphere.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_real.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_real.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_real_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_real_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/uniform_smallint.hpp (renamed from src/third_party/boost-1.69.0/boost/random/uniform_smallint.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/variate_generator.hpp (renamed from src/third_party/boost-1.69.0/boost/random/variate_generator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/weibull_distribution.hpp (renamed from src/third_party/boost-1.69.0/boost/random/weibull_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/random/xor_combine.hpp (renamed from src/third_party/boost-1.69.0/boost/random/xor_combine.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range.hpp (renamed from src/third_party/boost-1.69.0/boost/range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/adjacent_filtered.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/adjacent_filtered.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/argument_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/argument_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/copied.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/copied.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/filtered.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/filtered.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/formatted.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/formatted.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/indexed.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/indexed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/indirected.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/indirected.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/map.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/replaced.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/replaced.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/replaced_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/replaced_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/reversed.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/reversed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/sliced.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/sliced.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/strided.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/strided.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/tokenized.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/tokenized.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/transformed.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/transformed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptor/uniqued.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptor/uniqued.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/adaptors.hpp (renamed from src/third_party/boost-1.69.0/boost/range/adaptors.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/adjacent_find.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/adjacent_find.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/binary_search.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/binary_search.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/copy_backward.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/copy_backward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/count.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/count.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/count_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/count_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/equal.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/equal_range.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/equal_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/fill.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/fill.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/fill_n.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/fill_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/find.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/find.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/find_end.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/find_end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/find_first_of.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/find_first_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/find_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/find_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/for_each.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/for_each.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/generate.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/generate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/heap_algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/heap_algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/inplace_merge.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/inplace_merge.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/lexicographical_compare.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/lexicographical_compare.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/lower_bound.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/lower_bound.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/max_element.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/max_element.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/merge.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/merge.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/min_element.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/min_element.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/mismatch.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/mismatch.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/nth_element.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/nth_element.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/partial_sort.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/partial_sort_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/partition.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/partition.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/permutation.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/permutation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/random_shuffle.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/random_shuffle.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/remove.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/remove.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/remove_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/remove_copy_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/remove_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/remove_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/replace.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/replace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/replace_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/replace_copy_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/replace_if.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/replace_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/reverse.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/reverse.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/reverse_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/reverse_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/rotate.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/rotate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/rotate_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/rotate_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/search.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/search.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/search_n.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/search_n.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/set_algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/set_algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/sort.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/sort.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/stable_partition.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/stable_partition.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/stable_sort.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/stable_sort.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/transform.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/transform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/unique.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/unique.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/unique_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/unique_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/algorithm/upper_bound.hpp (renamed from src/third_party/boost-1.69.0/boost/range/algorithm/upper_bound.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/as_literal.hpp (renamed from src/third_party/boost-1.69.0/boost/range/as_literal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/begin.hpp (renamed from src/third_party/boost-1.69.0/boost/range/begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/category.hpp (renamed from src/third_party/boost-1.69.0/boost/range/category.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/concepts.hpp (renamed from src/third_party/boost-1.69.0/boost/range/concepts.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/config.hpp (renamed from src/third_party/boost-1.69.0/boost/range/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/const_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/const_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/const_reverse_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/const_reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/as_literal.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/as_literal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/begin.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/begin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/common.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/default_constructible_unary_fn.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/default_constructible_unary_fn.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/detail_str.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/detail_str.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/end.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/extract_optional_type.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/extract_optional_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/has_member_size.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/has_member_size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/implementation_help.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/implementation_help.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/misc_concept.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/misc_concept.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/msvc_has_iterator_workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/msvc_has_iterator_workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/range_return.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/range_return.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/remove_extent.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/remove_extent.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/safe_bool.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/safe_bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/sfinae.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/sfinae.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/size_type.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/size_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/str_types.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/str_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/detail/value_type.hpp (renamed from src/third_party/boost-1.69.0/boost/range/detail/value_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/difference_type.hpp (renamed from src/third_party/boost-1.69.0/boost/range/difference_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/distance.hpp (renamed from src/third_party/boost-1.69.0/boost/range/distance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/empty.hpp (renamed from src/third_party/boost-1.69.0/boost/range/empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/end.hpp (renamed from src/third_party/boost-1.69.0/boost/range/end.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/functions.hpp (renamed from src/third_party/boost-1.69.0/boost/range/functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/has_range_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/has_range_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/iterator_range.hpp (renamed from src/third_party/boost-1.69.0/boost/range/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/iterator_range_core.hpp (renamed from src/third_party/boost-1.69.0/boost/range/iterator_range_core.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/iterator_range_io.hpp (renamed from src/third_party/boost-1.69.0/boost/range/iterator_range_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/metafunctions.hpp (renamed from src/third_party/boost-1.69.0/boost/range/metafunctions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/mutable_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/mutable_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/numeric.hpp (renamed from src/third_party/boost-1.69.0/boost/range/numeric.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/range/pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/range_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/range/range_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/rbegin.hpp (renamed from src/third_party/boost-1.69.0/boost/range/rbegin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/reference.hpp (renamed from src/third_party/boost-1.69.0/boost/range/reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/rend.hpp (renamed from src/third_party/boost-1.69.0/boost/range/rend.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/result_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/result_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/reverse_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/reverse_result_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/range/reverse_result_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/size.hpp (renamed from src/third_party/boost-1.69.0/boost/range/size.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/size_type.hpp (renamed from src/third_party/boost-1.69.0/boost/range/size_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/sub_range.hpp (renamed from src/third_party/boost-1.69.0/boost/range/sub_range.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/traversal.hpp (renamed from src/third_party/boost-1.69.0/boost/range/traversal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/range/value_type.hpp (renamed from src/third_party/boost-1.69.0/boost/range/value_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/config.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/detail/mpl/abs.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/detail/mpl/abs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/detail/mpl/gcd.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/detail/mpl/gcd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/detail/mpl/lcm.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/detail/mpl/lcm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/detail/mpl/sign.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/detail/mpl/sign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/detail/overflow_helpers.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/detail/overflow_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/detail/ratio_io.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/detail/ratio_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/mpl/rational_c_tag.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/mpl/rational_c_tag.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/ratio.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/ratio.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/ratio_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/ratio_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ratio/ratio_io.hpp (renamed from src/third_party/boost-1.69.0/boost/ratio/ratio_io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/rational.hpp (renamed from src/third_party/boost-1.69.0/boost/rational.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/ref.hpp (renamed from src/third_party/boost-1.69.0/boost/ref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex.hpp (renamed from src/third_party/boost-1.69.0/boost/regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/config.hpp491
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/config/borland.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/config/borland.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/config/cwchar.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/config/cwchar.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/icu.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/icu.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/pattern_except.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/pattern_except.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/pending/object_cache.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/pending/object_cache.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/pending/static_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/pending/static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/pending/unicode_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/pending/unicode_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/regex_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/user.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/user.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/basic_regex.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/basic_regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/basic_regex_creator.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/basic_regex_parser.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/c_regex_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/c_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/char_regex_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/char_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/cpp_regex_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/cpp_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/cregex.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/cregex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/error_type.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/error_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/fileiter.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/fileiter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/instances.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/iterator_category.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/iterator_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/iterator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/match_flags.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/match_flags.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/match_results.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/mem_block_cache.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/mem_block_cache.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_common.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_non_recursive.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_recursive.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_recursive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/primary_transform.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/primary_transform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/protected_call.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/protected_call.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regbase.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regbase.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_format.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_format.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_grep.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_grep.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_match.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_match.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_merge.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_merge.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_raw_buffer.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_raw_buffer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_replace.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_replace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_search.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_search.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_split.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_split.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_token_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_traits_defaults.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_traits_defaults.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/regex_workaround.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/states.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/states.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/sub_match.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/sub_match.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/syntax_type.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/syntax_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/u32regex_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/u32regex_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/u32regex_token_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/u32regex_token_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex/v4/w32_regex_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/regex/v4/w32_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/regex_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/regex_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/scoped_array.hpp (renamed from src/third_party/boost-1.69.0/boost/scoped_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/scoped_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/scoped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/access.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/access.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/array_optimization.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/array_optimization.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/array_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/array_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/assume_abstract.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/assume_abstract.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/base_object.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/base_object.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/collection_size_type.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/collection_size_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/collection_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/collection_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/collections_load_imp.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/collections_load_imp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/collections_save_imp.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/collections_save_imp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/config.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/detail/is_default_constructible.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/detail/is_default_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/detail/stack_constructor.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/detail/stack_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/extended_type_info.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/extended_type_info.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/extended_type_info_no_rtti.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/extended_type_info_no_rtti.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/extended_type_info_typeid.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/extended_type_info_typeid.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/factory.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/factory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/force_include.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/force_include.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/is_bitwise_serializable.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/is_bitwise_serializable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/item_version_type.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/item_version_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/level.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/level.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/level_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/level_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/list.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/nvp.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/nvp.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/serialization.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/serialization.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/set.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/singleton.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/singleton.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/smart_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/smart_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/split_free.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/split_free.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/split_member.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/split_member.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/state_saver.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/state_saver.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/static_warning.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/static_warning.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/string.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/string.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/strong_typedef.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/strong_typedef.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/throw_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/throw_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/tracking.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/tracking.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/tracking_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/tracking_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/traits.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/type_info_implementation.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/type_info_implementation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/version.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/version.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/void_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/void_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/void_cast_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/void_cast_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/serialization/wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/serialization/wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/shared_array.hpp (renamed from src/third_party/boost-1.69.0/boost/shared_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/shared_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/allocate_local_shared_array.hpp220
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/allocate_shared_array.hpp576
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/atomic_shared_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/atomic_shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/bad_weak_ptr.hpp70
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_gcc.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_nt.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_nt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_pt.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_pt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_solaris.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_solaris.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_spin.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_spin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_win32.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_win32.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/lightweight_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/lightweight_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/local_counted_base.hpp148
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/local_sp_deleter.hpp91
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_nop.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_nop.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_pthreads.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_pthreads.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_win32_cs.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_win32_cs.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/operator_bool.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/operator_bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/quick_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/quick_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/shared_count.hpp668
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_convertible.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_convertible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp152
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp112
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp140
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp140
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_impl.hpp293
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_forward.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_forward.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_has_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_has_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_interlocked.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_interlocked.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_noexcept.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_noexcept.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_nullptr_t.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_nullptr_t.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_nt.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_nt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_pool.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_pt.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pt.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp84
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_sync.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_sync.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_w32.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_w32.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/detail/yield_k.hpp183
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/enable_shared_from_raw.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_raw.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/enable_shared_from_this.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_this.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/intrusive_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/intrusive_ref_counter.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ref_counter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/local_shared_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/local_shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_array.hpp73
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_object.hpp202
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_shared.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/make_shared.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_array.hpp65
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_object.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_object.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/make_unique.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/owner_less.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/owner_less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/scoped_array.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/scoped_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/scoped_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/scoped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/shared_array.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/shared_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/shared_ptr.hpp1184
-rw-r--r--src/third_party/boost-1.70.0/boost/smart_ptr/weak_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/smart_ptr/weak_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/assert.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/assert.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/actions.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/actions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/alternative.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/alternative.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/composite.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/composite.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/difference.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/difference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/directives.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/directives.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/difference.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/difference.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/directives.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/directives.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/list.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/list.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/optional.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/optional.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/positive.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/positive.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/intersection.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/intersection.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/kleene_star.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/kleene_star.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/list.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/list.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/operators.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/optional.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/optional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/positive.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/positive.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequence.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequence.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequential_and.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequential_or.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/config.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/match.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/parser.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/parser.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/match.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/match.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/nil.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/nil.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/rule.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/rule.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/parser.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/numerics.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/primitives.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/primitives.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/safe_bool.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/safe_bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner.hpp328
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/skipper.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/debug.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/debug.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/debug/debug_node.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/debug_node.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/debug/minimal.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/minimal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/meta/as_parser.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/meta/as_parser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/namespace.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/namespace.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/chset.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/chset_operators.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset_operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp (renamed from src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/home/classic/version.hpp19
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/include/classic_actions.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/include/classic_actions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/include/classic_chset.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/include/classic_chset.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/include/classic_numerics.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/include/classic_numerics.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/include/classic_operators.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/include/classic_operators.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/spirit/include/classic_rule.hpp (renamed from src/third_party/boost-1.69.0/boost/spirit/include/classic_rule.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/static_assert.hpp180
-rw-r--r--src/third_party/boost-1.70.0/boost/swap.hpp (renamed from src/third_party/boost-1.69.0/boost/swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/api_config.hpp (renamed from src/third_party/boost-1.69.0/boost/system/api_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/config.hpp (renamed from src/third_party/boost-1.69.0/boost/system/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/detail/config.hpp (renamed from src/third_party/boost-1.69.0/boost/system/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/detail/generic_category.hpp (renamed from src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/detail/std_interoperability.hpp (renamed from src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/detail/system_category_posix.hpp (renamed from src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/system/detail/system_category_win32.hpp340
-rw-r--r--src/third_party/boost-1.70.0/boost/system/error_code.hpp964
-rw-r--r--src/third_party/boost-1.70.0/boost/system/system_error.hpp (renamed from src/third_party/boost-1.69.0/boost/system/system_error.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/debug.hpp (renamed from src/third_party/boost-1.69.0/boost/test/debug.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/debug_config.hpp (renamed from src/third_party/boost-1.69.0/boost/test/debug_config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/config.hpp144
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/enable_warnings.hpp (renamed from src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/fwd_decl.hpp47
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/global_typedef.hpp149
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/log_level.hpp42
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/pp_variadic.hpp (renamed from src/third_party/boost-1.69.0/boost/test/detail/pp_variadic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/suppress_warnings.hpp (renamed from src/third_party/boost-1.69.0/boost/test/detail/suppress_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/detail/throw_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/execution_monitor.hpp584
-rw-r--r--src/third_party/boost-1.70.0/boost/test/floating_point_comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/test/floating_point_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/framework.hpp301
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/compiler_log_formatter.ipp295
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/cpp_main.ipp (renamed from src/third_party/boost-1.69.0/boost/test/impl/cpp_main.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/debug.ipp1009
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/decorator.ipp244
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/execution_monitor.ipp1506
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/framework.ipp1782
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/junit_log_formatter.ipp879
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/plain_report_formatter.ipp218
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/progress_monitor.ipp (renamed from src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/results_collector.ipp328
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/results_reporter.ipp (renamed from src/third_party/boost-1.69.0/boost/test/impl/results_reporter.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/test_framework_init_observer.ipp (renamed from src/third_party/boost-1.69.0/boost/test/impl/test_framework_init_observer.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/test_main.ipp (renamed from src/third_party/boost-1.69.0/boost/test/impl/test_main.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/test_tools.ipp833
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/test_tree.ipp584
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/unit_test_log.ipp710
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/unit_test_main.ipp313
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/unit_test_monitor.ipp78
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/unit_test_parameters.ipp (renamed from src/third_party/boost-1.69.0/boost/test/impl/unit_test_parameters.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/xml_log_formatter.ipp225
-rw-r--r--src/third_party/boost-1.70.0/boost/test/impl/xml_report_formatter.ipp117
-rw-r--r--src/third_party/boost-1.70.0/boost/test/included/prg_exec_monitor.hpp (renamed from src/third_party/boost-1.69.0/boost/test/included/prg_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/included/test_exec_monitor.hpp (renamed from src/third_party/boost-1.69.0/boost/test/included/test_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/included/unit_test.hpp (renamed from src/third_party/boost-1.69.0/boost/test/included/unit_test.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/output/compiler_log_formatter.hpp70
-rw-r--r--src/third_party/boost-1.70.0/boost/test/output/junit_log_formatter.hpp168
-rw-r--r--src/third_party/boost-1.70.0/boost/test/output/plain_report_formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/test/output/plain_report_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/output/xml_log_formatter.hpp72
-rw-r--r--src/third_party/boost-1.70.0/boost/test/output/xml_report_formatter.hpp (renamed from src/third_party/boost-1.69.0/boost/test/output/xml_report_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/prg_exec_monitor.hpp (renamed from src/third_party/boost-1.69.0/boost/test/prg_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/progress_monitor.hpp (renamed from src/third_party/boost-1.69.0/boost/test/progress_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/results_collector.hpp153
-rw-r--r--src/third_party/boost-1.70.0/boost/test/results_reporter.hpp (renamed from src/third_party/boost-1.69.0/boost/test/results_reporter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/test_exec_monitor.hpp (renamed from src/third_party/boost-1.69.0/boost/test/test_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/test_framework_init_observer.hpp (renamed from src/third_party/boost-1.69.0/boost/test/test_framework_init_observer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/test_tools.hpp (renamed from src/third_party/boost-1.69.0/boost/test/test_tools.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/assertion.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/assertion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/assertion_result.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/assertion_result.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/collection_comparison_op.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/collection_comparison_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/context.hpp96
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/cstring_comparison_op.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/cstring_comparison_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/bitwise_manip.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/bitwise_manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/expression_holder.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/expression_holder.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/indirections.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/indirections.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/it_pair.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/it_pair.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/lexicographic_manip.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/lexicographic_manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/per_element_manip.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/per_element_manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/print_helper.hpp247
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/detail/tolerance_manip.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/detail/tolerance_manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/floating_point_comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/floating_point_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/fpc_op.hpp219
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/fpc_tolerance.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/fpc_tolerance.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/interface.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/interface.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/old/impl.hpp358
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/old/interface.hpp284
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tools/output_test_stream.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tools/output_test_stream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/auto_registration.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tree/auto_registration.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/decorator.hpp309
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/fixture.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tree/fixture.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/global_fixture.hpp139
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/observer.hpp114
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/test_case_counter.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tree/test_case_counter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/test_case_template.hpp201
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/test_unit.hpp293
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/traverse.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tree/traverse.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/tree/visitor.hpp (renamed from src/third_party/boost-1.69.0/boost/test/tree/visitor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/unit_test.hpp (renamed from src/third_party/boost-1.69.0/boost/test/unit_test.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/unit_test_log.hpp281
-rw-r--r--src/third_party/boost-1.70.0/boost/test/unit_test_log_formatter.hpp327
-rw-r--r--src/third_party/boost-1.70.0/boost/test/unit_test_monitor.hpp62
-rw-r--r--src/third_party/boost-1.70.0/boost/test/unit_test_parameters.hpp (renamed from src/third_party/boost-1.69.0/boost/test/unit_test_parameters.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/unit_test_suite.hpp408
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/algorithm.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/assign_op.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/assign_op.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring.hpp754
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp39
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/compare.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/compare.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/io.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/io.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/class_properties.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/class_properties.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/custom_manip.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/custom_manip.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/foreach.hpp315
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/is_cstring.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/is_cstring.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/is_forward_iterable.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/is_forward_iterable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/iterator/input_iterator_facade.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/iterator/input_iterator_facade.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/iterator/token_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/iterator/token_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/lazy_ostream.hpp129
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/named_params.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/named_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/rtti.hpp64
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/argument.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/argument.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/argument_factory.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/argument_factory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/cla/argv_traverser.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/argv_traverser.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/cla/parser.hpp625
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/env/fetch.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/env/fetch.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/errors.hpp195
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/finalize.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/finalize.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/modifier.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/modifier.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/runtime/parameter.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/runtime/parameter.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/setcolor.hpp324
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/string_cast.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/string_cast.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/timer.hpp164
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/wrap_stringstream.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/wrap_stringstream.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/test/utils/xml_printer.hpp (renamed from src/third_party/boost-1.69.0/boost/test/utils/xml_printer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread.hpp (renamed from src/third_party/boost-1.69.0/boost/thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/barrier.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/barrier.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/condition_variable.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/functional.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/allocator_arg.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/allocator_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/config.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/pointer_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/scoped_allocator.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/shared_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/memory/unique_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/csbl/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/cv_status.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/cv_status.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/atomic_redef_macros.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/atomic_undef_macros.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/config.hpp539
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/delete.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/delete.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/invoke.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/invoke.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/invoker.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/is_convertible.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/lockable_wrapper.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/make_tuple_indices.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/memory.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/move.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/move.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/nullary_function.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/platform.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/platform_time.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/thread.hpp845
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/thread_group.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/thread_group.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/thread_heap_alloc.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/thread_interruption.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/thread_safety.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/tss_hooks.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/tss_hooks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/variadic_footer.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/detail/variadic_header.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/exceptional_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/exceptions.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/exceptions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/executor.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/executor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/executors/executor.hpp150
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/executors/executor_adaptor.hpp138
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/executors/generic_executor_ref.hpp215
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/executors/work.hpp32
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/future.hpp5898
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/future_error.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/futures/future_error.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/future_error_code.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/future_status.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/is_future_type.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/launch.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/wait_for_all.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/futures/wait_for_any.hpp162
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/interruption.hpp22
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/is_locked_by_this_thread.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/is_locked_by_this_thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/lock_algorithms.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/lock_guard.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/lock_options.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/lock_options.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/lock_types.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/lock_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/lockable_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/locks.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/locks.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/once.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/once.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/condition_variable.hpp496
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/condition_variable_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/once.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/once_atomic.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/pthread_helpers.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/shared_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/thread_data.hpp408
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/pthread/thread_heap_alloc.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/pthread/thread_heap_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/shared_lock_guard.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/shared_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/thread.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/thread_only.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/thread_only.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/thread_time.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/thread_time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/tss.hpp95
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/v2/shared_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/v2/shared_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/basic_recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/basic_timed_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/condition_variable.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/interlocked_read.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/once.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/once.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/recursive_mutex.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/shared_mutex.hpp856
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/thread_data.hpp302
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/thread_heap_alloc.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/thread_heap_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/win32/thread_primitives.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/thread/xtime.hpp (renamed from src/third_party/boost-1.69.0/boost/thread/xtime.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/throw_exception.hpp (renamed from src/third_party/boost-1.69.0/boost/throw_exception.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/timer.hpp75
-rw-r--r--src/third_party/boost-1.70.0/boost/timer/config.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/timer/timer.hpp (renamed from src/third_party/boost-1.69.0/boost/timer/timer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/token_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/token_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/token_iterator.hpp (renamed from src/third_party/boost-1.69.0/boost/token_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/tokenizer.hpp (renamed from src/third_party/boost-1.69.0/boost/tokenizer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/tuple/detail/tuple_basic.hpp (renamed from src/third_party/boost-1.69.0/boost/tuple/detail/tuple_basic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/tuple/tuple.hpp (renamed from src/third_party/boost-1.69.0/boost/tuple/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/tuple/tuple_comparison.hpp (renamed from src/third_party/boost-1.69.0/boost/tuple/tuple_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type.hpp (renamed from src/third_party/boost-1.69.0/boost/type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index.hpp265
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index/ctti_type_index.hpp213
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index/detail/compile_time_type_info.hpp339
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index/detail/ctti_register_class.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index/detail/stl_register_class.hpp40
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index/stl_type_index.hpp278
-rw-r--r--src/third_party/boost-1.70.0/boost/type_index/type_index_facade.hpp297
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits.hpp157
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_const.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_const.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_cv.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_cv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_lvalue_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_lvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_rvalue_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_rvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/add_volatile.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/add_volatile.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/aligned_storage.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/aligned_storage.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/alignment_of.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/alignment_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/common_type.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/common_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/composite_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/composite_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/conditional.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/conditional.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/conversion_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/conversion_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/copy_cv.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/copy_cv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/copy_cv_ref.hpp31
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/copy_reference.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/cv_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/cv_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/decay.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/decay.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/declval.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/declval.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/bool_trait_undef.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/bool_trait_undef.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/common_arithmetic_type.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/common_arithmetic_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/common_type_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/common_type_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/composite_member_pointer_type.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/composite_member_pointer_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/composite_pointer_type.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/composite_pointer_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/config.hpp99
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/detector.hpp37
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/has_binary_operator.hpp279
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/has_postfix_operator.hpp250
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/has_prefix_operator.hpp280
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_cxx_03.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_03.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_cxx_11.hpp573
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_msvc10_fix.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_msvc10_fix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_helper.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_helper.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_tester.hpp609
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_likely_lambda.hpp95
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp1603
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp672
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/mp_defer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/mp_defer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/detail/yes_no_type.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/detail/yes_no_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/enable_if.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/extent.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/extent.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/floating_point_promotion.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/floating_point_promotion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/function_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/function_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_bit_and.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_bit_and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_bit_and_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_bit_and_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_bit_or.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_bit_or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_bit_or_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_bit_or_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_bit_xor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_bit_xor_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_complement.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_complement.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_dereference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_dereference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_divides.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_divides.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_divides_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_divides_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_greater.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_greater.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_greater_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_left_shift.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_left_shift.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_left_shift_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_left_shift_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_less.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_less.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_less_equal.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_logical_and.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_logical_and.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_logical_not.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_logical_not.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_logical_or.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_logical_or.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_minus.hpp158
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_minus_assign.hpp163
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_modulus.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_modulus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_modulus_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_modulus_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_multiplies.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_multiplies.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_multiplies_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_multiplies_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_negate.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_negate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_new_operator.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_new_operator.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_not_equal_to.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_constructor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_destructor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_destructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_plus.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_plus_assign.hpp161
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_post_decrement.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_post_increment.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_pre_decrement.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_pre_increment.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_right_shift.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_right_shift.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_right_shift_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_right_shift_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_trivial_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_trivial_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_trivial_constructor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_trivial_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_trivial_copy.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_trivial_copy.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_trivial_destructor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_trivial_destructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_trivial_move_assign.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_assign.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_trivial_move_constructor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_unary_minus.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_unary_minus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_unary_plus.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_unary_plus.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/has_virtual_destructor.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/has_virtual_destructor.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/integral_constant.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/integral_constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/integral_promotion.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/integral_promotion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/intrinsics.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/intrinsics.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_abstract.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_abstract.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_arithmetic.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_arithmetic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_array.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_array.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_assignable.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_assignable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_base_and_derived.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_base_and_derived.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_base_of.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_base_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_bounded_array.hpp42
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_class.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_class.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_complete.hpp92
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_complex.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_complex.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_compound.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_compound.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_const.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_const.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_constructible.hpp90
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_convertible.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_convertible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_copy_assignable.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_copy_assignable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_copy_constructible.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_default_constructible.hpp98
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_destructible.hpp69
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_detected.hpp29
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_empty.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_enum.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_enum.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_final.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_final.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_float.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_float.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_floating_point.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_floating_point.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_function.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_function.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_fundamental.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_fundamental.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_integral.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_integral.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_list_constructible.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_list_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_lvalue_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_lvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_member_function_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_member_function_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_member_object_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_member_object_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_member_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_member_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_noncopyable.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_noncopyable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_move_assignable.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_move_constructible.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_swappable.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_swappable.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_object.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_object.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_pod.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_pod.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_polymorphic.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_polymorphic.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_rvalue_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_rvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_same.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_same.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_scalar.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_scalar.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_signed.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_signed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_stateless.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_stateless.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_unbounded_array.hpp41
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_union.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_union.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_unsigned.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_unsigned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_virtual_base_of.hpp146
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_void.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_void.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/is_volatile.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/is_volatile.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/make_signed.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/make_signed.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/make_unsigned.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/make_unsigned.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/make_void.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/make_void.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/nonesuch.hpp35
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/object_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/object_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/promote.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/promote.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/rank.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/rank.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_all_extents.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_all_extents.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_bounds.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_bounds.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_const.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_const.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_cv.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_cv.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_cv_ref.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_cv_ref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_extent.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_extent.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_pointer.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_reference.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_reference.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/remove_volatile.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/remove_volatile.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/same_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/same_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/transform_traits.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/transform_traits.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/type_identity.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/type_identity.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/type_traits/type_with_alignment.hpp (renamed from src/third_party/boost-1.69.0/boost/type_traits/type_with_alignment.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/constant.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/constant.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/decltype.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/decltype.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/encode_decode.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/encode_decode.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/encode_decode_params.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/int_encoding.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/integral_template_param.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/integral_template_param.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/message.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/message.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/modifiers.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/modifiers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/msvc/typeof_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/native.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/native.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/pointers_data_members.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/register_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/register_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/register_functions_iterate.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/register_functions_iterate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/register_fundamental.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/register_fundamental.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/register_mem_functions.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/register_mem_functions.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/template_encoding.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/template_template_param.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/type_encoding.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/type_template_param.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/type_template_param.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/typeof.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/typeof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/typeof_impl.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/typeof_impl.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/unsupported.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/unsupported.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/vector.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/vector.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/typeof/vector50.hpp (renamed from src/third_party/boost-1.69.0/boost/typeof/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/detail/fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/detail/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/detail/implementation.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/detail/implementation.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/detail/map.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/detail/map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/detail/set.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/detail/set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/unordered_map.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/unordered_map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/unordered_map_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/unordered_map_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/unordered_set.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/unordered_set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered/unordered_set_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered/unordered_set_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered_map.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered_map.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/unordered_set.hpp (renamed from src/third_party/boost-1.69.0/boost/unordered_set.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility.hpp (renamed from src/third_party/boost-1.69.0/boost/utility.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/addressof.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/base_from_member.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/base_from_member.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/binary.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/binary.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/compare_pointees.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/compare_pointees.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/declval.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/declval.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/detail/in_place_factory_prefix.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/detail/in_place_factory_suffix.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/detail/minstd_rand.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/detail/minstd_rand.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/detail/result_of_iterate.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/detail/result_of_iterate.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/enable_if.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/explicit_operator_bool.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/explicit_operator_bool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/identity_type.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/identity_type.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/in_place_factory.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/in_place_factory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/result_of.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/result_of.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/string_ref.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/string_ref.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/string_ref_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/string_ref_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/string_view.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/string_view.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/string_view_fwd.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/string_view_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/swap.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/swap.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/typed_in_place_factory.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/typed_in_place_factory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/utility/value_init.hpp (renamed from src/third_party/boost-1.69.0/boost/utility/value_init.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/version.hpp32
-rw-r--r--src/third_party/boost-1.70.0/boost/visit_each.hpp (renamed from src/third_party/boost-1.69.0/boost/visit_each.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/weak_ptr.hpp (renamed from src/third_party/boost-1.69.0/boost/weak_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/access_rights.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/access_rights.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/basic_types.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/basic_types.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/character_code_conversion.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/character_code_conversion.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/config.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/config.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/dll.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/dll.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/error_codes.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/error_codes.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/error_handling.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/error_handling.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/event.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/event.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_current_process.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_current_process.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_current_process_id.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_current_process_id.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_current_thread.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_current_thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_current_thread_id.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_current_thread_id.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_last_error.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_last_error.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_process_times.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_process_times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/get_thread_times.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/get_thread_times.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/handles.hpp72
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/heap_memory.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/heap_memory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/local_memory.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/local_memory.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/semaphore.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/semaphore.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/system.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/system.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/thread.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/thread.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/thread_pool.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/thread_pool.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/time.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/time.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/timers.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/timers.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/boost/winapi/wait.hpp (renamed from src/third_party/boost-1.69.0/boost/winapi/wait.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/align/README.md (renamed from src/third_party/boost-1.69.0/libs/align/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/atomic/src/lockpool.cpp (renamed from src/third_party/boost-1.69.0/libs/atomic/src/lockpool.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/bind/README.md (renamed from src/third_party/boost-1.69.0/libs/bind/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/bind/bind_as_compose.cpp (renamed from src/third_party/boost-1.69.0/libs/bind/bind_as_compose.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/bind/bind_visitor.cpp (renamed from src/third_party/boost-1.69.0/libs/bind/bind_visitor.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/chrono/src/chrono.cpp (renamed from src/third_party/boost-1.69.0/libs/chrono/src/chrono.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/chrono/src/process_cpu_clocks.cpp (renamed from src/third_party/boost-1.69.0/libs/chrono/src/process_cpu_clocks.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/chrono/src/thread_clock.cpp (renamed from src/third_party/boost-1.69.0/libs/chrono/src/thread_clock.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/Jamfile (renamed from src/third_party/boost-1.69.0/libs/container/Jamfile)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/alloc_lib.c (renamed from src/third_party/boost-1.69.0/libs/container/src/alloc_lib.c)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/dlmalloc.cpp (renamed from src/third_party/boost-1.69.0/libs/container/src/dlmalloc.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/dlmalloc_2_8_6.c (renamed from src/third_party/boost-1.69.0/libs/container/src/dlmalloc_2_8_6.c)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/dlmalloc_ext_2_8_6.c (renamed from src/third_party/boost-1.69.0/libs/container/src/dlmalloc_ext_2_8_6.c)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/global_resource.cpp106
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/monotonic_buffer_resource.cpp (renamed from src/third_party/boost-1.69.0/libs/container/src/monotonic_buffer_resource.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/pool_resource.cpp (renamed from src/third_party/boost-1.69.0/libs/container/src/pool_resource.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/synchronized_pool_resource.cpp (renamed from src/third_party/boost-1.69.0/libs/container/src/synchronized_pool_resource.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/container/src/unsynchronized_pool_resource.cpp (renamed from src/third_party/boost-1.69.0/libs/container/src/unsynchronized_pool_resource.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/coroutine/src/detail/coroutine_context.cpp (renamed from src/third_party/boost-1.69.0/libs/coroutine/src/detail/coroutine_context.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/coroutine/src/exceptions.cpp (renamed from src/third_party/boost-1.69.0/libs/coroutine/src/exceptions.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/coroutine/src/posix/stack_traits.cpp (renamed from src/third_party/boost-1.69.0/libs/coroutine/src/posix/stack_traits.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/coroutine/src/windows/stack_traits.cpp (renamed from src/third_party/boost-1.69.0/libs/coroutine/src/windows/stack_traits.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/Jamfile (renamed from src/third_party/boost-1.69.0/libs/date_time/Jamfile)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/LICENSE (renamed from src/third_party/boost-1.69.0/libs/date_time/LICENSE)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/README.md (renamed from src/third_party/boost-1.69.0/libs/date_time/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/data/README.zone_spec_csv_file (renamed from src/third_party/boost-1.69.0/libs/date_time/data/README.zone_spec_csv_file)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/data/date_time_zonespec.csv (renamed from src/third_party/boost-1.69.0/libs/date_time/data/date_time_zonespec.csv)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/date_time.doc (renamed from src/third_party/boost-1.69.0/libs/date_time/src/date_time.doc)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/gregorian/date_generators.cpp (renamed from src/third_party/boost-1.69.0/libs/date_time/src/gregorian/date_generators.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_month.cpp (renamed from src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_month.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_names.hpp (renamed from src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_names.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_weekday.cpp (renamed from src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_weekday.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/gregorian/gregorian_types.cpp (renamed from src/third_party/boost-1.69.0/libs/date_time/src/gregorian/gregorian_types.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/date_time/src/posix_time/posix_time_types.cpp (renamed from src/third_party/boost-1.69.0/libs/date_time/src/posix_time/posix_time_types.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/exception/src/clone_current_exception_non_intrusive.cpp (renamed from src/third_party/boost-1.69.0/libs/exception/src/clone_current_exception_non_intrusive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/README.md (renamed from src/third_party/boost-1.69.0/libs/filesystem/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/codecvt_error_category.cpp84
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/operations.cpp2675
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/path.cpp940
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/path_traits.cpp200
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/portability.cpp119
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/unique_path.cpp177
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/utf8_codecvt_facet.cpp27
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/windows_file_codecvt.cpp75
-rw-r--r--src/third_party/boost-1.70.0/libs/filesystem/src/windows_file_codecvt.hpp56
-rw-r--r--src/third_party/boost-1.70.0/libs/function/README.md (renamed from src/third_party/boost-1.69.0/libs/function/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/integer/README.md (renamed from src/third_party/boost-1.69.0/libs/integer/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/intrusive/Jamfile (renamed from src/third_party/boost-1.69.0/libs/intrusive/Jamfile)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/Jamfile (renamed from src/third_party/boost-1.69.0/libs/iostreams/Jamfile)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/LICENSE (renamed from src/third_party/boost-1.69.0/libs/iostreams/LICENSE)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/README.md (renamed from src/third_party/boost-1.69.0/libs/iostreams/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/bzip2.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/file_descriptor.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/file_descriptor.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/gzip.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/gzip.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/lzma.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/lzma.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/mapped_file.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/zlib.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/iostreams/src/zstd.cpp (renamed from src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/multi_index/README.md10
-rw-r--r--src/third_party/boost-1.70.0/libs/multi_index/test_results.svg26
-rw-r--r--src/third_party/boost-1.70.0/libs/optional/README.md (renamed from src/third_party/boost-1.69.0/libs/optional/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/Jamfile (renamed from src/third_party/boost-1.69.0/libs/program_options/Jamfile)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/README.md (renamed from src/third_party/boost-1.69.0/libs/program_options/README.md)0
-rwxr-xr-xsrc/third_party/boost-1.70.0/libs/program_options/ci/build.sh (renamed from src/third_party/boost-1.69.0/libs/program_options/ci/build.sh)0
-rwxr-xr-xsrc/third_party/boost-1.70.0/libs/program_options/ci/codecov.sh (renamed from src/third_party/boost-1.69.0/libs/program_options/ci/codecov.sh)0
-rwxr-xr-xsrc/third_party/boost-1.70.0/libs/program_options/ci/coverity.sh (renamed from src/third_party/boost-1.69.0/libs/program_options/ci/coverity.sh)0
-rwxr-xr-xsrc/third_party/boost-1.70.0/libs/program_options/ci/cppcheck.sh (renamed from src/third_party/boost-1.69.0/libs/program_options/ci/cppcheck.sh)0
-rwxr-xr-xsrc/third_party/boost-1.70.0/libs/program_options/ci/mingw.bat (renamed from src/third_party/boost-1.69.0/libs/program_options/ci/mingw.bat)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/cmdline.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/cmdline.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/config_file.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/config_file.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/convert.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/convert.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/options_description.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/options_description.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/parsers.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/parsers.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/positional_options.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/positional_options.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/split.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/split.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/utf8_codecvt_facet.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/utf8_codecvt_facet.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/value_semantic.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/value_semantic.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/variables_map.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/variables_map.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/program_options/src/winmain.cpp (renamed from src/third_party/boost-1.69.0/libs/program_options/src/winmain.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/random/src/random_device.cpp (renamed from src/third_party/boost-1.69.0/libs/random/src/random_device.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/c_regex_traits.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/c_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/cpp_regex_traits.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/cpp_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/cregex.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/cregex.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/fileiter.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/icu.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/icu.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/instances.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/instances.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/internals.hpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/internals.hpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/posix_api.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/posix_api.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/regex.cpp231
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/regex_debug.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/regex_debug.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/regex_raw_buffer.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/regex_raw_buffer.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/regex_traits_defaults.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/regex_traits_defaults.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/static_mutex.cpp185
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/usinstances.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/usinstances.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/w32_regex_traits.cpp654
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/wc_regex_traits.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/wc_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/wide_posix_api.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/wide_posix_api.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/regex/src/winstances.cpp (renamed from src/third_party/boost-1.69.0/libs/regex/src/winstances.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/archive_exception.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/archive_exception.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_archive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_archive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_iserializer.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_iserializer.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_oserializer.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_oserializer.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_pointer_iserializer.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_iserializer.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_pointer_oserializer.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_oserializer.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_serializer_map.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_serializer_map.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_text_iprimitive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_text_iprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_text_oprimitive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_text_oprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_text_wiprimitive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_text_wiprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_text_woprimitive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_text_woprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_xml_archive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_archive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/basic_xml_grammar.ipp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_grammar.ipp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/binary_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/binary_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/binary_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/binary_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/binary_wiarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/binary_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/binary_woarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/binary_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/codecvt_null.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/codecvt_null.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/extended_type_info.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/extended_type_info_no_rtti.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_no_rtti.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/extended_type_info_typeid.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_typeid.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_binary_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_binary_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_wiarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_woarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_woarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/stl_port.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/stl_port.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/text_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/text_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/text_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/text_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/text_wiarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/text_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/text_woarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/text_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/utf8_codecvt_facet.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/utf8_codecvt_facet.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/void_cast.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/void_cast.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_archive_exception.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_archive_exception.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_grammar.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_grammar.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_iarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_oarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_wgrammar.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_wgrammar.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_wiarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/serialization/src/xml_woarchive.cpp (renamed from src/third_party/boost-1.69.0/libs/serialization/src/xml_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/smart_ptr/README.md (renamed from src/third_party/boost-1.69.0/libs/smart_ptr/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/smart_ptr/extras/src/sp_collector.cpp (renamed from src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_collector.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp (renamed from src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/system/src/error_code.cpp (renamed from src/third_party/boost-1.69.0/libs/system/src/error_code.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/future.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/future.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/pthread/once.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/pthread/once.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/pthread/once_atomic.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/pthread/once_atomic.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/pthread/thread.cpp799
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/tss_null.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/tss_null.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/win32/thread.cpp980
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/win32/thread_primitives.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/win32/thread_primitives.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/win32/tss_dll.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/thread/src/win32/tss_pe.cpp (renamed from src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/timer/src/auto_timers_construction.cpp (renamed from src/third_party/boost-1.69.0/libs/timer/src/auto_timers_construction.cpp)0
-rw-r--r--src/third_party/boost-1.70.0/libs/timer/src/cpu_timer.cpp267
-rw-r--r--src/third_party/boost-1.70.0/libs/unordered/_clang-format (renamed from src/third_party/boost-1.69.0/libs/unordered/_clang-format)0
-rw-r--r--src/third_party/boost-1.70.0/libs/unordered/ci/download-boost-snapshot.py (renamed from src/third_party/boost-1.69.0/libs/unordered/ci/download-boost-snapshot.py)0
-rw-r--r--src/third_party/boost-1.70.0/libs/utility/README.md (renamed from src/third_party/boost-1.69.0/libs/utility/README.md)0
-rw-r--r--src/third_party/boost-1.70.0/libs/utility/sublibs (renamed from src/third_party/boost-1.69.0/libs/utility/sublibs)0
-rwxr-xr-xsrc/third_party/scripts/boost_get_sources.sh2
5219 files changed, 275942 insertions, 273017 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript
index ef5b0f99a6f..dbb54dda049 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.69.0"
+boostSuffix = "-1.70.0"
snappySuffix = '-1.1.7'
zlibSuffix = '-1.2.11'
zstdSuffix = '-1.3.7'
diff --git a/src/third_party/boost-1.69.0/boost/any.hpp b/src/third_party/boost-1.69.0/boost/any.hpp
deleted file mode 100644
index 8f409d7bfe5..00000000000
--- a/src/third_party/boost-1.69.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/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.69.0/boost/array.hpp b/src/third_party/boost-1.69.0/boost/array.hpp
deleted file mode 100644
index 210c0721254..00000000000
--- a/src/third_party/boost-1.69.0/boost/array.hpp
+++ /dev/null
@@ -1,457 +0,0 @@
-/* The following code declares class array,
- * an STL container (as wrapper) for arrays of constant size.
- *
- * See
- * http://www.boost.org/libs/array/
- * for documentation.
- *
- * The original author site is at: http://www.josuttis.com/
- *
- * (C) Copyright Nicolai M. Josuttis 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)
- *
- * 9 Jan 2013 - (mtc) Added constexpr
- * 14 Apr 2012 - (mtc) Added support for boost::hash
- * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
- * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
- * See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
- * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
- * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
- * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
- * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
- * 05 Aug 2001 - minor update (Nico Josuttis)
- * 20 Jan 2001 - STLport fix (Beman Dawes)
- * 29 Sep 2000 - Initial Revision (Nico Josuttis)
- *
- * Jan 29, 2004
- */
-#ifndef BOOST_ARRAY_HPP
-#define BOOST_ARRAY_HPP
-
-#include <boost/detail/workaround.hpp>
-
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(push)
-# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
-# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated
-# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required
-#endif
-
-#include <cstddef>
-#include <stdexcept>
-#include <boost/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/swap.hpp>
-
-// Handles broken standard libraries better than <iterator>
-#include <boost/detail/iterator.hpp>
-#include <boost/throw_exception.hpp>
-#include <algorithm>
-
-// FIXES for broken compilers
-#include <boost/config.hpp>
-
-
-namespace boost {
-
- template<class T, std::size_t N>
- class array {
- public:
- T elems[N]; // fixed-size array of elements of type T
-
- public:
- // type definitions
- typedef T value_type;
- typedef T* iterator;
- typedef const T* const_iterator;
- typedef T& reference;
- typedef const T& const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
- // iterator support
- iterator begin() { return elems; }
- const_iterator begin() const { return elems; }
- const_iterator cbegin() const { return elems; }
-
- iterator end() { return elems+N; }
- const_iterator end() const { return elems+N; }
- const_iterator cend() const { return elems+N; }
-
- // reverse iterator support
-#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
- typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
- value_type, reference, iterator, difference_type> reverse_iterator;
- typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
- value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
-#else
- // workaround for broken reverse_iterator implementations
- typedef std::reverse_iterator<iterator,T> reverse_iterator;
- typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
-#endif
-
- reverse_iterator rbegin() { return reverse_iterator(end()); }
- const_reverse_iterator rbegin() const {
- return const_reverse_iterator(end());
- }
- const_reverse_iterator crbegin() const {
- return const_reverse_iterator(end());
- }
-
- reverse_iterator rend() { return reverse_iterator(begin()); }
- const_reverse_iterator rend() const {
- return const_reverse_iterator(begin());
- }
- const_reverse_iterator crend() const {
- return const_reverse_iterator(begin());
- }
-
- // operator[]
- reference operator[](size_type i)
- {
- return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];
- }
-
- /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const
- {
- return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];
- }
-
- // at() with range check
- reference at(size_type i) { return rangecheck(i), elems[i]; }
- /*BOOST_CONSTEXPR*/ const_reference at(size_type i) const { return rangecheck(i), elems[i]; }
-
- // front() and back()
- reference front()
- {
- return elems[0];
- }
-
- BOOST_CONSTEXPR const_reference front() const
- {
- return elems[0];
- }
-
- reference back()
- {
- return elems[N-1];
- }
-
- BOOST_CONSTEXPR const_reference back() const
- {
- return elems[N-1];
- }
-
- // size is constant
- static BOOST_CONSTEXPR size_type size() { return N; }
- static BOOST_CONSTEXPR bool empty() { return false; }
- static BOOST_CONSTEXPR size_type max_size() { return N; }
- enum { static_size = N };
-
- // swap (note: linear complexity)
- void swap (array<T,N>& y) {
- for (size_type i = 0; i < N; ++i)
- boost::swap(elems[i],y.elems[i]);
- }
-
- // direct access to data (read-only)
- const T* data() const { return elems; }
- T* data() { return elems; }
-
- // use array as C array (direct read/write access to data)
- T* c_array() { return elems; }
-
- // assignment with type conversion
- template <typename T2>
- array<T,N>& operator= (const array<T2,N>& rhs) {
- std::copy(rhs.begin(),rhs.end(), begin());
- return *this;
- }
-
- // assign one value to all elements
- void assign (const T& value) { fill ( value ); } // A synonym for fill
- void fill (const T& value)
- {
- std::fill_n(begin(),size(),value);
- }
-
- // check range (may be private because it is static)
- static BOOST_CONSTEXPR bool rangecheck (size_type i) {
- return i > size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
- }
-
- };
-
- template< class T >
- class array< T, 0 > {
-
- public:
- // type definitions
- typedef T value_type;
- typedef T* iterator;
- typedef const T* const_iterator;
- typedef T& reference;
- typedef const T& const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
- // iterator support
- iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); }
- const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
- const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
-
- iterator end() { return begin(); }
- const_iterator end() const { return begin(); }
- const_iterator cend() const { return cbegin(); }
-
- // reverse iterator support
-#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
- typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
- value_type, reference, iterator, difference_type> reverse_iterator;
- typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
- value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
-#else
- // workaround for broken reverse_iterator implementations
- typedef std::reverse_iterator<iterator,T> reverse_iterator;
- typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
-#endif
-
- reverse_iterator rbegin() { return reverse_iterator(end()); }
- const_reverse_iterator rbegin() const {
- return const_reverse_iterator(end());
- }
- const_reverse_iterator crbegin() const {
- return const_reverse_iterator(end());
- }
-
- reverse_iterator rend() { return reverse_iterator(begin()); }
- const_reverse_iterator rend() const {
- return const_reverse_iterator(begin());
- }
- const_reverse_iterator crend() const {
- return const_reverse_iterator(begin());
- }
-
- // operator[]
- reference operator[](size_type /*i*/)
- {
- return failed_rangecheck();
- }
-
- /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const
- {
- return failed_rangecheck();
- }
-
- // at() with range check
- reference at(size_type /*i*/) { return failed_rangecheck(); }
- /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
-
- // front() and back()
- reference front()
- {
- return failed_rangecheck();
- }
-
- BOOST_CONSTEXPR const_reference front() const
- {
- return failed_rangecheck();
- }
-
- reference back()
- {
- return failed_rangecheck();
- }
-
- BOOST_CONSTEXPR const_reference back() const
- {
- return failed_rangecheck();
- }
-
- // size is constant
- static BOOST_CONSTEXPR size_type size() { return 0; }
- static BOOST_CONSTEXPR bool empty() { return true; }
- static BOOST_CONSTEXPR size_type max_size() { return 0; }
- enum { static_size = 0 };
-
- void swap (array<T,0>& /*y*/) {
- }
-
- // direct access to data (read-only)
- const T* data() const { return 0; }
- T* data() { return 0; }
-
- // use array as C array (direct read/write access to data)
- T* c_array() { return 0; }
-
- // assignment with type conversion
- template <typename T2>
- array<T,0>& operator= (const array<T2,0>& ) {
- return *this;
- }
-
- // assign one value to all elements
- void assign (const T& value) { fill ( value ); }
- void fill (const T& ) {}
-
- // check range (may be private because it is static)
- static reference failed_rangecheck () {
- std::out_of_range e("attempt to access element of an empty array");
- boost::throw_exception(e);
-#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
- //
- // We need to return something here to keep
- // some compilers happy: however we will never
- // actually get here....
- //
- static T placeholder;
- return placeholder;
-#endif
- }
- };
-
- // comparisons
- template<class T, std::size_t N>
- bool operator== (const array<T,N>& x, const array<T,N>& y) {
- return std::equal(x.begin(), x.end(), y.begin());
- }
- template<class T, std::size_t N>
- bool operator< (const array<T,N>& x, const array<T,N>& y) {
- return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
- }
- template<class T, std::size_t N>
- bool operator!= (const array<T,N>& x, const array<T,N>& y) {
- return !(x==y);
- }
- template<class T, std::size_t N>
- bool operator> (const array<T,N>& x, const array<T,N>& y) {
- return y<x;
- }
- template<class T, std::size_t N>
- bool operator<= (const array<T,N>& x, const array<T,N>& y) {
- return !(y<x);
- }
- template<class T, std::size_t N>
- bool operator>= (const array<T,N>& x, const array<T,N>& y) {
- return !(x<y);
- }
-
- // global swap()
- template<class T, std::size_t N>
- inline void swap (array<T,N>& x, array<T,N>& y) {
- x.swap(y);
- }
-
-#if defined(__SUNPRO_CC)
-// Trac ticket #4757; the Sun Solaris compiler can't handle
-// syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
-//
-// We can't just use this for all compilers, because the
-// borland compilers can't handle this form.
- namespace detail {
- template <typename T, std::size_t N> struct c_array
- {
- typedef T type[N];
- };
- }
-
- // Specific for boost::array: simply returns its elems data member.
- template <typename T, std::size_t N>
- typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg)
- {
- return arg.elems;
- }
-
- // Specific for boost::array: simply returns its elems data member.
- template <typename T, std::size_t N>
- typename detail::c_array<T,N>::type const& get_c_array(const boost::array<T,N>& arg)
- {
- return arg.elems;
- }
-#else
-// Specific for boost::array: simply returns its elems data member.
- template <typename T, std::size_t N>
- T(&get_c_array(boost::array<T,N>& arg))[N]
- {
- return arg.elems;
- }
-
- // Const version.
- template <typename T, std::size_t N>
- const T(&get_c_array(const boost::array<T,N>& arg))[N]
- {
- return arg.elems;
- }
-#endif
-
-#if 0
- // Overload for std::array, assuming that std::array will have
- // explicit conversion functions as discussed at the WG21 meeting
- // in Summit, March 2009.
- template <typename T, std::size_t N>
- T(&get_c_array(std::array<T,N>& arg))[N]
- {
- return static_cast<T(&)[N]>(arg);
- }
-
- // Const version.
- template <typename T, std::size_t N>
- const T(&get_c_array(const std::array<T,N>& arg))[N]
- {
- return static_cast<T(&)[N]>(arg);
- }
-#endif
-
- template <class It> std::size_t hash_range(It, It);
-
- template<class T, std::size_t N>
- std::size_t hash_value(const array<T,N>& arr)
- {
- return boost::hash_range(arr.begin(), arr.end());
- }
-
- template <size_t Idx, typename T, size_t N>
- T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" );
- return arr[Idx];
- }
-
- template <size_t Idx, typename T, size_t N>
- const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" );
- return arr[Idx];
- }
-
-} /* namespace boost */
-
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
-// If we don't have std::array, I'm assuming that we don't have std::get
-namespace std {
- template <size_t Idx, typename T, size_t N>
- T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" );
- return arr[Idx];
- }
-
- template <size_t Idx, typename T, size_t N>
- const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" );
- return arr[Idx];
- }
-}
-#endif
-
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(pop)
-#endif
-
-#endif /*BOOST_ARRAY_HPP*/
diff --git a/src/third_party/boost-1.69.0/boost/asio.hpp b/src/third_party/boost-1.69.0/boost/asio.hpp
deleted file mode 100644
index 53841de1fcb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio.hpp
+++ /dev/null
@@ -1,151 +0,0 @@
-//
-// asio.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)
-//
-// See www.boost.org/libs/asio for documentation.
-//
-
-#ifndef BOOST_ASIO_HPP
-#define BOOST_ASIO_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/basic_datagram_socket.hpp>
-#include <boost/asio/basic_deadline_timer.hpp>
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/basic_raw_socket.hpp>
-#include <boost/asio/basic_seq_packet_socket.hpp>
-#include <boost/asio/basic_serial_port.hpp>
-#include <boost/asio/basic_signal_set.hpp>
-#include <boost/asio/basic_socket_acceptor.hpp>
-#include <boost/asio/basic_socket_iostream.hpp>
-#include <boost/asio/basic_socket_streambuf.hpp>
-#include <boost/asio/basic_stream_socket.hpp>
-#include <boost/asio/basic_streambuf.hpp>
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/bind_executor.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/buffered_read_stream_fwd.hpp>
-#include <boost/asio/buffered_read_stream.hpp>
-#include <boost/asio/buffered_stream_fwd.hpp>
-#include <boost/asio/buffered_stream.hpp>
-#include <boost/asio/buffered_write_stream_fwd.hpp>
-#include <boost/asio/buffered_write_stream.hpp>
-#include <boost/asio/buffers_iterator.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/connect.hpp>
-#include <boost/asio/coroutine.hpp>
-#include <boost/asio/datagram_socket_service.hpp>
-#include <boost/asio/deadline_timer_service.hpp>
-#include <boost/asio/deadline_timer.hpp>
-#include <boost/asio/defer.hpp>
-#include <boost/asio/dispatch.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/executor.hpp>
-#include <boost/asio/executor_work_guard.hpp>
-#include <boost/asio/generic/basic_endpoint.hpp>
-#include <boost/asio/generic/datagram_protocol.hpp>
-#include <boost/asio/generic/raw_protocol.hpp>
-#include <boost/asio/generic/seq_packet_protocol.hpp>
-#include <boost/asio/generic/stream_protocol.hpp>
-#include <boost/asio/handler_alloc_hook.hpp>
-#include <boost/asio/handler_continuation_hook.hpp>
-#include <boost/asio/handler_invoke_hook.hpp>
-#include <boost/asio/handler_type.hpp>
-#include <boost/asio/high_resolution_timer.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/io_context_strand.hpp>
-#include <boost/asio/io_service.hpp>
-#include <boost/asio/io_service_strand.hpp>
-#include <boost/asio/ip/address.hpp>
-#include <boost/asio/ip/address_v4.hpp>
-#include <boost/asio/ip/address_v4_iterator.hpp>
-#include <boost/asio/ip/address_v4_range.hpp>
-#include <boost/asio/ip/address_v6.hpp>
-#include <boost/asio/ip/address_v6_iterator.hpp>
-#include <boost/asio/ip/address_v6_range.hpp>
-#include <boost/asio/ip/bad_address_cast.hpp>
-#include <boost/asio/ip/basic_endpoint.hpp>
-#include <boost/asio/ip/basic_resolver.hpp>
-#include <boost/asio/ip/basic_resolver_entry.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/host_name.hpp>
-#include <boost/asio/ip/icmp.hpp>
-#include <boost/asio/ip/multicast.hpp>
-#include <boost/asio/ip/resolver_base.hpp>
-#include <boost/asio/ip/resolver_query_base.hpp>
-#include <boost/asio/ip/resolver_service.hpp>
-#include <boost/asio/ip/tcp.hpp>
-#include <boost/asio/ip/udp.hpp>
-#include <boost/asio/ip/unicast.hpp>
-#include <boost/asio/ip/v6_only.hpp>
-#include <boost/asio/is_executor.hpp>
-#include <boost/asio/is_read_buffered.hpp>
-#include <boost/asio/is_write_buffered.hpp>
-#include <boost/asio/local/basic_endpoint.hpp>
-#include <boost/asio/local/connect_pair.hpp>
-#include <boost/asio/local/datagram_protocol.hpp>
-#include <boost/asio/local/stream_protocol.hpp>
-#include <boost/asio/packaged_task.hpp>
-#include <boost/asio/placeholders.hpp>
-#include <boost/asio/posix/basic_descriptor.hpp>
-#include <boost/asio/posix/basic_stream_descriptor.hpp>
-#include <boost/asio/posix/descriptor.hpp>
-#include <boost/asio/posix/descriptor_base.hpp>
-#include <boost/asio/posix/stream_descriptor.hpp>
-#include <boost/asio/posix/stream_descriptor_service.hpp>
-#include <boost/asio/post.hpp>
-#include <boost/asio/raw_socket_service.hpp>
-#include <boost/asio/read.hpp>
-#include <boost/asio/read_at.hpp>
-#include <boost/asio/read_until.hpp>
-#include <boost/asio/seq_packet_socket_service.hpp>
-#include <boost/asio/serial_port.hpp>
-#include <boost/asio/serial_port_base.hpp>
-#include <boost/asio/serial_port_service.hpp>
-#include <boost/asio/signal_set.hpp>
-#include <boost/asio/signal_set_service.hpp>
-#include <boost/asio/socket_acceptor_service.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/steady_timer.hpp>
-#include <boost/asio/strand.hpp>
-#include <boost/asio/stream_socket_service.hpp>
-#include <boost/asio/streambuf.hpp>
-#include <boost/asio/system_context.hpp>
-#include <boost/asio/system_executor.hpp>
-#include <boost/asio/system_timer.hpp>
-#include <boost/asio/thread_pool.hpp>
-#include <boost/asio/time_traits.hpp>
-#include <boost/asio/use_future.hpp>
-#include <boost/asio/uses_executor.hpp>
-#include <boost/asio/version.hpp>
-#include <boost/asio/wait_traits.hpp>
-#include <boost/asio/waitable_timer_service.hpp>
-#include <boost/asio/windows/basic_handle.hpp>
-#include <boost/asio/windows/basic_object_handle.hpp>
-#include <boost/asio/windows/basic_random_access_handle.hpp>
-#include <boost/asio/windows/basic_stream_handle.hpp>
-#include <boost/asio/windows/object_handle.hpp>
-#include <boost/asio/windows/object_handle_service.hpp>
-#include <boost/asio/windows/overlapped_handle.hpp>
-#include <boost/asio/windows/overlapped_ptr.hpp>
-#include <boost/asio/windows/random_access_handle.hpp>
-#include <boost/asio/windows/random_access_handle_service.hpp>
-#include <boost/asio/windows/stream_handle.hpp>
-#include <boost/asio/windows/stream_handle_service.hpp>
-#include <boost/asio/write.hpp>
-#include <boost/asio/write_at.hpp>
-
-#endif // BOOST_ASIO_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp b/src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp
deleted file mode 100644
index bcf1eca3aea..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp
+++ /dev/null
@@ -1,133 +0,0 @@
-//
-// associated_allocator.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_ASSOCIATED_ALLOCATOR_HPP
-#define BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <memory>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename>
-struct associated_allocator_check
-{
- typedef void type;
-};
-
-template <typename T, typename E, typename = void>
-struct associated_allocator_impl
-{
- typedef E type;
-
- static type get(const T&, const E& e) BOOST_ASIO_NOEXCEPT
- {
- return e;
- }
-};
-
-template <typename T, typename E>
-struct associated_allocator_impl<T, E,
- typename associated_allocator_check<typename T::allocator_type>::type>
-{
- typedef typename T::allocator_type type;
-
- static type get(const T& t, const E&) BOOST_ASIO_NOEXCEPT
- {
- return t.get_allocator();
- }
-};
-
-} // namespace detail
-
-/// Traits type used to obtain the allocator associated with an object.
-/**
- * A program may specialise this traits type if the @c T template parameter in
- * the specialisation is a user-defined type. The template parameter @c
- * Allocator shall be a type meeting the Allocator requirements.
- *
- * Specialisations shall meet the following requirements, where @c t is a const
- * reference to an object of type @c T, and @c a is an object of type @c
- * Allocator.
- *
- * @li Provide a nested typedef @c type that identifies a type meeting the
- * Allocator requirements.
- *
- * @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
- *
- * @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,a) and with return type @c type.
- */
-template <typename T, typename Allocator = std::allocator<void> >
-struct associated_allocator
-{
- /// If @c T has a nested type @c allocator_type, <tt>T::allocator_type</tt>.
- /// Otherwise @c Allocator.
-#if defined(GENERATING_DOCUMENTATION)
- typedef see_below type;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::associated_allocator_impl<T, Allocator>::type type;
-#endif // defined(GENERATING_DOCUMENTATION)
-
- /// If @c T has a nested type @c allocator_type, returns
- /// <tt>t.get_allocator()</tt>. Otherwise returns @c a.
- static type get(const T& t,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return detail::associated_allocator_impl<T, Allocator>::get(t, a);
- }
-};
-
-/// Helper function to obtain an object's associated allocator.
-/**
- * @returns <tt>associated_allocator<T>::get(t)</tt>
- */
-template <typename T>
-inline typename associated_allocator<T>::type
-get_associated_allocator(const T& t) BOOST_ASIO_NOEXCEPT
-{
- return associated_allocator<T>::get(t);
-}
-
-/// Helper function to obtain an object's associated allocator.
-/**
- * @returns <tt>associated_allocator<T, Allocator>::get(t, a)</tt>
- */
-template <typename T, typename Allocator>
-inline typename associated_allocator<T, Allocator>::type
-get_associated_allocator(const T& t, const Allocator& a) BOOST_ASIO_NOEXCEPT
-{
- return associated_allocator<T, Allocator>::get(t, a);
-}
-
-#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
-
-template <typename T, typename Allocator = std::allocator<void> >
-using associated_allocator_t
- = typename associated_allocator<T, Allocator>::type;
-
-#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp
deleted file mode 100644
index c31800f3946..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp
+++ /dev/null
@@ -1,151 +0,0 @@
-//
-// associated_executor.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_ASSOCIATED_EXECUTOR_HPP
-#define BOOST_ASIO_ASSOCIATED_EXECUTOR_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/is_executor.hpp>
-#include <boost/asio/system_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename>
-struct associated_executor_check
-{
- typedef void type;
-};
-
-template <typename T, typename E, typename = void>
-struct associated_executor_impl
-{
- typedef E type;
-
- static type get(const T&, const E& e) BOOST_ASIO_NOEXCEPT
- {
- return e;
- }
-};
-
-template <typename T, typename E>
-struct associated_executor_impl<T, E,
- typename associated_executor_check<typename T::executor_type>::type>
-{
- typedef typename T::executor_type type;
-
- static type get(const T& t, const E&) BOOST_ASIO_NOEXCEPT
- {
- return t.get_executor();
- }
-};
-
-} // namespace detail
-
-/// Traits type used to obtain the executor associated with an object.
-/**
- * A program may specialise this traits type if the @c T template parameter in
- * the specialisation is a user-defined type. The template parameter @c
- * Executor shall be a type meeting the Executor requirements.
- *
- * Specialisations shall meet the following requirements, where @c t is a const
- * reference to an object of type @c T, and @c e is an object of type @c
- * Executor.
- *
- * @li Provide a nested typedef @c type that identifies a type meeting the
- * Executor requirements.
- *
- * @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
- *
- * @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,e) and with return type @c type.
- */
-template <typename T, typename Executor = system_executor>
-struct associated_executor
-{
- /// If @c T has a nested type @c executor_type, <tt>T::executor_type</tt>.
- /// Otherwise @c Executor.
-#if defined(GENERATING_DOCUMENTATION)
- typedef see_below type;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::associated_executor_impl<T, Executor>::type type;
-#endif // defined(GENERATING_DOCUMENTATION)
-
- /// If @c T has a nested type @c executor_type, returns
- /// <tt>t.get_executor()</tt>. Otherwise returns @c ex.
- static type get(const T& t,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return detail::associated_executor_impl<T, Executor>::get(t, ex);
- }
-};
-
-/// Helper function to obtain an object's associated executor.
-/**
- * @returns <tt>associated_executor<T>::get(t)</tt>
- */
-template <typename T>
-inline typename associated_executor<T>::type
-get_associated_executor(const T& t) BOOST_ASIO_NOEXCEPT
-{
- return associated_executor<T>::get(t);
-}
-
-/// Helper function to obtain an object's associated executor.
-/**
- * @returns <tt>associated_executor<T, Executor>::get(t, ex)</tt>
- */
-template <typename T, typename Executor>
-inline typename associated_executor<T, Executor>::type
-get_associated_executor(const T& t, const Executor& ex,
- typename enable_if<is_executor<
- Executor>::value>::type* = 0) BOOST_ASIO_NOEXCEPT
-{
- return associated_executor<T, Executor>::get(t, ex);
-}
-
-/// Helper function to obtain an object's associated executor.
-/**
- * @returns <tt>associated_executor<T, typename
- * ExecutionContext::executor_type>::get(t, ctx.get_executor())</tt>
- */
-template <typename T, typename ExecutionContext>
-inline typename associated_executor<T,
- typename ExecutionContext::executor_type>::type
-get_associated_executor(const T& t, ExecutionContext& ctx,
- typename enable_if<is_convertible<ExecutionContext&,
- execution_context&>::value>::type* = 0) BOOST_ASIO_NOEXCEPT
-{
- return associated_executor<T,
- typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
-}
-
-#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
-
-template <typename T, typename Executor = system_executor>
-using associated_executor_t = typename associated_executor<T, Executor>::type;
-
-#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_ASSOCIATED_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/async_result.hpp b/src/third_party/boost-1.69.0/boost/asio/async_result.hpp
deleted file mode 100644
index a2aafce1344..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/async_result.hpp
+++ /dev/null
@@ -1,223 +0,0 @@
-//
-// async_result.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_ASYNC_RESULT_HPP
-#define BOOST_ASIO_ASYNC_RESULT_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/handler_type.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// An interface for customising the behaviour of an initiating function.
-/**
- * The async_result traits class is used for determining:
- *
- * @li the concrete completion handler type to be called at the end of the
- * asynchronous operation;
- *
- * @li the initiating function return type; and
- *
- * @li how the return value of the initiating function is obtained.
- *
- * The trait allows the handler and return types to be determined at the point
- * where the specific completion handler signature is known.
- *
- * This template may be specialised for user-defined completion token types.
- * The primary template assumes that the CompletionToken is the completion
- * handler.
- */
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-template <typename CompletionToken, typename Signature>
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-template <typename CompletionToken, typename Signature = void>
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-class async_result
-{
-public:
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- /// The concrete completion handler type for the specific signature.
- typedef CompletionToken completion_handler_type;
-
- /// The return type of the initiating function.
- typedef void return_type;
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // For backward compatibility, determine the concrete completion handler type
- // by using the legacy handler_type trait.
- typedef typename handler_type<CompletionToken, Signature>::type
- completion_handler_type;
-
- // For backward compatibility, determine the initiating function return type
- // using the legacy single-parameter version of async_result.
- typedef typename async_result<completion_handler_type>::type return_type;
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-
- /// Construct an async result from a given handler.
- /**
- * When using a specalised async_result, the constructor has an opportunity
- * to initialise some state associated with the completion handler, which is
- * then returned from the initiating function.
- */
- explicit async_result(completion_handler_type& h)
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // No data members to initialise.
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- : legacy_result_(h)
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- {
- (void)h;
- }
-
- /// Obtain the value to be returned from the initiating function.
- return_type get()
- {
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // Nothing to do.
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- return legacy_result_.get();
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- }
-
-private:
- async_result(const async_result&) BOOST_ASIO_DELETED;
- async_result& operator=(const async_result&) BOOST_ASIO_DELETED;
-
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // No data members.
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- async_result<completion_handler_type> legacy_result_;
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// (Deprecated: Use two-parameter version of async_result.) An interface for
-/// customising the behaviour of an initiating function.
-/**
- * This template may be specialised for user-defined handler types.
- */
-template <typename Handler>
-class async_result<Handler>
-{
-public:
- /// The return type of the initiating function.
- typedef void type;
-
- /// Construct an async result from a given handler.
- /**
- * When using a specalised async_result, the constructor has an opportunity
- * to initialise some state associated with the handler, which is then
- * returned from the initiating function.
- */
- explicit async_result(Handler&)
- {
- }
-
- /// Obtain the value to be returned from the initiating function.
- type get()
- {
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Helper template to deduce the handler type from a CompletionToken, capture
-/// a local copy of the handler, and then create an async_result for the
-/// handler.
-template <typename CompletionToken, typename Signature>
-struct async_completion
-{
- /// The real handler type to be used for the asynchronous operation.
- typedef typename boost::asio::async_result<
- typename decay<CompletionToken>::type,
- Signature>::completion_handler_type completion_handler_type;
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Constructor.
- /**
- * The constructor creates the concrete completion handler and makes the link
- * between the handler and the asynchronous result.
- */
- explicit async_completion(CompletionToken& token)
- : completion_handler(static_cast<typename conditional<
- is_same<CompletionToken, completion_handler_type>::value,
- completion_handler_type&, CompletionToken&&>::type>(token)),
- result(completion_handler)
- {
- }
-#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- explicit async_completion(typename decay<CompletionToken>::type& token)
- : completion_handler(token),
- result(completion_handler)
- {
- }
-
- explicit async_completion(const typename decay<CompletionToken>::type& token)
- : completion_handler(token),
- result(completion_handler)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// A copy of, or reference to, a real handler object.
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- typename conditional<
- is_same<CompletionToken, completion_handler_type>::value,
- completion_handler_type&, completion_handler_type>::type completion_handler;
-#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- completion_handler_type completion_handler;
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// The result of the asynchronous operation's initiating function.
- async_result<typename decay<CompletionToken>::type, Signature> result;
-};
-
-namespace detail {
-
-template <typename CompletionToken, typename Signature>
-struct async_result_helper
- : async_result<typename decay<CompletionToken>::type, Signature>
-{
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(GENERATING_DOCUMENTATION)
-# define BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) \
- void_or_deduced
-#elif defined(_MSC_VER) && (_MSC_VER < 1500)
-# define BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) \
- typename ::boost::asio::detail::async_result_helper< \
- ct, sig>::return_type
-#define BOOST_ASIO_HANDLER_TYPE(ct, sig) \
- typename ::boost::asio::detail::async_result_helper< \
- ct, sig>::completion_handler_type
-#else
-# define BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) \
- typename ::boost::asio::async_result< \
- typename ::boost::asio::decay<ct>::type, sig>::return_type
-#define BOOST_ASIO_HANDLER_TYPE(ct, sig) \
- typename ::boost::asio::async_result< \
- typename ::boost::asio::decay<ct>::type, sig>::completion_handler_type
-#endif
-
-#endif // BOOST_ASIO_ASYNC_RESULT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp
deleted file mode 100644
index b512b75ddeb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp
+++ /dev/null
@@ -1,1042 +0,0 @@
-//
-// basic_datagram_socket.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_BASIC_DATAGRAM_SOCKET_HPP
-#define BOOST_ASIO_BASIC_DATAGRAM_SOCKET_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/basic_socket.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/datagram_socket_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides datagram-oriented socket functionality.
-/**
- * The basic_datagram_socket class template provides asynchronous and blocking
- * datagram-oriented socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= datagram_socket_service<Protocol>)>
-class basic_datagram_socket
- : public basic_socket<Protocol BOOST_ASIO_SVC_TARG>
-{
-public:
- /// The native representation of a socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename basic_socket<
- Protocol BOOST_ASIO_SVC_TARG>::native_handle_type native_handle_type;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// Construct a basic_datagram_socket without opening it.
- /**
- * This constructor creates a datagram socket without opening it. The open()
- * function must be called before data can be sent or received on the socket.
- *
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- */
- explicit basic_datagram_socket(boost::asio::io_context& io_context)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context)
- {
- }
-
- /// Construct and open a basic_datagram_socket.
- /**
- * This constructor creates and opens a datagram socket.
- *
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_datagram_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, protocol)
- {
- }
-
- /// Construct a basic_datagram_socket, opening it and binding it to the given
- /// local endpoint.
- /**
- * This constructor creates a datagram socket and automatically opens it bound
- * to the specified endpoint on the local machine. The protocol used is the
- * protocol associated with the given endpoint.
- *
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- *
- * @param endpoint An endpoint on the local machine to which the datagram
- * socket will be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_datagram_socket(boost::asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, endpoint)
- {
- }
-
- /// Construct a basic_datagram_socket on an existing native socket.
- /**
- * This constructor creates a datagram socket object to hold an existing
- * native socket.
- *
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @param native_socket The new underlying socket implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_datagram_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_datagram_socket from another.
- /**
- * This constructor moves a datagram socket from one object to another.
- *
- * @param other The other basic_datagram_socket 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_datagram_socket(io_context&) constructor.
- */
- basic_datagram_socket(basic_datagram_socket&& other)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_datagram_socket from another.
- /**
- * This assignment operator moves a datagram socket from one object to
- * another.
- *
- * @param other The other basic_datagram_socket 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_datagram_socket(io_context&) constructor.
- */
- basic_datagram_socket& operator=(basic_datagram_socket&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-
- /// Move-construct a basic_datagram_socket from a socket of another protocol
- /// type.
- /**
- * This constructor moves a datagram socket from one object to another.
- *
- * @param other The other basic_datagram_socket 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_datagram_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- basic_datagram_socket(
- basic_datagram_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_datagram_socket from a socket of another protocol
- /// type.
- /**
- * This assignment operator moves a datagram socket from one object to
- * another.
- *
- * @param other The other basic_datagram_socket 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_datagram_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_datagram_socket>::type& operator=(
- basic_datagram_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the socket.
- /**
- * This function destroys the socket, cancelling any outstanding asynchronous
- * operations associated with the socket as if by calling @c cancel.
- */
- ~basic_datagram_socket()
- {
- }
-
- /// Send some data on a connected socket.
- /**
- * This function is used to send data on the datagram socket. The function
- * call will block until the data has been sent successfully or an error
- * occurs.
- *
- * @param buffers One ore more data buffers to be sent on the socket.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The send operation can only be used with a connected socket. Use
- * the send_to function to send data on an unconnected datagram socket.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code socket.send(boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on a connected socket.
- /**
- * This function is used to send data on the datagram socket. The function
- * call will block until the data has been sent successfully or an error
- * occurs.
- *
- * @param buffers One ore more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The send operation can only be used with a connected socket. Use
- * the send_to function to send data on an unconnected datagram socket.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on a connected socket.
- /**
- * This function is used to send data on the datagram socket. The function
- * call will block until the data has been sent successfully or an error
- * occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes sent.
- *
- * @note The send operation can only be used with a connected socket. Use
- * the send_to function to send data on an unconnected datagram socket.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous send on a connected socket.
- /**
- * This function is used to asynchronously send data on the datagram socket.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 send 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 sent.
- * ); @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 The async_send operation can only be used with a connected socket.
- * Use the async_send_to function to send data on an unconnected datagram
- * socket.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_send(boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous send on a connected socket.
- /**
- * This function is used to asynchronously send data on the datagram socket.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 The async_send operation can only be used with a connected socket.
- * Use the async_send_to function to send data on an unconnected datagram
- * socket.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Send a datagram to the specified endpoint.
- /**
- * This function is used to send a datagram to the specified remote endpoint.
- * The function call will block until the data has been sent successfully or
- * an error occurs.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- *
- * @param destination The remote endpoint to which the data will be sent.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::ip::udp::endpoint destination(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * socket.send_to(boost::asio::buffer(data, size), destination);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, 0, ec);
- boost::asio::detail::throw_error(ec, "send_to");
- return s;
- }
-
- /// Send a datagram to the specified endpoint.
- /**
- * This function is used to send a datagram to the specified remote endpoint.
- * The function call will block until the data has been sent successfully or
- * an error occurs.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- *
- * @param destination The remote endpoint to which the data will be sent.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- template <typename ConstBufferSequence>
- std::size_t send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, flags, ec);
- boost::asio::detail::throw_error(ec, "send_to");
- return s;
- }
-
- /// Send a datagram to the specified endpoint.
- /**
- * This function is used to send a datagram to the specified remote endpoint.
- * The function call will block until the data has been sent successfully or
- * an error occurs.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- *
- * @param destination The remote endpoint to which the data will be sent.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes sent.
- */
- template <typename ConstBufferSequence>
- std::size_t send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- return this->get_service().send_to(this->get_implementation(),
- buffers, destination, flags, ec);
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send a datagram to the specified
- * remote endpoint. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- * 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 destination The remote endpoint to which the data will be sent.
- * Copies will be made of the endpoint as required.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 send a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::ip::udp::endpoint destination(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * socket.async_send_to(
- * boost::asio::buffer(data, size), destination, handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, 0,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send a datagram to the specified
- * remote endpoint. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- * 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 flags Flags specifying how the send call is to be made.
- *
- * @param destination The remote endpoint to which the data will be sent.
- * Copies will be made of the endpoint as required.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the datagram socket. The function
- * call will block until data has been received successfully or an error
- * occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The receive operation can only be used with a connected socket. Use
- * the receive_from function to receive data on an unconnected datagram
- * socket.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code socket.receive(boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the datagram socket. The function
- * call will block until data has been received successfully or an error
- * occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The receive operation can only be used with a connected socket. Use
- * the receive_from function to receive data on an unconnected datagram
- * socket.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the datagram socket. The function
- * call will block until data has been received successfully or an error
- * occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes received.
- *
- * @note The receive operation can only be used with a connected socket. Use
- * the receive_from function to receive data on an unconnected datagram
- * socket.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous receive on a connected socket.
- /**
- * This function is used to asynchronously receive data from the datagram
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 receive 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 received.
- * ); @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 The async_receive operation can only be used with a connected socket.
- * Use the async_receive_from function to receive data on an unconnected
- * datagram socket.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.async_receive(boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive on a connected socket.
- /**
- * This function is used to asynchronously receive data from the datagram
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 flags Flags specifying how the receive call is to be made.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 The async_receive operation can only be used with a connected socket.
- * Use the async_receive_from function to receive data on an unconnected
- * datagram socket.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Receive a datagram with the endpoint of the sender.
- /**
- * This function is used to receive a datagram. The function call will block
- * until data has been received successfully or an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the datagram.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * boost::asio::ip::udp::endpoint sender_endpoint;
- * socket.receive_from(
- * boost::asio::buffer(data, size), sender_endpoint);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0, ec);
- boost::asio::detail::throw_error(ec, "receive_from");
- return s;
- }
-
- /// Receive a datagram with the endpoint of the sender.
- /**
- * This function is used to receive a datagram. The function call will block
- * until data has been received successfully or an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the datagram.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- template <typename MutableBufferSequence>
- std::size_t receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags, ec);
- boost::asio::detail::throw_error(ec, "receive_from");
- return s;
- }
-
- /// Receive a datagram with the endpoint of the sender.
- /**
- * This function is used to receive a datagram. The function call will block
- * until data has been received successfully or an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the datagram.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes received.
- */
- template <typename MutableBufferSequence>
- std::size_t receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- return this->get_service().receive_from(this->get_implementation(),
- buffers, sender_endpoint, flags, ec);
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive a datagram. The function
- * call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the datagram. Ownership of the sender_endpoint object
- * is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code socket.async_receive_from(
- * boost::asio::buffer(data, size), sender_endpoint, handler); @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive a datagram. The function
- * call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the datagram. Ownership of the sender_endpoint object
- * is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BASIC_DATAGRAM_SOCKET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp
deleted file mode 100644
index 56a265bfbc7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp
+++ /dev/null
@@ -1,630 +0,0 @@
-//
-// basic_deadline_timer.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_BASIC_DEADLINE_TIMER_HPP
-#define BOOST_ASIO_BASIC_DEADLINE_TIMER_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_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/time_traits.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/deadline_timer_service.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/detail/deadline_timer_service.hpp>
-# define BOOST_ASIO_SVC_T detail::deadline_timer_service<TimeTraits>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides waitable timer functionality.
-/**
- * The basic_deadline_timer class template provides the ability to perform a
- * blocking or asynchronous wait for a timer to expire.
- *
- * A deadline timer is always in one of two states: "expired" or "not expired".
- * If the wait() or async_wait() function is called on an expired timer, the
- * wait operation will complete immediately.
- *
- * Most applications will use the boost::asio::deadline_timer typedef.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Examples
- * Performing a blocking wait:
- * @code
- * // Construct a timer without setting an expiry time.
- * boost::asio::deadline_timer timer(io_context);
- *
- * // Set an expiry time relative to now.
- * timer.expires_from_now(boost::posix_time::seconds(5));
- *
- * // Wait for the timer to expire.
- * timer.wait();
- * @endcode
- *
- * @par
- * Performing an asynchronous wait:
- * @code
- * void handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Timer expired.
- * }
- * }
- *
- * ...
- *
- * // Construct a timer with an absolute expiry time.
- * boost::asio::deadline_timer timer(io_context,
- * boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
- *
- * // Start an asynchronous wait.
- * timer.async_wait(handler);
- * @endcode
- *
- * @par Changing an active deadline_timer's expiry time
- *
- * Changing the expiry time of a timer while there are pending asynchronous
- * waits causes those wait operations to be cancelled. To ensure that the action
- * associated with the timer is performed only once, use something like this:
- * used:
- *
- * @code
- * void on_some_event()
- * {
- * if (my_timer.expires_from_now(seconds(5)) > 0)
- * {
- * // We managed to cancel the timer. Start new asynchronous wait.
- * my_timer.async_wait(on_timeout);
- * }
- * else
- * {
- * // Too late, timer has already expired!
- * }
- * }
- *
- * void on_timeout(const boost::system::error_code& e)
- * {
- * if (e != boost::asio::error::operation_aborted)
- * {
- * // Timer was not cancelled, take necessary action.
- * }
- * }
- * @endcode
- *
- * @li The boost::asio::basic_deadline_timer::expires_from_now() function
- * cancels any pending asynchronous waits, and returns the number of
- * asynchronous waits that were cancelled. If it returns 0 then you were too
- * late and the wait handler has already been executed, or will soon be
- * executed. If it returns 1 then the wait handler was successfully cancelled.
- *
- * @li If a wait handler is cancelled, the boost::system::error_code passed to
- * it contains the value boost::asio::error::operation_aborted.
- */
-template <typename Time,
- typename TimeTraits = boost::asio::time_traits<Time>
- BOOST_ASIO_SVC_TPARAM_DEF2(= deadline_timer_service<Time, TimeTraits>)>
-class basic_deadline_timer
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The time traits type.
- typedef TimeTraits traits_type;
-
- /// The time type.
- typedef typename traits_type::time_type time_type;
-
- /// The duration type.
- typedef typename traits_type::duration_type duration_type;
-
- /// Constructor.
- /**
- * This constructor creates a timer without setting an expiry time. The
- * expires_at() or expires_from_now() functions must be called to set an
- * expiry time before the timer can be waited on.
- *
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
- */
- explicit basic_deadline_timer(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Constructor to set a particular expiry time as an absolute time.
- /**
- * This constructor creates a timer and sets the expiry time.
- *
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
- *
- * @param expiry_time The expiry time to be used for the timer, expressed
- * as an absolute time.
- */
- basic_deadline_timer(boost::asio::io_context& io_context,
- const time_type& expiry_time)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().expires_at(this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_at");
- }
-
- /// Constructor to set a particular expiry time relative to now.
- /**
- * This constructor creates a timer and sets the expiry time.
- *
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
- *
- * @param expiry_time The expiry time to be used for the timer, relative to
- * now.
- */
- basic_deadline_timer(boost::asio::io_context& io_context,
- const duration_type& expiry_time)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_from_now");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_deadline_timer from another.
- /**
- * This constructor moves a timer from one object to another.
- *
- * @param other The other basic_deadline_timer 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_deadline_timer(io_context&) constructor.
- */
- basic_deadline_timer(basic_deadline_timer&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a basic_deadline_timer from another.
- /**
- * This assignment operator moves a timer from one object to another. Cancels
- * any outstanding asynchronous operations associated with the target object.
- *
- * @param other The other basic_deadline_timer 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_deadline_timer(io_context&) constructor.
- */
- basic_deadline_timer& operator=(basic_deadline_timer&& 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 timer.
- /**
- * This function destroys the timer, cancelling any outstanding asynchronous
- * wait operations associated with the timer as if by calling @c cancel.
- */
- ~basic_deadline_timer()
- {
- }
-
-#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 timer.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the timer. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel()
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- return s;
- }
-
- /// Cancel any asynchronous operations that are waiting on the timer.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the timer. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @note If the timer has already expired when cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel(boost::system::error_code& ec)
- {
- return this->get_service().cancel(this->get_implementation(), ec);
- }
-
- /// Cancels one asynchronous operation that is waiting on the timer.
- /**
- * This function forces the completion of one pending asynchronous wait
- * operation against the timer. Handlers are cancelled in FIFO order. The
- * handler for the cancelled operation will be invoked with the
- * boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @return The number of asynchronous operations that were cancelled. That is,
- * either 0 or 1.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when cancel_one() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel_one()
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().cancel_one(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel_one");
- return s;
- }
-
- /// Cancels one asynchronous operation that is waiting on the timer.
- /**
- * This function forces the completion of one pending asynchronous wait
- * operation against the timer. Handlers are cancelled in FIFO order. The
- * handler for the cancelled operation will be invoked with the
- * boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled. That is,
- * either 0 or 1.
- *
- * @note If the timer has already expired when cancel_one() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel_one(boost::system::error_code& ec)
- {
- return this->get_service().cancel_one(this->get_implementation(), ec);
- }
-
- /// Get the timer's expiry time as an absolute time.
- /**
- * This function may be used to obtain the timer's current expiry time.
- * Whether the timer has expired or not does not affect this value.
- */
- time_type expires_at() const
- {
- return this->get_service().expires_at(this->get_implementation());
- }
-
- /// Set the timer's expiry time as an absolute time.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when expires_at() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_at(const time_type& expiry_time)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_at");
- return s;
- }
-
- /// Set the timer's expiry time as an absolute time.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @note If the timer has already expired when expires_at() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_at(const time_type& expiry_time,
- boost::system::error_code& ec)
- {
- return this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
- }
-
- /// Get the timer's expiry time relative to now.
- /**
- * This function may be used to obtain the timer's current expiry time.
- * Whether the timer has expired or not does not affect this value.
- */
- duration_type expires_from_now() const
- {
- return this->get_service().expires_from_now(this->get_implementation());
- }
-
- /// Set the timer's expiry time relative to now.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when expires_from_now() is called,
- * then the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_from_now(const duration_type& expiry_time)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_from_now");
- return s;
- }
-
- /// Set the timer's expiry time relative to now.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @note If the timer has already expired when expires_from_now() is called,
- * then the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_from_now(const duration_type& expiry_time,
- boost::system::error_code& ec)
- {
- return this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
- }
-
- /// Perform a blocking wait on the timer.
- /**
- * This function is used to wait for the timer to expire. This function
- * blocks and does not return until the timer has expired.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void wait()
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Perform a blocking wait on the timer.
- /**
- * This function is used to wait for the timer to expire. This function
- * blocks and does not return until the timer has expired.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- void wait(boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), ec);
- }
-
- /// Start an asynchronous wait on the timer.
- /**
- * This function may be used to initiate an asynchronous wait against the
- * timer. It always returns immediately.
- *
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
- *
- * @li The timer has expired.
- *
- * @li The timer was cancelled, in which case the handler is passed the error
- * code boost::asio::error::operation_aborted.
- *
- * @param handler The handler to be called when the timer expires. 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.
- * ); @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 WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-};
-
-} // 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 // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_BASIC_DEADLINE_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp
deleted file mode 100644
index c0c2c714eb3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp
+++ /dev/null
@@ -1,292 +0,0 @@
-//
-// basic_io_object.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_BASIC_IO_OBJECT_HPP
-#define BOOST_ASIO_BASIC_IO_OBJECT_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/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-namespace detail
-{
- // Type trait used to determine whether a service supports move.
- template <typename IoObjectService>
- class service_has_move
- {
- private:
- typedef IoObjectService service_type;
- typedef typename service_type::implementation_type implementation_type;
-
- template <typename T, typename U>
- static auto asio_service_has_move_eval(T* t, U* u)
- -> decltype(t->move_construct(*u, *u), char());
- static char (&asio_service_has_move_eval(...))[2];
-
- public:
- static const bool value =
- sizeof(asio_service_has_move_eval(
- static_cast<service_type*>(0),
- static_cast<implementation_type*>(0))) == 1;
- };
-}
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-/// Base class for all I/O objects.
-/**
- * @note All I/O objects are non-copyable. However, when using C++0x, certain
- * I/O objects do support move construction and move assignment.
- */
-#if !defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-template <typename IoObjectService>
-#else
-template <typename IoObjectService,
- bool Movable = detail::service_has_move<IoObjectService>::value>
-#endif
-class basic_io_object
-{
-public:
- /// The type of the service that will be used to provide I/O operations.
- typedef IoObjectService service_type;
-
- /// The underlying implementation type of I/O object.
- typedef typename service_type::implementation_type implementation_type;
-
-#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 service_.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 service_.get_io_context();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// The type of the executor associated with the object.
- typedef boost::asio::io_context::executor_type executor_type;
-
- /// Get the executor associated with the object.
- executor_type get_executor() BOOST_ASIO_NOEXCEPT
- {
- return service_.get_io_context().get_executor();
- }
-
-protected:
- /// Construct a basic_io_object.
- /**
- * Performs:
- * @code get_service().construct(get_implementation()); @endcode
- */
- explicit basic_io_object(boost::asio::io_context& io_context)
- : service_(boost::asio::use_service<IoObjectService>(io_context))
- {
- service_.construct(implementation_);
- }
-
-#if defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_io_object.
- /**
- * Performs:
- * @code get_service().move_construct(
- * get_implementation(), other.get_implementation()); @endcode
- *
- * @note Available only for services that support movability,
- */
- basic_io_object(basic_io_object&& other);
-
- /// Move-assign a basic_io_object.
- /**
- * Performs:
- * @code get_service().move_assign(get_implementation(),
- * other.get_service(), other.get_implementation()); @endcode
- *
- * @note Available only for services that support movability,
- */
- basic_io_object& operator=(basic_io_object&& other);
-
- /// Perform a converting move-construction of a basic_io_object.
- template <typename IoObjectService1>
- basic_io_object(IoObjectService1& other_service,
- typename IoObjectService1::implementation_type& other_implementation);
-#endif // defined(GENERATING_DOCUMENTATION)
-
- /// Protected destructor to prevent deletion through this type.
- /**
- * Performs:
- * @code get_service().destroy(get_implementation()); @endcode
- */
- ~basic_io_object()
- {
- service_.destroy(implementation_);
- }
-
- /// Get the service associated with the I/O object.
- service_type& get_service()
- {
- return service_;
- }
-
- /// Get the service associated with the I/O object.
- const service_type& get_service() const
- {
- return service_;
- }
-
- /// Get the underlying implementation of the I/O object.
- implementation_type& get_implementation()
- {
- return implementation_;
- }
-
- /// Get the underlying implementation of the I/O object.
- const implementation_type& get_implementation() const
- {
- return implementation_;
- }
-
-private:
- basic_io_object(const basic_io_object&);
- basic_io_object& operator=(const basic_io_object&);
-
- // The service associated with the I/O object.
- service_type& service_;
-
- /// The underlying implementation of the I/O object.
- implementation_type implementation_;
-};
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-// Specialisation for movable objects.
-template <typename IoObjectService>
-class basic_io_object<IoObjectService, true>
-{
-public:
- typedef IoObjectService service_type;
- typedef typename service_type::implementation_type implementation_type;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- boost::asio::io_context& get_io_context()
- {
- return service_->get_io_context();
- }
-
- boost::asio::io_context& get_io_service()
- {
- return service_->get_io_context();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- typedef boost::asio::io_context::executor_type executor_type;
-
- executor_type get_executor() BOOST_ASIO_NOEXCEPT
- {
- return service_->get_io_context().get_executor();
- }
-
-protected:
- explicit basic_io_object(boost::asio::io_context& io_context)
- : service_(&boost::asio::use_service<IoObjectService>(io_context))
- {
- service_->construct(implementation_);
- }
-
- basic_io_object(basic_io_object&& other)
- : service_(&other.get_service())
- {
- service_->move_construct(implementation_, other.implementation_);
- }
-
- template <typename IoObjectService1>
- basic_io_object(IoObjectService1& other_service,
- typename IoObjectService1::implementation_type& other_implementation)
- : service_(&boost::asio::use_service<IoObjectService>(
- other_service.get_io_context()))
- {
- service_->converting_move_construct(implementation_,
- other_service, other_implementation);
- }
-
- ~basic_io_object()
- {
- service_->destroy(implementation_);
- }
-
- basic_io_object& operator=(basic_io_object&& other)
- {
- service_->move_assign(implementation_,
- *other.service_, other.implementation_);
- service_ = other.service_;
- return *this;
- }
-
- service_type& get_service()
- {
- return *service_;
- }
-
- const service_type& get_service() const
- {
- return *service_;
- }
-
- implementation_type& get_implementation()
- {
- return implementation_;
- }
-
- const implementation_type& get_implementation() const
- {
- return implementation_;
- }
-
-private:
- basic_io_object(const basic_io_object&);
- void operator=(const basic_io_object&);
-
- IoObjectService* service_;
- implementation_type implementation_;
-};
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BASIC_IO_OBJECT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp
deleted file mode 100644
index b24d0796597..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp
+++ /dev/null
@@ -1,1032 +0,0 @@
-//
-// basic_raw_socket.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_BASIC_RAW_SOCKET_HPP
-#define BOOST_ASIO_BASIC_RAW_SOCKET_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/basic_socket.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/raw_socket_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides raw-oriented socket functionality.
-/**
- * The basic_raw_socket class template provides asynchronous and blocking
- * raw-oriented socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= raw_socket_service<Protocol>)>
-class basic_raw_socket
- : public basic_socket<Protocol BOOST_ASIO_SVC_TARG>
-{
-public:
- /// The native representation of a socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename basic_socket<
- Protocol BOOST_ASIO_SVC_TARG>::native_handle_type native_handle_type;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// Construct a basic_raw_socket without opening it.
- /**
- * This constructor creates a raw socket without opening it. The open()
- * function must be called before data can be sent or received on the socket.
- *
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- */
- explicit basic_raw_socket(boost::asio::io_context& io_context)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context)
- {
- }
-
- /// Construct and open a basic_raw_socket.
- /**
- * This constructor creates and opens a raw socket.
- *
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_raw_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, protocol)
- {
- }
-
- /// Construct a basic_raw_socket, opening it and binding it to the given
- /// local endpoint.
- /**
- * This constructor creates a raw socket and automatically opens it bound
- * to the specified endpoint on the local machine. The protocol used is the
- * protocol associated with the given endpoint.
- *
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- *
- * @param endpoint An endpoint on the local machine to which the raw
- * socket will be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_raw_socket(boost::asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, endpoint)
- {
- }
-
- /// Construct a basic_raw_socket on an existing native socket.
- /**
- * This constructor creates a raw socket object to hold an existing
- * native socket.
- *
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @param native_socket The new underlying socket implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_raw_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_raw_socket from another.
- /**
- * This constructor moves a raw socket from one object to another.
- *
- * @param other The other basic_raw_socket 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_raw_socket(io_context&) constructor.
- */
- basic_raw_socket(basic_raw_socket&& other)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_raw_socket from another.
- /**
- * This assignment operator moves a raw socket from one object to another.
- *
- * @param other The other basic_raw_socket 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_raw_socket(io_context&) constructor.
- */
- basic_raw_socket& operator=(basic_raw_socket&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-
- /// Move-construct a basic_raw_socket from a socket of another protocol type.
- /**
- * This constructor moves a raw socket from one object to another.
- *
- * @param other The other basic_raw_socket 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_raw_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- basic_raw_socket(basic_raw_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_raw_socket from a socket of another protocol type.
- /**
- * This assignment operator moves a raw socket from one object to another.
- *
- * @param other The other basic_raw_socket 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_raw_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_raw_socket>::type& operator=(
- basic_raw_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the socket.
- /**
- * This function destroys the socket, cancelling any outstanding asynchronous
- * operations associated with the socket as if by calling @c cancel.
- */
- ~basic_raw_socket()
- {
- }
-
- /// Send some data on a connected socket.
- /**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
- *
- * @param buffers One ore more data buffers to be sent on the socket.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The send operation can only be used with a connected socket. Use
- * the send_to function to send data on an unconnected raw socket.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code socket.send(boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on a connected socket.
- /**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
- *
- * @param buffers One ore more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The send operation can only be used with a connected socket. Use
- * the send_to function to send data on an unconnected raw socket.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on a connected socket.
- /**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes sent.
- *
- * @note The send operation can only be used with a connected socket. Use
- * the send_to function to send data on an unconnected raw socket.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous send on a connected socket.
- /**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 send 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 sent.
- * ); @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 The async_send operation can only be used with a connected socket.
- * Use the async_send_to function to send data on an unconnected raw
- * socket.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_send(boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous send on a connected socket.
- /**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 The async_send operation can only be used with a connected socket.
- * Use the async_send_to function to send data on an unconnected raw
- * socket.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Send raw data to the specified endpoint.
- /**
- * This function is used to send raw data to the specified remote endpoint.
- * The function call will block until the data has been sent successfully or
- * an error occurs.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- *
- * @param destination The remote endpoint to which the data will be sent.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::ip::udp::endpoint destination(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * socket.send_to(boost::asio::buffer(data, size), destination);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, 0, ec);
- boost::asio::detail::throw_error(ec, "send_to");
- return s;
- }
-
- /// Send raw data to the specified endpoint.
- /**
- * This function is used to send raw data to the specified remote endpoint.
- * The function call will block until the data has been sent successfully or
- * an error occurs.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- *
- * @param destination The remote endpoint to which the data will be sent.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- template <typename ConstBufferSequence>
- std::size_t send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, flags, ec);
- boost::asio::detail::throw_error(ec, "send_to");
- return s;
- }
-
- /// Send raw data to the specified endpoint.
- /**
- * This function is used to send raw data to the specified remote endpoint.
- * The function call will block until the data has been sent successfully or
- * an error occurs.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- *
- * @param destination The remote endpoint to which the data will be sent.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes sent.
- */
- template <typename ConstBufferSequence>
- std::size_t send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- return this->get_service().send_to(this->get_implementation(),
- buffers, destination, flags, ec);
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send raw data to the specified
- * remote endpoint. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- * 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 destination The remote endpoint to which the data will be sent.
- * Copies will be made of the endpoint as required.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 send a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::ip::udp::endpoint destination(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * socket.async_send_to(
- * boost::asio::buffer(data, size), destination, handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(this->get_implementation(),
- buffers, destination, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(this->get_implementation(),
- buffers, destination, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send raw data to the specified
- * remote endpoint. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent to the remote endpoint.
- * 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 flags Flags specifying how the send call is to be made.
- *
- * @param destination The remote endpoint to which the data will be sent.
- * Copies will be made of the endpoint as required.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the raw socket. The function
- * call will block until data has been received successfully or an error
- * occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The receive operation can only be used with a connected socket. Use
- * the receive_from function to receive data on an unconnected raw
- * socket.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code socket.receive(boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the raw socket. The function
- * call will block until data has been received successfully or an error
- * occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The receive operation can only be used with a connected socket. Use
- * the receive_from function to receive data on an unconnected raw
- * socket.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the raw socket. The function
- * call will block until data has been received successfully or an error
- * occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes received.
- *
- * @note The receive operation can only be used with a connected socket. Use
- * the receive_from function to receive data on an unconnected raw
- * socket.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous receive on a connected socket.
- /**
- * This function is used to asynchronously receive data from the raw
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 receive 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 received.
- * ); @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 The async_receive operation can only be used with a connected socket.
- * Use the async_receive_from function to receive data on an unconnected
- * raw socket.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.async_receive(boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive on a connected socket.
- /**
- * This function is used to asynchronously receive data from the raw
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 flags Flags specifying how the receive call is to be made.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 The async_receive operation can only be used with a connected socket.
- * Use the async_receive_from function to receive data on an unconnected
- * raw socket.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Receive raw data with the endpoint of the sender.
- /**
- * This function is used to receive raw data. The function call will block
- * until data has been received successfully or an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the data.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * boost::asio::ip::udp::endpoint sender_endpoint;
- * socket.receive_from(
- * boost::asio::buffer(data, size), sender_endpoint);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0, ec);
- boost::asio::detail::throw_error(ec, "receive_from");
- return s;
- }
-
- /// Receive raw data with the endpoint of the sender.
- /**
- * This function is used to receive raw data. The function call will block
- * until data has been received successfully or an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the data.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- template <typename MutableBufferSequence>
- std::size_t receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags, ec);
- boost::asio::detail::throw_error(ec, "receive_from");
- return s;
- }
-
- /// Receive raw data with the endpoint of the sender.
- /**
- * This function is used to receive raw data. The function call will block
- * until data has been received successfully or an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the data.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes received.
- */
- template <typename MutableBufferSequence>
- std::size_t receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- return this->get_service().receive_from(this->get_implementation(),
- buffers, sender_endpoint, flags, ec);
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive raw data. The function
- * call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the data. Ownership of the sender_endpoint object
- * is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code socket.async_receive_from(
- * boost::asio::buffer(data, size), 0, sender_endpoint, handler); @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive raw data. The function
- * call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 sender_endpoint An endpoint object that receives the endpoint of
- * the remote sender of the data. Ownership of the sender_endpoint object
- * is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BASIC_RAW_SOCKET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp
deleted file mode 100644
index cc98656df34..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp
+++ /dev/null
@@ -1,620 +0,0 @@
-//
-// basic_seq_packet_socket.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_BASIC_SEQ_PACKET_SOCKET_HPP
-#define BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_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/basic_socket.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/seq_packet_socket_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides sequenced packet socket functionality.
-/**
- * The basic_seq_packet_socket class template provides asynchronous and blocking
- * sequenced packet socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= seq_packet_socket_service<Protocol>)>
-class basic_seq_packet_socket
- : public basic_socket<Protocol BOOST_ASIO_SVC_TARG>
-{
-public:
- /// The native representation of a socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename basic_socket<
- Protocol BOOST_ASIO_SVC_TARG>::native_handle_type native_handle_type;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// Construct a basic_seq_packet_socket without opening it.
- /**
- * This constructor creates a sequenced packet socket without opening it. The
- * socket needs to be opened and then connected or accepted before data can
- * be sent or received on it.
- *
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
- */
- explicit basic_seq_packet_socket(boost::asio::io_context& io_context)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context)
- {
- }
-
- /// Construct and open a basic_seq_packet_socket.
- /**
- * This constructor creates and opens a sequenced_packet socket. The socket
- * needs to be connected or accepted before data can be sent or received on
- * it.
- *
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_seq_packet_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, protocol)
- {
- }
-
- /// Construct a basic_seq_packet_socket, opening it and binding it to the
- /// given local endpoint.
- /**
- * This constructor creates a sequenced packet socket and automatically opens
- * it bound to the specified endpoint on the local machine. The protocol used
- * is the protocol associated with the given endpoint.
- *
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
- *
- * @param endpoint An endpoint on the local machine to which the sequenced
- * packet socket will be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_seq_packet_socket(boost::asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, endpoint)
- {
- }
-
- /// Construct a basic_seq_packet_socket on an existing native socket.
- /**
- * This constructor creates a sequenced packet socket object to hold an
- * existing native socket.
- *
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @param native_socket The new underlying socket implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_seq_packet_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_seq_packet_socket from another.
- /**
- * This constructor moves a sequenced packet socket from one object to
- * another.
- *
- * @param other The other basic_seq_packet_socket 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_seq_packet_socket(io_context&) constructor.
- */
- basic_seq_packet_socket(basic_seq_packet_socket&& other)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_seq_packet_socket from another.
- /**
- * This assignment operator moves a sequenced packet socket from one object to
- * another.
- *
- * @param other The other basic_seq_packet_socket 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_seq_packet_socket(io_context&) constructor.
- */
- basic_seq_packet_socket& operator=(basic_seq_packet_socket&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-
- /// Move-construct a basic_seq_packet_socket from a socket of another protocol
- /// type.
- /**
- * This constructor moves a sequenced packet socket from one object to
- * another.
- *
- * @param other The other basic_seq_packet_socket 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_seq_packet_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- basic_seq_packet_socket(
- basic_seq_packet_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_seq_packet_socket from a socket of another protocol
- /// type.
- /**
- * This assignment operator moves a sequenced packet socket from one object to
- * another.
- *
- * @param other The other basic_seq_packet_socket 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_seq_packet_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_seq_packet_socket>::type& operator=(
- basic_seq_packet_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the socket.
- /**
- * This function destroys the socket, cancelling any outstanding asynchronous
- * operations associated with the socket as if by calling @c cancel.
- */
- ~basic_seq_packet_socket()
- {
- }
-
- /// Send some data on the socket.
- /**
- * This function is used to send data on the sequenced packet socket. The
- * function call will block until the data has been sent successfully, or an
- * until error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.send(boost::asio::buffer(data, size), 0);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on the socket.
- /**
- * This function is used to send data on the sequenced packet socket. The
- * function call will block the data has been sent successfully, or an until
- * error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes sent. Returns 0 if an error occurred.
- *
- * @note The send 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 send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send data on the sequenced packet
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_send(boost::asio::buffer(data, size), 0, handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, flags, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Receive some data on the socket.
- /**
- * This function is used to receive data on the sequenced packet socket. The
- * function call will block until data has been received successfully, or
- * until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param out_flags After the receive call completes, contains flags
- * associated with the received data. For example, if the
- * socket_base::message_end_of_record bit is set then the received data marks
- * the end of a record.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.receive(boost::asio::buffer(data, size), out_flags);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags& out_flags)
- {
- boost::system::error_code ec;
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, out_flags, ec);
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive_with_flags(
- this->get_implementation(), buffers, 0, out_flags, ec);
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on the socket.
- /**
- * This function is used to receive data on the sequenced packet socket. The
- * function call will block until data has been received successfully, or
- * until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param in_flags Flags specifying how the receive call is to be made.
- *
- * @param out_flags After the receive call completes, contains flags
- * associated with the received data. For example, if the
- * socket_base::message_end_of_record bit is set then the received data marks
- * the end of a record.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The receive operation may not receive 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.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.receive(boost::asio::buffer(data, size), 0, out_flags);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags)
- {
- boost::system::error_code ec;
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, in_flags, out_flags, ec);
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive_with_flags(
- this->get_implementation(), buffers, in_flags, out_flags, ec);
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the sequenced packet socket. The
- * function call will block until data has been received successfully, or
- * until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param in_flags Flags specifying how the receive call is to be made.
- *
- * @param out_flags After the receive call completes, contains flags
- * associated with the received data. For example, if the
- * socket_base::message_end_of_record bit is set then the received data marks
- * the end of a record.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes received. Returns 0 if an error occurred.
- *
- * @note The receive operation may not receive 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 receive(const MutableBufferSequence& buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, boost::system::error_code& ec)
- {
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().receive(this->get_implementation(),
- buffers, in_flags, out_flags, ec);
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().receive_with_flags(this->get_implementation(),
- buffers, in_flags, out_flags, ec);
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive data from the sequenced
- * packet socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 out_flags Once the asynchronous operation completes, contains flags
- * associated with the received data. For example, if the
- * socket_base::message_end_of_record bit is set then the received data marks
- * the end of a record. The caller must guarantee that the referenced
- * variable remains valid until the handler is called.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.async_receive(boost::asio::buffer(data, size), out_flags, handler);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags& out_flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(
- this->get_implementation(), buffers, 0, out_flags,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_with_flags(
- this->get_implementation(), buffers, 0, out_flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive data from the sequenced
- * data socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 in_flags Flags specifying how the receive call is to be made.
- *
- * @param out_flags Once the asynchronous operation completes, contains flags
- * associated with the received data. For example, if the
- * socket_base::message_end_of_record bit is set then the received data marks
- * the end of a record. The caller must guarantee that the referenced
- * variable remains valid until the handler is called.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.async_receive(
- * boost::asio::buffer(data, size),
- * 0, out_flags, handler);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(
- this->get_implementation(), buffers, in_flags, out_flags,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_with_flags(
- this->get_implementation(), buffers, in_flags, out_flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp
deleted file mode 100644
index 2f6c8cf8878..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp
+++ /dev/null
@@ -1,690 +0,0 @@
-//
-// basic_serial_port.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_BASIC_SERIAL_PORT_HPP
-#define BOOST_ASIO_BASIC_SERIAL_PORT_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <string>
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/serial_port_base.hpp>
-#include <boost/asio/serial_port_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides serial port functionality.
-/**
- * The basic_serial_port class template provides functionality that is common
- * to all serial ports.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename SerialPortService = serial_port_service>
-class basic_serial_port
- : public basic_io_object<SerialPortService>,
- public serial_port_base
-{
-public:
- /// The native representation of a serial port.
- typedef typename SerialPortService::native_handle_type native_handle_type;
-
- /// A basic_serial_port is always the lowest layer.
- typedef basic_serial_port<SerialPortService> lowest_layer_type;
-
- /// Construct a basic_serial_port without opening it.
- /**
- * This constructor creates a serial port without opening it.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- */
- explicit basic_serial_port(boost::asio::io_context& io_context)
- : basic_io_object<SerialPortService>(io_context)
- {
- }
-
- /// Construct and open a basic_serial_port.
- /**
- * This constructor creates and opens a serial port for the specified device
- * name.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param device The platform-specific device name for this serial
- * port.
- */
- explicit basic_serial_port(boost::asio::io_context& io_context,
- const char* device)
- : basic_io_object<SerialPortService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Construct and open a basic_serial_port.
- /**
- * This constructor creates and opens a serial port for the specified device
- * name.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param device The platform-specific device name for this serial
- * port.
- */
- explicit basic_serial_port(boost::asio::io_context& io_context,
- const std::string& device)
- : basic_io_object<SerialPortService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Construct a basic_serial_port on an existing native serial port.
- /**
- * This constructor creates a serial port object to hold an existing native
- * serial port.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param native_serial_port A native serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_serial_port(boost::asio::io_context& io_context,
- const native_handle_type& native_serial_port)
- : basic_io_object<SerialPortService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_serial_port from another.
- /**
- * This constructor moves a serial port from one object to another.
- *
- * @param other The other basic_serial_port 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_serial_port(io_context&) constructor.
- */
- basic_serial_port(basic_serial_port&& other)
- : basic_io_object<SerialPortService>(
- BOOST_ASIO_MOVE_CAST(basic_serial_port)(other))
- {
- }
-
- /// Move-assign a basic_serial_port from another.
- /**
- * This assignment operator moves a serial port from one object to another.
- *
- * @param other The other basic_serial_port 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_serial_port(io_context&) constructor.
- */
- basic_serial_port& operator=(basic_serial_port&& other)
- {
- basic_io_object<SerialPortService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_serial_port)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a basic_serial_port cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a basic_serial_port cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Open the serial port using the specified device name.
- /**
- * This function opens the serial port for the specified device name.
- *
- * @param device The platform-specific device name.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void open(const std::string& device)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Open the serial port using the specified device name.
- /**
- * This function opens the serial port using the given platform-specific
- * device name.
- *
- * @param device The platform-specific device name.
- *
- * @param ec Set the indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID open(const std::string& device,
- boost::system::error_code& ec)
- {
- this->get_service().open(this->get_implementation(), device, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native serial port to the serial port.
- /*
- * This function opens the serial port to hold an existing native serial port.
- *
- * @param native_serial_port A native serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& native_serial_port)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native serial port to the serial port.
- /*
- * This function opens the serial port to hold an existing native serial port.
- *
- * @param native_serial_port A native serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
- boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the serial port is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the serial port.
- /**
- * This function is used to close the serial port. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the serial port.
- /**
- * This function is used to close the serial port. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native serial port representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * serial port. This is intended to allow access to native serial port
- * functionality that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the serial port.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the serial port.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Send a break sequence to the serial port.
- /**
- * This function causes a break sequence of platform-specific duration to be
- * sent out the serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void send_break()
- {
- boost::system::error_code ec;
- this->get_service().send_break(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "send_break");
- }
-
- /// Send a break sequence to the serial port.
- /**
- * This function causes a break sequence of platform-specific duration to be
- * sent out the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID send_break(boost::system::error_code& ec)
- {
- this->get_service().send_break(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set an option on the serial port.
- /**
- * This function is used to set an option on the serial port.
- *
- * @param option The option value to be set on the serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa SettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename SettableSerialPortOption>
- void set_option(const SettableSerialPortOption& option)
- {
- boost::system::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "set_option");
- }
-
- /// Set an option on the serial port.
- /**
- * This function is used to set an option on the serial port.
- *
- * @param option The option value to be set on the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa SettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename SettableSerialPortOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
- boost::system::error_code& ec)
- {
- this->get_service().set_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get an option from the serial port.
- /**
- * This function is used to get the current value of an option on the serial
- * port.
- *
- * @param option The option value to be obtained from the serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa GettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename GettableSerialPortOption>
- void get_option(GettableSerialPortOption& option)
- {
- boost::system::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "get_option");
- }
-
- /// Get an option from the serial port.
- /**
- * This function is used to get the current value of an option on the serial
- * port.
- *
- * @param option The option value to be obtained from the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa GettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename GettableSerialPortOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
- boost::system::error_code& ec)
- {
- this->get_service().get_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write some data to the serial port.
- /**
- * This function is used to write data to the serial port. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the serial port.
- /**
- * This function is used to write data to the serial port. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- *
- * @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 this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the serial port.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.async_write_some(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 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;
-
- return this->get_service().async_write_some(this->get_implementation(),
- buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Read some data from the serial port.
- /**
- * This function is used to read data from the serial port. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the serial port.
- /**
- * This function is used to read data from the serial port. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the serial port.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.async_read_some(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.
- */
- 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;
-
- return this->get_service().async_read_some(this->get_implementation(),
- buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_BASIC_SERIAL_PORT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp
deleted file mode 100644
index 8ca5dfa1d9e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp
+++ /dev/null
@@ -1,393 +0,0 @@
-//
-// basic_signal_set.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_BASIC_SIGNAL_SET_HPP
-#define BOOST_ASIO_BASIC_SIGNAL_SET_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_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/signal_set_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides signal functionality.
-/**
- * The basic_signal_set class template provides the ability to perform an
- * asynchronous wait for one or more signals to occur.
- *
- * Most applications will use the boost::asio::signal_set typedef.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Example
- * Performing an asynchronous wait:
- * @code
- * void handler(
- * const boost::system::error_code& error,
- * int signal_number)
- * {
- * if (!error)
- * {
- * // A signal occurred.
- * }
- * }
- *
- * ...
- *
- * // Construct a signal set registered for process termination.
- * boost::asio::signal_set signals(io_context, SIGINT, SIGTERM);
- *
- * // Start an asynchronous wait for one of the signals to occur.
- * signals.async_wait(handler);
- * @endcode
- *
- * @par Queueing of signal notifications
- *
- * If a signal is registered with a signal_set, and the signal occurs when
- * there are no waiting handlers, then the signal notification is queued. The
- * next async_wait operation on that signal_set will dequeue the notification.
- * If multiple notifications are queued, subsequent async_wait operations
- * dequeue them one at a time. Signal notifications are dequeued in order of
- * ascending signal number.
- *
- * If a signal number is removed from a signal_set (using the @c remove or @c
- * erase member functions) then any queued notifications for that signal are
- * discarded.
- *
- * @par Multiple registration of signals
- *
- * The same signal number may be registered with different signal_set objects.
- * When the signal occurs, one handler is called for each signal_set object.
- *
- * Note that multiple registration only works for signals that are registered
- * using Asio. The application must not also register a signal handler using
- * functions such as @c signal() or @c sigaction().
- *
- * @par Signal masking on POSIX platforms
- *
- * POSIX allows signals to be blocked using functions such as @c sigprocmask()
- * and @c pthread_sigmask(). For signals to be delivered, programs must ensure
- * that any signals registered using signal_set objects are unblocked in at
- * least one thread.
- */
-template <typename SignalSetService = signal_set_service>
-class basic_signal_set
- : public basic_io_object<SignalSetService>
-{
-public:
- /// Construct a signal set without adding any signals.
- /**
- * This constructor creates a signal set without registering for any signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- */
- explicit basic_signal_set(boost::asio::io_context& io_context)
- : basic_io_object<SignalSetService>(io_context)
- {
- }
-
- /// Construct a signal set and add one signal.
- /**
- * This constructor creates a signal set and registers for one signal.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code boost::asio::signal_set signals(io_context);
- * signals.add(signal_number_1); @endcode
- */
- basic_signal_set(boost::asio::io_context& io_context, int signal_number_1)
- : basic_io_object<SignalSetService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Construct a signal set and add two signals.
- /**
- * This constructor creates a signal set and registers for two signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The first signal number to be added.
- *
- * @param signal_number_2 The second signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code boost::asio::signal_set signals(io_context);
- * signals.add(signal_number_1);
- * signals.add(signal_number_2); @endcode
- */
- basic_signal_set(boost::asio::io_context& io_context, int signal_number_1,
- int signal_number_2)
- : basic_io_object<SignalSetService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- boost::asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Construct a signal set and add three signals.
- /**
- * This constructor creates a signal set and registers for three signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The first signal number to be added.
- *
- * @param signal_number_2 The second signal number to be added.
- *
- * @param signal_number_3 The third signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code boost::asio::signal_set signals(io_context);
- * signals.add(signal_number_1);
- * signals.add(signal_number_2);
- * signals.add(signal_number_3); @endcode
- */
- basic_signal_set(boost::asio::io_context& io_context, int signal_number_1,
- int signal_number_2, int signal_number_3)
- : basic_io_object<SignalSetService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- boost::asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
- boost::asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_3, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Add a signal to a signal_set.
- /**
- * This function adds the specified signal to the set. It has no effect if the
- * signal is already in the set.
- *
- * @param signal_number The signal to be added to the set.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void add(int signal_number)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Add a signal to a signal_set.
- /**
- * This function adds the specified signal to the set. It has no effect if the
- * signal is already in the set.
- *
- * @param signal_number The signal to be added to the set.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID add(int signal_number, boost::system::error_code& ec)
- {
- this->get_service().add(this->get_implementation(), signal_number, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove a signal from a signal_set.
- /**
- * This function removes the specified signal from the set. It has no effect
- * if the signal is not in the set.
- *
- * @param signal_number The signal to be removed from the set.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Removes any notifications that have been queued for the specified
- * signal number.
- */
- void remove(int signal_number)
- {
- boost::system::error_code ec;
- this->get_service().remove(this->get_implementation(), signal_number, ec);
- boost::asio::detail::throw_error(ec, "remove");
- }
-
- /// Remove a signal from a signal_set.
- /**
- * This function removes the specified signal from the set. It has no effect
- * if the signal is not in the set.
- *
- * @param signal_number The signal to be removed from the set.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Removes any notifications that have been queued for the specified
- * signal number.
- */
- BOOST_ASIO_SYNC_OP_VOID remove(int signal_number,
- boost::system::error_code& ec)
- {
- this->get_service().remove(this->get_implementation(), signal_number, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove all signals from a signal_set.
- /**
- * This function removes all signals from the set. It has no effect if the set
- * is already empty.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Removes all queued notifications.
- */
- void clear()
- {
- boost::system::error_code ec;
- this->get_service().clear(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "clear");
- }
-
- /// Remove all signals from a signal_set.
- /**
- * This function removes all signals from the set. It has no effect if the set
- * is already empty.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Removes all queued notifications.
- */
- BOOST_ASIO_SYNC_OP_VOID clear(boost::system::error_code& ec)
- {
- this->get_service().clear(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Cancel all operations associated with the signal set.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the signal set. The handler for each cancelled
- * operation will be invoked with the boost::asio::error::operation_aborted
- * error code.
- *
- * Cancellation does not alter the set of registered signals.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If a registered signal occurred before cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all operations associated with the signal set.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the signal set. The handler for each cancelled
- * operation will be invoked with the boost::asio::error::operation_aborted
- * error code.
- *
- * Cancellation does not alter the set of registered signals.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note If a registered signal occurred before cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous operation to wait for a signal to be delivered.
- /**
- * This function may be used to initiate an asynchronous wait against the
- * signal set. It always returns immediately.
- *
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
- *
- * @li One of the registered signals in the signal set occurs; or
- *
- * @li The signal set was cancelled, in which case the handler is passed the
- * error code boost::asio::error::operation_aborted.
- *
- * @param handler The handler to be called when the signal occurs. 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.
- * int signal_number // Indicates which signal occurred.
- * ); @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 SignalHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(SignalHandler,
- void (boost::system::error_code, int))
- async_wait(BOOST_ASIO_MOVE_ARG(SignalHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a SignalHandler.
- BOOST_ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
-
- return this->get_service().async_wait(this->get_implementation(),
- BOOST_ASIO_MOVE_CAST(SignalHandler)(handler));
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_BASIC_SIGNAL_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp
deleted file mode 100644
index ed22cd2b799..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp
+++ /dev/null
@@ -1,1759 +0,0 @@
-//
-// basic_socket.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_BASIC_SOCKET_HPP
-#define BOOST_ASIO_BASIC_SOCKET_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_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/post.hpp>
-#include <boost/asio/socket_base.hpp>
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_ssocket_service.hpp>
-# define BOOST_ASIO_SVC_T detail::winrt_ssocket_service<Protocol>
-# elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-# define BOOST_ASIO_SVC_T detail::win_iocp_socket_service<Protocol>
-# else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-# define BOOST_ASIO_SVC_T detail::reactive_socket_service<Protocol>
-# endif
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides socket functionality.
-/**
- * The basic_socket class template provides functionality that is common to both
- * stream-oriented and datagram-oriented sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM>
-class basic_socket
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
- public socket_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename BOOST_ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
- /// A basic_socket is always the lowest layer.
- typedef basic_socket<Protocol BOOST_ASIO_SVC_TARG> lowest_layer_type;
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
- /// Construct a basic_socket without opening it.
- /**
- * This constructor creates a socket without opening it.
- *
- * @param io_context The io_context object that the socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- */
- explicit basic_socket(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct and open a basic_socket.
- /**
- * This constructor creates and opens a socket.
- *
- * @param io_context The io_context object that the socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Construct a basic_socket, opening it and binding it to the given local
- /// endpoint.
- /**
- * This constructor creates a socket and automatically opens it bound to the
- * specified endpoint on the local machine. The protocol used is the protocol
- * associated with the given endpoint.
- *
- * @param io_context The io_context object that the socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- *
- * @param endpoint An endpoint on the local machine to which the socket will
- * be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_socket(boost::asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- const protocol_type protocol = endpoint.protocol();
- this->get_service().open(this->get_implementation(), protocol, ec);
- boost::asio::detail::throw_error(ec, "open");
- this->get_service().bind(this->get_implementation(), endpoint, ec);
- boost::asio::detail::throw_error(ec, "bind");
- }
-
- /// Construct a basic_socket on an existing native socket.
- /**
- * This constructor creates a socket object to hold an existing native socket.
- *
- * @param io_context The io_context object that the socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @param native_socket A native socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- protocol, native_socket, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_socket from another.
- /**
- * This constructor moves a socket from one object to another.
- *
- * @param other The other basic_socket 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_socket(io_context&) constructor.
- */
- basic_socket(basic_socket&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a basic_socket from another.
- /**
- * This assignment operator moves a socket from one object to another.
- *
- * @param other The other basic_socket 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_socket(io_context&) constructor.
- */
- basic_socket& operator=(basic_socket&& other)
- {
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-
- // All sockets have access to each other's implementations.
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- friend class basic_socket;
-
- /// Move-construct a basic_socket from a socket of another protocol type.
- /**
- * This constructor moves a socket from one object to another.
- *
- * @param other The other basic_socket 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_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- basic_socket(basic_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_io_object<BOOST_ASIO_SVC_T>(
- other.get_service(), other.get_implementation())
- {
- }
-
- /// Move-assign a basic_socket from a socket of another protocol type.
- /**
- * This assignment operator moves a socket from one object to another.
- *
- * @param other The other basic_socket 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_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_socket>::type& operator=(
- basic_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other)
- {
- basic_socket tmp(std::move(other));
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(tmp));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#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)
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a basic_socket cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a basic_socket cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
- /// Open the socket using the specified protocol.
- /**
- * This function opens the socket so that it will use the specified protocol.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * socket.open(boost::asio::ip::tcp::v4());
- * @endcode
- */
- void open(const protocol_type& protocol = protocol_type())
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Open the socket using the specified protocol.
- /**
- * This function opens the socket so that it will use the specified protocol.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::system::error_code ec;
- * socket.open(boost::asio::ip::tcp::v4(), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
- boost::system::error_code& ec)
- {
- this->get_service().open(this->get_implementation(), protocol, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to the socket.
- /*
- * This function opens the socket to hold an existing native socket.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @param native_socket A native socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const protocol_type& protocol,
- const native_handle_type& native_socket)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- protocol, native_socket, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native socket to the socket.
- /*
- * This function opens the socket to hold an existing native socket.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @param native_socket A native socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
- const native_handle_type& native_socket, boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(),
- protocol, native_socket, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the socket.
- /**
- * This function is used to close the socket. Any asynchronous send, receive
- * or connect operations will be cancelled immediately, and will complete
- * with the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- *
- * @note For portable behaviour with respect to graceful closure of a
- * connected socket, call shutdown() before closing the socket.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the socket.
- /**
- * This function is used to close the socket. Any asynchronous send, receive
- * or connect operations will be cancelled immediately, and will complete
- * with the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::system::error_code ec;
- * socket.close(ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- *
- * @note For portable behaviour with respect to graceful closure of a
- * connected socket, call shutdown() before closing the socket.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying native socket.
- /**
- * This function causes all outstanding asynchronous connect, send and receive
- * operations to finish immediately, and the handlers for cancelled operations
- * will be passed the boost::asio::error::operation_aborted error. Ownership
- * of the native socket is then transferred to the caller.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This function is unsupported on Windows versions prior to Windows
- * 8.1, and will fail with boost::asio::error::operation_not_supported on
- * these platforms.
- */
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
- && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
- __declspec(deprecated("This function always fails with "
- "operation_not_supported when used on Windows versions "
- "prior to Windows 8.1."))
-#endif
- native_handle_type release()
- {
- boost::system::error_code ec;
- native_handle_type s = this->get_service().release(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "release");
- return s;
- }
-
- /// Release ownership of the underlying native socket.
- /**
- * This function causes all outstanding asynchronous connect, send and receive
- * operations to finish immediately, and the handlers for cancelled operations
- * will be passed the boost::asio::error::operation_aborted error. Ownership
- * of the native socket is then transferred to the caller.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note This function is unsupported on Windows versions prior to Windows
- * 8.1, and will fail with boost::asio::error::operation_not_supported on
- * these platforms.
- */
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
- && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
- __declspec(deprecated("This function always fails with "
- "operation_not_supported when used on Windows versions "
- "prior to Windows 8.1."))
-#endif
- native_handle_type release(boost::system::error_code& ec)
- {
- return this->get_service().release(this->get_implementation(), ec);
- }
-
- /// Get the native socket representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * socket. This is intended to allow access to native socket functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- /**
- * This function causes all outstanding asynchronous connect, send and receive
- * operations to finish immediately, and the handlers for cancelled operations
- * will be passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls to cancel() will always fail with
- * boost::asio::error::operation_not_supported when run on Windows XP, Windows
- * Server 2003, and earlier versions of Windows, unless
- * BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
- * two issues that should be considered before enabling its use:
- *
- * @li It will only cancel asynchronous operations that were initiated in the
- * current thread.
- *
- * @li It can appear to complete without error, but the request to cancel the
- * unfinished operations may be silently ignored by the operating system.
- * Whether it works or not seems to depend on the drivers that are installed.
- *
- * For portable cancellation, consider using one of the following
- * alternatives:
- *
- * @li Disable asio's I/O completion port backend by defining
- * BOOST_ASIO_DISABLE_IOCP.
- *
- * @li Use the close() function to simultaneously cancel the outstanding
- * operations and close the socket.
- *
- * When running on Windows Vista, Windows Server 2008, and later, the
- * CancelIoEx function is always used. This function does not have the
- * problems described above.
- */
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
- && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
- && !defined(BOOST_ASIO_ENABLE_CANCELIO)
- __declspec(deprecated("By default, this function always fails with "
- "operation_not_supported when used on Windows XP, Windows Server 2003, "
- "or earlier. Consult documentation for details."))
-#endif
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- /**
- * This function causes all outstanding asynchronous connect, send and receive
- * operations to finish immediately, and the handlers for cancelled operations
- * will be passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls to cancel() will always fail with
- * boost::asio::error::operation_not_supported when run on Windows XP, Windows
- * Server 2003, and earlier versions of Windows, unless
- * BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
- * two issues that should be considered before enabling its use:
- *
- * @li It will only cancel asynchronous operations that were initiated in the
- * current thread.
- *
- * @li It can appear to complete without error, but the request to cancel the
- * unfinished operations may be silently ignored by the operating system.
- * Whether it works or not seems to depend on the drivers that are installed.
- *
- * For portable cancellation, consider using one of the following
- * alternatives:
- *
- * @li Disable asio's I/O completion port backend by defining
- * BOOST_ASIO_DISABLE_IOCP.
- *
- * @li Use the close() function to simultaneously cancel the outstanding
- * operations and close the socket.
- *
- * When running on Windows Vista, Windows Server 2008, and later, the
- * CancelIoEx function is always used. This function does not have the
- * problems described above.
- */
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
- && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
- && !defined(BOOST_ASIO_ENABLE_CANCELIO)
- __declspec(deprecated("By default, this function always fails with "
- "operation_not_supported when used on Windows XP, Windows Server 2003, "
- "or earlier. Consult documentation for details."))
-#endif
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- /**
- * This function is used to check whether the socket input is currently
- * positioned at the out-of-band data mark.
- *
- * @return A bool indicating whether the socket is at the out-of-band data
- * mark.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- bool at_mark() const
- {
- boost::system::error_code ec;
- bool b = this->get_service().at_mark(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "at_mark");
- return b;
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- /**
- * This function is used to check whether the socket input is currently
- * positioned at the out-of-band data mark.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return A bool indicating whether the socket is at the out-of-band data
- * mark.
- */
- bool at_mark(boost::system::error_code& ec) const
- {
- return this->get_service().at_mark(this->get_implementation(), ec);
- }
-
- /// Determine the number of bytes available for reading.
- /**
- * This function is used to determine the number of bytes that may be read
- * without blocking.
- *
- * @return The number of bytes that may be read without blocking, or 0 if an
- * error occurs.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- std::size_t available() const
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().available(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "available");
- return s;
- }
-
- /// Determine the number of bytes available for reading.
- /**
- * This function is used to determine the number of bytes that may be read
- * without blocking.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of bytes that may be read without blocking, or 0 if an
- * error occurs.
- */
- std::size_t available(boost::system::error_code& ec) const
- {
- return this->get_service().available(this->get_implementation(), ec);
- }
-
- /// Bind the socket to the given local endpoint.
- /**
- * This function binds the socket to the specified endpoint on the local
- * machine.
- *
- * @param endpoint An endpoint on the local machine to which the socket will
- * be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * socket.open(boost::asio::ip::tcp::v4());
- * socket.bind(boost::asio::ip::tcp::endpoint(
- * boost::asio::ip::tcp::v4(), 12345));
- * @endcode
- */
- void bind(const endpoint_type& endpoint)
- {
- boost::system::error_code ec;
- this->get_service().bind(this->get_implementation(), endpoint, ec);
- boost::asio::detail::throw_error(ec, "bind");
- }
-
- /// Bind the socket to the given local endpoint.
- /**
- * This function binds the socket to the specified endpoint on the local
- * machine.
- *
- * @param endpoint An endpoint on the local machine to which the socket will
- * be bound.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * socket.open(boost::asio::ip::tcp::v4());
- * boost::system::error_code ec;
- * socket.bind(boost::asio::ip::tcp::endpoint(
- * boost::asio::ip::tcp::v4(), 12345), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
- boost::system::error_code& ec)
- {
- this->get_service().bind(this->get_implementation(), endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the socket to the specified endpoint.
- /**
- * This function is used to connect a socket to the specified remote endpoint.
- * The function call will block until the connection is successfully made or
- * an error occurs.
- *
- * The socket is automatically opened if it is not already open. If the
- * connect fails, and the socket was automatically opened, the socket is
- * not returned to the closed state.
- *
- * @param peer_endpoint The remote endpoint to which the socket will be
- * connected.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::asio::ip::tcp::endpoint endpoint(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * socket.connect(endpoint);
- * @endcode
- */
- void connect(const endpoint_type& peer_endpoint)
- {
- boost::system::error_code ec;
- if (!is_open())
- {
- this->get_service().open(this->get_implementation(),
- peer_endpoint.protocol(), ec);
- boost::asio::detail::throw_error(ec, "connect");
- }
- this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
- boost::asio::detail::throw_error(ec, "connect");
- }
-
- /// Connect the socket to the specified endpoint.
- /**
- * This function is used to connect a socket to the specified remote endpoint.
- * The function call will block until the connection is successfully made or
- * an error occurs.
- *
- * The socket is automatically opened if it is not already open. If the
- * connect fails, and the socket was automatically opened, the socket is
- * not returned to the closed state.
- *
- * @param peer_endpoint The remote endpoint to which the socket will be
- * connected.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::asio::ip::tcp::endpoint endpoint(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * boost::system::error_code ec;
- * socket.connect(endpoint, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID connect(const endpoint_type& peer_endpoint,
- boost::system::error_code& ec)
- {
- if (!is_open())
- {
- this->get_service().open(this->get_implementation(),
- peer_endpoint.protocol(), ec);
- if (ec)
- {
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- /**
- * This function is used to asynchronously connect a socket to the specified
- * remote endpoint. The function call always returns immediately.
- *
- * The socket is automatically opened if it is not already open. If the
- * connect fails, and the socket was automatically opened, the socket is
- * not returned to the closed state.
- *
- * @param peer_endpoint The remote endpoint to which the socket will be
- * connected. Copies will be made of the endpoint object as required.
- *
- * @param handler The handler to be called when the connection 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
- * ); @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
- * void connect_handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Connect succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::asio::ip::tcp::endpoint endpoint(
- * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
- * socket.async_connect(endpoint, connect_handler);
- * @endcode
- */
- template <typename ConnectHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (boost::system::error_code))
- async_connect(const endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ConnectHandler.
- BOOST_ASIO_CONNECT_HANDLER_CHECK(ConnectHandler, handler) type_check;
-
- if (!is_open())
- {
- boost::system::error_code ec;
- const protocol_type protocol = peer_endpoint.protocol();
- this->get_service().open(this->get_implementation(), protocol, ec);
- if (ec)
- {
- async_completion<ConnectHandler,
- void (boost::system::error_code)> init(handler);
-
- boost::asio::post(this->get_executor(),
- boost::asio::detail::bind_handler(
- BOOST_ASIO_MOVE_CAST(BOOST_ASIO_HANDLER_TYPE(
- ConnectHandler, void (boost::system::error_code)))(
- init.completion_handler), ec));
-
- return init.result.get();
- }
- }
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_connect(this->get_implementation(),
- peer_endpoint, BOOST_ASIO_MOVE_CAST(ConnectHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ConnectHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_connect(
- this->get_implementation(), peer_endpoint, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Set an option on the socket.
- /**
- * This function is used to set an option on the socket.
- *
- * @param option The new option value to be set on the socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa SettableSocketOption @n
- * boost::asio::socket_base::broadcast @n
- * boost::asio::socket_base::do_not_route @n
- * boost::asio::socket_base::keep_alive @n
- * boost::asio::socket_base::linger @n
- * boost::asio::socket_base::receive_buffer_size @n
- * boost::asio::socket_base::receive_low_watermark @n
- * boost::asio::socket_base::reuse_address @n
- * boost::asio::socket_base::send_buffer_size @n
- * boost::asio::socket_base::send_low_watermark @n
- * boost::asio::ip::multicast::join_group @n
- * boost::asio::ip::multicast::leave_group @n
- * boost::asio::ip::multicast::enable_loopback @n
- * boost::asio::ip::multicast::outbound_interface @n
- * boost::asio::ip::multicast::hops @n
- * boost::asio::ip::tcp::no_delay
- *
- * @par Example
- * Setting the IPPROTO_TCP/TCP_NODELAY option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::no_delay option(true);
- * socket.set_option(option);
- * @endcode
- */
- template <typename SettableSocketOption>
- void set_option(const SettableSocketOption& option)
- {
- boost::system::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "set_option");
- }
-
- /// Set an option on the socket.
- /**
- * This function is used to set an option on the socket.
- *
- * @param option The new option value to be set on the socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa SettableSocketOption @n
- * boost::asio::socket_base::broadcast @n
- * boost::asio::socket_base::do_not_route @n
- * boost::asio::socket_base::keep_alive @n
- * boost::asio::socket_base::linger @n
- * boost::asio::socket_base::receive_buffer_size @n
- * boost::asio::socket_base::receive_low_watermark @n
- * boost::asio::socket_base::reuse_address @n
- * boost::asio::socket_base::send_buffer_size @n
- * boost::asio::socket_base::send_low_watermark @n
- * boost::asio::ip::multicast::join_group @n
- * boost::asio::ip::multicast::leave_group @n
- * boost::asio::ip::multicast::enable_loopback @n
- * boost::asio::ip::multicast::outbound_interface @n
- * boost::asio::ip::multicast::hops @n
- * boost::asio::ip::tcp::no_delay
- *
- * @par Example
- * Setting the IPPROTO_TCP/TCP_NODELAY option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::no_delay option(true);
- * boost::system::error_code ec;
- * socket.set_option(option, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
- boost::system::error_code& ec)
- {
- this->get_service().set_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get an option from the socket.
- /**
- * This function is used to get the current value of an option on the socket.
- *
- * @param option The option value to be obtained from the socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa GettableSocketOption @n
- * boost::asio::socket_base::broadcast @n
- * boost::asio::socket_base::do_not_route @n
- * boost::asio::socket_base::keep_alive @n
- * boost::asio::socket_base::linger @n
- * boost::asio::socket_base::receive_buffer_size @n
- * boost::asio::socket_base::receive_low_watermark @n
- * boost::asio::socket_base::reuse_address @n
- * boost::asio::socket_base::send_buffer_size @n
- * boost::asio::socket_base::send_low_watermark @n
- * boost::asio::ip::multicast::join_group @n
- * boost::asio::ip::multicast::leave_group @n
- * boost::asio::ip::multicast::enable_loopback @n
- * boost::asio::ip::multicast::outbound_interface @n
- * boost::asio::ip::multicast::hops @n
- * boost::asio::ip::tcp::no_delay
- *
- * @par Example
- * Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::socket::keep_alive option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- */
- template <typename GettableSocketOption>
- void get_option(GettableSocketOption& option) const
- {
- boost::system::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "get_option");
- }
-
- /// Get an option from the socket.
- /**
- * This function is used to get the current value of an option on the socket.
- *
- * @param option The option value to be obtained from the socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa GettableSocketOption @n
- * boost::asio::socket_base::broadcast @n
- * boost::asio::socket_base::do_not_route @n
- * boost::asio::socket_base::keep_alive @n
- * boost::asio::socket_base::linger @n
- * boost::asio::socket_base::receive_buffer_size @n
- * boost::asio::socket_base::receive_low_watermark @n
- * boost::asio::socket_base::reuse_address @n
- * boost::asio::socket_base::send_buffer_size @n
- * boost::asio::socket_base::send_low_watermark @n
- * boost::asio::ip::multicast::join_group @n
- * boost::asio::ip::multicast::leave_group @n
- * boost::asio::ip::multicast::enable_loopback @n
- * boost::asio::ip::multicast::outbound_interface @n
- * boost::asio::ip::multicast::hops @n
- * boost::asio::ip::tcp::no_delay
- *
- * @par Example
- * Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::socket::keep_alive option;
- * boost::system::error_code ec;
- * socket.get_option(option, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * bool is_set = option.value();
- * @endcode
- */
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
- boost::system::error_code& ec) const
- {
- this->get_service().get_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- /**
- * This function is used to execute an IO control command on the socket.
- *
- * @param command The IO control command to be performed on the socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa IoControlCommand @n
- * boost::asio::socket_base::bytes_readable @n
- * boost::asio::socket_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::socket::bytes_readable command;
- * socket.io_control(command);
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- void io_control(IoControlCommand& command)
- {
- boost::system::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
- boost::asio::detail::throw_error(ec, "io_control");
- }
-
- /// Perform an IO control command on the socket.
- /**
- * This function is used to execute an IO control command on the socket.
- *
- * @param command The IO control command to be performed on the socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa IoControlCommand @n
- * boost::asio::socket_base::bytes_readable @n
- * boost::asio::socket_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::socket::bytes_readable command;
- * boost::system::error_code ec;
- * socket.io_control(command, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
- boost::system::error_code& ec)
- {
- this->get_service().io_control(this->get_implementation(), command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- /**
- * @returns @c true if the socket's synchronous operations will fail with
- * boost::asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- bool non_blocking() const
- {
- return this->get_service().non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the socket.
- /**
- * @param mode If @c true, the socket's synchronous operations will fail with
- * boost::asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- void non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "non_blocking");
- }
-
- /// Sets the non-blocking mode of the socket.
- /**
- * @param mode If @c true, the socket's synchronous operations will fail with
- * boost::asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- BOOST_ASIO_SYNC_OP_VOID non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- /**
- * This function is used to retrieve the non-blocking mode of the underlying
- * native socket. This mode has no effect on the behaviour of the socket
- * object's synchronous operations.
- *
- * @returns @c true if the underlying socket is in non-blocking mode and
- * direct system calls may fail with boost::asio::error::would_block (or the
- * equivalent system error).
- *
- * @note The current non-blocking mode is cached by the socket object.
- * Consequently, the return value may be incorrect if the non-blocking mode
- * was set directly on the native socket.
- *
- * @par Example
- * This function is intended to allow the encapsulation of arbitrary
- * non-blocking system calls as asynchronous operations, in a way that is
- * transparent to the user of the socket object. The following example
- * illustrates how Linux's @c sendfile system call might be encapsulated:
- * @code template <typename Handler>
- * struct sendfile_op
- * {
- * tcp::socket& sock_;
- * int fd_;
- * Handler handler_;
- * off_t offset_;
- * std::size_t total_bytes_transferred_;
- *
- * // Function call operator meeting WriteHandler requirements.
- * // Used as the handler for the async_write_some operation.
- * void operator()(boost::system::error_code ec, std::size_t)
- * {
- * // Put the underlying socket into non-blocking mode.
- * if (!ec)
- * if (!sock_.native_non_blocking())
- * sock_.native_non_blocking(true, ec);
- *
- * if (!ec)
- * {
- * for (;;)
- * {
- * // Try the system call.
- * errno = 0;
- * int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- * ec = boost::system::error_code(n < 0 ? errno : 0,
- * boost::asio::error::get_system_category());
- * total_bytes_transferred_ += ec ? 0 : n;
- *
- * // Retry operation immediately 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)
- * {
- * // We have to wait for the socket to become ready again.
- * sock_.async_wait(tcp::socket::wait_write, *this);
- * return;
- * }
- *
- * if (ec || n == 0)
- * {
- * // An error occurred, or we have reached the end of the file.
- * // Either way we must exit the loop so we can call the handler.
- * break;
- * }
- *
- * // Loop around to try calling sendfile again.
- * }
- * }
- *
- * // Pass result back to user's handler.
- * handler_(ec, total_bytes_transferred_);
- * }
- * };
- *
- * template <typename Handler>
- * void async_sendfile(tcp::socket& sock, int fd, Handler h)
- * {
- * sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- * sock.async_wait(tcp::socket::wait_write, op);
- * } @endcode
- */
- bool native_non_blocking() const
- {
- return this->get_service().native_non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native socket. It has no effect on the behaviour of the socket object's
- * synchronous operations.
- *
- * @param mode If @c true, the underlying socket is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @throws boost::system::system_error Thrown on failure. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- *
- * @par Example
- * This function is intended to allow the encapsulation of arbitrary
- * non-blocking system calls as asynchronous operations, in a way that is
- * transparent to the user of the socket object. The following example
- * illustrates how Linux's @c sendfile system call might be encapsulated:
- * @code template <typename Handler>
- * struct sendfile_op
- * {
- * tcp::socket& sock_;
- * int fd_;
- * Handler handler_;
- * off_t offset_;
- * std::size_t total_bytes_transferred_;
- *
- * // Function call operator meeting WriteHandler requirements.
- * // Used as the handler for the async_write_some operation.
- * void operator()(boost::system::error_code ec, std::size_t)
- * {
- * // Put the underlying socket into non-blocking mode.
- * if (!ec)
- * if (!sock_.native_non_blocking())
- * sock_.native_non_blocking(true, ec);
- *
- * if (!ec)
- * {
- * for (;;)
- * {
- * // Try the system call.
- * errno = 0;
- * int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- * ec = boost::system::error_code(n < 0 ? errno : 0,
- * boost::asio::error::get_system_category());
- * total_bytes_transferred_ += ec ? 0 : n;
- *
- * // Retry operation immediately 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)
- * {
- * // We have to wait for the socket to become ready again.
- * sock_.async_wait(tcp::socket::wait_write, *this);
- * return;
- * }
- *
- * if (ec || n == 0)
- * {
- * // An error occurred, or we have reached the end of the file.
- * // Either way we must exit the loop so we can call the handler.
- * break;
- * }
- *
- * // Loop around to try calling sendfile again.
- * }
- * }
- *
- * // Pass result back to user's handler.
- * handler_(ec, total_bytes_transferred_);
- * }
- * };
- *
- * template <typename Handler>
- * void async_sendfile(tcp::socket& sock, int fd, Handler h)
- * {
- * sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- * sock.async_wait(tcp::socket::wait_write, op);
- * } @endcode
- */
- void native_non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "native_non_blocking");
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native socket. It has no effect on the behaviour of the socket object's
- * synchronous operations.
- *
- * @param mode If @c true, the underlying socket is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @param ec Set to indicate what error occurred, if any. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- *
- * @par Example
- * This function is intended to allow the encapsulation of arbitrary
- * non-blocking system calls as asynchronous operations, in a way that is
- * transparent to the user of the socket object. The following example
- * illustrates how Linux's @c sendfile system call might be encapsulated:
- * @code template <typename Handler>
- * struct sendfile_op
- * {
- * tcp::socket& sock_;
- * int fd_;
- * Handler handler_;
- * off_t offset_;
- * std::size_t total_bytes_transferred_;
- *
- * // Function call operator meeting WriteHandler requirements.
- * // Used as the handler for the async_write_some operation.
- * void operator()(boost::system::error_code ec, std::size_t)
- * {
- * // Put the underlying socket into non-blocking mode.
- * if (!ec)
- * if (!sock_.native_non_blocking())
- * sock_.native_non_blocking(true, ec);
- *
- * if (!ec)
- * {
- * for (;;)
- * {
- * // Try the system call.
- * errno = 0;
- * int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- * ec = boost::system::error_code(n < 0 ? errno : 0,
- * boost::asio::error::get_system_category());
- * total_bytes_transferred_ += ec ? 0 : n;
- *
- * // Retry operation immediately 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)
- * {
- * // We have to wait for the socket to become ready again.
- * sock_.async_wait(tcp::socket::wait_write, *this);
- * return;
- * }
- *
- * if (ec || n == 0)
- * {
- * // An error occurred, or we have reached the end of the file.
- * // Either way we must exit the loop so we can call the handler.
- * break;
- * }
- *
- * // Loop around to try calling sendfile again.
- * }
- * }
- *
- * // Pass result back to user's handler.
- * handler_(ec, total_bytes_transferred_);
- * }
- * };
- *
- * template <typename Handler>
- * void async_sendfile(tcp::socket& sock, int fd, Handler h)
- * {
- * sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- * sock.async_wait(tcp::socket::wait_write, op);
- * } @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint of the socket.
- /**
- * This function is used to obtain the locally bound endpoint of the socket.
- *
- * @returns An object that represents the local endpoint of the socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
- * @endcode
- */
- endpoint_type local_endpoint() const
- {
- boost::system::error_code ec;
- endpoint_type ep = this->get_service().local_endpoint(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "local_endpoint");
- return ep;
- }
-
- /// Get the local endpoint of the socket.
- /**
- * This function is used to obtain the locally bound endpoint of the socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns An object that represents the local endpoint of the socket.
- * Returns a default-constructed endpoint object if an error occurred.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::system::error_code ec;
- * boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- endpoint_type local_endpoint(boost::system::error_code& ec) const
- {
- return this->get_service().local_endpoint(this->get_implementation(), ec);
- }
-
- /// Get the remote endpoint of the socket.
- /**
- * This function is used to obtain the remote endpoint of the socket.
- *
- * @returns An object that represents the remote endpoint of the socket.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
- * @endcode
- */
- endpoint_type remote_endpoint() const
- {
- boost::system::error_code ec;
- endpoint_type ep = this->get_service().remote_endpoint(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "remote_endpoint");
- return ep;
- }
-
- /// Get the remote endpoint of the socket.
- /**
- * This function is used to obtain the remote endpoint of the socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns An object that represents the remote endpoint of the socket.
- * Returns a default-constructed endpoint object if an error occurred.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::system::error_code ec;
- * boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- endpoint_type remote_endpoint(boost::system::error_code& ec) const
- {
- return this->get_service().remote_endpoint(this->get_implementation(), ec);
- }
-
- /// Disable sends or receives on the socket.
- /**
- * This function is used to disable send operations, receive operations, or
- * both.
- *
- * @param what Determines what types of operation will no longer be allowed.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * Shutting down the send side of the socket:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
- * @endcode
- */
- void shutdown(shutdown_type what)
- {
- boost::system::error_code ec;
- this->get_service().shutdown(this->get_implementation(), what, ec);
- boost::asio::detail::throw_error(ec, "shutdown");
- }
-
- /// Disable sends or receives on the socket.
- /**
- * This function is used to disable send operations, receive operations, or
- * both.
- *
- * @param what Determines what types of operation will no longer be allowed.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * Shutting down the send side of the socket:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::system::error_code ec;
- * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID shutdown(shutdown_type what,
- boost::system::error_code& ec)
- {
- this->get_service().shutdown(this->get_implementation(), what, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- /**
- * This function is used to perform a blocking wait for a socket to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired socket state.
- *
- * @par Example
- * Waiting for a socket to become readable.
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * socket.wait(boost::asio::ip::tcp::socket::wait_read);
- * @endcode
- */
- void wait(wait_type w)
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- /**
- * This function is used to perform a blocking wait for a socket to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired socket state.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * Waiting for a socket to become readable.
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::system::error_code ec;
- * socket.wait(boost::asio::ip::tcp::socket::wait_read, ec);
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- /**
- * This function is used to perform an asynchronous wait for a socket to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired socket state.
- *
- * @param handler The handler to be called when the wait 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
- * ); @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
- * void wait_handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Wait succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * socket.async_wait(boost::asio::ip::tcp::socket::wait_read, wait_handler);
- * @endcode
- */
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- w, BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- w, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- /**
- * This function destroys the socket, cancelling any outstanding asynchronous
- * operations associated with the socket as if by calling @c cancel.
- */
- ~basic_socket()
- {
- }
-
-private:
- // Disallow copying and assignment.
- basic_socket(const basic_socket&) BOOST_ASIO_DELETED;
- basic_socket& operator=(const basic_socket&) BOOST_ASIO_DELETED;
-};
-
-} // 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_BASIC_SOCKET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp
deleted file mode 100644
index 8afdfd30091..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp
+++ /dev/null
@@ -1,1988 +0,0 @@
-//
-// basic_socket_acceptor.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_BASIC_SOCKET_ACCEPTOR_HPP
-#define BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_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/basic_io_object.hpp>
-#include <boost/asio/basic_socket.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/socket_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/socket_acceptor_service.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/null_socket_service.hpp>
-# define BOOST_ASIO_SVC_T detail::null_socket_service<Protocol>
-# elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-# define BOOST_ASIO_SVC_T detail::win_iocp_socket_service<Protocol>
-# else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-# define BOOST_ASIO_SVC_T detail::reactive_socket_service<Protocol>
-# endif
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides the ability to accept new connections.
-/**
- * The basic_socket_acceptor class template is used for accepting new socket
- * connections.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Example
- * Opening a socket acceptor with the SO_REUSEADDR option enabled:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
- * acceptor.open(endpoint.protocol());
- * acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
- * acceptor.bind(endpoint);
- * acceptor.listen();
- * @endcode
- */
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= socket_acceptor_service<Protocol>)>
-class basic_socket_acceptor
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
- public socket_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of an acceptor.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename BOOST_ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// Construct an acceptor without opening it.
- /**
- * This constructor creates an acceptor without opening it to listen for new
- * connections. The open() function must be called before the acceptor can
- * accept new socket connections.
- *
- * @param io_context The io_context object that the acceptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * acceptor.
- */
- explicit basic_socket_acceptor(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct an open acceptor.
- /**
- * This constructor creates an acceptor and automatically opens it.
- *
- * @param io_context The io_context object that the acceptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * acceptor.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_socket_acceptor(boost::asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Construct an acceptor opened on the given endpoint.
- /**
- * This constructor creates an acceptor and automatically opens it to listen
- * for new connections on the specified endpoint.
- *
- * @param io_context The io_context object that the acceptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * acceptor.
- *
- * @param endpoint An endpoint on the local machine on which the acceptor
- * will listen for new connections.
- *
- * @param reuse_addr Whether the constructor should set the socket option
- * socket_base::reuse_address.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This constructor is equivalent to the following code:
- * @code
- * basic_socket_acceptor<Protocol> acceptor(io_context);
- * acceptor.open(endpoint.protocol());
- * if (reuse_addr)
- * acceptor.set_option(socket_base::reuse_address(true));
- * acceptor.bind(endpoint);
- * acceptor.listen(listen_backlog);
- * @endcode
- */
- basic_socket_acceptor(boost::asio::io_context& io_context,
- const endpoint_type& endpoint, bool reuse_addr = true)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- const protocol_type protocol = endpoint.protocol();
- this->get_service().open(this->get_implementation(), protocol, ec);
- boost::asio::detail::throw_error(ec, "open");
- if (reuse_addr)
- {
- this->get_service().set_option(this->get_implementation(),
- socket_base::reuse_address(true), ec);
- boost::asio::detail::throw_error(ec, "set_option");
- }
- this->get_service().bind(this->get_implementation(), endpoint, ec);
- boost::asio::detail::throw_error(ec, "bind");
- this->get_service().listen(this->get_implementation(),
- socket_base::max_listen_connections, ec);
- boost::asio::detail::throw_error(ec, "listen");
- }
-
- /// Construct a basic_socket_acceptor on an existing native acceptor.
- /**
- * This constructor creates an acceptor object to hold an existing native
- * acceptor.
- *
- * @param io_context The io_context object that the acceptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * acceptor.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @param native_acceptor A native acceptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_socket_acceptor(boost::asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_acceptor)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- protocol, native_acceptor, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_socket_acceptor from another.
- /**
- * This constructor moves an acceptor from one object to another.
- *
- * @param other The other basic_socket_acceptor 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_socket_acceptor(io_context&) constructor.
- */
- basic_socket_acceptor(basic_socket_acceptor&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a basic_socket_acceptor from another.
- /**
- * This assignment operator moves an acceptor from one object to another.
- *
- * @param other The other basic_socket_acceptor 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_socket_acceptor(io_context&) constructor.
- */
- basic_socket_acceptor& operator=(basic_socket_acceptor&& other)
- {
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-
- // All socket acceptors have access to each other's implementations.
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- friend class basic_socket_acceptor;
-
- /// Move-construct a basic_socket_acceptor from an acceptor of another
- /// protocol type.
- /**
- * This constructor moves an acceptor from one object to another.
- *
- * @param other The other basic_socket_acceptor 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_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- basic_socket_acceptor(
- basic_socket_acceptor<Protocol1 BOOST_ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_io_object<BOOST_ASIO_SVC_T>(
- other.get_service(), other.get_implementation())
- {
- }
-
- /// Move-assign a basic_socket_acceptor from an acceptor of another protocol
- /// type.
- /**
- * This assignment operator moves an acceptor from one object to another.
- *
- * @param other The other basic_socket_acceptor 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_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_socket_acceptor>::type& operator=(
- basic_socket_acceptor<Protocol1 BOOST_ASIO_SVC_TARG1>&& other)
- {
- basic_socket_acceptor tmp(std::move(other));
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(tmp));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the acceptor.
- /**
- * This function destroys the acceptor, cancelling any outstanding
- * asynchronous operations associated with the acceptor as if by calling
- * @c cancel.
- */
- ~basic_socket_acceptor()
- {
- }
-
-#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)
-
- /// Open the acceptor using the specified protocol.
- /**
- * This function opens the socket acceptor so that it will use the specified
- * protocol.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * acceptor.open(boost::asio::ip::tcp::v4());
- * @endcode
- */
- void open(const protocol_type& protocol = protocol_type())
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Open the acceptor using the specified protocol.
- /**
- * This function opens the socket acceptor so that it will use the specified
- * protocol.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * boost::system::error_code ec;
- * acceptor.open(boost::asio::ip::tcp::v4(), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
- boost::system::error_code& ec)
- {
- this->get_service().open(this->get_implementation(), protocol, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assigns an existing native acceptor to the acceptor.
- /*
- * This function opens the acceptor to hold an existing native acceptor.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @param native_acceptor A native acceptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const protocol_type& protocol,
- const native_handle_type& native_acceptor)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- protocol, native_acceptor, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assigns an existing native acceptor to the acceptor.
- /*
- * This function opens the acceptor to hold an existing native acceptor.
- *
- * @param protocol An object specifying which protocol is to be used.
- *
- * @param native_acceptor A native acceptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
- const native_handle_type& native_acceptor, boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(),
- protocol, native_acceptor, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the acceptor is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Bind the acceptor to the given local endpoint.
- /**
- * This function binds the socket acceptor to the specified endpoint on the
- * local machine.
- *
- * @param endpoint An endpoint on the local machine to which the socket
- * acceptor will be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 12345);
- * acceptor.open(endpoint.protocol());
- * acceptor.bind(endpoint);
- * @endcode
- */
- void bind(const endpoint_type& endpoint)
- {
- boost::system::error_code ec;
- this->get_service().bind(this->get_implementation(), endpoint, ec);
- boost::asio::detail::throw_error(ec, "bind");
- }
-
- /// Bind the acceptor to the given local endpoint.
- /**
- * This function binds the socket acceptor to the specified endpoint on the
- * local machine.
- *
- * @param endpoint An endpoint on the local machine to which the socket
- * acceptor will be bound.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 12345);
- * acceptor.open(endpoint.protocol());
- * boost::system::error_code ec;
- * acceptor.bind(endpoint, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
- boost::system::error_code& ec)
- {
- this->get_service().bind(this->get_implementation(), endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Place the acceptor into the state where it will listen for new
- /// connections.
- /**
- * This function puts the socket acceptor into the state where it may accept
- * new connections.
- *
- * @param backlog The maximum length of the queue of pending connections.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void listen(int backlog = socket_base::max_listen_connections)
- {
- boost::system::error_code ec;
- this->get_service().listen(this->get_implementation(), backlog, ec);
- boost::asio::detail::throw_error(ec, "listen");
- }
-
- /// Place the acceptor into the state where it will listen for new
- /// connections.
- /**
- * This function puts the socket acceptor into the state where it may accept
- * new connections.
- *
- * @param backlog The maximum length of the queue of pending connections.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::system::error_code ec;
- * acceptor.listen(boost::asio::socket_base::max_listen_connections, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID listen(int backlog, boost::system::error_code& ec)
- {
- this->get_service().listen(this->get_implementation(), backlog, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Close the acceptor.
- /**
- * This function is used to close the acceptor. Any asynchronous accept
- * operations will be cancelled immediately.
- *
- * A subsequent call to open() is required before the acceptor can again be
- * used to again perform socket accept operations.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the acceptor.
- /**
- * This function is used to close the acceptor. Any asynchronous accept
- * operations will be cancelled immediately.
- *
- * A subsequent call to open() is required before the acceptor can again be
- * used to again perform socket accept operations.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::system::error_code ec;
- * acceptor.close(ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying native acceptor.
- /**
- * This function causes all outstanding asynchronous accept operations to
- * finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error. Ownership of the
- * native acceptor is then transferred to the caller.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This function is unsupported on Windows versions prior to Windows
- * 8.1, and will fail with boost::asio::error::operation_not_supported on
- * these platforms.
- */
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
- && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
- __declspec(deprecated("This function always fails with "
- "operation_not_supported when used on Windows versions "
- "prior to Windows 8.1."))
-#endif
- native_handle_type release()
- {
- boost::system::error_code ec;
- native_handle_type s = this->get_service().release(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "release");
- return s;
- }
-
- /// Release ownership of the underlying native acceptor.
- /**
- * This function causes all outstanding asynchronous accept operations to
- * finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error. Ownership of the
- * native acceptor is then transferred to the caller.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note This function is unsupported on Windows versions prior to Windows
- * 8.1, and will fail with boost::asio::error::operation_not_supported on
- * these platforms.
- */
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
- && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
- __declspec(deprecated("This function always fails with "
- "operation_not_supported when used on Windows versions "
- "prior to Windows 8.1."))
-#endif
- native_handle_type release(boost::system::error_code& ec)
- {
- return this->get_service().release(this->get_implementation(), ec);
- }
-
- /// Get the native acceptor representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * acceptor. This is intended to allow access to native acceptor functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the acceptor.
- /**
- * This function causes all outstanding asynchronous connect, send and receive
- * operations to finish immediately, and the handlers for cancelled operations
- * will be passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the acceptor.
- /**
- * This function causes all outstanding asynchronous connect, send and receive
- * operations to finish immediately, and the handlers for cancelled operations
- * will be passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set an option on the acceptor.
- /**
- * This function is used to set an option on the acceptor.
- *
- * @param option The new option value to be set on the acceptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa SettableSocketOption @n
- * boost::asio::socket_base::reuse_address
- * boost::asio::socket_base::enable_connection_aborted
- *
- * @par Example
- * Setting the SOL_SOCKET/SO_REUSEADDR option:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::acceptor::reuse_address option(true);
- * acceptor.set_option(option);
- * @endcode
- */
- template <typename SettableSocketOption>
- void set_option(const SettableSocketOption& option)
- {
- boost::system::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "set_option");
- }
-
- /// Set an option on the acceptor.
- /**
- * This function is used to set an option on the acceptor.
- *
- * @param option The new option value to be set on the acceptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa SettableSocketOption @n
- * boost::asio::socket_base::reuse_address
- * boost::asio::socket_base::enable_connection_aborted
- *
- * @par Example
- * Setting the SOL_SOCKET/SO_REUSEADDR option:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::acceptor::reuse_address option(true);
- * boost::system::error_code ec;
- * acceptor.set_option(option, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
- boost::system::error_code& ec)
- {
- this->get_service().set_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get an option from the acceptor.
- /**
- * This function is used to get the current value of an option on the
- * acceptor.
- *
- * @param option The option value to be obtained from the acceptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa GettableSocketOption @n
- * boost::asio::socket_base::reuse_address
- *
- * @par Example
- * Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::acceptor::reuse_address option;
- * acceptor.get_option(option);
- * bool is_set = option.get();
- * @endcode
- */
- template <typename GettableSocketOption>
- void get_option(GettableSocketOption& option) const
- {
- boost::system::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "get_option");
- }
-
- /// Get an option from the acceptor.
- /**
- * This function is used to get the current value of an option on the
- * acceptor.
- *
- * @param option The option value to be obtained from the acceptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa GettableSocketOption @n
- * boost::asio::socket_base::reuse_address
- *
- * @par Example
- * Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::acceptor::reuse_address option;
- * boost::system::error_code ec;
- * acceptor.get_option(option, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * bool is_set = option.get();
- * @endcode
- */
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
- boost::system::error_code& ec) const
- {
- this->get_service().get_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the acceptor.
- /**
- * This function is used to execute an IO control command on the acceptor.
- *
- * @param command The IO control command to be performed on the acceptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa IoControlCommand @n
- * boost::asio::socket_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::acceptor::non_blocking_io command(true);
- * socket.io_control(command);
- * @endcode
- */
- template <typename IoControlCommand>
- void io_control(IoControlCommand& command)
- {
- boost::system::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
- boost::asio::detail::throw_error(ec, "io_control");
- }
-
- /// Perform an IO control command on the acceptor.
- /**
- * This function is used to execute an IO control command on the acceptor.
- *
- * @param command The IO control command to be performed on the acceptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa IoControlCommand @n
- * boost::asio::socket_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::acceptor::non_blocking_io command(true);
- * boost::system::error_code ec;
- * socket.io_control(command, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
- boost::system::error_code& ec)
- {
- this->get_service().io_control(this->get_implementation(), command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the acceptor.
- /**
- * @returns @c true if the acceptor's synchronous operations will fail with
- * boost::asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- bool non_blocking() const
- {
- return this->get_service().non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the acceptor.
- /**
- * @param mode If @c true, the acceptor's synchronous operations will fail
- * with boost::asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- void non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "non_blocking");
- }
-
- /// Sets the non-blocking mode of the acceptor.
- /**
- * @param mode If @c true, the acceptor's synchronous operations will fail
- * with boost::asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- BOOST_ASIO_SYNC_OP_VOID non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native acceptor implementation.
- /**
- * This function is used to retrieve the non-blocking mode of the underlying
- * native acceptor. This mode has no effect on the behaviour of the acceptor
- * object's synchronous operations.
- *
- * @returns @c true if the underlying acceptor is in non-blocking mode and
- * direct system calls may fail with boost::asio::error::would_block (or the
- * equivalent system error).
- *
- * @note The current non-blocking mode is cached by the acceptor object.
- * Consequently, the return value may be incorrect if the non-blocking mode
- * was set directly on the native acceptor.
- */
- bool native_non_blocking() const
- {
- return this->get_service().native_non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the native acceptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native acceptor. It has no effect on the behaviour of the acceptor object's
- * synchronous operations.
- *
- * @param mode If @c true, the underlying acceptor is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @throws boost::system::system_error Thrown on failure. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- void native_non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "native_non_blocking");
- }
-
- /// Sets the non-blocking mode of the native acceptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native acceptor. It has no effect on the behaviour of the acceptor object's
- * synchronous operations.
- *
- * @param mode If @c true, the underlying acceptor is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @param ec Set to indicate what error occurred, if any. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint of the acceptor.
- /**
- * This function is used to obtain the locally bound endpoint of the acceptor.
- *
- * @returns An object that represents the local endpoint of the acceptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
- * @endcode
- */
- endpoint_type local_endpoint() const
- {
- boost::system::error_code ec;
- endpoint_type ep = this->get_service().local_endpoint(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "local_endpoint");
- return ep;
- }
-
- /// Get the local endpoint of the acceptor.
- /**
- * This function is used to obtain the locally bound endpoint of the acceptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns An object that represents the local endpoint of the acceptor.
- * Returns a default-constructed endpoint object if an error occurred and the
- * error handler did not throw an exception.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::system::error_code ec;
- * boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- endpoint_type local_endpoint(boost::system::error_code& ec) const
- {
- return this->get_service().local_endpoint(this->get_implementation(), ec);
- }
-
- /// Wait for the acceptor to become ready to read, ready to write, or to have
- /// pending error conditions.
- /**
- * This function is used to perform a blocking wait for an acceptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired acceptor state.
- *
- * @par Example
- * Waiting for an acceptor to become readable.
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * acceptor.wait(boost::asio::ip::tcp::acceptor::wait_read);
- * @endcode
- */
- void wait(wait_type w)
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Wait for the acceptor to become ready to read, ready to write, or to have
- /// pending error conditions.
- /**
- * This function is used to perform a blocking wait for an acceptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired acceptor state.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * Waiting for an acceptor to become readable.
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::system::error_code ec;
- * acceptor.wait(boost::asio::ip::tcp::acceptor::wait_read, ec);
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the acceptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- /**
- * This function is used to perform an asynchronous wait for an acceptor to
- * enter a ready to read, write or error condition state.
- *
- * @param w Specifies the desired acceptor state.
- *
- * @param handler The handler to be called when the wait 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
- * ); @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
- * void wait_handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Wait succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * acceptor.async_wait(
- * boost::asio::ip::tcp::acceptor::wait_read,
- * wait_handler);
- * @endcode
- */
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- w, BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- w, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer into the
- * given socket. The function call will block until a new connection has been
- * accepted successfully or an error occurs.
- *
- * @param peer The socket into which the new connection will be accepted.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(io_context);
- * acceptor.accept(socket);
- * @endcode
- */
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename SocketService>
- void accept(basic_socket<Protocol1, SocketService>& peer,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1>
- void accept(basic_socket<Protocol1>& peer,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- {
- boost::system::error_code ec;
- this->get_service().accept(this->get_implementation(),
- peer, static_cast<endpoint_type*>(0), ec);
- boost::asio::detail::throw_error(ec, "accept");
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer into the
- * given socket. The function call will block until a new connection has been
- * accepted successfully or an error occurs.
- *
- * @param peer The socket into which the new connection will be accepted.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::system::error_code ec;
- * acceptor.accept(socket, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename SocketService>
- BOOST_ASIO_SYNC_OP_VOID accept(
- basic_socket<Protocol1, SocketService>& peer,
- boost::system::error_code& ec,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1>
- BOOST_ASIO_SYNC_OP_VOID accept(
- basic_socket<Protocol1>& peer, boost::system::error_code& ec,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- {
- this->get_service().accept(this->get_implementation(),
- peer, static_cast<endpoint_type*>(0), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous accept.
- /**
- * This function is used to asynchronously accept a new connection into a
- * socket. The function call always returns immediately.
- *
- * @param peer The socket into which the new connection will be accepted.
- * Ownership of the peer object is retained by the caller, which must
- * guarantee that it is valid until the handler is called.
- *
- * @param handler The handler to be called when the accept 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.
- * ); @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
- * void accept_handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Accept succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(io_context);
- * acceptor.async_accept(socket, accept_handler);
- * @endcode
- */
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename SocketService, typename AcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (boost::system::error_code))
- async_accept(basic_socket<Protocol1, SocketService>& peer,
- BOOST_ASIO_MOVE_ARG(AcceptHandler) handler,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename AcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (boost::system::error_code))
- async_accept(basic_socket<Protocol1>& peer,
- BOOST_ASIO_MOVE_ARG(AcceptHandler) handler,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a AcceptHandler.
- BOOST_ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(),
- peer, static_cast<endpoint_type*>(0),
- BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<AcceptHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- peer, static_cast<endpoint_type*>(0), init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Accept a new connection and obtain the endpoint of the peer
- /**
- * This function is used to accept a new connection from a peer into the
- * given socket, and additionally provide the endpoint of the remote peer.
- * The function call will block until a new connection has been accepted
- * successfully or an error occurs.
- *
- * @param peer The socket into which the new connection will be accepted.
- *
- * @param peer_endpoint An endpoint object which will receive the endpoint of
- * the remote peer.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::asio::ip::tcp::endpoint endpoint;
- * acceptor.accept(socket, endpoint);
- * @endcode
- */
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename SocketService>
- void accept(basic_socket<protocol_type, SocketService>& peer,
- endpoint_type& peer_endpoint)
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- void accept(basic_socket<protocol_type>& peer, endpoint_type& peer_endpoint)
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- {
- boost::system::error_code ec;
- this->get_service().accept(this->get_implementation(),
- peer, &peer_endpoint, ec);
- boost::asio::detail::throw_error(ec, "accept");
- }
-
- /// Accept a new connection and obtain the endpoint of the peer
- /**
- * This function is used to accept a new connection from a peer into the
- * given socket, and additionally provide the endpoint of the remote peer.
- * The function call will block until a new connection has been accepted
- * successfully or an error occurs.
- *
- * @param peer The socket into which the new connection will be accepted.
- *
- * @param peer_endpoint An endpoint object which will receive the endpoint of
- * the remote peer.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(io_context);
- * boost::asio::ip::tcp::endpoint endpoint;
- * boost::system::error_code ec;
- * acceptor.accept(socket, endpoint, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename SocketService>
- BOOST_ASIO_SYNC_OP_VOID accept(
- basic_socket<protocol_type, SocketService>& peer,
- endpoint_type& peer_endpoint, boost::system::error_code& ec)
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- BOOST_ASIO_SYNC_OP_VOID accept(basic_socket<protocol_type>& peer,
- endpoint_type& peer_endpoint, boost::system::error_code& ec)
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- {
- this->get_service().accept(
- this->get_implementation(), peer, &peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous accept.
- /**
- * This function is used to asynchronously accept a new connection into a
- * socket, and additionally obtain the endpoint of the remote peer. The
- * function call always returns immediately.
- *
- * @param peer The socket into which the new connection will be accepted.
- * Ownership of the peer object is retained by the caller, which must
- * guarantee that it is valid until the handler is called.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written. Ownership of the peer_endpoint object is
- * retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param handler The handler to be called when the accept 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.
- * ); @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().
- */
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename SocketService, typename AcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (boost::system::error_code))
- async_accept(basic_socket<protocol_type, SocketService>& peer,
- endpoint_type& peer_endpoint, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler)
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- template <typename AcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (boost::system::error_code))
- async_accept(basic_socket<protocol_type>& peer,
- endpoint_type& peer_endpoint, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler)
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a AcceptHandler.
- BOOST_ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(), peer,
- &peer_endpoint, BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<AcceptHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- peer, &peer_endpoint, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @returns A socket object representing the newly accepted connection.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(acceptor.accept());
- * @endcode
- */
- typename Protocol::socket accept()
- {
- boost::system::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(
- this->get_implementation(), 0, 0, ec));
- boost::asio::detail::throw_error(ec, "accept");
- return peer;
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns On success, a socket object representing the newly accepted
- * connection. On error, a socket object where is_open() is false.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(acceptor.accept(ec));
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- typename Protocol::socket accept(boost::system::error_code& ec)
- {
- return this->get_service().accept(this->get_implementation(), 0, 0, ec);
- }
-
- /// Start an asynchronous accept.
- /**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param handler The handler to be called when the accept 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.
- * typename Protocol::socket peer // On success, the newly accepted socket.
- * ); @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
- * void accept_handler(const boost::system::error_code& error,
- * boost::asio::ip::tcp::socket peer)
- * {
- * if (!error)
- * {
- * // Accept succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * acceptor.async_accept(accept_handler);
- * @endcode
- */
- template <typename MoveAcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (boost::system::error_code, typename Protocol::socket))
- async_accept(BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(
- this->get_implementation(), static_cast<boost::asio::io_context*>(0),
- static_cast<endpoint_type*>(0),
- BOOST_ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
- void (boost::system::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(
- this->get_implementation(), static_cast<boost::asio::io_context*>(0),
- static_cast<endpoint_type*>(0), init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
- *
- * @returns A socket object representing the newly accepted connection.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(acceptor.accept());
- * @endcode
- */
- typename Protocol::socket accept(boost::asio::io_context& io_context)
- {
- boost::system::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0), ec));
- boost::asio::detail::throw_error(ec, "accept");
- return peer;
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns On success, a socket object representing the newly accepted
- * connection. On error, a socket object where is_open() is false.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::socket socket(acceptor.accept(io_context2, ec));
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- typename Protocol::socket accept(
- boost::asio::io_context& io_context, boost::system::error_code& ec)
- {
- return this->get_service().accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0), ec);
- }
-
- /// Start an asynchronous accept.
- /**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
- *
- * @param handler The handler to be called when the accept 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.
- * typename Protocol::socket peer // On success, the newly accepted socket.
- * ); @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
- * void accept_handler(const boost::system::error_code& error,
- * boost::asio::ip::tcp::socket peer)
- * {
- * if (!error)
- * {
- * // Accept succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * acceptor.async_accept(io_context2, accept_handler);
- * @endcode
- */
- template <typename MoveAcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (boost::system::error_code, typename Protocol::socket))
- async_accept(boost::asio::io_context& io_context,
- BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0),
- BOOST_ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
- void (boost::system::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0), init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written.
- *
- * @returns A socket object representing the newly accepted connection.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint;
- * boost::asio::ip::tcp::socket socket(acceptor.accept(endpoint));
- * @endcode
- */
- typename Protocol::socket accept(endpoint_type& peer_endpoint)
- {
- boost::system::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(this->get_implementation(),
- static_cast<boost::asio::io_context*>(0), &peer_endpoint, ec));
- boost::asio::detail::throw_error(ec, "accept");
- return peer;
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns On success, a socket object representing the newly accepted
- * connection. On error, a socket object where is_open() is false.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint;
- * boost::asio::ip::tcp::socket socket(acceptor.accept(endpoint, ec));
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- typename Protocol::socket accept(
- endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- return this->get_service().accept(this->get_implementation(),
- static_cast<boost::asio::io_context*>(0), &peer_endpoint, ec);
- }
-
- /// Start an asynchronous accept.
- /**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written. Ownership of the peer_endpoint object is
- * retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param handler The handler to be called when the accept 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.
- * typename Protocol::socket peer // On success, the newly accepted socket.
- * ); @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
- * void accept_handler(const boost::system::error_code& error,
- * boost::asio::ip::tcp::socket peer)
- * {
- * if (!error)
- * {
- * // Accept succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint;
- * acceptor.async_accept(endpoint, accept_handler);
- * @endcode
- */
- template <typename MoveAcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (boost::system::error_code, typename Protocol::socket))
- async_accept(endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(),
- static_cast<boost::asio::io_context*>(0), &peer_endpoint,
- BOOST_ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
- void (boost::system::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- static_cast<boost::asio::io_context*>(0), &peer_endpoint,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written.
- *
- * @returns A socket object representing the newly accepted connection.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint;
- * boost::asio::ip::tcp::socket socket(
- * acceptor.accept(io_context2, endpoint));
- * @endcode
- */
- typename Protocol::socket accept(
- boost::asio::io_context& io_context, endpoint_type& peer_endpoint)
- {
- boost::system::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(this->get_implementation(),
- &io_context, &peer_endpoint, ec));
- boost::asio::detail::throw_error(ec, "accept");
- return peer;
- }
-
- /// Accept a new connection.
- /**
- * This function is used to accept a new connection from a peer. The function
- * call will block until a new connection has been accepted successfully or
- * an error occurs.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns On success, a socket object representing the newly accepted
- * connection. On error, a socket object where is_open() is false.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint;
- * boost::asio::ip::tcp::socket socket(
- * acceptor.accept(io_context2, endpoint, ec));
- * if (ec)
- * {
- * // An error occurred.
- * }
- * @endcode
- */
- typename Protocol::socket accept(boost::asio::io_context& io_context,
- endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- return this->get_service().accept(this->get_implementation(),
- &io_context, &peer_endpoint, ec);
- }
-
- /// Start an asynchronous accept.
- /**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
- *
- * This overload requires that the Protocol template parameter satisfy the
- * AcceptableProtocol type requirements.
- *
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
- *
- * @param peer_endpoint An endpoint object into which the endpoint of the
- * remote peer will be written. Ownership of the peer_endpoint object is
- * retained by the caller, which must guarantee that it is valid until the
- * handler is called.
- *
- * @param handler The handler to be called when the accept 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.
- * typename Protocol::socket peer // On success, the newly accepted socket.
- * ); @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
- * void accept_handler(const boost::system::error_code& error,
- * boost::asio::ip::tcp::socket peer)
- * {
- * if (!error)
- * {
- * // Accept succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::ip::tcp::endpoint endpoint;
- * acceptor.async_accept(io_context2, endpoint, accept_handler);
- * @endcode
- */
- template <typename MoveAcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (boost::system::error_code, typename Protocol::socket))
- async_accept(boost::asio::io_context& io_context,
- endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(
- this->get_implementation(), &io_context, &peer_endpoint,
- BOOST_ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
- void (boost::system::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- &io_context, &peer_endpoint, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-};
-
-} // 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_BASIC_SOCKET_ACCEPTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp
deleted file mode 100644
index 7a7cab9c93a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp
+++ /dev/null
@@ -1,432 +0,0 @@
-//
-// basic_socket_iostream.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_BASIC_SOCKET_IOSTREAM_HPP
-#define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_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_NO_IOSTREAM)
-
-#include <istream>
-#include <ostream>
-#include <boost/asio/basic_socket_streambuf.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/stream_socket_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include <boost/asio/detail/variadic_templates.hpp>
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// explicit basic_socket_iostream(T1 x1, ..., Tn xn)
-// : std::basic_iostream<char>(
-// &this->detail::socket_iostream_base<
-// Protocol BOOST_ASIO_SVC_TARG, Clock,
-// WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_)
-// {
-// if (rdbuf()->connect(x1, ..., xn) == 0)
-// this->setstate(std::ios_base::failbit);
-// }
-// This macro should only persist within this file.
-
-# define BOOST_ASIO_PRIVATE_CTR_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- explicit basic_socket_iostream(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- : std::basic_iostream<char>( \
- &this->detail::socket_iostream_base< \
- Protocol BOOST_ASIO_SVC_TARG, Clock, \
- WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_) \
- { \
- this->setf(std::ios_base::unitbuf); \
- if (rdbuf()->connect(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
- this->setstate(std::ios_base::failbit); \
- } \
- /**/
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// void connect(T1 x1, ..., Tn xn)
-// {
-// if (rdbuf()->connect(x1, ..., xn) == 0)
-// this->setstate(std::ios_base::failbit);
-// }
-// This macro should only persist within this file.
-
-# define BOOST_ASIO_PRIVATE_CONNECT_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void connect(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- if (rdbuf()->connect(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
- this->setstate(std::ios_base::failbit); \
- } \
- /**/
-
-#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// A separate base class is used to ensure that the streambuf is initialised
-// prior to the basic_socket_iostream's basic_iostream base class.
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Clock, typename WaitTraits BOOST_ASIO_SVC_TPARAM1>
-class socket_iostream_base
-{
-protected:
- socket_iostream_base()
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- socket_iostream_base(socket_iostream_base&& other)
- : streambuf_(std::move(other.streambuf_))
- {
- }
-
- socket_iostream_base(basic_stream_socket<Protocol> s)
- : streambuf_(std::move(s))
- {
- }
-
- socket_iostream_base& operator=(socket_iostream_base&& other)
- {
- streambuf_ = std::move(other.streambuf_);
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- basic_socket_streambuf<Protocol BOOST_ASIO_SVC_TARG,
- Clock, WaitTraits BOOST_ASIO_SVC_TARG1> streambuf_;
-};
-
-} // namespace detail
-
-#if !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
-#define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
-
-// Forward declaration with defaulted arguments.
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-class basic_socket_iostream;
-
-#endif // !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
-
-/// Iostream interface for a socket.
-#if defined(GENERATING_DOCUMENTATION)
-template <typename Protocol,
- typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
-#else // defined(GENERATING_DOCUMENTATION)
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Clock, typename WaitTraits BOOST_ASIO_SVC_TPARAM1>
-#endif // defined(GENERATING_DOCUMENTATION)
-class basic_socket_iostream
- : private detail::socket_iostream_base<Protocol
- BOOST_ASIO_SVC_TARG, Clock, WaitTraits BOOST_ASIO_SVC_TARG1>,
- public std::basic_iostream<char>
-{
-private:
- // These typedefs are intended keep this class's implementation independent
- // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typedef WaitTraits traits_helper;
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-
-public:
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// The clock type.
- typedef Clock clock_type;
-
-#if defined(GENERATING_DOCUMENTATION)
- /// (Deprecated: Use time_point.) The time type.
- typedef typename WaitTraits::time_type time_type;
-
- /// The time type.
- typedef typename WaitTraits::time_point time_point;
-
- /// (Deprecated: Use duration.) The duration type.
- typedef typename WaitTraits::duration_type duration_type;
-
- /// The duration type.
- typedef typename WaitTraits::duration duration;
-#else
-# if !defined(BOOST_ASIO_NO_DEPRECATED)
- typedef typename traits_helper::time_type time_type;
- typedef typename traits_helper::duration_type duration_type;
-# endif // !defined(BOOST_ASIO_NO_DEPRECATED)
- typedef typename traits_helper::time_type time_point;
- typedef typename traits_helper::duration_type duration;
-#endif
-
- /// Construct a basic_socket_iostream without establishing a connection.
- basic_socket_iostream()
- : std::basic_iostream<char>(
- &this->detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_)
- {
- this->setf(std::ios_base::unitbuf);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Construct a basic_socket_iostream from the supplied socket.
- explicit basic_socket_iostream(basic_stream_socket<protocol_type> s)
- : detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>(std::move(s)),
- std::basic_iostream<char>(
- &this->detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_)
- {
- this->setf(std::ios_base::unitbuf);
- }
-
-#if defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE) \
- || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_socket_iostream from another.
- basic_socket_iostream(basic_socket_iostream&& other)
- : detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>(std::move(other)),
- std::basic_iostream<char>(std::move(other))
- {
- this->set_rdbuf(&this->detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_);
- }
-
- /// Move-assign a basic_socket_iostream from another.
- basic_socket_iostream& operator=(basic_socket_iostream&& other)
- {
- std::basic_iostream<char>::operator=(std::move(other));
- detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE)
- // || defined(GENERATING_DOCUMENTATION)
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#if defined(GENERATING_DOCUMENTATION)
- /// Establish a connection to an endpoint corresponding to a resolver query.
- /**
- * This constructor automatically establishes a connection based on the
- * supplied resolver query parameters. The arguments are used to construct
- * a resolver query object.
- */
- template <typename T1, ..., typename TN>
- explicit basic_socket_iostream(T1 t1, ..., TN tn);
-#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
- template <typename... T>
- explicit basic_socket_iostream(T... x)
- : std::basic_iostream<char>(
- &this->detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_)
- {
- this->setf(std::ios_base::unitbuf);
- if (rdbuf()->connect(x...) == 0)
- this->setstate(std::ios_base::failbit);
- }
-#else
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CTR_DEF)
-#endif
-
-#if defined(GENERATING_DOCUMENTATION)
- /// Establish a connection to an endpoint corresponding to a resolver query.
- /**
- * This function automatically establishes a connection based on the supplied
- * resolver query parameters. The arguments are used to construct a resolver
- * query object.
- */
- template <typename T1, ..., typename TN>
- void connect(T1 t1, ..., TN tn);
-#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
- template <typename... T>
- void connect(T... x)
- {
- if (rdbuf()->connect(x...) == 0)
- this->setstate(std::ios_base::failbit);
- }
-#else
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CONNECT_DEF)
-#endif
-
- /// Close the connection.
- void close()
- {
- if (rdbuf()->close() == 0)
- this->setstate(std::ios_base::failbit);
- }
-
- /// Return a pointer to the underlying streambuf.
- basic_socket_streambuf<Protocol BOOST_ASIO_SVC_TARG,
- Clock, WaitTraits BOOST_ASIO_SVC_TARG1>* rdbuf() const
- {
- return const_cast<basic_socket_streambuf<Protocol BOOST_ASIO_SVC_TARG,
- Clock, WaitTraits BOOST_ASIO_SVC_TARG1>*>(
- &this->detail::socket_iostream_base<
- Protocol BOOST_ASIO_SVC_TARG, Clock,
- WaitTraits BOOST_ASIO_SVC_TARG1>::streambuf_);
- }
-
- /// Get a reference to the underlying socket.
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket()
- {
- return rdbuf()->socket();
- }
-
- /// Get the last error associated with the stream.
- /**
- * @return An \c error_code corresponding to the last error from the stream.
- *
- * @par Example
- * To print the error associated with a failure to establish a connection:
- * @code tcp::iostream s("www.boost.org", "http");
- * if (!s)
- * {
- * std::cout << "Error: " << s.error().message() << std::endl;
- * } @endcode
- */
- const boost::system::error_code& error() const
- {
- return rdbuf()->error();
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the stream's expiry time as an absolute
- /// time.
- /**
- * @return An absolute time value representing the stream's expiry time.
- */
- time_point expires_at() const
- {
- return rdbuf()->expires_at();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the stream's expiry time as an absolute time.
- /**
- * @return An absolute time value representing the stream's expiry time.
- */
- time_point expiry() const
- {
- return rdbuf()->expiry();
- }
-
- /// Set the stream's expiry time as an absolute time.
- /**
- * This function sets the expiry time associated with the stream. Stream
- * operations performed after this time (where the operations cannot be
- * completed using the internal buffers) will fail with the error
- * boost::asio::error::operation_aborted.
- *
- * @param expiry_time The expiry time to be used for the stream.
- */
- void expires_at(const time_point& expiry_time)
- {
- rdbuf()->expires_at(expiry_time);
- }
-
- /// Set the stream's expiry time relative to now.
- /**
- * This function sets the expiry time associated with the stream. Stream
- * operations performed after this time (where the operations cannot be
- * completed using the internal buffers) will fail with the error
- * boost::asio::error::operation_aborted.
- *
- * @param expiry_time The expiry time to be used for the timer.
- */
- void expires_after(const duration& expiry_time)
- {
- rdbuf()->expires_after(expiry_time);
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the stream's expiry time relative to now.
- /**
- * @return A relative time value representing the stream's expiry time.
- */
- duration expires_from_now() const
- {
- return rdbuf()->expires_from_now();
- }
-
- /// (Deprecated: Use expires_after().) Set the stream's expiry time relative
- /// to now.
- /**
- * This function sets the expiry time associated with the stream. Stream
- * operations performed after this time (where the operations cannot be
- * completed using the internal buffers) will fail with the error
- * boost::asio::error::operation_aborted.
- *
- * @param expiry_time The expiry time to be used for the timer.
- */
- void expires_from_now(const duration& expiry_time)
- {
- rdbuf()->expires_from_now(expiry_time);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-private:
- // Disallow copying and assignment.
- basic_socket_iostream(const basic_socket_iostream&) BOOST_ASIO_DELETED;
- basic_socket_iostream& operator=(
- const basic_socket_iostream&) BOOST_ASIO_DELETED;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-# undef BOOST_ASIO_PRIVATE_CTR_DEF
-# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
-#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_BASIC_SOCKET_IOSTREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp
deleted file mode 100644
index 0a2bbe56a65..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp
+++ /dev/null
@@ -1,709 +0,0 @@
-//
-// basic_socket_streambuf.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_BASIC_SOCKET_STREAMBUF_HPP
-#define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_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_NO_IOSTREAM)
-
-#include <streambuf>
-#include <vector>
-#include <boost/asio/basic_socket.hpp>
-#include <boost/asio/basic_stream_socket.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/stream_socket_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-# if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/deadline_timer_service.hpp>
-# else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/detail/deadline_timer_service.hpp>
-# endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-# include <boost/asio/steady_timer.hpp>
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-
-#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include <boost/asio/detail/variadic_templates.hpp>
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// basic_socket_streambuf* connect(T1 x1, ..., Tn xn)
-// {
-// init_buffers();
-// typedef typename Protocol::resolver resolver_type;
-// resolver_type resolver(socket().get_executor().context());
-// connect_to_endpoints(
-// resolver.resolve(x1, ..., xn, ec_));
-// return !ec_ ? this : 0;
-// }
-// This macro should only persist within this file.
-
-# define BOOST_ASIO_PRIVATE_CONNECT_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- basic_socket_streambuf* connect(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- init_buffers(); \
- typedef typename Protocol::resolver resolver_type; \
- resolver_type resolver(socket().get_executor().context()); \
- connect_to_endpoints( \
- resolver.resolve(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n), ec_)); \
- return !ec_ ? this : 0; \
- } \
- /**/
-
-#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# define BOOST_ASIO_SVC_T1 detail::deadline_timer_service<traits_helper>
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// A separate base class is used to ensure that the io_context member is
-// initialised prior to the basic_socket_streambuf's basic_socket base class.
-class socket_streambuf_io_context
-{
-protected:
- socket_streambuf_io_context(io_context* ctx)
- : default_io_context_(ctx)
- {
- }
-
- shared_ptr<io_context> default_io_context_;
-};
-
-// A separate base class is used to ensure that the dynamically allocated
-// buffers are constructed prior to the basic_socket_streambuf's basic_socket
-// base class. This makes moving the socket is the last potentially throwing
-// step in the streambuf's move constructor, giving the constructor a strong
-// exception safety guarantee.
-class socket_streambuf_buffers
-{
-protected:
- socket_streambuf_buffers()
- : get_buffer_(buffer_size),
- put_buffer_(buffer_size)
- {
- }
-
- enum { buffer_size = 512 };
- std::vector<char> get_buffer_;
- std::vector<char> put_buffer_;
-};
-
-} // namespace detail
-
-#if !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
-#define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
-
-// Forward declaration with defaulted arguments.
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-class basic_socket_streambuf;
-
-#endif // !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
-
-/// Iostream streambuf for a socket.
-#if defined(GENERATING_DOCUMENTATION)
-template <typename Protocol,
- typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
-#else // defined(GENERATING_DOCUMENTATION)
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Clock, typename WaitTraits BOOST_ASIO_SVC_TPARAM1>
-#endif // defined(GENERATING_DOCUMENTATION)
-class basic_socket_streambuf
- : public std::streambuf,
- private detail::socket_streambuf_io_context,
- private detail::socket_streambuf_buffers,
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- private basic_socket<Protocol BOOST_ASIO_SVC_TARG>
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- public basic_socket<Protocol BOOST_ASIO_SVC_TARG>
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-{
-private:
- // These typedefs are intended keep this class's implementation independent
- // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typedef WaitTraits traits_helper;
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-
-public:
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// The clock type.
- typedef Clock clock_type;
-
-#if defined(GENERATING_DOCUMENTATION)
- /// (Deprecated: Use time_point.) The time type.
- typedef typename WaitTraits::time_type time_type;
-
- /// The time type.
- typedef typename WaitTraits::time_point time_point;
-
- /// (Deprecated: Use duration.) The duration type.
- typedef typename WaitTraits::duration_type duration_type;
-
- /// The duration type.
- typedef typename WaitTraits::duration duration;
-#else
-# if !defined(BOOST_ASIO_NO_DEPRECATED)
- typedef typename traits_helper::time_type time_type;
- typedef typename traits_helper::duration_type duration_type;
-# endif // !defined(BOOST_ASIO_NO_DEPRECATED)
- typedef typename traits_helper::time_type time_point;
- typedef typename traits_helper::duration_type duration;
-#endif
-
- /// Construct a basic_socket_streambuf without establishing a connection.
- basic_socket_streambuf()
- : detail::socket_streambuf_io_context(new io_context),
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>(*default_io_context_),
- expiry_time_(max_expiry_time())
- {
- init_buffers();
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Construct a basic_socket_streambuf from the supplied socket.
- explicit basic_socket_streambuf(basic_stream_socket<protocol_type> s)
- : detail::socket_streambuf_io_context(0),
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(s)),
- expiry_time_(max_expiry_time())
- {
- init_buffers();
- }
-
- /// Move-construct a basic_socket_streambuf from another.
- basic_socket_streambuf(basic_socket_streambuf&& other)
- : detail::socket_streambuf_io_context(other),
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other.socket())),
- ec_(other.ec_),
- expiry_time_(other.expiry_time_)
- {
- get_buffer_.swap(other.get_buffer_);
- put_buffer_.swap(other.put_buffer_);
- setg(other.eback(), other.gptr(), other.egptr());
- setp(other.pptr(), other.epptr());
- other.ec_ = boost::system::error_code();
- other.expiry_time_ = max_expiry_time();
- other.init_buffers();
- }
-
- /// Move-assign a basic_socket_streambuf from another.
- basic_socket_streambuf& operator=(basic_socket_streambuf&& other)
- {
- this->close();
- socket() = std::move(other.socket());
- detail::socket_streambuf_io_context::operator=(other);
- ec_ = other.ec_;
- expiry_time_ = other.expiry_time_;
- get_buffer_.swap(other.get_buffer_);
- put_buffer_.swap(other.put_buffer_);
- setg(other.eback(), other.gptr(), other.egptr());
- setp(other.pptr(), other.epptr());
- other.ec_ = boost::system::error_code();
- other.expiry_time_ = max_expiry_time();
- other.put_buffer_.resize(buffer_size);
- other.init_buffers();
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destructor flushes buffered data.
- virtual ~basic_socket_streambuf()
- {
- if (pptr() != pbase())
- overflow(traits_type::eof());
- }
-
- /// Establish a connection.
- /**
- * This function establishes a connection to the specified endpoint.
- *
- * @return \c this if a connection was successfully established, a null
- * pointer otherwise.
- */
- basic_socket_streambuf* connect(const endpoint_type& endpoint)
- {
- init_buffers();
- ec_ = boost::system::error_code();
- this->connect_to_endpoints(&endpoint, &endpoint + 1);
- return !ec_ ? this : 0;
- }
-
-#if defined(GENERATING_DOCUMENTATION)
- /// Establish a connection.
- /**
- * This function automatically establishes a connection based on the supplied
- * resolver query parameters. The arguments are used to construct a resolver
- * query object.
- *
- * @return \c this if a connection was successfully established, a null
- * pointer otherwise.
- */
- template <typename T1, ..., typename TN>
- basic_socket_streambuf* connect(T1 t1, ..., TN tn);
-#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
- template <typename... T>
- basic_socket_streambuf* connect(T... x)
- {
- init_buffers();
- typedef typename Protocol::resolver resolver_type;
- resolver_type resolver(socket().get_executor().context());
- connect_to_endpoints(resolver.resolve(x..., ec_));
- return !ec_ ? this : 0;
- }
-#else
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CONNECT_DEF)
-#endif
-
- /// Close the connection.
- /**
- * @return \c this if a connection was successfully established, a null
- * pointer otherwise.
- */
- basic_socket_streambuf* close()
- {
- sync();
- socket().close(ec_);
- if (!ec_)
- init_buffers();
- return !ec_ ? this : 0;
- }
-
- /// Get a reference to the underlying socket.
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket()
- {
- return *this;
- }
-
- /// Get the last error associated with the stream buffer.
- /**
- * @return An \c error_code corresponding to the last error from the stream
- * buffer.
- */
- const boost::system::error_code& error() const
- {
- return ec_;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use error().) Get the last error associated with the stream
- /// buffer.
- /**
- * @return An \c error_code corresponding to the last error from the stream
- * buffer.
- */
- const boost::system::error_code& puberror() const
- {
- return error();
- }
-
- /// (Deprecated: Use expiry().) Get the stream buffer's expiry time as an
- /// absolute time.
- /**
- * @return An absolute time value representing the stream buffer's expiry
- * time.
- */
- time_point expires_at() const
- {
- return expiry_time_;
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the stream buffer's expiry time as an absolute time.
- /**
- * @return An absolute time value representing the stream buffer's expiry
- * time.
- */
- time_point expiry() const
- {
- return expiry_time_;
- }
-
- /// Set the stream buffer's expiry time as an absolute time.
- /**
- * This function sets the expiry time associated with the stream. Stream
- * operations performed after this time (where the operations cannot be
- * completed using the internal buffers) will fail with the error
- * boost::asio::error::operation_aborted.
- *
- * @param expiry_time The expiry time to be used for the stream.
- */
- void expires_at(const time_point& expiry_time)
- {
- expiry_time_ = expiry_time;
- }
-
- /// Set the stream buffer's expiry time relative to now.
- /**
- * This function sets the expiry time associated with the stream. Stream
- * operations performed after this time (where the operations cannot be
- * completed using the internal buffers) will fail with the error
- * boost::asio::error::operation_aborted.
- *
- * @param expiry_time The expiry time to be used for the timer.
- */
- void expires_after(const duration& expiry_time)
- {
- expiry_time_ = traits_helper::add(traits_helper::now(), expiry_time);
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the stream buffer's expiry time relative
- /// to now.
- /**
- * @return A relative time value representing the stream buffer's expiry time.
- */
- duration expires_from_now() const
- {
- return traits_helper::subtract(expires_at(), traits_helper::now());
- }
-
- /// (Deprecated: Use expires_after().) Set the stream buffer's expiry time
- /// relative to now.
- /**
- * This function sets the expiry time associated with the stream. Stream
- * operations performed after this time (where the operations cannot be
- * completed using the internal buffers) will fail with the error
- * boost::asio::error::operation_aborted.
- *
- * @param expiry_time The expiry time to be used for the timer.
- */
- void expires_from_now(const duration& expiry_time)
- {
- expiry_time_ = traits_helper::add(traits_helper::now(), expiry_time);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-protected:
- int_type underflow()
- {
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- ec_ = boost::asio::error::operation_not_supported;
- return traits_type::eof();
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- if (gptr() != egptr())
- return traits_type::eof();
-
- for (;;)
- {
- // Check if we are past the expiry time.
- if (traits_helper::less_than(expiry_time_, traits_helper::now()))
- {
- ec_ = boost::asio::error::timed_out;
- return traits_type::eof();
- }
-
- // Try to complete the operation without blocking.
- if (!socket().native_non_blocking())
- socket().native_non_blocking(true, ec_);
- detail::buffer_sequence_adapter<mutable_buffer, mutable_buffer>
- bufs(boost::asio::buffer(get_buffer_) + putback_max);
- detail::signed_size_type bytes = detail::socket_ops::recv(
- socket().native_handle(), bufs.buffers(), bufs.count(), 0, ec_);
-
- // Check if operation succeeded.
- if (bytes > 0)
- {
- setg(&get_buffer_[0], &get_buffer_[0] + putback_max,
- &get_buffer_[0] + putback_max + bytes);
- return traits_type::to_int_type(*gptr());
- }
-
- // Check for EOF.
- if (bytes == 0)
- {
- ec_ = boost::asio::error::eof;
- return traits_type::eof();
- }
-
- // Operation failed.
- if (ec_ != boost::asio::error::would_block
- && ec_ != boost::asio::error::try_again)
- return traits_type::eof();
-
- // Wait for socket to become ready.
- if (detail::socket_ops::poll_read(
- socket().native_handle(), 0, timeout(), ec_) < 0)
- return traits_type::eof();
- }
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- }
-
- int_type overflow(int_type c)
- {
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- ec_ = boost::asio::error::operation_not_supported;
- return traits_type::eof();
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- char_type ch = traits_type::to_char_type(c);
-
- // Determine what needs to be sent.
- const_buffer output_buffer;
- if (put_buffer_.empty())
- {
- if (traits_type::eq_int_type(c, traits_type::eof()))
- return traits_type::not_eof(c); // Nothing to do.
- output_buffer = boost::asio::buffer(&ch, sizeof(char_type));
- }
- else
- {
- output_buffer = boost::asio::buffer(pbase(),
- (pptr() - pbase()) * sizeof(char_type));
- }
-
- while (output_buffer.size() > 0)
- {
- // Check if we are past the expiry time.
- if (traits_helper::less_than(expiry_time_, traits_helper::now()))
- {
- ec_ = boost::asio::error::timed_out;
- return traits_type::eof();
- }
-
- // Try to complete the operation without blocking.
- if (!socket().native_non_blocking())
- socket().native_non_blocking(true, ec_);
- detail::buffer_sequence_adapter<
- const_buffer, const_buffer> bufs(output_buffer);
- detail::signed_size_type bytes = detail::socket_ops::send(
- socket().native_handle(), bufs.buffers(), bufs.count(), 0, ec_);
-
- // Check if operation succeeded.
- if (bytes > 0)
- {
- output_buffer += static_cast<std::size_t>(bytes);
- continue;
- }
-
- // Operation failed.
- if (ec_ != boost::asio::error::would_block
- && ec_ != boost::asio::error::try_again)
- return traits_type::eof();
-
- // Wait for socket to become ready.
- if (detail::socket_ops::poll_write(
- socket().native_handle(), 0, timeout(), ec_) < 0)
- return traits_type::eof();
- }
-
- if (!put_buffer_.empty())
- {
- setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
-
- // If the new character is eof then our work here is done.
- if (traits_type::eq_int_type(c, traits_type::eof()))
- return traits_type::not_eof(c);
-
- // Add the new character to the output buffer.
- *pptr() = ch;
- pbump(1);
- }
-
- return c;
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- }
-
- int sync()
- {
- return overflow(traits_type::eof());
- }
-
- std::streambuf* setbuf(char_type* s, std::streamsize n)
- {
- if (pptr() == pbase() && s == 0 && n == 0)
- {
- put_buffer_.clear();
- setp(0, 0);
- sync();
- return this;
- }
-
- return 0;
- }
-
-private:
- // Disallow copying and assignment.
- basic_socket_streambuf(const basic_socket_streambuf&) BOOST_ASIO_DELETED;
- basic_socket_streambuf& operator=(
- const basic_socket_streambuf&) BOOST_ASIO_DELETED;
-
- void init_buffers()
- {
- setg(&get_buffer_[0],
- &get_buffer_[0] + putback_max,
- &get_buffer_[0] + putback_max);
-
- if (put_buffer_.empty())
- setp(0, 0);
- else
- setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
- }
-
- int timeout() const
- {
- int64_t msec = traits_helper::to_posix_duration(
- traits_helper::subtract(expiry_time_,
- traits_helper::now())).total_milliseconds();
- if (msec > (std::numeric_limits<int>::max)())
- msec = (std::numeric_limits<int>::max)();
- else if (msec < 0)
- msec = 0;
- return static_cast<int>(msec);
- }
-
- template <typename EndpointSequence>
- void connect_to_endpoints(const EndpointSequence& endpoints)
- {
- this->connect_to_endpoints(endpoints.begin(), endpoints.end());
- }
-
- template <typename EndpointIterator>
- void connect_to_endpoints(EndpointIterator begin, EndpointIterator end)
- {
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- ec_ = boost::asio::error::operation_not_supported;
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- if (ec_)
- return;
-
- ec_ = boost::asio::error::not_found;
- for (EndpointIterator i = begin; i != end; ++i)
- {
- // Check if we are past the expiry time.
- if (traits_helper::less_than(expiry_time_, traits_helper::now()))
- {
- ec_ = boost::asio::error::timed_out;
- return;
- }
-
- // Close and reopen the socket.
- typename Protocol::endpoint ep(*i);
- socket().close(ec_);
- socket().open(ep.protocol(), ec_);
- if (ec_)
- continue;
-
- // Try to complete the operation without blocking.
- if (!socket().native_non_blocking())
- socket().native_non_blocking(true, ec_);
- detail::socket_ops::connect(socket().native_handle(),
- ep.data(), ep.size(), ec_);
-
- // Check if operation succeeded.
- if (!ec_)
- return;
-
- // Operation failed.
- if (ec_ != boost::asio::error::in_progress
- && ec_ != boost::asio::error::would_block)
- continue;
-
- // Wait for socket to become ready.
- if (detail::socket_ops::poll_connect(
- socket().native_handle(), timeout(), ec_) < 0)
- continue;
-
- // Get the error code from the connect operation.
- int connect_error = 0;
- size_t connect_error_len = sizeof(connect_error);
- if (detail::socket_ops::getsockopt(socket().native_handle(), 0,
- SOL_SOCKET, SO_ERROR, &connect_error, &connect_error_len, ec_)
- == detail::socket_error_retval)
- return;
-
- // Check the result of the connect operation.
- ec_ = boost::system::error_code(connect_error,
- boost::asio::error::get_system_category());
- if (!ec_)
- return;
- }
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- }
-
- // Helper function to get the maximum expiry time.
- static time_point max_expiry_time()
- {
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- return boost::posix_time::pos_infin;
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- return (time_point::max)();
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
- }
-
- enum { putback_max = 8 };
- boost::system::error_code ec_;
- time_point expiry_time_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# undef BOOST_ASIO_SVC_T1
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
-#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_BASIC_SOCKET_STREAMBUF_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp
deleted file mode 100644
index 9732c3c3031..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp
+++ /dev/null
@@ -1,923 +0,0 @@
-//
-// basic_stream_socket.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_BASIC_STREAM_SOCKET_HPP
-#define BOOST_ASIO_BASIC_STREAM_SOCKET_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/basic_socket.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/stream_socket_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides stream-oriented socket functionality.
-/**
- * The basic_stream_socket class template provides asynchronous and blocking
- * stream-oriented socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>)>
-class basic_stream_socket
- : public basic_socket<Protocol BOOST_ASIO_SVC_TARG>
-{
-public:
- /// The native representation of a socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename basic_socket<
- Protocol BOOST_ASIO_SVC_TARG>::native_handle_type native_handle_type;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- /// Construct a basic_stream_socket without opening it.
- /**
- * This constructor creates a stream socket without opening it. The socket
- * needs to be opened and then connected or accepted before data can be sent
- * or received on it.
- *
- * @param io_context The io_context object that the stream socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- */
- explicit basic_stream_socket(boost::asio::io_context& io_context)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context)
- {
- }
-
- /// Construct and open a basic_stream_socket.
- /**
- * This constructor creates and opens a stream socket. The socket needs to be
- * connected or accepted before data can be sent or received on it.
- *
- * @param io_context The io_context object that the stream socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_stream_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, protocol)
- {
- }
-
- /// Construct a basic_stream_socket, opening it and binding it to the given
- /// local endpoint.
- /**
- * This constructor creates a stream socket and automatically opens it bound
- * to the specified endpoint on the local machine. The protocol used is the
- * protocol associated with the given endpoint.
- *
- * @param io_context The io_context object that the stream socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- *
- * @param endpoint An endpoint on the local machine to which the stream
- * socket will be bound.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_stream_socket(boost::asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(io_context, endpoint)
- {
- }
-
- /// Construct a basic_stream_socket on an existing native socket.
- /**
- * This constructor creates a stream socket object to hold an existing native
- * socket.
- *
- * @param io_context The io_context object that the stream socket will use to
- * dispatch handlers for any asynchronous operations performed on the socket.
- *
- * @param protocol An object specifying protocol parameters to be used.
- *
- * @param native_socket The new underlying socket implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_stream_socket(boost::asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_stream_socket from another.
- /**
- * This constructor moves a stream socket from one object to another.
- *
- * @param other The other basic_stream_socket 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_stream_socket(io_context&) constructor.
- */
- basic_stream_socket(basic_stream_socket&& other)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_stream_socket from another.
- /**
- * This assignment operator moves a stream socket from one object to another.
- *
- * @param other The other basic_stream_socket 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_stream_socket(io_context&) constructor.
- */
- basic_stream_socket& operator=(basic_stream_socket&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-
- /// Move-construct a basic_stream_socket from a socket of another protocol
- /// type.
- /**
- * This constructor moves a stream socket from one object to another.
- *
- * @param other The other basic_stream_socket 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_stream_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- basic_stream_socket(
- basic_stream_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol BOOST_ASIO_SVC_TARG>(std::move(other))
- {
- }
-
- /// Move-assign a basic_stream_socket from a socket of another protocol type.
- /**
- * This assignment operator moves a stream socket from one object to another.
- *
- * @param other The other basic_stream_socket 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_stream_socket(io_context&) constructor.
- */
- template <typename Protocol1 BOOST_ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_stream_socket>::type& operator=(
- basic_stream_socket<Protocol1 BOOST_ASIO_SVC_TARG1>&& other)
- {
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the socket.
- /**
- * This function destroys the socket, cancelling any outstanding asynchronous
- * operations associated with the socket as if by calling @c cancel.
- */
- ~basic_stream_socket()
- {
- }
-
- /// Send some data on the socket.
- /**
- * This function is used to send data on the stream socket. The function
- * call will block until one or more bytes of the data has been sent
- * successfully, or an until error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The send 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.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.send(boost::asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on the socket.
- /**
- * This function is used to send data on the stream socket. The function
- * call will block until one or more bytes of the data has been sent
- * successfully, or an until error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @returns The number of bytes sent.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The send 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.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.send(boost::asio::buffer(data, size), 0);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "send");
- return s;
- }
-
- /// Send some data on the socket.
- /**
- * This function is used to send data on the stream socket. The function
- * call will block until one or more bytes of the data has been sent
- * successfully, or an until error occurs.
- *
- * @param buffers One or more data buffers to be sent on the socket.
- *
- * @param flags Flags specifying how the send call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes sent. Returns 0 if an error occurred.
- *
- * @note The send 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 send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send data on the stream socket.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 send 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 sent.
- * ); @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 The send 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.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_send(boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(
- this->get_implementation(), buffers, 0,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(
- this->get_implementation(), buffers, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous send.
- /**
- * This function is used to asynchronously send data on the stream socket.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
- *
- * @param handler The handler to be called when the send 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 sent.
- * ); @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 The send 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.
- *
- * @par Example
- * To send a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_send(boost::asio::buffer(data, size), 0, handler);
- * @endcode
- * See the @ref buffer documentation for information on sending multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(
- this->get_implementation(), buffers, flags,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(
- this->get_implementation(), buffers, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Receive some data on the socket.
- /**
- * This function is used to receive data on the stream socket. The function
- * call will block until one or more bytes of data has been received
- * successfully, or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The receive operation may not receive 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.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.receive(boost::asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on the socket.
- /**
- * This function is used to receive data on the stream socket. The function
- * call will block until one or more bytes of data has been received
- * successfully, or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @returns The number of bytes received.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The receive operation may not receive 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.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.receive(boost::asio::buffer(data, size), 0);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
- boost::asio::detail::throw_error(ec, "receive");
- return s;
- }
-
- /// Receive some data on a connected socket.
- /**
- * This function is used to receive data on the stream socket. The function
- * call will block until one or more bytes of data has been received
- * successfully, or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be received.
- *
- * @param flags Flags specifying how the receive call is to be made.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes received. Returns 0 if an error occurred.
- *
- * @note The receive operation may not receive 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 receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive data from the stream
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 receive 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 received.
- * ); @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 The receive operation may not receive 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 received before the asynchronous
- * operation completes.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.async_receive(boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Start an asynchronous receive.
- /**
- * This function is used to asynchronously receive data from the stream
- * socket. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be received.
- * 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 flags Flags specifying how the receive call is to be made.
- *
- * @param handler The handler to be called when the receive 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 received.
- * ); @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 The receive operation may not receive 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 received before the asynchronous
- * operation completes.
- *
- * @par Example
- * To receive into a single data buffer use the @ref buffer function as
- * follows:
- * @code
- * socket.async_receive(boost::asio::buffer(data, size), 0, handler);
- * @endcode
- * See the @ref buffer documentation for information on receiving into
- * multiple buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, flags, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Write some data to the socket.
- /**
- * This function is used to write data to the stream socket. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the socket.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the socket.
- /**
- * This function is used to write data to the stream socket. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the socket.
- *
- * @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 this->get_service().send(this->get_implementation(), buffers, 0, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream socket.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the socket.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_write_some(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 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Read some data from the socket.
- /**
- * This function is used to read data from the stream socket. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the socket.
- /**
- * This function is used to read data from the stream socket. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream socket.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * socket.async_read_some(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.
- */
- 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;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BASIC_STREAM_SOCKET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp
deleted file mode 100644
index e6f8f33f6bd..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp
+++ /dev/null
@@ -1,454 +0,0 @@
-//
-// basic_streambuf.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_BASIC_STREAMBUF_HPP
-#define BOOST_ASIO_BASIC_STREAMBUF_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_NO_IOSTREAM)
-
-#include <algorithm>
-#include <cstring>
-#include <stdexcept>
-#include <streambuf>
-#include <vector>
-#include <boost/asio/basic_streambuf_fwd.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Automatically resizable buffer class based on std::streambuf.
-/**
- * The @c basic_streambuf class is derived from @c std::streambuf to associate
- * the streambuf's input and output sequences with one or more character
- * arrays. These character arrays are internal to the @c basic_streambuf
- * object, but direct access to the array elements is provided to permit them
- * to be used efficiently with I/O operations. Characters written to the output
- * sequence of a @c basic_streambuf object are appended to the input sequence
- * of the same object.
- *
- * The @c basic_streambuf class's public interface is intended to permit the
- * following implementation strategies:
- *
- * @li A single contiguous character array, which is reallocated as necessary
- * to accommodate changes in the size of the character sequence. This is the
- * implementation approach currently used in Asio.
- *
- * @li A sequence of one or more character arrays, where each array is of the
- * same size. Additional character array objects are appended to the sequence
- * to accommodate changes in the size of the character sequence.
- *
- * @li A sequence of one or more character arrays of varying sizes. Additional
- * character array objects are appended to the sequence to accommodate changes
- * in the size of the character sequence.
- *
- * The constructor for basic_streambuf accepts a @c size_t argument specifying
- * the maximum of the sum of the sizes of the input sequence and output
- * sequence. During the lifetime of the @c basic_streambuf object, the following
- * invariant holds:
- * @code size() <= max_size()@endcode
- * Any member function that would, if successful, cause the invariant to be
- * violated shall throw an exception of class @c std::length_error.
- *
- * The constructor for @c basic_streambuf takes an Allocator argument. A copy
- * of this argument is used for any memory allocation performed, by the
- * constructor and by all member functions, during the lifetime of each @c
- * basic_streambuf object.
- *
- * @par Examples
- * Writing directly from an streambuf to a socket:
- * @code
- * boost::asio::streambuf b;
- * std::ostream os(&b);
- * os << "Hello, World!\n";
- *
- * // try sending some data in input sequence
- * size_t n = sock.send(b.data());
- *
- * b.consume(n); // sent data is removed from input sequence
- * @endcode
- *
- * Reading from a socket directly into a streambuf:
- * @code
- * boost::asio::streambuf b;
- *
- * // reserve 512 bytes in output sequence
- * boost::asio::streambuf::mutable_buffers_type bufs = b.prepare(512);
- *
- * size_t n = sock.receive(bufs);
- *
- * // received data is "committed" from output sequence to input sequence
- * b.commit(n);
- *
- * std::istream is(&b);
- * std::string s;
- * is >> s;
- * @endcode
- */
-#if defined(GENERATING_DOCUMENTATION)
-template <typename Allocator = std::allocator<char> >
-#else
-template <typename Allocator>
-#endif
-class basic_streambuf
- : public std::streambuf,
- private noncopyable
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The type used to represent the input sequence as a list of buffers.
- typedef implementation_defined const_buffers_type;
-
- /// The type used to represent the output sequence as a list of buffers.
- typedef implementation_defined mutable_buffers_type;
-#else
- typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
- typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
-#endif
-
- /// Construct a basic_streambuf object.
- /**
- * Constructs a streambuf with the specified maximum size. The initial size
- * of the streambuf's input sequence is 0.
- */
- explicit basic_streambuf(
- std::size_t maximum_size = (std::numeric_limits<std::size_t>::max)(),
- const Allocator& allocator = Allocator())
- : max_size_(maximum_size),
- buffer_(allocator)
- {
- std::size_t pend = (std::min<std::size_t>)(max_size_, buffer_delta);
- buffer_.resize((std::max<std::size_t>)(pend, 1));
- setg(&buffer_[0], &buffer_[0], &buffer_[0]);
- setp(&buffer_[0], &buffer_[0] + pend);
- }
-
- /// Get the size of the input sequence.
- /**
- * @returns The size of the input sequence. The value is equal to that
- * calculated for @c s in the following code:
- * @code
- * size_t s = 0;
- * const_buffers_type bufs = data();
- * const_buffers_type::const_iterator i = bufs.begin();
- * while (i != bufs.end())
- * {
- * const_buffer buf(*i++);
- * s += buf.size();
- * }
- * @endcode
- */
- std::size_t size() const BOOST_ASIO_NOEXCEPT
- {
- return pptr() - gptr();
- }
-
- /// Get the maximum size of the basic_streambuf.
- /**
- * @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 basic_streambuf.
- /**
- * @returns The current total capacity of the streambuf, i.e. for both the
- * input sequence and output sequence.
- */
- std::size_t capacity() const BOOST_ASIO_NOEXCEPT
- {
- return buffer_.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 all character arrays in the
- * input sequence.
- *
- * @note The returned object is invalidated by any @c basic_streambuf member
- * function that modifies the input sequence or output sequence.
- */
- const_buffers_type data() const BOOST_ASIO_NOEXCEPT
- {
- return boost::asio::buffer(boost::asio::const_buffer(gptr(),
- (pptr() - gptr()) * sizeof(char_type)));
- }
-
- /// Get a list of buffers that represents the output sequence, with the given
- /// size.
- /**
- * Ensures that the output sequence can accommodate @c n characters,
- * reallocating character array objects as necessary.
- *
- * @returns An object of type @c mutable_buffers_type that satisfies
- * MutableBufferSequence requirements, representing character array objects
- * at the start of the output sequence such that the sum of the buffer sizes
- * is @c n.
- *
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
- *
- * @note The returned object is invalidated by any @c basic_streambuf member
- * function that modifies the input sequence or output sequence.
- */
- mutable_buffers_type prepare(std::size_t n)
- {
- reserve(n);
- return boost::asio::buffer(boost::asio::mutable_buffer(
- pptr(), n * sizeof(char_type)));
- }
-
- /// Move characters from the output sequence to the input sequence.
- /**
- * Appends @c n characters from the start of the output sequence to the input
- * sequence. The beginning of the output sequence is advanced by @c n
- * characters.
- *
- * 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)
- {
- n = std::min<std::size_t>(n, epptr() - pptr());
- pbump(static_cast<int>(n));
- setg(eback(), gptr(), pptr());
- }
-
- /// 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)
- {
- if (egptr() < pptr())
- setg(&buffer_[0], gptr(), pptr());
- if (gptr() + n > pptr())
- n = pptr() - gptr();
- gbump(static_cast<int>(n));
- }
-
-protected:
- enum { buffer_delta = 128 };
-
- /// Override std::streambuf behaviour.
- /**
- * Behaves according to the specification of @c std::streambuf::underflow().
- */
- int_type underflow()
- {
- if (gptr() < pptr())
- {
- setg(&buffer_[0], gptr(), pptr());
- return traits_type::to_int_type(*gptr());
- }
- else
- {
- return traits_type::eof();
- }
- }
-
- /// Override std::streambuf behaviour.
- /**
- * Behaves according to the specification of @c std::streambuf::overflow(),
- * with the specialisation that @c std::length_error is thrown if appending
- * the character to the input sequence would require the condition
- * <tt>size() > max_size()</tt> to be true.
- */
- int_type overflow(int_type c)
- {
- if (!traits_type::eq_int_type(c, traits_type::eof()))
- {
- if (pptr() == epptr())
- {
- std::size_t buffer_size = pptr() - gptr();
- if (buffer_size < max_size_ && max_size_ - buffer_size < buffer_delta)
- {
- reserve(max_size_ - buffer_size);
- }
- else
- {
- reserve(buffer_delta);
- }
- }
-
- *pptr() = traits_type::to_char_type(c);
- pbump(1);
- return c;
- }
-
- return traits_type::not_eof(c);
- }
-
- void reserve(std::size_t n)
- {
- // Get current stream positions as offsets.
- std::size_t gnext = gptr() - &buffer_[0];
- std::size_t pnext = pptr() - &buffer_[0];
- std::size_t pend = epptr() - &buffer_[0];
-
- // Check if there is already enough space in the put area.
- if (n <= pend - pnext)
- {
- return;
- }
-
- // Shift existing contents of get area to start of buffer.
- if (gnext > 0)
- {
- pnext -= gnext;
- std::memmove(&buffer_[0], &buffer_[0] + gnext, pnext);
- }
-
- // Ensure buffer is large enough to hold at least the specified size.
- if (n > pend - pnext)
- {
- if (n <= max_size_ && pnext <= max_size_ - n)
- {
- pend = pnext + n;
- buffer_.resize((std::max<std::size_t>)(pend, 1));
- }
- else
- {
- std::length_error ex("boost::asio::streambuf too long");
- boost::asio::detail::throw_exception(ex);
- }
- }
-
- // Update stream positions.
- setg(&buffer_[0], &buffer_[0], &buffer_[0] + pnext);
- setp(&buffer_[0] + pnext, &buffer_[0] + pend);
- }
-
-private:
- std::size_t max_size_;
- std::vector<char_type, Allocator> buffer_;
-
- // Helper function to get the preferred size for reading data.
- friend std::size_t read_size_helper(
- basic_streambuf& sb, std::size_t max_size)
- {
- return std::min<std::size_t>(
- std::max<std::size_t>(512, sb.buffer_.capacity() - sb.size()),
- std::min<std::size_t>(max_size, sb.max_size() - sb.size()));
- }
-};
-
-/// Adapts basic_streambuf to the dynamic buffer sequence type requirements.
-#if defined(GENERATING_DOCUMENTATION)
-template <typename Allocator = std::allocator<char> >
-#else
-template <typename Allocator>
-#endif
-class basic_streambuf_ref
-{
-public:
- /// The type used to represent the input sequence as a list of buffers.
- typedef typename basic_streambuf<Allocator>::const_buffers_type
- const_buffers_type;
-
- /// The type used to represent the output sequence as a list of buffers.
- typedef typename basic_streambuf<Allocator>::mutable_buffers_type
- mutable_buffers_type;
-
- /// Construct a basic_streambuf_ref for the given basic_streambuf object.
- explicit basic_streambuf_ref(basic_streambuf<Allocator>& sb)
- : sb_(sb)
- {
- }
-
- /// Copy construct a basic_streambuf_ref.
- basic_streambuf_ref(const basic_streambuf_ref& other) BOOST_ASIO_NOEXCEPT
- : sb_(other.sb_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move construct a basic_streambuf_ref.
- basic_streambuf_ref(basic_streambuf_ref&& other) BOOST_ASIO_NOEXCEPT
- : sb_(other.sb_)
- {
- }
-#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 sb_.size();
- }
-
- /// Get the maximum size of the dynamic buffer.
- std::size_t max_size() const BOOST_ASIO_NOEXCEPT
- {
- return sb_.max_size();
- }
-
- /// Get the current capacity of the dynamic buffer.
- std::size_t capacity() const BOOST_ASIO_NOEXCEPT
- {
- return sb_.capacity();
- }
-
- /// Get a list of buffers that represents the input sequence.
- const_buffers_type data() const BOOST_ASIO_NOEXCEPT
- {
- return sb_.data();
- }
-
- /// Get a list of buffers that represents the output sequence, with the given
- /// size.
- mutable_buffers_type prepare(std::size_t n)
- {
- return sb_.prepare(n);
- }
-
- /// Move bytes from the output sequence to the input sequence.
- void commit(std::size_t n)
- {
- return sb_.commit(n);
- }
-
- /// Remove characters from the input sequence.
- void consume(std::size_t n)
- {
- return sb_.consume(n);
- }
-
-private:
- basic_streambuf<Allocator>& sb_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_BASIC_STREAMBUF_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp
deleted file mode 100644
index f2ef522d9b7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// basic_streambuf_fwd.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_BASIC_STREAMBUF_FWD_HPP
-#define BOOST_ASIO_BASIC_STREAMBUF_FWD_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_NO_IOSTREAM)
-
-#include <memory>
-
-namespace boost {
-namespace asio {
-
-template <typename Allocator = std::allocator<char> >
-class basic_streambuf;
-
-template <typename Allocator = std::allocator<char> >
-class basic_streambuf_ref;
-
-} // namespace asio
-} // namespace boost
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_BASIC_STREAMBUF_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp
deleted file mode 100644
index 6dc4bded98b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp
+++ /dev/null
@@ -1,707 +0,0 @@
-//
-// basic_waitable_timer.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_BASIC_WAITABLE_TIMER_HPP
-#define BOOST_ASIO_BASIC_WAITABLE_TIMER_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/basic_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/wait_traits.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/waitable_timer_service.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/detail/chrono_time_traits.hpp>
-# include <boost/asio/detail/deadline_timer_service.hpp>
-# define BOOST_ASIO_SVC_T \
- detail::deadline_timer_service< \
- detail::chrono_time_traits<Clock, WaitTraits> >
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-#if !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
-#define BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
-
-// Forward declaration with defaulted arguments.
-template <typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock>
- BOOST_ASIO_SVC_TPARAM_DEF2(= waitable_timer_service<Clock, WaitTraits>)>
-class basic_waitable_timer;
-
-#endif // !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
-
-/// Provides waitable timer functionality.
-/**
- * The basic_waitable_timer class template provides the ability to perform a
- * blocking or asynchronous wait for a timer to expire.
- *
- * A waitable timer is always in one of two states: "expired" or "not expired".
- * If the wait() or async_wait() function is called on an expired timer, the
- * wait operation will complete immediately.
- *
- * Most applications will use one of the boost::asio::steady_timer,
- * boost::asio::system_timer or boost::asio::high_resolution_timer typedefs.
- *
- * @note This waitable timer functionality is for use with the C++11 standard
- * library's @c &lt;chrono&gt; facility, or with the Boost.Chrono library.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Examples
- * Performing a blocking wait (C++11):
- * @code
- * // Construct a timer without setting an expiry time.
- * boost::asio::steady_timer timer(io_context);
- *
- * // Set an expiry time relative to now.
- * timer.expires_after(std::chrono::seconds(5));
- *
- * // Wait for the timer to expire.
- * timer.wait();
- * @endcode
- *
- * @par
- * Performing an asynchronous wait (C++11):
- * @code
- * void handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Timer expired.
- * }
- * }
- *
- * ...
- *
- * // Construct a timer with an absolute expiry time.
- * boost::asio::steady_timer timer(io_context,
- * std::chrono::steady_clock::now() + std::chrono::seconds(60));
- *
- * // Start an asynchronous wait.
- * timer.async_wait(handler);
- * @endcode
- *
- * @par Changing an active waitable timer's expiry time
- *
- * Changing the expiry time of a timer while there are pending asynchronous
- * waits causes those wait operations to be cancelled. To ensure that the action
- * associated with the timer is performed only once, use something like this:
- * used:
- *
- * @code
- * void on_some_event()
- * {
- * if (my_timer.expires_after(seconds(5)) > 0)
- * {
- * // We managed to cancel the timer. Start new asynchronous wait.
- * my_timer.async_wait(on_timeout);
- * }
- * else
- * {
- * // Too late, timer has already expired!
- * }
- * }
- *
- * void on_timeout(const boost::system::error_code& e)
- * {
- * if (e != boost::asio::error::operation_aborted)
- * {
- * // Timer was not cancelled, take necessary action.
- * }
- * }
- * @endcode
- *
- * @li The boost::asio::basic_waitable_timer::expires_after() function
- * cancels any pending asynchronous waits, and returns the number of
- * asynchronous waits that were cancelled. If it returns 0 then you were too
- * late and the wait handler has already been executed, or will soon be
- * executed. If it returns 1 then the wait handler was successfully cancelled.
- *
- * @li If a wait handler is cancelled, the boost::system::error_code passed to
- * it contains the value boost::asio::error::operation_aborted.
- */
-template <typename Clock, typename WaitTraits BOOST_ASIO_SVC_TPARAM>
-class basic_waitable_timer
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The clock type.
- typedef Clock clock_type;
-
- /// The duration type of the clock.
- typedef typename clock_type::duration duration;
-
- /// The time point type of the clock.
- typedef typename clock_type::time_point time_point;
-
- /// The wait traits type.
- typedef WaitTraits traits_type;
-
- /// Constructor.
- /**
- * This constructor creates a timer without setting an expiry time. The
- * expires_at() or expires_after() functions must be called to set an expiry
- * time before the timer can be waited on.
- *
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
- */
- explicit basic_waitable_timer(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Constructor to set a particular expiry time as an absolute time.
- /**
- * This constructor creates a timer and sets the expiry time.
- *
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
- *
- * @param expiry_time The expiry time to be used for the timer, expressed
- * as an absolute time.
- */
- basic_waitable_timer(boost::asio::io_context& io_context,
- const time_point& expiry_time)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().expires_at(this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_at");
- }
-
- /// Constructor to set a particular expiry time relative to now.
- /**
- * This constructor creates a timer and sets the expiry time.
- *
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
- *
- * @param expiry_time The expiry time to be used for the timer, relative to
- * now.
- */
- basic_waitable_timer(boost::asio::io_context& io_context,
- const duration& expiry_time)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().expires_after(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_after");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_waitable_timer from another.
- /**
- * This constructor moves a timer from one object to another.
- *
- * @param other The other basic_waitable_timer 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_waitable_timer(io_context&) constructor.
- */
- basic_waitable_timer(basic_waitable_timer&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a basic_waitable_timer from another.
- /**
- * This assignment operator moves a timer from one object to another. Cancels
- * any outstanding asynchronous operations associated with the target object.
- *
- * @param other The other basic_waitable_timer 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_waitable_timer(io_context&) constructor.
- */
- basic_waitable_timer& operator=(basic_waitable_timer&& 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 timer.
- /**
- * This function destroys the timer, cancelling any outstanding asynchronous
- * wait operations associated with the timer as if by calling @c cancel.
- */
- ~basic_waitable_timer()
- {
- }
-
-#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 timer.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the timer. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel()
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- return s;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overload.) Cancel any asynchronous
- /// operations that are waiting on the timer.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the timer. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @note If the timer has already expired when cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel(boost::system::error_code& ec)
- {
- return this->get_service().cancel(this->get_implementation(), ec);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Cancels one asynchronous operation that is waiting on the timer.
- /**
- * This function forces the completion of one pending asynchronous wait
- * operation against the timer. Handlers are cancelled in FIFO order. The
- * handler for the cancelled operation will be invoked with the
- * boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @return The number of asynchronous operations that were cancelled. That is,
- * either 0 or 1.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when cancel_one() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel_one()
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().cancel_one(
- this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel_one");
- return s;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overload.) Cancels one asynchronous
- /// operation that is waiting on the timer.
- /**
- * This function forces the completion of one pending asynchronous wait
- * operation against the timer. Handlers are cancelled in FIFO order. The
- * handler for the cancelled operation will be invoked with the
- * boost::asio::error::operation_aborted error code.
- *
- * Cancelling the timer does not change the expiry time.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled. That is,
- * either 0 or 1.
- *
- * @note If the timer has already expired when cancel_one() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t cancel_one(boost::system::error_code& ec)
- {
- return this->get_service().cancel_one(this->get_implementation(), ec);
- }
-
- /// (Deprecated: Use expiry().) Get the timer's expiry time as an absolute
- /// time.
- /**
- * This function may be used to obtain the timer's current expiry time.
- * Whether the timer has expired or not does not affect this value.
- */
- time_point expires_at() const
- {
- return this->get_service().expires_at(this->get_implementation());
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the timer's expiry time as an absolute time.
- /**
- * This function may be used to obtain the timer's current expiry time.
- * Whether the timer has expired or not does not affect this value.
- */
- time_point expiry() const
- {
- return this->get_service().expiry(this->get_implementation());
- }
-
- /// Set the timer's expiry time as an absolute time.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when expires_at() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_at(const time_point& expiry_time)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_at");
- return s;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overload.) Set the timer's expiry time as
- /// an absolute time.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @note If the timer has already expired when expires_at() is called, then
- * the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_at(const time_point& expiry_time,
- boost::system::error_code& ec)
- {
- return this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Set the timer's expiry time relative to now.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when expires_after() is called,
- * then the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_after(const duration& expiry_time)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().expires_after(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_after");
- return s;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the timer's expiry time relative to now.
- /**
- * This function may be used to obtain the timer's current expiry time.
- * Whether the timer has expired or not does not affect this value.
- */
- duration expires_from_now() const
- {
- return this->get_service().expires_from_now(this->get_implementation());
- }
-
- /// (Deprecated: Use expires_after().) Set the timer's expiry time relative
- /// to now.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If the timer has already expired when expires_from_now() is called,
- * then the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_from_now(const duration& expiry_time)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
- boost::asio::detail::throw_error(ec, "expires_from_now");
- return s;
- }
-
- /// (Deprecated: Use expires_after().) Set the timer's expiry time relative
- /// to now.
- /**
- * This function sets the expiry time. Any pending asynchronous wait
- * operations will be cancelled. The handler for each cancelled operation will
- * be invoked with the boost::asio::error::operation_aborted error code.
- *
- * @param expiry_time The expiry time to be used for the timer.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of asynchronous operations that were cancelled.
- *
- * @note If the timer has already expired when expires_from_now() is called,
- * then the handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- std::size_t expires_from_now(const duration& expiry_time,
- boost::system::error_code& ec)
- {
- return this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Perform a blocking wait on the timer.
- /**
- * This function is used to wait for the timer to expire. This function
- * blocks and does not return until the timer has expired.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void wait()
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Perform a blocking wait on the timer.
- /**
- * This function is used to wait for the timer to expire. This function
- * blocks and does not return until the timer has expired.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- void wait(boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), ec);
- }
-
- /// Start an asynchronous wait on the timer.
- /**
- * This function may be used to initiate an asynchronous wait against the
- * timer. It always returns immediately.
- *
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
- *
- * @li The timer has expired.
- *
- * @li The timer was cancelled, in which case the handler is passed the error
- * code boost::asio::error::operation_aborted.
- *
- * @param handler The handler to be called when the timer expires. 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.
- * ); @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 WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
-private:
- // Disallow copying and assignment.
- basic_waitable_timer(const basic_waitable_timer&) BOOST_ASIO_DELETED;
- basic_waitable_timer& operator=(
- const basic_waitable_timer&) BOOST_ASIO_DELETED;
-};
-
-} // 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_BASIC_WAITABLE_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp
deleted file mode 100644
index c4086b6135c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp
+++ /dev/null
@@ -1,613 +0,0 @@
-//
-// bind_executor.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_BIND_EXECUTOR_HPP
-#define BOOST_ASIO_BIND_EXECUTOR_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/variadic_templates.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/is_executor.hpp>
-#include <boost/asio/uses_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-struct executor_binder_check
-{
- typedef void type;
-};
-
-// Helper to automatically define nested typedef result_type.
-
-template <typename T, typename = void>
-struct executor_binder_result_type
-{
-protected:
- typedef void result_type_or_void;
-};
-
-template <typename T>
-struct executor_binder_result_type<T,
- typename executor_binder_check<typename T::result_type>::type>
-{
- typedef typename T::result_type result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-template <typename R>
-struct executor_binder_result_type<R(*)()>
-{
- typedef R result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-template <typename R>
-struct executor_binder_result_type<R(&)()>
-{
- typedef R result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-template <typename R, typename A1>
-struct executor_binder_result_type<R(*)(A1)>
-{
- typedef R result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-template <typename R, typename A1>
-struct executor_binder_result_type<R(&)(A1)>
-{
- typedef R result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-template <typename R, typename A1, typename A2>
-struct executor_binder_result_type<R(*)(A1, A2)>
-{
- typedef R result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-template <typename R, typename A1, typename A2>
-struct executor_binder_result_type<R(&)(A1, A2)>
-{
- typedef R result_type;
-protected:
- typedef result_type result_type_or_void;
-};
-
-// Helper to automatically define nested typedef argument_type.
-
-template <typename T, typename = void>
-struct executor_binder_argument_type {};
-
-template <typename T>
-struct executor_binder_argument_type<T,
- typename executor_binder_check<typename T::argument_type>::type>
-{
- typedef typename T::argument_type argument_type;
-};
-
-template <typename R, typename A1>
-struct executor_binder_argument_type<R(*)(A1)>
-{
- typedef A1 argument_type;
-};
-
-template <typename R, typename A1>
-struct executor_binder_argument_type<R(&)(A1)>
-{
- typedef A1 argument_type;
-};
-
-// Helper to automatically define nested typedefs first_argument_type and
-// second_argument_type.
-
-template <typename T, typename = void>
-struct executor_binder_argument_types {};
-
-template <typename T>
-struct executor_binder_argument_types<T,
- typename executor_binder_check<typename T::first_argument_type>::type>
-{
- typedef typename T::first_argument_type first_argument_type;
- typedef typename T::second_argument_type second_argument_type;
-};
-
-template <typename R, typename A1, typename A2>
-struct executor_binder_argument_type<R(*)(A1, A2)>
-{
- typedef A1 first_argument_type;
- typedef A2 second_argument_type;
-};
-
-template <typename R, typename A1, typename A2>
-struct executor_binder_argument_type<R(&)(A1, A2)>
-{
- typedef A1 first_argument_type;
- typedef A2 second_argument_type;
-};
-
-// Helper to:
-// - Apply the empty base optimisation to the executor.
-// - Perform uses_executor construction of the target type, if required.
-
-template <typename T, typename Executor, bool UsesExecutor>
-class executor_binder_base;
-
-template <typename T, typename Executor>
-class executor_binder_base<T, Executor, true>
- : protected Executor
-{
-protected:
- template <typename E, typename U>
- executor_binder_base(BOOST_ASIO_MOVE_ARG(E) e, BOOST_ASIO_MOVE_ARG(U) u)
- : executor_(BOOST_ASIO_MOVE_CAST(E)(e)),
- target_(executor_arg_t(), executor_, BOOST_ASIO_MOVE_CAST(U)(u))
- {
- }
-
- Executor executor_;
- T target_;
-};
-
-template <typename T, typename Executor>
-class executor_binder_base<T, Executor, false>
-{
-protected:
- template <typename E, typename U>
- executor_binder_base(BOOST_ASIO_MOVE_ARG(E) e, BOOST_ASIO_MOVE_ARG(U) u)
- : executor_(BOOST_ASIO_MOVE_CAST(E)(e)),
- target_(BOOST_ASIO_MOVE_CAST(U)(u))
- {
- }
-
- Executor executor_;
- T target_;
-};
-
-// Helper to enable SFINAE on zero-argument operator() below.
-
-template <typename T, typename = void>
-struct executor_binder_result_of0
-{
- typedef void type;
-};
-
-template <typename T>
-struct executor_binder_result_of0<T,
- typename executor_binder_check<typename result_of<T()>::type>::type>
-{
- typedef typename result_of<T()>::type type;
-};
-
-} // namespace detail
-
-/// A call wrapper type to bind an executor of type @c Executor to an object of
-/// type @c T.
-template <typename T, typename Executor>
-class executor_binder
-#if !defined(GENERATING_DOCUMENTATION)
- : public detail::executor_binder_result_type<T>,
- public detail::executor_binder_argument_type<T>,
- public detail::executor_binder_argument_types<T>,
- private detail::executor_binder_base<
- T, Executor, uses_executor<T, Executor>::value>
-#endif // !defined(GENERATING_DOCUMENTATION)
-{
-public:
- /// The type of the target object.
- typedef T target_type;
-
- /// The type of the associated executor.
- typedef Executor executor_type;
-
-#if defined(GENERATING_DOCUMENTATION)
- /// The return type if a function.
- /**
- * The type of @c result_type is based on the type @c T of the wrapper's
- * target object:
- *
- * @li if @c T is a pointer to function type, @c result_type is a synonym for
- * the return type of @c T;
- *
- * @li if @c T is a class type with a member type @c result_type, then @c
- * result_type is a synonym for @c T::result_type;
- *
- * @li otherwise @c result_type is not defined.
- */
- typedef see_below result_type;
-
- /// The type of the function's argument.
- /**
- * The type of @c argument_type is based on the type @c T of the wrapper's
- * target object:
- *
- * @li if @c T is a pointer to a function type accepting a single argument,
- * @c argument_type is a synonym for the return type of @c T;
- *
- * @li if @c T is a class type with a member type @c argument_type, then @c
- * argument_type is a synonym for @c T::argument_type;
- *
- * @li otherwise @c argument_type is not defined.
- */
- typedef see_below argument_type;
-
- /// The type of the function's first argument.
- /**
- * The type of @c first_argument_type is based on the type @c T of the
- * wrapper's target object:
- *
- * @li if @c T is a pointer to a function type accepting two arguments, @c
- * first_argument_type is a synonym for the return type of @c T;
- *
- * @li if @c T is a class type with a member type @c first_argument_type,
- * then @c first_argument_type is a synonym for @c T::first_argument_type;
- *
- * @li otherwise @c first_argument_type is not defined.
- */
- typedef see_below first_argument_type;
-
- /// The type of the function's second argument.
- /**
- * The type of @c second_argument_type is based on the type @c T of the
- * wrapper's target object:
- *
- * @li if @c T is a pointer to a function type accepting two arguments, @c
- * second_argument_type is a synonym for the return type of @c T;
- *
- * @li if @c T is a class type with a member type @c first_argument_type,
- * then @c second_argument_type is a synonym for @c T::second_argument_type;
- *
- * @li otherwise @c second_argument_type is not defined.
- */
- typedef see_below second_argument_type;
-#endif // defined(GENERATING_DOCUMENTATION)
-
- /// Construct an executor wrapper for the specified object.
- /**
- * This constructor is only valid if the type @c T is constructible from type
- * @c U.
- */
- template <typename U>
- executor_binder(executor_arg_t, const executor_type& e,
- BOOST_ASIO_MOVE_ARG(U) u)
- : base_type(e, BOOST_ASIO_MOVE_CAST(U)(u))
- {
- }
-
- /// Copy constructor.
- executor_binder(const executor_binder& other)
- : base_type(other.get_executor(), other.get())
- {
- }
-
- /// Construct a copy, but specify a different executor.
- executor_binder(executor_arg_t, const executor_type& e,
- const executor_binder& other)
- : base_type(e, other.get())
- {
- }
-
- /// Construct a copy of a different executor wrapper type.
- /**
- * This constructor is only valid if the @c Executor type is constructible
- * from type @c OtherExecutor, and the type @c T is constructible from type
- * @c U.
- */
- template <typename U, typename OtherExecutor>
- executor_binder(const executor_binder<U, OtherExecutor>& other)
- : base_type(other.get_executor(), other.get())
- {
- }
-
- /// Construct a copy of a different executor wrapper type, but specify a
- /// different executor.
- /**
- * This constructor is only valid if the type @c T is constructible from type
- * @c U.
- */
- template <typename U, typename OtherExecutor>
- executor_binder(executor_arg_t, const executor_type& e,
- const executor_binder<U, OtherExecutor>& other)
- : base_type(e, other.get())
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Move constructor.
- executor_binder(executor_binder&& other)
- : base_type(BOOST_ASIO_MOVE_CAST(executor_type)(other.get_executor()),
- BOOST_ASIO_MOVE_CAST(T)(other.get()))
- {
- }
-
- /// Move construct the target object, but specify a different executor.
- executor_binder(executor_arg_t, const executor_type& e,
- executor_binder&& other)
- : base_type(e, BOOST_ASIO_MOVE_CAST(T)(other.get()))
- {
- }
-
- /// Move construct from a different executor wrapper type.
- template <typename U, typename OtherExecutor>
- executor_binder(executor_binder<U, OtherExecutor>&& other)
- : base_type(BOOST_ASIO_MOVE_CAST(OtherExecutor)(other.get_executor()),
- BOOST_ASIO_MOVE_CAST(U)(other.get()))
- {
- }
-
- /// Move construct from a different executor wrapper type, but specify a
- /// different executor.
- template <typename U, typename OtherExecutor>
- executor_binder(executor_arg_t, const executor_type& e,
- executor_binder<U, OtherExecutor>&& other)
- : base_type(e, BOOST_ASIO_MOVE_CAST(U)(other.get()))
- {
- }
-
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destructor.
- ~executor_binder()
- {
- }
-
- /// Obtain a reference to the target object.
- target_type& get() BOOST_ASIO_NOEXCEPT
- {
- return this->target_;
- }
-
- /// Obtain a reference to the target object.
- const target_type& get() const BOOST_ASIO_NOEXCEPT
- {
- return this->target_;
- }
-
- /// Obtain the associated executor.
- executor_type get_executor() const BOOST_ASIO_NOEXCEPT
- {
- return this->executor_;
- }
-
-#if defined(GENERATING_DOCUMENTATION)
-
- template <typename... Args> auto operator()(Args&& ...);
- template <typename... Args> auto operator()(Args&& ...) const;
-
-#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- /// Forwarding function call operator.
- template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- return this->target_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
- }
-
- /// Forwarding function call operator.
- template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- BOOST_ASIO_MOVE_ARG(Args)... args) const
- {
- return this->target_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#elif defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typename detail::executor_binder_result_of0<T>::type operator()()
- {
- return this->target_();
- }
-
- typename detail::executor_binder_result_of0<T>::type operator()() const
- {
- return this->target_();
- }
-
-#define BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(BOOST_ASIO_VARIADIC_TARGS(n))>::type operator()( \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(BOOST_ASIO_VARIADIC_TARGS(n))>::type operator()( \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
-#undef BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
-
-#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typedef typename detail::executor_binder_result_type<T>::result_type_or_void
- result_type_or_void;
-
- result_type_or_void operator()()
- {
- return this->target_();
- }
-
- result_type_or_void operator()() const
- {
- return this->target_();
- }
-
-#define BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
-#undef BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
-
-#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
-private:
- typedef detail::executor_binder_base<T, Executor,
- uses_executor<T, Executor>::value> base_type;
-};
-
-/// Associate an object of type @c T with an executor of type @c Executor.
-template <typename Executor, typename T>
-inline executor_binder<typename decay<T>::type, Executor>
-bind_executor(const Executor& ex, BOOST_ASIO_MOVE_ARG(T) t,
- typename enable_if<is_executor<Executor>::value>::type* = 0)
-{
- return executor_binder<typename decay<T>::type, Executor>(
- executor_arg_t(), ex, BOOST_ASIO_MOVE_CAST(T)(t));
-}
-
-/// Associate an object of type @c T with an execution context's executor.
-template <typename ExecutionContext, typename T>
-inline executor_binder<typename decay<T>::type,
- typename ExecutionContext::executor_type>
-bind_executor(ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(T) t,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0)
-{
- return executor_binder<typename decay<T>::type,
- typename ExecutionContext::executor_type>(
- executor_arg_t(), ctx.get_executor(), BOOST_ASIO_MOVE_CAST(T)(t));
-}
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename T, typename Executor>
-struct uses_executor<executor_binder<T, Executor>, Executor>
- : true_type {};
-
-template <typename T, typename Executor, typename Signature>
-class async_result<executor_binder<T, Executor>, Signature>
-{
-public:
- typedef executor_binder<
- typename async_result<T, Signature>::completion_handler_type, Executor>
- completion_handler_type;
-
- typedef typename async_result<T, Signature>::return_type return_type;
-
- explicit async_result(executor_binder<T, Executor>& b)
- : target_(b.get())
- {
- }
-
- return_type get()
- {
- return target_.get();
- }
-
-private:
- async_result(const async_result&) BOOST_ASIO_DELETED;
- async_result& operator=(const async_result&) BOOST_ASIO_DELETED;
-
- async_result<T, Signature> target_;
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename T, typename Executor, typename Signature>
-struct handler_type<executor_binder<T, Executor>, Signature>
-{
- typedef executor_binder<
- typename handler_type<T, Signature>::type, Executor> type;
-};
-
-template <typename T, typename Executor>
-class async_result<executor_binder<T, Executor> >
-{
-public:
- typedef typename async_result<T>::type type;
-
- explicit async_result(executor_binder<T, Executor>& b)
- : target_(b.get())
- {
- }
-
- type get()
- {
- return target_.get();
- }
-
-private:
- async_result<T> target_;
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename T, typename Executor, typename Allocator>
-struct associated_allocator<executor_binder<T, Executor>, Allocator>
-{
- typedef typename associated_allocator<T, Allocator>::type type;
-
- static type get(const executor_binder<T, Executor>& b,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<T, Allocator>::get(b.get(), a);
- }
-};
-
-template <typename T, typename Executor, typename Executor1>
-struct associated_executor<executor_binder<T, Executor>, Executor1>
-{
- typedef Executor type;
-
- static type get(const executor_binder<T, Executor>& b,
- const Executor1& = Executor1()) BOOST_ASIO_NOEXCEPT
- {
- return b.get_executor();
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index 29352f64815..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffer.hpp
+++ /dev/null
@@ -1,2173 +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/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.69.0/boost/asio/buffered_read_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream.hpp
deleted file mode 100644
index 28df23908d2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream.hpp
+++ /dev/null
@@ -1,259 +0,0 @@
-//
-// buffered_read_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_BUFFERED_READ_STREAM_HPP
-#define BOOST_ASIO_BUFFERED_READ_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 <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/buffered_read_stream_fwd.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_resize_guard.hpp>
-#include <boost/asio/detail/buffered_stream_storage.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Adds buffering to the read-related operations of a stream.
-/**
- * The buffered_read_stream class template can be used to add buffering to the
- * synchronous and asynchronous read operations of a stream.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename Stream>
-class buffered_read_stream
- : private noncopyable
-{
-public:
- /// 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(GENERATING_DOCUMENTATION)
- /// The default buffer size.
- static const std::size_t default_buffer_size = implementation_defined;
-#else
- BOOST_ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size = 1024);
-#endif
-
- /// Construct, passing the specified argument to initialise the next layer.
- template <typename Arg>
- explicit buffered_read_stream(Arg& a)
- : next_layer_(a),
- storage_(default_buffer_size)
- {
- }
-
- /// Construct, passing the specified argument to initialise the next layer.
- template <typename Arg>
- buffered_read_stream(Arg& a, std::size_t buffer_size)
- : next_layer_(a),
- storage_(buffer_size)
- {
- }
-
- /// Get a reference to the next layer.
- next_layer_type& next_layer()
- {
- return next_layer_;
- }
-
- /// Get a reference to the lowest layer.
- lowest_layer_type& lowest_layer()
- {
- return next_layer_.lowest_layer();
- }
-
- /// Get a const reference to the lowest layer.
- const lowest_layer_type& lowest_layer() const
- {
- return next_layer_.lowest_layer();
- }
-
- /// Get the executor associated with the object.
- 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_.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_.get_io_service();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Close the stream.
- void close()
- {
- next_layer_.close();
- }
-
- /// Close the stream.
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- next_layer_.close(ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data to the stream. Returns the number of bytes written.
- /// Throws an exception on failure.
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- return next_layer_.write_some(buffers);
- }
-
- /// Write the given data to the stream. Returns the number of bytes written,
- /// or 0 if an error occurred.
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return next_layer_.write_some(buffers, ec);
- }
-
- /// Start an asynchronous write. The data being written must be valid for the
- /// lifetime of the asynchronous operation.
- 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)
- {
- return next_layer_.async_write_some(buffers,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Fill the buffer with some data. Returns the number of bytes placed in the
- /// buffer as a result of the operation. Throws an exception on failure.
- std::size_t fill();
-
- /// Fill the buffer with some data. Returns the number of bytes placed in the
- /// buffer as a result of the operation, or 0 if an error occurred.
- std::size_t fill(boost::system::error_code& ec);
-
- /// Start an asynchronous fill.
- template <typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_fill(BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
- /// Read some data from the stream. Returns the number of bytes read. Throws
- /// an exception on failure.
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers);
-
- /// Read some data from the stream. Returns the number of bytes read or 0 if
- /// an error occurred.
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- boost::system::error_code& ec);
-
- /// Start an asynchronous read. The buffer into which the data will be read
- /// must be valid for the lifetime of the asynchronous operation.
- 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);
-
- /// Peek at the incoming data on the stream. Returns the number of bytes read.
- /// Throws an exception on failure.
- template <typename MutableBufferSequence>
- std::size_t peek(const MutableBufferSequence& buffers);
-
- /// Peek at the incoming data on the stream. Returns the number of bytes read,
- /// or 0 if an error occurred.
- template <typename MutableBufferSequence>
- std::size_t peek(const MutableBufferSequence& buffers,
- boost::system::error_code& ec);
-
- /// Determine the amount of data that may be read without blocking.
- std::size_t in_avail()
- {
- return storage_.size();
- }
-
- /// Determine the amount of data that may be read without blocking.
- std::size_t in_avail(boost::system::error_code& ec)
- {
- ec = boost::system::error_code();
- return storage_.size();
- }
-
-private:
- /// Copy data out of the internal buffer to the specified target buffer.
- /// Returns the number of bytes copied.
- template <typename MutableBufferSequence>
- std::size_t copy(const MutableBufferSequence& buffers)
- {
- std::size_t bytes_copied = boost::asio::buffer_copy(
- buffers, storage_.data(), storage_.size());
- storage_.consume(bytes_copied);
- return bytes_copied;
- }
-
- /// Copy data from the internal buffer to the specified target buffer, without
- /// removing the data from the internal buffer. Returns the number of bytes
- /// copied.
- template <typename MutableBufferSequence>
- std::size_t peek_copy(const MutableBufferSequence& buffers)
- {
- return boost::asio::buffer_copy(buffers, storage_.data(), storage_.size());
- }
-
- /// The next layer.
- Stream next_layer_;
-
- // The data in the buffer.
- detail::buffered_stream_storage storage_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/buffered_read_stream.hpp>
-
-#endif // BOOST_ASIO_BUFFERED_READ_STREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp
deleted file mode 100644
index d6b0ad14be4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// buffered_read_stream_fwd.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_BUFFERED_READ_STREAM_FWD_HPP
-#define BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-namespace boost {
-namespace asio {
-
-template <typename Stream>
-class buffered_read_stream;
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp
deleted file mode 100644
index ada06e1d9cc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp
+++ /dev/null
@@ -1,280 +0,0 @@
-//
-// buffered_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_BUFFERED_STREAM_HPP
-#define BOOST_ASIO_BUFFERED_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 <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/buffered_read_stream.hpp>
-#include <boost/asio/buffered_write_stream.hpp>
-#include <boost/asio/buffered_stream_fwd.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Adds buffering to the read- and write-related operations of a stream.
-/**
- * The buffered_stream class template can be used to add buffering to the
- * synchronous and asynchronous read and write operations of a stream.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename Stream>
-class buffered_stream
- : private noncopyable
-{
-public:
- /// 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;
-
- /// Construct, passing the specified argument to initialise the next layer.
- template <typename Arg>
- explicit buffered_stream(Arg& a)
- : inner_stream_impl_(a),
- stream_impl_(inner_stream_impl_)
- {
- }
-
- /// Construct, passing the specified argument to initialise the next layer.
- template <typename Arg>
- explicit buffered_stream(Arg& a, std::size_t read_buffer_size,
- std::size_t write_buffer_size)
- : inner_stream_impl_(a, write_buffer_size),
- stream_impl_(inner_stream_impl_, read_buffer_size)
- {
- }
-
- /// Get a reference to the next layer.
- next_layer_type& next_layer()
- {
- return stream_impl_.next_layer().next_layer();
- }
-
- /// Get a reference to the lowest layer.
- lowest_layer_type& lowest_layer()
- {
- return stream_impl_.lowest_layer();
- }
-
- /// Get a const reference to the lowest layer.
- const lowest_layer_type& lowest_layer() const
- {
- return stream_impl_.lowest_layer();
- }
-
- /// Get the executor associated with the object.
- executor_type get_executor() BOOST_ASIO_NOEXCEPT
- {
- return stream_impl_.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 stream_impl_.get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- boost::asio::io_context& get_io_service()
- {
- return stream_impl_.get_io_service();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Close the stream.
- void close()
- {
- stream_impl_.close();
- }
-
- /// Close the stream.
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- stream_impl_.close(ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Flush all data from the buffer to the next layer. Returns the number of
- /// bytes written to the next layer on the last write operation. Throws an
- /// exception on failure.
- std::size_t flush()
- {
- return stream_impl_.next_layer().flush();
- }
-
- /// Flush all data from the buffer to the next layer. Returns the number of
- /// bytes written to the next layer on the last write operation, or 0 if an
- /// error occurred.
- std::size_t flush(boost::system::error_code& ec)
- {
- return stream_impl_.next_layer().flush(ec);
- }
-
- /// Start an asynchronous flush.
- template <typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- return stream_impl_.next_layer().async_flush(
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Write the given data to the stream. Returns the number of bytes written.
- /// Throws an exception on failure.
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- return stream_impl_.write_some(buffers);
- }
-
- /// Write the given data to the stream. Returns the number of bytes written,
- /// or 0 if an error occurred.
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return stream_impl_.write_some(buffers, ec);
- }
-
- /// Start an asynchronous write. The data being written must be valid for the
- /// lifetime of the asynchronous operation.
- 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)
- {
- return stream_impl_.async_write_some(buffers,
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Fill the buffer with some data. Returns the number of bytes placed in the
- /// buffer as a result of the operation. Throws an exception on failure.
- std::size_t fill()
- {
- return stream_impl_.fill();
- }
-
- /// Fill the buffer with some data. Returns the number of bytes placed in the
- /// buffer as a result of the operation, or 0 if an error occurred.
- std::size_t fill(boost::system::error_code& ec)
- {
- return stream_impl_.fill(ec);
- }
-
- /// Start an asynchronous fill.
- template <typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_fill(BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- return stream_impl_.async_fill(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-
- /// Read some data from the stream. Returns the number of bytes read. Throws
- /// an exception on failure.
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- return stream_impl_.read_some(buffers);
- }
-
- /// Read some data from the stream. Returns the number of bytes read or 0 if
- /// an error occurred.
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return stream_impl_.read_some(buffers, ec);
- }
-
- /// Start an asynchronous read. The buffer into which the data will be read
- /// must be valid for the lifetime of the asynchronous operation.
- 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)
- {
- return stream_impl_.async_read_some(buffers,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-
- /// Peek at the incoming data on the stream. Returns the number of bytes read.
- /// Throws an exception on failure.
- template <typename MutableBufferSequence>
- std::size_t peek(const MutableBufferSequence& buffers)
- {
- return stream_impl_.peek(buffers);
- }
-
- /// Peek at the incoming data on the stream. Returns the number of bytes read,
- /// or 0 if an error occurred.
- template <typename MutableBufferSequence>
- std::size_t peek(const MutableBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return stream_impl_.peek(buffers, ec);
- }
-
- /// Determine the amount of data that may be read without blocking.
- std::size_t in_avail()
- {
- return stream_impl_.in_avail();
- }
-
- /// Determine the amount of data that may be read without blocking.
- std::size_t in_avail(boost::system::error_code& ec)
- {
- return stream_impl_.in_avail(ec);
- }
-
-private:
- // The buffered write stream.
- typedef buffered_write_stream<Stream> write_stream_type;
- write_stream_type inner_stream_impl_;
-
- // The buffered read stream.
- typedef buffered_read_stream<write_stream_type&> read_stream_type;
- read_stream_type stream_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BUFFERED_STREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp
deleted file mode 100644
index a477f2be65e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// buffered_stream_fwd.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_BUFFERED_STREAM_FWD_HPP
-#define BOOST_ASIO_BUFFERED_STREAM_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-namespace boost {
-namespace asio {
-
-template <typename Stream>
-class buffered_stream;
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_BUFFERED_STREAM_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp
deleted file mode 100644
index 3eacd5f1509..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp
+++ /dev/null
@@ -1,251 +0,0 @@
-//
-// buffered_write_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_BUFFERED_WRITE_STREAM_HPP
-#define BOOST_ASIO_BUFFERED_WRITE_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 <cstddef>
-#include <boost/asio/buffered_write_stream_fwd.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffered_stream_storage.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/write.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Adds buffering to the write-related operations of a stream.
-/**
- * The buffered_write_stream class template can be used to add buffering to the
- * synchronous and asynchronous write operations of a stream.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename Stream>
-class buffered_write_stream
- : private noncopyable
-{
-public:
- /// 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(GENERATING_DOCUMENTATION)
- /// The default buffer size.
- static const std::size_t default_buffer_size = implementation_defined;
-#else
- BOOST_ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size = 1024);
-#endif
-
- /// Construct, passing the specified argument to initialise the next layer.
- template <typename Arg>
- explicit buffered_write_stream(Arg& a)
- : next_layer_(a),
- storage_(default_buffer_size)
- {
- }
-
- /// Construct, passing the specified argument to initialise the next layer.
- template <typename Arg>
- buffered_write_stream(Arg& a, std::size_t buffer_size)
- : next_layer_(a),
- storage_(buffer_size)
- {
- }
-
- /// Get a reference to the next layer.
- next_layer_type& next_layer()
- {
- return next_layer_;
- }
-
- /// Get a reference to the lowest layer.
- lowest_layer_type& lowest_layer()
- {
- return next_layer_.lowest_layer();
- }
-
- /// Get a const reference to the lowest layer.
- const lowest_layer_type& lowest_layer() const
- {
- return next_layer_.lowest_layer();
- }
-
- /// Get the executor associated with the object.
- 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_.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_.get_io_service();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Close the stream.
- void close()
- {
- next_layer_.close();
- }
-
- /// Close the stream.
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- next_layer_.close(ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Flush all data from the buffer to the next layer. Returns the number of
- /// bytes written to the next layer on the last write operation. Throws an
- /// exception on failure.
- std::size_t flush();
-
- /// Flush all data from the buffer to the next layer. Returns the number of
- /// bytes written to the next layer on the last write operation, or 0 if an
- /// error occurred.
- std::size_t flush(boost::system::error_code& ec);
-
- /// Start an asynchronous flush.
- template <typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
- /// Write the given data to the stream. Returns the number of bytes written.
- /// Throws an exception on failure.
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers);
-
- /// Write the given data to the stream. Returns the number of bytes written,
- /// or 0 if an error occurred and the error handler did not throw.
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- boost::system::error_code& ec);
-
- /// Start an asynchronous write. The data being written must be valid for the
- /// lifetime of the asynchronous operation.
- 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);
-
- /// Read some data from the stream. Returns the number of bytes read. Throws
- /// an exception on failure.
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- return next_layer_.read_some(buffers);
- }
-
- /// Read some data from the stream. Returns the number of bytes read or 0 if
- /// an error occurred.
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return next_layer_.read_some(buffers, ec);
- }
-
- /// Start an asynchronous read. The buffer into which the data will be read
- /// must be valid for the lifetime of the asynchronous operation.
- 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)
- {
- return next_layer_.async_read_some(buffers,
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-
- /// Peek at the incoming data on the stream. Returns the number of bytes read.
- /// Throws an exception on failure.
- template <typename MutableBufferSequence>
- std::size_t peek(const MutableBufferSequence& buffers)
- {
- return next_layer_.peek(buffers);
- }
-
- /// Peek at the incoming data on the stream. Returns the number of bytes read,
- /// or 0 if an error occurred.
- template <typename MutableBufferSequence>
- std::size_t peek(const MutableBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return next_layer_.peek(buffers, ec);
- }
-
- /// Determine the amount of data that may be read without blocking.
- std::size_t in_avail()
- {
- return next_layer_.in_avail();
- }
-
- /// Determine the amount of data that may be read without blocking.
- std::size_t in_avail(boost::system::error_code& ec)
- {
- return next_layer_.in_avail(ec);
- }
-
-private:
- /// Copy data into the internal buffer from the specified source buffer.
- /// Returns the number of bytes copied.
- template <typename ConstBufferSequence>
- std::size_t copy(const ConstBufferSequence& buffers);
-
- /// The next layer.
- Stream next_layer_;
-
- // The data in the buffer.
- detail::buffered_stream_storage storage_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/buffered_write_stream.hpp>
-
-#endif // BOOST_ASIO_BUFFERED_WRITE_STREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp
deleted file mode 100644
index 68ab9a4d31b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// buffered_write_stream_fwd.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_BUFFERED_WRITE_STREAM_FWD_HPP
-#define BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-namespace boost {
-namespace asio {
-
-template <typename Stream>
-class buffered_write_stream;
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp
deleted file mode 100644
index 9de385128f6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp
+++ /dev/null
@@ -1,523 +0,0 @@
-//
-// buffers_iterator.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_BUFFERS_ITERATOR_HPP
-#define BOOST_ASIO_BUFFERS_ITERATOR_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 <iterator>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- template <bool IsMutable>
- struct buffers_iterator_types_helper;
-
- template <>
- struct buffers_iterator_types_helper<false>
- {
- typedef const_buffer buffer_type;
- template <typename ByteType>
- struct byte_type
- {
- typedef typename add_const<ByteType>::type type;
- };
- };
-
- template <>
- struct buffers_iterator_types_helper<true>
- {
- typedef mutable_buffer buffer_type;
- template <typename ByteType>
- struct byte_type
- {
- typedef ByteType type;
- };
- };
-
- template <typename BufferSequence, typename ByteType>
- struct buffers_iterator_types
- {
- enum
- {
- is_mutable = is_convertible<
- typename BufferSequence::value_type,
- mutable_buffer>::value
- };
- typedef buffers_iterator_types_helper<is_mutable> helper;
- typedef typename helper::buffer_type buffer_type;
- typedef typename helper::template byte_type<ByteType>::type byte_type;
- typedef typename BufferSequence::const_iterator const_iterator;
- };
-
- template <typename ByteType>
- struct buffers_iterator_types<mutable_buffer, ByteType>
- {
- typedef mutable_buffer buffer_type;
- typedef ByteType byte_type;
- typedef const mutable_buffer* const_iterator;
- };
-
- template <typename ByteType>
- struct buffers_iterator_types<const_buffer, ByteType>
- {
- typedef const_buffer buffer_type;
- typedef typename add_const<ByteType>::type byte_type;
- typedef const const_buffer* const_iterator;
- };
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
- template <typename ByteType>
- struct buffers_iterator_types<mutable_buffers_1, ByteType>
- {
- typedef mutable_buffer buffer_type;
- typedef ByteType byte_type;
- typedef const mutable_buffer* const_iterator;
- };
-
- template <typename ByteType>
- struct buffers_iterator_types<const_buffers_1, ByteType>
- {
- typedef const_buffer buffer_type;
- typedef typename add_const<ByteType>::type byte_type;
- typedef const const_buffer* const_iterator;
- };
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-}
-
-/// A random access iterator over the bytes in a buffer sequence.
-template <typename BufferSequence, typename ByteType = char>
-class buffers_iterator
-{
-private:
- typedef typename detail::buffers_iterator_types<
- BufferSequence, ByteType>::buffer_type buffer_type;
-
- typedef typename detail::buffers_iterator_types<BufferSequence,
- ByteType>::const_iterator buffer_sequence_iterator_type;
-
-public:
- /// The type used for the distance between two iterators.
- typedef std::ptrdiff_t difference_type;
-
- /// The type of the value pointed to by the iterator.
- typedef ByteType value_type;
-
-#if defined(GENERATING_DOCUMENTATION)
- /// The type of the result of applying operator->() to the iterator.
- /**
- * If the buffer sequence stores buffer objects that are convertible to
- * mutable_buffer, this is a pointer to a non-const ByteType. Otherwise, a
- * pointer to a const ByteType.
- */
- typedef const_or_non_const_ByteType* pointer;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::buffers_iterator_types<
- BufferSequence, ByteType>::byte_type* pointer;
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#if defined(GENERATING_DOCUMENTATION)
- /// The type of the result of applying operator*() to the iterator.
- /**
- * If the buffer sequence stores buffer objects that are convertible to
- * mutable_buffer, this is a reference to a non-const ByteType. Otherwise, a
- * reference to a const ByteType.
- */
- typedef const_or_non_const_ByteType& reference;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::buffers_iterator_types<
- BufferSequence, ByteType>::byte_type& reference;
-#endif // defined(GENERATING_DOCUMENTATION)
-
- /// The iterator category.
- typedef std::random_access_iterator_tag iterator_category;
-
- /// Default constructor. Creates an iterator in an undefined state.
- buffers_iterator()
- : current_buffer_(),
- current_buffer_position_(0),
- begin_(),
- current_(),
- end_(),
- position_(0)
- {
- }
-
- /// Construct an iterator representing the beginning of the buffers' data.
- static buffers_iterator begin(const BufferSequence& buffers)
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
- __attribute__ ((__noinline__))
-#endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
- {
- buffers_iterator new_iter;
- new_iter.begin_ = boost::asio::buffer_sequence_begin(buffers);
- new_iter.current_ = boost::asio::buffer_sequence_begin(buffers);
- new_iter.end_ = boost::asio::buffer_sequence_end(buffers);
- while (new_iter.current_ != new_iter.end_)
- {
- new_iter.current_buffer_ = *new_iter.current_;
- if (new_iter.current_buffer_.size() > 0)
- break;
- ++new_iter.current_;
- }
- return new_iter;
- }
-
- /// Construct an iterator representing the end of the buffers' data.
- static buffers_iterator end(const BufferSequence& buffers)
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
- __attribute__ ((__noinline__))
-#endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
- {
- buffers_iterator new_iter;
- new_iter.begin_ = boost::asio::buffer_sequence_begin(buffers);
- new_iter.current_ = boost::asio::buffer_sequence_begin(buffers);
- new_iter.end_ = boost::asio::buffer_sequence_end(buffers);
- while (new_iter.current_ != new_iter.end_)
- {
- buffer_type buffer = *new_iter.current_;
- new_iter.position_ += buffer.size();
- ++new_iter.current_;
- }
- return new_iter;
- }
-
- /// Dereference an iterator.
- reference operator*() const
- {
- return dereference();
- }
-
- /// Dereference an iterator.
- pointer operator->() const
- {
- return &dereference();
- }
-
- /// Access an individual element.
- reference operator[](std::ptrdiff_t difference) const
- {
- buffers_iterator tmp(*this);
- tmp.advance(difference);
- return *tmp;
- }
-
- /// Increment operator (prefix).
- buffers_iterator& operator++()
- {
- increment();
- return *this;
- }
-
- /// Increment operator (postfix).
- buffers_iterator operator++(int)
- {
- buffers_iterator tmp(*this);
- ++*this;
- return tmp;
- }
-
- /// Decrement operator (prefix).
- buffers_iterator& operator--()
- {
- decrement();
- return *this;
- }
-
- /// Decrement operator (postfix).
- buffers_iterator operator--(int)
- {
- buffers_iterator tmp(*this);
- --*this;
- return tmp;
- }
-
- /// Addition operator.
- buffers_iterator& operator+=(std::ptrdiff_t difference)
- {
- advance(difference);
- return *this;
- }
-
- /// Subtraction operator.
- buffers_iterator& operator-=(std::ptrdiff_t difference)
- {
- advance(-difference);
- return *this;
- }
-
- /// Addition operator.
- friend buffers_iterator operator+(const buffers_iterator& iter,
- std::ptrdiff_t difference)
- {
- buffers_iterator tmp(iter);
- tmp.advance(difference);
- return tmp;
- }
-
- /// Addition operator.
- friend buffers_iterator operator+(std::ptrdiff_t difference,
- const buffers_iterator& iter)
- {
- buffers_iterator tmp(iter);
- tmp.advance(difference);
- return tmp;
- }
-
- /// Subtraction operator.
- friend buffers_iterator operator-(const buffers_iterator& iter,
- std::ptrdiff_t difference)
- {
- buffers_iterator tmp(iter);
- tmp.advance(-difference);
- return tmp;
- }
-
- /// Subtraction operator.
- friend std::ptrdiff_t operator-(const buffers_iterator& a,
- const buffers_iterator& b)
- {
- return b.distance_to(a);
- }
-
- /// Test two iterators for equality.
- friend bool operator==(const buffers_iterator& a, const buffers_iterator& b)
- {
- return a.equal(b);
- }
-
- /// Test two iterators for inequality.
- friend bool operator!=(const buffers_iterator& a, const buffers_iterator& b)
- {
- return !a.equal(b);
- }
-
- /// Compare two iterators.
- friend bool operator<(const buffers_iterator& a, const buffers_iterator& b)
- {
- return a.distance_to(b) > 0;
- }
-
- /// Compare two iterators.
- friend bool operator<=(const buffers_iterator& a, const buffers_iterator& b)
- {
- return !(b < a);
- }
-
- /// Compare two iterators.
- friend bool operator>(const buffers_iterator& a, const buffers_iterator& b)
- {
- return b < a;
- }
-
- /// Compare two iterators.
- friend bool operator>=(const buffers_iterator& a, const buffers_iterator& b)
- {
- return !(a < b);
- }
-
-private:
- // Dereference the iterator.
- reference dereference() const
- {
- return static_cast<pointer>(
- current_buffer_.data())[current_buffer_position_];
- }
-
- // Compare two iterators for equality.
- bool equal(const buffers_iterator& other) const
- {
- return position_ == other.position_;
- }
-
- // Increment the iterator.
- void increment()
- {
- BOOST_ASIO_ASSERT(current_ != end_ && "iterator out of bounds");
- ++position_;
-
- // Check if the increment can be satisfied by the current buffer.
- ++current_buffer_position_;
- if (current_buffer_position_ != current_buffer_.size())
- return;
-
- // Find the next non-empty buffer.
- ++current_;
- current_buffer_position_ = 0;
- while (current_ != end_)
- {
- current_buffer_ = *current_;
- if (current_buffer_.size() > 0)
- return;
- ++current_;
- }
- }
-
- // Decrement the iterator.
- void decrement()
- {
- BOOST_ASIO_ASSERT(position_ > 0 && "iterator out of bounds");
- --position_;
-
- // Check if the decrement can be satisfied by the current buffer.
- if (current_buffer_position_ != 0)
- {
- --current_buffer_position_;
- return;
- }
-
- // Find the previous non-empty buffer.
- buffer_sequence_iterator_type iter = current_;
- while (iter != begin_)
- {
- --iter;
- buffer_type buffer = *iter;
- std::size_t buffer_size = buffer.size();
- if (buffer_size > 0)
- {
- current_ = iter;
- current_buffer_ = buffer;
- current_buffer_position_ = buffer_size - 1;
- return;
- }
- }
- }
-
- // Advance the iterator by the specified distance.
- void advance(std::ptrdiff_t n)
- {
- if (n > 0)
- {
- BOOST_ASIO_ASSERT(current_ != end_ && "iterator out of bounds");
- for (;;)
- {
- std::ptrdiff_t current_buffer_balance
- = current_buffer_.size() - current_buffer_position_;
-
- // Check if the advance can be satisfied by the current buffer.
- if (current_buffer_balance > n)
- {
- position_ += n;
- current_buffer_position_ += n;
- return;
- }
-
- // Update position.
- n -= current_buffer_balance;
- position_ += current_buffer_balance;
-
- // Move to next buffer. If it is empty then it will be skipped on the
- // next iteration of this loop.
- if (++current_ == end_)
- {
- BOOST_ASIO_ASSERT(n == 0 && "iterator out of bounds");
- current_buffer_ = buffer_type();
- current_buffer_position_ = 0;
- return;
- }
- current_buffer_ = *current_;
- current_buffer_position_ = 0;
- }
- }
- else if (n < 0)
- {
- std::size_t abs_n = -n;
- BOOST_ASIO_ASSERT(position_ >= abs_n && "iterator out of bounds");
- for (;;)
- {
- // Check if the advance can be satisfied by the current buffer.
- if (current_buffer_position_ >= abs_n)
- {
- position_ -= abs_n;
- current_buffer_position_ -= abs_n;
- return;
- }
-
- // Update position.
- abs_n -= current_buffer_position_;
- position_ -= current_buffer_position_;
-
- // Check if we've reached the beginning of the buffers.
- if (current_ == begin_)
- {
- BOOST_ASIO_ASSERT(abs_n == 0 && "iterator out of bounds");
- current_buffer_position_ = 0;
- return;
- }
-
- // Find the previous non-empty buffer.
- buffer_sequence_iterator_type iter = current_;
- while (iter != begin_)
- {
- --iter;
- buffer_type buffer = *iter;
- std::size_t buffer_size = buffer.size();
- if (buffer_size > 0)
- {
- current_ = iter;
- current_buffer_ = buffer;
- current_buffer_position_ = buffer_size;
- break;
- }
- }
- }
- }
- }
-
- // Determine the distance between two iterators.
- std::ptrdiff_t distance_to(const buffers_iterator& other) const
- {
- return other.position_ - position_;
- }
-
- buffer_type current_buffer_;
- std::size_t current_buffer_position_;
- buffer_sequence_iterator_type begin_;
- buffer_sequence_iterator_type current_;
- buffer_sequence_iterator_type end_;
- std::size_t position_;
-};
-
-/// Construct an iterator representing the beginning of the buffers' data.
-template <typename BufferSequence>
-inline buffers_iterator<BufferSequence> buffers_begin(
- const BufferSequence& buffers)
-{
- return buffers_iterator<BufferSequence>::begin(buffers);
-}
-
-/// Construct an iterator representing the end of the buffers' data.
-template <typename BufferSequence>
-inline buffers_iterator<BufferSequence> buffers_end(
- const BufferSequence& buffers)
-{
- return buffers_iterator<BufferSequence>::end(buffers);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BUFFERS_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp b/src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp
deleted file mode 100644
index c49517ba4f4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp
+++ /dev/null
@@ -1,220 +0,0 @@
-//
-// completion_condition.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_COMPLETION_CONDITION_HPP
-#define BOOST_ASIO_COMPLETION_CONDITION_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/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail {
-
-// The default maximum number of bytes to transfer in a single operation.
-enum default_max_transfer_size_t { default_max_transfer_size = 65536 };
-
-// Adapt result of old-style completion conditions (which had a bool result
-// where true indicated that the operation was complete).
-inline std::size_t adapt_completion_condition_result(bool result)
-{
- return result ? 0 : default_max_transfer_size;
-}
-
-// Adapt result of current completion conditions (which have a size_t result
-// where 0 means the operation is complete, and otherwise the result is the
-// maximum number of bytes to transfer on the next underlying operation).
-inline std::size_t adapt_completion_condition_result(std::size_t result)
-{
- return result;
-}
-
-class transfer_all_t
-{
-public:
- typedef std::size_t result_type;
-
- template <typename Error>
- std::size_t operator()(const Error& err, std::size_t)
- {
- return !!err ? 0 : default_max_transfer_size;
- }
-};
-
-class transfer_at_least_t
-{
-public:
- typedef std::size_t result_type;
-
- explicit transfer_at_least_t(std::size_t minimum)
- : minimum_(minimum)
- {
- }
-
- template <typename Error>
- std::size_t operator()(const Error& err, std::size_t bytes_transferred)
- {
- return (!!err || bytes_transferred >= minimum_)
- ? 0 : default_max_transfer_size;
- }
-
-private:
- std::size_t minimum_;
-};
-
-class transfer_exactly_t
-{
-public:
- typedef std::size_t result_type;
-
- explicit transfer_exactly_t(std::size_t size)
- : size_(size)
- {
- }
-
- template <typename Error>
- std::size_t operator()(const Error& err, std::size_t bytes_transferred)
- {
- return (!!err || bytes_transferred >= size_) ? 0 :
- (size_ - bytes_transferred < default_max_transfer_size
- ? size_ - bytes_transferred : std::size_t(default_max_transfer_size));
- }
-
-private:
- std::size_t size_;
-};
-
-} // namespace detail
-
-/**
- * @defgroup completion_condition Completion Condition Function Objects
- *
- * Function objects used for determining when a read or write operation should
- * complete.
- */
-/*@{*/
-
-/// Return a completion condition function object that indicates that a read or
-/// write operation should continue until all of the data has been transferred,
-/// or until an error occurs.
-/**
- * This function is used to create an object, of unspecified type, that meets
- * CompletionCondition requirements.
- *
- * @par Example
- * Reading until a buffer is full:
- * @code
- * boost::array<char, 128> buf;
- * boost::system::error_code ec;
- * std::size_t n = boost::asio::read(
- * sock, boost::asio::buffer(buf),
- * boost::asio::transfer_all(), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * // n == 128
- * }
- * @endcode
- */
-#if defined(GENERATING_DOCUMENTATION)
-unspecified transfer_all();
-#else
-inline detail::transfer_all_t transfer_all()
-{
- return detail::transfer_all_t();
-}
-#endif
-
-/// Return a completion condition function object that indicates that a read or
-/// write operation should continue until a minimum number of bytes has been
-/// transferred, or until an error occurs.
-/**
- * This function is used to create an object, of unspecified type, that meets
- * CompletionCondition requirements.
- *
- * @par Example
- * Reading until a buffer is full or contains at least 64 bytes:
- * @code
- * boost::array<char, 128> buf;
- * boost::system::error_code ec;
- * std::size_t n = boost::asio::read(
- * sock, boost::asio::buffer(buf),
- * boost::asio::transfer_at_least(64), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * // n >= 64 && n <= 128
- * }
- * @endcode
- */
-#if defined(GENERATING_DOCUMENTATION)
-unspecified transfer_at_least(std::size_t minimum);
-#else
-inline detail::transfer_at_least_t transfer_at_least(std::size_t minimum)
-{
- return detail::transfer_at_least_t(minimum);
-}
-#endif
-
-/// Return a completion condition function object that indicates that a read or
-/// write operation should continue until an exact number of bytes has been
-/// transferred, or until an error occurs.
-/**
- * This function is used to create an object, of unspecified type, that meets
- * CompletionCondition requirements.
- *
- * @par Example
- * Reading until a buffer is full or contains exactly 64 bytes:
- * @code
- * boost::array<char, 128> buf;
- * boost::system::error_code ec;
- * std::size_t n = boost::asio::read(
- * sock, boost::asio::buffer(buf),
- * boost::asio::transfer_exactly(64), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * // n == 64
- * }
- * @endcode
- */
-#if defined(GENERATING_DOCUMENTATION)
-unspecified transfer_exactly(std::size_t size);
-#else
-inline detail::transfer_exactly_t transfer_exactly(std::size_t size)
-{
- return detail::transfer_exactly_t(size);
-}
-#endif
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index 03296885dd3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/connect.hpp
+++ /dev/null
@@ -1,1062 +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 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.69.0/boost/asio/coroutine.hpp b/src/third_party/boost-1.69.0/boost/asio/coroutine.hpp
deleted file mode 100644
index b195b12ed83..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/coroutine.hpp
+++ /dev/null
@@ -1,330 +0,0 @@
-//
-// coroutine.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_COROUTINE_HPP
-#define BOOST_ASIO_COROUTINE_HPP
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class coroutine_ref;
-
-} // namespace detail
-
-/// Provides support for implementing stackless coroutines.
-/**
- * The @c coroutine class may be used to implement stackless coroutines. The
- * class itself is used to store the current state of the coroutine.
- *
- * Coroutines are copy-constructible and assignable, and the space overhead is
- * a single int. They can be used as a base class:
- *
- * @code class session : coroutine
- * {
- * ...
- * }; @endcode
- *
- * or as a data member:
- *
- * @code class session
- * {
- * ...
- * coroutine coro_;
- * }; @endcode
- *
- * or even bound in as a function argument using lambdas or @c bind(). The
- * important thing is that as the application maintains a copy of the object
- * for as long as the coroutine must be kept alive.
- *
- * @par Pseudo-keywords
- *
- * A coroutine is used in conjunction with certain "pseudo-keywords", which
- * are implemented as macros. These macros are defined by a header file:
- *
- * @code #include <boost/asio/yield.hpp>@endcode
- *
- * and may conversely be undefined as follows:
- *
- * @code #include <boost/asio/unyield.hpp>@endcode
- *
- * <b>reenter</b>
- *
- * The @c reenter macro is used to define the body of a coroutine. It takes a
- * single argument: a pointer or reference to a coroutine object. For example,
- * if the base class is a coroutine object you may write:
- *
- * @code reenter (this)
- * {
- * ... coroutine body ...
- * } @endcode
- *
- * and if a data member or other variable you can write:
- *
- * @code reenter (coro_)
- * {
- * ... coroutine body ...
- * } @endcode
- *
- * When @c reenter is executed at runtime, control jumps to the location of the
- * last @c yield or @c fork.
- *
- * The coroutine body may also be a single statement, such as:
- *
- * @code reenter (this) for (;;)
- * {
- * ...
- * } @endcode
- *
- * @b Limitation: The @c reenter macro is implemented using a switch. This
- * means that you must take care when using local variables within the
- * coroutine body. The local variable is not allowed in a position where
- * reentering the coroutine could bypass the variable definition.
- *
- * <b>yield <em>statement</em></b>
- *
- * This form of the @c yield keyword is often used with asynchronous operations:
- *
- * @code yield socket_->async_read_some(buffer(*buffer_), *this); @endcode
- *
- * This divides into four logical steps:
- *
- * @li @c yield saves the current state of the coroutine.
- * @li The statement initiates the asynchronous operation.
- * @li The resume point is defined immediately following the statement.
- * @li Control is transferred to the end of the coroutine body.
- *
- * When the asynchronous operation completes, the function object is invoked
- * and @c reenter causes control to transfer to the resume point. It is
- * important to remember to carry the coroutine state forward with the
- * asynchronous operation. In the above snippet, the current class is a
- * function object object with a coroutine object as base class or data member.
- *
- * The statement may also be a compound statement, and this permits us to
- * define local variables with limited scope:
- *
- * @code yield
- * {
- * mutable_buffers_1 b = buffer(*buffer_);
- * socket_->async_read_some(b, *this);
- * } @endcode
- *
- * <b>yield return <em>expression</em> ;</b>
- *
- * This form of @c yield is often used in generators or coroutine-based parsers.
- * For example, the function object:
- *
- * @code struct interleave : coroutine
- * {
- * istream& is1;
- * istream& is2;
- * char operator()(char c)
- * {
- * reenter (this) for (;;)
- * {
- * yield return is1.get();
- * yield return is2.get();
- * }
- * }
- * }; @endcode
- *
- * defines a trivial coroutine that interleaves the characters from two input
- * streams.
- *
- * This type of @c yield divides into three logical steps:
- *
- * @li @c yield saves the current state of the coroutine.
- * @li The resume point is defined immediately following the semicolon.
- * @li The value of the expression is returned from the function.
- *
- * <b>yield ;</b>
- *
- * This form of @c yield is equivalent to the following steps:
- *
- * @li @c yield saves the current state of the coroutine.
- * @li The resume point is defined immediately following the semicolon.
- * @li Control is transferred to the end of the coroutine body.
- *
- * This form might be applied when coroutines are used for cooperative
- * threading and scheduling is explicitly managed. For example:
- *
- * @code struct task : coroutine
- * {
- * ...
- * void operator()()
- * {
- * reenter (this)
- * {
- * while (... not finished ...)
- * {
- * ... do something ...
- * yield;
- * ... do some more ...
- * yield;
- * }
- * }
- * }
- * ...
- * };
- * ...
- * task t1, t2;
- * for (;;)
- * {
- * t1();
- * t2();
- * } @endcode
- *
- * <b>yield break ;</b>
- *
- * The final form of @c yield is used to explicitly terminate the coroutine.
- * This form is comprised of two steps:
- *
- * @li @c yield sets the coroutine state to indicate termination.
- * @li Control is transferred to the end of the coroutine body.
- *
- * Once terminated, calls to is_complete() return true and the coroutine cannot
- * be reentered.
- *
- * Note that a coroutine may also be implicitly terminated if the coroutine
- * body is exited without a yield, e.g. by return, throw or by running to the
- * end of the body.
- *
- * <b>fork <em>statement</em></b>
- *
- * The @c fork pseudo-keyword is used when "forking" a coroutine, i.e. splitting
- * it into two (or more) copies. One use of @c fork is in a server, where a new
- * coroutine is created to handle each client connection:
- *
- * @code reenter (this)
- * {
- * do
- * {
- * socket_.reset(new tcp::socket(io_context_));
- * yield acceptor->async_accept(*socket_, *this);
- * fork server(*this)();
- * } while (is_parent());
- * ... client-specific handling follows ...
- * } @endcode
- *
- * The logical steps involved in a @c fork are:
- *
- * @li @c fork saves the current state of the coroutine.
- * @li The statement creates a copy of the coroutine and either executes it
- * immediately or schedules it for later execution.
- * @li The resume point is defined immediately following the semicolon.
- * @li For the "parent", control immediately continues from the next line.
- *
- * The functions is_parent() and is_child() can be used to differentiate
- * between parent and child. You would use these functions to alter subsequent
- * control flow.
- *
- * Note that @c fork doesn't do the actual forking by itself. It is the
- * application's responsibility to create a clone of the coroutine and call it.
- * The clone can be called immediately, as above, or scheduled for delayed
- * execution using something like io_context::post().
- *
- * @par Alternate macro names
- *
- * If preferred, an application can use macro names that follow a more typical
- * naming convention, rather than the pseudo-keywords. These are:
- *
- * @li @c BOOST_ASIO_CORO_REENTER instead of @c reenter
- * @li @c BOOST_ASIO_CORO_YIELD instead of @c yield
- * @li @c BOOST_ASIO_CORO_FORK instead of @c fork
- */
-class coroutine
-{
-public:
- /// Constructs a coroutine in its initial state.
- coroutine() : value_(0) {}
-
- /// Returns true if the coroutine is the child of a fork.
- bool is_child() const { return value_ < 0; }
-
- /// Returns true if the coroutine is the parent of a fork.
- bool is_parent() const { return !is_child(); }
-
- /// Returns true if the coroutine has reached its terminal state.
- bool is_complete() const { return value_ == -1; }
-
-private:
- friend class detail::coroutine_ref;
- int value_;
-};
-
-
-namespace detail {
-
-class coroutine_ref
-{
-public:
- coroutine_ref(coroutine& c) : value_(c.value_), modified_(false) {}
- coroutine_ref(coroutine* c) : value_(c->value_), modified_(false) {}
- ~coroutine_ref() { if (!modified_) value_ = -1; }
- operator int() const { return value_; }
- int& operator=(int v) { modified_ = true; return value_ = v; }
-private:
- void operator=(const coroutine_ref&);
- int& value_;
- bool modified_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#define BOOST_ASIO_CORO_REENTER(c) \
- switch (::boost::asio::detail::coroutine_ref _coro_value = c) \
- case -1: if (_coro_value) \
- { \
- goto terminate_coroutine; \
- terminate_coroutine: \
- _coro_value = -1; \
- goto bail_out_of_coroutine; \
- bail_out_of_coroutine: \
- break; \
- } \
- else /* fall-through */ case 0:
-
-#define BOOST_ASIO_CORO_YIELD_IMPL(n) \
- for (_coro_value = (n);;) \
- if (_coro_value == 0) \
- { \
- case (n): ; \
- break; \
- } \
- else \
- switch (_coro_value ? 0 : 1) \
- for (;;) \
- /* fall-through */ case -1: if (_coro_value) \
- goto terminate_coroutine; \
- else for (;;) \
- /* fall-through */ case 1: if (_coro_value) \
- goto bail_out_of_coroutine; \
- else /* fall-through */ case 0:
-
-#define BOOST_ASIO_CORO_FORK_IMPL(n) \
- for (_coro_value = -(n);; _coro_value = (n)) \
- if (_coro_value == (n)) \
- { \
- case -(n): ; \
- break; \
- } \
- else
-
-#if defined(_MSC_VER)
-# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(__COUNTER__ + 1)
-# define BOOST_ASIO_CORO_FORK BOOST_ASIO_CORO_FORK_IMPL(__COUNTER__ + 1)
-#else // defined(_MSC_VER)
-# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(__LINE__)
-# define BOOST_ASIO_CORO_FORK BOOST_ASIO_CORO_FORK_IMPL(__LINE__)
-#endif // defined(_MSC_VER)
-
-#endif // BOOST_ASIO_COROUTINE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp
deleted file mode 100644
index 816433ba783..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp
+++ /dev/null
@@ -1,468 +0,0 @@
-//
-// datagram_socket_service.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_DATAGRAM_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_DATAGRAM_SOCKET_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/null_socket_service.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-#else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a datagram socket.
-template <typename Protocol>
-class datagram_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<datagram_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a datagram socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new datagram socket service for the specified io_context.
- explicit datagram_socket_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- datagram_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new datagram socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new datagram socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another datagram socket implementation.
- void move_assign(implementation_type& impl,
- datagram_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- // All socket services have access to each other's implementations.
- template <typename Protocol1> friend class datagram_socket_service;
-
- /// Move-construct a new datagram socket implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- datagram_socket_service<Protocol1>& other_service,
- typename datagram_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a datagram socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- // Open a new datagram socket implementation.
- BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_DGRAM))
- service_impl_.open(impl, protocol, ec);
- else
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a datagram socket.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a datagram socket implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying socket.
- native_handle_type release(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.release(impl, ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- // Bind the datagram socket to the specified local endpoint.
- BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the datagram socket to the specified endpoint.
- BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (boost::system::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, boost::system::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, boost::system::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, boost::system::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, boost::system::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(implementation_type& impl, const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send a datagram to the specified endpoint.
- template <typename ConstBufferSequence>
- std::size_t send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.send_to(impl, buffers, destination, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send_to(impl, buffers,
- destination, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.receive(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive a datagram with the endpoint of the sender.
- template <typename MutableBufferSequence>
- std::size_t receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.receive_from(impl, buffers, sender_endpoint, flags,
- ec);
- }
-
- /// Start an asynchronous receive that will get the endpoint of the sender.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive_from(impl, buffers,
- sender_endpoint, flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_DATAGRAM_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp
deleted file mode 100644
index 3a020e8b9a7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// deadline_timer.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_DEADLINE_TIMER_HPP
-#define BOOST_ASIO_DEADLINE_TIMER_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_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/detail/socket_types.hpp> // Must come before posix_time.
-#include <boost/asio/basic_deadline_timer.hpp>
-
-#include <boost/date_time/posix_time/posix_time_types.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Typedef for the typical usage of timer. Uses a UTC clock.
-typedef basic_deadline_timer<boost::posix_time::ptime> deadline_timer;
-
-} // namespace asio
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_DEADLINE_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp b/src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp
deleted file mode 100644
index 036378f93bd..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp
+++ /dev/null
@@ -1,175 +0,0 @@
-//
-// deadline_timer_service.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_DEADLINE_TIMER_SERVICE_HPP
-#define BOOST_ASIO_DEADLINE_TIMER_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/deadline_timer_service.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/time_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a timer.
-template <typename TimeType,
- typename TimeTraits = boost::asio::time_traits<TimeType> >
-class deadline_timer_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<
- deadline_timer_service<TimeType, TimeTraits> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The time traits type.
- typedef TimeTraits traits_type;
-
- /// The time type.
- typedef typename traits_type::time_type time_type;
-
- /// The duration type.
- typedef typename traits_type::duration_type duration_type;
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::deadline_timer_service<traits_type> service_impl_type;
-
-public:
- /// The implementation type of the deadline timer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new timer service for the specified io_context.
- explicit deadline_timer_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- deadline_timer_service<TimeType, TimeTraits> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new timer implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- /// Destroy a timer implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Cancel any asynchronous wait operations associated with the timer.
- std::size_t cancel(implementation_type& impl, boost::system::error_code& ec)
- {
- return service_impl_.cancel(impl, ec);
- }
-
- /// Cancels one asynchronous wait operation associated with the timer.
- std::size_t cancel_one(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.cancel_one(impl, ec);
- }
-
- /// Get the expiry time for the timer as an absolute time.
- time_type expires_at(const implementation_type& impl) const
- {
- return service_impl_.expiry(impl);
- }
-
- /// Set the expiry time for the timer as an absolute time.
- std::size_t expires_at(implementation_type& impl,
- const time_type& expiry_time, boost::system::error_code& ec)
- {
- return service_impl_.expires_at(impl, expiry_time, ec);
- }
-
- /// Get the expiry time for the timer relative to now.
- duration_type expires_from_now(const implementation_type& impl) const
- {
- return TimeTraits::subtract(service_impl_.expiry(impl), TimeTraits::now());
- }
-
- /// Set the expiry time for the timer relative to now.
- std::size_t expires_from_now(implementation_type& impl,
- const duration_type& expiry_time, boost::system::error_code& ec)
- {
- return service_impl_.expires_after(impl, expiry_time, ec);
- }
-
- // Perform a blocking wait on the timer.
- void wait(implementation_type& impl, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, ec);
- }
-
- // Start an asynchronous wait on the timer.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_DEADLINE_TIMER_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/defer.hpp b/src/third_party/boost-1.69.0/boost/asio/defer.hpp
deleted file mode 100644
index 2eaf2d01c66..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/defer.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// defer.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_DEFER_HPP
-#define BOOST_ASIO_DEFER_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/type_traits.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/is_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Submits a completion token or function object for execution.
-/**
- * This function submits an object for execution using the object's associated
- * executor. The function object is queued for execution, and is never called
- * from the current thread prior to returning from <tt>defer()</tt>.
- *
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
- *
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
- *
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Performs <tt>ex.defer(std::move(handler), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
- */
-template <typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token);
-
-/// Submits a completion token or function object for execution.
-/**
- * This function submits an object for execution using the specified executor.
- * The function object is queued for execution, and is never called from the
- * current thread prior to returning from <tt>defer()</tt>.
- *
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
- *
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
- *
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
- *
- * @li Performs <tt>Executor(ex).defer(std::move(f), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
- */
-template <typename Executor, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type* = 0);
-
-/// Submits a completion token or function object for execution.
-/**
- * @returns <tt>defer(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
- */
-template <typename ExecutionContext, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/defer.hpp>
-
-#endif // BOOST_ASIO_DEFER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/array.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/array.hpp
deleted file mode 100644
index 238118e3a66..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/array.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// detail/array.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_ARRAY_HPP
-#define BOOST_ASIO_DETAIL_ARRAY_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_ARRAY)
-# include <array>
-#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
-# include <boost/array.hpp>
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
-using std::array;
-#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
-using boost::array;
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_ARRAY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp
deleted file mode 100644
index 82f357785d8..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// detail/array_fwd.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_ARRAY_FWD_HPP
-#define BOOST_ASIO_DETAIL_ARRAY_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-namespace boost {
-
-template<class T, std::size_t N>
-class array;
-
-} // namespace boost
-
-// Standard library components can't be forward declared, so we'll have to
-// include the array header. Fortunately, it's fairly lightweight and doesn't
-// add significantly to the compile time.
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-#endif // BOOST_ASIO_DETAIL_ARRAY_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp
deleted file mode 100644
index fe306ce6140..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// detail/assert.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_ASSERT_HPP
-#define BOOST_ASIO_DETAIL_ASSERT_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_BOOST_ASSERT)
-# include <boost/assert.hpp>
-#else // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-# include <cassert>
-#endif // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-
-#if defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-# define BOOST_ASIO_ASSERT(expr) BOOST_ASSERT(expr)
-#else // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-# define BOOST_ASIO_ASSERT(expr) assert(expr)
-#endif // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-
-#endif // BOOST_ASIO_DETAIL_ASSERT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp
deleted file mode 100644
index 78cd0fb3332..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// detail/atomic_count.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_ATOMIC_COUNT_HPP
-#define BOOST_ASIO_DETAIL_ATOMIC_COUNT_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_THREADS)
-// Nothing to include.
-#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
-# include <atomic>
-#else // defined(BOOST_ASIO_HAS_STD_ATOMIC)
-# include <boost/detail/atomic_count.hpp>
-#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC)
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS)
-typedef long atomic_count;
-inline void increment(atomic_count& a, long b) { a += b; }
-#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
-typedef std::atomic<long> atomic_count;
-inline void increment(atomic_count& a, long b) { a += b; }
-#else // defined(BOOST_ASIO_HAS_STD_ATOMIC)
-typedef boost::detail::atomic_count atomic_count;
-inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; }
-#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_ATOMIC_COUNT_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 88f167f3f40..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/base_from_completion_cond.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// detail/base_from_completion_cond.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_BASE_FROM_COMPLETION_COND_HPP
-#define BOOST_ASIO_DETAIL_BASE_FROM_COMPLETION_COND_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/completion_condition.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename CompletionCondition>
-class base_from_completion_cond
-{
-protected:
- explicit base_from_completion_cond(CompletionCondition completion_condition)
- : completion_condition_(completion_condition)
- {
- }
-
- std::size_t check_for_completion(
- const boost::system::error_code& ec,
- std::size_t total_transferred)
- {
- return detail::adapt_completion_condition_result(
- completion_condition_(ec, total_transferred));
- }
-
-private:
- CompletionCondition completion_condition_;
-};
-
-template <>
-class base_from_completion_cond<transfer_all_t>
-{
-protected:
- explicit base_from_completion_cond(transfer_all_t)
- {
- }
-
- static std::size_t check_for_completion(
- const boost::system::error_code& ec,
- std::size_t total_transferred)
- {
- return transfer_all_t()(ec, total_transferred);
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_BASE_FROM_COMPLETION_COND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp
deleted file mode 100644
index 39f1b29bcd1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp
+++ /dev/null
@@ -1,818 +0,0 @@
-//
-// detail/bind_handler.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_BIND_HANDLER_HPP
-#define BOOST_ASIO_DETAIL_BIND_HANDLER_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/associated_allocator.hpp>
-#include <boost/asio/associated_executor.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/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler, typename Arg1>
-class binder1
-{
-public:
- template <typename T>
- binder1(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1)
- : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
- arg1_(arg1)
- {
- }
-
- binder1(Handler& handler, const Arg1& arg1)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(arg1)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- binder1(const binder1& other)
- : handler_(other.handler_),
- arg1_(other.arg1_)
- {
- }
-
- binder1(binder1&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- handler_(static_cast<const Arg1&>(arg1_));
- }
-
- void operator()() const
- {
- handler_(arg1_);
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
-};
-
-template <typename Handler, typename Arg1>
-inline void* asio_handler_allocate(std::size_t size,
- binder1<Handler, Arg1>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder1<Handler, Arg1>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
-inline bool asio_handler_is_continuation(
- binder1<Handler, Arg1>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1>
-inline void asio_handler_invoke(Function& function,
- binder1<Handler, Arg1>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1>
-inline void asio_handler_invoke(const Function& function,
- binder1<Handler, Arg1>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
-inline binder1<typename decay<Handler>::type, Arg1> bind_handler(
- BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1)
-{
- return binder1<typename decay<Handler>::type, Arg1>(0,
- BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-class binder2
-{
-public:
- template <typename T>
- binder2(int, BOOST_ASIO_MOVE_ARG(T) handler,
- const Arg1& arg1, const Arg2& arg2)
- : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
- arg1_(arg1),
- arg2_(arg2)
- {
- }
-
- binder2(Handler& handler, const Arg1& arg1, const Arg2& arg2)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(arg1),
- arg2_(arg2)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- binder2(const binder2& other)
- : handler_(other.handler_),
- arg1_(other.arg1_),
- arg2_(other.arg2_)
- {
- }
-
- binder2(binder2&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- handler_(static_cast<const Arg1&>(arg1_),
- static_cast<const Arg2&>(arg2_));
- }
-
- void operator()() const
- {
- handler_(arg1_, arg2_);
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
- Arg2 arg2_;
-};
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline void* asio_handler_allocate(std::size_t size,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline bool asio_handler_is_continuation(
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_invoke(Function& function,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_invoke(const Function& function,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline binder2<typename decay<Handler>::type, Arg1, Arg2> bind_handler(
- BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2)
-{
- return binder2<typename decay<Handler>::type, Arg1, Arg2>(0,
- BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2);
-}
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-class binder3
-{
-public:
- template <typename T>
- binder3(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3)
- : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
- arg1_(arg1),
- arg2_(arg2),
- arg3_(arg3)
- {
- }
-
- binder3(Handler& handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(arg1),
- arg2_(arg2),
- arg3_(arg3)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- binder3(const binder3& other)
- : handler_(other.handler_),
- arg1_(other.arg1_),
- arg2_(other.arg2_),
- arg3_(other.arg3_)
- {
- }
-
- binder3(binder3&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_)),
- arg3_(BOOST_ASIO_MOVE_CAST(Arg3)(other.arg3_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- handler_(static_cast<const Arg1&>(arg1_),
- static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_));
- }
-
- void operator()() const
- {
- handler_(arg1_, arg2_, arg3_);
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
- Arg2 arg2_;
- Arg3 arg3_;
-};
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline void* asio_handler_allocate(std::size_t size,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline bool asio_handler_is_continuation(
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler,
- typename Arg1, typename Arg2, typename Arg3>
-inline void asio_handler_invoke(Function& function,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler,
- typename Arg1, typename Arg2, typename Arg3>
-inline void asio_handler_invoke(const Function& function,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline binder3<typename decay<Handler>::type, Arg1, Arg2, Arg3> bind_handler(
- BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2,
- const Arg3& arg3)
-{
- return binder3<typename decay<Handler>::type, Arg1, Arg2, Arg3>(0,
- BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3);
-}
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-class binder4
-{
-public:
- template <typename T>
- binder4(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
- : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
- arg1_(arg1),
- arg2_(arg2),
- arg3_(arg3),
- arg4_(arg4)
- {
- }
-
- binder4(Handler& handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(arg1),
- arg2_(arg2),
- arg3_(arg3),
- arg4_(arg4)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- binder4(const binder4& other)
- : handler_(other.handler_),
- arg1_(other.arg1_),
- arg2_(other.arg2_),
- arg3_(other.arg3_),
- arg4_(other.arg4_)
- {
- }
-
- binder4(binder4&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_)),
- arg3_(BOOST_ASIO_MOVE_CAST(Arg3)(other.arg3_)),
- arg4_(BOOST_ASIO_MOVE_CAST(Arg4)(other.arg4_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- handler_(static_cast<const Arg1&>(arg1_),
- static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_),
- static_cast<const Arg4&>(arg4_));
- }
-
- void operator()() const
- {
- handler_(arg1_, arg2_, arg3_, arg4_);
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
- Arg2 arg2_;
- Arg3 arg3_;
- Arg4 arg4_;
-};
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline void* asio_handler_allocate(std::size_t size,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline bool asio_handler_is_continuation(
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline void asio_handler_invoke(Function& function,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline void asio_handler_invoke(const Function& function,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>
-bind_handler(BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
-{
- return binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>(0,
- BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4);
-}
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-class binder5
-{
-public:
- template <typename T>
- binder5(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
- : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
- arg1_(arg1),
- arg2_(arg2),
- arg3_(arg3),
- arg4_(arg4),
- arg5_(arg5)
- {
- }
-
- binder5(Handler& handler, const Arg1& arg1, const Arg2& arg2,
- const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(arg1),
- arg2_(arg2),
- arg3_(arg3),
- arg4_(arg4),
- arg5_(arg5)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- binder5(const binder5& other)
- : handler_(other.handler_),
- arg1_(other.arg1_),
- arg2_(other.arg2_),
- arg3_(other.arg3_),
- arg4_(other.arg4_),
- arg5_(other.arg5_)
- {
- }
-
- binder5(binder5&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_)),
- arg3_(BOOST_ASIO_MOVE_CAST(Arg3)(other.arg3_)),
- arg4_(BOOST_ASIO_MOVE_CAST(Arg4)(other.arg4_)),
- arg5_(BOOST_ASIO_MOVE_CAST(Arg5)(other.arg5_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- handler_(static_cast<const Arg1&>(arg1_),
- static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_),
- static_cast<const Arg4&>(arg4_), static_cast<const Arg5&>(arg5_));
- }
-
- void operator()() const
- {
- handler_(arg1_, arg2_, arg3_, arg4_, arg5_);
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
- Arg2 arg2_;
- Arg3 arg3_;
- Arg4 arg4_;
- Arg5 arg5_;
-};
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-inline void* asio_handler_allocate(std::size_t size,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-inline bool asio_handler_is_continuation(
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4, typename Arg5>
-inline void asio_handler_invoke(Function& function,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4, typename Arg5>
-inline void asio_handler_invoke(const Function& function,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-inline binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>
-bind_handler(BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1,
- const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
-{
- return binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
- BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4, arg5);
-}
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-
-template <typename Handler, typename Arg1>
-class move_binder1
-{
-public:
- move_binder1(int, BOOST_ASIO_MOVE_ARG(Handler) handler,
- BOOST_ASIO_MOVE_ARG(Arg1) arg1)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(arg1))
- {
- }
-
- move_binder1(move_binder1&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_))
- {
- }
-
- void operator()()
- {
- handler_(BOOST_ASIO_MOVE_CAST(Arg1)(arg1_));
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
-};
-
-template <typename Handler, typename Arg1>
-inline void* asio_handler_allocate(std::size_t size,
- move_binder1<Handler, Arg1>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- move_binder1<Handler, Arg1>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
-inline bool asio_handler_is_continuation(
- move_binder1<Handler, Arg1>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1>
-inline void asio_handler_invoke(BOOST_ASIO_MOVE_ARG(Function) function,
- move_binder1<Handler, Arg1>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- BOOST_ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-class move_binder2
-{
-public:
- move_binder2(int, BOOST_ASIO_MOVE_ARG(Handler) handler,
- const Arg1& arg1, BOOST_ASIO_MOVE_ARG(Arg2) arg2)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(arg1),
- arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(arg2))
- {
- }
-
- move_binder2(move_binder2&& other)
- : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_))
- {
- }
-
- void operator()()
- {
- handler_(static_cast<const Arg1&>(arg1_),
- BOOST_ASIO_MOVE_CAST(Arg2)(arg2_));
- }
-
-//private:
- Handler handler_;
- Arg1 arg1_;
- Arg2 arg2_;
-};
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline void* asio_handler_allocate(std::size_t size,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline bool asio_handler_is_continuation(
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_invoke(BOOST_ASIO_MOVE_ARG(Function) function,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- BOOST_ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
-}
-
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-} // namespace detail
-
-template <typename Handler, typename Arg1, typename Allocator>
-struct associated_allocator<detail::binder1<Handler, Arg1>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const detail::binder1<Handler, Arg1>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Handler, typename Arg1, typename Arg2, typename Allocator>
-struct associated_allocator<detail::binder2<Handler, Arg1, Arg2>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const detail::binder2<Handler, Arg1, Arg2>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Handler, typename Arg1, typename Executor>
-struct associated_executor<detail::binder1<Handler, Arg1>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(const detail::binder1<Handler, Arg1>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-template <typename Handler, typename Arg1, typename Arg2, typename Executor>
-struct associated_executor<detail::binder2<Handler, Arg1, Arg2>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(const detail::binder2<Handler, Arg1, Arg2>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-
-template <typename Handler, typename Arg1, typename Allocator>
-struct associated_allocator<detail::move_binder1<Handler, Arg1>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const detail::move_binder1<Handler, Arg1>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Handler, typename Arg1, typename Arg2, typename Allocator>
-struct associated_allocator<
- detail::move_binder2<Handler, Arg1, Arg2>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Handler, typename Arg1, typename Executor>
-struct associated_executor<detail::move_binder1<Handler, Arg1>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(const detail::move_binder1<Handler, Arg1>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-template <typename Handler, typename Arg1, typename Arg2, typename Executor>
-struct associated_executor<detail::move_binder2<Handler, Arg1, Arg2>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_BIND_HANDLER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp
deleted file mode 100644
index ad07f72c04e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// detail/buffer_resize_guard.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_BUFFER_RESIZE_GUARD_HPP
-#define BOOST_ASIO_DETAIL_BUFFER_RESIZE_GUARD_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/limits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper class to manage buffer resizing in an exception safe way.
-template <typename Buffer>
-class buffer_resize_guard
-{
-public:
- // Constructor.
- buffer_resize_guard(Buffer& buffer)
- : buffer_(buffer),
- old_size_(buffer.size())
- {
- }
-
- // Destructor rolls back the buffer resize unless commit was called.
- ~buffer_resize_guard()
- {
- if (old_size_ != (std::numeric_limits<size_t>::max)())
- {
- buffer_.resize(old_size_);
- }
- }
-
- // Commit the resize transaction.
- void commit()
- {
- old_size_ = (std::numeric_limits<size_t>::max)();
- }
-
-private:
- // The buffer being managed.
- Buffer& buffer_;
-
- // The size of the buffer at the time the guard was constructed.
- size_t old_size_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp
deleted file mode 100644
index 5ba55d266d1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp
+++ /dev/null
@@ -1,546 +0,0 @@
-//
-// detail/buffer_sequence_adapter.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_BUFFER_SEQUENCE_ADAPTER_HPP
-#define BOOST_ASIO_DETAIL_BUFFER_SEQUENCE_ADAPTER_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/buffer.hpp>
-#include <boost/asio/detail/array_fwd.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class buffer_sequence_adapter_base
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-public:
- // The maximum number of buffers to support in a single operation.
- enum { max_buffers = 1 };
-
-protected:
- typedef Windows::Storage::Streams::IBuffer^ native_buffer_type;
-
- BOOST_ASIO_DECL static void init_native_buffer(
- native_buffer_type& buf,
- const boost::asio::mutable_buffer& buffer);
-
- BOOST_ASIO_DECL static void init_native_buffer(
- native_buffer_type& buf,
- const boost::asio::const_buffer& buffer);
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-public:
- // The maximum number of buffers to support in a single operation.
- enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
-
-protected:
- typedef WSABUF native_buffer_type;
-
- static void init_native_buffer(WSABUF& buf,
- const boost::asio::mutable_buffer& buffer)
- {
- buf.buf = static_cast<char*>(buffer.data());
- buf.len = static_cast<ULONG>(buffer.size());
- }
-
- static void init_native_buffer(WSABUF& buf,
- const boost::asio::const_buffer& buffer)
- {
- buf.buf = const_cast<char*>(static_cast<const char*>(buffer.data()));
- buf.len = static_cast<ULONG>(buffer.size());
- }
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-public:
- // The maximum number of buffers to support in a single operation.
- enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
-
-protected:
- typedef iovec native_buffer_type;
-
- static void init_iov_base(void*& base, void* addr)
- {
- base = addr;
- }
-
- template <typename T>
- static void init_iov_base(T& base, void* addr)
- {
- base = static_cast<T>(addr);
- }
-
- static void init_native_buffer(iovec& iov,
- const boost::asio::mutable_buffer& buffer)
- {
- init_iov_base(iov.iov_base, buffer.data());
- iov.iov_len = buffer.size();
- }
-
- static void init_native_buffer(iovec& iov,
- const boost::asio::const_buffer& buffer)
- {
- init_iov_base(iov.iov_base, const_cast<void*>(buffer.data()));
- iov.iov_len = buffer.size();
- }
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-};
-
-// Helper class to translate buffers into the native buffer representation.
-template <typename Buffer, typename Buffers>
-class buffer_sequence_adapter
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(const Buffers& buffer_sequence)
- : count_(0), total_buffer_size_(0)
- {
- buffer_sequence_adapter::init(
- boost::asio::buffer_sequence_begin(buffer_sequence),
- boost::asio::buffer_sequence_end(buffer_sequence));
- }
-
- native_buffer_type* buffers()
- {
- return buffers_;
- }
-
- std::size_t count() const
- {
- return count_;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const Buffers& buffer_sequence)
- {
- return buffer_sequence_adapter::all_empty(
- boost::asio::buffer_sequence_begin(buffer_sequence),
- boost::asio::buffer_sequence_end(buffer_sequence));
- }
-
- static void validate(const Buffers& buffer_sequence)
- {
- buffer_sequence_adapter::validate(
- boost::asio::buffer_sequence_begin(buffer_sequence),
- boost::asio::buffer_sequence_end(buffer_sequence));
- }
-
- static Buffer first(const Buffers& buffer_sequence)
- {
- return buffer_sequence_adapter::first(
- boost::asio::buffer_sequence_begin(buffer_sequence),
- boost::asio::buffer_sequence_end(buffer_sequence));
- }
-
-private:
- template <typename Iterator>
- void init(Iterator begin, Iterator end)
- {
- Iterator iter = begin;
- for (; iter != end && count_ < max_buffers; ++iter, ++count_)
- {
- Buffer buffer(*iter);
- init_native_buffer(buffers_[count_], buffer);
- total_buffer_size_ += buffer.size();
- }
- }
-
- template <typename Iterator>
- static bool all_empty(Iterator begin, Iterator end)
- {
- Iterator iter = begin;
- std::size_t i = 0;
- for (; iter != end && i < max_buffers; ++iter, ++i)
- if (Buffer(*iter).size() > 0)
- return false;
- return true;
- }
-
- template <typename Iterator>
- static void validate(Iterator begin, Iterator end)
- {
- Iterator iter = begin;
- for (; iter != end; ++iter)
- {
- Buffer buffer(*iter);
- buffer.data();
- }
- }
-
- template <typename Iterator>
- static Buffer first(Iterator begin, Iterator end)
- {
- Iterator iter = begin;
- for (; iter != end; ++iter)
- {
- Buffer buffer(*iter);
- if (buffer.size() != 0)
- return buffer;
- }
- return Buffer();
- }
-
- native_buffer_type buffers_[max_buffers];
- std::size_t count_;
- std::size_t total_buffer_size_;
-};
-
-template <typename Buffer>
-class buffer_sequence_adapter<Buffer, boost::asio::mutable_buffer>
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(
- const boost::asio::mutable_buffer& buffer_sequence)
- {
- init_native_buffer(buffer_, Buffer(buffer_sequence));
- total_buffer_size_ = buffer_sequence.size();
- }
-
- native_buffer_type* buffers()
- {
- return &buffer_;
- }
-
- std::size_t count() const
- {
- return 1;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const boost::asio::mutable_buffer& buffer_sequence)
- {
- return buffer_sequence.size() == 0;
- }
-
- static void validate(const boost::asio::mutable_buffer& buffer_sequence)
- {
- buffer_sequence.data();
- }
-
- static Buffer first(const boost::asio::mutable_buffer& buffer_sequence)
- {
- return Buffer(buffer_sequence);
- }
-
-private:
- native_buffer_type buffer_;
- std::size_t total_buffer_size_;
-};
-
-template <typename Buffer>
-class buffer_sequence_adapter<Buffer, boost::asio::const_buffer>
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(
- const boost::asio::const_buffer& buffer_sequence)
- {
- init_native_buffer(buffer_, Buffer(buffer_sequence));
- total_buffer_size_ = buffer_sequence.size();
- }
-
- native_buffer_type* buffers()
- {
- return &buffer_;
- }
-
- std::size_t count() const
- {
- return 1;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const boost::asio::const_buffer& buffer_sequence)
- {
- return buffer_sequence.size() == 0;
- }
-
- static void validate(const boost::asio::const_buffer& buffer_sequence)
- {
- buffer_sequence.data();
- }
-
- static Buffer first(const boost::asio::const_buffer& buffer_sequence)
- {
- return Buffer(buffer_sequence);
- }
-
-private:
- native_buffer_type buffer_;
- std::size_t total_buffer_size_;
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Buffer>
-class buffer_sequence_adapter<Buffer, boost::asio::mutable_buffers_1>
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(
- const boost::asio::mutable_buffers_1& buffer_sequence)
- {
- init_native_buffer(buffer_, Buffer(buffer_sequence));
- total_buffer_size_ = buffer_sequence.size();
- }
-
- native_buffer_type* buffers()
- {
- return &buffer_;
- }
-
- std::size_t count() const
- {
- return 1;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const boost::asio::mutable_buffers_1& buffer_sequence)
- {
- return buffer_sequence.size() == 0;
- }
-
- static void validate(const boost::asio::mutable_buffers_1& buffer_sequence)
- {
- buffer_sequence.data();
- }
-
- static Buffer first(const boost::asio::mutable_buffers_1& buffer_sequence)
- {
- return Buffer(buffer_sequence);
- }
-
-private:
- native_buffer_type buffer_;
- std::size_t total_buffer_size_;
-};
-
-template <typename Buffer>
-class buffer_sequence_adapter<Buffer, boost::asio::const_buffers_1>
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(
- const boost::asio::const_buffers_1& buffer_sequence)
- {
- init_native_buffer(buffer_, Buffer(buffer_sequence));
- total_buffer_size_ = buffer_sequence.size();
- }
-
- native_buffer_type* buffers()
- {
- return &buffer_;
- }
-
- std::size_t count() const
- {
- return 1;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const boost::asio::const_buffers_1& buffer_sequence)
- {
- return buffer_sequence.size() == 0;
- }
-
- static void validate(const boost::asio::const_buffers_1& buffer_sequence)
- {
- buffer_sequence.data();
- }
-
- static Buffer first(const boost::asio::const_buffers_1& buffer_sequence)
- {
- return Buffer(buffer_sequence);
- }
-
-private:
- native_buffer_type buffer_;
- std::size_t total_buffer_size_;
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Buffer, typename Elem>
-class buffer_sequence_adapter<Buffer, boost::array<Elem, 2> >
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(
- const boost::array<Elem, 2>& buffer_sequence)
- {
- init_native_buffer(buffers_[0], Buffer(buffer_sequence[0]));
- init_native_buffer(buffers_[1], Buffer(buffer_sequence[1]));
- total_buffer_size_ = buffer_sequence[0].size() + buffer_sequence[1].size();
- }
-
- native_buffer_type* buffers()
- {
- return buffers_;
- }
-
- std::size_t count() const
- {
- return 2;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const boost::array<Elem, 2>& buffer_sequence)
- {
- return buffer_sequence[0].size() == 0 && buffer_sequence[1].size() == 0;
- }
-
- static void validate(const boost::array<Elem, 2>& buffer_sequence)
- {
- buffer_sequence[0].data();
- buffer_sequence[1].data();
- }
-
- static Buffer first(const boost::array<Elem, 2>& buffer_sequence)
- {
- return Buffer(buffer_sequence[0].size() != 0
- ? buffer_sequence[0] : buffer_sequence[1]);
- }
-
-private:
- native_buffer_type buffers_[2];
- std::size_t total_buffer_size_;
-};
-
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-template <typename Buffer, typename Elem>
-class buffer_sequence_adapter<Buffer, std::array<Elem, 2> >
- : buffer_sequence_adapter_base
-{
-public:
- explicit buffer_sequence_adapter(
- const std::array<Elem, 2>& buffer_sequence)
- {
- init_native_buffer(buffers_[0], Buffer(buffer_sequence[0]));
- init_native_buffer(buffers_[1], Buffer(buffer_sequence[1]));
- total_buffer_size_ = buffer_sequence[0].size() + buffer_sequence[1].size();
- }
-
- native_buffer_type* buffers()
- {
- return buffers_;
- }
-
- std::size_t count() const
- {
- return 2;
- }
-
- std::size_t total_size() const
- {
- return total_buffer_size_;
- }
-
- bool all_empty() const
- {
- return total_buffer_size_ == 0;
- }
-
- static bool all_empty(const std::array<Elem, 2>& buffer_sequence)
- {
- return buffer_sequence[0].size() == 0 && buffer_sequence[1].size() == 0;
- }
-
- static void validate(const std::array<Elem, 2>& buffer_sequence)
- {
- buffer_sequence[0].data();
- buffer_sequence[1].data();
- }
-
- static Buffer first(const std::array<Elem, 2>& buffer_sequence)
- {
- return Buffer(buffer_sequence[0].size() != 0
- ? buffer_sequence[0] : buffer_sequence[1]);
- }
-
-private:
- native_buffer_type buffers_[2];
- std::size_t total_buffer_size_;
-};
-
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/buffer_sequence_adapter.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_BUFFER_SEQUENCE_ADAPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp
deleted file mode 100644
index 3b9ca404c46..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// detail/buffered_stream_storage.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_BUFFERED_STREAM_STORAGE_HPP
-#define BOOST_ASIO_DETAIL_BUFFERED_STREAM_STORAGE_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/buffer.hpp>
-#include <boost/asio/detail/assert.hpp>
-#include <cstddef>
-#include <cstring>
-#include <vector>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class buffered_stream_storage
-{
-public:
- // The type of the bytes stored in the buffer.
- typedef unsigned char byte_type;
-
- // The type used for offsets into the buffer.
- typedef std::size_t size_type;
-
- // Constructor.
- explicit buffered_stream_storage(std::size_t buffer_capacity)
- : begin_offset_(0),
- end_offset_(0),
- buffer_(buffer_capacity)
- {
- }
-
- /// Clear the buffer.
- void clear()
- {
- begin_offset_ = 0;
- end_offset_ = 0;
- }
-
- // Return a pointer to the beginning of the unread data.
- mutable_buffer data()
- {
- return boost::asio::buffer(buffer_) + begin_offset_;
- }
-
- // Return a pointer to the beginning of the unread data.
- const_buffer data() const
- {
- return boost::asio::buffer(buffer_) + begin_offset_;
- }
-
- // Is there no unread data in the buffer.
- bool empty() const
- {
- return begin_offset_ == end_offset_;
- }
-
- // Return the amount of unread data the is in the buffer.
- size_type size() const
- {
- return end_offset_ - begin_offset_;
- }
-
- // Resize the buffer to the specified length.
- void resize(size_type length)
- {
- BOOST_ASIO_ASSERT(length <= capacity());
- if (begin_offset_ + length <= capacity())
- {
- end_offset_ = begin_offset_ + length;
- }
- else
- {
- using namespace std; // For memmove.
- memmove(&buffer_[0], &buffer_[0] + begin_offset_, size());
- end_offset_ = length;
- begin_offset_ = 0;
- }
- }
-
- // Return the maximum size for data in the buffer.
- size_type capacity() const
- {
- return buffer_.size();
- }
-
- // Consume multiple bytes from the beginning of the buffer.
- void consume(size_type count)
- {
- BOOST_ASIO_ASSERT(begin_offset_ + count <= end_offset_);
- begin_offset_ += count;
- if (empty())
- clear();
- }
-
-private:
- // The offset to the beginning of the unread data.
- size_type begin_offset_;
-
- // The offset to the end of the unread data.
- size_type end_offset_;
-
- // The data in the buffer.
- std::vector<byte_type> buffer_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_BUFFERED_STREAM_STORAGE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp
deleted file mode 100644
index 34f4de607f5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp
+++ /dev/null
@@ -1,127 +0,0 @@
-//
-// detail/call_stack.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_CALL_STACK_HPP
-#define BOOST_ASIO_DETAIL_CALL_STACK_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/tss_ptr.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper class to determine whether or not the current thread is inside an
-// invocation of io_context::run() for a specified io_context object.
-template <typename Key, typename Value = unsigned char>
-class call_stack
-{
-public:
- // Context class automatically pushes the key/value pair on to the stack.
- class context
- : private noncopyable
- {
- public:
- // Push the key on to the stack.
- explicit context(Key* k)
- : key_(k),
- next_(call_stack<Key, Value>::top_)
- {
- value_ = reinterpret_cast<unsigned char*>(this);
- call_stack<Key, Value>::top_ = this;
- }
-
- // Push the key/value pair on to the stack.
- context(Key* k, Value& v)
- : key_(k),
- value_(&v),
- next_(call_stack<Key, Value>::top_)
- {
- call_stack<Key, Value>::top_ = this;
- }
-
- // Pop the key/value pair from the stack.
- ~context()
- {
- call_stack<Key, Value>::top_ = next_;
- }
-
- // Find the next context with the same key.
- Value* next_by_key() const
- {
- context* elem = next_;
- while (elem)
- {
- if (elem->key_ == key_)
- return elem->value_;
- elem = elem->next_;
- }
- return 0;
- }
-
- private:
- friend class call_stack<Key, Value>;
-
- // The key associated with the context.
- Key* key_;
-
- // The value associated with the context.
- Value* value_;
-
- // The next element in the stack.
- context* next_;
- };
-
- friend class context;
-
- // Determine whether the specified owner is on the stack. Returns address of
- // key if present, 0 otherwise.
- static Value* contains(Key* k)
- {
- context* elem = top_;
- while (elem)
- {
- if (elem->key_ == k)
- return elem->value_;
- elem = elem->next_;
- }
- return 0;
- }
-
- // Obtain the value at the top of the stack.
- static Value* top()
- {
- context* elem = top_;
- return elem ? elem->value_ : 0;
- }
-
-private:
- // The top of the stack of calls for the current thread.
- static tss_ptr<context> top_;
-};
-
-template <typename Key, typename Value>
-tss_ptr<typename call_stack<Key, Value>::context>
-call_stack<Key, Value>::top_;
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_CALL_STACK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp
deleted file mode 100644
index 044f12c6c33..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// detail/chrono.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_CHRONO_HPP
-#define BOOST_ASIO_DETAIL_CHRONO_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_CHRONO)
-# include <chrono>
-#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-# include <boost/chrono/system_clocks.hpp>
-#endif // defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-
-namespace boost {
-namespace asio {
-namespace chrono {
-
-#if defined(BOOST_ASIO_HAS_STD_CHRONO)
-using std::chrono::duration;
-using std::chrono::time_point;
-using std::chrono::duration_cast;
-using std::chrono::nanoseconds;
-using std::chrono::microseconds;
-using std::chrono::milliseconds;
-using std::chrono::seconds;
-using std::chrono::minutes;
-using std::chrono::hours;
-using std::chrono::time_point_cast;
-#if defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
-typedef std::chrono::monotonic_clock steady_clock;
-#else // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
-using std::chrono::steady_clock;
-#endif // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
-using std::chrono::system_clock;
-using std::chrono::high_resolution_clock;
-#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-using boost::chrono::duration;
-using boost::chrono::time_point;
-using boost::chrono::duration_cast;
-using boost::chrono::nanoseconds;
-using boost::chrono::microseconds;
-using boost::chrono::milliseconds;
-using boost::chrono::seconds;
-using boost::chrono::minutes;
-using boost::chrono::hours;
-using boost::chrono::time_point_cast;
-using boost::chrono::system_clock;
-using boost::chrono::steady_clock;
-using boost::chrono::high_resolution_clock;
-#endif // defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-
-} // namespace chrono
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_CHRONO_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp
deleted file mode 100644
index 256389acaf1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp
+++ /dev/null
@@ -1,192 +0,0 @@
-//
-// detail/chrono_time_traits.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_CHRONO_TIME_TRAITS_HPP
-#define BOOST_ASIO_DETAIL_CHRONO_TIME_TRAITS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/cstdint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper template to compute the greatest common divisor.
-template <int64_t v1, int64_t v2>
-struct gcd { enum { value = gcd<v2, v1 % v2>::value }; };
-
-template <int64_t v1>
-struct gcd<v1, 0> { enum { value = v1 }; };
-
-// Adapts std::chrono clocks for use with a deadline timer.
-template <typename Clock, typename WaitTraits>
-struct chrono_time_traits
-{
- // The clock type.
- typedef Clock clock_type;
-
- // The duration type of the clock.
- typedef typename clock_type::duration duration_type;
-
- // The time point type of the clock.
- typedef typename clock_type::time_point time_type;
-
- // The period of the clock.
- typedef typename duration_type::period period_type;
-
- // Get the current time.
- static time_type now()
- {
- return clock_type::now();
- }
-
- // Add a duration to a time.
- static time_type add(const time_type& t, const duration_type& d)
- {
- const time_type epoch;
- if (t >= epoch)
- {
- if ((time_type::max)() - t < d)
- return (time_type::max)();
- }
- else // t < epoch
- {
- if (-(t - (time_type::min)()) > d)
- return (time_type::min)();
- }
-
- return t + d;
- }
-
- // Subtract one time from another.
- static duration_type subtract(const time_type& t1, const time_type& t2)
- {
- const time_type epoch;
- if (t1 >= epoch)
- {
- if (t2 >= epoch)
- {
- return t1 - t2;
- }
- else if (t2 == (time_type::min)())
- {
- return (duration_type::max)();
- }
- else if ((time_type::max)() - t1 < epoch - t2)
- {
- return (duration_type::max)();
- }
- else
- {
- return t1 - t2;
- }
- }
- else // t1 < epoch
- {
- if (t2 < epoch)
- {
- return t1 - t2;
- }
- else if (t1 == (time_type::min)())
- {
- return (duration_type::min)();
- }
- else if ((time_type::max)() - t2 < epoch - t1)
- {
- return (duration_type::min)();
- }
- else
- {
- return -(t2 - t1);
- }
- }
- }
-
- // Test whether one time is less than another.
- static bool less_than(const time_type& t1, const time_type& t2)
- {
- return t1 < t2;
- }
-
- // Implement just enough of the posix_time::time_duration interface to supply
- // what the timer_queue requires.
- class posix_time_duration
- {
- public:
- explicit posix_time_duration(const duration_type& d)
- : d_(d)
- {
- }
-
- int64_t ticks() const
- {
- return d_.count();
- }
-
- int64_t total_seconds() const
- {
- return duration_cast<1, 1>();
- }
-
- int64_t total_milliseconds() const
- {
- return duration_cast<1, 1000>();
- }
-
- int64_t total_microseconds() const
- {
- return duration_cast<1, 1000000>();
- }
-
- private:
- template <int64_t Num, int64_t Den>
- int64_t duration_cast() const
- {
- const int64_t num1 = period_type::num / gcd<period_type::num, Num>::value;
- const int64_t num2 = Num / gcd<period_type::num, Num>::value;
-
- const int64_t den1 = period_type::den / gcd<period_type::den, Den>::value;
- const int64_t den2 = Den / gcd<period_type::den, Den>::value;
-
- const int64_t num = num1 * den2;
- const int64_t den = num2 * den1;
-
- if (num == 1 && den == 1)
- return ticks();
- else if (num != 1 && den == 1)
- return ticks() * num;
- else if (num == 1 && period_type::den != 1)
- return ticks() / den;
- else
- return ticks() * num / den;
- }
-
- duration_type d_;
- };
-
- // Convert to POSIX duration type.
- static posix_time_duration to_posix_duration(const duration_type& d)
- {
- return posix_time_duration(WaitTraits::to_wait_duration(d));
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_CHRONO_TIME_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp
deleted file mode 100644
index e856a86f5ab..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// detail/completion_handler.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_COMPLETION_HANDLER_HPP
-#define BOOST_ASIO_DETAIL_COMPLETION_HANDLER_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/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_work.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class completion_handler : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(completion_handler);
-
- completion_handler(Handler& h)
- : operation(&completion_handler::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(h))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- completion_handler* h(static_cast<completion_handler*>(base));
- ptr p = { boost::asio::detail::addressof(h->handler_), h, h };
- handler_work<Handler> w(h->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*h));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- Handler handler(BOOST_ASIO_MOVE_CAST(Handler)(h->handler_));
- p.h = boost::asio::detail::addressof(handler);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN(());
- w.complete(handler, handler);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_COMPLETION_HANDLER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp
deleted file mode 100644
index c11b7f6109a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// detail/concurrency_hint.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_CONCURRENCY_HINT_HPP
-#define BOOST_ASIO_DETAIL_CONCURRENCY_HINT_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>
-
-// The concurrency hint ID and mask are used to identify when a "well-known"
-// concurrency hint value has been passed to the io_context.
-#define BOOST_ASIO_CONCURRENCY_HINT_ID 0xA5100000u
-#define BOOST_ASIO_CONCURRENCY_HINT_ID_MASK 0xFFFF0000u
-
-// If set, this bit indicates that the scheduler should perform locking.
-#define BOOST_ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER 0x1u
-
-// If set, this bit indicates that the reactor should perform locking when
-// managing descriptor registrations.
-#define BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION 0x2u
-
-// If set, this bit indicates that the reactor should perform locking for I/O.
-#define BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_IO 0x4u
-
-// Helper macro to determine if we have a special concurrency hint.
-#define BOOST_ASIO_CONCURRENCY_HINT_IS_SPECIAL(hint) \
- ((static_cast<unsigned>(hint) \
- & BOOST_ASIO_CONCURRENCY_HINT_ID_MASK) \
- == BOOST_ASIO_CONCURRENCY_HINT_ID)
-
-// Helper macro to determine if locking is enabled for a given facility.
-#define BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(facility, hint) \
- (((static_cast<unsigned>(hint) \
- & (BOOST_ASIO_CONCURRENCY_HINT_ID_MASK \
- | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_ ## facility)) \
- ^ BOOST_ASIO_CONCURRENCY_HINT_ID) != 0)
-
-// This special concurrency hint disables locking in both the scheduler and
-// reactor I/O. This hint has the following restrictions:
-//
-// - Care must be taken to ensure that all operations on the io_context and any
-// of its associated I/O objects (such as sockets and timers) occur in only
-// one thread at a time.
-//
-// - Asynchronous resolve operations fail with operation_not_supported.
-//
-// - If a signal_set is used with the io_context, signal_set objects cannot be
-// used with any other io_context in the program.
-#define BOOST_ASIO_CONCURRENCY_HINT_UNSAFE \
- static_cast<int>(BOOST_ASIO_CONCURRENCY_HINT_ID)
-
-// This special concurrency hint disables locking in the reactor I/O. This hint
-// has the following restrictions:
-//
-// - Care must be taken to ensure that run functions on the io_context, and all
-// operations on the io_context's associated I/O objects (such as sockets and
-// timers), occur in only one thread at a time.
-#define BOOST_ASIO_CONCURRENCY_HINT_UNSAFE_IO \
- static_cast<int>(BOOST_ASIO_CONCURRENCY_HINT_ID \
- | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
- | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION)
-
-// The special concurrency hint provides full thread safety.
-#define BOOST_ASIO_CONCURRENCY_HINT_SAFE \
- static_cast<int>(BOOST_ASIO_CONCURRENCY_HINT_ID \
- | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
- | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION \
- | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_IO)
-
-// This #define may be overridden at compile time to specify a program-wide
-// default concurrency hint, used by the zero-argument io_context constructor.
-#if !defined(BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)
-# define BOOST_ASIO_CONCURRENCY_HINT_DEFAULT -1
-#endif // !defined(BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)
-
-// This #define may be overridden at compile time to specify a program-wide
-// concurrency hint, used by the one-argument io_context constructor when
-// passed a value of 1.
-#if !defined(BOOST_ASIO_CONCURRENCY_HINT_1)
-# define BOOST_ASIO_CONCURRENCY_HINT_1 1
-#endif // !defined(BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)
-
-#endif // BOOST_ASIO_DETAIL_CONCURRENCY_HINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp
deleted file mode 100644
index 9319c87538f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// detail/conditionally_enabled_event.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_CONDITIONALLY_ENABLED_EVENT_HPP
-#define BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_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/conditionally_enabled_mutex.hpp>
-#include <boost/asio/detail/event.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/null_event.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Mutex adapter used to conditionally enable or disable locking.
-class conditionally_enabled_event
- : private noncopyable
-{
-public:
- // Constructor.
- conditionally_enabled_event()
- {
- }
-
- // Destructor.
- ~conditionally_enabled_event()
- {
- }
-
- // Signal the event. (Retained for backward compatibility.)
- void signal(conditionally_enabled_mutex::scoped_lock& lock)
- {
- if (lock.mutex_.enabled_)
- event_.signal(lock);
- }
-
- // Signal all waiters.
- void signal_all(conditionally_enabled_mutex::scoped_lock& lock)
- {
- if (lock.mutex_.enabled_)
- event_.signal_all(lock);
- }
-
- // Unlock the mutex and signal one waiter.
- void unlock_and_signal_one(
- conditionally_enabled_mutex::scoped_lock& lock)
- {
- if (lock.mutex_.enabled_)
- event_.unlock_and_signal_one(lock);
- }
-
- // If there's a waiter, unlock the mutex and signal it.
- bool maybe_unlock_and_signal_one(
- conditionally_enabled_mutex::scoped_lock& lock)
- {
- if (lock.mutex_.enabled_)
- return event_.maybe_unlock_and_signal_one(lock);
- else
- return false;
- }
-
- // Reset the event.
- void clear(conditionally_enabled_mutex::scoped_lock& lock)
- {
- if (lock.mutex_.enabled_)
- event_.clear(lock);
- }
-
- // Wait for the event to become signalled.
- void wait(conditionally_enabled_mutex::scoped_lock& lock)
- {
- if (lock.mutex_.enabled_)
- event_.wait(lock);
- else
- null_event().wait(lock);
- }
-
- // Timed wait for the event to become signalled.
- bool wait_for_usec(
- conditionally_enabled_mutex::scoped_lock& lock, long usec)
- {
- if (lock.mutex_.enabled_)
- return event_.wait_for_usec(lock, usec);
- else
- return null_event().wait_for_usec(lock, usec);
- }
-
-private:
- boost::asio::detail::event event_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp
deleted file mode 100644
index ab4ef48afc4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp
+++ /dev/null
@@ -1,151 +0,0 @@
-//
-// detail/conditionally_enabled_mutex.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_CONDITIONALLY_ENABLED_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_MUTEX_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/mutex.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Mutex adapter used to conditionally enable or disable locking.
-class conditionally_enabled_mutex
- : private noncopyable
-{
-public:
- // Helper class to lock and unlock a mutex automatically.
- class scoped_lock
- : private noncopyable
- {
- public:
- // Tag type used to distinguish constructors.
- enum adopt_lock_t { adopt_lock };
-
- // Constructor adopts a lock that is already held.
- scoped_lock(conditionally_enabled_mutex& m, adopt_lock_t)
- : mutex_(m),
- locked_(m.enabled_)
- {
- }
-
- // Constructor acquires the lock.
- explicit scoped_lock(conditionally_enabled_mutex& m)
- : mutex_(m)
- {
- if (m.enabled_)
- {
- mutex_.mutex_.lock();
- locked_ = true;
- }
- else
- locked_ = false;
- }
-
- // Destructor releases the lock.
- ~scoped_lock()
- {
- if (locked_)
- mutex_.mutex_.unlock();
- }
-
- // Explicitly acquire the lock.
- void lock()
- {
- if (mutex_.enabled_ && !locked_)
- {
- mutex_.mutex_.lock();
- locked_ = true;
- }
- }
-
- // Explicitly release the lock.
- void unlock()
- {
- if (locked_)
- {
- mutex_.unlock();
- locked_ = false;
- }
- }
-
- // Test whether the lock is held.
- bool locked() const
- {
- return locked_;
- }
-
- // Get the underlying mutex.
- boost::asio::detail::mutex& mutex()
- {
- return mutex_.mutex_;
- }
-
- private:
- friend class conditionally_enabled_event;
- conditionally_enabled_mutex& mutex_;
- bool locked_;
- };
-
- // Constructor.
- explicit conditionally_enabled_mutex(bool enabled)
- : enabled_(enabled)
- {
- }
-
- // Destructor.
- ~conditionally_enabled_mutex()
- {
- }
-
- // Determine whether locking is enabled.
- bool enabled() const
- {
- return enabled_;
- }
-
- // Lock the mutex.
- void lock()
- {
- if (enabled_)
- mutex_.lock();
- }
-
- // Unlock the mutex.
- void unlock()
- {
- if (enabled_)
- mutex_.unlock();
- }
-
-private:
- friend class scoped_lock;
- friend class conditionally_enabled_event;
- boost::asio::detail::mutex mutex_;
- const bool enabled_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index 2453425315d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/config.hpp
+++ /dev/null
@@ -1,1454 +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)
-
-// 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.69.0/boost/asio/detail/consuming_buffers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/consuming_buffers.hpp
deleted file mode 100644
index 38eb00576c3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/consuming_buffers.hpp
+++ /dev/null
@@ -1,416 +0,0 @@
-//
-// detail/consuming_buffers.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_CONSUMING_BUFFERS_HPP
-#define BOOST_ASIO_DETAIL_CONSUMING_BUFFERS_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/buffer.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/limits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper template to determine the maximum number of prepared buffers.
-template <typename Buffers>
-struct prepared_buffers_max
-{
- enum { value = buffer_sequence_adapter_base::max_buffers };
-};
-
-template <typename Elem, std::size_t N>
-struct prepared_buffers_max<boost::array<Elem, N> >
-{
- enum { value = N };
-};
-
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-template <typename Elem, std::size_t N>
-struct prepared_buffers_max<std::array<Elem, N> >
-{
- enum { value = N };
-};
-
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-// A buffer sequence used to represent a subsequence of the buffers.
-template <typename Buffer, std::size_t MaxBuffers>
-struct prepared_buffers
-{
- typedef Buffer value_type;
- typedef const Buffer* const_iterator;
-
- enum { max_buffers = MaxBuffers < 16 ? MaxBuffers : 16 };
-
- prepared_buffers() : count(0) {}
- const_iterator begin() const { return elems; }
- const_iterator end() const { return elems + count; }
-
- Buffer elems[max_buffers];
- std::size_t count;
-};
-
-// A proxy for a sub-range in a list of buffers.
-template <typename Buffer, typename Buffers, typename Buffer_Iterator>
-class consuming_buffers
-{
-public:
- typedef prepared_buffers<Buffer, prepared_buffers_max<Buffers>::value>
- prepared_buffers_type;
-
- // Construct to represent the entire list of buffers.
- explicit consuming_buffers(const Buffers& buffers)
- : buffers_(buffers),
- total_consumed_(0),
- next_elem_(0),
- next_elem_offset_(0)
- {
- using boost::asio::buffer_size;
- total_size_ = buffer_size(buffers);
- }
-
- // Determine if we are at the end of the buffers.
- bool empty() const
- {
- return total_consumed_ >= total_size_;
- }
-
- // Get the buffer for a single transfer, with a size.
- prepared_buffers_type prepare(std::size_t max_size)
- {
- prepared_buffers_type result;
-
- Buffer_Iterator next = boost::asio::buffer_sequence_begin(buffers_);
- Buffer_Iterator end = boost::asio::buffer_sequence_end(buffers_);
-
- std::advance(next, next_elem_);
- std::size_t elem_offset = next_elem_offset_;
- while (next != end && max_size > 0 && (result.count) < result.max_buffers)
- {
- Buffer next_buf = Buffer(*next) + elem_offset;
- result.elems[result.count] = boost::asio::buffer(next_buf, max_size);
- max_size -= result.elems[result.count].size();
- elem_offset = 0;
- if (result.elems[result.count].size() > 0)
- ++result.count;
- ++next;
- }
-
- return result;
- }
-
- // Consume the specified number of bytes from the buffers.
- void consume(std::size_t size)
- {
- total_consumed_ += size;
-
- Buffer_Iterator next = boost::asio::buffer_sequence_begin(buffers_);
- Buffer_Iterator end = boost::asio::buffer_sequence_end(buffers_);
-
- std::advance(next, next_elem_);
- while (next != end && size > 0)
- {
- Buffer next_buf = Buffer(*next) + next_elem_offset_;
- if (size < next_buf.size())
- {
- next_elem_offset_ += size;
- size = 0;
- }
- else
- {
- size -= next_buf.size();
- next_elem_offset_ = 0;
- ++next_elem_;
- ++next;
- }
- }
- }
-
- // Get the total number of bytes consumed from the buffers.
- std::size_t total_consumed() const
- {
- return total_consumed_;
- }
-
-private:
- Buffers buffers_;
- std::size_t total_size_;
- std::size_t total_consumed_;
- std::size_t next_elem_;
- std::size_t next_elem_offset_;
-};
-
-// Base class of all consuming_buffers specialisations for single buffers.
-template <typename Buffer>
-class consuming_single_buffer
-{
-public:
- // Construct to represent the entire list of buffers.
- template <typename Buffer1>
- explicit consuming_single_buffer(const Buffer1& buffer)
- : buffer_(buffer),
- total_consumed_(0)
- {
- }
-
- // Determine if we are at the end of the buffers.
- bool empty() const
- {
- return total_consumed_ >= buffer_.size();
- }
-
- // Get the buffer for a single transfer, with a size.
- Buffer prepare(std::size_t max_size)
- {
- return boost::asio::buffer(buffer_ + total_consumed_, max_size);
- }
-
- // Consume the specified number of bytes from the buffers.
- void consume(std::size_t size)
- {
- total_consumed_ += size;
- }
-
- // Get the total number of bytes consumed from the buffers.
- std::size_t total_consumed() const
- {
- return total_consumed_;
- }
-
-private:
- Buffer buffer_;
- std::size_t total_consumed_;
-};
-
-template <>
-class consuming_buffers<mutable_buffer, mutable_buffer, const mutable_buffer*>
- : public consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>
-{
-public:
- explicit consuming_buffers(const mutable_buffer& buffer)
- : consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>(buffer)
- {
- }
-};
-
-template <>
-class consuming_buffers<const_buffer, mutable_buffer, const mutable_buffer*>
- : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
-{
-public:
- explicit consuming_buffers(const mutable_buffer& buffer)
- : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
- {
- }
-};
-
-template <>
-class consuming_buffers<const_buffer, const_buffer, const const_buffer*>
- : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
-{
-public:
- explicit consuming_buffers(const const_buffer& buffer)
- : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
- {
- }
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <>
-class consuming_buffers<mutable_buffer,
- mutable_buffers_1, const mutable_buffer*>
- : public consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>
-{
-public:
- explicit consuming_buffers(const mutable_buffers_1& buffer)
- : consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>(buffer)
- {
- }
-};
-
-template <>
-class consuming_buffers<const_buffer, mutable_buffers_1, const mutable_buffer*>
- : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
-{
-public:
- explicit consuming_buffers(const mutable_buffers_1& buffer)
- : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
- {
- }
-};
-
-template <>
-class consuming_buffers<const_buffer, const_buffers_1, const const_buffer*>
- : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
-{
-public:
- explicit consuming_buffers(const const_buffers_1& buffer)
- : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
- {
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Buffer, typename Elem>
-class consuming_buffers<Buffer, boost::array<Elem, 2>,
- typename boost::array<Elem, 2>::const_iterator>
-{
-public:
- // Construct to represent the entire list of buffers.
- explicit consuming_buffers(const boost::array<Elem, 2>& buffers)
- : buffers_(buffers),
- total_consumed_(0)
- {
- }
-
- // Determine if we are at the end of the buffers.
- bool empty() const
- {
- return total_consumed_ >=
- Buffer(buffers_[0]).size() + Buffer(buffers_[1]).size();
- }
-
- // Get the buffer for a single transfer, with a size.
- boost::array<Buffer, 2> prepare(std::size_t max_size)
- {
- boost::array<Buffer, 2> result = {{
- Buffer(buffers_[0]), Buffer(buffers_[1]) }};
- std::size_t buffer0_size = result[0].size();
- result[0] = boost::asio::buffer(result[0] + total_consumed_, max_size);
- result[1] = boost::asio::buffer(
- result[1] + (total_consumed_ < buffer0_size
- ? 0 : total_consumed_ - buffer0_size),
- max_size - result[0].size());
- return result;
- }
-
- // Consume the specified number of bytes from the buffers.
- void consume(std::size_t size)
- {
- total_consumed_ += size;
- }
-
- // Get the total number of bytes consumed from the buffers.
- std::size_t total_consumed() const
- {
- return total_consumed_;
- }
-
-private:
- boost::array<Elem, 2> buffers_;
- std::size_t total_consumed_;
-};
-
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-template <typename Buffer, typename Elem>
-class consuming_buffers<Buffer, std::array<Elem, 2>,
- typename std::array<Elem, 2>::const_iterator>
-{
-public:
- // Construct to represent the entire list of buffers.
- explicit consuming_buffers(const std::array<Elem, 2>& buffers)
- : buffers_(buffers),
- total_consumed_(0)
- {
- }
-
- // Determine if we are at the end of the buffers.
- bool empty() const
- {
- return total_consumed_ >=
- Buffer(buffers_[0]).size() + Buffer(buffers_[1]).size();
- }
-
- // Get the buffer for a single transfer, with a size.
- std::array<Buffer, 2> prepare(std::size_t max_size)
- {
- std::array<Buffer, 2> result = {{
- Buffer(buffers_[0]), Buffer(buffers_[1]) }};
- std::size_t buffer0_size = result[0].size();
- result[0] = boost::asio::buffer(result[0] + total_consumed_, max_size);
- result[1] = boost::asio::buffer(
- result[1] + (total_consumed_ < buffer0_size
- ? 0 : total_consumed_ - buffer0_size),
- max_size - result[0].size());
- return result;
- }
-
- // Consume the specified number of bytes from the buffers.
- void consume(std::size_t size)
- {
- total_consumed_ += size;
- }
-
- // Get the total number of bytes consumed from the buffers.
- std::size_t total_consumed() const
- {
- return total_consumed_;
- }
-
-private:
- std::array<Elem, 2> buffers_;
- std::size_t total_consumed_;
-};
-
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-// Specialisation for null_buffers to ensure that the null_buffers type is
-// always passed through to the underlying read or write operation.
-template <typename Buffer>
-class consuming_buffers<Buffer, null_buffers, const mutable_buffer*>
- : public boost::asio::null_buffers
-{
-public:
- consuming_buffers(const null_buffers&)
- {
- // No-op.
- }
-
- bool empty()
- {
- return false;
- }
-
- null_buffers prepare(std::size_t)
- {
- return null_buffers();
- }
-
- void consume(std::size_t)
- {
- // No-op.
- }
-
- std::size_t total_consumed() const
- {
- return 0;
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_CONSUMING_BUFFERS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp
deleted file mode 100644
index 665ff3b3a34..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// detail/cstddef.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_CSTDDEF_HPP
-#define BOOST_ASIO_DETAIL_CSTDDEF_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>
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_HAS_NULLPTR)
-using std::nullptr_t;
-#else // defined(BOOST_ASIO_HAS_NULLPTR)
-struct nullptr_t {};
-#endif // defined(BOOST_ASIO_HAS_NULLPTR)
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_CSTDDEF_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp
deleted file mode 100644
index 24e203aa6da..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// detail/cstdint.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_CSTDINT_HPP
-#define BOOST_ASIO_DETAIL_CSTDINT_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_CSTDINT)
-# include <cstdint>
-#else // defined(BOOST_ASIO_HAS_CSTDINT)
-# include <boost/cstdint.hpp>
-#endif // defined(BOOST_ASIO_HAS_CSTDINT)
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_HAS_CSTDINT)
-using std::int16_t;
-using std::int_least16_t;
-using std::uint16_t;
-using std::uint_least16_t;
-using std::int32_t;
-using std::int_least32_t;
-using std::uint32_t;
-using std::uint_least32_t;
-using std::int64_t;
-using std::int_least64_t;
-using std::uint64_t;
-using std::uint_least64_t;
-using std::uintmax_t;
-#else // defined(BOOST_ASIO_HAS_CSTDINT)
-using boost::int16_t;
-using boost::int_least16_t;
-using boost::uint16_t;
-using boost::uint_least16_t;
-using boost::int32_t;
-using boost::int_least32_t;
-using boost::uint32_t;
-using boost::uint_least32_t;
-using boost::int64_t;
-using boost::int_least64_t;
-using boost::uint64_t;
-using boost::uint_least64_t;
-using boost::uintmax_t;
-#endif // defined(BOOST_ASIO_HAS_CSTDINT)
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_CSTDINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp
deleted file mode 100644
index b6c49c75d11..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// detail/date_time_fwd.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_DATE_TIME_FWD_HPP
-#define BOOST_ASIO_DETAIL_DATE_TIME_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-namespace boost {
-namespace date_time {
-
-template<class T, class TimeSystem>
-class base_time;
-
-} // namespace date_time
-namespace posix_time {
-
-class ptime;
-
-} // namespace posix_time
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_DATE_TIME_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp
deleted file mode 100644
index ff162493d8b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp
+++ /dev/null
@@ -1,280 +0,0 @@
-//
-// detail/deadline_timer_service.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_DEADLINE_TIMER_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_DEADLINE_TIMER_SERVICE_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/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/timer_queue.hpp>
-#include <boost/asio/detail/timer_queue_ptime.hpp>
-#include <boost/asio/detail/timer_scheduler.hpp>
-#include <boost/asio/detail/wait_handler.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <chrono>
-# include <thread>
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-class deadline_timer_service
- : public service_base<deadline_timer_service<Time_Traits> >
-{
-public:
- // The time type.
- typedef typename Time_Traits::time_type time_type;
-
- // The duration type.
- typedef typename Time_Traits::duration_type duration_type;
-
- // The implementation type of the timer. This type is dependent on the
- // underlying implementation of the timer service.
- struct implementation_type
- : private boost::asio::detail::noncopyable
- {
- time_type expiry;
- bool might_have_pending_waits;
- typename timer_queue<Time_Traits>::per_timer_data timer_data;
- };
-
- // Constructor.
- deadline_timer_service(boost::asio::io_context& io_context)
- : service_base<deadline_timer_service<Time_Traits> >(io_context),
- scheduler_(boost::asio::use_service<timer_scheduler>(io_context))
- {
- scheduler_.init_task();
- scheduler_.add_timer_queue(timer_queue_);
- }
-
- // Destructor.
- ~deadline_timer_service()
- {
- scheduler_.remove_timer_queue(timer_queue_);
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- }
-
- // Construct a new timer implementation.
- void construct(implementation_type& impl)
- {
- impl.expiry = time_type();
- impl.might_have_pending_waits = false;
- }
-
- // Destroy a timer implementation.
- void destroy(implementation_type& impl)
- {
- boost::system::error_code ec;
- cancel(impl, ec);
- }
-
- // Move-construct a new serial port implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- scheduler_.move_timer(timer_queue_, impl.timer_data, other_impl.timer_data);
-
- impl.expiry = other_impl.expiry;
- other_impl.expiry = time_type();
-
- impl.might_have_pending_waits = other_impl.might_have_pending_waits;
- other_impl.might_have_pending_waits = false;
- }
-
- // Move-assign from another serial port implementation.
- void move_assign(implementation_type& impl,
- deadline_timer_service& other_service,
- implementation_type& other_impl)
- {
- if (this != &other_service)
- if (impl.might_have_pending_waits)
- scheduler_.cancel_timer(timer_queue_, impl.timer_data);
-
- other_service.scheduler_.move_timer(other_service.timer_queue_,
- impl.timer_data, other_impl.timer_data);
-
- impl.expiry = other_impl.expiry;
- other_impl.expiry = time_type();
-
- impl.might_have_pending_waits = other_impl.might_have_pending_waits;
- other_impl.might_have_pending_waits = false;
- }
-
- // Cancel any asynchronous wait operations associated with the timer.
- std::size_t cancel(implementation_type& impl, boost::system::error_code& ec)
- {
- if (!impl.might_have_pending_waits)
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
- "deadline_timer", &impl, 0, "cancel"));
-
- std::size_t count = scheduler_.cancel_timer(timer_queue_, impl.timer_data);
- impl.might_have_pending_waits = false;
- ec = boost::system::error_code();
- return count;
- }
-
- // Cancels one asynchronous wait operation associated with the timer.
- std::size_t cancel_one(implementation_type& impl,
- boost::system::error_code& ec)
- {
- if (!impl.might_have_pending_waits)
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
- "deadline_timer", &impl, 0, "cancel_one"));
-
- std::size_t count = scheduler_.cancel_timer(
- timer_queue_, impl.timer_data, 1);
- if (count == 0)
- impl.might_have_pending_waits = false;
- ec = boost::system::error_code();
- return count;
- }
-
- // Get the expiry time for the timer as an absolute time.
- time_type expiry(const implementation_type& impl) const
- {
- return impl.expiry;
- }
-
- // Get the expiry time for the timer as an absolute time.
- time_type expires_at(const implementation_type& impl) const
- {
- return impl.expiry;
- }
-
- // Get the expiry time for the timer relative to now.
- duration_type expires_from_now(const implementation_type& impl) const
- {
- return Time_Traits::subtract(this->expiry(impl), Time_Traits::now());
- }
-
- // Set the expiry time for the timer as an absolute time.
- std::size_t expires_at(implementation_type& impl,
- const time_type& expiry_time, boost::system::error_code& ec)
- {
- std::size_t count = cancel(impl, ec);
- impl.expiry = expiry_time;
- ec = boost::system::error_code();
- return count;
- }
-
- // Set the expiry time for the timer relative to now.
- std::size_t expires_after(implementation_type& impl,
- const duration_type& expiry_time, boost::system::error_code& ec)
- {
- return expires_at(impl,
- Time_Traits::add(Time_Traits::now(), expiry_time), ec);
- }
-
- // Set the expiry time for the timer relative to now.
- std::size_t expires_from_now(implementation_type& impl,
- const duration_type& expiry_time, boost::system::error_code& ec)
- {
- return expires_at(impl,
- Time_Traits::add(Time_Traits::now(), expiry_time), ec);
- }
-
- // Perform a blocking wait on the timer.
- void wait(implementation_type& impl, boost::system::error_code& ec)
- {
- time_type now = Time_Traits::now();
- ec = boost::system::error_code();
- while (Time_Traits::less_than(now, impl.expiry) && !ec)
- {
- this->do_wait(Time_Traits::to_posix_duration(
- Time_Traits::subtract(impl.expiry, now)), ec);
- now = Time_Traits::now();
- }
- }
-
- // Start an asynchronous wait on the timer.
- template <typename Handler>
- void async_wait(implementation_type& impl, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef wait_handler<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- impl.might_have_pending_waits = true;
-
- BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
- *p.p, "deadline_timer", &impl, 0, "async_wait"));
-
- scheduler_.schedule_timer(timer_queue_, impl.expiry, impl.timer_data, p.p);
- p.v = p.p = 0;
- }
-
-private:
- // Helper function to wait given a duration type. The duration type should
- // either be of type boost::posix_time::time_duration, or implement the
- // required subset of its interface.
- template <typename Duration>
- void do_wait(const Duration& timeout, boost::system::error_code& ec)
- {
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- std::this_thread::sleep_for(
- std::chrono::seconds(timeout.total_seconds())
- + std::chrono::microseconds(timeout.total_microseconds()));
- ec = boost::system::error_code();
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- ::timeval tv;
- tv.tv_sec = timeout.total_seconds();
- tv.tv_usec = timeout.total_microseconds() % 1000000;
- socket_ops::select(0, 0, 0, 0, &tv, ec);
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- }
-
- // The queue of timers.
- timer_queue<Time_Traits> timer_queue_;
-
- // The object that schedules and executes timers. Usually a reactor.
- timer_scheduler& scheduler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_DEADLINE_TIMER_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp
deleted file mode 100644
index 43f87dae7fb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// detail/dependent_type.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_DEPENDENT_TYPE_HPP
-#define BOOST_ASIO_DETAIL_DEPENDENT_TYPE_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename DependsOn, typename T>
-struct dependent_type
-{
- typedef T type;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_DEPENDENT_TYPE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp
deleted file mode 100644
index bfa6ce99fa5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// detail/descriptor_ops.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_DESCRIPTOR_OPS_HPP
-#define BOOST_ASIO_DETAIL_DESCRIPTOR_OPS_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_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-
-#include <cstddef>
-#include <boost/asio/error.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace descriptor_ops {
-
-// Descriptor state bits.
-enum
-{
- // The user wants a non-blocking descriptor.
- user_set_non_blocking = 1,
-
- // The descriptor has been set non-blocking.
- internal_non_blocking = 2,
-
- // Helper "state" used to determine whether the descriptor is non-blocking.
- non_blocking = user_set_non_blocking | internal_non_blocking,
-
- // The descriptor may have been dup()-ed.
- possible_dup = 4
-};
-
-typedef unsigned char state_type;
-
-template <typename ReturnType>
-inline ReturnType error_wrapper(ReturnType return_value,
- boost::system::error_code& ec)
-{
- ec = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
- return return_value;
-}
-
-BOOST_ASIO_DECL int open(const char* path, int flags,
- boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int close(int d, state_type& state,
- boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool set_user_non_blocking(int d,
- state_type& state, bool value, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool set_internal_non_blocking(int d,
- state_type& state, bool value, boost::system::error_code& ec);
-
-typedef iovec buf;
-
-BOOST_ASIO_DECL std::size_t sync_read(int d, state_type state, buf* bufs,
- std::size_t count, bool all_empty, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool non_blocking_read(int d, buf* bufs, std::size_t count,
- boost::system::error_code& ec, std::size_t& bytes_transferred);
-
-BOOST_ASIO_DECL std::size_t sync_write(int d, state_type state,
- const buf* bufs, std::size_t count, bool all_empty,
- boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool non_blocking_write(int d,
- const buf* bufs, std::size_t count,
- boost::system::error_code& ec, std::size_t& bytes_transferred);
-
-BOOST_ASIO_DECL int ioctl(int d, state_type& state, long cmd,
- ioctl_arg_type* arg, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int fcntl(int d, int cmd, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int fcntl(int d, int cmd,
- long arg, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_read(int d,
- state_type state, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_write(int d,
- state_type state, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_error(int d,
- state_type state, boost::system::error_code& ec);
-
-} // namespace descriptor_ops
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/descriptor_ops.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_DESCRIPTOR_OPS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp
deleted file mode 100644
index 328e2191c02..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// detail/descriptor_read_op.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_DESCRIPTOR_READ_OP_HPP
-#define BOOST_ASIO_DETAIL_DESCRIPTOR_READ_OP_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_WINDOWS) && !defined(__CYGWIN__)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/descriptor_ops.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_work.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence>
-class descriptor_read_op_base : public reactor_op
-{
-public:
- descriptor_read_op_base(int descriptor,
- const MutableBufferSequence& buffers, func_type complete_func)
- : reactor_op(&descriptor_read_op_base::do_perform, complete_func),
- descriptor_(descriptor),
- buffers_(buffers)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- descriptor_read_op_base* o(static_cast<descriptor_read_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
-
- status result = descriptor_ops::non_blocking_read(o->descriptor_,
- bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
- ? done : not_done;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_read",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- int descriptor_;
- MutableBufferSequence buffers_;
-};
-
-template <typename MutableBufferSequence, typename Handler>
-class descriptor_read_op
- : public descriptor_read_op_base<MutableBufferSequence>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(descriptor_read_op);
-
- descriptor_read_op(int descriptor,
- const MutableBufferSequence& buffers, Handler& handler)
- : descriptor_read_op_base<MutableBufferSequence>(
- descriptor, buffers, &descriptor_read_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- descriptor_read_op* o(static_cast<descriptor_read_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_DESCRIPTOR_READ_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp
deleted file mode 100644
index 80ddf37d37d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// detail/descriptor_write_op.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_DESCRIPTOR_WRITE_OP_HPP
-#define BOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_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_WINDOWS) && !defined(__CYGWIN__)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/descriptor_ops.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_work.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename ConstBufferSequence>
-class descriptor_write_op_base : public reactor_op
-{
-public:
- descriptor_write_op_base(int descriptor,
- const ConstBufferSequence& buffers, func_type complete_func)
- : reactor_op(&descriptor_write_op_base::do_perform, complete_func),
- descriptor_(descriptor),
- buffers_(buffers)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- descriptor_write_op_base* o(static_cast<descriptor_write_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(o->buffers_);
-
- status result = descriptor_ops::non_blocking_write(o->descriptor_,
- bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
- ? done : not_done;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_write",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- int descriptor_;
- ConstBufferSequence buffers_;
-};
-
-template <typename ConstBufferSequence, typename Handler>
-class descriptor_write_op
- : public descriptor_write_op_base<ConstBufferSequence>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(descriptor_write_op);
-
- descriptor_write_op(int descriptor,
- const ConstBufferSequence& buffers, Handler& handler)
- : descriptor_write_op_base<ConstBufferSequence>(
- descriptor, buffers, &descriptor_write_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp
deleted file mode 100644
index cb15a9671b1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp
+++ /dev/null
@@ -1,220 +0,0 @@
-//
-// detail/dev_poll_reactor.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_DEV_POLL_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_DEV_POLL_REACTOR_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_DEV_POLL)
-
-#include <cstddef>
-#include <vector>
-#include <sys/devpoll.h>
-#include <boost/asio/detail/hash_map.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/reactor_op_queue.hpp>
-#include <boost/asio/detail/select_interrupter.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/timer_queue_set.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class dev_poll_reactor
- : public execution_context_service_base<dev_poll_reactor>
-{
-public:
- enum op_types { read_op = 0, write_op = 1,
- connect_op = 1, except_op = 2, max_ops = 3 };
-
- // Per-descriptor data.
- struct per_descriptor_data
- {
- };
-
- // Constructor.
- BOOST_ASIO_DECL dev_poll_reactor(boost::asio::execution_context& ctx);
-
- // Destructor.
- BOOST_ASIO_DECL ~dev_poll_reactor();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Recreate internal descriptors following a fork.
- BOOST_ASIO_DECL void notify_fork(
- boost::asio::execution_context::fork_event fork_ev);
-
- // Initialise the task.
- BOOST_ASIO_DECL void init_task();
-
- // Register a socket with the reactor. Returns 0 on success, system error
- // code on failure.
- BOOST_ASIO_DECL int register_descriptor(socket_type, per_descriptor_data&);
-
- // Register a descriptor with an associated single operation. Returns 0 on
- // success, system error code on failure.
- BOOST_ASIO_DECL int register_internal_descriptor(
- int op_type, socket_type descriptor,
- per_descriptor_data& descriptor_data, reactor_op* op);
-
- // Move descriptor registration from one descriptor_data object to another.
- BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
- per_descriptor_data& target_descriptor_data,
- per_descriptor_data& source_descriptor_data);
-
- // Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation)
- {
- scheduler_.post_immediate_completion(op, is_continuation);
- }
-
- // Start a new operation. The reactor operation will be performed when the
- // given descriptor is flagged as ready, or an error has occurred.
- BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
- per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool allow_speculative);
-
- // Cancel all operations associated with the given descriptor. The
- // handlers associated with the descriptor will be invoked with the
- // operation_aborted error.
- BOOST_ASIO_DECL void cancel_ops(socket_type descriptor, per_descriptor_data&);
-
- // Cancel any operations that are running against the descriptor and remove
- // its registration from the reactor. The reactor resources associated with
- // the descriptor must be released by calling cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
- per_descriptor_data&, bool closing);
-
- // Remove the descriptor's registration from the reactor. The reactor
- // resources associated with the descriptor must be released by calling
- // cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_internal_descriptor(
- socket_type descriptor, per_descriptor_data&);
-
- // Perform any post-deregistration cleanup tasks associated with the
- // descriptor data.
- BOOST_ASIO_DECL void cleanup_descriptor_data(per_descriptor_data&);
-
- // Add a new timer queue to the reactor.
- template <typename Time_Traits>
- void add_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Remove a timer queue from the reactor.
- template <typename Time_Traits>
- void remove_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Schedule a new operation in the given timer queue to expire at the
- // specified absolute time.
- template <typename Time_Traits>
- void schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
-
- // Cancel the timer operations associated with the given token. Returns the
- // number of operations that have been posted or dispatched.
- template <typename Time_Traits>
- std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
-
- // Move the timer operations associated with the given timer.
- template <typename Time_Traits>
- void move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source);
-
- // Run /dev/poll once until interrupted or events are ready to be dispatched.
- BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
-
- // Interrupt the select loop.
- BOOST_ASIO_DECL void interrupt();
-
-private:
- // Create the /dev/poll file descriptor. Throws an exception if the descriptor
- // cannot be created.
- BOOST_ASIO_DECL static int do_dev_poll_create();
-
- // Helper function to add a new timer queue.
- BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
-
- // Helper function to remove a timer queue.
- BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
-
- // Get the timeout value for the /dev/poll DP_POLL operation. The timeout
- // value is returned as a number of milliseconds. A return value of -1
- // indicates that the poll should block indefinitely.
- BOOST_ASIO_DECL int get_timeout(int msec);
-
- // Cancel all operations associated with the given descriptor. The do_cancel
- // function of the handler objects will be invoked. This function does not
- // acquire the dev_poll_reactor's mutex.
- BOOST_ASIO_DECL void cancel_ops_unlocked(socket_type descriptor,
- const boost::system::error_code& ec);
-
- // Add a pending event entry for the given descriptor.
- BOOST_ASIO_DECL ::pollfd& add_pending_event_change(int descriptor);
-
- // The scheduler implementation used to post completions.
- scheduler& scheduler_;
-
- // Mutex to protect access to internal data.
- boost::asio::detail::mutex mutex_;
-
- // The /dev/poll file descriptor.
- int dev_poll_fd_;
-
- // Vector of /dev/poll events waiting to be written to the descriptor.
- std::vector< ::pollfd> pending_event_changes_;
-
- // Hash map to associate a descriptor with a pending event change index.
- hash_map<int, std::size_t> pending_event_change_index_;
-
- // The interrupter is used to break a blocking DP_POLL operation.
- select_interrupter interrupter_;
-
- // The queues of read, write and except operations.
- reactor_op_queue<socket_type> op_queue_[max_ops];
-
- // The timer queues.
- timer_queue_set timer_queues_;
-
- // Whether the service has been shut down.
- bool shutdown_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/dev_poll_reactor.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/dev_poll_reactor.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_DEV_POLL)
-
-#endif // BOOST_ASIO_DETAIL_DEV_POLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp
deleted file mode 100644
index 31a7b3dff35..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp
+++ /dev/null
@@ -1,268 +0,0 @@
-//
-// detail/epoll_reactor.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_EPOLL_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_EPOLL_REACTOR_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_EPOLL)
-
-#include <boost/asio/detail/atomic_count.hpp>
-#include <boost/asio/detail/conditionally_enabled_mutex.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/object_pool.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/select_interrupter.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/timer_queue_set.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
-# include <sys/timerfd.h>
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class epoll_reactor
- : public execution_context_service_base<epoll_reactor>
-{
-private:
- // The mutex type used by this reactor.
- typedef conditionally_enabled_mutex mutex;
-
-public:
- enum op_types { read_op = 0, write_op = 1,
- connect_op = 1, except_op = 2, max_ops = 3 };
-
- // Per-descriptor queues.
- class descriptor_state : operation
- {
- friend class epoll_reactor;
- friend class object_pool_access;
-
- descriptor_state* next_;
- descriptor_state* prev_;
-
- mutex mutex_;
- epoll_reactor* reactor_;
- int descriptor_;
- uint32_t registered_events_;
- op_queue<reactor_op> op_queue_[max_ops];
- bool try_speculative_[max_ops];
- bool shutdown_;
-
- BOOST_ASIO_DECL descriptor_state(bool locking);
- void set_ready_events(uint32_t events) { task_result_ = events; }
- void add_ready_events(uint32_t events) { task_result_ |= events; }
- BOOST_ASIO_DECL operation* perform_io(uint32_t events);
- BOOST_ASIO_DECL static void do_complete(
- void* owner, operation* base,
- const boost::system::error_code& ec, std::size_t bytes_transferred);
- };
-
- // Per-descriptor data.
- typedef descriptor_state* per_descriptor_data;
-
- // Constructor.
- BOOST_ASIO_DECL epoll_reactor(boost::asio::execution_context& ctx);
-
- // Destructor.
- BOOST_ASIO_DECL ~epoll_reactor();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Recreate internal descriptors following a fork.
- BOOST_ASIO_DECL void notify_fork(
- boost::asio::execution_context::fork_event fork_ev);
-
- // Initialise the task.
- BOOST_ASIO_DECL void init_task();
-
- // Register a socket with the reactor. Returns 0 on success, system error
- // code on failure.
- BOOST_ASIO_DECL int register_descriptor(socket_type descriptor,
- per_descriptor_data& descriptor_data);
-
- // Register a descriptor with an associated single operation. Returns 0 on
- // success, system error code on failure.
- BOOST_ASIO_DECL int register_internal_descriptor(
- int op_type, socket_type descriptor,
- per_descriptor_data& descriptor_data, reactor_op* op);
-
- // Move descriptor registration from one descriptor_data object to another.
- BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
- per_descriptor_data& target_descriptor_data,
- per_descriptor_data& source_descriptor_data);
-
- // Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation)
- {
- scheduler_.post_immediate_completion(op, is_continuation);
- }
-
- // Start a new operation. The reactor operation will be performed when the
- // given descriptor is flagged as ready, or an error has occurred.
- BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
- per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative);
-
- // Cancel all operations associated with the given descriptor. The
- // handlers associated with the descriptor will be invoked with the
- // operation_aborted error.
- BOOST_ASIO_DECL void cancel_ops(socket_type descriptor,
- per_descriptor_data& descriptor_data);
-
- // Cancel any operations that are running against the descriptor and remove
- // its registration from the reactor. The reactor resources associated with
- // the descriptor must be released by calling cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
- per_descriptor_data& descriptor_data, bool closing);
-
- // Remove the descriptor's registration from the reactor. The reactor
- // resources associated with the descriptor must be released by calling
- // cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_internal_descriptor(
- socket_type descriptor, per_descriptor_data& descriptor_data);
-
- // Perform any post-deregistration cleanup tasks associated with the
- // descriptor data.
- BOOST_ASIO_DECL void cleanup_descriptor_data(
- per_descriptor_data& descriptor_data);
-
- // Add a new timer queue to the reactor.
- template <typename Time_Traits>
- void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
-
- // Remove a timer queue from the reactor.
- template <typename Time_Traits>
- void remove_timer_queue(timer_queue<Time_Traits>& timer_queue);
-
- // Schedule a new operation in the given timer queue to expire at the
- // specified absolute time.
- template <typename Time_Traits>
- void schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
-
- // Cancel the timer operations associated with the given token. Returns the
- // number of operations that have been posted or dispatched.
- template <typename Time_Traits>
- std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
-
- // Move the timer operations associated with the given timer.
- template <typename Time_Traits>
- void move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source);
-
- // Run epoll once until interrupted or events are ready to be dispatched.
- BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
-
- // Interrupt the select loop.
- BOOST_ASIO_DECL void interrupt();
-
-private:
- // The hint to pass to epoll_create to size its data structures.
- enum { epoll_size = 20000 };
-
- // Create the epoll file descriptor. Throws an exception if the descriptor
- // cannot be created.
- BOOST_ASIO_DECL static int do_epoll_create();
-
- // Create the timerfd file descriptor. Does not throw.
- BOOST_ASIO_DECL static int do_timerfd_create();
-
- // Allocate a new descriptor state object.
- BOOST_ASIO_DECL descriptor_state* allocate_descriptor_state();
-
- // Free an existing descriptor state object.
- BOOST_ASIO_DECL void free_descriptor_state(descriptor_state* s);
-
- // Helper function to add a new timer queue.
- BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
-
- // Helper function to remove a timer queue.
- BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
-
- // Called to recalculate and update the timeout.
- BOOST_ASIO_DECL void update_timeout();
-
- // Get the timeout value for the epoll_wait call. The timeout value is
- // returned as a number of milliseconds. A return value of -1 indicates
- // that epoll_wait should block indefinitely.
- BOOST_ASIO_DECL int get_timeout(int msec);
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
- // Get the timeout value for the timer descriptor. The return value is the
- // flag argument to be used when calling timerfd_settime.
- BOOST_ASIO_DECL int get_timeout(itimerspec& ts);
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
-
- // The scheduler implementation used to post completions.
- scheduler& scheduler_;
-
- // Mutex to protect access to internal data.
- mutex mutex_;
-
- // The interrupter is used to break a blocking epoll_wait call.
- select_interrupter interrupter_;
-
- // The epoll file descriptor.
- int epoll_fd_;
-
- // The timer file descriptor.
- int timer_fd_;
-
- // The timer queues.
- timer_queue_set timer_queues_;
-
- // Whether the service has been shut down.
- bool shutdown_;
-
- // Mutex to protect access to the registered descriptors.
- mutex registered_descriptors_mutex_;
-
- // Keep track of all registered descriptors.
- object_pool<descriptor_state> registered_descriptors_;
-
- // Helper class to do post-perform_io cleanup.
- struct perform_io_cleanup_on_block_exit;
- friend struct perform_io_cleanup_on_block_exit;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/epoll_reactor.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/epoll_reactor.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_EPOLL)
-
-#endif // BOOST_ASIO_DETAIL_EPOLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/event.hpp
deleted file mode 100644
index 8cb097cb244..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/event.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// detail/event.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_EVENT_HPP
-#define BOOST_ASIO_DETAIL_EVENT_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_THREADS)
-# include <boost/asio/detail/null_event.hpp>
-#elif defined(BOOST_ASIO_WINDOWS)
-# include <boost/asio/detail/win_event.hpp>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_event.hpp>
-#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include <boost/asio/detail/std_event.hpp>
-#else
-# error Only Windows, POSIX and std::condition_variable are supported!
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS)
-typedef null_event event;
-#elif defined(BOOST_ASIO_WINDOWS)
-typedef win_event event;
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-typedef posix_event event;
-#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-typedef std_event event;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_EVENT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp
deleted file mode 100644
index 4871c971ed4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// detail/eventfd_select_interrupter.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail 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_EVENTFD_SELECT_INTERRUPTER_HPP
-#define BOOST_ASIO_DETAIL_EVENTFD_SELECT_INTERRUPTER_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_EVENTFD)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class eventfd_select_interrupter
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL eventfd_select_interrupter();
-
- // Destructor.
- BOOST_ASIO_DECL ~eventfd_select_interrupter();
-
- // Recreate the interrupter's descriptors. Used after a fork.
- BOOST_ASIO_DECL void recreate();
-
- // Interrupt the select call.
- BOOST_ASIO_DECL void interrupt();
-
- // Reset the select interrupt. Returns true if the call was interrupted.
- BOOST_ASIO_DECL bool reset();
-
- // Get the read descriptor to be passed to select.
- int read_descriptor() const
- {
- return read_descriptor_;
- }
-
-private:
- // Open the descriptors. Throws on error.
- BOOST_ASIO_DECL void open_descriptors();
-
- // Close the descriptors.
- BOOST_ASIO_DECL void close_descriptors();
-
- // The read end of a connection used to interrupt the select call. This file
- // descriptor is passed to select such that when it is time to stop, a single
- // 64bit value will be written on the other end of the connection and this
- // descriptor will become readable.
- int read_descriptor_;
-
- // The write end of a connection used to interrupt the select call. A single
- // 64bit non-zero value may be written to this to wake up the select which is
- // waiting for the other end to become readable. This descriptor will only
- // differ from the read descriptor when a pipe is used.
- int write_descriptor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/eventfd_select_interrupter.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_EVENTFD)
-
-#endif // BOOST_ASIO_DETAIL_EVENTFD_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp
deleted file mode 100644
index 1c8671abc85..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// detail/executor_op.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_EXECUTOR_OP_HPP
-#define BOOST_ASIO_DETAIL_EXECUTOR_OP_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/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/scheduler_operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler, typename Alloc,
- typename Operation = scheduler_operation>
-class executor_op : public Operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(executor_op);
-
- template <typename H>
- executor_op(BOOST_ASIO_MOVE_ARG(H) h, const Alloc& allocator)
- : Operation(&executor_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(H)(h)),
- allocator_(allocator)
- {
- }
-
- static void do_complete(void* owner, Operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- executor_op* o(static_cast<executor_op*>(base));
- Alloc allocator(o->allocator_);
- ptr p = { detail::addressof(allocator), o, o };
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- Handler handler(BOOST_ASIO_MOVE_CAST(Handler)(o->handler_));
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN(());
- boost_asio_handler_invoke_helpers::invoke(handler, handler);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
- Alloc allocator_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_EXECUTOR_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp
deleted file mode 100644
index 26ba12665e0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// detail/fd_set_adapter.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_FD_SET_ADAPTER_HPP
-#define BOOST_ASIO_DETAIL_FD_SET_ADAPTER_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/posix_fd_set_adapter.hpp>
-#include <boost/asio/detail/win_fd_set_adapter.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-typedef win_fd_set_adapter fd_set_adapter;
-#else
-typedef posix_fd_set_adapter fd_set_adapter;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_FD_SET_ADAPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp
deleted file mode 100644
index e80ed4073cc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// detail/fenced_block.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_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_FENCED_BLOCK_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_THREADS) \
- || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK)
-# include <boost/asio/detail/null_fenced_block.hpp>
-#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
-# include <boost/asio/detail/std_fenced_block.hpp>
-#elif defined(__MACH__) && defined(__APPLE__)
-# include <boost/asio/detail/macos_fenced_block.hpp>
-#elif defined(__sun)
-# include <boost/asio/detail/solaris_fenced_block.hpp>
-#elif defined(__GNUC__) && defined(__arm__) \
- && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-# include <boost/asio/detail/gcc_arm_fenced_block.hpp>
-#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-# include <boost/asio/detail/gcc_hppa_fenced_block.hpp>
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-# include <boost/asio/detail/gcc_x86_fenced_block.hpp>
-#elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-# include <boost/asio/detail/gcc_sync_fenced_block.hpp>
-#elif defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
-# include <boost/asio/detail/win_fenced_block.hpp>
-#else
-# include <boost/asio/detail/null_fenced_block.hpp>
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS) \
- || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK)
-typedef null_fenced_block fenced_block;
-#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
-typedef std_fenced_block fenced_block;
-#elif defined(__MACH__) && defined(__APPLE__)
-typedef macos_fenced_block fenced_block;
-#elif defined(__sun)
-typedef solaris_fenced_block fenced_block;
-#elif defined(__GNUC__) && defined(__arm__) \
- && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-typedef gcc_arm_fenced_block fenced_block;
-#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-typedef gcc_hppa_fenced_block fenced_block;
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-typedef gcc_x86_fenced_block fenced_block;
-#elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-typedef gcc_sync_fenced_block fenced_block;
-#elif defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
-typedef win_fenced_block fenced_block;
-#else
-typedef null_fenced_block fenced_block;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp
deleted file mode 100644
index 23218bb5df0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// detail/functional.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_FUNCTIONAL_HPP
-#define BOOST_ASIO_DETAIL_FUNCTIONAL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#include <functional>
-
-#if !defined(BOOST_ASIO_HAS_STD_FUNCTION)
-# include <boost/function.hpp>
-#endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION)
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_STD_FUNCTION)
-using std::function;
-#else // defined(BOOST_ASIO_HAS_STD_FUNCTION)
-using boost::function;
-#endif // defined(BOOST_ASIO_HAS_STD_FUNCTION)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // 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
deleted file mode 100644
index 38cc7c1e837..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/future.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// 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.69.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
deleted file mode 100644
index 3a5a1dfacf9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/gcc_arm_fenced_block.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// detail/gcc_arm_fenced_block.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_GCC_ARM_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_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(__GNUC__) && defined(__arm__)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class gcc_arm_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_arm_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_arm_fenced_block(full_t)
- {
- barrier();
- }
-
- // Destructor.
- ~gcc_arm_fenced_block()
- {
- barrier();
- }
-
-private:
- static void barrier()
- {
-#if defined(__ARM_ARCH_4__) \
- || defined(__ARM_ARCH_4T__) \
- || defined(__ARM_ARCH_5__) \
- || defined(__ARM_ARCH_5E__) \
- || defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__) \
- || defined(__ARM_ARCH_6__) \
- || defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6T2__)
-# if defined(__thumb__)
- // This is just a placeholder and almost certainly not sufficient.
- __asm__ __volatile__ ("" : : : "memory");
-# else // defined(__thumb__)
- int a = 0, b = 0;
- __asm__ __volatile__ ("swp %0, %1, [%2]"
- : "=&r"(a) : "r"(1), "r"(&b) : "memory", "cc");
-# endif // defined(__thumb__)
-#else
- // ARMv7 and later.
- __asm__ __volatile__ ("dmb" : : : "memory");
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__GNUC__) && defined(__arm__)
-
-#endif // BOOST_ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index bc0bc8afb49..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/gcc_hppa_fenced_block.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// detail/gcc_hppa_fenced_block.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_GCC_HPPA_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_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(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class gcc_hppa_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_hppa_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_hppa_fenced_block(full_t)
- {
- barrier();
- }
-
- // Destructor.
- ~gcc_hppa_fenced_block()
- {
- barrier();
- }
-
-private:
- static void barrier()
- {
- // This is just a placeholder and almost certainly not sufficient.
- __asm__ __volatile__ ("" : : : "memory");
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-
-#endif // BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index e464738ee0e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/gcc_sync_fenced_block.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// detail/gcc_sync_fenced_block.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_GCC_SYNC_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_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(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class gcc_sync_fenced_block
- : private noncopyable
-{
-public:
- enum half_or_full_t { half, full };
-
- // Constructor.
- explicit gcc_sync_fenced_block(half_or_full_t)
- : value_(0)
- {
- __sync_lock_test_and_set(&value_, 1);
- }
-
- // Destructor.
- ~gcc_sync_fenced_block()
- {
- __sync_lock_release(&value_);
- }
-
-private:
- int value_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__GNUC__)
- // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
- // && !defined(__INTEL_COMPILER) && !defined(__ICL)
- // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-
-#endif // BOOST_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index f66289fe967..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/gcc_x86_fenced_block.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// detail/gcc_x86_fenced_block.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_GCC_X86_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_GCC_X86_FENCED_BLOCK_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(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class gcc_x86_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_x86_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_x86_fenced_block(full_t)
- {
- lbarrier();
- }
-
- // Destructor.
- ~gcc_x86_fenced_block()
- {
- sbarrier();
- }
-
-private:
- static int barrier()
- {
- int r = 0, m = 1;
- __asm__ __volatile__ (
- "xchgl %0, %1" :
- "=r"(r), "=m"(m) :
- "0"(1), "m"(m) :
- "memory", "cc");
- return r;
- }
-
- static void lbarrier()
- {
-#if defined(__SSE2__)
-# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __builtin_ia32_lfence();
-# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __asm__ __volatile__ ("lfence" ::: "memory");
-# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
-#else // defined(__SSE2__)
- barrier();
-#endif // defined(__SSE2__)
- }
-
- static void sbarrier()
- {
-#if defined(__SSE2__)
-# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __builtin_ia32_sfence();
-# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __asm__ __volatile__ ("sfence" ::: "memory");
-# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
-#else // defined(__SSE2__)
- barrier();
-#endif // defined(__SSE2__)
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#endif // BOOST_ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/global.hpp
deleted file mode 100644
index 967890408ff..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/global.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// detail/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_GLOBAL_HPP
-#define BOOST_ASIO_DETAIL_GLOBAL_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_THREADS)
-# include <boost/asio/detail/null_global.hpp>
-#elif defined(BOOST_ASIO_WINDOWS)
-# include <boost/asio/detail/win_global.hpp>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_global.hpp>
-#elif defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
-# include <boost/asio/detail/std_global.hpp>
-#else
-# error Only Windows, POSIX and std::call_once are supported!
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-inline T& global()
-{
-#if !defined(BOOST_ASIO_HAS_THREADS)
- return null_global<T>();
-#elif defined(BOOST_ASIO_WINDOWS)
- return win_global<T>();
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
- return posix_global<T>();
-#elif defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
- return std_global<T>();
-#endif
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_GLOBAL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp
deleted file mode 100644
index 6e720513936..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp
+++ /dev/null
@@ -1,237 +0,0 @@
-//
-// detail/handler_alloc_helpers.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_HANDLER_ALLOC_HELPERS_HPP
-#define BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_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/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/recycling_allocator.hpp>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/handler_alloc_hook.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-// Calls to asio_handler_allocate and asio_handler_deallocate must be made from
-// a namespace that does not contain any overloads of these functions. The
-// boost_asio_handler_alloc_helpers namespace is defined here for that purpose.
-namespace boost_asio_handler_alloc_helpers {
-
-template <typename Handler>
-inline void* allocate(std::size_t s, Handler& h)
-{
-#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
- return ::operator new(s);
-#else
- using boost::asio::asio_handler_allocate;
- return asio_handler_allocate(s, boost::asio::detail::addressof(h));
-#endif
-}
-
-template <typename Handler>
-inline void deallocate(void* p, std::size_t s, Handler& h)
-{
-#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
- ::operator delete(p);
-#else
- using boost::asio::asio_handler_deallocate;
- asio_handler_deallocate(p, s, boost::asio::detail::addressof(h));
-#endif
-}
-
-} // namespace boost_asio_handler_alloc_helpers
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler, typename T>
-class hook_allocator
-{
-public:
- typedef T value_type;
-
- template <typename U>
- struct rebind
- {
- typedef hook_allocator<Handler, U> other;
- };
-
- explicit hook_allocator(Handler& h)
- : handler_(h)
- {
- }
-
- template <typename U>
- hook_allocator(const hook_allocator<Handler, U>& a)
- : handler_(a.handler_)
- {
- }
-
- T* allocate(std::size_t n)
- {
- return static_cast<T*>(
- boost_asio_handler_alloc_helpers::allocate(sizeof(T) * n, handler_));
- }
-
- void deallocate(T* p, std::size_t n)
- {
- boost_asio_handler_alloc_helpers::deallocate(p, sizeof(T) * n, handler_);
- }
-
-//private:
- Handler& handler_;
-};
-
-template <typename Handler>
-class hook_allocator<Handler, void>
-{
-public:
- typedef void value_type;
-
- template <typename U>
- struct rebind
- {
- typedef hook_allocator<Handler, U> other;
- };
-
- explicit hook_allocator(Handler& h)
- : handler_(h)
- {
- }
-
- template <typename U>
- hook_allocator(const hook_allocator<Handler, U>& a)
- : handler_(a.handler_)
- {
- }
-
-//private:
- Handler& handler_;
-};
-
-template <typename Handler, typename Allocator>
-struct get_hook_allocator
-{
- typedef Allocator type;
-
- static type get(Handler&, const Allocator& a)
- {
- return a;
- }
-};
-
-template <typename Handler, typename T>
-struct get_hook_allocator<Handler, std::allocator<T> >
-{
- typedef hook_allocator<Handler, T> type;
-
- static type get(Handler& handler, const std::allocator<T>&)
- {
- return type(handler);
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#define BOOST_ASIO_DEFINE_HANDLER_PTR(op) \
- struct ptr \
- { \
- Handler* h; \
- op* v; \
- op* p; \
- ~ptr() \
- { \
- reset(); \
- } \
- static op* allocate(Handler& handler) \
- { \
- typedef typename ::boost::asio::associated_allocator< \
- Handler>::type associated_allocator_type; \
- typedef typename ::boost::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::type hook_allocator_type; \
- BOOST_ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
- ::boost::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::get( \
- handler, ::boost::asio::get_associated_allocator(handler))); \
- return a.allocate(1); \
- } \
- void reset() \
- { \
- if (p) \
- { \
- p->~op(); \
- p = 0; \
- } \
- if (v) \
- { \
- typedef typename ::boost::asio::associated_allocator< \
- Handler>::type associated_allocator_type; \
- typedef typename ::boost::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::type hook_allocator_type; \
- BOOST_ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
- ::boost::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::get( \
- *h, ::boost::asio::get_associated_allocator(*h))); \
- a.deallocate(static_cast<op*>(v), 1); \
- v = 0; \
- } \
- } \
- } \
- /**/
-
-#define BOOST_ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(op) \
- struct ptr \
- { \
- const Alloc* a; \
- void* v; \
- op* p; \
- ~ptr() \
- { \
- reset(); \
- } \
- static op* allocate(const Alloc& a) \
- { \
- typedef typename ::boost::asio::detail::get_recycling_allocator< \
- Alloc>::type recycling_allocator_type; \
- BOOST_ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
- ::boost::asio::detail::get_recycling_allocator<Alloc>::get(a)); \
- return a1.allocate(1); \
- } \
- void reset() \
- { \
- if (p) \
- { \
- p->~op(); \
- p = 0; \
- } \
- if (v) \
- { \
- typedef typename ::boost::asio::detail::get_recycling_allocator< \
- Alloc>::type recycling_allocator_type; \
- BOOST_ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
- ::boost::asio::detail::get_recycling_allocator<Alloc>::get(*a)); \
- a1.deallocate(static_cast<op*>(v), 1); \
- v = 0; \
- } \
- } \
- } \
- /**/
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp
deleted file mode 100644
index 700505d5794..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// detail/handler_cont_helpers.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_HANDLER_CONT_HELPERS_HPP
-#define BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_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/memory.hpp>
-#include <boost/asio/handler_continuation_hook.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-// Calls to asio_handler_is_continuation must be made from a namespace that
-// does not contain overloads of this function. This namespace is defined here
-// for that purpose.
-namespace boost_asio_handler_cont_helpers {
-
-template <typename Context>
-inline bool is_continuation(Context& context)
-{
-#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
- return false;
-#else
- using boost::asio::asio_handler_is_continuation;
- return asio_handler_is_continuation(
- boost::asio::detail::addressof(context));
-#endif
-}
-
-} // namespace boost_asio_handler_cont_helpers
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp
deleted file mode 100644
index 8ced5f617ca..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// detail/handler_invoke_helpers.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_HANDLER_INVOKE_HELPERS_HPP
-#define BOOST_ASIO_DETAIL_HANDLER_INVOKE_HELPERS_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/memory.hpp>
-#include <boost/asio/handler_invoke_hook.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-// Calls to asio_handler_invoke must be made from a namespace that does not
-// contain overloads of this function. The boost_asio_handler_invoke_helpers
-// namespace is defined here for that purpose.
-namespace boost_asio_handler_invoke_helpers {
-
-template <typename Function, typename Context>
-inline void invoke(Function& function, Context& context)
-{
-#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
- Function tmp(function);
- tmp();
-#else
- using boost::asio::asio_handler_invoke;
- asio_handler_invoke(function, boost::asio::detail::addressof(context));
-#endif
-}
-
-template <typename Function, typename Context>
-inline void invoke(const Function& function, Context& context)
-{
-#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
- Function tmp(function);
- tmp();
-#else
- using boost::asio::asio_handler_invoke;
- asio_handler_invoke(function, boost::asio::detail::addressof(context));
-#endif
-}
-
-} // namespace boost_asio_handler_invoke_helpers
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp
deleted file mode 100644
index 0839e09159b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp
+++ /dev/null
@@ -1,242 +0,0 @@
-//
-// detail/handler_tracking.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_HANDLER_TRACKING_HPP
-#define BOOST_ASIO_DETAIL_HANDLER_TRACKING_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-namespace boost {
-namespace asio {
-
-class execution_context;
-
-} // namespace asio
-} // namespace boost
-
-#if defined(BOOST_ASIO_CUSTOM_HANDLER_TRACKING)
-# include BOOST_ASIO_CUSTOM_HANDLER_TRACKING
-#elif defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-# include <boost/system/error_code.hpp>
-# include <boost/asio/detail/cstdint.hpp>
-# include <boost/asio/detail/static_mutex.hpp>
-# include <boost/asio/detail/tss_ptr.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_CUSTOM_HANDLER_TRACKING)
-
-// The user-specified header must define the following macros:
-// - BOOST_ASIO_INHERIT_TRACKED_HANDLER
-// - BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER
-// - BOOST_ASIO_HANDLER_TRACKING_INIT
-// - BOOST_ASIO_HANDLER_CREATION(args)
-// - BOOST_ASIO_HANDLER_COMPLETION(args)
-// - BOOST_ASIO_HANDLER_INVOCATION_BEGIN(args)
-// - BOOST_ASIO_HANDLER_INVOCATION_END
-// - BOOST_ASIO_HANDLER_OPERATION(args)
-// - BOOST_ASIO_HANDLER_REACTOR_REGISTRATION(args)
-// - BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION(args)
-// - BOOST_ASIO_HANDLER_REACTOR_READ_EVENT
-// - BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT
-// - BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT
-// - BOOST_ASIO_HANDLER_REACTOR_EVENTS(args)
-// - BOOST_ASIO_HANDLER_REACTOR_OPERATION(args)
-
-# if !defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-# define BOOST_ASIO_ENABLE_HANDLER_TRACKING 1
-# endif /// !defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-#elif defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-class handler_tracking
-{
-public:
- class completion;
-
- // Base class for objects containing tracked handlers.
- class tracked_handler
- {
- private:
- // Only the handler_tracking class will have access to the id.
- friend class handler_tracking;
- friend class completion;
- uint64_t id_;
-
- protected:
- // Constructor initialises with no id.
- tracked_handler() : id_(0) {}
-
- // Prevent deletion through this type.
- ~tracked_handler() {}
- };
-
- // Initialise the tracking system.
- BOOST_ASIO_DECL static void init();
-
- // Record the creation of a tracked handler.
- BOOST_ASIO_DECL static void creation(
- execution_context& context, tracked_handler& h,
- const char* object_type, void* object,
- uintmax_t native_handle, const char* op_name);
-
- class completion
- {
- public:
- // Constructor records that handler is to be invoked with no arguments.
- BOOST_ASIO_DECL explicit completion(const tracked_handler& h);
-
- // Destructor records only when an exception is thrown from the handler, or
- // if the memory is being freed without the handler having been invoked.
- BOOST_ASIO_DECL ~completion();
-
- // Records that handler is to be invoked with no arguments.
- BOOST_ASIO_DECL void invocation_begin();
-
- // Records that handler is to be invoked with one arguments.
- BOOST_ASIO_DECL void invocation_begin(const boost::system::error_code& ec);
-
- // Constructor records that handler is to be invoked with two arguments.
- BOOST_ASIO_DECL void invocation_begin(
- const boost::system::error_code& ec, std::size_t bytes_transferred);
-
- // Constructor records that handler is to be invoked with two arguments.
- BOOST_ASIO_DECL void invocation_begin(
- const boost::system::error_code& ec, int signal_number);
-
- // Constructor records that handler is to be invoked with two arguments.
- BOOST_ASIO_DECL void invocation_begin(
- const boost::system::error_code& ec, const char* arg);
-
- // Record that handler invocation has ended.
- BOOST_ASIO_DECL void invocation_end();
-
- private:
- friend class handler_tracking;
- uint64_t id_;
- bool invoked_;
- completion* next_;
- };
-
- // Record an operation that is not directly associated with a handler.
- BOOST_ASIO_DECL static void operation(execution_context& context,
- const char* object_type, void* object,
- uintmax_t native_handle, const char* op_name);
-
- // Record that a descriptor has been registered with the reactor.
- BOOST_ASIO_DECL static void reactor_registration(execution_context& context,
- uintmax_t native_handle, uintmax_t registration);
-
- // Record that a descriptor has been deregistered from the reactor.
- BOOST_ASIO_DECL static void reactor_deregistration(execution_context& context,
- uintmax_t native_handle, uintmax_t registration);
-
- // Record a reactor-based operation that is associated with a handler.
- BOOST_ASIO_DECL static void reactor_events(execution_context& context,
- uintmax_t registration, unsigned events);
-
- // Record a reactor-based operation that is associated with a handler.
- BOOST_ASIO_DECL static void reactor_operation(
- const tracked_handler& h, const char* op_name,
- const boost::system::error_code& ec);
-
- // Record a reactor-based operation that is associated with a handler.
- BOOST_ASIO_DECL static void reactor_operation(
- const tracked_handler& h, const char* op_name,
- const boost::system::error_code& ec, std::size_t bytes_transferred);
-
- // Write a line of output.
- BOOST_ASIO_DECL static void write_line(const char* format, ...);
-
-private:
- struct tracking_state;
- BOOST_ASIO_DECL static tracking_state* get_state();
-};
-
-# define BOOST_ASIO_INHERIT_TRACKED_HANDLER \
- : public boost::asio::detail::handler_tracking::tracked_handler
-
-# define BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER \
- , public boost::asio::detail::handler_tracking::tracked_handler
-
-# define BOOST_ASIO_HANDLER_TRACKING_INIT \
- boost::asio::detail::handler_tracking::init()
-
-# define BOOST_ASIO_HANDLER_CREATION(args) \
- boost::asio::detail::handler_tracking::creation args
-
-# define BOOST_ASIO_HANDLER_COMPLETION(args) \
- boost::asio::detail::handler_tracking::completion tracked_completion args
-
-# define BOOST_ASIO_HANDLER_INVOCATION_BEGIN(args) \
- tracked_completion.invocation_begin args
-
-# define BOOST_ASIO_HANDLER_INVOCATION_END \
- tracked_completion.invocation_end()
-
-# define BOOST_ASIO_HANDLER_OPERATION(args) \
- boost::asio::detail::handler_tracking::operation args
-
-# define BOOST_ASIO_HANDLER_REACTOR_REGISTRATION(args) \
- boost::asio::detail::handler_tracking::reactor_registration args
-
-# define BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION(args) \
- boost::asio::detail::handler_tracking::reactor_deregistration args
-
-# define BOOST_ASIO_HANDLER_REACTOR_READ_EVENT 1
-# define BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT 2
-# define BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT 4
-
-# define BOOST_ASIO_HANDLER_REACTOR_EVENTS(args) \
- boost::asio::detail::handler_tracking::reactor_events args
-
-# define BOOST_ASIO_HANDLER_REACTOR_OPERATION(args) \
- boost::asio::detail::handler_tracking::reactor_operation args
-
-#else // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-# define BOOST_ASIO_INHERIT_TRACKED_HANDLER
-# define BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER
-# define BOOST_ASIO_HANDLER_TRACKING_INIT (void)0
-# define BOOST_ASIO_HANDLER_CREATION(args) (void)0
-# define BOOST_ASIO_HANDLER_COMPLETION(args) (void)0
-# define BOOST_ASIO_HANDLER_INVOCATION_BEGIN(args) (void)0
-# define BOOST_ASIO_HANDLER_INVOCATION_END (void)0
-# define BOOST_ASIO_HANDLER_OPERATION(args) (void)0
-# define BOOST_ASIO_HANDLER_REACTOR_REGISTRATION(args) (void)0
-# define BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION(args) (void)0
-# define BOOST_ASIO_HANDLER_REACTOR_READ_EVENT 0
-# define BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT 0
-# define BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT 0
-# define BOOST_ASIO_HANDLER_REACTOR_EVENTS(args) (void)0
-# define BOOST_ASIO_HANDLER_REACTOR_OPERATION(args) (void)0
-
-#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/handler_tracking.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_HANDLER_TRACKING_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp
deleted file mode 100644
index 3a83c8d1546..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp
+++ /dev/null
@@ -1,558 +0,0 @@
-//
-// detail/handler_type_requirements.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_HANDLER_TYPE_REQUIREMENTS_HPP
-#define BOOST_ASIO_DETAIL_HANDLER_TYPE_REQUIREMENTS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-// Older versions of gcc have difficulty compiling the sizeof expressions where
-// we test the handler type requirements. We'll disable checking of handler type
-// requirements for those compilers, but otherwise enable it by default.
-#if !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
-# if !defined(__GNUC__) || (__GNUC__ >= 4)
-# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS 1
-# endif // !defined(__GNUC__) || (__GNUC__ >= 4)
-#endif // !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
-
-// With C++0x we can use a combination of enhanced SFINAE and static_assert to
-// generate better template error messages. As this technique is not yet widely
-// portable, we'll only enable it for tested compilers.
-#if !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT 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 >= 1600)
-# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(BOOST_ASIO_MSVC)
-# if defined(__clang__)
-# if __has_feature(__cxx_static_assert__)
-# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT 1
-# endif // __has_feature(cxx_static_assert)
-# endif // defined(__clang__)
-#endif // !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
-
-#if defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-# include <boost/asio/async_result.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-
-# if defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
-
-template <typename Handler>
-auto zero_arg_copyable_handler_test(Handler h, void*)
- -> decltype(
- sizeof(Handler(static_cast<const Handler&>(h))),
- ((h)()),
- char(0));
-
-template <typename Handler>
-char (&zero_arg_copyable_handler_test(Handler, ...))[2];
-
-template <typename Handler, typename Arg1>
-auto one_arg_handler_test(Handler h, Arg1* a1)
- -> decltype(
- sizeof(Handler(BOOST_ASIO_MOVE_CAST(Handler)(h))),
- ((h)(*a1)),
- char(0));
-
-template <typename Handler>
-char (&one_arg_handler_test(Handler h, ...))[2];
-
-template <typename Handler, typename Arg1, typename Arg2>
-auto two_arg_handler_test(Handler h, Arg1* a1, Arg2* a2)
- -> decltype(
- sizeof(Handler(BOOST_ASIO_MOVE_CAST(Handler)(h))),
- ((h)(*a1, *a2)),
- char(0));
-
-template <typename Handler>
-char (&two_arg_handler_test(Handler, ...))[2];
-
-template <typename Handler, typename Arg1, typename Arg2>
-auto two_arg_move_handler_test(Handler h, Arg1* a1, Arg2* a2)
- -> decltype(
- sizeof(Handler(BOOST_ASIO_MOVE_CAST(Handler)(h))),
- ((h)(*a1, BOOST_ASIO_MOVE_CAST(Arg2)(*a2))),
- char(0));
-
-template <typename Handler>
-char (&two_arg_move_handler_test(Handler, ...))[2];
-
-# define BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT(expr, msg) \
- static_assert(expr, msg);
-
-# else // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
-
-# define BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT(expr, msg)
-
-# endif // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
-
-template <typename T> T& lvref();
-template <typename T> T& lvref(T);
-template <typename T> const T& clvref();
-template <typename T> const T& clvref(T);
-#if defined(BOOST_ASIO_HAS_MOVE)
-template <typename T> T rvref();
-template <typename T> T rvref(T);
-#else // defined(BOOST_ASIO_HAS_MOVE)
-template <typename T> const T& rvref();
-template <typename T> const T& rvref(T);
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-template <typename T> char argbyv(T);
-
-template <int>
-struct handler_type_requirements
-{
-};
-
-#define BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void()) asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::zero_arg_copyable_handler_test( \
- boost::asio::detail::clvref< \
- asio_true_handler_type>(), 0)) == 1, \
- "CompletionHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::clvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()(), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_READ_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, std::size_t)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const std::size_t*>(0))) == 1, \
- "ReadHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const std::size_t>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_WRITE_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, std::size_t)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const std::size_t*>(0))) == 1, \
- "WriteHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const std::size_t>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_ACCEPT_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::one_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0))) == 1, \
- "AcceptHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK( \
- handler_type, handler, socket_type) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, socket_type)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_move_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<socket_type*>(0))) == 1, \
- "MoveAcceptHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::rvref<socket_type>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_CONNECT_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::one_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0))) == 1, \
- "ConnectHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK( \
- handler_type, handler, endpoint_type) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, endpoint_type)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const endpoint_type*>(0))) == 1, \
- "RangeConnectHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const endpoint_type>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK( \
- handler_type, handler, iter_type) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, iter_type)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const iter_type*>(0))) == 1, \
- "IteratorConnectHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const iter_type>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_RESOLVE_HANDLER_CHECK( \
- handler_type, handler, range_type) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, range_type)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const range_type*>(0))) == 1, \
- "ResolveHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const range_type>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_WAIT_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::one_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0))) == 1, \
- "WaitHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_SIGNAL_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, int)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const int*>(0))) == 1, \
- "SignalHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const int>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_HANDSHAKE_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::one_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0))) == 1, \
- "HandshakeHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code, std::size_t)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::two_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0), \
- static_cast<const std::size_t*>(0))) == 1, \
- "BufferedHandshakeHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>(), \
- boost::asio::detail::lvref<const std::size_t>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_SHUTDOWN_HANDLER_CHECK( \
- handler_type, handler) \
- \
- typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
- void(boost::system::error_code)) \
- asio_true_handler_type; \
- \
- BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
- sizeof(boost::asio::detail::one_arg_handler_test( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>(), \
- static_cast<const boost::system::error_code*>(0))) == 1, \
- "ShutdownHandler type requirements not met") \
- \
- typedef boost::asio::detail::handler_type_requirements< \
- sizeof( \
- boost::asio::detail::argbyv( \
- boost::asio::detail::rvref< \
- asio_true_handler_type>())) + \
- sizeof( \
- boost::asio::detail::lvref< \
- asio_true_handler_type>()( \
- boost::asio::detail::lvref<const boost::system::error_code>()), \
- char(0))> BOOST_ASIO_UNUSED_TYPEDEF
-
-#else // !defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-
-#define BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_READ_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_WRITE_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_ACCEPT_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK( \
- handler_type, handler, socket_type) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_CONNECT_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK( \
- handler_type, handler, iter_type) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK( \
- handler_type, handler, iter_type) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_RESOLVE_HANDLER_CHECK( \
- handler_type, handler, iter_type) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_WAIT_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_SIGNAL_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_HANDSHAKE_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#define BOOST_ASIO_SHUTDOWN_HANDLER_CHECK( \
- handler_type, handler) \
- typedef int BOOST_ASIO_UNUSED_TYPEDEF
-
-#endif // !defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_HANDLER_TYPE_REQUIREMENTS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp
deleted file mode 100644
index dbd1bb911ab..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp
+++ /dev/null
@@ -1,97 +0,0 @@
-//
-// detail/handler_work.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_HANDLER_WORK_HPP
-#define BOOST_ASIO_DETAIL_HANDLER_WORK_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/associated_executor.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// A helper class template to allow completion handlers to be dispatched
-// through either the new executors framework or the old invocaton hook. The
-// primary template uses the new executors framework.
-template <typename Handler, typename Executor
- = typename associated_executor<Handler>::type>
-class handler_work
-{
-public:
- explicit handler_work(Handler& handler) BOOST_ASIO_NOEXCEPT
- : executor_(associated_executor<Handler>::get(handler))
- {
- }
-
- static void start(Handler& handler) BOOST_ASIO_NOEXCEPT
- {
- Executor ex(associated_executor<Handler>::get(handler));
- ex.on_work_started();
- }
-
- ~handler_work()
- {
- executor_.on_work_finished();
- }
-
- template <typename Function>
- void complete(Function& function, Handler& handler)
- {
- executor_.dispatch(BOOST_ASIO_MOVE_CAST(Function)(function),
- associated_allocator<Handler>::get(handler));
- }
-
-private:
- // Disallow copying and assignment.
- handler_work(const handler_work&);
- handler_work& operator=(const handler_work&);
-
- typename associated_executor<Handler>::type executor_;
-};
-
-// This specialisation dispatches a handler through the old invocation hook.
-// The specialisation is not strictly required for correctness, as the
-// system_executor will dispatch through the hook anyway. However, by doing
-// this we avoid an extra copy of the handler.
-template <typename Handler>
-class handler_work<Handler, system_executor>
-{
-public:
- explicit handler_work(Handler&) BOOST_ASIO_NOEXCEPT {}
- static void start(Handler&) BOOST_ASIO_NOEXCEPT {}
- ~handler_work() {}
-
- template <typename Function>
- void complete(Function& function, Handler& handler)
- {
- boost_asio_handler_invoke_helpers::invoke(function, handler);
- }
-
-private:
- // Disallow copying and assignment.
- handler_work(const handler_work&);
- handler_work& operator=(const handler_work&);
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_HANDLER_WORK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp
deleted file mode 100644
index 6a13620e922..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp
+++ /dev/null
@@ -1,333 +0,0 @@
-//
-// detail/hash_map.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_HASH_MAP_HPP
-#define BOOST_ASIO_DETAIL_HASH_MAP_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <list>
-#include <utility>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# include <boost/asio/detail/socket_types.hpp>
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-inline std::size_t calculate_hash_value(int i)
-{
- return static_cast<std::size_t>(i);
-}
-
-inline std::size_t calculate_hash_value(void* p)
-{
- return reinterpret_cast<std::size_t>(p)
- + (reinterpret_cast<std::size_t>(p) >> 3);
-}
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-inline std::size_t calculate_hash_value(SOCKET s)
-{
- return static_cast<std::size_t>(s);
-}
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-// Note: assumes K and V are POD types.
-template <typename K, typename V>
-class hash_map
- : private noncopyable
-{
-public:
- // The type of a value in the map.
- typedef std::pair<K, V> value_type;
-
- // The type of a non-const iterator over the hash map.
- typedef typename std::list<value_type>::iterator iterator;
-
- // The type of a const iterator over the hash map.
- typedef typename std::list<value_type>::const_iterator const_iterator;
-
- // Constructor.
- hash_map()
- : size_(0),
- buckets_(0),
- num_buckets_(0)
- {
- }
-
- // Destructor.
- ~hash_map()
- {
- delete[] buckets_;
- }
-
- // Get an iterator for the beginning of the map.
- iterator begin()
- {
- return values_.begin();
- }
-
- // Get an iterator for the beginning of the map.
- const_iterator begin() const
- {
- return values_.begin();
- }
-
- // Get an iterator for the end of the map.
- iterator end()
- {
- return values_.end();
- }
-
- // Get an iterator for the end of the map.
- const_iterator end() const
- {
- return values_.end();
- }
-
- // Check whether the map is empty.
- bool empty() const
- {
- return values_.empty();
- }
-
- // Find an entry in the map.
- iterator find(const K& k)
- {
- if (num_buckets_)
- {
- size_t bucket = calculate_hash_value(k) % num_buckets_;
- iterator it = buckets_[bucket].first;
- if (it == values_.end())
- return values_.end();
- iterator end_it = buckets_[bucket].last;
- ++end_it;
- while (it != end_it)
- {
- if (it->first == k)
- return it;
- ++it;
- }
- }
- return values_.end();
- }
-
- // Find an entry in the map.
- const_iterator find(const K& k) const
- {
- if (num_buckets_)
- {
- size_t bucket = calculate_hash_value(k) % num_buckets_;
- const_iterator it = buckets_[bucket].first;
- if (it == values_.end())
- return it;
- const_iterator end_it = buckets_[bucket].last;
- ++end_it;
- while (it != end_it)
- {
- if (it->first == k)
- return it;
- ++it;
- }
- }
- return values_.end();
- }
-
- // Insert a new entry into the map.
- std::pair<iterator, bool> insert(const value_type& v)
- {
- if (size_ + 1 >= num_buckets_)
- rehash(hash_size(size_ + 1));
- size_t bucket = calculate_hash_value(v.first) % num_buckets_;
- iterator it = buckets_[bucket].first;
- if (it == values_.end())
- {
- buckets_[bucket].first = buckets_[bucket].last =
- values_insert(values_.end(), v);
- ++size_;
- return std::pair<iterator, bool>(buckets_[bucket].last, true);
- }
- iterator end_it = buckets_[bucket].last;
- ++end_it;
- while (it != end_it)
- {
- if (it->first == v.first)
- return std::pair<iterator, bool>(it, false);
- ++it;
- }
- buckets_[bucket].last = values_insert(end_it, v);
- ++size_;
- return std::pair<iterator, bool>(buckets_[bucket].last, true);
- }
-
- // Erase an entry from the map.
- void erase(iterator it)
- {
- BOOST_ASIO_ASSERT(it != values_.end());
- BOOST_ASIO_ASSERT(num_buckets_ != 0);
-
- size_t bucket = calculate_hash_value(it->first) % num_buckets_;
- bool is_first = (it == buckets_[bucket].first);
- bool is_last = (it == buckets_[bucket].last);
- if (is_first && is_last)
- buckets_[bucket].first = buckets_[bucket].last = values_.end();
- else if (is_first)
- ++buckets_[bucket].first;
- else if (is_last)
- --buckets_[bucket].last;
-
- values_erase(it);
- --size_;
- }
-
- // Erase a key from the map.
- void erase(const K& k)
- {
- iterator it = find(k);
- if (it != values_.end())
- erase(it);
- }
-
- // Remove all entries from the map.
- void clear()
- {
- // Clear the values.
- values_.clear();
- size_ = 0;
-
- // Initialise all buckets to empty.
- iterator end_it = values_.end();
- for (size_t i = 0; i < num_buckets_; ++i)
- buckets_[i].first = buckets_[i].last = end_it;
- }
-
-private:
- // Calculate the hash size for the specified number of elements.
- static std::size_t hash_size(std::size_t num_elems)
- {
- static std::size_t sizes[] =
- {
-#if defined(BOOST_ASIO_HASH_MAP_BUCKETS)
- BOOST_ASIO_HASH_MAP_BUCKETS
-#else // BOOST_ASIO_HASH_MAP_BUCKETS
- 3, 13, 23, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593,
- 49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469,
- 12582917, 25165843
-#endif // BOOST_ASIO_HASH_MAP_BUCKETS
- };
- const std::size_t nth_size = sizeof(sizes) / sizeof(std::size_t) - 1;
- for (std::size_t i = 0; i < nth_size; ++i)
- if (num_elems < sizes[i])
- return sizes[i];
- return sizes[nth_size];
- }
-
- // Re-initialise the hash from the values already contained in the list.
- void rehash(std::size_t num_buckets)
- {
- if (num_buckets == num_buckets_)
- return;
- BOOST_ASIO_ASSERT(num_buckets != 0);
-
- iterator end_iter = values_.end();
-
- // Update number of buckets and initialise all buckets to empty.
- bucket_type* tmp = new bucket_type[num_buckets];
- delete[] buckets_;
- buckets_ = tmp;
- num_buckets_ = num_buckets;
- for (std::size_t i = 0; i < num_buckets_; ++i)
- buckets_[i].first = buckets_[i].last = end_iter;
-
- // Put all values back into the hash.
- iterator iter = values_.begin();
- while (iter != end_iter)
- {
- std::size_t bucket = calculate_hash_value(iter->first) % num_buckets_;
- if (buckets_[bucket].last == end_iter)
- {
- buckets_[bucket].first = buckets_[bucket].last = iter++;
- }
- else if (++buckets_[bucket].last == iter)
- {
- ++iter;
- }
- else
- {
- values_.splice(buckets_[bucket].last, values_, iter++);
- --buckets_[bucket].last;
- }
- }
- }
-
- // Insert an element into the values list by splicing from the spares list,
- // if a spare is available, and otherwise by inserting a new element.
- iterator values_insert(iterator it, const value_type& v)
- {
- if (spares_.empty())
- {
- return values_.insert(it, v);
- }
- else
- {
- spares_.front() = v;
- values_.splice(it, spares_, spares_.begin());
- return --it;
- }
- }
-
- // Erase an element from the values list by splicing it to the spares list.
- void values_erase(iterator it)
- {
- *it = value_type();
- spares_.splice(spares_.begin(), values_, it);
- }
-
- // The number of elements in the hash.
- std::size_t size_;
-
- // The list of all values in the hash map.
- std::list<value_type> values_;
-
- // The list of spare nodes waiting to be recycled. Assumes that POD types only
- // are stored in the hash map.
- std::list<value_type> spares_;
-
- // The type for a bucket in the hash table.
- struct bucket_type
- {
- iterator first;
- iterator last;
- };
-
- // The buckets in the hash.
- bucket_type* buckets_;
-
- // The number of buckets in the hash.
- std::size_t num_buckets_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_HASH_MAP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 26708ced33f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// detail/impl/buffer_sequence_adapter.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_IMPL_BUFFER_SEQUENCE_ADAPTER_IPP
-#define BOOST_ASIO_DETAIL_IMPL_BUFFER_SEQUENCE_ADAPTER_IPP
-
-#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_WINDOWS_RUNTIME)
-
-#include <robuffer.h>
-#include <windows.storage.streams.h>
-#include <wrl/implements.h>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class winrt_buffer_impl :
- public Microsoft::WRL::RuntimeClass<
- Microsoft::WRL::RuntimeClassFlags<
- Microsoft::WRL::RuntimeClassType::WinRtClassicComMix>,
- ABI::Windows::Storage::Streams::IBuffer,
- Windows::Storage::Streams::IBufferByteAccess>
-{
-public:
- explicit winrt_buffer_impl(const boost::asio::const_buffer& b)
- {
- bytes_ = const_cast<byte*>(static_cast<const byte*>(b.data()));
- length_ = b.size();
- capacity_ = b.size();
- }
-
- explicit winrt_buffer_impl(const boost::asio::mutable_buffer& b)
- {
- bytes_ = static_cast<byte*>(b.data());
- length_ = 0;
- capacity_ = b.size();
- }
-
- ~winrt_buffer_impl()
- {
- }
-
- STDMETHODIMP Buffer(byte** value)
- {
- *value = bytes_;
- return S_OK;
- }
-
- STDMETHODIMP get_Capacity(UINT32* value)
- {
- *value = capacity_;
- return S_OK;
- }
-
- STDMETHODIMP get_Length(UINT32 *value)
- {
- *value = length_;
- return S_OK;
- }
-
- STDMETHODIMP put_Length(UINT32 value)
- {
- if (value > capacity_)
- return E_INVALIDARG;
- length_ = value;
- return S_OK;
- }
-
-private:
- byte* bytes_;
- UINT32 length_;
- UINT32 capacity_;
-};
-
-void buffer_sequence_adapter_base::init_native_buffer(
- buffer_sequence_adapter_base::native_buffer_type& buf,
- const boost::asio::mutable_buffer& buffer)
-{
- std::memset(&buf, 0, sizeof(native_buffer_type));
- Microsoft::WRL::ComPtr<IInspectable> insp
- = Microsoft::WRL::Make<winrt_buffer_impl>(buffer);
- buf = reinterpret_cast<Windows::Storage::Streams::IBuffer^>(insp.Get());
-}
-
-void buffer_sequence_adapter_base::init_native_buffer(
- buffer_sequence_adapter_base::native_buffer_type& buf,
- const boost::asio::const_buffer& buffer)
-{
- std::memset(&buf, 0, sizeof(native_buffer_type));
- Microsoft::WRL::ComPtr<IInspectable> insp
- = Microsoft::WRL::Make<winrt_buffer_impl>(buffer);
- Platform::Object^ buf_obj = reinterpret_cast<Platform::Object^>(insp.Get());
- buf = reinterpret_cast<Windows::Storage::Streams::IBuffer^>(insp.Get());
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_BUFFER_SEQUENCE_ADAPTER_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp
deleted file mode 100644
index 1bb68be1c01..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp
+++ /dev/null
@@ -1,476 +0,0 @@
-//
-// detail/impl/descriptor_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_IMPL_DESCRIPTOR_OPS_IPP
-#define BOOST_ASIO_DETAIL_IMPL_DESCRIPTOR_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 <cerrno>
-#include <boost/asio/detail/descriptor_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace descriptor_ops {
-
-int open(const char* path, int flags, boost::system::error_code& ec)
-{
- errno = 0;
- int result = error_wrapper(::open(path, flags), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-}
-
-int close(int d, state_type& state, boost::system::error_code& ec)
-{
- int result = 0;
- if (d != -1)
- {
- errno = 0;
- result = error_wrapper(::close(d), ec);
-
- 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(__SYMBIAN32__)
- int flags = ::fcntl(d, F_GETFL, 0);
- if (flags >= 0)
- ::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
-#else // defined(__SYMBIAN32__)
- ioctl_arg_type arg = 0;
- ::ioctl(d, FIONBIO, &arg);
-#endif // defined(__SYMBIAN32__)
- state &= ~non_blocking;
-
- errno = 0;
- result = error_wrapper(::close(d), ec);
- }
- }
-
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-bool set_user_non_blocking(int d, state_type& state,
- bool value, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return false;
- }
-
- errno = 0;
-#if defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(d, F_GETFL, 0), ec);
- if (result >= 0)
- {
- errno = 0;
- int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(d, F_SETFL, flag), ec);
- }
-#else // defined(__SYMBIAN32__)
- ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(d, FIONBIO, &arg), ec);
-#endif // defined(__SYMBIAN32__)
-
- 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(int d, state_type& state,
- bool value, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- 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;
- }
-
- errno = 0;
-#if defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(d, F_GETFL, 0), ec);
- if (result >= 0)
- {
- errno = 0;
- int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(d, F_SETFL, flag), ec);
- }
-#else // defined(__SYMBIAN32__)
- ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(d, FIONBIO, &arg), ec);
-#endif // defined(__SYMBIAN32__)
-
- if (result >= 0)
- {
- ec = boost::system::error_code();
- if (value)
- state |= internal_non_blocking;
- else
- state &= ~internal_non_blocking;
- return true;
- }
-
- return false;
-}
-
-std::size_t sync_read(int d, state_type state, buf* bufs,
- std::size_t count, bool all_empty, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // A request to read 0 bytes on a stream is a no-op.
- if (all_empty)
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- // Read some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- errno = 0;
- signed_size_type bytes = error_wrapper(::readv(
- d, bufs, static_cast<int>(count)), ec);
-
- // Check if operation succeeded.
- if (bytes > 0)
- return bytes;
-
- // Check for EOF.
- if (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 descriptor to become ready.
- if (descriptor_ops::poll_read(d, 0, ec) < 0)
- return 0;
- }
-}
-
-bool non_blocking_read(int d, buf* bufs, std::size_t count,
- boost::system::error_code& ec, std::size_t& bytes_transferred)
-{
- for (;;)
- {
- // Read some data.
- errno = 0;
- signed_size_type bytes = error_wrapper(::readv(
- d, bufs, static_cast<int>(count)), ec);
-
- // Check for end of stream.
- if (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;
- }
-}
-
-std::size_t sync_write(int d, state_type state, const buf* bufs,
- std::size_t count, bool all_empty, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // A request to write 0 bytes on a stream is a no-op.
- if (all_empty)
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- // Write some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- errno = 0;
- signed_size_type bytes = error_wrapper(::writev(
- d, bufs, static_cast<int>(count)), 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 descriptor to become ready.
- if (descriptor_ops::poll_write(d, 0, ec) < 0)
- return 0;
- }
-}
-
-bool non_blocking_write(int d, const buf* bufs, std::size_t count,
- boost::system::error_code& ec, std::size_t& bytes_transferred)
-{
- for (;;)
- {
- // Write some data.
- errno = 0;
- signed_size_type bytes = error_wrapper(::writev(
- d, bufs, static_cast<int>(count)), 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;
- }
-}
-
-int ioctl(int d, state_type& state, long cmd,
- ioctl_arg_type* arg, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return -1;
- }
-
- errno = 0;
- int result = error_wrapper(::ioctl(d, cmd, arg), ec);
-
- 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 descriptor is
- // already in the correct state. This ensures that the underlying
- // descriptor 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<long>(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 fcntl(int d, int cmd, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return -1;
- }
-
- errno = 0;
- int result = error_wrapper(::fcntl(d, cmd), ec);
- if (result != -1)
- ec = boost::system::error_code();
- return result;
-}
-
-int fcntl(int d, int cmd, long arg, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return -1;
- }
-
- errno = 0;
- int result = error_wrapper(::fcntl(d, cmd, arg), ec);
- if (result != -1)
- ec = boost::system::error_code();
- return result;
-}
-
-int poll_read(int d, state_type state, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return -1;
- }
-
- pollfd fds;
- fds.fd = d;
- fds.events = POLLIN;
- fds.revents = 0;
- int timeout = (state & user_set_non_blocking) ? 0 : -1;
- errno = 0;
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
- 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(int d, state_type state, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return -1;
- }
-
- pollfd fds;
- fds.fd = d;
- fds.events = POLLOUT;
- fds.revents = 0;
- int timeout = (state & user_set_non_blocking) ? 0 : -1;
- errno = 0;
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
- 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(int d, state_type state, boost::system::error_code& ec)
-{
- if (d == -1)
- {
- ec = boost::asio::error::bad_descriptor;
- return -1;
- }
-
- pollfd fds;
- fds.fd = d;
- fds.events = POLLPRI | POLLERR | POLLHUP;
- fds.revents = 0;
- int timeout = (state & user_set_non_blocking) ? 0 : -1;
- errno = 0;
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
- 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;
-}
-
-} // namespace descriptor_ops
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_DESCRIPTOR_OPS_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 797937bad89..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// detail/impl/dev_poll_reactor.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_IMPL_DEV_POLL_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_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_DEV_POLL)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-void dev_poll_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_add_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void dev_poll_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_remove_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void dev_poll_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- scheduler_.post_immediate_completion(op, false);
- return;
- }
-
- bool earliest = queue.enqueue_timer(time, timer, op);
- scheduler_.work_started();
- if (earliest)
- interrupter_.interrupt();
-}
-
-template <typename Time_Traits>
-std::size_t dev_poll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
- return n;
-}
-
-template <typename Time_Traits>
-void dev_poll_reactor::move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- queue.cancel_timer(target, ops);
- queue.move_timer(target, source);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_DEV_POLL)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 5cc73ca9c17..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.ipp
+++ /dev/null
@@ -1,448 +0,0 @@
-//
-// detail/impl/dev_poll_reactor.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_IMPL_DEV_POLL_REACTOR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_IPP
-
-#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_DEV_POLL)
-
-#include <boost/asio/detail/dev_poll_reactor.hpp>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-dev_poll_reactor::dev_poll_reactor(boost::asio::execution_context& ctx)
- : boost::asio::detail::execution_context_service_base<dev_poll_reactor>(ctx),
- scheduler_(use_service<scheduler>(ctx)),
- mutex_(),
- dev_poll_fd_(do_dev_poll_create()),
- interrupter_(),
- shutdown_(false)
-{
- // Add the interrupter's descriptor to /dev/poll.
- ::pollfd ev = { 0, 0, 0 };
- ev.fd = interrupter_.read_descriptor();
- ev.events = POLLIN | POLLERR;
- ev.revents = 0;
- ::write(dev_poll_fd_, &ev, sizeof(ev));
-}
-
-dev_poll_reactor::~dev_poll_reactor()
-{
- shutdown();
- ::close(dev_poll_fd_);
-}
-
-void dev_poll_reactor::shutdown()
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- shutdown_ = true;
- lock.unlock();
-
- op_queue<operation> ops;
-
- for (int i = 0; i < max_ops; ++i)
- op_queue_[i].get_all_operations(ops);
-
- timer_queues_.get_all_timers(ops);
-
- scheduler_.abandon_operations(ops);
-}
-
-void dev_poll_reactor::notify_fork(
- boost::asio::execution_context::fork_event fork_ev)
-{
- if (fork_ev == boost::asio::execution_context::fork_child)
- {
- detail::mutex::scoped_lock lock(mutex_);
-
- if (dev_poll_fd_ != -1)
- ::close(dev_poll_fd_);
- dev_poll_fd_ = -1;
- dev_poll_fd_ = do_dev_poll_create();
-
- interrupter_.recreate();
-
- // Add the interrupter's descriptor to /dev/poll.
- ::pollfd ev = { 0, 0, 0 };
- ev.fd = interrupter_.read_descriptor();
- ev.events = POLLIN | POLLERR;
- ev.revents = 0;
- ::write(dev_poll_fd_, &ev, sizeof(ev));
-
- // Re-register all descriptors with /dev/poll. The changes will be written
- // to the /dev/poll descriptor the next time the reactor is run.
- for (int i = 0; i < max_ops; ++i)
- {
- reactor_op_queue<socket_type>::iterator iter = op_queue_[i].begin();
- reactor_op_queue<socket_type>::iterator end = op_queue_[i].end();
- for (; iter != end; ++iter)
- {
- ::pollfd& pending_ev = add_pending_event_change(iter->first);
- pending_ev.events |= POLLERR | POLLHUP;
- switch (i)
- {
- case read_op: pending_ev.events |= POLLIN; break;
- case write_op: pending_ev.events |= POLLOUT; break;
- case except_op: pending_ev.events |= POLLPRI; break;
- default: break;
- }
- }
- }
- interrupter_.interrupt();
- }
-}
-
-void dev_poll_reactor::init_task()
-{
- scheduler_.init_task();
-}
-
-int dev_poll_reactor::register_descriptor(socket_type, per_descriptor_data&)
-{
- return 0;
-}
-
-int dev_poll_reactor::register_internal_descriptor(int op_type,
- socket_type descriptor, per_descriptor_data&, reactor_op* op)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- op_queue_[op_type].enqueue_operation(descriptor, op);
- ::pollfd& ev = add_pending_event_change(descriptor);
- ev.events = POLLERR | POLLHUP;
- switch (op_type)
- {
- case read_op: ev.events |= POLLIN; break;
- case write_op: ev.events |= POLLOUT; break;
- case except_op: ev.events |= POLLPRI; break;
- default: break;
- }
- interrupter_.interrupt();
-
- return 0;
-}
-
-void dev_poll_reactor::move_descriptor(socket_type,
- dev_poll_reactor::per_descriptor_data&,
- dev_poll_reactor::per_descriptor_data&)
-{
-}
-
-void dev_poll_reactor::start_op(int op_type, socket_type descriptor,
- dev_poll_reactor::per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool allow_speculative)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (allow_speculative)
- {
- if (op_type != read_op || !op_queue_[except_op].has_operation(descriptor))
- {
- if (!op_queue_[op_type].has_operation(descriptor))
- {
- if (op->perform())
- {
- lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
- }
- }
- }
-
- bool first = op_queue_[op_type].enqueue_operation(descriptor, op);
- scheduler_.work_started();
- if (first)
- {
- ::pollfd& ev = add_pending_event_change(descriptor);
- ev.events = POLLERR | POLLHUP;
- if (op_type == read_op
- || op_queue_[read_op].has_operation(descriptor))
- ev.events |= POLLIN;
- if (op_type == write_op
- || op_queue_[write_op].has_operation(descriptor))
- ev.events |= POLLOUT;
- if (op_type == except_op
- || op_queue_[except_op].has_operation(descriptor))
- ev.events |= POLLPRI;
- interrupter_.interrupt();
- }
-}
-
-void dev_poll_reactor::cancel_ops(socket_type descriptor,
- dev_poll_reactor::per_descriptor_data&)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
-}
-
-void dev_poll_reactor::deregister_descriptor(socket_type descriptor,
- dev_poll_reactor::per_descriptor_data&, bool)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- // Remove the descriptor from /dev/poll.
- ::pollfd& ev = add_pending_event_change(descriptor);
- ev.events = POLLREMOVE;
- interrupter_.interrupt();
-
- // Cancel any outstanding operations associated with the descriptor.
- cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
-}
-
-void dev_poll_reactor::deregister_internal_descriptor(
- socket_type descriptor, dev_poll_reactor::per_descriptor_data&)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- // Remove the descriptor from /dev/poll. Since this function is only called
- // during a fork, we can apply the change immediately.
- ::pollfd ev = { 0, 0, 0 };
- ev.fd = descriptor;
- ev.events = POLLREMOVE;
- ev.revents = 0;
- ::write(dev_poll_fd_, &ev, sizeof(ev));
-
- // Destroy all operations associated with the descriptor.
- op_queue<operation> ops;
- boost::system::error_code ec;
- for (int i = 0; i < max_ops; ++i)
- op_queue_[i].cancel_operations(descriptor, ops, ec);
-}
-
-void dev_poll_reactor::cleanup_descriptor_data(
- dev_poll_reactor::per_descriptor_data&)
-{
-}
-
-void dev_poll_reactor::run(long usec, op_queue<operation>& ops)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- // We can return immediately if there's no work to do and the reactor is
- // not supposed to block.
- if (usec == 0 && op_queue_[read_op].empty() && op_queue_[write_op].empty()
- && op_queue_[except_op].empty() && timer_queues_.all_empty())
- return;
-
- // Write the pending event registration changes to the /dev/poll descriptor.
- std::size_t events_size = sizeof(::pollfd) * pending_event_changes_.size();
- if (events_size > 0)
- {
- errno = 0;
- int result = ::write(dev_poll_fd_,
- &pending_event_changes_[0], events_size);
- if (result != static_cast<int>(events_size))
- {
- boost::system::error_code ec = boost::system::error_code(
- errno, boost::asio::error::get_system_category());
- for (std::size_t i = 0; i < pending_event_changes_.size(); ++i)
- {
- int descriptor = pending_event_changes_[i].fd;
- for (int j = 0; j < max_ops; ++j)
- op_queue_[j].cancel_operations(descriptor, ops, ec);
- }
- }
- pending_event_changes_.clear();
- pending_event_change_index_.clear();
- }
-
- // Calculate timeout.
- int timeout;
- if (usec == 0)
- timeout = 0;
- else
- {
- timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1);
- timeout = get_timeout(timeout);
- }
- lock.unlock();
-
- // Block on the /dev/poll descriptor.
- ::pollfd events[128] = { { 0, 0, 0 } };
- ::dvpoll dp = { 0, 0, 0 };
- dp.dp_fds = events;
- dp.dp_nfds = 128;
- dp.dp_timeout = timeout;
- int num_events = ::ioctl(dev_poll_fd_, DP_POLL, &dp);
-
- lock.lock();
-
- // Dispatch the waiting events.
- for (int i = 0; i < num_events; ++i)
- {
- int descriptor = events[i].fd;
- if (descriptor == interrupter_.read_descriptor())
- {
- interrupter_.reset();
- }
- else
- {
- bool more_reads = false;
- bool more_writes = false;
- bool more_except = false;
-
- // Exception operations must be processed first to ensure that any
- // out-of-band data is read before normal data.
- if (events[i].events & (POLLPRI | POLLERR | POLLHUP))
- more_except =
- op_queue_[except_op].perform_operations(descriptor, ops);
- else
- more_except = op_queue_[except_op].has_operation(descriptor);
-
- if (events[i].events & (POLLIN | POLLERR | POLLHUP))
- more_reads = op_queue_[read_op].perform_operations(descriptor, ops);
- else
- more_reads = op_queue_[read_op].has_operation(descriptor);
-
- if (events[i].events & (POLLOUT | POLLERR | POLLHUP))
- more_writes = op_queue_[write_op].perform_operations(descriptor, ops);
- else
- more_writes = op_queue_[write_op].has_operation(descriptor);
-
- if ((events[i].events & (POLLERR | POLLHUP)) != 0
- && !more_except && !more_reads && !more_writes)
- {
- // If we have an event and no operations associated with the
- // descriptor then we need to delete the descriptor from /dev/poll.
- // The poll operation can produce POLLHUP or POLLERR events when there
- // is no operation pending, so if we do not remove the descriptor we
- // can end up in a tight polling loop.
- ::pollfd ev = { 0, 0, 0 };
- ev.fd = descriptor;
- ev.events = POLLREMOVE;
- ev.revents = 0;
- ::write(dev_poll_fd_, &ev, sizeof(ev));
- }
- else
- {
- ::pollfd ev = { 0, 0, 0 };
- ev.fd = descriptor;
- ev.events = POLLERR | POLLHUP;
- if (more_reads)
- ev.events |= POLLIN;
- if (more_writes)
- ev.events |= POLLOUT;
- if (more_except)
- ev.events |= POLLPRI;
- ev.revents = 0;
- int result = ::write(dev_poll_fd_, &ev, sizeof(ev));
- if (result != sizeof(ev))
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- for (int j = 0; j < max_ops; ++j)
- op_queue_[j].cancel_operations(descriptor, ops, ec);
- }
- }
- }
- }
- timer_queues_.get_ready_timers(ops);
-}
-
-void dev_poll_reactor::interrupt()
-{
- interrupter_.interrupt();
-}
-
-int dev_poll_reactor::do_dev_poll_create()
-{
- int fd = ::open("/dev/poll", O_RDWR);
- if (fd == -1)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "/dev/poll");
- }
- return fd;
-}
-
-void dev_poll_reactor::do_add_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.insert(&queue);
-}
-
-void dev_poll_reactor::do_remove_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.erase(&queue);
-}
-
-int dev_poll_reactor::get_timeout(int msec)
-{
- // By default we will wait no longer than 5 minutes. This will ensure that
- // any changes to the system clock are detected after no longer than this.
- const int max_msec = 5 * 60 * 1000;
- return timer_queues_.wait_duration_msec(
- (msec < 0 || max_msec < msec) ? max_msec : msec);
-}
-
-void dev_poll_reactor::cancel_ops_unlocked(socket_type descriptor,
- const boost::system::error_code& ec)
-{
- bool need_interrupt = false;
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- need_interrupt = op_queue_[i].cancel_operations(
- descriptor, ops, ec) || need_interrupt;
- scheduler_.post_deferred_completions(ops);
- if (need_interrupt)
- interrupter_.interrupt();
-}
-
-::pollfd& dev_poll_reactor::add_pending_event_change(int descriptor)
-{
- hash_map<int, std::size_t>::iterator iter
- = pending_event_change_index_.find(descriptor);
- if (iter == pending_event_change_index_.end())
- {
- std::size_t index = pending_event_changes_.size();
- pending_event_changes_.reserve(pending_event_changes_.size() + 1);
- pending_event_change_index_.insert(std::make_pair(descriptor, index));
- pending_event_changes_.push_back(::pollfd());
- pending_event_changes_[index].fd = descriptor;
- pending_event_changes_[index].revents = 0;
- return pending_event_changes_[index];
- }
- else
- {
- return pending_event_changes_[iter->second];
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_DEV_POLL)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp
deleted file mode 100644
index 101b1d6eadb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// detail/impl/epoll_reactor.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_IMPL_EPOLL_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if defined(BOOST_ASIO_HAS_EPOLL)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-void epoll_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_add_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void epoll_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_remove_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void epoll_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
-{
- mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- scheduler_.post_immediate_completion(op, false);
- return;
- }
-
- bool earliest = queue.enqueue_timer(time, timer, op);
- scheduler_.work_started();
- if (earliest)
- update_timeout();
-}
-
-template <typename Time_Traits>
-std::size_t epoll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled)
-{
- mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
- return n;
-}
-
-template <typename Time_Traits>
-void epoll_reactor::move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source)
-{
- mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- queue.cancel_timer(target, ops);
- queue.move_timer(target, source);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_EPOLL)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp
deleted file mode 100644
index 1e9babcc144..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp
+++ /dev/null
@@ -1,789 +0,0 @@
-//
-// detail/impl/epoll_reactor.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_IMPL_EPOLL_REACTOR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
-
-#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_EPOLL)
-
-#include <cstddef>
-#include <sys/epoll.h>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
-# include <sys/timerfd.h>
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-epoll_reactor::epoll_reactor(boost::asio::execution_context& ctx)
- : execution_context_service_base<epoll_reactor>(ctx),
- scheduler_(use_service<scheduler>(ctx)),
- mutex_(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
- interrupter_(),
- epoll_fd_(do_epoll_create()),
- timer_fd_(do_timerfd_create()),
- shutdown_(false),
- registered_descriptors_mutex_(mutex_.enabled())
-{
- // Add the interrupter's descriptor to epoll.
- epoll_event ev = { 0, { 0 } };
- ev.events = EPOLLIN | EPOLLERR | EPOLLET;
- ev.data.ptr = &interrupter_;
- epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev);
- interrupter_.interrupt();
-
- // Add the timer descriptor to epoll.
- if (timer_fd_ != -1)
- {
- ev.events = EPOLLIN | EPOLLERR;
- ev.data.ptr = &timer_fd_;
- epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev);
- }
-}
-
-epoll_reactor::~epoll_reactor()
-{
- if (epoll_fd_ != -1)
- close(epoll_fd_);
- if (timer_fd_ != -1)
- close(timer_fd_);
-}
-
-void epoll_reactor::shutdown()
-{
- mutex::scoped_lock lock(mutex_);
- shutdown_ = true;
- lock.unlock();
-
- op_queue<operation> ops;
-
- while (descriptor_state* state = registered_descriptors_.first())
- {
- for (int i = 0; i < max_ops; ++i)
- ops.push(state->op_queue_[i]);
- state->shutdown_ = true;
- registered_descriptors_.free(state);
- }
-
- timer_queues_.get_all_timers(ops);
-
- scheduler_.abandon_operations(ops);
-}
-
-void epoll_reactor::notify_fork(
- boost::asio::execution_context::fork_event fork_ev)
-{
- if (fork_ev == boost::asio::execution_context::fork_child)
- {
- if (epoll_fd_ != -1)
- ::close(epoll_fd_);
- epoll_fd_ = -1;
- epoll_fd_ = do_epoll_create();
-
- if (timer_fd_ != -1)
- ::close(timer_fd_);
- timer_fd_ = -1;
- timer_fd_ = do_timerfd_create();
-
- interrupter_.recreate();
-
- // Add the interrupter's descriptor to epoll.
- epoll_event ev = { 0, { 0 } };
- ev.events = EPOLLIN | EPOLLERR | EPOLLET;
- ev.data.ptr = &interrupter_;
- epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev);
- interrupter_.interrupt();
-
- // Add the timer descriptor to epoll.
- if (timer_fd_ != -1)
- {
- ev.events = EPOLLIN | EPOLLERR;
- ev.data.ptr = &timer_fd_;
- epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev);
- }
-
- update_timeout();
-
- // Re-register all descriptors with epoll.
- mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- for (descriptor_state* state = registered_descriptors_.first();
- state != 0; state = state->next_)
- {
- ev.events = state->registered_events_;
- ev.data.ptr = state;
- int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, state->descriptor_, &ev);
- if (result != 0)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "epoll re-registration");
- }
- }
- }
-}
-
-void epoll_reactor::init_task()
-{
- scheduler_.init_task();
-}
-
-int epoll_reactor::register_descriptor(socket_type descriptor,
- epoll_reactor::per_descriptor_data& descriptor_data)
-{
- descriptor_data = allocate_descriptor_state();
-
- BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- {
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- descriptor_data->reactor_ = this;
- descriptor_data->descriptor_ = descriptor;
- descriptor_data->shutdown_ = false;
- for (int i = 0; i < max_ops; ++i)
- descriptor_data->try_speculative_[i] = true;
- }
-
- epoll_event ev = { 0, { 0 } };
- ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET;
- descriptor_data->registered_events_ = ev.events;
- ev.data.ptr = descriptor_data;
- int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
- if (result != 0)
- {
- if (errno == EPERM)
- {
- // This file descriptor type is not supported by epoll. However, if it is
- // a regular file then operations on it will not block. We will allow
- // this descriptor to be used and fail later if an operation on it would
- // otherwise require a trip through the reactor.
- descriptor_data->registered_events_ = 0;
- return 0;
- }
- return errno;
- }
-
- return 0;
-}
-
-int epoll_reactor::register_internal_descriptor(
- int op_type, socket_type descriptor,
- epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op)
-{
- descriptor_data = allocate_descriptor_state();
-
- BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- {
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- descriptor_data->reactor_ = this;
- descriptor_data->descriptor_ = descriptor;
- descriptor_data->shutdown_ = false;
- descriptor_data->op_queue_[op_type].push(op);
- for (int i = 0; i < max_ops; ++i)
- descriptor_data->try_speculative_[i] = true;
- }
-
- epoll_event ev = { 0, { 0 } };
- ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET;
- descriptor_data->registered_events_ = ev.events;
- ev.data.ptr = descriptor_data;
- int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
- if (result != 0)
- return errno;
-
- return 0;
-}
-
-void epoll_reactor::move_descriptor(socket_type,
- epoll_reactor::per_descriptor_data& target_descriptor_data,
- epoll_reactor::per_descriptor_data& source_descriptor_data)
-{
- target_descriptor_data = source_descriptor_data;
- source_descriptor_data = 0;
-}
-
-void epoll_reactor::start_op(int op_type, socket_type descriptor,
- epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative)
-{
- if (!descriptor_data)
- {
- op->ec_ = boost::asio::error::bad_descriptor;
- post_immediate_completion(op, is_continuation);
- return;
- }
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (descriptor_data->shutdown_)
- {
- post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (descriptor_data->op_queue_[op_type].empty())
- {
- if (allow_speculative
- && (op_type != read_op
- || descriptor_data->op_queue_[except_op].empty()))
- {
- if (descriptor_data->try_speculative_[op_type])
- {
- if (reactor_op::status status = op->perform())
- {
- if (status == reactor_op::done_and_exhausted)
- if (descriptor_data->registered_events_ != 0)
- descriptor_data->try_speculative_[op_type] = false;
- descriptor_lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
- }
-
- if (descriptor_data->registered_events_ == 0)
- {
- op->ec_ = boost::asio::error::operation_not_supported;
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (op_type == write_op)
- {
- if ((descriptor_data->registered_events_ & EPOLLOUT) == 0)
- {
- epoll_event ev = { 0, { 0 } };
- ev.events = descriptor_data->registered_events_ | EPOLLOUT;
- ev.data.ptr = descriptor_data;
- if (epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev) == 0)
- {
- descriptor_data->registered_events_ |= ev.events;
- }
- else
- {
- op->ec_ = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
- }
- }
- }
- else if (descriptor_data->registered_events_ == 0)
- {
- op->ec_ = boost::asio::error::operation_not_supported;
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
- else
- {
- if (op_type == write_op)
- {
- descriptor_data->registered_events_ |= EPOLLOUT;
- }
-
- epoll_event ev = { 0, { 0 } };
- ev.events = descriptor_data->registered_events_;
- ev.data.ptr = descriptor_data;
- epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
- }
- }
-
- descriptor_data->op_queue_[op_type].push(op);
- scheduler_.work_started();
-}
-
-void epoll_reactor::cancel_ops(socket_type,
- epoll_reactor::per_descriptor_data& descriptor_data)
-{
- if (!descriptor_data)
- return;
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- {
- while (reactor_op* op = descriptor_data->op_queue_[i].front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- descriptor_data->op_queue_[i].pop();
- ops.push(op);
- }
- }
-
- descriptor_lock.unlock();
-
- scheduler_.post_deferred_completions(ops);
-}
-
-void epoll_reactor::deregister_descriptor(socket_type descriptor,
- epoll_reactor::per_descriptor_data& descriptor_data, bool closing)
-{
- if (!descriptor_data)
- return;
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (!descriptor_data->shutdown_)
- {
- if (closing)
- {
- // The descriptor will be automatically removed from the epoll set when
- // it is closed.
- }
- else if (descriptor_data->registered_events_ != 0)
- {
- epoll_event ev = { 0, { 0 } };
- epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
- }
-
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- {
- while (reactor_op* op = descriptor_data->op_queue_[i].front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- descriptor_data->op_queue_[i].pop();
- ops.push(op);
- }
- }
-
- descriptor_data->descriptor_ = -1;
- descriptor_data->shutdown_ = true;
-
- descriptor_lock.unlock();
-
- BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- scheduler_.post_deferred_completions(ops);
-
- // Leave descriptor_data set so that it will be freed by the subsequent
- // call to cleanup_descriptor_data.
- }
- else
- {
- // We are shutting down, so prevent cleanup_descriptor_data from freeing
- // the descriptor_data object and let the destructor free it instead.
- descriptor_data = 0;
- }
-}
-
-void epoll_reactor::deregister_internal_descriptor(socket_type descriptor,
- epoll_reactor::per_descriptor_data& descriptor_data)
-{
- if (!descriptor_data)
- return;
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (!descriptor_data->shutdown_)
- {
- epoll_event ev = { 0, { 0 } };
- epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
-
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- ops.push(descriptor_data->op_queue_[i]);
-
- descriptor_data->descriptor_ = -1;
- descriptor_data->shutdown_ = true;
-
- descriptor_lock.unlock();
-
- BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- // Leave descriptor_data set so that it will be freed by the subsequent
- // call to cleanup_descriptor_data.
- }
- else
- {
- // We are shutting down, so prevent cleanup_descriptor_data from freeing
- // the descriptor_data object and let the destructor free it instead.
- descriptor_data = 0;
- }
-}
-
-void epoll_reactor::cleanup_descriptor_data(
- per_descriptor_data& descriptor_data)
-{
- if (descriptor_data)
- {
- free_descriptor_state(descriptor_data);
- descriptor_data = 0;
- }
-}
-
-void epoll_reactor::run(long usec, op_queue<operation>& ops)
-{
- // This code relies on the fact that the scheduler queues the reactor task
- // behind all descriptor operations generated by this function. This means,
- // that by the time we reach this point, any previously returned descriptor
- // operations have already been dequeued. Therefore it is now safe for us to
- // reuse and return them for the scheduler to queue again.
-
- // Calculate timeout. Check the timer queues only if timerfd is not in use.
- int timeout;
- if (usec == 0)
- timeout = 0;
- else
- {
- timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1);
- if (timer_fd_ == -1)
- {
- mutex::scoped_lock lock(mutex_);
- timeout = get_timeout(timeout);
- }
- }
-
- // Block on the epoll descriptor.
- epoll_event events[128];
- int num_events = epoll_wait(epoll_fd_, events, 128, timeout);
-
-#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
- // Trace the waiting events.
- for (int i = 0; i < num_events; ++i)
- {
- void* ptr = events[i].data.ptr;
- if (ptr == &interrupter_)
- {
- // Ignore.
- }
-# if defined(BOOST_ASIO_HAS_TIMERFD)
- else if (ptr == &timer_fd_)
- {
- // Ignore.
- }
-# endif // defined(BOOST_ASIO_HAS_TIMERFD)
- else
- {
- unsigned event_mask = 0;
- if ((events[i].events & EPOLLIN) != 0)
- event_mask |= BOOST_ASIO_HANDLER_REACTOR_READ_EVENT;
- if ((events[i].events & EPOLLOUT))
- event_mask |= BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT;
- if ((events[i].events & (EPOLLERR | EPOLLHUP)) != 0)
- event_mask |= BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT;
- BOOST_ASIO_HANDLER_REACTOR_EVENTS((context(),
- reinterpret_cast<uintmax_t>(ptr), event_mask));
- }
- }
-#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
- bool check_timers = (timer_fd_ == -1);
-#else // defined(BOOST_ASIO_HAS_TIMERFD)
- bool check_timers = true;
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
-
- // Dispatch the waiting events.
- for (int i = 0; i < num_events; ++i)
- {
- void* ptr = events[i].data.ptr;
- if (ptr == &interrupter_)
- {
- // No need to reset the interrupter since we're leaving the descriptor
- // in a ready-to-read state and relying on edge-triggered notifications
- // to make it so that we only get woken up when the descriptor's epoll
- // registration is updated.
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
- if (timer_fd_ == -1)
- check_timers = true;
-#else // defined(BOOST_ASIO_HAS_TIMERFD)
- check_timers = true;
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
- }
-#if defined(BOOST_ASIO_HAS_TIMERFD)
- else if (ptr == &timer_fd_)
- {
- check_timers = true;
- }
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
- else
- {
- // The descriptor operation doesn't count as work in and of itself, so we
- // don't call work_started() here. This still allows the scheduler to
- // stop if the only remaining operations are descriptor operations.
- descriptor_state* descriptor_data = static_cast<descriptor_state*>(ptr);
- if (!ops.is_enqueued(descriptor_data))
- {
- descriptor_data->set_ready_events(events[i].events);
- ops.push(descriptor_data);
- }
- else
- {
- descriptor_data->add_ready_events(events[i].events);
- }
- }
- }
-
- if (check_timers)
- {
- mutex::scoped_lock common_lock(mutex_);
- timer_queues_.get_ready_timers(ops);
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
- if (timer_fd_ != -1)
- {
- itimerspec new_timeout;
- itimerspec old_timeout;
- int flags = get_timeout(new_timeout);
- timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout);
- }
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
- }
-}
-
-void epoll_reactor::interrupt()
-{
- epoll_event ev = { 0, { 0 } };
- ev.events = EPOLLIN | EPOLLERR | EPOLLET;
- ev.data.ptr = &interrupter_;
- epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, interrupter_.read_descriptor(), &ev);
-}
-
-int epoll_reactor::do_epoll_create()
-{
-#if defined(EPOLL_CLOEXEC)
- int fd = epoll_create1(EPOLL_CLOEXEC);
-#else // defined(EPOLL_CLOEXEC)
- int fd = -1;
- errno = EINVAL;
-#endif // defined(EPOLL_CLOEXEC)
-
- if (fd == -1 && (errno == EINVAL || errno == ENOSYS))
- {
- fd = epoll_create(epoll_size);
- if (fd != -1)
- ::fcntl(fd, F_SETFD, FD_CLOEXEC);
- }
-
- if (fd == -1)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "epoll");
- }
-
- return fd;
-}
-
-int epoll_reactor::do_timerfd_create()
-{
-#if defined(BOOST_ASIO_HAS_TIMERFD)
-# if defined(TFD_CLOEXEC)
- int fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
-# else // defined(TFD_CLOEXEC)
- int fd = -1;
- errno = EINVAL;
-# endif // defined(TFD_CLOEXEC)
-
- if (fd == -1 && errno == EINVAL)
- {
- fd = timerfd_create(CLOCK_MONOTONIC, 0);
- if (fd != -1)
- ::fcntl(fd, F_SETFD, FD_CLOEXEC);
- }
-
- return fd;
-#else // defined(BOOST_ASIO_HAS_TIMERFD)
- return -1;
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
-}
-
-epoll_reactor::descriptor_state* epoll_reactor::allocate_descriptor_state()
-{
- mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- return registered_descriptors_.alloc(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- REACTOR_IO, scheduler_.concurrency_hint()));
-}
-
-void epoll_reactor::free_descriptor_state(epoll_reactor::descriptor_state* s)
-{
- mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- registered_descriptors_.free(s);
-}
-
-void epoll_reactor::do_add_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.insert(&queue);
-}
-
-void epoll_reactor::do_remove_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.erase(&queue);
-}
-
-void epoll_reactor::update_timeout()
-{
-#if defined(BOOST_ASIO_HAS_TIMERFD)
- if (timer_fd_ != -1)
- {
- itimerspec new_timeout;
- itimerspec old_timeout;
- int flags = get_timeout(new_timeout);
- timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout);
- return;
- }
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
- interrupt();
-}
-
-int epoll_reactor::get_timeout(int msec)
-{
- // By default we will wait no longer than 5 minutes. This will ensure that
- // any changes to the system clock are detected after no longer than this.
- const int max_msec = 5 * 60 * 1000;
- return timer_queues_.wait_duration_msec(
- (msec < 0 || max_msec < msec) ? max_msec : msec);
-}
-
-#if defined(BOOST_ASIO_HAS_TIMERFD)
-int epoll_reactor::get_timeout(itimerspec& ts)
-{
- ts.it_interval.tv_sec = 0;
- ts.it_interval.tv_nsec = 0;
-
- long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
- ts.it_value.tv_sec = usec / 1000000;
- ts.it_value.tv_nsec = usec ? (usec % 1000000) * 1000 : 1;
-
- return usec ? 0 : TFD_TIMER_ABSTIME;
-}
-#endif // defined(BOOST_ASIO_HAS_TIMERFD)
-
-struct epoll_reactor::perform_io_cleanup_on_block_exit
-{
- explicit perform_io_cleanup_on_block_exit(epoll_reactor* r)
- : reactor_(r), first_op_(0)
- {
- }
-
- ~perform_io_cleanup_on_block_exit()
- {
- if (first_op_)
- {
- // Post the remaining completed operations for invocation.
- if (!ops_.empty())
- reactor_->scheduler_.post_deferred_completions(ops_);
-
- // A user-initiated operation has completed, but there's no need to
- // explicitly call work_finished() here. Instead, we'll take advantage of
- // the fact that the scheduler will call work_finished() once we return.
- }
- else
- {
- // No user-initiated operations have completed, so we need to compensate
- // for the work_finished() call that the scheduler will make once this
- // operation returns.
- reactor_->scheduler_.compensating_work_started();
- }
- }
-
- epoll_reactor* reactor_;
- op_queue<operation> ops_;
- operation* first_op_;
-};
-
-epoll_reactor::descriptor_state::descriptor_state(bool locking)
- : operation(&epoll_reactor::descriptor_state::do_complete),
- mutex_(locking)
-{
-}
-
-operation* epoll_reactor::descriptor_state::perform_io(uint32_t events)
-{
- mutex_.lock();
- perform_io_cleanup_on_block_exit io_cleanup(reactor_);
- mutex::scoped_lock descriptor_lock(mutex_, mutex::scoped_lock::adopt_lock);
-
- // Exception operations must be processed first to ensure that any
- // out-of-band data is read before normal data.
- static const int flag[max_ops] = { EPOLLIN, EPOLLOUT, EPOLLPRI };
- for (int j = max_ops - 1; j >= 0; --j)
- {
- if (events & (flag[j] | EPOLLERR | EPOLLHUP))
- {
- try_speculative_[j] = true;
- while (reactor_op* op = op_queue_[j].front())
- {
- if (reactor_op::status status = op->perform())
- {
- op_queue_[j].pop();
- io_cleanup.ops_.push(op);
- if (status == reactor_op::done_and_exhausted)
- {
- try_speculative_[j] = false;
- break;
- }
- }
- else
- break;
- }
- }
- }
-
- // The first operation will be returned for completion now. The others will
- // be posted for later by the io_cleanup object's destructor.
- io_cleanup.first_op_ = io_cleanup.ops_.front();
- io_cleanup.ops_.pop();
- return io_cleanup.first_op_;
-}
-
-void epoll_reactor::descriptor_state::do_complete(
- void* owner, operation* base,
- const boost::system::error_code& ec, std::size_t bytes_transferred)
-{
- if (owner)
- {
- descriptor_state* descriptor_data = static_cast<descriptor_state*>(base);
- uint32_t events = static_cast<uint32_t>(bytes_transferred);
- if (operation* op = descriptor_data->perform_io(events))
- {
- op->complete(owner, ec, 0);
- }
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_EPOLL)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 88040094424..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+++ /dev/null
@@ -1,167 +0,0 @@
-//
-// detail/impl/eventfd_select_interrupter.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail 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_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP
-#define BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP
-
-#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_EVENTFD)
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-# include <asm/unistd.h>
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-# include <sys/eventfd.h>
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/detail/eventfd_select_interrupter.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-eventfd_select_interrupter::eventfd_select_interrupter()
-{
- open_descriptors();
-}
-
-void eventfd_select_interrupter::open_descriptors()
-{
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
- write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
- if (read_descriptor_ != -1)
- {
- ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
- }
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
- write_descriptor_ = read_descriptor_ =
- ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
-# else // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
- errno = EINVAL;
- write_descriptor_ = read_descriptor_ = -1;
-# endif // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
- if (read_descriptor_ == -1 && errno == EINVAL)
- {
- write_descriptor_ = read_descriptor_ = ::eventfd(0, 0);
- if (read_descriptor_ != -1)
- {
- ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
- }
- }
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-
- if (read_descriptor_ == -1)
- {
- int pipe_fds[2];
- if (pipe(pipe_fds) == 0)
- {
- read_descriptor_ = pipe_fds[0];
- ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
- write_descriptor_ = pipe_fds[1];
- ::fcntl(write_descriptor_, F_SETFL, O_NONBLOCK);
- ::fcntl(write_descriptor_, F_SETFD, FD_CLOEXEC);
- }
- else
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "eventfd_select_interrupter");
- }
- }
-}
-
-eventfd_select_interrupter::~eventfd_select_interrupter()
-{
- close_descriptors();
-}
-
-void eventfd_select_interrupter::close_descriptors()
-{
- if (write_descriptor_ != -1 && write_descriptor_ != read_descriptor_)
- ::close(write_descriptor_);
- if (read_descriptor_ != -1)
- ::close(read_descriptor_);
-}
-
-void eventfd_select_interrupter::recreate()
-{
- close_descriptors();
-
- write_descriptor_ = -1;
- read_descriptor_ = -1;
-
- open_descriptors();
-}
-
-void eventfd_select_interrupter::interrupt()
-{
- uint64_t counter(1UL);
- int result = ::write(write_descriptor_, &counter, sizeof(uint64_t));
- (void)result;
-}
-
-bool eventfd_select_interrupter::reset()
-{
- if (write_descriptor_ == read_descriptor_)
- {
- for (;;)
- {
- // Only perform one read. The kernel maintains an atomic counter.
- uint64_t counter(0);
- errno = 0;
- int bytes_read = ::read(read_descriptor_, &counter, sizeof(uint64_t));
- if (bytes_read < 0 && errno == EINTR)
- continue;
- bool was_interrupted = (bytes_read > 0);
- return was_interrupted;
- }
- }
- else
- {
- for (;;)
- {
- // Clear all data from the pipe.
- char data[1024];
- int bytes_read = ::read(read_descriptor_, data, sizeof(data));
- if (bytes_read < 0 && errno == EINTR)
- continue;
- bool was_interrupted = (bytes_read > 0);
- while (bytes_read == sizeof(data))
- bytes_read = ::read(read_descriptor_, data, sizeof(data));
- return was_interrupted;
- }
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_EVENTFD)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp
deleted file mode 100644
index b3abbb513a4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp
+++ /dev/null
@@ -1,360 +0,0 @@
-//
-// detail/impl/handler_tracking.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_IMPL_HANDLER_TRACKING_IPP
-#define BOOST_ASIO_DETAIL_IMPL_HANDLER_TRACKING_IPP
-
-#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_CUSTOM_HANDLER_TRACKING)
-
-// The handler tracking implementation is provided by the user-specified header.
-
-#elif defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-#include <cstdarg>
-#include <cstdio>
-#include <boost/asio/detail/handler_tracking.hpp>
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-# include <boost/asio/time_traits.hpp>
-#elif defined(BOOST_ASIO_HAS_CHRONO)
-# include <boost/asio/detail/chrono.hpp>
-# include <boost/asio/detail/chrono_time_traits.hpp>
-# include <boost/asio/wait_traits.hpp>
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/socket_types.hpp>
-#elif !defined(BOOST_ASIO_WINDOWS)
-# include <unistd.h>
-#endif // !defined(BOOST_ASIO_WINDOWS)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct handler_tracking_timestamp
-{
- uint64_t seconds;
- uint64_t microseconds;
-
- handler_tracking_timestamp()
- {
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- boost::posix_time::ptime epoch(boost::gregorian::date(1970, 1, 1));
- boost::posix_time::time_duration now =
- boost::posix_time::microsec_clock::universal_time() - epoch;
-#elif defined(BOOST_ASIO_HAS_CHRONO)
- typedef chrono_time_traits<chrono::system_clock,
- boost::asio::wait_traits<chrono::system_clock> > traits_helper;
- traits_helper::posix_time_duration now(
- chrono::system_clock::now().time_since_epoch());
-#endif
- seconds = static_cast<uint64_t>(now.total_seconds());
- microseconds = static_cast<uint64_t>(now.total_microseconds() % 1000000);
- }
-};
-
-struct handler_tracking::tracking_state
-{
- static_mutex mutex_;
- uint64_t next_id_;
- tss_ptr<completion>* current_completion_;
-};
-
-handler_tracking::tracking_state* handler_tracking::get_state()
-{
- static tracking_state state = { BOOST_ASIO_STATIC_MUTEX_INIT, 1, 0 };
- return &state;
-}
-
-void handler_tracking::init()
-{
- static tracking_state* state = get_state();
-
- state->mutex_.init();
-
- static_mutex::scoped_lock lock(state->mutex_);
- if (state->current_completion_ == 0)
- state->current_completion_ = new tss_ptr<completion>;
-}
-
-void handler_tracking::creation(execution_context&,
- handler_tracking::tracked_handler& h,
- const char* object_type, void* object,
- uintmax_t /*native_handle*/, const char* op_name)
-{
- static tracking_state* state = get_state();
-
- static_mutex::scoped_lock lock(state->mutex_);
- h.id_ = state->next_id_++;
- lock.unlock();
-
- handler_tracking_timestamp timestamp;
-
- uint64_t current_id = 0;
- if (completion* current_completion = *state->current_completion_)
- current_id = current_completion->id_;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|%I64u*%I64u|%.20s@%p.%.50s\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|%llu*%llu|%.20s@%p.%.50s\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- current_id, h.id_, object_type, object, op_name);
-}
-
-handler_tracking::completion::completion(
- const handler_tracking::tracked_handler& h)
- : id_(h.id_),
- invoked_(false),
- next_(*get_state()->current_completion_)
-{
- *get_state()->current_completion_ = this;
-}
-
-handler_tracking::completion::~completion()
-{
- if (id_)
- {
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|%c%I64u|\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|%c%llu|\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- invoked_ ? '!' : '~', id_);
- }
-
- *get_state()->current_completion_ = next_;
-}
-
-void handler_tracking::completion::invocation_begin()
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|>%I64u|\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|>%llu|\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds, id_);
-
- invoked_ = true;
-}
-
-void handler_tracking::completion::invocation_begin(
- const boost::system::error_code& ec)
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|>%llu|ec=%.20s:%d\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- id_, ec.category().name(), ec.value());
-
- invoked_ = true;
-}
-
-void handler_tracking::completion::invocation_begin(
- const boost::system::error_code& ec, std::size_t bytes_transferred)
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d,bytes_transferred=%I64u\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|>%llu|ec=%.20s:%d,bytes_transferred=%llu\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- id_, ec.category().name(), ec.value(),
- static_cast<uint64_t>(bytes_transferred));
-
- invoked_ = true;
-}
-
-void handler_tracking::completion::invocation_begin(
- const boost::system::error_code& ec, int signal_number)
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d,signal_number=%d\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|>%llu|ec=%.20s:%d,signal_number=%d\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- id_, ec.category().name(), ec.value(), signal_number);
-
- invoked_ = true;
-}
-
-void handler_tracking::completion::invocation_begin(
- const boost::system::error_code& ec, const char* arg)
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d,%.50s\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|>%llu|ec=%.20s:%d,%.50s\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- id_, ec.category().name(), ec.value(), arg);
-
- invoked_ = true;
-}
-
-void handler_tracking::completion::invocation_end()
-{
- if (id_)
- {
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|<%I64u|\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|<%llu|\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds, id_);
-
- id_ = 0;
- }
-}
-
-void handler_tracking::operation(execution_context&,
- const char* object_type, void* object,
- uintmax_t /*native_handle*/, const char* op_name)
-{
- static tracking_state* state = get_state();
-
- handler_tracking_timestamp timestamp;
-
- unsigned long long current_id = 0;
- if (completion* current_completion = *state->current_completion_)
- current_id = current_completion->id_;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|%I64u|%.20s@%p.%.50s\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|%llu|%.20s@%p.%.50s\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- current_id, object_type, object, op_name);
-}
-
-void handler_tracking::reactor_registration(execution_context& /*context*/,
- uintmax_t /*native_handle*/, uintmax_t /*registration*/)
-{
-}
-
-void handler_tracking::reactor_deregistration(execution_context& /*context*/,
- uintmax_t /*native_handle*/, uintmax_t /*registration*/)
-{
-}
-
-void handler_tracking::reactor_events(execution_context& /*context*/,
- uintmax_t /*native_handle*/, unsigned /*events*/)
-{
-}
-
-void handler_tracking::reactor_operation(
- const tracked_handler& h, const char* op_name,
- const boost::system::error_code& ec)
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|.%I64u|%s,ec=%.20s:%d\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|.%llu|%s,ec=%.20s:%d\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- h.id_, op_name, ec.category().name(), ec.value());
-}
-
-void handler_tracking::reactor_operation(
- const tracked_handler& h, const char* op_name,
- const boost::system::error_code& ec, std::size_t bytes_transferred)
-{
- handler_tracking_timestamp timestamp;
-
- write_line(
-#if defined(BOOST_ASIO_WINDOWS)
- "@asio|%I64u.%06I64u|.%I64u|%s,ec=%.20s:%d,bytes_transferred=%I64u\n",
-#else // defined(BOOST_ASIO_WINDOWS)
- "@asio|%llu.%06llu|.%llu|%s,ec=%.20s:%d,bytes_transferred=%llu\n",
-#endif // defined(BOOST_ASIO_WINDOWS)
- timestamp.seconds, timestamp.microseconds,
- h.id_, op_name, ec.category().name(), ec.value(),
- static_cast<uint64_t>(bytes_transferred));
-}
-
-void handler_tracking::write_line(const char* format, ...)
-{
- using namespace std; // For sprintf (or equivalent).
-
- va_list args;
- va_start(args, format);
-
- char line[256] = "";
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- int length = vsprintf_s(line, sizeof(line), format, args);
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- int length = vsprintf(line, format, args);
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
-
- va_end(args);
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- wchar_t wline[256] = L"";
- mbstowcs_s(0, wline, sizeof(wline) / sizeof(wchar_t), line, length);
- ::OutputDebugStringW(wline);
-#elif defined(BOOST_ASIO_WINDOWS)
- HANDLE stderr_handle = ::GetStdHandle(STD_ERROR_HANDLE);
- DWORD bytes_written = 0;
- ::WriteFile(stderr_handle, line, length, &bytes_written, 0);
-#else // defined(BOOST_ASIO_WINDOWS)
- ::write(STDERR_FILENO, line, length);
-#endif // defined(BOOST_ASIO_WINDOWS)
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_HANDLER_TRACKING_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp
deleted file mode 100644
index 4d79ba5d7ca..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// detail/impl/kqueue_reactor.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2005 Stefan Arentz (stefan at soze 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_IMPL_KQUEUE_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_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_KQUEUE)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-void kqueue_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_add_timer_queue(queue);
-}
-
-// Remove a timer queue from the reactor.
-template <typename Time_Traits>
-void kqueue_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_remove_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void kqueue_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
-{
- mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- scheduler_.post_immediate_completion(op, false);
- return;
- }
-
- bool earliest = queue.enqueue_timer(time, timer, op);
- scheduler_.work_started();
- if (earliest)
- interrupt();
-}
-
-template <typename Time_Traits>
-std::size_t kqueue_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled)
-{
- mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
- return n;
-}
-
-template <typename Time_Traits>
-void kqueue_reactor::move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source)
-{
- mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- queue.cancel_timer(target, ops);
- queue.move_timer(target, source);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_KQUEUE)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp
deleted file mode 100644
index 9069ae44424..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp
+++ /dev/null
@@ -1,568 +0,0 @@
-//
-// detail/impl/kqueue_reactor.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2005 Stefan Arentz (stefan at soze 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_IMPL_KQUEUE_REACTOR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_IPP
-
-#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_KQUEUE)
-
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/scheduler.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-#if defined(__NetBSD__)
-# define BOOST_ASIO_KQUEUE_EV_SET(ev, ident, filt, flags, fflags, data, udata) \
- EV_SET(ev, ident, filt, flags, fflags, data, \
- reinterpret_cast<intptr_t>(static_cast<void*>(udata)))
-#else
-# define BOOST_ASIO_KQUEUE_EV_SET(ev, ident, filt, flags, fflags, data, udata) \
- EV_SET(ev, ident, filt, flags, fflags, data, udata)
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-kqueue_reactor::kqueue_reactor(boost::asio::execution_context& ctx)
- : execution_context_service_base<kqueue_reactor>(ctx),
- scheduler_(use_service<scheduler>(ctx)),
- mutex_(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
- kqueue_fd_(do_kqueue_create()),
- interrupter_(),
- shutdown_(false),
- registered_descriptors_mutex_(mutex_.enabled())
-{
- struct kevent events[1];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], interrupter_.read_descriptor(),
- EVFILT_READ, EV_ADD, 0, 0, &interrupter_);
- if (::kevent(kqueue_fd_, events, 1, 0, 0, 0) == -1)
- {
- boost::system::error_code error(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(error);
- }
-}
-
-kqueue_reactor::~kqueue_reactor()
-{
- close(kqueue_fd_);
-}
-
-void kqueue_reactor::shutdown()
-{
- mutex::scoped_lock lock(mutex_);
- shutdown_ = true;
- lock.unlock();
-
- op_queue<operation> ops;
-
- while (descriptor_state* state = registered_descriptors_.first())
- {
- for (int i = 0; i < max_ops; ++i)
- ops.push(state->op_queue_[i]);
- state->shutdown_ = true;
- registered_descriptors_.free(state);
- }
-
- timer_queues_.get_all_timers(ops);
-
- scheduler_.abandon_operations(ops);
-}
-
-void kqueue_reactor::notify_fork(
- boost::asio::execution_context::fork_event fork_ev)
-{
- if (fork_ev == boost::asio::execution_context::fork_child)
- {
- // The kqueue descriptor is automatically closed in the child.
- kqueue_fd_ = -1;
- kqueue_fd_ = do_kqueue_create();
-
- interrupter_.recreate();
-
- struct kevent events[2];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], interrupter_.read_descriptor(),
- EVFILT_READ, EV_ADD, 0, 0, &interrupter_);
- if (::kevent(kqueue_fd_, events, 1, 0, 0, 0) == -1)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "kqueue interrupter registration");
- }
-
- // Re-register all descriptors with kqueue.
- mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- for (descriptor_state* state = registered_descriptors_.first();
- state != 0; state = state->next_)
- {
- if (state->num_kevents_ > 0)
- {
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], state->descriptor_,
- EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, state);
- BOOST_ASIO_KQUEUE_EV_SET(&events[1], state->descriptor_,
- EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, state);
- if (::kevent(kqueue_fd_, events, state->num_kevents_, 0, 0, 0) == -1)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "kqueue re-registration");
- }
- }
- }
- }
-}
-
-void kqueue_reactor::init_task()
-{
- scheduler_.init_task();
-}
-
-int kqueue_reactor::register_descriptor(socket_type descriptor,
- kqueue_reactor::per_descriptor_data& descriptor_data)
-{
- descriptor_data = allocate_descriptor_state();
-
- BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- mutex::scoped_lock lock(descriptor_data->mutex_);
-
- descriptor_data->descriptor_ = descriptor;
- descriptor_data->num_kevents_ = 0;
- descriptor_data->shutdown_ = false;
-
- return 0;
-}
-
-int kqueue_reactor::register_internal_descriptor(
- int op_type, socket_type descriptor,
- kqueue_reactor::per_descriptor_data& descriptor_data, reactor_op* op)
-{
- descriptor_data = allocate_descriptor_state();
-
- BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- mutex::scoped_lock lock(descriptor_data->mutex_);
-
- descriptor_data->descriptor_ = descriptor;
- descriptor_data->num_kevents_ = 1;
- descriptor_data->shutdown_ = false;
- descriptor_data->op_queue_[op_type].push(op);
-
- struct kevent events[1];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor, EVFILT_READ,
- EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
- if (::kevent(kqueue_fd_, events, 1, 0, 0, 0) == -1)
- return errno;
-
- return 0;
-}
-
-void kqueue_reactor::move_descriptor(socket_type,
- kqueue_reactor::per_descriptor_data& target_descriptor_data,
- kqueue_reactor::per_descriptor_data& source_descriptor_data)
-{
- target_descriptor_data = source_descriptor_data;
- source_descriptor_data = 0;
-}
-
-void kqueue_reactor::start_op(int op_type, socket_type descriptor,
- kqueue_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative)
-{
- if (!descriptor_data)
- {
- op->ec_ = boost::asio::error::bad_descriptor;
- post_immediate_completion(op, is_continuation);
- return;
- }
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (descriptor_data->shutdown_)
- {
- post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (descriptor_data->op_queue_[op_type].empty())
- {
- static const int num_kevents[max_ops] = { 1, 2, 1 };
-
- if (allow_speculative
- && (op_type != read_op
- || descriptor_data->op_queue_[except_op].empty()))
- {
- if (op->perform())
- {
- descriptor_lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (descriptor_data->num_kevents_ < num_kevents[op_type])
- {
- struct kevent events[2];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor, EVFILT_READ,
- EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
- BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor, EVFILT_WRITE,
- EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
- if (::kevent(kqueue_fd_, events, num_kevents[op_type], 0, 0, 0) != -1)
- {
- descriptor_data->num_kevents_ = num_kevents[op_type];
- }
- else
- {
- op->ec_ = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
- scheduler_.post_immediate_completion(op, is_continuation);
- return;
- }
- }
- }
- else
- {
- if (descriptor_data->num_kevents_ < num_kevents[op_type])
- descriptor_data->num_kevents_ = num_kevents[op_type];
-
- struct kevent events[2];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor, EVFILT_READ,
- EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
- BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor, EVFILT_WRITE,
- EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
- ::kevent(kqueue_fd_, events, descriptor_data->num_kevents_, 0, 0, 0);
- }
- }
-
- descriptor_data->op_queue_[op_type].push(op);
- scheduler_.work_started();
-}
-
-void kqueue_reactor::cancel_ops(socket_type,
- kqueue_reactor::per_descriptor_data& descriptor_data)
-{
- if (!descriptor_data)
- return;
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- {
- while (reactor_op* op = descriptor_data->op_queue_[i].front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- descriptor_data->op_queue_[i].pop();
- ops.push(op);
- }
- }
-
- descriptor_lock.unlock();
-
- scheduler_.post_deferred_completions(ops);
-}
-
-void kqueue_reactor::deregister_descriptor(socket_type descriptor,
- kqueue_reactor::per_descriptor_data& descriptor_data, bool closing)
-{
- if (!descriptor_data)
- return;
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (!descriptor_data->shutdown_)
- {
- if (closing)
- {
- // The descriptor will be automatically removed from the kqueue when it
- // is closed.
- }
- else
- {
- struct kevent events[2];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor,
- EVFILT_READ, EV_DELETE, 0, 0, 0);
- BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor,
- EVFILT_WRITE, EV_DELETE, 0, 0, 0);
- ::kevent(kqueue_fd_, events, descriptor_data->num_kevents_, 0, 0, 0);
- }
-
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- {
- while (reactor_op* op = descriptor_data->op_queue_[i].front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- descriptor_data->op_queue_[i].pop();
- ops.push(op);
- }
- }
-
- descriptor_data->descriptor_ = -1;
- descriptor_data->shutdown_ = true;
-
- descriptor_lock.unlock();
-
- BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- scheduler_.post_deferred_completions(ops);
-
- // Leave descriptor_data set so that it will be freed by the subsequent
- // call to cleanup_descriptor_data.
- }
- else
- {
- // We are shutting down, so prevent cleanup_descriptor_data from freeing
- // the descriptor_data object and let the destructor free it instead.
- descriptor_data = 0;
- }
-}
-
-void kqueue_reactor::deregister_internal_descriptor(socket_type descriptor,
- kqueue_reactor::per_descriptor_data& descriptor_data)
-{
- if (!descriptor_data)
- return;
-
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (!descriptor_data->shutdown_)
- {
- struct kevent events[2];
- BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor,
- EVFILT_READ, EV_DELETE, 0, 0, 0);
- BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor,
- EVFILT_WRITE, EV_DELETE, 0, 0, 0);
- ::kevent(kqueue_fd_, events, descriptor_data->num_kevents_, 0, 0, 0);
-
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- ops.push(descriptor_data->op_queue_[i]);
-
- descriptor_data->descriptor_ = -1;
- descriptor_data->shutdown_ = true;
-
- descriptor_lock.unlock();
-
- BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
- context(), static_cast<uintmax_t>(descriptor),
- reinterpret_cast<uintmax_t>(descriptor_data)));
-
- // Leave descriptor_data set so that it will be freed by the subsequent
- // call to cleanup_descriptor_data.
- }
- else
- {
- // We are shutting down, so prevent cleanup_descriptor_data from freeing
- // the descriptor_data object and let the destructor free it instead.
- descriptor_data = 0;
- }
-}
-
-void kqueue_reactor::cleanup_descriptor_data(
- per_descriptor_data& descriptor_data)
-{
- if (descriptor_data)
- {
- free_descriptor_state(descriptor_data);
- descriptor_data = 0;
- }
-}
-
-void kqueue_reactor::run(long usec, op_queue<operation>& ops)
-{
- mutex::scoped_lock lock(mutex_);
-
- // Determine how long to block while waiting for events.
- timespec timeout_buf = { 0, 0 };
- timespec* timeout = usec ? get_timeout(usec, timeout_buf) : &timeout_buf;
-
- lock.unlock();
-
- // Block on the kqueue descriptor.
- struct kevent events[128];
- int num_events = kevent(kqueue_fd_, 0, 0, events, 128, timeout);
-
-#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
- // Trace the waiting events.
- for (int i = 0; i < num_events; ++i)
- {
- void* ptr = reinterpret_cast<void*>(events[i].udata);
- if (ptr != &interrupter_)
- {
- unsigned event_mask = 0;
- switch (events[i].filter)
- {
- case EVFILT_READ:
- event_mask |= BOOST_ASIO_HANDLER_REACTOR_READ_EVENT;
- break;
- case EVFILT_WRITE:
- event_mask |= BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT;
- break;
- }
- if ((events[i].flags & (EV_ERROR | EV_OOBAND)) != 0)
- event_mask |= BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT;
- BOOST_ASIO_HANDLER_REACTOR_EVENTS((context(),
- reinterpret_cast<uintmax_t>(ptr), event_mask));
- }
- }
-#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
-
- // Dispatch the waiting events.
- for (int i = 0; i < num_events; ++i)
- {
- void* ptr = reinterpret_cast<void*>(events[i].udata);
- if (ptr == &interrupter_)
- {
- interrupter_.reset();
- }
- else
- {
- descriptor_state* descriptor_data = static_cast<descriptor_state*>(ptr);
- mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
-
- if (events[i].filter == EVFILT_WRITE
- && descriptor_data->num_kevents_ == 2
- && descriptor_data->op_queue_[write_op].empty())
- {
- // Some descriptor types, like serial ports, don't seem to support
- // EV_CLEAR with EVFILT_WRITE. Since we have no pending write
- // operations we'll remove the EVFILT_WRITE registration here so that
- // we don't end up in a tight spin.
- struct kevent delete_events[1];
- BOOST_ASIO_KQUEUE_EV_SET(&delete_events[0],
- descriptor_data->descriptor_, EVFILT_WRITE, EV_DELETE, 0, 0, 0);
- ::kevent(kqueue_fd_, delete_events, 1, 0, 0, 0);
- descriptor_data->num_kevents_ = 1;
- }
-
- // Exception operations must be processed first to ensure that any
- // out-of-band data is read before normal data.
-#if defined(__NetBSD__)
- static const unsigned int filter[max_ops] =
-#else
- static const int filter[max_ops] =
-#endif
- { EVFILT_READ, EVFILT_WRITE, EVFILT_READ };
- for (int j = max_ops - 1; j >= 0; --j)
- {
- if (events[i].filter == filter[j])
- {
- if (j != except_op || events[i].flags & EV_OOBAND)
- {
- while (reactor_op* op = descriptor_data->op_queue_[j].front())
- {
- if (events[i].flags & EV_ERROR)
- {
- op->ec_ = boost::system::error_code(
- static_cast<int>(events[i].data),
- boost::asio::error::get_system_category());
- descriptor_data->op_queue_[j].pop();
- ops.push(op);
- }
- if (op->perform())
- {
- descriptor_data->op_queue_[j].pop();
- ops.push(op);
- }
- else
- break;
- }
- }
- }
- }
- }
- }
-
- lock.lock();
- timer_queues_.get_ready_timers(ops);
-}
-
-void kqueue_reactor::interrupt()
-{
- interrupter_.interrupt();
-}
-
-int kqueue_reactor::do_kqueue_create()
-{
- int fd = ::kqueue();
- if (fd == -1)
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "kqueue");
- }
- return fd;
-}
-
-kqueue_reactor::descriptor_state* kqueue_reactor::allocate_descriptor_state()
-{
- mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- return registered_descriptors_.alloc(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- REACTOR_IO, scheduler_.concurrency_hint()));
-}
-
-void kqueue_reactor::free_descriptor_state(kqueue_reactor::descriptor_state* s)
-{
- mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- registered_descriptors_.free(s);
-}
-
-void kqueue_reactor::do_add_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.insert(&queue);
-}
-
-void kqueue_reactor::do_remove_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.erase(&queue);
-}
-
-timespec* kqueue_reactor::get_timeout(long usec, timespec& ts)
-{
- // By default we will wait no longer than 5 minutes. This will ensure that
- // any changes to the system clock are detected after no longer than this.
- const long max_usec = 5 * 60 * 1000 * 1000;
- usec = timer_queues_.wait_duration_usec(
- (usec < 0 || max_usec < usec) ? max_usec : usec);
- ts.tv_sec = usec / 1000000;
- ts.tv_nsec = (usec % 1000000) * 1000;
- return &ts;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#undef BOOST_ASIO_KQUEUE_EV_SET
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_KQUEUE)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp
deleted file mode 100644
index 19bab80b33e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// detail/impl/null_event.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_IMPL_NULL_EVENT_IPP
-#define BOOST_ASIO_DETAIL_IMPL_NULL_EVENT_IPP
-
-#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_WINDOWS_RUNTIME)
-# include <thread>
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# include <boost/asio/detail/socket_types.hpp>
-#else
-# include <unistd.h>
-# if defined(__hpux)
-# include <sys/time.h>
-# endif
-# if !defined(__hpux) || defined(__SELECT)
-# include <sys/select.h>
-# endif
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-void null_event::do_wait()
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- std::this_thread::sleep_until((std::chrono::steady_clock::time_point::max)());
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ::Sleep(INFINITE);
-#else
- ::pause();
-#endif
-}
-
-void null_event::do_wait_for_usec(long usec)
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- std::this_thread::sleep_for(std::chrono::microseconds(usec));
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ::Sleep(usec / 1000);
-#elif defined(__hpux) && defined(__SELECT)
- timespec ts;
- ts.tv_sec = usec / 1000000;
- ts.tv_nsec = (usec % 1000000) * 1000;
- ::pselect(0, 0, 0, 0, &ts, 0);
-#else
- timeval tv;
- tv.tv_sec = usec / 1000000;
- tv.tv_usec = usec % 1000000;
- ::select(0, 0, 0, 0, &tv);
-#endif
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_NULL_EVENT_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index bfff076747f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/pipe_select_interrupter.ipp
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// detail/impl/pipe_select_interrupter.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_IMPL_PIPE_SELECT_INTERRUPTER_IPP
-#define BOOST_ASIO_DETAIL_IMPL_PIPE_SELECT_INTERRUPTER_IPP
-
-#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_WINDOWS_RUNTIME)
-#if !defined(BOOST_ASIO_WINDOWS)
-#if !defined(__CYGWIN__)
-#if !defined(__SYMBIAN32__)
-#if !defined(BOOST_ASIO_HAS_EVENTFD)
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <boost/asio/detail/pipe_select_interrupter.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-pipe_select_interrupter::pipe_select_interrupter()
-{
- open_descriptors();
-}
-
-void pipe_select_interrupter::open_descriptors()
-{
- int pipe_fds[2];
- if (pipe(pipe_fds) == 0)
- {
- read_descriptor_ = pipe_fds[0];
- ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
- write_descriptor_ = pipe_fds[1];
- ::fcntl(write_descriptor_, F_SETFL, O_NONBLOCK);
-
-#if defined(FD_CLOEXEC)
- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
- ::fcntl(write_descriptor_, F_SETFD, FD_CLOEXEC);
-#endif // defined(FD_CLOEXEC)
- }
- else
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "pipe_select_interrupter");
- }
-}
-
-pipe_select_interrupter::~pipe_select_interrupter()
-{
- close_descriptors();
-}
-
-void pipe_select_interrupter::close_descriptors()
-{
- if (read_descriptor_ != -1)
- ::close(read_descriptor_);
- if (write_descriptor_ != -1)
- ::close(write_descriptor_);
-}
-
-void pipe_select_interrupter::recreate()
-{
- close_descriptors();
-
- write_descriptor_ = -1;
- read_descriptor_ = -1;
-
- open_descriptors();
-}
-
-void pipe_select_interrupter::interrupt()
-{
- char byte = 0;
- signed_size_type result = ::write(write_descriptor_, &byte, 1);
- (void)result;
-}
-
-bool pipe_select_interrupter::reset()
-{
- for (;;)
- {
- char data[1024];
- signed_size_type bytes_read = ::read(read_descriptor_, data, sizeof(data));
- if (bytes_read < 0 && errno == EINTR)
- continue;
- bool was_interrupted = (bytes_read > 0);
- while (bytes_read == sizeof(data))
- bytes_read = ::read(read_descriptor_, data, sizeof(data));
- return was_interrupted;
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_EVENTFD)
-#endif // !defined(__SYMBIAN32__)
-#endif // !defined(__CYGWIN__)
-#endif // !defined(BOOST_ASIO_WINDOWS)
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_PIPE_SELECT_INTERRUPTER_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp
deleted file mode 100644
index 6f096bc08e4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// detail/impl/posix_event.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_IMPL_POSIX_EVENT_IPP
-#define BOOST_ASIO_DETAIL_IMPL_POSIX_EVENT_IPP
-
-#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_PTHREADS)
-
-#include <boost/asio/detail/posix_event.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-posix_event::posix_event()
- : state_(0)
-{
-#if (defined(__MACH__) && defined(__APPLE__)) \
- || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
- int error = ::pthread_cond_init(&cond_, 0);
-#else // (defined(__MACH__) && defined(__APPLE__))
- // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
- ::pthread_condattr_t attr;
- ::pthread_condattr_init(&attr);
- int error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
- if (error == 0)
- error = ::pthread_cond_init(&cond_, &attr);
-#endif // (defined(__MACH__) && defined(__APPLE__))
- // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
-
- boost::system::error_code ec(error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "event");
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_EVENT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp
deleted file mode 100644
index 57564714a14..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// detail/impl/posix_mutex.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_IMPL_POSIX_MUTEX_IPP
-#define BOOST_ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP
-
-#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_PTHREADS)
-
-#include <boost/asio/detail/posix_mutex.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-posix_mutex::posix_mutex()
-{
- int error = ::pthread_mutex_init(&mutex_, 0);
- boost::system::error_code ec(error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "mutex");
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp
deleted file mode 100644
index c2ee8efef72..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// detail/impl/posix_thread.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_IMPL_POSIX_THREAD_IPP
-#define BOOST_ASIO_DETAIL_IMPL_POSIX_THREAD_IPP
-
-#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_PTHREADS)
-
-#include <boost/asio/detail/posix_thread.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-posix_thread::~posix_thread()
-{
- if (!joined_)
- ::pthread_detach(thread_);
-}
-
-void posix_thread::join()
-{
- if (!joined_)
- {
- ::pthread_join(thread_, 0);
- joined_ = true;
- }
-}
-
-std::size_t posix_thread::hardware_concurrency()
-{
-#if defined(_SC_NPROCESSORS_ONLN)
- long result = sysconf(_SC_NPROCESSORS_ONLN);
- if (result > 0)
- return result;
-#endif // defined(_SC_NPROCESSORS_ONLN)
- return 0;
-}
-
-void posix_thread::start_thread(func_base* arg)
-{
- int error = ::pthread_create(&thread_, 0,
- boost_asio_detail_posix_thread_function, arg);
- if (error != 0)
- {
- delete arg;
- boost::system::error_code ec(error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread");
- }
-}
-
-void* boost_asio_detail_posix_thread_function(void* arg)
-{
- posix_thread::auto_func_base_ptr func = {
- static_cast<posix_thread::func_base*>(arg) };
- func.ptr->run();
- return 0;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_THREAD_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index a40f3f81a62..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_tss_ptr.ipp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// detail/impl/posix_tss_ptr.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_IMPL_POSIX_TSS_PTR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP
-
-#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_PTHREADS)
-
-#include <boost/asio/detail/posix_tss_ptr.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-void posix_tss_ptr_create(pthread_key_t& key)
-{
- int error = ::pthread_key_create(&key, 0);
- boost::system::error_code ec(error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "tss");
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 735239c597e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_descriptor_service.ipp
+++ /dev/null
@@ -1,224 +0,0 @@
-//
-// detail/impl/reactive_descriptor_service.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_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
-
-#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_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/reactive_descriptor_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-reactive_descriptor_service::reactive_descriptor_service(
- boost::asio::io_context& io_context)
- : service_base<reactive_descriptor_service>(io_context),
- reactor_(boost::asio::use_service<reactor>(io_context))
-{
- reactor_.init_task();
-}
-
-void reactive_descriptor_service::shutdown()
-{
-}
-
-void reactive_descriptor_service::construct(
- reactive_descriptor_service::implementation_type& impl)
-{
- impl.descriptor_ = -1;
- impl.state_ = 0;
-}
-
-void reactive_descriptor_service::move_construct(
- reactive_descriptor_service::implementation_type& impl,
- reactive_descriptor_service::implementation_type& other_impl)
-{
- impl.descriptor_ = other_impl.descriptor_;
- other_impl.descriptor_ = -1;
-
- impl.state_ = other_impl.state_;
- other_impl.state_ = 0;
-
- reactor_.move_descriptor(impl.descriptor_,
- impl.reactor_data_, other_impl.reactor_data_);
-}
-
-void reactive_descriptor_service::move_assign(
- reactive_descriptor_service::implementation_type& impl,
- reactive_descriptor_service& other_service,
- reactive_descriptor_service::implementation_type& other_impl)
-{
- destroy(impl);
-
- impl.descriptor_ = other_impl.descriptor_;
- other_impl.descriptor_ = -1;
-
- impl.state_ = other_impl.state_;
- other_impl.state_ = 0;
-
- other_service.reactor_.move_descriptor(impl.descriptor_,
- impl.reactor_data_, other_impl.reactor_data_);
-}
-
-void reactive_descriptor_service::destroy(
- reactive_descriptor_service::implementation_type& impl)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "descriptor", &impl, impl.descriptor_, "close"));
-
- reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
- (impl.state_ & descriptor_ops::possible_dup) == 0);
-
- boost::system::error_code ignored_ec;
- descriptor_ops::close(impl.descriptor_, impl.state_, ignored_ec);
-
- reactor_.cleanup_descriptor_data(impl.reactor_data_);
- }
-}
-
-boost::system::error_code reactive_descriptor_service::assign(
- reactive_descriptor_service::implementation_type& impl,
- const native_handle_type& native_descriptor, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- if (int err = reactor_.register_descriptor(
- native_descriptor, impl.reactor_data_))
- {
- ec = boost::system::error_code(err,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- impl.descriptor_ = native_descriptor;
- impl.state_ = descriptor_ops::possible_dup;
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code reactive_descriptor_service::close(
- reactive_descriptor_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "descriptor", &impl, impl.descriptor_, "close"));
-
- reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
- (impl.state_ & descriptor_ops::possible_dup) == 0);
-
- descriptor_ops::close(impl.descriptor_, impl.state_, ec);
-
- reactor_.cleanup_descriptor_data(impl.reactor_data_);
- }
- else
- {
- ec = boost::system::error_code();
- }
-
- // The descriptor is closed by the OS even if close() returns an error.
- //
- // (Actually, POSIX says the state of the descriptor is unspecified. On
- // Linux the descriptor is apparently closed anyway; e.g. see
- // http://lkml.org/lkml/2005/9/10/129
- // We'll just have to assume that other OSes follow the same behaviour.)
- construct(impl);
-
- return ec;
-}
-
-reactive_descriptor_service::native_handle_type
-reactive_descriptor_service::release(
- reactive_descriptor_service::implementation_type& impl)
-{
- native_handle_type descriptor = impl.descriptor_;
-
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "descriptor", &impl, impl.descriptor_, "release"));
-
- reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_, false);
- reactor_.cleanup_descriptor_data(impl.reactor_data_);
- construct(impl);
- }
-
- return descriptor;
-}
-
-boost::system::error_code reactive_descriptor_service::cancel(
- reactive_descriptor_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return ec;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "descriptor", &impl, impl.descriptor_, "cancel"));
-
- reactor_.cancel_ops(impl.descriptor_, impl.reactor_data_);
- ec = boost::system::error_code();
- return ec;
-}
-
-void reactive_descriptor_service::start_op(
- reactive_descriptor_service::implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool is_non_blocking, bool noop)
-{
- if (!noop)
- {
- if ((impl.state_ & descriptor_ops::non_blocking) ||
- descriptor_ops::set_internal_non_blocking(
- impl.descriptor_, impl.state_, true, op->ec_))
- {
- reactor_.start_op(op_type, impl.descriptor_,
- impl.reactor_data_, op, is_continuation, is_non_blocking);
- return;
- }
- }
-
- reactor_.post_immediate_completion(op, is_continuation);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index c1ff4618308..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_serial_port_service.ipp
+++ /dev/null
@@ -1,154 +0,0 @@
-//
-// detail/impl/reactive_serial_port_service.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
-
-#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_SERIAL_PORT)
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#include <cstring>
-#include <boost/asio/detail/reactive_serial_port_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-reactive_serial_port_service::reactive_serial_port_service(
- boost::asio::io_context& io_context)
- : service_base<reactive_serial_port_service>(io_context),
- descriptor_service_(io_context)
-{
-}
-
-void reactive_serial_port_service::shutdown()
-{
- descriptor_service_.shutdown();
-}
-
-boost::system::error_code reactive_serial_port_service::open(
- reactive_serial_port_service::implementation_type& impl,
- const std::string& device, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- descriptor_ops::state_type state = 0;
- int fd = descriptor_ops::open(device.c_str(),
- O_RDWR | O_NONBLOCK | O_NOCTTY, ec);
- if (fd < 0)
- return ec;
-
- int s = descriptor_ops::fcntl(fd, F_GETFL, ec);
- if (s >= 0)
- s = descriptor_ops::fcntl(fd, F_SETFL, s | O_NONBLOCK, ec);
- if (s < 0)
- {
- boost::system::error_code ignored_ec;
- descriptor_ops::close(fd, state, ignored_ec);
- return ec;
- }
-
- // Set up default serial port options.
- termios ios;
- errno = 0;
- s = descriptor_ops::error_wrapper(::tcgetattr(fd, &ios), ec);
- if (s >= 0)
- {
-#if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
- ::cfmakeraw(&ios);
-#else
- ios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK
- | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
- ios.c_oflag &= ~OPOST;
- ios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
- ios.c_cflag &= ~(CSIZE | PARENB);
- ios.c_cflag |= CS8;
-#endif
- ios.c_iflag |= IGNPAR;
- ios.c_cflag |= CREAD | CLOCAL;
- errno = 0;
- s = descriptor_ops::error_wrapper(::tcsetattr(fd, TCSANOW, &ios), ec);
- }
- if (s < 0)
- {
- boost::system::error_code ignored_ec;
- descriptor_ops::close(fd, state, ignored_ec);
- return ec;
- }
-
- // We're done. Take ownership of the serial port descriptor.
- if (descriptor_service_.assign(impl, fd, ec))
- {
- boost::system::error_code ignored_ec;
- descriptor_ops::close(fd, state, ignored_ec);
- }
-
- return ec;
-}
-
-boost::system::error_code reactive_serial_port_service::do_set_option(
- reactive_serial_port_service::implementation_type& impl,
- reactive_serial_port_service::store_function_type store,
- const void* option, boost::system::error_code& ec)
-{
- termios ios;
- errno = 0;
- descriptor_ops::error_wrapper(::tcgetattr(
- descriptor_service_.native_handle(impl), &ios), ec);
- if (ec)
- return ec;
-
- if (store(option, ios, ec))
- return ec;
-
- errno = 0;
- descriptor_ops::error_wrapper(::tcsetattr(
- descriptor_service_.native_handle(impl), TCSANOW, &ios), ec);
- return ec;
-}
-
-boost::system::error_code reactive_serial_port_service::do_get_option(
- const reactive_serial_port_service::implementation_type& impl,
- reactive_serial_port_service::load_function_type load,
- void* option, boost::system::error_code& ec) const
-{
- termios ios;
- errno = 0;
- descriptor_ops::error_wrapper(::tcgetattr(
- descriptor_service_.native_handle(impl), &ios), ec);
- if (ec)
- return ec;
-
- return load(option, ios, ec);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 6fdf437c1d0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_socket_service_base.ipp
+++ /dev/null
@@ -1,302 +0,0 @@
-//
-// detail/reactive_socket_service_base.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_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
-
-#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_IOCP) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/reactive_socket_service_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-reactive_socket_service_base::reactive_socket_service_base(
- boost::asio::io_context& io_context)
- : io_context_(io_context),
- reactor_(use_service<reactor>(io_context))
-{
- reactor_.init_task();
-}
-
-void reactive_socket_service_base::base_shutdown()
-{
-}
-
-void reactive_socket_service_base::construct(
- reactive_socket_service_base::base_implementation_type& impl)
-{
- impl.socket_ = invalid_socket;
- impl.state_ = 0;
-}
-
-void reactive_socket_service_base::base_move_construct(
- reactive_socket_service_base::base_implementation_type& impl,
- reactive_socket_service_base::base_implementation_type& other_impl)
-{
- impl.socket_ = other_impl.socket_;
- other_impl.socket_ = invalid_socket;
-
- impl.state_ = other_impl.state_;
- other_impl.state_ = 0;
-
- reactor_.move_descriptor(impl.socket_,
- impl.reactor_data_, other_impl.reactor_data_);
-}
-
-void reactive_socket_service_base::base_move_assign(
- reactive_socket_service_base::base_implementation_type& impl,
- reactive_socket_service_base& other_service,
- reactive_socket_service_base::base_implementation_type& other_impl)
-{
- destroy(impl);
-
- impl.socket_ = other_impl.socket_;
- other_impl.socket_ = invalid_socket;
-
- impl.state_ = other_impl.state_;
- other_impl.state_ = 0;
-
- other_service.reactor_.move_descriptor(impl.socket_,
- impl.reactor_data_, other_impl.reactor_data_);
-}
-
-void reactive_socket_service_base::destroy(
- reactive_socket_service_base::base_implementation_type& impl)
-{
- if (impl.socket_ != invalid_socket)
- {
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "socket", &impl, impl.socket_, "close"));
-
- reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
- (impl.state_ & socket_ops::possible_dup) == 0);
-
- boost::system::error_code ignored_ec;
- socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
-
- reactor_.cleanup_descriptor_data(impl.reactor_data_);
- }
-}
-
-boost::system::error_code reactive_socket_service_base::close(
- reactive_socket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "socket", &impl, impl.socket_, "close"));
-
- reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
- (impl.state_ & socket_ops::possible_dup) == 0);
-
- socket_ops::close(impl.socket_, impl.state_, false, ec);
-
- reactor_.cleanup_descriptor_data(impl.reactor_data_);
- }
- else
- {
- ec = boost::system::error_code();
- }
-
- // The descriptor is closed by the OS even if close() returns an error.
- //
- // (Actually, POSIX says the state of the descriptor is unspecified. On
- // Linux the descriptor is apparently closed anyway; e.g. see
- // http://lkml.org/lkml/2005/9/10/129
- // We'll just have to assume that other OSes follow the same behaviour. The
- // known exception is when Windows's closesocket() function fails with
- // WSAEWOULDBLOCK, but this case is handled inside socket_ops::close().
- construct(impl);
-
- return ec;
-}
-
-socket_type reactive_socket_service_base::release(
- reactive_socket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return invalid_socket;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "socket", &impl, impl.socket_, "release"));
-
- reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_, false);
- reactor_.cleanup_descriptor_data(impl.reactor_data_);
- socket_type sock = impl.socket_;
- construct(impl);
- ec = boost::system::error_code();
- return sock;
-}
-
-boost::system::error_code reactive_socket_service_base::cancel(
- reactive_socket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return ec;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
- "socket", &impl, impl.socket_, "cancel"));
-
- reactor_.cancel_ops(impl.socket_, impl.reactor_data_);
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code reactive_socket_service_base::do_open(
- reactive_socket_service_base::base_implementation_type& impl,
- int af, int type, int protocol, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- socket_holder sock(socket_ops::socket(af, type, protocol, ec));
- if (sock.get() == invalid_socket)
- return ec;
-
- if (int err = reactor_.register_descriptor(sock.get(), impl.reactor_data_))
- {
- ec = boost::system::error_code(err,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- impl.socket_ = sock.release();
- switch (type)
- {
- case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
- case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
- default: impl.state_ = 0; break;
- }
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code reactive_socket_service_base::do_assign(
- reactive_socket_service_base::base_implementation_type& impl, int type,
- const reactive_socket_service_base::native_handle_type& native_socket,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- if (int err = reactor_.register_descriptor(
- native_socket, impl.reactor_data_))
- {
- ec = boost::system::error_code(err,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- impl.socket_ = native_socket;
- switch (type)
- {
- case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
- case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
- default: impl.state_ = 0; break;
- }
- impl.state_ |= socket_ops::possible_dup;
- ec = boost::system::error_code();
- return ec;
-}
-
-void reactive_socket_service_base::start_op(
- reactive_socket_service_base::base_implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool is_non_blocking, bool noop)
-{
- if (!noop)
- {
- if ((impl.state_ & socket_ops::non_blocking)
- || socket_ops::set_internal_non_blocking(
- impl.socket_, impl.state_, true, op->ec_))
- {
- reactor_.start_op(op_type, impl.socket_,
- impl.reactor_data_, op, is_continuation, is_non_blocking);
- return;
- }
- }
-
- reactor_.post_immediate_completion(op, is_continuation);
-}
-
-void reactive_socket_service_base::start_accept_op(
- reactive_socket_service_base::base_implementation_type& impl,
- reactor_op* op, bool is_continuation, bool peer_is_open)
-{
- if (!peer_is_open)
- start_op(impl, reactor::read_op, op, is_continuation, true, false);
- else
- {
- op->ec_ = boost::asio::error::already_open;
- reactor_.post_immediate_completion(op, is_continuation);
- }
-}
-
-void reactive_socket_service_base::start_connect_op(
- reactive_socket_service_base::base_implementation_type& impl,
- reactor_op* op, bool is_continuation,
- const socket_addr_type* addr, size_t addrlen)
-{
- if ((impl.state_ & socket_ops::non_blocking)
- || socket_ops::set_internal_non_blocking(
- impl.socket_, impl.state_, true, op->ec_))
- {
- if (socket_ops::connect(impl.socket_, addr, addrlen, op->ec_) != 0)
- {
- if (op->ec_ == boost::asio::error::in_progress
- || op->ec_ == boost::asio::error::would_block)
- {
- op->ec_ = boost::system::error_code();
- reactor_.start_op(reactor::connect_op, impl.socket_,
- impl.reactor_data_, op, is_continuation, false);
- return;
- }
- }
- }
-
- reactor_.post_immediate_completion(op, is_continuation);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_IOCP)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 144e2a17534..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/resolver_service_base.ipp
+++ /dev/null
@@ -1,156 +0,0 @@
-//
-// detail/impl/resolver_service_base.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_IMPL_RESOLVER_SERVICE_BASE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_RESOLVER_SERVICE_BASE_IPP
-
-#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/resolver_service_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class resolver_service_base::work_io_context_runner
-{
-public:
- work_io_context_runner(boost::asio::io_context& io_context)
- : io_context_(io_context) {}
- void operator()() { io_context_.run(); }
-private:
- boost::asio::io_context& io_context_;
-};
-
-resolver_service_base::resolver_service_base(
- boost::asio::io_context& io_context)
- : io_context_impl_(boost::asio::use_service<io_context_impl>(io_context)),
- work_io_context_(new boost::asio::io_context(-1)),
- work_io_context_impl_(boost::asio::use_service<
- io_context_impl>(*work_io_context_)),
- work_(boost::asio::make_work_guard(*work_io_context_)),
- work_thread_(0)
-{
-}
-
-resolver_service_base::~resolver_service_base()
-{
- base_shutdown();
-}
-
-void resolver_service_base::base_shutdown()
-{
- work_.reset();
- if (work_io_context_.get())
- {
- work_io_context_->stop();
- if (work_thread_.get())
- {
- work_thread_->join();
- work_thread_.reset();
- }
- work_io_context_.reset();
- }
-}
-
-void resolver_service_base::base_notify_fork(
- boost::asio::io_context::fork_event fork_ev)
-{
- if (work_thread_.get())
- {
- if (fork_ev == boost::asio::io_context::fork_prepare)
- {
- work_io_context_->stop();
- work_thread_->join();
- }
- else
- {
- work_io_context_->restart();
- work_thread_.reset(new boost::asio::detail::thread(
- work_io_context_runner(*work_io_context_)));
- }
- }
-}
-
-void resolver_service_base::construct(
- resolver_service_base::implementation_type& impl)
-{
- impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
-}
-
-void resolver_service_base::destroy(
- resolver_service_base::implementation_type& impl)
-{
- BOOST_ASIO_HANDLER_OPERATION((io_context_impl_.context(),
- "resolver", &impl, 0, "cancel"));
-
- impl.reset();
-}
-
-void resolver_service_base::move_construct(implementation_type& impl,
- implementation_type& other_impl)
-{
- impl = BOOST_ASIO_MOVE_CAST(implementation_type)(other_impl);
-}
-
-void resolver_service_base::move_assign(implementation_type& impl,
- resolver_service_base&, implementation_type& other_impl)
-{
- destroy(impl);
- impl = BOOST_ASIO_MOVE_CAST(implementation_type)(other_impl);
-}
-
-void resolver_service_base::cancel(
- resolver_service_base::implementation_type& impl)
-{
- BOOST_ASIO_HANDLER_OPERATION((io_context_impl_.context(),
- "resolver", &impl, 0, "cancel"));
-
- impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
-}
-
-void resolver_service_base::start_resolve_op(resolve_op* op)
-{
- if (BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
- io_context_impl_.concurrency_hint()))
- {
- start_work_thread();
- io_context_impl_.work_started();
- work_io_context_impl_.post_immediate_completion(op, false);
- }
- else
- {
- op->ec_ = boost::asio::error::operation_not_supported;
- io_context_impl_.post_immediate_completion(op, false);
- }
-}
-
-void resolver_service_base::start_work_thread()
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (!work_thread_.get())
- {
- work_thread_.reset(new boost::asio::detail::thread(
- work_io_context_runner(*work_io_context_)));
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_RESOLVER_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp
deleted file mode 100644
index 9dae6836cea..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp
+++ /dev/null
@@ -1,573 +0,0 @@
-//
-// detail/impl/scheduler.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_IMPL_SCHEDULER_IPP
-#define BOOST_ASIO_DETAIL_IMPL_SCHEDULER_IPP
-
-#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/concurrency_hint.hpp>
-#include <boost/asio/detail/event.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/reactor.hpp>
-#include <boost/asio/detail/scheduler.hpp>
-#include <boost/asio/detail/scheduler_thread_info.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct scheduler::task_cleanup
-{
- ~task_cleanup()
- {
- if (this_thread_->private_outstanding_work > 0)
- {
- boost::asio::detail::increment(
- scheduler_->outstanding_work_,
- this_thread_->private_outstanding_work);
- }
- this_thread_->private_outstanding_work = 0;
-
- // Enqueue the completed operations and reinsert the task at the end of
- // the operation queue.
- lock_->lock();
- scheduler_->task_interrupted_ = true;
- scheduler_->op_queue_.push(this_thread_->private_op_queue);
- scheduler_->op_queue_.push(&scheduler_->task_operation_);
- }
-
- scheduler* scheduler_;
- mutex::scoped_lock* lock_;
- thread_info* this_thread_;
-};
-
-struct scheduler::work_cleanup
-{
- ~work_cleanup()
- {
- if (this_thread_->private_outstanding_work > 1)
- {
- boost::asio::detail::increment(
- scheduler_->outstanding_work_,
- this_thread_->private_outstanding_work - 1);
- }
- else if (this_thread_->private_outstanding_work < 1)
- {
- scheduler_->work_finished();
- }
- this_thread_->private_outstanding_work = 0;
-
-#if defined(BOOST_ASIO_HAS_THREADS)
- if (!this_thread_->private_op_queue.empty())
- {
- lock_->lock();
- scheduler_->op_queue_.push(this_thread_->private_op_queue);
- }
-#endif // defined(BOOST_ASIO_HAS_THREADS)
- }
-
- scheduler* scheduler_;
- mutex::scoped_lock* lock_;
- thread_info* this_thread_;
-};
-
-scheduler::scheduler(
- boost::asio::execution_context& ctx, int concurrency_hint)
- : boost::asio::detail::execution_context_service_base<scheduler>(ctx),
- one_thread_(concurrency_hint == 1
- || !BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- SCHEDULER, concurrency_hint)
- || !BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- REACTOR_IO, concurrency_hint)),
- mutex_(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
- SCHEDULER, concurrency_hint)),
- task_(0),
- task_interrupted_(true),
- outstanding_work_(0),
- stopped_(false),
- shutdown_(false),
- concurrency_hint_(concurrency_hint)
-{
- BOOST_ASIO_HANDLER_TRACKING_INIT;
-}
-
-void scheduler::shutdown()
-{
- mutex::scoped_lock lock(mutex_);
- shutdown_ = true;
- lock.unlock();
-
- // Destroy handler objects.
- while (!op_queue_.empty())
- {
- operation* o = op_queue_.front();
- op_queue_.pop();
- if (o != &task_operation_)
- o->destroy();
- }
-
- // Reset to initial state.
- task_ = 0;
-}
-
-void scheduler::init_task()
-{
- mutex::scoped_lock lock(mutex_);
- if (!shutdown_ && !task_)
- {
- task_ = &use_service<reactor>(this->context());
- op_queue_.push(&task_operation_);
- wake_one_thread_and_unlock(lock);
- }
-}
-
-std::size_t scheduler::run(boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- if (outstanding_work_ == 0)
- {
- stop();
- return 0;
- }
-
- thread_info this_thread;
- this_thread.private_outstanding_work = 0;
- thread_call_stack::context ctx(this, this_thread);
-
- mutex::scoped_lock lock(mutex_);
-
- std::size_t n = 0;
- for (; do_run_one(lock, this_thread, ec); lock.lock())
- if (n != (std::numeric_limits<std::size_t>::max)())
- ++n;
- return n;
-}
-
-std::size_t scheduler::run_one(boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- if (outstanding_work_ == 0)
- {
- stop();
- return 0;
- }
-
- thread_info this_thread;
- this_thread.private_outstanding_work = 0;
- thread_call_stack::context ctx(this, this_thread);
-
- mutex::scoped_lock lock(mutex_);
-
- return do_run_one(lock, this_thread, ec);
-}
-
-std::size_t scheduler::wait_one(long usec, boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- if (outstanding_work_ == 0)
- {
- stop();
- return 0;
- }
-
- thread_info this_thread;
- this_thread.private_outstanding_work = 0;
- thread_call_stack::context ctx(this, this_thread);
-
- mutex::scoped_lock lock(mutex_);
-
- return do_wait_one(lock, this_thread, usec, ec);
-}
-
-std::size_t scheduler::poll(boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- if (outstanding_work_ == 0)
- {
- stop();
- return 0;
- }
-
- thread_info this_thread;
- this_thread.private_outstanding_work = 0;
- thread_call_stack::context ctx(this, this_thread);
-
- mutex::scoped_lock lock(mutex_);
-
-#if defined(BOOST_ASIO_HAS_THREADS)
- // We want to support nested calls to poll() and poll_one(), so any handlers
- // that are already on a thread-private queue need to be put on to the main
- // queue now.
- if (one_thread_)
- if (thread_info* outer_info = static_cast<thread_info*>(ctx.next_by_key()))
- op_queue_.push(outer_info->private_op_queue);
-#endif // defined(BOOST_ASIO_HAS_THREADS)
-
- std::size_t n = 0;
- for (; do_poll_one(lock, this_thread, ec); lock.lock())
- if (n != (std::numeric_limits<std::size_t>::max)())
- ++n;
- return n;
-}
-
-std::size_t scheduler::poll_one(boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- if (outstanding_work_ == 0)
- {
- stop();
- return 0;
- }
-
- thread_info this_thread;
- this_thread.private_outstanding_work = 0;
- thread_call_stack::context ctx(this, this_thread);
-
- mutex::scoped_lock lock(mutex_);
-
-#if defined(BOOST_ASIO_HAS_THREADS)
- // We want to support nested calls to poll() and poll_one(), so any handlers
- // that are already on a thread-private queue need to be put on to the main
- // queue now.
- if (one_thread_)
- if (thread_info* outer_info = static_cast<thread_info*>(ctx.next_by_key()))
- op_queue_.push(outer_info->private_op_queue);
-#endif // defined(BOOST_ASIO_HAS_THREADS)
-
- return do_poll_one(lock, this_thread, ec);
-}
-
-void scheduler::stop()
-{
- mutex::scoped_lock lock(mutex_);
- stop_all_threads(lock);
-}
-
-bool scheduler::stopped() const
-{
- mutex::scoped_lock lock(mutex_);
- return stopped_;
-}
-
-void scheduler::restart()
-{
- mutex::scoped_lock lock(mutex_);
- stopped_ = false;
-}
-
-void scheduler::compensating_work_started()
-{
- thread_info_base* this_thread = thread_call_stack::contains(this);
- ++static_cast<thread_info*>(this_thread)->private_outstanding_work;
-}
-
-void scheduler::post_immediate_completion(
- scheduler::operation* op, bool is_continuation)
-{
-#if defined(BOOST_ASIO_HAS_THREADS)
- if (one_thread_ || is_continuation)
- {
- if (thread_info_base* this_thread = thread_call_stack::contains(this))
- {
- ++static_cast<thread_info*>(this_thread)->private_outstanding_work;
- static_cast<thread_info*>(this_thread)->private_op_queue.push(op);
- return;
- }
- }
-#else // defined(BOOST_ASIO_HAS_THREADS)
- (void)is_continuation;
-#endif // defined(BOOST_ASIO_HAS_THREADS)
-
- work_started();
- mutex::scoped_lock lock(mutex_);
- op_queue_.push(op);
- wake_one_thread_and_unlock(lock);
-}
-
-void scheduler::post_deferred_completion(scheduler::operation* op)
-{
-#if defined(BOOST_ASIO_HAS_THREADS)
- if (one_thread_)
- {
- if (thread_info_base* this_thread = thread_call_stack::contains(this))
- {
- static_cast<thread_info*>(this_thread)->private_op_queue.push(op);
- return;
- }
- }
-#endif // defined(BOOST_ASIO_HAS_THREADS)
-
- mutex::scoped_lock lock(mutex_);
- op_queue_.push(op);
- wake_one_thread_and_unlock(lock);
-}
-
-void scheduler::post_deferred_completions(
- op_queue<scheduler::operation>& ops)
-{
- if (!ops.empty())
- {
-#if defined(BOOST_ASIO_HAS_THREADS)
- if (one_thread_)
- {
- if (thread_info_base* this_thread = thread_call_stack::contains(this))
- {
- static_cast<thread_info*>(this_thread)->private_op_queue.push(ops);
- return;
- }
- }
-#endif // defined(BOOST_ASIO_HAS_THREADS)
-
- mutex::scoped_lock lock(mutex_);
- op_queue_.push(ops);
- wake_one_thread_and_unlock(lock);
- }
-}
-
-void scheduler::do_dispatch(
- scheduler::operation* op)
-{
- work_started();
- mutex::scoped_lock lock(mutex_);
- op_queue_.push(op);
- wake_one_thread_and_unlock(lock);
-}
-
-void scheduler::abandon_operations(
- op_queue<scheduler::operation>& ops)
-{
- op_queue<scheduler::operation> ops2;
- ops2.push(ops);
-}
-
-std::size_t scheduler::do_run_one(mutex::scoped_lock& lock,
- scheduler::thread_info& this_thread,
- const boost::system::error_code& ec)
-{
- while (!stopped_)
- {
- if (!op_queue_.empty())
- {
- // Prepare to execute first handler from queue.
- operation* o = op_queue_.front();
- op_queue_.pop();
- bool more_handlers = (!op_queue_.empty());
-
- if (o == &task_operation_)
- {
- task_interrupted_ = more_handlers;
-
- if (more_handlers && !one_thread_)
- wakeup_event_.unlock_and_signal_one(lock);
- else
- lock.unlock();
-
- task_cleanup on_exit = { this, &lock, &this_thread };
- (void)on_exit;
-
- // Run the task. May throw an exception. Only block if the operation
- // queue is empty and we're not polling, otherwise we want to return
- // as soon as possible.
- task_->run(more_handlers ? 0 : -1, this_thread.private_op_queue);
- }
- else
- {
- std::size_t task_result = o->task_result_;
-
- if (more_handlers && !one_thread_)
- wake_one_thread_and_unlock(lock);
- else
- lock.unlock();
-
- // Ensure the count of outstanding work is decremented on block exit.
- work_cleanup on_exit = { this, &lock, &this_thread };
- (void)on_exit;
-
- // Complete the operation. May throw an exception. Deletes the object.
- o->complete(this, ec, task_result);
-
- return 1;
- }
- }
- else
- {
- wakeup_event_.clear(lock);
- wakeup_event_.wait(lock);
- }
- }
-
- return 0;
-}
-
-std::size_t scheduler::do_wait_one(mutex::scoped_lock& lock,
- scheduler::thread_info& this_thread, long usec,
- const boost::system::error_code& ec)
-{
- if (stopped_)
- return 0;
-
- operation* o = op_queue_.front();
- if (o == 0)
- {
- wakeup_event_.clear(lock);
- wakeup_event_.wait_for_usec(lock, usec);
- usec = 0; // Wait at most once.
- o = op_queue_.front();
- }
-
- if (o == &task_operation_)
- {
- op_queue_.pop();
- bool more_handlers = (!op_queue_.empty());
-
- task_interrupted_ = more_handlers;
-
- if (more_handlers && !one_thread_)
- wakeup_event_.unlock_and_signal_one(lock);
- else
- lock.unlock();
-
- {
- task_cleanup on_exit = { this, &lock, &this_thread };
- (void)on_exit;
-
- // Run the task. May throw an exception. Only block if the operation
- // queue is empty and we're not polling, otherwise we want to return
- // as soon as possible.
- task_->run(more_handlers ? 0 : usec, this_thread.private_op_queue);
- }
-
- o = op_queue_.front();
- if (o == &task_operation_)
- {
- if (!one_thread_)
- wakeup_event_.maybe_unlock_and_signal_one(lock);
- return 0;
- }
- }
-
- if (o == 0)
- return 0;
-
- op_queue_.pop();
- bool more_handlers = (!op_queue_.empty());
-
- std::size_t task_result = o->task_result_;
-
- if (more_handlers && !one_thread_)
- wake_one_thread_and_unlock(lock);
- else
- lock.unlock();
-
- // Ensure the count of outstanding work is decremented on block exit.
- work_cleanup on_exit = { this, &lock, &this_thread };
- (void)on_exit;
-
- // Complete the operation. May throw an exception. Deletes the object.
- o->complete(this, ec, task_result);
-
- return 1;
-}
-
-std::size_t scheduler::do_poll_one(mutex::scoped_lock& lock,
- scheduler::thread_info& this_thread,
- const boost::system::error_code& ec)
-{
- if (stopped_)
- return 0;
-
- operation* o = op_queue_.front();
- if (o == &task_operation_)
- {
- op_queue_.pop();
- lock.unlock();
-
- {
- task_cleanup c = { this, &lock, &this_thread };
- (void)c;
-
- // Run the task. May throw an exception. Only block if the operation
- // queue is empty and we're not polling, otherwise we want to return
- // as soon as possible.
- task_->run(0, this_thread.private_op_queue);
- }
-
- o = op_queue_.front();
- if (o == &task_operation_)
- {
- wakeup_event_.maybe_unlock_and_signal_one(lock);
- return 0;
- }
- }
-
- if (o == 0)
- return 0;
-
- op_queue_.pop();
- bool more_handlers = (!op_queue_.empty());
-
- std::size_t task_result = o->task_result_;
-
- if (more_handlers && !one_thread_)
- wake_one_thread_and_unlock(lock);
- else
- lock.unlock();
-
- // Ensure the count of outstanding work is decremented on block exit.
- work_cleanup on_exit = { this, &lock, &this_thread };
- (void)on_exit;
-
- // Complete the operation. May throw an exception. Deletes the object.
- o->complete(this, ec, task_result);
-
- return 1;
-}
-
-void scheduler::stop_all_threads(
- mutex::scoped_lock& lock)
-{
- stopped_ = true;
- wakeup_event_.signal_all(lock);
-
- if (!task_interrupted_ && task_)
- {
- task_interrupted_ = true;
- task_->interrupt();
- }
-}
-
-void scheduler::wake_one_thread_and_unlock(
- mutex::scoped_lock& lock)
-{
- if (!wakeup_event_.maybe_unlock_and_signal_one(lock))
- {
- if (!task_interrupted_ && task_)
- {
- task_interrupted_ = true;
- task_->interrupt();
- }
- lock.unlock();
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_SCHEDULER_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp
deleted file mode 100644
index 0fbaeb9ced2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// detail/impl/select_reactor.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_IMPL_SELECT_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_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_IOCP) \
- || (!defined(BOOST_ASIO_HAS_DEV_POLL) \
- && !defined(BOOST_ASIO_HAS_EPOLL) \
- && !defined(BOOST_ASIO_HAS_KQUEUE) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-void select_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_add_timer_queue(queue);
-}
-
-// Remove a timer queue from the reactor.
-template <typename Time_Traits>
-void select_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_remove_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void select_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- scheduler_.post_immediate_completion(op, false);
- return;
- }
-
- bool earliest = queue.enqueue_timer(time, timer, op);
- scheduler_.work_started();
- if (earliest)
- interrupter_.interrupt();
-}
-
-template <typename Time_Traits>
-std::size_t select_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
- return n;
-}
-
-template <typename Time_Traits>
-void select_reactor::move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- queue.cancel_timer(target, ops);
- queue.move_timer(target, source);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
- // || (!defined(BOOST_ASIO_HAS_DEV_POLL)
- // && !defined(BOOST_ASIO_HAS_EPOLL)
- // && !defined(BOOST_ASIO_HAS_KQUEUE)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
-
-#endif // BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp
deleted file mode 100644
index 4f1f5a83032..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp
+++ /dev/null
@@ -1,335 +0,0 @@
-//
-// detail/impl/select_reactor.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_IMPL_SELECT_REACTOR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_IPP
-
-#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_IOCP) \
- || (!defined(BOOST_ASIO_HAS_DEV_POLL) \
- && !defined(BOOST_ASIO_HAS_EPOLL) \
- && !defined(BOOST_ASIO_HAS_KQUEUE) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
-
-#include <boost/asio/detail/fd_set_adapter.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
-#include <boost/asio/detail/signal_blocker.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-class select_reactor::thread_function
-{
-public:
- explicit thread_function(select_reactor* r)
- : this_(r)
- {
- }
-
- void operator()()
- {
- this_->run_thread();
- }
-
-private:
- select_reactor* this_;
-};
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-select_reactor::select_reactor(boost::asio::execution_context& ctx)
- : execution_context_service_base<select_reactor>(ctx),
- scheduler_(use_service<scheduler_type>(ctx)),
- mutex_(),
- interrupter_(),
-#if defined(BOOST_ASIO_HAS_IOCP)
- stop_thread_(false),
- thread_(0),
-#endif // defined(BOOST_ASIO_HAS_IOCP)
- shutdown_(false)
-{
-#if defined(BOOST_ASIO_HAS_IOCP)
- boost::asio::detail::signal_blocker sb;
- thread_ = new boost::asio::detail::thread(thread_function(this));
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-}
-
-select_reactor::~select_reactor()
-{
- shutdown();
-}
-
-void select_reactor::shutdown()
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- shutdown_ = true;
-#if defined(BOOST_ASIO_HAS_IOCP)
- stop_thread_ = true;
-#endif // defined(BOOST_ASIO_HAS_IOCP)
- lock.unlock();
-
-#if defined(BOOST_ASIO_HAS_IOCP)
- if (thread_)
- {
- interrupter_.interrupt();
- thread_->join();
- delete thread_;
- thread_ = 0;
- }
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
- op_queue<operation> ops;
-
- for (int i = 0; i < max_ops; ++i)
- op_queue_[i].get_all_operations(ops);
-
- timer_queues_.get_all_timers(ops);
-
- scheduler_.abandon_operations(ops);
-}
-
-void select_reactor::notify_fork(
- boost::asio::execution_context::fork_event fork_ev)
-{
- if (fork_ev == boost::asio::execution_context::fork_child)
- interrupter_.recreate();
-}
-
-void select_reactor::init_task()
-{
- scheduler_.init_task();
-}
-
-int select_reactor::register_descriptor(socket_type,
- select_reactor::per_descriptor_data&)
-{
- return 0;
-}
-
-int select_reactor::register_internal_descriptor(
- int op_type, socket_type descriptor,
- select_reactor::per_descriptor_data&, reactor_op* op)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- op_queue_[op_type].enqueue_operation(descriptor, op);
- interrupter_.interrupt();
-
- return 0;
-}
-
-void select_reactor::move_descriptor(socket_type,
- select_reactor::per_descriptor_data&,
- select_reactor::per_descriptor_data&)
-{
-}
-
-void select_reactor::start_op(int op_type, socket_type descriptor,
- select_reactor::per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- post_immediate_completion(op, is_continuation);
- return;
- }
-
- bool first = op_queue_[op_type].enqueue_operation(descriptor, op);
- scheduler_.work_started();
- if (first)
- interrupter_.interrupt();
-}
-
-void select_reactor::cancel_ops(socket_type descriptor,
- select_reactor::per_descriptor_data&)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
-}
-
-void select_reactor::deregister_descriptor(socket_type descriptor,
- select_reactor::per_descriptor_data&, bool)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
-}
-
-void select_reactor::deregister_internal_descriptor(
- socket_type descriptor, select_reactor::per_descriptor_data&)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- op_queue_[i].cancel_operations(descriptor, ops);
-}
-
-void select_reactor::cleanup_descriptor_data(
- select_reactor::per_descriptor_data&)
-{
-}
-
-void select_reactor::run(long usec, op_queue<operation>& ops)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
-#if defined(BOOST_ASIO_HAS_IOCP)
- // Check if the thread is supposed to stop.
- if (stop_thread_)
- return;
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
- // Set up the descriptor sets.
- for (int i = 0; i < max_select_ops; ++i)
- fd_sets_[i].reset();
- fd_sets_[read_op].set(interrupter_.read_descriptor());
- socket_type max_fd = 0;
- bool have_work_to_do = !timer_queues_.all_empty();
- for (int i = 0; i < max_select_ops; ++i)
- {
- have_work_to_do = have_work_to_do || !op_queue_[i].empty();
- fd_sets_[i].set(op_queue_[i], ops);
- if (fd_sets_[i].max_descriptor() > max_fd)
- max_fd = fd_sets_[i].max_descriptor();
- }
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // Connection operations on Windows use both except and write fd_sets.
- have_work_to_do = have_work_to_do || !op_queue_[connect_op].empty();
- fd_sets_[write_op].set(op_queue_[connect_op], ops);
- if (fd_sets_[write_op].max_descriptor() > max_fd)
- max_fd = fd_sets_[write_op].max_descriptor();
- fd_sets_[except_op].set(op_queue_[connect_op], ops);
- if (fd_sets_[except_op].max_descriptor() > max_fd)
- max_fd = fd_sets_[except_op].max_descriptor();
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
- // We can return immediately if there's no work to do and the reactor is
- // not supposed to block.
- if (!usec && !have_work_to_do)
- return;
-
- // Determine how long to block while waiting for events.
- timeval tv_buf = { 0, 0 };
- timeval* tv = usec ? get_timeout(usec, tv_buf) : &tv_buf;
-
- lock.unlock();
-
- // Block on the select call until descriptors become ready.
- boost::system::error_code ec;
- int retval = socket_ops::select(static_cast<int>(max_fd + 1),
- fd_sets_[read_op], fd_sets_[write_op], fd_sets_[except_op], tv, ec);
-
- // Reset the interrupter.
- if (retval > 0 && fd_sets_[read_op].is_set(interrupter_.read_descriptor()))
- {
- interrupter_.reset();
- --retval;
- }
-
- lock.lock();
-
- // Dispatch all ready operations.
- if (retval > 0)
- {
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // Connection operations on Windows use both except and write fd_sets.
- fd_sets_[except_op].perform(op_queue_[connect_op], ops);
- fd_sets_[write_op].perform(op_queue_[connect_op], ops);
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
- // Exception operations must be processed first to ensure that any
- // out-of-band data is read before normal data.
- for (int i = max_select_ops - 1; i >= 0; --i)
- fd_sets_[i].perform(op_queue_[i], ops);
- }
- timer_queues_.get_ready_timers(ops);
-}
-
-void select_reactor::interrupt()
-{
- interrupter_.interrupt();
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-void select_reactor::run_thread()
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- while (!stop_thread_)
- {
- lock.unlock();
- op_queue<operation> ops;
- run(true, ops);
- scheduler_.post_deferred_completions(ops);
- lock.lock();
- }
-}
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-void select_reactor::do_add_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.insert(&queue);
-}
-
-void select_reactor::do_remove_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.erase(&queue);
-}
-
-timeval* select_reactor::get_timeout(long usec, timeval& tv)
-{
- // By default we will wait no longer than 5 minutes. This will ensure that
- // any changes to the system clock are detected after no longer than this.
- const long max_usec = 5 * 60 * 1000 * 1000;
- usec = timer_queues_.wait_duration_usec(
- (usec < 0 || max_usec < usec) ? max_usec : usec);
- tv.tv_sec = usec / 1000000;
- tv.tv_usec = usec % 1000000;
- return &tv;
-}
-
-void select_reactor::cancel_ops_unlocked(socket_type descriptor,
- const boost::system::error_code& ec)
-{
- bool need_interrupt = false;
- op_queue<operation> ops;
- for (int i = 0; i < max_ops; ++i)
- need_interrupt = op_queue_[i].cancel_operations(
- descriptor, ops, ec) || need_interrupt;
- scheduler_.post_deferred_completions(ops);
- if (need_interrupt)
- interrupter_.interrupt();
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
- // || (!defined(BOOST_ASIO_HAS_DEV_POLL)
- // && !defined(BOOST_ASIO_HAS_EPOLL)
- // && !defined(BOOST_ASIO_HAS_KQUEUE))
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
-
-#endif // BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp
deleted file mode 100644
index c50614410e7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// detail/impl/service_registry.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_IMPL_SERVICE_REGISTRY_HPP
-#define BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Service>
-Service& service_registry::use_service()
-{
- execution_context::service::key key;
- init_key<Service>(key, 0);
- factory_type factory = &service_registry::create<Service, execution_context>;
- return *static_cast<Service*>(do_use_service(key, factory, &owner_));
-}
-
-template <typename Service>
-Service& service_registry::use_service(io_context& owner)
-{
- execution_context::service::key key;
- init_key<Service>(key, 0);
- factory_type factory = &service_registry::create<Service, io_context>;
- return *static_cast<Service*>(do_use_service(key, factory, &owner));
-}
-
-template <typename Service>
-void service_registry::add_service(Service* new_service)
-{
- execution_context::service::key key;
- init_key<Service>(key, 0);
- return do_add_service(key, new_service);
-}
-
-template <typename Service>
-bool service_registry::has_service() const
-{
- execution_context::service::key key;
- init_key<Service>(key, 0);
- return do_has_service(key);
-}
-
-template <typename Service>
-inline void service_registry::init_key(
- execution_context::service::key& key, ...)
-{
- init_key_from_id(key, Service::id);
-}
-
-#if !defined(BOOST_ASIO_NO_TYPEID)
-template <typename Service>
-void service_registry::init_key(execution_context::service::key& key,
- typename enable_if<
- is_base_of<typename Service::key_type, Service>::value>::type*)
-{
- key.type_info_ = &typeid(typeid_wrapper<Service>);
- key.id_ = 0;
-}
-
-template <typename Service>
-void service_registry::init_key_from_id(execution_context::service::key& key,
- const service_id<Service>& /*id*/)
-{
- key.type_info_ = &typeid(typeid_wrapper<Service>);
- key.id_ = 0;
-}
-#endif // !defined(BOOST_ASIO_NO_TYPEID)
-
-template <typename Service, typename Owner>
-execution_context::service* service_registry::create(void* owner)
-{
- return new Service(*static_cast<Owner*>(owner));
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp
deleted file mode 100644
index abdcd6a01a4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp
+++ /dev/null
@@ -1,199 +0,0 @@
-//
-// detail/impl/service_registry.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_IMPL_SERVICE_REGISTRY_IPP
-#define BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <vector>
-#include <boost/asio/detail/service_registry.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-service_registry::service_registry(execution_context& owner)
- : owner_(owner),
- first_service_(0)
-{
-}
-
-service_registry::~service_registry()
-{
-}
-
-void service_registry::shutdown_services()
-{
- execution_context::service* service = first_service_;
- while (service)
- {
- service->shutdown();
- service = service->next_;
- }
-}
-
-void service_registry::destroy_services()
-{
- while (first_service_)
- {
- execution_context::service* next_service = first_service_->next_;
- destroy(first_service_);
- first_service_ = next_service;
- }
-}
-
-void service_registry::notify_fork(execution_context::fork_event fork_ev)
-{
- // Make a copy of all of the services while holding the lock. We don't want
- // to hold the lock while calling into each service, as it may try to call
- // back into this class.
- std::vector<execution_context::service*> services;
- {
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- execution_context::service* service = first_service_;
- while (service)
- {
- services.push_back(service);
- service = service->next_;
- }
- }
-
- // If processing the fork_prepare event, we want to go in reverse order of
- // service registration, which happens to be the existing order of the
- // services in the vector. For the other events we want to go in the other
- // direction.
- std::size_t num_services = services.size();
- if (fork_ev == execution_context::fork_prepare)
- for (std::size_t i = 0; i < num_services; ++i)
- services[i]->notify_fork(fork_ev);
- else
- for (std::size_t i = num_services; i > 0; --i)
- services[i - 1]->notify_fork(fork_ev);
-}
-
-void service_registry::init_key_from_id(execution_context::service::key& key,
- const execution_context::id& id)
-{
- key.type_info_ = 0;
- key.id_ = &id;
-}
-
-bool service_registry::keys_match(
- const execution_context::service::key& key1,
- const execution_context::service::key& key2)
-{
- if (key1.id_ && key2.id_)
- if (key1.id_ == key2.id_)
- return true;
- if (key1.type_info_ && key2.type_info_)
- if (*key1.type_info_ == *key2.type_info_)
- return true;
- return false;
-}
-
-void service_registry::destroy(execution_context::service* service)
-{
- delete service;
-}
-
-execution_context::service* service_registry::do_use_service(
- const execution_context::service::key& key,
- factory_type factory, void* owner)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- // First see if there is an existing service object with the given key.
- execution_context::service* service = first_service_;
- while (service)
- {
- if (keys_match(service->key_, key))
- return service;
- service = service->next_;
- }
-
- // Create a new service object. The service registry's mutex is not locked
- // at this time to allow for nested calls into this function from the new
- // service's constructor.
- lock.unlock();
- auto_service_ptr new_service = { factory(owner) };
- new_service.ptr_->key_ = key;
- lock.lock();
-
- // Check that nobody else created another service object of the same type
- // while the lock was released.
- service = first_service_;
- while (service)
- {
- if (keys_match(service->key_, key))
- return service;
- service = service->next_;
- }
-
- // Service was successfully initialised, pass ownership to registry.
- new_service.ptr_->next_ = first_service_;
- first_service_ = new_service.ptr_;
- new_service.ptr_ = 0;
- return first_service_;
-}
-
-void service_registry::do_add_service(
- const execution_context::service::key& key,
- execution_context::service* new_service)
-{
- if (&owner_ != &new_service->context())
- boost::asio::detail::throw_exception(invalid_service_owner());
-
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- // Check if there is an existing service object with the given key.
- execution_context::service* service = first_service_;
- while (service)
- {
- if (keys_match(service->key_, key))
- boost::asio::detail::throw_exception(service_already_exists());
- service = service->next_;
- }
-
- // Take ownership of the service object.
- new_service->key_ = key;
- new_service->next_ = first_service_;
- first_service_ = new_service;
-}
-
-bool service_registry::do_has_service(
- const execution_context::service::key& key) const
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- execution_context::service* service = first_service_;
- while (service)
- {
- if (keys_match(service->key_, key))
- return true;
- service = service->next_;
- }
-
- return false;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index abd83b480cd..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/signal_set_service.ipp
+++ /dev/null
@@ -1,671 +0,0 @@
-//
-// detail/impl/signal_set_service.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_IMPL_SIGNAL_SET_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_SIGNAL_SET_SERVICE_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 <stdexcept>
-#include <boost/asio/detail/reactor.hpp>
-#include <boost/asio/detail/signal_blocker.hpp>
-#include <boost/asio/detail/signal_set_service.hpp>
-#include <boost/asio/detail/static_mutex.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct signal_state
-{
- // Mutex used for protecting global state.
- static_mutex mutex_;
-
- // The read end of the pipe used for signal notifications.
- int read_descriptor_;
-
- // The write end of the pipe used for signal notifications.
- int write_descriptor_;
-
- // Whether the signal state has been prepared for a fork.
- bool fork_prepared_;
-
- // The head of a linked list of all signal_set_service instances.
- class signal_set_service* service_list_;
-
- // A count of the number of objects that are registered for each signal.
- std::size_t registration_count_[max_signal_number];
-};
-
-signal_state* get_signal_state()
-{
- static signal_state state = {
- BOOST_ASIO_STATIC_MUTEX_INIT, -1, -1, false, 0, { 0 } };
- return &state;
-}
-
-void boost_asio_signal_handler(int signal_number)
-{
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- || defined(__CYGWIN__)
- signal_set_service::deliver_signal(signal_number);
-#else // defined(BOOST_ASIO_WINDOWS)
- // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // || defined(__CYGWIN__)
- int saved_errno = errno;
- signal_state* state = get_signal_state();
- signed_size_type result = ::write(state->write_descriptor_,
- &signal_number, sizeof(signal_number));
- (void)result;
- errno = saved_errno;
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // || defined(__CYGWIN__)
-
-#if defined(BOOST_ASIO_HAS_SIGNAL) && !defined(BOOST_ASIO_HAS_SIGACTION)
- ::signal(signal_number, boost_asio_signal_handler);
-#endif // defined(BOOST_ASIO_HAS_SIGNAL) && !defined(BOOST_ASIO_HAS_SIGACTION)
-}
-
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-class signal_set_service::pipe_read_op : public reactor_op
-{
-public:
- pipe_read_op()
- : reactor_op(&pipe_read_op::do_perform, pipe_read_op::do_complete)
- {
- }
-
- static status do_perform(reactor_op*)
- {
- signal_state* state = get_signal_state();
-
- int fd = state->read_descriptor_;
- int signal_number = 0;
- while (::read(fd, &signal_number, sizeof(int)) == sizeof(int))
- if (signal_number >= 0 && signal_number < max_signal_number)
- signal_set_service::deliver_signal(signal_number);
-
- return not_done;
- }
-
- static void do_complete(void* /*owner*/, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- pipe_read_op* o(static_cast<pipe_read_op*>(base));
- delete o;
- }
-};
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
-signal_set_service::signal_set_service(
- boost::asio::io_context& io_context)
- : service_base<signal_set_service>(io_context),
- io_context_(boost::asio::use_service<io_context_impl>(io_context)),
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- reactor_(boost::asio::use_service<reactor>(io_context)),
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
- next_(0),
- prev_(0)
-{
- get_signal_state()->mutex_.init();
-
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- reactor_.init_task();
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
- for (int i = 0; i < max_signal_number; ++i)
- registrations_[i] = 0;
-
- add_service(this);
-}
-
-signal_set_service::~signal_set_service()
-{
- remove_service(this);
-}
-
-void signal_set_service::shutdown()
-{
- remove_service(this);
-
- op_queue<operation> ops;
-
- for (int i = 0; i < max_signal_number; ++i)
- {
- registration* reg = registrations_[i];
- while (reg)
- {
- ops.push(*reg->queue_);
- reg = reg->next_in_table_;
- }
- }
-
- io_context_.abandon_operations(ops);
-}
-
-void signal_set_service::notify_fork(
- boost::asio::io_context::fork_event fork_ev)
-{
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- switch (fork_ev)
- {
- case boost::asio::io_context::fork_prepare:
- {
- int read_descriptor = state->read_descriptor_;
- state->fork_prepared_ = true;
- lock.unlock();
- reactor_.deregister_internal_descriptor(read_descriptor, reactor_data_);
- reactor_.cleanup_descriptor_data(reactor_data_);
- }
- break;
- case boost::asio::io_context::fork_parent:
- if (state->fork_prepared_)
- {
- int read_descriptor = state->read_descriptor_;
- state->fork_prepared_ = false;
- lock.unlock();
- reactor_.register_internal_descriptor(reactor::read_op,
- read_descriptor, reactor_data_, new pipe_read_op);
- }
- break;
- case boost::asio::io_context::fork_child:
- if (state->fork_prepared_)
- {
- boost::asio::detail::signal_blocker blocker;
- close_descriptors();
- open_descriptors();
- int read_descriptor = state->read_descriptor_;
- state->fork_prepared_ = false;
- lock.unlock();
- reactor_.register_internal_descriptor(reactor::read_op,
- read_descriptor, reactor_data_, new pipe_read_op);
- }
- break;
- default:
- break;
- }
-#else // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
- (void)fork_ev;
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-}
-
-void signal_set_service::construct(
- signal_set_service::implementation_type& impl)
-{
- impl.signals_ = 0;
-}
-
-void signal_set_service::destroy(
- signal_set_service::implementation_type& impl)
-{
- boost::system::error_code ignored_ec;
- clear(impl, ignored_ec);
- cancel(impl, ignored_ec);
-}
-
-boost::system::error_code signal_set_service::add(
- signal_set_service::implementation_type& impl,
- int signal_number, boost::system::error_code& ec)
-{
- // Check that the signal number is valid.
- if (signal_number < 0 || signal_number >= max_signal_number)
- {
- ec = boost::asio::error::invalid_argument;
- return ec;
- }
-
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- // Find the appropriate place to insert the registration.
- registration** insertion_point = &impl.signals_;
- registration* next = impl.signals_;
- while (next && next->signal_number_ < signal_number)
- {
- insertion_point = &next->next_in_set_;
- next = next->next_in_set_;
- }
-
- // Only do something if the signal is not already registered.
- if (next == 0 || next->signal_number_ != signal_number)
- {
- registration* new_registration = new registration;
-
-#if defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
- // Register for the signal if we're the first.
- if (state->registration_count_[signal_number] == 0)
- {
-# if defined(BOOST_ASIO_HAS_SIGACTION)
- using namespace std; // For memset.
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = boost_asio_signal_handler;
- sigfillset(&sa.sa_mask);
- if (::sigaction(signal_number, &sa, 0) == -1)
-# else // defined(BOOST_ASIO_HAS_SIGACTION)
- if (::signal(signal_number, boost_asio_signal_handler) == SIG_ERR)
-# endif // defined(BOOST_ASIO_HAS_SIGACTION)
- {
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::asio::error::invalid_argument;
-# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
-# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- delete new_registration;
- return ec;
- }
- }
-#endif // defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
-
- // Record the new registration in the set.
- new_registration->signal_number_ = signal_number;
- new_registration->queue_ = &impl.queue_;
- new_registration->next_in_set_ = next;
- *insertion_point = new_registration;
-
- // Insert registration into the registration table.
- new_registration->next_in_table_ = registrations_[signal_number];
- if (registrations_[signal_number])
- registrations_[signal_number]->prev_in_table_ = new_registration;
- registrations_[signal_number] = new_registration;
-
- ++state->registration_count_[signal_number];
- }
-
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code signal_set_service::remove(
- signal_set_service::implementation_type& impl,
- int signal_number, boost::system::error_code& ec)
-{
- // Check that the signal number is valid.
- if (signal_number < 0 || signal_number >= max_signal_number)
- {
- ec = boost::asio::error::invalid_argument;
- return ec;
- }
-
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- // Find the signal number in the list of registrations.
- registration** deletion_point = &impl.signals_;
- registration* reg = impl.signals_;
- while (reg && reg->signal_number_ < signal_number)
- {
- deletion_point = &reg->next_in_set_;
- reg = reg->next_in_set_;
- }
-
- if (reg != 0 && reg->signal_number_ == signal_number)
- {
-#if defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
- // Set signal handler back to the default if we're the last.
- if (state->registration_count_[signal_number] == 1)
- {
-# if defined(BOOST_ASIO_HAS_SIGACTION)
- using namespace std; // For memset.
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = SIG_DFL;
- if (::sigaction(signal_number, &sa, 0) == -1)
-# else // defined(BOOST_ASIO_HAS_SIGACTION)
- if (::signal(signal_number, SIG_DFL) == SIG_ERR)
-# endif // defined(BOOST_ASIO_HAS_SIGACTION)
- {
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::asio::error::invalid_argument;
-# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
-# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- return ec;
- }
- }
-#endif // defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
-
- // Remove the registration from the set.
- *deletion_point = reg->next_in_set_;
-
- // Remove the registration from the registration table.
- if (registrations_[signal_number] == reg)
- registrations_[signal_number] = reg->next_in_table_;
- if (reg->prev_in_table_)
- reg->prev_in_table_->next_in_table_ = reg->next_in_table_;
- if (reg->next_in_table_)
- reg->next_in_table_->prev_in_table_ = reg->prev_in_table_;
-
- --state->registration_count_[signal_number];
-
- delete reg;
- }
-
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code signal_set_service::clear(
- signal_set_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- while (registration* reg = impl.signals_)
- {
-#if defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
- // Set signal handler back to the default if we're the last.
- if (state->registration_count_[reg->signal_number_] == 1)
- {
-# if defined(BOOST_ASIO_HAS_SIGACTION)
- using namespace std; // For memset.
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = SIG_DFL;
- if (::sigaction(reg->signal_number_, &sa, 0) == -1)
-# else // defined(BOOST_ASIO_HAS_SIGACTION)
- if (::signal(reg->signal_number_, SIG_DFL) == SIG_ERR)
-# endif // defined(BOOST_ASIO_HAS_SIGACTION)
- {
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::asio::error::invalid_argument;
-# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
-# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- return ec;
- }
- }
-#endif // defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
-
- // Remove the registration from the registration table.
- if (registrations_[reg->signal_number_] == reg)
- registrations_[reg->signal_number_] = reg->next_in_table_;
- if (reg->prev_in_table_)
- reg->prev_in_table_->next_in_table_ = reg->next_in_table_;
- if (reg->next_in_table_)
- reg->next_in_table_->prev_in_table_ = reg->prev_in_table_;
-
- --state->registration_count_[reg->signal_number_];
-
- impl.signals_ = reg->next_in_set_;
- delete reg;
- }
-
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code signal_set_service::cancel(
- signal_set_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(),
- "signal_set", &impl, 0, "cancel"));
-
- op_queue<operation> ops;
- {
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- while (signal_op* op = impl.queue_.front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- impl.queue_.pop();
- ops.push(op);
- }
- }
-
- io_context_.post_deferred_completions(ops);
-
- ec = boost::system::error_code();
- return ec;
-}
-
-void signal_set_service::deliver_signal(int signal_number)
-{
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- signal_set_service* service = state->service_list_;
- while (service)
- {
- op_queue<operation> ops;
-
- registration* reg = service->registrations_[signal_number];
- while (reg)
- {
- if (reg->queue_->empty())
- {
- ++reg->undelivered_;
- }
- else
- {
- while (signal_op* op = reg->queue_->front())
- {
- op->signal_number_ = signal_number;
- reg->queue_->pop();
- ops.push(op);
- }
- }
-
- reg = reg->next_in_table_;
- }
-
- service->io_context_.post_deferred_completions(ops);
-
- service = service->next_;
- }
-}
-
-void signal_set_service::add_service(signal_set_service* service)
-{
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
- // If this is the first service to be created, open a new pipe.
- if (state->service_list_ == 0)
- open_descriptors();
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
- // If an io_context object is thread-unsafe then it must be the only
- // io_context used to create signal_set objects.
- if (state->service_list_ != 0)
- {
- if (!BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
- service->io_context_.concurrency_hint())
- || !BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
- state->service_list_->io_context_.concurrency_hint()))
- {
- std::logic_error ex(
- "Thread-unsafe io_context objects require "
- "exclusive access to signal handling.");
- boost::asio::detail::throw_exception(ex);
- }
- }
-
- // Insert service into linked list of all services.
- service->next_ = state->service_list_;
- service->prev_ = 0;
- if (state->service_list_)
- state->service_list_->prev_ = service;
- state->service_list_ = service;
-
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- // Register for pipe readiness notifications.
- int read_descriptor = state->read_descriptor_;
- lock.unlock();
- service->reactor_.register_internal_descriptor(reactor::read_op,
- read_descriptor, service->reactor_data_, new pipe_read_op);
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-}
-
-void signal_set_service::remove_service(signal_set_service* service)
-{
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- if (service->next_ || service->prev_ || state->service_list_ == service)
- {
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- // Disable the pipe readiness notifications.
- int read_descriptor = state->read_descriptor_;
- lock.unlock();
- service->reactor_.deregister_internal_descriptor(
- read_descriptor, service->reactor_data_);
- service->reactor_.cleanup_descriptor_data(service->reactor_data_);
- lock.lock();
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
- // Remove service from linked list of all services.
- if (state->service_list_ == service)
- state->service_list_ = service->next_;
- if (service->prev_)
- service->prev_->next_ = service->next_;
- if (service->next_)
- service->next_->prev_= service->prev_;
- service->next_ = 0;
- service->prev_ = 0;
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
- // If this is the last service to be removed, close the pipe.
- if (state->service_list_ == 0)
- close_descriptors();
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
- }
-}
-
-void signal_set_service::open_descriptors()
-{
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- signal_state* state = get_signal_state();
-
- int pipe_fds[2];
- if (::pipe(pipe_fds) == 0)
- {
- state->read_descriptor_ = pipe_fds[0];
- ::fcntl(state->read_descriptor_, F_SETFL, O_NONBLOCK);
-
- state->write_descriptor_ = pipe_fds[1];
- ::fcntl(state->write_descriptor_, F_SETFL, O_NONBLOCK);
-
-#if defined(FD_CLOEXEC)
- ::fcntl(state->read_descriptor_, F_SETFD, FD_CLOEXEC);
- ::fcntl(state->write_descriptor_, F_SETFD, FD_CLOEXEC);
-#endif // defined(FD_CLOEXEC)
- }
- else
- {
- boost::system::error_code ec(errno,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "signal_set_service pipe");
- }
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-}
-
-void signal_set_service::close_descriptors()
-{
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- signal_state* state = get_signal_state();
-
- if (state->read_descriptor_ != -1)
- ::close(state->read_descriptor_);
- state->read_descriptor_ = -1;
-
- if (state->write_descriptor_ != -1)
- ::close(state->write_descriptor_);
- state->write_descriptor_ = -1;
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-}
-
-void signal_set_service::start_wait_op(
- signal_set_service::implementation_type& impl, signal_op* op)
-{
- io_context_.work_started();
-
- signal_state* state = get_signal_state();
- static_mutex::scoped_lock lock(state->mutex_);
-
- registration* reg = impl.signals_;
- while (reg)
- {
- if (reg->undelivered_ > 0)
- {
- --reg->undelivered_;
- op->signal_number_ = reg->signal_number_;
- io_context_.post_deferred_completion(op);
- return;
- }
-
- reg = reg->next_in_set_;
- }
-
- impl.queue_.push(op);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index bb60df0a8ec..00000000000
--- a/src/third_party/boost-1.69.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 > 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.69.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
deleted file mode 100644
index 3d9e5289d3c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_select_interrupter.ipp
+++ /dev/null
@@ -1,178 +0,0 @@
-//
-// detail/impl/socket_select_interrupter.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_IMPL_SOCKET_SELECT_INTERRUPTER_IPP
-#define BOOST_ASIO_DETAIL_IMPL_SOCKET_SELECT_INTERRUPTER_IPP
-
-#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_WINDOWS_RUNTIME)
-
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
-
-#include <cstdlib>
-#include <boost/asio/detail/socket_holder.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_select_interrupter.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-socket_select_interrupter::socket_select_interrupter()
-{
- open_descriptors();
-}
-
-void socket_select_interrupter::open_descriptors()
-{
- boost::system::error_code ec;
- socket_holder acceptor(socket_ops::socket(
- AF_INET, SOCK_STREAM, IPPROTO_TCP, ec));
- if (acceptor.get() == invalid_socket)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- int opt = 1;
- socket_ops::state_type acceptor_state = 0;
- socket_ops::setsockopt(acceptor.get(), acceptor_state,
- SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt), ec);
-
- using namespace std; // For memset.
- sockaddr_in4_type addr;
- std::size_t addr_len = sizeof(addr);
- memset(&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
- addr.sin_port = 0;
- if (socket_ops::bind(acceptor.get(), (const socket_addr_type*)&addr,
- addr_len, ec) == socket_error_retval)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- if (socket_ops::getsockname(acceptor.get(), (socket_addr_type*)&addr,
- &addr_len, ec) == socket_error_retval)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- // Some broken firewalls on Windows will intermittently cause getsockname to
- // return 0.0.0.0 when the socket is actually bound to 127.0.0.1. We
- // explicitly specify the target address here to work around this problem.
- if (addr.sin_addr.s_addr == socket_ops::host_to_network_long(INADDR_ANY))
- addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
-
- if (socket_ops::listen(acceptor.get(),
- SOMAXCONN, ec) == socket_error_retval)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- socket_holder client(socket_ops::socket(
- AF_INET, SOCK_STREAM, IPPROTO_TCP, ec));
- if (client.get() == invalid_socket)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- if (socket_ops::connect(client.get(), (const socket_addr_type*)&addr,
- addr_len, ec) == socket_error_retval)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- socket_holder server(socket_ops::accept(acceptor.get(), 0, 0, ec));
- if (server.get() == invalid_socket)
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- ioctl_arg_type non_blocking = 1;
- socket_ops::state_type client_state = 0;
- if (socket_ops::ioctl(client.get(), client_state,
- FIONBIO, &non_blocking, ec))
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- opt = 1;
- socket_ops::setsockopt(client.get(), client_state,
- IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt), ec);
-
- non_blocking = 1;
- socket_ops::state_type server_state = 0;
- if (socket_ops::ioctl(server.get(), server_state,
- FIONBIO, &non_blocking, ec))
- boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
- opt = 1;
- socket_ops::setsockopt(server.get(), server_state,
- IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt), ec);
-
- read_descriptor_ = server.release();
- write_descriptor_ = client.release();
-}
-
-socket_select_interrupter::~socket_select_interrupter()
-{
- close_descriptors();
-}
-
-void socket_select_interrupter::close_descriptors()
-{
- boost::system::error_code ec;
- socket_ops::state_type state = socket_ops::internal_non_blocking;
- if (read_descriptor_ != invalid_socket)
- socket_ops::close(read_descriptor_, state, true, ec);
- if (write_descriptor_ != invalid_socket)
- socket_ops::close(write_descriptor_, state, true, ec);
-}
-
-void socket_select_interrupter::recreate()
-{
- close_descriptors();
-
- write_descriptor_ = invalid_socket;
- read_descriptor_ = invalid_socket;
-
- open_descriptors();
-}
-
-void socket_select_interrupter::interrupt()
-{
- char byte = 0;
- socket_ops::buf b;
- socket_ops::init_buf(b, &byte, 1);
- boost::system::error_code ec;
- socket_ops::send(write_descriptor_, &b, 1, 0, ec);
-}
-
-bool socket_select_interrupter::reset()
-{
- char data[1024];
- socket_ops::buf b;
- socket_ops::init_buf(b, data, sizeof(data));
- boost::system::error_code ec;
- int bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
- bool was_interrupted = (bytes_read > 0);
- while (bytes_read == sizeof(data))
- bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
- return was_interrupted;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_SOCKET_SELECT_INTERRUPTER_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 6452b949f41..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.hpp
+++ /dev/null
@@ -1,181 +0,0 @@
-//
-// detail/impl/strand_executor_service.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_IMPL_STRAND_EXECUTOR_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/call_stack.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/recycling_allocator.hpp>
-#include <boost/asio/executor_work_guard.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Executor>
-class strand_executor_service::invoker
-{
-public:
- invoker(const implementation_type& impl, Executor& ex)
- : impl_(impl),
- work_(ex)
- {
- }
-
- invoker(const invoker& other)
- : impl_(other.impl_),
- work_(other.work_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- invoker(invoker&& other)
- : impl_(BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_)),
- work_(BOOST_ASIO_MOVE_CAST(executor_work_guard<Executor>)(other.work_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- struct on_invoker_exit
- {
- invoker* this_;
-
- ~on_invoker_exit()
- {
- this_->impl_->mutex_->lock();
- this_->impl_->ready_queue_.push(this_->impl_->waiting_queue_);
- bool more_handlers = this_->impl_->locked_ =
- !this_->impl_->ready_queue_.empty();
- this_->impl_->mutex_->unlock();
-
- if (more_handlers)
- {
- Executor ex(this_->work_.get_executor());
- recycling_allocator<void> allocator;
- ex.post(BOOST_ASIO_MOVE_CAST(invoker)(*this_), allocator);
- }
- }
- };
-
- void operator()()
- {
- // Indicate that this strand is executing on the current thread.
- call_stack<strand_impl>::context ctx(impl_.get());
-
- // Ensure the next handler, if any, is scheduled on block exit.
- on_invoker_exit on_exit = { this };
- (void)on_exit;
-
- // Run all ready handlers. No lock is required since the ready queue is
- // accessed only within the strand.
- boost::system::error_code ec;
- while (scheduler_operation* o = impl_->ready_queue_.front())
- {
- impl_->ready_queue_.pop();
- o->complete(impl_.get(), ec, 0);
- }
- }
-
-private:
- implementation_type impl_;
- executor_work_guard<Executor> work_;
-};
-
-template <typename Executor, typename Function, typename Allocator>
-void strand_executor_service::dispatch(const implementation_type& impl,
- Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a)
-{
- typedef typename decay<Function>::type function_type;
-
- // If we are already in the strand then the function can run immediately.
- if (call_stack<strand_impl>::contains(impl.get()))
- {
- // Make a local, non-const copy of the function.
- function_type tmp(BOOST_ASIO_MOVE_CAST(Function)(function));
-
- fenced_block b(fenced_block::full);
- boost_asio_handler_invoke_helpers::invoke(tmp, tmp);
- return;
- }
-
- // Allocate and construct an operation to wrap the function.
- typedef executor_op<function_type, Allocator> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(function), a);
-
- BOOST_ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
- "strand_executor", impl.get(), 0, "dispatch"));
-
- // Add the function to the strand and schedule the strand if required.
- bool first = enqueue(impl, p.p);
- p.v = p.p = 0;
- if (first)
- ex.dispatch(invoker<Executor>(impl, ex), a);
-}
-
-// Request invocation of the given function and return immediately.
-template <typename Executor, typename Function, typename Allocator>
-void strand_executor_service::post(const implementation_type& impl,
- Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a)
-{
- typedef typename decay<Function>::type function_type;
-
- // Allocate and construct an operation to wrap the function.
- typedef executor_op<function_type, Allocator> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(function), a);
-
- BOOST_ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
- "strand_executor", impl.get(), 0, "post"));
-
- // Add the function to the strand and schedule the strand if required.
- bool first = enqueue(impl, p.p);
- p.v = p.p = 0;
- if (first)
- ex.post(invoker<Executor>(impl, ex), a);
-}
-
-// Request invocation of the given function and return immediately.
-template <typename Executor, typename Function, typename Allocator>
-void strand_executor_service::defer(const implementation_type& impl,
- Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a)
-{
- typedef typename decay<Function>::type function_type;
-
- // Allocate and construct an operation to wrap the function.
- typedef executor_op<function_type, Allocator> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(function), a);
-
- BOOST_ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
- "strand_executor", impl.get(), 0, "defer"));
-
- // Add the function to the strand and schedule the strand if required.
- bool first = enqueue(impl, p.p);
- p.v = p.p = 0;
- if (first)
- ex.defer(invoker<Executor>(impl, ex), a);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index aed4d3cf6a5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.ipp
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// detail/impl/strand_executor_service.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_IMPL_STRAND_EXECUTOR_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_IPP
-
-#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/strand_executor_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-strand_executor_service::strand_executor_service(execution_context& ctx)
- : execution_context_service_base<strand_executor_service>(ctx),
- mutex_(),
- salt_(0),
- impl_list_(0)
-{
-}
-
-void strand_executor_service::shutdown()
-{
- op_queue<scheduler_operation> ops;
-
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- strand_impl* impl = impl_list_;
- while (impl)
- {
- impl->mutex_->lock();
- impl->shutdown_ = true;
- ops.push(impl->waiting_queue_);
- ops.push(impl->ready_queue_);
- impl->mutex_->unlock();
- impl = impl->next_;
- }
-}
-
-strand_executor_service::implementation_type
-strand_executor_service::create_implementation()
-{
- implementation_type new_impl(new strand_impl);
- new_impl->locked_ = false;
- new_impl->shutdown_ = false;
-
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- // Select a mutex from the pool of shared mutexes.
- std::size_t salt = salt_++;
- std::size_t mutex_index = reinterpret_cast<std::size_t>(new_impl.get());
- mutex_index += (reinterpret_cast<std::size_t>(new_impl.get()) >> 3);
- mutex_index ^= salt + 0x9e3779b9 + (mutex_index << 6) + (mutex_index >> 2);
- mutex_index = mutex_index % num_mutexes;
- if (!mutexes_[mutex_index].get())
- mutexes_[mutex_index].reset(new mutex);
- new_impl->mutex_ = mutexes_[mutex_index].get();
-
- // Insert implementation into linked list of all implementations.
- new_impl->next_ = impl_list_;
- new_impl->prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = new_impl.get();
- impl_list_ = new_impl.get();
- new_impl->service_ = this;
-
- return new_impl;
-}
-
-strand_executor_service::strand_impl::~strand_impl()
-{
- boost::asio::detail::mutex::scoped_lock lock(service_->mutex_);
-
- // Remove implementation from linked list of all implementations.
- if (service_->impl_list_ == this)
- service_->impl_list_ = next_;
- if (prev_)
- prev_->next_ = next_;
- if (next_)
- next_->prev_= prev_;
-}
-
-bool strand_executor_service::enqueue(const implementation_type& impl,
- scheduler_operation* op)
-{
- impl->mutex_->lock();
- if (impl->shutdown_)
- {
- impl->mutex_->unlock();
- op->destroy();
- return false;
- }
- else if (impl->locked_)
- {
- // Some other function already holds the strand lock. Enqueue for later.
- impl->waiting_queue_.push(op);
- impl->mutex_->unlock();
- return false;
- }
- else
- {
- // The function is acquiring the strand lock and so is responsible for
- // scheduling the strand.
- impl->locked_ = true;
- impl->mutex_->unlock();
- impl->ready_queue_.push(op);
- return true;
- }
-}
-
-bool strand_executor_service::running_in_this_thread(
- const implementation_type& impl)
-{
- return !!call_stack<strand_impl>::contains(impl.get());
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp
deleted file mode 100644
index d47708bb98b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// detail/impl/strand_service.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_IMPL_STRAND_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/call_stack.hpp>
-#include <boost/asio/detail/completion_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-inline strand_service::strand_impl::strand_impl()
- : operation(&strand_service::do_complete),
- locked_(false)
-{
-}
-
-struct strand_service::on_dispatch_exit
-{
- io_context_impl* io_context_;
- strand_impl* impl_;
-
- ~on_dispatch_exit()
- {
- impl_->mutex_.lock();
- impl_->ready_queue_.push(impl_->waiting_queue_);
- bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty();
- impl_->mutex_.unlock();
-
- if (more_handlers)
- io_context_->post_immediate_completion(impl_, false);
- }
-};
-
-template <typename Handler>
-void strand_service::dispatch(strand_service::implementation_type& impl,
- Handler& handler)
-{
- // If we are already in the strand then the handler can run immediately.
- if (call_stack<strand_impl>::contains(impl))
- {
- fenced_block b(fenced_block::full);
- boost_asio_handler_invoke_helpers::invoke(handler, handler);
- return;
- }
-
- // Allocate and construct an operation to wrap the handler.
- typedef completion_handler<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((this->context(),
- *p.p, "strand", impl, 0, "dispatch"));
-
- bool dispatch_immediately = do_dispatch(impl, p.p);
- operation* o = p.p;
- p.v = p.p = 0;
-
- if (dispatch_immediately)
- {
- // Indicate that this strand is executing on the current thread.
- call_stack<strand_impl>::context ctx(impl);
-
- // Ensure the next handler, if any, is scheduled on block exit.
- on_dispatch_exit on_exit = { &io_context_, impl };
- (void)on_exit;
-
- completion_handler<Handler>::do_complete(
- &io_context_, o, boost::system::error_code(), 0);
- }
-}
-
-// Request the io_context to invoke the given handler and return immediately.
-template <typename Handler>
-void strand_service::post(strand_service::implementation_type& impl,
- Handler& handler)
-{
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef completion_handler<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((this->context(),
- *p.p, "strand", impl, 0, "post"));
-
- do_post(impl, p.p, is_continuation);
- p.v = p.p = 0;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp
deleted file mode 100644
index 9926f9abf38..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp
+++ /dev/null
@@ -1,179 +0,0 @@
-//
-// detail/impl/strand_service.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_IMPL_STRAND_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_IPP
-
-#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/call_stack.hpp>
-#include <boost/asio/detail/strand_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct strand_service::on_do_complete_exit
-{
- io_context_impl* owner_;
- strand_impl* impl_;
-
- ~on_do_complete_exit()
- {
- impl_->mutex_.lock();
- impl_->ready_queue_.push(impl_->waiting_queue_);
- bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty();
- impl_->mutex_.unlock();
-
- if (more_handlers)
- owner_->post_immediate_completion(impl_, true);
- }
-};
-
-strand_service::strand_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<strand_service>(io_context),
- io_context_(boost::asio::use_service<io_context_impl>(io_context)),
- mutex_(),
- salt_(0)
-{
-}
-
-void strand_service::shutdown()
-{
- op_queue<operation> ops;
-
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- for (std::size_t i = 0; i < num_implementations; ++i)
- {
- if (strand_impl* impl = implementations_[i].get())
- {
- ops.push(impl->waiting_queue_);
- ops.push(impl->ready_queue_);
- }
- }
-}
-
-void strand_service::construct(strand_service::implementation_type& impl)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- std::size_t salt = salt_++;
-#if defined(BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
- std::size_t index = salt;
-#else // defined(BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
- std::size_t index = reinterpret_cast<std::size_t>(&impl);
- index += (reinterpret_cast<std::size_t>(&impl) >> 3);
- index ^= salt + 0x9e3779b9 + (index << 6) + (index >> 2);
-#endif // defined(BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
- index = index % num_implementations;
-
- if (!implementations_[index].get())
- implementations_[index].reset(new strand_impl);
- impl = implementations_[index].get();
-}
-
-bool strand_service::running_in_this_thread(
- const implementation_type& impl) const
-{
- return call_stack<strand_impl>::contains(impl) != 0;
-}
-
-bool strand_service::do_dispatch(implementation_type& impl, operation* op)
-{
- // If we are running inside the io_context, and no other handler already
- // holds the strand lock, then the handler can run immediately.
- bool can_dispatch = io_context_.can_dispatch();
- impl->mutex_.lock();
- if (can_dispatch && !impl->locked_)
- {
- // Immediate invocation is allowed.
- impl->locked_ = true;
- impl->mutex_.unlock();
- return true;
- }
-
- if (impl->locked_)
- {
- // Some other handler already holds the strand lock. Enqueue for later.
- impl->waiting_queue_.push(op);
- impl->mutex_.unlock();
- }
- else
- {
- // The handler is acquiring the strand lock and so is responsible for
- // scheduling the strand.
- impl->locked_ = true;
- impl->mutex_.unlock();
- impl->ready_queue_.push(op);
- io_context_.post_immediate_completion(impl, false);
- }
-
- return false;
-}
-
-void strand_service::do_post(implementation_type& impl,
- operation* op, bool is_continuation)
-{
- impl->mutex_.lock();
- if (impl->locked_)
- {
- // Some other handler already holds the strand lock. Enqueue for later.
- impl->waiting_queue_.push(op);
- impl->mutex_.unlock();
- }
- else
- {
- // The handler is acquiring the strand lock and so is responsible for
- // scheduling the strand.
- impl->locked_ = true;
- impl->mutex_.unlock();
- impl->ready_queue_.push(op);
- io_context_.post_immediate_completion(impl, is_continuation);
- }
-}
-
-void strand_service::do_complete(void* owner, operation* base,
- const boost::system::error_code& ec, std::size_t /*bytes_transferred*/)
-{
- if (owner)
- {
- strand_impl* impl = static_cast<strand_impl*>(base);
-
- // Indicate that this strand is executing on the current thread.
- call_stack<strand_impl>::context ctx(impl);
-
- // Ensure the next handler, if any, is scheduled on block exit.
- on_do_complete_exit on_exit;
- on_exit.owner_ = static_cast<io_context_impl*>(owner);
- on_exit.impl_ = impl;
-
- // Run all ready handlers. No lock is required since the ready queue is
- // accessed only within the strand.
- while (operation* o = impl->ready_queue_.front())
- {
- impl->ready_queue_.pop();
- o->complete(owner, ec, 0);
- }
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp
deleted file mode 100644
index ffcacf47ae8..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// detail/impl/throw_error.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_IMPL_THROW_ERROR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP
-
-#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/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/system/system_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-void do_throw_error(const boost::system::error_code& err)
-{
- boost::system::system_error e(err);
- boost::asio::detail::throw_exception(e);
-}
-
-void do_throw_error(const boost::system::error_code& err, const char* location)
-{
- boost::system::system_error e(err, location);
- boost::asio::detail::throw_exception(e);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 8a6d5af8155..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_ptime.ipp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// detail/impl/timer_queue_ptime.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_IMPL_TIMER_QUEUE_PTIME_IPP
-#define BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
-
-#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_BOOST_DATE_TIME)
-
-#include <boost/asio/detail/timer_queue_ptime.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-timer_queue<time_traits<boost::posix_time::ptime> >::timer_queue()
-{
-}
-
-timer_queue<time_traits<boost::posix_time::ptime> >::~timer_queue()
-{
-}
-
-bool timer_queue<time_traits<boost::posix_time::ptime> >::enqueue_timer(
- const time_type& time, per_timer_data& timer, wait_op* op)
-{
- return impl_.enqueue_timer(time, timer, op);
-}
-
-bool timer_queue<time_traits<boost::posix_time::ptime> >::empty() const
-{
- return impl_.empty();
-}
-
-long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_msec(
- long max_duration) const
-{
- return impl_.wait_duration_msec(max_duration);
-}
-
-long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_usec(
- long max_duration) const
-{
- return impl_.wait_duration_usec(max_duration);
-}
-
-void timer_queue<time_traits<boost::posix_time::ptime> >::get_ready_timers(
- op_queue<operation>& ops)
-{
- impl_.get_ready_timers(ops);
-}
-
-void timer_queue<time_traits<boost::posix_time::ptime> >::get_all_timers(
- op_queue<operation>& ops)
-{
- impl_.get_all_timers(ops);
-}
-
-std::size_t timer_queue<time_traits<boost::posix_time::ptime> >::cancel_timer(
- per_timer_data& timer, op_queue<operation>& ops, std::size_t max_cancelled)
-{
- return impl_.cancel_timer(timer, ops, max_cancelled);
-}
-
-void timer_queue<time_traits<boost::posix_time::ptime> >::move_timer(
- per_timer_data& target, per_timer_data& source)
-{
- impl_.move_timer(target, source);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 71f83216aa7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_set.ipp
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// detail/impl/timer_queue_set.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_IMPL_TIMER_QUEUE_SET_IPP
-#define BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP
-
-#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/timer_queue_set.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-timer_queue_set::timer_queue_set()
- : first_(0)
-{
-}
-
-void timer_queue_set::insert(timer_queue_base* q)
-{
- q->next_ = first_;
- first_ = q;
-}
-
-void timer_queue_set::erase(timer_queue_base* q)
-{
- if (first_)
- {
- if (q == first_)
- {
- first_ = q->next_;
- q->next_ = 0;
- return;
- }
-
- for (timer_queue_base* p = first_; p->next_; p = p->next_)
- {
- if (p->next_ == q)
- {
- p->next_ = q->next_;
- q->next_ = 0;
- return;
- }
- }
- }
-}
-
-bool timer_queue_set::all_empty() const
-{
- for (timer_queue_base* p = first_; p; p = p->next_)
- if (!p->empty())
- return false;
- return true;
-}
-
-long timer_queue_set::wait_duration_msec(long max_duration) const
-{
- long min_duration = max_duration;
- for (timer_queue_base* p = first_; p; p = p->next_)
- min_duration = p->wait_duration_msec(min_duration);
- return min_duration;
-}
-
-long timer_queue_set::wait_duration_usec(long max_duration) const
-{
- long min_duration = max_duration;
- for (timer_queue_base* p = first_; p; p = p->next_)
- min_duration = p->wait_duration_usec(min_duration);
- return min_duration;
-}
-
-void timer_queue_set::get_ready_timers(op_queue<operation>& ops)
-{
- for (timer_queue_base* p = first_; p; p = p->next_)
- p->get_ready_timers(ops);
-}
-
-void timer_queue_set::get_all_timers(op_queue<operation>& ops)
-{
- for (timer_queue_base* p = first_; p; p = p->next_)
- p->get_all_timers(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp
deleted file mode 100644
index 3e7dfdcf212..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// detail/win_event.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_IMPL_WIN_EVENT_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_EVENT_IPP
-
-#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_WINDOWS)
-
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_event.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-win_event::win_event()
- : state_(0)
-{
-#if defined(BOOST_ASIO_WINDOWS_APP)
- events_[0] = ::CreateEventExW(0, 0,
- CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
-#else // defined(BOOST_ASIO_WINDOWS_APP)
- events_[0] = ::CreateEventW(0, true, false, 0);
-#endif // defined(BOOST_ASIO_WINDOWS_APP)
- if (!events_[0])
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "event");
- }
-
-#if defined(BOOST_ASIO_WINDOWS_APP)
- events_[1] = ::CreateEventExW(0, 0, 0, EVENT_ALL_ACCESS);
-#else // defined(BOOST_ASIO_WINDOWS_APP)
- events_[1] = ::CreateEventW(0, false, false, 0);
-#endif // defined(BOOST_ASIO_WINDOWS_APP)
- if (!events_[1])
- {
- DWORD last_error = ::GetLastError();
- ::CloseHandle(events_[0]);
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "event");
- }
-}
-
-win_event::~win_event()
-{
- ::CloseHandle(events_[0]);
- ::CloseHandle(events_[1]);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_EVENT_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 0cd7dd17193..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_handle_service.ipp
+++ /dev/null
@@ -1,527 +0,0 @@
-//
-// detail/impl/win_iocp_handle_service.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_WIN_IOCP_HANDLE_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_HANDLE_SERVICE_IPP
-
-#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_IOCP)
-
-#include <boost/asio/detail/win_iocp_handle_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_iocp_handle_service::overlapped_wrapper
- : public OVERLAPPED
-{
-public:
- explicit overlapped_wrapper(boost::system::error_code& ec)
- {
- Internal = 0;
- InternalHigh = 0;
- Offset = 0;
- OffsetHigh = 0;
-
- // Create a non-signalled manual-reset event, for GetOverlappedResult.
- hEvent = ::CreateEventW(0, TRUE, FALSE, 0);
- if (hEvent)
- {
- // As documented in GetQueuedCompletionStatus, setting the low order
- // bit of this event prevents our synchronous writes from being treated
- // as completion port events.
- DWORD_PTR tmp = reinterpret_cast<DWORD_PTR>(hEvent);
- hEvent = reinterpret_cast<HANDLE>(tmp | 1);
- }
- else
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- }
-
- ~overlapped_wrapper()
- {
- if (hEvent)
- {
- ::CloseHandle(hEvent);
- }
- }
-};
-
-win_iocp_handle_service::win_iocp_handle_service(
- boost::asio::io_context& io_context)
- : service_base<win_iocp_handle_service>(io_context),
- iocp_service_(boost::asio::use_service<win_iocp_io_context>(io_context)),
- mutex_(),
- impl_list_(0)
-{
-}
-
-void win_iocp_handle_service::shutdown()
-{
- // Close all implementations, causing all operations to complete.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- implementation_type* impl = impl_list_;
- while (impl)
- {
- close_for_destruction(*impl);
- impl = impl->next_;
- }
-}
-
-void win_iocp_handle_service::construct(
- win_iocp_handle_service::implementation_type& impl)
-{
- impl.handle_ = INVALID_HANDLE_VALUE;
- impl.safe_cancellation_thread_id_ = 0;
-
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
-}
-
-void win_iocp_handle_service::move_construct(
- win_iocp_handle_service::implementation_type& impl,
- win_iocp_handle_service::implementation_type& other_impl)
-{
- impl.handle_ = other_impl.handle_;
- other_impl.handle_ = INVALID_HANDLE_VALUE;
-
- impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
- other_impl.safe_cancellation_thread_id_ = 0;
-
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
-}
-
-void win_iocp_handle_service::move_assign(
- win_iocp_handle_service::implementation_type& impl,
- win_iocp_handle_service& other_service,
- win_iocp_handle_service::implementation_type& other_impl)
-{
- close_for_destruction(impl);
-
- if (this != &other_service)
- {
- // Remove implementation from linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
- }
-
- impl.handle_ = other_impl.handle_;
- other_impl.handle_ = INVALID_HANDLE_VALUE;
-
- impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
- other_impl.safe_cancellation_thread_id_ = 0;
-
- if (this != &other_service)
- {
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(other_service.mutex_);
- impl.next_ = other_service.impl_list_;
- impl.prev_ = 0;
- if (other_service.impl_list_)
- other_service.impl_list_->prev_ = &impl;
- other_service.impl_list_ = &impl;
- }
-}
-
-void win_iocp_handle_service::destroy(
- win_iocp_handle_service::implementation_type& impl)
-{
- close_for_destruction(impl);
-
- // Remove implementation from linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
-}
-
-boost::system::error_code win_iocp_handle_service::assign(
- win_iocp_handle_service::implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- if (iocp_service_.register_handle(handle, ec))
- return ec;
-
- impl.handle_ = handle;
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code win_iocp_handle_service::close(
- win_iocp_handle_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(), "handle",
- &impl, reinterpret_cast<uintmax_t>(impl.handle_), "close"));
-
- if (!::CloseHandle(impl.handle_))
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- else
- {
- ec = boost::system::error_code();
- }
-
- impl.handle_ = INVALID_HANDLE_VALUE;
- impl.safe_cancellation_thread_id_ = 0;
- }
- else
- {
- ec = boost::system::error_code();
- }
-
- return ec;
-}
-
-boost::system::error_code win_iocp_handle_service::cancel(
- win_iocp_handle_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return ec;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(), "handle",
- &impl, reinterpret_cast<uintmax_t>(impl.handle_), "cancel"));
-
- if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
- ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
- {
- // The version of Windows supports cancellation from any thread.
- typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
- cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
- if (!cancel_io_ex(impl.handle_, 0))
- {
- DWORD last_error = ::GetLastError();
- if (last_error == ERROR_NOT_FOUND)
- {
- // ERROR_NOT_FOUND means that there were no operations to be
- // cancelled. We swallow this error to match the behaviour on other
- // platforms.
- ec = boost::system::error_code();
- }
- else
- {
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- }
- else
- {
- ec = boost::system::error_code();
- }
- }
- else if (impl.safe_cancellation_thread_id_ == 0)
- {
- // No operations have been started, so there's nothing to cancel.
- ec = boost::system::error_code();
- }
- else if (impl.safe_cancellation_thread_id_ == ::GetCurrentThreadId())
- {
- // Asynchronous operations have been started from the current thread only,
- // so it is safe to try to cancel them using CancelIo.
- if (!::CancelIo(impl.handle_))
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- else
- {
- ec = boost::system::error_code();
- }
- }
- else
- {
- // Asynchronous operations have been started from more than one thread,
- // so cancellation is not safe.
- ec = boost::asio::error::operation_not_supported;
- }
-
- return ec;
-}
-
-size_t win_iocp_handle_service::do_write(
- win_iocp_handle_service::implementation_type& impl, uint64_t offset,
- const boost::asio::const_buffer& buffer, boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // A request to write 0 bytes on a handle is a no-op.
- if (buffer.size() == 0)
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- overlapped_wrapper overlapped(ec);
- if (ec)
- {
- return 0;
- }
-
- // Write the data.
- overlapped.Offset = offset & 0xFFFFFFFF;
- overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
- BOOL ok = ::WriteFile(impl.handle_, buffer.data(),
- static_cast<DWORD>(buffer.size()), 0, &overlapped);
- if (!ok)
- {
- DWORD last_error = ::GetLastError();
- if (last_error != ERROR_IO_PENDING)
- {
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return 0;
- }
- }
-
- // Wait for the operation to complete.
- DWORD bytes_transferred = 0;
- ok = ::GetOverlappedResult(impl.handle_,
- &overlapped, &bytes_transferred, TRUE);
- if (!ok)
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return 0;
- }
-
- ec = boost::system::error_code();
- return bytes_transferred;
-}
-
-void win_iocp_handle_service::start_write_op(
- win_iocp_handle_service::implementation_type& impl, uint64_t offset,
- const boost::asio::const_buffer& buffer, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (!is_open(impl))
- {
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- }
- else if (buffer.size() == 0)
- {
- // A request to write 0 bytes on a handle is a no-op.
- iocp_service_.on_completion(op);
- }
- else
- {
- DWORD bytes_transferred = 0;
- op->Offset = offset & 0xFFFFFFFF;
- op->OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
- BOOL ok = ::WriteFile(impl.handle_, buffer.data(),
- static_cast<DWORD>(buffer.size()),
- &bytes_transferred, op);
- DWORD last_error = ::GetLastError();
- if (!ok && last_error != ERROR_IO_PENDING
- && last_error != ERROR_MORE_DATA)
- {
- iocp_service_.on_completion(op, last_error, bytes_transferred);
- }
- else
- {
- iocp_service_.on_pending(op);
- }
- }
-}
-
-size_t win_iocp_handle_service::do_read(
- win_iocp_handle_service::implementation_type& impl, uint64_t offset,
- const boost::asio::mutable_buffer& buffer, boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // A request to read 0 bytes on a stream handle is a no-op.
- if (buffer.size() == 0)
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- overlapped_wrapper overlapped(ec);
- if (ec)
- {
- return 0;
- }
-
- // Read some data.
- overlapped.Offset = offset & 0xFFFFFFFF;
- overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
- BOOL ok = ::ReadFile(impl.handle_, buffer.data(),
- static_cast<DWORD>(buffer.size()), 0, &overlapped);
- if (!ok)
- {
- DWORD last_error = ::GetLastError();
- if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
- {
- if (last_error == ERROR_HANDLE_EOF)
- {
- ec = boost::asio::error::eof;
- }
- else
- {
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- return 0;
- }
- }
-
- // Wait for the operation to complete.
- DWORD bytes_transferred = 0;
- ok = ::GetOverlappedResult(impl.handle_,
- &overlapped, &bytes_transferred, TRUE);
- if (!ok)
- {
- DWORD last_error = ::GetLastError();
- if (last_error == ERROR_HANDLE_EOF)
- {
- ec = boost::asio::error::eof;
- }
- else
- {
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- return (last_error == ERROR_MORE_DATA) ? bytes_transferred : 0;
- }
-
- ec = boost::system::error_code();
- return bytes_transferred;
-}
-
-void win_iocp_handle_service::start_read_op(
- win_iocp_handle_service::implementation_type& impl, uint64_t offset,
- const boost::asio::mutable_buffer& buffer, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (!is_open(impl))
- {
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- }
- else if (buffer.size() == 0)
- {
- // A request to read 0 bytes on a handle is a no-op.
- iocp_service_.on_completion(op);
- }
- else
- {
- DWORD bytes_transferred = 0;
- op->Offset = offset & 0xFFFFFFFF;
- op->OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
- BOOL ok = ::ReadFile(impl.handle_, buffer.data(),
- static_cast<DWORD>(buffer.size()),
- &bytes_transferred, op);
- DWORD last_error = ::GetLastError();
- if (!ok && last_error != ERROR_IO_PENDING
- && last_error != ERROR_MORE_DATA)
- {
- iocp_service_.on_completion(op, last_error, bytes_transferred);
- }
- else
- {
- iocp_service_.on_pending(op);
- }
- }
-}
-
-void win_iocp_handle_service::update_cancellation_thread_id(
- win_iocp_handle_service::implementation_type& impl)
-{
- if (impl.safe_cancellation_thread_id_ == 0)
- impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId();
- else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId())
- impl.safe_cancellation_thread_id_ = ~DWORD(0);
-}
-
-void win_iocp_handle_service::close_for_destruction(implementation_type& impl)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(), "handle",
- &impl, reinterpret_cast<uintmax_t>(impl.handle_), "close"));
-
- ::CloseHandle(impl.handle_);
- impl.handle_ = INVALID_HANDLE_VALUE;
- impl.safe_cancellation_thread_id_ = 0;
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_HANDLE_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 771c1f3c3ae..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// detail/impl/win_iocp_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_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_HPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_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_IOCP)
-
-#include <boost/asio/detail/completion_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-void win_iocp_io_context::add_timer_queue(
- timer_queue<Time_Traits>& queue)
-{
- do_add_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void win_iocp_io_context::remove_timer_queue(
- timer_queue<Time_Traits>& queue)
-{
- do_remove_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void win_iocp_io_context::schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
-{
- // If the service has been shut down we silently discard the timer.
- if (::InterlockedExchangeAdd(&shutdown_, 0) != 0)
- {
- post_immediate_completion(op, false);
- return;
- }
-
- mutex::scoped_lock lock(dispatch_mutex_);
-
- bool earliest = queue.enqueue_timer(time, timer, op);
- work_started();
- if (earliest)
- update_timeout();
-}
-
-template <typename Time_Traits>
-std::size_t win_iocp_io_context::cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled)
-{
- // If the service has been shut down we silently ignore the cancellation.
- if (::InterlockedExchangeAdd(&shutdown_, 0) != 0)
- return 0;
-
- mutex::scoped_lock lock(dispatch_mutex_);
- op_queue<win_iocp_operation> ops;
- std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
- post_deferred_completions(ops);
- return n;
-}
-
-template <typename Time_Traits>
-void win_iocp_io_context::move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& to,
- typename timer_queue<Time_Traits>::per_timer_data& from)
-{
- boost::asio::detail::mutex::scoped_lock lock(dispatch_mutex_);
- op_queue<operation> ops;
- queue.cancel_timer(to, ops);
- queue.move_timer(to, from);
- lock.unlock();
- post_deferred_completions(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 87637f0b5c5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.ipp
+++ /dev/null
@@ -1,556 +0,0 @@
-//
-// detail/impl/win_iocp_io_context.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_IMPL_WIN_IOCP_IO_CONTEXT_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_IPP
-
-#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_IOCP)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_iocp_io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct win_iocp_io_context::work_finished_on_block_exit
-{
- ~work_finished_on_block_exit()
- {
- io_context_->work_finished();
- }
-
- win_iocp_io_context* io_context_;
-};
-
-struct win_iocp_io_context::timer_thread_function
-{
- void operator()()
- {
- while (::InterlockedExchangeAdd(&io_context_->shutdown_, 0) == 0)
- {
- if (::WaitForSingleObject(io_context_->waitable_timer_.handle,
- INFINITE) == WAIT_OBJECT_0)
- {
- ::InterlockedExchange(&io_context_->dispatch_required_, 1);
- ::PostQueuedCompletionStatus(io_context_->iocp_.handle,
- 0, wake_for_dispatch, 0);
- }
- }
- }
-
- win_iocp_io_context* io_context_;
-};
-
-win_iocp_io_context::win_iocp_io_context(
- boost::asio::execution_context& ctx, int concurrency_hint)
- : execution_context_service_base<win_iocp_io_context>(ctx),
- iocp_(),
- outstanding_work_(0),
- stopped_(0),
- stop_event_posted_(0),
- shutdown_(0),
- gqcs_timeout_(get_gqcs_timeout()),
- dispatch_required_(0),
- concurrency_hint_(concurrency_hint)
-{
- BOOST_ASIO_HANDLER_TRACKING_INIT;
-
- iocp_.handle = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0,
- static_cast<DWORD>(concurrency_hint >= 0 ? concurrency_hint : DWORD(~0)));
- if (!iocp_.handle)
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "iocp");
- }
-}
-
-void win_iocp_io_context::shutdown()
-{
- ::InterlockedExchange(&shutdown_, 1);
-
- if (timer_thread_.get())
- {
- LARGE_INTEGER timeout;
- timeout.QuadPart = 1;
- ::SetWaitableTimer(waitable_timer_.handle, &timeout, 1, 0, 0, FALSE);
- }
-
- while (::InterlockedExchangeAdd(&outstanding_work_, 0) > 0)
- {
- op_queue<win_iocp_operation> ops;
- timer_queues_.get_all_timers(ops);
- ops.push(completed_ops_);
- if (!ops.empty())
- {
- while (win_iocp_operation* op = ops.front())
- {
- ops.pop();
- ::InterlockedDecrement(&outstanding_work_);
- op->destroy();
- }
- }
- else
- {
- DWORD bytes_transferred = 0;
- dword_ptr_t completion_key = 0;
- LPOVERLAPPED overlapped = 0;
- ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
- &completion_key, &overlapped, gqcs_timeout_);
- if (overlapped)
- {
- ::InterlockedDecrement(&outstanding_work_);
- static_cast<win_iocp_operation*>(overlapped)->destroy();
- }
- }
- }
-
- if (timer_thread_.get())
- timer_thread_->join();
-}
-
-boost::system::error_code win_iocp_io_context::register_handle(
- HANDLE handle, boost::system::error_code& ec)
-{
- if (::CreateIoCompletionPort(handle, iocp_.handle, 0, 0) == 0)
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- else
- {
- ec = boost::system::error_code();
- }
- return ec;
-}
-
-size_t win_iocp_io_context::run(boost::system::error_code& ec)
-{
- if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
- {
- stop();
- ec = boost::system::error_code();
- return 0;
- }
-
- win_iocp_thread_info this_thread;
- thread_call_stack::context ctx(this, this_thread);
-
- size_t n = 0;
- while (do_one(INFINITE, ec))
- if (n != (std::numeric_limits<size_t>::max)())
- ++n;
- return n;
-}
-
-size_t win_iocp_io_context::run_one(boost::system::error_code& ec)
-{
- if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
- {
- stop();
- ec = boost::system::error_code();
- return 0;
- }
-
- win_iocp_thread_info this_thread;
- thread_call_stack::context ctx(this, this_thread);
-
- return do_one(INFINITE, ec);
-}
-
-size_t win_iocp_io_context::wait_one(long usec, boost::system::error_code& ec)
-{
- if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
- {
- stop();
- ec = boost::system::error_code();
- return 0;
- }
-
- win_iocp_thread_info this_thread;
- thread_call_stack::context ctx(this, this_thread);
-
- return do_one(usec < 0 ? INFINITE : ((usec - 1) / 1000 + 1), ec);
-}
-
-size_t win_iocp_io_context::poll(boost::system::error_code& ec)
-{
- if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
- {
- stop();
- ec = boost::system::error_code();
- return 0;
- }
-
- win_iocp_thread_info this_thread;
- thread_call_stack::context ctx(this, this_thread);
-
- size_t n = 0;
- while (do_one(0, ec))
- if (n != (std::numeric_limits<size_t>::max)())
- ++n;
- return n;
-}
-
-size_t win_iocp_io_context::poll_one(boost::system::error_code& ec)
-{
- if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
- {
- stop();
- ec = boost::system::error_code();
- return 0;
- }
-
- win_iocp_thread_info this_thread;
- thread_call_stack::context ctx(this, this_thread);
-
- return do_one(0, ec);
-}
-
-void win_iocp_io_context::stop()
-{
- if (::InterlockedExchange(&stopped_, 1) == 0)
- {
- if (::InterlockedExchange(&stop_event_posted_, 1) == 0)
- {
- if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "pqcs");
- }
- }
- }
-}
-
-void win_iocp_io_context::post_deferred_completion(win_iocp_operation* op)
-{
- // Flag the operation as ready.
- op->ready_ = 1;
-
- // Enqueue the operation on the I/O completion port.
- if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
- {
- // Out of resources. Put on completed queue instead.
- mutex::scoped_lock lock(dispatch_mutex_);
- completed_ops_.push(op);
- ::InterlockedExchange(&dispatch_required_, 1);
- }
-}
-
-void win_iocp_io_context::post_deferred_completions(
- op_queue<win_iocp_operation>& ops)
-{
- while (win_iocp_operation* op = ops.front())
- {
- ops.pop();
-
- // Flag the operation as ready.
- op->ready_ = 1;
-
- // Enqueue the operation on the I/O completion port.
- if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
- {
- // Out of resources. Put on completed queue instead.
- mutex::scoped_lock lock(dispatch_mutex_);
- completed_ops_.push(op);
- completed_ops_.push(ops);
- ::InterlockedExchange(&dispatch_required_, 1);
- }
- }
-}
-
-void win_iocp_io_context::abandon_operations(
- op_queue<win_iocp_operation>& ops)
-{
- while (win_iocp_operation* op = ops.front())
- {
- ops.pop();
- ::InterlockedDecrement(&outstanding_work_);
- op->destroy();
- }
-}
-
-void win_iocp_io_context::on_pending(win_iocp_operation* op)
-{
- if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
- {
- // Enqueue the operation on the I/O completion port.
- if (!::PostQueuedCompletionStatus(iocp_.handle,
- 0, overlapped_contains_result, op))
- {
- // Out of resources. Put on completed queue instead.
- mutex::scoped_lock lock(dispatch_mutex_);
- completed_ops_.push(op);
- ::InterlockedExchange(&dispatch_required_, 1);
- }
- }
-}
-
-void win_iocp_io_context::on_completion(win_iocp_operation* op,
- DWORD last_error, DWORD bytes_transferred)
-{
- // Flag that the operation is ready for invocation.
- op->ready_ = 1;
-
- // Store results in the OVERLAPPED structure.
- op->Internal = reinterpret_cast<ulong_ptr_t>(
- &boost::asio::error::get_system_category());
- op->Offset = last_error;
- op->OffsetHigh = bytes_transferred;
-
- // Enqueue the operation on the I/O completion port.
- if (!::PostQueuedCompletionStatus(iocp_.handle,
- 0, overlapped_contains_result, op))
- {
- // Out of resources. Put on completed queue instead.
- mutex::scoped_lock lock(dispatch_mutex_);
- completed_ops_.push(op);
- ::InterlockedExchange(&dispatch_required_, 1);
- }
-}
-
-void win_iocp_io_context::on_completion(win_iocp_operation* op,
- const boost::system::error_code& ec, DWORD bytes_transferred)
-{
- // Flag that the operation is ready for invocation.
- op->ready_ = 1;
-
- // Store results in the OVERLAPPED structure.
- op->Internal = reinterpret_cast<ulong_ptr_t>(&ec.category());
- op->Offset = ec.value();
- op->OffsetHigh = bytes_transferred;
-
- // Enqueue the operation on the I/O completion port.
- if (!::PostQueuedCompletionStatus(iocp_.handle,
- 0, overlapped_contains_result, op))
- {
- // Out of resources. Put on completed queue instead.
- mutex::scoped_lock lock(dispatch_mutex_);
- completed_ops_.push(op);
- ::InterlockedExchange(&dispatch_required_, 1);
- }
-}
-
-size_t win_iocp_io_context::do_one(DWORD msec, boost::system::error_code& ec)
-{
- for (;;)
- {
- // Try to acquire responsibility for dispatching timers and completed ops.
- if (::InterlockedCompareExchange(&dispatch_required_, 0, 1) == 1)
- {
- mutex::scoped_lock lock(dispatch_mutex_);
-
- // Dispatch pending timers and operations.
- op_queue<win_iocp_operation> ops;
- ops.push(completed_ops_);
- timer_queues_.get_ready_timers(ops);
- post_deferred_completions(ops);
- update_timeout();
- }
-
- // Get the next operation from the queue.
- DWORD bytes_transferred = 0;
- dword_ptr_t completion_key = 0;
- LPOVERLAPPED overlapped = 0;
- ::SetLastError(0);
- BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle,
- &bytes_transferred, &completion_key, &overlapped,
- msec < gqcs_timeout_ ? msec : gqcs_timeout_);
- DWORD last_error = ::GetLastError();
-
- if (overlapped)
- {
- win_iocp_operation* op = static_cast<win_iocp_operation*>(overlapped);
- boost::system::error_code result_ec(last_error,
- boost::asio::error::get_system_category());
-
- // We may have been passed the last_error and bytes_transferred in the
- // OVERLAPPED structure itself.
- if (completion_key == overlapped_contains_result)
- {
- result_ec = boost::system::error_code(static_cast<int>(op->Offset),
- *reinterpret_cast<boost::system::error_category*>(op->Internal));
- bytes_transferred = op->OffsetHigh;
- }
-
- // Otherwise ensure any result has been saved into the OVERLAPPED
- // structure.
- else
- {
- op->Internal = reinterpret_cast<ulong_ptr_t>(&result_ec.category());
- op->Offset = result_ec.value();
- op->OffsetHigh = bytes_transferred;
- }
-
- // Dispatch the operation only if ready. The operation may not be ready
- // if the initiating function (e.g. a call to WSARecv) has not yet
- // returned. This is because the initiating function still wants access
- // to the operation's OVERLAPPED structure.
- if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
- {
- // Ensure the count of outstanding work is decremented on block exit.
- work_finished_on_block_exit on_exit = { this };
- (void)on_exit;
-
- op->complete(this, result_ec, bytes_transferred);
- ec = boost::system::error_code();
- return 1;
- }
- }
- else if (!ok)
- {
- if (last_error != WAIT_TIMEOUT)
- {
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return 0;
- }
-
- // If we're waiting indefinitely we need to keep going until we get a
- // real handler.
- if (msec == INFINITE)
- continue;
-
- ec = boost::system::error_code();
- return 0;
- }
- else if (completion_key == wake_for_dispatch)
- {
- // We have been woken up to try to acquire responsibility for dispatching
- // timers and completed operations.
- }
- else
- {
- // Indicate that there is no longer an in-flight stop event.
- ::InterlockedExchange(&stop_event_posted_, 0);
-
- // The stopped_ flag is always checked to ensure that any leftover
- // stop events from a previous run invocation are ignored.
- if (::InterlockedExchangeAdd(&stopped_, 0) != 0)
- {
- // Wake up next thread that is blocked on GetQueuedCompletionStatus.
- if (::InterlockedExchange(&stop_event_posted_, 1) == 0)
- {
- if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
- {
- last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return 0;
- }
- }
-
- ec = boost::system::error_code();
- return 0;
- }
- }
- }
-}
-
-DWORD win_iocp_io_context::get_gqcs_timeout()
-{
- OSVERSIONINFOEX osvi;
- ZeroMemory(&osvi, sizeof(osvi));
- osvi.dwOSVersionInfoSize = sizeof(osvi);
- osvi.dwMajorVersion = 6ul;
-
- const uint64_t condition_mask = ::VerSetConditionMask(
- 0, VER_MAJORVERSION, VER_GREATER_EQUAL);
-
- if (!!::VerifyVersionInfo(&osvi, VER_MAJORVERSION, condition_mask))
- return INFINITE;
-
- return default_gqcs_timeout;
-}
-
-void win_iocp_io_context::do_add_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(dispatch_mutex_);
-
- timer_queues_.insert(&queue);
-
- if (!waitable_timer_.handle)
- {
- waitable_timer_.handle = ::CreateWaitableTimer(0, FALSE, 0);
- if (waitable_timer_.handle == 0)
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "timer");
- }
-
- LARGE_INTEGER timeout;
- timeout.QuadPart = -max_timeout_usec;
- timeout.QuadPart *= 10;
- ::SetWaitableTimer(waitable_timer_.handle,
- &timeout, max_timeout_msec, 0, 0, FALSE);
- }
-
- if (!timer_thread_.get())
- {
- timer_thread_function thread_function = { this };
- timer_thread_.reset(new thread(thread_function, 65536));
- }
-}
-
-void win_iocp_io_context::do_remove_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(dispatch_mutex_);
-
- timer_queues_.erase(&queue);
-}
-
-void win_iocp_io_context::update_timeout()
-{
- if (timer_thread_.get())
- {
- // There's no point updating the waitable timer if the new timeout period
- // exceeds the maximum timeout. In that case, we might as well wait for the
- // existing period of the timer to expire.
- long timeout_usec = timer_queues_.wait_duration_usec(max_timeout_usec);
- if (timeout_usec < max_timeout_usec)
- {
- LARGE_INTEGER timeout;
- timeout.QuadPart = -timeout_usec;
- timeout.QuadPart *= 10;
- ::SetWaitableTimer(waitable_timer_.handle,
- &timeout, max_timeout_msec, 0, 0, FALSE);
- }
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 7dbf9353ee0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
+++ /dev/null
@@ -1,183 +0,0 @@
-//
-// detail/impl/win_iocp_serial_port_service.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_WIN_IOCP_SERIAL_PORT_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SERIAL_PORT_SERVICE_IPP
-
-#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_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#include <cstring>
-#include <boost/asio/detail/win_iocp_serial_port_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-win_iocp_serial_port_service::win_iocp_serial_port_service(
- boost::asio::io_context& io_context)
- : service_base<win_iocp_serial_port_service>(io_context),
- handle_service_(io_context)
-{
-}
-
-void win_iocp_serial_port_service::shutdown()
-{
-}
-
-boost::system::error_code win_iocp_serial_port_service::open(
- win_iocp_serial_port_service::implementation_type& impl,
- const std::string& device, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- // For convenience, add a leading \\.\ sequence if not already present.
- std::string name = (device[0] == '\\') ? device : "\\\\.\\" + device;
-
- // Open a handle to the serial port.
- ::HANDLE handle = ::CreateFileA(name.c_str(),
- GENERIC_READ | GENERIC_WRITE, 0, 0,
- OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
- if (handle == INVALID_HANDLE_VALUE)
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- // Determine the initial serial port parameters.
- using namespace std; // For memset.
- ::DCB dcb;
- memset(&dcb, 0, sizeof(DCB));
- dcb.DCBlength = sizeof(DCB);
- if (!::GetCommState(handle, &dcb))
- {
- DWORD last_error = ::GetLastError();
- ::CloseHandle(handle);
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- // Set some default serial port parameters. This implementation does not
- // support changing these, so they might as well be in a known state.
- dcb.fBinary = TRUE; // Win32 only supports binary mode.
- dcb.fDsrSensitivity = FALSE;
- dcb.fNull = FALSE; // Do not ignore NULL characters.
- dcb.fAbortOnError = FALSE; // Ignore serial framing errors.
- if (!::SetCommState(handle, &dcb))
- {
- DWORD last_error = ::GetLastError();
- ::CloseHandle(handle);
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- // Set up timeouts so that the serial port will behave similarly to a
- // network socket. Reads wait for at least one byte, then return with
- // whatever they have. Writes return once everything is out the door.
- ::COMMTIMEOUTS timeouts;
- timeouts.ReadIntervalTimeout = 1;
- timeouts.ReadTotalTimeoutMultiplier = 0;
- timeouts.ReadTotalTimeoutConstant = 0;
- timeouts.WriteTotalTimeoutMultiplier = 0;
- timeouts.WriteTotalTimeoutConstant = 0;
- if (!::SetCommTimeouts(handle, &timeouts))
- {
- DWORD last_error = ::GetLastError();
- ::CloseHandle(handle);
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- // We're done. Take ownership of the serial port handle.
- if (handle_service_.assign(impl, handle, ec))
- ::CloseHandle(handle);
- return ec;
-}
-
-boost::system::error_code win_iocp_serial_port_service::do_set_option(
- win_iocp_serial_port_service::implementation_type& impl,
- win_iocp_serial_port_service::store_function_type store,
- const void* option, boost::system::error_code& ec)
-{
- using namespace std; // For memcpy.
-
- ::DCB dcb;
- memset(&dcb, 0, sizeof(DCB));
- dcb.DCBlength = sizeof(DCB);
- if (!::GetCommState(handle_service_.native_handle(impl), &dcb))
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- if (store(option, dcb, ec))
- return ec;
-
- if (!::SetCommState(handle_service_.native_handle(impl), &dcb))
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code win_iocp_serial_port_service::do_get_option(
- const win_iocp_serial_port_service::implementation_type& impl,
- win_iocp_serial_port_service::load_function_type load,
- void* option, boost::system::error_code& ec) const
-{
- using namespace std; // For memset.
-
- ::DCB dcb;
- memset(&dcb, 0, sizeof(DCB));
- dcb.DCBlength = sizeof(DCB);
- if (!::GetCommState(handle_service_.native_handle(impl), &dcb))
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- return ec;
- }
-
- return load(option, dcb, ec);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SERIAL_PORT_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 3b7e7066f59..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ /dev/null
@@ -1,801 +0,0 @@
-//
-// detail/impl/win_iocp_socket_service_base.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_IMPL_WIN_IOCP_SOCKET_SERVICE_BASE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SOCKET_SERVICE_BASE_IPP
-
-#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_IOCP)
-
-#include <boost/asio/detail/win_iocp_socket_service_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-win_iocp_socket_service_base::win_iocp_socket_service_base(
- boost::asio::io_context& io_context)
- : io_context_(io_context),
- iocp_service_(use_service<win_iocp_io_context>(io_context)),
- reactor_(0),
- connect_ex_(0),
- nt_set_info_(0),
- mutex_(),
- impl_list_(0)
-{
-}
-
-void win_iocp_socket_service_base::base_shutdown()
-{
- // Close all implementations, causing all operations to complete.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- base_implementation_type* impl = impl_list_;
- while (impl)
- {
- close_for_destruction(*impl);
- impl = impl->next_;
- }
-}
-
-void win_iocp_socket_service_base::construct(
- win_iocp_socket_service_base::base_implementation_type& impl)
-{
- impl.socket_ = invalid_socket;
- impl.state_ = 0;
- impl.cancel_token_.reset();
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- impl.safe_cancellation_thread_id_ = 0;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
-}
-
-void win_iocp_socket_service_base::base_move_construct(
- win_iocp_socket_service_base::base_implementation_type& impl,
- win_iocp_socket_service_base::base_implementation_type& other_impl)
-{
- impl.socket_ = other_impl.socket_;
- other_impl.socket_ = invalid_socket;
-
- impl.state_ = other_impl.state_;
- other_impl.state_ = 0;
-
- impl.cancel_token_ = other_impl.cancel_token_;
- other_impl.cancel_token_.reset();
-
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
- other_impl.safe_cancellation_thread_id_ = 0;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
-}
-
-void win_iocp_socket_service_base::base_move_assign(
- win_iocp_socket_service_base::base_implementation_type& impl,
- win_iocp_socket_service_base& other_service,
- win_iocp_socket_service_base::base_implementation_type& other_impl)
-{
- close_for_destruction(impl);
-
- if (this != &other_service)
- {
- // Remove implementation from linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
- }
-
- impl.socket_ = other_impl.socket_;
- other_impl.socket_ = invalid_socket;
-
- impl.state_ = other_impl.state_;
- other_impl.state_ = 0;
-
- impl.cancel_token_ = other_impl.cancel_token_;
- other_impl.cancel_token_.reset();
-
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
- other_impl.safe_cancellation_thread_id_ = 0;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-
- if (this != &other_service)
- {
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(other_service.mutex_);
- impl.next_ = other_service.impl_list_;
- impl.prev_ = 0;
- if (other_service.impl_list_)
- other_service.impl_list_->prev_ = &impl;
- other_service.impl_list_ = &impl;
- }
-}
-
-void win_iocp_socket_service_base::destroy(
- win_iocp_socket_service_base::base_implementation_type& impl)
-{
- close_for_destruction(impl);
-
- // Remove implementation from linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
-}
-
-boost::system::error_code win_iocp_socket_service_base::close(
- win_iocp_socket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(),
- "socket", &impl, impl.socket_, "close"));
-
- // Check if the reactor was created, in which case we need to close the
- // socket on the reactor as well to cancel any operations that might be
- // running there.
- select_reactor* r = static_cast<select_reactor*>(
- interlocked_compare_exchange_pointer(
- reinterpret_cast<void**>(&reactor_), 0, 0));
- if (r)
- r->deregister_descriptor(impl.socket_, impl.reactor_data_, true);
-
- socket_ops::close(impl.socket_, impl.state_, false, ec);
-
- if (r)
- r->cleanup_descriptor_data(impl.reactor_data_);
- }
- else
- {
- ec = boost::system::error_code();
- }
-
- impl.socket_ = invalid_socket;
- impl.state_ = 0;
- impl.cancel_token_.reset();
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- impl.safe_cancellation_thread_id_ = 0;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-
- return ec;
-}
-
-socket_type win_iocp_socket_service_base::release(
- win_iocp_socket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- return invalid_socket;
-
- cancel(impl, ec);
- if (ec)
- return invalid_socket;
-
- nt_set_info_fn fn = get_nt_set_info();
- if (fn == 0)
- {
- ec = boost::asio::error::operation_not_supported;
- return invalid_socket;
- }
-
- HANDLE sock_as_handle = reinterpret_cast<HANDLE>(impl.socket_);
- ULONG_PTR iosb[2] = { 0, 0 };
- void* info[2] = { 0, 0 };
- if (fn(sock_as_handle, iosb, &info, sizeof(info),
- 61 /* FileReplaceCompletionInformation */))
- {
- ec = boost::asio::error::operation_not_supported;
- return invalid_socket;
- }
-
- socket_type tmp = impl.socket_;
- impl.socket_ = invalid_socket;
- return tmp;
-}
-
-boost::system::error_code win_iocp_socket_service_base::cancel(
- win_iocp_socket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return ec;
- }
-
- BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(),
- "socket", &impl, impl.socket_, "cancel"));
-
- if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
- ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
- {
- // The version of Windows supports cancellation from any thread.
- typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
- cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
- socket_type sock = impl.socket_;
- HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock);
- if (!cancel_io_ex(sock_as_handle, 0))
- {
- DWORD last_error = ::GetLastError();
- if (last_error == ERROR_NOT_FOUND)
- {
- // ERROR_NOT_FOUND means that there were no operations to be
- // cancelled. We swallow this error to match the behaviour on other
- // platforms.
- ec = boost::system::error_code();
- }
- else
- {
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- }
- else
- {
- ec = boost::system::error_code();
- }
- }
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- else if (impl.safe_cancellation_thread_id_ == 0)
- {
- // No operations have been started, so there's nothing to cancel.
- ec = boost::system::error_code();
- }
- else if (impl.safe_cancellation_thread_id_ == ::GetCurrentThreadId())
- {
- // Asynchronous operations have been started from the current thread only,
- // so it is safe to try to cancel them using CancelIo.
- socket_type sock = impl.socket_;
- HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock);
- if (!::CancelIo(sock_as_handle))
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
- else
- {
- ec = boost::system::error_code();
- }
- }
- else
- {
- // Asynchronous operations have been started from more than one thread,
- // so cancellation is not safe.
- ec = boost::asio::error::operation_not_supported;
- }
-#else // defined(BOOST_ASIO_ENABLE_CANCELIO)
- else
- {
- // Cancellation is not supported as CancelIo may not be used.
- ec = boost::asio::error::operation_not_supported;
- }
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-
- // Cancel any operations started via the reactor.
- if (!ec)
- {
- select_reactor* r = static_cast<select_reactor*>(
- interlocked_compare_exchange_pointer(
- reinterpret_cast<void**>(&reactor_), 0, 0));
- if (r)
- r->cancel_ops(impl.socket_, impl.reactor_data_);
- }
-
- return ec;
-}
-
-boost::system::error_code win_iocp_socket_service_base::do_open(
- win_iocp_socket_service_base::base_implementation_type& impl,
- int family, int type, int protocol, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- socket_holder sock(socket_ops::socket(family, type, protocol, ec));
- if (sock.get() == invalid_socket)
- return ec;
-
- HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock.get());
- if (iocp_service_.register_handle(sock_as_handle, ec))
- return ec;
-
- impl.socket_ = sock.release();
- switch (type)
- {
- case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
- case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
- default: impl.state_ = 0; break;
- }
- impl.cancel_token_.reset(static_cast<void*>(0), socket_ops::noop_deleter());
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code win_iocp_socket_service_base::do_assign(
- win_iocp_socket_service_base::base_implementation_type& impl,
- int type, socket_type native_socket, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- HANDLE sock_as_handle = reinterpret_cast<HANDLE>(native_socket);
- if (iocp_service_.register_handle(sock_as_handle, ec))
- return ec;
-
- impl.socket_ = native_socket;
- switch (type)
- {
- case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
- case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
- default: impl.state_ = 0; break;
- }
- impl.cancel_token_.reset(static_cast<void*>(0), socket_ops::noop_deleter());
- ec = boost::system::error_code();
- return ec;
-}
-
-void win_iocp_socket_service_base::start_send_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- socket_base::message_flags flags, bool noop, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (noop)
- iocp_service_.on_completion(op);
- else if (!is_open(impl))
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- else
- {
- DWORD bytes_transferred = 0;
- int result = ::WSASend(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count), &bytes_transferred, flags, op, 0);
- DWORD last_error = ::WSAGetLastError();
- if (last_error == ERROR_PORT_UNREACHABLE)
- last_error = WSAECONNREFUSED;
- if (result != 0 && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error, bytes_transferred);
- else
- iocp_service_.on_pending(op);
- }
-}
-
-void win_iocp_socket_service_base::start_send_to_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- const socket_addr_type* addr, int addrlen,
- socket_base::message_flags flags, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (!is_open(impl))
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- else
- {
- DWORD bytes_transferred = 0;
- int result = ::WSASendTo(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, flags, addr, addrlen, op, 0);
- DWORD last_error = ::WSAGetLastError();
- if (last_error == ERROR_PORT_UNREACHABLE)
- last_error = WSAECONNREFUSED;
- if (result != 0 && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error, bytes_transferred);
- else
- iocp_service_.on_pending(op);
- }
-}
-
-void win_iocp_socket_service_base::start_receive_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- socket_base::message_flags flags, bool noop, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (noop)
- iocp_service_.on_completion(op);
- else if (!is_open(impl))
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- else
- {
- DWORD bytes_transferred = 0;
- DWORD recv_flags = flags;
- int result = ::WSARecv(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, &recv_flags, op, 0);
- DWORD last_error = ::WSAGetLastError();
- if (last_error == ERROR_NETNAME_DELETED)
- last_error = WSAECONNRESET;
- else if (last_error == ERROR_PORT_UNREACHABLE)
- last_error = WSAECONNREFUSED;
- if (result != 0 && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error, bytes_transferred);
- else
- iocp_service_.on_pending(op);
- }
-}
-
-void win_iocp_socket_service_base::start_null_buffers_receive_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- socket_base::message_flags flags, reactor_op* op)
-{
- if ((impl.state_ & socket_ops::stream_oriented) != 0)
- {
- // For stream sockets on Windows, we may issue a 0-byte overlapped
- // WSARecv to wait until there is data available on the socket.
- ::WSABUF buf = { 0, 0 };
- start_receive_op(impl, &buf, 1, flags, false, op);
- }
- else
- {
- start_reactor_op(impl,
- (flags & socket_base::message_out_of_band)
- ? select_reactor::except_op : select_reactor::read_op,
- op);
- }
-}
-
-void win_iocp_socket_service_base::start_receive_from_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
- socket_base::message_flags flags, int* addrlen, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (!is_open(impl))
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- else
- {
- DWORD bytes_transferred = 0;
- DWORD recv_flags = flags;
- int result = ::WSARecvFrom(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, &recv_flags, addr, addrlen, op, 0);
- DWORD last_error = ::WSAGetLastError();
- if (last_error == ERROR_PORT_UNREACHABLE)
- last_error = WSAECONNREFUSED;
- if (result != 0 && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error, bytes_transferred);
- else
- iocp_service_.on_pending(op);
- }
-}
-
-void win_iocp_socket_service_base::start_accept_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- bool peer_is_open, socket_holder& new_socket, int family, int type,
- int protocol, void* output_buffer, DWORD address_length, operation* op)
-{
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- if (!is_open(impl))
- iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
- else if (peer_is_open)
- iocp_service_.on_completion(op, boost::asio::error::already_open);
- else
- {
- boost::system::error_code ec;
- new_socket.reset(socket_ops::socket(family, type, protocol, ec));
- if (new_socket.get() == invalid_socket)
- iocp_service_.on_completion(op, ec);
- else
- {
- DWORD bytes_read = 0;
- BOOL result = ::AcceptEx(impl.socket_, new_socket.get(), output_buffer,
- 0, address_length, address_length, &bytes_read, op);
- DWORD last_error = ::WSAGetLastError();
- if (!result && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error);
- else
- iocp_service_.on_pending(op);
- }
- }
-}
-
-void win_iocp_socket_service_base::restart_accept_op(
- socket_type s, socket_holder& new_socket, int family, int type,
- int protocol, void* output_buffer, DWORD address_length, operation* op)
-{
- new_socket.reset();
- iocp_service_.work_started();
-
- boost::system::error_code ec;
- new_socket.reset(socket_ops::socket(family, type, protocol, ec));
- if (new_socket.get() == invalid_socket)
- iocp_service_.on_completion(op, ec);
- else
- {
- DWORD bytes_read = 0;
- BOOL result = ::AcceptEx(s, new_socket.get(), output_buffer,
- 0, address_length, address_length, &bytes_read, op);
- DWORD last_error = ::WSAGetLastError();
- if (!result && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error);
- else
- iocp_service_.on_pending(op);
- }
-}
-
-void win_iocp_socket_service_base::start_reactor_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- int op_type, reactor_op* op)
-{
- select_reactor& r = get_reactor();
- update_cancellation_thread_id(impl);
-
- if (is_open(impl))
- {
- r.start_op(op_type, impl.socket_, impl.reactor_data_, op, false, false);
- return;
- }
- else
- op->ec_ = boost::asio::error::bad_descriptor;
-
- iocp_service_.post_immediate_completion(op, false);
-}
-
-void win_iocp_socket_service_base::start_connect_op(
- win_iocp_socket_service_base::base_implementation_type& impl,
- int family, int type, const socket_addr_type* addr,
- std::size_t addrlen, win_iocp_socket_connect_op_base* op)
-{
- // If ConnectEx is available, use that.
- if (family == BOOST_ASIO_OS_DEF(AF_INET)
- || family == BOOST_ASIO_OS_DEF(AF_INET6))
- {
- if (connect_ex_fn connect_ex = get_connect_ex(impl, type))
- {
- union address_union
- {
- socket_addr_type base;
- sockaddr_in4_type v4;
- sockaddr_in6_type v6;
- } a;
-
- using namespace std; // For memset.
- memset(&a, 0, sizeof(a));
- a.base.sa_family = family;
-
- socket_ops::bind(impl.socket_, &a.base,
- family == BOOST_ASIO_OS_DEF(AF_INET)
- ? sizeof(a.v4) : sizeof(a.v6), op->ec_);
- if (op->ec_ && op->ec_ != boost::asio::error::invalid_argument)
- {
- iocp_service_.post_immediate_completion(op, false);
- return;
- }
-
- op->connect_ex_ = true;
- update_cancellation_thread_id(impl);
- iocp_service_.work_started();
-
- BOOL result = connect_ex(impl.socket_,
- addr, static_cast<int>(addrlen), 0, 0, 0, op);
- DWORD last_error = ::WSAGetLastError();
- if (!result && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error);
- else
- iocp_service_.on_pending(op);
- return;
- }
- }
-
- // Otherwise, fall back to a reactor-based implementation.
- select_reactor& r = get_reactor();
- update_cancellation_thread_id(impl);
-
- if ((impl.state_ & socket_ops::non_blocking) != 0
- || socket_ops::set_internal_non_blocking(
- impl.socket_, impl.state_, true, op->ec_))
- {
- if (socket_ops::connect(impl.socket_, addr, addrlen, op->ec_) != 0)
- {
- if (op->ec_ == boost::asio::error::in_progress
- || op->ec_ == boost::asio::error::would_block)
- {
- op->ec_ = boost::system::error_code();
- r.start_op(select_reactor::connect_op, impl.socket_,
- impl.reactor_data_, op, false, false);
- return;
- }
- }
- }
-
- r.post_immediate_completion(op, false);
-}
-
-void win_iocp_socket_service_base::close_for_destruction(
- win_iocp_socket_service_base::base_implementation_type& impl)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(),
- "socket", &impl, impl.socket_, "close"));
-
- // Check if the reactor was created, in which case we need to close the
- // socket on the reactor as well to cancel any operations that might be
- // running there.
- select_reactor* r = static_cast<select_reactor*>(
- interlocked_compare_exchange_pointer(
- reinterpret_cast<void**>(&reactor_), 0, 0));
- if (r)
- r->deregister_descriptor(impl.socket_, impl.reactor_data_, true);
-
- boost::system::error_code ignored_ec;
- socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
-
- if (r)
- r->cleanup_descriptor_data(impl.reactor_data_);
- }
-
- impl.socket_ = invalid_socket;
- impl.state_ = 0;
- impl.cancel_token_.reset();
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- impl.safe_cancellation_thread_id_ = 0;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-}
-
-void win_iocp_socket_service_base::update_cancellation_thread_id(
- win_iocp_socket_service_base::base_implementation_type& impl)
-{
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- if (impl.safe_cancellation_thread_id_ == 0)
- impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId();
- else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId())
- impl.safe_cancellation_thread_id_ = ~DWORD(0);
-#else // defined(BOOST_ASIO_ENABLE_CANCELIO)
- (void)impl;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-}
-
-select_reactor& win_iocp_socket_service_base::get_reactor()
-{
- select_reactor* r = static_cast<select_reactor*>(
- interlocked_compare_exchange_pointer(
- reinterpret_cast<void**>(&reactor_), 0, 0));
- if (!r)
- {
- r = &(use_service<select_reactor>(io_context_));
- interlocked_exchange_pointer(reinterpret_cast<void**>(&reactor_), r);
- }
- return *r;
-}
-
-win_iocp_socket_service_base::connect_ex_fn
-win_iocp_socket_service_base::get_connect_ex(
- win_iocp_socket_service_base::base_implementation_type& impl, int type)
-{
-#if defined(BOOST_ASIO_DISABLE_CONNECTEX)
- (void)impl;
- (void)type;
- return 0;
-#else // defined(BOOST_ASIO_DISABLE_CONNECTEX)
- if (type != BOOST_ASIO_OS_DEF(SOCK_STREAM)
- && type != BOOST_ASIO_OS_DEF(SOCK_SEQPACKET))
- return 0;
-
- void* ptr = interlocked_compare_exchange_pointer(&connect_ex_, 0, 0);
- if (!ptr)
- {
- GUID guid = { 0x25a207b9, 0xddf3, 0x4660,
- { 0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e } };
-
- DWORD bytes = 0;
- if (::WSAIoctl(impl.socket_, SIO_GET_EXTENSION_FUNCTION_POINTER,
- &guid, sizeof(guid), &ptr, sizeof(ptr), &bytes, 0, 0) != 0)
- {
- // Set connect_ex_ to a special value to indicate that ConnectEx is
- // unavailable. That way we won't bother trying to look it up again.
- ptr = this;
- }
-
- interlocked_exchange_pointer(&connect_ex_, ptr);
- }
-
- return reinterpret_cast<connect_ex_fn>(ptr == this ? 0 : ptr);
-#endif // defined(BOOST_ASIO_DISABLE_CONNECTEX)
-}
-
-win_iocp_socket_service_base::nt_set_info_fn
-win_iocp_socket_service_base::get_nt_set_info()
-{
- void* ptr = interlocked_compare_exchange_pointer(&nt_set_info_, 0, 0);
- if (!ptr)
- {
- if (HMODULE h = ::GetModuleHandleA("NTDLL.DLL"))
- ptr = reinterpret_cast<void*>(GetProcAddress(h, "NtSetInformationFile"));
-
- // On failure, set nt_set_info_ to a special value to indicate that the
- // NtSetInformationFile function is unavailable. That way we won't bother
- // trying to look it up again.
- interlocked_exchange_pointer(&nt_set_info_, ptr ? ptr : this);
- }
-
- return reinterpret_cast<nt_set_info_fn>(ptr == this ? 0 : ptr);
-}
-
-void* win_iocp_socket_service_base::interlocked_compare_exchange_pointer(
- void** dest, void* exch, void* cmp)
-{
-#if defined(_M_IX86)
- return reinterpret_cast<void*>(InterlockedCompareExchange(
- reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(exch),
- reinterpret_cast<LONG>(cmp)));
-#else
- return InterlockedCompareExchangePointer(dest, exch, cmp);
-#endif
-}
-
-void* win_iocp_socket_service_base::interlocked_exchange_pointer(
- void** dest, void* val)
-{
-#if defined(_M_IX86)
- return reinterpret_cast<void*>(InterlockedExchange(
- reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(val)));
-#else
- return InterlockedExchangePointer(dest, val);
-#endif
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SOCKET_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp
deleted file mode 100644
index 12922263f20..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// detail/impl/win_mutex.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_IMPL_WIN_MUTEX_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_MUTEX_IPP
-
-#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_WINDOWS)
-
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_mutex.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-win_mutex::win_mutex()
-{
- int error = do_init();
- boost::system::error_code ec(error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "mutex");
-}
-
-int win_mutex::do_init()
-{
-#if defined(__MINGW32__)
- // Not sure if MinGW supports structured exception handling, so for now
- // we'll just call the Windows API and hope.
-# if defined(UNDER_CE)
- ::InitializeCriticalSection(&crit_section_);
-# elif defined(BOOST_ASIO_WINDOWS_APP)
- if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
- return ::GetLastError();
-# else
- if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
- return ::GetLastError();
-# endif
- return 0;
-#else
- __try
- {
-# if defined(UNDER_CE)
- ::InitializeCriticalSection(&crit_section_);
-# elif defined(BOOST_ASIO_WINDOWS_APP)
- if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
- return ::GetLastError();
-# else
- if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
- return ::GetLastError();
-# endif
- }
- __except(GetExceptionCode() == STATUS_NO_MEMORY
- ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
- {
- return ERROR_OUTOFMEMORY;
- }
-
- return 0;
-#endif
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_MUTEX_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index db56f722f2f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_object_handle_service.ipp
+++ /dev/null
@@ -1,451 +0,0 @@
-//
-// detail/impl/win_object_handle_service.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
-//
-// Distributed under the 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_IMPL_WIN_OBJECT_HANDLE_SERVICE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_OBJECT_HANDLE_SERVICE_IPP
-
-#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_WINDOWS_OBJECT_HANDLE)
-
-#include <boost/asio/detail/win_object_handle_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-win_object_handle_service::win_object_handle_service(
- boost::asio::io_context& io_context)
- : service_base<win_object_handle_service>(io_context),
- io_context_(boost::asio::use_service<io_context_impl>(io_context)),
- mutex_(),
- impl_list_(0),
- shutdown_(false)
-{
-}
-
-void win_object_handle_service::shutdown()
-{
- mutex::scoped_lock lock(mutex_);
-
- // Setting this flag to true prevents new objects from being registered, and
- // new asynchronous wait operations from being started. We only need to worry
- // about cleaning up the operations that are currently in progress.
- shutdown_ = true;
-
- op_queue<operation> ops;
- for (implementation_type* impl = impl_list_; impl; impl = impl->next_)
- ops.push(impl->op_queue_);
-
- lock.unlock();
-
- io_context_.abandon_operations(ops);
-}
-
-void win_object_handle_service::construct(
- win_object_handle_service::implementation_type& impl)
-{
- impl.handle_ = INVALID_HANDLE_VALUE;
- impl.wait_handle_ = INVALID_HANDLE_VALUE;
- impl.owner_ = this;
-
- // Insert implementation into linked list of all implementations.
- mutex::scoped_lock lock(mutex_);
- if (!shutdown_)
- {
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
- }
-}
-
-void win_object_handle_service::move_construct(
- win_object_handle_service::implementation_type& impl,
- win_object_handle_service::implementation_type& other_impl)
-{
- mutex::scoped_lock lock(mutex_);
-
- // Insert implementation into linked list of all implementations.
- if (!shutdown_)
- {
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
- }
-
- impl.handle_ = other_impl.handle_;
- other_impl.handle_ = INVALID_HANDLE_VALUE;
- impl.wait_handle_ = other_impl.wait_handle_;
- other_impl.wait_handle_ = INVALID_HANDLE_VALUE;
- impl.op_queue_.push(other_impl.op_queue_);
- impl.owner_ = this;
-
- // We must not hold the lock while calling UnregisterWaitEx. This is because
- // the registered callback function might be invoked while we are waiting for
- // UnregisterWaitEx to complete.
- lock.unlock();
-
- if (impl.wait_handle_ != INVALID_HANDLE_VALUE)
- ::UnregisterWaitEx(impl.wait_handle_, INVALID_HANDLE_VALUE);
-
- if (!impl.op_queue_.empty())
- register_wait_callback(impl, lock);
-}
-
-void win_object_handle_service::move_assign(
- win_object_handle_service::implementation_type& impl,
- win_object_handle_service& other_service,
- win_object_handle_service::implementation_type& other_impl)
-{
- boost::system::error_code ignored_ec;
- close(impl, ignored_ec);
-
- mutex::scoped_lock lock(mutex_);
-
- if (this != &other_service)
- {
- // Remove implementation from linked list of all implementations.
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
- }
-
- impl.handle_ = other_impl.handle_;
- other_impl.handle_ = INVALID_HANDLE_VALUE;
- impl.wait_handle_ = other_impl.wait_handle_;
- other_impl.wait_handle_ = INVALID_HANDLE_VALUE;
- impl.op_queue_.push(other_impl.op_queue_);
- impl.owner_ = this;
-
- if (this != &other_service)
- {
- // Insert implementation into linked list of all implementations.
- impl.next_ = other_service.impl_list_;
- impl.prev_ = 0;
- if (other_service.impl_list_)
- other_service.impl_list_->prev_ = &impl;
- other_service.impl_list_ = &impl;
- }
-
- // We must not hold the lock while calling UnregisterWaitEx. This is because
- // the registered callback function might be invoked while we are waiting for
- // UnregisterWaitEx to complete.
- lock.unlock();
-
- if (impl.wait_handle_ != INVALID_HANDLE_VALUE)
- ::UnregisterWaitEx(impl.wait_handle_, INVALID_HANDLE_VALUE);
-
- if (!impl.op_queue_.empty())
- register_wait_callback(impl, lock);
-}
-
-void win_object_handle_service::destroy(
- win_object_handle_service::implementation_type& impl)
-{
- mutex::scoped_lock lock(mutex_);
-
- // Remove implementation from linked list of all implementations.
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
-
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
- &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
-
- HANDLE wait_handle = impl.wait_handle_;
- impl.wait_handle_ = INVALID_HANDLE_VALUE;
-
- op_queue<operation> ops;
- while (wait_op* op = impl.op_queue_.front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- impl.op_queue_.pop();
- ops.push(op);
- }
-
- // We must not hold the lock while calling UnregisterWaitEx. This is
- // because the registered callback function might be invoked while we are
- // waiting for UnregisterWaitEx to complete.
- lock.unlock();
-
- if (wait_handle != INVALID_HANDLE_VALUE)
- ::UnregisterWaitEx(wait_handle, INVALID_HANDLE_VALUE);
-
- ::CloseHandle(impl.handle_);
- impl.handle_ = INVALID_HANDLE_VALUE;
-
- io_context_.post_deferred_completions(ops);
- }
-}
-
-boost::system::error_code win_object_handle_service::assign(
- win_object_handle_service::implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- impl.handle_ = handle;
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code win_object_handle_service::close(
- win_object_handle_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
- &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
-
- mutex::scoped_lock lock(mutex_);
-
- HANDLE wait_handle = impl.wait_handle_;
- impl.wait_handle_ = INVALID_HANDLE_VALUE;
-
- op_queue<operation> completed_ops;
- while (wait_op* op = impl.op_queue_.front())
- {
- impl.op_queue_.pop();
- op->ec_ = boost::asio::error::operation_aborted;
- completed_ops.push(op);
- }
-
- // We must not hold the lock while calling UnregisterWaitEx. This is
- // because the registered callback function might be invoked while we are
- // waiting for UnregisterWaitEx to complete.
- lock.unlock();
-
- if (wait_handle != INVALID_HANDLE_VALUE)
- ::UnregisterWaitEx(wait_handle, INVALID_HANDLE_VALUE);
-
- if (::CloseHandle(impl.handle_))
- {
- impl.handle_ = INVALID_HANDLE_VALUE;
- ec = boost::system::error_code();
- }
- else
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- }
-
- io_context_.post_deferred_completions(completed_ops);
- }
- else
- {
- ec = boost::system::error_code();
- }
-
- return ec;
-}
-
-boost::system::error_code win_object_handle_service::cancel(
- win_object_handle_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (is_open(impl))
- {
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
- &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "cancel"));
-
- mutex::scoped_lock lock(mutex_);
-
- HANDLE wait_handle = impl.wait_handle_;
- impl.wait_handle_ = INVALID_HANDLE_VALUE;
-
- op_queue<operation> completed_ops;
- while (wait_op* op = impl.op_queue_.front())
- {
- op->ec_ = boost::asio::error::operation_aborted;
- impl.op_queue_.pop();
- completed_ops.push(op);
- }
-
- // We must not hold the lock while calling UnregisterWaitEx. This is
- // because the registered callback function might be invoked while we are
- // waiting for UnregisterWaitEx to complete.
- lock.unlock();
-
- if (wait_handle != INVALID_HANDLE_VALUE)
- ::UnregisterWaitEx(wait_handle, INVALID_HANDLE_VALUE);
-
- ec = boost::system::error_code();
-
- io_context_.post_deferred_completions(completed_ops);
- }
- else
- {
- ec = boost::asio::error::bad_descriptor;
- }
-
- return ec;
-}
-
-void win_object_handle_service::wait(
- win_object_handle_service::implementation_type& impl,
- boost::system::error_code& ec)
-{
- switch (::WaitForSingleObject(impl.handle_, INFINITE))
- {
- case WAIT_FAILED:
- {
- DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error,
- boost::asio::error::get_system_category());
- break;
- }
- case WAIT_OBJECT_0:
- case WAIT_ABANDONED:
- default:
- ec = boost::system::error_code();
- break;
- }
-}
-
-void win_object_handle_service::start_wait_op(
- win_object_handle_service::implementation_type& impl, wait_op* op)
-{
- io_context_.work_started();
-
- if (is_open(impl))
- {
- mutex::scoped_lock lock(mutex_);
-
- if (!shutdown_)
- {
- impl.op_queue_.push(op);
-
- // Only the first operation to be queued gets to register a wait callback.
- // Subsequent operations have to wait for the first to finish.
- if (impl.op_queue_.front() == op)
- register_wait_callback(impl, lock);
- }
- else
- {
- lock.unlock();
- io_context_.post_deferred_completion(op);
- }
- }
- else
- {
- op->ec_ = boost::asio::error::bad_descriptor;
- io_context_.post_deferred_completion(op);
- }
-}
-
-void win_object_handle_service::register_wait_callback(
- win_object_handle_service::implementation_type& impl,
- mutex::scoped_lock& lock)
-{
- lock.lock();
-
- if (!RegisterWaitForSingleObject(&impl.wait_handle_,
- impl.handle_, &win_object_handle_service::wait_callback,
- &impl, INFINITE, WT_EXECUTEONLYONCE))
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
-
- op_queue<operation> completed_ops;
- while (wait_op* op = impl.op_queue_.front())
- {
- op->ec_ = ec;
- impl.op_queue_.pop();
- completed_ops.push(op);
- }
-
- lock.unlock();
- io_context_.post_deferred_completions(completed_ops);
- }
-}
-
-void win_object_handle_service::wait_callback(PVOID param, BOOLEAN)
-{
- implementation_type* impl = static_cast<implementation_type*>(param);
- mutex::scoped_lock lock(impl->owner_->mutex_);
-
- if (impl->wait_handle_ != INVALID_HANDLE_VALUE)
- {
- ::UnregisterWaitEx(impl->wait_handle_, NULL);
- impl->wait_handle_ = INVALID_HANDLE_VALUE;
- }
-
- if (wait_op* op = impl->op_queue_.front())
- {
- op_queue<operation> completed_ops;
-
- op->ec_ = boost::system::error_code();
- impl->op_queue_.pop();
- completed_ops.push(op);
-
- if (!impl->op_queue_.empty())
- {
- if (!RegisterWaitForSingleObject(&impl->wait_handle_,
- impl->handle_, &win_object_handle_service::wait_callback,
- param, INFINITE, WT_EXECUTEONLYONCE))
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
-
- while ((op = impl->op_queue_.front()) != 0)
- {
- op->ec_ = ec;
- impl->op_queue_.pop();
- completed_ops.push(op);
- }
- }
- }
-
- io_context_impl& ioc = impl->owner_->io_context_;
- lock.unlock();
- ioc.post_deferred_completions(completed_ops);
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_OBJECT_HANDLE_SERVICE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 10e8622e37c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_static_mutex.ipp
+++ /dev/null
@@ -1,138 +0,0 @@
-//
-// detail/impl/win_static_mutex.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_IMPL_WIN_STATIC_MUTEX_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_STATIC_MUTEX_IPP
-
-#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_WINDOWS)
-
-#include <cstdio>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_static_mutex.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-void win_static_mutex::init()
-{
- int error = do_init();
- boost::system::error_code ec(error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "static_mutex");
-}
-
-int win_static_mutex::do_init()
-{
- using namespace std; // For sprintf.
- wchar_t mutex_name[128];
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- swprintf_s(
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- _snwprintf(
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
- mutex_name, 128, L"asio-58CCDC44-6264-4842-90C2-F3C545CB8AA7-%u-%p",
- static_cast<unsigned int>(::GetCurrentProcessId()), this);
-
-#if defined(BOOST_ASIO_WINDOWS_APP)
- HANDLE mutex = ::CreateMutexExW(0, mutex_name, CREATE_MUTEX_INITIAL_OWNER, 0);
-#else // defined(BOOST_ASIO_WINDOWS_APP)
- HANDLE mutex = ::CreateMutexW(0, TRUE, mutex_name);
-#endif // defined(BOOST_ASIO_WINDOWS_APP)
- DWORD last_error = ::GetLastError();
- if (mutex == 0)
- return ::GetLastError();
-
- if (last_error == ERROR_ALREADY_EXISTS)
- {
-#if defined(BOOST_ASIO_WINDOWS_APP)
- ::WaitForSingleObjectEx(mutex, INFINITE, false);
-#else // defined(BOOST_ASIO_WINDOWS_APP)
- ::WaitForSingleObject(mutex, INFINITE);
-#endif // defined(BOOST_ASIO_WINDOWS_APP)
- }
-
- if (initialised_)
- {
- ::ReleaseMutex(mutex);
- ::CloseHandle(mutex);
- return 0;
- }
-
-#if defined(__MINGW32__)
- // Not sure if MinGW supports structured exception handling, so for now
- // we'll just call the Windows API and hope.
-# if defined(UNDER_CE)
- ::InitializeCriticalSection(&crit_section_);
-# else
- if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
- {
- last_error = ::GetLastError();
- ::ReleaseMutex(mutex);
- ::CloseHandle(mutex);
- return last_error;
- }
-# endif
-#else
- __try
- {
-# if defined(UNDER_CE)
- ::InitializeCriticalSection(&crit_section_);
-# elif defined(BOOST_ASIO_WINDOWS_APP)
- if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
- {
- last_error = ::GetLastError();
- ::ReleaseMutex(mutex);
- ::CloseHandle(mutex);
- return last_error;
- }
-# else
- if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
- {
- last_error = ::GetLastError();
- ::ReleaseMutex(mutex);
- ::CloseHandle(mutex);
- return last_error;
- }
-# endif
- }
- __except(GetExceptionCode() == STATUS_NO_MEMORY
- ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
- {
- ::ReleaseMutex(mutex);
- ::CloseHandle(mutex);
- return ERROR_OUTOFMEMORY;
- }
-#endif
-
- initialised_ = true;
- ::ReleaseMutex(mutex);
- ::CloseHandle(mutex);
- return 0;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_STATIC_MUTEX_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp
deleted file mode 100644
index 710c9b9f9b7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp
+++ /dev/null
@@ -1,152 +0,0 @@
-//
-// detail/impl/win_thread.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_IMPL_WIN_THREAD_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP
-
-#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_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_APP) \
- && !defined(UNDER_CE)
-
-#include <process.h>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_thread.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-win_thread::~win_thread()
-{
- ::CloseHandle(thread_);
-
- // The exit_event_ handle is deliberately allowed to leak here since it
- // is an error for the owner of an internal thread not to join() it.
-}
-
-void win_thread::join()
-{
- HANDLE handles[2] = { exit_event_, thread_ };
- ::WaitForMultipleObjects(2, handles, FALSE, INFINITE);
- ::CloseHandle(exit_event_);
- if (terminate_threads())
- {
- ::TerminateThread(thread_, 0);
- }
- else
- {
- ::QueueUserAPC(apc_function, thread_, 0);
- ::WaitForSingleObject(thread_, INFINITE);
- }
-}
-
-std::size_t win_thread::hardware_concurrency()
-{
- SYSTEM_INFO system_info;
- ::GetSystemInfo(&system_info);
- return system_info.dwNumberOfProcessors;
-}
-
-void win_thread::start_thread(func_base* arg, unsigned int stack_size)
-{
- ::HANDLE entry_event = 0;
- arg->entry_event_ = entry_event = ::CreateEventW(0, true, false, 0);
- if (!entry_event)
- {
- DWORD last_error = ::GetLastError();
- delete arg;
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread.entry_event");
- }
-
- arg->exit_event_ = exit_event_ = ::CreateEventW(0, true, false, 0);
- if (!exit_event_)
- {
- DWORD last_error = ::GetLastError();
- delete arg;
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread.exit_event");
- }
-
- unsigned int thread_id = 0;
- thread_ = reinterpret_cast<HANDLE>(::_beginthreadex(0,
- stack_size, win_thread_function, arg, 0, &thread_id));
- if (!thread_)
- {
- DWORD last_error = ::GetLastError();
- delete arg;
- if (entry_event)
- ::CloseHandle(entry_event);
- if (exit_event_)
- ::CloseHandle(exit_event_);
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread");
- }
-
- if (entry_event)
- {
- ::WaitForSingleObject(entry_event, INFINITE);
- ::CloseHandle(entry_event);
- }
-}
-
-unsigned int __stdcall win_thread_function(void* arg)
-{
- win_thread::auto_func_base_ptr func = {
- static_cast<win_thread::func_base*>(arg) };
-
- ::SetEvent(func.ptr->entry_event_);
-
- func.ptr->run();
-
- // Signal that the thread has finished its work, but rather than returning go
- // to sleep to put the thread into a well known state. If the thread is being
- // joined during global object destruction then it may be killed using
- // TerminateThread (to avoid a deadlock in DllMain). Otherwise, the SleepEx
- // call will be interrupted using QueueUserAPC and the thread will shut down
- // cleanly.
- HANDLE exit_event = func.ptr->exit_event_;
- delete func.ptr;
- func.ptr = 0;
- ::SetEvent(exit_event);
- ::SleepEx(INFINITE, TRUE);
-
- return 0;
-}
-
-#if defined(WINVER) && (WINVER < 0x0500)
-void __stdcall apc_function(ULONG) {}
-#else
-void __stdcall apc_function(ULONG_PTR) {}
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_APP)
- // && !defined(UNDER_CE)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 755d020703c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_tss_ptr.ipp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// detail/impl/win_tss_ptr.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_IMPL_WIN_TSS_PTR_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP
-
-#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_WINDOWS)
-
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_tss_ptr.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-DWORD win_tss_ptr_create()
-{
-#if defined(UNDER_CE)
- const DWORD out_of_indexes = 0xFFFFFFFF;
-#else
- const DWORD out_of_indexes = TLS_OUT_OF_INDEXES;
-#endif
-
- DWORD tss_key = ::TlsAlloc();
- if (tss_key == out_of_indexes)
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "tss");
- }
- return tss_key;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index e6254aed930..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
+++ /dev/null
@@ -1,631 +0,0 @@
-//
-// detail/impl/winrt_ssocket_service_base.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_IMPL_WINRT_SSOCKET_SERVICE_BASE_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WINRT_SSOCKET_SERVICE_BASE_IPP
-
-#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_WINDOWS_RUNTIME)
-
-#include <cstring>
-#include <boost/asio/detail/winrt_ssocket_service_base.hpp>
-#include <boost/asio/detail/winrt_async_op.hpp>
-#include <boost/asio/detail/winrt_utils.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-winrt_ssocket_service_base::winrt_ssocket_service_base(
- boost::asio::io_context& io_context)
- : io_context_(use_service<io_context_impl>(io_context)),
- async_manager_(use_service<winrt_async_manager>(io_context)),
- mutex_(),
- impl_list_(0)
-{
-}
-
-void winrt_ssocket_service_base::base_shutdown()
-{
- // Close all implementations, causing all operations to complete.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- base_implementation_type* impl = impl_list_;
- while (impl)
- {
- boost::system::error_code ignored_ec;
- close(*impl, ignored_ec);
- impl = impl->next_;
- }
-}
-
-void winrt_ssocket_service_base::construct(
- winrt_ssocket_service_base::base_implementation_type& impl)
-{
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
-}
-
-void winrt_ssocket_service_base::base_move_construct(
- winrt_ssocket_service_base::base_implementation_type& impl,
- winrt_ssocket_service_base::base_implementation_type& other_impl)
-{
- impl.socket_ = other_impl.socket_;
- other_impl.socket_ = nullptr;
-
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- impl.next_ = impl_list_;
- impl.prev_ = 0;
- if (impl_list_)
- impl_list_->prev_ = &impl;
- impl_list_ = &impl;
-}
-
-void winrt_ssocket_service_base::base_move_assign(
- winrt_ssocket_service_base::base_implementation_type& impl,
- winrt_ssocket_service_base& other_service,
- winrt_ssocket_service_base::base_implementation_type& other_impl)
-{
- boost::system::error_code ignored_ec;
- close(impl, ignored_ec);
-
- if (this != &other_service)
- {
- // Remove implementation from linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
- }
-
- impl.socket_ = other_impl.socket_;
- other_impl.socket_ = nullptr;
-
- if (this != &other_service)
- {
- // Insert implementation into linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(other_service.mutex_);
- impl.next_ = other_service.impl_list_;
- impl.prev_ = 0;
- if (other_service.impl_list_)
- other_service.impl_list_->prev_ = &impl;
- other_service.impl_list_ = &impl;
- }
-}
-
-void winrt_ssocket_service_base::destroy(
- winrt_ssocket_service_base::base_implementation_type& impl)
-{
- boost::system::error_code ignored_ec;
- close(impl, ignored_ec);
-
- // Remove implementation from linked list of all implementations.
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- if (impl_list_ == &impl)
- impl_list_ = impl.next_;
- if (impl.prev_)
- impl.prev_->next_ = impl.next_;
- if (impl.next_)
- impl.next_->prev_= impl.prev_;
- impl.next_ = 0;
- impl.prev_ = 0;
-}
-
-boost::system::error_code winrt_ssocket_service_base::close(
- winrt_ssocket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (impl.socket_)
- {
- delete impl.socket_;
- impl.socket_ = nullptr;
- }
-
- ec = boost::system::error_code();
- return ec;
-}
-
-winrt_ssocket_service_base::native_handle_type
-winrt_ssocket_service_base::release(
- winrt_ssocket_service_base::base_implementation_type& impl,
- boost::system::error_code& ec)
-{
- if (!is_open(impl))
- return nullptr;
-
- cancel(impl, ec);
- if (ec)
- return nullptr;
-
- native_handle_type tmp = impl.socket_;
- impl.socket_ = nullptr;
- return tmp;
-}
-
-std::size_t winrt_ssocket_service_base::do_get_endpoint(
- const base_implementation_type& impl, bool local,
- void* addr, std::size_t addr_len, boost::system::error_code& ec) const
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return addr_len;
- }
-
- try
- {
- std::string addr_string = winrt_utils::string(local
- ? impl.socket_->Information->LocalAddress->CanonicalName
- : impl.socket_->Information->RemoteAddress->CanonicalName);
- unsigned short port = winrt_utils::integer(local
- ? impl.socket_->Information->LocalPort
- : impl.socket_->Information->RemotePort);
- unsigned long scope = 0;
-
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- if (addr_len < sizeof(sockaddr_in4_type))
- {
- ec = boost::asio::error::invalid_argument;
- return addr_len;
- }
- else
- {
- socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET), addr_string.c_str(),
- &reinterpret_cast<sockaddr_in4_type*>(addr)->sin_addr, &scope, ec);
- reinterpret_cast<sockaddr_in4_type*>(addr)->sin_port
- = socket_ops::host_to_network_short(port);
- ec = boost::system::error_code();
- return sizeof(sockaddr_in4_type);
- }
- case BOOST_ASIO_OS_DEF(AF_INET6):
- if (addr_len < sizeof(sockaddr_in6_type))
- {
- ec = boost::asio::error::invalid_argument;
- return addr_len;
- }
- else
- {
- socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET6), addr_string.c_str(),
- &reinterpret_cast<sockaddr_in6_type*>(addr)->sin6_addr, &scope, ec);
- reinterpret_cast<sockaddr_in6_type*>(addr)->sin6_port
- = socket_ops::host_to_network_short(port);
- ec = boost::system::error_code();
- return sizeof(sockaddr_in6_type);
- }
- default:
- ec = boost::asio::error::address_family_not_supported;
- return addr_len;
- }
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- return addr_len;
- }
-}
-
-boost::system::error_code winrt_ssocket_service_base::do_set_option(
- winrt_ssocket_service_base::base_implementation_type& impl,
- int level, int optname, const void* optval,
- std::size_t optlen, boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return ec;
- }
-
- try
- {
- if (level == BOOST_ASIO_OS_DEF(SOL_SOCKET)
- && optname == BOOST_ASIO_OS_DEF(SO_KEEPALIVE))
- {
- if (optlen == sizeof(int))
- {
- int value = 0;
- std::memcpy(&value, optval, optlen);
- impl.socket_->Control->KeepAlive = !!value;
- ec = boost::system::error_code();
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- }
- }
- else if (level == BOOST_ASIO_OS_DEF(IPPROTO_TCP)
- && optname == BOOST_ASIO_OS_DEF(TCP_NODELAY))
- {
- if (optlen == sizeof(int))
- {
- int value = 0;
- std::memcpy(&value, optval, optlen);
- impl.socket_->Control->NoDelay = !!value;
- ec = boost::system::error_code();
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- }
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- }
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- }
-
- return ec;
-}
-
-void winrt_ssocket_service_base::do_get_option(
- const winrt_ssocket_service_base::base_implementation_type& impl,
- int level, int optname, void* optval,
- std::size_t* optlen, boost::system::error_code& ec) const
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return;
- }
-
- try
- {
- if (level == BOOST_ASIO_OS_DEF(SOL_SOCKET)
- && optname == BOOST_ASIO_OS_DEF(SO_KEEPALIVE))
- {
- if (*optlen >= sizeof(int))
- {
- int value = impl.socket_->Control->KeepAlive ? 1 : 0;
- std::memcpy(optval, &value, sizeof(int));
- *optlen = sizeof(int);
- ec = boost::system::error_code();
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- }
- }
- else if (level == BOOST_ASIO_OS_DEF(IPPROTO_TCP)
- && optname == BOOST_ASIO_OS_DEF(TCP_NODELAY))
- {
- if (*optlen >= sizeof(int))
- {
- int value = impl.socket_->Control->NoDelay ? 1 : 0;
- std::memcpy(optval, &value, sizeof(int));
- *optlen = sizeof(int);
- ec = boost::system::error_code();
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- }
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- }
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- }
-}
-
-boost::system::error_code winrt_ssocket_service_base::do_connect(
- winrt_ssocket_service_base::base_implementation_type& impl,
- const void* addr, boost::system::error_code& ec)
-{
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return ec;
- }
-
- char addr_string[max_addr_v6_str_len];
- unsigned short port;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET),
- &reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_addr,
- addr_string, sizeof(addr_string), 0, ec);
- port = socket_ops::network_to_host_short(
- reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_port);
- break;
- case BOOST_ASIO_OS_DEF(AF_INET6):
- socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET6),
- &reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_addr,
- addr_string, sizeof(addr_string), 0, ec);
- port = socket_ops::network_to_host_short(
- reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_port);
- break;
- default:
- ec = boost::asio::error::address_family_not_supported;
- return ec;
- }
-
- if (!ec) try
- {
- async_manager_.sync(impl.socket_->ConnectAsync(
- ref new Windows::Networking::HostName(
- winrt_utils::string(addr_string)),
- winrt_utils::string(port)), ec);
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- }
-
- return ec;
-}
-
-void winrt_ssocket_service_base::start_connect_op(
- winrt_ssocket_service_base::base_implementation_type& impl,
- const void* addr, winrt_async_op<void>* op, bool is_continuation)
-{
- if (!is_open(impl))
- {
- op->ec_ = boost::asio::error::bad_descriptor;
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- char addr_string[max_addr_v6_str_len];
- unsigned short port = 0;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET),
- &reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_addr,
- addr_string, sizeof(addr_string), 0, op->ec_);
- port = socket_ops::network_to_host_short(
- reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_port);
- break;
- case BOOST_ASIO_OS_DEF(AF_INET6):
- socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET6),
- &reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_addr,
- addr_string, sizeof(addr_string), 0, op->ec_);
- port = socket_ops::network_to_host_short(
- reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_port);
- break;
- default:
- op->ec_ = boost::asio::error::address_family_not_supported;
- break;
- }
-
- if (op->ec_)
- {
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- try
- {
- async_manager_.async(impl.socket_->ConnectAsync(
- ref new Windows::Networking::HostName(
- winrt_utils::string(addr_string)),
- winrt_utils::string(port)), op);
- }
- catch (Platform::Exception^ e)
- {
- op->ec_ = boost::system::error_code(
- e->HResult, boost::system::system_category());
- io_context_.post_immediate_completion(op, is_continuation);
- }
-}
-
-std::size_t winrt_ssocket_service_base::do_send(
- winrt_ssocket_service_base::base_implementation_type& impl,
- const boost::asio::const_buffer& data,
- socket_base::message_flags flags, boost::system::error_code& ec)
-{
- if (flags)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- try
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- boost::asio::const_buffer> bufs(boost::asio::buffer(data));
-
- if (bufs.all_empty())
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- return async_manager_.sync(
- impl.socket_->OutputStream->WriteAsync(bufs.buffers()[0]), ec);
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- return 0;
- }
-}
-
-void winrt_ssocket_service_base::start_send_op(
- winrt_ssocket_service_base::base_implementation_type& impl,
- const boost::asio::const_buffer& data, socket_base::message_flags flags,
- winrt_async_op<unsigned int>* op, bool is_continuation)
-{
- if (flags)
- {
- op->ec_ = boost::asio::error::operation_not_supported;
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (!is_open(impl))
- {
- op->ec_ = boost::asio::error::bad_descriptor;
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- try
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- boost::asio::const_buffer> bufs(boost::asio::buffer(data));
-
- if (bufs.all_empty())
- {
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- async_manager_.async(
- impl.socket_->OutputStream->WriteAsync(bufs.buffers()[0]), op);
- }
- catch (Platform::Exception^ e)
- {
- op->ec_ = boost::system::error_code(e->HResult,
- boost::system::system_category());
- io_context_.post_immediate_completion(op, is_continuation);
- }
-}
-
-std::size_t winrt_ssocket_service_base::do_receive(
- winrt_ssocket_service_base::base_implementation_type& impl,
- const boost::asio::mutable_buffer& data,
- socket_base::message_flags flags, boost::system::error_code& ec)
-{
- if (flags)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- if (!is_open(impl))
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- try
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- boost::asio::mutable_buffer> bufs(boost::asio::buffer(data));
-
- if (bufs.all_empty())
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- async_manager_.sync(
- impl.socket_->InputStream->ReadAsync(
- bufs.buffers()[0], bufs.buffers()[0]->Capacity,
- Windows::Storage::Streams::InputStreamOptions::Partial), ec);
-
- std::size_t bytes_transferred = bufs.buffers()[0]->Length;
- if (bytes_transferred == 0 && !ec)
- {
- ec = boost::asio::error::eof;
- }
-
- return bytes_transferred;
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- return 0;
- }
-}
-
-void winrt_ssocket_service_base::start_receive_op(
- winrt_ssocket_service_base::base_implementation_type& impl,
- const boost::asio::mutable_buffer& data, socket_base::message_flags flags,
- winrt_async_op<Windows::Storage::Streams::IBuffer^>* op,
- bool is_continuation)
-{
- if (flags)
- {
- op->ec_ = boost::asio::error::operation_not_supported;
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- if (!is_open(impl))
- {
- op->ec_ = boost::asio::error::bad_descriptor;
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- try
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- boost::asio::mutable_buffer> bufs(boost::asio::buffer(data));
-
- if (bufs.all_empty())
- {
- io_context_.post_immediate_completion(op, is_continuation);
- return;
- }
-
- async_manager_.async(
- impl.socket_->InputStream->ReadAsync(
- bufs.buffers()[0], bufs.buffers()[0]->Capacity,
- Windows::Storage::Streams::InputStreamOptions::Partial), op);
- }
- catch (Platform::Exception^ e)
- {
- op->ec_ = boost::system::error_code(e->HResult,
- boost::system::system_category());
- io_context_.post_immediate_completion(op, is_continuation);
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WINRT_SSOCKET_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index a475f66640b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// detail/impl/winrt_timer_scheduler.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_IMPL_WINRT_TIMER_SCHEDULER_HPP
-#define BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-void winrt_timer_scheduler::add_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_add_timer_queue(queue);
-}
-
-// Remove a timer queue from the reactor.
-template <typename Time_Traits>
-void winrt_timer_scheduler::remove_timer_queue(timer_queue<Time_Traits>& queue)
-{
- do_remove_timer_queue(queue);
-}
-
-template <typename Time_Traits>
-void winrt_timer_scheduler::schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
-
- if (shutdown_)
- {
- io_context_.post_immediate_completion(op, false);
- return;
- }
-
- bool earliest = queue.enqueue_timer(time, timer, op);
- io_context_.work_started();
- if (earliest)
- event_.signal(lock);
-}
-
-template <typename Time_Traits>
-std::size_t winrt_timer_scheduler::cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
- lock.unlock();
- io_context_.post_deferred_completions(ops);
- return n;
-}
-
-template <typename Time_Traits>
-void winrt_timer_scheduler::move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& to,
- typename timer_queue<Time_Traits>::per_timer_data& from)
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- op_queue<operation> ops;
- queue.cancel_timer(to, ops);
- queue.move_timer(to, from);
- lock.unlock();
- scheduler_.post_deferred_completions(ops);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index c8b77349cdb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// detail/impl/winrt_timer_scheduler.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_IMPL_WINRT_TIMER_SCHEDULER_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_IPP
-
-#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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/winrt_timer_scheduler.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-winrt_timer_scheduler::winrt_timer_scheduler(
- boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<winrt_timer_scheduler>(io_context),
- io_context_(use_service<io_context_impl>(io_context)),
- mutex_(),
- event_(),
- timer_queues_(),
- thread_(0),
- stop_thread_(false),
- shutdown_(false)
-{
- thread_ = new boost::asio::detail::thread(
- bind_handler(&winrt_timer_scheduler::call_run_thread, this));
-}
-
-winrt_timer_scheduler::~winrt_timer_scheduler()
-{
- shutdown();
-}
-
-void winrt_timer_scheduler::shutdown()
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- shutdown_ = true;
- stop_thread_ = true;
- event_.signal(lock);
- lock.unlock();
-
- if (thread_)
- {
- thread_->join();
- delete thread_;
- thread_ = 0;
- }
-
- op_queue<operation> ops;
- timer_queues_.get_all_timers(ops);
- io_context_.abandon_operations(ops);
-}
-
-void winrt_timer_scheduler::notify_fork(boost::asio::io_context::fork_event)
-{
-}
-
-void winrt_timer_scheduler::init_task()
-{
-}
-
-void winrt_timer_scheduler::run_thread()
-{
- boost::asio::detail::mutex::scoped_lock lock(mutex_);
- while (!stop_thread_)
- {
- const long max_wait_duration = 5 * 60 * 1000000;
- long wait_duration = timer_queues_.wait_duration_usec(max_wait_duration);
- event_.wait_for_usec(lock, wait_duration);
- event_.clear(lock);
- op_queue<operation> ops;
- timer_queues_.get_ready_timers(ops);
- if (!ops.empty())
- {
- lock.unlock();
- io_context_.post_deferred_completions(ops);
- lock.lock();
- }
- }
-}
-
-void winrt_timer_scheduler::call_run_thread(winrt_timer_scheduler* scheduler)
-{
- scheduler->run_thread();
-}
-
-void winrt_timer_scheduler::do_add_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.insert(&queue);
-}
-
-void winrt_timer_scheduler::do_remove_timer_queue(timer_queue_base& queue)
-{
- mutex::scoped_lock lock(mutex_);
- timer_queues_.erase(&queue);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp
deleted file mode 100644
index 5d31a03b068..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// detail/impl/winsock_init.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_IMPL_WINSOCK_INIT_IPP
-#define BOOST_ASIO_DETAIL_IMPL_WINSOCK_INIT_IPP
-
-#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_WINDOWS) || defined(__CYGWIN__)
-
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/winsock_init.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-void winsock_init_base::startup(data& d,
- unsigned char major, unsigned char minor)
-{
- if (::InterlockedIncrement(&d.init_count_) == 1)
- {
- WSADATA wsa_data;
- long result = ::WSAStartup(MAKEWORD(major, minor), &wsa_data);
- ::InterlockedExchange(&d.result_, result);
- }
-}
-
-void winsock_init_base::manual_startup(data& d)
-{
- if (::InterlockedIncrement(&d.init_count_) == 1)
- {
- ::InterlockedExchange(&d.result_, 0);
- }
-}
-
-void winsock_init_base::cleanup(data& d)
-{
- if (::InterlockedDecrement(&d.init_count_) == 0)
- {
- ::WSACleanup();
- }
-}
-
-void winsock_init_base::manual_cleanup(data& d)
-{
- ::InterlockedDecrement(&d.init_count_);
-}
-
-void winsock_init_base::throw_on_error(data& d)
-{
- long result = ::InterlockedExchangeAdd(&d.result_, 0);
- if (result != 0)
- {
- boost::system::error_code ec(result,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "winsock");
- }
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_IMPL_WINSOCK_INIT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp
deleted file mode 100644
index 112b0ad7510..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// detail/io_control.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_IO_CONTROL_HPP
-#define BOOST_ASIO_DETAIL_IO_CONTROL_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/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace io_control {
-
-// I/O control command for getting number of bytes available.
-class bytes_readable
-{
-public:
- // Default constructor.
- bytes_readable()
- : value_(0)
- {
- }
-
- // Construct with a specific command value.
- bytes_readable(std::size_t value)
- : value_(static_cast<detail::ioctl_arg_type>(value))
- {
- }
-
- // Get the name of the IO control command.
- int name() const
- {
- return static_cast<int>(BOOST_ASIO_OS_DEF(FIONREAD));
- }
-
- // Set the value of the I/O control command.
- void set(std::size_t value)
- {
- value_ = static_cast<detail::ioctl_arg_type>(value);
- }
-
- // Get the current value of the I/O control command.
- std::size_t get() const
- {
- return static_cast<std::size_t>(value_);
- }
-
- // Get the address of the command data.
- detail::ioctl_arg_type* data()
- {
- return &value_;
- }
-
- // Get the address of the command data.
- const detail::ioctl_arg_type* data() const
- {
- return &value_;
- }
-
-private:
- detail::ioctl_arg_type value_;
-};
-
-} // namespace io_control
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index a3fb9931d26..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/is_buffer_sequence.hpp
+++ /dev/null
@@ -1,265 +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 (&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.69.0/boost/asio/detail/is_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/is_executor.hpp
deleted file mode 100644
index bc52ee87ce0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/is_executor.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// detail/is_executor.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_EXECUTOR_HPP
-#define BOOST_ASIO_DETAIL_IS_EXECUTOR_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 {
-namespace detail {
-
-struct executor_memfns_base
-{
- void context();
- void on_work_started();
- void on_work_finished();
- void dispatch();
- void post();
- void defer();
-};
-
-template <typename T>
-struct executor_memfns_derived
- : T, executor_memfns_base
-{
-};
-
-template <typename T, T>
-struct executor_memfns_check
-{
-};
-
-template <typename>
-char (&context_memfn_helper(...))[2];
-
-template <typename T>
-char context_memfn_helper(
- executor_memfns_check<
- void (executor_memfns_base::*)(),
- &executor_memfns_derived<T>::context>*);
-
-template <typename>
-char (&on_work_started_memfn_helper(...))[2];
-
-template <typename T>
-char on_work_started_memfn_helper(
- executor_memfns_check<
- void (executor_memfns_base::*)(),
- &executor_memfns_derived<T>::on_work_started>*);
-
-template <typename>
-char (&on_work_finished_memfn_helper(...))[2];
-
-template <typename T>
-char on_work_finished_memfn_helper(
- executor_memfns_check<
- void (executor_memfns_base::*)(),
- &executor_memfns_derived<T>::on_work_finished>*);
-
-template <typename>
-char (&dispatch_memfn_helper(...))[2];
-
-template <typename T>
-char dispatch_memfn_helper(
- executor_memfns_check<
- void (executor_memfns_base::*)(),
- &executor_memfns_derived<T>::dispatch>*);
-
-template <typename>
-char (&post_memfn_helper(...))[2];
-
-template <typename T>
-char post_memfn_helper(
- executor_memfns_check<
- void (executor_memfns_base::*)(),
- &executor_memfns_derived<T>::post>*);
-
-template <typename>
-char (&defer_memfn_helper(...))[2];
-
-template <typename T>
-char defer_memfn_helper(
- executor_memfns_check<
- void (executor_memfns_base::*)(),
- &executor_memfns_derived<T>::defer>*);
-
-template <typename T>
-struct is_executor_class
- : integral_constant<bool,
- sizeof(context_memfn_helper<T>(0)) != 1 &&
- sizeof(on_work_started_memfn_helper<T>(0)) != 1 &&
- sizeof(on_work_finished_memfn_helper<T>(0)) != 1 &&
- sizeof(dispatch_memfn_helper<T>(0)) != 1 &&
- sizeof(post_memfn_helper<T>(0)) != 1 &&
- sizeof(defer_memfn_helper<T>(0)) != 1>
-{
-};
-
-template <typename T>
-struct is_executor
- : conditional<is_class<T>::value,
- is_executor_class<T>,
- false_type>::type
-{
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IS_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp
deleted file mode 100644
index 8451b175102..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// detail/keyword_tss_ptr.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_KEYWORD_TSS_PTR_HPP
-#define BOOST_ASIO_DETAIL_KEYWORD_TSS_PTR_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_THREAD_KEYWORD_EXTENSION)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-class keyword_tss_ptr
- : private noncopyable
-{
-public:
- // Constructor.
- keyword_tss_ptr()
- {
- }
-
- // Destructor.
- ~keyword_tss_ptr()
- {
- }
-
- // Get the value.
- operator T*() const
- {
- return value_;
- }
-
- // Set the value.
- void operator=(T* value)
- {
- value_ = value;
- }
-
-private:
- static BOOST_ASIO_THREAD_KEYWORD T* value_;
-};
-
-template <typename T>
-BOOST_ASIO_THREAD_KEYWORD T* keyword_tss_ptr<T>::value_;
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
-
-#endif // BOOST_ASIO_DETAIL_KEYWORD_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp
deleted file mode 100644
index 31d79ca6a41..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp
+++ /dev/null
@@ -1,244 +0,0 @@
-//
-// detail/kqueue_reactor.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2005 Stefan Arentz (stefan at soze 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_KQUEUE_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_KQUEUE_REACTOR_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_KQUEUE)
-
-#include <cstddef>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/time.h>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/object_pool.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/select_interrupter.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/timer_queue_set.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/execution_context.hpp>
-
-// Older versions of Mac OS X may not define EV_OOBAND.
-#if !defined(EV_OOBAND)
-# define EV_OOBAND EV_FLAG1
-#endif // !defined(EV_OOBAND)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class scheduler;
-
-class kqueue_reactor
- : public execution_context_service_base<kqueue_reactor>
-{
-private:
- // The mutex type used by this reactor.
- typedef conditionally_enabled_mutex mutex;
-
-public:
- enum op_types { read_op = 0, write_op = 1,
- connect_op = 1, except_op = 2, max_ops = 3 };
-
- // Per-descriptor queues.
- struct descriptor_state
- {
- descriptor_state(bool locking) : mutex_(locking) {}
-
- friend class kqueue_reactor;
- friend class object_pool_access;
-
- descriptor_state* next_;
- descriptor_state* prev_;
-
- mutex mutex_;
- int descriptor_;
- int num_kevents_; // 1 == read only, 2 == read and write
- op_queue<reactor_op> op_queue_[max_ops];
- bool shutdown_;
- };
-
- // Per-descriptor data.
- typedef descriptor_state* per_descriptor_data;
-
- // Constructor.
- BOOST_ASIO_DECL kqueue_reactor(boost::asio::execution_context& ctx);
-
- // Destructor.
- BOOST_ASIO_DECL ~kqueue_reactor();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Recreate internal descriptors following a fork.
- BOOST_ASIO_DECL void notify_fork(
- boost::asio::execution_context::fork_event fork_ev);
-
- // Initialise the task.
- BOOST_ASIO_DECL void init_task();
-
- // Register a socket with the reactor. Returns 0 on success, system error
- // code on failure.
- BOOST_ASIO_DECL int register_descriptor(socket_type descriptor,
- per_descriptor_data& descriptor_data);
-
- // Register a descriptor with an associated single operation. Returns 0 on
- // success, system error code on failure.
- BOOST_ASIO_DECL int register_internal_descriptor(
- int op_type, socket_type descriptor,
- per_descriptor_data& descriptor_data, reactor_op* op);
-
- // Move descriptor registration from one descriptor_data object to another.
- BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
- per_descriptor_data& target_descriptor_data,
- per_descriptor_data& source_descriptor_data);
-
- // Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation)
- {
- scheduler_.post_immediate_completion(op, is_continuation);
- }
-
- // Start a new operation. The reactor operation will be performed when the
- // given descriptor is flagged as ready, or an error has occurred.
- BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
- per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative);
-
- // Cancel all operations associated with the given descriptor. The
- // handlers associated with the descriptor will be invoked with the
- // operation_aborted error.
- BOOST_ASIO_DECL void cancel_ops(socket_type descriptor,
- per_descriptor_data& descriptor_data);
-
- // Cancel any operations that are running against the descriptor and remove
- // its registration from the reactor. The reactor resources associated with
- // the descriptor must be released by calling cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
- per_descriptor_data& descriptor_data, bool closing);
-
- // Remove the descriptor's registration from the reactor. The reactor
- // resources associated with the descriptor must be released by calling
- // cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_internal_descriptor(
- socket_type descriptor, per_descriptor_data& descriptor_data);
-
- // Perform any post-deregistration cleanup tasks associated with the
- // descriptor data.
- BOOST_ASIO_DECL void cleanup_descriptor_data(
- per_descriptor_data& descriptor_data);
-
- // Add a new timer queue to the reactor.
- template <typename Time_Traits>
- void add_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Remove a timer queue from the reactor.
- template <typename Time_Traits>
- void remove_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Schedule a new operation in the given timer queue to expire at the
- // specified absolute time.
- template <typename Time_Traits>
- void schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
-
- // Cancel the timer operations associated with the given token. Returns the
- // number of operations that have been posted or dispatched.
- template <typename Time_Traits>
- std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
-
- // Move the timer operations associated with the given timer.
- template <typename Time_Traits>
- void move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source);
-
- // Run the kqueue loop.
- BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
-
- // Interrupt the kqueue loop.
- BOOST_ASIO_DECL void interrupt();
-
-private:
- // Create the kqueue file descriptor. Throws an exception if the descriptor
- // cannot be created.
- BOOST_ASIO_DECL static int do_kqueue_create();
-
- // Allocate a new descriptor state object.
- BOOST_ASIO_DECL descriptor_state* allocate_descriptor_state();
-
- // Free an existing descriptor state object.
- BOOST_ASIO_DECL void free_descriptor_state(descriptor_state* s);
-
- // Helper function to add a new timer queue.
- BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
-
- // Helper function to remove a timer queue.
- BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
-
- // Get the timeout value for the kevent call.
- BOOST_ASIO_DECL timespec* get_timeout(long usec, timespec& ts);
-
- // The scheduler used to post completions.
- scheduler& scheduler_;
-
- // Mutex to protect access to internal data.
- mutex mutex_;
-
- // The kqueue file descriptor.
- int kqueue_fd_;
-
- // The interrupter is used to break a blocking kevent call.
- select_interrupter interrupter_;
-
- // The timer queues.
- timer_queue_set timer_queues_;
-
- // Whether the service has been shut down.
- bool shutdown_;
-
- // Mutex to protect access to the registered descriptors.
- mutex registered_descriptors_mutex_;
-
- // Keep track of all registered descriptors.
- object_pool<descriptor_state> registered_descriptors_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/kqueue_reactor.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/kqueue_reactor.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_KQUEUE)
-
-#endif // BOOST_ASIO_DETAIL_KQUEUE_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 0f1a84108cf..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/local_free_on_block_exit.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// detail/local_free_on_block_exit.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_LOCAL_FREE_ON_BLOCK_EXIT_HPP
-#define BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_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_WINDOWS) || defined(__CYGWIN__)
-#if !defined(BOOST_ASIO_WINDOWS_APP)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class local_free_on_block_exit
- : private noncopyable
-{
-public:
- // Constructor blocks all signals for the calling thread.
- explicit local_free_on_block_exit(void* p)
- : p_(p)
- {
- }
-
- // Destructor restores the previous signal mask.
- ~local_free_on_block_exit()
- {
- ::LocalFree(p_);
- }
-
-private:
- void* p_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS_APP)
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp
deleted file mode 100644
index 20196a78f6a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// detail/macos_fenced_block.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_MACOS_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_MACOS_FENCED_BLOCK_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(__MACH__) && defined(__APPLE__)
-
-#include <libkern/OSAtomic.h>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class macos_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit macos_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit macos_fenced_block(full_t)
- {
- OSMemoryBarrier();
- }
-
- // Destructor.
- ~macos_fenced_block()
- {
- OSMemoryBarrier();
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__MACH__) && defined(__APPLE__)
-
-#endif // BOOST_ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp
deleted file mode 100644
index 21a68e456f3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// detail/memory.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_MEMORY_HPP
-#define BOOST_ASIO_DETAIL_MEMORY_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <memory>
-
-#if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-# include <boost/shared_ptr.hpp>
-# include <boost/weak_ptr.hpp>
-#endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-
-#if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-# include <boost/utility/addressof.hpp>
-#endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-using std::shared_ptr;
-using std::weak_ptr;
-#else // defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-using boost::shared_ptr;
-using boost::weak_ptr;
-#endif // defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-
-#if defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-using std::addressof;
-#else // defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-using boost::addressof;
-#endif // defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-
-} // namespace detail
-
-#if defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
-using std::allocator_arg_t;
-# define BOOST_ASIO_USES_ALLOCATOR(t) \
- namespace std { \
- template <typename Allocator> \
- struct uses_allocator<t, Allocator> : true_type {}; \
- } \
- /**/
-# define BOOST_ASIO_REBIND_ALLOC(alloc, t) \
- typename std::allocator_traits<alloc>::template rebind_alloc<t>
- /**/
-#else // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
-struct allocator_arg_t {};
-# define BOOST_ASIO_USES_ALLOCATOR(t)
-# define BOOST_ASIO_REBIND_ALLOC(alloc, t) \
- typename alloc::template rebind<t>::other
- /**/
-#endif // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_MEMORY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp
deleted file mode 100644
index 9fe4ad333ec..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// detail/mutex.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_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_MUTEX_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_THREADS)
-# include <boost/asio/detail/null_mutex.hpp>
-#elif defined(BOOST_ASIO_WINDOWS)
-# include <boost/asio/detail/win_mutex.hpp>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_mutex.hpp>
-#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include <boost/asio/detail/std_mutex.hpp>
-#else
-# error Only Windows, POSIX and std::mutex are supported!
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS)
-typedef null_mutex mutex;
-#elif defined(BOOST_ASIO_WINDOWS)
-typedef win_mutex mutex;
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-typedef posix_mutex mutex;
-#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-typedef std_mutex mutex;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp
deleted file mode 100644
index 36b30c074df..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// detail/noncopyable.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_NONCOPYABLE_HPP
-#define BOOST_ASIO_DETAIL_NONCOPYABLE_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class noncopyable
-{
-protected:
- noncopyable() {}
- ~noncopyable() {}
-private:
- noncopyable(const noncopyable&);
- const noncopyable& operator=(const noncopyable&);
-};
-
-} // namespace detail
-
-using boost::asio::detail::noncopyable;
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_NONCOPYABLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp
deleted file mode 100644
index 8394028e414..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// detail/null_event.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_NULL_EVENT_HPP
-#define BOOST_ASIO_DETAIL_NULL_EVENT_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class null_event
- : private noncopyable
-{
-public:
- // Constructor.
- null_event()
- {
- }
-
- // Destructor.
- ~null_event()
- {
- }
-
- // Signal the event. (Retained for backward compatibility.)
- template <typename Lock>
- void signal(Lock&)
- {
- }
-
- // Signal all waiters.
- template <typename Lock>
- void signal_all(Lock&)
- {
- }
-
- // Unlock the mutex and signal one waiter.
- template <typename Lock>
- void unlock_and_signal_one(Lock&)
- {
- }
-
- // If there's a waiter, unlock the mutex and signal it.
- template <typename Lock>
- bool maybe_unlock_and_signal_one(Lock&)
- {
- return false;
- }
-
- // Reset the event.
- template <typename Lock>
- void clear(Lock&)
- {
- }
-
- // Wait for the event to become signalled.
- template <typename Lock>
- void wait(Lock&)
- {
- do_wait();
- }
-
- // Timed wait for the event to become signalled.
- template <typename Lock>
- bool wait_for_usec(Lock&, long usec)
- {
- do_wait_for_usec(usec);
- return true;
- }
-
-private:
- BOOST_ASIO_DECL static void do_wait();
- BOOST_ASIO_DECL static void do_wait_for_usec(long usec);
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/null_event.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_NULL_EVENT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp
deleted file mode 100644
index f9f59af3a9a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// detail/null_fenced_block.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_NULL_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_NULL_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class null_fenced_block
- : private noncopyable
-{
-public:
- enum half_or_full_t { half, full };
-
- // Constructor.
- explicit null_fenced_block(half_or_full_t)
- {
- }
-
- // Destructor.
- ~null_fenced_block()
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_NULL_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp
deleted file mode 100644
index 3a4d5168891..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// detail/null_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_NULL_GLOBAL_HPP
-#define BOOST_ASIO_DETAIL_NULL_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-struct null_global_impl
-{
- null_global_impl()
- : ptr_(0)
- {
- }
-
- // Destructor automatically cleans up the global.
- ~null_global_impl()
- {
- delete ptr_;
- }
-
- static null_global_impl instance_;
- T* ptr_;
-};
-
-template <typename T>
-null_global_impl<T> null_global_impl<T>::instance_;
-
-template <typename T>
-T& null_global()
-{
- if (null_global_impl<T>::instance_.ptr_ == 0)
- null_global_impl<T>::instance_.ptr_ = new T;
- return *null_global_impl<T>::instance_.ptr_;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_NULL_GLOBAL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp
deleted file mode 100644
index 90b92fe77b6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// detail/null_mutex.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_NULL_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_NULL_MUTEX_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_THREADS)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class null_mutex
- : private noncopyable
-{
-public:
- typedef boost::asio::detail::scoped_lock<null_mutex> scoped_lock;
-
- // Constructor.
- null_mutex()
- {
- }
-
- // Destructor.
- ~null_mutex()
- {
- }
-
- // Lock the mutex.
- void lock()
- {
- }
-
- // Unlock the mutex.
- void unlock()
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_THREADS)
-
-#endif // BOOST_ASIO_DETAIL_NULL_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp
deleted file mode 100644
index 028f0f35354..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// detail/null_reactor.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_NULL_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_NULL_REACTOR_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_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/scheduler_operation.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class null_reactor
- : public execution_context_service_base<null_reactor>
-{
-public:
- // Constructor.
- null_reactor(boost::asio::execution_context& ctx)
- : execution_context_service_base<null_reactor>(ctx)
- {
- }
-
- // Destructor.
- ~null_reactor()
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- }
-
- // No-op because should never be called.
- void run(long /*usec*/, op_queue<scheduler_operation>& /*ops*/)
- {
- }
-
- // No-op.
- void interrupt()
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_NULL_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp
deleted file mode 100644
index b2285c1f451..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// detail/null_signal_blocker.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_NULL_SIGNAL_BLOCKER_HPP
-#define BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_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_THREADS) \
- || defined(BOOST_ASIO_WINDOWS) \
- || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class null_signal_blocker
- : private noncopyable
-{
-public:
- // Constructor blocks all signals for the calling thread.
- null_signal_blocker()
- {
- }
-
- // Destructor restores the previous signal mask.
- ~null_signal_blocker()
- {
- }
-
- // Block all signals for the calling thread.
- void block()
- {
- }
-
- // Restore the previous signal mask.
- void unblock()
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_THREADS)
- // || defined(BOOST_ASIO_WINDOWS)
- // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
-
-#endif // BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp
deleted file mode 100644
index 2c5b784125f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp
+++ /dev/null
@@ -1,510 +0,0 @@
-//
-// detail/null_socket_service.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_NULL_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_NULL_SOCKET_SERVICE_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol>
-class null_socket_service :
- public service_base<null_socket_service<Protocol> >
-{
-public:
- // The protocol type.
- typedef Protocol protocol_type;
-
- // The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- // The native type of a socket.
- typedef int native_handle_type;
-
- // The implementation type of the socket.
- struct implementation_type
- {
- };
-
- // Constructor.
- null_socket_service(boost::asio::io_context& io_context)
- : service_base<null_socket_service<Protocol> >(io_context),
- io_context_(io_context)
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- }
-
- // Construct a new socket implementation.
- void construct(implementation_type&)
- {
- }
-
- // Move-construct a new socket implementation.
- void move_construct(implementation_type&, implementation_type&)
- {
- }
-
- // Move-assign from another socket implementation.
- void move_assign(implementation_type&,
- null_socket_service&, implementation_type&)
- {
- }
-
- // Move-construct a new socket implementation from another protocol type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type&,
- null_socket_service<Protocol1>&,
- typename null_socket_service<Protocol1>::implementation_type&)
- {
- }
-
- // Destroy a socket implementation.
- void destroy(implementation_type&)
- {
- }
-
- // Open a new socket implementation.
- boost::system::error_code open(implementation_type&,
- const protocol_type&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Assign a native socket to a socket implementation.
- boost::system::error_code assign(implementation_type&, const protocol_type&,
- const native_handle_type&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Determine whether the socket is open.
- bool is_open(const implementation_type&) const
- {
- return false;
- }
-
- // Destroy a socket implementation.
- boost::system::error_code close(implementation_type&,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Release ownership of the socket.
- native_handle_type release(implementation_type&,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Get the native socket representation.
- native_handle_type native_handle(implementation_type&)
- {
- return 0;
- }
-
- // Cancel all operations associated with the socket.
- boost::system::error_code cancel(implementation_type&,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type&,
- boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return false;
- }
-
- // Determine the number of bytes available for reading.
- std::size_t available(const implementation_type&,
- boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Place the socket into the state where it will listen for new connections.
- boost::system::error_code listen(implementation_type&,
- int, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Perform an IO control command on the socket.
- template <typename IO_Control_Command>
- boost::system::error_code io_control(implementation_type&,
- IO_Control_Command&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type&) const
- {
- return false;
- }
-
- // Sets the non-blocking mode of the socket.
- boost::system::error_code non_blocking(implementation_type&,
- bool, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type&) const
- {
- return false;
- }
-
- // Sets the non-blocking mode of the native socket implementation.
- boost::system::error_code native_non_blocking(implementation_type&,
- bool, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Disable sends or receives on the socket.
- boost::system::error_code shutdown(implementation_type&,
- socket_base::shutdown_type, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Bind the socket to the specified local endpoint.
- boost::system::error_code bind(implementation_type&,
- const endpoint_type&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code set_option(implementation_type&,
- const Option&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code get_option(const implementation_type&,
- Option&, boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type&,
- boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return endpoint_type();
- }
-
- // Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type&,
- boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return endpoint_type();
- }
-
- // Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type&, const ConstBufferSequence&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Wait until data can be sent without blocking.
- std::size_t send(implementation_type&, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send(implementation_type&, const ConstBufferSequence&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send(implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Receive some data from the peer. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type&, const MutableBufferSequence&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Wait until data can be received without blocking.
- std::size_t receive(implementation_type&, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive(implementation_type&, const MutableBufferSequence&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive(implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Receive some data with associated flags. Returns the number of bytes
- // received.
- template <typename MutableBufferSequence>
- std::size_t receive_with_flags(implementation_type&,
- const MutableBufferSequence&, socket_base::message_flags,
- socket_base::message_flags&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Wait until data can be received without blocking.
- std::size_t receive_with_flags(implementation_type&,
- const null_buffers&, socket_base::message_flags,
- socket_base::message_flags&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_with_flags(implementation_type&,
- const MutableBufferSequence&, socket_base::message_flags,
- socket_base::message_flags&, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_with_flags(implementation_type&,
- const null_buffers&, socket_base::message_flags,
- socket_base::message_flags&, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Send a datagram to the specified endpoint. Returns the number of bytes
- // sent.
- template <typename ConstBufferSequence>
- std::size_t send_to(implementation_type&, const ConstBufferSequence&,
- const endpoint_type&, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Wait until data can be sent without blocking.
- std::size_t send_to(implementation_type&, const null_buffers&,
- const endpoint_type&, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send_to(implementation_type&, const ConstBufferSequence&,
- const endpoint_type&, socket_base::message_flags,
- Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send_to(implementation_type&, const null_buffers&,
- const endpoint_type&, socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Receive a datagram with the endpoint of the sender. Returns the number of
- // bytes received.
- template <typename MutableBufferSequence>
- std::size_t receive_from(implementation_type&, const MutableBufferSequence&,
- endpoint_type&, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Wait until data can be received without blocking.
- std::size_t receive_from(implementation_type&, const null_buffers&,
- endpoint_type&, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received and
- // the sender_endpoint object must both be valid for the lifetime of the
- // asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_from(implementation_type&,
- const MutableBufferSequence&, endpoint_type&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_from(implementation_type&,
- const null_buffers&, endpoint_type&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Accept a new connection.
- template <typename Socket>
- boost::system::error_code accept(implementation_type&,
- Socket&, endpoint_type*, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Start an asynchronous accept. The peer and peer_endpoint objects
- // must be valid until the accept's handler is invoked.
- template <typename Socket, typename Handler>
- void async_accept(implementation_type&, Socket&,
- endpoint_type*, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- io_context_.post(detail::bind_handler(handler, ec));
- }
-
- // Connect the socket to the specified endpoint.
- boost::system::error_code connect(implementation_type&,
- const endpoint_type&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Start an asynchronous connect.
- template <typename Handler>
- void async_connect(implementation_type&,
- const endpoint_type&, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- io_context_.post(detail::bind_handler(handler, ec));
- }
-
-private:
- boost::asio::io_context& io_context_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_NULL_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp
deleted file mode 100644
index 7e2c0b522c3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// detail/null_static_mutex.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_NULL_STATIC_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_NULL_STATIC_MUTEX_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_THREADS)
-
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct null_static_mutex
-{
- typedef boost::asio::detail::scoped_lock<null_static_mutex> scoped_lock;
-
- // Initialise the mutex.
- void init()
- {
- }
-
- // Lock the mutex.
- void lock()
- {
- }
-
- // Unlock the mutex.
- void unlock()
- {
- }
-
- int unused_;
-};
-
-#define BOOST_ASIO_NULL_STATIC_MUTEX_INIT { 0 }
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_THREADS)
-
-#endif // BOOST_ASIO_DETAIL_NULL_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp
deleted file mode 100644
index 56ad8bf8069..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// detail/null_thread.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_NULL_THREAD_HPP
-#define BOOST_ASIO_DETAIL_NULL_THREAD_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_THREADS)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class null_thread
- : private noncopyable
-{
-public:
- // Constructor.
- template <typename Function>
- null_thread(Function, unsigned int = 0)
- {
- boost::asio::detail::throw_error(
- boost::asio::error::operation_not_supported, "thread");
- }
-
- // Destructor.
- ~null_thread()
- {
- }
-
- // Wait for the thread to exit.
- void join()
- {
- }
-
- // Get number of CPUs.
- static std::size_t hardware_concurrency()
- {
- return 1;
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_THREADS)
-
-#endif // BOOST_ASIO_DETAIL_NULL_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp
deleted file mode 100644
index 06d5a4d5228..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// detail/null_tss_ptr.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_NULL_TSS_PTR_HPP
-#define BOOST_ASIO_DETAIL_NULL_TSS_PTR_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_THREADS)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-class null_tss_ptr
- : private noncopyable
-{
-public:
- // Constructor.
- null_tss_ptr()
- : value_(0)
- {
- }
-
- // Destructor.
- ~null_tss_ptr()
- {
- }
-
- // Get the value.
- operator T*() const
- {
- return value_;
- }
-
- // Set the value.
- void operator=(T* value)
- {
- value_ = value;
- }
-
-private:
- T* value_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_THREADS)
-
-#endif // BOOST_ASIO_DETAIL_NULL_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp
deleted file mode 100644
index 7e454a7138c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp
+++ /dev/null
@@ -1,173 +0,0 @@
-//
-// detail/object_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_DETAIL_OBJECT_POOL_HPP
-#define BOOST_ASIO_DETAIL_OBJECT_POOL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Object>
-class object_pool;
-
-class object_pool_access
-{
-public:
- template <typename Object>
- static Object* create()
- {
- return new Object;
- }
-
- template <typename Object, typename Arg>
- static Object* create(Arg arg)
- {
- return new Object(arg);
- }
-
- template <typename Object>
- static void destroy(Object* o)
- {
- delete o;
- }
-
- template <typename Object>
- static Object*& next(Object* o)
- {
- return o->next_;
- }
-
- template <typename Object>
- static Object*& prev(Object* o)
- {
- return o->prev_;
- }
-};
-
-template <typename Object>
-class object_pool
- : private noncopyable
-{
-public:
- // Constructor.
- object_pool()
- : live_list_(0),
- free_list_(0)
- {
- }
-
- // Destructor destroys all objects.
- ~object_pool()
- {
- destroy_list(live_list_);
- destroy_list(free_list_);
- }
-
- // Get the object at the start of the live list.
- Object* first()
- {
- return live_list_;
- }
-
- // Allocate a new object.
- Object* alloc()
- {
- Object* o = free_list_;
- if (o)
- free_list_ = object_pool_access::next(free_list_);
- else
- o = object_pool_access::create<Object>();
-
- object_pool_access::next(o) = live_list_;
- object_pool_access::prev(o) = 0;
- if (live_list_)
- object_pool_access::prev(live_list_) = o;
- live_list_ = o;
-
- return o;
- }
-
- // Allocate a new object with an argument.
- template <typename Arg>
- Object* alloc(Arg arg)
- {
- Object* o = free_list_;
- if (o)
- free_list_ = object_pool_access::next(free_list_);
- else
- o = object_pool_access::create<Object>(arg);
-
- object_pool_access::next(o) = live_list_;
- object_pool_access::prev(o) = 0;
- if (live_list_)
- object_pool_access::prev(live_list_) = o;
- live_list_ = o;
-
- return o;
- }
-
- // Free an object. Moves it to the free list. No destructors are run.
- void free(Object* o)
- {
- if (live_list_ == o)
- live_list_ = object_pool_access::next(o);
-
- if (object_pool_access::prev(o))
- {
- object_pool_access::next(object_pool_access::prev(o))
- = object_pool_access::next(o);
- }
-
- if (object_pool_access::next(o))
- {
- object_pool_access::prev(object_pool_access::next(o))
- = object_pool_access::prev(o);
- }
-
- object_pool_access::next(o) = free_list_;
- object_pool_access::prev(o) = 0;
- free_list_ = o;
- }
-
-private:
- // Helper function to destroy all elements in a list.
- void destroy_list(Object* list)
- {
- while (list)
- {
- Object* o = list;
- list = object_pool_access::next(o);
- object_pool_access::destroy(o);
- }
- }
-
- // The list of live objects.
- Object* live_list_;
-
- // The free list.
- Object* free_list_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_OBJECT_POOL_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index f1b63cba0ec..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/old_win_sdk_compat.hpp
+++ /dev/null
@@ -1,216 +0,0 @@
-//
-// detail/old_win_sdk_compat.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_OLD_WIN_SDK_COMPAT_HPP
-#define BOOST_ASIO_DETAIL_OLD_WIN_SDK_COMPAT_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_WINDOWS) || defined(__CYGWIN__)
-
-// Guess whether we are building against on old Platform SDK.
-#if !defined(IN6ADDR_ANY_INIT)
-#define BOOST_ASIO_HAS_OLD_WIN_SDK 1
-#endif // !defined(IN6ADDR_ANY_INIT)
-
-#if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
-
-// Emulation of types that are missing from old Platform SDKs.
-//
-// N.B. this emulation is also used if building for a Windows 2000 target with
-// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support
-// in that case.
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-enum
-{
- sockaddr_storage_maxsize = 128, // Maximum size.
- sockaddr_storage_alignsize = (sizeof(__int64)), // Desired alignment.
- sockaddr_storage_pad1size = (sockaddr_storage_alignsize - sizeof(short)),
- sockaddr_storage_pad2size = (sockaddr_storage_maxsize -
- (sizeof(short) + sockaddr_storage_pad1size + sockaddr_storage_alignsize))
-};
-
-struct sockaddr_storage_emulation
-{
- short ss_family;
- char __ss_pad1[sockaddr_storage_pad1size];
- __int64 __ss_align;
- char __ss_pad2[sockaddr_storage_pad2size];
-};
-
-struct in6_addr_emulation
-{
- union
- {
- u_char Byte[16];
- u_short Word[8];
- } u;
-};
-
-#if !defined(s6_addr)
-# define _S6_un u
-# define _S6_u8 Byte
-# define s6_addr _S6_un._S6_u8
-#endif // !defined(s6_addr)
-
-struct sockaddr_in6_emulation
-{
- short sin6_family;
- u_short sin6_port;
- u_long sin6_flowinfo;
- in6_addr_emulation sin6_addr;
- u_long sin6_scope_id;
-};
-
-struct ipv6_mreq_emulation
-{
- in6_addr_emulation ipv6mr_multiaddr;
- unsigned int ipv6mr_interface;
-};
-
-struct addrinfo_emulation
-{
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- char* ai_canonname;
- sockaddr* ai_addr;
- addrinfo_emulation* ai_next;
-};
-
-#if !defined(AI_PASSIVE)
-# define AI_PASSIVE 0x1
-#endif
-
-#if !defined(AI_CANONNAME)
-# define AI_CANONNAME 0x2
-#endif
-
-#if !defined(AI_NUMERICHOST)
-# define AI_NUMERICHOST 0x4
-#endif
-
-#if !defined(EAI_AGAIN)
-# define EAI_AGAIN WSATRY_AGAIN
-#endif
-
-#if !defined(EAI_BADFLAGS)
-# define EAI_BADFLAGS WSAEINVAL
-#endif
-
-#if !defined(EAI_FAIL)
-# define EAI_FAIL WSANO_RECOVERY
-#endif
-
-#if !defined(EAI_FAMILY)
-# define EAI_FAMILY WSAEAFNOSUPPORT
-#endif
-
-#if !defined(EAI_MEMORY)
-# define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
-#endif
-
-#if !defined(EAI_NODATA)
-# define EAI_NODATA WSANO_DATA
-#endif
-
-#if !defined(EAI_NONAME)
-# define EAI_NONAME WSAHOST_NOT_FOUND
-#endif
-
-#if !defined(EAI_SERVICE)
-# define EAI_SERVICE WSATYPE_NOT_FOUND
-#endif
-
-#if !defined(EAI_SOCKTYPE)
-# define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
-#endif
-
-#if !defined(NI_NOFQDN)
-# define NI_NOFQDN 0x01
-#endif
-
-#if !defined(NI_NUMERICHOST)
-# define NI_NUMERICHOST 0x02
-#endif
-
-#if !defined(NI_NAMEREQD)
-# define NI_NAMEREQD 0x04
-#endif
-
-#if !defined(NI_NUMERICSERV)
-# define NI_NUMERICSERV 0x08
-#endif
-
-#if !defined(NI_DGRAM)
-# define NI_DGRAM 0x10
-#endif
-
-#if !defined(IPPROTO_IPV6)
-# define IPPROTO_IPV6 41
-#endif
-
-#if !defined(IPV6_UNICAST_HOPS)
-# define IPV6_UNICAST_HOPS 4
-#endif
-
-#if !defined(IPV6_MULTICAST_IF)
-# define IPV6_MULTICAST_IF 9
-#endif
-
-#if !defined(IPV6_MULTICAST_HOPS)
-# define IPV6_MULTICAST_HOPS 10
-#endif
-
-#if !defined(IPV6_MULTICAST_LOOP)
-# define IPV6_MULTICAST_LOOP 11
-#endif
-
-#if !defined(IPV6_JOIN_GROUP)
-# define IPV6_JOIN_GROUP 12
-#endif
-
-#if !defined(IPV6_LEAVE_GROUP)
-# define IPV6_LEAVE_GROUP 13
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
-
-// Even newer Platform SDKs that support IPv6 may not define IPV6_V6ONLY.
-#if !defined(IPV6_V6ONLY)
-# define IPV6_V6ONLY 27
-#endif
-
-// Some SDKs (e.g. Windows CE) don't define IPPROTO_ICMPV6.
-#if !defined(IPPROTO_ICMPV6)
-# define IPPROTO_ICMPV6 58
-#endif
-
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_OLD_WIN_SDK_COMPAT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp
deleted file mode 100644
index 935e45920f1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// detail/op_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_OP_QUEUE_HPP
-#define BOOST_ASIO_DETAIL_OP_QUEUE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Operation>
-class op_queue;
-
-class op_queue_access
-{
-public:
- template <typename Operation>
- static Operation* next(Operation* o)
- {
- return static_cast<Operation*>(o->next_);
- }
-
- template <typename Operation1, typename Operation2>
- static void next(Operation1*& o1, Operation2* o2)
- {
- o1->next_ = o2;
- }
-
- template <typename Operation>
- static void destroy(Operation* o)
- {
- o->destroy();
- }
-
- template <typename Operation>
- static Operation*& front(op_queue<Operation>& q)
- {
- return q.front_;
- }
-
- template <typename Operation>
- static Operation*& back(op_queue<Operation>& q)
- {
- return q.back_;
- }
-};
-
-template <typename Operation>
-class op_queue
- : private noncopyable
-{
-public:
- // Constructor.
- op_queue()
- : front_(0),
- back_(0)
- {
- }
-
- // Destructor destroys all operations.
- ~op_queue()
- {
- while (Operation* op = front_)
- {
- pop();
- op_queue_access::destroy(op);
- }
- }
-
- // Get the operation at the front of the queue.
- Operation* front()
- {
- return front_;
- }
-
- // Pop an operation from the front of the queue.
- void pop()
- {
- if (front_)
- {
- Operation* tmp = front_;
- front_ = op_queue_access::next(front_);
- if (front_ == 0)
- back_ = 0;
- op_queue_access::next(tmp, static_cast<Operation*>(0));
- }
- }
-
- // Push an operation on to the back of the queue.
- void push(Operation* h)
- {
- op_queue_access::next(h, static_cast<Operation*>(0));
- if (back_)
- {
- op_queue_access::next(back_, h);
- back_ = h;
- }
- else
- {
- front_ = back_ = h;
- }
- }
-
- // Push all operations from another queue on to the back of the queue. The
- // source queue may contain operations of a derived type.
- template <typename OtherOperation>
- void push(op_queue<OtherOperation>& q)
- {
- if (Operation* other_front = op_queue_access::front(q))
- {
- if (back_)
- op_queue_access::next(back_, other_front);
- else
- front_ = other_front;
- back_ = op_queue_access::back(q);
- op_queue_access::front(q) = 0;
- op_queue_access::back(q) = 0;
- }
- }
-
- // Whether the queue is empty.
- bool empty() const
- {
- return front_ == 0;
- }
-
- // Test whether an operation is already enqueued.
- bool is_enqueued(Operation* o) const
- {
- return op_queue_access::next(o) != 0 || back_ == o;
- }
-
-private:
- friend class op_queue_access;
-
- // The front of the queue.
- Operation* front_;
-
- // The back of the queue.
- Operation* back_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_OP_QUEUE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp
deleted file mode 100644
index 13220231ab3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// detail/operation.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_OPERATION_HPP
-#define BOOST_ASIO_DETAIL_OPERATION_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_IOCP)
-# include <boost/asio/detail/win_iocp_operation.hpp>
-#else
-# include <boost/asio/detail/scheduler_operation.hpp>
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-typedef win_iocp_operation operation;
-#else
-typedef scheduler_operation operation;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_OPERATION_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp
deleted file mode 100644
index 696d5657294..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// detail/pipe_select_interrupter.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_PIPE_SELECT_INTERRUPTER_HPP
-#define BOOST_ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_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_WINDOWS)
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-#if !defined(__CYGWIN__)
-#if !defined(__SYMBIAN32__)
-#if !defined(BOOST_ASIO_HAS_EVENTFD)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class pipe_select_interrupter
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL pipe_select_interrupter();
-
- // Destructor.
- BOOST_ASIO_DECL ~pipe_select_interrupter();
-
- // Recreate the interrupter's descriptors. Used after a fork.
- BOOST_ASIO_DECL void recreate();
-
- // Interrupt the select call.
- BOOST_ASIO_DECL void interrupt();
-
- // Reset the select interrupt. Returns true if the call was interrupted.
- BOOST_ASIO_DECL bool reset();
-
- // Get the read descriptor to be passed to select.
- int read_descriptor() const
- {
- return read_descriptor_;
- }
-
-private:
- // Open the descriptors. Throws on error.
- BOOST_ASIO_DECL void open_descriptors();
-
- // Close the descriptors.
- BOOST_ASIO_DECL void close_descriptors();
-
- // The read end of a connection used to interrupt the select call. This file
- // descriptor is passed to select such that when it is time to stop, a single
- // byte will be written on the other end of the connection and this
- // descriptor will become readable.
- int read_descriptor_;
-
- // The write end of a connection used to interrupt the select call. A single
- // byte may be written to this to wake up the select which is waiting for the
- // other end to become readable.
- int write_descriptor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/pipe_select_interrupter.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // !defined(BOOST_ASIO_HAS_EVENTFD)
-#endif // !defined(__SYMBIAN32__)
-#endif // !defined(__CYGWIN__)
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-#endif // !defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp
deleted file mode 100644
index 10450eacb5f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// detail/pop_options.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)
-//
-
-// No header guard
-
-#if defined(__COMO__)
-
-// Comeau C++
-
-#elif defined(__DMC__)
-
-// Digital Mars C++
-
-#elif defined(__INTEL_COMPILER) || defined(__ICL) \
- || defined(__ICC) || defined(__ECC)
-
-// Intel C++
-
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-
-#elif defined(__clang__)
-
-// Clang
-
-# if defined(__OBJC__)
-# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
-# if defined(BOOST_ASIO_OBJC_WORKAROUND)
-# undef Protocol
-# undef id
-# undef BOOST_ASIO_OBJC_WORKAROUND
-# endif
-# endif
-# endif
-
-# if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
-# pragma GCC visibility pop
-# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
-
-#elif defined(__GNUC__)
-
-// GNU C++
-
-# if defined(__MINGW32__) || defined(__CYGWIN__)
-# pragma pack (pop)
-# endif
-
-# if defined(__OBJC__)
-# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
-# if defined(BOOST_ASIO_OBJC_WORKAROUND)
-# undef Protocol
-# undef id
-# undef BOOST_ASIO_OBJC_WORKAROUND
-# endif
-# endif
-# endif
-
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-
-# if (__GNUC__ >= 7)
-# pragma GCC diagnostic pop
-# endif // (__GNUC__ >= 7)
-
-#elif defined(__KCC)
-
-// Kai C++
-
-#elif defined(__sgi)
-
-// SGI MIPSpro C++
-
-#elif defined(__DECCXX)
-
-// Compaq Tru64 Unix cxx
-
-#elif defined(__ghs)
-
-// Greenhills C++
-
-#elif defined(__BORLANDC__)
-
-// Borland C++
-
-# pragma option pop
-# pragma nopushoptwarn
-# pragma nopackwarning
-
-#elif defined(__MWERKS__)
-
-// Metrowerks CodeWarrior
-
-#elif defined(__SUNPRO_CC)
-
-// Sun Workshop Compiler C++
-
-#elif defined(__HP_aCC)
-
-// HP aCC
-
-#elif defined(__MRC__) || defined(__SC__)
-
-// MPW MrCpp or SCpp
-
-#elif defined(__IBMCPP__)
-
-// IBM Visual Age
-
-#elif defined(_MSC_VER)
-
-// Microsoft Visual C++
-//
-// Must remain the last #elif since some other vendors (Metrowerks, for example)
-// also #define _MSC_VER
-
-# pragma warning (pop)
-# pragma pack (pop)
-
-# if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
-# if defined(BOOST_ASIO_CLR_WORKAROUND)
-# undef generic
-# undef BOOST_ASIO_CLR_WORKAROUND
-# endif
-# endif
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp
deleted file mode 100644
index 98529eaf264..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// detail/posix_event.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_POSIX_EVENT_HPP
-#define BOOST_ASIO_DETAIL_POSIX_EVENT_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_PTHREADS)
-
-#include <pthread.h>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class posix_event
- : private noncopyable
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL posix_event();
-
- // Destructor.
- ~posix_event()
- {
- ::pthread_cond_destroy(&cond_);
- }
-
- // Signal the event. (Retained for backward compatibility.)
- template <typename Lock>
- void signal(Lock& lock)
- {
- this->signal_all(lock);
- }
-
- // Signal all waiters.
- template <typename Lock>
- void signal_all(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- (void)lock;
- state_ |= 1;
- ::pthread_cond_broadcast(&cond_); // Ignore EINVAL.
- }
-
- // Unlock the mutex and signal one waiter.
- template <typename Lock>
- void unlock_and_signal_one(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- state_ |= 1;
- bool have_waiters = (state_ > 1);
- lock.unlock();
- if (have_waiters)
- ::pthread_cond_signal(&cond_); // Ignore EINVAL.
- }
-
- // If there's a waiter, unlock the mutex and signal it.
- template <typename Lock>
- bool maybe_unlock_and_signal_one(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- state_ |= 1;
- if (state_ > 1)
- {
- lock.unlock();
- ::pthread_cond_signal(&cond_); // Ignore EINVAL.
- return true;
- }
- return false;
- }
-
- // Reset the event.
- template <typename Lock>
- void clear(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- (void)lock;
- state_ &= ~std::size_t(1);
- }
-
- // Wait for the event to become signalled.
- template <typename Lock>
- void wait(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- while ((state_ & 1) == 0)
- {
- state_ += 2;
- ::pthread_cond_wait(&cond_, &lock.mutex().mutex_); // Ignore EINVAL.
- state_ -= 2;
- }
- }
-
- // Timed wait for the event to become signalled.
- template <typename Lock>
- bool wait_for_usec(Lock& lock, long usec)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- if ((state_ & 1) == 0)
- {
- state_ += 2;
- timespec ts;
-#if (defined(__MACH__) && defined(__APPLE__)) \
- || (defined(__ANDROID__) && (__ANDROID_API__ < 21) \
- && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
- ts.tv_sec = usec / 1000000;
- ts.tv_nsec = (usec % 1000000) * 1000;
- ::pthread_cond_timedwait_relative_np(
- &cond_, &lock.mutex().mutex_, &ts); // Ignore EINVAL.
-#else // (defined(__MACH__) && defined(__APPLE__))
- // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)
- // && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
- if (::clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
- {
- ts.tv_sec += usec / 1000000;
- ts.tv_nsec = (usec % 1000000) * 1000;
- ts.tv_sec += ts.tv_nsec / 1000000000;
- ts.tv_nsec = ts.tv_nsec % 1000000000;
- ::pthread_cond_timedwait(&cond_,
- &lock.mutex().mutex_, &ts); // Ignore EINVAL.
- }
-#endif // (defined(__MACH__) && defined(__APPLE__))
- // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)
- // && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
- state_ -= 2;
- }
- return (state_ & 1) != 0;
- }
-
-private:
- ::pthread_cond_t cond_;
- std::size_t state_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/posix_event.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_EVENT_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index f68f2aa1c46..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_fd_set_adapter.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// detail/posix_fd_set_adapter.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_POSIX_FD_SET_ADAPTER_HPP
-#define BOOST_ASIO_DETAIL_POSIX_FD_SET_ADAPTER_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_WINDOWS) \
- && !defined(__CYGWIN__) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#include <cstring>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/reactor_op_queue.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Adapts the FD_SET type to meet the Descriptor_Set concept's requirements.
-class posix_fd_set_adapter : noncopyable
-{
-public:
- posix_fd_set_adapter()
- : max_descriptor_(invalid_socket)
- {
- using namespace std; // Needed for memset on Solaris.
- FD_ZERO(&fd_set_);
- }
-
- void reset()
- {
- using namespace std; // Needed for memset on Solaris.
- FD_ZERO(&fd_set_);
- }
-
- bool set(socket_type descriptor)
- {
- if (descriptor < (socket_type)FD_SETSIZE)
- {
- if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_)
- max_descriptor_ = descriptor;
- FD_SET(descriptor, &fd_set_);
- return true;
- }
- return false;
- }
-
- void set(reactor_op_queue<socket_type>& operations, op_queue<operation>& ops)
- {
- reactor_op_queue<socket_type>::iterator i = operations.begin();
- while (i != operations.end())
- {
- reactor_op_queue<socket_type>::iterator op_iter = i++;
- if (!set(op_iter->first))
- {
- boost::system::error_code ec(error::fd_set_failure);
- operations.cancel_operations(op_iter, ops, ec);
- }
- }
- }
-
- bool is_set(socket_type descriptor) const
- {
- return FD_ISSET(descriptor, &fd_set_) != 0;
- }
-
- operator fd_set*()
- {
- return &fd_set_;
- }
-
- socket_type max_descriptor() const
- {
- return max_descriptor_;
- }
-
- void perform(reactor_op_queue<socket_type>& operations,
- op_queue<operation>& ops) const
- {
- reactor_op_queue<socket_type>::iterator i = operations.begin();
- while (i != operations.end())
- {
- reactor_op_queue<socket_type>::iterator op_iter = i++;
- if (is_set(op_iter->first))
- operations.perform_operations(op_iter, ops);
- }
- }
-
-private:
- mutable fd_set fd_set_;
- socket_type max_descriptor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(__CYGWIN__)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_FD_SET_ADAPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp
deleted file mode 100644
index c2c2996f88d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// detail/posix_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_POSIX_GLOBAL_HPP
-#define BOOST_ASIO_DETAIL_POSIX_GLOBAL_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_PTHREADS)
-
-#include <exception>
-#include <pthread.h>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-struct posix_global_impl
-{
- // Helper function to perform initialisation.
- static void do_init()
- {
- instance_.static_ptr_ = instance_.ptr_ = new T;
- }
-
- // Destructor automatically cleans up the global.
- ~posix_global_impl()
- {
- delete static_ptr_;
- }
-
- static ::pthread_once_t init_once_;
- static T* static_ptr_;
- static posix_global_impl instance_;
- T* ptr_;
-};
-
-template <typename T>
-::pthread_once_t posix_global_impl<T>::init_once_ = PTHREAD_ONCE_INIT;
-
-template <typename T>
-T* posix_global_impl<T>::static_ptr_ = 0;
-
-template <typename T>
-posix_global_impl<T> posix_global_impl<T>::instance_;
-
-template <typename T>
-T& posix_global()
-{
- int result = ::pthread_once(
- &posix_global_impl<T>::init_once_,
- &posix_global_impl<T>::do_init);
-
- if (result != 0)
- std::terminate();
-
- return *posix_global_impl<T>::instance_.ptr_;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_GLOBAL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp
deleted file mode 100644
index 5e1d42c530b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// detail/posix_mutex.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_POSIX_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_POSIX_MUTEX_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_PTHREADS)
-
-#include <pthread.h>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class posix_event;
-
-class posix_mutex
- : private noncopyable
-{
-public:
- typedef boost::asio::detail::scoped_lock<posix_mutex> scoped_lock;
-
- // Constructor.
- BOOST_ASIO_DECL posix_mutex();
-
- // Destructor.
- ~posix_mutex()
- {
- ::pthread_mutex_destroy(&mutex_); // Ignore EBUSY.
- }
-
- // Lock the mutex.
- void lock()
- {
- (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL.
- }
-
- // Unlock the mutex.
- void unlock()
- {
- (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL.
- }
-
-private:
- friend class posix_event;
- ::pthread_mutex_t mutex_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/posix_mutex.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp
deleted file mode 100644
index ea5758fb2c4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// detail/posix_signal_blocker.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_POSIX_SIGNAL_BLOCKER_HPP
-#define BOOST_ASIO_DETAIL_POSIX_SIGNAL_BLOCKER_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_PTHREADS)
-
-#include <csignal>
-#include <pthread.h>
-#include <signal.h>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class posix_signal_blocker
- : private noncopyable
-{
-public:
- // Constructor blocks all signals for the calling thread.
- posix_signal_blocker()
- : blocked_(false)
- {
- sigset_t new_mask;
- sigfillset(&new_mask);
- blocked_ = (pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask_) == 0);
- }
-
- // Destructor restores the previous signal mask.
- ~posix_signal_blocker()
- {
- if (blocked_)
- pthread_sigmask(SIG_SETMASK, &old_mask_, 0);
- }
-
- // Block all signals for the calling thread.
- void block()
- {
- if (!blocked_)
- {
- sigset_t new_mask;
- sigfillset(&new_mask);
- blocked_ = (pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask_) == 0);
- }
- }
-
- // Restore the previous signal mask.
- void unblock()
- {
- if (blocked_)
- blocked_ = (pthread_sigmask(SIG_SETMASK, &old_mask_, 0) != 0);
- }
-
-private:
- // Have signals been blocked.
- bool blocked_;
-
- // The previous signal mask.
- sigset_t old_mask_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_SIGNAL_BLOCKER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp
deleted file mode 100644
index cbf7013c2df..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// detail/posix_static_mutex.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_POSIX_STATIC_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_POSIX_STATIC_MUTEX_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_PTHREADS)
-
-#include <pthread.h>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct posix_static_mutex
-{
- typedef boost::asio::detail::scoped_lock<posix_static_mutex> scoped_lock;
-
- // Initialise the mutex.
- void init()
- {
- // Nothing to do.
- }
-
- // Lock the mutex.
- void lock()
- {
- (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL.
- }
-
- // Unlock the mutex.
- void unlock()
- {
- (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL.
- }
-
- ::pthread_mutex_t mutex_;
-};
-
-#define BOOST_ASIO_POSIX_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER }
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp
deleted file mode 100644
index b2821f5356a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-// detail/posix_thread.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_POSIX_THREAD_HPP
-#define BOOST_ASIO_DETAIL_POSIX_THREAD_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_PTHREADS)
-
-#include <cstddef>
-#include <pthread.h>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-extern "C"
-{
- BOOST_ASIO_DECL void* boost_asio_detail_posix_thread_function(void* arg);
-}
-
-class posix_thread
- : private noncopyable
-{
-public:
- // Constructor.
- template <typename Function>
- posix_thread(Function f, unsigned int = 0)
- : joined_(false)
- {
- start_thread(new func<Function>(f));
- }
-
- // Destructor.
- BOOST_ASIO_DECL ~posix_thread();
-
- // Wait for the thread to exit.
- BOOST_ASIO_DECL void join();
-
- // Get number of CPUs.
- BOOST_ASIO_DECL static std::size_t hardware_concurrency();
-
-private:
- friend void* boost_asio_detail_posix_thread_function(void* arg);
-
- class func_base
- {
- public:
- virtual ~func_base() {}
- virtual void run() = 0;
- };
-
- struct auto_func_base_ptr
- {
- func_base* ptr;
- ~auto_func_base_ptr() { delete ptr; }
- };
-
- template <typename Function>
- class func
- : public func_base
- {
- public:
- func(Function f)
- : f_(f)
- {
- }
-
- virtual void run()
- {
- f_();
- }
-
- private:
- Function f_;
- };
-
- BOOST_ASIO_DECL void start_thread(func_base* arg);
-
- ::pthread_t thread_;
- bool joined_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/posix_thread.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp
deleted file mode 100644
index 93d06744a7e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// detail/posix_tss_ptr.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_POSIX_TSS_PTR_HPP
-#define BOOST_ASIO_DETAIL_POSIX_TSS_PTR_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_PTHREADS)
-
-#include <pthread.h>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper function to create thread-specific storage.
-BOOST_ASIO_DECL void posix_tss_ptr_create(pthread_key_t& key);
-
-template <typename T>
-class posix_tss_ptr
- : private noncopyable
-{
-public:
- // Constructor.
- posix_tss_ptr()
- {
- posix_tss_ptr_create(tss_key_);
- }
-
- // Destructor.
- ~posix_tss_ptr()
- {
- ::pthread_key_delete(tss_key_);
- }
-
- // Get the value.
- operator T*() const
- {
- return static_cast<T*>(::pthread_getspecific(tss_key_));
- }
-
- // Set the value.
- void operator=(T* value)
- {
- ::pthread_setspecific(tss_key_, value);
- }
-
-private:
- // Thread-specific storage to allow unlocked access to determine whether a
- // thread is a member of the pool.
- pthread_key_t tss_key_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/posix_tss_ptr.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
-
-#endif // BOOST_ASIO_DETAIL_POSIX_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp
deleted file mode 100644
index 4927df93a24..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp
+++ /dev/null
@@ -1,175 +0,0 @@
-//
-// detail/push_options.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)
-//
-
-// No header guard
-
-#if defined(__COMO__)
-
-// Comeau C++
-
-#elif defined(__DMC__)
-
-// Digital Mars C++
-
-#elif defined(__INTEL_COMPILER) || defined(__ICL) \
- || defined(__ICC) || defined(__ECC)
-
-// Intel C++
-
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-
-#elif defined(__clang__)
-
-// Clang
-
-# if defined(__OBJC__)
-# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
-# if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
-# if !defined(Protocol) && !defined(id)
-# define Protocol cpp_Protocol
-# define id cpp_id
-# define BOOST_ASIO_OBJC_WORKAROUND
-# endif
-# endif
-# endif
-# endif
-
-# if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
-# pragma GCC visibility push (default)
-# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
-
-#elif defined(__GNUC__)
-
-// GNU C++
-
-# if defined(__MINGW32__) || defined(__CYGWIN__)
-# pragma pack (push, 8)
-# endif
-
-# if defined(__OBJC__)
-# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
-# if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
-# if !defined(Protocol) && !defined(id)
-# define Protocol cpp_Protocol
-# define id cpp_id
-# define BOOST_ASIO_OBJC_WORKAROUND
-# endif
-# endif
-# endif
-# endif
-
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-
-# if (__GNUC__ >= 7)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
-# endif // (__GNUC__ >= 7)
-
-#elif defined(__KCC)
-
-// Kai C++
-
-#elif defined(__sgi)
-
-// SGI MIPSpro C++
-
-#elif defined(__DECCXX)
-
-// Compaq Tru64 Unix cxx
-
-#elif defined(__ghs)
-
-// Greenhills C++
-
-#elif defined(__BORLANDC__)
-
-// Borland C++
-
-# pragma option push -a8 -b -Ve- -Vx- -w-inl -vi-
-# pragma nopushoptwarn
-# pragma nopackwarning
-# if !defined(__MT__)
-# error Multithreaded RTL must be selected.
-# endif // !defined(__MT__)
-
-#elif defined(__MWERKS__)
-
-// Metrowerks CodeWarrior
-
-#elif defined(__SUNPRO_CC)
-
-// Sun Workshop Compiler C++
-
-#elif defined(__HP_aCC)
-
-// HP aCC
-
-#elif defined(__MRC__) || defined(__SC__)
-
-// MPW MrCpp or SCpp
-
-#elif defined(__IBMCPP__)
-
-// IBM Visual Age
-
-#elif defined(_MSC_VER)
-
-// Microsoft Visual C++
-//
-// Must remain the last #elif since some other vendors (Metrowerks, for example)
-// also #define _MSC_VER
-
-# pragma warning (disable:4103)
-# pragma warning (push)
-# pragma warning (disable:4127)
-# pragma warning (disable:4180)
-# pragma warning (disable:4244)
-# pragma warning (disable:4355)
-# pragma warning (disable:4510)
-# pragma warning (disable:4512)
-# pragma warning (disable:4610)
-# pragma warning (disable:4675)
-# if (_MSC_VER < 1600)
-// Visual Studio 2008 generates spurious warnings about unused parameters.
-# pragma warning (disable:4100)
-# endif // (_MSC_VER < 1600)
-# if defined(_M_IX86) && defined(_Wp64)
-// The /Wp64 option is broken. If you want to check 64 bit portability, use a
-// 64 bit compiler!
-# pragma warning (disable:4311)
-# pragma warning (disable:4312)
-# endif // defined(_M_IX86) && defined(_Wp64)
-# pragma pack (push, 8)
-// Note that if the /Og optimisation flag is enabled with MSVC6, the compiler
-// has a tendency to incorrectly optimise away some calls to member template
-// functions, even though those functions contain code that should not be
-// optimised away! Therefore we will always disable this optimisation option
-// for the MSVC6 compiler.
-# if (_MSC_VER < 1300)
-# pragma optimize ("g", off)
-# endif
-# if !defined(_MT)
-# error Multithreaded RTL must be selected.
-# endif // !defined(_MT)
-
-# if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
-# if !defined(BOOST_ASIO_DISABLE_CLR_WORKAROUND)
-# if !defined(generic)
-# define generic cpp_generic
-# define BOOST_ASIO_CLR_WORKAROUND
-# endif
-# endif
-# endif
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp
deleted file mode 100644
index ac50a8ccb94..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp
+++ /dev/null
@@ -1,390 +0,0 @@
-//
-// detail/reactive_descriptor_service.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_REACTIVE_DESCRIPTOR_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_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_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/descriptor_ops.hpp>
-#include <boost/asio/detail/descriptor_read_op.hpp>
-#include <boost/asio/detail/descriptor_write_op.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/reactive_null_buffers_op.hpp>
-#include <boost/asio/detail/reactive_wait_op.hpp>
-#include <boost/asio/detail/reactor.hpp>
-#include <boost/asio/posix/descriptor_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class reactive_descriptor_service :
- public service_base<reactive_descriptor_service>
-{
-public:
- // The native type of a descriptor.
- typedef int native_handle_type;
-
- // The implementation type of the descriptor.
- class implementation_type
- : private boost::asio::detail::noncopyable
- {
- public:
- // Default constructor.
- implementation_type()
- : descriptor_(-1),
- state_(0)
- {
- }
-
- private:
- // Only this service will have access to the internal values.
- friend class reactive_descriptor_service;
-
- // The native descriptor representation.
- int descriptor_;
-
- // The current state of the descriptor.
- descriptor_ops::state_type state_;
-
- // Per-descriptor data used by the reactor.
- reactor::per_descriptor_data reactor_data_;
- };
-
- // Constructor.
- BOOST_ASIO_DECL reactive_descriptor_service(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Construct a new descriptor implementation.
- BOOST_ASIO_DECL void construct(implementation_type& impl);
-
- // Move-construct a new descriptor implementation.
- BOOST_ASIO_DECL void move_construct(implementation_type& impl,
- implementation_type& other_impl);
-
- // Move-assign from another descriptor implementation.
- BOOST_ASIO_DECL void move_assign(implementation_type& impl,
- reactive_descriptor_service& other_service,
- implementation_type& other_impl);
-
- // Destroy a descriptor implementation.
- BOOST_ASIO_DECL void destroy(implementation_type& impl);
-
- // Assign a native descriptor to a descriptor implementation.
- BOOST_ASIO_DECL boost::system::error_code assign(implementation_type& impl,
- const native_handle_type& native_descriptor,
- boost::system::error_code& ec);
-
- // Determine whether the descriptor is open.
- bool is_open(const implementation_type& impl) const
- {
- return impl.descriptor_ != -1;
- }
-
- // Destroy a descriptor implementation.
- BOOST_ASIO_DECL boost::system::error_code close(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Get the native descriptor representation.
- native_handle_type native_handle(const implementation_type& impl) const
- {
- return impl.descriptor_;
- }
-
- // Release ownership of the native descriptor representation.
- BOOST_ASIO_DECL native_handle_type release(implementation_type& impl);
-
- // Cancel all operations associated with the descriptor.
- BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Perform an IO control command on the descriptor.
- template <typename IO_Control_Command>
- boost::system::error_code io_control(implementation_type& impl,
- IO_Control_Command& command, boost::system::error_code& ec)
- {
- descriptor_ops::ioctl(impl.descriptor_, impl.state_,
- command.name(), static_cast<ioctl_arg_type*>(command.data()), ec);
- return ec;
- }
-
- // Gets the non-blocking mode of the descriptor.
- bool non_blocking(const implementation_type& impl) const
- {
- return (impl.state_ & descriptor_ops::user_set_non_blocking) != 0;
- }
-
- // Sets the non-blocking mode of the descriptor.
- boost::system::error_code non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- descriptor_ops::set_user_non_blocking(
- impl.descriptor_, impl.state_, mode, ec);
- return ec;
- }
-
- // Gets the non-blocking mode of the native descriptor implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return (impl.state_ & descriptor_ops::internal_non_blocking) != 0;
- }
-
- // Sets the non-blocking mode of the native descriptor implementation.
- boost::system::error_code native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- descriptor_ops::set_internal_non_blocking(
- impl.descriptor_, impl.state_, mode, ec);
- return ec;
- }
-
- // Wait for the descriptor to become ready to read, ready to write, or to have
- // pending error conditions.
- boost::system::error_code wait(implementation_type& impl,
- posix::descriptor_base::wait_type w, boost::system::error_code& ec)
- {
- switch (w)
- {
- case posix::descriptor_base::wait_read:
- descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
- break;
- case posix::descriptor_base::wait_write:
- descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
- break;
- case posix::descriptor_base::wait_error:
- descriptor_ops::poll_error(impl.descriptor_, impl.state_, ec);
- break;
- default:
- ec = boost::asio::error::invalid_argument;
- break;
- }
-
- return ec;
- }
-
- // Asynchronously wait for the descriptor to become ready to read, ready to
- // write, or to have pending error conditions.
- template <typename Handler>
- void async_wait(implementation_type& impl,
- posix::descriptor_base::wait_type w, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_wait_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
- &impl, impl.descriptor_, "async_wait"));
-
- int op_type;
- switch (w)
- {
- case posix::descriptor_base::wait_read:
- op_type = reactor::read_op;
- break;
- case posix::descriptor_base::wait_write:
- op_type = reactor::write_op;
- break;
- case posix::descriptor_base::wait_error:
- op_type = reactor::except_op;
- break;
- default:
- p.p->ec_ = boost::asio::error::invalid_argument;
- reactor_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- return;
- }
-
- start_op(impl, op_type, p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Write some data to the descriptor.
- template <typename ConstBufferSequence>
- size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- return descriptor_ops::sync_write(impl.descriptor_, impl.state_,
- bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
- }
-
- // Wait until data can be written without blocking.
- size_t write_some(implementation_type& impl,
- const null_buffers&, boost::system::error_code& ec)
- {
- // Wait for descriptor to become ready.
- descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
-
- return 0;
- }
-
- // Start an asynchronous write. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef descriptor_write_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.descriptor_, buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
- &impl, impl.descriptor_, "async_write_some"));
-
- start_op(impl, reactor::write_op, p.p, is_continuation, true,
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers));
- p.v = p.p = 0;
- }
-
- // Start an asynchronous wait until data can be written without blocking.
- template <typename Handler>
- void async_write_some(implementation_type& impl,
- const null_buffers&, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
- &impl, impl.descriptor_, "async_write_some(null_buffers)"));
-
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Read some data from the stream. Returns the number of bytes read.
- template <typename MutableBufferSequence>
- size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- return descriptor_ops::sync_read(impl.descriptor_, impl.state_,
- bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
- }
-
- // Wait until data can be read without blocking.
- size_t read_some(implementation_type& impl,
- const null_buffers&, boost::system::error_code& ec)
- {
- // Wait for descriptor to become ready.
- descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
-
- return 0;
- }
-
- // Start an asynchronous read. The buffer for the data being read must be
- // valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef descriptor_read_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.descriptor_, buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
- &impl, impl.descriptor_, "async_read_some"));
-
- start_op(impl, reactor::read_op, p.p, is_continuation, true,
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers));
- p.v = p.p = 0;
- }
-
- // Wait until data can be read without blocking.
- template <typename Handler>
- void async_read_some(implementation_type& impl,
- const null_buffers&, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
- &impl, impl.descriptor_, "async_read_some(null_buffers)"));
-
- start_op(impl, reactor::read_op, p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
-private:
- // Start the asynchronous operation.
- BOOST_ASIO_DECL void start_op(implementation_type& impl, int op_type,
- reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
-
- // The selector that performs event demultiplexing for the service.
- reactor& reactor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/reactive_descriptor_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index dca3a3285f1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_null_buffers_op.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// detail/reactive_null_buffers_op.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_REACTIVE_NULL_BUFFERS_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_NULL_BUFFERS_OP_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/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class reactive_null_buffers_op : public reactor_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_null_buffers_op);
-
- reactive_null_buffers_op(Handler& handler)
- : reactor_op(&reactive_null_buffers_op::do_perform,
- &reactive_null_buffers_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static status do_perform(reactor_op*)
- {
- return done;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_null_buffers_op* o(static_cast<reactive_null_buffers_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_NULL_BUFFERS_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 42ff500d2cf..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_serial_port_service.hpp
+++ /dev/null
@@ -1,238 +0,0 @@
-//
-// detail/reactive_serial_port_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_REACTIVE_SERIAL_PORT_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_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_SERIAL_PORT)
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#include <string>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/serial_port_base.hpp>
-#include <boost/asio/detail/descriptor_ops.hpp>
-#include <boost/asio/detail/reactive_descriptor_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Extend reactive_descriptor_service to provide serial port support.
-class reactive_serial_port_service :
- public service_base<reactive_serial_port_service>
-{
-public:
- // The native type of a serial port.
- typedef reactive_descriptor_service::native_handle_type native_handle_type;
-
- // The implementation type of the serial port.
- typedef reactive_descriptor_service::implementation_type implementation_type;
-
- BOOST_ASIO_DECL reactive_serial_port_service(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Construct a new serial port implementation.
- void construct(implementation_type& impl)
- {
- descriptor_service_.construct(impl);
- }
-
- // Move-construct a new serial port implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- descriptor_service_.move_construct(impl, other_impl);
- }
-
- // Move-assign from another serial port implementation.
- void move_assign(implementation_type& impl,
- reactive_serial_port_service& other_service,
- implementation_type& other_impl)
- {
- descriptor_service_.move_assign(impl,
- other_service.descriptor_service_, other_impl);
- }
-
- // Destroy a serial port implementation.
- void destroy(implementation_type& impl)
- {
- descriptor_service_.destroy(impl);
- }
-
- // Open the serial port using the specified device name.
- BOOST_ASIO_DECL boost::system::error_code open(implementation_type& impl,
- const std::string& device, boost::system::error_code& ec);
-
- // Assign a native descriptor to a serial port implementation.
- boost::system::error_code assign(implementation_type& impl,
- const native_handle_type& native_descriptor,
- boost::system::error_code& ec)
- {
- return descriptor_service_.assign(impl, native_descriptor, ec);
- }
-
- // Determine whether the serial port is open.
- bool is_open(const implementation_type& impl) const
- {
- return descriptor_service_.is_open(impl);
- }
-
- // Destroy a serial port implementation.
- boost::system::error_code close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return descriptor_service_.close(impl, ec);
- }
-
- // Get the native serial port representation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return descriptor_service_.native_handle(impl);
- }
-
- // Cancel all operations associated with the serial port.
- boost::system::error_code cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return descriptor_service_.cancel(impl, ec);
- }
-
- // Set an option on the serial port.
- template <typename SettableSerialPortOption>
- boost::system::error_code set_option(implementation_type& impl,
- const SettableSerialPortOption& option, boost::system::error_code& ec)
- {
- return do_set_option(impl,
- &reactive_serial_port_service::store_option<SettableSerialPortOption>,
- &option, ec);
- }
-
- // Get an option from the serial port.
- template <typename GettableSerialPortOption>
- boost::system::error_code get_option(const implementation_type& impl,
- GettableSerialPortOption& option, boost::system::error_code& ec) const
- {
- return do_get_option(impl,
- &reactive_serial_port_service::load_option<GettableSerialPortOption>,
- &option, ec);
- }
-
- // Send a break sequence to the serial port.
- boost::system::error_code send_break(implementation_type& impl,
- boost::system::error_code& ec)
- {
- errno = 0;
- descriptor_ops::error_wrapper(::tcsendbreak(
- descriptor_service_.native_handle(impl), 0), ec);
- return ec;
- }
-
- // Write the given data. Returns the number of bytes sent.
- template <typename ConstBufferSequence>
- size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return descriptor_service_.write_some(impl, buffers, ec);
- }
-
- // Start an asynchronous write. The data being written must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
- {
- descriptor_service_.async_write_some(impl, buffers, handler);
- }
-
- // Read some data. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return descriptor_service_.read_some(impl, buffers, ec);
- }
-
- // Start an asynchronous read. The buffer for the data being received must be
- // valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
- {
- descriptor_service_.async_read_some(impl, buffers, handler);
- }
-
-private:
- // Function pointer type for storing a serial port option.
- typedef boost::system::error_code (*store_function_type)(
- const void*, termios&, boost::system::error_code&);
-
- // Helper function template to store a serial port option.
- template <typename SettableSerialPortOption>
- static boost::system::error_code store_option(const void* option,
- termios& storage, boost::system::error_code& ec)
- {
- static_cast<const SettableSerialPortOption*>(option)->store(storage, ec);
- return ec;
- }
-
- // Helper function to set a serial port option.
- BOOST_ASIO_DECL boost::system::error_code do_set_option(
- implementation_type& impl, store_function_type store,
- const void* option, boost::system::error_code& ec);
-
- // Function pointer type for loading a serial port option.
- typedef boost::system::error_code (*load_function_type)(
- void*, const termios&, boost::system::error_code&);
-
- // Helper function template to load a serial port option.
- template <typename GettableSerialPortOption>
- static boost::system::error_code load_option(void* option,
- const termios& storage, boost::system::error_code& ec)
- {
- static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
- return ec;
- }
-
- // Helper function to get a serial port option.
- BOOST_ASIO_DECL boost::system::error_code do_get_option(
- const implementation_type& impl, load_function_type load,
- void* option, boost::system::error_code& ec) const;
-
- // The implementation used for initiating asynchronous operations.
- reactive_descriptor_service descriptor_service_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 292f3bdf25f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_accept_op.hpp
+++ /dev/null
@@ -1,219 +0,0 @@
-//
-// detail/reactive_socket_accept_op.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_REACTIVE_SOCKET_ACCEPT_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_ACCEPT_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_holder.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Socket, typename Protocol>
-class reactive_socket_accept_op_base : public reactor_op
-{
-public:
- reactive_socket_accept_op_base(socket_type socket,
- socket_ops::state_type state, Socket& peer, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint, func_type complete_func)
- : reactor_op(&reactive_socket_accept_op_base::do_perform, complete_func),
- socket_(socket),
- state_(state),
- peer_(peer),
- protocol_(protocol),
- peer_endpoint_(peer_endpoint),
- addrlen_(peer_endpoint ? peer_endpoint->capacity() : 0)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_accept_op_base* o(
- static_cast<reactive_socket_accept_op_base*>(base));
-
- socket_type new_socket = invalid_socket;
- status result = socket_ops::non_blocking_accept(o->socket_,
- o->state_, o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
- o->peer_endpoint_ ? &o->addrlen_ : 0, o->ec_, new_socket)
- ? done : not_done;
- o->new_socket_.reset(new_socket);
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_accept", o->ec_));
-
- return result;
- }
-
- void do_assign()
- {
- if (new_socket_.get() != invalid_socket)
- {
- if (peer_endpoint_)
- peer_endpoint_->resize(addrlen_);
- peer_.assign(protocol_, new_socket_.get(), ec_);
- if (!ec_)
- new_socket_.release();
- }
- }
-
-private:
- socket_type socket_;
- socket_ops::state_type state_;
- socket_holder new_socket_;
- Socket& peer_;
- Protocol protocol_;
- typename Protocol::endpoint* peer_endpoint_;
- std::size_t addrlen_;
-};
-
-template <typename Socket, typename Protocol, typename Handler>
-class reactive_socket_accept_op :
- public reactive_socket_accept_op_base<Socket, Protocol>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_accept_op);
-
- reactive_socket_accept_op(socket_type socket,
- socket_ops::state_type state, Socket& peer, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint, Handler& handler)
- : reactive_socket_accept_op_base<Socket, Protocol>(socket, state, peer,
- protocol, peer_endpoint, &reactive_socket_accept_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_accept_op* o(static_cast<reactive_socket_accept_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- // On success, assign new connection to peer socket object.
- if (owner)
- o->do_assign();
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, o->ec_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-
-template <typename Protocol, typename Handler>
-class reactive_socket_move_accept_op :
- private Protocol::socket,
- public reactive_socket_accept_op_base<typename Protocol::socket, Protocol>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_move_accept_op);
-
- reactive_socket_move_accept_op(io_context& ioc, socket_type socket,
- socket_ops::state_type state, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint, Handler& handler)
- : Protocol::socket(ioc),
- reactive_socket_accept_op_base<typename Protocol::socket, Protocol>(
- socket, state, *this, protocol, peer_endpoint,
- &reactive_socket_move_accept_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_move_accept_op* o(
- static_cast<reactive_socket_move_accept_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- // On success, assign new connection to peer socket object.
- if (owner)
- o->do_assign();
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::move_binder2<Handler,
- boost::system::error_code, typename Protocol::socket>
- handler(0, BOOST_ASIO_MOVE_CAST(Handler)(o->handler_), o->ec_,
- BOOST_ASIO_MOVE_CAST(typename Protocol::socket)(*o));
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_ACCEPT_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index bbb5020501c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_connect_op.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//
-// detail/reactive_socket_connect_op.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_REACTIVE_SOCKET_CONNECT_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class reactive_socket_connect_op_base : public reactor_op
-{
-public:
- reactive_socket_connect_op_base(socket_type socket, func_type complete_func)
- : reactor_op(&reactive_socket_connect_op_base::do_perform, complete_func),
- socket_(socket)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_connect_op_base* o(
- static_cast<reactive_socket_connect_op_base*>(base));
-
- status result = socket_ops::non_blocking_connect(
- o->socket_, o->ec_) ? done : not_done;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_connect", o->ec_));
-
- return result;
- }
-
-private:
- socket_type socket_;
-};
-
-template <typename Handler>
-class reactive_socket_connect_op : public reactive_socket_connect_op_base
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_connect_op);
-
- reactive_socket_connect_op(socket_type socket, Handler& handler)
- : reactive_socket_connect_op_base(socket,
- &reactive_socket_connect_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_connect_op* o
- (static_cast<reactive_socket_connect_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, o->ec_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 0f124627bd2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recv_op.hpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//
-// detail/reactive_socket_recv_op.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_REACTIVE_SOCKET_RECV_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECV_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence>
-class reactive_socket_recv_op_base : public reactor_op
-{
-public:
- reactive_socket_recv_op_base(socket_type socket,
- socket_ops::state_type state, const MutableBufferSequence& buffers,
- socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_recv_op_base::do_perform, complete_func),
- socket_(socket),
- state_(state),
- buffers_(buffers),
- flags_(flags)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_recv_op_base* o(
- static_cast<reactive_socket_recv_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
-
- status result = socket_ops::non_blocking_recv(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
- (o->state_ & socket_ops::stream_oriented) != 0,
- o->ec_, o->bytes_transferred_) ? done : not_done;
-
- if (result == done)
- if ((o->state_ & socket_ops::stream_oriented) != 0)
- if (o->bytes_transferred_ == 0)
- result = done_and_exhausted;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recv",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- socket_type socket_;
- socket_ops::state_type state_;
- MutableBufferSequence buffers_;
- socket_base::message_flags flags_;
-};
-
-template <typename MutableBufferSequence, typename Handler>
-class reactive_socket_recv_op :
- public reactive_socket_recv_op_base<MutableBufferSequence>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_recv_op);
-
- reactive_socket_recv_op(socket_type socket,
- socket_ops::state_type state, const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_recv_op_base<MutableBufferSequence>(socket, state,
- buffers, flags, &reactive_socket_recv_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_recv_op* o(static_cast<reactive_socket_recv_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECV_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index b96a01327a0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp
+++ /dev/null
@@ -1,140 +0,0 @@
-//
-// detail/reactive_socket_recvfrom_op.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_REACTIVE_SOCKET_RECVFROM_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVFROM_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence, typename Endpoint>
-class reactive_socket_recvfrom_op_base : public reactor_op
-{
-public:
- reactive_socket_recvfrom_op_base(socket_type socket, int protocol_type,
- const MutableBufferSequence& buffers, Endpoint& endpoint,
- socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_recvfrom_op_base::do_perform, complete_func),
- socket_(socket),
- protocol_type_(protocol_type),
- buffers_(buffers),
- sender_endpoint_(endpoint),
- flags_(flags)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_recvfrom_op_base* o(
- static_cast<reactive_socket_recvfrom_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
-
- std::size_t addr_len = o->sender_endpoint_.capacity();
- status result = socket_ops::non_blocking_recvfrom(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
- o->sender_endpoint_.data(), &addr_len,
- o->ec_, o->bytes_transferred_) ? done : not_done;
-
- if (result && !o->ec_)
- o->sender_endpoint_.resize(addr_len);
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recvfrom",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- socket_type socket_;
- int protocol_type_;
- MutableBufferSequence buffers_;
- Endpoint& sender_endpoint_;
- socket_base::message_flags flags_;
-};
-
-template <typename MutableBufferSequence, typename Endpoint, typename Handler>
-class reactive_socket_recvfrom_op :
- public reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvfrom_op);
-
- reactive_socket_recvfrom_op(socket_type socket, int protocol_type,
- const MutableBufferSequence& buffers, Endpoint& endpoint,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>(
- socket, protocol_type, buffers, endpoint, flags,
- &reactive_socket_recvfrom_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_recvfrom_op* o(
- static_cast<reactive_socket_recvfrom_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVFROM_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 6ae324947c5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// detail/reactive_socket_recvmsg_op.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_REACTIVE_SOCKET_RECVMSG_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVMSG_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/socket_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence>
-class reactive_socket_recvmsg_op_base : public reactor_op
-{
-public:
- reactive_socket_recvmsg_op_base(socket_type socket,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, func_type complete_func)
- : reactor_op(&reactive_socket_recvmsg_op_base::do_perform, complete_func),
- socket_(socket),
- buffers_(buffers),
- in_flags_(in_flags),
- out_flags_(out_flags)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_recvmsg_op_base* o(
- static_cast<reactive_socket_recvmsg_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
-
- status result = socket_ops::non_blocking_recvmsg(o->socket_,
- bufs.buffers(), bufs.count(),
- o->in_flags_, o->out_flags_,
- o->ec_, o->bytes_transferred_) ? done : not_done;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recvmsg",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- socket_type socket_;
- MutableBufferSequence buffers_;
- socket_base::message_flags in_flags_;
- socket_base::message_flags& out_flags_;
-};
-
-template <typename MutableBufferSequence, typename Handler>
-class reactive_socket_recvmsg_op :
- public reactive_socket_recvmsg_op_base<MutableBufferSequence>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvmsg_op);
-
- reactive_socket_recvmsg_op(socket_type socket,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
- : reactive_socket_recvmsg_op_base<MutableBufferSequence>(socket, buffers,
- in_flags, out_flags, &reactive_socket_recvmsg_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_recvmsg_op* o(
- static_cast<reactive_socket_recvmsg_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVMSG_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 11f3ad80af6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_send_op.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// detail/reactive_socket_send_op.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_REACTIVE_SOCKET_SEND_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SEND_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename ConstBufferSequence>
-class reactive_socket_send_op_base : public reactor_op
-{
-public:
- reactive_socket_send_op_base(socket_type socket,
- socket_ops::state_type state, const ConstBufferSequence& buffers,
- socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_send_op_base::do_perform, complete_func),
- socket_(socket),
- state_(state),
- buffers_(buffers),
- flags_(flags)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_send_op_base* o(
- static_cast<reactive_socket_send_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(o->buffers_);
-
- status result = socket_ops::non_blocking_send(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
- o->ec_, o->bytes_transferred_) ? done : not_done;
-
- if (result == done)
- if ((o->state_ & socket_ops::stream_oriented) != 0)
- if (o->bytes_transferred_ < bufs.total_size())
- result = done_and_exhausted;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_send",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- socket_type socket_;
- socket_ops::state_type state_;
- ConstBufferSequence buffers_;
- socket_base::message_flags flags_;
-};
-
-template <typename ConstBufferSequence, typename Handler>
-class reactive_socket_send_op :
- public reactive_socket_send_op_base<ConstBufferSequence>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_send_op);
-
- reactive_socket_send_op(socket_type socket,
- socket_ops::state_type state, const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_send_op_base<ConstBufferSequence>(socket,
- state, buffers, flags, &reactive_socket_send_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_send_op* o(static_cast<reactive_socket_send_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SEND_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index a73934bfc19..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_sendto_op.hpp
+++ /dev/null
@@ -1,132 +0,0 @@
-//
-// detail/reactive_socket_sendto_op.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_REACTIVE_SOCKET_SENDTO_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SENDTO_OP_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/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename ConstBufferSequence, typename Endpoint>
-class reactive_socket_sendto_op_base : public reactor_op
-{
-public:
- reactive_socket_sendto_op_base(socket_type socket,
- const ConstBufferSequence& buffers, const Endpoint& endpoint,
- socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_sendto_op_base::do_perform, complete_func),
- socket_(socket),
- buffers_(buffers),
- destination_(endpoint),
- flags_(flags)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- reactive_socket_sendto_op_base* o(
- static_cast<reactive_socket_sendto_op_base*>(base));
-
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(o->buffers_);
-
- status result = socket_ops::non_blocking_sendto(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
- o->destination_.data(), o->destination_.size(),
- o->ec_, o->bytes_transferred_) ? done : not_done;
-
- BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_sendto",
- o->ec_, o->bytes_transferred_));
-
- return result;
- }
-
-private:
- socket_type socket_;
- ConstBufferSequence buffers_;
- Endpoint destination_;
- socket_base::message_flags flags_;
-};
-
-template <typename ConstBufferSequence, typename Endpoint, typename Handler>
-class reactive_socket_sendto_op :
- public reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_sendto_op);
-
- reactive_socket_sendto_op(socket_type socket,
- const ConstBufferSequence& buffers, const Endpoint& endpoint,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>(socket,
- buffers, endpoint, flags, &reactive_socket_sendto_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_socket_sendto_op* o(static_cast<reactive_socket_sendto_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->bytes_transferred_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SENDTO_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp
deleted file mode 100644
index 89940d9af0e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp
+++ /dev/null
@@ -1,528 +0,0 @@
-//
-// detail/reactive_socket_service.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_REACTIVE_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_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_IOCP)
-
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/reactive_null_buffers_op.hpp>
-#include <boost/asio/detail/reactive_socket_accept_op.hpp>
-#include <boost/asio/detail/reactive_socket_connect_op.hpp>
-#include <boost/asio/detail/reactive_socket_recvfrom_op.hpp>
-#include <boost/asio/detail/reactive_socket_sendto_op.hpp>
-#include <boost/asio/detail/reactive_socket_service_base.hpp>
-#include <boost/asio/detail/reactor.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_holder.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol>
-class reactive_socket_service :
- public service_base<reactive_socket_service<Protocol> >,
- public reactive_socket_service_base
-{
-public:
- // The protocol type.
- typedef Protocol protocol_type;
-
- // The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- // The native type of a socket.
- typedef socket_type native_handle_type;
-
- // The implementation type of the socket.
- struct implementation_type :
- reactive_socket_service_base::base_implementation_type
- {
- // Default constructor.
- implementation_type()
- : protocol_(endpoint_type().protocol())
- {
- }
-
- // The protocol associated with the socket.
- protocol_type protocol_;
- };
-
- // Constructor.
- reactive_socket_service(boost::asio::io_context& io_context)
- : service_base<reactive_socket_service<Protocol> >(io_context),
- reactive_socket_service_base(io_context)
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- this->base_shutdown();
- }
-
- // Move-construct a new socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- this->base_move_construct(impl, other_impl);
-
- impl.protocol_ = other_impl.protocol_;
- other_impl.protocol_ = endpoint_type().protocol();
- }
-
- // Move-assign from another socket implementation.
- void move_assign(implementation_type& impl,
- reactive_socket_service_base& other_service,
- implementation_type& other_impl)
- {
- this->base_move_assign(impl, other_service, other_impl);
-
- impl.protocol_ = other_impl.protocol_;
- other_impl.protocol_ = endpoint_type().protocol();
- }
-
- // Move-construct a new socket implementation from another protocol type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- reactive_socket_service<Protocol1>&,
- typename reactive_socket_service<
- Protocol1>::implementation_type& other_impl)
- {
- this->base_move_construct(impl, other_impl);
-
- impl.protocol_ = protocol_type(other_impl.protocol_);
- other_impl.protocol_ = typename Protocol1::endpoint().protocol();
- }
-
- // Open a new socket implementation.
- boost::system::error_code open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (!do_open(impl, protocol.family(),
- protocol.type(), protocol.protocol(), ec))
- impl.protocol_ = protocol;
- return ec;
- }
-
- // Assign a native socket to a socket implementation.
- boost::system::error_code assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- if (!do_assign(impl, protocol.type(), native_socket, ec))
- impl.protocol_ = protocol;
- return ec;
- }
-
- // Get the native socket representation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return impl.socket_;
- }
-
- // Bind the socket to the specified local endpoint.
- boost::system::error_code bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
- return ec;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code set_option(implementation_type& impl,
- const Option& option, boost::system::error_code& ec)
- {
- socket_ops::setsockopt(impl.socket_, impl.state_,
- option.level(impl.protocol_), option.name(impl.protocol_),
- option.data(impl.protocol_), option.size(impl.protocol_), ec);
- return ec;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code get_option(const implementation_type& impl,
- Option& option, boost::system::error_code& ec) const
- {
- std::size_t size = option.size(impl.protocol_);
- socket_ops::getsockopt(impl.socket_, impl.state_,
- option.level(impl.protocol_), option.name(impl.protocol_),
- option.data(impl.protocol_), &size, ec);
- if (!ec)
- option.resize(impl.protocol_, size);
- return ec;
- }
-
- // Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- endpoint_type endpoint;
- std::size_t addr_len = endpoint.capacity();
- if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
- return endpoint_type();
- endpoint.resize(addr_len);
- return endpoint;
- }
-
- // Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- endpoint_type endpoint;
- std::size_t addr_len = endpoint.capacity();
- if (socket_ops::getpeername(impl.socket_,
- endpoint.data(), &addr_len, false, ec))
- return endpoint_type();
- endpoint.resize(addr_len);
- return endpoint;
- }
-
- // Disable sends or receives on the socket.
- boost::system::error_code shutdown(base_implementation_type& impl,
- socket_base::shutdown_type what, boost::system::error_code& ec)
- {
- socket_ops::shutdown(impl.socket_, what, ec);
- return ec;
- }
-
- // Send a datagram to the specified endpoint. Returns the number of bytes
- // sent.
- template <typename ConstBufferSequence>
- size_t send_to(implementation_type& impl, const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- return socket_ops::sync_sendto(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags,
- destination.data(), destination.size(), ec);
- }
-
- // Wait until data can be sent without blocking.
- size_t send_to(implementation_type& impl, const null_buffers&,
- const endpoint_type&, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
-
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send_to(implementation_type& impl,
- const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_sendto_op<ConstBufferSequence,
- endpoint_type, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, buffers, destination, flags, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_send_to"));
-
- start_op(impl, reactor::write_op, p.p, is_continuation, true, false);
- p.v = p.p = 0;
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send_to(implementation_type& impl, const null_buffers&,
- const endpoint_type&, socket_base::message_flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_send_to(null_buffers)"));
-
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Receive a datagram with the endpoint of the sender. Returns the number of
- // bytes received.
- template <typename MutableBufferSequence>
- size_t receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- std::size_t addr_len = sender_endpoint.capacity();
- std::size_t bytes_recvd = socket_ops::sync_recvfrom(
- impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
- flags, sender_endpoint.data(), &addr_len, ec);
-
- if (!ec)
- sender_endpoint.resize(addr_len);
-
- return bytes_recvd;
- }
-
- // Wait until data can be received without blocking.
- size_t receive_from(implementation_type& impl, const null_buffers&,
- endpoint_type& sender_endpoint, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
-
- // Reset endpoint since it can be given no sensible value at this time.
- sender_endpoint = endpoint_type();
-
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received and
- // the sender_endpoint object must both be valid for the lifetime of the
- // asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_recvfrom_op<MutableBufferSequence,
- endpoint_type, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- int protocol = impl.protocol_.type();
- p.p = new (p.v) op(impl.socket_, protocol,
- buffers, sender_endpoint, flags, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_receive_from"));
-
- start_op(impl,
- (flags & socket_base::message_out_of_band)
- ? reactor::except_op : reactor::read_op,
- p.p, is_continuation, true, false);
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_from(implementation_type& impl,
- const null_buffers&, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_receive_from(null_buffers)"));
-
- // Reset endpoint since it can be given no sensible value at this time.
- sender_endpoint = endpoint_type();
-
- start_op(impl,
- (flags & socket_base::message_out_of_band)
- ? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Accept a new connection.
- template <typename Socket>
- boost::system::error_code accept(implementation_type& impl,
- Socket& peer, endpoint_type* peer_endpoint, boost::system::error_code& ec)
- {
- // We cannot accept a socket that is already open.
- if (peer.is_open())
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
- socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
- impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
- peer_endpoint ? &addr_len : 0, ec));
-
- // On success, assign new connection to peer socket object.
- if (new_socket.get() != invalid_socket)
- {
- if (peer_endpoint)
- peer_endpoint->resize(addr_len);
- peer.assign(impl.protocol_, new_socket.get(), ec);
- if (!ec)
- new_socket.release();
- }
-
- return ec;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- // Accept a new connection.
- typename Protocol::socket accept(implementation_type& impl,
- io_context* peer_io_context, endpoint_type* peer_endpoint,
- boost::system::error_code& ec)
- {
- typename Protocol::socket peer(
- peer_io_context ? *peer_io_context : io_context_);
-
- std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
- socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
- impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
- peer_endpoint ? &addr_len : 0, ec));
-
- // On success, assign new connection to peer socket object.
- if (new_socket.get() != invalid_socket)
- {
- if (peer_endpoint)
- peer_endpoint->resize(addr_len);
- peer.assign(impl.protocol_, new_socket.get(), ec);
- if (!ec)
- new_socket.release();
- }
-
- return peer;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- // Start an asynchronous accept. The peer and peer_endpoint objects must be
- // valid until the accept's handler is invoked.
- template <typename Socket, typename Handler>
- void async_accept(implementation_type& impl, Socket& peer,
- endpoint_type* peer_endpoint, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_accept_op<Socket, Protocol, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, impl.state_, peer,
- impl.protocol_, peer_endpoint, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_accept"));
-
- start_accept_op(impl, p.p, is_continuation, peer.is_open());
- p.v = p.p = 0;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- // Start an asynchronous accept. The peer_endpoint object must be valid until
- // the accept's handler is invoked.
- template <typename Handler>
- void async_accept(implementation_type& impl,
- boost::asio::io_context* peer_io_context,
- endpoint_type* peer_endpoint, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_move_accept_op<Protocol, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(peer_io_context ? *peer_io_context : io_context_,
- impl.socket_, impl.state_, impl.protocol_, peer_endpoint, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_accept"));
-
- start_accept_op(impl, p.p, is_continuation, false);
- p.v = p.p = 0;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- // Connect the socket to the specified endpoint.
- boost::system::error_code connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- socket_ops::sync_connect(impl.socket_,
- peer_endpoint.data(), peer_endpoint.size(), ec);
- return ec;
- }
-
- // Start an asynchronous connect.
- template <typename Handler>
- void async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_connect_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_connect"));
-
- start_connect_op(impl, p.p, is_continuation,
- peer_endpoint.data(), peer_endpoint.size());
- p.v = p.p = 0;
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 9d3d54cc110..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service_base.hpp
+++ /dev/null
@@ -1,513 +0,0 @@
-//
-// detail/reactive_socket_service_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_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_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_IOCP) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactive_null_buffers_op.hpp>
-#include <boost/asio/detail/reactive_socket_recv_op.hpp>
-#include <boost/asio/detail/reactive_socket_recvmsg_op.hpp>
-#include <boost/asio/detail/reactive_socket_send_op.hpp>
-#include <boost/asio/detail/reactive_wait_op.hpp>
-#include <boost/asio/detail/reactor.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_holder.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class reactive_socket_service_base
-{
-public:
- // The native type of a socket.
- typedef socket_type native_handle_type;
-
- // The implementation type of the socket.
- struct base_implementation_type
- {
- // The native socket representation.
- socket_type socket_;
-
- // The current state of the socket.
- socket_ops::state_type state_;
-
- // Per-descriptor data used by the reactor.
- reactor::per_descriptor_data reactor_data_;
- };
-
- // Constructor.
- BOOST_ASIO_DECL reactive_socket_service_base(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void base_shutdown();
-
- // Construct a new socket implementation.
- BOOST_ASIO_DECL void construct(base_implementation_type& impl);
-
- // Move-construct a new socket implementation.
- BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl);
-
- // Move-assign from another socket implementation.
- BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
- reactive_socket_service_base& other_service,
- base_implementation_type& other_impl);
-
- // Destroy a socket implementation.
- BOOST_ASIO_DECL void destroy(base_implementation_type& impl);
-
- // Determine whether the socket is open.
- bool is_open(const base_implementation_type& impl) const
- {
- return impl.socket_ != invalid_socket;
- }
-
- // Destroy a socket implementation.
- BOOST_ASIO_DECL boost::system::error_code close(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Release ownership of the socket.
- BOOST_ASIO_DECL socket_type release(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Get the native socket representation.
- native_handle_type native_handle(base_implementation_type& impl)
- {
- return impl.socket_;
- }
-
- // Cancel all operations associated with the socket.
- BOOST_ASIO_DECL boost::system::error_code cancel(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const base_implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return socket_ops::sockatmark(impl.socket_, ec);
- }
-
- // Determine the number of bytes available for reading.
- std::size_t available(const base_implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return socket_ops::available(impl.socket_, ec);
- }
-
- // Place the socket into the state where it will listen for new connections.
- boost::system::error_code listen(base_implementation_type& impl,
- int backlog, boost::system::error_code& ec)
- {
- socket_ops::listen(impl.socket_, backlog, ec);
- return ec;
- }
-
- // Perform an IO control command on the socket.
- template <typename IO_Control_Command>
- boost::system::error_code io_control(base_implementation_type& impl,
- IO_Control_Command& command, boost::system::error_code& ec)
- {
- socket_ops::ioctl(impl.socket_, impl.state_, command.name(),
- static_cast<ioctl_arg_type*>(command.data()), ec);
- return ec;
- }
-
- // Gets the non-blocking mode of the socket.
- bool non_blocking(const base_implementation_type& impl) const
- {
- return (impl.state_ & socket_ops::user_set_non_blocking) != 0;
- }
-
- // Sets the non-blocking mode of the socket.
- boost::system::error_code non_blocking(base_implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec);
- return ec;
- }
-
- // Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const base_implementation_type& impl) const
- {
- return (impl.state_ & socket_ops::internal_non_blocking) != 0;
- }
-
- // Sets the non-blocking mode of the native socket implementation.
- boost::system::error_code native_non_blocking(base_implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec);
- return ec;
- }
-
- // Wait for the socket to become ready to read, ready to write, or to have
- // pending error conditions.
- boost::system::error_code wait(base_implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- switch (w)
- {
- case socket_base::wait_read:
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
- break;
- case socket_base::wait_write:
- socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
- break;
- case socket_base::wait_error:
- socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
- break;
- default:
- ec = boost::asio::error::invalid_argument;
- break;
- }
-
- return ec;
- }
-
- // Asynchronously wait for the socket to become ready to read, ready to
- // write, or to have pending error conditions.
- template <typename Handler>
- void async_wait(base_implementation_type& impl,
- socket_base::wait_type w, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_wait_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_wait"));
-
- int op_type;
- switch (w)
- {
- case socket_base::wait_read:
- op_type = reactor::read_op;
- break;
- case socket_base::wait_write:
- op_type = reactor::write_op;
- break;
- case socket_base::wait_error:
- op_type = reactor::except_op;
- break;
- default:
- p.p->ec_ = boost::asio::error::invalid_argument;
- reactor_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- return;
- }
-
- start_op(impl, op_type, p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Send the given data to the peer.
- template <typename ConstBufferSequence>
- size_t send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- return socket_ops::sync_send(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
- }
-
- // Wait until data can be sent without blocking.
- size_t send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
-
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_send_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, impl.state_, buffers, flags, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_send"));
-
- start_op(impl, reactor::write_op, p.p, is_continuation, true,
- ((impl.state_ & socket_ops::stream_oriented)
- && buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers)));
- p.v = p.p = 0;
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_send(null_buffers)"));
-
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Receive some data from the peer. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- size_t receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- return socket_ops::sync_recv(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
- }
-
- // Wait until data can be received without blocking.
- size_t receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
-
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_recv_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, impl.state_, buffers, flags, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_receive"));
-
- start_op(impl,
- (flags & socket_base::message_out_of_band)
- ? reactor::except_op : reactor::read_op,
- p.p, is_continuation,
- (flags & socket_base::message_out_of_band) == 0,
- ((impl.state_ & socket_ops::stream_oriented)
- && buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers)));
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_receive(null_buffers)"));
-
- start_op(impl,
- (flags & socket_base::message_out_of_band)
- ? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
- // Receive some data with associated flags. Returns the number of bytes
- // received.
- template <typename MutableBufferSequence>
- size_t receive_with_flags(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- return socket_ops::sync_recvmsg(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), in_flags, out_flags, ec);
- }
-
- // Wait until data can be received without blocking.
- size_t receive_with_flags(base_implementation_type& impl,
- const null_buffers&, socket_base::message_flags,
- socket_base::message_flags& out_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
-
- // Clear out_flags, since we cannot give it any other sensible value when
- // performing a null_buffers operation.
- out_flags = 0;
-
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_with_flags(base_implementation_type& impl,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_recvmsg_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, buffers, in_flags, out_flags, handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_receive_with_flags"));
-
- start_op(impl,
- (in_flags & socket_base::message_out_of_band)
- ? reactor::except_op : reactor::read_op,
- p.p, is_continuation,
- (in_flags & socket_base::message_out_of_band) == 0, false);
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_with_flags(base_implementation_type& impl,
- const null_buffers&, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
- &impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
-
- // Clear out_flags, since we cannot give it any other sensible value when
- // performing a null_buffers operation.
- out_flags = 0;
-
- start_op(impl,
- (in_flags & socket_base::message_out_of_band)
- ? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
- p.v = p.p = 0;
- }
-
-protected:
- // Open a new socket implementation.
- BOOST_ASIO_DECL boost::system::error_code do_open(
- base_implementation_type& impl, int af,
- int type, int protocol, boost::system::error_code& ec);
-
- // Assign a native socket to a socket implementation.
- BOOST_ASIO_DECL boost::system::error_code do_assign(
- base_implementation_type& impl, int type,
- const native_handle_type& native_socket, boost::system::error_code& ec);
-
- // Start the asynchronous read or write operation.
- BOOST_ASIO_DECL void start_op(base_implementation_type& impl, int op_type,
- reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
-
- // Start the asynchronous accept operation.
- BOOST_ASIO_DECL void start_accept_op(base_implementation_type& impl,
- reactor_op* op, bool is_continuation, bool peer_is_open);
-
- // Start the asynchronous connect operation.
- BOOST_ASIO_DECL void start_connect_op(base_implementation_type& impl,
- reactor_op* op, bool is_continuation,
- const socket_addr_type* addr, size_t addrlen);
-
- // The io_context that owns this socket service.
- io_context& io_context_;
-
- // The selector that performs event demultiplexing for the service.
- reactor& reactor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // !defined(BOOST_ASIO_HAS_IOCP)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp
deleted file mode 100644
index ee325024822..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// detail/reactive_wait_op.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_REACTIVE_WAIT_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTIVE_WAIT_OP_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/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class reactive_wait_op : public reactor_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_wait_op);
-
- reactive_wait_op(Handler& handler)
- : reactor_op(&reactive_wait_op::do_perform,
- &reactive_wait_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static status do_perform(reactor_op*)
- {
- return done;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- reactive_wait_op* o(static_cast<reactive_wait_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, o->ec_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTIVE_WAIT_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp
deleted file mode 100644
index f1e5d95864f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// detail/reactor.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_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_REACTOR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/reactor_fwd.hpp>
-
-#if defined(BOOST_ASIO_HAS_EPOLL)
-# include <boost/asio/detail/epoll_reactor.hpp>
-#elif defined(BOOST_ASIO_HAS_KQUEUE)
-# include <boost/asio/detail/kqueue_reactor.hpp>
-#elif defined(BOOST_ASIO_HAS_DEV_POLL)
-# include <boost/asio/detail/dev_poll_reactor.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/null_reactor.hpp>
-#else
-# include <boost/asio/detail/select_reactor.hpp>
-#endif
-
-#endif // BOOST_ASIO_DETAIL_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp
deleted file mode 100644
index b222b134e6a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// detail/reactor_fwd.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_REACTOR_FWD_HPP
-#define BOOST_ASIO_DETAIL_REACTOR_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
-typedef class null_reactor reactor;
-#elif defined(BOOST_ASIO_HAS_IOCP)
-typedef class select_reactor reactor;
-#elif defined(BOOST_ASIO_HAS_EPOLL)
-typedef class epoll_reactor reactor;
-#elif defined(BOOST_ASIO_HAS_KQUEUE)
-typedef class kqueue_reactor reactor;
-#elif defined(BOOST_ASIO_HAS_DEV_POLL)
-typedef class dev_poll_reactor reactor;
-#else
-typedef class select_reactor reactor;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_REACTOR_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp
deleted file mode 100644
index beb443eb695..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// detail/reactor_op.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_REACTOR_OP_HPP
-#define BOOST_ASIO_DETAIL_REACTOR_OP_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/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class reactor_op
- : public operation
-{
-public:
- // The error code to be passed to the completion handler.
- boost::system::error_code ec_;
-
- // The number of bytes transferred, to be passed to the completion handler.
- std::size_t bytes_transferred_;
-
- // Status returned by perform function. May be used to decide whether it is
- // worth performing more operations on the descriptor immediately.
- enum status { not_done, done, done_and_exhausted };
-
- // Perform the operation. Returns true if it is finished.
- status perform()
- {
- return perform_func_(this);
- }
-
-protected:
- typedef status (*perform_func_type)(reactor_op*);
-
- reactor_op(perform_func_type perform_func, func_type complete_func)
- : operation(complete_func),
- bytes_transferred_(0),
- perform_func_(perform_func)
- {
- }
-
-private:
- perform_func_type perform_func_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTOR_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp
deleted file mode 100644
index fec0dd7d37f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp
+++ /dev/null
@@ -1,170 +0,0 @@
-//
-// detail/reactor_op_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_REACTOR_OP_QUEUE_HPP
-#define BOOST_ASIO_DETAIL_REACTOR_OP_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 <boost/asio/detail/hash_map.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Descriptor>
-class reactor_op_queue
- : private noncopyable
-{
-public:
- typedef Descriptor key_type;
-
- struct mapped_type : op_queue<reactor_op>
- {
- mapped_type() {}
- mapped_type(const mapped_type&) {}
- void operator=(const mapped_type&) {}
- };
-
- typedef typename hash_map<key_type, mapped_type>::value_type value_type;
- typedef typename hash_map<key_type, mapped_type>::iterator iterator;
-
- // Constructor.
- reactor_op_queue()
- : operations_()
- {
- }
-
- // Obtain iterators to all registered descriptors.
- iterator begin() { return operations_.begin(); }
- iterator end() { return operations_.end(); }
-
- // Add a new operation to the queue. Returns true if this is the only
- // operation for the given descriptor, in which case the reactor's event
- // demultiplexing function call may need to be interrupted and restarted.
- bool enqueue_operation(Descriptor descriptor, reactor_op* op)
- {
- std::pair<iterator, bool> entry =
- operations_.insert(value_type(descriptor, mapped_type()));
- entry.first->second.push(op);
- return entry.second;
- }
-
- // Cancel all operations associated with the descriptor identified by the
- // supplied iterator. Any operations pending for the descriptor will be
- // cancelled. Returns true if any operations were cancelled, in which case
- // the reactor's event demultiplexing function may need to be interrupted and
- // restarted.
- bool cancel_operations(iterator i, op_queue<operation>& ops,
- const boost::system::error_code& ec =
- boost::asio::error::operation_aborted)
- {
- if (i != operations_.end())
- {
- while (reactor_op* op = i->second.front())
- {
- op->ec_ = ec;
- i->second.pop();
- ops.push(op);
- }
- operations_.erase(i);
- return true;
- }
-
- return false;
- }
-
- // Cancel all operations associated with the descriptor. Any operations
- // pending for the descriptor will be cancelled. Returns true if any
- // operations were cancelled, in which case the reactor's event
- // demultiplexing function may need to be interrupted and restarted.
- bool cancel_operations(Descriptor descriptor, op_queue<operation>& ops,
- const boost::system::error_code& ec =
- boost::asio::error::operation_aborted)
- {
- return this->cancel_operations(operations_.find(descriptor), ops, ec);
- }
-
- // Whether there are no operations in the queue.
- bool empty() const
- {
- return operations_.empty();
- }
-
- // Determine whether there are any operations associated with the descriptor.
- bool has_operation(Descriptor descriptor) const
- {
- return operations_.find(descriptor) != operations_.end();
- }
-
- // Perform the operations corresponding to the descriptor identified by the
- // supplied iterator. Returns true if there are still unfinished operations
- // queued for the descriptor.
- bool perform_operations(iterator i, op_queue<operation>& ops)
- {
- if (i != operations_.end())
- {
- while (reactor_op* op = i->second.front())
- {
- if (op->perform())
- {
- i->second.pop();
- ops.push(op);
- }
- else
- {
- return true;
- }
- }
- operations_.erase(i);
- }
- return false;
- }
-
- // Perform the operations corresponding to the descriptor. Returns true if
- // there are still unfinished operations queued for the descriptor.
- bool perform_operations(Descriptor descriptor, op_queue<operation>& ops)
- {
- return this->perform_operations(operations_.find(descriptor), ops);
- }
-
- // Get all operations owned by the queue.
- void get_all_operations(op_queue<operation>& ops)
- {
- iterator i = operations_.begin();
- while (i != operations_.end())
- {
- iterator op_iter = i++;
- ops.push(op_iter->second);
- operations_.erase(op_iter);
- }
- }
-
-private:
- // The operations that are currently executing asynchronously.
- hash_map<key_type, mapped_type> operations_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_REACTOR_OP_QUEUE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp
deleted file mode 100644
index adab0a7a61b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// detail/recycling_allocator.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_RECYCLING_ALLOCATOR_HPP
-#define BOOST_ASIO_DETAIL_RECYCLING_ALLOCATOR_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/memory.hpp>
-#include <boost/asio/detail/thread_context.hpp>
-#include <boost/asio/detail/thread_info_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-class recycling_allocator
-{
-public:
- typedef T value_type;
-
- template <typename U>
- struct rebind
- {
- typedef recycling_allocator<U> other;
- };
-
- recycling_allocator()
- {
- }
-
- template <typename U>
- recycling_allocator(const recycling_allocator<U>&)
- {
- }
-
- T* allocate(std::size_t n)
- {
- typedef thread_context::thread_call_stack call_stack;
- void* p = thread_info_base::allocate(call_stack::top(), sizeof(T) * n);
- return static_cast<T*>(p);
- }
-
- void deallocate(T* p, std::size_t n)
- {
- typedef thread_context::thread_call_stack call_stack;
- thread_info_base::deallocate(call_stack::top(), p, sizeof(T) * n);
- }
-};
-
-template <>
-class recycling_allocator<void>
-{
-public:
- typedef void value_type;
-
- template <typename U>
- struct rebind
- {
- typedef recycling_allocator<U> other;
- };
-
- recycling_allocator()
- {
- }
-
- template <typename U>
- recycling_allocator(const recycling_allocator<U>&)
- {
- }
-};
-
-template <typename Allocator>
-struct get_recycling_allocator
-{
- typedef Allocator type;
- static type get(const Allocator& a) { return a; }
-};
-
-template <typename T>
-struct get_recycling_allocator<std::allocator<T> >
-{
- typedef recycling_allocator<T> type;
- static type get(const std::allocator<T>&) { return type(); }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_RECYCLING_ALLOCATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp
deleted file mode 100644
index 4d35a68ab94..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// detail/regex_fwd.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_REGEX_FWD_HPP
-#define BOOST_ASIO_DETAIL_REGEX_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-#include <boost/regex_fwd.hpp>
-#include <boost/regex/v4/match_flags.hpp>
-
-namespace boost {
-
-template <class BidiIterator>
-struct sub_match;
-
-template <class BidiIterator, class Allocator>
-class match_results;
-
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-#endif // BOOST_ASIO_DETAIL_REGEX_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp
deleted file mode 100644
index 970544c7832..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// detail/resolve_endpoint_op.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_RESOLVER_ENDPOINT_OP_HPP
-#define BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_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/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/resolve_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol, typename Handler>
-class resolve_endpoint_op : public resolve_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(resolve_endpoint_op);
-
- typedef typename Protocol::endpoint endpoint_type;
- typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
-
- resolve_endpoint_op(socket_ops::weak_cancel_token_type cancel_token,
- const endpoint_type& endpoint, io_context_impl& ioc, Handler& handler)
- : resolve_op(&resolve_endpoint_op::do_complete),
- cancel_token_(cancel_token),
- endpoint_(endpoint),
- io_context_impl_(ioc),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the operation object.
- resolve_endpoint_op* o(static_cast<resolve_endpoint_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- if (owner && owner != &o->io_context_impl_)
- {
- // The operation is being run on the worker io_context. Time to perform
- // the resolver operation.
-
- // Perform the blocking endpoint resolution operation.
- char host_name[NI_MAXHOST];
- char service_name[NI_MAXSERV];
- socket_ops::background_getnameinfo(o->cancel_token_, o->endpoint_.data(),
- o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
- o->endpoint_.protocol().type(), o->ec_);
- o->results_ = results_type::create(o->endpoint_, host_name, service_name);
-
- // Pass operation back to main io_context for completion.
- o->io_context_impl_.post_deferred_completion(o);
- p.v = p.p = 0;
- }
- else
- {
- // The operation has been returned to the main io_context. The completion
- // handler is ready to be delivered.
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated
- // before the upcall is made. Even if we're not about to make an upcall,
- // a sub-object of the handler may be the true owner of the memory
- // associated with the handler. Consequently, a local copy of the handler
- // is required to ensure that any owning sub-object remains valid until
- // after we have deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, results_type>
- handler(o->handler_, o->ec_, o->results_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
- }
-
-private:
- socket_ops::weak_cancel_token_type cancel_token_;
- endpoint_type endpoint_;
- io_context_impl& io_context_impl_;
- Handler handler_;
- results_type results_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp
deleted file mode 100644
index fd72994fc59..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// detail/resolve_op.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_RESOLVE_OP_HPP
-#define BOOST_ASIO_DETAIL_RESOLVE_OP_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/error.hpp>
-#include <boost/asio/detail/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class resolve_op : public operation
-{
-public:
- // The error code to be passed to the completion handler.
- boost::system::error_code ec_;
-
-protected:
- resolve_op(func_type complete_func)
- : operation(complete_func)
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_RESOLVE_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp
deleted file mode 100644
index 91bdd796544..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// detail/resolve_query_op.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_RESOLVE_QUERY_OP_HPP
-#define BOOST_ASIO_DETAIL_RESOLVE_QUERY_OP_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/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/resolve_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol, typename Handler>
-class resolve_query_op : public resolve_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(resolve_query_op);
-
- typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
- typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
-
- resolve_query_op(socket_ops::weak_cancel_token_type cancel_token,
- const query_type& query, io_context_impl& ioc, Handler& handler)
- : resolve_op(&resolve_query_op::do_complete),
- cancel_token_(cancel_token),
- query_(query),
- io_context_impl_(ioc),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
- addrinfo_(0)
- {
- handler_work<Handler>::start(handler_);
- }
-
- ~resolve_query_op()
- {
- if (addrinfo_)
- socket_ops::freeaddrinfo(addrinfo_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the operation object.
- resolve_query_op* o(static_cast<resolve_query_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
-
- if (owner && owner != &o->io_context_impl_)
- {
- // The operation is being run on the worker io_context. Time to perform
- // the resolver operation.
-
- // Perform the blocking host resolution operation.
- socket_ops::background_getaddrinfo(o->cancel_token_,
- o->query_.host_name().c_str(), o->query_.service_name().c_str(),
- o->query_.hints(), &o->addrinfo_, o->ec_);
-
- // Pass operation back to main io_context for completion.
- o->io_context_impl_.post_deferred_completion(o);
- p.v = p.p = 0;
- }
- else
- {
- // The operation has been returned to the main io_context. The completion
- // handler is ready to be delivered.
-
- // Take ownership of the operation's outstanding work.
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated
- // before the upcall is made. Even if we're not about to make an upcall,
- // a sub-object of the handler may be the true owner of the memory
- // associated with the handler. Consequently, a local copy of the handler
- // is required to ensure that any owning sub-object remains valid until
- // after we have deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, results_type>
- handler(o->handler_, o->ec_, results_type());
- p.h = boost::asio::detail::addressof(handler.handler_);
- if (o->addrinfo_)
- {
- handler.arg2_ = results_type::create(o->addrinfo_,
- o->query_.host_name(), o->query_.service_name());
- }
- p.reset();
-
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
- }
-
-private:
- socket_ops::weak_cancel_token_type cancel_token_;
- query_type query_;
- io_context_impl& io_context_impl_;
- Handler handler_;
- boost::asio::detail::addrinfo_type* addrinfo_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_RESOLVE_QUERY_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp
deleted file mode 100644
index 85c9c2a0a7d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp
+++ /dev/null
@@ -1,147 +0,0 @@
-//
-// detail/resolver_service.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_RESOLVER_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_RESOLVER_SERVICE_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-#include <boost/asio/detail/concurrency_hint.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/resolve_endpoint_op.hpp>
-#include <boost/asio/detail/resolve_query_op.hpp>
-#include <boost/asio/detail/resolver_service_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol>
-class resolver_service :
- public service_base<resolver_service<Protocol> >,
- public resolver_service_base
-{
-public:
- // The implementation type of the resolver. A cancellation token is used to
- // indicate to the background thread that the operation has been cancelled.
- typedef socket_ops::shared_cancel_token_type implementation_type;
-
- // The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- // The query type.
- typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
-
- // The results type.
- typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
-
- // Constructor.
- resolver_service(boost::asio::io_context& io_context)
- : service_base<resolver_service<Protocol> >(io_context),
- resolver_service_base(io_context)
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- this->base_shutdown();
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(boost::asio::io_context::fork_event fork_ev)
- {
- this->base_notify_fork(fork_ev);
- }
-
- // Resolve a query to a list of entries.
- results_type resolve(implementation_type&, const query_type& query,
- boost::system::error_code& ec)
- {
- boost::asio::detail::addrinfo_type* address_info = 0;
-
- socket_ops::getaddrinfo(query.host_name().c_str(),
- query.service_name().c_str(), query.hints(), &address_info, ec);
- auto_addrinfo auto_address_info(address_info);
-
- return ec ? results_type() : results_type::create(
- address_info, query.host_name(), query.service_name());
- }
-
- // Asynchronously resolve a query to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type& impl,
- const query_type& query, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef resolve_query_op<Protocol, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl, query, io_context_impl_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_impl_.context(),
- *p.p, "resolver", &impl, 0, "async_resolve"));
-
- start_resolve_op(p.p);
- p.v = p.p = 0;
- }
-
- // Resolve an endpoint to a list of entries.
- results_type resolve(implementation_type&,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- char host_name[NI_MAXHOST];
- char service_name[NI_MAXSERV];
- socket_ops::sync_getnameinfo(endpoint.data(), endpoint.size(),
- host_name, NI_MAXHOST, service_name, NI_MAXSERV,
- endpoint.protocol().type(), ec);
-
- return ec ? results_type() : results_type::create(
- endpoint, host_name, service_name);
- }
-
- // Asynchronously resolve an endpoint to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type& impl,
- const endpoint_type& endpoint, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef resolve_endpoint_op<Protocol, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl, endpoint, io_context_impl_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_impl_.context(),
- *p.p, "resolver", &impl, 0, "async_resolve"));
-
- start_resolve_op(p.p);
- p.v = p.p = 0;
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_RESOLVER_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp
deleted file mode 100644
index 40adca655a7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//
-// detail/resolver_service_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_DETAIL_RESOLVER_SERVICE_BASE_HPP
-#define BOOST_ASIO_DETAIL_RESOLVER_SERVICE_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/error.hpp>
-#include <boost/asio/executor_work_guard.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/resolve_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/detail/thread.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class resolver_service_base
-{
-public:
- // The implementation type of the resolver. A cancellation token is used to
- // indicate to the background thread that the operation has been cancelled.
- typedef socket_ops::shared_cancel_token_type implementation_type;
-
- // Constructor.
- BOOST_ASIO_DECL resolver_service_base(boost::asio::io_context& io_context);
-
- // Destructor.
- BOOST_ASIO_DECL ~resolver_service_base();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void base_shutdown();
-
- // Perform any fork-related housekeeping.
- BOOST_ASIO_DECL void base_notify_fork(
- boost::asio::io_context::fork_event fork_ev);
-
- // Construct a new resolver implementation.
- BOOST_ASIO_DECL void construct(implementation_type& impl);
-
- // Destroy a resolver implementation.
- BOOST_ASIO_DECL void destroy(implementation_type&);
-
- // Move-construct a new resolver implementation.
- BOOST_ASIO_DECL void move_construct(implementation_type& impl,
- implementation_type& other_impl);
-
- // Move-assign from another resolver implementation.
- BOOST_ASIO_DECL void move_assign(implementation_type& impl,
- resolver_service_base& other_service,
- implementation_type& other_impl);
-
- // Cancel pending asynchronous operations.
- BOOST_ASIO_DECL void cancel(implementation_type& impl);
-
-protected:
- // Helper function to start an asynchronous resolve operation.
- BOOST_ASIO_DECL void start_resolve_op(resolve_op* op);
-
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // Helper class to perform exception-safe cleanup of addrinfo objects.
- class auto_addrinfo
- : private boost::asio::detail::noncopyable
- {
- public:
- explicit auto_addrinfo(boost::asio::detail::addrinfo_type* ai)
- : ai_(ai)
- {
- }
-
- ~auto_addrinfo()
- {
- if (ai_)
- socket_ops::freeaddrinfo(ai_);
- }
-
- operator boost::asio::detail::addrinfo_type*()
- {
- return ai_;
- }
-
- private:
- boost::asio::detail::addrinfo_type* ai_;
- };
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
- // Helper class to run the work io_context in a thread.
- class work_io_context_runner;
-
- // Start the work thread if it's not already running.
- BOOST_ASIO_DECL void start_work_thread();
-
- // The io_context implementation used to post completions.
- io_context_impl& io_context_impl_;
-
-private:
- // Mutex to protect access to internal data.
- boost::asio::detail::mutex mutex_;
-
- // Private io_context used for performing asynchronous host resolution.
- boost::asio::detail::scoped_ptr<boost::asio::io_context> work_io_context_;
-
- // The work io_context implementation used to post completions.
- io_context_impl& work_io_context_impl_;
-
- // Work for the private io_context to perform.
- boost::asio::executor_work_guard<
- boost::asio::io_context::executor_type> work_;
-
- // Thread used for running the work io_context's run loop.
- boost::asio::detail::scoped_ptr<boost::asio::detail::thread> work_thread_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/resolver_service_base.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_RESOLVER_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp
deleted file mode 100644
index 835e4c92376..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp
+++ /dev/null
@@ -1,215 +0,0 @@
-//
-// detail/scheduler.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_SCHEDULER_HPP
-#define BOOST_ASIO_DETAIL_SCHEDULER_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/system/error_code.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/detail/atomic_count.hpp>
-#include <boost/asio/detail/conditionally_enabled_event.hpp>
-#include <boost/asio/detail/conditionally_enabled_mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/reactor_fwd.hpp>
-#include <boost/asio/detail/scheduler_operation.hpp>
-#include <boost/asio/detail/thread_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct scheduler_thread_info;
-
-class scheduler
- : public execution_context_service_base<scheduler>,
- public thread_context
-{
-public:
- typedef scheduler_operation operation;
-
- // Constructor. Specifies the number of concurrent threads that are likely to
- // run the scheduler. If set to 1 certain optimisation are performed.
- BOOST_ASIO_DECL scheduler(boost::asio::execution_context& ctx,
- int concurrency_hint = 0);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Initialise the task, if required.
- BOOST_ASIO_DECL void init_task();
-
- // Run the event loop until interrupted or no more work.
- BOOST_ASIO_DECL std::size_t run(boost::system::error_code& ec);
-
- // Run until interrupted or one operation is performed.
- BOOST_ASIO_DECL std::size_t run_one(boost::system::error_code& ec);
-
- // Run until timeout, interrupted, or one operation is performed.
- BOOST_ASIO_DECL std::size_t wait_one(
- long usec, boost::system::error_code& ec);
-
- // Poll for operations without blocking.
- BOOST_ASIO_DECL std::size_t poll(boost::system::error_code& ec);
-
- // Poll for one operation without blocking.
- BOOST_ASIO_DECL std::size_t poll_one(boost::system::error_code& ec);
-
- // Interrupt the event processing loop.
- BOOST_ASIO_DECL void stop();
-
- // Determine whether the scheduler is stopped.
- BOOST_ASIO_DECL bool stopped() const;
-
- // Restart in preparation for a subsequent run invocation.
- BOOST_ASIO_DECL void restart();
-
- // Notify that some work has started.
- void work_started()
- {
- ++outstanding_work_;
- }
-
- // Used to compensate for a forthcoming work_finished call. Must be called
- // from within a scheduler-owned thread.
- BOOST_ASIO_DECL void compensating_work_started();
-
- // Notify that some work has finished.
- void work_finished()
- {
- if (--outstanding_work_ == 0)
- stop();
- }
-
- // Return whether a handler can be dispatched immediately.
- bool can_dispatch()
- {
- return thread_call_stack::contains(this) != 0;
- }
-
- // Request invocation of the given operation and return immediately. Assumes
- // that work_started() has not yet been called for the operation.
- BOOST_ASIO_DECL void post_immediate_completion(
- operation* op, bool is_continuation);
-
- // Request invocation of the given operation and return immediately. Assumes
- // that work_started() was previously called for the operation.
- BOOST_ASIO_DECL void post_deferred_completion(operation* op);
-
- // Request invocation of the given operations and return immediately. Assumes
- // that work_started() was previously called for each operation.
- BOOST_ASIO_DECL void post_deferred_completions(op_queue<operation>& ops);
-
- // Enqueue the given operation following a failed attempt to dispatch the
- // operation for immediate invocation.
- BOOST_ASIO_DECL void do_dispatch(operation* op);
-
- // Process unfinished operations as part of a shutdownoperation. Assumes that
- // work_started() was previously called for the operations.
- BOOST_ASIO_DECL void abandon_operations(op_queue<operation>& ops);
-
- // Get the concurrency hint that was used to initialise the scheduler.
- int concurrency_hint() const
- {
- return concurrency_hint_;
- }
-
-private:
- // The mutex type used by this scheduler.
- typedef conditionally_enabled_mutex mutex;
-
- // The event type used by this scheduler.
- typedef conditionally_enabled_event event;
-
- // Structure containing thread-specific data.
- typedef scheduler_thread_info thread_info;
-
- // Run at most one operation. May block.
- BOOST_ASIO_DECL std::size_t do_run_one(mutex::scoped_lock& lock,
- thread_info& this_thread, const boost::system::error_code& ec);
-
- // Run at most one operation with a timeout. May block.
- BOOST_ASIO_DECL std::size_t do_wait_one(mutex::scoped_lock& lock,
- thread_info& this_thread, long usec, const boost::system::error_code& ec);
-
- // Poll for at most one operation.
- BOOST_ASIO_DECL std::size_t do_poll_one(mutex::scoped_lock& lock,
- thread_info& this_thread, const boost::system::error_code& ec);
-
- // Stop the task and all idle threads.
- BOOST_ASIO_DECL void stop_all_threads(mutex::scoped_lock& lock);
-
- // Wake a single idle thread, or the task, and always unlock the mutex.
- BOOST_ASIO_DECL void wake_one_thread_and_unlock(
- mutex::scoped_lock& lock);
-
- // Helper class to perform task-related operations on block exit.
- struct task_cleanup;
- friend struct task_cleanup;
-
- // Helper class to call work-related operations on block exit.
- struct work_cleanup;
- friend struct work_cleanup;
-
- // Whether to optimise for single-threaded use cases.
- const bool one_thread_;
-
- // Mutex to protect access to internal data.
- mutable mutex mutex_;
-
- // Event to wake up blocked threads.
- event wakeup_event_;
-
- // The task to be run by this service.
- reactor* task_;
-
- // Operation object to represent the position of the task in the queue.
- struct task_operation : operation
- {
- task_operation() : operation(0) {}
- } task_operation_;
-
- // Whether the task has been interrupted.
- bool task_interrupted_;
-
- // The count of unfinished work.
- atomic_count outstanding_work_;
-
- // The queue of handlers that are ready to be delivered.
- op_queue<operation> op_queue_;
-
- // Flag to indicate that the dispatcher has been stopped.
- bool stopped_;
-
- // Flag to indicate that the dispatcher has been shut down.
- bool shutdown_;
-
- // The concurrency hint used to initialise the scheduler.
- const int concurrency_hint_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/scheduler.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp
deleted file mode 100644
index 633a8c594fb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// detail/scheduler_operation.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_SCHEDULER_OPERATION_HPP
-#define BOOST_ASIO_DETAIL_SCHEDULER_OPERATION_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/system/error_code.hpp>
-#include <boost/asio/detail/handler_tracking.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class scheduler;
-
-// Base class for all operations. A function pointer is used instead of virtual
-// functions to avoid the associated overhead.
-class scheduler_operation BOOST_ASIO_INHERIT_TRACKED_HANDLER
-{
-public:
- typedef scheduler_operation operation_type;
-
- void complete(void* owner, const boost::system::error_code& ec,
- std::size_t bytes_transferred)
- {
- func_(owner, this, ec, bytes_transferred);
- }
-
- void destroy()
- {
- func_(0, this, boost::system::error_code(), 0);
- }
-
-protected:
- typedef void (*func_type)(void*,
- scheduler_operation*,
- const boost::system::error_code&, std::size_t);
-
- scheduler_operation(func_type func)
- : next_(0),
- func_(func),
- task_result_(0)
- {
- }
-
- // Prevents deletion through this type.
- ~scheduler_operation()
- {
- }
-
-private:
- friend class op_queue_access;
- scheduler_operation* next_;
- func_type func_;
-protected:
- friend class scheduler;
- unsigned int task_result_; // Passed into bytes transferred.
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SCHEDULER_OPERATION_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp
deleted file mode 100644
index 5f18381d50e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// detail/scheduler_thread_info.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_SCHEDULER_THREAD_INFO_HPP
-#define BOOST_ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/thread_info_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class scheduler;
-class scheduler_operation;
-
-struct scheduler_thread_info : public thread_info_base
-{
- op_queue<scheduler_operation> private_op_queue;
- long private_outstanding_work;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp
deleted file mode 100644
index 005585c7003..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// detail/scoped_lock.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_SCOPED_LOCK_HPP
-#define BOOST_ASIO_DETAIL_SCOPED_LOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper class to lock and unlock a mutex automatically.
-template <typename Mutex>
-class scoped_lock
- : private noncopyable
-{
-public:
- // Tag type used to distinguish constructors.
- enum adopt_lock_t { adopt_lock };
-
- // Constructor adopts a lock that is already held.
- scoped_lock(Mutex& m, adopt_lock_t)
- : mutex_(m),
- locked_(true)
- {
- }
-
- // Constructor acquires the lock.
- explicit scoped_lock(Mutex& m)
- : mutex_(m)
- {
- mutex_.lock();
- locked_ = true;
- }
-
- // Destructor releases the lock.
- ~scoped_lock()
- {
- if (locked_)
- mutex_.unlock();
- }
-
- // Explicitly acquire the lock.
- void lock()
- {
- if (!locked_)
- {
- mutex_.lock();
- locked_ = true;
- }
- }
-
- // Explicitly release the lock.
- void unlock()
- {
- if (locked_)
- {
- mutex_.unlock();
- locked_ = false;
- }
- }
-
- // Test whether the lock is held.
- bool locked() const
- {
- return locked_;
- }
-
- // Get the underlying mutex.
- Mutex& mutex()
- {
- return mutex_;
- }
-
-private:
- // The underlying mutex.
- Mutex& mutex_;
-
- // Whether the mutex is currently locked or unlocked.
- bool locked_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SCOPED_LOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp
deleted file mode 100644
index 12ad834919c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// detail/scoped_ptr.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_SCOPED_PTR_HPP
-#define BOOST_ASIO_DETAIL_SCOPED_PTR_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-class scoped_ptr
-{
-public:
- // Constructor.
- explicit scoped_ptr(T* p = 0)
- : p_(p)
- {
- }
-
- // Destructor.
- ~scoped_ptr()
- {
- delete p_;
- }
-
- // Access.
- T* get()
- {
- return p_;
- }
-
- // Access.
- T* operator->()
- {
- return p_;
- }
-
- // Dereference.
- T& operator*()
- {
- return *p_;
- }
-
- // Reset pointer.
- void reset(T* p = 0)
- {
- delete p_;
- p_ = p;
- }
-
- // Release ownership of the pointer.
- T* release()
- {
- T* tmp = p_;
- p_ = 0;
- return tmp;
- }
-
-private:
- // Disallow copying and assignment.
- scoped_ptr(const scoped_ptr&);
- scoped_ptr& operator=(const scoped_ptr&);
-
- T* p_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SCOPED_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp
deleted file mode 100644
index d837634e89e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// detail/select_interrupter.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_SELECT_INTERRUPTER_HPP
-#define BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_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_WINDOWS_RUNTIME)
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-# include <boost/asio/detail/socket_select_interrupter.hpp>
-#elif defined(BOOST_ASIO_HAS_EVENTFD)
-# include <boost/asio/detail/eventfd_select_interrupter.hpp>
-#else
-# include <boost/asio/detail/pipe_select_interrupter.hpp>
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-typedef socket_select_interrupter select_interrupter;
-#elif defined(BOOST_ASIO_HAS_EVENTFD)
-typedef eventfd_select_interrupter select_interrupter;
-#else
-typedef pipe_select_interrupter select_interrupter;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp
deleted file mode 100644
index dfb5e969438..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp
+++ /dev/null
@@ -1,240 +0,0 @@
-//
-// detail/select_reactor.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_SELECT_REACTOR_HPP
-#define BOOST_ASIO_DETAIL_SELECT_REACTOR_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_IOCP) \
- || (!defined(BOOST_ASIO_HAS_DEV_POLL) \
- && !defined(BOOST_ASIO_HAS_EPOLL) \
- && !defined(BOOST_ASIO_HAS_KQUEUE) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
-
-#include <cstddef>
-#include <boost/asio/detail/fd_set_adapter.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/reactor_op_queue.hpp>
-#include <boost/asio/detail/select_interrupter.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/timer_queue_set.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/thread.hpp>
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class select_reactor
- : public execution_context_service_base<select_reactor>
-{
-public:
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- enum op_types { read_op = 0, write_op = 1, except_op = 2,
- max_select_ops = 3, connect_op = 3, max_ops = 4 };
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- enum op_types { read_op = 0, write_op = 1, except_op = 2,
- max_select_ops = 3, connect_op = 1, max_ops = 3 };
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
- // Per-descriptor data.
- struct per_descriptor_data
- {
- };
-
- // Constructor.
- BOOST_ASIO_DECL select_reactor(boost::asio::execution_context& ctx);
-
- // Destructor.
- BOOST_ASIO_DECL ~select_reactor();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Recreate internal descriptors following a fork.
- BOOST_ASIO_DECL void notify_fork(
- boost::asio::execution_context::fork_event fork_ev);
-
- // Initialise the task, but only if the reactor is not in its own thread.
- BOOST_ASIO_DECL void init_task();
-
- // Register a socket with the reactor. Returns 0 on success, system error
- // code on failure.
- BOOST_ASIO_DECL int register_descriptor(socket_type, per_descriptor_data&);
-
- // Register a descriptor with an associated single operation. Returns 0 on
- // success, system error code on failure.
- BOOST_ASIO_DECL int register_internal_descriptor(
- int op_type, socket_type descriptor,
- per_descriptor_data& descriptor_data, reactor_op* op);
-
- // Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation)
- {
- scheduler_.post_immediate_completion(op, is_continuation);
- }
-
- // Start a new operation. The reactor operation will be performed when the
- // given descriptor is flagged as ready, or an error has occurred.
- BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
- per_descriptor_data&, reactor_op* op, bool is_continuation, bool);
-
- // Cancel all operations associated with the given descriptor. The
- // handlers associated with the descriptor will be invoked with the
- // operation_aborted error.
- BOOST_ASIO_DECL void cancel_ops(socket_type descriptor, per_descriptor_data&);
-
- // Cancel any operations that are running against the descriptor and remove
- // its registration from the reactor. The reactor resources associated with
- // the descriptor must be released by calling cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
- per_descriptor_data&, bool closing);
-
- // Remove the descriptor's registration from the reactor. The reactor
- // resources associated with the descriptor must be released by calling
- // cleanup_descriptor_data.
- BOOST_ASIO_DECL void deregister_internal_descriptor(
- socket_type descriptor, per_descriptor_data&);
-
- // Perform any post-deregistration cleanup tasks associated with the
- // descriptor data.
- BOOST_ASIO_DECL void cleanup_descriptor_data(per_descriptor_data&);
-
- // Move descriptor registration from one descriptor_data object to another.
- BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
- per_descriptor_data& target_descriptor_data,
- per_descriptor_data& source_descriptor_data);
-
- // Add a new timer queue to the reactor.
- template <typename Time_Traits>
- void add_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Remove a timer queue from the reactor.
- template <typename Time_Traits>
- void remove_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Schedule a new operation in the given timer queue to expire at the
- // specified absolute time.
- template <typename Time_Traits>
- void schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
-
- // Cancel the timer operations associated with the given token. Returns the
- // number of operations that have been posted or dispatched.
- template <typename Time_Traits>
- std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
-
- // Move the timer operations associated with the given timer.
- template <typename Time_Traits>
- void move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& target,
- typename timer_queue<Time_Traits>::per_timer_data& source);
-
- // Run select once until interrupted or events are ready to be dispatched.
- BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
-
- // Interrupt the select loop.
- BOOST_ASIO_DECL void interrupt();
-
-private:
-#if defined(BOOST_ASIO_HAS_IOCP)
- // Run the select loop in the thread.
- BOOST_ASIO_DECL void run_thread();
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
- // Helper function to add a new timer queue.
- BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
-
- // Helper function to remove a timer queue.
- BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
-
- // Get the timeout value for the select call.
- BOOST_ASIO_DECL timeval* get_timeout(long usec, timeval& tv);
-
- // Cancel all operations associated with the given descriptor. This function
- // does not acquire the select_reactor's mutex.
- BOOST_ASIO_DECL void cancel_ops_unlocked(socket_type descriptor,
- const boost::system::error_code& ec);
-
- // The scheduler implementation used to post completions.
-# if defined(BOOST_ASIO_HAS_IOCP)
- typedef class win_iocp_io_context scheduler_type;
-# else // defined(BOOST_ASIO_HAS_IOCP)
- typedef class scheduler scheduler_type;
-# endif // defined(BOOST_ASIO_HAS_IOCP)
- scheduler_type& scheduler_;
-
- // Mutex to protect access to internal data.
- boost::asio::detail::mutex mutex_;
-
- // The interrupter is used to break a blocking select call.
- select_interrupter interrupter_;
-
- // The queues of read, write and except operations.
- reactor_op_queue<socket_type> op_queue_[max_ops];
-
- // The file descriptor sets to be passed to the select system call.
- fd_set_adapter fd_sets_[max_select_ops];
-
- // The timer queues.
- timer_queue_set timer_queues_;
-
-#if defined(BOOST_ASIO_HAS_IOCP)
- // Helper class to run the reactor loop in a thread.
- class thread_function;
- friend class thread_function;
-
- // Does the reactor loop thread need to stop.
- bool stop_thread_;
-
- // The thread that is running the reactor loop.
- boost::asio::detail::thread* thread_;
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
- // Whether the service has been shut down.
- bool shutdown_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/select_reactor.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/select_reactor.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
- // || (!defined(BOOST_ASIO_HAS_DEV_POLL)
- // && !defined(BOOST_ASIO_HAS_EPOLL)
- // && !defined(BOOST_ASIO_HAS_KQUEUE)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
-
-#endif // BOOST_ASIO_DETAIL_SELECT_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp
deleted file mode 100644
index 894fdb1b75d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp
+++ /dev/null
@@ -1,166 +0,0 @@
-//
-// detail/service_registry.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_SERVICE_REGISTRY_HPP
-#define BOOST_ASIO_DETAIL_SERVICE_REGISTRY_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/mutex.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class io_context;
-
-namespace detail {
-
-template <typename T>
-class typeid_wrapper {};
-
-class service_registry
- : private noncopyable
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL service_registry(execution_context& owner);
-
- // Destructor.
- BOOST_ASIO_DECL ~service_registry();
-
- // Shutdown all services.
- BOOST_ASIO_DECL void shutdown_services();
-
- // Destroy all services.
- BOOST_ASIO_DECL void destroy_services();
-
- // Notify all services of a fork event.
- BOOST_ASIO_DECL void notify_fork(execution_context::fork_event fork_ev);
-
- // Get the service object corresponding to the specified service type. Will
- // create a new service object automatically if no such object already
- // exists. Ownership of the service object is not transferred to the caller.
- template <typename Service>
- Service& use_service();
-
- // Get the service object corresponding to the specified service type. Will
- // create a new service object automatically if no such object already
- // exists. Ownership of the service object is not transferred to the caller.
- // This overload is used for backwards compatibility with services that
- // inherit from io_context::service.
- template <typename Service>
- Service& use_service(io_context& owner);
-
- // Add a service object. Throws on error, in which case ownership of the
- // object is retained by the caller.
- template <typename Service>
- void add_service(Service* new_service);
-
- // Check whether a service object of the specified type already exists.
- template <typename Service>
- bool has_service() const;
-
-private:
- // Initalise a service's key when the key_type typedef is not available.
- template <typename Service>
- static void init_key(execution_context::service::key& key, ...);
-
-#if !defined(BOOST_ASIO_NO_TYPEID)
- // Initalise a service's key when the key_type typedef is available.
- template <typename Service>
- static void init_key(execution_context::service::key& key,
- typename enable_if<
- is_base_of<typename Service::key_type, Service>::value>::type*);
-#endif // !defined(BOOST_ASIO_NO_TYPEID)
-
- // Initialise a service's key based on its id.
- BOOST_ASIO_DECL static void init_key_from_id(
- execution_context::service::key& key,
- const execution_context::id& id);
-
-#if !defined(BOOST_ASIO_NO_TYPEID)
- // Initialise a service's key based on its id.
- template <typename Service>
- static void init_key_from_id(execution_context::service::key& key,
- const service_id<Service>& /*id*/);
-#endif // !defined(BOOST_ASIO_NO_TYPEID)
-
- // Check if a service matches the given id.
- BOOST_ASIO_DECL static bool keys_match(
- const execution_context::service::key& key1,
- const execution_context::service::key& key2);
-
- // The type of a factory function used for creating a service instance.
- typedef execution_context::service*(*factory_type)(void*);
-
- // Factory function for creating a service instance.
- template <typename Service, typename Owner>
- static execution_context::service* create(void* owner);
-
- // Destroy a service instance.
- BOOST_ASIO_DECL static void destroy(execution_context::service* service);
-
- // Helper class to manage service pointers.
- struct auto_service_ptr;
- friend struct auto_service_ptr;
- struct auto_service_ptr
- {
- execution_context::service* ptr_;
- ~auto_service_ptr() { destroy(ptr_); }
- };
-
- // Get the service object corresponding to the specified service key. Will
- // create a new service object automatically if no such object already
- // exists. Ownership of the service object is not transferred to the caller.
- BOOST_ASIO_DECL execution_context::service* do_use_service(
- const execution_context::service::key& key,
- factory_type factory, void* owner);
-
- // Add a service object. Throws on error, in which case ownership of the
- // object is retained by the caller.
- BOOST_ASIO_DECL void do_add_service(
- const execution_context::service::key& key,
- execution_context::service* new_service);
-
- // Check whether a service object with the specified key already exists.
- BOOST_ASIO_DECL bool do_has_service(
- const execution_context::service::key& key) const;
-
- // Mutex to protect access to internal data.
- mutable boost::asio::detail::mutex mutex_;
-
- // The owner of this service registry and the services it contains.
- execution_context& owner_;
-
- // The first service in the list of contained services.
- execution_context::service* first_service_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/service_registry.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/service_registry.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_SERVICE_REGISTRY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp
deleted file mode 100644
index 875f188f484..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// detail/signal_blocker.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_SIGNAL_BLOCKER_HPP
-#define BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_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_THREADS) || defined(BOOST_ASIO_WINDOWS) \
- || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-# include <boost/asio/detail/null_signal_blocker.hpp>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_signal_blocker.hpp>
-#else
-# error Only Windows and POSIX are supported!
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
- || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- || defined(__CYGWIN__) || defined(__SYMBIAN32__)
-typedef null_signal_blocker signal_blocker;
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-typedef posix_signal_blocker signal_blocker;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp
deleted file mode 100644
index 2045db2188f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// detail/signal_handler.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_SIGNAL_HANDLER_HPP
-#define BOOST_ASIO_DETAIL_SIGNAL_HANDLER_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/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/handler_work.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/signal_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class signal_handler : public signal_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(signal_handler);
-
- signal_handler(Handler& h)
- : signal_op(&signal_handler::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(h))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- signal_handler* h(static_cast<signal_handler*>(base));
- ptr p = { boost::asio::detail::addressof(h->handler_), h, h };
- handler_work<Handler> w(h->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*h));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, int>
- handler(h->handler_, h->ec_, h->signal_number_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SIGNAL_HANDLER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp
deleted file mode 100644
index 1889de689ba..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// detail/signal_init.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_SIGNAL_INIT_HPP
-#define BOOST_ASIO_DETAIL_SIGNAL_INIT_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_WINDOWS) && !defined(__CYGWIN__)
-
-#include <csignal>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <int Signal = SIGPIPE>
-class signal_init
-{
-public:
- // Constructor.
- signal_init()
- {
- std::signal(Signal, SIG_IGN);
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_SIGNAL_INIT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp
deleted file mode 100644
index 74cc68290dc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// detail/signal_op.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_SIGNAL_OP_HPP
-#define BOOST_ASIO_DETAIL_SIGNAL_OP_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/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class signal_op
- : public operation
-{
-public:
- // The error code to be passed to the completion handler.
- boost::system::error_code ec_;
-
- // The signal number to be passed to the completion handler.
- int signal_number_;
-
-protected:
- signal_op(func_type func)
- : operation(func),
- signal_number_(0)
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SIGNAL_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp
deleted file mode 100644
index 17ae44ea378..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp
+++ /dev/null
@@ -1,219 +0,0 @@
-//
-// detail/signal_set_service.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_SIGNAL_SET_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_SIGNAL_SET_SERVICE_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 <signal.h>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/signal_handler.hpp>
-#include <boost/asio/detail/signal_op.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-# include <boost/asio/detail/reactor.hpp>
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(NSIG) && (NSIG > 0)
-enum { max_signal_number = NSIG };
-#else
-enum { max_signal_number = 128 };
-#endif
-
-extern BOOST_ASIO_DECL struct signal_state* get_signal_state();
-
-extern "C" BOOST_ASIO_DECL void boost_asio_signal_handler(int signal_number);
-
-class signal_set_service :
- public service_base<signal_set_service>
-{
-public:
- // Type used for tracking an individual signal registration.
- class registration
- {
- public:
- // Default constructor.
- registration()
- : signal_number_(0),
- queue_(0),
- undelivered_(0),
- next_in_table_(0),
- prev_in_table_(0),
- next_in_set_(0)
- {
- }
-
- private:
- // Only this service will have access to the internal values.
- friend class signal_set_service;
-
- // The signal number that is registered.
- int signal_number_;
-
- // The waiting signal handlers.
- op_queue<signal_op>* queue_;
-
- // The number of undelivered signals.
- std::size_t undelivered_;
-
- // Pointers to adjacent registrations in the registrations_ table.
- registration* next_in_table_;
- registration* prev_in_table_;
-
- // Link to next registration in the signal set.
- registration* next_in_set_;
- };
-
- // The implementation type of the signal_set.
- class implementation_type
- {
- public:
- // Default constructor.
- implementation_type()
- : signals_(0)
- {
- }
-
- private:
- // Only this service will have access to the internal values.
- friend class signal_set_service;
-
- // The pending signal handlers.
- op_queue<signal_op> queue_;
-
- // Linked list of registered signals.
- registration* signals_;
- };
-
- // Constructor.
- BOOST_ASIO_DECL signal_set_service(boost::asio::io_context& io_context);
-
- // Destructor.
- BOOST_ASIO_DECL ~signal_set_service();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Perform fork-related housekeeping.
- BOOST_ASIO_DECL void notify_fork(
- boost::asio::io_context::fork_event fork_ev);
-
- // Construct a new signal_set implementation.
- BOOST_ASIO_DECL void construct(implementation_type& impl);
-
- // Destroy a signal_set implementation.
- BOOST_ASIO_DECL void destroy(implementation_type& impl);
-
- // Add a signal to a signal_set.
- BOOST_ASIO_DECL boost::system::error_code add(implementation_type& impl,
- int signal_number, boost::system::error_code& ec);
-
- // Remove a signal to a signal_set.
- BOOST_ASIO_DECL boost::system::error_code remove(implementation_type& impl,
- int signal_number, boost::system::error_code& ec);
-
- // Remove all signals from a signal_set.
- BOOST_ASIO_DECL boost::system::error_code clear(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Cancel all operations associated with the signal set.
- BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Start an asynchronous operation to wait for a signal to be delivered.
- template <typename Handler>
- void async_wait(implementation_type& impl, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef signal_handler<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_.context(),
- *p.p, "signal_set", &impl, 0, "async_wait"));
-
- start_wait_op(impl, p.p);
- p.v = p.p = 0;
- }
-
- // Deliver notification that a particular signal occurred.
- BOOST_ASIO_DECL static void deliver_signal(int signal_number);
-
-private:
- // Helper function to add a service to the global signal state.
- BOOST_ASIO_DECL static void add_service(signal_set_service* service);
-
- // Helper function to remove a service from the global signal state.
- BOOST_ASIO_DECL static void remove_service(signal_set_service* service);
-
- // Helper function to create the pipe descriptors.
- BOOST_ASIO_DECL static void open_descriptors();
-
- // Helper function to close the pipe descriptors.
- BOOST_ASIO_DECL static void close_descriptors();
-
- // Helper function to start a wait operation.
- BOOST_ASIO_DECL void start_wait_op(implementation_type& impl, signal_op* op);
-
- // The io_context instance used for dispatching handlers.
- io_context_impl& io_context_;
-
-#if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
- // The type used for registering for pipe reactor notifications.
- class pipe_read_op;
-
- // The reactor used for waiting for pipe readiness.
- reactor& reactor_;
-
- // The per-descriptor reactor data used for the pipe.
- reactor::per_descriptor_data reactor_data_;
-#endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-
- // A mapping from signal number to the registered signal sets.
- registration* registrations_[max_signal_number];
-
- // Pointers to adjacent services in linked list.
- signal_set_service* next_;
- signal_set_service* prev_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/signal_set_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_SIGNAL_SET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp
deleted file mode 100644
index b229f66b1b2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// detail/socket_holder.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_SOCKET_HOLDER_HPP
-#define BOOST_ASIO_DETAIL_SOCKET_HOLDER_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/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Implement the resource acquisition is initialisation idiom for sockets.
-class socket_holder
- : private noncopyable
-{
-public:
- // Construct as an uninitialised socket.
- socket_holder()
- : socket_(invalid_socket)
- {
- }
-
- // Construct to take ownership of the specified socket.
- explicit socket_holder(socket_type s)
- : socket_(s)
- {
- }
-
- // Destructor.
- ~socket_holder()
- {
- if (socket_ != invalid_socket)
- {
- boost::system::error_code ec;
- socket_ops::state_type state = 0;
- socket_ops::close(socket_, state, true, ec);
- }
- }
-
- // Get the underlying socket.
- socket_type get() const
- {
- return socket_;
- }
-
- // Reset to an uninitialised socket.
- void reset()
- {
- if (socket_ != invalid_socket)
- {
- boost::system::error_code ec;
- socket_ops::state_type state = 0;
- socket_ops::close(socket_, state, true, ec);
- socket_ = invalid_socket;
- }
- }
-
- // Reset to take ownership of the specified socket.
- void reset(socket_type s)
- {
- reset();
- socket_ = s;
- }
-
- // Release ownership of the socket.
- socket_type release()
- {
- socket_type tmp = socket_;
- socket_ = invalid_socket;
- return tmp;
- }
-
-private:
- // The underlying socket.
- socket_type socket_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SOCKET_HOLDER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp
deleted file mode 100644
index 8f5fa0b3cad..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp
+++ /dev/null
@@ -1,339 +0,0 @@
-//
-// detail/socket_ops.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_SOCKET_OPS_HPP
-#define BOOST_ASIO_DETAIL_SOCKET_OPS_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/system/error_code.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace socket_ops {
-
-// Socket state bits.
-enum
-{
- // The user wants a non-blocking socket.
- user_set_non_blocking = 1,
-
- // The socket has been set non-blocking.
- internal_non_blocking = 2,
-
- // Helper "state" used to determine whether the socket is non-blocking.
- non_blocking = user_set_non_blocking | internal_non_blocking,
-
- // User wants connection_aborted errors, which are disabled by default.
- enable_connection_aborted = 4,
-
- // The user set the linger option. Needs to be checked when closing.
- user_set_linger = 8,
-
- // The socket is stream-oriented.
- stream_oriented = 16,
-
- // The socket is datagram-oriented.
- datagram_oriented = 32,
-
- // The socket may have been dup()-ed.
- possible_dup = 64
-};
-
-typedef unsigned char state_type;
-
-struct noop_deleter { void operator()(void*) {} };
-typedef shared_ptr<void> shared_cancel_token_type;
-typedef weak_ptr<void> weak_cancel_token_type;
-
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-BOOST_ASIO_DECL socket_type accept(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL socket_type sync_accept(socket_type s,
- state_type state, socket_addr_type* addr,
- std::size_t* addrlen, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL int bind(socket_type s, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int close(socket_type s, state_type& state,
- bool destruction, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool set_user_non_blocking(socket_type s,
- state_type& state, bool value, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool set_internal_non_blocking(socket_type s,
- state_type& state, bool value, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int shutdown(socket_type s,
- int what, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int connect(socket_type s, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL void sync_connect(socket_type s, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL void complete_iocp_connect(socket_type s,
- boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL bool non_blocking_connect(socket_type s,
- boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int socketpair(int af, int type, int protocol,
- socket_type sv[2], boost::system::error_code& ec);
-
-BOOST_ASIO_DECL bool sockatmark(socket_type s, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL size_t available(socket_type s, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int listen(socket_type s,
- int backlog, boost::system::error_code& ec);
-
-#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__)
-
-BOOST_ASIO_DECL void init_buf(buf& b, void* data, size_t size);
-
-BOOST_ASIO_DECL void init_buf(buf& b, const void* data, size_t size);
-
-BOOST_ASIO_DECL signed_size_type recv(socket_type s, buf* bufs,
- size_t count, int flags, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL void complete_iocp_recvfrom(
- const weak_cancel_token_type& cancel_token,
- boost::system::error_code& ec);
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL signed_size_type recvmsg(socket_type s, buf* bufs,
- size_t count, int in_flags, int& out_flags,
- boost::system::error_code& ec);
-
-BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL void complete_iocp_recvmsg(
- const weak_cancel_token_type& cancel_token,
- boost::system::error_code& ec);
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL signed_size_type send(socket_type s, const buf* bufs,
- size_t count, int flags, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL void complete_iocp_send(
- const weak_cancel_token_type& cancel_token,
- boost::system::error_code& ec);
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL bool non_blocking_send(socket_type s,
- const buf* bufs, size_t count, int flags,
- boost::system::error_code& ec, size_t& bytes_transferred);
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-BOOST_ASIO_DECL 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 !defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL 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);
-
-#endif // !defined(BOOST_ASIO_HAS_IOCP)
-
-BOOST_ASIO_DECL socket_type socket(int af, int type, int protocol,
- boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int setsockopt(socket_type s, state_type& state,
- int level, int optname, const void* optval,
- std::size_t optlen, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int getsockopt(socket_type s, state_type state,
- int level, int optname, void* optval,
- size_t* optlen, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int getpeername(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, bool cached, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int getsockname(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int ioctl(socket_type s, state_type& state,
- int cmd, ioctl_arg_type* arg, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int select(int nfds, fd_set* readfds, fd_set* writefds,
- fd_set* exceptfds, timeval* timeout, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_read(socket_type s,
- state_type state, int msec, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_write(socket_type s,
- state_type state, int msec, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_error(socket_type s,
- state_type state, int msec, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int poll_connect(socket_type s,
- int msec, boost::system::error_code& ec);
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-BOOST_ASIO_DECL const char* inet_ntop(int af, const void* src, char* dest,
- size_t length, unsigned long scope_id, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int inet_pton(int af, const char* src, void* dest,
- unsigned long* scope_id, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL int gethostname(char* name,
- int namelen, boost::system::error_code& ec);
-
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-BOOST_ASIO_DECL boost::system::error_code getaddrinfo(const char* host,
- const char* service, const addrinfo_type& hints,
- addrinfo_type** result, boost::system::error_code& ec);
-
-BOOST_ASIO_DECL 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);
-
-BOOST_ASIO_DECL void freeaddrinfo(addrinfo_type* ai);
-
-BOOST_ASIO_DECL 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);
-
-BOOST_ASIO_DECL 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);
-
-BOOST_ASIO_DECL 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);
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-BOOST_ASIO_DECL u_long_type network_to_host_long(u_long_type value);
-
-BOOST_ASIO_DECL u_long_type host_to_network_long(u_long_type value);
-
-BOOST_ASIO_DECL u_short_type network_to_host_short(u_short_type value);
-
-BOOST_ASIO_DECL u_short_type host_to_network_short(u_short_type value);
-
-} // namespace socket_ops
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/socket_ops.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_SOCKET_OPS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp
deleted file mode 100644
index bd940142cad..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp
+++ /dev/null
@@ -1,318 +0,0 @@
-//
-// detail/socket_option.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_SOCKET_OPTION_HPP
-#define BOOST_ASIO_DETAIL_SOCKET_OPTION_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 <stdexcept>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace socket_option {
-
-// Helper template for implementing boolean-based options.
-template <int Level, int Name>
-class boolean
-{
-public:
- // Default constructor.
- boolean()
- : value_(0)
- {
- }
-
- // Construct with a specific option value.
- explicit boolean(bool v)
- : value_(v ? 1 : 0)
- {
- }
-
- // Set the current value of the boolean.
- boolean& operator=(bool v)
- {
- value_ = v ? 1 : 0;
- return *this;
- }
-
- // Get the current value of the boolean.
- bool value() const
- {
- return !!value_;
- }
-
- // Convert to bool.
- operator bool() const
- {
- return !!value_;
- }
-
- // Test for false.
- bool operator!() const
- {
- return !value_;
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol&) const
- {
- return Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol&) const
- {
- return Name;
- }
-
- // Get the address of the boolean data.
- template <typename Protocol>
- int* data(const Protocol&)
- {
- return &value_;
- }
-
- // Get the address of the boolean data.
- template <typename Protocol>
- const int* data(const Protocol&) const
- {
- return &value_;
- }
-
- // Get the size of the boolean data.
- template <typename Protocol>
- std::size_t size(const Protocol&) const
- {
- return sizeof(value_);
- }
-
- // Set the size of the boolean data.
- template <typename Protocol>
- void resize(const Protocol&, std::size_t s)
- {
- // On some platforms (e.g. Windows Vista), the getsockopt function will
- // return the size of a boolean socket option as one byte, even though a
- // four byte integer was passed in.
- switch (s)
- {
- case sizeof(char):
- value_ = *reinterpret_cast<char*>(&value_) ? 1 : 0;
- break;
- case sizeof(value_):
- break;
- default:
- {
- std::length_error ex("boolean socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- }
- }
-
-private:
- int value_;
-};
-
-// Helper template for implementing integer options.
-template <int Level, int Name>
-class integer
-{
-public:
- // Default constructor.
- integer()
- : value_(0)
- {
- }
-
- // Construct with a specific option value.
- explicit integer(int v)
- : value_(v)
- {
- }
-
- // Set the value of the int option.
- integer& operator=(int v)
- {
- value_ = v;
- return *this;
- }
-
- // Get the current value of the int option.
- int value() const
- {
- return value_;
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol&) const
- {
- return Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol&) const
- {
- return Name;
- }
-
- // Get the address of the int data.
- template <typename Protocol>
- int* data(const Protocol&)
- {
- return &value_;
- }
-
- // Get the address of the int data.
- template <typename Protocol>
- const int* data(const Protocol&) const
- {
- return &value_;
- }
-
- // Get the size of the int data.
- template <typename Protocol>
- std::size_t size(const Protocol&) const
- {
- return sizeof(value_);
- }
-
- // Set the size of the int data.
- template <typename Protocol>
- void resize(const Protocol&, std::size_t s)
- {
- if (s != sizeof(value_))
- {
- std::length_error ex("integer socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- }
-
-private:
- int value_;
-};
-
-// Helper template for implementing linger options.
-template <int Level, int Name>
-class linger
-{
-public:
- // Default constructor.
- linger()
- {
- value_.l_onoff = 0;
- value_.l_linger = 0;
- }
-
- // Construct with specific option values.
- linger(bool e, int t)
- {
- enabled(e);
- timeout BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION(t);
- }
-
- // Set the value for whether linger is enabled.
- void enabled(bool value)
- {
- value_.l_onoff = value ? 1 : 0;
- }
-
- // Get the value for whether linger is enabled.
- bool enabled() const
- {
- return value_.l_onoff != 0;
- }
-
- // Set the value for the linger timeout.
- void timeout BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION(int value)
- {
-#if defined(WIN32)
- value_.l_linger = static_cast<u_short>(value);
-#else
- value_.l_linger = value;
-#endif
- }
-
- // Get the value for the linger timeout.
- int timeout BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION() const
- {
- return static_cast<int>(value_.l_linger);
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol&) const
- {
- return Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol&) const
- {
- return Name;
- }
-
- // Get the address of the linger data.
- template <typename Protocol>
- detail::linger_type* data(const Protocol&)
- {
- return &value_;
- }
-
- // Get the address of the linger data.
- template <typename Protocol>
- const detail::linger_type* data(const Protocol&) const
- {
- return &value_;
- }
-
- // Get the size of the linger data.
- template <typename Protocol>
- std::size_t size(const Protocol&) const
- {
- return sizeof(value_);
- }
-
- // Set the size of the int data.
- template <typename Protocol>
- void resize(const Protocol&, std::size_t s)
- {
- if (s != sizeof(value_))
- {
- std::length_error ex("linger socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- }
-
-private:
- detail::linger_type value_;
-};
-
-} // namespace socket_option
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SOCKET_OPTION_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp
deleted file mode 100644
index dc7e30d69bd..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// detail/socket_select_interrupter.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_SOCKET_SELECT_INTERRUPTER_HPP
-#define BOOST_ASIO_DETAIL_SOCKET_SELECT_INTERRUPTER_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_WINDOWS_RUNTIME)
-
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
-
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class socket_select_interrupter
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL socket_select_interrupter();
-
- // Destructor.
- BOOST_ASIO_DECL ~socket_select_interrupter();
-
- // Recreate the interrupter's descriptors. Used after a fork.
- BOOST_ASIO_DECL void recreate();
-
- // Interrupt the select call.
- BOOST_ASIO_DECL void interrupt();
-
- // Reset the select interrupt. Returns true if the call was interrupted.
- BOOST_ASIO_DECL bool reset();
-
- // Get the read descriptor to be passed to select.
- socket_type read_descriptor() const
- {
- return read_descriptor_;
- }
-
-private:
- // Open the descriptors. Throws on error.
- BOOST_ASIO_DECL void open_descriptors();
-
- // Close the descriptors.
- BOOST_ASIO_DECL void close_descriptors();
-
- // The read end of a connection used to interrupt the select call. This file
- // descriptor is passed to select such that when it is time to stop, a single
- // byte will be written on the other end of the connection and this
- // descriptor will become readable.
- socket_type read_descriptor_;
-
- // The write end of a connection used to interrupt the select call. A single
- // byte may be written to this to wake up the select which is waiting for the
- // other end to become readable.
- socket_type write_descriptor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/socket_select_interrupter.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_SOCKET_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp
deleted file mode 100644
index 11ed5518384..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp
+++ /dev/null
@@ -1,418 +0,0 @@
-//
-// detail/socket_types.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_SOCKET_TYPES_HPP
-#define BOOST_ASIO_DETAIL_SOCKET_TYPES_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_WINDOWS_RUNTIME)
-// Empty.
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
-# error WinSock.h has already been included
-# endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
-# if defined(__BORLANDC__)
-# include <stdlib.h> // Needed for __errno
-# if !defined(_WSPIAPI_H_)
-# define _WSPIAPI_H_
-# define BOOST_ASIO_WSPIAPI_H_DEFINED
-# endif // !defined(_WSPIAPI_H_)
-# endif // defined(__BORLANDC__)
-# include <winsock2.h>
-# include <ws2tcpip.h>
-# if defined(WINAPI_FAMILY)
-# if ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
-# include <windows.h>
-# endif // ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
-# endif // defined(WINAPI_FAMILY)
-# if !defined(BOOST_ASIO_WINDOWS_APP)
-# include <mswsock.h>
-# endif // !defined(BOOST_ASIO_WINDOWS_APP)
-# if defined(BOOST_ASIO_WSPIAPI_H_DEFINED)
-# undef _WSPIAPI_H_
-# undef BOOST_ASIO_WSPIAPI_H_DEFINED
-# endif // defined(BOOST_ASIO_WSPIAPI_H_DEFINED)
-# if !defined(BOOST_ASIO_NO_DEFAULT_LINKED_LIBS)
-# if defined(UNDER_CE)
-# pragma comment(lib, "ws2.lib")
-# elif defined(_MSC_VER) || defined(__BORLANDC__)
-# pragma comment(lib, "ws2_32.lib")
-# if !defined(BOOST_ASIO_WINDOWS_APP)
-# pragma comment(lib, "mswsock.lib")
-# endif // !defined(BOOST_ASIO_WINDOWS_APP)
-# endif // defined(_MSC_VER) || defined(__BORLANDC__)
-# endif // !defined(BOOST_ASIO_NO_DEFAULT_LINKED_LIBS)
-# include <boost/asio/detail/old_win_sdk_compat.hpp>
-#else
-# include <sys/ioctl.h>
-# if (defined(__MACH__) && defined(__APPLE__)) \
- || defined(__FreeBSD__) || defined(__NetBSD__) \
- || defined(__OpenBSD__) || defined(__linux__) \
- || defined(__EMSCRIPTEN__)
-# include <poll.h>
-# elif !defined(__SYMBIAN32__)
-# include <sys/poll.h>
-# endif
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-# if defined(__hpux)
-# include <sys/time.h>
-# endif
-# if !defined(__hpux) || defined(__SELECT)
-# include <sys/select.h>
-# endif
-# include <sys/socket.h>
-# include <sys/uio.h>
-# include <sys/un.h>
-# include <netinet/in.h>
-# if !defined(__SYMBIAN32__)
-# include <netinet/tcp.h>
-# endif
-# include <arpa/inet.h>
-# include <netdb.h>
-# include <net/if.h>
-# include <limits.h>
-# if defined(__sun)
-# include <sys/filio.h>
-# include <sys/sockio.h>
-# endif
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-const int max_addr_v4_str_len = 256;
-const int max_addr_v6_str_len = 256;
-typedef unsigned __int32 u_long_type;
-typedef unsigned __int16 u_short_type;
-struct in4_addr_type { u_long_type s_addr; };
-struct in4_mreq_type { in4_addr_type imr_multiaddr, imr_interface; };
-struct in6_addr_type { unsigned char s6_addr[16]; };
-struct in6_mreq_type { in6_addr_type ipv6mr_multiaddr;
- unsigned long ipv6mr_interface; };
-struct socket_addr_type { int sa_family; };
-struct sockaddr_in4_type { int sin_family;
- in4_addr_type sin_addr; u_short_type sin_port; };
-struct sockaddr_in6_type { int sin6_family;
- in6_addr_type sin6_addr; u_short_type sin6_port;
- u_long_type sin6_flowinfo; u_long_type sin6_scope_id; };
-struct sockaddr_storage_type { int ss_family;
- unsigned char ss_bytes[128 - sizeof(int)]; };
-struct addrinfo_type { int ai_flags;
- int ai_family, ai_socktype, ai_protocol;
- int ai_addrlen; const void* ai_addr;
- const char* ai_canonname; addrinfo_type* ai_next; };
-struct linger_type { u_short_type l_onoff, l_linger; };
-typedef u_long_type ioctl_arg_type;
-typedef int signed_size_type;
-# define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c
-# define BOOST_ASIO_OS_DEF_AF_UNSPEC 0
-# define BOOST_ASIO_OS_DEF_AF_INET 2
-# define BOOST_ASIO_OS_DEF_AF_INET6 23
-# define BOOST_ASIO_OS_DEF_SOCK_STREAM 1
-# define BOOST_ASIO_OS_DEF_SOCK_DGRAM 2
-# define BOOST_ASIO_OS_DEF_SOCK_RAW 3
-# define BOOST_ASIO_OS_DEF_SOCK_SEQPACKET 5
-# define BOOST_ASIO_OS_DEF_IPPROTO_IP 0
-# define BOOST_ASIO_OS_DEF_IPPROTO_IPV6 41
-# define BOOST_ASIO_OS_DEF_IPPROTO_TCP 6
-# define BOOST_ASIO_OS_DEF_IPPROTO_UDP 17
-# define BOOST_ASIO_OS_DEF_IPPROTO_ICMP 1
-# define BOOST_ASIO_OS_DEF_IPPROTO_ICMPV6 58
-# define BOOST_ASIO_OS_DEF_FIONBIO 1
-# define BOOST_ASIO_OS_DEF_FIONREAD 2
-# define BOOST_ASIO_OS_DEF_INADDR_ANY 0
-# define BOOST_ASIO_OS_DEF_MSG_OOB 0x1
-# define BOOST_ASIO_OS_DEF_MSG_PEEK 0x2
-# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE 0x4
-# define BOOST_ASIO_OS_DEF_MSG_EOR 0 // Not supported.
-# define BOOST_ASIO_OS_DEF_SHUT_RD 0x0
-# define BOOST_ASIO_OS_DEF_SHUT_WR 0x1
-# define BOOST_ASIO_OS_DEF_SHUT_RDWR 0x2
-# define BOOST_ASIO_OS_DEF_SOMAXCONN 0x7fffffff
-# define BOOST_ASIO_OS_DEF_SOL_SOCKET 0xffff
-# define BOOST_ASIO_OS_DEF_SO_BROADCAST 0x20
-# define BOOST_ASIO_OS_DEF_SO_DEBUG 0x1
-# define BOOST_ASIO_OS_DEF_SO_DONTROUTE 0x10
-# define BOOST_ASIO_OS_DEF_SO_KEEPALIVE 0x8
-# define BOOST_ASIO_OS_DEF_SO_LINGER 0x80
-# define BOOST_ASIO_OS_DEF_SO_OOBINLINE 0x100
-# define BOOST_ASIO_OS_DEF_SO_SNDBUF 0x1001
-# define BOOST_ASIO_OS_DEF_SO_RCVBUF 0x1002
-# define BOOST_ASIO_OS_DEF_SO_SNDLOWAT 0x1003
-# define BOOST_ASIO_OS_DEF_SO_RCVLOWAT 0x1004
-# define BOOST_ASIO_OS_DEF_SO_REUSEADDR 0x4
-# define BOOST_ASIO_OS_DEF_TCP_NODELAY 0x1
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_IF 2
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_TTL 3
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_LOOP 4
-# define BOOST_ASIO_OS_DEF_IP_ADD_MEMBERSHIP 5
-# define BOOST_ASIO_OS_DEF_IP_DROP_MEMBERSHIP 6
-# define BOOST_ASIO_OS_DEF_IP_TTL 7
-# define BOOST_ASIO_OS_DEF_IPV6_UNICAST_HOPS 4
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_IF 9
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_HOPS 10
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_LOOP 11
-# define BOOST_ASIO_OS_DEF_IPV6_JOIN_GROUP 12
-# define BOOST_ASIO_OS_DEF_IPV6_LEAVE_GROUP 13
-# define BOOST_ASIO_OS_DEF_AI_CANONNAME 0x2
-# define BOOST_ASIO_OS_DEF_AI_PASSIVE 0x1
-# define BOOST_ASIO_OS_DEF_AI_NUMERICHOST 0x4
-# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV 0x8
-# define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0x800
-# define BOOST_ASIO_OS_DEF_AI_ALL 0x100
-# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0x400
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-typedef SOCKET socket_type;
-const SOCKET invalid_socket = INVALID_SOCKET;
-const int socket_error_retval = SOCKET_ERROR;
-const int max_addr_v4_str_len = 256;
-const int max_addr_v6_str_len = 256;
-typedef sockaddr socket_addr_type;
-typedef in_addr in4_addr_type;
-typedef ip_mreq in4_mreq_type;
-typedef sockaddr_in sockaddr_in4_type;
-# if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
-typedef in6_addr_emulation in6_addr_type;
-typedef ipv6_mreq_emulation in6_mreq_type;
-typedef sockaddr_in6_emulation sockaddr_in6_type;
-typedef sockaddr_storage_emulation sockaddr_storage_type;
-typedef addrinfo_emulation addrinfo_type;
-# else
-typedef in6_addr in6_addr_type;
-typedef ipv6_mreq in6_mreq_type;
-typedef sockaddr_in6 sockaddr_in6_type;
-typedef sockaddr_storage sockaddr_storage_type;
-typedef addrinfo addrinfo_type;
-# endif
-typedef ::linger linger_type;
-typedef unsigned long ioctl_arg_type;
-typedef u_long u_long_type;
-typedef u_short u_short_type;
-typedef int signed_size_type;
-# define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c
-# define BOOST_ASIO_OS_DEF_AF_UNSPEC AF_UNSPEC
-# define BOOST_ASIO_OS_DEF_AF_INET AF_INET
-# define BOOST_ASIO_OS_DEF_AF_INET6 AF_INET6
-# define BOOST_ASIO_OS_DEF_SOCK_STREAM SOCK_STREAM
-# define BOOST_ASIO_OS_DEF_SOCK_DGRAM SOCK_DGRAM
-# define BOOST_ASIO_OS_DEF_SOCK_RAW SOCK_RAW
-# define BOOST_ASIO_OS_DEF_SOCK_SEQPACKET SOCK_SEQPACKET
-# define BOOST_ASIO_OS_DEF_IPPROTO_IP IPPROTO_IP
-# define BOOST_ASIO_OS_DEF_IPPROTO_IPV6 IPPROTO_IPV6
-# define BOOST_ASIO_OS_DEF_IPPROTO_TCP IPPROTO_TCP
-# define BOOST_ASIO_OS_DEF_IPPROTO_UDP IPPROTO_UDP
-# define BOOST_ASIO_OS_DEF_IPPROTO_ICMP IPPROTO_ICMP
-# define BOOST_ASIO_OS_DEF_IPPROTO_ICMPV6 IPPROTO_ICMPV6
-# define BOOST_ASIO_OS_DEF_FIONBIO FIONBIO
-# define BOOST_ASIO_OS_DEF_FIONREAD FIONREAD
-# define BOOST_ASIO_OS_DEF_INADDR_ANY INADDR_ANY
-# define BOOST_ASIO_OS_DEF_MSG_OOB MSG_OOB
-# define BOOST_ASIO_OS_DEF_MSG_PEEK MSG_PEEK
-# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE MSG_DONTROUTE
-# define BOOST_ASIO_OS_DEF_MSG_EOR 0 // Not supported on Windows.
-# define BOOST_ASIO_OS_DEF_SHUT_RD SD_RECEIVE
-# define BOOST_ASIO_OS_DEF_SHUT_WR SD_SEND
-# define BOOST_ASIO_OS_DEF_SHUT_RDWR SD_BOTH
-# define BOOST_ASIO_OS_DEF_SOMAXCONN SOMAXCONN
-# define BOOST_ASIO_OS_DEF_SOL_SOCKET SOL_SOCKET
-# define BOOST_ASIO_OS_DEF_SO_BROADCAST SO_BROADCAST
-# define BOOST_ASIO_OS_DEF_SO_DEBUG SO_DEBUG
-# define BOOST_ASIO_OS_DEF_SO_DONTROUTE SO_DONTROUTE
-# define BOOST_ASIO_OS_DEF_SO_KEEPALIVE SO_KEEPALIVE
-# define BOOST_ASIO_OS_DEF_SO_LINGER SO_LINGER
-# define BOOST_ASIO_OS_DEF_SO_OOBINLINE SO_OOBINLINE
-# define BOOST_ASIO_OS_DEF_SO_SNDBUF SO_SNDBUF
-# define BOOST_ASIO_OS_DEF_SO_RCVBUF SO_RCVBUF
-# define BOOST_ASIO_OS_DEF_SO_SNDLOWAT SO_SNDLOWAT
-# define BOOST_ASIO_OS_DEF_SO_RCVLOWAT SO_RCVLOWAT
-# define BOOST_ASIO_OS_DEF_SO_REUSEADDR SO_REUSEADDR
-# define BOOST_ASIO_OS_DEF_TCP_NODELAY TCP_NODELAY
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_IF IP_MULTICAST_IF
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_TTL IP_MULTICAST_TTL
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_LOOP IP_MULTICAST_LOOP
-# define BOOST_ASIO_OS_DEF_IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP
-# define BOOST_ASIO_OS_DEF_IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP
-# define BOOST_ASIO_OS_DEF_IP_TTL IP_TTL
-# define BOOST_ASIO_OS_DEF_IPV6_UNICAST_HOPS IPV6_UNICAST_HOPS
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_IF IPV6_MULTICAST_IF
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_HOPS IPV6_MULTICAST_HOPS
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_LOOP IPV6_MULTICAST_LOOP
-# define BOOST_ASIO_OS_DEF_IPV6_JOIN_GROUP IPV6_JOIN_GROUP
-# define BOOST_ASIO_OS_DEF_IPV6_LEAVE_GROUP IPV6_LEAVE_GROUP
-# define BOOST_ASIO_OS_DEF_AI_CANONNAME AI_CANONNAME
-# define BOOST_ASIO_OS_DEF_AI_PASSIVE AI_PASSIVE
-# define BOOST_ASIO_OS_DEF_AI_NUMERICHOST AI_NUMERICHOST
-# if defined(AI_NUMERICSERV)
-# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV AI_NUMERICSERV
-# else
-# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV 0
-# endif
-# if defined(AI_V4MAPPED)
-# define BOOST_ASIO_OS_DEF_AI_V4MAPPED AI_V4MAPPED
-# else
-# define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0
-# endif
-# if defined(AI_ALL)
-# define BOOST_ASIO_OS_DEF_AI_ALL AI_ALL
-# else
-# define BOOST_ASIO_OS_DEF_AI_ALL 0
-# endif
-# if defined(AI_ADDRCONFIG)
-# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG AI_ADDRCONFIG
-# else
-# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0
-# endif
-# if defined (_WIN32_WINNT)
-const int max_iov_len = 64;
-# else
-const int max_iov_len = 16;
-# endif
-#else
-typedef int socket_type;
-const int invalid_socket = -1;
-const int socket_error_retval = -1;
-const int max_addr_v4_str_len = INET_ADDRSTRLEN;
-#if defined(INET6_ADDRSTRLEN)
-const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE;
-#else // defined(INET6_ADDRSTRLEN)
-const int max_addr_v6_str_len = 256;
-#endif // defined(INET6_ADDRSTRLEN)
-typedef sockaddr socket_addr_type;
-typedef in_addr in4_addr_type;
-# if defined(__hpux)
-// HP-UX doesn't provide ip_mreq when _XOPEN_SOURCE_EXTENDED is defined.
-struct in4_mreq_type
-{
- struct in_addr imr_multiaddr;
- struct in_addr imr_interface;
-};
-# else
-typedef ip_mreq in4_mreq_type;
-# endif
-typedef sockaddr_in sockaddr_in4_type;
-typedef in6_addr in6_addr_type;
-typedef ipv6_mreq in6_mreq_type;
-typedef sockaddr_in6 sockaddr_in6_type;
-typedef sockaddr_storage sockaddr_storage_type;
-typedef sockaddr_un sockaddr_un_type;
-typedef addrinfo addrinfo_type;
-typedef ::linger linger_type;
-typedef int ioctl_arg_type;
-typedef uint32_t u_long_type;
-typedef uint16_t u_short_type;
-#if defined(BOOST_ASIO_HAS_SSIZE_T)
-typedef ssize_t signed_size_type;
-#else // defined(BOOST_ASIO_HAS_SSIZE_T)
-typedef int signed_size_type;
-#endif // defined(BOOST_ASIO_HAS_SSIZE_T)
-# define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c
-# define BOOST_ASIO_OS_DEF_AF_UNSPEC AF_UNSPEC
-# define BOOST_ASIO_OS_DEF_AF_INET AF_INET
-# define BOOST_ASIO_OS_DEF_AF_INET6 AF_INET6
-# define BOOST_ASIO_OS_DEF_SOCK_STREAM SOCK_STREAM
-# define BOOST_ASIO_OS_DEF_SOCK_DGRAM SOCK_DGRAM
-# define BOOST_ASIO_OS_DEF_SOCK_RAW SOCK_RAW
-# define BOOST_ASIO_OS_DEF_SOCK_SEQPACKET SOCK_SEQPACKET
-# define BOOST_ASIO_OS_DEF_IPPROTO_IP IPPROTO_IP
-# define BOOST_ASIO_OS_DEF_IPPROTO_IPV6 IPPROTO_IPV6
-# define BOOST_ASIO_OS_DEF_IPPROTO_TCP IPPROTO_TCP
-# define BOOST_ASIO_OS_DEF_IPPROTO_UDP IPPROTO_UDP
-# define BOOST_ASIO_OS_DEF_IPPROTO_ICMP IPPROTO_ICMP
-# define BOOST_ASIO_OS_DEF_IPPROTO_ICMPV6 IPPROTO_ICMPV6
-# define BOOST_ASIO_OS_DEF_FIONBIO FIONBIO
-# define BOOST_ASIO_OS_DEF_FIONREAD FIONREAD
-# define BOOST_ASIO_OS_DEF_INADDR_ANY INADDR_ANY
-# define BOOST_ASIO_OS_DEF_MSG_OOB MSG_OOB
-# define BOOST_ASIO_OS_DEF_MSG_PEEK MSG_PEEK
-# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE MSG_DONTROUTE
-# define BOOST_ASIO_OS_DEF_MSG_EOR MSG_EOR
-# define BOOST_ASIO_OS_DEF_SHUT_RD SHUT_RD
-# define BOOST_ASIO_OS_DEF_SHUT_WR SHUT_WR
-# define BOOST_ASIO_OS_DEF_SHUT_RDWR SHUT_RDWR
-# define BOOST_ASIO_OS_DEF_SOMAXCONN SOMAXCONN
-# define BOOST_ASIO_OS_DEF_SOL_SOCKET SOL_SOCKET
-# define BOOST_ASIO_OS_DEF_SO_BROADCAST SO_BROADCAST
-# define BOOST_ASIO_OS_DEF_SO_DEBUG SO_DEBUG
-# define BOOST_ASIO_OS_DEF_SO_DONTROUTE SO_DONTROUTE
-# define BOOST_ASIO_OS_DEF_SO_KEEPALIVE SO_KEEPALIVE
-# define BOOST_ASIO_OS_DEF_SO_LINGER SO_LINGER
-# define BOOST_ASIO_OS_DEF_SO_OOBINLINE SO_OOBINLINE
-# define BOOST_ASIO_OS_DEF_SO_SNDBUF SO_SNDBUF
-# define BOOST_ASIO_OS_DEF_SO_RCVBUF SO_RCVBUF
-# define BOOST_ASIO_OS_DEF_SO_SNDLOWAT SO_SNDLOWAT
-# define BOOST_ASIO_OS_DEF_SO_RCVLOWAT SO_RCVLOWAT
-# define BOOST_ASIO_OS_DEF_SO_REUSEADDR SO_REUSEADDR
-# define BOOST_ASIO_OS_DEF_TCP_NODELAY TCP_NODELAY
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_IF IP_MULTICAST_IF
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_TTL IP_MULTICAST_TTL
-# define BOOST_ASIO_OS_DEF_IP_MULTICAST_LOOP IP_MULTICAST_LOOP
-# define BOOST_ASIO_OS_DEF_IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP
-# define BOOST_ASIO_OS_DEF_IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP
-# define BOOST_ASIO_OS_DEF_IP_TTL IP_TTL
-# define BOOST_ASIO_OS_DEF_IPV6_UNICAST_HOPS IPV6_UNICAST_HOPS
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_IF IPV6_MULTICAST_IF
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_HOPS IPV6_MULTICAST_HOPS
-# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_LOOP IPV6_MULTICAST_LOOP
-# define BOOST_ASIO_OS_DEF_IPV6_JOIN_GROUP IPV6_JOIN_GROUP
-# define BOOST_ASIO_OS_DEF_IPV6_LEAVE_GROUP IPV6_LEAVE_GROUP
-# define BOOST_ASIO_OS_DEF_AI_CANONNAME AI_CANONNAME
-# define BOOST_ASIO_OS_DEF_AI_PASSIVE AI_PASSIVE
-# define BOOST_ASIO_OS_DEF_AI_NUMERICHOST AI_NUMERICHOST
-# if defined(AI_NUMERICSERV)
-# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV AI_NUMERICSERV
-# else
-# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV 0
-# endif
-// Note: QNX Neutrino 6.3 defines AI_V4MAPPED, AI_ALL and AI_ADDRCONFIG but
-// does not implement them. Therefore they are specifically excluded here.
-# if defined(AI_V4MAPPED) && !defined(__QNXNTO__)
-# define BOOST_ASIO_OS_DEF_AI_V4MAPPED AI_V4MAPPED
-# else
-# define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0
-# endif
-# if defined(AI_ALL) && !defined(__QNXNTO__)
-# define BOOST_ASIO_OS_DEF_AI_ALL AI_ALL
-# else
-# define BOOST_ASIO_OS_DEF_AI_ALL 0
-# endif
-# if defined(AI_ADDRCONFIG) && !defined(__QNXNTO__)
-# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG AI_ADDRCONFIG
-# else
-# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0
-# endif
-# if defined(IOV_MAX)
-const int max_iov_len = IOV_MAX;
-# else
-// POSIX platforms are not required to define IOV_MAX.
-const int max_iov_len = 16;
-# endif
-#endif
-const int custom_socket_option_level = 0xA5100000;
-const int enable_connection_aborted_option = 1;
-const int always_fail_option = 2;
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SOCKET_TYPES_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp
deleted file mode 100644
index 3b605daf399..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// detail/solaris_fenced_block.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_SOLARIS_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_SOLARIS_FENCED_BLOCK_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(__sun)
-
-#include <atomic.h>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class solaris_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit solaris_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit solaris_fenced_block(full_t)
- {
- membar_consumer();
- }
-
- // Destructor.
- ~solaris_fenced_block()
- {
- membar_producer();
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__sun)
-
-#endif // BOOST_ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp
deleted file mode 100644
index 1bc5c2c8134..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// detail/static_mutex.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_STATIC_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_STATIC_MUTEX_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_THREADS)
-# include <boost/asio/detail/null_static_mutex.hpp>
-#elif defined(BOOST_ASIO_WINDOWS)
-# include <boost/asio/detail/win_static_mutex.hpp>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_static_mutex.hpp>
-#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include <boost/asio/detail/std_static_mutex.hpp>
-#else
-# error Only Windows and POSIX are supported!
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS)
-typedef null_static_mutex static_mutex;
-# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_NULL_STATIC_MUTEX_INIT
-#elif defined(BOOST_ASIO_WINDOWS)
-typedef win_static_mutex static_mutex;
-# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_WIN_STATIC_MUTEX_INIT
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-typedef posix_static_mutex static_mutex;
-# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_POSIX_STATIC_MUTEX_INIT
-#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-typedef std_static_mutex static_mutex;
-# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_STD_STATIC_MUTEX_INIT
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp
deleted file mode 100644
index d32bff422e2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp
+++ /dev/null
@@ -1,178 +0,0 @@
-//
-// detail/std_event.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_STD_EVENT_HPP
-#define BOOST_ASIO_DETAIL_STD_EVENT_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_MUTEX_AND_CONDVAR)
-
-#include <chrono>
-#include <condition_variable>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class std_event
- : private noncopyable
-{
-public:
- // Constructor.
- std_event()
- : state_(0)
- {
- }
-
- // Destructor.
- ~std_event()
- {
- }
-
- // Signal the event. (Retained for backward compatibility.)
- template <typename Lock>
- void signal(Lock& lock)
- {
- this->signal_all(lock);
- }
-
- // Signal all waiters.
- template <typename Lock>
- void signal_all(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- (void)lock;
- state_ |= 1;
- cond_.notify_all();
- }
-
- // Unlock the mutex and signal one waiter.
- template <typename Lock>
- void unlock_and_signal_one(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- state_ |= 1;
- bool have_waiters = (state_ > 1);
- lock.unlock();
- if (have_waiters)
- cond_.notify_one();
- }
-
- // If there's a waiter, unlock the mutex and signal it.
- template <typename Lock>
- bool maybe_unlock_and_signal_one(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- state_ |= 1;
- if (state_ > 1)
- {
- lock.unlock();
- cond_.notify_one();
- return true;
- }
- return false;
- }
-
- // Reset the event.
- template <typename Lock>
- void clear(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- (void)lock;
- state_ &= ~std::size_t(1);
- }
-
- // Wait for the event to become signalled.
- template <typename Lock>
- void wait(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- unique_lock_adapter u_lock(lock);
- while ((state_ & 1) == 0)
- {
- waiter w(state_);
- cond_.wait(u_lock.unique_lock_);
- }
- }
-
- // Timed wait for the event to become signalled.
- template <typename Lock>
- bool wait_for_usec(Lock& lock, long usec)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- unique_lock_adapter u_lock(lock);
- if ((state_ & 1) == 0)
- {
- waiter w(state_);
- cond_.wait_for(u_lock.unique_lock_, std::chrono::microseconds(usec));
- }
- return (state_ & 1) != 0;
- }
-
-private:
- // Helper class to temporarily adapt a scoped_lock into a unique_lock so that
- // it can be passed to std::condition_variable::wait().
- struct unique_lock_adapter
- {
- template <typename Lock>
- explicit unique_lock_adapter(Lock& lock)
- : unique_lock_(lock.mutex().mutex_, std::adopt_lock)
- {
- }
-
- ~unique_lock_adapter()
- {
- unique_lock_.release();
- }
-
- std::unique_lock<std::mutex> unique_lock_;
- };
-
- // Helper to increment and decrement the state to track outstanding waiters.
- class waiter
- {
- public:
- explicit waiter(std::size_t& state)
- : state_(state)
- {
- state_ += 2;
- }
-
- ~waiter()
- {
- state_ -= 2;
- }
-
- private:
- std::size_t& state_;
- };
-
- std::condition_variable cond_;
- std::size_t state_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
-#endif // BOOST_ASIO_DETAIL_STD_EVENT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp
deleted file mode 100644
index 3993199145c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// detail/std_fenced_block.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_STD_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_STD_FENCED_BLOCK_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_ATOMIC)
-
-#include <atomic>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class std_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit std_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit std_fenced_block(full_t)
- {
- std::atomic_thread_fence(std::memory_order_acquire);
- }
-
- // Destructor.
- ~std_fenced_block()
- {
- std::atomic_thread_fence(std::memory_order_release);
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC)
-
-#endif // BOOST_ASIO_DETAIL_STD_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp
deleted file mode 100644
index f9df646bc65..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// detail/std_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_STD_GLOBAL_HPP
-#define BOOST_ASIO_DETAIL_STD_GLOBAL_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_CALL_ONCE)
-
-#include <exception>
-#include <mutex>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-struct std_global_impl
-{
- // Helper function to perform initialisation.
- static void do_init()
- {
- instance_.ptr_ = new T;
- }
-
- // Destructor automatically cleans up the global.
- ~std_global_impl()
- {
- delete ptr_;
- }
-
- static std::once_flag init_once_;
- static std_global_impl instance_;
- T* ptr_;
-};
-
-template <typename T>
-std::once_flag std_global_impl<T>::init_once_;
-
-template <typename T>
-std_global_impl<T> std_global_impl<T>::instance_;
-
-template <typename T>
-T& std_global()
-{
- std::call_once(std_global_impl<T>::init_once_, &std_global_impl<T>::do_init);
- return *std_global_impl<T>::instance_.ptr_;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
-
-#endif // BOOST_ASIO_DETAIL_STD_GLOBAL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp
deleted file mode 100644
index 463735b92af..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// detail/std_mutex.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_STD_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_STD_MUTEX_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_MUTEX_AND_CONDVAR)
-
-#include <mutex>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class std_event;
-
-class std_mutex
- : private noncopyable
-{
-public:
- typedef boost::asio::detail::scoped_lock<std_mutex> scoped_lock;
-
- // Constructor.
- std_mutex()
- {
- }
-
- // Destructor.
- ~std_mutex()
- {
- }
-
- // Lock the mutex.
- void lock()
- {
- mutex_.lock();
- }
-
- // Unlock the mutex.
- void unlock()
- {
- mutex_.unlock();
- }
-
-private:
- friend class std_event;
- std::mutex mutex_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
-#endif // BOOST_ASIO_DETAIL_STD_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp
deleted file mode 100644
index 16104bcfa6d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// detail/std_static_mutex.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_STD_STATIC_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_STD_STATIC_MUTEX_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_MUTEX_AND_CONDVAR)
-
-#include <mutex>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class std_event;
-
-class std_static_mutex
- : private noncopyable
-{
-public:
- typedef boost::asio::detail::scoped_lock<std_static_mutex> scoped_lock;
-
- // Constructor.
- std_static_mutex(int)
- {
- }
-
- // Destructor.
- ~std_static_mutex()
- {
- }
-
- // Initialise the mutex.
- void init()
- {
- // Nothing to do.
- }
-
- // Lock the mutex.
- void lock()
- {
- mutex_.lock();
- }
-
- // Unlock the mutex.
- void unlock()
- {
- mutex_.unlock();
- }
-
-private:
- friend class std_event;
- std::mutex mutex_;
-};
-
-#define BOOST_ASIO_STD_STATIC_MUTEX_INIT 0
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
-#endif // BOOST_ASIO_DETAIL_STD_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp
deleted file mode 100644
index af507ed32fb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// detail/std_thread.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_STD_THREAD_HPP
-#define BOOST_ASIO_DETAIL_STD_THREAD_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_THREAD)
-
-#include <thread>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class std_thread
- : private noncopyable
-{
-public:
- // Constructor.
- template <typename Function>
- std_thread(Function f, unsigned int = 0)
- : thread_(f)
- {
- }
-
- // Destructor.
- ~std_thread()
- {
- join();
- }
-
- // Wait for the thread to exit.
- void join()
- {
- if (thread_.joinable())
- thread_.join();
- }
-
- // Get number of CPUs.
- static std::size_t hardware_concurrency()
- {
- return std::thread::hardware_concurrency();
- }
-
-private:
- std::thread thread_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_THREAD)
-
-#endif // BOOST_ASIO_DETAIL_STD_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp
deleted file mode 100644
index c3e68408dc2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//
-// detail/strand_executor_service.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_STRAND_EXECUTOR_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_STRAND_EXECUTOR_SERVICE_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/atomic_count.hpp>
-#include <boost/asio/detail/executor_op.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/scheduler_operation.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Default service implementation for a strand.
-class strand_executor_service
- : public execution_context_service_base<strand_executor_service>
-{
-public:
- // The underlying implementation of a strand.
- class strand_impl
- {
- public:
- BOOST_ASIO_DECL ~strand_impl();
-
- private:
- friend class strand_executor_service;
-
- // Mutex to protect access to internal data.
- mutex* mutex_;
-
- // Indicates whether the strand is currently "locked" by a handler. This
- // means that there is a handler upcall in progress, or that the strand
- // itself has been scheduled in order to invoke some pending handlers.
- bool locked_;
-
- // Indicates that the strand has been shut down and will accept no further
- // handlers.
- bool shutdown_;
-
- // The handlers that are waiting on the strand but should not be run until
- // after the next time the strand is scheduled. This queue must only be
- // modified while the mutex is locked.
- op_queue<scheduler_operation> waiting_queue_;
-
- // The handlers that are ready to be run. Logically speaking, these are the
- // handlers that hold the strand's lock. The ready queue is only modified
- // from within the strand and so may be accessed without locking the mutex.
- op_queue<scheduler_operation> ready_queue_;
-
- // Pointers to adjacent handle implementations in linked list.
- strand_impl* next_;
- strand_impl* prev_;
-
- // The strand service in where the implementation is held.
- strand_executor_service* service_;
- };
-
- typedef shared_ptr<strand_impl> implementation_type;
-
- // Construct a new strand service for the specified context.
- BOOST_ASIO_DECL explicit strand_executor_service(execution_context& context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Create a new strand_executor implementation.
- BOOST_ASIO_DECL implementation_type create_implementation();
-
- // Request invocation of the given function.
- template <typename Executor, typename Function, typename Allocator>
- static void dispatch(const implementation_type& impl, Executor& ex,
- BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a);
-
- // Request invocation of the given function and return immediately.
- template <typename Executor, typename Function, typename Allocator>
- static void post(const implementation_type& impl, Executor& ex,
- BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a);
-
- // Request invocation of the given function and return immediately.
- template <typename Executor, typename Function, typename Allocator>
- static void defer(const implementation_type& impl, Executor& ex,
- BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a);
-
- // Determine whether the strand is running in the current thread.
- BOOST_ASIO_DECL static bool running_in_this_thread(
- const implementation_type& impl);
-
-private:
- friend class strand_impl;
- template <typename Executor> class invoker;
-
- // Adds a function to the strand. Returns true if it acquires the lock.
- BOOST_ASIO_DECL static bool enqueue(const implementation_type& impl,
- scheduler_operation* op);
-
- // Mutex to protect access to the service-wide state.
- mutex mutex_;
-
- // Number of mutexes shared between all strand objects.
- enum { num_mutexes = 193 };
-
- // Pool of mutexes.
- scoped_ptr<mutex> mutexes_[num_mutexes];
-
- // Extra value used when hashing to prevent recycled memory locations from
- // getting the same mutex.
- std::size_t salt_;
-
- // The head of a linked list of all implementations.
- strand_impl* impl_list_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/strand_executor_service.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/strand_executor_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_STRAND_EXECUTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp
deleted file mode 100644
index f036264b95b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//
-// detail/strand_service.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_STRAND_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_STRAND_SERVICE_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/io_context.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Default service implementation for a strand.
-class strand_service
- : public boost::asio::detail::service_base<strand_service>
-{
-private:
- // Helper class to re-post the strand on exit.
- struct on_do_complete_exit;
-
- // Helper class to re-post the strand on exit.
- struct on_dispatch_exit;
-
-public:
-
- // The underlying implementation of a strand.
- class strand_impl
- : public operation
- {
- public:
- strand_impl();
-
- private:
- // Only this service will have access to the internal values.
- friend class strand_service;
- friend struct on_do_complete_exit;
- friend struct on_dispatch_exit;
-
- // Mutex to protect access to internal data.
- boost::asio::detail::mutex mutex_;
-
- // Indicates whether the strand is currently "locked" by a handler. This
- // means that there is a handler upcall in progress, or that the strand
- // itself has been scheduled in order to invoke some pending handlers.
- bool locked_;
-
- // The handlers that are waiting on the strand but should not be run until
- // after the next time the strand is scheduled. This queue must only be
- // modified while the mutex is locked.
- op_queue<operation> waiting_queue_;
-
- // The handlers that are ready to be run. Logically speaking, these are the
- // handlers that hold the strand's lock. The ready queue is only modified
- // from within the strand and so may be accessed without locking the mutex.
- op_queue<operation> ready_queue_;
- };
-
- typedef strand_impl* implementation_type;
-
- // Construct a new strand service for the specified io_context.
- BOOST_ASIO_DECL explicit strand_service(boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Construct a new strand implementation.
- BOOST_ASIO_DECL void construct(implementation_type& impl);
-
- // Request the io_context to invoke the given handler.
- template <typename Handler>
- void dispatch(implementation_type& impl, Handler& handler);
-
- // Request the io_context to invoke the given handler and return immediately.
- template <typename Handler>
- void post(implementation_type& impl, Handler& handler);
-
- // Determine whether the strand is running in the current thread.
- BOOST_ASIO_DECL bool running_in_this_thread(
- const implementation_type& impl) const;
-
-private:
- // Helper function to dispatch a handler. Returns true if the handler should
- // be dispatched immediately.
- BOOST_ASIO_DECL bool do_dispatch(implementation_type& impl, operation* op);
-
- // Helper fiunction to post a handler.
- BOOST_ASIO_DECL void do_post(implementation_type& impl,
- operation* op, bool is_continuation);
-
- BOOST_ASIO_DECL static void do_complete(void* owner,
- operation* base, const boost::system::error_code& ec,
- std::size_t bytes_transferred);
-
- // The io_context implementation used to post completions.
- io_context_impl& io_context_;
-
- // Mutex to protect access to the array of implementations.
- boost::asio::detail::mutex mutex_;
-
- // Number of implementations shared between all strand objects.
-#if defined(BOOST_ASIO_STRAND_IMPLEMENTATIONS)
- enum { num_implementations = BOOST_ASIO_STRAND_IMPLEMENTATIONS };
-#else // defined(BOOST_ASIO_STRAND_IMPLEMENTATIONS)
- enum { num_implementations = 193 };
-#endif // defined(BOOST_ASIO_STRAND_IMPLEMENTATIONS)
-
- // Pool of implementations.
- scoped_ptr<strand_impl> implementations_[num_implementations];
-
- // Extra value used when hashing to prevent recycled memory locations from
- // getting the same strand implementation.
- std::size_t salt_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/strand_service.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/strand_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_STRAND_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp
deleted file mode 100644
index f74d730c0b7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// detail/string_view.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_STRING_VIEW_HPP
-#define BOOST_ASIO_DETAIL_STRING_VIEW_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_STRING_VIEW)
-
-#if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
-# include <string_view>
-#elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-# include <experimental/string_view>
-#else // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-# error BOOST_ASIO_HAS_STRING_VIEW is set but no string_view is available
-#endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
-using std::basic_string_view;
-using std::string_view;
-#elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-using std::experimental::basic_string_view;
-using std::experimental::string_view;
-#endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-
-} // namespace asio
-} // namespace boost
-
-# define BOOST_ASIO_STRING_VIEW_PARAM boost::asio::string_view
-#else // defined(BOOST_ASIO_HAS_STRING_VIEW)
-# define BOOST_ASIO_STRING_VIEW_PARAM const std::string&
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-#endif // BOOST_ASIO_DETAIL_STRING_VIEW_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp
deleted file mode 100644
index 41810c64774..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// detail/thread.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_THREAD_HPP
-#define BOOST_ASIO_DETAIL_THREAD_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_THREADS)
-# include <boost/asio/detail/null_thread.hpp>
-#elif defined(BOOST_ASIO_WINDOWS)
-# if defined(UNDER_CE)
-# include <boost/asio/detail/wince_thread.hpp>
-# elif defined(BOOST_ASIO_WINDOWS_APP)
-# include <boost/asio/detail/winapp_thread.hpp>
-# else
-# include <boost/asio/detail/win_thread.hpp>
-# endif
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_thread.hpp>
-#elif defined(BOOST_ASIO_HAS_STD_THREAD)
-# include <boost/asio/detail/std_thread.hpp>
-#else
-# error Only Windows, POSIX and std::thread are supported!
-#endif
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if !defined(BOOST_ASIO_HAS_THREADS)
-typedef null_thread thread;
-#elif defined(BOOST_ASIO_WINDOWS)
-# if defined(UNDER_CE)
-typedef wince_thread thread;
-# elif defined(BOOST_ASIO_WINDOWS_APP)
-typedef winapp_thread thread;
-# else
-typedef win_thread thread;
-# endif
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-typedef posix_thread thread;
-#elif defined(BOOST_ASIO_HAS_STD_THREAD)
-typedef std_thread thread;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp
deleted file mode 100644
index b4a2435f0fc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// detail/thread_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_DETAIL_THREAD_CONTEXT_HPP
-#define BOOST_ASIO_DETAIL_THREAD_CONTEXT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <climits>
-#include <cstddef>
-#include <boost/asio/detail/call_stack.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class thread_info_base;
-
-// Base class for things that manage threads (scheduler, win_iocp_io_context).
-class thread_context
-{
-public:
- // Per-thread call stack to track the state of each thread in the context.
- typedef call_stack<thread_context, thread_info_base> thread_call_stack;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_THREAD_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp
deleted file mode 100644
index c9c194142ff..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// detail/thread_group.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_THREAD_GROUP_HPP
-#define BOOST_ASIO_DETAIL_THREAD_GROUP_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/scoped_ptr.hpp>
-#include <boost/asio/detail/thread.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class thread_group
-{
-public:
- // Constructor initialises an empty thread group.
- thread_group()
- : first_(0)
- {
- }
-
- // Destructor joins any remaining threads in the group.
- ~thread_group()
- {
- join();
- }
-
- // Create a new thread in the group.
- template <typename Function>
- void create_thread(Function f)
- {
- first_ = new item(f, first_);
- }
-
- // Create new threads in the group.
- template <typename Function>
- void create_threads(Function f, std::size_t num_threads)
- {
- for (std::size_t i = 0; i < num_threads; ++i)
- create_thread(f);
- }
-
- // Wait for all threads in the group to exit.
- void join()
- {
- while (first_)
- {
- first_->thread_.join();
- item* tmp = first_;
- first_ = first_->next_;
- delete tmp;
- }
- }
-
-private:
- // Structure used to track a single thread in the group.
- struct item
- {
- template <typename Function>
- explicit item(Function f, item* next)
- : thread_(f),
- next_(next)
- {
- }
-
- boost::asio::detail::thread thread_;
- item* next_;
- };
-
- // The first thread in the group.
- item* first_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_THREAD_GROUP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp
deleted file mode 100644
index 16bb1787f34..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// detail/thread_info_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_DETAIL_THREAD_INFO_BASE_HPP
-#define BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <climits>
-#include <cstddef>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class thread_info_base
- : private noncopyable
-{
-public:
- struct default_tag
- {
- enum { mem_index = 0 };
- };
-
- struct awaitee_tag
- {
- enum { mem_index = 1 };
- };
-
- thread_info_base()
- {
- for (int i = 0; i < max_mem_index; ++i)
- reusable_memory_[i] = 0;
- }
-
- ~thread_info_base()
- {
- for (int i = 0; i < max_mem_index; ++i)
- if (reusable_memory_[i])
- ::operator delete(reusable_memory_[i]);
- }
-
- static void* allocate(thread_info_base* this_thread, std::size_t size)
- {
- return allocate(default_tag(), this_thread, size);
- }
-
- static void deallocate(thread_info_base* this_thread,
- void* pointer, std::size_t size)
- {
- deallocate(default_tag(), this_thread, pointer, size);
- }
-
- template <typename Purpose>
- static void* allocate(Purpose, thread_info_base* this_thread,
- std::size_t size)
- {
- std::size_t chunks = (size + chunk_size - 1) / chunk_size;
-
- if (this_thread && this_thread->reusable_memory_[Purpose::mem_index])
- {
- void* const pointer = this_thread->reusable_memory_[Purpose::mem_index];
- this_thread->reusable_memory_[Purpose::mem_index] = 0;
-
- unsigned char* const mem = static_cast<unsigned char*>(pointer);
- if (static_cast<std::size_t>(mem[0]) >= chunks)
- {
- mem[size] = mem[0];
- return pointer;
- }
-
- ::operator delete(pointer);
- }
-
- void* const pointer = ::operator new(chunks * chunk_size + 1);
- unsigned char* const mem = static_cast<unsigned char*>(pointer);
- mem[size] = (chunks <= UCHAR_MAX) ? static_cast<unsigned char>(chunks) : 0;
- return pointer;
- }
-
- template <typename Purpose>
- static void deallocate(Purpose, thread_info_base* this_thread,
- void* pointer, std::size_t size)
- {
- if (size <= chunk_size * UCHAR_MAX)
- {
- if (this_thread && this_thread->reusable_memory_[Purpose::mem_index] == 0)
- {
- unsigned char* const mem = static_cast<unsigned char*>(pointer);
- mem[0] = mem[size];
- this_thread->reusable_memory_[Purpose::mem_index] = pointer;
- return;
- }
- }
-
- ::operator delete(pointer);
- }
-
-private:
- enum { chunk_size = 4 };
- enum { max_mem_index = 2 };
- void* reusable_memory_[max_mem_index];
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp
deleted file mode 100644
index c1775b25362..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// detail/throw_error.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_THROW_ERROR_HPP
-#define BOOST_ASIO_DETAIL_THROW_ERROR_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/system/error_code.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-BOOST_ASIO_DECL void do_throw_error(const boost::system::error_code& err);
-
-BOOST_ASIO_DECL void do_throw_error(const boost::system::error_code& err,
- const char* location);
-
-inline void throw_error(const boost::system::error_code& err)
-{
- if (err)
- do_throw_error(err);
-}
-
-inline void throw_error(const boost::system::error_code& err,
- const char* location)
-{
- if (err)
- do_throw_error(err, location);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/throw_error.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_THROW_ERROR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp
deleted file mode 100644
index 8690fa6f638..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// detail/throw_exception.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_THROW_EXCEPTION_HPP
-#define BOOST_ASIO_DETAIL_THROW_EXCEPTION_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_BOOST_THROW_EXCEPTION)
-# include <boost/throw_exception.hpp>
-#endif // defined(BOOST_ASIO_BOOST_THROW_EXCEPTION)
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
-using boost::throw_exception;
-#else // defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
-
-// Declare the throw_exception function for all targets.
-template <typename Exception>
-void throw_exception(const Exception& e);
-
-// Only define the throw_exception function when exceptions are enabled.
-// Otherwise, it is up to the application to provide a definition of this
-// function.
-# if !defined(BOOST_ASIO_NO_EXCEPTIONS)
-template <typename Exception>
-void throw_exception(const Exception& e)
-{
- throw e;
-}
-# endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // 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
deleted file mode 100644
index 3b2bcff7744..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue.hpp
+++ /dev/null
@@ -1,362 +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)
- {
- 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.69.0/boost/asio/detail/timer_queue_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_base.hpp
deleted file mode 100644
index f3a14238aa6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_base.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// detail/timer_queue_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_DETAIL_TIMER_QUEUE_BASE_HPP
-#define BOOST_ASIO_DETAIL_TIMER_QUEUE_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/detail/noncopyable.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class timer_queue_base
- : private noncopyable
-{
-public:
- // Constructor.
- timer_queue_base() : next_(0) {}
-
- // Destructor.
- virtual ~timer_queue_base() {}
-
- // Whether there are no timers in the queue.
- virtual bool empty() const = 0;
-
- // Get the time to wait until the next timer.
- virtual long wait_duration_msec(long max_duration) const = 0;
-
- // Get the time to wait until the next timer.
- virtual long wait_duration_usec(long max_duration) const = 0;
-
- // Dequeue all ready timers.
- virtual void get_ready_timers(op_queue<operation>& ops) = 0;
-
- // Dequeue all timers.
- virtual void get_all_timers(op_queue<operation>& ops) = 0;
-
-private:
- friend class timer_queue_set;
-
- // Next timer queue in the set.
- timer_queue_base* next_;
-};
-
-template <typename Time_Traits>
-class timer_queue;
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp
deleted file mode 100644
index cc053bff9da..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// detail/timer_queue_ptime.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_PTIME_HPP
-#define BOOST_ASIO_DETAIL_TIMER_QUEUE_PTIME_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_BOOST_DATE_TIME)
-
-#include <boost/asio/time_traits.hpp>
-#include <boost/asio/detail/timer_queue.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct forwarding_posix_time_traits : time_traits<boost::posix_time::ptime> {};
-
-// Template specialisation for the commonly used instantation.
-template <>
-class timer_queue<time_traits<boost::posix_time::ptime> >
- : public timer_queue_base
-{
-public:
- // The time type.
- typedef boost::posix_time::ptime time_type;
-
- // The duration type.
- typedef boost::posix_time::time_duration duration_type;
-
- // Per-timer data.
- typedef timer_queue<forwarding_posix_time_traits>::per_timer_data
- per_timer_data;
-
- // Constructor.
- BOOST_ASIO_DECL timer_queue();
-
- // Destructor.
- BOOST_ASIO_DECL virtual ~timer_queue();
-
- // 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.
- BOOST_ASIO_DECL bool enqueue_timer(const time_type& time,
- per_timer_data& timer, wait_op* op);
-
- // Whether there are no timers in the queue.
- BOOST_ASIO_DECL virtual bool empty() const;
-
- // Get the time for the timer that is earliest in the queue.
- BOOST_ASIO_DECL virtual long wait_duration_msec(long max_duration) const;
-
- // Get the time for the timer that is earliest in the queue.
- BOOST_ASIO_DECL virtual long wait_duration_usec(long max_duration) const;
-
- // Dequeue all timers not later than the current time.
- BOOST_ASIO_DECL virtual void get_ready_timers(op_queue<operation>& ops);
-
- // Dequeue all timers.
- BOOST_ASIO_DECL virtual void get_all_timers(op_queue<operation>& ops);
-
- // Cancel and dequeue operations for the given timer.
- BOOST_ASIO_DECL 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)());
-
- // Move operations from one timer to another, empty timer.
- BOOST_ASIO_DECL void move_timer(per_timer_data& target,
- per_timer_data& source);
-
-private:
- timer_queue<forwarding_posix_time_traits> impl_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/timer_queue_ptime.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_PTIME_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp
deleted file mode 100644
index 2bed122fc2f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// detail/timer_queue_set.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_SET_HPP
-#define BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_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/timer_queue_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class timer_queue_set
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL timer_queue_set();
-
- // Add a timer queue to the set.
- BOOST_ASIO_DECL void insert(timer_queue_base* q);
-
- // Remove a timer queue from the set.
- BOOST_ASIO_DECL void erase(timer_queue_base* q);
-
- // Determine whether all queues are empty.
- BOOST_ASIO_DECL bool all_empty() const;
-
- // Get the wait duration in milliseconds.
- BOOST_ASIO_DECL long wait_duration_msec(long max_duration) const;
-
- // Get the wait duration in microseconds.
- BOOST_ASIO_DECL long wait_duration_usec(long max_duration) const;
-
- // Dequeue all ready timers.
- BOOST_ASIO_DECL void get_ready_timers(op_queue<operation>& ops);
-
- // Dequeue all timers.
- BOOST_ASIO_DECL void get_all_timers(op_queue<operation>& ops);
-
-private:
- timer_queue_base* first_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/timer_queue_set.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp
deleted file mode 100644
index dc6e8d890c6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// detail/timer_scheduler.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_SCHEDULER_HPP
-#define BOOST_ASIO_DETAIL_TIMER_SCHEDULER_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/timer_scheduler_fwd.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_timer_scheduler.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_io_context.hpp>
-#elif defined(BOOST_ASIO_HAS_EPOLL)
-# include <boost/asio/detail/epoll_reactor.hpp>
-#elif defined(BOOST_ASIO_HAS_KQUEUE)
-# include <boost/asio/detail/kqueue_reactor.hpp>
-#elif defined(BOOST_ASIO_HAS_DEV_POLL)
-# include <boost/asio/detail/dev_poll_reactor.hpp>
-#else
-# include <boost/asio/detail/select_reactor.hpp>
-#endif
-
-#endif // BOOST_ASIO_DETAIL_TIMER_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp
deleted file mode 100644
index c3656c66a03..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// detail/timer_scheduler_fwd.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_SCHEDULER_FWD_HPP
-#define BOOST_ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-typedef class winrt_timer_scheduler timer_scheduler;
-#elif defined(BOOST_ASIO_HAS_IOCP)
-typedef class win_iocp_io_context timer_scheduler;
-#elif defined(BOOST_ASIO_HAS_EPOLL)
-typedef class epoll_reactor timer_scheduler;
-#elif defined(BOOST_ASIO_HAS_KQUEUE)
-typedef class kqueue_reactor timer_scheduler;
-#elif defined(BOOST_ASIO_HAS_DEV_POLL)
-typedef class dev_poll_reactor timer_scheduler;
-#else
-typedef class select_reactor timer_scheduler;
-#endif
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp
deleted file mode 100644
index 7850718a3c8..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// detail/tss_ptr.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_TSS_PTR_HPP
-#define BOOST_ASIO_DETAIL_TSS_PTR_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_THREADS)
-# include <boost/asio/detail/null_tss_ptr.hpp>
-#elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
-# include <boost/asio/detail/keyword_tss_ptr.hpp>
-#elif defined(BOOST_ASIO_WINDOWS)
-# include <boost/asio/detail/win_tss_ptr.hpp>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
-# include <boost/asio/detail/posix_tss_ptr.hpp>
-#else
-# error Only Windows and POSIX are supported!
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-class tss_ptr
-#if !defined(BOOST_ASIO_HAS_THREADS)
- : public null_tss_ptr<T>
-#elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
- : public keyword_tss_ptr<T>
-#elif defined(BOOST_ASIO_WINDOWS)
- : public win_tss_ptr<T>
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
- : public posix_tss_ptr<T>
-#endif
-{
-public:
- void operator=(T* value)
- {
-#if !defined(BOOST_ASIO_HAS_THREADS)
- null_tss_ptr<T>::operator=(value);
-#elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
- keyword_tss_ptr<T>::operator=(value);
-#elif defined(BOOST_ASIO_WINDOWS)
- win_tss_ptr<T>::operator=(value);
-#elif defined(BOOST_ASIO_HAS_PTHREADS)
- posix_tss_ptr<T>::operator=(value);
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp
deleted file mode 100644
index a0d4cb49027..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// detail/type_traits.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_TYPE_TRAITS_HPP
-#define BOOST_ASIO_DETAIL_TYPE_TRAITS_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_TYPE_TRAITS)
-# include <type_traits>
-#else // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
-# include <boost/type_traits/add_const.hpp>
-# include <boost/type_traits/conditional.hpp>
-# include <boost/type_traits/decay.hpp>
-# include <boost/type_traits/integral_constant.hpp>
-# include <boost/type_traits/is_base_of.hpp>
-# include <boost/type_traits/is_class.hpp>
-# include <boost/type_traits/is_const.hpp>
-# include <boost/type_traits/is_convertible.hpp>
-# include <boost/type_traits/is_function.hpp>
-# include <boost/type_traits/is_same.hpp>
-# include <boost/type_traits/remove_pointer.hpp>
-# include <boost/type_traits/remove_reference.hpp>
-# include <boost/utility/enable_if.hpp>
-# include <boost/utility/result_of.hpp>
-#endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
-using std::add_const;
-using std::conditional;
-using std::decay;
-using std::enable_if;
-using std::false_type;
-using std::integral_constant;
-using std::is_base_of;
-using std::is_class;
-using std::is_const;
-using std::is_convertible;
-using std::is_function;
-using std::is_same;
-using std::remove_pointer;
-using std::remove_reference;
-#if defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
-template <typename> struct result_of;
-template <typename F, typename... Args>
-struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
-#else // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
-using std::result_of;
-#endif // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
-using std::true_type;
-#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
-using boost::add_const;
-template <bool Condition, typename Type = void>
-struct enable_if : boost::enable_if_c<Condition, Type> {};
-using boost::conditional;
-using boost::decay;
-using boost::false_type;
-using boost::integral_constant;
-using boost::is_base_of;
-using boost::is_class;
-using boost::is_const;
-using boost::is_convertible;
-using boost::is_function;
-using boost::is_same;
-using boost::remove_pointer;
-using boost::remove_reference;
-using boost::result_of;
-using boost::true_type;
-#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp
deleted file mode 100644
index c358feec189..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// detail/variadic_templates.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_VARIADIC_TEMPLATES_HPP
-#define BOOST_ASIO_DETAIL_VARIADIC_TEMPLATES_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_VARIADIC_TEMPLATES)
-
-# define BOOST_ASIO_VARIADIC_TPARAMS(n) BOOST_ASIO_VARIADIC_TPARAMS_##n
-
-# define BOOST_ASIO_VARIADIC_TPARAMS_1 \
- typename T1
-# define BOOST_ASIO_VARIADIC_TPARAMS_2 \
- typename T1, typename T2
-# define BOOST_ASIO_VARIADIC_TPARAMS_3 \
- typename T1, typename T2, typename T3
-# define BOOST_ASIO_VARIADIC_TPARAMS_4 \
- typename T1, typename T2, typename T3, typename T4
-# define BOOST_ASIO_VARIADIC_TPARAMS_5 \
- typename T1, typename T2, typename T3, typename T4, typename T5
-
-# define BOOST_ASIO_VARIADIC_TARGS(n) BOOST_ASIO_VARIADIC_TARGS_##n
-
-# define BOOST_ASIO_VARIADIC_TARGS_1 T1
-# define BOOST_ASIO_VARIADIC_TARGS_2 T1, T2
-# define BOOST_ASIO_VARIADIC_TARGS_3 T1, T2, T3
-# define BOOST_ASIO_VARIADIC_TARGS_4 T1, T2, T3, T4
-# define BOOST_ASIO_VARIADIC_TARGS_5 T1, T2, T3, T4, T5
-
-# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n) \
- BOOST_ASIO_VARIADIC_BYVAL_PARAMS_##n
-
-# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_1 T1 x1
-# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_2 T1 x1, T2 x2
-# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_3 T1 x1, T2 x2, T3 x3
-# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_4 T1 x1, T2 x2, T3 x3, T4 x4
-# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_5 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5
-
-# define BOOST_ASIO_VARIADIC_BYVAL_ARGS(n) \
- BOOST_ASIO_VARIADIC_BYVAL_ARGS_##n
-
-# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_1 x1
-# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_2 x1, x2
-# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_3 x1, x2, x3
-# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_4 x1, x2, x3, x4
-# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_5 x1, x2, x3, x4, x5
-
-# define BOOST_ASIO_VARIADIC_MOVE_PARAMS(n) \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS_##n
-
-# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_1 \
- BOOST_ASIO_MOVE_ARG(T1) x1
-# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_2 \
- BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2
-# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_3 \
- BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2, \
- BOOST_ASIO_MOVE_ARG(T3) x3
-# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_4 \
- BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2, \
- BOOST_ASIO_MOVE_ARG(T3) x3, BOOST_ASIO_MOVE_ARG(T4) x4
-# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_5 \
- BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2, \
- BOOST_ASIO_MOVE_ARG(T3) x3, BOOST_ASIO_MOVE_ARG(T4) x4, \
- BOOST_ASIO_MOVE_ARG(T5) x5
-
-# define BOOST_ASIO_VARIADIC_MOVE_ARGS(n) \
- BOOST_ASIO_VARIADIC_MOVE_ARGS_##n
-
-# define BOOST_ASIO_VARIADIC_MOVE_ARGS_1 \
- BOOST_ASIO_MOVE_CAST(T1)(x1)
-# define BOOST_ASIO_VARIADIC_MOVE_ARGS_2 \
- BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2)
-# define BOOST_ASIO_VARIADIC_MOVE_ARGS_3 \
- BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2), \
- BOOST_ASIO_MOVE_CAST(T3)(x3)
-# define BOOST_ASIO_VARIADIC_MOVE_ARGS_4 \
- BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2), \
- BOOST_ASIO_MOVE_CAST(T3)(x3), BOOST_ASIO_MOVE_CAST(T4)(x4)
-# define BOOST_ASIO_VARIADIC_MOVE_ARGS_5 \
- BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2), \
- BOOST_ASIO_MOVE_CAST(T3)(x3), BOOST_ASIO_MOVE_CAST(T4)(x4), \
- BOOST_ASIO_MOVE_CAST(T5)(x5)
-
-# define BOOST_ASIO_VARIADIC_DECAY(n) \
- BOOST_ASIO_VARIADIC_DECAY_##n
-
-# define BOOST_ASIO_VARIADIC_DECAY_1 \
- typename decay<T1>::type
-# define BOOST_ASIO_VARIADIC_DECAY_2 \
- typename decay<T1>::type, typename decay<T2>::type
-# define BOOST_ASIO_VARIADIC_DECAY_3 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type
-# define BOOST_ASIO_VARIADIC_DECAY_4 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type
-# define BOOST_ASIO_VARIADIC_DECAY_5 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type, \
- typename decay<T5>::type
-
-# define BOOST_ASIO_VARIADIC_GENERATE(m) m(1) m(2) m(3) m(4) m(5)
-
-#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // BOOST_ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp
deleted file mode 100644
index a9341244f80..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// detail/wait_handler.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_WAIT_HANDLER_HPP
-#define BOOST_ASIO_DETAIL_WAIT_HANDLER_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/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class wait_handler : public wait_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(wait_handler);
-
- wait_handler(Handler& h)
- : wait_op(&wait_handler::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(h))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- wait_handler* h(static_cast<wait_handler*>(base));
- ptr p = { boost::asio::detail::addressof(h->handler_), h, h };
- handler_work<Handler> w(h->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*h));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(h->handler_, h->ec_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WAIT_HANDLER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp
deleted file mode 100644
index 3a95a375801..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// detail/wait_op.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_WAIT_OP_HPP
-#define BOOST_ASIO_DETAIL_WAIT_OP_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/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class wait_op
- : public operation
-{
-public:
- // The error code to be passed to the completion handler.
- boost::system::error_code ec_;
-
-protected:
- wait_op(func_type func)
- : operation(func)
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WAIT_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp
deleted file mode 100644
index 67edbcfb896..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp
+++ /dev/null
@@ -1,153 +0,0 @@
-//
-// detail/win_event.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_EVENT_HPP
-#define BOOST_ASIO_DETAIL_WIN_EVENT_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_WINDOWS)
-
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_event
- : private noncopyable
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL win_event();
-
- // Destructor.
- BOOST_ASIO_DECL ~win_event();
-
- // Signal the event. (Retained for backward compatibility.)
- template <typename Lock>
- void signal(Lock& lock)
- {
- this->signal_all(lock);
- }
-
- // Signal all waiters.
- template <typename Lock>
- void signal_all(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- (void)lock;
- state_ |= 1;
- ::SetEvent(events_[0]);
- }
-
- // Unlock the mutex and signal one waiter.
- template <typename Lock>
- void unlock_and_signal_one(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- state_ |= 1;
- bool have_waiters = (state_ > 1);
- lock.unlock();
- if (have_waiters)
- ::SetEvent(events_[1]);
- }
-
- // If there's a waiter, unlock the mutex and signal it.
- template <typename Lock>
- bool maybe_unlock_and_signal_one(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- state_ |= 1;
- if (state_ > 1)
- {
- lock.unlock();
- ::SetEvent(events_[1]);
- return true;
- }
- return false;
- }
-
- // Reset the event.
- template <typename Lock>
- void clear(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- (void)lock;
- ::ResetEvent(events_[0]);
- state_ &= ~std::size_t(1);
- }
-
- // Wait for the event to become signalled.
- template <typename Lock>
- void wait(Lock& lock)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- while ((state_ & 1) == 0)
- {
- state_ += 2;
- lock.unlock();
-#if defined(BOOST_ASIO_WINDOWS_APP)
- ::WaitForMultipleObjectsEx(2, events_, false, INFINITE, false);
-#else // defined(BOOST_ASIO_WINDOWS_APP)
- ::WaitForMultipleObjects(2, events_, false, INFINITE);
-#endif // defined(BOOST_ASIO_WINDOWS_APP)
- lock.lock();
- state_ -= 2;
- }
- }
-
- // Timed wait for the event to become signalled.
- template <typename Lock>
- bool wait_for_usec(Lock& lock, long usec)
- {
- BOOST_ASIO_ASSERT(lock.locked());
- if ((state_ & 1) == 0)
- {
- state_ += 2;
- lock.unlock();
- DWORD msec = usec > 0 ? (usec < 1000 ? 1 : usec / 1000) : 0;
-#if defined(BOOST_ASIO_WINDOWS_APP)
- ::WaitForMultipleObjectsEx(2, events_, false, msec, false);
-#else // defined(BOOST_ASIO_WINDOWS_APP)
- ::WaitForMultipleObjects(2, events_, false, msec);
-#endif // defined(BOOST_ASIO_WINDOWS_APP)
- lock.lock();
- state_ -= 2;
- }
- return (state_ & 1) != 0;
- }
-
-private:
- HANDLE events_[2];
- std::size_t state_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_event.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_WIN_EVENT_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index bdddb32a9d1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_fd_set_adapter.hpp
+++ /dev/null
@@ -1,151 +0,0 @@
-//
-// detail/win_fd_set_adapter.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_FD_SET_ADAPTER_HPP
-#define BOOST_ASIO_DETAIL_WIN_FD_SET_ADAPTER_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_WINDOWS) || defined(__CYGWIN__)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/reactor_op_queue.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Adapts the FD_SET type to meet the Descriptor_Set concept's requirements.
-class win_fd_set_adapter : noncopyable
-{
-public:
- enum { default_fd_set_size = 1024 };
-
- win_fd_set_adapter()
- : capacity_(default_fd_set_size),
- max_descriptor_(invalid_socket)
- {
- fd_set_ = static_cast<win_fd_set*>(::operator new(
- sizeof(win_fd_set) - sizeof(SOCKET)
- + sizeof(SOCKET) * (capacity_)));
- fd_set_->fd_count = 0;
- }
-
- ~win_fd_set_adapter()
- {
- ::operator delete(fd_set_);
- }
-
- void reset()
- {
- fd_set_->fd_count = 0;
- max_descriptor_ = invalid_socket;
- }
-
- bool set(socket_type descriptor)
- {
- for (u_int i = 0; i < fd_set_->fd_count; ++i)
- if (fd_set_->fd_array[i] == descriptor)
- return true;
-
- reserve(fd_set_->fd_count + 1);
- fd_set_->fd_array[fd_set_->fd_count++] = descriptor;
- return true;
- }
-
- void set(reactor_op_queue<socket_type>& operations, op_queue<operation>&)
- {
- reactor_op_queue<socket_type>::iterator i = operations.begin();
- while (i != operations.end())
- {
- reactor_op_queue<socket_type>::iterator op_iter = i++;
- reserve(fd_set_->fd_count + 1);
- fd_set_->fd_array[fd_set_->fd_count++] = op_iter->first;
- }
- }
-
- bool is_set(socket_type descriptor) const
- {
- return !!__WSAFDIsSet(descriptor,
- const_cast<fd_set*>(reinterpret_cast<const fd_set*>(fd_set_)));
- }
-
- operator fd_set*()
- {
- return reinterpret_cast<fd_set*>(fd_set_);
- }
-
- socket_type max_descriptor() const
- {
- return max_descriptor_;
- }
-
- void perform(reactor_op_queue<socket_type>& operations,
- op_queue<operation>& ops) const
- {
- for (u_int i = 0; i < fd_set_->fd_count; ++i)
- operations.perform_operations(fd_set_->fd_array[i], ops);
- }
-
-private:
- // This structure is defined to be compatible with the Windows API fd_set
- // structure, but without being dependent on the value of FD_SETSIZE. We use
- // the "struct hack" to allow the number of descriptors to be varied at
- // runtime.
- struct win_fd_set
- {
- u_int fd_count;
- SOCKET fd_array[1];
- };
-
- // Increase the fd_set_ capacity to at least the specified number of elements.
- void reserve(u_int n)
- {
- if (n <= capacity_)
- return;
-
- u_int new_capacity = capacity_ + capacity_ / 2;
- if (new_capacity < n)
- new_capacity = n;
-
- win_fd_set* new_fd_set = static_cast<win_fd_set*>(::operator new(
- sizeof(win_fd_set) - sizeof(SOCKET)
- + sizeof(SOCKET) * (new_capacity)));
-
- new_fd_set->fd_count = fd_set_->fd_count;
- for (u_int i = 0; i < fd_set_->fd_count; ++i)
- new_fd_set->fd_array[i] = fd_set_->fd_array[i];
-
- ::operator delete(fd_set_);
- fd_set_ = new_fd_set;
- capacity_ = new_capacity;
- }
-
- win_fd_set* fd_set_;
- u_int capacity_;
- socket_type max_descriptor_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_WIN_FD_SET_ADAPTER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp
deleted file mode 100644
index c595eaa00f7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// detail/win_fenced_block.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_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_WIN_FENCED_BLOCK_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_WINDOWS) && !defined(UNDER_CE)
-
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit win_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit win_fenced_block(full_t)
- {
-#if defined(__BORLANDC__)
- LONG barrier = 0;
- ::InterlockedExchange(&barrier, 1);
-#elif defined(BOOST_ASIO_MSVC) \
- && ((BOOST_ASIO_MSVC < 1400) || !defined(MemoryBarrier))
-# if defined(_M_IX86)
-# pragma warning(push)
-# pragma warning(disable:4793)
- LONG barrier;
- __asm { xchg barrier, eax }
-# pragma warning(pop)
-# endif // defined(_M_IX86)
-#else
- MemoryBarrier();
-#endif
- }
-
- // Destructor.
- ~win_fenced_block()
- {
-#if defined(__BORLANDC__)
- LONG barrier = 0;
- ::InterlockedExchange(&barrier, 1);
-#elif defined(BOOST_ASIO_MSVC) \
- && ((BOOST_ASIO_MSVC < 1400) || !defined(MemoryBarrier))
-# if defined(_M_IX86)
-# pragma warning(push)
-# pragma warning(disable:4793)
- LONG barrier;
- __asm { xchg barrier, eax }
-# pragma warning(pop)
-# endif // defined(_M_IX86)
-#else
- MemoryBarrier();
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
-
-#endif // 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
deleted file mode 100644
index 11204dec6d2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_global.hpp
+++ /dev/null
@@ -1,76 +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_);
- 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.69.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
deleted file mode 100644
index 842ed80b736..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_read_op.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// detail/win_iocp_handle_read_op.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_HANDLE_READ_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_READ_OP_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_IOCP)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence, typename Handler>
-class win_iocp_handle_read_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_read_op);
-
- win_iocp_handle_read_op(
- const MutableBufferSequence& buffers, Handler& handler)
- : operation(&win_iocp_handle_read_op::do_complete),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t bytes_transferred)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_handle_read_op* o(static_cast<win_iocp_handle_read_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- if (owner)
- {
- // Check whether buffers are still valid.
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_HANDLE_EOF)
- ec = boost::asio::error::eof;
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- MutableBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_READ_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 4d5aadeef56..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_service.hpp
+++ /dev/null
@@ -1,325 +0,0 @@
-//
-// detail/win_iocp_handle_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_HANDLE_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_SERVICE_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_IOCP)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/win_iocp_handle_read_op.hpp>
-#include <boost/asio/detail/win_iocp_handle_write_op.hpp>
-#include <boost/asio/detail/win_iocp_io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_iocp_handle_service :
- public service_base<win_iocp_handle_service>
-{
-public:
- // The native type of a stream handle.
- typedef HANDLE native_handle_type;
-
- // The implementation type of the stream handle.
- class implementation_type
- {
- public:
- // Default constructor.
- implementation_type()
- : handle_(INVALID_HANDLE_VALUE),
- safe_cancellation_thread_id_(0),
- next_(0),
- prev_(0)
- {
- }
-
- private:
- // Only this service will have access to the internal values.
- friend class win_iocp_handle_service;
-
- // The native stream handle representation.
- native_handle_type handle_;
-
- // The ID of the thread from which it is safe to cancel asynchronous
- // operations. 0 means no asynchronous operations have been started yet.
- // ~0 means asynchronous operations have been started from more than one
- // thread, and cancellation is not supported for the handle.
- DWORD safe_cancellation_thread_id_;
-
- // Pointers to adjacent handle implementations in linked list.
- implementation_type* next_;
- implementation_type* prev_;
- };
-
- BOOST_ASIO_DECL win_iocp_handle_service(boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Construct a new handle implementation.
- BOOST_ASIO_DECL void construct(implementation_type& impl);
-
- // Move-construct a new handle implementation.
- BOOST_ASIO_DECL void move_construct(implementation_type& impl,
- implementation_type& other_impl);
-
- // Move-assign from another handle implementation.
- BOOST_ASIO_DECL void move_assign(implementation_type& impl,
- win_iocp_handle_service& other_service,
- implementation_type& other_impl);
-
- // Destroy a handle implementation.
- BOOST_ASIO_DECL void destroy(implementation_type& impl);
-
- // Assign a native handle to a handle implementation.
- BOOST_ASIO_DECL boost::system::error_code assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec);
-
- // Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return impl.handle_ != INVALID_HANDLE_VALUE;
- }
-
- // Destroy a handle implementation.
- BOOST_ASIO_DECL boost::system::error_code close(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Get the native handle representation.
- native_handle_type native_handle(const implementation_type& impl) const
- {
- return impl.handle_;
- }
-
- // Cancel all operations associated with the handle.
- BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Write the given data. Returns the number of bytes written.
- template <typename ConstBufferSequence>
- size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return write_some_at(impl, 0, buffers, ec);
- }
-
- // Write the given data at the specified offset. Returns the number of bytes
- // written.
- template <typename ConstBufferSequence>
- size_t write_some_at(implementation_type& impl, uint64_t offset,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- boost::asio::const_buffer buffer =
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::first(buffers);
-
- return do_write(impl, offset, buffer, ec);
- }
-
- // Start an asynchronous write. The data being written must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_write_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
- reinterpret_cast<uintmax_t>(impl.handle_), "async_write_some"));
-
- start_write_op(impl, 0,
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::first(buffers), p.p);
- p.v = p.p = 0;
- }
-
- // Start an asynchronous write at a specified offset. The data being written
- // must be valid for the lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_write_some_at(implementation_type& impl, uint64_t offset,
- const ConstBufferSequence& buffers, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_write_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
- reinterpret_cast<uintmax_t>(impl.handle_), "async_write_some_at"));
-
- start_write_op(impl, offset,
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::first(buffers), p.p);
- p.v = p.p = 0;
- }
-
- // Read some data. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return read_some_at(impl, 0, buffers, ec);
- }
-
- // Read some data at a specified offset. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- size_t read_some_at(implementation_type& impl, uint64_t offset,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- boost::asio::mutable_buffer buffer =
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::first(buffers);
-
- return do_read(impl, offset, buffer, ec);
- }
-
- // Start an asynchronous read. The buffer for the data being received must be
- // valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_read_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
- reinterpret_cast<uintmax_t>(impl.handle_), "async_read_some"));
-
- start_read_op(impl, 0,
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::first(buffers), p.p);
- p.v = p.p = 0;
- }
-
- // Start an asynchronous read at a specified offset. The buffer for the data
- // being received must be valid for the lifetime of the asynchronous
- // operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_read_some_at(implementation_type& impl, uint64_t offset,
- const MutableBufferSequence& buffers, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_read_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
- reinterpret_cast<uintmax_t>(impl.handle_), "async_read_some_at"));
-
- start_read_op(impl, offset,
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::first(buffers), p.p);
- p.v = p.p = 0;
- }
-
-private:
- // Prevent the use of the null_buffers type with this service.
- size_t write_some(implementation_type& impl,
- const null_buffers& buffers, boost::system::error_code& ec);
- size_t write_some_at(implementation_type& impl, uint64_t offset,
- const null_buffers& buffers, boost::system::error_code& ec);
- template <typename Handler>
- void async_write_some(implementation_type& impl,
- const null_buffers& buffers, Handler& handler);
- template <typename Handler>
- void async_write_some_at(implementation_type& impl, uint64_t offset,
- const null_buffers& buffers, Handler& handler);
- size_t read_some(implementation_type& impl,
- const null_buffers& buffers, boost::system::error_code& ec);
- size_t read_some_at(implementation_type& impl, uint64_t offset,
- const null_buffers& buffers, boost::system::error_code& ec);
- template <typename Handler>
- void async_read_some(implementation_type& impl,
- const null_buffers& buffers, Handler& handler);
- template <typename Handler>
- void async_read_some_at(implementation_type& impl, uint64_t offset,
- const null_buffers& buffers, Handler& handler);
-
- // Helper class for waiting for synchronous operations to complete.
- class overlapped_wrapper;
-
- // Helper function to perform a synchronous write operation.
- BOOST_ASIO_DECL size_t do_write(implementation_type& impl,
- uint64_t offset, const boost::asio::const_buffer& buffer,
- boost::system::error_code& ec);
-
- // Helper function to start a write operation.
- BOOST_ASIO_DECL void start_write_op(implementation_type& impl,
- uint64_t offset, const boost::asio::const_buffer& buffer,
- operation* op);
-
- // Helper function to perform a synchronous write operation.
- BOOST_ASIO_DECL size_t do_read(implementation_type& impl,
- uint64_t offset, const boost::asio::mutable_buffer& buffer,
- boost::system::error_code& ec);
-
- // Helper function to start a read operation.
- BOOST_ASIO_DECL void start_read_op(implementation_type& impl,
- uint64_t offset, const boost::asio::mutable_buffer& buffer,
- operation* op);
-
- // Update the ID of the thread from which cancellation is safe.
- BOOST_ASIO_DECL void update_cancellation_thread_id(implementation_type& impl);
-
- // Helper function to close a handle when the associated object is being
- // destroyed.
- BOOST_ASIO_DECL void close_for_destruction(implementation_type& impl);
-
- // The IOCP service used for running asynchronous operations and dispatching
- // handlers.
- win_iocp_io_context& iocp_service_;
-
- // Mutex to protect access to the linked list of implementations.
- mutex mutex_;
-
- // The head of a linked list of all implementations.
- implementation_type* impl_list_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_iocp_handle_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 582b3f2b82d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_write_op.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// detail/win_iocp_handle_write_op.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_HANDLE_WRITE_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_WRITE_OP_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_IOCP)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename ConstBufferSequence, typename Handler>
-class win_iocp_handle_write_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_write_op);
-
- win_iocp_handle_write_op(const ConstBufferSequence& buffers, Handler& handler)
- : operation(&win_iocp_handle_write_op::do_complete),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& ec, std::size_t bytes_transferred)
- {
- // Take ownership of the operation object.
- win_iocp_handle_write_op* o(static_cast<win_iocp_handle_write_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- if (owner)
- {
- // Check whether buffers are still valid.
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- ConstBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_WRITE_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 1ccdf35f657..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_io_context.hpp
+++ /dev/null
@@ -1,330 +0,0 @@
-//
-// detail/win_iocp_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_DETAIL_WIN_IOCP_IO_CONTEXT_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_IO_CONTEXT_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_IOCP)
-
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/thread.hpp>
-#include <boost/asio/detail/thread_context.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/timer_queue_set.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/detail/win_iocp_operation.hpp>
-#include <boost/asio/detail/win_iocp_thread_info.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class wait_op;
-
-class win_iocp_io_context
- : public execution_context_service_base<win_iocp_io_context>,
- public thread_context
-{
-public:
- // Constructor. Specifies a concurrency hint that is passed through to the
- // underlying I/O completion port.
- BOOST_ASIO_DECL win_iocp_io_context(boost::asio::execution_context& ctx,
- int concurrency_hint = -1);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Initialise the task. Nothing to do here.
- void init_task()
- {
- }
-
- // Register a handle with the IO completion port.
- BOOST_ASIO_DECL boost::system::error_code register_handle(
- HANDLE handle, boost::system::error_code& ec);
-
- // Run the event loop until stopped or no more work.
- BOOST_ASIO_DECL size_t run(boost::system::error_code& ec);
-
- // Run until stopped or one operation is performed.
- BOOST_ASIO_DECL size_t run_one(boost::system::error_code& ec);
-
- // Run until timeout, interrupted, or one operation is performed.
- BOOST_ASIO_DECL size_t wait_one(long usec, boost::system::error_code& ec);
-
- // Poll for operations without blocking.
- BOOST_ASIO_DECL size_t poll(boost::system::error_code& ec);
-
- // Poll for one operation without blocking.
- BOOST_ASIO_DECL size_t poll_one(boost::system::error_code& ec);
-
- // Stop the event processing loop.
- BOOST_ASIO_DECL void stop();
-
- // Determine whether the io_context is stopped.
- bool stopped() const
- {
- return ::InterlockedExchangeAdd(&stopped_, 0) != 0;
- }
-
- // Restart in preparation for a subsequent run invocation.
- void restart()
- {
- ::InterlockedExchange(&stopped_, 0);
- }
-
- // Notify that some work has started.
- void work_started()
- {
- ::InterlockedIncrement(&outstanding_work_);
- }
-
- // Notify that some work has finished.
- void work_finished()
- {
- if (::InterlockedDecrement(&outstanding_work_) == 0)
- stop();
- }
-
- // Return whether a handler can be dispatched immediately.
- bool can_dispatch()
- {
- return thread_call_stack::contains(this) != 0;
- }
-
- // Request invocation of the given operation and return immediately. Assumes
- // that work_started() has not yet been called for the operation.
- void post_immediate_completion(win_iocp_operation* op, bool)
- {
- work_started();
- post_deferred_completion(op);
- }
-
- // Request invocation of the given operation and return immediately. Assumes
- // that work_started() was previously called for the operation.
- BOOST_ASIO_DECL void post_deferred_completion(win_iocp_operation* op);
-
- // Request invocation of the given operation and return immediately. Assumes
- // that work_started() was previously called for the operations.
- BOOST_ASIO_DECL void post_deferred_completions(
- op_queue<win_iocp_operation>& ops);
-
- // Request invocation of the given operation using the thread-private queue
- // and return immediately. Assumes that work_started() has not yet been
- // called for the operation.
- void post_private_immediate_completion(win_iocp_operation* op)
- {
- post_immediate_completion(op, false);
- }
-
- // Request invocation of the given operation using the thread-private queue
- // and return immediately. Assumes that work_started() was previously called
- // for the operation.
- void post_private_deferred_completion(win_iocp_operation* op)
- {
- post_deferred_completion(op);
- }
-
- // Enqueue the given operation following a failed attempt to dispatch the
- // operation for immediate invocation.
- void do_dispatch(operation* op)
- {
- post_immediate_completion(op, false);
- }
-
- // Process unfinished operations as part of a shutdown operation. Assumes
- // that work_started() was previously called for the operations.
- BOOST_ASIO_DECL void abandon_operations(op_queue<operation>& ops);
-
- // Called after starting an overlapped I/O operation that did not complete
- // immediately. The caller must have already called work_started() prior to
- // starting the operation.
- BOOST_ASIO_DECL void on_pending(win_iocp_operation* op);
-
- // Called after starting an overlapped I/O operation that completed
- // immediately. The caller must have already called work_started() prior to
- // starting the operation.
- BOOST_ASIO_DECL void on_completion(win_iocp_operation* op,
- DWORD last_error = 0, DWORD bytes_transferred = 0);
-
- // Called after starting an overlapped I/O operation that completed
- // immediately. The caller must have already called work_started() prior to
- // starting the operation.
- BOOST_ASIO_DECL void on_completion(win_iocp_operation* op,
- const boost::system::error_code& ec, DWORD bytes_transferred = 0);
-
- // Add a new timer queue to the service.
- template <typename Time_Traits>
- void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
-
- // Remove a timer queue from the service.
- template <typename Time_Traits>
- void remove_timer_queue(timer_queue<Time_Traits>& timer_queue);
-
- // Schedule a new operation in the given timer queue to expire at the
- // specified absolute time.
- template <typename Time_Traits>
- void schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
-
- // Cancel the timer associated with the given token. Returns the number of
- // handlers that have been posted or dispatched.
- template <typename Time_Traits>
- std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
-
- // Move the timer operations associated with the given timer.
- template <typename Time_Traits>
- void move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& to,
- typename timer_queue<Time_Traits>::per_timer_data& from);
-
- // Get the concurrency hint that was used to initialise the io_context.
- int concurrency_hint() const
- {
- return concurrency_hint_;
- }
-
-private:
-#if defined(WINVER) && (WINVER < 0x0500)
- typedef DWORD dword_ptr_t;
- typedef ULONG ulong_ptr_t;
-#else // defined(WINVER) && (WINVER < 0x0500)
- typedef DWORD_PTR dword_ptr_t;
- typedef ULONG_PTR ulong_ptr_t;
-#endif // defined(WINVER) && (WINVER < 0x0500)
-
- // Dequeues at most one operation from the I/O completion port, and then
- // executes it. Returns the number of operations that were dequeued (i.e.
- // either 0 or 1).
- BOOST_ASIO_DECL size_t do_one(DWORD msec, boost::system::error_code& ec);
-
- // Helper to calculate the GetQueuedCompletionStatus timeout.
- BOOST_ASIO_DECL static DWORD get_gqcs_timeout();
-
- // Helper function to add a new timer queue.
- BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
-
- // Helper function to remove a timer queue.
- BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
-
- // Called to recalculate and update the timeout.
- BOOST_ASIO_DECL void update_timeout();
-
- // Helper class to call work_finished() on block exit.
- struct work_finished_on_block_exit;
-
- // Helper class for managing a HANDLE.
- struct auto_handle
- {
- HANDLE handle;
- auto_handle() : handle(0) {}
- ~auto_handle() { if (handle) ::CloseHandle(handle); }
- };
-
- // The IO completion port used for queueing operations.
- auto_handle iocp_;
-
- // The count of unfinished work.
- long outstanding_work_;
-
- // Flag to indicate whether the event loop has been stopped.
- mutable long stopped_;
-
- // Flag to indicate whether there is an in-flight stop event. Every event
- // posted using PostQueuedCompletionStatus consumes non-paged pool, so to
- // avoid exhausting this resouce we limit the number of outstanding events.
- long stop_event_posted_;
-
- // Flag to indicate whether the service has been shut down.
- long shutdown_;
-
- enum
- {
- // Timeout to use with GetQueuedCompletionStatus on older versions of
- // Windows. Some versions of windows have a "bug" where a call to
- // GetQueuedCompletionStatus can appear stuck even though there are events
- // waiting on the queue. Using a timeout helps to work around the issue.
- default_gqcs_timeout = 500,
-
- // Maximum waitable timer timeout, in milliseconds.
- max_timeout_msec = 5 * 60 * 1000,
-
- // Maximum waitable timer timeout, in microseconds.
- max_timeout_usec = max_timeout_msec * 1000,
-
- // Completion key value used to wake up a thread to dispatch timers or
- // completed operations.
- wake_for_dispatch = 1,
-
- // Completion key value to indicate that an operation has posted with the
- // original last_error and bytes_transferred values stored in the fields of
- // the OVERLAPPED structure.
- overlapped_contains_result = 2
- };
-
- // Timeout to use with GetQueuedCompletionStatus.
- const DWORD gqcs_timeout_;
-
- // Function object for processing timeouts in a background thread.
- struct timer_thread_function;
- friend struct timer_thread_function;
-
- // Background thread used for processing timeouts.
- scoped_ptr<thread> timer_thread_;
-
- // A waitable timer object used for waiting for timeouts.
- auto_handle waitable_timer_;
-
- // Non-zero if timers or completed operations need to be dispatched.
- long dispatch_required_;
-
- // Mutex for protecting access to the timer queues and completed operations.
- mutex dispatch_mutex_;
-
- // The timer queues.
- timer_queue_set timer_queues_;
-
- // The operations that are ready to dispatch.
- op_queue<win_iocp_operation> completed_ops_;
-
- // The concurrency hint used to initialise the io_context.
- const int concurrency_hint_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/win_iocp_io_context.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_iocp_io_context.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 106bedeba07..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_null_buffers_op.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// detail/win_iocp_null_buffers_op.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_IOCP_NULL_BUFFERS_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_NULL_BUFFERS_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class win_iocp_null_buffers_op : public reactor_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_null_buffers_op);
-
- win_iocp_null_buffers_op(socket_ops::weak_cancel_token_type cancel_token,
- Handler& handler)
- : reactor_op(&win_iocp_null_buffers_op::do_perform,
- &win_iocp_null_buffers_op::do_complete),
- cancel_token_(cancel_token),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static status do_perform(reactor_op*)
- {
- return done;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t bytes_transferred)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_null_buffers_op* o(static_cast<win_iocp_null_buffers_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // The reactor may have stored a result in the operation object.
- if (o->ec_)
- ec = o->ec_;
-
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- {
- if (o->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;
- }
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- socket_ops::weak_cancel_token_type cancel_token_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_NULL_BUFFERS_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp
deleted file mode 100644
index 11111f31501..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// detail/win_iocp_operation.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_IOCP_OPERATION_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_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_IOCP)
-
-#include <boost/asio/detail/handler_tracking.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/system/error_code.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_iocp_io_context;
-
-// Base class for all operations. A function pointer is used instead of virtual
-// functions to avoid the associated overhead.
-class win_iocp_operation
- : public OVERLAPPED
- BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER
-{
-public:
- typedef win_iocp_operation operation_type;
-
- void complete(void* owner, const boost::system::error_code& ec,
- std::size_t bytes_transferred)
- {
- func_(owner, this, ec, bytes_transferred);
- }
-
- void destroy()
- {
- func_(0, this, boost::system::error_code(), 0);
- }
-
-protected:
- typedef void (*func_type)(
- void*, win_iocp_operation*,
- const boost::system::error_code&, std::size_t);
-
- win_iocp_operation(func_type func)
- : next_(0),
- func_(func)
- {
- reset();
- }
-
- // Prevents deletion through this type.
- ~win_iocp_operation()
- {
- }
-
- void reset()
- {
- Internal = 0;
- InternalHigh = 0;
- Offset = 0;
- OffsetHigh = 0;
- hEvent = 0;
- ready_ = 0;
- }
-
-private:
- friend class op_queue_access;
- friend class win_iocp_io_context;
- win_iocp_operation* next_;
- func_type func_;
- long ready_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 18f0d631731..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_op.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// detail/win_iocp_overlapped_op.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_IOCP_OVERLAPPED_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_OP_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_IOCP)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class win_iocp_overlapped_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_overlapped_op);
-
- win_iocp_overlapped_op(Handler& handler)
- : operation(&win_iocp_overlapped_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& ec, std::size_t bytes_transferred)
- {
- // Take ownership of the operation object.
- win_iocp_overlapped_op* o(static_cast<win_iocp_overlapped_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 6cff7ae1d4a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-// detail/win_iocp_overlapped_ptr.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_IOCP_OVERLAPPED_PTR_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_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_IOCP)
-
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/win_iocp_overlapped_op.hpp>
-#include <boost/asio/detail/win_iocp_io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Wraps a handler to create an OVERLAPPED object for use with overlapped I/O.
-class win_iocp_overlapped_ptr
- : private noncopyable
-{
-public:
- // Construct an empty win_iocp_overlapped_ptr.
- win_iocp_overlapped_ptr()
- : ptr_(0),
- iocp_service_(0)
- {
- }
-
- // Construct an win_iocp_overlapped_ptr to contain the specified handler.
- template <typename Handler>
- explicit win_iocp_overlapped_ptr(
- boost::asio::io_context& io_context, BOOST_ASIO_MOVE_ARG(Handler) handler)
- : ptr_(0),
- iocp_service_(0)
- {
- this->reset(io_context, BOOST_ASIO_MOVE_CAST(Handler)(handler));
- }
-
- // Destructor automatically frees the OVERLAPPED object unless released.
- ~win_iocp_overlapped_ptr()
- {
- reset();
- }
-
- // Reset to empty.
- void reset()
- {
- if (ptr_)
- {
- ptr_->destroy();
- ptr_ = 0;
- iocp_service_->work_finished();
- iocp_service_ = 0;
- }
- }
-
- // Reset to contain the specified handler, freeing any current OVERLAPPED
- // object.
- template <typename Handler>
- void reset(boost::asio::io_context& io_context, Handler handler)
- {
- typedef win_iocp_overlapped_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context, *p.p,
- "io_context", &io_context.impl_, 0, "overlapped"));
-
- io_context.impl_.work_started();
- reset();
- ptr_ = p.p;
- p.v = p.p = 0;
- iocp_service_ = &io_context.impl_;
- }
-
- // Get the contained OVERLAPPED object.
- OVERLAPPED* get()
- {
- return ptr_;
- }
-
- // Get the contained OVERLAPPED object.
- const OVERLAPPED* get() const
- {
- return ptr_;
- }
-
- // Release ownership of the OVERLAPPED object.
- OVERLAPPED* release()
- {
- if (ptr_)
- iocp_service_->on_pending(ptr_);
-
- OVERLAPPED* tmp = ptr_;
- ptr_ = 0;
- iocp_service_ = 0;
- return tmp;
- }
-
- // Post completion notification for overlapped operation. Releases ownership.
- void complete(const boost::system::error_code& ec,
- std::size_t bytes_transferred)
- {
- if (ptr_)
- {
- iocp_service_->on_completion(ptr_, ec,
- static_cast<DWORD>(bytes_transferred));
- ptr_ = 0;
- iocp_service_ = 0;
- }
- }
-
-private:
- win_iocp_operation* ptr_;
- win_iocp_io_context* iocp_service_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 3da25372952..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_serial_port_service.hpp
+++ /dev/null
@@ -1,232 +0,0 @@
-//
-// detail/win_iocp_serial_port_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_SERIAL_PORT_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SERIAL_PORT_SERVICE_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_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#include <string>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/win_iocp_handle_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Extend win_iocp_handle_service to provide serial port support.
-class win_iocp_serial_port_service :
- public service_base<win_iocp_serial_port_service>
-{
-public:
- // The native type of a serial port.
- typedef win_iocp_handle_service::native_handle_type native_handle_type;
-
- // The implementation type of the serial port.
- typedef win_iocp_handle_service::implementation_type implementation_type;
-
- // Constructor.
- BOOST_ASIO_DECL win_iocp_serial_port_service(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Construct a new serial port implementation.
- void construct(implementation_type& impl)
- {
- handle_service_.construct(impl);
- }
-
- // Move-construct a new serial port implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- handle_service_.move_construct(impl, other_impl);
- }
-
- // Move-assign from another serial port implementation.
- void move_assign(implementation_type& impl,
- win_iocp_serial_port_service& other_service,
- implementation_type& other_impl)
- {
- handle_service_.move_assign(impl,
- other_service.handle_service_, other_impl);
- }
-
- // Destroy a serial port implementation.
- void destroy(implementation_type& impl)
- {
- handle_service_.destroy(impl);
- }
-
- // Open the serial port using the specified device name.
- BOOST_ASIO_DECL boost::system::error_code open(implementation_type& impl,
- const std::string& device, boost::system::error_code& ec);
-
- // Assign a native handle to a serial port implementation.
- boost::system::error_code assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
- {
- return handle_service_.assign(impl, handle, ec);
- }
-
- // Determine whether the serial port is open.
- bool is_open(const implementation_type& impl) const
- {
- return handle_service_.is_open(impl);
- }
-
- // Destroy a serial port implementation.
- boost::system::error_code close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return handle_service_.close(impl, ec);
- }
-
- // Get the native serial port representation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return handle_service_.native_handle(impl);
- }
-
- // Cancel all operations associated with the handle.
- boost::system::error_code cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return handle_service_.cancel(impl, ec);
- }
-
- // Set an option on the serial port.
- template <typename SettableSerialPortOption>
- boost::system::error_code set_option(implementation_type& impl,
- const SettableSerialPortOption& option, boost::system::error_code& ec)
- {
- return do_set_option(impl,
- &win_iocp_serial_port_service::store_option<SettableSerialPortOption>,
- &option, ec);
- }
-
- // Get an option from the serial port.
- template <typename GettableSerialPortOption>
- boost::system::error_code get_option(const implementation_type& impl,
- GettableSerialPortOption& option, boost::system::error_code& ec) const
- {
- return do_get_option(impl,
- &win_iocp_serial_port_service::load_option<GettableSerialPortOption>,
- &option, ec);
- }
-
- // Send a break sequence to the serial port.
- boost::system::error_code send_break(implementation_type&,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Write the given data. Returns the number of bytes sent.
- template <typename ConstBufferSequence>
- size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return handle_service_.write_some(impl, buffers, ec);
- }
-
- // Start an asynchronous write. The data being written must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
- {
- handle_service_.async_write_some(impl, buffers, handler);
- }
-
- // Read some data. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return handle_service_.read_some(impl, buffers, ec);
- }
-
- // Start an asynchronous read. The buffer for the data being received must be
- // valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
- {
- handle_service_.async_read_some(impl, buffers, handler);
- }
-
-private:
- // Function pointer type for storing a serial port option.
- typedef boost::system::error_code (*store_function_type)(
- const void*, ::DCB&, boost::system::error_code&);
-
- // Helper function template to store a serial port option.
- template <typename SettableSerialPortOption>
- static boost::system::error_code store_option(const void* option,
- ::DCB& storage, boost::system::error_code& ec)
- {
- static_cast<const SettableSerialPortOption*>(option)->store(storage, ec);
- return ec;
- }
-
- // Helper function to set a serial port option.
- BOOST_ASIO_DECL boost::system::error_code do_set_option(
- implementation_type& impl, store_function_type store,
- const void* option, boost::system::error_code& ec);
-
- // Function pointer type for loading a serial port option.
- typedef boost::system::error_code (*load_function_type)(
- void*, const ::DCB&, boost::system::error_code&);
-
- // Helper function template to load a serial port option.
- template <typename GettableSerialPortOption>
- static boost::system::error_code load_option(void* option,
- const ::DCB& storage, boost::system::error_code& ec)
- {
- static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
- return ec;
- }
-
- // Helper function to get a serial port option.
- BOOST_ASIO_DECL boost::system::error_code do_get_option(
- const implementation_type& impl, load_function_type load,
- void* option, boost::system::error_code& ec) const;
-
- // The implementation used for initiating asynchronous operations.
- win_iocp_handle_service handle_service_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_iocp_serial_port_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SERIAL_PORT_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 8e1b7fc93ad..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_accept_op.hpp
+++ /dev/null
@@ -1,299 +0,0 @@
-//
-// detail/win_iocp_socket_accept_op.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_IOCP_SOCKET_ACCEPT_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_ACCEPT_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/win_iocp_socket_service_base.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Socket, typename Protocol, typename Handler>
-class win_iocp_socket_accept_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_accept_op);
-
- win_iocp_socket_accept_op(win_iocp_socket_service_base& socket_service,
- socket_type socket, Socket& peer, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint,
- bool enable_connection_aborted, Handler& handler)
- : operation(&win_iocp_socket_accept_op::do_complete),
- socket_service_(socket_service),
- socket_(socket),
- peer_(peer),
- protocol_(protocol),
- peer_endpoint_(peer_endpoint),
- enable_connection_aborted_(enable_connection_aborted),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- socket_holder& new_socket()
- {
- return new_socket_;
- }
-
- void* output_buffer()
- {
- return output_buffer_;
- }
-
- DWORD address_length()
- {
- return sizeof(sockaddr_storage_type) + 16;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t /*bytes_transferred*/)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_accept_op* o(static_cast<win_iocp_socket_accept_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- if (owner)
- {
- typename Protocol::endpoint peer_endpoint;
- std::size_t addr_len = peer_endpoint.capacity();
- socket_ops::complete_iocp_accept(o->socket_,
- o->output_buffer(), o->address_length(),
- peer_endpoint.data(), &addr_len,
- o->new_socket_.get(), ec);
-
- // Restart the accept operation if we got the connection_aborted error
- // and the enable_connection_aborted socket option is not set.
- if (ec == boost::asio::error::connection_aborted
- && !o->enable_connection_aborted_)
- {
- o->reset();
- o->socket_service_.restart_accept_op(o->socket_,
- o->new_socket_, o->protocol_.family(),
- o->protocol_.type(), o->protocol_.protocol(),
- o->output_buffer(), o->address_length(), o);
- p.v = p.p = 0;
- return;
- }
-
- // If the socket was successfully accepted, transfer ownership of the
- // socket to the peer object.
- if (!ec)
- {
- o->peer_.assign(o->protocol_,
- typename Socket::native_handle_type(
- o->new_socket_.get(), peer_endpoint), ec);
- if (!ec)
- o->new_socket_.release();
- }
-
- // Pass endpoint back to caller.
- if (o->peer_endpoint_)
- *o->peer_endpoint_ = peer_endpoint;
- }
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, ec);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- win_iocp_socket_service_base& socket_service_;
- socket_type socket_;
- socket_holder new_socket_;
- Socket& peer_;
- Protocol protocol_;
- typename Protocol::endpoint* peer_endpoint_;
- unsigned char output_buffer_[(sizeof(sockaddr_storage_type) + 16) * 2];
- bool enable_connection_aborted_;
- Handler handler_;
-};
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-
-template <typename Protocol, typename Handler>
-class win_iocp_socket_move_accept_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_move_accept_op);
-
- win_iocp_socket_move_accept_op(
- win_iocp_socket_service_base& socket_service, socket_type socket,
- const Protocol& protocol, boost::asio::io_context& peer_io_context,
- typename Protocol::endpoint* peer_endpoint,
- bool enable_connection_aborted, Handler& handler)
- : operation(&win_iocp_socket_move_accept_op::do_complete),
- socket_service_(socket_service),
- socket_(socket),
- peer_(peer_io_context),
- protocol_(protocol),
- peer_endpoint_(peer_endpoint),
- enable_connection_aborted_(enable_connection_aborted),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- socket_holder& new_socket()
- {
- return new_socket_;
- }
-
- void* output_buffer()
- {
- return output_buffer_;
- }
-
- DWORD address_length()
- {
- return sizeof(sockaddr_storage_type) + 16;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t /*bytes_transferred*/)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_move_accept_op* o(
- static_cast<win_iocp_socket_move_accept_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- if (owner)
- {
- typename Protocol::endpoint peer_endpoint;
- std::size_t addr_len = peer_endpoint.capacity();
- socket_ops::complete_iocp_accept(o->socket_,
- o->output_buffer(), o->address_length(),
- peer_endpoint.data(), &addr_len,
- o->new_socket_.get(), ec);
-
- // Restart the accept operation if we got the connection_aborted error
- // and the enable_connection_aborted socket option is not set.
- if (ec == boost::asio::error::connection_aborted
- && !o->enable_connection_aborted_)
- {
- o->reset();
- o->socket_service_.restart_accept_op(o->socket_,
- o->new_socket_, o->protocol_.family(),
- o->protocol_.type(), o->protocol_.protocol(),
- o->output_buffer(), o->address_length(), o);
- p.v = p.p = 0;
- return;
- }
-
- // If the socket was successfully accepted, transfer ownership of the
- // socket to the peer object.
- if (!ec)
- {
- o->peer_.assign(o->protocol_,
- typename Protocol::socket::native_handle_type(
- o->new_socket_.get(), peer_endpoint), ec);
- if (!ec)
- o->new_socket_.release();
- }
-
- // Pass endpoint back to caller.
- if (o->peer_endpoint_)
- *o->peer_endpoint_ = peer_endpoint;
- }
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::move_binder2<Handler,
- boost::system::error_code, typename Protocol::socket>
- handler(0, BOOST_ASIO_MOVE_CAST(Handler)(o->handler_), ec,
- BOOST_ASIO_MOVE_CAST(typename Protocol::socket)(o->peer_));
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- win_iocp_socket_service_base& socket_service_;
- socket_type socket_;
- socket_holder new_socket_;
- typename Protocol::socket peer_;
- Protocol protocol_;
- typename Protocol::endpoint* peer_endpoint_;
- unsigned char output_buffer_[(sizeof(sockaddr_storage_type) + 16) * 2];
- bool enable_connection_aborted_;
- Handler handler_;
-};
-
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_ACCEPT_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 916d22ee49e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_connect_op.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// detail/win_iocp_socket_connect_op.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_IOCP_SOCKET_CONNECT_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_CONNECT_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_iocp_socket_connect_op_base : public reactor_op
-{
-public:
- win_iocp_socket_connect_op_base(socket_type socket, func_type complete_func)
- : reactor_op(&win_iocp_socket_connect_op_base::do_perform, complete_func),
- socket_(socket),
- connect_ex_(false)
- {
- }
-
- static status do_perform(reactor_op* base)
- {
- win_iocp_socket_connect_op_base* o(
- static_cast<win_iocp_socket_connect_op_base*>(base));
-
- return socket_ops::non_blocking_connect(
- o->socket_, o->ec_) ? done : not_done;
- }
-
- socket_type socket_;
- bool connect_ex_;
-};
-
-template <typename Handler>
-class win_iocp_socket_connect_op : public win_iocp_socket_connect_op_base
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_connect_op);
-
- win_iocp_socket_connect_op(socket_type socket, Handler& handler)
- : win_iocp_socket_connect_op_base(socket,
- &win_iocp_socket_connect_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t /*bytes_transferred*/)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_connect_op* o(
- static_cast<win_iocp_socket_connect_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- if (owner)
- {
- if (o->connect_ex_)
- socket_ops::complete_iocp_connect(o->socket_, ec);
- else
- ec = o->ec_;
- }
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, ec);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_CONNECT_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index b052ec236e2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recv_op.hpp
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// detail/win_iocp_socket_recv_op.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_IOCP_SOCKET_RECV_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECV_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence, typename Handler>
-class win_iocp_socket_recv_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_recv_op);
-
- win_iocp_socket_recv_op(socket_ops::state_type state,
- socket_ops::weak_cancel_token_type cancel_token,
- const MutableBufferSequence& buffers, Handler& handler)
- : operation(&win_iocp_socket_recv_op::do_complete),
- state_(state),
- cancel_token_(cancel_token),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t bytes_transferred)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_recv_op* o(static_cast<win_iocp_socket_recv_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- // Check whether buffers are still valid.
- if (owner)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- socket_ops::complete_iocp_recv(o->state_, o->cancel_token_,
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::all_empty(o->buffers_),
- ec, bytes_transferred);
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- socket_ops::state_type state_;
- socket_ops::weak_cancel_token_type cancel_token_;
- MutableBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECV_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index a7338c88775..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ /dev/null
@@ -1,127 +0,0 @@
-//
-// detail/win_iocp_socket_recvfrom_op.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_IOCP_SOCKET_RECVFROM_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence, typename Endpoint, typename Handler>
-class win_iocp_socket_recvfrom_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_recvfrom_op);
-
- win_iocp_socket_recvfrom_op(Endpoint& endpoint,
- socket_ops::weak_cancel_token_type cancel_token,
- const MutableBufferSequence& buffers, Handler& handler)
- : operation(&win_iocp_socket_recvfrom_op::do_complete),
- endpoint_(endpoint),
- endpoint_size_(static_cast<int>(endpoint.capacity())),
- cancel_token_(cancel_token),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- int& endpoint_size()
- {
- return endpoint_size_;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t bytes_transferred)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_recvfrom_op* o(
- static_cast<win_iocp_socket_recvfrom_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- // Check whether buffers are still valid.
- if (owner)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- socket_ops::complete_iocp_recvfrom(o->cancel_token_, ec);
-
- // Record the size of the endpoint returned by the operation.
- o->endpoint_.resize(o->endpoint_size_);
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Endpoint& endpoint_;
- int endpoint_size_;
- socket_ops::weak_cancel_token_type cancel_token_;
- MutableBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 4a8313225d3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// detail/win_iocp_socket_recvmsg_op.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_IOCP_SOCKET_RECVMSG_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVMSG_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/socket_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence, typename Handler>
-class win_iocp_socket_recvmsg_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_recvmsg_op);
-
- win_iocp_socket_recvmsg_op(
- socket_ops::weak_cancel_token_type cancel_token,
- const MutableBufferSequence& buffers,
- socket_base::message_flags& out_flags, Handler& handler)
- : operation(&win_iocp_socket_recvmsg_op::do_complete),
- cancel_token_(cancel_token),
- buffers_(buffers),
- out_flags_(out_flags),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t bytes_transferred)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_recvmsg_op* o(
- static_cast<win_iocp_socket_recvmsg_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- // Check whether buffers are still valid.
- if (owner)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- socket_ops::complete_iocp_recvmsg(o->cancel_token_, ec);
- o->out_flags_ = 0;
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- socket_ops::weak_cancel_token_type cancel_token_;
- MutableBufferSequence buffers_;
- socket_base::message_flags& out_flags_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVMSG_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 7dc9ab3175a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_send_op.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// detail/win_iocp_socket_send_op.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_IOCP_SOCKET_SEND_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SEND_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename ConstBufferSequence, typename Handler>
-class win_iocp_socket_send_op : public operation
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_send_op);
-
- win_iocp_socket_send_op(socket_ops::weak_cancel_token_type cancel_token,
- const ConstBufferSequence& buffers, Handler& handler)
- : operation(&win_iocp_socket_send_op::do_complete),
- cancel_token_(cancel_token),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t bytes_transferred)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_socket_send_op* o(static_cast<win_iocp_socket_send_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- // Check whether buffers are still valid.
- if (owner)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- socket_ops::complete_iocp_send(o->cancel_token_, ec);
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, ec, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- socket_ops::weak_cancel_token_type cancel_token_;
- ConstBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SEND_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index d71c6ee0466..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service.hpp
+++ /dev/null
@@ -1,601 +0,0 @@
-//
-// detail/win_iocp_socket_service.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_IOCP_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_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_IOCP)
-
-#include <cstring>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
-#include <boost/asio/detail/socket_holder.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/win_iocp_io_context.hpp>
-#include <boost/asio/detail/win_iocp_null_buffers_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_accept_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_connect_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_recvfrom_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_send_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_service_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol>
-class win_iocp_socket_service :
- public service_base<win_iocp_socket_service<Protocol> >,
- public win_iocp_socket_service_base
-{
-public:
- // The protocol type.
- typedef Protocol protocol_type;
-
- // The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- // The native type of a socket.
- class native_handle_type
- {
- public:
- native_handle_type(socket_type s)
- : socket_(s),
- have_remote_endpoint_(false)
- {
- }
-
- native_handle_type(socket_type s, const endpoint_type& ep)
- : socket_(s),
- have_remote_endpoint_(true),
- remote_endpoint_(ep)
- {
- }
-
- void operator=(socket_type s)
- {
- socket_ = s;
- have_remote_endpoint_ = false;
- remote_endpoint_ = endpoint_type();
- }
-
- operator socket_type() const
- {
- return socket_;
- }
-
- bool have_remote_endpoint() const
- {
- return have_remote_endpoint_;
- }
-
- endpoint_type remote_endpoint() const
- {
- return remote_endpoint_;
- }
-
- private:
- socket_type socket_;
- bool have_remote_endpoint_;
- endpoint_type remote_endpoint_;
- };
-
- // The implementation type of the socket.
- struct implementation_type :
- win_iocp_socket_service_base::base_implementation_type
- {
- // Default constructor.
- implementation_type()
- : protocol_(endpoint_type().protocol()),
- have_remote_endpoint_(false),
- remote_endpoint_()
- {
- }
-
- // The protocol associated with the socket.
- protocol_type protocol_;
-
- // Whether we have a cached remote endpoint.
- bool have_remote_endpoint_;
-
- // A cached remote endpoint.
- endpoint_type remote_endpoint_;
- };
-
- // Constructor.
- win_iocp_socket_service(boost::asio::io_context& io_context)
- : service_base<win_iocp_socket_service<Protocol> >(io_context),
- win_iocp_socket_service_base(io_context)
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- this->base_shutdown();
- }
-
- // Move-construct a new socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- this->base_move_construct(impl, other_impl);
-
- impl.protocol_ = other_impl.protocol_;
- other_impl.protocol_ = endpoint_type().protocol();
-
- impl.have_remote_endpoint_ = other_impl.have_remote_endpoint_;
- other_impl.have_remote_endpoint_ = false;
-
- impl.remote_endpoint_ = other_impl.remote_endpoint_;
- other_impl.remote_endpoint_ = endpoint_type();
- }
-
- // Move-assign from another socket implementation.
- void move_assign(implementation_type& impl,
- win_iocp_socket_service_base& other_service,
- implementation_type& other_impl)
- {
- this->base_move_assign(impl, other_service, other_impl);
-
- impl.protocol_ = other_impl.protocol_;
- other_impl.protocol_ = endpoint_type().protocol();
-
- impl.have_remote_endpoint_ = other_impl.have_remote_endpoint_;
- other_impl.have_remote_endpoint_ = false;
-
- impl.remote_endpoint_ = other_impl.remote_endpoint_;
- other_impl.remote_endpoint_ = endpoint_type();
- }
-
- // Move-construct a new socket implementation from another protocol type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- win_iocp_socket_service<Protocol1>&,
- typename win_iocp_socket_service<
- Protocol1>::implementation_type& other_impl)
- {
- this->base_move_construct(impl, other_impl);
-
- impl.protocol_ = protocol_type(other_impl.protocol_);
- other_impl.protocol_ = typename Protocol1::endpoint().protocol();
-
- impl.have_remote_endpoint_ = other_impl.have_remote_endpoint_;
- other_impl.have_remote_endpoint_ = false;
-
- impl.remote_endpoint_ = other_impl.remote_endpoint_;
- other_impl.remote_endpoint_ = typename Protocol1::endpoint();
- }
-
- // Open a new socket implementation.
- boost::system::error_code open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (!do_open(impl, protocol.family(),
- protocol.type(), protocol.protocol(), ec))
- {
- impl.protocol_ = protocol;
- impl.have_remote_endpoint_ = false;
- impl.remote_endpoint_ = endpoint_type();
- }
- return ec;
- }
-
- // Assign a native socket to a socket implementation.
- boost::system::error_code assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- if (!do_assign(impl, protocol.type(), native_socket, ec))
- {
- impl.protocol_ = protocol;
- impl.have_remote_endpoint_ = native_socket.have_remote_endpoint();
- impl.remote_endpoint_ = native_socket.remote_endpoint();
- }
- return ec;
- }
-
- // Get the native socket representation.
- native_handle_type native_handle(implementation_type& impl)
- {
- if (impl.have_remote_endpoint_)
- return native_handle_type(impl.socket_, impl.remote_endpoint_);
- return native_handle_type(impl.socket_);
- }
-
- // Bind the socket to the specified local endpoint.
- boost::system::error_code bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
- return ec;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code set_option(implementation_type& impl,
- const Option& option, boost::system::error_code& ec)
- {
- socket_ops::setsockopt(impl.socket_, impl.state_,
- option.level(impl.protocol_), option.name(impl.protocol_),
- option.data(impl.protocol_), option.size(impl.protocol_), ec);
- return ec;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code get_option(const implementation_type& impl,
- Option& option, boost::system::error_code& ec) const
- {
- std::size_t size = option.size(impl.protocol_);
- socket_ops::getsockopt(impl.socket_, impl.state_,
- option.level(impl.protocol_), option.name(impl.protocol_),
- option.data(impl.protocol_), &size, ec);
- if (!ec)
- option.resize(impl.protocol_, size);
- return ec;
- }
-
- // Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- endpoint_type endpoint;
- std::size_t addr_len = endpoint.capacity();
- if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
- return endpoint_type();
- endpoint.resize(addr_len);
- return endpoint;
- }
-
- // Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- endpoint_type endpoint = impl.remote_endpoint_;
- std::size_t addr_len = endpoint.capacity();
- if (socket_ops::getpeername(impl.socket_, endpoint.data(),
- &addr_len, impl.have_remote_endpoint_, ec))
- return endpoint_type();
- endpoint.resize(addr_len);
- return endpoint;
- }
-
- // Disable sends or receives on the socket.
- boost::system::error_code shutdown(base_implementation_type& impl,
- socket_base::shutdown_type what, boost::system::error_code& ec)
- {
- socket_ops::shutdown(impl.socket_, what, ec);
- return ec;
- }
-
- // Send a datagram to the specified endpoint. Returns the number of bytes
- // sent.
- template <typename ConstBufferSequence>
- size_t send_to(implementation_type& impl, const ConstBufferSequence& buffers,
- const endpoint_type& destination, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- return socket_ops::sync_sendto(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags,
- destination.data(), destination.size(), ec);
- }
-
- // Wait until data can be sent without blocking.
- size_t send_to(implementation_type& impl, const null_buffers&,
- const endpoint_type&, socket_base::message_flags,
- boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
-
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_send_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_send_to"));
-
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- start_send_to_op(impl, bufs.buffers(), bufs.count(),
- destination.data(), static_cast<int>(destination.size()),
- flags, p.p);
- p.v = p.p = 0;
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send_to(implementation_type& impl, const null_buffers&,
- const endpoint_type&, socket_base::message_flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_send_to(null_buffers)"));
-
- start_reactor_op(impl, select_reactor::write_op, p.p);
- p.v = p.p = 0;
- }
-
- // Receive a datagram with the endpoint of the sender. Returns the number of
- // bytes received.
- template <typename MutableBufferSequence>
- size_t receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers,
- endpoint_type& sender_endpoint, socket_base::message_flags flags,
- boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- std::size_t addr_len = sender_endpoint.capacity();
- std::size_t bytes_recvd = socket_ops::sync_recvfrom(
- impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
- flags, sender_endpoint.data(), &addr_len, ec);
-
- if (!ec)
- sender_endpoint.resize(addr_len);
-
- return bytes_recvd;
- }
-
- // Wait until data can be received without blocking.
- size_t receive_from(implementation_type& impl,
- const null_buffers&, endpoint_type& sender_endpoint,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
-
- // Reset endpoint since it can be given no sensible value at this time.
- sender_endpoint = endpoint_type();
-
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received and
- // the sender_endpoint object must both be valid for the lifetime of the
- // asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endp,
- socket_base::message_flags flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_recvfrom_op<
- MutableBufferSequence, endpoint_type, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(sender_endp, impl.cancel_token_, buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_receive_from"));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- start_receive_from_op(impl, bufs.buffers(), bufs.count(),
- sender_endp.data(), flags, &p.p->endpoint_size(), p.p);
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_from(implementation_type& impl,
- const null_buffers&, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_receive_from(null_buffers)"));
-
- // Reset endpoint since it can be given no sensible value at this time.
- sender_endpoint = endpoint_type();
-
- start_null_buffers_receive_op(impl, flags, p.p);
- p.v = p.p = 0;
- }
-
- // Accept a new connection.
- template <typename Socket>
- boost::system::error_code accept(implementation_type& impl, Socket& peer,
- endpoint_type* peer_endpoint, boost::system::error_code& ec)
- {
- // We cannot accept a socket that is already open.
- if (peer.is_open())
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
- socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
- impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
- peer_endpoint ? &addr_len : 0, ec));
-
- // On success, assign new connection to peer socket object.
- if (new_socket.get() != invalid_socket)
- {
- if (peer_endpoint)
- peer_endpoint->resize(addr_len);
- peer.assign(impl.protocol_, new_socket.get(), ec);
- if (!ec)
- new_socket.release();
- }
-
- return ec;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- // Accept a new connection.
- typename Protocol::socket accept(implementation_type& impl,
- io_context* peer_io_context, endpoint_type* peer_endpoint,
- boost::system::error_code& ec)
- {
- typename Protocol::socket peer(
- peer_io_context ? *peer_io_context : io_context_);
-
- std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
- socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
- impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
- peer_endpoint ? &addr_len : 0, ec));
-
- // On success, assign new connection to peer socket object.
- if (new_socket.get() != invalid_socket)
- {
- if (peer_endpoint)
- peer_endpoint->resize(addr_len);
- peer.assign(impl.protocol_, new_socket.get(), ec);
- if (!ec)
- new_socket.release();
- }
-
- return peer;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- // Start an asynchronous accept. The peer and peer_endpoint objects
- // must be valid until the accept's handler is invoked.
- template <typename Socket, typename Handler>
- void async_accept(implementation_type& impl, Socket& peer,
- endpoint_type* peer_endpoint, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_accept_op<Socket, protocol_type, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- bool enable_connection_aborted =
- (impl.state_ & socket_ops::enable_connection_aborted) != 0;
- p.p = new (p.v) op(*this, impl.socket_, peer, impl.protocol_,
- peer_endpoint, enable_connection_aborted, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_accept"));
-
- start_accept_op(impl, peer.is_open(), p.p->new_socket(),
- impl.protocol_.family(), impl.protocol_.type(),
- impl.protocol_.protocol(), p.p->output_buffer(),
- p.p->address_length(), p.p);
- p.v = p.p = 0;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- // Start an asynchronous accept. The peer and peer_endpoint objects
- // must be valid until the accept's handler is invoked.
- template <typename Handler>
- void async_accept(implementation_type& impl,
- boost::asio::io_context* peer_io_context,
- endpoint_type* peer_endpoint, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_move_accept_op<protocol_type, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- bool enable_connection_aborted =
- (impl.state_ & socket_ops::enable_connection_aborted) != 0;
- p.p = new (p.v) op(*this, impl.socket_, impl.protocol_,
- peer_io_context ? *peer_io_context : io_context_,
- peer_endpoint, enable_connection_aborted, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_accept"));
-
- start_accept_op(impl, false, p.p->new_socket(),
- impl.protocol_.family(), impl.protocol_.type(),
- impl.protocol_.protocol(), p.p->output_buffer(),
- p.p->address_length(), p.p);
- p.v = p.p = 0;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- // Connect the socket to the specified endpoint.
- boost::system::error_code connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- socket_ops::sync_connect(impl.socket_,
- peer_endpoint.data(), peer_endpoint.size(), ec);
- return ec;
- }
-
- // Start an asynchronous connect.
- template <typename Handler>
- void async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_connect_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_connect"));
-
- start_connect_op(impl, impl.protocol_.family(), impl.protocol_.type(),
- peer_endpoint.data(), static_cast<int>(peer_endpoint.size()), p.p);
- p.v = p.p = 0;
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index dd2bf9f6a99..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service_base.hpp
+++ /dev/null
@@ -1,593 +0,0 @@
-//
-// detail/win_iocp_socket_service_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_DETAIL_WIN_IOCP_SOCKET_SERVICE_BASE_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_BASE_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_IOCP)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/operation.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
-#include <boost/asio/detail/socket_holder.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/win_iocp_io_context.hpp>
-#include <boost/asio/detail/win_iocp_null_buffers_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_connect_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_send_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_recv_op.hpp>
-#include <boost/asio/detail/win_iocp_socket_recvmsg_op.hpp>
-#include <boost/asio/detail/win_iocp_wait_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_iocp_socket_service_base
-{
-public:
- // The implementation type of the socket.
- struct base_implementation_type
- {
- // The native socket representation.
- socket_type socket_;
-
- // The current state of the socket.
- socket_ops::state_type state_;
-
- // We use a shared pointer as a cancellation token here to work around the
- // broken Windows support for cancellation. MSDN says that when you call
- // closesocket any outstanding WSARecv or WSASend operations will complete
- // with the error ERROR_OPERATION_ABORTED. In practice they complete with
- // ERROR_NETNAME_DELETED, which means you can't tell the difference between
- // a local cancellation and the socket being hard-closed by the peer.
- socket_ops::shared_cancel_token_type cancel_token_;
-
- // Per-descriptor data used by the reactor.
- select_reactor::per_descriptor_data reactor_data_;
-
-#if defined(BOOST_ASIO_ENABLE_CANCELIO)
- // The ID of the thread from which it is safe to cancel asynchronous
- // operations. 0 means no asynchronous operations have been started yet.
- // ~0 means asynchronous operations have been started from more than one
- // thread, and cancellation is not supported for the socket.
- DWORD safe_cancellation_thread_id_;
-#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
-
- // Pointers to adjacent socket implementations in linked list.
- base_implementation_type* next_;
- base_implementation_type* prev_;
- };
-
- // Constructor.
- BOOST_ASIO_DECL win_iocp_socket_service_base(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void base_shutdown();
-
- // Construct a new socket implementation.
- BOOST_ASIO_DECL void construct(base_implementation_type& impl);
-
- // Move-construct a new socket implementation.
- BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl);
-
- // Move-assign from another socket implementation.
- BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
- win_iocp_socket_service_base& other_service,
- base_implementation_type& other_impl);
-
- // Destroy a socket implementation.
- BOOST_ASIO_DECL void destroy(base_implementation_type& impl);
-
- // Determine whether the socket is open.
- bool is_open(const base_implementation_type& impl) const
- {
- return impl.socket_ != invalid_socket;
- }
-
- // Destroy a socket implementation.
- BOOST_ASIO_DECL boost::system::error_code close(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Release ownership of the socket.
- BOOST_ASIO_DECL socket_type release(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Cancel all operations associated with the socket.
- BOOST_ASIO_DECL boost::system::error_code cancel(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const base_implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return socket_ops::sockatmark(impl.socket_, ec);
- }
-
- // Determine the number of bytes available for reading.
- std::size_t available(const base_implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return socket_ops::available(impl.socket_, ec);
- }
-
- // Place the socket into the state where it will listen for new connections.
- boost::system::error_code listen(base_implementation_type& impl,
- int backlog, boost::system::error_code& ec)
- {
- socket_ops::listen(impl.socket_, backlog, ec);
- return ec;
- }
-
- // Perform an IO control command on the socket.
- template <typename IO_Control_Command>
- boost::system::error_code io_control(base_implementation_type& impl,
- IO_Control_Command& command, boost::system::error_code& ec)
- {
- socket_ops::ioctl(impl.socket_, impl.state_, command.name(),
- static_cast<ioctl_arg_type*>(command.data()), ec);
- return ec;
- }
-
- // Gets the non-blocking mode of the socket.
- bool non_blocking(const base_implementation_type& impl) const
- {
- return (impl.state_ & socket_ops::user_set_non_blocking) != 0;
- }
-
- // Sets the non-blocking mode of the socket.
- boost::system::error_code non_blocking(base_implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec);
- return ec;
- }
-
- // Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const base_implementation_type& impl) const
- {
- return (impl.state_ & socket_ops::internal_non_blocking) != 0;
- }
-
- // Sets the non-blocking mode of the native socket implementation.
- boost::system::error_code native_non_blocking(base_implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec);
- return ec;
- }
-
- // Wait for the socket to become ready to read, ready to write, or to have
- // pending error conditions.
- boost::system::error_code wait(base_implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- switch (w)
- {
- case socket_base::wait_read:
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
- break;
- case socket_base::wait_write:
- socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
- break;
- case socket_base::wait_error:
- socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
- break;
- default:
- ec = boost::asio::error::invalid_argument;
- break;
- }
-
- return ec;
- }
-
- // Asynchronously wait for the socket to become ready to read, ready to
- // write, or to have pending error conditions.
- template <typename Handler>
- void async_wait(base_implementation_type& impl,
- socket_base::wait_type w, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_wait_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_wait"));
-
- switch (w)
- {
- case socket_base::wait_read:
- start_null_buffers_receive_op(impl, 0, p.p);
- break;
- case socket_base::wait_write:
- start_reactor_op(impl, select_reactor::write_op, p.p);
- break;
- case socket_base::wait_error:
- start_reactor_op(impl, select_reactor::except_op, p.p);
- break;
- default:
- p.p->ec_ = boost::asio::error::invalid_argument;
- iocp_service_.post_immediate_completion(p.p, is_continuation);
- break;
- }
-
- p.v = p.p = 0;
- }
-
- // Send the given data to the peer. Returns the number of bytes sent.
- template <typename ConstBufferSequence>
- size_t send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- return socket_ops::sync_send(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
- }
-
- // Wait until data can be sent without blocking.
- size_t send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
-
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_send_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_send"));
-
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
-
- start_send_op(impl, bufs.buffers(), bufs.count(), flags,
- (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(),
- p.p);
- p.v = p.p = 0;
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_send(null_buffers)"));
-
- start_reactor_op(impl, select_reactor::write_op, p.p);
- p.v = p.p = 0;
- }
-
- // Receive some data from the peer. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- size_t receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- return socket_ops::sync_recv(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
- }
-
- // Wait until data can be received without blocking.
- size_t receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
-
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_recv_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.state_, impl.cancel_token_, buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_receive"));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- start_receive_op(impl, bufs.buffers(), bufs.count(), flags,
- (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(),
- p.p);
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_receive(null_buffers)"));
-
- start_null_buffers_receive_op(impl, flags, p.p);
- p.v = p.p = 0;
- }
-
- // Receive some data with associated flags. Returns the number of bytes
- // received.
- template <typename MutableBufferSequence>
- size_t receive_with_flags(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, boost::system::error_code& ec)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- return socket_ops::sync_recvmsg(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), in_flags, out_flags, ec);
- }
-
- // Wait until data can be received without blocking.
- size_t receive_with_flags(base_implementation_type& impl,
- const null_buffers&, socket_base::message_flags,
- socket_base::message_flags& out_flags, boost::system::error_code& ec)
- {
- // Wait for socket to become ready.
- socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
-
- // Clear out_flags, since we cannot give it any other sensible value when
- // performing a null_buffers operation.
- out_flags = 0;
-
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_with_flags(base_implementation_type& impl,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_recvmsg_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, buffers, out_flags, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_receive_with_flags"));
-
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
-
- start_receive_op(impl, bufs.buffers(), bufs.count(), in_flags, false, p.p);
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_with_flags(base_implementation_type& impl,
- const null_buffers&, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
- &impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
-
- // Reset out_flags since it can be given no sensible value at this time.
- out_flags = 0;
-
- start_null_buffers_receive_op(impl, in_flags, p.p);
- p.v = p.p = 0;
- }
-
- // Helper function to restart an asynchronous accept operation.
- BOOST_ASIO_DECL void restart_accept_op(socket_type s,
- socket_holder& new_socket, int family, int type, int protocol,
- void* output_buffer, DWORD address_length, operation* op);
-
-protected:
- // Open a new socket implementation.
- BOOST_ASIO_DECL boost::system::error_code do_open(
- base_implementation_type& impl, int family, int type,
- int protocol, boost::system::error_code& ec);
-
- // Assign a native socket to a socket implementation.
- BOOST_ASIO_DECL boost::system::error_code do_assign(
- base_implementation_type& impl, int type,
- socket_type native_socket, boost::system::error_code& ec);
-
- // Helper function to start an asynchronous send operation.
- BOOST_ASIO_DECL void start_send_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- socket_base::message_flags flags, bool noop, operation* op);
-
- // Helper function to start an asynchronous send_to operation.
- BOOST_ASIO_DECL void start_send_to_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- const socket_addr_type* addr, int addrlen,
- socket_base::message_flags flags, operation* op);
-
- // Helper function to start an asynchronous receive operation.
- BOOST_ASIO_DECL void start_receive_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- socket_base::message_flags flags, bool noop, operation* op);
-
- // Helper function to start an asynchronous null_buffers receive operation.
- BOOST_ASIO_DECL void start_null_buffers_receive_op(
- base_implementation_type& impl,
- socket_base::message_flags flags, reactor_op* op);
-
- // Helper function to start an asynchronous receive_from operation.
- BOOST_ASIO_DECL void start_receive_from_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
- socket_base::message_flags flags, int* addrlen, operation* op);
-
- // Helper function to start an asynchronous accept operation.
- BOOST_ASIO_DECL void start_accept_op(base_implementation_type& impl,
- bool peer_is_open, socket_holder& new_socket, int family, int type,
- int protocol, void* output_buffer, DWORD address_length, operation* op);
-
- // Start an asynchronous read or write operation using the reactor.
- BOOST_ASIO_DECL void start_reactor_op(base_implementation_type& impl,
- int op_type, reactor_op* op);
-
- // Start the asynchronous connect operation using the reactor.
- BOOST_ASIO_DECL void start_connect_op(base_implementation_type& impl,
- int family, int type, const socket_addr_type* remote_addr,
- std::size_t remote_addrlen, win_iocp_socket_connect_op_base* op);
-
- // Helper function to close a socket when the associated object is being
- // destroyed.
- BOOST_ASIO_DECL void close_for_destruction(base_implementation_type& impl);
-
- // Update the ID of the thread from which cancellation is safe.
- BOOST_ASIO_DECL void update_cancellation_thread_id(
- base_implementation_type& impl);
-
- // Helper function to get the reactor. If no reactor has been created yet, a
- // new one is obtained from the io_context and a pointer to it is cached in
- // this service.
- BOOST_ASIO_DECL select_reactor& get_reactor();
-
- // The type of a ConnectEx function pointer, as old SDKs may not provide it.
- typedef BOOL (PASCAL *connect_ex_fn)(SOCKET,
- const socket_addr_type*, int, void*, DWORD, DWORD*, OVERLAPPED*);
-
- // Helper function to get the ConnectEx pointer. If no ConnectEx pointer has
- // been obtained yet, one is obtained using WSAIoctl and the pointer is
- // cached. Returns a null pointer if ConnectEx is not available.
- BOOST_ASIO_DECL connect_ex_fn get_connect_ex(
- base_implementation_type& impl, int type);
-
- // The type of a NtSetInformationFile function pointer.
- typedef LONG (NTAPI *nt_set_info_fn)(HANDLE, ULONG_PTR*, void*, ULONG, ULONG);
-
- // Helper function to get the NtSetInformationFile function pointer. If no
- // NtSetInformationFile pointer has been obtained yet, one is obtained using
- // GetProcAddress and the pointer is cached. Returns a null pointer if
- // NtSetInformationFile is not available.
- BOOST_ASIO_DECL nt_set_info_fn get_nt_set_info();
-
- // Helper function to emulate InterlockedCompareExchangePointer functionality
- // for:
- // - very old Platform SDKs; and
- // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
- BOOST_ASIO_DECL void* interlocked_compare_exchange_pointer(
- void** dest, void* exch, void* cmp);
-
- // Helper function to emulate InterlockedExchangePointer functionality for:
- // - very old Platform SDKs; and
- // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
- BOOST_ASIO_DECL void* interlocked_exchange_pointer(void** dest, void* val);
-
- // The io_context used to obtain the reactor, if required.
- boost::asio::io_context& io_context_;
-
- // The IOCP service used for running asynchronous operations and dispatching
- // handlers.
- win_iocp_io_context& iocp_service_;
-
- // The reactor used for performing connect operations. This object is created
- // only if needed.
- select_reactor* reactor_;
-
- // Pointer to ConnectEx implementation.
- void* connect_ex_;
-
- // Pointer to NtSetInformationFile implementation.
- void* nt_set_info_;
-
- // Mutex to protect access to the linked list of implementations.
- boost::asio::detail::mutex mutex_;
-
- // The head of a linked list of all implementations.
- base_implementation_type* impl_list_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_iocp_socket_service_base.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 53f853e1041..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_thread_info.hpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// detail/win_iocp_thread_info.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_IOCP_THREAD_INFO_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/thread_info_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct win_iocp_thread_info : public thread_info_base
-{
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index b067da3e3d7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_wait_op.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// detail/win_iocp_wait_op.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_IOCP_WAIT_OP_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_WAIT_OP_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_IOCP)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/reactor_op.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class win_iocp_wait_op : public reactor_op
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_wait_op);
-
- win_iocp_wait_op(socket_ops::weak_cancel_token_type cancel_token,
- Handler& handler)
- : reactor_op(&win_iocp_wait_op::do_perform,
- &win_iocp_wait_op::do_complete),
- cancel_token_(cancel_token),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static status do_perform(reactor_op*)
- {
- return done;
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code& result_ec,
- std::size_t /*bytes_transferred*/)
- {
- boost::system::error_code ec(result_ec);
-
- // Take ownership of the operation object.
- win_iocp_wait_op* o(static_cast<win_iocp_wait_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // The reactor may have stored a result in the operation object.
- if (o->ec_)
- ec = o->ec_;
-
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- {
- if (o->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;
- }
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, ec);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- socket_ops::weak_cancel_token_type cancel_token_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_WAIT_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp
deleted file mode 100644
index 45d87c63bb1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// detail/win_mutex.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_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_WIN_MUTEX_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_WINDOWS)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_lock.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_mutex
- : private noncopyable
-{
-public:
- typedef boost::asio::detail::scoped_lock<win_mutex> scoped_lock;
-
- // Constructor.
- BOOST_ASIO_DECL win_mutex();
-
- // Destructor.
- ~win_mutex()
- {
- ::DeleteCriticalSection(&crit_section_);
- }
-
- // Lock the mutex.
- void lock()
- {
- ::EnterCriticalSection(&crit_section_);
- }
-
- // Unlock the mutex.
- void unlock()
- {
- ::LeaveCriticalSection(&crit_section_);
- }
-
-private:
- // Initialisation must be performed in a separate function to the constructor
- // since the compiler does not support the use of structured exceptions and
- // C++ exceptions in the same function.
- BOOST_ASIO_DECL int do_init();
-
- ::CRITICAL_SECTION crit_section_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_mutex.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_WIN_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 03fb6348887..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_object_handle_service.hpp
+++ /dev/null
@@ -1,186 +0,0 @@
-//
-// detail/win_object_handle_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
-//
-// Distributed under the 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_OBJECT_HANDLE_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_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_WINDOWS_OBJECT_HANDLE)
-
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/wait_handler.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class win_object_handle_service :
- public service_base<win_object_handle_service>
-{
-public:
- // The native type of an object handle.
- typedef HANDLE native_handle_type;
-
- // The implementation type of the object handle.
- class implementation_type
- {
- public:
- // Default constructor.
- implementation_type()
- : handle_(INVALID_HANDLE_VALUE),
- wait_handle_(INVALID_HANDLE_VALUE),
- owner_(0),
- next_(0),
- prev_(0)
- {
- }
-
- private:
- // Only this service will have access to the internal values.
- friend class win_object_handle_service;
-
- // The native object handle representation. May be accessed or modified
- // without locking the mutex.
- native_handle_type handle_;
-
- // The handle used to unregister the wait operation. The mutex must be
- // locked when accessing or modifying this member.
- HANDLE wait_handle_;
-
- // The operations waiting on the object handle. If there is a registered
- // wait then the mutex must be locked when accessing or modifying this
- // member
- op_queue<wait_op> op_queue_;
-
- // The service instance that owns the object handle implementation.
- win_object_handle_service* owner_;
-
- // Pointers to adjacent handle implementations in linked list. The mutex
- // must be locked when accessing or modifying these members.
- implementation_type* next_;
- implementation_type* prev_;
- };
-
- // Constructor.
- BOOST_ASIO_DECL win_object_handle_service(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Construct a new handle implementation.
- BOOST_ASIO_DECL void construct(implementation_type& impl);
-
- // Move-construct a new handle implementation.
- BOOST_ASIO_DECL void move_construct(implementation_type& impl,
- implementation_type& other_impl);
-
- // Move-assign from another handle implementation.
- BOOST_ASIO_DECL void move_assign(implementation_type& impl,
- win_object_handle_service& other_service,
- implementation_type& other_impl);
-
- // Destroy a handle implementation.
- BOOST_ASIO_DECL void destroy(implementation_type& impl);
-
- // Assign a native handle to a handle implementation.
- BOOST_ASIO_DECL boost::system::error_code assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec);
-
- // Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return impl.handle_ != INVALID_HANDLE_VALUE && impl.handle_ != 0;
- }
-
- // Destroy a handle implementation.
- BOOST_ASIO_DECL boost::system::error_code close(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Get the native handle representation.
- native_handle_type native_handle(const implementation_type& impl) const
- {
- return impl.handle_;
- }
-
- // Cancel all operations associated with the handle.
- BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
- boost::system::error_code& ec);
-
- // Perform a synchronous wait for the object to enter a signalled state.
- BOOST_ASIO_DECL void wait(implementation_type& impl,
- boost::system::error_code& ec);
-
- /// Start an asynchronous wait.
- template <typename Handler>
- void async_wait(implementation_type& impl, Handler& handler)
- {
- // Allocate and construct an operation to wrap the handler.
- typedef wait_handler<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_.context(), *p.p, "object_handle",
- &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "async_wait"));
-
- start_wait_op(impl, p.p);
- p.v = p.p = 0;
- }
-
-private:
- // Helper function to start an asynchronous wait operation.
- BOOST_ASIO_DECL void start_wait_op(implementation_type& impl, wait_op* op);
-
- // Helper function to register a wait operation.
- BOOST_ASIO_DECL void register_wait_callback(
- implementation_type& impl, mutex::scoped_lock& lock);
-
- // Callback function invoked when the registered wait completes.
- static BOOST_ASIO_DECL VOID CALLBACK wait_callback(
- PVOID param, BOOLEAN timeout);
-
- // The io_context implementation used to post completions.
- io_context_impl& io_context_;
-
- // Mutex to protect access to internal state.
- mutex mutex_;
-
- // The head of a linked list of all implementations.
- implementation_type* impl_list_;
-
- // Flag to indicate that the dispatcher has been shut down.
- bool shutdown_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_object_handle_service.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
-
-#endif // BOOST_ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp
deleted file mode 100644
index 78d3a2eb7f9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// detail/win_static_mutex.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_STATIC_MUTEX_HPP
-#define BOOST_ASIO_DETAIL_WIN_STATIC_MUTEX_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_WINDOWS)
-
-#include <boost/asio/detail/scoped_lock.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct win_static_mutex
-{
- typedef boost::asio::detail::scoped_lock<win_static_mutex> scoped_lock;
-
- // Initialise the mutex.
- BOOST_ASIO_DECL void init();
-
- // Initialisation must be performed in a separate function to the "public"
- // init() function since the compiler does not support the use of structured
- // exceptions and C++ exceptions in the same function.
- BOOST_ASIO_DECL int do_init();
-
- // Lock the mutex.
- void lock()
- {
- ::EnterCriticalSection(&crit_section_);
- }
-
- // Unlock the mutex.
- void unlock()
- {
- ::LeaveCriticalSection(&crit_section_);
- }
-
- bool initialised_;
- ::CRITICAL_SECTION crit_section_;
-};
-
-#if defined(UNDER_CE)
-# define BOOST_ASIO_WIN_STATIC_MUTEX_INIT { false, { 0, 0, 0, 0, 0 } }
-#else // defined(UNDER_CE)
-# define BOOST_ASIO_WIN_STATIC_MUTEX_INIT { false, { 0, 0, 0, 0, 0, 0 } }
-#endif // defined(UNDER_CE)
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_static_mutex.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_WIN_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp
deleted file mode 100644
index 377c3e3f937..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp
+++ /dev/null
@@ -1,149 +0,0 @@
-//
-// detail/win_thread.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_THREAD_HPP
-#define BOOST_ASIO_DETAIL_WIN_THREAD_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_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_APP) \
- && !defined(UNDER_CE)
-
-#include <cstddef>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-BOOST_ASIO_DECL unsigned int __stdcall win_thread_function(void* arg);
-
-#if defined(WINVER) && (WINVER < 0x0500)
-BOOST_ASIO_DECL void __stdcall apc_function(ULONG data);
-#else
-BOOST_ASIO_DECL void __stdcall apc_function(ULONG_PTR data);
-#endif
-
-template <typename T>
-class win_thread_base
-{
-public:
- static bool terminate_threads()
- {
- return ::InterlockedExchangeAdd(&terminate_threads_, 0) != 0;
- }
-
- static void set_terminate_threads(bool b)
- {
- ::InterlockedExchange(&terminate_threads_, b ? 1 : 0);
- }
-
-private:
- static long terminate_threads_;
-};
-
-template <typename T>
-long win_thread_base<T>::terminate_threads_ = 0;
-
-class win_thread
- : private noncopyable,
- public win_thread_base<win_thread>
-{
-public:
- // Constructor.
- template <typename Function>
- win_thread(Function f, unsigned int stack_size = 0)
- : thread_(0),
- exit_event_(0)
- {
- start_thread(new func<Function>(f), stack_size);
- }
-
- // Destructor.
- BOOST_ASIO_DECL ~win_thread();
-
- // Wait for the thread to exit.
- BOOST_ASIO_DECL void join();
-
- // Get number of CPUs.
- BOOST_ASIO_DECL static std::size_t hardware_concurrency();
-
-private:
- friend BOOST_ASIO_DECL unsigned int __stdcall win_thread_function(void* arg);
-
-#if defined(WINVER) && (WINVER < 0x0500)
- friend BOOST_ASIO_DECL void __stdcall apc_function(ULONG);
-#else
- friend BOOST_ASIO_DECL void __stdcall apc_function(ULONG_PTR);
-#endif
-
- class func_base
- {
- public:
- virtual ~func_base() {}
- virtual void run() = 0;
- ::HANDLE entry_event_;
- ::HANDLE exit_event_;
- };
-
- struct auto_func_base_ptr
- {
- func_base* ptr;
- ~auto_func_base_ptr() { delete ptr; }
- };
-
- template <typename Function>
- class func
- : public func_base
- {
- public:
- func(Function f)
- : f_(f)
- {
- }
-
- virtual void run()
- {
- f_();
- }
-
- private:
- Function f_;
- };
-
- BOOST_ASIO_DECL void start_thread(func_base* arg, unsigned int stack_size);
-
- ::HANDLE thread_;
- ::HANDLE exit_event_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_thread.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_APP)
- // && !defined(UNDER_CE)
-
-#endif // BOOST_ASIO_DETAIL_WIN_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp
deleted file mode 100644
index e1761c2e271..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// detail/win_tss_ptr.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_TSS_PTR_HPP
-#define BOOST_ASIO_DETAIL_WIN_TSS_PTR_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_WINDOWS)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Helper function to create thread-specific storage.
-BOOST_ASIO_DECL DWORD win_tss_ptr_create();
-
-template <typename T>
-class win_tss_ptr
- : private noncopyable
-{
-public:
- // Constructor.
- win_tss_ptr()
- : tss_key_(win_tss_ptr_create())
- {
- }
-
- // Destructor.
- ~win_tss_ptr()
- {
- ::TlsFree(tss_key_);
- }
-
- // Get the value.
- operator T*() const
- {
- return static_cast<T*>(::TlsGetValue(tss_key_));
- }
-
- // Set the value.
- void operator=(T* value)
- {
- ::TlsSetValue(tss_key_, value);
- }
-
-private:
- // Thread-specific storage to allow unlocked access to determine whether a
- // thread is a member of the pool.
- DWORD tss_key_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/win_tss_ptr.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS)
-
-#endif // BOOST_ASIO_DETAIL_WIN_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp
deleted file mode 100644
index 775f663d842..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// detail/winapp_thread.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_WINAPP_THREAD_HPP
-#define BOOST_ASIO_DETAIL_WINAPP_THREAD_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_WINDOWS) && defined(BOOST_ASIO_WINDOWS_APP)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-DWORD WINAPI winapp_thread_function(LPVOID arg);
-
-class winapp_thread
- : private noncopyable
-{
-public:
- // Constructor.
- template <typename Function>
- winapp_thread(Function f, unsigned int = 0)
- {
- scoped_ptr<func_base> arg(new func<Function>(f));
- DWORD thread_id = 0;
- thread_ = ::CreateThread(0, 0, winapp_thread_function,
- arg.get(), 0, &thread_id);
- if (!thread_)
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread");
- }
- arg.release();
- }
-
- // Destructor.
- ~winapp_thread()
- {
- ::CloseHandle(thread_);
- }
-
- // Wait for the thread to exit.
- void join()
- {
- ::WaitForSingleObjectEx(thread_, INFINITE, false);
- }
-
- // Get number of CPUs.
- static std::size_t hardware_concurrency()
- {
- SYSTEM_INFO system_info;
- ::GetNativeSystemInfo(&system_info);
- return system_info.dwNumberOfProcessors;
- }
-
-private:
- friend DWORD WINAPI winapp_thread_function(LPVOID arg);
-
- class func_base
- {
- public:
- virtual ~func_base() {}
- virtual void run() = 0;
- };
-
- template <typename Function>
- class func
- : public func_base
- {
- public:
- func(Function f)
- : f_(f)
- {
- }
-
- virtual void run()
- {
- f_();
- }
-
- private:
- Function f_;
- };
-
- ::HANDLE thread_;
-};
-
-inline DWORD WINAPI winapp_thread_function(LPVOID arg)
-{
- scoped_ptr<winapp_thread::func_base> func(
- static_cast<winapp_thread::func_base*>(arg));
- func->run();
- return 0;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS) && defined(BOOST_ASIO_WINDOWS_APP)
-
-#endif // BOOST_ASIO_DETAIL_WINAPP_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp
deleted file mode 100644
index 77ec7c82658..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// detail/wince_thread.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_WINCE_THREAD_HPP
-#define BOOST_ASIO_DETAIL_WINCE_THREAD_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_WINDOWS) && defined(UNDER_CE)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-DWORD WINAPI wince_thread_function(LPVOID arg);
-
-class wince_thread
- : private noncopyable
-{
-public:
- // Constructor.
- template <typename Function>
- wince_thread(Function f, unsigned int = 0)
- {
- scoped_ptr<func_base> arg(new func<Function>(f));
- DWORD thread_id = 0;
- thread_ = ::CreateThread(0, 0, wince_thread_function,
- arg.get(), 0, &thread_id);
- if (!thread_)
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread");
- }
- arg.release();
- }
-
- // Destructor.
- ~wince_thread()
- {
- ::CloseHandle(thread_);
- }
-
- // Wait for the thread to exit.
- void join()
- {
- ::WaitForSingleObject(thread_, INFINITE);
- }
-
- // Get number of CPUs.
- static std::size_t hardware_concurrency()
- {
- SYSTEM_INFO system_info;
- ::GetSystemInfo(&system_info);
- return system_info.dwNumberOfProcessors;
- }
-
-private:
- friend DWORD WINAPI wince_thread_function(LPVOID arg);
-
- class func_base
- {
- public:
- virtual ~func_base() {}
- virtual void run() = 0;
- };
-
- template <typename Function>
- class func
- : public func_base
- {
- public:
- func(Function f)
- : f_(f)
- {
- }
-
- virtual void run()
- {
- f_();
- }
-
- private:
- Function f_;
- };
-
- ::HANDLE thread_;
-};
-
-inline DWORD WINAPI wince_thread_function(LPVOID arg)
-{
- scoped_ptr<wince_thread::func_base> func(
- static_cast<wince_thread::func_base*>(arg));
- func->run();
- return 0;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE)
-
-#endif // BOOST_ASIO_DETAIL_WINCE_THREAD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp
deleted file mode 100644
index 57d6a1c218e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp
+++ /dev/null
@@ -1,296 +0,0 @@
-//
-// detail/winrt_async_manager.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_WINRT_ASYNC_MANAGER_HPP
-#define BOOST_ASIO_DETAIL_WINRT_ASYNC_MANAGER_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_WINDOWS_RUNTIME)
-
-#include <future>
-#include <boost/asio/detail/atomic_count.hpp>
-#include <boost/asio/detail/winrt_async_op.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class winrt_async_manager
- : public boost::asio::detail::service_base<winrt_async_manager>
-{
-public:
- // Constructor.
- winrt_async_manager(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<winrt_async_manager>(io_context),
- io_context_(use_service<io_context_impl>(io_context)),
- outstanding_ops_(1)
- {
- }
-
- // Destructor.
- ~winrt_async_manager()
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- if (--outstanding_ops_ > 0)
- {
- // Block until last operation is complete.
- std::future<void> f = promise_.get_future();
- f.wait();
- }
- }
-
- void sync(Windows::Foundation::IAsyncAction^ action,
- boost::system::error_code& ec)
- {
- using namespace Windows::Foundation;
- using Windows::Foundation::AsyncStatus;
-
- auto promise = std::make_shared<std::promise<boost::system::error_code>>();
- auto future = promise->get_future();
-
- action->Completed = ref new AsyncActionCompletedHandler(
- [promise](IAsyncAction^ action, AsyncStatus status)
- {
- switch (status)
- {
- case AsyncStatus::Canceled:
- promise->set_value(boost::asio::error::operation_aborted);
- break;
- case AsyncStatus::Error:
- case AsyncStatus::Completed:
- default:
- boost::system::error_code ec(
- action->ErrorCode.Value,
- boost::system::system_category());
- promise->set_value(ec);
- break;
- }
- });
-
- ec = future.get();
- }
-
- template <typename TResult>
- TResult sync(Windows::Foundation::IAsyncOperation<TResult>^ operation,
- boost::system::error_code& ec)
- {
- using namespace Windows::Foundation;
- using Windows::Foundation::AsyncStatus;
-
- auto promise = std::make_shared<std::promise<boost::system::error_code>>();
- auto future = promise->get_future();
-
- operation->Completed = ref new AsyncOperationCompletedHandler<TResult>(
- [promise](IAsyncOperation<TResult>^ operation, AsyncStatus status)
- {
- switch (status)
- {
- case AsyncStatus::Canceled:
- promise->set_value(boost::asio::error::operation_aborted);
- break;
- case AsyncStatus::Error:
- case AsyncStatus::Completed:
- default:
- boost::system::error_code ec(
- operation->ErrorCode.Value,
- boost::system::system_category());
- promise->set_value(ec);
- break;
- }
- });
-
- ec = future.get();
- return operation->GetResults();
- }
-
- template <typename TResult, typename TProgress>
- TResult sync(
- Windows::Foundation::IAsyncOperationWithProgress<
- TResult, TProgress>^ operation,
- boost::system::error_code& ec)
- {
- using namespace Windows::Foundation;
- using Windows::Foundation::AsyncStatus;
-
- auto promise = std::make_shared<std::promise<boost::system::error_code>>();
- auto future = promise->get_future();
-
- operation->Completed
- = ref new AsyncOperationWithProgressCompletedHandler<TResult, TProgress>(
- [promise](IAsyncOperationWithProgress<TResult, TProgress>^ operation,
- AsyncStatus status)
- {
- switch (status)
- {
- case AsyncStatus::Canceled:
- promise->set_value(boost::asio::error::operation_aborted);
- break;
- case AsyncStatus::Started:
- break;
- case AsyncStatus::Error:
- case AsyncStatus::Completed:
- default:
- boost::system::error_code ec(
- operation->ErrorCode.Value,
- boost::system::system_category());
- promise->set_value(ec);
- break;
- }
- });
-
- ec = future.get();
- return operation->GetResults();
- }
-
- void async(Windows::Foundation::IAsyncAction^ action,
- winrt_async_op<void>* handler)
- {
- using namespace Windows::Foundation;
- using Windows::Foundation::AsyncStatus;
-
- auto on_completed = ref new AsyncActionCompletedHandler(
- [this, handler](IAsyncAction^ action, AsyncStatus status)
- {
- switch (status)
- {
- case AsyncStatus::Canceled:
- handler->ec_ = boost::asio::error::operation_aborted;
- break;
- case AsyncStatus::Started:
- return;
- case AsyncStatus::Completed:
- case AsyncStatus::Error:
- default:
- handler->ec_ = boost::system::error_code(
- action->ErrorCode.Value,
- boost::system::system_category());
- break;
- }
- io_context_.post_deferred_completion(handler);
- if (--outstanding_ops_ == 0)
- promise_.set_value();
- });
-
- io_context_.work_started();
- ++outstanding_ops_;
- action->Completed = on_completed;
- }
-
- template <typename TResult>
- void async(Windows::Foundation::IAsyncOperation<TResult>^ operation,
- winrt_async_op<TResult>* handler)
- {
- using namespace Windows::Foundation;
- using Windows::Foundation::AsyncStatus;
-
- auto on_completed = ref new AsyncOperationCompletedHandler<TResult>(
- [this, handler](IAsyncOperation<TResult>^ operation, AsyncStatus status)
- {
- switch (status)
- {
- case AsyncStatus::Canceled:
- handler->ec_ = boost::asio::error::operation_aborted;
- break;
- case AsyncStatus::Started:
- return;
- case AsyncStatus::Completed:
- handler->result_ = operation->GetResults();
- // Fall through.
- case AsyncStatus::Error:
- default:
- handler->ec_ = boost::system::error_code(
- operation->ErrorCode.Value,
- boost::system::system_category());
- break;
- }
- io_context_.post_deferred_completion(handler);
- if (--outstanding_ops_ == 0)
- promise_.set_value();
- });
-
- io_context_.work_started();
- ++outstanding_ops_;
- operation->Completed = on_completed;
- }
-
- template <typename TResult, typename TProgress>
- void async(
- Windows::Foundation::IAsyncOperationWithProgress<
- TResult, TProgress>^ operation,
- winrt_async_op<TResult>* handler)
- {
- using namespace Windows::Foundation;
- using Windows::Foundation::AsyncStatus;
-
- auto on_completed
- = ref new AsyncOperationWithProgressCompletedHandler<TResult, TProgress>(
- [this, handler](IAsyncOperationWithProgress<
- TResult, TProgress>^ operation, AsyncStatus status)
- {
- switch (status)
- {
- case AsyncStatus::Canceled:
- handler->ec_ = boost::asio::error::operation_aborted;
- break;
- case AsyncStatus::Started:
- return;
- case AsyncStatus::Completed:
- handler->result_ = operation->GetResults();
- // Fall through.
- case AsyncStatus::Error:
- default:
- handler->ec_ = boost::system::error_code(
- operation->ErrorCode.Value,
- boost::system::system_category());
- break;
- }
- io_context_.post_deferred_completion(handler);
- if (--outstanding_ops_ == 0)
- promise_.set_value();
- });
-
- io_context_.work_started();
- ++outstanding_ops_;
- operation->Completed = on_completed;
- }
-
-private:
- // The io_context implementation used to post completed handlers.
- io_context_impl& io_context_;
-
- // Count of outstanding operations.
- atomic_count outstanding_ops_;
-
- // Used to keep wait for outstanding operations to complete.
- std::promise<void> promise_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_ASYNC_MANAGER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp
deleted file mode 100644
index c3203ff88aa..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// detail/winrt_async_op.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_WINRT_ASYNC_OP_HPP
-#define BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_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/operation.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename TResult>
-class winrt_async_op
- : public operation
-{
-public:
- // The error code to be passed to the completion handler.
- boost::system::error_code ec_;
-
- // The result of the operation, to be passed to the completion handler.
- TResult result_;
-
-protected:
- winrt_async_op(func_type complete_func)
- : operation(complete_func),
- result_()
- {
- }
-};
-
-template <>
-class winrt_async_op<void>
- : public operation
-{
-public:
- // The error code to be passed to the completion handler.
- boost::system::error_code ec_;
-
-protected:
- winrt_async_op(func_type complete_func)
- : operation(complete_func)
- {
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp
deleted file mode 100644
index 80f102f4c81..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// detail/winrt_resolve_op.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_WINRT_RESOLVE_OP_HPP
-#define BOOST_ASIO_DETAIL_WINRT_RESOLVE_OP_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/winrt_async_op.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol, typename Handler>
-class winrt_resolve_op :
- public winrt_async_op<
- Windows::Foundation::Collections::IVectorView<
- Windows::Networking::EndpointPair^>^>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_resolve_op);
-
- typedef typename Protocol::endpoint endpoint_type;
- typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
- typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
-
- winrt_resolve_op(const query_type& query, Handler& handler)
- : winrt_async_op<
- Windows::Foundation::Collections::IVectorView<
- Windows::Networking::EndpointPair^>^>(
- &winrt_resolve_op::do_complete),
- query_(query),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code&, std::size_t)
- {
- // Take ownership of the operation object.
- winrt_resolve_op* o(static_cast<winrt_resolve_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- results_type results = results_type();
- if (!o->ec_)
- {
- try
- {
- results = results_type::create(o->result_, o->query_.hints(),
- o->query_.host_name(), o->query_.service_name());
- }
- catch (Platform::Exception^ e)
- {
- o->ec_ = boost::system::error_code(e->HResult,
- boost::system::system_category());
- }
- }
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, results_type>
- handler(o->handler_, o->ec_, results);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- query_type query_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_RESOLVE_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp
deleted file mode 100644
index 463dbde11fd..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp
+++ /dev/null
@@ -1,200 +0,0 @@
-//
-// detail/winrt_resolver_service.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_WINRT_RESOLVER_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_WINRT_RESOLVER_SERVICE_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/winrt_async_manager.hpp>
-#include <boost/asio/detail/winrt_resolve_op.hpp>
-#include <boost/asio/detail/winrt_utils.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol>
-class winrt_resolver_service :
- public service_base<winrt_resolver_service<Protocol> >
-{
-public:
- // The implementation type of the resolver. A cancellation token is used to
- // indicate to the asynchronous operation that the operation has been
- // cancelled.
- typedef socket_ops::shared_cancel_token_type implementation_type;
-
- // The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- // The query type.
- typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
-
- // The results type.
- typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
-
- // Constructor.
- winrt_resolver_service(boost::asio::io_context& io_context)
- : service_base<winrt_resolver_service<Protocol> >(io_context),
- io_context_(use_service<io_context_impl>(io_context)),
- async_manager_(use_service<winrt_async_manager>(io_context))
- {
- }
-
- // Destructor.
- ~winrt_resolver_service()
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(boost::asio::io_context::fork_event)
- {
- }
-
- // Construct a new resolver implementation.
- void construct(implementation_type&)
- {
- }
-
- // Move-construct a new resolver implementation.
- void move_construct(implementation_type&,
- implementation_type&)
- {
- }
-
- // Move-assign from another resolver implementation.
- void move_assign(implementation_type&,
- winrt_resolver_service&, implementation_type&)
- {
- }
-
- // Destroy a resolver implementation.
- void destroy(implementation_type&)
- {
- }
-
- // Cancel pending asynchronous operations.
- void cancel(implementation_type&)
- {
- }
-
- // Resolve a query to a list of entries.
- results_type resolve(implementation_type&,
- const query_type& query, boost::system::error_code& ec)
- {
- try
- {
- using namespace Windows::Networking::Sockets;
- auto endpoint_pairs = async_manager_.sync(
- DatagramSocket::GetEndpointPairsAsync(
- winrt_utils::host_name(query.host_name()),
- winrt_utils::string(query.service_name())), ec);
-
- if (ec)
- return results_type();
-
- return results_type::create(
- endpoint_pairs, query.hints(),
- query.host_name(), query.service_name());
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- return results_type();
- }
- }
-
- // Asynchronously resolve a query to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type& impl,
- const query_type& query, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef winrt_resolve_op<Protocol, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(query, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_.context(),
- *p.p, "resolver", &impl, 0, "async_resolve"));
- (void)impl;
-
- try
- {
- using namespace Windows::Networking::Sockets;
- async_manager_.async(DatagramSocket::GetEndpointPairsAsync(
- winrt_utils::host_name(query.host_name()),
- winrt_utils::string(query.service_name())), p.p);
- p.v = p.p = 0;
- }
- catch (Platform::Exception^ e)
- {
- p.p->ec_ = boost::system::error_code(
- e->HResult, boost::system::system_category());
- io_context_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- }
- }
-
- // Resolve an endpoint to a list of entries.
- results_type resolve(implementation_type&,
- const endpoint_type&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return results_type();
- }
-
- // Asynchronously resolve an endpoint to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type&,
- const endpoint_type&, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const results_type results;
- io_context_.get_io_context().post(
- detail::bind_handler(handler, ec, results));
- }
-
-private:
- io_context_impl& io_context_;
- winrt_async_manager& async_manager_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_RESOLVER_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 9926da97d97..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_connect_op.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// detail/winrt_socket_connect_op.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_WINRT_SOCKET_CONNECT_OP_HPP
-#define BOOST_ASIO_DETAIL_WINRT_SOCKET_CONNECT_OP_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/winrt_async_op.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class winrt_socket_connect_op :
- public winrt_async_op<void>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_connect_op);
-
- winrt_socket_connect_op(Handler& handler)
- : winrt_async_op<void>(&winrt_socket_connect_op::do_complete),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code&, std::size_t)
- {
- // Take ownership of the operation object.
- winrt_socket_connect_op* o(static_cast<winrt_socket_connect_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, boost::system::error_code>
- handler(o->handler_, o->ec_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_SOCKET_CONNECT_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 0701208da47..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_recv_op.hpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// detail/winrt_socket_recv_op.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_WINRT_SOCKET_RECV_OP_HPP
-#define BOOST_ASIO_DETAIL_WINRT_SOCKET_RECV_OP_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/winrt_async_op.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename MutableBufferSequence, typename Handler>
-class winrt_socket_recv_op :
- public winrt_async_op<Windows::Storage::Streams::IBuffer^>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_recv_op);
-
- winrt_socket_recv_op(const MutableBufferSequence& buffers, Handler& handler)
- : winrt_async_op<Windows::Storage::Streams::IBuffer^>(
- &winrt_socket_recv_op::do_complete),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code&, std::size_t)
- {
- // Take ownership of the operation object.
- winrt_socket_recv_op* o(static_cast<winrt_socket_recv_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- // Check whether buffers are still valid.
- if (owner)
- {
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- std::size_t bytes_transferred = o->result_ ? o->result_->Length : 0;
- if (bytes_transferred == 0 && !o->ec_ &&
- !buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::all_empty(o->buffers_))
- {
- o->ec_ = boost::asio::error::eof;
- }
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, bytes_transferred);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- MutableBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_SOCKET_RECV_OP_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 4e62056c4f4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_send_op.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// detail/winrt_socket_send_op.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_WINRT_SOCKET_SEND_OP_HPP
-#define BOOST_ASIO_DETAIL_WINRT_SOCKET_SEND_OP_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/winrt_async_op.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename ConstBufferSequence, typename Handler>
-class winrt_socket_send_op :
- public winrt_async_op<unsigned int>
-{
-public:
- BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_send_op);
-
- winrt_socket_send_op(const ConstBufferSequence& buffers, Handler& handler)
- : winrt_async_op<unsigned int>(&winrt_socket_send_op::do_complete),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- handler_work<Handler>::start(handler_);
- }
-
- static void do_complete(void* owner, operation* base,
- const boost::system::error_code&, std::size_t)
- {
- // Take ownership of the operation object.
- winrt_socket_send_op* o(static_cast<winrt_socket_send_op*>(base));
- ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
-
- BOOST_ASIO_HANDLER_COMPLETION((*o));
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- // Check whether buffers are still valid.
- if (owner)
- {
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::validate(o->buffers_);
- }
-#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder2<Handler, boost::system::error_code, std::size_t>
- handler(o->handler_, o->ec_, o->result_);
- p.h = boost::asio::detail::addressof(handler.handler_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
- w.complete(handler, handler.handler_);
- BOOST_ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- ConstBufferSequence buffers_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_SOCKET_SEND_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp
deleted file mode 100644
index c874f2520d4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp
+++ /dev/null
@@ -1,243 +0,0 @@
-//
-// detail/winrt_ssocket_service.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_WINRT_SSOCKET_SERVICE_HPP
-#define BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/winrt_socket_connect_op.hpp>
-#include <boost/asio/detail/winrt_ssocket_service_base.hpp>
-#include <boost/asio/detail/winrt_utils.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Protocol>
-class winrt_ssocket_service :
- public service_base<winrt_ssocket_service<Protocol> >,
- public winrt_ssocket_service_base
-{
-public:
- // The protocol type.
- typedef Protocol protocol_type;
-
- // The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
- // The native type of a socket.
- typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
-
- // The implementation type of the socket.
- struct implementation_type : base_implementation_type
- {
- // Default constructor.
- implementation_type()
- : base_implementation_type(),
- protocol_(endpoint_type().protocol())
- {
- }
-
- // The protocol associated with the socket.
- protocol_type protocol_;
- };
-
- // Constructor.
- winrt_ssocket_service(boost::asio::io_context& io_context)
- : service_base<winrt_ssocket_service<Protocol> >(io_context),
- winrt_ssocket_service_base(io_context)
- {
- }
-
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- this->base_shutdown();
- }
-
- // Move-construct a new socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- this->base_move_construct(impl, other_impl);
-
- impl.protocol_ = other_impl.protocol_;
- other_impl.protocol_ = endpoint_type().protocol();
- }
-
- // Move-assign from another socket implementation.
- void move_assign(implementation_type& impl,
- winrt_ssocket_service& other_service,
- implementation_type& other_impl)
- {
- this->base_move_assign(impl, other_service, other_impl);
-
- impl.protocol_ = other_impl.protocol_;
- other_impl.protocol_ = endpoint_type().protocol();
- }
-
- // Move-construct a new socket implementation from another protocol type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- winrt_ssocket_service<Protocol1>&,
- typename winrt_ssocket_service<
- Protocol1>::implementation_type& other_impl)
- {
- this->base_move_construct(impl, other_impl);
-
- impl.protocol_ = protocol_type(other_impl.protocol_);
- other_impl.protocol_ = typename Protocol1::endpoint().protocol();
- }
-
- // Open a new socket implementation.
- boost::system::error_code open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- try
- {
- impl.socket_ = ref new Windows::Networking::Sockets::StreamSocket;
- impl.protocol_ = protocol;
- ec = boost::system::error_code();
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- }
-
- return ec;
- }
-
- // Assign a native socket to a socket implementation.
- boost::system::error_code assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- if (is_open(impl))
- {
- ec = boost::asio::error::already_open;
- return ec;
- }
-
- impl.socket_ = native_socket;
- impl.protocol_ = protocol;
- ec = boost::system::error_code();
-
- return ec;
- }
-
- // Bind the socket to the specified local endpoint.
- boost::system::error_code bind(implementation_type&,
- const endpoint_type&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- endpoint_type endpoint;
- endpoint.resize(do_get_endpoint(impl, true,
- endpoint.data(), endpoint.size(), ec));
- return endpoint;
- }
-
- // Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- endpoint_type endpoint;
- endpoint.resize(do_get_endpoint(impl, false,
- endpoint.data(), endpoint.size(), ec));
- return endpoint;
- }
-
- // Set a socket option.
- template <typename Option>
- boost::system::error_code set_option(implementation_type& impl,
- const Option& option, boost::system::error_code& ec)
- {
- return do_set_option(impl, option.level(impl.protocol_),
- option.name(impl.protocol_), option.data(impl.protocol_),
- option.size(impl.protocol_), ec);
- }
-
- // Get a socket option.
- template <typename Option>
- boost::system::error_code get_option(const implementation_type& impl,
- Option& option, boost::system::error_code& ec) const
- {
- std::size_t size = option.size(impl.protocol_);
- do_get_option(impl, option.level(impl.protocol_),
- option.name(impl.protocol_),
- option.data(impl.protocol_), &size, ec);
- if (!ec)
- option.resize(impl.protocol_, size);
- return ec;
- }
-
- // Connect the socket to the specified endpoint.
- boost::system::error_code connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- return do_connect(impl, peer_endpoint.data(), ec);
- }
-
- // Start an asynchronous connect.
- template <typename Handler>
- void async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef winrt_socket_connect_op<Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_.context(),
- *p.p, "socket", &impl, 0, "async_connect"));
-
- start_connect_op(impl, peer_endpoint.data(), p.p, is_continuation);
- p.v = p.p = 0;
- }
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index dcb5aa1c40a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service_base.hpp
+++ /dev/null
@@ -1,361 +0,0 @@
-//
-// detail/winrt_ssocket_service_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_DETAIL_WINRT_SSOCKET_SERVICE_BASE_HPP
-#define BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_BASE_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_WINDOWS_RUNTIME)
-
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/winrt_async_manager.hpp>
-#include <boost/asio/detail/winrt_socket_recv_op.hpp>
-#include <boost/asio/detail/winrt_socket_send_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class winrt_ssocket_service_base
-{
-public:
- // The native type of a socket.
- typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
-
- // The implementation type of the socket.
- struct base_implementation_type
- {
- // Default constructor.
- base_implementation_type()
- : socket_(nullptr),
- next_(0),
- prev_(0)
- {
- }
-
- // The underlying native socket.
- native_handle_type socket_;
-
- // Pointers to adjacent socket implementations in linked list.
- base_implementation_type* next_;
- base_implementation_type* prev_;
- };
-
- // Constructor.
- BOOST_ASIO_DECL winrt_ssocket_service_base(
- boost::asio::io_context& io_context);
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void base_shutdown();
-
- // Construct a new socket implementation.
- BOOST_ASIO_DECL void construct(base_implementation_type&);
-
- // Move-construct a new socket implementation.
- BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl);
-
- // Move-assign from another socket implementation.
- BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
- winrt_ssocket_service_base& other_service,
- base_implementation_type& other_impl);
-
- // Destroy a socket implementation.
- BOOST_ASIO_DECL void destroy(base_implementation_type& impl);
-
- // Determine whether the socket is open.
- bool is_open(const base_implementation_type& impl) const
- {
- return impl.socket_ != nullptr;
- }
-
- // Destroy a socket implementation.
- BOOST_ASIO_DECL boost::system::error_code close(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Release ownership of the socket.
- BOOST_ASIO_DECL native_handle_type release(
- base_implementation_type& impl, boost::system::error_code& ec);
-
- // Get the native socket representation.
- native_handle_type native_handle(base_implementation_type& impl)
- {
- return impl.socket_;
- }
-
- // Cancel all operations associated with the socket.
- boost::system::error_code cancel(base_implementation_type&,
- boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const base_implementation_type&,
- boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return false;
- }
-
- // Determine the number of bytes available for reading.
- std::size_t available(const base_implementation_type&,
- boost::system::error_code& ec) const
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Perform an IO control command on the socket.
- template <typename IO_Control_Command>
- boost::system::error_code io_control(base_implementation_type&,
- IO_Control_Command&, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Gets the non-blocking mode of the socket.
- bool non_blocking(const base_implementation_type&) const
- {
- return false;
- }
-
- // Sets the non-blocking mode of the socket.
- boost::system::error_code non_blocking(base_implementation_type&,
- bool, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const base_implementation_type&) const
- {
- return false;
- }
-
- // Sets the non-blocking mode of the native socket implementation.
- boost::system::error_code native_non_blocking(base_implementation_type&,
- bool, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Disable sends or receives on the socket.
- boost::system::error_code shutdown(base_implementation_type&,
- socket_base::shutdown_type, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return ec;
- }
-
- // Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return do_send(impl,
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::first(buffers), flags, ec);
- }
-
- // Wait until data can be sent without blocking.
- std::size_t send(base_implementation_type&, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous send. The data being sent must be valid for the
- // lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef winrt_socket_send_op<ConstBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_.context(),
- *p.p, "socket", &impl, 0, "async_send"));
-
- start_send_op(impl,
- buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::first(buffers),
- flags, p.p, is_continuation);
- p.v = p.p = 0;
- }
-
- // Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
- void async_send(base_implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.get_io_context().post(
- detail::bind_handler(handler, ec, bytes_transferred));
- }
-
- // Receive some data from the peer. Returns the number of bytes received.
- template <typename MutableBufferSequence>
- std::size_t receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return do_receive(impl,
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::first(buffers), flags, ec);
- }
-
- // Wait until data can be received without blocking.
- std::size_t receive(base_implementation_type&, const null_buffers&,
- socket_base::message_flags, boost::system::error_code& ec)
- {
- ec = boost::asio::error::operation_not_supported;
- return 0;
- }
-
- // Start an asynchronous receive. The buffer for the data being received
- // must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- {
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef winrt_socket_recv_op<MutableBufferSequence, Handler> op;
- typename op::ptr p = { boost::asio::detail::addressof(handler),
- op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
-
- BOOST_ASIO_HANDLER_CREATION((io_context_.context(),
- *p.p, "socket", &impl, 0, "async_receive"));
-
- start_receive_op(impl,
- buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::first(buffers),
- flags, p.p, is_continuation);
- p.v = p.p = 0;
- }
-
- // Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive(base_implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
- {
- boost::system::error_code ec = boost::asio::error::operation_not_supported;
- const std::size_t bytes_transferred = 0;
- io_context_.get_io_context().post(
- detail::bind_handler(handler, ec, bytes_transferred));
- }
-
-protected:
- // Helper function to obtain endpoints associated with the connection.
- BOOST_ASIO_DECL std::size_t do_get_endpoint(
- const base_implementation_type& impl, bool local,
- void* addr, std::size_t addr_len, boost::system::error_code& ec) const;
-
- // Helper function to set a socket option.
- BOOST_ASIO_DECL boost::system::error_code do_set_option(
- base_implementation_type& impl,
- int level, int optname, const void* optval,
- std::size_t optlen, boost::system::error_code& ec);
-
- // Helper function to get a socket option.
- BOOST_ASIO_DECL void do_get_option(
- const base_implementation_type& impl,
- int level, int optname, void* optval,
- std::size_t* optlen, boost::system::error_code& ec) const;
-
- // Helper function to perform a synchronous connect.
- BOOST_ASIO_DECL boost::system::error_code do_connect(
- base_implementation_type& impl,
- const void* addr, boost::system::error_code& ec);
-
- // Helper function to start an asynchronous connect.
- BOOST_ASIO_DECL void start_connect_op(
- base_implementation_type& impl, const void* addr,
- winrt_async_op<void>* op, bool is_continuation);
-
- // Helper function to perform a synchronous send.
- BOOST_ASIO_DECL std::size_t do_send(
- base_implementation_type& impl, const boost::asio::const_buffer& data,
- socket_base::message_flags flags, boost::system::error_code& ec);
-
- // Helper function to start an asynchronous send.
- BOOST_ASIO_DECL void start_send_op(base_implementation_type& impl,
- const boost::asio::const_buffer& data, socket_base::message_flags flags,
- winrt_async_op<unsigned int>* op, bool is_continuation);
-
- // Helper function to perform a synchronous receive.
- BOOST_ASIO_DECL std::size_t do_receive(
- base_implementation_type& impl, const boost::asio::mutable_buffer& data,
- socket_base::message_flags flags, boost::system::error_code& ec);
-
- // Helper function to start an asynchronous receive.
- BOOST_ASIO_DECL void start_receive_op(base_implementation_type& impl,
- const boost::asio::mutable_buffer& data, socket_base::message_flags flags,
- winrt_async_op<Windows::Storage::Streams::IBuffer^>* op,
- bool is_continuation);
-
- // The io_context implementation used for delivering completions.
- io_context_impl& io_context_;
-
- // The manager that keeps track of outstanding operations.
- winrt_async_manager& async_manager_;
-
- // Mutex to protect access to the linked list of implementations.
- boost::asio::detail::mutex mutex_;
-
- // The head of a linked list of all implementations.
- base_implementation_type* impl_list_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/winrt_ssocket_service_base.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp
deleted file mode 100644
index 8f61ad843e5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp
+++ /dev/null
@@ -1,139 +0,0 @@
-//
-// detail/winrt_timer_scheduler.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_WINRT_TIMER_SCHEDULER_HPP
-#define BOOST_ASIO_DETAIL_WINRT_TIMER_SCHEDULER_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_WINDOWS_RUNTIME)
-
-#include <cstddef>
-#include <boost/asio/detail/event.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/thread.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/timer_queue_set.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/thread.hpp>
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class winrt_timer_scheduler
- : public boost::asio::detail::service_base<winrt_timer_scheduler>
-{
-public:
- // Constructor.
- BOOST_ASIO_DECL winrt_timer_scheduler(boost::asio::io_context& io_context);
-
- // Destructor.
- BOOST_ASIO_DECL ~winrt_timer_scheduler();
-
- // Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL void shutdown();
-
- // Recreate internal descriptors following a fork.
- BOOST_ASIO_DECL void notify_fork(
- boost::asio::io_context::fork_event fork_ev);
-
- // Initialise the task. No effect as this class uses its own thread.
- BOOST_ASIO_DECL void init_task();
-
- // Add a new timer queue to the reactor.
- template <typename Time_Traits>
- void add_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Remove a timer queue from the reactor.
- template <typename Time_Traits>
- void remove_timer_queue(timer_queue<Time_Traits>& queue);
-
- // Schedule a new operation in the given timer queue to expire at the
- // specified absolute time.
- template <typename Time_Traits>
- void schedule_timer(timer_queue<Time_Traits>& queue,
- const typename Time_Traits::time_type& time,
- typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
-
- // Cancel the timer operations associated with the given token. Returns the
- // number of operations that have been posted or dispatched.
- template <typename Time_Traits>
- std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& timer,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
-
- // Move the timer operations associated with the given timer.
- template <typename Time_Traits>
- void move_timer(timer_queue<Time_Traits>& queue,
- typename timer_queue<Time_Traits>::per_timer_data& to,
- typename timer_queue<Time_Traits>::per_timer_data& from);
-
-private:
- // Run the select loop in the thread.
- BOOST_ASIO_DECL void run_thread();
-
- // Entry point for the select loop thread.
- BOOST_ASIO_DECL static void call_run_thread(winrt_timer_scheduler* reactor);
-
- // Helper function to add a new timer queue.
- BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
-
- // Helper function to remove a timer queue.
- BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
-
- // The io_context implementation used to post completions.
- io_context_impl& io_context_;
-
- // Mutex used to protect internal variables.
- boost::asio::detail::mutex mutex_;
-
- // Event used to wake up background thread.
- boost::asio::detail::event event_;
-
- // The timer queues.
- timer_queue_set timer_queues_;
-
- // The background thread that is waiting for timers to expire.
- boost::asio::detail::thread* thread_;
-
- // Does the background thread need to stop.
- bool stop_thread_;
-
- // Whether the service has been shut down.
- bool shutdown_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/detail/impl/winrt_timer_scheduler.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/winrt_timer_scheduler.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_TIMER_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp
deleted file mode 100644
index 765edeecb8e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// detail/winrt_utils.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_WINRT_UTILS_HPP
-#define BOOST_ASIO_DETAIL_WINRT_UTILS_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_WINDOWS_RUNTIME)
-
-#include <codecvt>
-#include <cstdlib>
-#include <future>
-#include <locale>
-#include <robuffer.h>
-#include <windows.storage.streams.h>
-#include <wrl/implements.h>
-#include <boost/asio/buffer.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace winrt_utils {
-
-inline Platform::String^ string(const char* from)
-{
- std::wstring tmp(from, from + std::strlen(from));
- return ref new Platform::String(tmp.c_str());
-}
-
-inline Platform::String^ string(const std::string& from)
-{
- std::wstring tmp(from.begin(), from.end());
- return ref new Platform::String(tmp.c_str());
-}
-
-inline std::string string(Platform::String^ from)
-{
- std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
- return converter.to_bytes(from->Data());
-}
-
-inline Platform::String^ string(unsigned short from)
-{
- return string(std::to_string(from));
-}
-
-template <typename T>
-inline Platform::String^ string(const T& from)
-{
- return string(from.to_string());
-}
-
-inline int integer(Platform::String^ from)
-{
- return _wtoi(from->Data());
-}
-
-template <typename T>
-inline Windows::Networking::HostName^ host_name(const T& from)
-{
- return ref new Windows::Networking::HostName((string)(from));
-}
-
-template <typename ConstBufferSequence>
-inline Windows::Storage::Streams::IBuffer^ buffer_dup(
- const ConstBufferSequence& buffers)
-{
- using Microsoft::WRL::ComPtr;
- using boost::asio::buffer_size;
- std::size_t size = buffer_size(buffers);
- auto b = ref new Windows::Storage::Streams::Buffer(size);
- ComPtr<IInspectable> insp = reinterpret_cast<IInspectable*>(b);
- ComPtr<Windows::Storage::Streams::IBufferByteAccess> bacc;
- insp.As(&bacc);
- byte* bytes = nullptr;
- bacc->Buffer(&bytes);
- boost::asio::buffer_copy(boost::asio::buffer(bytes, size), buffers);
- b->Length = size;
- return b;
-}
-
-} // namespace winrt_utils
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#endif // BOOST_ASIO_DETAIL_WINRT_UTILS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp
deleted file mode 100644
index abf59cd1bfc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// detail/winsock_init.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_WINSOCK_INIT_HPP
-#define BOOST_ASIO_DETAIL_WINSOCK_INIT_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_WINDOWS) || defined(__CYGWIN__)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class winsock_init_base
-{
-protected:
- // Structure to track result of initialisation and number of uses. POD is used
- // to ensure that the values are zero-initialised prior to any code being run.
- struct data
- {
- long init_count_;
- long result_;
- };
-
- BOOST_ASIO_DECL static void startup(data& d,
- unsigned char major, unsigned char minor);
-
- BOOST_ASIO_DECL static void manual_startup(data& d);
-
- BOOST_ASIO_DECL static void cleanup(data& d);
-
- BOOST_ASIO_DECL static void manual_cleanup(data& d);
-
- BOOST_ASIO_DECL static void throw_on_error(data& d);
-};
-
-template <int Major = 2, int Minor = 0>
-class winsock_init : private winsock_init_base
-{
-public:
- winsock_init(bool allow_throw = true)
- {
- startup(data_, Major, Minor);
- if (allow_throw)
- throw_on_error(data_);
- }
-
- winsock_init(const winsock_init&)
- {
- startup(data_, Major, Minor);
- throw_on_error(data_);
- }
-
- ~winsock_init()
- {
- cleanup(data_);
- }
-
- // This class may be used to indicate that user code will manage Winsock
- // initialisation and cleanup. This may be required in the case of a DLL, for
- // example, where it is not safe to initialise Winsock from global object
- // constructors.
- //
- // To prevent asio from initialising Winsock, the object must be constructed
- // before any Asio's own global objects. With MSVC, this may be accomplished
- // by adding the following code to the DLL:
- //
- // #pragma warning(push)
- // #pragma warning(disable:4073)
- // #pragma init_seg(lib)
- // boost::asio::detail::winsock_init<>::manual manual_winsock_init;
- // #pragma warning(pop)
- class manual
- {
- public:
- manual()
- {
- manual_startup(data_);
- }
-
- manual(const manual&)
- {
- manual_startup(data_);
- }
-
- ~manual()
- {
- manual_cleanup(data_);
- }
- };
-
-private:
- friend class manual;
- static data data_;
-};
-
-template <int Major, int Minor>
-winsock_init_base::data winsock_init<Major, Minor>::data_;
-
-// Static variable to ensure that winsock is initialised before main, and
-// therefore before any other threads can get started.
-static const winsock_init<>& winsock_init_instance = winsock_init<>(false);
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/detail/impl/winsock_init.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#endif // BOOST_ASIO_DETAIL_WINSOCK_INIT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp
deleted file mode 100644
index 3167f244fd9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// detail/work_dispatcher.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_WORK_DISPATCHER_HPP
-#define BOOST_ASIO_DETAIL_WORK_DISPATCHER_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/associated_executor.hpp>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/executor_work_guard.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Handler>
-class work_dispatcher
-{
-public:
- work_dispatcher(Handler& handler)
- : work_((get_associated_executor)(handler)),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- work_dispatcher(const work_dispatcher& other)
- : work_(other.work_),
- handler_(other.handler_)
- {
- }
-
- work_dispatcher(work_dispatcher&& other)
- : work_(BOOST_ASIO_MOVE_CAST(executor_work_guard<
- typename associated_executor<Handler>::type>)(other.work_)),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- typename associated_allocator<Handler>::type alloc(
- (get_associated_allocator)(handler_));
- work_.get_executor().dispatch(
- BOOST_ASIO_MOVE_CAST(Handler)(handler_), alloc);
- work_.reset();
- }
-
-private:
- executor_work_guard<typename associated_executor<Handler>::type> work_;
- Handler handler_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WORK_DISPATCHER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp
deleted file mode 100644
index 8e23d1db9e5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp
+++ /dev/null
@@ -1,293 +0,0 @@
-//
-// detail/wrapped_handler.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_WRAPPED_HANDLER_HPP
-#define BOOST_ASIO_DETAIL_WRAPPED_HANDLER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-struct is_continuation_delegated
-{
- template <typename Dispatcher, typename Handler>
- bool operator()(Dispatcher&, Handler& handler) const
- {
- return boost_asio_handler_cont_helpers::is_continuation(handler);
- }
-};
-
-struct is_continuation_if_running
-{
- template <typename Dispatcher, typename Handler>
- bool operator()(Dispatcher& dispatcher, Handler&) const
- {
- return dispatcher.running_in_this_thread();
- }
-};
-
-template <typename Dispatcher, typename Handler,
- typename IsContinuation = is_continuation_delegated>
-class wrapped_handler
-{
-public:
- typedef void result_type;
-
- wrapped_handler(Dispatcher dispatcher, Handler& handler)
- : dispatcher_(dispatcher),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- wrapped_handler(const wrapped_handler& other)
- : dispatcher_(other.dispatcher_),
- handler_(other.handler_)
- {
- }
-
- wrapped_handler(wrapped_handler&& other)
- : dispatcher_(other.dispatcher_),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- dispatcher_.dispatch(BOOST_ASIO_MOVE_CAST(Handler)(handler_));
- }
-
- void operator()() const
- {
- dispatcher_.dispatch(handler_);
- }
-
- template <typename Arg1>
- void operator()(const Arg1& arg1)
- {
- dispatcher_.dispatch(detail::bind_handler(handler_, arg1));
- }
-
- template <typename Arg1>
- void operator()(const Arg1& arg1) const
- {
- dispatcher_.dispatch(detail::bind_handler(handler_, arg1));
- }
-
- template <typename Arg1, typename Arg2>
- void operator()(const Arg1& arg1, const Arg2& arg2)
- {
- dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2));
- }
-
- template <typename Arg1, typename Arg2>
- void operator()(const Arg1& arg1, const Arg2& arg2) const
- {
- dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3>
- void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3)
- {
- dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2, arg3));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3>
- void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3) const
- {
- dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2, arg3));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
- void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
- const Arg4& arg4)
- {
- dispatcher_.dispatch(
- detail::bind_handler(handler_, arg1, arg2, arg3, arg4));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
- void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
- const Arg4& arg4) const
- {
- dispatcher_.dispatch(
- detail::bind_handler(handler_, arg1, arg2, arg3, arg4));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3, typename Arg4,
- typename Arg5>
- void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
- const Arg4& arg4, const Arg5& arg5)
- {
- dispatcher_.dispatch(
- detail::bind_handler(handler_, arg1, arg2, arg3, arg4, arg5));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3, typename Arg4,
- typename Arg5>
- void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
- const Arg4& arg4, const Arg5& arg5) const
- {
- dispatcher_.dispatch(
- detail::bind_handler(handler_, arg1, arg2, arg3, arg4, arg5));
- }
-
-//private:
- Dispatcher dispatcher_;
- Handler handler_;
-};
-
-template <typename Handler, typename Context>
-class rewrapped_handler
-{
-public:
- explicit rewrapped_handler(Handler& handler, const Context& context)
- : context_(context),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- }
-
- explicit rewrapped_handler(const Handler& handler, const Context& context)
- : context_(context),
- handler_(handler)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- rewrapped_handler(const rewrapped_handler& other)
- : context_(other.context_),
- handler_(other.handler_)
- {
- }
-
- rewrapped_handler(rewrapped_handler&& other)
- : context_(BOOST_ASIO_MOVE_CAST(Context)(other.context_)),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()()
- {
- handler_();
- }
-
- void operator()() const
- {
- handler_();
- }
-
-//private:
- Context context_;
- Handler handler_;
-};
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline void* asio_handler_allocate(std::size_t size,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline bool asio_handler_is_continuation(
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- return IsContinuation()(this_handler->dispatcher_, this_handler->handler_);
-}
-
-template <typename Function, typename Dispatcher,
- typename Handler, typename IsContinuation>
-inline void asio_handler_invoke(Function& function,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- this_handler->dispatcher_.dispatch(
- rewrapped_handler<Function, Handler>(
- function, this_handler->handler_));
-}
-
-template <typename Function, typename Dispatcher,
- typename Handler, typename IsContinuation>
-inline void asio_handler_invoke(const Function& function,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- this_handler->dispatcher_.dispatch(
- rewrapped_handler<Function, Handler>(
- function, this_handler->handler_));
-}
-
-template <typename Handler, typename Context>
-inline void* asio_handler_allocate(std::size_t size,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->context_);
-}
-
-template <typename Handler, typename Context>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->context_);
-}
-
-template <typename Dispatcher, typename Context>
-inline bool asio_handler_is_continuation(
- rewrapped_handler<Dispatcher, Context>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->context_);
-}
-
-template <typename Function, typename Handler, typename Context>
-inline void asio_handler_invoke(Function& function,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->context_);
-}
-
-template <typename Function, typename Handler, typename Context>
-inline void asio_handler_invoke(const Function& function,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->context_);
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WRAPPED_HANDLER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/dispatch.hpp b/src/third_party/boost-1.69.0/boost/asio/dispatch.hpp
deleted file mode 100644
index 4136eda64fb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/dispatch.hpp
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// dispatch.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_DISPATCH_HPP
-#define BOOST_ASIO_DISPATCH_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/type_traits.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/is_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Submits a completion token or function object for execution.
-/**
- * This function submits an object for execution using the object's associated
- * executor. The function object is queued for execution, and is never called
- * from the current thread prior to returning from <tt>dispatch()</tt>.
- *
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
- *
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
- *
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Performs <tt>ex.dispatch(std::move(handler), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
- */
-template <typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token);
-
-/// Submits a completion token or function object for execution.
-/**
- * This function submits an object for execution using the specified executor.
- * The function object is queued for execution, and is never called from the
- * current thread prior to returning from <tt>dispatch()</tt>.
- *
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
- *
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
- *
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
- *
- * @li Performs <tt>Executor(ex).dispatch(std::move(f), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
- */
-template <typename Executor, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type* = 0);
-
-/// Submits a completion token or function object for execution.
-/**
- * @returns <tt>dispatch(ctx.get_executor(),
- * forward<CompletionToken>(token))</tt>.
- */
-template <typename ExecutionContext, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/dispatch.hpp>
-
-#endif // BOOST_ASIO_DISPATCH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/error.hpp b/src/third_party/boost-1.69.0/boost/asio/error.hpp
deleted file mode 100644
index 53810b287a7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/error.hpp
+++ /dev/null
@@ -1,361 +0,0 @@
-//
-// error.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_ERROR_HPP
-#define BOOST_ASIO_ERROR_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/cerrno.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/system/system_error.hpp>
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <winerror.h>
-#else
-# include <cerrno>
-# include <netdb.h>
-#endif
-
-#if defined(GENERATING_DOCUMENTATION)
-/// INTERNAL ONLY.
-# define BOOST_ASIO_NATIVE_ERROR(e) implementation_defined
-/// INTERNAL ONLY.
-# define BOOST_ASIO_SOCKET_ERROR(e) implementation_defined
-/// INTERNAL ONLY.
-# define BOOST_ASIO_NETDB_ERROR(e) implementation_defined
-/// INTERNAL ONLY.
-# define BOOST_ASIO_GETADDRINFO_ERROR(e) implementation_defined
-/// INTERNAL ONLY.
-# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) implementation_defined
-#elif defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# define BOOST_ASIO_NATIVE_ERROR(e) __HRESULT_FROM_WIN32(e)
-# define BOOST_ASIO_SOCKET_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
-# define BOOST_ASIO_NETDB_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
-# define BOOST_ASIO_GETADDRINFO_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
-# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# define BOOST_ASIO_NATIVE_ERROR(e) e
-# define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e
-# define BOOST_ASIO_NETDB_ERROR(e) WSA ## e
-# define BOOST_ASIO_GETADDRINFO_ERROR(e) WSA ## e
-# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
-#else
-# define BOOST_ASIO_NATIVE_ERROR(e) e
-# define BOOST_ASIO_SOCKET_ERROR(e) e
-# define BOOST_ASIO_NETDB_ERROR(e) e
-# define BOOST_ASIO_GETADDRINFO_ERROR(e) e
-# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_posix
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace error {
-
-enum basic_errors
-{
- /// Permission denied.
- access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES),
-
- /// Address family not supported by protocol.
- address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(EAFNOSUPPORT),
-
- /// Address already in use.
- address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE),
-
- /// Transport endpoint is already connected.
- already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN),
-
- /// Operation already in progress.
- already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY),
-
- /// Broken pipe.
- broken_pipe = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_BROKEN_PIPE),
- BOOST_ASIO_NATIVE_ERROR(EPIPE)),
-
- /// A connection has been aborted.
- connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED),
-
- /// Connection refused.
- connection_refused = BOOST_ASIO_SOCKET_ERROR(ECONNREFUSED),
-
- /// Connection reset by peer.
- connection_reset = BOOST_ASIO_SOCKET_ERROR(ECONNRESET),
-
- /// Bad file descriptor.
- bad_descriptor = BOOST_ASIO_SOCKET_ERROR(EBADF),
-
- /// Bad address.
- fault = BOOST_ASIO_SOCKET_ERROR(EFAULT),
-
- /// No route to host.
- host_unreachable = BOOST_ASIO_SOCKET_ERROR(EHOSTUNREACH),
-
- /// Operation now in progress.
- in_progress = BOOST_ASIO_SOCKET_ERROR(EINPROGRESS),
-
- /// Interrupted system call.
- interrupted = BOOST_ASIO_SOCKET_ERROR(EINTR),
-
- /// Invalid argument.
- invalid_argument = BOOST_ASIO_SOCKET_ERROR(EINVAL),
-
- /// Message too long.
- message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE),
-
- /// The name was too long.
- name_too_long = BOOST_ASIO_SOCKET_ERROR(ENAMETOOLONG),
-
- /// Network is down.
- network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN),
-
- /// Network dropped connection on reset.
- network_reset = BOOST_ASIO_SOCKET_ERROR(ENETRESET),
-
- /// Network is unreachable.
- network_unreachable = BOOST_ASIO_SOCKET_ERROR(ENETUNREACH),
-
- /// Too many open files.
- no_descriptors = BOOST_ASIO_SOCKET_ERROR(EMFILE),
-
- /// No buffer space available.
- no_buffer_space = BOOST_ASIO_SOCKET_ERROR(ENOBUFS),
-
- /// Cannot allocate memory.
- no_memory = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_OUTOFMEMORY),
- BOOST_ASIO_NATIVE_ERROR(ENOMEM)),
-
- /// Operation not permitted.
- no_permission = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_ACCESS_DENIED),
- BOOST_ASIO_NATIVE_ERROR(EPERM)),
-
- /// Protocol not available.
- no_protocol_option = BOOST_ASIO_SOCKET_ERROR(ENOPROTOOPT),
-
- /// No such device.
- no_such_device = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_BAD_UNIT),
- BOOST_ASIO_NATIVE_ERROR(ENODEV)),
-
- /// Transport endpoint is not connected.
- not_connected = BOOST_ASIO_SOCKET_ERROR(ENOTCONN),
-
- /// Socket operation on non-socket.
- not_socket = BOOST_ASIO_SOCKET_ERROR(ENOTSOCK),
-
- /// Operation cancelled.
- operation_aborted = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED),
- BOOST_ASIO_NATIVE_ERROR(ECANCELED)),
-
- /// Operation not supported.
- operation_not_supported = BOOST_ASIO_SOCKET_ERROR(EOPNOTSUPP),
-
- /// Cannot send after transport endpoint shutdown.
- shut_down = BOOST_ASIO_SOCKET_ERROR(ESHUTDOWN),
-
- /// Connection timed out.
- timed_out = BOOST_ASIO_SOCKET_ERROR(ETIMEDOUT),
-
- /// Resource temporarily unavailable.
- try_again = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_RETRY),
- BOOST_ASIO_NATIVE_ERROR(EAGAIN)),
-
- /// The socket is marked non-blocking and the requested operation would block.
- would_block = BOOST_ASIO_SOCKET_ERROR(EWOULDBLOCK)
-};
-
-enum netdb_errors
-{
- /// Host not found (authoritative).
- host_not_found = BOOST_ASIO_NETDB_ERROR(HOST_NOT_FOUND),
-
- /// Host not found (non-authoritative).
- host_not_found_try_again = BOOST_ASIO_NETDB_ERROR(TRY_AGAIN),
-
- /// The query is valid but does not have associated address data.
- no_data = BOOST_ASIO_NETDB_ERROR(NO_DATA),
-
- /// A non-recoverable error occurred.
- no_recovery = BOOST_ASIO_NETDB_ERROR(NO_RECOVERY)
-};
-
-enum addrinfo_errors
-{
- /// The service is not supported for the given socket type.
- service_not_found = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND),
- BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE)),
-
- /// The socket type is not supported.
- socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT),
- BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE))
-};
-
-enum misc_errors
-{
- /// Already open.
- already_open = 1,
-
- /// End of file or stream.
- eof,
-
- /// Element not found.
- not_found,
-
- /// The descriptor cannot fit into the select system call's fd_set.
- fd_set_failure
-};
-
-inline const boost::system::error_category& get_system_category()
-{
- return boost::system::system_category();
-}
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-extern BOOST_ASIO_DECL
-const boost::system::error_category& get_netdb_category();
-
-extern BOOST_ASIO_DECL
-const boost::system::error_category& get_addrinfo_category();
-
-#else // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-inline const boost::system::error_category& get_netdb_category()
-{
- return get_system_category();
-}
-
-inline const boost::system::error_category& get_addrinfo_category()
-{
- return get_system_category();
-}
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-extern BOOST_ASIO_DECL
-const boost::system::error_category& get_misc_category();
-
-static const boost::system::error_category&
- system_category BOOST_ASIO_UNUSED_VARIABLE
- = boost::asio::error::get_system_category();
-static const boost::system::error_category&
- netdb_category BOOST_ASIO_UNUSED_VARIABLE
- = boost::asio::error::get_netdb_category();
-static const boost::system::error_category&
- addrinfo_category BOOST_ASIO_UNUSED_VARIABLE
- = boost::asio::error::get_addrinfo_category();
-static const boost::system::error_category&
- misc_category BOOST_ASIO_UNUSED_VARIABLE
- = boost::asio::error::get_misc_category();
-
-} // namespace error
-} // namespace asio
-} // namespace boost
-
-namespace boost {
-namespace system {
-
-template<> struct is_error_code_enum<boost::asio::error::basic_errors>
-{
- static const bool value = true;
-};
-
-template<> struct is_error_code_enum<boost::asio::error::netdb_errors>
-{
- static const bool value = true;
-};
-
-template<> struct is_error_code_enum<boost::asio::error::addrinfo_errors>
-{
- static const bool value = true;
-};
-
-template<> struct is_error_code_enum<boost::asio::error::misc_errors>
-{
- static const bool value = true;
-};
-
-} // namespace system
-} // namespace boost
-
-namespace boost {
-namespace asio {
-namespace error {
-
-inline boost::system::error_code make_error_code(basic_errors e)
-{
- return boost::system::error_code(
- static_cast<int>(e), get_system_category());
-}
-
-inline boost::system::error_code make_error_code(netdb_errors e)
-{
- return boost::system::error_code(
- static_cast<int>(e), get_netdb_category());
-}
-
-inline boost::system::error_code make_error_code(addrinfo_errors e)
-{
- return boost::system::error_code(
- static_cast<int>(e), get_addrinfo_category());
-}
-
-inline boost::system::error_code make_error_code(misc_errors e)
-{
- return boost::system::error_code(
- static_cast<int>(e), get_misc_category());
-}
-
-} // namespace error
-namespace stream_errc {
- // Simulates the proposed stream_errc scoped enum.
- using error::eof;
- using error::not_found;
-} // namespace stream_errc
-namespace socket_errc {
- // Simulates the proposed socket_errc scoped enum.
- using error::already_open;
- using error::not_found;
-} // namespace socket_errc
-namespace resolver_errc {
- // Simulates the proposed resolver_errc scoped enum.
- using error::host_not_found;
- const error::netdb_errors try_again = error::host_not_found_try_again;
- using error::service_not_found;
-} // namespace resolver_errc
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#undef BOOST_ASIO_NATIVE_ERROR
-#undef BOOST_ASIO_SOCKET_ERROR
-#undef BOOST_ASIO_NETDB_ERROR
-#undef BOOST_ASIO_GETADDRINFO_ERROR
-#undef BOOST_ASIO_WIN_OR_POSIX
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/error.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_ERROR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/execution_context.hpp b/src/third_party/boost-1.69.0/boost/asio/execution_context.hpp
deleted file mode 100644
index 4ebb607a1a6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/execution_context.hpp
+++ /dev/null
@@ -1,413 +0,0 @@
-//
-// execution_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_EXECUTION_CONTEXT_HPP
-#define BOOST_ASIO_EXECUTION_CONTEXT_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 <stdexcept>
-#include <typeinfo>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/variadic_templates.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class execution_context;
-class io_context;
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename Service> Service& use_service(execution_context&);
-template <typename Service> Service& use_service(io_context&);
-template <typename Service> void add_service(execution_context&, Service*);
-template <typename Service> bool has_service(execution_context&);
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-namespace detail { class service_registry; }
-
-/// A context for function object execution.
-/**
- * An execution context represents a place where function objects will be
- * executed. An @c io_context is an example of an execution context.
- *
- * @par The execution_context class and services
- *
- * Class execution_context implements an extensible, type-safe, polymorphic set
- * of services, indexed by service type.
- *
- * Services exist to manage the resources that are shared across an execution
- * context. For example, timers may be implemented in terms of a single timer
- * queue, and this queue would be stored in a service.
- *
- * Access to the services of an execution_context is via three function
- * templates, use_service(), add_service() and has_service().
- *
- * In a call to @c use_service<Service>(), the type argument chooses a service,
- * making available all members of the named type. If @c Service is not present
- * in an execution_context, an object of type @c Service is created and added
- * to the execution_context. A C++ program can check if an execution_context
- * implements a particular service with the function template @c
- * has_service<Service>().
- *
- * Service objects may be explicitly added to an execution_context using the
- * function template @c add_service<Service>(). If the @c Service is already
- * present, the service_already_exists exception is thrown. If the owner of the
- * service is not the same object as the execution_context parameter, the
- * invalid_service_owner exception is thrown.
- *
- * Once a service reference is obtained from an execution_context object by
- * calling use_service(), that reference remains usable as long as the owning
- * execution_context object exists.
- *
- * All service implementations have execution_context::service as a public base
- * class. Custom services may be implemented by deriving from this class and
- * then added to an execution_context using the facilities described above.
- *
- * @par The execution_context as a base class
- *
- * Class execution_context may be used only as a base class for concrete
- * execution context types. The @c io_context is an example of such a derived
- * type.
- *
- * On destruction, a class that is derived from execution_context must perform
- * <tt>execution_context::shutdown()</tt> followed by
- * <tt>execution_context::destroy()</tt>.
- *
- * This destruction sequence permits programs to simplify their resource
- * management by using @c shared_ptr<>. Where an object's lifetime is tied to
- * the lifetime of a connection (or some other sequence of asynchronous
- * operations), a @c shared_ptr to the object would be bound into the handlers
- * for all asynchronous operations associated with it. This works as follows:
- *
- * @li When a single connection ends, all associated asynchronous operations
- * complete. The corresponding handler objects are destroyed, and all @c
- * shared_ptr references to the objects are destroyed.
- *
- * @li To shut down the whole program, the io_context function stop() is called
- * to terminate any run() calls as soon as possible. The io_context destructor
- * calls @c shutdown() and @c destroy() to destroy all pending handlers,
- * causing all @c shared_ptr references to all connection objects to be
- * destroyed.
- */
-class execution_context
- : private noncopyable
-{
-public:
- class id;
- class service;
-
-protected:
- /// Constructor.
- BOOST_ASIO_DECL execution_context();
-
- /// Destructor.
- BOOST_ASIO_DECL ~execution_context();
-
- /// Shuts down all services in the context.
- /**
- * This function is implemented as follows:
- *
- * @li For each service object @c svc in the execution_context set, in
- * reverse order of the beginning of service object lifetime, performs @c
- * svc->shutdown().
- */
- BOOST_ASIO_DECL void shutdown();
-
- /// Destroys all services in the context.
- /**
- * This function is implemented as follows:
- *
- * @li For each service object @c svc in the execution_context set, in
- * reverse order * of the beginning of service object lifetime, performs
- * <tt>delete static_cast<execution_context::service*>(svc)</tt>.
- */
- BOOST_ASIO_DECL void destroy();
-
-public:
- /// Fork-related event notifications.
- enum fork_event
- {
- /// Notify the context that the process is about to fork.
- fork_prepare,
-
- /// Notify the context that the process has forked and is the parent.
- fork_parent,
-
- /// Notify the context that the process has forked and is the child.
- fork_child
- };
-
- /// Notify the execution_context of a fork-related event.
- /**
- * This function is used to inform the execution_context that the process is
- * about to fork, or has just forked. This allows the execution_context, and
- * the services it contains, to perform any necessary housekeeping to ensure
- * correct operation following a fork.
- *
- * This function must not be called while any other execution_context
- * function, or any function associated with the execution_context's derived
- * class, is being called in another thread. It is, however, safe to call
- * this function from within a completion handler, provided no other thread
- * is accessing the execution_context or its derived class.
- *
- * @param event A fork-related event.
- *
- * @throws boost::system::system_error Thrown on failure. If the notification
- * fails the execution_context object should no longer be used and should be
- * destroyed.
- *
- * @par Example
- * The following code illustrates how to incorporate the notify_fork()
- * function:
- * @code my_execution_context.notify_fork(execution_context::fork_prepare);
- * if (fork() == 0)
- * {
- * // This is the child process.
- * my_execution_context.notify_fork(execution_context::fork_child);
- * }
- * else
- * {
- * // This is the parent process.
- * my_execution_context.notify_fork(execution_context::fork_parent);
- * } @endcode
- *
- * @note For each service object @c svc in the execution_context set,
- * performs <tt>svc->notify_fork();</tt>. When processing the fork_prepare
- * event, services are visited in reverse order of the beginning of service
- * object lifetime. Otherwise, services are visited in order of the beginning
- * of service object lifetime.
- */
- BOOST_ASIO_DECL void notify_fork(fork_event event);
-
- /// Obtain the service object corresponding to the given type.
- /**
- * This function is used to locate a service object that corresponds to the
- * given service type. If there is no existing implementation of the service,
- * then the execution_context will create a new instance of the service.
- *
- * @param e The execution_context object that owns the service.
- *
- * @return The service interface implementing the specified service type.
- * Ownership of the service interface is not transferred to the caller.
- */
- template <typename Service>
- friend Service& use_service(execution_context& e);
-
- /// Obtain the service object corresponding to the given type.
- /**
- * This function is used to locate a service object that corresponds to the
- * given service type. If there is no existing implementation of the service,
- * then the io_context will create a new instance of the service.
- *
- * @param ioc The io_context object that owns the service.
- *
- * @return The service interface implementing the specified service type.
- * Ownership of the service interface is not transferred to the caller.
- *
- * @note This overload is preserved for backwards compatibility with services
- * that inherit from io_context::service.
- */
- template <typename Service>
- friend Service& use_service(io_context& ioc);
-
-#if defined(GENERATING_DOCUMENTATION)
-
- /// Creates a service object and adds it to the execution_context.
- /**
- * This function is used to add a service to the execution_context.
- *
- * @param e The execution_context object that owns the service.
- *
- * @param args Zero or more arguments to be passed to the service
- * constructor.
- *
- * @throws boost::asio::service_already_exists Thrown if a service of the
- * given type is already present in the execution_context.
- */
- template <typename Service, typename... Args>
- friend Service& make_service(execution_context& e, Args&&... args);
-
-#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Service, typename... Args>
- friend Service& make_service(execution_context& e,
- BOOST_ASIO_MOVE_ARG(Args)... args);
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Service>
- friend Service& make_service(execution_context& e);
-
-#define BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
- template <typename Service, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- friend Service& make_service(execution_context& e, \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)); \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF)
-#undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- /// (Deprecated: Use make_service().) Add a service object to the
- /// execution_context.
- /**
- * This function is used to add a service to the execution_context.
- *
- * @param e The execution_context object that owns the service.
- *
- * @param svc The service object. On success, ownership of the service object
- * is transferred to the execution_context. When the execution_context object
- * is destroyed, it will destroy the service object by performing: @code
- * delete static_cast<execution_context::service*>(svc) @endcode
- *
- * @throws boost::asio::service_already_exists Thrown if a service of the
- * given type is already present in the execution_context.
- *
- * @throws boost::asio::invalid_service_owner Thrown if the service's owning
- * execution_context is not the execution_context object specified by the
- * @c e parameter.
- */
- template <typename Service>
- friend void add_service(execution_context& e, Service* svc);
-
- /// Determine if an execution_context contains a specified service type.
- /**
- * This function is used to determine whether the execution_context contains a
- * service object corresponding to the given service type.
- *
- * @param e The execution_context object that owns the service.
- *
- * @return A boolean indicating whether the execution_context contains the
- * service.
- */
- template <typename Service>
- friend bool has_service(execution_context& e);
-
-private:
- // The service registry.
- boost::asio::detail::service_registry* service_registry_;
-};
-
-/// Class used to uniquely identify a service.
-class execution_context::id
- : private noncopyable
-{
-public:
- /// Constructor.
- id() {}
-};
-
-/// Base class for all io_context services.
-class execution_context::service
- : private noncopyable
-{
-public:
- /// Get the context object that owns the service.
- execution_context& context();
-
-protected:
- /// Constructor.
- /**
- * @param owner The execution_context object that owns the service.
- */
- BOOST_ASIO_DECL service(execution_context& owner);
-
- /// Destructor.
- BOOST_ASIO_DECL virtual ~service();
-
-private:
- /// Destroy all user-defined handler objects owned by the service.
- virtual void shutdown() = 0;
-
- /// Handle notification of a fork-related event to perform any necessary
- /// housekeeping.
- /**
- * This function is not a pure virtual so that services only have to
- * implement it if necessary. The default implementation does nothing.
- */
- BOOST_ASIO_DECL virtual void notify_fork(
- execution_context::fork_event event);
-
- friend class boost::asio::detail::service_registry;
- struct key
- {
- key() : type_info_(0), id_(0) {}
- const std::type_info* type_info_;
- const execution_context::id* id_;
- } key_;
-
- execution_context& owner_;
- service* next_;
-};
-
-/// Exception thrown when trying to add a duplicate service to an
-/// execution_context.
-class service_already_exists
- : public std::logic_error
-{
-public:
- BOOST_ASIO_DECL service_already_exists();
-};
-
-/// Exception thrown when trying to add a service object to an
-/// execution_context where the service has a different owner.
-class invalid_service_owner
- : public std::logic_error
-{
-public:
- BOOST_ASIO_DECL invalid_service_owner();
-};
-
-namespace detail {
-
-// Special derived service id type to keep classes header-file only.
-template <typename Type>
-class service_id
- : public execution_context::id
-{
-};
-
-// Special service base class to keep classes header-file only.
-template <typename Type>
-class execution_context_service_base
- : public execution_context::service
-{
-public:
- static service_id<Type> id;
-
- // Constructor.
- execution_context_service_base(execution_context& e)
- : execution_context::service(e)
- {
- }
-};
-
-template <typename Type>
-service_id<Type> execution_context_service_base<Type>::id;
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/execution_context.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/execution_context.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_EXECUTION_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/executor.hpp b/src/third_party/boost-1.69.0/boost/asio/executor.hpp
deleted file mode 100644
index 43a5a2c1059..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/executor.hpp
+++ /dev/null
@@ -1,343 +0,0 @@
-//
-// executor.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_EXECUTOR_HPP
-#define BOOST_ASIO_EXECUTOR_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/cstddef.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Exception thrown when trying to access an empty polymorphic executor.
-class bad_executor
- : public std::exception
-{
-public:
- /// Constructor.
- BOOST_ASIO_DECL bad_executor() BOOST_ASIO_NOEXCEPT;
-
- /// Obtain message associated with exception.
- BOOST_ASIO_DECL virtual const char* what() const
- BOOST_ASIO_NOEXCEPT_OR_NOTHROW;
-};
-
-/// Polymorphic wrapper for executors.
-class executor
-{
-public:
- /// Default constructor.
- executor() BOOST_ASIO_NOEXCEPT
- : impl_(0)
- {
- }
-
- /// Construct from nullptr.
- executor(nullptr_t) BOOST_ASIO_NOEXCEPT
- : impl_(0)
- {
- }
-
- /// Copy constructor.
- executor(const executor& other) BOOST_ASIO_NOEXCEPT
- : impl_(other.clone())
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- executor(executor&& other) BOOST_ASIO_NOEXCEPT
- : impl_(other.impl_)
- {
- other.impl_ = 0;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Construct a polymorphic wrapper for the specified executor.
- template <typename Executor>
- executor(Executor e);
-
- /// Allocator-aware constructor to create a polymorphic wrapper for the
- /// specified executor.
- template <typename Executor, typename Allocator>
- executor(allocator_arg_t, const Allocator& a, Executor e);
-
- /// Destructor.
- ~executor()
- {
- destroy();
- }
-
- /// Assignment operator.
- executor& operator=(const executor& other) BOOST_ASIO_NOEXCEPT
- {
- destroy();
- impl_ = other.clone();
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- // Move assignment operator.
- executor& operator=(executor&& other) BOOST_ASIO_NOEXCEPT
- {
- destroy();
- impl_ = other.impl_;
- other.impl_ = 0;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Assignment operator for nullptr_t.
- executor& operator=(nullptr_t) BOOST_ASIO_NOEXCEPT
- {
- destroy();
- impl_ = 0;
- return *this;
- }
-
- /// Assignment operator to create a polymorphic wrapper for the specified
- /// executor.
- template <typename Executor>
- executor& operator=(BOOST_ASIO_MOVE_ARG(Executor) e) BOOST_ASIO_NOEXCEPT
- {
- executor tmp(BOOST_ASIO_MOVE_CAST(Executor)(e));
- destroy();
- impl_ = tmp.impl_;
- tmp.impl_ = 0;
- return *this;
- }
-
- /// Obtain the underlying execution context.
- execution_context& context() const BOOST_ASIO_NOEXCEPT
- {
- return get_impl()->context();
- }
-
- /// Inform the executor that it has some outstanding work to do.
- void on_work_started() const BOOST_ASIO_NOEXCEPT
- {
- get_impl()->on_work_started();
- }
-
- /// Inform the executor that some work is no longer outstanding.
- void on_work_finished() const BOOST_ASIO_NOEXCEPT
- {
- get_impl()->on_work_finished();
- }
-
- /// Request the executor to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object is executed according to the rules of the
- * target executor object.
- *
- * @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 executor to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object is executed according to the rules of the
- * target executor object.
- *
- * @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 executor to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object is executed according to the rules of the
- * target executor object.
- *
- * @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;
-
- struct unspecified_bool_type_t {};
- typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
- static void unspecified_bool_true(unspecified_bool_type_t) {}
-
- /// Operator to test if the executor contains a valid target.
- operator unspecified_bool_type() const BOOST_ASIO_NOEXCEPT
- {
- return impl_ ? &executor::unspecified_bool_true : 0;
- }
-
- /// Obtain type information for the target executor object.
- /**
- * @returns If @c *this has a target type of type @c T, <tt>typeid(T)</tt>;
- * otherwise, <tt>typeid(void)</tt>.
- */
-#if !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
- const std::type_info& target_type() const BOOST_ASIO_NOEXCEPT
- {
- return impl_ ? impl_->target_type() : typeid(void);
- }
-#else // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
- const void* target_type() const BOOST_ASIO_NOEXCEPT
- {
- return impl_ ? impl_->target_type() : 0;
- }
-#endif // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
-
- /// Obtain a pointer to the target executor object.
- /**
- * @returns If <tt>target_type() == typeid(T)</tt>, a pointer to the stored
- * executor target; otherwise, a null pointer.
- */
- template <typename Executor>
- Executor* target() BOOST_ASIO_NOEXCEPT;
-
- /// Obtain a pointer to the target executor object.
- /**
- * @returns If <tt>target_type() == typeid(T)</tt>, a pointer to the stored
- * executor target; otherwise, a null pointer.
- */
- template <typename Executor>
- const Executor* target() const BOOST_ASIO_NOEXCEPT;
-
- /// Compare two executors for equality.
- friend bool operator==(const executor& a,
- const executor& b) BOOST_ASIO_NOEXCEPT
- {
- if (a.impl_ == b.impl_)
- return true;
- if (!a.impl_ || !b.impl_)
- return false;
- return a.impl_->equals(b.impl_);
- }
-
- /// Compare two executors for inequality.
- friend bool operator!=(const executor& a,
- const executor& b) BOOST_ASIO_NOEXCEPT
- {
- return !(a == b);
- }
-
-private:
-#if !defined(GENERATING_DOCUMENTATION)
- class function;
- template <typename, typename> class impl;
-
-#if !defined(BOOST_ASIO_NO_TYPEID)
- typedef const std::type_info& type_id_result_type;
-#else // !defined(BOOST_ASIO_NO_TYPEID)
- typedef const void* type_id_result_type;
-#endif // !defined(BOOST_ASIO_NO_TYPEID)
-
- template <typename T>
- static type_id_result_type type_id()
- {
-#if !defined(BOOST_ASIO_NO_TYPEID)
- return typeid(T);
-#else // !defined(BOOST_ASIO_NO_TYPEID)
- static int unique_id;
- return &unique_id;
-#endif // !defined(BOOST_ASIO_NO_TYPEID)
- }
-
- // Base class for all polymorphic executor implementations.
- class impl_base
- {
- public:
- virtual impl_base* clone() const BOOST_ASIO_NOEXCEPT = 0;
- virtual void destroy() BOOST_ASIO_NOEXCEPT = 0;
- virtual execution_context& context() BOOST_ASIO_NOEXCEPT = 0;
- virtual void on_work_started() BOOST_ASIO_NOEXCEPT = 0;
- virtual void on_work_finished() BOOST_ASIO_NOEXCEPT = 0;
- virtual void dispatch(BOOST_ASIO_MOVE_ARG(function)) = 0;
- virtual void post(BOOST_ASIO_MOVE_ARG(function)) = 0;
- virtual void defer(BOOST_ASIO_MOVE_ARG(function)) = 0;
- virtual type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT = 0;
- virtual void* target() BOOST_ASIO_NOEXCEPT = 0;
- virtual const void* target() const BOOST_ASIO_NOEXCEPT = 0;
- virtual bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT = 0;
-
- protected:
- impl_base(bool fast_dispatch) : fast_dispatch_(fast_dispatch) {}
- virtual ~impl_base() {}
-
- private:
- friend class executor;
- const bool fast_dispatch_;
- };
-
- // Helper function to check and return the implementation pointer.
- impl_base* get_impl() const
- {
- if (!impl_)
- {
- bad_executor ex;
- boost::asio::detail::throw_exception(ex);
- }
- return impl_;
- }
-
- // Helper function to clone another implementation.
- impl_base* clone() const BOOST_ASIO_NOEXCEPT
- {
- return impl_ ? impl_->clone() : 0;
- }
-
- // Helper function to destroy an implementation.
- void destroy() BOOST_ASIO_NOEXCEPT
- {
- if (impl_)
- impl_->destroy();
- }
-
- impl_base* impl_;
-#endif // !defined(GENERATING_DOCUMENTATION)
-};
-
-} // namespace asio
-} // namespace boost
-
-BOOST_ASIO_USES_ALLOCATOR(boost::asio::executor)
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/executor.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/executor.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp b/src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp
deleted file mode 100644
index a9303462eb0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp
+++ /dev/null
@@ -1,172 +0,0 @@
-//
-// executor_work_guard.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_EXECUTOR_WORK_GUARD_HPP
-#define BOOST_ASIO_EXECUTOR_WORK_GUARD_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/associated_executor.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/is_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// An object of type @c executor_work_guard controls ownership of executor work
-/// within a scope.
-template <typename Executor>
-class executor_work_guard
-{
-public:
- /// The underlying executor type.
- typedef Executor executor_type;
-
- /// Constructs a @c executor_work_guard object for the specified executor.
- /**
- * Stores a copy of @c e and calls <tt>on_work_started()</tt> on it.
- */
- explicit executor_work_guard(const executor_type& e) BOOST_ASIO_NOEXCEPT
- : executor_(e),
- owns_(true)
- {
- executor_.on_work_started();
- }
-
- /// Copy constructor.
- executor_work_guard(const executor_work_guard& other) BOOST_ASIO_NOEXCEPT
- : executor_(other.executor_),
- owns_(other.owns_)
- {
- if (owns_)
- executor_.on_work_started();
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- executor_work_guard(executor_work_guard&& other)
- : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)),
- owns_(other.owns_)
- {
- other.owns_ = false;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destructor.
- /**
- * Unless the object has already been reset, or is in a moved-from state,
- * calls <tt>on_work_finished()</tt> on the stored executor.
- */
- ~executor_work_guard()
- {
- if (owns_)
- executor_.on_work_finished();
- }
-
- /// Obtain the associated executor.
- executor_type get_executor() const BOOST_ASIO_NOEXCEPT
- {
- return executor_;
- }
-
- /// Whether the executor_work_guard object owns some outstanding work.
- bool owns_work() const BOOST_ASIO_NOEXCEPT
- {
- return owns_;
- }
-
- /// Indicate that the work is no longer outstanding.
- /*
- * Unless the object has already been reset, or is in a moved-from state,
- * calls <tt>on_work_finished()</tt> on the stored executor.
- */
- void reset() BOOST_ASIO_NOEXCEPT
- {
- if (owns_)
- {
- executor_.on_work_finished();
- owns_ = false;
- }
- }
-
-private:
- // Disallow assignment.
- executor_work_guard& operator=(const executor_work_guard&);
-
- executor_type executor_;
- bool owns_;
-};
-
-/// Create an @ref executor_work_guard object.
-template <typename Executor>
-inline executor_work_guard<Executor> make_work_guard(const Executor& ex,
- typename enable_if<is_executor<Executor>::value>::type* = 0)
-{
- return executor_work_guard<Executor>(ex);
-}
-
-/// Create an @ref executor_work_guard object.
-template <typename ExecutionContext>
-inline executor_work_guard<typename ExecutionContext::executor_type>
-make_work_guard(ExecutionContext& ctx,
- typename enable_if<
- is_convertible<ExecutionContext&, execution_context&>::value>::type* = 0)
-{
- return executor_work_guard<typename ExecutionContext::executor_type>(
- ctx.get_executor());
-}
-
-/// Create an @ref executor_work_guard object.
-template <typename T>
-inline executor_work_guard<typename associated_executor<T>::type>
-make_work_guard(const T& t,
- typename enable_if<!is_executor<T>::value &&
- !is_convertible<T&, execution_context&>::value>::type* = 0)
-{
- return executor_work_guard<typename associated_executor<T>::type>(
- associated_executor<T>::get(t));
-}
-
-/// Create an @ref executor_work_guard object.
-template <typename T, typename Executor>
-inline executor_work_guard<typename associated_executor<T, Executor>::type>
-make_work_guard(const T& t, const Executor& ex,
- typename enable_if<is_executor<Executor>::value>::type* = 0)
-{
- return executor_work_guard<typename associated_executor<T, Executor>::type>(
- associated_executor<T, Executor>::get(t, ex));
-}
-
-/// Create an @ref executor_work_guard object.
-template <typename T, typename ExecutionContext>
-inline executor_work_guard<typename associated_executor<T,
- typename ExecutionContext::executor_type>::type>
-make_work_guard(const T& t, ExecutionContext& ctx,
- typename enable_if<!is_executor<T>::value &&
- !is_convertible<T&, execution_context&>::value &&
- is_convertible<ExecutionContext&, execution_context&>::value>::type* = 0)
-{
- return executor_work_guard<typename associated_executor<T,
- typename ExecutionContext::executor_type>::type>(
- associated_executor<T, typename ExecutionContext::executor_type>::get(
- t, ctx.get_executor()));
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_EXECUTOR_WORK_GUARD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental.hpp
deleted file mode 100644
index 0ca0a9658fa..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// experimental.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2017 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_EXPERIMENTAL_HPP
-#define BOOST_ASIO_EXPERIMENTAL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/experimental/co_spawn.hpp>
-#include <boost/asio/experimental/detached.hpp>
-#include <boost/asio/experimental/redirect_error.hpp>
-
-#endif // BOOST_ASIO_EXPERIMENTAL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp
deleted file mode 100644
index c900da11f0a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// experimental/co_spawn.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_EXPERIMENTAL_CO_SPAWN_HPP
-#define BOOST_ASIO_EXPERIMENTAL_CO_SPAWN_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_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
-
-#include <experimental/coroutine>
-#include <boost/asio/executor.hpp>
-#include <boost/asio/strand.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace experimental {
-namespace detail {
-
-using std::experimental::coroutine_handle;
-
-template <typename> class awaiter;
-template <typename> class awaitee_base;
-template <typename, typename> class awaitee;
-template <typename, typename> class await_handler_base;
-template <typename Executor, typename F, typename CompletionToken>
-auto co_spawn(const Executor& ex, F&& f, CompletionToken&& token);
-
-} // namespace detail
-
-namespace this_coro {
-
-/// Awaitable type that returns a completion token for the current coroutine.
-struct token_t {};
-
-/// Awaitable object that returns a completion token for the current coroutine.
-constexpr inline token_t token() { return {}; }
-
-/// Awaitable type that returns the executor of the current coroutine.
-struct executor_t {};
-
-/// Awaitable object that returns the executor of the current coroutine.
-constexpr inline executor_t executor() { return {}; }
-
-} // namespace this_coro
-
-/// A completion token that represents the currently executing coroutine.
-/**
- * The await_token class is used to represent the currently executing
- * coroutine. An await_token may be passed as a handler to an asynchronous
- * operation. For example:
- *
- * @code awaitable<void> my_coroutine()
- * {
- * await_token token = co_await this_coro::token();
- * ...
- * std::size_t n = co_await my_socket.async_read_some(buffer, token);
- * ...
- * } @endcode
- *
- * The initiating function (async_read_some in the above example) suspends the
- * current coroutine. The coroutine is resumed when the asynchronous operation
- * completes, and the result of the operation is returned.
- */
-template <typename Executor>
-class await_token
-{
-public:
- /// The associated executor type.
- typedef Executor executor_type;
-
- /// Copy constructor.
- await_token(const await_token& other) noexcept
- : awaiter_(other.awaiter_)
- {
- }
-
- /// Move constructor.
- await_token(await_token&& other) noexcept
- : awaiter_(std::exchange(other.awaiter_, nullptr))
- {
- }
-
- /// Get the associated executor.
- executor_type get_executor() const noexcept
- {
- return awaiter_->get_executor();
- }
-
-private:
- // No assignment allowed.
- await_token& operator=(const await_token&) = delete;
-
- template <typename> friend class detail::awaitee_base;
- template <typename, typename> friend class detail::await_handler_base;
-
- // Private constructor used by awaitee_base.
- explicit await_token(detail::awaiter<Executor>* a)
- : awaiter_(a)
- {
- }
-
- detail::awaiter<Executor>* awaiter_;
-};
-
-/// The return type of a coroutine or asynchronous operation.
-template <typename T, typename Executor = strand<executor>>
-class awaitable
-{
-public:
- /// The type of the awaited value.
- typedef T value_type;
-
- /// The executor type that will be used for the coroutine.
- typedef Executor executor_type;
-
- /// Move constructor.
- awaitable(awaitable&& other) noexcept
- : awaitee_(std::exchange(other.awaitee_, nullptr))
- {
- }
-
- /// Destructor
- ~awaitable()
- {
- if (awaitee_)
- {
- detail::coroutine_handle<
- detail::awaitee<T, Executor>>::from_promise(
- *awaitee_).destroy();
- }
- }
-
-#if !defined(GENERATING_DOCUMENTATION)
-
- // Support for co_await keyword.
- bool await_ready() const noexcept
- {
- return awaitee_->ready();
- }
-
- // Support for co_await keyword.
- void await_suspend(detail::coroutine_handle<detail::awaiter<Executor>> h)
- {
- awaitee_->attach_caller(h);
- }
-
- // Support for co_await keyword.
- template <class U>
- void await_suspend(detail::coroutine_handle<detail::awaitee<U, Executor>> h)
- {
- awaitee_->attach_caller(h);
- }
-
- // Support for co_await keyword.
- T await_resume()
- {
- return awaitee_->get();
- }
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-private:
- template <typename, typename> friend class detail::awaitee;
- template <typename, typename> friend class detail::await_handler_base;
-
- // Not copy constructible or copy assignable.
- awaitable(const awaitable&) = delete;
- awaitable& operator=(const awaitable&) = delete;
-
- // Construct the awaitable from a coroutine's promise object.
- explicit awaitable(detail::awaitee<T, Executor>* a) : awaitee_(a) {}
-
- detail::awaitee<T, Executor>* awaitee_;
-};
-
-/// Spawn a new thread of execution.
-template <typename Executor, typename F, typename CompletionToken,
- typename = typename enable_if<is_executor<Executor>::value>::type>
-inline auto co_spawn(const Executor& ex, F&& f, CompletionToken&& token)
-{
- return detail::co_spawn(ex, std::forward<F>(f),
- std::forward<CompletionToken>(token));
-}
-
-/// Spawn a new thread of execution.
-template <typename ExecutionContext, typename F, typename CompletionToken,
- typename = typename enable_if<
- is_convertible<ExecutionContext&, execution_context&>::value>::type>
-inline auto co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token)
-{
- return detail::co_spawn(ctx.get_executor(), std::forward<F>(f),
- std::forward<CompletionToken>(token));
-}
-
-/// Spawn a new thread of execution.
-template <typename Executor, typename F, typename CompletionToken>
-inline auto co_spawn(const await_token<Executor>& parent,
- F&& f, CompletionToken&& token)
-{
- return detail::co_spawn(parent.get_executor(), std::forward<F>(f),
- std::forward<CompletionToken>(token));
-}
-
-} // namespace experimental
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/experimental/impl/co_spawn.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_EXPERIMENTAL_CO_SPAWN_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp
deleted file mode 100644
index c3e7adafac4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// experimental/detached.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_EXPERIMENTAL_DETACHED_HPP
-#define BOOST_ASIO_EXPERIMENTAL_DETACHED_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <memory>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace experimental {
-
-/// Class used to specify that an asynchronous operation is detached.
-/**
-
- * The detached_t class is used to indicate that an asynchronous operation is
- * detached. That is, there is no completion handler waiting for the
- * operation's result. A detached_t object may be passed as a handler to an
- * asynchronous operation, typically using the special value
- * @c boost::asio::experimental::detached. For example:
-
- * @code my_socket.async_send(my_buffer, boost::asio::experimental::detached);
- * @endcode
- */
-class detached_t
-{
-public:
- /// Constructor.
- BOOST_ASIO_CONSTEXPR detached_t()
- {
- }
-};
-
-/// A special value, similar to std::nothrow.
-/**
- * See the documentation for boost::asio::experimental::detached_t for a usage
- * example.
- */
-#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-constexpr detached_t detached;
-#elif defined(BOOST_ASIO_MSVC)
-__declspec(selectany) detached_t detached;
-#endif
-
-} // namespace experimental
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/experimental/impl/detached.hpp>
-
-#endif // BOOST_ASIO_EXPERIMENTAL_DETACHED_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp
deleted file mode 100644
index 51ffb4eeb1f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp
+++ /dev/null
@@ -1,878 +0,0 @@
-//
-// experimental/impl/co_spawn.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_EXPERIMENTAL_IMPL_CO_SPAWN_HPP
-#define BOOST_ASIO_EXPERIMENTAL_IMPL_CO_SPAWN_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <exception>
-#include <functional>
-#include <memory>
-#include <new>
-#include <tuple>
-#include <utility>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/thread_context.hpp>
-#include <boost/asio/detail/thread_info_base.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/dispatch.hpp>
-#include <boost/asio/post.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace experimental {
-namespace detail {
-
-// Promise object for coroutine at top of thread-of-execution "stack".
-template <typename Executor>
-class awaiter
-{
-public:
- struct deleter
- {
- void operator()(awaiter* a)
- {
- if (a)
- a->release();
- }
- };
-
- typedef std::unique_ptr<awaiter, deleter> ptr;
-
- typedef Executor executor_type;
-
- ~awaiter()
- {
- if (has_executor_)
- static_cast<Executor*>(static_cast<void*>(executor_))->~Executor();
- }
-
- void set_executor(const Executor& ex)
- {
- new (&executor_) Executor(ex);
- has_executor_ = true;
- }
-
- executor_type get_executor() const noexcept
- {
- return *static_cast<const Executor*>(static_cast<const void*>(executor_));
- }
-
- awaiter* get_return_object()
- {
- return this;
- }
-
- auto initial_suspend()
- {
- return std::experimental::suspend_always();
- }
-
- auto final_suspend()
- {
- return std::experimental::suspend_always();
- }
-
- void return_void()
- {
- }
-
- awaiter* add_ref()
- {
- ++ref_count_;
- return this;
- }
-
- void release()
- {
- if (--ref_count_ == 0)
- coroutine_handle<awaiter>::from_promise(*this).destroy();
- }
-
- void unhandled_exception()
- {
- pending_exception_ = std::current_exception();
- }
-
- void rethrow_unhandled_exception()
- {
- if (pending_exception_)
- {
- std::exception_ptr ex = std::exchange(pending_exception_, nullptr);
- std::rethrow_exception(ex);
- }
- }
-
-private:
- std::size_t ref_count_ = 0;
- std::exception_ptr pending_exception_ = nullptr;
- alignas(Executor) unsigned char executor_[sizeof(Executor)];
- bool has_executor_ = false;
-};
-
-// Base promise for coroutines further down the thread-of-execution "stack".
-template <typename Executor>
-class awaitee_base
-{
-public:
-#if !defined(BOOST_ASIO_DISABLE_AWAITEE_RECYCLING)
- void* operator new(std::size_t size)
- {
- return boost::asio::detail::thread_info_base::allocate(
- boost::asio::detail::thread_info_base::awaitee_tag(),
- boost::asio::detail::thread_context::thread_call_stack::top(),
- size);
- }
-
- void operator delete(void* pointer, std::size_t size)
- {
- boost::asio::detail::thread_info_base::deallocate(
- boost::asio::detail::thread_info_base::awaitee_tag(),
- boost::asio::detail::thread_context::thread_call_stack::top(),
- pointer, size);
- }
-#endif // !defined(BOOST_ASIO_DISABLE_AWAITEE_RECYCLING)
-
- auto initial_suspend()
- {
- return std::experimental::suspend_never();
- }
-
- struct final_suspender
- {
- awaitee_base* this_;
-
- bool await_ready() const noexcept
- {
- return false;
- }
-
- void await_suspend(coroutine_handle<void>)
- {
- this_->wake_caller();
- }
-
- void await_resume() const noexcept
- {
- }
- };
-
- auto final_suspend()
- {
- return final_suspender{this};
- }
-
- void set_except(std::exception_ptr e)
- {
- pending_exception_ = e;
- }
-
- void unhandled_exception()
- {
- set_except(std::current_exception());
- }
-
- void rethrow_exception()
- {
- if (pending_exception_)
- {
- std::exception_ptr ex = std::exchange(pending_exception_, nullptr);
- std::rethrow_exception(ex);
- }
- }
-
- awaiter<Executor>* top()
- {
- return awaiter_;
- }
-
- coroutine_handle<void> caller()
- {
- return caller_;
- }
-
- bool ready() const
- {
- return ready_;
- }
-
- void wake_caller()
- {
- if (caller_)
- caller_.resume();
- else
- ready_ = true;
- }
-
- class awaitable_executor
- {
- public:
- explicit awaitable_executor(awaitee_base* a)
- : this_(a)
- {
- }
-
- bool await_ready() const noexcept
- {
- return this_->awaiter_ != nullptr;
- }
-
- template <typename U, typename Ex>
- void await_suspend(coroutine_handle<detail::awaitee<U, Ex>> h) noexcept
- {
- this_->resume_on_attach_ = h;
- }
-
- Executor await_resume()
- {
- return this_->awaiter_->get_executor();
- }
-
- private:
- awaitee_base* this_;
- };
-
- awaitable_executor await_transform(this_coro::executor_t) noexcept
- {
- return awaitable_executor(this);
- }
-
- class awaitable_token
- {
- public:
- explicit awaitable_token(awaitee_base* a)
- : this_(a)
- {
- }
-
- bool await_ready() const noexcept
- {
- return this_->awaiter_ != nullptr;
- }
-
- template <typename U, typename Ex>
- void await_suspend(coroutine_handle<detail::awaitee<U, Ex>> h) noexcept
- {
- this_->resume_on_attach_ = h;
- }
-
- await_token<Executor> await_resume()
- {
- return await_token<Executor>(this_->awaiter_);
- }
-
- private:
- awaitee_base* this_;
- };
-
- awaitable_token await_transform(this_coro::token_t) noexcept
- {
- return awaitable_token(this);
- }
-
- template <typename T>
- awaitable<T, Executor> await_transform(awaitable<T, Executor>& t) const
- {
- return std::move(t);
- }
-
- template <typename T>
- awaitable<T, Executor> await_transform(awaitable<T, Executor>&& t) const
- {
- return std::move(t);
- }
-
- std::experimental::suspend_always await_transform(
- std::experimental::suspend_always) const
- {
- return std::experimental::suspend_always();
- }
-
- void attach_caller(coroutine_handle<awaiter<Executor>> h)
- {
- this->caller_ = h;
- this->attach_callees(&h.promise());
- }
-
- template <typename U>
- void attach_caller(coroutine_handle<awaitee<U, Executor>> h)
- {
- this->caller_ = h;
- if (h.promise().awaiter_)
- this->attach_callees(h.promise().awaiter_);
- else
- h.promise().unattached_callee_ = this;
- }
-
- void attach_callees(awaiter<Executor>* a)
- {
- for (awaitee_base* curr = this; curr != nullptr;
- curr = std::exchange(curr->unattached_callee_, nullptr))
- {
- curr->awaiter_ = a;
- if (curr->resume_on_attach_)
- return std::exchange(curr->resume_on_attach_, nullptr).resume();
- }
- }
-
-protected:
- awaiter<Executor>* awaiter_ = nullptr;
- coroutine_handle<void> caller_ = nullptr;
- awaitee_base<Executor>* unattached_callee_ = nullptr;
- std::exception_ptr pending_exception_ = nullptr;
- coroutine_handle<void> resume_on_attach_ = nullptr;
- bool ready_ = false;
-};
-
-// Promise object for coroutines further down the thread-of-execution "stack".
-template <typename T, typename Executor>
-class awaitee
- : public awaitee_base<Executor>
-{
-public:
- awaitee()
- {
- }
-
- awaitee(awaitee&& other) noexcept
- : awaitee_base<Executor>(std::move(other))
- {
- }
-
- ~awaitee()
- {
- if (has_result_)
- static_cast<T*>(static_cast<void*>(result_))->~T();
- }
-
- awaitable<T, Executor> get_return_object()
- {
- return awaitable<T, Executor>(this);
- };
-
- template <typename U>
- void return_value(U&& u)
- {
- new (&result_) T(std::forward<U>(u));
- has_result_ = true;
- }
-
- T get()
- {
- this->caller_ = nullptr;
- this->rethrow_exception();
- return std::move(*static_cast<T*>(static_cast<void*>(result_)));
- }
-
-private:
- alignas(T) unsigned char result_[sizeof(T)];
- bool has_result_ = false;
-};
-
-// Promise object for coroutines further down the thread-of-execution "stack".
-template <typename Executor>
-class awaitee<void, Executor>
- : public awaitee_base<Executor>
-{
-public:
- awaitable<void, Executor> get_return_object()
- {
- return awaitable<void, Executor>(this);
- };
-
- void return_void()
- {
- }
-
- void get()
- {
- this->caller_ = nullptr;
- this->rethrow_exception();
- }
-};
-
-template <typename Executor>
-class awaiter_task
-{
-public:
- typedef Executor executor_type;
-
- awaiter_task(awaiter<Executor>* a)
- : awaiter_(a->add_ref())
- {
- }
-
- awaiter_task(awaiter_task&& other) noexcept
- : awaiter_(std::exchange(other.awaiter_, nullptr))
- {
- }
-
- ~awaiter_task()
- {
- if (awaiter_)
- {
- // Coroutine "stack unwinding" must be performed through the executor.
- executor_type ex(awaiter_->get_executor());
- (post)(ex,
- [a = std::move(awaiter_)]() mutable
- {
- typename awaiter<Executor>::ptr(std::move(a));
- });
- }
- }
-
- executor_type get_executor() const noexcept
- {
- return awaiter_->get_executor();
- }
-
-protected:
- typename awaiter<Executor>::ptr awaiter_;
-};
-
-template <typename Executor>
-class co_spawn_handler : public awaiter_task<Executor>
-{
-public:
- using awaiter_task<Executor>::awaiter_task;
-
- void operator()()
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- coroutine_handle<awaiter<Executor>>::from_promise(*ptr.get()).resume();
- }
-};
-
-template <typename Executor, typename T>
-class await_handler_base : public awaiter_task<Executor>
-{
-public:
- typedef awaitable<T, Executor> awaitable_type;
-
- await_handler_base(await_token<Executor> token)
- : awaiter_task<Executor>(token.awaiter_),
- awaitee_(nullptr)
- {
- }
-
- await_handler_base(await_handler_base&& other) noexcept
- : awaiter_task<Executor>(std::move(other)),
- awaitee_(std::exchange(other.awaitee_, nullptr))
- {
- }
-
- void attach_awaitee(const awaitable<T, Executor>& a)
- {
- awaitee_ = a.awaitee_;
- }
-
-protected:
- awaitee<T, Executor>* awaitee_;
-};
-
-template <typename, typename...> class await_handler;
-
-template <typename Executor>
-class await_handler<Executor, void>
- : public await_handler_base<Executor, void>
-{
-public:
- using await_handler_base<Executor, void>::await_handler_base;
-
- void operator()()
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- this->awaitee_->return_void();
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor>
-class await_handler<Executor, boost::system::error_code>
- : public await_handler_base<Executor, void>
-{
-public:
- typedef void return_type;
-
- using await_handler_base<Executor, void>::await_handler_base;
-
- void operator()(const boost::system::error_code& ec)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- if (ec)
- {
- this->awaitee_->set_except(
- std::make_exception_ptr(boost::system::system_error(ec)));
- }
- else
- this->awaitee_->return_void();
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor>
-class await_handler<Executor, std::exception_ptr>
- : public await_handler_base<Executor, void>
-{
-public:
- using await_handler_base<Executor, void>::await_handler_base;
-
- void operator()(std::exception_ptr ex)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- if (ex)
- this->awaitee_->set_except(ex);
- else
- this->awaitee_->return_void();
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor, typename T>
-class await_handler<Executor, T>
- : public await_handler_base<Executor, T>
-{
-public:
- using await_handler_base<Executor, T>::await_handler_base;
-
- template <typename Arg>
- void operator()(Arg&& arg)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- this->awaitee_->return_value(std::forward<Arg>(arg));
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor, typename T>
-class await_handler<Executor, boost::system::error_code, T>
- : public await_handler_base<Executor, T>
-{
-public:
- using await_handler_base<Executor, T>::await_handler_base;
-
- template <typename Arg>
- void operator()(const boost::system::error_code& ec, Arg&& arg)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- if (ec)
- {
- this->awaitee_->set_except(
- std::make_exception_ptr(boost::system::system_error(ec)));
- }
- else
- this->awaitee_->return_value(std::forward<Arg>(arg));
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor, typename T>
-class await_handler<Executor, std::exception_ptr, T>
- : public await_handler_base<Executor, T>
-{
-public:
- using await_handler_base<Executor, T>::await_handler_base;
-
- template <typename Arg>
- void operator()(std::exception_ptr ex, Arg&& arg)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- if (ex)
- this->awaitee_->set_except(ex);
- else
- this->awaitee_->return_value(std::forward<Arg>(arg));
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor, typename... Ts>
-class await_handler
- : public await_handler_base<Executor, std::tuple<Ts...>>
-{
-public:
- using await_handler_base<Executor, std::tuple<Ts...>>::await_handler_base;
-
- template <typename... Args>
- void operator()(Args&&... args)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- this->awaitee_->return_value(
- std::forward_as_tuple(std::forward<Args>(args)...));
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor, typename... Ts>
-class await_handler<Executor, boost::system::error_code, Ts...>
- : public await_handler_base<Executor, std::tuple<Ts...>>
-{
-public:
- using await_handler_base<Executor, std::tuple<Ts...>>::await_handler_base;
-
- template <typename... Args>
- void operator()(const boost::system::error_code& ec, Args&&... args)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- if (ec)
- {
- this->awaitee_->set_except(
- std::make_exception_ptr(boost::system::system_error(ec)));
- }
- else
- {
- this->awaitee_->return_value(
- std::forward_as_tuple(std::forward<Args>(args)...));
- }
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename Executor, typename... Ts>
-class await_handler<Executor, std::exception_ptr, Ts...>
- : public await_handler_base<Executor, std::tuple<Ts...>>
-{
-public:
- using await_handler_base<Executor, std::tuple<Ts...>>::await_handler_base;
-
- template <typename... Args>
- void operator()(std::exception_ptr ex, Args&&... args)
- {
- typename awaiter<Executor>::ptr ptr(std::move(this->awaiter_));
- if (ex)
- this->awaitee_->set_except(ex);
- else
- {
- this->awaitee_->return_value(
- std::forward_as_tuple(std::forward<Args>(args)...));
- }
- this->awaitee_->wake_caller();
- ptr->rethrow_unhandled_exception();
- }
-};
-
-template <typename T>
-struct awaitable_signature;
-
-template <typename T, typename Executor>
-struct awaitable_signature<awaitable<T, Executor>>
-{
- typedef void type(std::exception_ptr, T);
-};
-
-template <typename Executor>
-struct awaitable_signature<awaitable<void, Executor>>
-{
- typedef void type(std::exception_ptr);
-};
-
-template <typename T, typename Executor, typename F, typename Handler>
-awaiter<Executor>* co_spawn_entry_point(awaitable<T, Executor>*,
- executor_work_guard<Executor> work_guard, F f, Handler handler)
-{
- bool done = false;
-
- try
- {
- T t = co_await f();
-
- done = true;
-
- (dispatch)(work_guard.get_executor(),
- [handler = std::move(handler), t = std::move(t)]() mutable
- {
- handler(std::exception_ptr(), std::move(t));
- });
- }
- catch (...)
- {
- if (done)
- throw;
-
- (dispatch)(work_guard.get_executor(),
- [handler = std::move(handler), e = std::current_exception()]() mutable
- {
- handler(e, T());
- });
- }
-}
-
-template <typename Executor, typename F, typename Handler>
-awaiter<Executor>* co_spawn_entry_point(awaitable<void, Executor>*,
- executor_work_guard<Executor> work_guard, F f, Handler handler)
-{
- std::exception_ptr e = nullptr;
-
- try
- {
- co_await f();
- }
- catch (...)
- {
- e = std::current_exception();
- }
-
- (dispatch)(work_guard.get_executor(),
- [handler = std::move(handler), e]() mutable
- {
- handler(e);
- });
-}
-
-template <typename Executor, typename F, typename CompletionToken>
-auto co_spawn(const Executor& ex, F&& f, CompletionToken&& token)
-{
- typedef typename result_of<F()>::type awaitable_type;
- typedef typename awaitable_type::executor_type executor_type;
- typedef typename awaitable_signature<awaitable_type>::type signature_type;
-
- async_completion<CompletionToken, signature_type> completion(token);
-
- executor_type ex2(ex);
- auto work_guard = make_work_guard(completion.completion_handler, ex2);
-
- auto* a = (co_spawn_entry_point)(
- static_cast<awaitable_type*>(nullptr), std::move(work_guard),
- std::forward<F>(f), std::move(completion.completion_handler));
-
- a->set_executor(ex2);
- (post)(co_spawn_handler<executor_type>(a));
-
- return completion.result.get();
-}
-
-#if defined(_MSC_VER)
-# pragma warning(push)
-# pragma warning(disable:4033)
-#endif // defined(_MSC_VER)
-
-#if defined(_MSC_VER)
-template <typename T> T dummy_return()
-{
- return std::move(*static_cast<T*>(nullptr));
-}
-
-template <>
-inline void dummy_return()
-{
-}
-#endif // defined(_MSC_VER)
-
-template <typename Awaitable>
-inline Awaitable make_dummy_awaitable()
-{
- for (;;) co_await std::experimental::suspend_always();
-#if defined(_MSC_VER)
- co_return dummy_return<typename Awaitable::value_type>();
-#endif // defined(_MSC_VER)
-}
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#endif // defined(_MSC_VER)
-
-} // namespace detail
-} // namespace experimental
-
-template <typename Executor, typename R, typename... Args>
-class async_result<experimental::await_token<Executor>, R(Args...)>
-{
-public:
- typedef experimental::detail::await_handler<
- Executor, typename decay<Args>::type...> completion_handler_type;
-
- typedef typename experimental::detail::await_handler<
- Executor, Args...>::awaitable_type return_type;
-
- async_result(completion_handler_type& h)
- : awaitable_(experimental::detail::make_dummy_awaitable<return_type>())
- {
- h.attach_awaitee(awaitable_);
- }
-
- return_type get()
- {
- return std::move(awaitable_);
- }
-
-private:
- return_type awaitable_;
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Executor, typename R, typename... Args>
-struct handler_type<experimental::await_token<Executor>, R(Args...)>
-{
- typedef experimental::detail::await_handler<
- Executor, typename decay<Args>::type...> type;
-};
-
-template <typename Executor, typename... Args>
-class async_result<experimental::detail::await_handler<Executor, Args...>>
-{
-public:
- typedef typename experimental::detail::await_handler<
- Executor, Args...>::awaitable_type type;
-
- async_result(experimental::detail::await_handler<Executor, Args...>& h)
- : awaitable_(experimental::detail::make_dummy_awaitable<type>())
- {
- h.attach_awaitee(awaitable_);
- }
-
- type get()
- {
- return std::move(awaitable_);
- }
-
-private:
- type awaitable_;
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-} // namespace asio
-} // namespace boost
-
-namespace std { namespace experimental {
-
-template <typename Executor, typename... Args>
-struct coroutine_traits<
- boost::asio::experimental::detail::awaiter<Executor>*, Args...>
-{
- typedef boost::asio::experimental::detail::awaiter<Executor> promise_type;
-};
-
-template <typename T, typename Executor, typename... Args>
-struct coroutine_traits<
- boost::asio::experimental::awaitable<T, Executor>, Args...>
-{
- typedef boost::asio::experimental::detail::awaitee<T, Executor> promise_type;
-};
-
-}} // namespace std::experimental
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_EXPERIMENTAL_IMPL_CO_SPAWN_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp
deleted file mode 100644
index c3baf20299e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// experimental/impl/detached.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_EXPERIMENTAL_IMPL_DETACHED_HPP
-#define BOOST_ASIO_EXPERIMENTAL_IMPL_DETACHED_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/variadic_templates.hpp>
-#include <boost/asio/handler_type.hpp>
-#include <boost/system/system_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace experimental {
-namespace detail {
-
- // Class to adapt a detached_t as a completion handler.
- class detached_handler
- {
- public:
- detached_handler(detached_t)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename... Args>
- void operator()(Args...)
- {
- }
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- void operator()()
- {
- }
-
-#define BOOST_ASIO_PRIVATE_DETACHED_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_DETACHED_DEF)
-#undef BOOST_ASIO_PRIVATE_DETACHED_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
- };
-
-} // namespace detail
-} // namespace experimental
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename Signature>
-struct async_result<experimental::detached_t, Signature>
-{
- typedef boost::asio::experimental::detail::detached_handler
- completion_handler_type;
-
- typedef void return_type;
-
- explicit async_result(completion_handler_type&)
- {
- }
-
- void get()
- {
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_EXPERIMENTAL_IMPL_DETACHED_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp
deleted file mode 100644
index 00ffcc7848b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp
+++ /dev/null
@@ -1,296 +0,0 @@
-//
-// experimental/impl/redirect_error.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_EXPERIMENTAL_IMPL_REDIRECT_ERROR_HPP
-#define BOOST_ASIO_EXPERIMENTAL_IMPL_REDIRECT_ERROR_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/associated_executor.hpp>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/async_result.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/type_traits.hpp>
-#include <boost/asio/detail/variadic_templates.hpp>
-#include <boost/asio/handler_type.hpp>
-#include <boost/system/system_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace experimental {
-namespace detail {
-
-// Class to adapt a redirect_error_t as a completion handler.
-template <typename Handler>
-class redirect_error_handler
-{
-public:
- template <typename CompletionToken>
- redirect_error_handler(redirect_error_t<CompletionToken> e)
- : ec_(e.ec_),
- handler_(BOOST_ASIO_MOVE_CAST(CompletionToken)(e.token_))
- {
- }
-
- void operator()()
- {
- handler_();
- }
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Arg, typename... Args>
- typename enable_if<
- !is_same<typename decay<Arg>::type, boost::system::error_code>::value
- >::type
- operator()(BOOST_ASIO_MOVE_ARG(Arg) arg, BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg),
- BOOST_ASIO_MOVE_CAST(Args)(args)...);
- }
-
- template <typename... Args>
- void operator()(const boost::system::error_code& ec,
- BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- ec_ = ec;
- handler_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Arg>
- typename enable_if<
- !is_same<typename decay<Arg>::type, boost::system::error_code>::value
- >::type
- operator()(BOOST_ASIO_MOVE_ARG(Arg) arg)
- {
- handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg));
- }
-
- void operator()(const boost::system::error_code& ec)
- {
- ec_ = ec;
- handler_();
- }
-
-#define BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
- template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- typename enable_if< \
- !is_same<typename decay<Arg>::type, boost::system::error_code>::value \
- >::type \
- operator()(BOOST_ASIO_MOVE_ARG(Arg) arg, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg), \
- BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const boost::system::error_code& ec, \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ec_ = ec; \
- handler_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF)
-#undef BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-//private:
- boost::system::error_code& ec_;
- Handler handler_;
-};
-
-template <typename Handler>
-inline void* asio_handler_allocate(std::size_t size,
- redirect_error_handler<Handler>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- redirect_error_handler<Handler>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler>
-inline bool asio_handler_is_continuation(
- redirect_error_handler<Handler>* this_handler)
-{
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler>
-inline void asio_handler_invoke(Function& function,
- redirect_error_handler<Handler>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler>
-inline void asio_handler_invoke(const Function& function,
- redirect_error_handler<Handler>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Signature>
-struct redirect_error_signature
-{
- typedef Signature type;
-};
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R, typename... Args>
-struct redirect_error_signature<R(boost::system::error_code, Args...)>
-{
- typedef R type(Args...);
-};
-
-template <typename R, typename... Args>
-struct redirect_error_signature<R(const boost::system::error_code&, Args...)>
-{
- typedef R type(Args...);
-};
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R>
-struct redirect_error_signature<R(boost::system::error_code)>
-{
- typedef R type();
-};
-
-template <typename R>
-struct redirect_error_signature<R(const boost::system::error_code&)>
-{
- typedef R type();
-};
-
-#define BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
- template <typename R, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(boost::system::error_code, BOOST_ASIO_VARIADIC_TARGS(n))> \
- { \
- typedef R type(BOOST_ASIO_VARIADIC_TARGS(n)); \
- }; \
- \
- template <typename R, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const boost::system::error_code&, BOOST_ASIO_VARIADIC_TARGS(n))> \
- { \
- typedef R type(BOOST_ASIO_VARIADIC_TARGS(n)); \
- }; \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF)
-#undef BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-} // namespace detail
-} // namespace experimental
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename Signature>
-struct async_result<experimental::redirect_error_t<CompletionToken>, Signature>
- : async_result<CompletionToken,
- typename experimental::detail::redirect_error_signature<Signature>::type>
-{
- typedef experimental::detail::redirect_error_handler<
- typename async_result<CompletionToken,
- typename experimental::detail::redirect_error_signature<Signature>::type>
- ::completion_handler_type> completion_handler_type;
-
- explicit async_result(completion_handler_type& h)
- : async_result<CompletionToken,
- typename experimental::detail::redirect_error_signature<
- Signature>::type>(h.handler_)
- {
- }
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename CompletionToken, typename Signature>
-struct handler_type<experimental::redirect_error_t<CompletionToken>, Signature>
-{
- typedef experimental::detail::redirect_error_handler<
- typename async_result<CompletionToken,
- typename experimental::detail::redirect_error_signature<Signature>::type>
- ::completion_handler_type> type;
-};
-
-template <typename Handler>
-struct async_result<experimental::detail::redirect_error_handler<Handler> >
- : async_result<Handler>
-{
- explicit async_result(
- experimental::detail::redirect_error_handler<Handler>& h)
- : async_result<Handler>(h.handler_)
- {
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Handler, typename Executor>
-struct associated_executor<
- experimental::detail::redirect_error_handler<Handler>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(
- const experimental::detail::redirect_error_handler<Handler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-template <typename Handler, typename Allocator>
-struct associated_allocator<
- experimental::detail::redirect_error_handler<Handler>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(
- const experimental::detail::redirect_error_handler<Handler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_EXPERIMENTAL_IMPL_REDIRECT_ERROR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp
deleted file mode 100644
index a1388545214..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// experimental/redirect_error.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_EXPERIMENTAL_REDIRECT_ERROR_HPP
-#define BOOST_ASIO_EXPERIMENTAL_REDIRECT_ERROR_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/system/error_code.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace experimental {
-
-/// Completion token type used to specify that an error produced by an
-/// asynchronous operation is captured to an error_code variable.
-/**
- * The redirect_error_t class is used to indicate that any error_code produced
- * by an asynchronous operation is captured to a specified variable.
- */
-template <typename CompletionToken>
-class redirect_error_t
-{
-public:
- /// Constructor.
- template <typename T>
- redirect_error_t(BOOST_ASIO_MOVE_ARG(T) completion_token,
- boost::system::error_code& ec)
- : token_(BOOST_ASIO_MOVE_CAST(T)(completion_token)),
- ec_(ec)
- {
- }
-
-//private:
- CompletionToken token_;
- boost::system::error_code& ec_;
-};
-
-/// Create a completion token to capture error_code values to a variable.
-template <typename CompletionToken>
-inline redirect_error_t<typename decay<CompletionToken>::type> redirect_error(
- CompletionToken&& completion_token, boost::system::error_code& ec)
-{
- return redirect_error_t<typename decay<CompletionToken>::type>(
- BOOST_ASIO_MOVE_CAST(CompletionToken)(completion_token), ec);
-}
-
-} // namespace experimental
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/experimental/impl/redirect_error.hpp>
-
-#endif // BOOST_ASIO_EXPERIMENTAL_REDIRECT_ERROR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp
deleted file mode 100644
index fc1c0ba2900..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp
+++ /dev/null
@@ -1,195 +0,0 @@
-//
-// generic/basic_endpoint.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_GENERIC_BASIC_ENDPOINT_HPP
-#define BOOST_ASIO_GENERIC_BASIC_ENDPOINT_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/generic/detail/endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-
-/// Describes an endpoint for any socket type.
-/**
- * The boost::asio::generic::basic_endpoint class template describes an endpoint
- * that may be associated with any socket type.
- *
- * @note The socket types sockaddr type must be able to fit into a
- * @c sockaddr_storage structure.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * Endpoint.
- */
-template <typename Protocol>
-class basic_endpoint
-{
-public:
- /// The protocol type associated with the endpoint.
- typedef Protocol protocol_type;
-
- /// The type of the endpoint structure. This type is dependent on the
- /// underlying implementation of the socket layer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined data_type;
-#else
- typedef boost::asio::detail::socket_addr_type data_type;
-#endif
-
- /// Default constructor.
- basic_endpoint()
- {
- }
-
- /// Construct an endpoint from the specified socket address.
- basic_endpoint(const void* socket_address,
- std::size_t socket_address_size, int socket_protocol = 0)
- : impl_(socket_address, socket_address_size, socket_protocol)
- {
- }
-
- /// Construct an endpoint from the specific endpoint type.
- template <typename Endpoint>
- basic_endpoint(const Endpoint& endpoint)
- : impl_(endpoint.data(), endpoint.size(), endpoint.protocol().protocol())
- {
- }
-
- /// Copy constructor.
- basic_endpoint(const basic_endpoint& other)
- : impl_(other.impl_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- basic_endpoint(basic_endpoint&& other)
- : impl_(other.impl_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other)
- {
- impl_ = other.impl_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other)
- {
- impl_ = other.impl_;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// The protocol associated with the endpoint.
- protocol_type protocol() const
- {
- return protocol_type(impl_.family(), impl_.protocol());
- }
-
- /// Get the underlying endpoint in the native type.
- data_type* data()
- {
- return impl_.data();
- }
-
- /// Get the underlying endpoint in the native type.
- const data_type* data() const
- {
- return impl_.data();
- }
-
- /// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
- {
- return impl_.size();
- }
-
- /// Set the underlying size of the endpoint in the native type.
- void resize(std::size_t new_size)
- {
- impl_.resize(new_size);
- }
-
- /// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
- {
- return impl_.capacity();
- }
-
- /// Compare two endpoints for equality.
- friend bool operator==(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return e1.impl_ == e2.impl_;
- }
-
- /// Compare two endpoints for inequality.
- friend bool operator!=(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return !(e1.impl_ == e2.impl_);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return e1.impl_ < e2.impl_;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return e2.impl_ < e1.impl_;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<=(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return !(e2 < e1);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>=(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return !(e1 < e2);
- }
-
-private:
- // The underlying generic endpoint.
- boost::asio::generic::detail::endpoint impl_;
-};
-
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_GENERIC_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp
deleted file mode 100644
index e9ef54f5303..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp
+++ /dev/null
@@ -1,125 +0,0 @@
-//
-// generic/datagram_protocol.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_GENERIC_DATAGRAM_PROTOCOL_HPP
-#define BOOST_ASIO_GENERIC_DATAGRAM_PROTOCOL_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/basic_datagram_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/generic/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-
-/// Encapsulates the flags needed for a generic datagram-oriented socket.
-/**
- * The boost::asio::generic::datagram_protocol class contains flags necessary
- * for datagram-oriented sockets of any address family and protocol.
- *
- * @par Examples
- * Constructing using a native address family and socket protocol:
- * @code datagram_protocol p(AF_INET, IPPROTO_UDP); @endcode
- * Constructing from a specific protocol type:
- * @code datagram_protocol p(boost::asio::ip::udp::v4()); @endcode
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol.
- */
-class datagram_protocol
-{
-public:
- /// Construct a protocol object for a specific address family and protocol.
- datagram_protocol(int address_family, int socket_protocol)
- : family_(address_family),
- protocol_(socket_protocol)
- {
- }
-
- /// Construct a generic protocol object from a specific protocol.
- /**
- * @throws @c bad_cast Thrown if the source protocol is not datagram-oriented.
- */
- template <typename Protocol>
- datagram_protocol(const Protocol& source_protocol)
- : family_(source_protocol.family()),
- protocol_(source_protocol.protocol())
- {
- if (source_protocol.type() != type())
- {
- std::bad_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_DGRAM);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return protocol_;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// Compare two protocols for equality.
- friend bool operator==(const datagram_protocol& p1,
- const datagram_protocol& p2)
- {
- return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const datagram_protocol& p1,
- const datagram_protocol& p2)
- {
- return !(p1 == p2);
- }
-
- /// The type of an endpoint.
- typedef basic_endpoint<datagram_protocol> endpoint;
-
- /// The generic socket type.
- typedef basic_datagram_socket<datagram_protocol> socket;
-
-private:
- int family_;
- int protocol_;
-};
-
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_GENERIC_DATAGRAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp
deleted file mode 100644
index c338d78da2f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// generic/detail/endpoint.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_GENERIC_DETAIL_ENDPOINT_HPP
-#define BOOST_ASIO_GENERIC_DETAIL_ENDPOINT_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/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-namespace detail {
-
-// Helper class for implementing a generic socket endpoint.
-class endpoint
-{
-public:
- // Default constructor.
- BOOST_ASIO_DECL endpoint();
-
- // Construct an endpoint from the specified raw bytes.
- BOOST_ASIO_DECL endpoint(const void* sock_addr,
- std::size_t sock_addr_size, int sock_protocol);
-
- // Copy constructor.
- endpoint(const endpoint& other)
- : data_(other.data_),
- size_(other.size_),
- protocol_(other.protocol_)
- {
- }
-
- // Assign from another endpoint.
- endpoint& operator=(const endpoint& other)
- {
- data_ = other.data_;
- size_ = other.size_;
- protocol_ = other.protocol_;
- return *this;
- }
-
- // Get the address family associated with the endpoint.
- int family() const
- {
- return data_.base.sa_family;
- }
-
- // Get the socket protocol associated with the endpoint.
- int protocol() const
- {
- return protocol_;
- }
-
- // Get the underlying endpoint in the native type.
- boost::asio::detail::socket_addr_type* data()
- {
- return &data_.base;
- }
-
- // Get the underlying endpoint in the native type.
- const boost::asio::detail::socket_addr_type* data() const
- {
- return &data_.base;
- }
-
- // Get the underlying size of the endpoint in the native type.
- std::size_t size() const
- {
- return size_;
- }
-
- // Set the underlying size of the endpoint in the native type.
- BOOST_ASIO_DECL void resize(std::size_t size);
-
- // Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
- {
- return sizeof(boost::asio::detail::sockaddr_storage_type);
- }
-
- // Compare two endpoints for equality.
- BOOST_ASIO_DECL friend bool operator==(
- const endpoint& e1, const endpoint& e2);
-
- // Compare endpoints for ordering.
- BOOST_ASIO_DECL friend bool operator<(
- const endpoint& e1, const endpoint& e2);
-
-private:
- // The underlying socket address.
- union data_union
- {
- boost::asio::detail::socket_addr_type base;
- boost::asio::detail::sockaddr_storage_type generic;
- } data_;
-
- // The length of the socket address stored in the endpoint.
- std::size_t size_;
-
- // The socket protocol associated with the endpoint.
- int protocol_;
-
- // Initialise with a specified memory.
- BOOST_ASIO_DECL void init(const void* sock_addr,
- std::size_t sock_addr_size, int sock_protocol);
-};
-
-} // namespace detail
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/generic/detail/impl/endpoint.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_GENERIC_DETAIL_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp b/src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp
deleted file mode 100644
index 97db811f2e7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// generic/detail/impl/endpoint.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_GENERIC_DETAIL_IMPL_ENDPOINT_IPP
-#define BOOST_ASIO_GENERIC_DETAIL_IMPL_ENDPOINT_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 <typeinfo>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/generic/detail/endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-namespace detail {
-
-endpoint::endpoint()
-{
- init(0, 0, 0);
-}
-
-endpoint::endpoint(const void* sock_addr,
- std::size_t sock_addr_size, int sock_protocol)
-{
- init(sock_addr, sock_addr_size, sock_protocol);
-}
-
-void endpoint::resize(std::size_t new_size)
-{
- if (new_size > sizeof(boost::asio::detail::sockaddr_storage_type))
- {
- boost::system::error_code ec(boost::asio::error::invalid_argument);
- boost::asio::detail::throw_error(ec);
- }
- else
- {
- size_ = new_size;
- protocol_ = 0;
- }
-}
-
-bool operator==(const endpoint& e1, const endpoint& e2)
-{
- using namespace std; // For memcmp.
- return e1.size() == e2.size() && memcmp(e1.data(), e2.data(), e1.size()) == 0;
-}
-
-bool operator<(const endpoint& e1, const endpoint& e2)
-{
- if (e1.protocol() < e2.protocol())
- return true;
-
- if (e1.protocol() > e2.protocol())
- return false;
-
- using namespace std; // For memcmp.
- std::size_t compare_size = e1.size() < e2.size() ? e1.size() : e2.size();
- int compare_result = memcmp(e1.data(), e2.data(), compare_size);
-
- if (compare_result < 0)
- return true;
-
- if (compare_result > 0)
- return false;
-
- return e1.size() < e2.size();
-}
-
-void endpoint::init(const void* sock_addr,
- std::size_t sock_addr_size, int sock_protocol)
-{
- if (sock_addr_size > sizeof(boost::asio::detail::sockaddr_storage_type))
- {
- boost::system::error_code ec(boost::asio::error::invalid_argument);
- boost::asio::detail::throw_error(ec);
- }
-
- using namespace std; // For memset and memcpy.
- memset(&data_.generic, 0, sizeof(boost::asio::detail::sockaddr_storage_type));
- if (sock_addr_size > 0)
- memcpy(&data_.generic, sock_addr, sock_addr_size);
-
- size_ = sock_addr_size;
- protocol_ = sock_protocol;
-}
-
-} // namespace detail
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_GENERIC_DETAIL_IMPL_ENDPOINT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp
deleted file mode 100644
index dca84e73f7c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// generic/raw_protocol.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_GENERIC_RAW_PROTOCOL_HPP
-#define BOOST_ASIO_GENERIC_RAW_PROTOCOL_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/basic_raw_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/generic/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-
-/// Encapsulates the flags needed for a generic raw socket.
-/**
- * The boost::asio::generic::raw_protocol class contains flags necessary for
- * raw sockets of any address family and protocol.
- *
- * @par Examples
- * Constructing using a native address family and socket protocol:
- * @code raw_protocol p(AF_INET, IPPROTO_ICMP); @endcode
- * Constructing from a specific protocol type:
- * @code raw_protocol p(boost::asio::ip::icmp::v4()); @endcode
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol.
- */
-class raw_protocol
-{
-public:
- /// Construct a protocol object for a specific address family and protocol.
- raw_protocol(int address_family, int socket_protocol)
- : family_(address_family),
- protocol_(socket_protocol)
- {
- }
-
- /// Construct a generic protocol object from a specific protocol.
- /**
- * @throws @c bad_cast Thrown if the source protocol is not raw-oriented.
- */
- template <typename Protocol>
- raw_protocol(const Protocol& source_protocol)
- : family_(source_protocol.family()),
- protocol_(source_protocol.protocol())
- {
- if (source_protocol.type() != type())
- {
- std::bad_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_RAW);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return protocol_;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// Compare two protocols for equality.
- friend bool operator==(const raw_protocol& p1, const raw_protocol& p2)
- {
- return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const raw_protocol& p1, const raw_protocol& p2)
- {
- return !(p1 == p2);
- }
-
- /// The type of an endpoint.
- typedef basic_endpoint<raw_protocol> endpoint;
-
- /// The generic socket type.
- typedef basic_raw_socket<raw_protocol> socket;
-
-private:
- int family_;
- int protocol_;
-};
-
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_GENERIC_RAW_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp
deleted file mode 100644
index e54f23e6d97..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// generic/seq_packet_protocol.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_GENERIC_SEQ_PACKET_PROTOCOL_HPP
-#define BOOST_ASIO_GENERIC_SEQ_PACKET_PROTOCOL_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/basic_seq_packet_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/generic/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-
-/// Encapsulates the flags needed for a generic sequenced packet socket.
-/**
- * The boost::asio::generic::seq_packet_protocol class contains flags necessary
- * for seq_packet-oriented sockets of any address family and protocol.
- *
- * @par Examples
- * Constructing using a native address family and socket protocol:
- * @code seq_packet_protocol p(AF_INET, IPPROTO_SCTP); @endcode
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol.
- */
-class seq_packet_protocol
-{
-public:
- /// Construct a protocol object for a specific address family and protocol.
- seq_packet_protocol(int address_family, int socket_protocol)
- : family_(address_family),
- protocol_(socket_protocol)
- {
- }
-
- /// Construct a generic protocol object from a specific protocol.
- /**
- * @throws @c bad_cast Thrown if the source protocol is not based around
- * sequenced packets.
- */
- template <typename Protocol>
- seq_packet_protocol(const Protocol& source_protocol)
- : family_(source_protocol.family()),
- protocol_(source_protocol.protocol())
- {
- if (source_protocol.type() != type())
- {
- std::bad_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_SEQPACKET);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return protocol_;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// Compare two protocols for equality.
- friend bool operator==(const seq_packet_protocol& p1,
- const seq_packet_protocol& p2)
- {
- return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const seq_packet_protocol& p1,
- const seq_packet_protocol& p2)
- {
- return !(p1 == p2);
- }
-
- /// The type of an endpoint.
- typedef basic_endpoint<seq_packet_protocol> endpoint;
-
- /// The generic socket type.
- typedef basic_seq_packet_socket<seq_packet_protocol> socket;
-
-private:
- int family_;
- int protocol_;
-};
-
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_GENERIC_SEQ_PACKET_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp
deleted file mode 100644
index 599f095dd03..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// generic/stream_protocol.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_GENERIC_STREAM_PROTOCOL_HPP
-#define BOOST_ASIO_GENERIC_STREAM_PROTOCOL_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/basic_socket_iostream.hpp>
-#include <boost/asio/basic_stream_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/generic/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace generic {
-
-/// Encapsulates the flags needed for a generic stream-oriented socket.
-/**
- * The boost::asio::generic::stream_protocol class contains flags necessary for
- * stream-oriented sockets of any address family and protocol.
- *
- * @par Examples
- * Constructing using a native address family and socket protocol:
- * @code stream_protocol p(AF_INET, IPPROTO_TCP); @endcode
- * Constructing from a specific protocol type:
- * @code stream_protocol p(boost::asio::ip::tcp::v4()); @endcode
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol.
- */
-class stream_protocol
-{
-public:
- /// Construct a protocol object for a specific address family and protocol.
- stream_protocol(int address_family, int socket_protocol)
- : family_(address_family),
- protocol_(socket_protocol)
- {
- }
-
- /// Construct a generic protocol object from a specific protocol.
- /**
- * @throws @c bad_cast Thrown if the source protocol is not stream-oriented.
- */
- template <typename Protocol>
- stream_protocol(const Protocol& source_protocol)
- : family_(source_protocol.family()),
- protocol_(source_protocol.protocol())
- {
- if (source_protocol.type() != type())
- {
- std::bad_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_STREAM);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return protocol_;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// Compare two protocols for equality.
- friend bool operator==(const stream_protocol& p1, const stream_protocol& p2)
- {
- return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const stream_protocol& p1, const stream_protocol& p2)
- {
- return !(p1 == p2);
- }
-
- /// The type of an endpoint.
- typedef basic_endpoint<stream_protocol> endpoint;
-
- /// The generic socket type.
- typedef basic_stream_socket<stream_protocol> socket;
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
- /// The generic socket iostream type.
- typedef basic_socket_iostream<stream_protocol> iostream;
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-private:
- int family_;
- int protocol_;
-};
-
-} // namespace generic
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_GENERIC_STREAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp
deleted file mode 100644
index c9636b53ad0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// handler_alloc_hook.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_HANDLER_ALLOC_HOOK_HPP
-#define BOOST_ASIO_HANDLER_ALLOC_HOOK_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/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default allocation function for handlers.
-/**
- * Asynchronous operations may need to allocate temporary objects. Since
- * asynchronous operations have a handler function object, these temporary
- * objects can be said to be associated with the handler.
- *
- * Implement asio_handler_allocate and asio_handler_deallocate for your own
- * handlers to provide custom allocation for these temporary objects.
- *
- * The default implementation of these allocation hooks uses <tt>::operator
- * new</tt> and <tt>::operator delete</tt>.
- *
- * @note All temporary objects associated with a handler will be deallocated
- * before the upcall to the handler is performed. This allows the same memory to
- * be reused for a subsequent asynchronous operation initiated by the handler.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * void* asio_handler_allocate(std::size_t size, my_handler* context)
- * {
- * return ::operator new(size);
- * }
- *
- * void asio_handler_deallocate(void* pointer, std::size_t size,
- * my_handler* context)
- * {
- * ::operator delete(pointer);
- * }
- * @endcode
- */
-BOOST_ASIO_DECL void* asio_handler_allocate(
- std::size_t size, ...);
-
-/// Default deallocation function for handlers.
-/**
- * Implement asio_handler_allocate and asio_handler_deallocate for your own
- * handlers to provide custom allocation for the associated temporary objects.
- *
- * The default implementation of these allocation hooks uses <tt>::operator
- * new</tt> and <tt>::operator delete</tt>.
- *
- * @sa asio_handler_allocate.
- */
-BOOST_ASIO_DECL void asio_handler_deallocate(
- void* pointer, std::size_t size, ...);
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/handler_alloc_hook.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_HANDLER_ALLOC_HOOK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp
deleted file mode 100644
index 4f446b0953f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// handler_continuation_hook.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_HANDLER_CONTINUATION_HOOK_HPP
-#define BOOST_ASIO_HANDLER_CONTINUATION_HOOK_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default continuation function for handlers.
-/**
- * Asynchronous operations may represent a continuation of the asynchronous
- * control flow associated with the current handler. The implementation can use
- * this knowledge to optimise scheduling of the handler.
- *
- * Implement asio_handler_is_continuation for your own handlers to indicate
- * when a handler represents a continuation.
- *
- * The default implementation of the continuation hook returns <tt>false</tt>.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * bool asio_handler_is_continuation(my_handler* context)
- * {
- * return true;
- * }
- * @endcode
- */
-inline bool asio_handler_is_continuation(...)
-{
- return false;
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp
deleted file mode 100644
index a853bdfaddb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// handler_invoke_hook.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_HANDLER_INVOKE_HOOK_HPP
-#define BOOST_ASIO_HANDLER_INVOKE_HOOK_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/** @defgroup asio_handler_invoke boost::asio::asio_handler_invoke
- *
- * @brief Default invoke function for handlers.
- *
- * Completion handlers for asynchronous operations are invoked by the
- * io_context associated with the corresponding object (e.g. a socket or
- * deadline_timer). Certain guarantees are made on when the handler may be
- * invoked, in particular that a handler can only be invoked from a thread that
- * is currently calling @c run() on the corresponding io_context object.
- * Handlers may subsequently be invoked through other objects (such as
- * io_context::strand objects) that provide additional guarantees.
- *
- * When asynchronous operations are composed from other asynchronous
- * operations, all intermediate handlers should be invoked using the same
- * method as the final handler. This is required to ensure that user-defined
- * objects are not accessed in a way that may violate the guarantees. This
- * hooking function ensures that the invoked method used for the final handler
- * is accessible at each intermediate step.
- *
- * Implement asio_handler_invoke for your own handlers to specify a custom
- * invocation strategy.
- *
- * This default implementation invokes the function object like so:
- * @code function(); @endcode
- * If necessary, the default implementation makes a copy of the function object
- * so that the non-const operator() can be used.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * template <typename Function>
- * void asio_handler_invoke(Function function, my_handler* context)
- * {
- * context->strand_.dispatch(function);
- * }
- * @endcode
- */
-/*@{*/
-
-/// Default handler invocation hook used for non-const function objects.
-template <typename Function>
-inline void asio_handler_invoke(Function& function, ...)
-{
- function();
-}
-
-/// Default handler invocation hook used for const function objects.
-template <typename Function>
-inline void asio_handler_invoke(const Function& function, ...)
-{
- Function tmp(function);
- tmp();
-}
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_HANDLER_INVOKE_HOOK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/handler_type.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_type.hpp
deleted file mode 100644
index 0c431893384..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/handler_type.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// handler_type.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_HANDLER_TYPE_HPP
-#define BOOST_ASIO_HANDLER_TYPE_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 {
-
-/// (Deprecated: Use two-parameter version of async_result.) Default handler
-/// type traits provided for all completion token types.
-/**
- * The handler_type traits class is used for determining the concrete handler
- * type to be used for an asynchronous operation. It allows the handler type to
- * be determined at the point where the specific completion handler signature
- * is known.
- *
- * This template may be specialised for user-defined completion token types.
- */
-template <typename CompletionToken, typename Signature, typename = void>
-struct handler_type
-{
- /// The handler type for the specific signature.
- typedef typename conditional<
- is_same<CompletionToken, typename decay<CompletionToken>::type>::value,
- decay<CompletionToken>,
- handler_type<typename decay<CompletionToken>::type, Signature>
- >::type::type type;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_HANDLER_TYPE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp
deleted file mode 100644
index f7383b7cc9a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// high_resolution_timer.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_HIGH_RESOLUTION_TIMER_HPP
-#define BOOST_ASIO_HIGH_RESOLUTION_TIMER_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_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/detail/chrono.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Typedef for a timer based on the high resolution clock.
-/**
- * This typedef uses the C++11 @c &lt;chrono&gt; standard library facility, if
- * available. Otherwise, it may use the Boost.Chrono library. To explicitly
- * utilise Boost.Chrono, use the basic_waitable_timer template directly:
- * @code
- * typedef basic_waitable_timer<boost::chrono::high_resolution_clock> timer;
- * @endcode
- */
-typedef basic_waitable_timer<
- chrono::high_resolution_clock>
- high_resolution_timer;
-
-} // namespace asio
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_HIGH_RESOLUTION_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp
deleted file mode 100644
index 2e1c55842b7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp
+++ /dev/null
@@ -1,431 +0,0 @@
-//
-// impl/buffered_read_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_IMPL_BUFFERED_READ_STREAM_HPP
-#define BOOST_ASIO_IMPL_BUFFERED_READ_STREAM_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename Stream>
-std::size_t buffered_read_stream<Stream>::fill()
-{
- detail::buffer_resize_guard<detail::buffered_stream_storage>
- resize_guard(storage_);
- std::size_t previous_size = storage_.size();
- storage_.resize(storage_.capacity());
- storage_.resize(previous_size + next_layer_.read_some(buffer(
- storage_.data() + previous_size,
- storage_.size() - previous_size)));
- resize_guard.commit();
- return storage_.size() - previous_size;
-}
-
-template <typename Stream>
-std::size_t buffered_read_stream<Stream>::fill(boost::system::error_code& ec)
-{
- detail::buffer_resize_guard<detail::buffered_stream_storage>
- resize_guard(storage_);
- std::size_t previous_size = storage_.size();
- storage_.resize(storage_.capacity());
- storage_.resize(previous_size + next_layer_.read_some(buffer(
- storage_.data() + previous_size,
- storage_.size() - previous_size),
- ec));
- resize_guard.commit();
- return storage_.size() - previous_size;
-}
-
-namespace detail
-{
- template <typename ReadHandler>
- class buffered_fill_handler
- {
- public:
- buffered_fill_handler(detail::buffered_stream_storage& storage,
- std::size_t previous_size, ReadHandler& handler)
- : storage_(storage),
- previous_size_(previous_size),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- buffered_fill_handler(const buffered_fill_handler& other)
- : storage_(other.storage_),
- previous_size_(other.previous_size_),
- handler_(other.handler_)
- {
- }
-
- buffered_fill_handler(buffered_fill_handler&& other)
- : storage_(other.storage_),
- previous_size_(other.previous_size_),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- const std::size_t bytes_transferred)
- {
- storage_.resize(previous_size_ + bytes_transferred);
- handler_(ec, bytes_transferred);
- }
-
- //private:
- detail::buffered_stream_storage& storage_;
- std::size_t previous_size_;
- ReadHandler handler_;
- };
-
- template <typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename ReadHandler>
- inline bool asio_handler_is_continuation(
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::buffered_fill_handler<ReadHandler>, Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(const detail::buffered_fill_handler<ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::buffered_fill_handler<ReadHandler>, Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(const detail::buffered_fill_handler<ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename Stream>
-template <typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-buffered_read_stream<Stream>::async_fill(
- 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);
-
- std::size_t previous_size = storage_.size();
- storage_.resize(storage_.capacity());
- next_layer_.async_read_some(
- buffer(
- storage_.data() + previous_size,
- storage_.size() - previous_size),
- detail::buffered_fill_handler<BOOST_ASIO_HANDLER_TYPE(
- ReadHandler, void (boost::system::error_code, std::size_t))>(
- storage_, previous_size, init.completion_handler));
-
- return init.result.get();
-}
-
-template <typename Stream>
-template <typename MutableBufferSequence>
-std::size_t buffered_read_stream<Stream>::read_some(
- const MutableBufferSequence& buffers)
-{
- using boost::asio::buffer_size;
- if (buffer_size(buffers) == 0)
- return 0;
-
- if (storage_.empty())
- this->fill();
-
- return this->copy(buffers);
-}
-
-template <typename Stream>
-template <typename MutableBufferSequence>
-std::size_t buffered_read_stream<Stream>::read_some(
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
-
- using boost::asio::buffer_size;
- if (buffer_size(buffers) == 0)
- return 0;
-
- if (storage_.empty() && !this->fill(ec))
- return 0;
-
- return this->copy(buffers);
-}
-
-namespace detail
-{
- template <typename MutableBufferSequence, typename ReadHandler>
- class buffered_read_some_handler
- {
- public:
- buffered_read_some_handler(detail::buffered_stream_storage& storage,
- const MutableBufferSequence& buffers, ReadHandler& handler)
- : storage_(storage),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- buffered_read_some_handler(const buffered_read_some_handler& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(other.handler_)
- {
- }
-
- buffered_read_some_handler(buffered_read_some_handler&& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- 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)
- {
- if (ec || storage_.empty())
- {
- const std::size_t length = 0;
- handler_(ec, length);
- }
- else
- {
- const std::size_t bytes_copied = boost::asio::buffer_copy(
- buffers_, storage_.data(), storage_.size());
- storage_.consume(bytes_copied);
- handler_(ec, bytes_copied);
- }
- }
-
- //private:
- detail::buffered_stream_storage& storage_;
- MutableBufferSequence buffers_;
- ReadHandler handler_;
- };
-
- template <typename MutableBufferSequence, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename MutableBufferSequence, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename MutableBufferSequence, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename MutableBufferSequence,
- typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename MutableBufferSequence,
- typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename MutableBufferSequence,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::buffered_read_some_handler<MutableBufferSequence, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename MutableBufferSequence,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::buffered_read_some_handler<MutableBufferSequence, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename Stream>
-template <typename MutableBufferSequence, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-buffered_read_stream<Stream>::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;
-
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- using boost::asio::buffer_size;
- if (buffer_size(buffers) == 0 || !storage_.empty())
- {
- next_layer_.async_read_some(BOOST_ASIO_MUTABLE_BUFFER(0, 0),
- detail::buffered_read_some_handler<
- MutableBufferSequence, BOOST_ASIO_HANDLER_TYPE(
- ReadHandler, void (boost::system::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
- else
- {
- this->async_fill(detail::buffered_read_some_handler<
- MutableBufferSequence, BOOST_ASIO_HANDLER_TYPE(
- ReadHandler, void (boost::system::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
-
- return init.result.get();
-}
-
-template <typename Stream>
-template <typename MutableBufferSequence>
-std::size_t buffered_read_stream<Stream>::peek(
- const MutableBufferSequence& buffers)
-{
- if (storage_.empty())
- this->fill();
- return this->peek_copy(buffers);
-}
-
-template <typename Stream>
-template <typename MutableBufferSequence>
-std::size_t buffered_read_stream<Stream>::peek(
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- if (storage_.empty() && !this->fill(ec))
- return 0;
- return this->peek_copy(buffers);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_BUFFERED_READ_STREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp
deleted file mode 100644
index c5ebf7537b9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp
+++ /dev/null
@@ -1,413 +0,0 @@
-//
-// impl/buffered_write_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_IMPL_BUFFERED_WRITE_STREAM_HPP
-#define BOOST_ASIO_IMPL_BUFFERED_WRITE_STREAM_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename Stream>
-std::size_t buffered_write_stream<Stream>::flush()
-{
- std::size_t bytes_written = write(next_layer_,
- buffer(storage_.data(), storage_.size()));
- storage_.consume(bytes_written);
- return bytes_written;
-}
-
-template <typename Stream>
-std::size_t buffered_write_stream<Stream>::flush(boost::system::error_code& ec)
-{
- std::size_t bytes_written = write(next_layer_,
- buffer(storage_.data(), storage_.size()),
- transfer_all(), ec);
- storage_.consume(bytes_written);
- return bytes_written;
-}
-
-namespace detail
-{
- template <typename WriteHandler>
- class buffered_flush_handler
- {
- public:
- buffered_flush_handler(detail::buffered_stream_storage& storage,
- WriteHandler& handler)
- : storage_(storage),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- buffered_flush_handler(const buffered_flush_handler& other)
- : storage_(other.storage_),
- handler_(other.handler_)
- {
- }
-
- buffered_flush_handler(buffered_flush_handler&& other)
- : storage_(other.storage_),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- const std::size_t bytes_written)
- {
- storage_.consume(bytes_written);
- handler_(ec, bytes_written);
- }
-
- //private:
- detail::buffered_stream_storage& storage_;
- WriteHandler handler_;
- };
-
- template <typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename WriteHandler>
- inline bool asio_handler_is_continuation(
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::buffered_flush_handler<WriteHandler>, Allocator>
-{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(const detail::buffered_flush_handler<WriteHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::buffered_flush_handler<WriteHandler>, Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
-
- static type get(const detail::buffered_flush_handler<WriteHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename Stream>
-template <typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-buffered_write_stream<Stream>::async_flush(
- 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- async_write(next_layer_, buffer(storage_.data(), storage_.size()),
- detail::buffered_flush_handler<BOOST_ASIO_HANDLER_TYPE(
- WriteHandler, void (boost::system::error_code, std::size_t))>(
- storage_, init.completion_handler));
-
- return init.result.get();
-}
-
-template <typename Stream>
-template <typename ConstBufferSequence>
-std::size_t buffered_write_stream<Stream>::write_some(
- const ConstBufferSequence& buffers)
-{
- using boost::asio::buffer_size;
- if (buffer_size(buffers) == 0)
- return 0;
-
- if (storage_.size() == storage_.capacity())
- this->flush();
-
- return this->copy(buffers);
-}
-
-template <typename Stream>
-template <typename ConstBufferSequence>
-std::size_t buffered_write_stream<Stream>::write_some(
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
-
- using boost::asio::buffer_size;
- if (buffer_size(buffers) == 0)
- return 0;
-
- if (storage_.size() == storage_.capacity() && !flush(ec))
- return 0;
-
- return this->copy(buffers);
-}
-
-namespace detail
-{
- template <typename ConstBufferSequence, typename WriteHandler>
- class buffered_write_some_handler
- {
- public:
- buffered_write_some_handler(detail::buffered_stream_storage& storage,
- const ConstBufferSequence& buffers, WriteHandler& handler)
- : storage_(storage),
- buffers_(buffers),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- buffered_write_some_handler(const buffered_write_some_handler& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(other.handler_)
- {
- }
-
- buffered_write_some_handler(buffered_write_some_handler&& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec, std::size_t)
- {
- if (ec)
- {
- const std::size_t length = 0;
- handler_(ec, length);
- }
- else
- {
- using boost::asio::buffer_size;
- std::size_t orig_size = storage_.size();
- std::size_t space_avail = storage_.capacity() - orig_size;
- std::size_t bytes_avail = buffer_size(buffers_);
- std::size_t length = bytes_avail < space_avail
- ? bytes_avail : space_avail;
- storage_.resize(orig_size + length);
- const std::size_t bytes_copied = boost::asio::buffer_copy(
- storage_.data() + orig_size, buffers_, length);
- handler_(ec, bytes_copied);
- }
- }
-
- //private:
- detail::buffered_stream_storage& storage_;
- ConstBufferSequence buffers_;
- WriteHandler handler_;
- };
-
- template <typename ConstBufferSequence, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename ConstBufferSequence, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename ConstBufferSequence, typename WriteHandler>
- inline bool asio_handler_is_continuation(
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename ConstBufferSequence,
- typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename ConstBufferSequence,
- typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename ConstBufferSequence,
- typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::buffered_write_some_handler<ConstBufferSequence, WriteHandler>,
- Allocator>
-{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
- const detail::buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename ConstBufferSequence,
- typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::buffered_write_some_handler<ConstBufferSequence, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
-
- static type get(
- const detail::buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename Stream>
-template <typename ConstBufferSequence, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-buffered_write_stream<Stream>::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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- using boost::asio::buffer_size;
- if (buffer_size(buffers) == 0
- || storage_.size() < storage_.capacity())
- {
- next_layer_.async_write_some(BOOST_ASIO_CONST_BUFFER(0, 0),
- detail::buffered_write_some_handler<
- ConstBufferSequence, BOOST_ASIO_HANDLER_TYPE(
- WriteHandler, void (boost::system::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
- else
- {
- this->async_flush(detail::buffered_write_some_handler<
- ConstBufferSequence, BOOST_ASIO_HANDLER_TYPE(
- WriteHandler, void (boost::system::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
-
- return init.result.get();
-}
-
-template <typename Stream>
-template <typename ConstBufferSequence>
-std::size_t buffered_write_stream<Stream>::copy(
- const ConstBufferSequence& buffers)
-{
- using boost::asio::buffer_size;
- std::size_t orig_size = storage_.size();
- std::size_t space_avail = storage_.capacity() - orig_size;
- std::size_t bytes_avail = buffer_size(buffers);
- std::size_t length = bytes_avail < space_avail ? bytes_avail : space_avail;
- storage_.resize(orig_size + length);
- return boost::asio::buffer_copy(
- storage_.data() + orig_size, buffers, length);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_BUFFERED_WRITE_STREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp
deleted file mode 100644
index 497f25884c6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp
+++ /dev/null
@@ -1,862 +0,0 @@
-//
-// impl/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_IMPL_CONNECT_HPP
-#define BOOST_ASIO_IMPL_CONNECT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <algorithm>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.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/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/post.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- struct default_connect_condition
- {
- template <typename Endpoint>
- bool operator()(const boost::system::error_code&, const Endpoint&)
- {
- return true;
- }
- };
-
- template <typename Protocol, typename Iterator>
- inline typename Protocol::endpoint deref_connect_result(
- Iterator iter, boost::system::error_code& ec)
- {
- return ec ? typename Protocol::endpoint() : *iter;
- }
-
- template <typename T, typename Iterator>
- struct legacy_connect_condition_helper : T
- {
- typedef char (*fallback_func_type)(...);
- operator fallback_func_type() const;
- };
-
- template <typename R, typename Arg1, typename Arg2, typename Iterator>
- struct legacy_connect_condition_helper<R (*)(Arg1, Arg2), Iterator>
- {
- R operator()(Arg1, Arg2) const;
- char operator()(...) const;
- };
-
- template <typename T, typename Iterator>
- struct is_legacy_connect_condition
- {
- static char asio_connect_condition_check(char);
- static char (&asio_connect_condition_check(Iterator))[2];
-
- static const bool value =
- sizeof(asio_connect_condition_check(
- (*static_cast<legacy_connect_condition_helper<T, Iterator>*>(0))(
- *static_cast<const boost::system::error_code*>(0),
- *static_cast<const Iterator*>(0)))) != 1;
- };
-
- template <typename ConnectCondition, typename Iterator>
- inline Iterator call_connect_condition(ConnectCondition& connect_condition,
- const boost::system::error_code& ec, Iterator next, Iterator end,
- typename enable_if<is_legacy_connect_condition<
- ConnectCondition, Iterator>::value>::type* = 0)
- {
- if (next != end)
- return connect_condition(ec, next);
- return end;
- }
-
- template <typename ConnectCondition, typename Iterator>
- inline Iterator call_connect_condition(ConnectCondition& connect_condition,
- const boost::system::error_code& ec, Iterator next, Iterator end,
- typename enable_if<!is_legacy_connect_condition<
- ConnectCondition, Iterator>::value>::type* = 0)
- {
- for (;next != end; ++next)
- if (connect_condition(ec, *next))
- return next;
- return end;
- }
-}
-
-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*)
-{
- boost::system::error_code ec;
- typename Protocol::endpoint result = connect(s, endpoints, ec);
- boost::asio::detail::throw_error(ec, "connect");
- return result;
-}
-
-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*)
-{
- return detail::deref_connect_result<Protocol>(
- connect(s, endpoints.begin(), endpoints.end(),
- detail::default_connect_condition(), ec), ec);
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-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*)
-{
- boost::system::error_code ec;
- Iterator result = connect(s, begin, ec);
- boost::asio::detail::throw_error(ec, "connect");
- return result;
-}
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
-inline 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*)
-{
- return connect(s, begin, Iterator(), detail::default_connect_condition(), ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-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;
- Iterator result = connect(s, begin, end, ec);
- boost::asio::detail::throw_error(ec, "connect");
- return result;
-}
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
-inline Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end, boost::system::error_code& ec)
-{
- return connect(s, begin, end, detail::default_connect_condition(), ec);
-}
-
-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*)
-{
- boost::system::error_code ec;
- typename Protocol::endpoint result = connect(
- s, endpoints, connect_condition, ec);
- boost::asio::detail::throw_error(ec, "connect");
- return result;
-}
-
-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*)
-{
- return detail::deref_connect_result<Protocol>(
- connect(s, endpoints.begin(), endpoints.end(),
- connect_condition, ec), ec);
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-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*)
-{
- boost::system::error_code ec;
- Iterator result = connect(s, begin, connect_condition, ec);
- boost::asio::detail::throw_error(ec, "connect");
- return result;
-}
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition>
-inline 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*)
-{
- return connect(s, begin, Iterator(), connect_condition, ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-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;
- Iterator result = connect(s, begin, end, connect_condition, ec);
- boost::asio::detail::throw_error(ec, "connect");
- return result;
-}
-
-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)
-{
- ec = boost::system::error_code();
-
- for (Iterator iter = begin; iter != end; ++iter)
- {
- iter = (detail::call_connect_condition(connect_condition, ec, iter, end));
- if (iter != end)
- {
- s.close(ec);
- s.connect(*iter, ec);
- if (!ec)
- return iter;
- }
- else
- break;
- }
-
- if (!ec)
- ec = boost::asio::error::not_found;
-
- return end;
-}
-
-namespace detail
-{
- // Enable the empty base class optimisation for the connect condition.
- template <typename ConnectCondition>
- class base_from_connect_condition
- {
- protected:
- explicit base_from_connect_condition(
- const ConnectCondition& connect_condition)
- : connect_condition_(connect_condition)
- {
- }
-
- template <typename Iterator>
- void check_condition(const boost::system::error_code& ec,
- Iterator& iter, Iterator& end)
- {
- iter = detail::call_connect_condition(connect_condition_, ec, iter, end);
- }
-
- private:
- ConnectCondition connect_condition_;
- };
-
- // The default_connect_condition implementation is essentially a no-op. This
- // template specialisation lets us eliminate all costs associated with it.
- template <>
- class base_from_connect_condition<default_connect_condition>
- {
- protected:
- explicit base_from_connect_condition(const default_connect_condition&)
- {
- }
-
- template <typename Iterator>
- void check_condition(const boost::system::error_code&, Iterator&, Iterator&)
- {
- }
- };
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- class range_connect_op : base_from_connect_condition<ConnectCondition>
- {
- public:
- range_connect_op(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& sock,
- const EndpointSequence& endpoints,
- const ConnectCondition& connect_condition,
- RangeConnectHandler& handler)
- : base_from_connect_condition<ConnectCondition>(connect_condition),
- socket_(sock),
- endpoints_(endpoints),
- index_(0),
- start_(0),
- handler_(BOOST_ASIO_MOVE_CAST(RangeConnectHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- range_connect_op(const range_connect_op& other)
- : base_from_connect_condition<ConnectCondition>(other),
- socket_(other.socket_),
- endpoints_(other.endpoints_),
- index_(other.index_),
- start_(other.start_),
- handler_(other.handler_)
- {
- }
-
- range_connect_op(range_connect_op&& other)
- : base_from_connect_condition<ConnectCondition>(other),
- socket_(other.socket_),
- endpoints_(other.endpoints_),
- index_(other.index_),
- start_(other.start_),
- handler_(BOOST_ASIO_MOVE_CAST(RangeConnectHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(boost::system::error_code ec, int start = 0)
- {
- typename EndpointSequence::const_iterator begin = endpoints_.begin();
- typename EndpointSequence::const_iterator iter = begin;
- std::advance(iter, index_);
- typename EndpointSequence::const_iterator end = endpoints_.end();
-
- switch (start_ = start)
- {
- case 1:
- for (;;)
- {
- this->check_condition(ec, iter, end);
- index_ = std::distance(begin, iter);
-
- if (iter != end)
- {
- socket_.close(ec);
- socket_.async_connect(*iter,
- BOOST_ASIO_MOVE_CAST(range_connect_op)(*this));
- return;
- }
-
- if (start)
- {
- ec = boost::asio::error::not_found;
- boost::asio::post(socket_.get_executor(),
- detail::bind_handler(
- BOOST_ASIO_MOVE_CAST(range_connect_op)(*this), ec));
- return;
- }
-
- default:
-
- if (iter == end)
- break;
-
- if (!socket_.is_open())
- {
- ec = boost::asio::error::operation_aborted;
- break;
- }
-
- if (!ec)
- break;
-
- ++iter;
- ++index_;
- }
-
- handler_(static_cast<const boost::system::error_code&>(ec),
- static_cast<const typename Protocol::endpoint&>(
- ec || iter == end ? typename Protocol::endpoint() : *iter));
- }
- }
-
- //private:
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket_;
- EndpointSequence endpoints_;
- std::size_t index_;
- int start_;
- RangeConnectHandler handler_;
- };
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline void* asio_handler_allocate(std::size_t size,
- range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline bool asio_handler_is_continuation(
- range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename Protocol
- BOOST_ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
- inline void asio_handler_invoke(Function& function,
- range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename Protocol
- BOOST_ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
- inline void asio_handler_invoke(const Function& function,
- range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- class iterator_connect_op : base_from_connect_condition<ConnectCondition>
- {
- public:
- iterator_connect_op(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& sock,
- const Iterator& begin, const Iterator& end,
- const ConnectCondition& connect_condition,
- IteratorConnectHandler& handler)
- : base_from_connect_condition<ConnectCondition>(connect_condition),
- socket_(sock),
- iter_(begin),
- end_(end),
- start_(0),
- handler_(BOOST_ASIO_MOVE_CAST(IteratorConnectHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- iterator_connect_op(const iterator_connect_op& other)
- : base_from_connect_condition<ConnectCondition>(other),
- socket_(other.socket_),
- iter_(other.iter_),
- end_(other.end_),
- start_(other.start_),
- handler_(other.handler_)
- {
- }
-
- iterator_connect_op(iterator_connect_op&& other)
- : base_from_connect_condition<ConnectCondition>(other),
- socket_(other.socket_),
- iter_(other.iter_),
- end_(other.end_),
- start_(other.start_),
- handler_(BOOST_ASIO_MOVE_CAST(IteratorConnectHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(boost::system::error_code ec, int start = 0)
- {
- switch (start_ = start)
- {
- case 1:
- for (;;)
- {
- this->check_condition(ec, iter_, end_);
-
- if (iter_ != end_)
- {
- socket_.close(ec);
- socket_.async_connect(*iter_,
- BOOST_ASIO_MOVE_CAST(iterator_connect_op)(*this));
- return;
- }
-
- if (start)
- {
- ec = boost::asio::error::not_found;
- boost::asio::post(socket_.get_executor(),
- detail::bind_handler(
- BOOST_ASIO_MOVE_CAST(iterator_connect_op)(*this), ec));
- return;
- }
-
- default:
-
- if (iter_ == end_)
- break;
-
- if (!socket_.is_open())
- {
- ec = boost::asio::error::operation_aborted;
- break;
- }
-
- if (!ec)
- break;
-
- ++iter_;
- }
-
- handler_(static_cast<const boost::system::error_code&>(ec),
- static_cast<const Iterator&>(iter_));
- }
- }
-
- //private:
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket_;
- Iterator iter_;
- Iterator end_;
- int start_;
- IteratorConnectHandler handler_;
- };
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void* asio_handler_allocate(std::size_t size,
- iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline bool asio_handler_is_continuation(
- iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename Protocol
- BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void asio_handler_invoke(Function& function,
- iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename Protocol
- BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void asio_handler_invoke(const Function& function,
- iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler, typename Allocator>
-struct associated_allocator<
- detail::range_connect_op<Protocol BOOST_ASIO_SVC_TARG,
- EndpointSequence, ConnectCondition, RangeConnectHandler>,
- Allocator>
-{
- typedef typename associated_allocator<
- RangeConnectHandler, Allocator>::type type;
-
- static type get(
- const detail::range_connect_op<Protocol BOOST_ASIO_SVC_TARG,
- EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<RangeConnectHandler,
- Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler, typename Executor>
-struct associated_executor<
- detail::range_connect_op<Protocol BOOST_ASIO_SVC_TARG,
- EndpointSequence, ConnectCondition, RangeConnectHandler>,
- Executor>
-{
- typedef typename associated_executor<
- RangeConnectHandler, Executor>::type type;
-
- static type get(
- const detail::range_connect_op<Protocol BOOST_ASIO_SVC_TARG,
- EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<RangeConnectHandler,
- Executor>::get(h.handler_, ex);
- }
-};
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition,
- typename IteratorConnectHandler, typename Allocator>
-struct associated_allocator<
- detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>,
- Allocator>
-{
- typedef typename associated_allocator<
- IteratorConnectHandler, Allocator>::type type;
-
- static type get(
- const detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG,
- Iterator, ConnectCondition, IteratorConnectHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<IteratorConnectHandler,
- Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition,
- typename IteratorConnectHandler, typename Executor>
-struct associated_executor<
- detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>,
- Executor>
-{
- typedef typename associated_executor<
- IteratorConnectHandler, Executor>::type type;
-
- static type get(
- const detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG,
- Iterator, ConnectCondition, IteratorConnectHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<IteratorConnectHandler,
- Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename RangeConnectHandler>
-inline 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*)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a RangeConnectHandler.
- BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK(
- RangeConnectHandler, handler, typename Protocol::endpoint) type_check;
-
- async_completion<RangeConnectHandler,
- void (boost::system::error_code, typename Protocol::endpoint)>
- init(handler);
-
- detail::range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- detail::default_connect_condition,
- BOOST_ASIO_HANDLER_TYPE(RangeConnectHandler,
- void (boost::system::error_code, typename Protocol::endpoint))>(s,
- endpoints, detail::default_connect_condition(),
- init.completion_handler)(boost::system::error_code(), 1);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-inline 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*)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (boost::system::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- detail::default_connect_condition, BOOST_ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (boost::system::error_code, Iterator))>(s,
- begin, Iterator(), detail::default_connect_condition(),
- init.completion_handler)(boost::system::error_code(), 1);
-
- return init.result.get();
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-inline 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)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (boost::system::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- detail::default_connect_condition, BOOST_ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (boost::system::error_code, Iterator))>(s,
- begin, end, detail::default_connect_condition(),
- init.completion_handler)(boost::system::error_code(), 1);
-
- return init.result.get();
-}
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
-inline 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*)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a RangeConnectHandler.
- BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK(
- RangeConnectHandler, handler, typename Protocol::endpoint) type_check;
-
- async_completion<RangeConnectHandler,
- void (boost::system::error_code, typename Protocol::endpoint)>
- init(handler);
-
- detail::range_connect_op<Protocol BOOST_ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, BOOST_ASIO_HANDLER_TYPE(RangeConnectHandler,
- void (boost::system::error_code, typename Protocol::endpoint))>(s,
- endpoints, connect_condition, init.completion_handler)(
- boost::system::error_code(), 1);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-inline 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*)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (boost::system::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, BOOST_ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (boost::system::error_code, Iterator))>(s,
- begin, Iterator(), connect_condition, init.completion_handler)(
- boost::system::error_code(), 1);
-
- return init.result.get();
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-inline 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)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (boost::system::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol BOOST_ASIO_SVC_TARG, Iterator,
- ConnectCondition, BOOST_ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (boost::system::error_code, Iterator))>(s,
- begin, end, connect_condition, init.completion_handler)(
- boost::system::error_code(), 1);
-
- return init.result.get();
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_CONNECT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp
deleted file mode 100644
index 7cc86da45cc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// impl/defer.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_DEFER_HPP
-#define BOOST_ASIO_IMPL_DEFER_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/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/detail/work_dispatcher.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef BOOST_ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_executor<handler>::type ex(
- (get_associated_executor)(init.completion_handler));
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.defer(BOOST_ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename Executor, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- typedef BOOST_ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.defer(detail::work_dispatcher<handler>(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename ExecutionContext, typename CompletionToken>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- return (defer)(ctx.get_executor(),
- BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_DEFER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp
deleted file mode 100644
index 8bdce85180b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// impl/dispatch.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_DISPATCH_HPP
-#define BOOST_ASIO_IMPL_DISPATCH_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/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/detail/work_dispatcher.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef BOOST_ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_executor<handler>::type ex(
- (get_associated_executor)(init.completion_handler));
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.dispatch(BOOST_ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename Executor, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- typedef BOOST_ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.dispatch(detail::work_dispatcher<handler>(
- init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename ExecutionContext, typename CompletionToken>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- return (dispatch)(ctx.get_executor(),
- BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_DISPATCH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/error.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/error.ipp
deleted file mode 100644
index 49a10462bdf..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/error.ipp
+++ /dev/null
@@ -1,130 +0,0 @@
-//
-// impl/error.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_IMPL_ERROR_IPP
-#define BOOST_ASIO_IMPL_ERROR_IPP
-
-#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/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace error {
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-namespace detail {
-
-class netdb_category : public boost::system::error_category
-{
-public:
- const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
- {
- return "asio.netdb";
- }
-
- std::string message(int value) const
- {
- if (value == error::host_not_found)
- return "Host not found (authoritative)";
- if (value == error::host_not_found_try_again)
- return "Host not found (non-authoritative), try again later";
- if (value == error::no_data)
- return "The query is valid, but it does not have associated data";
- if (value == error::no_recovery)
- return "A non-recoverable error occurred during database lookup";
- return "asio.netdb error";
- }
-};
-
-} // namespace detail
-
-const boost::system::error_category& get_netdb_category()
-{
- static detail::netdb_category instance;
- return instance;
-}
-
-namespace detail {
-
-class addrinfo_category : public boost::system::error_category
-{
-public:
- const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
- {
- return "asio.addrinfo";
- }
-
- std::string message(int value) const
- {
- if (value == error::service_not_found)
- return "Service not found";
- if (value == error::socket_type_not_supported)
- return "Socket type not supported";
- return "asio.addrinfo error";
- }
-};
-
-} // namespace detail
-
-const boost::system::error_category& get_addrinfo_category()
-{
- static detail::addrinfo_category instance;
- return instance;
-}
-
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-namespace detail {
-
-class misc_category : public boost::system::error_category
-{
-public:
- const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
- {
- return "asio.misc";
- }
-
- std::string message(int value) const
- {
- if (value == error::already_open)
- return "Already open";
- if (value == error::eof)
- return "End of file";
- if (value == error::not_found)
- return "Element not found";
- if (value == error::fd_set_failure)
- return "The descriptor does not fit into the select call's fd_set";
- return "asio.misc error";
- }
-};
-
-} // namespace detail
-
-const boost::system::error_category& get_misc_category()
-{
- static detail::misc_category instance;
- return instance;
-}
-
-} // namespace error
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_ERROR_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp
deleted file mode 100644
index eadf36b145c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// impl/execution_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_EXECUTION_CONTEXT_HPP
-#define BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/detail/service_registry.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename Service>
-inline Service& use_service(execution_context& e)
-{
- // Check that Service meets the necessary type requirements.
- (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
-
- return e.service_registry_->template use_service<Service>();
-}
-
-#if !defined(GENERATING_DOCUMENTATION)
-# if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Service, typename... Args>
-Service& make_service(execution_context& e, BOOST_ASIO_MOVE_ARG(Args)... args)
-{
- detail::scoped_ptr<Service> svc(
- new Service(e, BOOST_ASIO_MOVE_CAST(Args)(args)...));
- e.service_registry_->template add_service<Service>(svc.get());
- Service& result = *svc;
- svc.release();
- return result;
-}
-
-# else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Service>
-Service& make_service(execution_context& e)
-{
- detail::scoped_ptr<Service> svc(new Service(e));
- e.service_registry_->template add_service<Service>(svc.get());
- Service& result = *svc;
- svc.release();
- return result;
-}
-
-#define BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
- template <typename Service, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- Service& make_service(execution_context& e, \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- detail::scoped_ptr<Service> svc( \
- new Service(e, BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
- e.service_registry_->template add_service<Service>(svc.get()); \
- Service& result = *svc; \
- svc.release(); \
- return result; \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF)
-#undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF
-
-# endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename Service>
-inline void add_service(execution_context& e, Service* svc)
-{
- // Check that Service meets the necessary type requirements.
- (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
-
- e.service_registry_->template add_service<Service>(svc);
-}
-
-template <typename Service>
-inline bool has_service(execution_context& e)
-{
- // Check that Service meets the necessary type requirements.
- (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
-
- return e.service_registry_->template has_service<Service>();
-}
-
-inline execution_context& execution_context::service::context()
-{
- return owner_;
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp
deleted file mode 100644
index 219a66113db..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// impl/execution_context.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_IMPL_EXECUTION_CONTEXT_IPP
-#define BOOST_ASIO_IMPL_EXECUTION_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 <boost/asio/execution_context.hpp>
-#include <boost/asio/detail/service_registry.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-execution_context::execution_context()
- : service_registry_(new boost::asio::detail::service_registry(*this))
-{
-}
-
-execution_context::~execution_context()
-{
- shutdown();
- destroy();
- delete service_registry_;
-}
-
-void execution_context::shutdown()
-{
- service_registry_->shutdown_services();
-}
-
-void execution_context::destroy()
-{
- service_registry_->destroy_services();
-}
-
-void execution_context::notify_fork(
- boost::asio::execution_context::fork_event event)
-{
- service_registry_->notify_fork(event);
-}
-
-execution_context::service::service(execution_context& owner)
- : owner_(owner),
- next_(0)
-{
-}
-
-execution_context::service::~service()
-{
-}
-
-void execution_context::service::notify_fork(execution_context::fork_event)
-{
-}
-
-service_already_exists::service_already_exists()
- : std::logic_error("Service already exists.")
-{
-}
-
-invalid_service_owner::invalid_service_owner()
- : std::logic_error("Invalid service owner.")
-{
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_EXECUTION_CONTEXT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp
deleted file mode 100644
index 106763b042a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp
+++ /dev/null
@@ -1,388 +0,0 @@
-//
-// impl/executor.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_EXECUTOR_HPP
-#define BOOST_ASIO_IMPL_EXECUTOR_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/atomic_count.hpp>
-#include <boost/asio/detail/executor_op.hpp>
-#include <boost/asio/detail/global.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/recycling_allocator.hpp>
-#include <boost/asio/executor.hpp>
-#include <boost/asio/system_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-
-// Lightweight, move-only function object wrapper.
-class executor::function
-{
-public:
- template <typename F, typename Alloc>
- explicit function(F f, const Alloc& a)
- {
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<F, Alloc> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- op_ = new (p.v) op(BOOST_ASIO_MOVE_CAST(F)(f), a);
- p.v = 0;
- }
-
- function(function&& other)
- : op_(other.op_)
- {
- other.op_ = 0;
- }
-
- ~function()
- {
- if (op_)
- op_->destroy();
- }
-
- void operator()()
- {
- if (op_)
- {
- detail::scheduler_operation* op = op_;
- op_ = 0;
- op->complete(this, boost::system::error_code(), 0);
- }
- }
-
-private:
- detail::scheduler_operation* op_;
-};
-
-#else // defined(BOOST_ASIO_HAS_MOVE)
-
-// Not so lightweight, copyable function object wrapper.
-class executor::function
-{
-public:
- template <typename F, typename Alloc>
- explicit function(const F& f, const Alloc&)
- : impl_(new impl<F>(f))
- {
- }
-
- void operator()()
- {
- impl_->invoke_(impl_.get());
- }
-
-private:
- // Base class for polymorphic function implementations.
- struct impl_base
- {
- void (*invoke_)(impl_base*);
- };
-
- // Polymorphic function implementation.
- template <typename F>
- struct impl : impl_base
- {
- impl(const F& f)
- : function_(f)
- {
- invoke_ = &function::invoke<F>;
- }
-
- F function_;
- };
-
- // Helper to invoke a function.
- template <typename F>
- static void invoke(impl_base* i)
- {
- static_cast<impl<F>*>(i)->function_();
- }
-
- detail::shared_ptr<impl_base> impl_;
-};
-
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-// Default polymorphic allocator implementation.
-template <typename Executor, typename Allocator>
-class executor::impl
- : public executor::impl_base
-{
-public:
- typedef BOOST_ASIO_REBIND_ALLOC(Allocator, impl) allocator_type;
-
- static impl_base* create(const Executor& e, Allocator a = Allocator())
- {
- raw_mem mem(a);
- impl* p = new (mem.ptr_) impl(e, a);
- mem.ptr_ = 0;
- return p;
- }
-
- impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
- : impl_base(false),
- ref_count_(1),
- executor_(e),
- allocator_(a)
- {
- }
-
- impl_base* clone() const BOOST_ASIO_NOEXCEPT
- {
- ++ref_count_;
- return const_cast<impl_base*>(static_cast<const impl_base*>(this));
- }
-
- void destroy() BOOST_ASIO_NOEXCEPT
- {
- if (--ref_count_ == 0)
- {
- allocator_type alloc(allocator_);
- impl* p = this;
- p->~impl();
- alloc.deallocate(p, 1);
- }
- }
-
- void on_work_started() BOOST_ASIO_NOEXCEPT
- {
- executor_.on_work_started();
- }
-
- void on_work_finished() BOOST_ASIO_NOEXCEPT
- {
- executor_.on_work_finished();
- }
-
- execution_context& context() BOOST_ASIO_NOEXCEPT
- {
- return executor_.context();
- }
-
- void dispatch(BOOST_ASIO_MOVE_ARG(function) f)
- {
- executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
- }
-
- void post(BOOST_ASIO_MOVE_ARG(function) f)
- {
- executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
- }
-
- void defer(BOOST_ASIO_MOVE_ARG(function) f)
- {
- executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
- }
-
- type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT
- {
- return type_id<Executor>();
- }
-
- void* target() BOOST_ASIO_NOEXCEPT
- {
- return &executor_;
- }
-
- const void* target() const BOOST_ASIO_NOEXCEPT
- {
- return &executor_;
- }
-
- bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT
- {
- if (this == e)
- return true;
- if (target_type() != e->target_type())
- return false;
- return executor_ == *static_cast<const Executor*>(e->target());
- }
-
-private:
- mutable detail::atomic_count ref_count_;
- Executor executor_;
- Allocator allocator_;
-
- struct raw_mem
- {
- allocator_type allocator_;
- impl* ptr_;
-
- explicit raw_mem(const Allocator& a)
- : allocator_(a),
- ptr_(allocator_.allocate(1))
- {
- }
-
- ~raw_mem()
- {
- if (ptr_)
- allocator_.deallocate(ptr_, 1);
- }
-
- private:
- // Disallow copying and assignment.
- raw_mem(const raw_mem&);
- raw_mem operator=(const raw_mem&);
- };
-};
-
-// Polymorphic allocator specialisation for system_executor.
-template <typename Allocator>
-class executor::impl<system_executor, Allocator>
- : public executor::impl_base
-{
-public:
- static impl_base* create(const system_executor&,
- const Allocator& = Allocator())
- {
- return &detail::global<impl<system_executor, std::allocator<void> > >();
- }
-
- impl()
- : impl_base(true)
- {
- }
-
- impl_base* clone() const BOOST_ASIO_NOEXCEPT
- {
- return const_cast<impl_base*>(static_cast<const impl_base*>(this));
- }
-
- void destroy() BOOST_ASIO_NOEXCEPT
- {
- }
-
- void on_work_started() BOOST_ASIO_NOEXCEPT
- {
- executor_.on_work_started();
- }
-
- void on_work_finished() BOOST_ASIO_NOEXCEPT
- {
- executor_.on_work_finished();
- }
-
- execution_context& context() BOOST_ASIO_NOEXCEPT
- {
- return executor_.context();
- }
-
- void dispatch(BOOST_ASIO_MOVE_ARG(function) f)
- {
- executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
- }
-
- void post(BOOST_ASIO_MOVE_ARG(function) f)
- {
- executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
- }
-
- void defer(BOOST_ASIO_MOVE_ARG(function) f)
- {
- executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
- }
-
- type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT
- {
- return type_id<system_executor>();
- }
-
- void* target() BOOST_ASIO_NOEXCEPT
- {
- return &executor_;
- }
-
- const void* target() const BOOST_ASIO_NOEXCEPT
- {
- return &executor_;
- }
-
- bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT
- {
- return this == e;
- }
-
-private:
- system_executor executor_;
- Allocator allocator_;
-};
-
-template <typename Executor>
-executor::executor(Executor e)
- : impl_(impl<Executor, std::allocator<void> >::create(e))
-{
-}
-
-template <typename Executor, typename Allocator>
-executor::executor(allocator_arg_t, const Allocator& a, Executor e)
- : impl_(impl<Executor, Allocator>::create(e, a))
-{
-}
-
-template <typename Function, typename Allocator>
-void executor::dispatch(BOOST_ASIO_MOVE_ARG(Function) f,
- const Allocator& a) const
-{
- impl_base* i = get_impl();
- if (i->fast_dispatch_)
- system_executor().dispatch(BOOST_ASIO_MOVE_CAST(Function)(f), a);
- else
- i->dispatch(function(BOOST_ASIO_MOVE_CAST(Function)(f), a));
-}
-
-template <typename Function, typename Allocator>
-void executor::post(BOOST_ASIO_MOVE_ARG(Function) f,
- const Allocator& a) const
-{
- get_impl()->post(function(BOOST_ASIO_MOVE_CAST(Function)(f), a));
-}
-
-template <typename Function, typename Allocator>
-void executor::defer(BOOST_ASIO_MOVE_ARG(Function) f,
- const Allocator& a) const
-{
- get_impl()->defer(function(BOOST_ASIO_MOVE_CAST(Function)(f), a));
-}
-
-template <typename Executor>
-Executor* executor::target() BOOST_ASIO_NOEXCEPT
-{
- return impl_ && impl_->target_type() == type_id<Executor>()
- ? static_cast<Executor*>(impl_->target()) : 0;
-}
-
-template <typename Executor>
-const Executor* executor::target() const BOOST_ASIO_NOEXCEPT
-{
- return impl_ && impl_->target_type() == type_id<Executor>()
- ? static_cast<Executor*>(impl_->target()) : 0;
-}
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp
deleted file mode 100644
index 86114d93f12..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// impl/executor.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_IMPL_EXECUTOR_IPP
-#define BOOST_ASIO_IMPL_EXECUTOR_IPP
-
-#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/executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-bad_executor::bad_executor() BOOST_ASIO_NOEXCEPT
-{
-}
-
-const char* bad_executor::what() const BOOST_ASIO_NOEXCEPT_OR_NOTHROW
-{
- return "bad executor";
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_EXECUTOR_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp
deleted file mode 100644
index 2b04ec104ed..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// impl/handler_alloc_hook.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_IMPL_HANDLER_ALLOC_HOOK_IPP
-#define BOOST_ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
-
-#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/thread_context.hpp>
-#include <boost/asio/detail/thread_info_base.hpp>
-#include <boost/asio/handler_alloc_hook.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-void* asio_handler_allocate(std::size_t size, ...)
-{
-#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return detail::thread_info_base::allocate(
- detail::thread_context::thread_call_stack::top(), size);
-#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return ::operator new(size);
-#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-}
-
-void asio_handler_deallocate(void* pointer, std::size_t size, ...)
-{
-#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- detail::thread_info_base::deallocate(
- detail::thread_context::thread_call_stack::top(), pointer, size);
-#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- (void)size;
- ::operator delete(pointer);
-#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index 37f8ace42a6..00000000000
--- a/src/third_party/boost-1.69.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, "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.69.0/boost/asio/impl/io_context.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/io_context.ipp
deleted file mode 100644
index 96a7de7415c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/io_context.ipp
+++ /dev/null
@@ -1,176 +0,0 @@
-//
-// impl/io_context.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_IMPL_IO_CONTEXT_IPP
-#define BOOST_ASIO_IMPL_IO_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 <boost/asio/io_context.hpp>
-#include <boost/asio/detail/concurrency_hint.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/scoped_ptr.hpp>
-#include <boost/asio/detail/service_registry.hpp>
-#include <boost/asio/detail/throw_error.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 {
-
-io_context::io_context()
- : impl_(add_impl(new impl_type(*this, BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)))
-{
-}
-
-io_context::io_context(int concurrency_hint)
- : impl_(add_impl(new impl_type(*this, concurrency_hint == 1
- ? BOOST_ASIO_CONCURRENCY_HINT_1 : concurrency_hint)))
-{
-}
-
-io_context::impl_type& io_context::add_impl(io_context::impl_type* impl)
-{
- boost::asio::detail::scoped_ptr<impl_type> scoped_impl(impl);
- boost::asio::add_service<impl_type>(*this, scoped_impl.get());
- return *scoped_impl.release();
-}
-
-io_context::~io_context()
-{
-}
-
-io_context::count_type io_context::run()
-{
- boost::system::error_code ec;
- count_type s = impl_.run(ec);
- boost::asio::detail::throw_error(ec);
- return s;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-io_context::count_type io_context::run(boost::system::error_code& ec)
-{
- return impl_.run(ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-io_context::count_type io_context::run_one()
-{
- boost::system::error_code ec;
- count_type s = impl_.run_one(ec);
- boost::asio::detail::throw_error(ec);
- return s;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-io_context::count_type io_context::run_one(boost::system::error_code& ec)
-{
- return impl_.run_one(ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-io_context::count_type io_context::poll()
-{
- boost::system::error_code ec;
- count_type s = impl_.poll(ec);
- boost::asio::detail::throw_error(ec);
- return s;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-io_context::count_type io_context::poll(boost::system::error_code& ec)
-{
- return impl_.poll(ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-io_context::count_type io_context::poll_one()
-{
- boost::system::error_code ec;
- count_type s = impl_.poll_one(ec);
- boost::asio::detail::throw_error(ec);
- return s;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-io_context::count_type io_context::poll_one(boost::system::error_code& ec)
-{
- return impl_.poll_one(ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-void io_context::stop()
-{
- impl_.stop();
-}
-
-bool io_context::stopped() const
-{
- return impl_.stopped();
-}
-
-void io_context::restart()
-{
- impl_.restart();
-}
-
-io_context::service::service(boost::asio::io_context& owner)
- : execution_context::service(owner)
-{
-}
-
-io_context::service::~service()
-{
-}
-
-void io_context::service::shutdown()
-{
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- shutdown_service();
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-void io_context::service::shutdown_service()
-{
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-void io_context::service::notify_fork(io_context::fork_event ev)
-{
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- fork_service(ev);
-#else // !defined(BOOST_ASIO_NO_DEPRECATED)
- (void)ev;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-void io_context::service::fork_service(io_context::fork_event)
-{
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_IO_CONTEXT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/post.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/post.hpp
deleted file mode 100644
index d318f890ff2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/post.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// impl/post.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_POST_HPP
-#define BOOST_ASIO_IMPL_POST_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/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/detail/work_dispatcher.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef BOOST_ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_executor<handler>::type ex(
- (get_associated_executor)(init.completion_handler));
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.post(BOOST_ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename Executor, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- typedef BOOST_ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.post(detail::work_dispatcher<handler>(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename ExecutionContext, typename CompletionToken>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- return (post)(ctx.get_executor(),
- BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_POST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/read.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/read.hpp
deleted file mode 100644
index 9fbddc964e9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/read.hpp
+++ /dev/null
@@ -1,717 +0,0 @@
-//
-// impl/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_IMPL_READ_HPP
-#define BOOST_ASIO_IMPL_READ_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <algorithm>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/detail/array_fwd.hpp>
-#include <boost/asio/detail/base_from_completion_cond.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/consuming_buffers.hpp>
-#include <boost/asio/detail/dependent_type.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/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- template <typename SyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition>
- std::size_t read_buffer_sequence(SyncReadStream& s,
- const MutableBufferSequence& buffers, const MutableBufferIterator&,
- CompletionCondition completion_condition, boost::system::error_code& ec)
- {
- ec = boost::system::error_code();
- boost::asio::detail::consuming_buffers<mutable_buffer,
- MutableBufferSequence, MutableBufferIterator> tmp(buffers);
- while (!tmp.empty())
- {
- if (std::size_t max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, tmp.total_consumed())))
- tmp.consume(s.read_some(tmp.prepare(max_size), ec));
- else
- break;
- }
- return tmp.total_consumed();;
- }
-} // namespace detail
-
-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*)
-{
- return detail::read_buffer_sequence(s, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition, ec);
-}
-
-template <typename SyncReadStream, typename MutableBufferSequence>
-inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "read");
- return bytes_transferred;
-}
-
-template <typename SyncReadStream, typename MutableBufferSequence>
-inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- boost::system::error_code& ec,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
-{
- return read(s, buffers, transfer_all(), ec);
-}
-
-template <typename SyncReadStream, typename MutableBufferSequence,
- typename CompletionCondition>
-inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read(s, buffers, completion_condition, ec);
- boost::asio::detail::throw_error(ec, "read");
- return bytes_transferred;
-}
-
-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*)
-{
- typename decay<DynamicBuffer>::type b(
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
-
- ec = boost::system::error_code();
- std::size_t total_transferred = 0;
- std::size_t max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, total_transferred));
- std::size_t bytes_available = std::min<std::size_t>(
- std::max<std::size_t>(512, b.capacity() - b.size()),
- std::min<std::size_t>(max_size, b.max_size() - b.size()));
- while (bytes_available > 0)
- {
- std::size_t bytes_transferred = s.read_some(b.prepare(bytes_available), ec);
- b.commit(bytes_transferred);
- total_transferred += bytes_transferred;
- max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, total_transferred));
- bytes_available = std::min<std::size_t>(
- std::max<std::size_t>(512, b.capacity() - b.size()),
- std::min<std::size_t>(max_size, b.max_size() - b.size()));
- }
- return total_transferred;
-}
-
-template <typename SyncReadStream, typename DynamicBuffer>
-inline std::size_t read(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "read");
- return bytes_transferred;
-}
-
-template <typename SyncReadStream, typename DynamicBuffer>
-inline 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*)
-{
- return read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), ec);
-}
-
-template <typename SyncReadStream, typename DynamicBuffer,
- typename CompletionCondition>
-inline 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*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, ec);
- boost::asio::detail::throw_error(ec, "read");
- return bytes_transferred;
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename SyncReadStream, typename Allocator,
- typename CompletionCondition>
-inline std::size_t read(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec)
-{
- return read(s, basic_streambuf_ref<Allocator>(b), completion_condition, ec);
-}
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b)
-{
- return read(s, basic_streambuf_ref<Allocator>(b));
-}
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- boost::system::error_code& ec)
-{
- return read(s, basic_streambuf_ref<Allocator>(b), ec);
-}
-
-template <typename SyncReadStream, typename Allocator,
- typename CompletionCondition>
-inline std::size_t read(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition)
-{
- return read(s, basic_streambuf_ref<Allocator>(b), completion_condition);
-}
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-namespace detail
-{
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- class read_op
- : detail::base_from_completion_cond<CompletionCondition>
- {
- public:
- read_op(AsyncReadStream& stream, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
- stream_(stream),
- buffers_(buffers),
- start_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_op(const read_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- stream_(other.stream_),
- buffers_(other.buffers_),
- start_(other.start_),
- handler_(other.handler_)
- {
- }
-
- read_op(read_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- stream_(other.stream_),
- buffers_(other.buffers_),
- start_(other.start_),
- 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)
- {
- std::size_t max_size;
- switch (start_ = start)
- {
- case 1:
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
- {
- stream_.async_read_some(buffers_.prepare(max_size),
- BOOST_ASIO_MOVE_CAST(read_op)(*this));
- return; default:
- buffers_.consume(bytes_transferred);
- if ((!ec && bytes_transferred == 0) || buffers_.empty())
- break;
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
-
- handler_(ec, buffers_.total_consumed());
- }
- }
-
- //private:
- AsyncReadStream& stream_;
- boost::asio::detail::consuming_buffers<mutable_buffer,
- MutableBufferSequence, MutableBufferIterator> buffers_;
- int start_;
- ReadHandler handler_;
- };
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, 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 MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- inline void start_read_buffer_sequence_op(AsyncReadStream& stream,
- const MutableBufferSequence& buffers, const MutableBufferIterator&,
- CompletionCondition completion_condition, ReadHandler& handler)
- {
- detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>(
- stream, buffers, completion_condition, handler)(
- boost::system::error_code(), 0, 1);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, 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 MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-inline 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*)
-{
- // 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::start_read_buffer_sequence_op(s, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
-}
-
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename ReadHandler>
-inline 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*)
-{
- // 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::start_read_buffer_sequence_op(s, buffers,
- boost::asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
-}
-
-namespace detail
-{
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
- class read_dynbuf_op
- : detail::base_from_completion_cond<CompletionCondition>
- {
- public:
- template <typename BufferSequence>
- read_dynbuf_op(AsyncReadStream& stream,
- BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
- stream_(stream),
- buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
- start_(0),
- total_transferred_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_dynbuf_op(const read_dynbuf_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- stream_(other.stream_),
- buffers_(other.buffers_),
- start_(other.start_),
- total_transferred_(other.total_transferred_),
- handler_(other.handler_)
- {
- }
-
- read_dynbuf_op(read_dynbuf_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- stream_(other.stream_),
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- start_(other.start_),
- total_transferred_(other.total_transferred_),
- 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)
- {
- std::size_t max_size, bytes_available;
- switch (start_ = start)
- {
- case 1:
- max_size = this->check_for_completion(ec, total_transferred_);
- bytes_available = std::min<std::size_t>(
- std::max<std::size_t>(512,
- buffers_.capacity() - buffers_.size()),
- std::min<std::size_t>(max_size,
- buffers_.max_size() - buffers_.size()));
- for (;;)
- {
- stream_.async_read_some(buffers_.prepare(bytes_available),
- BOOST_ASIO_MOVE_CAST(read_dynbuf_op)(*this));
- return; default:
- total_transferred_ += bytes_transferred;
- buffers_.commit(bytes_transferred);
- max_size = this->check_for_completion(ec, total_transferred_);
- bytes_available = std::min<std::size_t>(
- std::max<std::size_t>(512,
- buffers_.capacity() - buffers_.size()),
- std::min<std::size_t>(max_size,
- buffers_.max_size() - buffers_.size()));
- if ((!ec && bytes_transferred == 0) || bytes_available == 0)
- break;
- }
-
- handler_(ec, static_cast<const std::size_t&>(total_transferred_));
- }
- }
-
- //private:
- AsyncReadStream& stream_;
- DynamicBuffer buffers_;
- int start_;
- std::size_t total_transferred_;
- ReadHandler handler_;
- };
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, 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 CompletionCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, 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 CompletionCondition, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, 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>
-inline 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*)
-{
- return async_read(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-}
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
-inline 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*)
-{
- // 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_dynbuf_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- CompletionCondition, BOOST_ASIO_HANDLER_TYPE(
- ReadHandler, void (boost::system::error_code, std::size_t))>(
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, init.completion_handler)(
- boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#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(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- return async_read(s, basic_streambuf_ref<Allocator>(b),
- BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-}
-
-template <typename AsyncReadStream, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-inline 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)
-{
- return async_read(s, basic_streambuf_ref<Allocator>(b),
- completion_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_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp
deleted file mode 100644
index e3c31c543e2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp
+++ /dev/null
@@ -1,642 +0,0 @@
-//
-// impl/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_IMPL_READ_AT_HPP
-#define BOOST_ASIO_IMPL_READ_AT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <algorithm>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/detail/array_fwd.hpp>
-#include <boost/asio/detail/base_from_completion_cond.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/consuming_buffers.hpp>
-#include <boost/asio/detail/dependent_type.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/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition>
- std::size_t read_at_buffer_sequence(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- const MutableBufferIterator&, CompletionCondition completion_condition,
- boost::system::error_code& ec)
- {
- ec = boost::system::error_code();
- boost::asio::detail::consuming_buffers<mutable_buffer,
- MutableBufferSequence, MutableBufferIterator> tmp(buffers);
- while (!tmp.empty())
- {
- if (std::size_t max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, tmp.total_consumed())))
- {
- tmp.consume(d.read_some_at(offset + tmp.total_consumed(),
- tmp.prepare(max_size), ec));
- }
- else
- break;
- }
- return tmp.total_consumed();;
- }
-} // namespace detail
-
-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)
-{
- return detail::read_at_buffer_sequence(d, offset, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition, ec);
-}
-
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
-inline std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_at(
- d, offset, buffers, transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "read_at");
- return bytes_transferred;
-}
-
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
-inline std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- boost::system::error_code& ec)
-{
- return read_at(d, offset, buffers, transfer_all(), ec);
-}
-
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition>
-inline std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_at(
- d, offset, buffers, completion_condition, ec);
- boost::asio::detail::throw_error(ec, "read_at");
- return bytes_transferred;
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename SyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec)
-{
- ec = boost::system::error_code();
- std::size_t total_transferred = 0;
- std::size_t max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, total_transferred));
- std::size_t bytes_available = read_size_helper(b, max_size);
- while (bytes_available > 0)
- {
- std::size_t bytes_transferred = d.read_some_at(
- offset + total_transferred, b.prepare(bytes_available), ec);
- b.commit(bytes_transferred);
- total_transferred += bytes_transferred;
- max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, total_transferred));
- bytes_available = read_size_helper(b, max_size);
- }
- return total_transferred;
-}
-
-template <typename SyncRandomAccessReadDevice, typename Allocator>
-inline std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_at(
- d, offset, b, transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "read_at");
- return bytes_transferred;
-}
-
-template <typename SyncRandomAccessReadDevice, typename Allocator>
-inline std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- boost::system::error_code& ec)
-{
- return read_at(d, offset, b, transfer_all(), ec);
-}
-
-template <typename SyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition>
-inline std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_at(
- d, offset, b, completion_condition, ec);
- boost::asio::detail::throw_error(ec, "read_at");
- return bytes_transferred;
-}
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-namespace detail
-{
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- class read_at_op
- : detail::base_from_completion_cond<CompletionCondition>
- {
- public:
- read_at_op(AsyncRandomAccessReadDevice& device,
- uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
- device_(device),
- offset_(offset),
- buffers_(buffers),
- start_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_at_op(const read_at_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- device_(other.device_),
- offset_(other.offset_),
- buffers_(other.buffers_),
- start_(other.start_),
- handler_(other.handler_)
- {
- }
-
- read_at_op(read_at_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- device_(other.device_),
- offset_(other.offset_),
- buffers_(other.buffers_),
- start_(other.start_),
- 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)
- {
- std::size_t max_size;
- switch (start_ = start)
- {
- case 1:
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
- {
- device_.async_read_some_at(
- offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
- BOOST_ASIO_MOVE_CAST(read_at_op)(*this));
- return; default:
- buffers_.consume(bytes_transferred);
- if ((!ec && bytes_transferred == 0) || buffers_.empty())
- break;
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
-
- handler_(ec, buffers_.total_consumed());
- }
- }
-
- //private:
- AsyncRandomAccessReadDevice& device_;
- uint64_t offset_;
- boost::asio::detail::consuming_buffers<mutable_buffer,
- MutableBufferSequence, MutableBufferIterator> buffers_;
- int start_;
- ReadHandler handler_;
- };
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void start_read_at_buffer_sequence_op(AsyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- const MutableBufferIterator&, CompletionCondition completion_condition,
- ReadHandler& handler)
- {
- detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>(
- d, offset, buffers, completion_condition, handler)(
- boost::system::error_code(), 0, 1);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_at_op<AsyncRandomAccessReadDevice,
- MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_at_op<AsyncRandomAccessReadDevice,
- MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-inline 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 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::start_read_at_buffer_sequence_op(d, offset, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
-}
-
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename ReadHandler>
-inline 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)
-{
- // 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::start_read_at_buffer_sequence_op(d, offset, buffers,
- boost::asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-namespace detail
-{
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
- class read_at_streambuf_op
- : detail::base_from_completion_cond<CompletionCondition>
- {
- public:
- read_at_streambuf_op(AsyncRandomAccessReadDevice& device,
- uint64_t offset, basic_streambuf<Allocator>& streambuf,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
- device_(device),
- offset_(offset),
- streambuf_(streambuf),
- start_(0),
- total_transferred_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_at_streambuf_op(const read_at_streambuf_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- device_(other.device_),
- offset_(other.offset_),
- streambuf_(other.streambuf_),
- start_(other.start_),
- total_transferred_(other.total_transferred_),
- handler_(other.handler_)
- {
- }
-
- read_at_streambuf_op(read_at_streambuf_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- device_(other.device_),
- offset_(other.offset_),
- streambuf_(other.streambuf_),
- start_(other.start_),
- total_transferred_(other.total_transferred_),
- 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)
- {
- std::size_t max_size, bytes_available;
- switch (start_ = start)
- {
- case 1:
- max_size = this->check_for_completion(ec, total_transferred_);
- bytes_available = read_size_helper(streambuf_, max_size);
- for (;;)
- {
- device_.async_read_some_at(offset_ + total_transferred_,
- streambuf_.prepare(bytes_available),
- BOOST_ASIO_MOVE_CAST(read_at_streambuf_op)(*this));
- return; default:
- total_transferred_ += bytes_transferred;
- streambuf_.commit(bytes_transferred);
- max_size = this->check_for_completion(ec, total_transferred_);
- bytes_available = read_size_helper(streambuf_, max_size);
- if ((!ec && bytes_transferred == 0) || bytes_available == 0)
- break;
- }
-
- handler_(ec, static_cast<const std::size_t&>(total_transferred_));
- }
- }
-
- //private:
- AsyncRandomAccessReadDevice& device_;
- uint64_t offset_;
- boost::asio::basic_streambuf<Allocator>& streambuf_;
- int start_;
- std::size_t total_transferred_;
- ReadHandler handler_;
- };
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename Allocator, typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename Allocator, typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler, typename Allocator1>
-struct associated_allocator<
- detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Allocator, CompletionCondition, ReadHandler>,
- Allocator1>
-{
- typedef typename associated_allocator<ReadHandler, Allocator1>::type type;
-
- static type get(
- const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Allocator, CompletionCondition, ReadHandler>& h,
- const Allocator1& a = Allocator1()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator1>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncRandomAccessReadDevice, typename Executor,
- typename CompletionCondition, typename ReadHandler, typename Executor1>
-struct associated_executor<
- detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Executor, CompletionCondition, ReadHandler>,
- Executor1>
-{
- typedef typename associated_executor<ReadHandler, Executor1>::type type;
-
- static type get(
- const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Executor, CompletionCondition, ReadHandler>& h,
- const Executor1& ex = Executor1()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor1>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- 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_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))>(
- d, offset, b, completion_condition, init.completion_handler)(
- boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename ReadHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- 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_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- detail::transfer_all_t, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))>(
- d, offset, b, transfer_all(), init.completion_handler)(
- boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-#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_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
deleted file mode 100644
index 8bc959557a1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/read_until.hpp
+++ /dev/null
@@ -1,1504 +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 = 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.69.0/boost/asio/impl/serial_port_base.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.hpp
deleted file mode 100644
index 7f2dfe88df6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// impl/serial_port_base.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_BASE_HPP
-#define BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-inline serial_port_base::baud_rate::baud_rate(unsigned int rate)
- : value_(rate)
-{
-}
-
-inline unsigned int serial_port_base::baud_rate::value() const
-{
- return value_;
-}
-
-inline serial_port_base::flow_control::type
-serial_port_base::flow_control::value() const
-{
- return value_;
-}
-
-inline serial_port_base::parity::type serial_port_base::parity::value() const
-{
- return value_;
-}
-
-inline serial_port_base::stop_bits::type
-serial_port_base::stop_bits::value() const
-{
- return value_;
-}
-
-inline unsigned int serial_port_base::character_size::value() const
-{
- return value_;
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp
deleted file mode 100644
index 9954f77d2e9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp
+++ /dev/null
@@ -1,556 +0,0 @@
-//
-// impl/serial_port_base.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_BASE_IPP
-#define BOOST_ASIO_IMPL_SERIAL_PORT_BASE_IPP
-
-#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_SERIAL_PORT)
-
-#include <stdexcept>
-#include <boost/asio/error.hpp>
-#include <boost/asio/serial_port_base.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-
-#if defined(GENERATING_DOCUMENTATION)
-# define BOOST_ASIO_OPTION_STORAGE implementation_defined
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# define BOOST_ASIO_OPTION_STORAGE DCB
-#else
-# define BOOST_ASIO_OPTION_STORAGE termios
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::baud_rate::store(
- BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- storage.BaudRate = value_;
-#else
- speed_t baud;
- switch (value_)
- {
- // Do POSIX-specified rates first.
- case 0: baud = B0; break;
- case 50: baud = B50; break;
- case 75: baud = B75; break;
- case 110: baud = B110; break;
- case 134: baud = B134; break;
- case 150: baud = B150; break;
- case 200: baud = B200; break;
- case 300: baud = B300; break;
- case 600: baud = B600; break;
- case 1200: baud = B1200; break;
- case 1800: baud = B1800; break;
- case 2400: baud = B2400; break;
- case 4800: baud = B4800; break;
- case 9600: baud = B9600; break;
- case 19200: baud = B19200; break;
- case 38400: baud = B38400; break;
- // And now the extended ones conditionally.
-# ifdef B7200
- case 7200: baud = B7200; break;
-# endif
-# ifdef B14400
- case 14400: baud = B14400; break;
-# endif
-# ifdef B57600
- case 57600: baud = B57600; break;
-# endif
-# ifdef B115200
- case 115200: baud = B115200; break;
-# endif
-# ifdef B230400
- case 230400: baud = B230400; break;
-# endif
-# ifdef B460800
- case 460800: baud = B460800; break;
-# endif
-# ifdef B500000
- case 500000: baud = B500000; break;
-# endif
-# ifdef B576000
- case 576000: baud = B576000; break;
-# endif
-# ifdef B921600
- case 921600: baud = B921600; break;
-# endif
-# ifdef B1000000
- case 1000000: baud = B1000000; break;
-# endif
-# ifdef B1152000
- case 1152000: baud = B1152000; break;
-# endif
-# ifdef B2000000
- case 2000000: baud = B2000000; break;
-# endif
-# ifdef B3000000
- case 3000000: baud = B3000000; break;
-# endif
-# ifdef B3500000
- case 3500000: baud = B3500000; break;
-# endif
-# ifdef B4000000
- case 4000000: baud = B4000000; break;
-# endif
- default:
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
- ::cfsetspeed(&storage, baud);
-# else
- ::cfsetispeed(&storage, baud);
- ::cfsetospeed(&storage, baud);
-# endif
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::baud_rate::load(
- const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- value_ = storage.BaudRate;
-#else
- speed_t baud = ::cfgetospeed(&storage);
- switch (baud)
- {
- // First do those specified by POSIX.
- case B0: value_ = 0; break;
- case B50: value_ = 50; break;
- case B75: value_ = 75; break;
- case B110: value_ = 110; break;
- case B134: value_ = 134; break;
- case B150: value_ = 150; break;
- case B200: value_ = 200; break;
- case B300: value_ = 300; break;
- case B600: value_ = 600; break;
- case B1200: value_ = 1200; break;
- case B1800: value_ = 1800; break;
- case B2400: value_ = 2400; break;
- case B4800: value_ = 4800; break;
- case B9600: value_ = 9600; break;
- case B19200: value_ = 19200; break;
- case B38400: value_ = 38400; break;
- // Now conditionally handle a bunch of extended rates.
-# ifdef B7200
- case B7200: value_ = 7200; break;
-# endif
-# ifdef B14400
- case B14400: value_ = 14400; break;
-# endif
-# ifdef B57600
- case B57600: value_ = 57600; break;
-# endif
-# ifdef B115200
- case B115200: value_ = 115200; break;
-# endif
-# ifdef B230400
- case B230400: value_ = 230400; break;
-# endif
-# ifdef B460800
- case B460800: value_ = 460800; break;
-# endif
-# ifdef B500000
- case B500000: value_ = 500000; break;
-# endif
-# ifdef B576000
- case B576000: value_ = 576000; break;
-# endif
-# ifdef B921600
- case B921600: value_ = 921600; break;
-# endif
-# ifdef B1000000
- case B1000000: value_ = 1000000; break;
-# endif
-# ifdef B1152000
- case B1152000: value_ = 1152000; break;
-# endif
-# ifdef B2000000
- case B2000000: value_ = 2000000; break;
-# endif
-# ifdef B3000000
- case B3000000: value_ = 3000000; break;
-# endif
-# ifdef B3500000
- case B3500000: value_ = 3500000; break;
-# endif
-# ifdef B4000000
- case B4000000: value_ = 4000000; break;
-# endif
- default:
- value_ = 0;
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-serial_port_base::flow_control::flow_control(
- serial_port_base::flow_control::type t)
- : value_(t)
-{
- if (t != none && t != software && t != hardware)
- {
- std::out_of_range ex("invalid flow_control value");
- boost::asio::detail::throw_exception(ex);
- }
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::flow_control::store(
- BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- storage.fOutxCtsFlow = FALSE;
- storage.fOutxDsrFlow = FALSE;
- storage.fTXContinueOnXoff = TRUE;
- storage.fDtrControl = DTR_CONTROL_ENABLE;
- storage.fDsrSensitivity = FALSE;
- storage.fOutX = FALSE;
- storage.fInX = FALSE;
- storage.fRtsControl = RTS_CONTROL_ENABLE;
- switch (value_)
- {
- case none:
- break;
- case software:
- storage.fOutX = TRUE;
- storage.fInX = TRUE;
- break;
- case hardware:
- storage.fOutxCtsFlow = TRUE;
- storage.fRtsControl = RTS_CONTROL_HANDSHAKE;
- break;
- default:
- break;
- }
-#else
- switch (value_)
- {
- case none:
- storage.c_iflag &= ~(IXOFF | IXON);
-# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
- storage.c_cflag &= ~CRTSCTS;
-# elif defined(__QNXNTO__)
- storage.c_cflag &= ~(IHFLOW | OHFLOW);
-# endif
- break;
- case software:
- storage.c_iflag |= IXOFF | IXON;
-# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
- storage.c_cflag &= ~CRTSCTS;
-# elif defined(__QNXNTO__)
- storage.c_cflag &= ~(IHFLOW | OHFLOW);
-# endif
- break;
- case hardware:
-# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
- storage.c_iflag &= ~(IXOFF | IXON);
- storage.c_cflag |= CRTSCTS;
- break;
-# elif defined(__QNXNTO__)
- storage.c_iflag &= ~(IXOFF | IXON);
- storage.c_cflag |= (IHFLOW | OHFLOW);
- break;
-# else
- ec = boost::asio::error::operation_not_supported;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-# endif
- default:
- break;
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::flow_control::load(
- const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- if (storage.fOutX && storage.fInX)
- {
- value_ = software;
- }
- else if (storage.fOutxCtsFlow && storage.fRtsControl == RTS_CONTROL_HANDSHAKE)
- {
- value_ = hardware;
- }
- else
- {
- value_ = none;
- }
-#else
- if (storage.c_iflag & (IXOFF | IXON))
- {
- value_ = software;
- }
-# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
- else if (storage.c_cflag & CRTSCTS)
- {
- value_ = hardware;
- }
-# elif defined(__QNXNTO__)
- else if (storage.c_cflag & IHFLOW && storage.c_cflag & OHFLOW)
- {
- value_ = hardware;
- }
-# endif
- else
- {
- value_ = none;
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-serial_port_base::parity::parity(serial_port_base::parity::type t)
- : value_(t)
-{
- if (t != none && t != odd && t != even)
- {
- std::out_of_range ex("invalid parity value");
- boost::asio::detail::throw_exception(ex);
- }
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::parity::store(
- BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- switch (value_)
- {
- case none:
- storage.fParity = FALSE;
- storage.Parity = NOPARITY;
- break;
- case odd:
- storage.fParity = TRUE;
- storage.Parity = ODDPARITY;
- break;
- case even:
- storage.fParity = TRUE;
- storage.Parity = EVENPARITY;
- break;
- default:
- break;
- }
-#else
- switch (value_)
- {
- case none:
- storage.c_iflag |= IGNPAR;
- storage.c_cflag &= ~(PARENB | PARODD);
- break;
- case even:
- storage.c_iflag &= ~(IGNPAR | PARMRK);
- storage.c_iflag |= INPCK;
- storage.c_cflag |= PARENB;
- storage.c_cflag &= ~PARODD;
- break;
- case odd:
- storage.c_iflag &= ~(IGNPAR | PARMRK);
- storage.c_iflag |= INPCK;
- storage.c_cflag |= (PARENB | PARODD);
- break;
- default:
- break;
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::parity::load(
- const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- if (storage.Parity == EVENPARITY)
- {
- value_ = even;
- }
- else if (storage.Parity == ODDPARITY)
- {
- value_ = odd;
- }
- else
- {
- value_ = none;
- }
-#else
- if (storage.c_cflag & PARENB)
- {
- if (storage.c_cflag & PARODD)
- {
- value_ = odd;
- }
- else
- {
- value_ = even;
- }
- }
- else
- {
- value_ = none;
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-serial_port_base::stop_bits::stop_bits(
- serial_port_base::stop_bits::type t)
- : value_(t)
-{
- if (t != one && t != onepointfive && t != two)
- {
- std::out_of_range ex("invalid stop_bits value");
- boost::asio::detail::throw_exception(ex);
- }
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::stop_bits::store(
- BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- switch (value_)
- {
- case one:
- storage.StopBits = ONESTOPBIT;
- break;
- case onepointfive:
- storage.StopBits = ONE5STOPBITS;
- break;
- case two:
- storage.StopBits = TWOSTOPBITS;
- break;
- default:
- break;
- }
-#else
- switch (value_)
- {
- case one:
- storage.c_cflag &= ~CSTOPB;
- break;
- case two:
- storage.c_cflag |= CSTOPB;
- break;
- default:
- ec = boost::asio::error::operation_not_supported;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::stop_bits::load(
- const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- if (storage.StopBits == ONESTOPBIT)
- {
- value_ = one;
- }
- else if (storage.StopBits == ONE5STOPBITS)
- {
- value_ = onepointfive;
- }
- else if (storage.StopBits == TWOSTOPBITS)
- {
- value_ = two;
- }
- else
- {
- value_ = one;
- }
-#else
- value_ = (storage.c_cflag & CSTOPB) ? two : one;
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-serial_port_base::character_size::character_size(unsigned int t)
- : value_(t)
-{
- if (t < 5 || t > 8)
- {
- std::out_of_range ex("invalid character_size value");
- boost::asio::detail::throw_exception(ex);
- }
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::character_size::store(
- BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- storage.ByteSize = value_;
-#else
- storage.c_cflag &= ~CSIZE;
- switch (value_)
- {
- case 5: storage.c_cflag |= CS5; break;
- case 6: storage.c_cflag |= CS6; break;
- case 7: storage.c_cflag |= CS7; break;
- case 8: storage.c_cflag |= CS8; break;
- default: break;
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID serial_port_base::character_size::load(
- const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- value_ = storage.ByteSize;
-#else
- if ((storage.c_cflag & CSIZE) == CS5) { value_ = 5; }
- else if ((storage.c_cflag & CSIZE) == CS6) { value_ = 6; }
- else if ((storage.c_cflag & CSIZE) == CS7) { value_ = 7; }
- else if ((storage.c_cflag & CSIZE) == CS8) { value_ = 8; }
- else
- {
- // Hmmm, use 8 for now.
- value_ = 8;
- }
-#endif
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#undef BOOST_ASIO_OPTION_STORAGE
-
-#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-#endif // BOOST_ASIO_IMPL_SERIAL_PORT_BASE_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp
deleted file mode 100644
index c2da5ce09ab..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp
+++ /dev/null
@@ -1,537 +0,0 @@
-//
-// impl/spawn.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_SPAWN_HPP
-#define BOOST_ASIO_IMPL_SPAWN_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/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/bind_executor.hpp>
-#include <boost/asio/detail/atomic_count.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/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/system/system_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
- template <typename Handler, typename T>
- class coro_handler
- {
- public:
- coro_handler(basic_yield_context<Handler> ctx)
- : coro_(ctx.coro_.lock()),
- ca_(ctx.ca_),
- handler_(ctx.handler_),
- ready_(0),
- ec_(ctx.ec_),
- value_(0)
- {
- }
-
- void operator()(T value)
- {
- *ec_ = boost::system::error_code();
- *value_ = BOOST_ASIO_MOVE_CAST(T)(value);
- if (--*ready_ == 0)
- (*coro_)();
- }
-
- void operator()(boost::system::error_code ec, T value)
- {
- *ec_ = ec;
- *value_ = BOOST_ASIO_MOVE_CAST(T)(value);
- if (--*ready_ == 0)
- (*coro_)();
- }
-
- //private:
- shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- Handler handler_;
- atomic_count* ready_;
- boost::system::error_code* ec_;
- T* value_;
- };
-
- template <typename Handler>
- class coro_handler<Handler, void>
- {
- public:
- coro_handler(basic_yield_context<Handler> ctx)
- : coro_(ctx.coro_.lock()),
- ca_(ctx.ca_),
- handler_(ctx.handler_),
- ready_(0),
- ec_(ctx.ec_)
- {
- }
-
- void operator()()
- {
- *ec_ = boost::system::error_code();
- if (--*ready_ == 0)
- (*coro_)();
- }
-
- void operator()(boost::system::error_code ec)
- {
- *ec_ = ec;
- if (--*ready_ == 0)
- (*coro_)();
- }
-
- //private:
- shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- Handler handler_;
- atomic_count* ready_;
- boost::system::error_code* ec_;
- };
-
- template <typename Handler, typename T>
- inline void* asio_handler_allocate(std::size_t size,
- coro_handler<Handler, T>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Handler, typename T>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- coro_handler<Handler, T>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Handler, typename T>
- inline bool asio_handler_is_continuation(coro_handler<Handler, T>*)
- {
- return true;
- }
-
- template <typename Function, typename Handler, typename T>
- inline void asio_handler_invoke(Function& function,
- coro_handler<Handler, T>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename Handler, typename T>
- inline void asio_handler_invoke(const Function& function,
- coro_handler<Handler, T>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Handler, typename T>
- class coro_async_result
- {
- public:
- typedef coro_handler<Handler, T> completion_handler_type;
- typedef T return_type;
-
- explicit coro_async_result(completion_handler_type& h)
- : handler_(h),
- ca_(h.ca_),
- ready_(2)
- {
- h.ready_ = &ready_;
- out_ec_ = h.ec_;
- if (!out_ec_) h.ec_ = &ec_;
- h.value_ = &value_;
- }
-
- return_type get()
- {
- // Must not hold shared_ptr to coro while suspended.
- handler_.coro_.reset();
-
- if (--ready_ != 0)
- ca_();
- if (!out_ec_ && ec_) throw boost::system::system_error(ec_);
- return BOOST_ASIO_MOVE_CAST(return_type)(value_);
- }
-
- private:
- completion_handler_type& handler_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- atomic_count ready_;
- boost::system::error_code* out_ec_;
- boost::system::error_code ec_;
- return_type value_;
- };
-
- template <typename Handler>
- class coro_async_result<Handler, void>
- {
- public:
- typedef coro_handler<Handler, void> completion_handler_type;
- typedef void return_type;
-
- explicit coro_async_result(completion_handler_type& h)
- : handler_(h),
- ca_(h.ca_),
- ready_(2)
- {
- h.ready_ = &ready_;
- out_ec_ = h.ec_;
- if (!out_ec_) h.ec_ = &ec_;
- }
-
- void get()
- {
- // Must not hold shared_ptr to coro while suspended.
- handler_.coro_.reset();
-
- if (--ready_ != 0)
- ca_();
- if (!out_ec_ && ec_) throw boost::system::system_error(ec_);
- }
-
- private:
- completion_handler_type& handler_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- atomic_count ready_;
- boost::system::error_code* out_ec_;
- boost::system::error_code ec_;
- };
-
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename Handler, typename ReturnType>
-class async_result<basic_yield_context<Handler>, ReturnType()>
- : public detail::coro_async_result<Handler, void>
-{
-public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, void>(h)
- {
- }
-};
-
-template <typename Handler, typename ReturnType, typename Arg1>
-class async_result<basic_yield_context<Handler>, ReturnType(Arg1)>
- : public detail::coro_async_result<Handler, typename decay<Arg1>::type>
-{
-public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- typename decay<Arg1>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, typename decay<Arg1>::type>(h)
- {
- }
-};
-
-template <typename Handler, typename ReturnType>
-class async_result<basic_yield_context<Handler>,
- ReturnType(boost::system::error_code)>
- : public detail::coro_async_result<Handler, void>
-{
-public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, void>(h)
- {
- }
-};
-
-template <typename Handler, typename ReturnType, typename Arg2>
-class async_result<basic_yield_context<Handler>,
- ReturnType(boost::system::error_code, Arg2)>
- : public detail::coro_async_result<Handler, typename decay<Arg2>::type>
-{
-public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- typename decay<Arg2>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, typename decay<Arg2>::type>(h)
- {
- }
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Handler, typename ReturnType>
-struct handler_type<basic_yield_context<Handler>, ReturnType()>
-{
- typedef detail::coro_handler<Handler, void> type;
-};
-
-template <typename Handler, typename ReturnType, typename Arg1>
-struct handler_type<basic_yield_context<Handler>, ReturnType(Arg1)>
-{
- typedef detail::coro_handler<Handler, typename decay<Arg1>::type> type;
-};
-
-template <typename Handler, typename ReturnType>
-struct handler_type<basic_yield_context<Handler>,
- ReturnType(boost::system::error_code)>
-{
- typedef detail::coro_handler<Handler, void> type;
-};
-
-template <typename Handler, typename ReturnType, typename Arg2>
-struct handler_type<basic_yield_context<Handler>,
- ReturnType(boost::system::error_code, Arg2)>
-{
- typedef detail::coro_handler<Handler, typename decay<Arg2>::type> type;
-};
-
-template <typename Handler, typename T>
-class async_result<detail::coro_handler<Handler, T> >
- : public detail::coro_async_result<Handler, T>
-{
-public:
- typedef typename detail::coro_async_result<Handler, T>::return_type type;
-
- explicit async_result(
- typename detail::coro_async_result<Handler,
- T>::completion_handler_type& h)
- : detail::coro_async_result<Handler, T>(h)
- {
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Handler, typename T, typename Allocator>
-struct associated_allocator<detail::coro_handler<Handler, T>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const detail::coro_handler<Handler, T>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Handler, typename T, typename Executor>
-struct associated_executor<detail::coro_handler<Handler, T>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(const detail::coro_handler<Handler, T>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-namespace detail {
-
- template <typename Handler, typename Function>
- struct spawn_data : private noncopyable
- {
- template <typename Hand, typename Func>
- spawn_data(BOOST_ASIO_MOVE_ARG(Hand) handler,
- bool call_handler, BOOST_ASIO_MOVE_ARG(Func) function)
- : handler_(BOOST_ASIO_MOVE_CAST(Hand)(handler)),
- call_handler_(call_handler),
- function_(BOOST_ASIO_MOVE_CAST(Func)(function))
- {
- }
-
- weak_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- Handler handler_;
- bool call_handler_;
- Function function_;
- };
-
- template <typename Handler, typename Function>
- struct coro_entry_point
- {
- void operator()(typename basic_yield_context<Handler>::caller_type& ca)
- {
- shared_ptr<spawn_data<Handler, Function> > data(data_);
-#if !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
- ca(); // Yield until coroutine pointer has been initialised.
-#endif // !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
- const basic_yield_context<Handler> yield(
- data->coro_, ca, data->handler_);
-
- (data->function_)(yield);
- if (data->call_handler_)
- (data->handler_)();
- }
-
- shared_ptr<spawn_data<Handler, Function> > data_;
- };
-
- template <typename Handler, typename Function>
- struct spawn_helper
- {
- void operator()()
- {
- typedef typename basic_yield_context<Handler>::callee_type callee_type;
- coro_entry_point<Handler, Function> entry_point = { data_ };
- shared_ptr<callee_type> coro(new callee_type(entry_point, attributes_));
- data_->coro_ = coro;
- (*coro)();
- }
-
- shared_ptr<spawn_data<Handler, Function> > data_;
- boost::coroutines::attributes attributes_;
- };
-
- template <typename Function, typename Handler, typename Function1>
- inline void asio_handler_invoke(Function& function,
- spawn_helper<Handler, Function1>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->data_->handler_);
- }
-
- template <typename Function, typename Handler, typename Function1>
- inline void asio_handler_invoke(const Function& function,
- spawn_helper<Handler, Function1>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->data_->handler_);
- }
-
- inline void default_spawn_handler() {}
-
-} // namespace detail
-
-template <typename Function>
-inline void spawn(BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes)
-{
- typedef typename decay<Function>::type function_type;
-
- typename associated_executor<function_type>::type ex(
- (get_associated_executor)(function));
-
- boost::asio::spawn(ex, BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
-}
-
-template <typename Handler, typename Function>
-void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes,
- typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
- !is_convertible<Handler&, execution_context&>::value>::type*)
-{
- typedef typename decay<Handler>::type handler_type;
- typedef typename decay<Function>::type function_type;
-
- typename associated_executor<handler_type>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_type>::type a(
- (get_associated_allocator)(handler));
-
- detail::spawn_helper<handler_type, function_type> helper;
- helper.data_.reset(
- new detail::spawn_data<handler_type, function_type>(
- BOOST_ASIO_MOVE_CAST(Handler)(handler), true,
- BOOST_ASIO_MOVE_CAST(Function)(function)));
- helper.attributes_ = attributes;
-
- ex.dispatch(helper, a);
-}
-
-template <typename Handler, typename Function>
-void spawn(basic_yield_context<Handler> ctx,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes)
-{
- typedef typename decay<Function>::type function_type;
-
- Handler handler(ctx.handler_); // Explicit copy that might be moved from.
-
- typename associated_executor<Handler>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<Handler>::type a(
- (get_associated_allocator)(handler));
-
- detail::spawn_helper<Handler, function_type> helper;
- helper.data_.reset(
- new detail::spawn_data<Handler, function_type>(
- BOOST_ASIO_MOVE_CAST(Handler)(handler), false,
- BOOST_ASIO_MOVE_CAST(Function)(function)));
- helper.attributes_ = attributes;
-
- ex.dispatch(helper, a);
-}
-
-template <typename Function, typename Executor>
-inline void spawn(const Executor& ex,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- boost::asio::spawn(boost::asio::strand<Executor>(ex),
- BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
-}
-
-template <typename Function, typename Executor>
-inline void spawn(const strand<Executor>& ex,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes)
-{
- boost::asio::spawn(boost::asio::bind_executor(
- ex, &detail::default_spawn_handler),
- BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
-}
-
-template <typename Function>
-inline void spawn(const boost::asio::io_context::strand& s,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes)
-{
- boost::asio::spawn(boost::asio::bind_executor(
- s, &detail::default_spawn_handler),
- BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
-}
-
-template <typename Function, typename ExecutionContext>
-inline void spawn(ExecutionContext& ctx,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- boost::asio::spawn(ctx.get_executor(),
- BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
-}
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_SPAWN_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/src.cpp b/src/third_party/boost-1.69.0/boost/asio/impl/src.cpp
deleted file mode 100644
index 3823acfaf37..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/src.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// impl/src.cpp
-// ~~~~~~~~~~~~
-//
-// 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)
-//
-
-#if defined(_MSC_VER) \
- || defined(__BORLANDC__) \
- || defined(__DMC__)
-# pragma message ( \
- "This file is deprecated. " \
- "Please #include <boost/asio/impl/src.hpp> instead.")
-#elif defined(__GNUC__) \
- || defined(__HP_aCC) \
- || defined(__SUNPRO_CC) \
- || defined(__IBMCPP__)
-# warning "This file is deprecated."
-# warning "Please #include <boost/asio/impl/src.hpp> instead."
-#endif
-
-#include <boost/asio/impl/src.hpp>
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/src.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/src.hpp
deleted file mode 100644
index b891a453fee..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/src.hpp
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// impl/src.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_SRC_HPP
-#define BOOST_ASIO_IMPL_SRC_HPP
-
-#define BOOST_ASIO_SOURCE
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
-#endif
-
-#include <boost/asio/impl/error.ipp>
-#include <boost/asio/impl/execution_context.ipp>
-#include <boost/asio/impl/executor.ipp>
-#include <boost/asio/impl/handler_alloc_hook.ipp>
-#include <boost/asio/impl/io_context.ipp>
-#include <boost/asio/impl/serial_port_base.ipp>
-#include <boost/asio/impl/system_context.ipp>
-#include <boost/asio/impl/thread_pool.ipp>
-#include <boost/asio/detail/impl/buffer_sequence_adapter.ipp>
-#include <boost/asio/detail/impl/descriptor_ops.ipp>
-#include <boost/asio/detail/impl/dev_poll_reactor.ipp>
-#include <boost/asio/detail/impl/epoll_reactor.ipp>
-#include <boost/asio/detail/impl/eventfd_select_interrupter.ipp>
-#include <boost/asio/detail/impl/handler_tracking.ipp>
-#include <boost/asio/detail/impl/kqueue_reactor.ipp>
-#include <boost/asio/detail/impl/null_event.ipp>
-#include <boost/asio/detail/impl/pipe_select_interrupter.ipp>
-#include <boost/asio/detail/impl/posix_event.ipp>
-#include <boost/asio/detail/impl/posix_mutex.ipp>
-#include <boost/asio/detail/impl/posix_thread.ipp>
-#include <boost/asio/detail/impl/posix_tss_ptr.ipp>
-#include <boost/asio/detail/impl/reactive_descriptor_service.ipp>
-#include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
-#include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
-#include <boost/asio/detail/impl/resolver_service_base.ipp>
-#include <boost/asio/detail/impl/scheduler.ipp>
-#include <boost/asio/detail/impl/select_reactor.ipp>
-#include <boost/asio/detail/impl/service_registry.ipp>
-#include <boost/asio/detail/impl/signal_set_service.ipp>
-#include <boost/asio/detail/impl/socket_ops.ipp>
-#include <boost/asio/detail/impl/socket_select_interrupter.ipp>
-#include <boost/asio/detail/impl/strand_executor_service.ipp>
-#include <boost/asio/detail/impl/strand_service.ipp>
-#include <boost/asio/detail/impl/throw_error.ipp>
-#include <boost/asio/detail/impl/timer_queue_ptime.ipp>
-#include <boost/asio/detail/impl/timer_queue_set.ipp>
-#include <boost/asio/detail/impl/win_iocp_handle_service.ipp>
-#include <boost/asio/detail/impl/win_iocp_io_context.ipp>
-#include <boost/asio/detail/impl/win_iocp_serial_port_service.ipp>
-#include <boost/asio/detail/impl/win_iocp_socket_service_base.ipp>
-#include <boost/asio/detail/impl/win_event.ipp>
-#include <boost/asio/detail/impl/win_mutex.ipp>
-#include <boost/asio/detail/impl/win_object_handle_service.ipp>
-#include <boost/asio/detail/impl/win_static_mutex.ipp>
-#include <boost/asio/detail/impl/win_thread.ipp>
-#include <boost/asio/detail/impl/win_tss_ptr.ipp>
-#include <boost/asio/detail/impl/winrt_ssocket_service_base.ipp>
-#include <boost/asio/detail/impl/winrt_timer_scheduler.ipp>
-#include <boost/asio/detail/impl/winsock_init.ipp>
-#include <boost/asio/generic/detail/impl/endpoint.ipp>
-#include <boost/asio/ip/impl/address.ipp>
-#include <boost/asio/ip/impl/address_v4.ipp>
-#include <boost/asio/ip/impl/address_v6.ipp>
-#include <boost/asio/ip/impl/host_name.ipp>
-#include <boost/asio/ip/impl/network_v4.ipp>
-#include <boost/asio/ip/impl/network_v6.ipp>
-#include <boost/asio/ip/detail/impl/endpoint.ipp>
-#include <boost/asio/local/detail/impl/endpoint.ipp>
-
-#endif // BOOST_ASIO_IMPL_SRC_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp
deleted file mode 100644
index dab5d4d0852..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// impl/system_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_SYSTEM_CONTEXT_HPP
-#define BOOST_ASIO_IMPL_SYSTEM_CONTEXT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/system_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-inline system_context::executor_type
-system_context::get_executor() BOOST_ASIO_NOEXCEPT
-{
- return system_executor();
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_SYSTEM_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp
deleted file mode 100644
index e56632c8160..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// impl/system_context.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_IMPL_SYSTEM_CONTEXT_IPP
-#define BOOST_ASIO_IMPL_SYSTEM_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 <boost/asio/system_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-struct system_context::thread_function
-{
- detail::scheduler* scheduler_;
-
- void operator()()
- {
- boost::system::error_code ec;
- scheduler_->run(ec);
- }
-};
-
-system_context::system_context()
- : scheduler_(use_service<detail::scheduler>(*this))
-{
- scheduler_.work_started();
-
- thread_function f = { &scheduler_ };
- std::size_t num_threads = detail::thread::hardware_concurrency() * 2;
- threads_.create_threads(f, num_threads ? num_threads : 2);
-}
-
-system_context::~system_context()
-{
- scheduler_.work_finished();
- scheduler_.stop();
- threads_.join();
-}
-
-void system_context::stop()
-{
- scheduler_.stop();
-}
-
-bool system_context::stopped() const BOOST_ASIO_NOEXCEPT
-{
- return scheduler_.stopped();
-}
-
-void system_context::join()
-{
- scheduler_.work_finished();
- threads_.join();
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_SYSTEM_CONTEXT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp
deleted file mode 100644
index c59e780d3f8..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// impl/system_executor.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_SYSTEM_EXECUTOR_HPP
-#define BOOST_ASIO_IMPL_SYSTEM_EXECUTOR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/executor_op.hpp>
-#include <boost/asio/detail/global.hpp>
-#include <boost/asio/detail/recycling_allocator.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/system_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-inline system_context& system_executor::context() const BOOST_ASIO_NOEXCEPT
-{
- return detail::global<system_context>();
-}
-
-template <typename Function, typename Allocator>
-void system_executor::dispatch(
- BOOST_ASIO_MOVE_ARG(Function) f, const Allocator&) const
-{
- typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
- boost_asio_handler_invoke_helpers::invoke(tmp, tmp);
-}
-
-template <typename Function, typename Allocator>
-void system_executor::post(
- BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
-{
- typedef typename decay<Function>::type function_type;
-
- system_context& ctx = detail::global<system_context>();
-
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, Allocator> 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((ctx, *p.p,
- "system_executor", &this->context(), 0, "post"));
-
- ctx.scheduler_.post_immediate_completion(p.p, false);
- p.v = p.p = 0;
-}
-
-template <typename Function, typename Allocator>
-void system_executor::defer(
- BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
-{
- typedef typename decay<Function>::type function_type;
-
- system_context& ctx = detail::global<system_context>();
-
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, Allocator> 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((ctx, *p.p,
- "system_executor", &this->context(), 0, "defer"));
-
- ctx.scheduler_.post_immediate_completion(p.p, true);
- p.v = p.p = 0;
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_SYSTEM_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp
deleted file mode 100644
index ed8d768cd00..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// impl/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_IMPL_THREAD_POOL_HPP
-#define BOOST_ASIO_IMPL_THREAD_POOL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/executor_op.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/recycling_allocator.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-inline thread_pool::executor_type
-thread_pool::get_executor() BOOST_ASIO_NOEXCEPT
-{
- return executor_type(*this);
-}
-
-inline thread_pool&
-thread_pool::executor_type::context() const BOOST_ASIO_NOEXCEPT
-{
- return pool_;
-}
-
-inline void
-thread_pool::executor_type::on_work_started() const BOOST_ASIO_NOEXCEPT
-{
- pool_.scheduler_.work_started();
-}
-
-inline void thread_pool::executor_type::on_work_finished()
-const BOOST_ASIO_NOEXCEPT
-{
- pool_.scheduler_.work_finished();
-}
-
-template <typename Function, typename Allocator>
-void thread_pool::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 (pool_.scheduler_.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> 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((pool_, *p.p,
- "thread_pool", &this->context(), 0, "dispatch"));
-
- pool_.scheduler_.post_immediate_completion(p.p, false);
- p.v = p.p = 0;
-}
-
-template <typename Function, typename Allocator>
-void thread_pool::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> 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((pool_, *p.p,
- "thread_pool", &this->context(), 0, "post"));
-
- pool_.scheduler_.post_immediate_completion(p.p, false);
- p.v = p.p = 0;
-}
-
-template <typename Function, typename Allocator>
-void thread_pool::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> 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((pool_, *p.p,
- "thread_pool", &this->context(), 0, "defer"));
-
- pool_.scheduler_.post_immediate_completion(p.p, true);
- p.v = p.p = 0;
-}
-
-inline bool
-thread_pool::executor_type::running_in_this_thread() const BOOST_ASIO_NOEXCEPT
-{
- return pool_.scheduler_.can_dispatch();
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_THREAD_POOL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp
deleted file mode 100644
index e0952eb657e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// impl/thread_pool.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_IMPL_THREAD_POOL_IPP
-#define BOOST_ASIO_IMPL_THREAD_POOL_IPP
-
-#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/thread_pool.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-struct thread_pool::thread_function
-{
- detail::scheduler* scheduler_;
-
- void operator()()
- {
- boost::system::error_code ec;
- scheduler_->run(ec);
- }
-};
-
-thread_pool::thread_pool()
- : scheduler_(use_service<detail::scheduler>(*this))
-{
- scheduler_.work_started();
-
- thread_function f = { &scheduler_ };
- std::size_t num_threads = detail::thread::hardware_concurrency() * 2;
- threads_.create_threads(f, num_threads ? num_threads : 2);
-}
-
-thread_pool::thread_pool(std::size_t num_threads)
- : scheduler_(use_service<detail::scheduler>(*this))
-{
- scheduler_.work_started();
-
- thread_function f = { &scheduler_ };
- threads_.create_threads(f, num_threads);
-}
-
-thread_pool::~thread_pool()
-{
- stop();
- join();
-}
-
-void thread_pool::stop()
-{
- scheduler_.stop();
-}
-
-void thread_pool::join()
-{
- scheduler_.work_finished();
- threads_.join();
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index fd75a7c8e88..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/use_future.hpp
+++ /dev/null
@@ -1,939 +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 <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.69.0/boost/asio/impl/write.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/write.hpp
deleted file mode 100644
index 0be48b89f4b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/write.hpp
+++ /dev/null
@@ -1,676 +0,0 @@
-//
-// impl/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_IMPL_WRITE_HPP
-#define BOOST_ASIO_IMPL_WRITE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/detail/array_fwd.hpp>
-#include <boost/asio/detail/base_from_completion_cond.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/consuming_buffers.hpp>
-#include <boost/asio/detail/dependent_type.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/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- template <typename SyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition>
- std::size_t write_buffer_sequence(SyncWriteStream& s,
- const ConstBufferSequence& buffers, const ConstBufferIterator&,
- CompletionCondition completion_condition, boost::system::error_code& ec)
- {
- ec = boost::system::error_code();
- boost::asio::detail::consuming_buffers<const_buffer,
- ConstBufferSequence, ConstBufferIterator> tmp(buffers);
- while (!tmp.empty())
- {
- if (std::size_t max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, tmp.total_consumed())))
- tmp.consume(s.write_some(tmp.prepare(max_size), ec));
- else
- break;
- }
- return tmp.total_consumed();;
- }
-} // namespace detail
-
-template <typename SyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition>
-inline 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*)
-{
- return detail::write_buffer_sequence(s, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition, ec);
-}
-
-template <typename SyncWriteStream, typename ConstBufferSequence>
-inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "write");
- return bytes_transferred;
-}
-
-template <typename SyncWriteStream, typename ConstBufferSequence>
-inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- boost::system::error_code& ec,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
-{
- return write(s, buffers, transfer_all(), ec);
-}
-
-template <typename SyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition>
-inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write(s, buffers, completion_condition, ec);
- boost::asio::detail::throw_error(ec, "write");
- return bytes_transferred;
-}
-
-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*)
-{
- typename decay<DynamicBuffer>::type b(
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
-
- std::size_t bytes_transferred = write(s, b.data(), completion_condition, ec);
- b.consume(bytes_transferred);
- return bytes_transferred;
-}
-
-template <typename SyncWriteStream, typename DynamicBuffer>
-inline std::size_t write(SyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "write");
- return bytes_transferred;
-}
-
-template <typename SyncWriteStream, typename DynamicBuffer>
-inline 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*)
-{
- return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), ec);
-}
-
-template <typename SyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition>
-inline 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*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, ec);
- boost::asio::detail::throw_error(ec, "write");
- return bytes_transferred;
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename SyncWriteStream, typename Allocator,
- typename CompletionCondition>
-inline std::size_t write(SyncWriteStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec)
-{
- return write(s, basic_streambuf_ref<Allocator>(b), completion_condition, ec);
-}
-
-template <typename SyncWriteStream, typename Allocator>
-inline std::size_t write(SyncWriteStream& s,
- boost::asio::basic_streambuf<Allocator>& b)
-{
- return write(s, basic_streambuf_ref<Allocator>(b));
-}
-
-template <typename SyncWriteStream, typename Allocator>
-inline std::size_t write(SyncWriteStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- boost::system::error_code& ec)
-{
- return write(s, basic_streambuf_ref<Allocator>(b), ec);
-}
-
-template <typename SyncWriteStream, typename Allocator,
- typename CompletionCondition>
-inline std::size_t write(SyncWriteStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition)
-{
- return write(s, basic_streambuf_ref<Allocator>(b), completion_condition);
-}
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-namespace detail
-{
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- class write_op
- : detail::base_from_completion_cond<CompletionCondition>
- {
- public:
- write_op(AsyncWriteStream& stream, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, WriteHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
- stream_(stream),
- buffers_(buffers),
- start_(0),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- write_op(const write_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- stream_(other.stream_),
- buffers_(other.buffers_),
- start_(other.start_),
- handler_(other.handler_)
- {
- }
-
- write_op(write_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- stream_(other.stream_),
- buffers_(other.buffers_),
- start_(other.start_),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- std::size_t max_size;
- switch (start_ = start)
- {
- case 1:
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
- {
- stream_.async_write_some(buffers_.prepare(max_size),
- BOOST_ASIO_MOVE_CAST(write_op)(*this));
- return; default:
- buffers_.consume(bytes_transferred);
- if ((!ec && bytes_transferred == 0) || buffers_.empty())
- break;
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
-
- handler_(ec, buffers_.total_consumed());
- }
- }
-
- //private:
- AsyncWriteStream& stream_;
- boost::asio::detail::consuming_buffers<const_buffer,
- ConstBufferSequence, ConstBufferIterator> buffers_;
- int start_;
- WriteHandler handler_;
- };
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- inline bool asio_handler_is_continuation(
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- inline void start_write_buffer_sequence_op(AsyncWriteStream& stream,
- const ConstBufferSequence& buffers, const ConstBufferIterator&,
- CompletionCondition completion_condition, WriteHandler& handler)
- {
- detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>(
- stream, buffers, completion_condition, handler)(
- boost::system::error_code(), 0, 1);
- }
-
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>,
- Allocator>
-{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
- const detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
-
- static type get(
- const detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-inline 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*)
-{
- // 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::start_write_buffer_sequence_op(s, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
-}
-
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename WriteHandler>
-inline 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*)
-{
- // 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::start_write_buffer_sequence_op(s, buffers,
- boost::asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
-}
-
-namespace detail
-{
- template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
- class write_dynbuf_op
- {
- public:
- template <typename BufferSequence>
- write_dynbuf_op(AsyncWriteStream& stream,
- BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
- CompletionCondition completion_condition, WriteHandler& handler)
- : stream_(stream),
- buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
- completion_condition_(
- BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- write_dynbuf_op(const write_dynbuf_op& other)
- : stream_(other.stream_),
- buffers_(other.buffers_),
- completion_condition_(other.completion_condition_),
- handler_(other.handler_)
- {
- }
-
- write_dynbuf_op(write_dynbuf_op&& other)
- : stream_(other.stream_),
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- completion_condition_(
- BOOST_ASIO_MOVE_CAST(CompletionCondition)(
- other.completion_condition_)),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- switch (start)
- {
- case 1:
- async_write(stream_, buffers_.data(), completion_condition_,
- BOOST_ASIO_MOVE_CAST(write_dynbuf_op)(*this));
- return; default:
- buffers_.consume(bytes_transferred);
- handler_(ec, static_cast<const std::size_t&>(bytes_transferred));
- }
- }
-
- //private:
- AsyncWriteStream& stream_;
- DynamicBuffer buffers_;
- CompletionCondition completion_condition_;
- WriteHandler handler_;
- };
-
- template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
- inline bool asio_handler_is_continuation(
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>,
- Allocator>
-{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
- const detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
-
- static type get(
- const detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncWriteStream,
- typename DynamicBuffer, typename WriteHandler>
-inline 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*)
-{
- return async_write(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-}
-
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
-inline 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*)
-{
- // 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::write_dynbuf_op<AsyncWriteStream,
- typename decay<DynamicBuffer>::type,
- CompletionCondition, BOOST_ASIO_HANDLER_TYPE(
- WriteHandler, void (boost::system::error_code, std::size_t))>(
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, init.completion_handler)(
- boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
-{
- return async_write(s, basic_streambuf_ref<Allocator>(b),
- BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
-}
-
-template <typename AsyncWriteStream, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
-{
- return async_write(s, basic_streambuf_ref<Allocator>(b),
- completion_condition, BOOST_ASIO_MOVE_CAST(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>
-
-#endif // BOOST_ASIO_IMPL_WRITE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp
deleted file mode 100644
index 6b597d2085a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp
+++ /dev/null
@@ -1,574 +0,0 @@
-//
-// impl/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_IMPL_WRITE_AT_HPP
-#define BOOST_ASIO_IMPL_WRITE_AT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/detail/array_fwd.hpp>
-#include <boost/asio/detail/base_from_completion_cond.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/consuming_buffers.hpp>
-#include <boost/asio/detail/dependent_type.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/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition>
- std::size_t write_at_buffer_sequence(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- const ConstBufferIterator&, CompletionCondition completion_condition,
- boost::system::error_code& ec)
- {
- ec = boost::system::error_code();
- boost::asio::detail::consuming_buffers<const_buffer,
- ConstBufferSequence, ConstBufferIterator> tmp(buffers);
- while (!tmp.empty())
- {
- if (std::size_t max_size = detail::adapt_completion_condition_result(
- completion_condition(ec, tmp.total_consumed())))
- {
- tmp.consume(d.write_some_at(offset + tmp.total_consumed(),
- tmp.prepare(max_size), ec));
- }
- else
- break;
- }
- return tmp.total_consumed();;
- }
-} // namespace detail
-
-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)
-{
- return detail::write_at_buffer_sequence(d, offset, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition, ec);
-}
-
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
-inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write_at(
- d, offset, buffers, transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "write_at");
- return bytes_transferred;
-}
-
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
-inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- boost::system::error_code& ec)
-{
- return write_at(d, offset, buffers, transfer_all(), ec);
-}
-
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition>
-inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write_at(
- d, offset, buffers, completion_condition, ec);
- boost::asio::detail::throw_error(ec, "write_at");
- return bytes_transferred;
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename SyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec)
-{
- std::size_t bytes_transferred = write_at(
- d, offset, b.data(), completion_condition, ec);
- b.consume(bytes_transferred);
- return bytes_transferred;
-}
-
-template <typename SyncRandomAccessWriteDevice, typename Allocator>
-inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write_at(d, offset, b, transfer_all(), ec);
- boost::asio::detail::throw_error(ec, "write_at");
- return bytes_transferred;
-}
-
-template <typename SyncRandomAccessWriteDevice, typename Allocator>
-inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- boost::system::error_code& ec)
-{
- return write_at(d, offset, b, transfer_all(), ec);
-}
-
-template <typename SyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition>
-inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = write_at(
- d, offset, b, completion_condition, ec);
- boost::asio::detail::throw_error(ec, "write_at");
- return bytes_transferred;
-}
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-namespace detail
-{
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- class write_at_op
- : detail::base_from_completion_cond<CompletionCondition>
- {
- public:
- write_at_op(AsyncRandomAccessWriteDevice& device,
- uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, WriteHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
- device_(device),
- offset_(offset),
- buffers_(buffers),
- start_(0),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- write_at_op(const write_at_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- device_(other.device_),
- offset_(other.offset_),
- buffers_(other.buffers_),
- start_(other.start_),
- handler_(other.handler_)
- {
- }
-
- write_at_op(write_at_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
- device_(other.device_),
- offset_(other.offset_),
- buffers_(other.buffers_),
- start_(other.start_),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- std::size_t max_size;
- switch (start_ = start)
- {
- case 1:
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
- {
- device_.async_write_some_at(
- offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
- BOOST_ASIO_MOVE_CAST(write_at_op)(*this));
- return; default:
- buffers_.consume(bytes_transferred);
- if ((!ec && bytes_transferred == 0) || buffers_.empty())
- break;
- max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
-
- handler_(ec, buffers_.total_consumed());
- }
- }
-
- //private:
- AsyncRandomAccessWriteDevice& device_;
- uint64_t offset_;
- boost::asio::detail::consuming_buffers<const_buffer,
- ConstBufferSequence, ConstBufferIterator> buffers_;
- int start_;
- WriteHandler handler_;
- };
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline bool asio_handler_is_continuation(
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void start_write_at_buffer_sequence_op(AsyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- const ConstBufferIterator&, CompletionCondition completion_condition,
- WriteHandler& handler)
- {
- detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>(
- d, offset, buffers, completion_condition, handler)(
- boost::system::error_code(), 0, 1);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>,
- Allocator>
-{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
- const detail::write_at_op<AsyncRandomAccessWriteDevice,
- ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
-
- static type get(
- const detail::write_at_op<AsyncRandomAccessWriteDevice,
- ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-inline 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 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::start_write_at_buffer_sequence_op(d, offset, buffers,
- boost::asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
-}
-
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename WriteHandler>
-inline 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)
-{
- // 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::start_write_at_buffer_sequence_op(d, offset, buffers,
- boost::asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-namespace detail
-{
- template <typename Allocator, typename WriteHandler>
- class write_at_streambuf_op
- {
- public:
- write_at_streambuf_op(
- boost::asio::basic_streambuf<Allocator>& streambuf,
- WriteHandler& handler)
- : streambuf_(streambuf),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- write_at_streambuf_op(const write_at_streambuf_op& other)
- : streambuf_(other.streambuf_),
- handler_(other.handler_)
- {
- }
-
- write_at_streambuf_op(write_at_streambuf_op&& other)
- : streambuf_(other.streambuf_),
- handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- const std::size_t bytes_transferred)
- {
- streambuf_.consume(bytes_transferred);
- handler_(ec, bytes_transferred);
- }
-
- //private:
- boost::asio::basic_streambuf<Allocator>& streambuf_;
- WriteHandler handler_;
- };
-
- template <typename Allocator, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Allocator, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Allocator, typename WriteHandler>
- inline bool asio_handler_is_continuation(
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- return boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename Allocator, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename Allocator, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Allocator, typename WriteHandler>
- inline write_at_streambuf_op<Allocator, WriteHandler>
- make_write_at_streambuf_op(
- boost::asio::basic_streambuf<Allocator>& b, WriteHandler handler)
- {
- return write_at_streambuf_op<Allocator, WriteHandler>(b, handler);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename Allocator, typename WriteHandler, typename Allocator1>
-struct associated_allocator<
- detail::write_at_streambuf_op<Allocator, WriteHandler>,
- Allocator1>
-{
- typedef typename associated_allocator<WriteHandler, Allocator1>::type type;
-
- static type get(
- const detail::write_at_streambuf_op<Allocator, WriteHandler>& h,
- const Allocator1& a = Allocator1()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<WriteHandler, Allocator1>::get(h.handler_, a);
- }
-};
-
-template <typename Executor, typename WriteHandler, typename Executor1>
-struct associated_executor<
- detail::write_at_streambuf_op<Executor, WriteHandler>,
- Executor1>
-{
- typedef typename associated_executor<WriteHandler, Executor1>::type type;
-
- static type get(
- const detail::write_at_streambuf_op<Executor, WriteHandler>& h,
- const Executor1& ex = Executor1()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<WriteHandler, Executor1>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- async_write_at(d, offset, b.data(), completion_condition,
- detail::write_at_streambuf_op<Allocator, BOOST_ASIO_HANDLER_TYPE(
- WriteHandler, void (boost::system::error_code, std::size_t))>(
- b, init.completion_handler));
-
- return init.result.get();
-}
-
-template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename WriteHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
- uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- async_write_at(d, offset, b.data(), transfer_all(),
- detail::write_at_streambuf_op<Allocator, BOOST_ASIO_HANDLER_TYPE(
- WriteHandler, void (boost::system::error_code, std::size_t))>(
- b, init.completion_handler));
-
- return init.result.get();
-}
-
-#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_WRITE_AT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/io_context.hpp
deleted file mode 100644
index 51377467ea8..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/io_context.hpp
+++ /dev/null
@@ -1,878 +0,0 @@
-//
-// 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_IO_CONTEXT_HPP
-#define BOOST_ASIO_IO_CONTEXT_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 <stdexcept>
-#include <typeinfo>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/wrapped_handler.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#if defined(BOOST_ASIO_HAS_CHRONO)
-# include <boost/asio/detail/chrono.hpp>
-#endif // defined(BOOST_ASIO_HAS_CHRONO)
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# include <boost/asio/detail/winsock_init.hpp>
-#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
- || defined(__osf__)
-# include <boost/asio/detail/signal_init.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail {
-#if defined(BOOST_ASIO_HAS_IOCP)
- typedef class win_iocp_io_context io_context_impl;
- class win_iocp_overlapped_ptr;
-#else
- typedef class scheduler io_context_impl;
-#endif
-} // namespace detail
-
-/// Provides core I/O functionality.
-/**
- * The io_context class provides the core I/O functionality for users of the
- * asynchronous I/O objects, including:
- *
- * @li boost::asio::ip::tcp::socket
- * @li boost::asio::ip::tcp::acceptor
- * @li boost::asio::ip::udp::socket
- * @li boost::asio::deadline_timer.
- *
- * The io_context class also includes facilities intended for developers of
- * custom asynchronous services.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe, with the specific exceptions of the restart()
- * and notify_fork() functions. Calling restart() while there are unfinished
- * run(), run_one(), run_for(), run_until(), poll() or poll_one() calls results
- * in undefined behaviour. The notify_fork() function should not be called
- * while any io_context function, or any function on an I/O object that is
- * associated with the io_context, is being called in another thread.
- *
- * @par Concepts:
- * Dispatcher.
- *
- * @par Synchronous and asynchronous operations
- *
- * Synchronous operations on I/O objects implicitly run the io_context object
- * for an individual operation. The io_context functions run(), run_one(),
- * run_for(), run_until(), poll() or poll_one() must be called for the
- * io_context to perform asynchronous operations on behalf of a C++ program.
- * Notification that an asynchronous operation has completed is delivered by
- * invocation of the associated handler. Handlers are invoked only by a thread
- * that is currently calling any overload of run(), run_one(), run_for(),
- * run_until(), poll() or poll_one() for the io_context.
- *
- * @par Effect of exceptions thrown from handlers
- *
- * If an exception is thrown from a handler, the exception is allowed to
- * propagate through the throwing thread's invocation of run(), run_one(),
- * run_for(), run_until(), poll() or poll_one(). No other threads that are
- * calling any of these functions are affected. It is then the responsibility
- * of the application to catch the exception.
- *
- * After the exception has been caught, the run(), run_one(), run_for(),
- * run_until(), poll() or poll_one() call may be restarted @em without the need
- * for an intervening call to restart(). This allows the thread to rejoin the
- * io_context object's thread pool without impacting any other threads in the
- * pool.
- *
- * For example:
- *
- * @code
- * boost::asio::io_context io_context;
- * ...
- * for (;;)
- * {
- * try
- * {
- * io_context.run();
- * break; // run() exited normally
- * }
- * catch (my_exception& e)
- * {
- * // Deal with exception as appropriate.
- * }
- * }
- * @endcode
- *
- * @par Submitting arbitrary tasks to the io_context
- *
- * 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()
- * {
- * ...
- * }
- *
- * ...
- *
- * boost::asio::io_context io_context;
- *
- * // Submit a function to the io_context.
- * boost::asio::post(io_context, my_task);
- *
- * // Submit a lambda object to the io_context.
- * boost::asio::post(io_context,
- * []()
- * {
- * ...
- * });
- *
- * // Run the io_context until it runs out of work.
- * io_context.run(); @endcode
- *
- * @par Stopping the io_context from running out of work
- *
- * Some applications may need to prevent an io_context object's run() call from
- * returning when there is no more work to do. For example, the io_context may
- * be being run in a background thread that is launched prior to the
- * application's asynchronous operations. The run() call may be kept running by
- * creating an object of type
- * boost::asio::executor_work_guard<io_context::executor_type>:
- *
- * @code boost::asio::io_context io_context;
- * boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
- * = boost::asio::make_work_guard(io_context);
- * ... @endcode
- *
- * To effect a shutdown, the application will then need to call the io_context
- * object's stop() member function. This will cause the io_context run() call
- * to return as soon as possible, abandoning unfinished operations and without
- * permitting ready handlers to be dispatched.
- *
- * Alternatively, if the application requires that all operations and handlers
- * be allowed to finish normally, the work object may be explicitly reset.
- *
- * @code boost::asio::io_context io_context;
- * boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
- * = boost::asio::make_work_guard(io_context);
- * ...
- * work.reset(); // Allow run() to exit. @endcode
- */
-class io_context
- : public execution_context
-{
-private:
- typedef detail::io_context_impl impl_type;
-#if defined(BOOST_ASIO_HAS_IOCP)
- friend class detail::win_iocp_overlapped_ptr;
-#endif
-
-public:
- class executor_type;
- friend class executor_type;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- class work;
- friend class work;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- class service;
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
- class strand;
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
- /// The type used to count the number of handlers executed by the context.
- typedef std::size_t count_type;
-
- /// Constructor.
- BOOST_ASIO_DECL io_context();
-
- /// Constructor.
- /**
- * Construct with a hint about the required level of concurrency.
- *
- * @param concurrency_hint A suggestion to the implementation on how many
- * threads it should allow to run simultaneously.
- */
- BOOST_ASIO_DECL explicit io_context(int concurrency_hint);
-
- /// Destructor.
- /**
- * On destruction, the io_context performs the following sequence of
- * operations:
- *
- * @li For each service object @c svc in the io_context set, in reverse order
- * of the beginning of service object lifetime, performs
- * @c svc->shutdown().
- *
- * @li Uninvoked handler objects that were scheduled for deferred invocation
- * on the io_context, or any associated strand, are destroyed.
- *
- * @li For each service object @c svc in the io_context set, in reverse order
- * of the beginning of service object lifetime, performs
- * <tt>delete static_cast<io_context::service*>(svc)</tt>.
- *
- * @note The destruction sequence described above permits programs to
- * simplify their resource management by using @c shared_ptr<>. Where an
- * object's lifetime is tied to the lifetime of a connection (or some other
- * sequence of asynchronous operations), a @c shared_ptr to the object would
- * be bound into the handlers for all asynchronous operations associated with
- * it. This works as follows:
- *
- * @li When a single connection ends, all associated asynchronous operations
- * complete. The corresponding handler objects are destroyed, and all
- * @c shared_ptr references to the objects are destroyed.
- *
- * @li To shut down the whole program, the io_context function stop() is
- * called to terminate any run() calls as soon as possible. The io_context
- * destructor defined above destroys all handlers, causing all @c shared_ptr
- * references to all connection objects to be destroyed.
- */
- BOOST_ASIO_DECL ~io_context();
-
- /// Obtains the executor associated with the io_context.
- executor_type get_executor() BOOST_ASIO_NOEXCEPT;
-
- /// Run the io_context object's event processing loop.
- /**
- * The run() function blocks until all work has finished and there are no
- * more handlers to be dispatched, or until the io_context has been stopped.
- *
- * Multiple threads may call the run() function to set up a pool of threads
- * from which the io_context may execute handlers. All threads that are
- * waiting in the pool are equivalent and the io_context may choose any one
- * of them to invoke a handler.
- *
- * A normal exit from the run() function implies that the io_context object
- * is stopped (the stopped() function returns @c true). Subsequent calls to
- * run(), run_one(), poll() or poll_one() will return immediately unless there
- * is a prior call to restart().
- *
- * @return The number of handlers that were executed.
- *
- * @note Calling the run() function from a thread that is currently calling
- * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
- * the same io_context object may introduce the potential for deadlock. It is
- * the caller's reponsibility to avoid this.
- *
- * The poll() function may also be used to dispatch ready handlers, but
- * without blocking.
- */
- BOOST_ASIO_DECL count_type run();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overload.) Run the io_context object's
- /// event processing loop.
- /**
- * The run() function blocks until all work has finished and there are no
- * more handlers to be dispatched, or until the io_context has been stopped.
- *
- * Multiple threads may call the run() function to set up a pool of threads
- * from which the io_context may execute handlers. All threads that are
- * waiting in the pool are equivalent and the io_context may choose any one
- * of them to invoke a handler.
- *
- * A normal exit from the run() function implies that the io_context object
- * is stopped (the stopped() function returns @c true). Subsequent calls to
- * run(), run_one(), poll() or poll_one() will return immediately unless there
- * is a prior call to restart().
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of handlers that were executed.
- *
- * @note Calling the run() function from a thread that is currently calling
- * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
- * the same io_context object may introduce the potential for deadlock. It is
- * the caller's reponsibility to avoid this.
- *
- * The poll() function may also be used to dispatch ready handlers, but
- * without blocking.
- */
- BOOST_ASIO_DECL count_type run(boost::system::error_code& ec);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
- /// Run the io_context object's event processing loop for a specified
- /// duration.
- /**
- * The run_for() function blocks until all work has finished and there are no
- * more handlers to be dispatched, until the io_context has been stopped, or
- * until the specified duration has elapsed.
- *
- * @param rel_time The duration for which the call may block.
- *
- * @return The number of handlers that were executed.
- */
- template <typename Rep, typename Period>
- std::size_t run_for(const chrono::duration<Rep, Period>& rel_time);
-
- /// Run the io_context object's event processing loop until a specified time.
- /**
- * The run_until() function blocks until all work has finished and there are
- * no more handlers to be dispatched, until the io_context has been stopped,
- * or until the specified time has been reached.
- *
- * @param abs_time The time point until which the call may block.
- *
- * @return The number of handlers that were executed.
- */
- template <typename Clock, typename Duration>
- std::size_t run_until(const chrono::time_point<Clock, Duration>& abs_time);
-#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
- /// Run the io_context object's event processing loop to execute at most one
- /// handler.
- /**
- * The run_one() function blocks until one handler has been dispatched, or
- * until the io_context has been stopped.
- *
- * @return The number of handlers that were executed. A zero return value
- * implies that the io_context object is stopped (the stopped() function
- * returns @c true). Subsequent calls to run(), run_one(), poll() or
- * poll_one() will return immediately unless there is a prior call to
- * restart().
- *
- * @note Calling the run_one() function from a thread that is currently
- * calling one of run(), run_one(), run_for(), run_until(), poll() or
- * poll_one() on the same io_context object may introduce the potential for
- * deadlock. It is the caller's reponsibility to avoid this.
- */
- BOOST_ASIO_DECL count_type run_one();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's
- /// event processing loop to execute at most one handler.
- /**
- * The run_one() function blocks until one handler has been dispatched, or
- * until the io_context has been stopped.
- *
- * @return The number of handlers that were executed. A zero return value
- * implies that the io_context object is stopped (the stopped() function
- * returns @c true). Subsequent calls to run(), run_one(), poll() or
- * poll_one() will return immediately unless there is a prior call to
- * restart().
- *
- * @return The number of handlers that were executed.
- *
- * @note Calling the run_one() function from a thread that is currently
- * calling one of run(), run_one(), run_for(), run_until(), poll() or
- * poll_one() on the same io_context object may introduce the potential for
- * deadlock. It is the caller's reponsibility to avoid this.
- */
- BOOST_ASIO_DECL count_type run_one(boost::system::error_code& ec);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
- /// Run the io_context object's event processing loop for a specified duration
- /// to execute at most one handler.
- /**
- * The run_one_for() function blocks until one handler has been dispatched,
- * until the io_context has been stopped, or until the specified duration has
- * elapsed.
- *
- * @param rel_time The duration for which the call may block.
- *
- * @return The number of handlers that were executed.
- */
- template <typename Rep, typename Period>
- std::size_t run_one_for(const chrono::duration<Rep, Period>& rel_time);
-
- /// Run the io_context object's event processing loop until a specified time
- /// to execute at most one handler.
- /**
- * The run_one_until() function blocks until one handler has been dispatched,
- * until the io_context has been stopped, or until the specified time has
- * been reached.
- *
- * @param abs_time The time point until which the call may block.
- *
- * @return The number of handlers that were executed.
- */
- template <typename Clock, typename Duration>
- std::size_t run_one_until(
- const chrono::time_point<Clock, Duration>& abs_time);
-#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
- /// Run the io_context object's event processing loop to execute ready
- /// handlers.
- /**
- * The poll() function runs handlers that are ready to run, without blocking,
- * until the io_context has been stopped or there are no more ready handlers.
- *
- * @return The number of handlers that were executed.
- */
- BOOST_ASIO_DECL count_type poll();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overload.) Run the io_context object's
- /// event processing loop to execute ready handlers.
- /**
- * The poll() function runs handlers that are ready to run, without blocking,
- * until the io_context has been stopped or there are no more ready handlers.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of handlers that were executed.
- */
- BOOST_ASIO_DECL count_type poll(boost::system::error_code& ec);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Run the io_context object's event processing loop to execute one ready
- /// handler.
- /**
- * The poll_one() function runs at most one handler that is ready to run,
- * without blocking.
- *
- * @return The number of handlers that were executed.
- */
- BOOST_ASIO_DECL count_type poll_one();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overload.) Run the io_context object's
- /// event processing loop to execute one ready handler.
- /**
- * The poll_one() function runs at most one handler that is ready to run,
- * without blocking.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @return The number of handlers that were executed.
- */
- BOOST_ASIO_DECL count_type poll_one(boost::system::error_code& ec);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Stop the io_context object's event processing loop.
- /**
- * This function does not block, but instead simply signals the io_context to
- * stop. All invocations of its run() or run_one() member functions should
- * return as soon as possible. Subsequent calls to run(), run_one(), poll()
- * or poll_one() will return immediately until restart() is called.
- */
- BOOST_ASIO_DECL void stop();
-
- /// Determine whether the io_context object has been stopped.
- /**
- * This function is used to determine whether an io_context object has been
- * stopped, either through an explicit call to stop(), or due to running out
- * of work. When an io_context object is stopped, calls to run(), run_one(),
- * poll() or poll_one() will return immediately without invoking any
- * handlers.
- *
- * @return @c true if the io_context object is stopped, otherwise @c false.
- */
- BOOST_ASIO_DECL bool stopped() const;
-
- /// Restart the io_context in preparation for a subsequent run() invocation.
- /**
- * This function must be called prior to any second or later set of
- * invocations of the run(), run_one(), poll() or poll_one() functions when a
- * previous invocation of these functions returned due to the io_context
- * being stopped or running out of work. After a call to restart(), the
- * io_context object's stopped() function will return @c false.
- *
- * This function must not be called while there are any unfinished calls to
- * the run(), run_one(), poll() or poll_one() functions.
- */
- BOOST_ASIO_DECL void restart();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use restart().) Reset the io_context in preparation for a
- /// subsequent run() invocation.
- /**
- * This function must be called prior to any second or later set of
- * invocations of the run(), run_one(), poll() or poll_one() functions when a
- * previous invocation of these functions returned due to the io_context
- * being stopped or running out of work. After a call to restart(), the
- * io_context object's stopped() function will return @c false.
- *
- * This function must not be called while there are any unfinished calls to
- * the run(), run_one(), poll() or poll_one() functions.
- */
- void reset();
-
- /// (Deprecated: Use boost::asio::dispatch().) Request the io_context to
- /// invoke the given handler.
- /**
- * This function is used to ask the io_context to execute the given handler.
- *
- * The io_context guarantees that the handler will only be called in a thread
- * in which the run(), run_one(), poll() or poll_one() member functions is
- * currently being invoked. The handler may be executed inside this function
- * if the guarantee can be met.
- *
- * @param handler The handler to be called. The io_context will make
- * a copy of the handler object as required. The function signature of the
- * handler must be: @code void handler(); @endcode
- *
- * @note This function throws an exception only if:
- *
- * @li the handler's @c asio_handler_allocate function; or
- *
- * @li the handler's copy constructor
- *
- * throws an exception.
- */
- template <typename LegacyCompletionHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
- dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler);
-
- /// (Deprecated: Use boost::asio::post().) Request the io_context to invoke
- /// the given handler and return immediately.
- /**
- * This function is used to ask the io_context to execute the given handler,
- * but without allowing the io_context to call the handler from inside this
- * function.
- *
- * The io_context guarantees that the handler will only be called in a thread
- * in which the run(), run_one(), poll() or poll_one() member functions is
- * currently being invoked.
- *
- * @param handler The handler to be called. The io_context will make
- * a copy of the handler object as required. The function signature of the
- * handler must be: @code void handler(); @endcode
- *
- * @note This function throws an exception only if:
- *
- * @li the handler's @c asio_handler_allocate function; or
- *
- * @li the handler's copy constructor
- *
- * throws an exception.
- */
- template <typename LegacyCompletionHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
- post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler);
-
- /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that
- /// automatically dispatches the wrapped handler on the io_context.
- /**
- * This function is used to create a new handler function object that, when
- * invoked, will automatically pass the wrapped handler to the io_context
- * object's dispatch function.
- *
- * @param handler The handler to be wrapped. The io_context will make a copy
- * of the handler object as required. The function signature of the handler
- * must be: @code void handler(A1 a1, ... An an); @endcode
- *
- * @return A function object that, when invoked, passes the wrapped handler to
- * the io_context object's dispatch function. Given a function object with the
- * signature:
- * @code R f(A1 a1, ... An an); @endcode
- * If this function object is passed to the wrap function like so:
- * @code io_context.wrap(f); @endcode
- * then the return value is a function object with the signature
- * @code void g(A1 a1, ... An an); @endcode
- * that, when invoked, executes code equivalent to:
- * @code io_context.dispatch(boost::bind(f, a1, ... an)); @endcode
- */
- template <typename Handler>
-#if defined(GENERATING_DOCUMENTATION)
- unspecified
-#else
- detail::wrapped_handler<io_context&, Handler>
-#endif
- wrap(Handler handler);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-private:
- // Helper function to add the implementation.
- BOOST_ASIO_DECL impl_type& add_impl(impl_type* impl);
-
- // Backwards compatible overload for use with services derived from
- // io_context::service.
- template <typename Service>
- friend Service& use_service(io_context& ioc);
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- detail::winsock_init<> init_;
-#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
- || defined(__osf__)
- detail::signal_init<> init_;
-#endif
-
- // The implementation.
- impl_type& impl_;
-};
-
-/// Executor used to submit functions to an io_context.
-class io_context::executor_type
-{
-public:
- /// Obtain the underlying execution context.
- io_context& context() const BOOST_ASIO_NOEXCEPT;
-
- /// Inform the io_context that it has some outstanding work to do.
- /**
- * This function is used to inform the io_context that some work has begun.
- * This ensures that the io_context's run() and run_one() functions do not
- * exit while the work is underway.
- */
- void on_work_started() const BOOST_ASIO_NOEXCEPT;
-
- /// Inform the io_context that some work is no longer outstanding.
- /**
- * This function is used to inform the io_context that some work has
- * finished. Once the count of unfinished work reaches zero, the io_context
- * is stopped and the run() and run_one() functions may exit.
- */
- void on_work_finished() const BOOST_ASIO_NOEXCEPT;
-
- /// Request the io_context to invoke the given function object.
- /**
- * This function is used to ask the io_context to execute the given function
- * object. If the current thread is running the io_context, @c dispatch()
- * executes the function before returning. Otherwise, the function will be
- * scheduled to run on the io_context.
- *
- * @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 io_context to invoke the given function object.
- /**
- * This function is used to ask the io_context 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 io_context.
- *
- * @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 io_context to invoke the given function object.
- /**
- * This function is used to ask the io_context 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 io_context.
- *
- * If the current thread belongs to the io_context, @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 io_context is running in the current thread.
- /**
- * @return @c true if the current thread is running the io_context. 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 io_context.
- */
- friend bool operator==(const executor_type& a,
- const executor_type& b) BOOST_ASIO_NOEXCEPT
- {
- return &a.io_context_ == &b.io_context_;
- }
-
- /// Compare two executors for inequality.
- /**
- * Two executors are equal if they refer to the same underlying io_context.
- */
- friend bool operator!=(const executor_type& a,
- const executor_type& b) BOOST_ASIO_NOEXCEPT
- {
- return &a.io_context_ != &b.io_context_;
- }
-
-private:
- friend class io_context;
-
- // Constructor.
- explicit executor_type(io_context& i) : io_context_(i) {}
-
- // The underlying io_context.
- io_context& io_context_;
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-/// (Deprecated: Use executor_work_guard.) Class to inform the io_context when
-/// it has work to do.
-/**
- * The work class is used to inform the io_context when work starts and
- * finishes. This ensures that the io_context object's run() function will not
- * exit while work is underway, and that it does exit when there is no
- * unfinished work remaining.
- *
- * The work class is copy-constructible so that it may be used as a data member
- * in a handler class. It is not assignable.
- */
-class io_context::work
-{
-public:
- /// Constructor notifies the io_context that work is starting.
- /**
- * The constructor is used to inform the io_context that some work has begun.
- * This ensures that the io_context object's run() function will not exit
- * while the work is underway.
- */
- explicit work(boost::asio::io_context& io_context);
-
- /// Copy constructor notifies the io_context that work is starting.
- /**
- * The constructor is used to inform the io_context that some work has begun.
- * This ensures that the io_context object's run() function will not exit
- * while the work is underway.
- */
- work(const work& other);
-
- /// Destructor notifies the io_context that the work is complete.
- /**
- * The destructor is used to inform the io_context that some work has
- * finished. Once the count of unfinished work reaches zero, the io_context
- * object's run() function is permitted to exit.
- */
- ~work();
-
- /// Get the io_context associated with the work.
- boost::asio::io_context& get_io_context();
-
- /// (Deprecated: Use get_io_context().) Get the io_context associated with the
- /// work.
- boost::asio::io_context& get_io_service();
-
-private:
- // Prevent assignment.
- void operator=(const work& other);
-
- // The io_context implementation.
- detail::io_context_impl& io_context_impl_;
-};
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Base class for all io_context services.
-class io_context::service
- : public execution_context::service
-{
-public:
- /// Get the io_context object that owns the service.
- boost::asio::io_context& get_io_context();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// Get the io_context object that owns the service.
- boost::asio::io_context& get_io_service();
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-private:
- /// Destroy all user-defined handler objects owned by the service.
- BOOST_ASIO_DECL virtual void shutdown();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use shutdown().) Destroy all user-defined handler objects
- /// owned by the service.
- BOOST_ASIO_DECL virtual void shutdown_service();
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Handle notification of a fork-related event to perform any necessary
- /// housekeeping.
- /**
- * This function is not a pure virtual so that services only have to
- * implement it if necessary. The default implementation does nothing.
- */
- BOOST_ASIO_DECL virtual void notify_fork(
- execution_context::fork_event event);
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use notify_fork().) Handle notification of a fork-related
- /// event to perform any necessary housekeeping.
- /**
- * This function is not a pure virtual so that services only have to
- * implement it if necessary. The default implementation does nothing.
- */
- BOOST_ASIO_DECL virtual void fork_service(
- execution_context::fork_event event);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-protected:
- /// Constructor.
- /**
- * @param owner The io_context object that owns the service.
- */
- BOOST_ASIO_DECL service(boost::asio::io_context& owner);
-
- /// Destructor.
- BOOST_ASIO_DECL virtual ~service();
-};
-
-namespace detail {
-
-// Special service base class to keep classes header-file only.
-template <typename Type>
-class service_base
- : public boost::asio::io_context::service
-{
-public:
- static boost::asio::detail::service_id<Type> id;
-
- // Constructor.
- service_base(boost::asio::io_context& io_context)
- : boost::asio::io_context::service(io_context)
- {
- }
-};
-
-template <typename Type>
-boost::asio::detail::service_id<Type> service_base<Type>::id;
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/io_context.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/io_context.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-// If both io_context.hpp and strand.hpp have been included, automatically
-// include the header file needed for the io_context::strand class.
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# if defined(BOOST_ASIO_STRAND_HPP)
-# include <boost/asio/io_context_strand.hpp>
-# endif // defined(BOOST_ASIO_STRAND_HPP)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#endif // BOOST_ASIO_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp b/src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp
deleted file mode 100644
index 144e308a21d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp
+++ /dev/null
@@ -1,386 +0,0 @@
-//
-// io_context_strand.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_IO_CONTEXT_STRAND_HPP
-#define BOOST_ASIO_IO_CONTEXT_STRAND_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_NO_EXTENSIONS)
-
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/strand_service.hpp>
-#include <boost/asio/detail/wrapped_handler.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides serialised handler execution.
-/**
- * The io_context::strand class provides the ability to post and dispatch
- * handlers with the guarantee that none of those handlers will execute
- * concurrently.
- *
- * @par Order of handler invocation
- * Given:
- *
- * @li a strand object @c s
- *
- * @li an object @c a meeting completion handler requirements
- *
- * @li an object @c a1 which is an arbitrary copy of @c a made by the
- * implementation
- *
- * @li an object @c b meeting completion handler requirements
- *
- * @li an object @c b1 which is an arbitrary copy of @c b made by the
- * implementation
- *
- * if any of the following conditions are true:
- *
- * @li @c s.post(a) happens-before @c s.post(b)
- *
- * @li @c s.post(a) happens-before @c s.dispatch(b), where the latter is
- * performed outside the strand
- *
- * @li @c s.dispatch(a) happens-before @c s.post(b), where the former is
- * performed outside the strand
- *
- * @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
- * performed outside the strand
- *
- * then @c asio_handler_invoke(a1, &a1) happens-before
- * @c asio_handler_invoke(b1, &b1).
- *
- * Note that in the following case:
- * @code async_op_1(..., s.wrap(a));
- * async_op_2(..., s.wrap(b)); @endcode
- * the completion of the first async operation will perform @c s.dispatch(a),
- * and the second will perform @c s.dispatch(b), but the order in which those
- * are performed is unspecified. That is, you cannot state whether one
- * happens-before the other. Therefore none of the above conditions are met and
- * no ordering guarantee is made.
- *
- * @note The implementation makes no guarantee that handlers posted or
- * dispatched through different @c strand objects will be invoked concurrently.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Dispatcher.
- */
-class io_context::strand
-{
-public:
- /// Constructor.
- /**
- * Constructs the strand.
- *
- * @param io_context The io_context object that the strand will use to
- * dispatch handlers that are ready to be run.
- */
- explicit strand(boost::asio::io_context& io_context)
- : service_(boost::asio::use_service<
- boost::asio::detail::strand_service>(io_context))
- {
- service_.construct(impl_);
- }
-
- /// Destructor.
- /**
- * Destroys a strand.
- *
- * Handlers posted through the strand that have not yet been invoked will
- * still be dispatched in a way that meets the guarantee of non-concurrency.
- */
- ~strand()
- {
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use context().) Get the io_context associated with the
- /// strand.
- /**
- * This function may be used to obtain the io_context object that the strand
- * uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the strand will use to
- * dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_context& get_io_context()
- {
- return service_.get_io_context();
- }
-
- /// (Deprecated: Use context().) Get the io_context associated with the
- /// strand.
- /**
- * This function may be used to obtain the io_context object that the strand
- * uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the strand will use to
- * dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_context& get_io_service()
- {
- return service_.get_io_context();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Obtain the underlying execution context.
- boost::asio::io_context& context() const BOOST_ASIO_NOEXCEPT
- {
- return service_.get_io_context();
- }
-
- /// Inform the strand that it has some outstanding work to do.
- /**
- * The strand delegates this call to its underlying io_context.
- */
- void on_work_started() const BOOST_ASIO_NOEXCEPT
- {
- context().get_executor().on_work_started();
- }
-
- /// Inform the strand that some work is no longer outstanding.
- /**
- * The strand delegates this call to its underlying io_context.
- */
- void on_work_finished() const BOOST_ASIO_NOEXCEPT
- {
- context().get_executor().on_work_finished();
- }
-
- /// Request the strand to invoke the given function object.
- /**
- * This function is used to ask the strand to execute the given function
- * object on its underlying io_context. The function object will be executed
- * inside this function if the strand is not otherwise busy and if the
- * underlying io_context's executor's @c dispatch() function is also able to
- * execute the function before returning.
- *
- * @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
- {
- typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
- service_.dispatch(impl_, tmp);
- (void)a;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use boost::asio::dispatch().) Request the strand to invoke
- /// the given handler.
- /**
- * This function is used to ask the strand to execute the given handler.
- *
- * The strand object guarantees that handlers posted or dispatched through
- * the strand will not be executed concurrently. The handler may be executed
- * inside this function if the guarantee can be met. If this function is
- * called from within a handler that was posted or dispatched through the same
- * strand, then the new handler will be executed immediately.
- *
- * The strand's guarantee is in addition to the guarantee provided by the
- * underlying io_context. The io_context guarantees that the handler will only
- * be called in a thread in which the io_context's run member function is
- * currently being invoked.
- *
- * @param handler The handler to be called. The strand will make a copy of the
- * handler object as required. The function signature of the handler must be:
- * @code void handler(); @endcode
- */
- template <typename LegacyCompletionHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
- 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);
-
- service_.dispatch(impl_, init.completion_handler);
-
- return init.result.get();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Request the strand to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will never be executed inside this function.
- * Instead, it will be scheduled to run by the underlying io_context.
- *
- * @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
- {
- typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
- service_.post(impl_, tmp);
- (void)a;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use boost::asio::post().) Request the strand to invoke the
- /// given handler and return immediately.
- /**
- * This function is used to ask the strand to execute the given handler, but
- * without allowing the strand to call the handler from inside this function.
- *
- * The strand object guarantees that handlers posted or dispatched through
- * the strand will not be executed concurrently. The strand's guarantee is in
- * addition to the guarantee provided by the underlying io_context. The
- * io_context guarantees that the handler will only be called in a thread in
- * which the io_context's run member function is currently being invoked.
- *
- * @param handler The handler to be called. The strand will make a copy of the
- * handler object as required. The function signature of the handler must be:
- * @code void handler(); @endcode
- */
- template <typename LegacyCompletionHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
- 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);
-
- service_.post(impl_, init.completion_handler);
-
- return init.result.get();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Request the strand to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will never be executed inside this function.
- * Instead, it will be scheduled to run by the underlying io_context.
- *
- * @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
- {
- typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
- service_.post(impl_, tmp);
- (void)a;
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that
- /// automatically dispatches the wrapped handler on the strand.
- /**
- * This function is used to create a new handler function object that, when
- * invoked, will automatically pass the wrapped handler to the strand's
- * dispatch function.
- *
- * @param handler The handler to be wrapped. The strand will make a copy of
- * the handler object as required. The function signature of the handler must
- * be: @code void handler(A1 a1, ... An an); @endcode
- *
- * @return A function object that, when invoked, passes the wrapped handler to
- * the strand's dispatch function. Given a function object with the signature:
- * @code R f(A1 a1, ... An an); @endcode
- * If this function object is passed to the wrap function like so:
- * @code strand.wrap(f); @endcode
- * then the return value is a function object with the signature
- * @code void g(A1 a1, ... An an); @endcode
- * that, when invoked, executes code equivalent to:
- * @code strand.dispatch(boost::bind(f, a1, ... an)); @endcode
- */
- template <typename Handler>
-#if defined(GENERATING_DOCUMENTATION)
- unspecified
-#else
- detail::wrapped_handler<strand, Handler, detail::is_continuation_if_running>
-#endif
- wrap(Handler handler)
- {
- return detail::wrapped_handler<io_context::strand, Handler,
- detail::is_continuation_if_running>(*this, handler);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Determine whether the strand is running in the current thread.
- /**
- * @return @c true if the current thread is executing a handler that was
- * submitted to the strand using post(), dispatch() or wrap(). Otherwise
- * returns @c false.
- */
- bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT
- {
- return service_.running_in_this_thread(impl_);
- }
-
- /// Compare two strands for equality.
- /**
- * Two strands are equal if they refer to the same ordered, non-concurrent
- * state.
- */
- friend bool operator==(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
- {
- return a.impl_ == b.impl_;
- }
-
- /// Compare two strands for inequality.
- /**
- * Two strands are equal if they refer to the same ordered, non-concurrent
- * state.
- */
- friend bool operator!=(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
- {
- return a.impl_ != b.impl_;
- }
-
-private:
- boost::asio::detail::strand_service& service_;
- mutable boost::asio::detail::strand_service::implementation_type impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#endif // BOOST_ASIO_IO_CONTEXT_STRAND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/io_service.hpp b/src/third_party/boost-1.69.0/boost/asio/io_service.hpp
deleted file mode 100644
index 76af8e0cbdb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/io_service.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// io_service.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_IO_SERVICE_HPP
-#define BOOST_ASIO_IO_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-/// Typedef for backwards compatibility.
-typedef io_context io_service;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IO_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp b/src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp
deleted file mode 100644
index bb38c276c66..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// io_service_strand.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_IO_SERVICE_STRAND_HPP
-#define BOOST_ASIO_IO_SERVICE_STRAND_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/io_context_strand.hpp>
-
-#endif // BOOST_ASIO_IO_SERVICE_STRAND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address.hpp
deleted file mode 100644
index 9b0cbdd3ee3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address.hpp
+++ /dev/null
@@ -1,262 +0,0 @@
-//
-// ip/address.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_ADDRESS_HPP
-#define BOOST_ASIO_IP_ADDRESS_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/detail/throw_exception.hpp>
-#include <boost/asio/detail/string_view.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/ip/address_v4.hpp>
-#include <boost/asio/ip/address_v6.hpp>
-#include <boost/asio/ip/bad_address_cast.hpp>
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# include <iosfwd>
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Implements version-independent IP addresses.
-/**
- * The boost::asio::ip::address class provides the ability to use either IP
- * version 4 or version 6 addresses.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class address
-{
-public:
- /// Default constructor.
- BOOST_ASIO_DECL address();
-
- /// Construct an address from an IPv4 address.
- BOOST_ASIO_DECL address(const boost::asio::ip::address_v4& ipv4_address);
-
- /// Construct an address from an IPv6 address.
- BOOST_ASIO_DECL address(const boost::asio::ip::address_v6& ipv6_address);
-
- /// Copy constructor.
- BOOST_ASIO_DECL address(const address& other);
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- BOOST_ASIO_DECL address(address&& other);
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another address.
- BOOST_ASIO_DECL address& operator=(const address& other);
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another address.
- BOOST_ASIO_DECL address& operator=(address&& other);
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from an IPv4 address.
- BOOST_ASIO_DECL address& operator=(
- const boost::asio::ip::address_v4& ipv4_address);
-
- /// Assign from an IPv6 address.
- BOOST_ASIO_DECL address& operator=(
- const boost::asio::ip::address_v6& ipv6_address);
-
- /// Get whether the address is an IP version 4 address.
- bool is_v4() const
- {
- return type_ == ipv4;
- }
-
- /// Get whether the address is an IP version 6 address.
- bool is_v6() const
- {
- return type_ == ipv6;
- }
-
- /// Get the address as an IP version 4 address.
- BOOST_ASIO_DECL boost::asio::ip::address_v4 to_v4() const;
-
- /// Get the address as an IP version 6 address.
- BOOST_ASIO_DECL boost::asio::ip::address_v6 to_v6() const;
-
- /// Get the address as a string.
- BOOST_ASIO_DECL std::string to_string() const;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use other overload.) Get the address as a string.
- BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
-
- /// (Deprecated: Use make_address().) Create an address from an IPv4 address
- /// string in dotted decimal form, or from an IPv6 address in hexadecimal
- /// notation.
- static address from_string(const char* str);
-
- /// (Deprecated: Use make_address().) Create an address from an IPv4 address
- /// string in dotted decimal form, or from an IPv6 address in hexadecimal
- /// notation.
- static address from_string(const char* str, boost::system::error_code& ec);
-
- /// (Deprecated: Use make_address().) Create an address from an IPv4 address
- /// string in dotted decimal form, or from an IPv6 address in hexadecimal
- /// notation.
- static address from_string(const std::string& str);
-
- /// (Deprecated: Use make_address().) Create an address from an IPv4 address
- /// string in dotted decimal form, or from an IPv6 address in hexadecimal
- /// notation.
- static address from_string(
- const std::string& str, boost::system::error_code& ec);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Determine whether the address is a loopback address.
- BOOST_ASIO_DECL bool is_loopback() const;
-
- /// Determine whether the address is unspecified.
- BOOST_ASIO_DECL bool is_unspecified() const;
-
- /// Determine whether the address is a multicast address.
- BOOST_ASIO_DECL bool is_multicast() const;
-
- /// Compare two addresses for equality.
- BOOST_ASIO_DECL friend bool operator==(const address& a1, const address& a2);
-
- /// Compare two addresses for inequality.
- friend bool operator!=(const address& a1, const address& a2)
- {
- return !(a1 == a2);
- }
-
- /// Compare addresses for ordering.
- BOOST_ASIO_DECL friend bool operator<(const address& a1, const address& a2);
-
- /// Compare addresses for ordering.
- friend bool operator>(const address& a1, const address& a2)
- {
- return a2 < a1;
- }
-
- /// Compare addresses for ordering.
- friend bool operator<=(const address& a1, const address& a2)
- {
- return !(a2 < a1);
- }
-
- /// Compare addresses for ordering.
- friend bool operator>=(const address& a1, const address& a2)
- {
- return !(a1 < a2);
- }
-
-private:
- // The type of the address.
- enum { ipv4, ipv6 } type_;
-
- // The underlying IPv4 address.
- boost::asio::ip::address_v4 ipv4_address_;
-
- // The underlying IPv6 address.
- boost::asio::ip::address_v6 ipv6_address_;
-};
-
-/// Create an address from an IPv4 address string in dotted decimal form,
-/// or from an IPv6 address in hexadecimal notation.
-/**
- * @relates address
- */
-BOOST_ASIO_DECL address make_address(const char* str);
-
-/// Create an address from an IPv4 address string in dotted decimal form,
-/// or from an IPv6 address in hexadecimal notation.
-/**
- * @relates address
- */
-BOOST_ASIO_DECL address make_address(
- const char* str, boost::system::error_code& ec);
-
-/// Create an address from an IPv4 address string in dotted decimal form,
-/// or from an IPv6 address in hexadecimal notation.
-/**
- * @relates address
- */
-BOOST_ASIO_DECL address make_address(const std::string& str);
-
-/// Create an address from an IPv4 address string in dotted decimal form,
-/// or from an IPv6 address in hexadecimal notation.
-/**
- * @relates address
- */
-BOOST_ASIO_DECL address make_address(
- const std::string& str, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Create an address from an IPv4 address string in dotted decimal form,
-/// or from an IPv6 address in hexadecimal notation.
-/**
- * @relates address
- */
-BOOST_ASIO_DECL address make_address(string_view str);
-
-/// Create an address from an IPv4 address string in dotted decimal form,
-/// or from an IPv6 address in hexadecimal notation.
-/**
- * @relates address
- */
-BOOST_ASIO_DECL address make_address(
- string_view str, boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
- // || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Output an address as a string.
-/**
- * Used to output a human-readable string for a specified address.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param addr The address to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::ip::address
- */
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const address& addr);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ip/impl/address.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/impl/address.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_ADDRESS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp
deleted file mode 100644
index 68d724085d6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp
+++ /dev/null
@@ -1,331 +0,0 @@
-//
-// ip/address_v4.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_ADDRESS_V4_HPP
-#define BOOST_ASIO_IP_ADDRESS_V4_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/detail/array.hpp>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/string_view.hpp>
-#include <boost/asio/detail/winsock_init.hpp>
-#include <boost/system/error_code.hpp>
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# include <iosfwd>
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Implements IP version 4 style addresses.
-/**
- * The boost::asio::ip::address_v4 class provides the ability to use and
- * manipulate IP version 4 addresses.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class address_v4
-{
-public:
- /// The type used to represent an address as an unsigned integer.
- typedef uint_least32_t uint_type;
-
- /// The type used to represent an address as an array of bytes.
- /**
- * @note This type is defined in terms of the C++0x template @c std::array
- * when it is available. Otherwise, it uses @c boost:array.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef array<unsigned char, 4> bytes_type;
-#else
- typedef boost::asio::detail::array<unsigned char, 4> bytes_type;
-#endif
-
- /// Default constructor.
- address_v4()
- {
- addr_.s_addr = 0;
- }
-
- /// Construct an address from raw bytes.
- BOOST_ASIO_DECL explicit address_v4(const bytes_type& bytes);
-
- /// Construct an address from an unsigned integer in host byte order.
- BOOST_ASIO_DECL explicit address_v4(uint_type addr);
-
- /// Copy constructor.
- address_v4(const address_v4& other)
- : addr_(other.addr_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- address_v4(address_v4&& other)
- : addr_(other.addr_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another address.
- address_v4& operator=(const address_v4& other)
- {
- addr_ = other.addr_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another address.
- address_v4& operator=(address_v4&& other)
- {
- addr_ = other.addr_;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Get the address in bytes, in network byte order.
- BOOST_ASIO_DECL bytes_type to_bytes() const;
-
- /// Get the address as an unsigned integer in host byte order
- BOOST_ASIO_DECL uint_type to_uint() const;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// Get the address as an unsigned long in host byte order
- BOOST_ASIO_DECL unsigned long to_ulong() const;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the address as a string in dotted decimal format.
- BOOST_ASIO_DECL std::string to_string() const;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use other overload.) Get the address as a string in dotted
- /// decimal format.
- BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
-
- /// (Deprecated: Use make_address_v4().) Create an address from an IP address
- /// string in dotted decimal form.
- static address_v4 from_string(const char* str);
-
- /// (Deprecated: Use make_address_v4().) Create an address from an IP address
- /// string in dotted decimal form.
- static address_v4 from_string(
- const char* str, boost::system::error_code& ec);
-
- /// (Deprecated: Use make_address_v4().) Create an address from an IP address
- /// string in dotted decimal form.
- static address_v4 from_string(const std::string& str);
-
- /// (Deprecated: Use make_address_v4().) Create an address from an IP address
- /// string in dotted decimal form.
- static address_v4 from_string(
- const std::string& str, boost::system::error_code& ec);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Determine whether the address is a loopback address.
- BOOST_ASIO_DECL bool is_loopback() const;
-
- /// Determine whether the address is unspecified.
- BOOST_ASIO_DECL bool is_unspecified() const;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use network_v4 class.) Determine whether the address is a
- /// class A address.
- BOOST_ASIO_DECL bool is_class_a() const;
-
- /// (Deprecated: Use network_v4 class.) Determine whether the address is a
- /// class B address.
- BOOST_ASIO_DECL bool is_class_b() const;
-
- /// (Deprecated: Use network_v4 class.) Determine whether the address is a
- /// class C address.
- BOOST_ASIO_DECL bool is_class_c() const;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Determine whether the address is a multicast address.
- BOOST_ASIO_DECL bool is_multicast() const;
-
- /// Compare two addresses for equality.
- friend bool operator==(const address_v4& a1, const address_v4& a2)
- {
- return a1.addr_.s_addr == a2.addr_.s_addr;
- }
-
- /// Compare two addresses for inequality.
- friend bool operator!=(const address_v4& a1, const address_v4& a2)
- {
- return a1.addr_.s_addr != a2.addr_.s_addr;
- }
-
- /// Compare addresses for ordering.
- friend bool operator<(const address_v4& a1, const address_v4& a2)
- {
- return a1.to_uint() < a2.to_uint();
- }
-
- /// Compare addresses for ordering.
- friend bool operator>(const address_v4& a1, const address_v4& a2)
- {
- return a1.to_uint() > a2.to_uint();
- }
-
- /// Compare addresses for ordering.
- friend bool operator<=(const address_v4& a1, const address_v4& a2)
- {
- return a1.to_uint() <= a2.to_uint();
- }
-
- /// Compare addresses for ordering.
- friend bool operator>=(const address_v4& a1, const address_v4& a2)
- {
- return a1.to_uint() >= a2.to_uint();
- }
-
- /// Obtain an address object that represents any address.
- static address_v4 any()
- {
- return address_v4();
- }
-
- /// Obtain an address object that represents the loopback address.
- static address_v4 loopback()
- {
- return address_v4(0x7F000001);
- }
-
- /// Obtain an address object that represents the broadcast address.
- static address_v4 broadcast()
- {
- return address_v4(0xFFFFFFFF);
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use network_v4 class.) Obtain an address object that
- /// represents the broadcast address that corresponds to the specified
- /// address and netmask.
- BOOST_ASIO_DECL static address_v4 broadcast(
- const address_v4& addr, const address_v4& mask);
-
- /// (Deprecated: Use network_v4 class.) Obtain the netmask that corresponds
- /// to the address, based on its address class.
- BOOST_ASIO_DECL static address_v4 netmask(const address_v4& addr);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-private:
- // The underlying IPv4 address.
- boost::asio::detail::in4_addr_type addr_;
-};
-
-/// Create an IPv4 address from raw bytes in network order.
-/**
- * @relates address_v4
- */
-inline address_v4 make_address_v4(const address_v4::bytes_type& bytes)
-{
- return address_v4(bytes);
-}
-
-/// Create an IPv4 address from an unsigned integer in host byte order.
-/**
- * @relates address_v4
- */
-inline address_v4 make_address_v4(address_v4::uint_type addr)
-{
- return address_v4(addr);
-}
-
-/// Create an IPv4 address from an IP address string in dotted decimal form.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(const char* str);
-
-/// Create an IPv4 address from an IP address string in dotted decimal form.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(
- const char* str, boost::system::error_code& ec);
-
-/// Create an IPv4 address from an IP address string in dotted decimal form.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(const std::string& str);
-
-/// Create an IPv4 address from an IP address string in dotted decimal form.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(
- const std::string& str, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Create an IPv4 address from an IP address string in dotted decimal form.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(string_view str);
-
-/// Create an IPv4 address from an IP address string in dotted decimal form.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(
- string_view str, boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
- // || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Output an address as a string.
-/**
- * Used to output a human-readable string for a specified address.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param addr The address to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::ip::address_v4
- */
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const address_v4& addr);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ip/impl/address_v4.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/impl/address_v4.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_ADDRESS_V4_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp
deleted file mode 100644
index 3574cda1e91..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// ip/address_v4_iterator.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_ADDRESS_V4_ITERATOR_HPP
-#define BOOST_ASIO_IP_ADDRESS_V4_ITERATOR_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/ip/address_v4.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename> class basic_address_iterator;
-
-/// An input iterator that can be used for traversing IPv4 addresses.
-/**
- * In addition to satisfying the input iterator requirements, this iterator
- * also supports decrement.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <> class basic_address_iterator<address_v4>
-{
-public:
- /// The type of the elements pointed to by the iterator.
- typedef address_v4 value_type;
-
- /// Distance between two iterators.
- typedef std::ptrdiff_t difference_type;
-
- /// The type of a pointer to an element pointed to by the iterator.
- typedef const address_v4* pointer;
-
- /// The type of a reference to an element pointed to by the iterator.
- typedef const address_v4& reference;
-
- /// Denotes that the iterator satisfies the input iterator requirements.
- typedef std::input_iterator_tag iterator_category;
-
- /// Construct an iterator that points to the specified address.
- basic_address_iterator(const address_v4& addr) BOOST_ASIO_NOEXCEPT
- : address_(addr)
- {
- }
-
- /// Copy constructor.
- basic_address_iterator(
- const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
- : address_(other.address_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- basic_address_iterator(basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
- : address_(BOOST_ASIO_MOVE_CAST(address_v4)(other.address_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assignment operator.
- basic_address_iterator& operator=(
- const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = other.address_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move assignment operator.
- basic_address_iterator& operator=(
- basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = BOOST_ASIO_MOVE_CAST(address_v4)(other.address_);
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Dereference the iterator.
- const address_v4& operator*() const BOOST_ASIO_NOEXCEPT
- {
- return address_;
- }
-
- /// Dereference the iterator.
- const address_v4* operator->() const BOOST_ASIO_NOEXCEPT
- {
- return &address_;
- }
-
- /// Pre-increment operator.
- basic_address_iterator& operator++() BOOST_ASIO_NOEXCEPT
- {
- address_ = address_v4((address_.to_uint() + 1) & 0xFFFFFFFF);
- return *this;
- }
-
- /// Post-increment operator.
- basic_address_iterator operator++(int) BOOST_ASIO_NOEXCEPT
- {
- basic_address_iterator tmp(*this);
- ++*this;
- return tmp;
- }
-
- /// Pre-decrement operator.
- basic_address_iterator& operator--() BOOST_ASIO_NOEXCEPT
- {
- address_ = address_v4((address_.to_uint() - 1) & 0xFFFFFFFF);
- return *this;
- }
-
- /// Post-decrement operator.
- basic_address_iterator operator--(int)
- {
- basic_address_iterator tmp(*this);
- --*this;
- return tmp;
- }
-
- /// Compare two addresses for equality.
- friend bool operator==(const basic_address_iterator& a,
- const basic_address_iterator& b)
- {
- return a.address_ == b.address_;
- }
-
- /// Compare two addresses for inequality.
- friend bool operator!=(const basic_address_iterator& a,
- const basic_address_iterator& b)
- {
- return a.address_ != b.address_;
- }
-
-private:
- address_v4 address_;
-};
-
-/// An input iterator that can be used for traversing IPv4 addresses.
-typedef basic_address_iterator<address_v4> address_v4_iterator;
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_ADDRESS_V4_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp
deleted file mode 100644
index 261ead22ac9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// ip/address_v4_range.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_ADDRESS_V4_RANGE_HPP
-#define BOOST_ASIO_IP_ADDRESS_V4_RANGE_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/ip/address_v4_iterator.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename> class basic_address_range;
-
-/// Represents a range of IPv4 addresses.
-/**
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <> class basic_address_range<address_v4>
-{
-public:
- /// The type of an iterator that points into the range.
- typedef basic_address_iterator<address_v4> iterator;
-
- /// Construct an empty range.
- basic_address_range() BOOST_ASIO_NOEXCEPT
- : begin_(address_v4()),
- end_(address_v4())
- {
- }
-
- /// Construct an range that represents the given range of addresses.
- explicit basic_address_range(const iterator& first,
- const iterator& last) BOOST_ASIO_NOEXCEPT
- : begin_(first),
- end_(last)
- {
- }
-
- /// Copy constructor.
- basic_address_range(const basic_address_range& other) BOOST_ASIO_NOEXCEPT
- : begin_(other.begin_),
- end_(other.end_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- basic_address_range(basic_address_range&& other) BOOST_ASIO_NOEXCEPT
- : begin_(BOOST_ASIO_MOVE_CAST(iterator)(other.begin_)),
- end_(BOOST_ASIO_MOVE_CAST(iterator)(other.end_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assignment operator.
- basic_address_range& operator=(
- const basic_address_range& other) BOOST_ASIO_NOEXCEPT
- {
- begin_ = other.begin_;
- end_ = other.end_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move assignment operator.
- basic_address_range& operator=(
- basic_address_range&& other) BOOST_ASIO_NOEXCEPT
- {
- begin_ = BOOST_ASIO_MOVE_CAST(iterator)(other.begin_);
- end_ = BOOST_ASIO_MOVE_CAST(iterator)(other.end_);
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Obtain an iterator that points to the start of the range.
- iterator begin() const BOOST_ASIO_NOEXCEPT
- {
- return begin_;
- }
-
- /// Obtain an iterator that points to the end of the range.
- iterator end() const BOOST_ASIO_NOEXCEPT
- {
- return end_;
- }
-
- /// Determine whether the range is empty.
- bool empty() const BOOST_ASIO_NOEXCEPT
- {
- return size() == 0;
- }
-
- /// Return the size of the range.
- std::size_t size() const BOOST_ASIO_NOEXCEPT
- {
- return end_->to_uint() - begin_->to_uint();
- }
-
- /// Find an address in the range.
- iterator find(const address_v4& addr) const BOOST_ASIO_NOEXCEPT
- {
- return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
- }
-
-private:
- iterator begin_;
- iterator end_;
-};
-
-/// Represents a range of IPv4 addresses.
-typedef basic_address_range<address_v4> address_v4_range;
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_ADDRESS_V4_RANGE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp
deleted file mode 100644
index 8c4ac0a7322..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp
+++ /dev/null
@@ -1,338 +0,0 @@
-//
-// ip/address_v6.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_ADDRESS_V6_HPP
-#define BOOST_ASIO_IP_ADDRESS_V6_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/detail/array.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/string_view.hpp>
-#include <boost/asio/detail/winsock_init.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/ip/address_v4.hpp>
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# include <iosfwd>
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename> class basic_address_iterator;
-
-/// Implements IP version 6 style addresses.
-/**
- * The boost::asio::ip::address_v6 class provides the ability to use and
- * manipulate IP version 6 addresses.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class address_v6
-{
-public:
- /// The type used to represent an address as an array of bytes.
- /**
- * @note This type is defined in terms of the C++0x template @c std::array
- * when it is available. Otherwise, it uses @c boost:array.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef array<unsigned char, 16> bytes_type;
-#else
- typedef boost::asio::detail::array<unsigned char, 16> bytes_type;
-#endif
-
- /// Default constructor.
- BOOST_ASIO_DECL address_v6();
-
- /// Construct an address from raw bytes and scope ID.
- BOOST_ASIO_DECL explicit address_v6(const bytes_type& bytes,
- unsigned long scope_id = 0);
-
- /// Copy constructor.
- BOOST_ASIO_DECL address_v6(const address_v6& other);
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- BOOST_ASIO_DECL address_v6(address_v6&& other);
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another address.
- BOOST_ASIO_DECL address_v6& operator=(const address_v6& other);
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another address.
- BOOST_ASIO_DECL address_v6& operator=(address_v6&& other);
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// The scope ID of the address.
- /**
- * Returns the scope ID associated with the IPv6 address.
- */
- unsigned long scope_id() const
- {
- return scope_id_;
- }
-
- /// The scope ID of the address.
- /**
- * Modifies the scope ID associated with the IPv6 address.
- */
- void scope_id(unsigned long id)
- {
- scope_id_ = id;
- }
-
- /// Get the address in bytes, in network byte order.
- BOOST_ASIO_DECL bytes_type to_bytes() const;
-
- /// Get the address as a string.
- BOOST_ASIO_DECL std::string to_string() const;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use other overload.) Get the address as a string.
- BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
-
- /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
- /// address string.
- static address_v6 from_string(const char* str);
-
- /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
- /// address string.
- static address_v6 from_string(
- const char* str, boost::system::error_code& ec);
-
- /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
- /// address string.
- static address_v6 from_string(const std::string& str);
-
- /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
- /// address string.
- static address_v6 from_string(
- const std::string& str, boost::system::error_code& ec);
-
- /// (Deprecated: Use make_address_v4().) Converts an IPv4-mapped or
- /// IPv4-compatible address to an IPv4 address.
- BOOST_ASIO_DECL address_v4 to_v4() const;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Determine whether the address is a loopback address.
- BOOST_ASIO_DECL bool is_loopback() const;
-
- /// Determine whether the address is unspecified.
- BOOST_ASIO_DECL bool is_unspecified() const;
-
- /// Determine whether the address is link local.
- BOOST_ASIO_DECL bool is_link_local() const;
-
- /// Determine whether the address is site local.
- BOOST_ASIO_DECL bool is_site_local() const;
-
- /// Determine whether the address is a mapped IPv4 address.
- BOOST_ASIO_DECL bool is_v4_mapped() const;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: No replacement.) Determine whether the address is an
- /// IPv4-compatible address.
- BOOST_ASIO_DECL bool is_v4_compatible() const;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Determine whether the address is a multicast address.
- BOOST_ASIO_DECL bool is_multicast() const;
-
- /// Determine whether the address is a global multicast address.
- BOOST_ASIO_DECL bool is_multicast_global() const;
-
- /// Determine whether the address is a link-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_link_local() const;
-
- /// Determine whether the address is a node-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_node_local() const;
-
- /// Determine whether the address is a org-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_org_local() const;
-
- /// Determine whether the address is a site-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_site_local() const;
-
- /// Compare two addresses for equality.
- BOOST_ASIO_DECL friend bool operator==(
- const address_v6& a1, const address_v6& a2);
-
- /// Compare two addresses for inequality.
- friend bool operator!=(const address_v6& a1, const address_v6& a2)
- {
- return !(a1 == a2);
- }
-
- /// Compare addresses for ordering.
- BOOST_ASIO_DECL friend bool operator<(
- const address_v6& a1, const address_v6& a2);
-
- /// Compare addresses for ordering.
- friend bool operator>(const address_v6& a1, const address_v6& a2)
- {
- return a2 < a1;
- }
-
- /// Compare addresses for ordering.
- friend bool operator<=(const address_v6& a1, const address_v6& a2)
- {
- return !(a2 < a1);
- }
-
- /// Compare addresses for ordering.
- friend bool operator>=(const address_v6& a1, const address_v6& a2)
- {
- return !(a1 < a2);
- }
-
- /// Obtain an address object that represents any address.
- static address_v6 any()
- {
- return address_v6();
- }
-
- /// Obtain an address object that represents the loopback address.
- BOOST_ASIO_DECL static address_v6 loopback();
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address.
- BOOST_ASIO_DECL static address_v6 v4_mapped(const address_v4& addr);
-
- /// (Deprecated: No replacement.) Create an IPv4-compatible IPv6 address.
- BOOST_ASIO_DECL static address_v6 v4_compatible(const address_v4& addr);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-private:
- friend class basic_address_iterator<address_v6>;
-
- // The underlying IPv6 address.
- boost::asio::detail::in6_addr_type addr_;
-
- // The scope ID associated with the address.
- unsigned long scope_id_;
-};
-
-/// Create an IPv6 address from raw bytes and scope ID.
-/**
- * @relates address_v6
- */
-inline address_v6 make_address_v6(const address_v6::bytes_type& bytes,
- unsigned long scope_id = 0)
-{
- return address_v6(bytes, scope_id);
-}
-
-/// Create an IPv6 address from an IP address string.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(const char* str);
-
-/// Create an IPv6 address from an IP address string.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(
- const char* str, boost::system::error_code& ec);
-
-/// Createan IPv6 address from an IP address string.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(const std::string& str);
-
-/// Create an IPv6 address from an IP address string.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(
- const std::string& str, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Create an IPv6 address from an IP address string.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(string_view str);
-
-/// Create an IPv6 address from an IP address string.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(
- string_view str, boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
- // || defined(GENERATING_DOCUMENTATION)
-
-/// Tag type used for distinguishing overloads that deal in IPv4-mapped IPv6
-/// addresses.
-enum v4_mapped_t { v4_mapped };
-
-/// Create an IPv4 address from a IPv4-mapped IPv6 address.
-/**
- * @relates address_v4
- */
-BOOST_ASIO_DECL address_v4 make_address_v4(
- v4_mapped_t, const address_v6& v6_addr);
-
-/// Create an IPv4-mapped IPv6 address from an IPv4 address.
-/**
- * @relates address_v6
- */
-BOOST_ASIO_DECL address_v6 make_address_v6(
- v4_mapped_t, const address_v4& v4_addr);
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Output an address as a string.
-/**
- * Used to output a human-readable string for a specified address.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param addr The address to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::ip::address_v6
- */
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const address_v6& addr);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ip/impl/address_v6.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/impl/address_v6.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_ADDRESS_V6_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp
deleted file mode 100644
index 887b09f79af..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp
+++ /dev/null
@@ -1,185 +0,0 @@
-//
-// ip/address_v6_iterator.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Oliver Kowalke (oliver dot kowalke at gmail 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_ADDRESS_V6_ITERATOR_HPP
-#define BOOST_ASIO_IP_ADDRESS_V6_ITERATOR_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/ip/address_v6.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename> class basic_address_iterator;
-
-/// An input iterator that can be used for traversing IPv6 addresses.
-/**
- * In addition to satisfying the input iterator requirements, this iterator
- * also supports decrement.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <> class basic_address_iterator<address_v6>
-{
-public:
- /// The type of the elements pointed to by the iterator.
- typedef address_v6 value_type;
-
- /// Distance between two iterators.
- typedef std::ptrdiff_t difference_type;
-
- /// The type of a pointer to an element pointed to by the iterator.
- typedef const address_v6* pointer;
-
- /// The type of a reference to an element pointed to by the iterator.
- typedef const address_v6& reference;
-
- /// Denotes that the iterator satisfies the input iterator requirements.
- typedef std::input_iterator_tag iterator_category;
-
- /// Construct an iterator that points to the specified address.
- basic_address_iterator(const address_v6& addr) BOOST_ASIO_NOEXCEPT
- : address_(addr)
- {
- }
-
- /// Copy constructor.
- basic_address_iterator(
- const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
- : address_(other.address_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- basic_address_iterator(basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
- : address_(BOOST_ASIO_MOVE_CAST(address_v6)(other.address_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assignment operator.
- basic_address_iterator& operator=(
- const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = other.address_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move assignment operator.
- basic_address_iterator& operator=(
- basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = BOOST_ASIO_MOVE_CAST(address_v6)(other.address_);
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Dereference the iterator.
- const address_v6& operator*() const BOOST_ASIO_NOEXCEPT
- {
- return address_;
- }
-
- /// Dereference the iterator.
- const address_v6* operator->() const BOOST_ASIO_NOEXCEPT
- {
- return &address_;
- }
-
- /// Pre-increment operator.
- basic_address_iterator& operator++() BOOST_ASIO_NOEXCEPT
- {
- for (int i = 15; i >= 0; --i)
- {
- if (address_.addr_.s6_addr[i] < 0xFF)
- {
- ++address_.addr_.s6_addr[i];
- break;
- }
-
- address_.addr_.s6_addr[i] = 0;
- }
-
- return *this;
- }
-
- /// Post-increment operator.
- basic_address_iterator operator++(int) BOOST_ASIO_NOEXCEPT
- {
- basic_address_iterator tmp(*this);
- ++*this;
- return tmp;
- }
-
- /// Pre-decrement operator.
- basic_address_iterator& operator--() BOOST_ASIO_NOEXCEPT
- {
- for (int i = 15; i >= 0; --i)
- {
- if (address_.addr_.s6_addr[i] > 0)
- {
- --address_.addr_.s6_addr[i];
- break;
- }
-
- address_.addr_.s6_addr[i] = 0xFF;
- }
-
- return *this;
- }
-
- /// Post-decrement operator.
- basic_address_iterator operator--(int)
- {
- basic_address_iterator tmp(*this);
- --*this;
- return tmp;
- }
-
- /// Compare two addresses for equality.
- friend bool operator==(const basic_address_iterator& a,
- const basic_address_iterator& b)
- {
- return a.address_ == b.address_;
- }
-
- /// Compare two addresses for inequality.
- friend bool operator!=(const basic_address_iterator& a,
- const basic_address_iterator& b)
- {
- return a.address_ != b.address_;
- }
-
-private:
- address_v6 address_;
-};
-
-/// An input iterator that can be used for traversing IPv6 addresses.
-typedef basic_address_iterator<address_v6> address_v6_iterator;
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_ADDRESS_V6_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp
deleted file mode 100644
index 0a095cd80b4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// ip/address_v6_range.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Oliver Kowalke (oliver dot kowalke at gmail 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_ADDRESS_V6_RANGE_HPP
-#define BOOST_ASIO_IP_ADDRESS_V6_RANGE_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/ip/address_v6_iterator.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename> class basic_address_range;
-
-/// Represents a range of IPv6 addresses.
-/**
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <> class basic_address_range<address_v6>
-{
-public:
- /// The type of an iterator that points into the range.
- typedef basic_address_iterator<address_v6> iterator;
-
- /// Construct an empty range.
- basic_address_range() BOOST_ASIO_NOEXCEPT
- : begin_(address_v6()),
- end_(address_v6())
- {
- }
-
- /// Construct an range that represents the given range of addresses.
- explicit basic_address_range(const iterator& first,
- const iterator& last) BOOST_ASIO_NOEXCEPT
- : begin_(first),
- end_(last)
- {
- }
-
- /// Copy constructor.
- basic_address_range(const basic_address_range& other) BOOST_ASIO_NOEXCEPT
- : begin_(other.begin_),
- end_(other.end_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- basic_address_range(basic_address_range&& other) BOOST_ASIO_NOEXCEPT
- : begin_(BOOST_ASIO_MOVE_CAST(iterator)(other.begin_)),
- end_(BOOST_ASIO_MOVE_CAST(iterator)(other.end_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assignment operator.
- basic_address_range& operator=(
- const basic_address_range& other) BOOST_ASIO_NOEXCEPT
- {
- begin_ = other.begin_;
- end_ = other.end_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move assignment operator.
- basic_address_range& operator=(
- basic_address_range&& other) BOOST_ASIO_NOEXCEPT
- {
- begin_ = BOOST_ASIO_MOVE_CAST(iterator)(other.begin_);
- end_ = BOOST_ASIO_MOVE_CAST(iterator)(other.end_);
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Obtain an iterator that points to the start of the range.
- iterator begin() const BOOST_ASIO_NOEXCEPT
- {
- return begin_;
- }
-
- /// Obtain an iterator that points to the end of the range.
- iterator end() const BOOST_ASIO_NOEXCEPT
- {
- return end_;
- }
-
- /// Determine whether the range is empty.
- bool empty() const BOOST_ASIO_NOEXCEPT
- {
- return begin_ == end_;
- }
-
- /// Find an address in the range.
- iterator find(const address_v6& addr) const BOOST_ASIO_NOEXCEPT
- {
- return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
- }
-
-private:
- iterator begin_;
- iterator end_;
-};
-
-/// Represents a range of IPv6 addresses.
-typedef basic_address_range<address_v6> address_v6_range;
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index fce9f053b1f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/bad_address_cast.hpp
+++ /dev/null
@@ -1,55 +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 :
-#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.69.0/boost/asio/ip/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_endpoint.hpp
deleted file mode 100644
index bad4114f0be..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/basic_endpoint.hpp
+++ /dev/null
@@ -1,265 +0,0 @@
-//
-// ip/basic_endpoint.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_ENDPOINT_HPP
-#define BOOST_ASIO_IP_BASIC_ENDPOINT_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/ip/address.hpp>
-#include <boost/asio/ip/detail/endpoint.hpp>
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# include <iosfwd>
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Describes an endpoint for a version-independent IP socket.
-/**
- * The boost::asio::ip::basic_endpoint class template describes an endpoint that
- * may be associated with a particular socket.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * Endpoint.
- */
-template <typename InternetProtocol>
-class basic_endpoint
-{
-public:
- /// The protocol type associated with the endpoint.
- typedef InternetProtocol protocol_type;
-
- /// The type of the endpoint structure. This type is dependent on the
- /// underlying implementation of the socket layer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined data_type;
-#else
- typedef boost::asio::detail::socket_addr_type data_type;
-#endif
-
- /// Default constructor.
- basic_endpoint()
- : impl_()
- {
- }
-
- /// Construct an endpoint using a port number, specified in the host's byte
- /// order. The IP address will be the any address (i.e. INADDR_ANY or
- /// in6addr_any). This constructor would typically be used for accepting new
- /// connections.
- /**
- * @par Examples
- * To initialise an IPv4 TCP endpoint for port 1234, use:
- * @code
- * boost::asio::ip::tcp::endpoint ep(boost::asio::ip::tcp::v4(), 1234);
- * @endcode
- *
- * To specify an IPv6 UDP endpoint for port 9876, use:
- * @code
- * boost::asio::ip::udp::endpoint ep(boost::asio::ip::udp::v6(), 9876);
- * @endcode
- */
- basic_endpoint(const InternetProtocol& internet_protocol,
- unsigned short port_num)
- : impl_(internet_protocol.family(), port_num)
- {
- }
-
- /// Construct an endpoint using a port number and an IP address. This
- /// constructor may be used for accepting connections on a specific interface
- /// or for making a connection to a remote endpoint.
- basic_endpoint(const boost::asio::ip::address& addr, unsigned short port_num)
- : impl_(addr, port_num)
- {
- }
-
- /// Copy constructor.
- basic_endpoint(const basic_endpoint& other)
- : impl_(other.impl_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- basic_endpoint(basic_endpoint&& other)
- : impl_(other.impl_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other)
- {
- impl_ = other.impl_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other)
- {
- impl_ = other.impl_;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// The protocol associated with the endpoint.
- protocol_type protocol() const
- {
- if (impl_.is_v4())
- return InternetProtocol::v4();
- return InternetProtocol::v6();
- }
-
- /// Get the underlying endpoint in the native type.
- data_type* data()
- {
- return impl_.data();
- }
-
- /// Get the underlying endpoint in the native type.
- const data_type* data() const
- {
- return impl_.data();
- }
-
- /// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
- {
- return impl_.size();
- }
-
- /// Set the underlying size of the endpoint in the native type.
- void resize(std::size_t new_size)
- {
- impl_.resize(new_size);
- }
-
- /// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
- {
- return impl_.capacity();
- }
-
- /// Get the port associated with the endpoint. The port number is always in
- /// the host's byte order.
- unsigned short port() const
- {
- return impl_.port();
- }
-
- /// Set the port associated with the endpoint. The port number is always in
- /// the host's byte order.
- void port(unsigned short port_num)
- {
- impl_.port(port_num);
- }
-
- /// Get the IP address associated with the endpoint.
- boost::asio::ip::address address() const
- {
- return impl_.address();
- }
-
- /// Set the IP address associated with the endpoint.
- void address(const boost::asio::ip::address& addr)
- {
- impl_.address(addr);
- }
-
- /// Compare two endpoints for equality.
- friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
- {
- return e1.impl_ == e2.impl_;
- }
-
- /// Compare two endpoints for inequality.
- friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
- {
- return !(e1 == e2);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
- {
- return e1.impl_ < e2.impl_;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
- {
- return e2.impl_ < e1.impl_;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
- {
- return !(e2 < e1);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
- {
- return !(e1 < e2);
- }
-
-private:
- // The underlying IP endpoint.
- boost::asio::ip::detail::endpoint impl_;
-};
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Output an endpoint as a string.
-/**
- * Used to output a human-readable string for a specified endpoint.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param endpoint The endpoint to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::ip::basic_endpoint
- */
-template <typename Elem, typename Traits, typename InternetProtocol>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os,
- const basic_endpoint<InternetProtocol>& endpoint);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ip/impl/basic_endpoint.hpp>
-
-#endif // 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
deleted file mode 100644
index 4979d104cf8..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver.hpp
+++ /dev/null
@@ -1,1022 +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: 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.69.0/boost/asio/ip/basic_resolver_entry.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_entry.hpp
deleted file mode 100644
index efaf976577b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_entry.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//
-// ip/basic_resolver_entry.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_ENTRY_HPP
-#define BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_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/detail/string_view.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// An entry produced by a resolver.
-/**
- * The boost::asio::ip::basic_resolver_entry class template describes an entry
- * as returned by a resolver.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename InternetProtocol>
-class basic_resolver_entry
-{
-public:
- /// The protocol type associated with the endpoint entry.
- typedef InternetProtocol protocol_type;
-
- /// The endpoint type associated with the endpoint entry.
- typedef typename InternetProtocol::endpoint endpoint_type;
-
- /// Default constructor.
- basic_resolver_entry()
- {
- }
-
- /// Construct with specified endpoint, host name and service name.
- basic_resolver_entry(const endpoint_type& ep,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service)
- : endpoint_(ep),
- host_name_(static_cast<std::string>(host)),
- service_name_(static_cast<std::string>(service))
- {
- }
-
- /// Get the endpoint associated with the entry.
- endpoint_type endpoint() const
- {
- return endpoint_;
- }
-
- /// Convert to the endpoint associated with the entry.
- operator endpoint_type() const
- {
- return endpoint_;
- }
-
- /// Get the host name associated with the entry.
- std::string host_name() const
- {
- return host_name_;
- }
-
- /// Get the host name associated with the entry.
- template <class Allocator>
- std::basic_string<char, std::char_traits<char>, Allocator> host_name(
- const Allocator& alloc = Allocator()) const
- {
- return std::basic_string<char, std::char_traits<char>, Allocator>(
- host_name_.c_str(), alloc);
- }
-
- /// Get the service name associated with the entry.
- std::string service_name() const
- {
- return service_name_;
- }
-
- /// Get the service name associated with the entry.
- template <class Allocator>
- std::basic_string<char, std::char_traits<char>, Allocator> service_name(
- const Allocator& alloc = Allocator()) const
- {
- return std::basic_string<char, std::char_traits<char>, Allocator>(
- service_name_.c_str(), alloc);
- }
-
-private:
- endpoint_type endpoint_;
- std::string host_name_;
- std::string service_name_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp
deleted file mode 100644
index dd93b84149a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp
+++ /dev/null
@@ -1,194 +0,0 @@
-//
-// ip/basic_resolver_iterator.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_ITERATOR_HPP
-#define BOOST_ASIO_IP_BASIC_RESOLVER_ITERATOR_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 <iterator>
-#include <string>
-#include <vector>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/ip/basic_resolver_entry.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 {
-
-/// An iterator over the entries produced by a resolver.
-/**
- * The boost::asio::ip::basic_resolver_iterator class template is used to define
- * iterators over the results returned by a resolver.
- *
- * The iterator's value_type, obtained when the iterator is dereferenced, is:
- * @code const basic_resolver_entry<InternetProtocol> @endcode
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename InternetProtocol>
-class basic_resolver_iterator
-{
-public:
- /// The type used for the distance between two iterators.
- typedef std::ptrdiff_t difference_type;
-
- /// The type of the value pointed to by the iterator.
- typedef basic_resolver_entry<InternetProtocol> value_type;
-
- /// The type of the result of applying operator->() to the iterator.
- typedef const basic_resolver_entry<InternetProtocol>* pointer;
-
- /// The type of the result of applying operator*() to the iterator.
- typedef const basic_resolver_entry<InternetProtocol>& reference;
-
- /// The iterator category.
- typedef std::forward_iterator_tag iterator_category;
-
- /// Default constructor creates an end iterator.
- basic_resolver_iterator()
- : index_(0)
- {
- }
-
- /// Copy constructor.
- basic_resolver_iterator(const basic_resolver_iterator& other)
- : values_(other.values_),
- index_(other.index_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- basic_resolver_iterator(basic_resolver_iterator&& other)
- : values_(BOOST_ASIO_MOVE_CAST(values_ptr_type)(other.values_)),
- index_(other.index_)
- {
- other.index_ = 0;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Assignment operator.
- basic_resolver_iterator& operator=(const basic_resolver_iterator& other)
- {
- values_ = other.values_;
- index_ = other.index_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-assignment operator.
- basic_resolver_iterator& operator=(basic_resolver_iterator&& other)
- {
- if (this != &other)
- {
- values_ = BOOST_ASIO_MOVE_CAST(values_ptr_type)(other.values_);
- index_ = other.index_;
- other.index_ = 0;
- }
-
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Dereference an iterator.
- const basic_resolver_entry<InternetProtocol>& operator*() const
- {
- return dereference();
- }
-
- /// Dereference an iterator.
- const basic_resolver_entry<InternetProtocol>* operator->() const
- {
- return &dereference();
- }
-
- /// Increment operator (prefix).
- basic_resolver_iterator& operator++()
- {
- increment();
- return *this;
- }
-
- /// Increment operator (postfix).
- basic_resolver_iterator operator++(int)
- {
- basic_resolver_iterator tmp(*this);
- ++*this;
- return tmp;
- }
-
- /// Test two iterators for equality.
- friend bool operator==(const basic_resolver_iterator& a,
- const basic_resolver_iterator& b)
- {
- return a.equal(b);
- }
-
- /// Test two iterators for inequality.
- friend bool operator!=(const basic_resolver_iterator& a,
- const basic_resolver_iterator& b)
- {
- return !a.equal(b);
- }
-
-protected:
- void increment()
- {
- if (++index_ == values_->size())
- {
- // Reset state to match a default constructed end iterator.
- values_.reset();
- index_ = 0;
- }
- }
-
- bool equal(const basic_resolver_iterator& other) const
- {
- if (!values_ && !other.values_)
- return true;
- if (values_ != other.values_)
- return false;
- return index_ == other.index_;
- }
-
- const basic_resolver_entry<InternetProtocol>& dereference() const
- {
- return (*values_)[index_];
- }
-
- typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
- typedef boost::asio::detail::shared_ptr<values_type> values_ptr_type;
- values_ptr_type values_;
- std::size_t index_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_BASIC_RESOLVER_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp
deleted file mode 100644
index cbbae25ae70..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp
+++ /dev/null
@@ -1,246 +0,0 @@
-//
-// ip/basic_resolver_query.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_QUERY_HPP
-#define BOOST_ASIO_IP_BASIC_RESOLVER_QUERY_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/detail/socket_ops.hpp>
-#include <boost/asio/ip/resolver_query_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// An query to be passed to a resolver.
-/**
- * The boost::asio::ip::basic_resolver_query class template describes a query
- * that can be passed to a resolver.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename InternetProtocol>
-class basic_resolver_query
- : public resolver_query_base
-{
-public:
- /// The protocol type associated with the endpoint query.
- typedef InternetProtocol protocol_type;
-
- /// Construct with specified service name for any protocol.
- /**
- * This constructor is typically used to perform name resolution for local
- * service binding.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for local service
- * binding.
- *
- * @note 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.
- */
- basic_resolver_query(const std::string& service,
- resolver_query_base::flags resolve_flags = passive | address_configured)
- : hints_(),
- host_name_(),
- service_name_(service)
- {
- typename InternetProtocol::endpoint endpoint;
- hints_.ai_flags = static_cast<int>(resolve_flags);
- hints_.ai_family = PF_UNSPEC;
- hints_.ai_socktype = endpoint.protocol().type();
- hints_.ai_protocol = endpoint.protocol().protocol();
- hints_.ai_addrlen = 0;
- hints_.ai_canonname = 0;
- hints_.ai_addr = 0;
- hints_.ai_next = 0;
- }
-
- /// Construct with specified service name for a given protocol.
- /**
- * This constructor is typically used to perform name resolution for local
- * service binding with a specific protocol version.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for local service
- * binding.
- *
- * @note 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.
- */
- basic_resolver_query(const protocol_type& protocol,
- const std::string& service,
- resolver_query_base::flags resolve_flags = passive | address_configured)
- : hints_(),
- host_name_(),
- service_name_(service)
- {
- hints_.ai_flags = static_cast<int>(resolve_flags);
- hints_.ai_family = protocol.family();
- hints_.ai_socktype = protocol.type();
- hints_.ai_protocol = protocol.protocol();
- hints_.ai_addrlen = 0;
- hints_.ai_canonname = 0;
- hints_.ai_addr = 0;
- hints_.ai_next = 0;
- }
-
- /// Construct with specified host name and service name for any protocol.
- /**
- * This constructor is typically used to perform name resolution for
- * communication with remote hosts.
- *
- * @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.
- *
- * @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.
- */
- basic_resolver_query(const std::string& host, const std::string& service,
- resolver_query_base::flags resolve_flags = address_configured)
- : hints_(),
- host_name_(host),
- service_name_(service)
- {
- typename InternetProtocol::endpoint endpoint;
- hints_.ai_flags = static_cast<int>(resolve_flags);
- hints_.ai_family = BOOST_ASIO_OS_DEF(AF_UNSPEC);
- hints_.ai_socktype = endpoint.protocol().type();
- hints_.ai_protocol = endpoint.protocol().protocol();
- hints_.ai_addrlen = 0;
- hints_.ai_canonname = 0;
- hints_.ai_addr = 0;
- hints_.ai_next = 0;
- }
-
- /// Construct with specified host name and service name for a given protocol.
- /**
- * This constructor is typically used to perform name resolution for
- * communication with remote hosts.
- *
- * @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.
- *
- * @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.
- */
- basic_resolver_query(const protocol_type& protocol,
- const std::string& host, const std::string& service,
- resolver_query_base::flags resolve_flags = address_configured)
- : hints_(),
- host_name_(host),
- service_name_(service)
- {
- hints_.ai_flags = static_cast<int>(resolve_flags);
- hints_.ai_family = protocol.family();
- hints_.ai_socktype = protocol.type();
- hints_.ai_protocol = protocol.protocol();
- hints_.ai_addrlen = 0;
- hints_.ai_canonname = 0;
- hints_.ai_addr = 0;
- hints_.ai_next = 0;
- }
-
- /// Get the hints associated with the query.
- const boost::asio::detail::addrinfo_type& hints() const
- {
- return hints_;
- }
-
- /// Get the host name associated with the query.
- std::string host_name() const
- {
- return host_name_;
- }
-
- /// Get the service name associated with the query.
- std::string service_name() const
- {
- return service_name_;
- }
-
-private:
- boost::asio::detail::addrinfo_type hints_;
- std::string host_name_;
- std::string service_name_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index f553930cfc5..00000000000
--- a/src/third_party/boost-1.69.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_ ? 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.69.0/boost/asio/ip/detail/endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/detail/endpoint.hpp
deleted file mode 100644
index a6f04abed93..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/detail/endpoint.hpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// ip/detail/endpoint.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_DETAIL_ENDPOINT_HPP
-#define BOOST_ASIO_IP_DETAIL_ENDPOINT_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/detail/socket_types.hpp>
-#include <boost/asio/detail/winsock_init.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/ip/address.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-namespace detail {
-
-// Helper class for implementating an IP endpoint.
-class endpoint
-{
-public:
- // Default constructor.
- BOOST_ASIO_DECL endpoint();
-
- // Construct an endpoint using a family and port number.
- BOOST_ASIO_DECL endpoint(int family, unsigned short port_num);
-
- // Construct an endpoint using an address and port number.
- BOOST_ASIO_DECL endpoint(const boost::asio::ip::address& addr,
- unsigned short port_num);
-
- // Copy constructor.
- endpoint(const endpoint& other)
- : data_(other.data_)
- {
- }
-
- // Assign from another endpoint.
- endpoint& operator=(const endpoint& other)
- {
- data_ = other.data_;
- return *this;
- }
-
- // Get the underlying endpoint in the native type.
- boost::asio::detail::socket_addr_type* data()
- {
- return &data_.base;
- }
-
- // Get the underlying endpoint in the native type.
- const boost::asio::detail::socket_addr_type* data() const
- {
- return &data_.base;
- }
-
- // Get the underlying size of the endpoint in the native type.
- std::size_t size() const
- {
- if (is_v4())
- return sizeof(boost::asio::detail::sockaddr_in4_type);
- else
- return sizeof(boost::asio::detail::sockaddr_in6_type);
- }
-
- // Set the underlying size of the endpoint in the native type.
- BOOST_ASIO_DECL void resize(std::size_t new_size);
-
- // Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
- {
- return sizeof(data_);
- }
-
- // Get the port associated with the endpoint.
- BOOST_ASIO_DECL unsigned short port() const;
-
- // Set the port associated with the endpoint.
- BOOST_ASIO_DECL void port(unsigned short port_num);
-
- // Get the IP address associated with the endpoint.
- BOOST_ASIO_DECL boost::asio::ip::address address() const;
-
- // Set the IP address associated with the endpoint.
- BOOST_ASIO_DECL void address(const boost::asio::ip::address& addr);
-
- // Compare two endpoints for equality.
- BOOST_ASIO_DECL friend bool operator==(
- const endpoint& e1, const endpoint& e2);
-
- // Compare endpoints for ordering.
- BOOST_ASIO_DECL friend bool operator<(
- const endpoint& e1, const endpoint& e2);
-
- // Determine whether the endpoint is IPv4.
- bool is_v4() const
- {
- return data_.base.sa_family == BOOST_ASIO_OS_DEF(AF_INET);
- }
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
- // Convert to a string.
- BOOST_ASIO_DECL std::string to_string() const;
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-private:
- // The underlying IP socket address.
- union data_union
- {
- boost::asio::detail::socket_addr_type base;
- boost::asio::detail::sockaddr_in4_type v4;
- boost::asio::detail::sockaddr_in6_type v6;
- } data_;
-};
-
-} // namespace detail
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/detail/impl/endpoint.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_DETAIL_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp
deleted file mode 100644
index 49f5af116f3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp
+++ /dev/null
@@ -1,201 +0,0 @@
-//
-// ip/detail/impl/endpoint.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_IP_DETAIL_IMPL_ENDPOINT_IPP
-#define BOOST_ASIO_IP_DETAIL_IMPL_ENDPOINT_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>
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# include <sstream>
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/ip/detail/endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-namespace detail {
-
-endpoint::endpoint()
- : data_()
-{
- data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
- data_.v4.sin_port = 0;
- data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY);
-}
-
-endpoint::endpoint(int family, unsigned short port_num)
- : data_()
-{
- using namespace std; // For memcpy.
- if (family == BOOST_ASIO_OS_DEF(AF_INET))
- {
- data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
- data_.v4.sin_port =
- boost::asio::detail::socket_ops::host_to_network_short(port_num);
- data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY);
- }
- else
- {
- data_.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
- data_.v6.sin6_port =
- boost::asio::detail::socket_ops::host_to_network_short(port_num);
- data_.v6.sin6_flowinfo = 0;
- data_.v6.sin6_addr.s6_addr[0] = 0; data_.v6.sin6_addr.s6_addr[1] = 0;
- data_.v6.sin6_addr.s6_addr[2] = 0; data_.v6.sin6_addr.s6_addr[3] = 0;
- data_.v6.sin6_addr.s6_addr[4] = 0; data_.v6.sin6_addr.s6_addr[5] = 0;
- data_.v6.sin6_addr.s6_addr[6] = 0; data_.v6.sin6_addr.s6_addr[7] = 0;
- data_.v6.sin6_addr.s6_addr[8] = 0; data_.v6.sin6_addr.s6_addr[9] = 0;
- data_.v6.sin6_addr.s6_addr[10] = 0; data_.v6.sin6_addr.s6_addr[11] = 0;
- data_.v6.sin6_addr.s6_addr[12] = 0; data_.v6.sin6_addr.s6_addr[13] = 0;
- data_.v6.sin6_addr.s6_addr[14] = 0; data_.v6.sin6_addr.s6_addr[15] = 0;
- data_.v6.sin6_scope_id = 0;
- }
-}
-
-endpoint::endpoint(const boost::asio::ip::address& addr,
- unsigned short port_num)
- : data_()
-{
- using namespace std; // For memcpy.
- if (addr.is_v4())
- {
- data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
- data_.v4.sin_port =
- boost::asio::detail::socket_ops::host_to_network_short(port_num);
- data_.v4.sin_addr.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- addr.to_v4().to_uint());
- }
- else
- {
- data_.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
- data_.v6.sin6_port =
- boost::asio::detail::socket_ops::host_to_network_short(port_num);
- data_.v6.sin6_flowinfo = 0;
- boost::asio::ip::address_v6 v6_addr = addr.to_v6();
- boost::asio::ip::address_v6::bytes_type bytes = v6_addr.to_bytes();
- memcpy(data_.v6.sin6_addr.s6_addr, bytes.data(), 16);
- data_.v6.sin6_scope_id =
- static_cast<boost::asio::detail::u_long_type>(
- v6_addr.scope_id());
- }
-}
-
-void endpoint::resize(std::size_t new_size)
-{
- if (new_size > sizeof(boost::asio::detail::sockaddr_storage_type))
- {
- boost::system::error_code ec(boost::asio::error::invalid_argument);
- boost::asio::detail::throw_error(ec);
- }
-}
-
-unsigned short endpoint::port() const
-{
- if (is_v4())
- {
- return boost::asio::detail::socket_ops::network_to_host_short(
- data_.v4.sin_port);
- }
- else
- {
- return boost::asio::detail::socket_ops::network_to_host_short(
- data_.v6.sin6_port);
- }
-}
-
-void endpoint::port(unsigned short port_num)
-{
- if (is_v4())
- {
- data_.v4.sin_port
- = boost::asio::detail::socket_ops::host_to_network_short(port_num);
- }
- else
- {
- data_.v6.sin6_port
- = boost::asio::detail::socket_ops::host_to_network_short(port_num);
- }
-}
-
-boost::asio::ip::address endpoint::address() const
-{
- using namespace std; // For memcpy.
- if (is_v4())
- {
- return boost::asio::ip::address_v4(
- boost::asio::detail::socket_ops::network_to_host_long(
- data_.v4.sin_addr.s_addr));
- }
- else
- {
- boost::asio::ip::address_v6::bytes_type bytes;
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
- memcpy(bytes.data(), data_.v6.sin6_addr.s6_addr, 16);
-#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, data_.v6.sin6_addr.s6_addr, 16);
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
- return boost::asio::ip::address_v6(bytes, data_.v6.sin6_scope_id);
- }
-}
-
-void endpoint::address(const boost::asio::ip::address& addr)
-{
- endpoint tmp_endpoint(addr, port());
- data_ = tmp_endpoint.data_;
-}
-
-bool operator==(const endpoint& e1, const endpoint& e2)
-{
- return e1.address() == e2.address() && e1.port() == e2.port();
-}
-
-bool operator<(const endpoint& e1, const endpoint& e2)
-{
- if (e1.address() < e2.address())
- return true;
- if (e1.address() != e2.address())
- return false;
- return e1.port() < e2.port();
-}
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-std::string endpoint::to_string() const
-{
- std::ostringstream tmp_os;
- tmp_os.imbue(std::locale::classic());
- if (is_v4())
- tmp_os << address();
- else
- tmp_os << '[' << address() << ']';
- tmp_os << ':' << port();
-
- return tmp_os.str();
-}
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace detail
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_DETAIL_IMPL_ENDPOINT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp
deleted file mode 100644
index ec3ca7e9706..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp
+++ /dev/null
@@ -1,568 +0,0 @@
-//
-// detail/socket_option.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_DETAIL_SOCKET_OPTION_HPP
-#define BOOST_ASIO_IP_DETAIL_SOCKET_OPTION_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 <stdexcept>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/ip/address.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-namespace detail {
-namespace socket_option {
-
-// Helper template for implementing multicast enable loopback options.
-template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
-class multicast_enable_loopback
-{
-public:
-#if defined(__sun) || defined(__osf__)
- typedef unsigned char ipv4_value_type;
- typedef unsigned char ipv6_value_type;
-#elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__)
- typedef unsigned char ipv4_value_type;
- typedef unsigned int ipv6_value_type;
-#else
- typedef int ipv4_value_type;
- typedef int ipv6_value_type;
-#endif
-
- // Default constructor.
- multicast_enable_loopback()
- : ipv4_value_(0),
- ipv6_value_(0)
- {
- }
-
- // Construct with a specific option value.
- explicit multicast_enable_loopback(bool v)
- : ipv4_value_(v ? 1 : 0),
- ipv6_value_(v ? 1 : 0)
- {
- }
-
- // Set the value of the boolean.
- multicast_enable_loopback& operator=(bool v)
- {
- ipv4_value_ = v ? 1 : 0;
- ipv6_value_ = v ? 1 : 0;
- return *this;
- }
-
- // Get the current value of the boolean.
- bool value() const
- {
- return !!ipv4_value_;
- }
-
- // Convert to bool.
- operator bool() const
- {
- return !!ipv4_value_;
- }
-
- // Test for false.
- bool operator!() const
- {
- return !ipv4_value_;
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Level;
- return IPv4_Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Name;
- return IPv4_Name;
- }
-
- // Get the address of the boolean data.
- template <typename Protocol>
- void* data(const Protocol& protocol)
- {
- if (protocol.family() == PF_INET6)
- return &ipv6_value_;
- return &ipv4_value_;
- }
-
- // Get the address of the boolean data.
- template <typename Protocol>
- const void* data(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return &ipv6_value_;
- return &ipv4_value_;
- }
-
- // Get the size of the boolean data.
- template <typename Protocol>
- std::size_t size(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return sizeof(ipv6_value_);
- return sizeof(ipv4_value_);
- }
-
- // Set the size of the boolean data.
- template <typename Protocol>
- void resize(const Protocol& protocol, std::size_t s)
- {
- if (protocol.family() == PF_INET6)
- {
- if (s != sizeof(ipv6_value_))
- {
- std::length_error ex("multicast_enable_loopback socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- ipv4_value_ = ipv6_value_ ? 1 : 0;
- }
- else
- {
- if (s != sizeof(ipv4_value_))
- {
- std::length_error ex("multicast_enable_loopback socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- ipv6_value_ = ipv4_value_ ? 1 : 0;
- }
- }
-
-private:
- ipv4_value_type ipv4_value_;
- ipv6_value_type ipv6_value_;
-};
-
-// Helper template for implementing unicast hops options.
-template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
-class unicast_hops
-{
-public:
- // Default constructor.
- unicast_hops()
- : value_(0)
- {
- }
-
- // Construct with a specific option value.
- explicit unicast_hops(int v)
- : value_(v)
- {
- }
-
- // Set the value of the option.
- unicast_hops& operator=(int v)
- {
- value_ = v;
- return *this;
- }
-
- // Get the current value of the option.
- int value() const
- {
- return value_;
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Level;
- return IPv4_Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Name;
- return IPv4_Name;
- }
-
- // Get the address of the data.
- template <typename Protocol>
- int* data(const Protocol&)
- {
- return &value_;
- }
-
- // Get the address of the data.
- template <typename Protocol>
- const int* data(const Protocol&) const
- {
- return &value_;
- }
-
- // Get the size of the data.
- template <typename Protocol>
- std::size_t size(const Protocol&) const
- {
- return sizeof(value_);
- }
-
- // Set the size of the data.
- template <typename Protocol>
- void resize(const Protocol&, std::size_t s)
- {
- if (s != sizeof(value_))
- {
- std::length_error ex("unicast hops socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
-#if defined(__hpux)
- if (value_ < 0)
- value_ = value_ & 0xFF;
-#endif
- }
-
-private:
- int value_;
-};
-
-// Helper template for implementing multicast hops options.
-template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
-class multicast_hops
-{
-public:
-#if defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE)
- typedef int ipv4_value_type;
-#else
- typedef unsigned char ipv4_value_type;
-#endif
- typedef int ipv6_value_type;
-
- // Default constructor.
- multicast_hops()
- : ipv4_value_(0),
- ipv6_value_(0)
- {
- }
-
- // Construct with a specific option value.
- explicit multicast_hops(int v)
- {
- if (v < 0 || v > 255)
- {
- std::out_of_range ex("multicast hops value out of range");
- boost::asio::detail::throw_exception(ex);
- }
- ipv4_value_ = (ipv4_value_type)v;
- ipv6_value_ = v;
- }
-
- // Set the value of the option.
- multicast_hops& operator=(int v)
- {
- if (v < 0 || v > 255)
- {
- std::out_of_range ex("multicast hops value out of range");
- boost::asio::detail::throw_exception(ex);
- }
- ipv4_value_ = (ipv4_value_type)v;
- ipv6_value_ = v;
- return *this;
- }
-
- // Get the current value of the option.
- int value() const
- {
- return ipv6_value_;
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Level;
- return IPv4_Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Name;
- return IPv4_Name;
- }
-
- // Get the address of the data.
- template <typename Protocol>
- void* data(const Protocol& protocol)
- {
- if (protocol.family() == PF_INET6)
- return &ipv6_value_;
- return &ipv4_value_;
- }
-
- // Get the address of the data.
- template <typename Protocol>
- const void* data(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return &ipv6_value_;
- return &ipv4_value_;
- }
-
- // Get the size of the data.
- template <typename Protocol>
- std::size_t size(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return sizeof(ipv6_value_);
- return sizeof(ipv4_value_);
- }
-
- // Set the size of the data.
- template <typename Protocol>
- void resize(const Protocol& protocol, std::size_t s)
- {
- if (protocol.family() == PF_INET6)
- {
- if (s != sizeof(ipv6_value_))
- {
- std::length_error ex("multicast hops socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- if (ipv6_value_ < 0)
- ipv4_value_ = 0;
- else if (ipv6_value_ > 255)
- ipv4_value_ = 255;
- else
- ipv4_value_ = (ipv4_value_type)ipv6_value_;
- }
- else
- {
- if (s != sizeof(ipv4_value_))
- {
- std::length_error ex("multicast hops socket option resize");
- boost::asio::detail::throw_exception(ex);
- }
- ipv6_value_ = ipv4_value_;
- }
- }
-
-private:
- ipv4_value_type ipv4_value_;
- ipv6_value_type ipv6_value_;
-};
-
-// Helper template for implementing ip_mreq-based options.
-template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
-class multicast_request
-{
-public:
- // Default constructor.
- multicast_request()
- : ipv4_value_(), // Zero-initialisation gives the "any" address.
- ipv6_value_() // Zero-initialisation gives the "any" address.
- {
- }
-
- // Construct with multicast address only.
- explicit multicast_request(const address& multicast_address)
- : ipv4_value_(), // Zero-initialisation gives the "any" address.
- ipv6_value_() // Zero-initialisation gives the "any" address.
- {
- if (multicast_address.is_v6())
- {
- using namespace std; // For memcpy.
- address_v6 ipv6_address = multicast_address.to_v6();
- address_v6::bytes_type bytes = ipv6_address.to_bytes();
- memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16);
- ipv6_value_.ipv6mr_interface = ipv6_address.scope_id();
- }
- else
- {
- ipv4_value_.imr_multiaddr.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- multicast_address.to_v4().to_uint());
- ipv4_value_.imr_interface.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- address_v4::any().to_uint());
- }
- }
-
- // Construct with multicast address and IPv4 address specifying an interface.
- explicit multicast_request(const address_v4& multicast_address,
- const address_v4& network_interface = address_v4::any())
- : ipv6_value_() // Zero-initialisation gives the "any" address.
- {
- ipv4_value_.imr_multiaddr.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- multicast_address.to_uint());
- ipv4_value_.imr_interface.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- network_interface.to_uint());
- }
-
- // Construct with multicast address and IPv6 network interface index.
- explicit multicast_request(
- const address_v6& multicast_address,
- unsigned long network_interface = 0)
- : ipv4_value_() // Zero-initialisation gives the "any" address.
- {
- using namespace std; // For memcpy.
- address_v6::bytes_type bytes = multicast_address.to_bytes();
- memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16);
- if (network_interface)
- ipv6_value_.ipv6mr_interface = network_interface;
- else
- ipv6_value_.ipv6mr_interface = multicast_address.scope_id();
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Level;
- return IPv4_Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Name;
- return IPv4_Name;
- }
-
- // Get the address of the option data.
- template <typename Protocol>
- const void* data(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return &ipv6_value_;
- return &ipv4_value_;
- }
-
- // Get the size of the option data.
- template <typename Protocol>
- std::size_t size(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return sizeof(ipv6_value_);
- return sizeof(ipv4_value_);
- }
-
-private:
- boost::asio::detail::in4_mreq_type ipv4_value_;
- boost::asio::detail::in6_mreq_type ipv6_value_;
-};
-
-// Helper template for implementing options that specify a network interface.
-template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
-class network_interface
-{
-public:
- // Default constructor.
- network_interface()
- {
- ipv4_value_.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- address_v4::any().to_uint());
- ipv6_value_ = 0;
- }
-
- // Construct with IPv4 interface.
- explicit network_interface(const address_v4& ipv4_interface)
- {
- ipv4_value_.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- ipv4_interface.to_uint());
- ipv6_value_ = 0;
- }
-
- // Construct with IPv6 interface.
- explicit network_interface(unsigned int ipv6_interface)
- {
- ipv4_value_.s_addr =
- boost::asio::detail::socket_ops::host_to_network_long(
- address_v4::any().to_uint());
- ipv6_value_ = ipv6_interface;
- }
-
- // Get the level of the socket option.
- template <typename Protocol>
- int level(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Level;
- return IPv4_Level;
- }
-
- // Get the name of the socket option.
- template <typename Protocol>
- int name(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return IPv6_Name;
- return IPv4_Name;
- }
-
- // Get the address of the option data.
- template <typename Protocol>
- const void* data(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return &ipv6_value_;
- return &ipv4_value_;
- }
-
- // Get the size of the option data.
- template <typename Protocol>
- std::size_t size(const Protocol& protocol) const
- {
- if (protocol.family() == PF_INET6)
- return sizeof(ipv6_value_);
- return sizeof(ipv4_value_);
- }
-
-private:
- boost::asio::detail::in4_addr_type ipv4_value_;
- unsigned int ipv6_value_;
-};
-
-} // namespace socket_option
-} // namespace detail
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_DETAIL_SOCKET_OPTION_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp
deleted file mode 100644
index c1e4e0cf8bb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// ip/host_name.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_HOST_NAME_HPP
-#define BOOST_ASIO_IP_HOST_NAME_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/system/error_code.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Get the current host name.
-BOOST_ASIO_DECL std::string host_name();
-
-/// Get the current host name.
-BOOST_ASIO_DECL std::string host_name(boost::system::error_code& ec);
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/impl/host_name.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_HOST_NAME_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp
deleted file mode 100644
index 4b9d6420483..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp
+++ /dev/null
@@ -1,117 +0,0 @@
-//
-// ip/icmp.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_ICMP_HPP
-#define BOOST_ASIO_IP_ICMP_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/socket_types.hpp>
-#include <boost/asio/basic_raw_socket.hpp>
-#include <boost/asio/ip/basic_endpoint.hpp>
-#include <boost/asio/ip/basic_resolver.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Encapsulates the flags needed for ICMP.
-/**
- * The boost::asio::ip::icmp class contains flags necessary for ICMP sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol, InternetProtocol.
- */
-class icmp
-{
-public:
- /// The type of a ICMP endpoint.
- typedef basic_endpoint<icmp> endpoint;
-
- /// Construct to represent the IPv4 ICMP protocol.
- static icmp v4()
- {
- return icmp(BOOST_ASIO_OS_DEF(IPPROTO_ICMP),
- BOOST_ASIO_OS_DEF(AF_INET));
- }
-
- /// Construct to represent the IPv6 ICMP protocol.
- static icmp v6()
- {
- return icmp(BOOST_ASIO_OS_DEF(IPPROTO_ICMPV6),
- BOOST_ASIO_OS_DEF(AF_INET6));
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_RAW);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return protocol_;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// The ICMP socket type.
- typedef basic_raw_socket<icmp> socket;
-
- /// The ICMP resolver type.
- typedef basic_resolver<icmp> resolver;
-
- /// Compare two protocols for equality.
- friend bool operator==(const icmp& p1, const icmp& p2)
- {
- return p1.protocol_ == p2.protocol_ && p1.family_ == p2.family_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const icmp& p1, const icmp& p2)
- {
- return p1.protocol_ != p2.protocol_ || p1.family_ != p2.family_;
- }
-
-private:
- // Construct with a specific family.
- explicit icmp(int protocol_id, int protocol_family)
- : protocol_(protocol_id),
- family_(protocol_family)
- {
- }
-
- int protocol_;
- int family_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_ICMP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp
deleted file mode 100644
index cf5afb4fcf9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ip/impl/address.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_IMPL_ADDRESS_HPP
-#define BOOST_ASIO_IP_IMPL_ADDRESS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-inline address address::from_string(const char* str)
-{
- return boost::asio::ip::make_address(str);
-}
-
-inline address address::from_string(
- const char* str, boost::system::error_code& ec)
-{
- return boost::asio::ip::make_address(str, ec);
-}
-
-inline address address::from_string(const std::string& str)
-{
- return boost::asio::ip::make_address(str);
-}
-
-inline address address::from_string(
- const std::string& str, boost::system::error_code& ec)
-{
- return boost::asio::ip::make_address(str, ec);
-}
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const address& addr)
-{
- return os << addr.to_string().c_str();
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_IP_IMPL_ADDRESS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp
deleted file mode 100644
index 9afa566a35d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp
+++ /dev/null
@@ -1,236 +0,0 @@
-//
-// ip/impl/address.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_IP_IMPL_ADDRESS_IPP
-#define BOOST_ASIO_IP_IMPL_ADDRESS_IPP
-
-#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/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/ip/address.hpp>
-#include <boost/asio/ip/bad_address_cast.hpp>
-#include <boost/system/system_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-address::address()
- : type_(ipv4),
- ipv4_address_(),
- ipv6_address_()
-{
-}
-
-address::address(const boost::asio::ip::address_v4& ipv4_address)
- : type_(ipv4),
- ipv4_address_(ipv4_address),
- ipv6_address_()
-{
-}
-
-address::address(const boost::asio::ip::address_v6& ipv6_address)
- : type_(ipv6),
- ipv4_address_(),
- ipv6_address_(ipv6_address)
-{
-}
-
-address::address(const address& other)
- : type_(other.type_),
- ipv4_address_(other.ipv4_address_),
- ipv6_address_(other.ipv6_address_)
-{
-}
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-address::address(address&& other)
- : type_(other.type_),
- ipv4_address_(other.ipv4_address_),
- ipv6_address_(other.ipv6_address_)
-{
-}
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-address& address::operator=(const address& other)
-{
- type_ = other.type_;
- ipv4_address_ = other.ipv4_address_;
- ipv6_address_ = other.ipv6_address_;
- return *this;
-}
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-address& address::operator=(address&& other)
-{
- type_ = other.type_;
- ipv4_address_ = other.ipv4_address_;
- ipv6_address_ = other.ipv6_address_;
- return *this;
-}
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-address& address::operator=(const boost::asio::ip::address_v4& ipv4_address)
-{
- type_ = ipv4;
- ipv4_address_ = ipv4_address;
- ipv6_address_ = boost::asio::ip::address_v6();
- return *this;
-}
-
-address& address::operator=(const boost::asio::ip::address_v6& ipv6_address)
-{
- type_ = ipv6;
- ipv4_address_ = boost::asio::ip::address_v4();
- ipv6_address_ = ipv6_address;
- return *this;
-}
-
-address make_address(const char* str)
-{
- boost::system::error_code ec;
- address addr = make_address(str, ec);
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-address make_address(const char* str, boost::system::error_code& ec)
-{
- boost::asio::ip::address_v6 ipv6_address =
- boost::asio::ip::make_address_v6(str, ec);
- if (!ec)
- return address(ipv6_address);
-
- boost::asio::ip::address_v4 ipv4_address =
- boost::asio::ip::make_address_v4(str, ec);
- if (!ec)
- return address(ipv4_address);
-
- return address();
-}
-
-address make_address(const std::string& str)
-{
- return make_address(str.c_str());
-}
-
-address make_address(const std::string& str,
- boost::system::error_code& ec)
-{
- return make_address(str.c_str(), ec);
-}
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-address make_address(string_view str)
-{
- return make_address(static_cast<std::string>(str));
-}
-
-address make_address(string_view str,
- boost::system::error_code& ec)
-{
- return make_address(static_cast<std::string>(str), ec);
-}
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-boost::asio::ip::address_v4 address::to_v4() const
-{
- if (type_ != ipv4)
- {
- bad_address_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
- return ipv4_address_;
-}
-
-boost::asio::ip::address_v6 address::to_v6() const
-{
- if (type_ != ipv6)
- {
- bad_address_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
- return ipv6_address_;
-}
-
-std::string address::to_string() const
-{
- if (type_ == ipv6)
- return ipv6_address_.to_string();
- return ipv4_address_.to_string();
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-std::string address::to_string(boost::system::error_code& ec) const
-{
- if (type_ == ipv6)
- return ipv6_address_.to_string(ec);
- return ipv4_address_.to_string(ec);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-bool address::is_loopback() const
-{
- return (type_ == ipv4)
- ? ipv4_address_.is_loopback()
- : ipv6_address_.is_loopback();
-}
-
-bool address::is_unspecified() const
-{
- return (type_ == ipv4)
- ? ipv4_address_.is_unspecified()
- : ipv6_address_.is_unspecified();
-}
-
-bool address::is_multicast() const
-{
- return (type_ == ipv4)
- ? ipv4_address_.is_multicast()
- : ipv6_address_.is_multicast();
-}
-
-bool operator==(const address& a1, const address& a2)
-{
- if (a1.type_ != a2.type_)
- return false;
- if (a1.type_ == address::ipv6)
- return a1.ipv6_address_ == a2.ipv6_address_;
- return a1.ipv4_address_ == a2.ipv4_address_;
-}
-
-bool operator<(const address& a1, const address& a2)
-{
- if (a1.type_ < a2.type_)
- return true;
- if (a1.type_ > a2.type_)
- return false;
- if (a1.type_ == address::ipv6)
- return a1.ipv6_address_ < a2.ipv6_address_;
- return a1.ipv4_address_ < a2.ipv4_address_;
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_IMPL_ADDRESS_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp
deleted file mode 100644
index 838dc613e21..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ip/impl/address_v4.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_IMPL_ADDRESS_V4_HPP
-#define BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-inline address_v4 address_v4::from_string(const char* str)
-{
- return boost::asio::ip::make_address_v4(str);
-}
-
-inline address_v4 address_v4::from_string(
- const char* str, boost::system::error_code& ec)
-{
- return boost::asio::ip::make_address_v4(str, ec);
-}
-
-inline address_v4 address_v4::from_string(const std::string& str)
-{
- return boost::asio::ip::make_address_v4(str);
-}
-
-inline address_v4 address_v4::from_string(
- const std::string& str, boost::system::error_code& ec)
-{
- return boost::asio::ip::make_address_v4(str, ec);
-}
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const address_v4& addr)
-{
- return os << addr.to_string().c_str();
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp
deleted file mode 100644
index 7693deaf402..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp
+++ /dev/null
@@ -1,212 +0,0 @@
-//
-// ip/impl/address_v4.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_IP_IMPL_ADDRESS_V4_IPP
-#define BOOST_ASIO_IP_IMPL_ADDRESS_V4_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <climits>
-#include <limits>
-#include <stdexcept>
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/ip/address_v4.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-address_v4::address_v4(const address_v4::bytes_type& bytes)
-{
-#if UCHAR_MAX > 0xFF
- if (bytes[0] > 0xFF || bytes[1] > 0xFF
- || bytes[2] > 0xFF || bytes[3] > 0xFF)
- {
- std::out_of_range ex("address_v4 from bytes_type");
- boost::asio::detail::throw_exception(ex);
- }
-#endif // UCHAR_MAX > 0xFF
-
- using namespace std; // For memcpy.
- memcpy(&addr_.s_addr, bytes.data(), 4);
-}
-
-address_v4::address_v4(address_v4::uint_type addr)
-{
- if ((std::numeric_limits<uint_type>::max)() > 0xFFFFFFFF)
- {
- std::out_of_range ex("address_v4 from unsigned integer");
- boost::asio::detail::throw_exception(ex);
- }
-
- addr_.s_addr = boost::asio::detail::socket_ops::host_to_network_long(
- static_cast<boost::asio::detail::u_long_type>(addr));
-}
-
-address_v4::bytes_type address_v4::to_bytes() const
-{
- using namespace std; // For memcpy.
- bytes_type bytes;
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
- memcpy(bytes.data(), &addr_.s_addr, 4);
-#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, &addr_.s_addr, 4);
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
- return bytes;
-}
-
-address_v4::uint_type address_v4::to_uint() const
-{
- return boost::asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-unsigned long address_v4::to_ulong() const
-{
- return boost::asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-std::string address_v4::to_string() const
-{
- boost::system::error_code ec;
- char addr_str[boost::asio::detail::max_addr_v4_str_len];
- const char* addr =
- boost::asio::detail::socket_ops::inet_ntop(
- BOOST_ASIO_OS_DEF(AF_INET), &addr_, addr_str,
- boost::asio::detail::max_addr_v4_str_len, 0, ec);
- if (addr == 0)
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-std::string address_v4::to_string(boost::system::error_code& ec) const
-{
- char addr_str[boost::asio::detail::max_addr_v4_str_len];
- const char* addr =
- boost::asio::detail::socket_ops::inet_ntop(
- BOOST_ASIO_OS_DEF(AF_INET), &addr_, addr_str,
- boost::asio::detail::max_addr_v4_str_len, 0, ec);
- if (addr == 0)
- return std::string();
- return addr;
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-bool address_v4::is_loopback() const
-{
- return (to_uint() & 0xFF000000) == 0x7F000000;
-}
-
-bool address_v4::is_unspecified() const
-{
- return to_uint() == 0;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address_v4::is_class_a() const
-{
- return (to_uint() & 0x80000000) == 0;
-}
-
-bool address_v4::is_class_b() const
-{
- return (to_uint() & 0xC0000000) == 0x80000000;
-}
-
-bool address_v4::is_class_c() const
-{
- return (to_uint() & 0xE0000000) == 0xC0000000;
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-bool address_v4::is_multicast() const
-{
- return (to_uint() & 0xF0000000) == 0xE0000000;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-address_v4 address_v4::broadcast(const address_v4& addr, const address_v4& mask)
-{
- return address_v4(addr.to_uint() | (mask.to_uint() ^ 0xFFFFFFFF));
-}
-
-address_v4 address_v4::netmask(const address_v4& addr)
-{
- if (addr.is_class_a())
- return address_v4(0xFF000000);
- if (addr.is_class_b())
- return address_v4(0xFFFF0000);
- if (addr.is_class_c())
- return address_v4(0xFFFFFF00);
- return address_v4(0xFFFFFFFF);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-address_v4 make_address_v4(const char* str)
-{
- boost::system::error_code ec;
- address_v4 addr = make_address_v4(str, ec);
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-address_v4 make_address_v4(
- const char* str, boost::system::error_code& ec)
-{
- address_v4::bytes_type bytes;
- if (boost::asio::detail::socket_ops::inet_pton(
- BOOST_ASIO_OS_DEF(AF_INET), str, &bytes, 0, ec) <= 0)
- return address_v4();
- return address_v4(bytes);
-}
-
-address_v4 make_address_v4(const std::string& str)
-{
- return make_address_v4(str.c_str());
-}
-
-address_v4 make_address_v4(
- const std::string& str, boost::system::error_code& ec)
-{
- return make_address_v4(str.c_str(), ec);
-}
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-address_v4 make_address_v4(string_view str)
-{
- return make_address_v4(static_cast<std::string>(str));
-}
-
-address_v4 make_address_v4(string_view str,
- boost::system::error_code& ec)
-{
- return make_address_v4(static_cast<std::string>(str), ec);
-}
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V4_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp
deleted file mode 100644
index f989b6a7026..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ip/impl/address_v6.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_IMPL_ADDRESS_V6_HPP
-#define BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-inline address_v6 address_v6::from_string(const char* str)
-{
- return boost::asio::ip::make_address_v6(str);
-}
-
-inline address_v6 address_v6::from_string(
- const char* str, boost::system::error_code& ec)
-{
- return boost::asio::ip::make_address_v6(str, ec);
-}
-
-inline address_v6 address_v6::from_string(const std::string& str)
-{
- return boost::asio::ip::make_address_v6(str);
-}
-
-inline address_v6 address_v6::from_string(
- const std::string& str, boost::system::error_code& ec)
-{
- return boost::asio::ip::make_address_v6(str, ec);
-}
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
-{
- return os << addr.to_string().c_str();
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp
deleted file mode 100644
index 4eea4bc5a05..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp
+++ /dev/null
@@ -1,352 +0,0 @@
-//
-// ip/impl/address_v6.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_IP_IMPL_ADDRESS_V6_IPP
-#define BOOST_ASIO_IP_IMPL_ADDRESS_V6_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 <stdexcept>
-#include <typeinfo>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/ip/address_v6.hpp>
-#include <boost/asio/ip/bad_address_cast.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-address_v6::address_v6()
- : addr_(),
- scope_id_(0)
-{
-}
-
-address_v6::address_v6(const address_v6::bytes_type& bytes,
- unsigned long scope)
- : scope_id_(scope)
-{
-#if UCHAR_MAX > 0xFF
- for (std::size_t i = 0; i < bytes.size(); ++i)
- {
- if (bytes[i] > 0xFF)
- {
- std::out_of_range ex("address_v6 from bytes_type");
- boost::asio::detail::throw_exception(ex);
- }
- }
-#endif // UCHAR_MAX > 0xFF
-
- using namespace std; // For memcpy.
- memcpy(addr_.s6_addr, bytes.data(), 16);
-}
-
-address_v6::address_v6(const address_v6& other)
- : addr_(other.addr_),
- scope_id_(other.scope_id_)
-{
-}
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-address_v6::address_v6(address_v6&& other)
- : addr_(other.addr_),
- scope_id_(other.scope_id_)
-{
-}
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-address_v6& address_v6::operator=(const address_v6& other)
-{
- addr_ = other.addr_;
- scope_id_ = other.scope_id_;
- return *this;
-}
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(address_v6&& other)
-{
- addr_ = other.addr_;
- scope_id_ = other.scope_id_;
- return *this;
-}
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-address_v6::bytes_type address_v6::to_bytes() const
-{
- using namespace std; // For memcpy.
- bytes_type bytes;
-#if defined(BOOST_ASIO_HAS_STD_ARRAY)
- memcpy(bytes.data(), addr_.s6_addr, 16);
-#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, addr_.s6_addr, 16);
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
- return bytes;
-}
-
-std::string address_v6::to_string() const
-{
- boost::system::error_code ec;
- char addr_str[boost::asio::detail::max_addr_v6_str_len];
- const char* addr =
- boost::asio::detail::socket_ops::inet_ntop(
- BOOST_ASIO_OS_DEF(AF_INET6), &addr_, addr_str,
- boost::asio::detail::max_addr_v6_str_len, scope_id_, ec);
- if (addr == 0)
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-std::string address_v6::to_string(boost::system::error_code& ec) const
-{
- char addr_str[boost::asio::detail::max_addr_v6_str_len];
- const char* addr =
- boost::asio::detail::socket_ops::inet_ntop(
- BOOST_ASIO_OS_DEF(AF_INET6), &addr_, addr_str,
- boost::asio::detail::max_addr_v6_str_len, scope_id_, ec);
- if (addr == 0)
- return std::string();
- return addr;
-}
-
-address_v4 address_v6::to_v4() const
-{
- if (!is_v4_mapped() && !is_v4_compatible())
- {
- bad_address_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
-
- address_v4::bytes_type v4_bytes = { { addr_.s6_addr[12],
- addr_.s6_addr[13], addr_.s6_addr[14], addr_.s6_addr[15] } };
- return address_v4(v4_bytes);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-bool address_v6::is_loopback() const
-{
- return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
- && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
- && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
- && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
- && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
- && (addr_.s6_addr[10] == 0) && (addr_.s6_addr[11] == 0)
- && (addr_.s6_addr[12] == 0) && (addr_.s6_addr[13] == 0)
- && (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 1));
-}
-
-bool address_v6::is_unspecified() const
-{
- return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
- && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
- && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
- && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
- && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
- && (addr_.s6_addr[10] == 0) && (addr_.s6_addr[11] == 0)
- && (addr_.s6_addr[12] == 0) && (addr_.s6_addr[13] == 0)
- && (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 0));
-}
-
-bool address_v6::is_link_local() const
-{
- return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0x80));
-}
-
-bool address_v6::is_site_local() const
-{
- return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0xc0));
-}
-
-bool address_v6::is_v4_mapped() const
-{
- return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
- && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
- && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
- && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
- && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
- && (addr_.s6_addr[10] == 0xff) && (addr_.s6_addr[11] == 0xff));
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address_v6::is_v4_compatible() const
-{
- return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
- && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
- && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
- && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
- && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
- && (addr_.s6_addr[10] == 0) && (addr_.s6_addr[11] == 0)
- && !((addr_.s6_addr[12] == 0)
- && (addr_.s6_addr[13] == 0)
- && (addr_.s6_addr[14] == 0)
- && ((addr_.s6_addr[15] == 0) || (addr_.s6_addr[15] == 1))));
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-bool address_v6::is_multicast() const
-{
- return (addr_.s6_addr[0] == 0xff);
-}
-
-bool address_v6::is_multicast_global() const
-{
- return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x0e));
-}
-
-bool address_v6::is_multicast_link_local() const
-{
- return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x02));
-}
-
-bool address_v6::is_multicast_node_local() const
-{
- return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x01));
-}
-
-bool address_v6::is_multicast_org_local() const
-{
- return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x08));
-}
-
-bool address_v6::is_multicast_site_local() const
-{
- return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x05));
-}
-
-bool operator==(const address_v6& a1, const address_v6& a2)
-{
- using namespace std; // For memcmp.
- return memcmp(&a1.addr_, &a2.addr_,
- sizeof(boost::asio::detail::in6_addr_type)) == 0
- && a1.scope_id_ == a2.scope_id_;
-}
-
-bool operator<(const address_v6& a1, const address_v6& a2)
-{
- using namespace std; // For memcmp.
- int memcmp_result = memcmp(&a1.addr_, &a2.addr_,
- sizeof(boost::asio::detail::in6_addr_type));
- if (memcmp_result < 0)
- return true;
- if (memcmp_result > 0)
- return false;
- return a1.scope_id_ < a2.scope_id_;
-}
-
-address_v6 address_v6::loopback()
-{
- address_v6 tmp;
- tmp.addr_.s6_addr[15] = 1;
- return tmp;
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-address_v6 address_v6::v4_mapped(const address_v4& addr)
-{
- address_v4::bytes_type v4_bytes = addr.to_bytes();
- bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF,
- v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
- return address_v6(v6_bytes);
-}
-
-address_v6 address_v6::v4_compatible(const address_v4& addr)
-{
- address_v4::bytes_type v4_bytes = addr.to_bytes();
- bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
- return address_v6(v6_bytes);
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-address_v6 make_address_v6(const char* str)
-{
- boost::system::error_code ec;
- address_v6 addr = make_address_v6(str, ec);
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-address_v6 make_address_v6(
- const char* str, boost::system::error_code& ec)
-{
- address_v6::bytes_type bytes;
- unsigned long scope_id = 0;
- if (boost::asio::detail::socket_ops::inet_pton(
- BOOST_ASIO_OS_DEF(AF_INET6), str, &bytes[0], &scope_id, ec) <= 0)
- return address_v6();
- return address_v6(bytes, scope_id);
-}
-
-address_v6 make_address_v6(const std::string& str)
-{
- return make_address_v6(str.c_str());
-}
-
-address_v6 make_address_v6(
- const std::string& str, boost::system::error_code& ec)
-{
- return make_address_v6(str.c_str(), ec);
-}
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-address_v6 make_address_v6(string_view str)
-{
- return make_address_v6(static_cast<std::string>(str));
-}
-
-address_v6 make_address_v6(string_view str,
- boost::system::error_code& ec)
-{
- return make_address_v6(static_cast<std::string>(str), ec);
-}
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-address_v4 make_address_v4(
- v4_mapped_t, const address_v6& v6_addr)
-{
- if (!v6_addr.is_v4_mapped())
- {
- bad_address_cast ex;
- boost::asio::detail::throw_exception(ex);
- }
-
- address_v6::bytes_type v6_bytes = v6_addr.to_bytes();
- address_v4::bytes_type v4_bytes = { { v6_bytes[12],
- v6_bytes[13], v6_bytes[14], v6_bytes[15] } };
- return address_v4(v4_bytes);
-}
-
-address_v6 make_address_v6(
- v4_mapped_t, const address_v4& v4_addr)
-{
- address_v4::bytes_type v4_bytes = v4_addr.to_bytes();
- address_v6::bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0xFF, 0xFF, v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
- return address_v6(v6_bytes);
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V6_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp
deleted file mode 100644
index 23655bf9409..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// ip/impl/basic_endpoint.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_IMPL_BASIC_ENDPOINT_HPP
-#define BOOST_ASIO_IP_IMPL_BASIC_ENDPOINT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename Elem, typename Traits, typename InternetProtocol>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os,
- const basic_endpoint<InternetProtocol>& endpoint)
-{
- boost::asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port());
- return os << tmp_ep.to_string().c_str();
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_IP_IMPL_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp
deleted file mode 100644
index 17b8395a76d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// ip/impl/host_name.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_IP_IMPL_HOST_NAME_IPP
-#define BOOST_ASIO_IP_IMPL_HOST_NAME_IPP
-
-#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/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/winsock_init.hpp>
-#include <boost/asio/ip/host_name.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-std::string host_name()
-{
- char name[1024];
- boost::system::error_code ec;
- if (boost::asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0)
- {
- boost::asio::detail::throw_error(ec);
- return std::string();
- }
- return std::string(name);
-}
-
-std::string host_name(boost::system::error_code& ec)
-{
- char name[1024];
- if (boost::asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0)
- return std::string();
- return std::string(name);
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_IMPL_HOST_NAME_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp
deleted file mode 100644
index 3ca4e746bd5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// ip/impl/network_v4.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IMPL_NETWORK_V4_HPP
-#define BOOST_ASIO_IP_IMPL_NETWORK_V4_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const network_v4& addr)
-{
- boost::system::error_code ec;
- std::string s = addr.to_string(ec);
- if (ec)
- {
- if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
- boost::asio::detail::throw_error(ec);
- else
- os.setstate(std::basic_ostream<Elem, Traits>::failbit);
- }
- else
- for (std::string::iterator i = s.begin(); i != s.end(); ++i)
- os << os.widen(*i);
- return os;
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_IP_IMPL_NETWORK_V4_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp
deleted file mode 100644
index 62f742c6697..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp
+++ /dev/null
@@ -1,218 +0,0 @@
-//
-// ip/impl/network_v4.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IMPL_NETWORK_V4_IPP
-#define BOOST_ASIO_IP_IMPL_NETWORK_V4_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <climits>
-#include <cstdio>
-#include <cstdlib>
-#include <stdexcept>
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/ip/network_v4.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-network_v4::network_v4(const address_v4& addr, unsigned short prefix_len)
- : address_(addr),
- prefix_length_(prefix_len)
-{
- if (prefix_len > 32)
- {
- std::out_of_range ex("prefix length too large");
- boost::asio::detail::throw_exception(ex);
- }
-}
-
-network_v4::network_v4(const address_v4& addr, const address_v4& mask)
- : address_(addr),
- prefix_length_(0)
-{
- address_v4::bytes_type mask_bytes = mask.to_bytes();
- bool finished = false;
- for (std::size_t i = 0; i < mask_bytes.size(); ++i)
- {
- if (finished)
- {
- if (mask_bytes[i])
- {
- std::invalid_argument ex("non-contiguous netmask");
- boost::asio::detail::throw_exception(ex);
- }
- continue;
- }
- else
- {
- switch (mask_bytes[i])
- {
- case 255:
- prefix_length_ += 8;
- break;
- case 254: // prefix_length_ += 7
- prefix_length_ += 1;
- case 252: // prefix_length_ += 6
- prefix_length_ += 1;
- case 248: // prefix_length_ += 5
- prefix_length_ += 1;
- case 240: // prefix_length_ += 4
- prefix_length_ += 1;
- case 224: // prefix_length_ += 3
- prefix_length_ += 1;
- case 192: // prefix_length_ += 2
- prefix_length_ += 1;
- case 128: // prefix_length_ += 1
- prefix_length_ += 1;
- case 0: // nbits += 0
- finished = true;
- break;
- default:
- std::out_of_range ex("non-contiguous netmask");
- boost::asio::detail::throw_exception(ex);
- }
- }
- }
-}
-
-address_v4 network_v4::netmask() const BOOST_ASIO_NOEXCEPT
-{
- uint32_t nmbits = 0xffffffff;
- if (prefix_length_ == 0)
- nmbits = 0;
- else
- nmbits = nmbits << (32 - prefix_length_);
- return address_v4(nmbits);
-}
-
-address_v4_range network_v4::hosts() const BOOST_ASIO_NOEXCEPT
-{
- return is_host()
- ? address_v4_range(address_, address_v4(address_.to_uint() + 1))
- : address_v4_range(address_v4(network().to_uint() + 1), broadcast());
-}
-
-bool network_v4::is_subnet_of(const network_v4& other) const
-{
- if (other.prefix_length_ >= prefix_length_)
- return false; // Only real subsets are allowed.
- const network_v4 me(address_, other.prefix_length_);
- return other.canonical() == me.canonical();
-}
-
-std::string network_v4::to_string() const
-{
- boost::system::error_code ec;
- std::string addr = to_string(ec);
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-std::string network_v4::to_string(boost::system::error_code& ec) const
-{
- using namespace std; // For sprintf.
- ec = boost::system::error_code();
- char prefix_len[16];
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf(prefix_len, "/%u", prefix_length_);
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
- return address_.to_string() + prefix_len;
-}
-
-network_v4 make_network_v4(const char* str)
-{
- return make_network_v4(std::string(str));
-}
-
-network_v4 make_network_v4(const char* str, boost::system::error_code& ec)
-{
- return make_network_v4(std::string(str), ec);
-}
-
-network_v4 make_network_v4(const std::string& str)
-{
- boost::system::error_code ec;
- network_v4 net = make_network_v4(str, ec);
- boost::asio::detail::throw_error(ec);
- return net;
-}
-
-network_v4 make_network_v4(const std::string& str,
- boost::system::error_code& ec)
-{
- std::string::size_type pos = str.find_first_of("/");
-
- if (pos == std::string::npos)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v4();
- }
-
- if (pos == str.size() - 1)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v4();
- }
-
- std::string::size_type end = str.find_first_not_of("0123456789", pos + 1);
- if (end != std::string::npos)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v4();
- }
-
- const address_v4 addr = make_address_v4(str.substr(0, pos), ec);
- if (ec)
- return network_v4();
-
- const int prefix_len = std::atoi(str.substr(pos + 1).c_str());
- if (prefix_len < 0 || prefix_len > 32)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v4();
- }
-
- return network_v4(addr, static_cast<unsigned short>(prefix_len));
-}
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-network_v4 make_network_v4(string_view str)
-{
- return make_network_v4(static_cast<std::string>(str));
-}
-
-network_v4 make_network_v4(string_view str,
- boost::system::error_code& ec)
-{
- return make_network_v4(static_cast<std::string>(str), ec);
-}
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_IMPL_NETWORK_V4_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp
deleted file mode 100644
index 1b13879ea3c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// ip/impl/network_v6.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_IMPL_NETWORK_V6_HPP
-#define BOOST_ASIO_IP_IMPL_NETWORK_V6_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const network_v6& addr)
-{
- boost::system::error_code ec;
- std::string s = addr.to_string(ec);
- if (ec)
- {
- if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
- boost::asio::detail::throw_error(ec);
- else
- os.setstate(std::basic_ostream<Elem, Traits>::failbit);
- }
- else
- for (std::string::iterator i = s.begin(); i != s.end(); ++i)
- os << os.widen(*i);
- return os;
-}
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_IP_IMPL_NETWORK_V6_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp
deleted file mode 100644
index 426bc33b397..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp
+++ /dev/null
@@ -1,187 +0,0 @@
-//
-// ip/impl/network_v6.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IMPL_NETWORK_V6_IPP
-#define BOOST_ASIO_IP_IMPL_NETWORK_V6_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <climits>
-#include <cstdio>
-#include <cstdlib>
-#include <stdexcept>
-#include <boost/asio/error.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/ip/network_v6.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-network_v6::network_v6(const address_v6& addr, unsigned short prefix_len)
- : address_(addr),
- prefix_length_(prefix_len)
-{
- if (prefix_len > 128)
- {
- std::out_of_range ex("prefix length too large");
- boost::asio::detail::throw_exception(ex);
- }
-}
-
-BOOST_ASIO_DECL address_v6 network_v6::network() const BOOST_ASIO_NOEXCEPT
-{
- address_v6::bytes_type bytes(address_.to_bytes());
- for (std::size_t i = 0; i < 16; ++i)
- {
- if (prefix_length_ <= i * 8)
- bytes[i] = 0;
- else if (prefix_length_ < (i + 1) * 8)
- bytes[i] &= 0xFF00 >> (prefix_length_ % 8);
- }
- return address_v6(bytes, address_.scope_id());
-}
-
-address_v6_range network_v6::hosts() const BOOST_ASIO_NOEXCEPT
-{
- address_v6::bytes_type begin_bytes(address_.to_bytes());
- address_v6::bytes_type end_bytes(address_.to_bytes());
- for (std::size_t i = 0; i < 16; ++i)
- {
- if (prefix_length_ <= i * 8)
- {
- begin_bytes[i] = 0;
- end_bytes[i] = 0xFF;
- }
- else if (prefix_length_ < (i + 1) * 8)
- {
- begin_bytes[i] &= 0xFF00 >> (prefix_length_ % 8);
- end_bytes[i] |= 0xFF >> (prefix_length_ % 8);
- }
- }
- return address_v6_range(
- address_v6_iterator(address_v6(begin_bytes, address_.scope_id())),
- ++address_v6_iterator(address_v6(end_bytes, address_.scope_id())));
-}
-
-bool network_v6::is_subnet_of(const network_v6& other) const
-{
- if (other.prefix_length_ >= prefix_length_)
- return false; // Only real subsets are allowed.
- const network_v6 me(address_, other.prefix_length_);
- return other.canonical() == me.canonical();
-}
-
-std::string network_v6::to_string() const
-{
- boost::system::error_code ec;
- std::string addr = to_string(ec);
- boost::asio::detail::throw_error(ec);
- return addr;
-}
-
-std::string network_v6::to_string(boost::system::error_code& ec) const
-{
- using namespace std; // For sprintf.
- ec = boost::system::error_code();
- char prefix_len[16];
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf(prefix_len, "/%u", prefix_length_);
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
- return address_.to_string() + prefix_len;
-}
-
-network_v6 make_network_v6(const char* str)
-{
- return make_network_v6(std::string(str));
-}
-
-network_v6 make_network_v6(const char* str, boost::system::error_code& ec)
-{
- return make_network_v6(std::string(str), ec);
-}
-
-network_v6 make_network_v6(const std::string& str)
-{
- boost::system::error_code ec;
- network_v6 net = make_network_v6(str, ec);
- boost::asio::detail::throw_error(ec);
- return net;
-}
-
-network_v6 make_network_v6(const std::string& str,
- boost::system::error_code& ec)
-{
- std::string::size_type pos = str.find_first_of("/");
-
- if (pos == std::string::npos)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v6();
- }
-
- if (pos == str.size() - 1)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v6();
- }
-
- std::string::size_type end = str.find_first_not_of("0123456789", pos + 1);
- if (end != std::string::npos)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v6();
- }
-
- const address_v6 addr = make_address_v6(str.substr(0, pos), ec);
- if (ec)
- return network_v6();
-
- const int prefix_len = std::atoi(str.substr(pos + 1).c_str());
- if (prefix_len < 0 || prefix_len > 128)
- {
- ec = boost::asio::error::invalid_argument;
- return network_v6();
- }
-
- return network_v6(addr, static_cast<unsigned short>(prefix_len));
-}
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-network_v6 make_network_v6(string_view str)
-{
- return make_network_v6(static_cast<std::string>(str));
-}
-
-network_v6 make_network_v6(string_view str,
- boost::system::error_code& ec)
-{
- return make_network_v6(static_cast<std::string>(str), ec);
-}
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_IMPL_NETWORK_V6_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp
deleted file mode 100644
index d46692c2683..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp
+++ /dev/null
@@ -1,193 +0,0 @@
-//
-// ip/multicast.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_MULTICAST_HPP
-#define BOOST_ASIO_IP_MULTICAST_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/ip/detail/socket_option.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-namespace multicast {
-
-/// Socket option to join a multicast group on a specified interface.
-/**
- * Implements the IPPROTO_IP/IP_ADD_MEMBERSHIP socket option.
- *
- * @par Examples
- * Setting the option to join a multicast group:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::address multicast_address =
- * boost::asio::ip::address::from_string("225.0.0.1");
- * boost::asio::ip::multicast::join_group option(multicast_address);
- * socket.set_option(option);
- * @endcode
- *
- * @par Concepts:
- * SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined join_group;
-#else
-typedef boost::asio::ip::detail::socket_option::multicast_request<
- BOOST_ASIO_OS_DEF(IPPROTO_IP),
- BOOST_ASIO_OS_DEF(IP_ADD_MEMBERSHIP),
- BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
- BOOST_ASIO_OS_DEF(IPV6_JOIN_GROUP)> join_group;
-#endif
-
-/// Socket option to leave a multicast group on a specified interface.
-/**
- * Implements the IPPROTO_IP/IP_DROP_MEMBERSHIP socket option.
- *
- * @par Examples
- * Setting the option to leave a multicast group:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::address multicast_address =
- * boost::asio::ip::address::from_string("225.0.0.1");
- * boost::asio::ip::multicast::leave_group option(multicast_address);
- * socket.set_option(option);
- * @endcode
- *
- * @par Concepts:
- * SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined leave_group;
-#else
-typedef boost::asio::ip::detail::socket_option::multicast_request<
- BOOST_ASIO_OS_DEF(IPPROTO_IP),
- BOOST_ASIO_OS_DEF(IP_DROP_MEMBERSHIP),
- BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
- BOOST_ASIO_OS_DEF(IPV6_LEAVE_GROUP)> leave_group;
-#endif
-
-/// Socket option for local interface to use for outgoing multicast packets.
-/**
- * Implements the IPPROTO_IP/IP_MULTICAST_IF socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::address_v4 local_interface =
- * boost::asio::ip::address_v4::from_string("1.2.3.4");
- * boost::asio::ip::multicast::outbound_interface option(local_interface);
- * socket.set_option(option);
- * @endcode
- *
- * @par Concepts:
- * SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined outbound_interface;
-#else
-typedef boost::asio::ip::detail::socket_option::network_interface<
- BOOST_ASIO_OS_DEF(IPPROTO_IP),
- BOOST_ASIO_OS_DEF(IP_MULTICAST_IF),
- BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
- BOOST_ASIO_OS_DEF(IPV6_MULTICAST_IF)> outbound_interface;
-#endif
-
-/// Socket option for time-to-live associated with outgoing multicast packets.
-/**
- * Implements the IPPROTO_IP/IP_MULTICAST_TTL socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::multicast::hops option(4);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::multicast::hops option;
- * socket.get_option(option);
- * int ttl = option.value();
- * @endcode
- *
- * @par Concepts:
- * GettableSocketOption, SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined hops;
-#else
-typedef boost::asio::ip::detail::socket_option::multicast_hops<
- BOOST_ASIO_OS_DEF(IPPROTO_IP),
- BOOST_ASIO_OS_DEF(IP_MULTICAST_TTL),
- BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
- BOOST_ASIO_OS_DEF(IPV6_MULTICAST_HOPS)> hops;
-#endif
-
-/// Socket option determining whether outgoing multicast packets will be
-/// received on the same socket if it is a member of the multicast group.
-/**
- * Implements the IPPROTO_IP/IP_MULTICAST_LOOP socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::multicast::enable_loopback option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::multicast::enable_loopback option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * GettableSocketOption, SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined enable_loopback;
-#else
-typedef boost::asio::ip::detail::socket_option::multicast_enable_loopback<
- BOOST_ASIO_OS_DEF(IPPROTO_IP),
- BOOST_ASIO_OS_DEF(IP_MULTICAST_LOOP),
- BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
- BOOST_ASIO_OS_DEF(IPV6_MULTICAST_LOOP)> enable_loopback;
-#endif
-
-} // namespace multicast
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_MULTICAST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp
deleted file mode 100644
index 24e67b83713..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp
+++ /dev/null
@@ -1,263 +0,0 @@
-//
-// ip/network_v4.hpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_NETWORK_V4_HPP
-#define BOOST_ASIO_IP_NETWORK_V4_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/detail/string_view.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/ip/address_v4_range.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Represents an IPv4 network.
-/**
- * The boost::asio::ip::network_v4 class provides the ability to use and
- * manipulate IP version 4 networks.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class network_v4
-{
-public:
- /// Default constructor.
- network_v4() BOOST_ASIO_NOEXCEPT
- : address_(),
- prefix_length_(0)
- {
- }
-
- /// Construct a network based on the specified address and prefix length.
- BOOST_ASIO_DECL network_v4(const address_v4& addr,
- unsigned short prefix_len);
-
- /// Construct network based on the specified address and netmask.
- BOOST_ASIO_DECL network_v4(const address_v4& addr,
- const address_v4& mask);
-
- /// Copy constructor.
- network_v4(const network_v4& other) BOOST_ASIO_NOEXCEPT
- : address_(other.address_),
- prefix_length_(other.prefix_length_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- network_v4(network_v4&& other) BOOST_ASIO_NOEXCEPT
- : address_(BOOST_ASIO_MOVE_CAST(address_v4)(other.address_)),
- prefix_length_(other.prefix_length_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another network.
- network_v4& operator=(const network_v4& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = other.address_;
- prefix_length_ = other.prefix_length_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another network.
- network_v4& operator=(network_v4&& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = BOOST_ASIO_MOVE_CAST(address_v4)(other.address_);
- prefix_length_ = other.prefix_length_;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Obtain the address object specified when the network object was created.
- address_v4 address() const BOOST_ASIO_NOEXCEPT
- {
- return address_;
- }
-
- /// Obtain the prefix length that was specified when the network object was
- /// created.
- unsigned short prefix_length() const BOOST_ASIO_NOEXCEPT
- {
- return prefix_length_;
- }
-
- /// Obtain the netmask that was specified when the network object was created.
- BOOST_ASIO_DECL address_v4 netmask() const BOOST_ASIO_NOEXCEPT;
-
- /// Obtain an address object that represents the network address.
- address_v4 network() const BOOST_ASIO_NOEXCEPT
- {
- return address_v4(address_.to_uint() & netmask().to_uint());
- }
-
- /// Obtain an address object that represents the network's broadcast address.
- address_v4 broadcast() const BOOST_ASIO_NOEXCEPT
- {
- return address_v4(network().to_uint() | (netmask().to_uint() ^ 0xFFFFFFFF));
- }
-
- /// Obtain an address range corresponding to the hosts in the network.
- BOOST_ASIO_DECL address_v4_range hosts() const BOOST_ASIO_NOEXCEPT;
-
- /// Obtain the true network address, omitting any host bits.
- network_v4 canonical() const BOOST_ASIO_NOEXCEPT
- {
- return network_v4(network(), netmask());
- }
-
- /// Test if network is a valid host address.
- bool is_host() const BOOST_ASIO_NOEXCEPT
- {
- return prefix_length_ == 32;
- }
-
- /// Test if a network is a real subnet of another network.
- BOOST_ASIO_DECL bool is_subnet_of(const network_v4& other) const;
-
- /// Get the network as an address in dotted decimal format.
- BOOST_ASIO_DECL std::string to_string() const;
-
- /// Get the network as an address in dotted decimal format.
- BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
-
- /// Compare two networks for equality.
- friend bool operator==(const network_v4& a, const network_v4& b)
- {
- return a.address_ == b.address_ && a.prefix_length_ == b.prefix_length_;
- }
-
- /// Compare two networks for inequality.
- friend bool operator!=(const network_v4& a, const network_v4& b)
- {
- return !(a == b);
- }
-
-private:
- address_v4 address_;
- unsigned short prefix_length_;
-};
-
-/// Create an IPv4 network from an address and prefix length.
-/**
- * @relates address_v4
- */
-inline network_v4 make_network_v4(
- const address_v4& addr, unsigned short prefix_len)
-{
- return network_v4(addr, prefix_len);
-}
-
-/// Create an IPv4 network from an address and netmask.
-/**
- * @relates address_v4
- */
-inline network_v4 make_network_v4(
- const address_v4& addr, const address_v4& mask)
-{
- return network_v4(addr, mask);
-}
-
-/// Create an IPv4 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v4
- */
-BOOST_ASIO_DECL network_v4 make_network_v4(const char* str);
-
-/// Create an IPv4 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v4
- */
-BOOST_ASIO_DECL network_v4 make_network_v4(
- const char* str, boost::system::error_code& ec);
-
-/// Create an IPv4 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v4
- */
-BOOST_ASIO_DECL network_v4 make_network_v4(const std::string& str);
-
-/// Create an IPv4 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v4
- */
-BOOST_ASIO_DECL network_v4 make_network_v4(
- const std::string& str, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Create an IPv4 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v4
- */
-BOOST_ASIO_DECL network_v4 make_network_v4(string_view str);
-
-/// Create an IPv4 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v4
- */
-BOOST_ASIO_DECL network_v4 make_network_v4(
- string_view str, boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
- // || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Output a network as a string.
-/**
- * Used to output a human-readable string for a specified network.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param net The network to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::ip::address_v4
- */
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const network_v4& net);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ip/impl/network_v4.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/impl/network_v4.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_NETWORK_V4_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp
deleted file mode 100644
index 5fe96743df0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp
+++ /dev/null
@@ -1,237 +0,0 @@
-//
-// ip/network_v6.hpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_NETWORK_V6_HPP
-#define BOOST_ASIO_IP_NETWORK_V6_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/detail/string_view.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/ip/address_v6_range.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Represents an IPv6 network.
-/**
- * The boost::asio::ip::network_v6 class provides the ability to use and
- * manipulate IP version 6 networks.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class network_v6
-{
-public:
- /// Default constructor.
- network_v6() BOOST_ASIO_NOEXCEPT
- : address_(),
- prefix_length_(0)
- {
- }
-
- /// Construct a network based on the specified address and prefix length.
- BOOST_ASIO_DECL network_v6(const address_v6& addr,
- unsigned short prefix_len);
-
- /// Copy constructor.
- network_v6(const network_v6& other) BOOST_ASIO_NOEXCEPT
- : address_(other.address_),
- prefix_length_(other.prefix_length_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- network_v6(network_v6&& other) BOOST_ASIO_NOEXCEPT
- : address_(BOOST_ASIO_MOVE_CAST(address_v6)(other.address_)),
- prefix_length_(other.prefix_length_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another network.
- network_v6& operator=(const network_v6& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = other.address_;
- prefix_length_ = other.prefix_length_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another network.
- network_v6& operator=(network_v6&& other) BOOST_ASIO_NOEXCEPT
- {
- address_ = BOOST_ASIO_MOVE_CAST(address_v6)(other.address_);
- prefix_length_ = other.prefix_length_;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Obtain the address object specified when the network object was created.
- address_v6 address() const BOOST_ASIO_NOEXCEPT
- {
- return address_;
- }
-
- /// Obtain the prefix length that was specified when the network object was
- /// created.
- unsigned short prefix_length() const BOOST_ASIO_NOEXCEPT
- {
- return prefix_length_;
- }
-
- /// Obtain an address object that represents the network address.
- BOOST_ASIO_DECL address_v6 network() const BOOST_ASIO_NOEXCEPT;
-
- /// Obtain an address range corresponding to the hosts in the network.
- BOOST_ASIO_DECL address_v6_range hosts() const BOOST_ASIO_NOEXCEPT;
-
- /// Obtain the true network address, omitting any host bits.
- network_v6 canonical() const BOOST_ASIO_NOEXCEPT
- {
- return network_v6(network(), prefix_length());
- }
-
- /// Test if network is a valid host address.
- bool is_host() const BOOST_ASIO_NOEXCEPT
- {
- return prefix_length_ == 128;
- }
-
- /// Test if a network is a real subnet of another network.
- BOOST_ASIO_DECL bool is_subnet_of(const network_v6& other) const;
-
- /// Get the network as an address in dotted decimal format.
- BOOST_ASIO_DECL std::string to_string() const;
-
- /// Get the network as an address in dotted decimal format.
- BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
-
- /// Compare two networks for equality.
- friend bool operator==(const network_v6& a, const network_v6& b)
- {
- return a.address_ == b.address_ && a.prefix_length_ == b.prefix_length_;
- }
-
- /// Compare two networks for inequality.
- friend bool operator!=(const network_v6& a, const network_v6& b)
- {
- return !(a == b);
- }
-
-private:
- address_v6 address_;
- unsigned short prefix_length_;
-};
-
-/// Create an IPv6 network from an address and prefix length.
-/**
- * @relates address_v6
- */
-inline network_v6 make_network_v6(
- const address_v6& addr, unsigned short prefix_len)
-{
- return network_v6(addr, prefix_len);
-}
-
-/// Create an IPv6 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v6
- */
-BOOST_ASIO_DECL network_v6 make_network_v6(const char* str);
-
-/// Create an IPv6 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v6
- */
-BOOST_ASIO_DECL network_v6 make_network_v6(
- const char* str, boost::system::error_code& ec);
-
-/// Create an IPv6 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v6
- */
-BOOST_ASIO_DECL network_v6 make_network_v6(const std::string& str);
-
-/// Create an IPv6 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v6
- */
-BOOST_ASIO_DECL network_v6 make_network_v6(
- const std::string& str, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Create an IPv6 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v6
- */
-BOOST_ASIO_DECL network_v6 make_network_v6(string_view str);
-
-/// Create an IPv6 network from a string containing IP address and prefix
-/// length.
-/**
- * @relates network_v6
- */
-BOOST_ASIO_DECL network_v6 make_network_v6(
- string_view str, boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
- // || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Output a network as a string.
-/**
- * Used to output a human-readable string for a specified network.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param net The network to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::ip::address_v6
- */
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const network_v6& net);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ip/impl/network_v6.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ip/impl/network_v6.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_IP_NETWORK_V6_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp
deleted file mode 100644
index 06cbcd02202..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// ip/resolver_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_IP_RESOLVER_BASE_HPP
-#define BOOST_ASIO_IP_RESOLVER_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/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// The resolver_base class is used as a base for the basic_resolver class
-/// templates to provide a common place to define the flag constants.
-class resolver_base
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// A bitmask type (C++ Std [lib.bitmask.types]).
- typedef unspecified flags;
-
- /// Determine the canonical name of the host specified in the query.
- static const flags canonical_name = implementation_defined;
-
- /// Indicate that returned endpoint is intended for use as a locally bound
- /// socket endpoint.
- static const flags passive = implementation_defined;
-
- /// Host name should be treated as a numeric string defining an IPv4 or IPv6
- /// address and no name resolution should be attempted.
- static const flags numeric_host = implementation_defined;
-
- /// Service name should be treated as a numeric string defining a port number
- /// and no name resolution should be attempted.
- static const flags numeric_service = implementation_defined;
-
- /// If the query protocol family is specified as IPv6, return IPv4-mapped
- /// IPv6 addresses on finding no IPv6 addresses.
- static const flags v4_mapped = implementation_defined;
-
- /// If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
- static const flags all_matching = implementation_defined;
-
- /// Only return IPv4 addresses if a non-loopback IPv4 address is configured
- /// for the system. Only return IPv6 addresses if a non-loopback IPv6 address
- /// is configured for the system.
- static const flags address_configured = implementation_defined;
-#else
- enum flags
- {
- canonical_name = BOOST_ASIO_OS_DEF(AI_CANONNAME),
- passive = BOOST_ASIO_OS_DEF(AI_PASSIVE),
- numeric_host = BOOST_ASIO_OS_DEF(AI_NUMERICHOST),
- numeric_service = BOOST_ASIO_OS_DEF(AI_NUMERICSERV),
- v4_mapped = BOOST_ASIO_OS_DEF(AI_V4MAPPED),
- all_matching = BOOST_ASIO_OS_DEF(AI_ALL),
- address_configured = BOOST_ASIO_OS_DEF(AI_ADDRCONFIG)
- };
-
- // Implement bitmask operations as shown in C++ Std [lib.bitmask.types].
-
- friend flags operator&(flags x, flags y)
- {
- return static_cast<flags>(
- static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
- }
-
- friend flags operator|(flags x, flags y)
- {
- return static_cast<flags>(
- static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
- }
-
- friend flags operator^(flags x, flags y)
- {
- return static_cast<flags>(
- static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
- }
-
- friend flags operator~(flags x)
- {
- return static_cast<flags>(~static_cast<unsigned int>(x));
- }
-
- friend flags& operator&=(flags& x, flags y)
- {
- x = x & y;
- return x;
- }
-
- friend flags& operator|=(flags& x, flags y)
- {
- x = x | y;
- return x;
- }
-
- friend flags& operator^=(flags& x, flags y)
- {
- x = x ^ y;
- return x;
- }
-#endif
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~resolver_base()
- {
- }
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_RESOLVER_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp
deleted file mode 100644
index 1e287c6225b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// ip/resolver_query_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_IP_RESOLVER_QUERY_BASE_HPP
-#define BOOST_ASIO_IP_RESOLVER_QUERY_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/ip/resolver_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// The resolver_query_base class is used as a base for the
-/// basic_resolver_query class templates to provide a common place to define
-/// the flag constants.
-class resolver_query_base : public resolver_base
-{
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~resolver_query_base()
- {
- }
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_RESOLVER_QUERY_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp
deleted file mode 100644
index 3e1fd38a70c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp
+++ /dev/null
@@ -1,202 +0,0 @@
-//
-// ip/resolver_service.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_RESOLVER_SERVICE_HPP
-#define BOOST_ASIO_IP_RESOLVER_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/async_result.hpp>
-#include <boost/system/error_code.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>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_resolver_service.hpp>
-#else
-# include <boost/asio/detail/resolver_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Default service implementation for a resolver.
-template <typename InternetProtocol>
-class resolver_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<
- resolver_service<InternetProtocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef InternetProtocol protocol_type;
-
- /// The endpoint type.
- typedef typename InternetProtocol::endpoint endpoint_type;
-
- /// The query type.
- typedef basic_resolver_query<InternetProtocol> query_type;
-
- /// The iterator type.
- typedef basic_resolver_iterator<InternetProtocol> iterator_type;
-
- /// The results type.
- typedef basic_resolver_results<InternetProtocol> results_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef boost::asio::detail::winrt_resolver_service<InternetProtocol>
- service_impl_type;
-#else
- typedef boost::asio::detail::resolver_service<InternetProtocol>
- service_impl_type;
-#endif
-
-public:
- /// The type of a resolver implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new resolver service for the specified io_context.
- explicit resolver_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- resolver_service<InternetProtocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new resolver implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new resolver implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another resolver implementation.
- void move_assign(implementation_type& impl,
- resolver_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a resolver implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Cancel pending asynchronous operations.
- void cancel(implementation_type& impl)
- {
- service_impl_.cancel(impl);
- }
-
- /// Resolve a query to a list of entries.
- results_type resolve(implementation_type& impl, const query_type& query,
- boost::system::error_code& ec)
- {
- return service_impl_.resolve(impl, query, ec);
- }
-
- /// Asynchronously resolve a query to a list of entries.
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(implementation_type& impl, const query_type& query,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- service_impl_.async_resolve(impl, query, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Resolve an endpoint to a list of entries.
- results_type resolve(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- return service_impl_.resolve(impl, endpoint, ec);
- }
-
- /// Asynchronously resolve an endpoint to a list of entries.
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(implementation_type& impl, const endpoint_type& endpoint,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- service_impl_.async_resolve(impl, endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(boost::asio::io_context::fork_event event)
- {
- service_impl_.notify_fork(event);
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_IP_RESOLVER_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp
deleted file mode 100644
index dce1c8ee6a3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp
+++ /dev/null
@@ -1,157 +0,0 @@
-//
-// ip/tcp.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_TCP_HPP
-#define BOOST_ASIO_IP_TCP_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/basic_socket_acceptor.hpp>
-#include <boost/asio/basic_socket_iostream.hpp>
-#include <boost/asio/basic_stream_socket.hpp>
-#include <boost/asio/detail/socket_option.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/ip/basic_endpoint.hpp>
-#include <boost/asio/ip/basic_resolver.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Encapsulates the flags needed for TCP.
-/**
- * The boost::asio::ip::tcp class contains flags necessary for TCP sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol, InternetProtocol.
- */
-class tcp
-{
-public:
- /// The type of a TCP endpoint.
- typedef basic_endpoint<tcp> endpoint;
-
- /// Construct to represent the IPv4 TCP protocol.
- static tcp v4()
- {
- return tcp(BOOST_ASIO_OS_DEF(AF_INET));
- }
-
- /// Construct to represent the IPv6 TCP protocol.
- static tcp v6()
- {
- return tcp(BOOST_ASIO_OS_DEF(AF_INET6));
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_STREAM);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return BOOST_ASIO_OS_DEF(IPPROTO_TCP);
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// The TCP socket type.
- typedef basic_stream_socket<tcp> socket;
-
- /// The TCP acceptor type.
- typedef basic_socket_acceptor<tcp> acceptor;
-
- /// The TCP resolver type.
- typedef basic_resolver<tcp> resolver;
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
- /// The TCP iostream type.
- typedef basic_socket_iostream<tcp> iostream;
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
- /// Socket option for disabling the Nagle algorithm.
- /**
- * Implements the IPPROTO_TCP/TCP_NODELAY socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::no_delay option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::tcp::no_delay option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined no_delay;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(IPPROTO_TCP), BOOST_ASIO_OS_DEF(TCP_NODELAY)> no_delay;
-#endif
-
- /// Compare two protocols for equality.
- friend bool operator==(const tcp& p1, const tcp& p2)
- {
- return p1.family_ == p2.family_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const tcp& p1, const tcp& p2)
- {
- return p1.family_ != p2.family_;
- }
-
-private:
- // Construct with a specific family.
- explicit tcp(int protocol_family)
- : family_(protocol_family)
- {
- }
-
- int family_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_TCP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp
deleted file mode 100644
index 9f07a55e7e9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// ip/udp.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_UDP_HPP
-#define BOOST_ASIO_IP_UDP_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/basic_datagram_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/ip/basic_endpoint.hpp>
-#include <boost/asio/ip/basic_resolver.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Encapsulates the flags needed for UDP.
-/**
- * The boost::asio::ip::udp class contains flags necessary for UDP sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol, InternetProtocol.
- */
-class udp
-{
-public:
- /// The type of a UDP endpoint.
- typedef basic_endpoint<udp> endpoint;
-
- /// Construct to represent the IPv4 UDP protocol.
- static udp v4()
- {
- return udp(BOOST_ASIO_OS_DEF(AF_INET));
- }
-
- /// Construct to represent the IPv6 UDP protocol.
- static udp v6()
- {
- return udp(BOOST_ASIO_OS_DEF(AF_INET6));
- }
-
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return BOOST_ASIO_OS_DEF(SOCK_DGRAM);
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return BOOST_ASIO_OS_DEF(IPPROTO_UDP);
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return family_;
- }
-
- /// The UDP socket type.
- typedef basic_datagram_socket<udp> socket;
-
- /// The UDP resolver type.
- typedef basic_resolver<udp> resolver;
-
- /// Compare two protocols for equality.
- friend bool operator==(const udp& p1, const udp& p2)
- {
- return p1.family_ == p2.family_;
- }
-
- /// Compare two protocols for inequality.
- friend bool operator!=(const udp& p1, const udp& p2)
- {
- return p1.family_ != p2.family_;
- }
-
-private:
- // Construct with a specific family.
- explicit udp(int protocol_family)
- : family_(protocol_family)
- {
- }
-
- int family_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_UDP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp
deleted file mode 100644
index 793c5f7eb45..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// ip/unicast.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_UNICAST_HPP
-#define BOOST_ASIO_IP_UNICAST_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/ip/detail/socket_option.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-namespace unicast {
-
-/// Socket option for time-to-live associated with outgoing unicast packets.
-/**
- * Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::unicast::hops option(4);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::ip::unicast::hops option;
- * socket.get_option(option);
- * int ttl = option.value();
- * @endcode
- *
- * @par Concepts:
- * GettableSocketOption, SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined hops;
-#else
-typedef boost::asio::ip::detail::socket_option::unicast_hops<
- BOOST_ASIO_OS_DEF(IPPROTO_IP),
- BOOST_ASIO_OS_DEF(IP_TTL),
- BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
- BOOST_ASIO_OS_DEF(IPV6_UNICAST_HOPS)> hops;
-#endif
-
-} // namespace unicast
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_UNICAST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp
deleted file mode 100644
index c2f34acc110..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// ip/v6_only.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_V6_ONLY_HPP
-#define BOOST_ASIO_IP_V6_ONLY_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/socket_option.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Socket option for determining whether an IPv6 socket supports IPv6
-/// communication only.
-/**
- * Implements the IPPROTO_IPV6/IP_V6ONLY socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::v6_only option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::ip::v6_only option;
- * socket.get_option(option);
- * bool v6_only = option.value();
- * @endcode
- *
- * @par Concepts:
- * GettableSocketOption, SettableSocketOption.
- */
-#if defined(GENERATING_DOCUMENTATION)
-typedef implementation_defined v6_only;
-#elif defined(IPV6_V6ONLY)
-typedef boost::asio::detail::socket_option::boolean<
- IPPROTO_IPV6, IPV6_V6ONLY> v6_only;
-#else
-typedef boost::asio::detail::socket_option::boolean<
- boost::asio::detail::custom_socket_option_level,
- boost::asio::detail::always_fail_option> v6_only;
-#endif
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_V6_ONLY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/is_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/is_executor.hpp
deleted file mode 100644
index 85704752413..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/is_executor.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// is_executor.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_IS_EXECUTOR_HPP
-#define BOOST_ASIO_IS_EXECUTOR_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/is_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// The is_executor trait detects whether a type T meets the Executor type
-/// requirements.
-/**
- * Class template @c is_executor is a UnaryTypeTrait that is derived from @c
- * true_type if the type @c T meets the syntactic requirements for Executor,
- * otherwise @c false_type.
- */
-template <typename T>
-struct is_executor
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : boost::asio::detail::is_executor<T>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IS_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp b/src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp
deleted file mode 100644
index 4839bc53a76..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// is_read_buffered.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_IS_READ_BUFFERED_HPP
-#define BOOST_ASIO_IS_READ_BUFFERED_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/buffered_read_stream_fwd.hpp>
-#include <boost/asio/buffered_stream_fwd.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail {
-
-template <typename Stream>
-char is_read_buffered_helper(buffered_stream<Stream>* s);
-
-template <typename Stream>
-char is_read_buffered_helper(buffered_read_stream<Stream>* s);
-
-struct is_read_buffered_big_type { char data[10]; };
-is_read_buffered_big_type is_read_buffered_helper(...);
-
-} // namespace detail
-
-/// The is_read_buffered class is a traits class that may be used to determine
-/// whether a stream type supports buffering of read data.
-template <typename Stream>
-class is_read_buffered
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The value member is true only if the Stream type supports buffering of
- /// read data.
- static const bool value;
-#else
- BOOST_ASIO_STATIC_CONSTANT(bool,
- value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1);
-#endif
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IS_READ_BUFFERED_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp b/src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp
deleted file mode 100644
index f18e981ba82..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// is_write_buffered.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_IS_WRITE_BUFFERED_HPP
-#define BOOST_ASIO_IS_WRITE_BUFFERED_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/buffered_stream_fwd.hpp>
-#include <boost/asio/buffered_write_stream_fwd.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail {
-
-template <typename Stream>
-char is_write_buffered_helper(buffered_stream<Stream>* s);
-
-template <typename Stream>
-char is_write_buffered_helper(buffered_write_stream<Stream>* s);
-
-struct is_write_buffered_big_type { char data[10]; };
-is_write_buffered_big_type is_write_buffered_helper(...);
-
-} // namespace detail
-
-/// The is_write_buffered class is a traits class that may be used to determine
-/// whether a stream type supports buffering of written data.
-template <typename Stream>
-class is_write_buffered
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The value member is true only if the Stream type supports buffering of
- /// written data.
- static const bool value;
-#else
- BOOST_ASIO_STATIC_CONSTANT(bool,
- value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1);
-#endif
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IS_WRITE_BUFFERED_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp
deleted file mode 100644
index 248c4a809e1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp
+++ /dev/null
@@ -1,241 +0,0 @@
-//
-// local/basic_endpoint.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Derived from a public domain implementation written by Daniel Casimiro.
-//
-// Distributed under the 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_LOCAL_BASIC_ENDPOINT_HPP
-#define BOOST_ASIO_LOCAL_BASIC_ENDPOINT_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_LOCAL_SOCKETS) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/local/detail/endpoint.hpp>
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# include <iosfwd>
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace local {
-
-/// Describes an endpoint for a UNIX socket.
-/**
- * The boost::asio::local::basic_endpoint class template describes an endpoint
- * that may be associated with a particular UNIX socket.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * Endpoint.
- */
-template <typename Protocol>
-class basic_endpoint
-{
-public:
- /// The protocol type associated with the endpoint.
- typedef Protocol protocol_type;
-
- /// The type of the endpoint structure. This type is dependent on the
- /// underlying implementation of the socket layer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined data_type;
-#else
- typedef boost::asio::detail::socket_addr_type data_type;
-#endif
-
- /// Default constructor.
- basic_endpoint()
- {
- }
-
- /// Construct an endpoint using the specified path name.
- basic_endpoint(const char* path_name)
- : impl_(path_name)
- {
- }
-
- /// Construct an endpoint using the specified path name.
- basic_endpoint(const std::string& path_name)
- : impl_(path_name)
- {
- }
-
- /// Copy constructor.
- basic_endpoint(const basic_endpoint& other)
- : impl_(other.impl_)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move constructor.
- basic_endpoint(basic_endpoint&& other)
- : impl_(other.impl_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other)
- {
- impl_ = other.impl_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other)
- {
- impl_ = other.impl_;
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// The protocol associated with the endpoint.
- protocol_type protocol() const
- {
- return protocol_type();
- }
-
- /// Get the underlying endpoint in the native type.
- data_type* data()
- {
- return impl_.data();
- }
-
- /// Get the underlying endpoint in the native type.
- const data_type* data() const
- {
- return impl_.data();
- }
-
- /// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
- {
- return impl_.size();
- }
-
- /// Set the underlying size of the endpoint in the native type.
- void resize(std::size_t new_size)
- {
- impl_.resize(new_size);
- }
-
- /// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
- {
- return impl_.capacity();
- }
-
- /// Get the path associated with the endpoint.
- std::string path() const
- {
- return impl_.path();
- }
-
- /// Set the path associated with the endpoint.
- void path(const char* p)
- {
- impl_.path(p);
- }
-
- /// Set the path associated with the endpoint.
- void path(const std::string& p)
- {
- impl_.path(p);
- }
-
- /// Compare two endpoints for equality.
- friend bool operator==(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return e1.impl_ == e2.impl_;
- }
-
- /// Compare two endpoints for inequality.
- friend bool operator!=(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return !(e1.impl_ == e2.impl_);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return e1.impl_ < e2.impl_;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return e2.impl_ < e1.impl_;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<=(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return !(e2 < e1);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>=(const basic_endpoint<Protocol>& e1,
- const basic_endpoint<Protocol>& e2)
- {
- return !(e1 < e2);
- }
-
-private:
- // The underlying UNIX domain endpoint.
- boost::asio::local::detail::endpoint impl_;
-};
-
-/// Output an endpoint as a string.
-/**
- * Used to output a human-readable string for a specified endpoint.
- *
- * @param os The output stream to which the string will be written.
- *
- * @param endpoint The endpoint to be written.
- *
- * @return The output stream.
- *
- * @relates boost::asio::local::basic_endpoint
- */
-template <typename Elem, typename Traits, typename Protocol>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os,
- const basic_endpoint<Protocol>& endpoint)
-{
- os << endpoint.path();
- return os;
-}
-
-} // namespace local
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_LOCAL_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp b/src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp
deleted file mode 100644
index 10a3f6d2b1a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// local/connect_pair.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_LOCAL_CONNECT_PAIR_HPP
-#define BOOST_ASIO_LOCAL_CONNECT_PAIR_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_LOCAL_SOCKETS) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_socket.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/local/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace local {
-
-/// Create a pair of connected sockets.
-template <typename Protocol BOOST_ASIO_SVC_TPARAM BOOST_ASIO_SVC_TPARAM1>
-void connect_pair(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol BOOST_ASIO_SVC_TARG1>& socket2);
-
-/// Create a pair of connected sockets.
-template <typename Protocol BOOST_ASIO_SVC_TPARAM BOOST_ASIO_SVC_TPARAM1>
-BOOST_ASIO_SYNC_OP_VOID connect_pair(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol BOOST_ASIO_SVC_TARG1>& socket2,
- boost::system::error_code& ec);
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM BOOST_ASIO_SVC_TPARAM1>
-inline void connect_pair(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol BOOST_ASIO_SVC_TARG1>& socket2)
-{
- boost::system::error_code ec;
- connect_pair(socket1, socket2, ec);
- boost::asio::detail::throw_error(ec, "connect_pair");
-}
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM BOOST_ASIO_SVC_TPARAM1>
-inline BOOST_ASIO_SYNC_OP_VOID connect_pair(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol BOOST_ASIO_SVC_TARG1>& socket2,
- boost::system::error_code& ec)
-{
- // Check that this function is only being used with a UNIX domain socket.
- boost::asio::local::basic_endpoint<Protocol>* tmp
- = static_cast<typename Protocol::endpoint*>(0);
- (void)tmp;
-
- Protocol protocol;
- boost::asio::detail::socket_type sv[2];
- if (boost::asio::detail::socket_ops::socketpair(protocol.family(),
- protocol.type(), protocol.protocol(), sv, ec)
- == boost::asio::detail::socket_error_retval)
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-
- socket1.assign(protocol, sv[0], ec);
- if (ec)
- {
- boost::system::error_code temp_ec;
- boost::asio::detail::socket_ops::state_type state[2] = { 0, 0 };
- boost::asio::detail::socket_ops::close(sv[0], state[0], true, temp_ec);
- boost::asio::detail::socket_ops::close(sv[1], state[1], true, temp_ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- socket2.assign(protocol, sv[1], ec);
- if (ec)
- {
- boost::system::error_code temp_ec;
- socket1.close(temp_ec);
- boost::asio::detail::socket_ops::state_type state = 0;
- boost::asio::detail::socket_ops::close(sv[1], state, true, temp_ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-} // namespace local
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_LOCAL_CONNECT_PAIR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp
deleted file mode 100644
index c6643230137..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// local/datagram_protocol.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_LOCAL_DATAGRAM_PROTOCOL_HPP
-#define BOOST_ASIO_LOCAL_DATAGRAM_PROTOCOL_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_LOCAL_SOCKETS) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_datagram_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/local/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace local {
-
-/// Encapsulates the flags needed for datagram-oriented UNIX sockets.
-/**
- * The boost::asio::local::datagram_protocol class contains flags necessary for
- * datagram-oriented UNIX domain sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol.
- */
-class datagram_protocol
-{
-public:
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return SOCK_DGRAM;
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return 0;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return AF_UNIX;
- }
-
- /// The type of a UNIX domain endpoint.
- typedef basic_endpoint<datagram_protocol> endpoint;
-
- /// The UNIX domain socket type.
- typedef basic_datagram_socket<datagram_protocol> socket;
-};
-
-} // namespace local
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp
deleted file mode 100644
index 52d6246ae9d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// local/detail/endpoint.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Derived from a public domain implementation written by Daniel Casimiro.
-//
-// Distributed under the 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_LOCAL_DETAIL_ENDPOINT_HPP
-#define BOOST_ASIO_LOCAL_DETAIL_ENDPOINT_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_LOCAL_SOCKETS)
-
-#include <cstddef>
-#include <string>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace local {
-namespace detail {
-
-// Helper class for implementing a UNIX domain endpoint.
-class endpoint
-{
-public:
- // Default constructor.
- BOOST_ASIO_DECL endpoint();
-
- // Construct an endpoint using the specified path name.
- BOOST_ASIO_DECL endpoint(const char* path_name);
-
- // Construct an endpoint using the specified path name.
- BOOST_ASIO_DECL endpoint(const std::string& path_name);
-
- // Copy constructor.
- endpoint(const endpoint& other)
- : data_(other.data_),
- path_length_(other.path_length_)
- {
- }
-
- // Assign from another endpoint.
- endpoint& operator=(const endpoint& other)
- {
- data_ = other.data_;
- path_length_ = other.path_length_;
- return *this;
- }
-
- // Get the underlying endpoint in the native type.
- boost::asio::detail::socket_addr_type* data()
- {
- return &data_.base;
- }
-
- // Get the underlying endpoint in the native type.
- const boost::asio::detail::socket_addr_type* data() const
- {
- return &data_.base;
- }
-
- // Get the underlying size of the endpoint in the native type.
- std::size_t size() const
- {
- return path_length_
- + offsetof(boost::asio::detail::sockaddr_un_type, sun_path);
- }
-
- // Set the underlying size of the endpoint in the native type.
- BOOST_ASIO_DECL void resize(std::size_t size);
-
- // Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
- {
- return sizeof(boost::asio::detail::sockaddr_un_type);
- }
-
- // Get the path associated with the endpoint.
- BOOST_ASIO_DECL std::string path() const;
-
- // Set the path associated with the endpoint.
- BOOST_ASIO_DECL void path(const char* p);
-
- // Set the path associated with the endpoint.
- BOOST_ASIO_DECL void path(const std::string& p);
-
- // Compare two endpoints for equality.
- BOOST_ASIO_DECL friend bool operator==(
- const endpoint& e1, const endpoint& e2);
-
- // Compare endpoints for ordering.
- BOOST_ASIO_DECL friend bool operator<(
- const endpoint& e1, const endpoint& e2);
-
-private:
- // The underlying UNIX socket address.
- union data_union
- {
- boost::asio::detail::socket_addr_type base;
- boost::asio::detail::sockaddr_un_type local;
- } data_;
-
- // The length of the path associated with the endpoint.
- std::size_t path_length_;
-
- // Initialise with a specified path.
- BOOST_ASIO_DECL void init(const char* path, std::size_t path_length);
-};
-
-} // namespace detail
-} // namespace local
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/local/detail/impl/endpoint.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
-
-#endif // BOOST_ASIO_LOCAL_DETAIL_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp b/src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp
deleted file mode 100644
index 3d6a800414b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// local/detail/impl/endpoint.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Derived from a public domain implementation written by Daniel Casimiro.
-//
-// Distributed under the 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_LOCAL_DETAIL_IMPL_ENDPOINT_IPP
-#define BOOST_ASIO_LOCAL_DETAIL_IMPL_ENDPOINT_IPP
-
-#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_LOCAL_SOCKETS)
-
-#include <cstring>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/local/detail/endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace local {
-namespace detail {
-
-endpoint::endpoint()
-{
- init("", 0);
-}
-
-endpoint::endpoint(const char* path_name)
-{
- using namespace std; // For strlen.
- init(path_name, strlen(path_name));
-}
-
-endpoint::endpoint(const std::string& path_name)
-{
- init(path_name.data(), path_name.length());
-}
-
-void endpoint::resize(std::size_t new_size)
-{
- if (new_size > sizeof(boost::asio::detail::sockaddr_un_type))
- {
- boost::system::error_code ec(boost::asio::error::invalid_argument);
- boost::asio::detail::throw_error(ec);
- }
- else if (new_size == 0)
- {
- path_length_ = 0;
- }
- else
- {
- path_length_ = new_size
- - offsetof(boost::asio::detail::sockaddr_un_type, sun_path);
-
- // The path returned by the operating system may be NUL-terminated.
- if (path_length_ > 0 && data_.local.sun_path[path_length_ - 1] == 0)
- --path_length_;
- }
-}
-
-std::string endpoint::path() const
-{
- return std::string(data_.local.sun_path, path_length_);
-}
-
-void endpoint::path(const char* p)
-{
- using namespace std; // For strlen.
- init(p, strlen(p));
-}
-
-void endpoint::path(const std::string& p)
-{
- init(p.data(), p.length());
-}
-
-bool operator==(const endpoint& e1, const endpoint& e2)
-{
- return e1.path() == e2.path();
-}
-
-bool operator<(const endpoint& e1, const endpoint& e2)
-{
- return e1.path() < e2.path();
-}
-
-void endpoint::init(const char* path_name, std::size_t path_length)
-{
- if (path_length > sizeof(data_.local.sun_path) - 1)
- {
- // The buffer is not large enough to store this address.
- boost::system::error_code ec(boost::asio::error::name_too_long);
- boost::asio::detail::throw_error(ec);
- }
-
- using namespace std; // For memcpy.
- data_.local = boost::asio::detail::sockaddr_un_type();
- data_.local.sun_family = AF_UNIX;
- if (path_length > 0)
- memcpy(data_.local.sun_path, path_name, path_length);
- path_length_ = path_length;
-
- // NUL-terminate normal path names. Names that start with a NUL are in the
- // UNIX domain protocol's "abstract namespace" and are not NUL-terminated.
- if (path_length > 0 && data_.local.sun_path[0] == 0)
- data_.local.sun_path[path_length] = 0;
-}
-
-} // namespace detail
-} // namespace local
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
-
-#endif // BOOST_ASIO_LOCAL_DETAIL_IMPL_ENDPOINT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp
deleted file mode 100644
index 65fdbf1a904..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// local/stream_protocol.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_LOCAL_STREAM_PROTOCOL_HPP
-#define BOOST_ASIO_LOCAL_STREAM_PROTOCOL_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_LOCAL_SOCKETS) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_socket_acceptor.hpp>
-#include <boost/asio/basic_socket_iostream.hpp>
-#include <boost/asio/basic_stream_socket.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/local/basic_endpoint.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace local {
-
-/// Encapsulates the flags needed for stream-oriented UNIX sockets.
-/**
- * The boost::asio::local::stream_protocol class contains flags necessary for
- * stream-oriented UNIX domain sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe.
- *
- * @par Concepts:
- * Protocol.
- */
-class stream_protocol
-{
-public:
- /// Obtain an identifier for the type of the protocol.
- int type() const
- {
- return SOCK_STREAM;
- }
-
- /// Obtain an identifier for the protocol.
- int protocol() const
- {
- return 0;
- }
-
- /// Obtain an identifier for the protocol family.
- int family() const
- {
- return AF_UNIX;
- }
-
- /// The type of a UNIX domain endpoint.
- typedef basic_endpoint<stream_protocol> endpoint;
-
- /// The UNIX domain socket type.
- typedef basic_stream_socket<stream_protocol> socket;
-
- /// The UNIX domain acceptor type.
- typedef basic_socket_acceptor<stream_protocol> acceptor;
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
- /// The UNIX domain iostream type.
- typedef basic_socket_iostream<stream_protocol> iostream;
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-};
-
-} // namespace local
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // 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
deleted file mode 100644
index 4928a1cc7a8..00000000000
--- a/src/third_party/boost-1.69.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>
-#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.69.0/boost/asio/placeholders.hpp b/src/third_party/boost-1.69.0/boost/asio/placeholders.hpp
deleted file mode 100644
index 50e399ed28d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/placeholders.hpp
+++ /dev/null
@@ -1,153 +0,0 @@
-//
-// placeholders.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_PLACEHOLDERS_HPP
-#define BOOST_ASIO_PLACEHOLDERS_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_BOOST_BIND)
-# include <boost/bind/arg.hpp>
-#endif // defined(BOOST_ASIO_HAS_BOOST_BIND)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace placeholders {
-
-#if defined(GENERATING_DOCUMENTATION)
-
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the error argument of a handler for any of the asynchronous functions.
-unspecified error;
-
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the bytes_transferred argument of a handler for asynchronous functions such
-/// as boost::asio::basic_stream_socket::async_write_some or
-/// boost::asio::async_write.
-unspecified bytes_transferred;
-
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the iterator argument of a handler for asynchronous functions such as
-/// boost::asio::async_connect.
-unspecified iterator;
-
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the results argument of a handler for asynchronous functions such as
-/// boost::asio::basic_resolver::async_resolve.
-unspecified results;
-
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the results argument of a handler for asynchronous functions such as
-/// boost::asio::async_connect.
-unspecified endpoint;
-
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the signal_number argument of a handler for asynchronous functions such as
-/// boost::asio::signal_set::async_wait.
-unspecified signal_number;
-
-#elif defined(BOOST_ASIO_HAS_BOOST_BIND)
-# if defined(__BORLANDC__) || defined(__GNUC__)
-
-inline boost::arg<1> error()
-{
- return boost::arg<1>();
-}
-
-inline boost::arg<2> bytes_transferred()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> iterator()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> results()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> endpoint()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> signal_number()
-{
- return boost::arg<2>();
-}
-
-# else
-
-namespace detail
-{
- template <int Number>
- struct placeholder
- {
- static boost::arg<Number>& get()
- {
- static boost::arg<Number> result;
- return result;
- }
- };
-}
-
-# if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC < 1400)
-
-static boost::arg<1>& error
- = boost::asio::placeholders::detail::placeholder<1>::get();
-static boost::arg<2>& bytes_transferred
- = boost::asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& iterator
- = boost::asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& results
- = boost::asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& endpoint
- = boost::asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& signal_number
- = boost::asio::placeholders::detail::placeholder<2>::get();
-
-# else
-
-namespace
-{
- boost::arg<1>& error
- = boost::asio::placeholders::detail::placeholder<1>::get();
- boost::arg<2>& bytes_transferred
- = boost::asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& iterator
- = boost::asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& results
- = boost::asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& endpoint
- = boost::asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& signal_number
- = boost::asio::placeholders::detail::placeholder<2>::get();
-} // namespace
-
-# endif
-# endif
-#endif
-
-} // namespace placeholders
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_PLACEHOLDERS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp
deleted file mode 100644
index faf5b6def20..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp
+++ /dev/null
@@ -1,584 +0,0 @@
-//
-// posix/basic_descriptor.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_POSIX_BASIC_DESCRIPTOR_HPP
-#define BOOST_ASIO_POSIX_BASIC_DESCRIPTOR_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/posix/descriptor_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace posix {
-
-/// Provides POSIX descriptor functionality.
-/**
- * The posix::basic_descriptor class template provides the ability to wrap a
- * POSIX descriptor.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename DescriptorService>
-class basic_descriptor
- : public basic_io_object<DescriptorService>,
- public descriptor_base
-{
-public:
- /// The native representation of a descriptor.
- typedef typename DescriptorService::native_handle_type native_handle_type;
-
- /// A basic_descriptor is always the lowest layer.
- typedef basic_descriptor<DescriptorService> lowest_layer_type;
-
- /// Construct a basic_descriptor without opening it.
- /**
- * This constructor creates a descriptor without opening it.
- *
- * @param io_context The io_context object that the descriptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- */
- explicit basic_descriptor(boost::asio::io_context& io_context)
- : basic_io_object<DescriptorService>(io_context)
- {
- }
-
- /// Construct a basic_descriptor on an existing native descriptor.
- /**
- * This constructor creates a descriptor object to hold an existing native
- * descriptor.
- *
- * @param io_context The io_context object that the descriptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_descriptor(boost::asio::io_context& io_context,
- const native_handle_type& native_descriptor)
- : basic_io_object<DescriptorService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_descriptor, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_descriptor from another.
- /**
- * This constructor moves a descriptor from one object to another.
- *
- * @param other The other basic_descriptor 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_descriptor(io_context&) constructor.
- */
- basic_descriptor(basic_descriptor&& other)
- : basic_io_object<DescriptorService>(
- BOOST_ASIO_MOVE_CAST(basic_descriptor)(other))
- {
- }
-
- /// Move-assign a basic_descriptor from another.
- /**
- * This assignment operator moves a descriptor from one object to another.
- *
- * @param other The other basic_descriptor 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_descriptor(io_context&) constructor.
- */
- basic_descriptor& operator=(basic_descriptor&& other)
- {
- basic_io_object<DescriptorService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_descriptor)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a basic_descriptor cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a basic_descriptor cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native descriptor to the descriptor.
- /*
- * This function opens the descriptor to hold an existing native descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& native_descriptor)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_descriptor, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native descriptor to the descriptor.
- /*
- * This function opens the descriptor to hold an existing native descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
- boost::system::error_code& ec)
- {
- this->get_service().assign(
- this->get_implementation(), native_descriptor, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the descriptor is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the descriptor.
- /**
- * This function is used to close the descriptor. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the descriptor.
- /**
- * This function is used to close the descriptor. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native descriptor representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * descriptor. This is intended to allow access to native descriptor
- * functionality that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Release ownership of the native descriptor implementation.
- /**
- * This function may be used to obtain the underlying representation of the
- * descriptor. After calling this function, @c is_open() returns false. The
- * caller is responsible for closing the descriptor.
- *
- * All outstanding asynchronous read or write operations will finish
- * immediately, and the handlers for cancelled operations will be passed the
- * boost::asio::error::operation_aborted error.
- */
- native_handle_type release()
- {
- return this->get_service().release(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the descriptor.
- /**
- * This function is used to execute an IO control command on the descriptor.
- *
- * @param command The IO control command to be performed on the descriptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa IoControlCommand @n
- * boost::asio::posix::descriptor_base::bytes_readable @n
- * boost::asio::posix::descriptor_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::asio::posix::stream_descriptor::bytes_readable command;
- * descriptor.io_control(command);
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- void io_control(IoControlCommand& command)
- {
- boost::system::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
- boost::asio::detail::throw_error(ec, "io_control");
- }
-
- /// Perform an IO control command on the descriptor.
- /**
- * This function is used to execute an IO control command on the descriptor.
- *
- * @param command The IO control command to be performed on the descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa IoControlCommand @n
- * boost::asio::posix::descriptor_base::bytes_readable @n
- * boost::asio::posix::descriptor_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::asio::posix::stream_descriptor::bytes_readable command;
- * boost::system::error_code ec;
- * descriptor.io_control(command, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
- boost::system::error_code& ec)
- {
- this->get_service().io_control(this->get_implementation(), command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the descriptor.
- /**
- * @returns @c true if the descriptor's synchronous operations will fail with
- * boost::asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- bool non_blocking() const
- {
- return this->get_service().non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the descriptor.
- /**
- * @param mode If @c true, the descriptor's synchronous operations will fail
- * with boost::asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- void non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "non_blocking");
- }
-
- /// Sets the non-blocking mode of the descriptor.
- /**
- * @param mode If @c true, the descriptor's synchronous operations will fail
- * with boost::asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- BOOST_ASIO_SYNC_OP_VOID non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to retrieve the non-blocking mode of the underlying
- * native descriptor. This mode has no effect on the behaviour of the
- * descriptor object's synchronous operations.
- *
- * @returns @c true if the underlying descriptor is in non-blocking mode and
- * direct system calls may fail with boost::asio::error::would_block (or the
- * equivalent system error).
- *
- * @note The current non-blocking mode is cached by the descriptor object.
- * Consequently, the return value may be incorrect if the non-blocking mode
- * was set directly on the native descriptor.
- */
- bool native_non_blocking() const
- {
- return this->get_service().native_non_blocking(
- this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native descriptor. It has no effect on the behaviour of the descriptor
- * object's synchronous operations.
- *
- * @param mode If @c true, the underlying descriptor is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @throws boost::system::system_error Thrown on failure. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- void native_non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "native_non_blocking");
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native descriptor. It has no effect on the behaviour of the descriptor
- * object's synchronous operations.
- *
- * @param mode If @c true, the underlying descriptor is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @param ec Set to indicate what error occurred, if any. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- /**
- * This function is used to perform a blocking wait for a descriptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @par Example
- * Waiting for a descriptor to become readable.
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * descriptor.wait(boost::asio::posix::stream_descriptor::wait_read);
- * @endcode
- */
- void wait(wait_type w)
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- /**
- * This function is used to perform a blocking wait for a descriptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * Waiting for a descriptor to become readable.
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::system::error_code ec;
- * descriptor.wait(boost::asio::posix::stream_descriptor::wait_read, ec);
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the descriptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- /**
- * This function is used to perform an asynchronous wait for a descriptor to
- * enter a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @param handler The handler to be called when the wait 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
- * ); @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
- * void wait_handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Wait succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * descriptor.async_wait(
- * boost::asio::posix::stream_descriptor::wait_read,
- * wait_handler);
- * @endcode
- */
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
- return this->get_service().async_wait(this->get_implementation(),
- w, BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~basic_descriptor()
- {
- }
-};
-
-} // namespace posix
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_POSIX_BASIC_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp
deleted file mode 100644
index d840703a953..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp
+++ /dev/null
@@ -1,364 +0,0 @@
-//
-// posix/basic_stream_descriptor.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_POSIX_BASIC_STREAM_DESCRIPTOR_HPP
-#define BOOST_ASIO_POSIX_BASIC_STREAM_DESCRIPTOR_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/posix/basic_descriptor.hpp>
-#include <boost/asio/posix/stream_descriptor_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace posix {
-
-/// Provides stream-oriented descriptor functionality.
-/**
- * The posix::basic_stream_descriptor class template provides asynchronous and
- * blocking stream-oriented descriptor functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename StreamDescriptorService = stream_descriptor_service>
-class basic_stream_descriptor
- : public basic_descriptor<StreamDescriptorService>
-{
-public:
- /// The native representation of a descriptor.
- typedef typename StreamDescriptorService::native_handle_type
- native_handle_type;
-
- /// Construct a basic_stream_descriptor without opening it.
- /**
- * This constructor creates a stream descriptor without opening it. The
- * descriptor needs to be opened and then connected or accepted before data
- * can be sent or received on it.
- *
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- */
- explicit basic_stream_descriptor(boost::asio::io_context& io_context)
- : basic_descriptor<StreamDescriptorService>(io_context)
- {
- }
-
- /// Construct a basic_stream_descriptor on an existing native descriptor.
- /**
- * This constructor creates a stream descriptor object to hold an existing
- * native descriptor.
- *
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- *
- * @param native_descriptor The new underlying descriptor implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_stream_descriptor(boost::asio::io_context& io_context,
- const native_handle_type& native_descriptor)
- : basic_descriptor<StreamDescriptorService>(io_context, native_descriptor)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_stream_descriptor from another.
- /**
- * This constructor moves a stream descriptor from one object to another.
- *
- * @param other The other basic_stream_descriptor 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_stream_descriptor(io_context&) constructor.
- */
- basic_stream_descriptor(basic_stream_descriptor&& other)
- : basic_descriptor<StreamDescriptorService>(
- BOOST_ASIO_MOVE_CAST(basic_stream_descriptor)(other))
- {
- }
-
- /// Move-assign a basic_stream_descriptor from another.
- /**
- * This assignment operator moves a stream descriptor from one object to
- * another.
- *
- * @param other The other basic_stream_descriptor 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_stream_descriptor(io_context&) constructor.
- */
- basic_stream_descriptor& operator=(basic_stream_descriptor&& other)
- {
- basic_descriptor<StreamDescriptorService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_stream_descriptor)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the descriptor.
- /**
- * This function is used to write data to the stream descriptor. The function
- * call will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the descriptor.
- /**
- * This function is used to write data to the stream descriptor. The function
- * call will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- *
- * @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 this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream
- * descriptor. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.async_write_some(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 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;
-
- return this->get_service().async_write_some(this->get_implementation(),
- buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Read some data from the descriptor.
- /**
- * This function is used to read data from the stream descriptor. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the descriptor.
- /**
- * This function is used to read data from the stream descriptor. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream
- * descriptor. The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.async_read_some(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.
- */
- 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;
-
- return this->get_service().async_read_some(this->get_implementation(),
- buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-};
-
-} // namespace posix
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_POSIX_BASIC_STREAM_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp
deleted file mode 100644
index be672ff11c7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp
+++ /dev/null
@@ -1,646 +0,0 @@
-//
-// posix/descriptor.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_POSIX_DESCRIPTOR_HPP
-#define BOOST_ASIO_POSIX_DESCRIPTOR_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#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/reactive_descriptor_service.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/posix/descriptor_base.hpp>
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-#define BOOST_ASIO_SVC_T boost::asio::detail::reactive_descriptor_service
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace posix {
-
-/// Provides POSIX descriptor functionality.
-/**
- * The posix::descriptor class template provides the ability to wrap a
- * POSIX descriptor.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class descriptor
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
- public descriptor_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a descriptor.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef BOOST_ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// A descriptor is always the lowest layer.
- typedef descriptor lowest_layer_type;
-
- /// Construct a descriptor without opening it.
- /**
- * This constructor creates a descriptor without opening it.
- *
- * @param io_context The io_context object that the descriptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- */
- explicit descriptor(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct a descriptor on an existing native descriptor.
- /**
- * This constructor creates a descriptor object to hold an existing native
- * descriptor.
- *
- * @param io_context The io_context object that the descriptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- descriptor(boost::asio::io_context& io_context,
- const native_handle_type& native_descriptor)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_descriptor, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a descriptor from another.
- /**
- * This constructor moves a descriptor from one object to another.
- *
- * @param other The other descriptor 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 descriptor(io_context&) constructor.
- */
- descriptor(descriptor&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a descriptor from another.
- /**
- * This assignment operator moves a descriptor from one object to another.
- *
- * @param other The other descriptor 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 descriptor(io_context&) constructor.
- */
- descriptor& operator=(descriptor&& other)
- {
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#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();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a descriptor cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a descriptor cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native descriptor to the descriptor.
- /*
- * This function opens the descriptor to hold an existing native descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& native_descriptor)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_descriptor, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native descriptor to the descriptor.
- /*
- * This function opens the descriptor to hold an existing native descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
- boost::system::error_code& ec)
- {
- this->get_service().assign(
- this->get_implementation(), native_descriptor, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the descriptor is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the descriptor.
- /**
- * This function is used to close the descriptor. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the descriptor.
- /**
- * This function is used to close the descriptor. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native descriptor representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * descriptor. This is intended to allow access to native descriptor
- * functionality that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Release ownership of the native descriptor implementation.
- /**
- * This function may be used to obtain the underlying representation of the
- * descriptor. After calling this function, @c is_open() returns false. The
- * caller is responsible for closing the descriptor.
- *
- * All outstanding asynchronous read or write operations will finish
- * immediately, and the handlers for cancelled operations will be passed the
- * boost::asio::error::operation_aborted error.
- */
- native_handle_type release()
- {
- return this->get_service().release(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the descriptor.
- /**
- * This function is used to execute an IO control command on the descriptor.
- *
- * @param command The IO control command to be performed on the descriptor.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa IoControlCommand @n
- * boost::asio::posix::descriptor_base::bytes_readable @n
- * boost::asio::posix::descriptor_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::asio::posix::stream_descriptor::bytes_readable command;
- * descriptor.io_control(command);
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- void io_control(IoControlCommand& command)
- {
- boost::system::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
- boost::asio::detail::throw_error(ec, "io_control");
- }
-
- /// Perform an IO control command on the descriptor.
- /**
- * This function is used to execute an IO control command on the descriptor.
- *
- * @param command The IO control command to be performed on the descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa IoControlCommand @n
- * boost::asio::posix::descriptor_base::bytes_readable @n
- * boost::asio::posix::descriptor_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::asio::posix::stream_descriptor::bytes_readable command;
- * boost::system::error_code ec;
- * descriptor.io_control(command, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
- boost::system::error_code& ec)
- {
- this->get_service().io_control(this->get_implementation(), command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the descriptor.
- /**
- * @returns @c true if the descriptor's synchronous operations will fail with
- * boost::asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- bool non_blocking() const
- {
- return this->get_service().non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the descriptor.
- /**
- * @param mode If @c true, the descriptor's synchronous operations will fail
- * with boost::asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- void non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "non_blocking");
- }
-
- /// Sets the non-blocking mode of the descriptor.
- /**
- * @param mode If @c true, the descriptor's synchronous operations will fail
- * with boost::asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * boost::asio::error::would_block.
- */
- BOOST_ASIO_SYNC_OP_VOID non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to retrieve the non-blocking mode of the underlying
- * native descriptor. This mode has no effect on the behaviour of the
- * descriptor object's synchronous operations.
- *
- * @returns @c true if the underlying descriptor is in non-blocking mode and
- * direct system calls may fail with boost::asio::error::would_block (or the
- * equivalent system error).
- *
- * @note The current non-blocking mode is cached by the descriptor object.
- * Consequently, the return value may be incorrect if the non-blocking mode
- * was set directly on the native descriptor.
- */
- bool native_non_blocking() const
- {
- return this->get_service().native_non_blocking(
- this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native descriptor. It has no effect on the behaviour of the descriptor
- * object's synchronous operations.
- *
- * @param mode If @c true, the underlying descriptor is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @throws boost::system::system_error Thrown on failure. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- void native_non_blocking(bool mode)
- {
- boost::system::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- boost::asio::detail::throw_error(ec, "native_non_blocking");
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native descriptor. It has no effect on the behaviour of the descriptor
- * object's synchronous operations.
- *
- * @param mode If @c true, the underlying descriptor is put into non-blocking
- * mode and direct system calls may fail with boost::asio::error::would_block
- * (or the equivalent system error).
- *
- * @param ec Set to indicate what error occurred, if any. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with boost::asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
- bool mode, boost::system::error_code& ec)
- {
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- /**
- * This function is used to perform a blocking wait for a descriptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @par Example
- * Waiting for a descriptor to become readable.
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * descriptor.wait(boost::asio::posix::stream_descriptor::wait_read);
- * @endcode
- */
- void wait(wait_type w)
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- /**
- * This function is used to perform a blocking wait for a descriptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * Waiting for a descriptor to become readable.
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::system::error_code ec;
- * descriptor.wait(boost::asio::posix::stream_descriptor::wait_read, ec);
- * @endcode
- */
- BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the descriptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- /**
- * This function is used to perform an asynchronous wait for a descriptor to
- * enter a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @param handler The handler to be called when the wait 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
- * ); @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
- * void wait_handler(const boost::system::error_code& error)
- * {
- * if (!error)
- * {
- * // Wait succeeded.
- * }
- * }
- *
- * ...
- *
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * descriptor.async_wait(
- * boost::asio::posix::stream_descriptor::wait_read,
- * wait_handler);
- * @endcode
- */
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_wait(
- this->get_implementation(), w, init.completion_handler);
-
- return init.result.get();
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- /**
- * This function destroys the descriptor, cancelling any outstanding
- * asynchronous wait operations associated with the descriptor as if by
- * calling @c cancel.
- */
- ~descriptor()
- {
- }
-};
-
-} // namespace posix
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#undef BOOST_ASIO_SVC_T
-
-#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_POSIX_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp
deleted file mode 100644
index 6722f04ef75..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// posix/descriptor_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_POSIX_DESCRIPTOR_BASE_HPP
-#define BOOST_ASIO_POSIX_DESCRIPTOR_BASE_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_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/detail/io_control.hpp>
-#include <boost/asio/detail/socket_option.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace posix {
-
-/// The descriptor_base class is used as a base for the descriptor class as a
-/// place to define the associated IO control commands.
-class descriptor_base
-{
-public:
- /// Wait types.
- /**
- * For use with descriptor::wait() and descriptor::async_wait().
- */
- enum wait_type
- {
- /// Wait for a descriptor to become ready to read.
- wait_read,
-
- /// Wait for a descriptor to become ready to write.
- wait_write,
-
- /// Wait for a descriptor to have error conditions pending.
- wait_error
- };
-
- /// IO control command to get the amount of data that can be read without
- /// blocking.
- /**
- * Implements the FIONREAD IO control command.
- *
- * @par Example
- * @code
- * boost::asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * boost::asio::descriptor_base::bytes_readable command(true);
- * descriptor.io_control(command);
- * std::size_t bytes_readable = command.get();
- * @endcode
- *
- * @par Concepts:
- * IoControlCommand.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined bytes_readable;
-#else
- typedef boost::asio::detail::io_control::bytes_readable bytes_readable;
-#endif
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~descriptor_base()
- {
- }
-};
-
-} // namespace posix
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_POSIX_DESCRIPTOR_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp
deleted file mode 100644
index af8cbe92c06..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp
+++ /dev/null
@@ -1,362 +0,0 @@
-//
-// posix/stream_descriptor.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_POSIX_STREAM_DESCRIPTOR_HPP
-#define BOOST_ASIO_POSIX_STREAM_DESCRIPTOR_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/posix/descriptor.hpp>
-
-#if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/posix/basic_stream_descriptor.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-namespace boost {
-namespace asio {
-namespace posix {
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a stream-oriented descriptor.
-typedef basic_stream_descriptor<> stream_descriptor;
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-/// Provides stream-oriented descriptor functionality.
-/**
- * The posix::stream_descriptor class template provides asynchronous and
- * blocking stream-oriented descriptor functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-class stream_descriptor
- : public descriptor
-{
-public:
- /// Construct a stream_descriptor without opening it.
- /**
- * This constructor creates a stream descriptor without opening it. The
- * descriptor needs to be opened and then connected or accepted before data
- * can be sent or received on it.
- *
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- */
- explicit stream_descriptor(boost::asio::io_context& io_context)
- : descriptor(io_context)
- {
- }
-
- /// Construct a stream_descriptor on an existing native descriptor.
- /**
- * This constructor creates a stream descriptor object to hold an existing
- * native descriptor.
- *
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- *
- * @param native_descriptor The new underlying descriptor implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- stream_descriptor(boost::asio::io_context& io_context,
- const native_handle_type& native_descriptor)
- : descriptor(io_context, native_descriptor)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a stream_descriptor from another.
- /**
- * This constructor moves a stream descriptor from one object to another.
- *
- * @param other The other stream_descriptor 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 stream_descriptor(io_context&) constructor.
- */
- stream_descriptor(stream_descriptor&& other)
- : descriptor(std::move(other))
- {
- }
-
- /// Move-assign a stream_descriptor from another.
- /**
- * This assignment operator moves a stream descriptor from one object to
- * another.
- *
- * @param other The other stream_descriptor 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 stream_descriptor(io_context&) constructor.
- */
- stream_descriptor& operator=(stream_descriptor&& other)
- {
- descriptor::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the descriptor.
- /**
- * This function is used to write data to the stream descriptor. The function
- * call will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the descriptor.
- /**
- * This function is used to write data to the stream descriptor. The function
- * call will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- *
- * @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 this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream
- * descriptor. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.async_write_some(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 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);
-
- this->get_service().async_write_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the descriptor.
- /**
- * This function is used to read data from the stream descriptor. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the descriptor.
- /**
- * This function is used to read data from the stream descriptor. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream
- * descriptor. The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.async_read_some(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.
- */
- 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);
-
- this->get_service().async_read_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-} // namespace posix
-} // namespace asio
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_POSIX_STREAM_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp
deleted file mode 100644
index b91000ba29a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp
+++ /dev/null
@@ -1,281 +0,0 @@
-//
-// posix/stream_descriptor_service.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_POSIX_STREAM_DESCRIPTOR_SERVICE_HPP
-#define BOOST_ASIO_POSIX_STREAM_DESCRIPTOR_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/detail/reactive_descriptor_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace posix {
-
-/// Default service implementation for a stream descriptor.
-class stream_descriptor_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<stream_descriptor_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::reactive_descriptor_service service_impl_type;
-
-public:
- /// The type of a stream descriptor implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native descriptor type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new stream descriptor service for the specified io_context.
- explicit stream_descriptor_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<stream_descriptor_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new stream descriptor implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new stream descriptor implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another stream descriptor implementation.
- void move_assign(implementation_type& impl,
- stream_descriptor_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a stream descriptor implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native descriptor to a stream descriptor.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& native_descriptor,
- boost::system::error_code& ec)
- {
- service_impl_.assign(impl, native_descriptor, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the descriptor is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a stream descriptor implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native descriptor implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Release ownership of the native descriptor implementation.
- native_handle_type release(implementation_type& impl)
- {
- return service_impl_.release(impl);
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the descriptor.
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, boost::system::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the descriptor.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the descriptor.
- BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native descriptor implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- descriptor_base::wait_type w, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the descriptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl, descriptor_base::wait_type w,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Write the given data to the stream.
- template <typename ConstBufferSequence>
- std::size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.write_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous write.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- boost::asio::async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- template <typename MutableBufferSequence>
- std::size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.read_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous read.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- boost::asio::async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace posix
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_POSIX_STREAM_DESCRIPTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/post.hpp b/src/third_party/boost-1.69.0/boost/asio/post.hpp
deleted file mode 100644
index 667613ec54e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/post.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// post.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_POST_HPP
-#define BOOST_ASIO_POST_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/type_traits.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/is_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Submits a completion token or function object for execution.
-/**
- * This function submits an object for execution using the object's associated
- * executor. The function object is queued for execution, and is never called
- * from the current thread prior to returning from <tt>post()</tt>.
- *
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
- *
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
- *
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Performs <tt>ex.post(std::move(handler), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
- */
-template <typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- BOOST_ASIO_MOVE_ARG(CompletionToken) token);
-
-/// Submits a completion token or function object for execution.
-/**
- * This function submits an object for execution using the specified executor.
- * The function object is queued for execution, and is never called from the
- * current thread prior to returning from <tt>post()</tt>.
- *
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
- *
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
- *
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
- *
- * @li Performs <tt>Executor(ex).post(std::move(f), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
- */
-template <typename Executor, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type* = 0);
-
-/// Submits a completion token or function object for execution.
-/**
- * @returns <tt>post(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
- */
-template <typename ExecutionContext, typename CompletionToken>
-BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/post.hpp>
-
-#endif // BOOST_ASIO_POST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp
deleted file mode 100644
index 63ebf5cb300..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp
+++ /dev/null
@@ -1,468 +0,0 @@
-//
-// raw_socket_service.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_RAW_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_RAW_SOCKET_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/null_socket_service.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-#else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a raw socket.
-template <typename Protocol>
-class raw_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<raw_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a raw socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new raw socket service for the specified io_context.
- explicit raw_socket_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- raw_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new raw socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new raw socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another raw socket implementation.
- void move_assign(implementation_type& impl,
- raw_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- // All socket services have access to each other's implementations.
- template <typename Protocol1> friend class raw_socket_service;
-
- /// Move-construct a new raw socket implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- raw_socket_service<Protocol1>& other_service,
- typename raw_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a raw socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- // Open a new raw socket implementation.
- BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_RAW))
- service_impl_.open(impl, protocol, ec);
- else
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a raw socket.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a raw socket implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying socket.
- native_handle_type release(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.release(impl, ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- // Bind the raw socket to the specified local endpoint.
- BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the raw socket to the specified endpoint.
- BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (boost::system::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, boost::system::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, boost::system::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, boost::system::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, boost::system::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(implementation_type& impl, const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send raw data to the specified endpoint.
- template <typename ConstBufferSequence>
- std::size_t send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.send_to(impl, buffers, destination, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send_to(impl, buffers,
- destination, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.receive(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive raw data with the endpoint of the sender.
- template <typename MutableBufferSequence>
- std::size_t receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.receive_from(impl, buffers, sender_endpoint, flags,
- ec);
- }
-
- /// Start an asynchronous receive that will get the endpoint of the sender.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive_from(impl, buffers,
- sender_endpoint, flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // 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
deleted file mode 100644
index efa373c3cfa..00000000000
--- a/src/third_party/boost-1.69.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 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
deleted file mode 100644
index ec6780382b4..00000000000
--- a/src/third_party/boost-1.69.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 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
deleted file mode 100644
index f9c1f51323b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/read_until.hpp
+++ /dev/null
@@ -1,1828 +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 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.69.0/boost/asio/seq_packet_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/seq_packet_socket_service.hpp
deleted file mode 100644
index d6445782b3c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/seq_packet_socket_service.hpp
+++ /dev/null
@@ -1,418 +0,0 @@
-//
-// seq_packet_socket_service.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_SEQ_PACKET_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_SEQ_PACKET_SOCKET_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/null_socket_service.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-#else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a sequenced packet socket.
-template <typename Protocol>
-class seq_packet_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<
- seq_packet_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a sequenced packet socket implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new sequenced packet socket service for the specified
- /// io_context.
- explicit seq_packet_socket_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- seq_packet_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new sequenced packet socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new sequenced packet socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another sequenced packet socket implementation.
- void move_assign(implementation_type& impl,
- seq_packet_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- // All socket services have access to each other's implementations.
- template <typename Protocol1> friend class seq_packet_socket_service;
-
- /// Move-construct a new sequenced packet socket implementation from another
- /// protocol type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- seq_packet_socket_service<Protocol1>& other_service,
- typename seq_packet_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a sequenced packet socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a sequenced packet socket.
- BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_SEQPACKET))
- service_impl_.open(impl, protocol, ec);
- else
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a sequenced packet socket.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a sequenced packet socket implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying socket.
- native_handle_type release(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.release(impl, ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- /// Bind the sequenced packet socket to the specified local endpoint.
- BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the sequenced packet socket to the specified endpoint.
- BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (boost::system::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, boost::system::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, boost::system::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, boost::system::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, boost::system::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, boost::system::error_code& ec)
- {
- return service_impl_.receive_with_flags(impl,
- buffers, in_flags, out_flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive_with_flags(impl,
- buffers, in_flags, out_flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/serial_port.hpp b/src/third_party/boost-1.69.0/boost/asio/serial_port.hpp
deleted file mode 100644
index f2185b80379..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/serial_port.hpp
+++ /dev/null
@@ -1,771 +0,0 @@
-//
-// serial_port.hpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_HPP
-#define BOOST_ASIO_SERIAL_PORT_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_SERIAL_PORT) \
- || defined(GENERATING_DOCUMENTATION)
-
-#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/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/serial_port_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/basic_serial_port.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# if defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_serial_port_service.hpp>
-# define BOOST_ASIO_SVC_T detail::win_iocp_serial_port_service
-# else
-# include <boost/asio/detail/reactive_serial_port_service.hpp>
-# define BOOST_ASIO_SVC_T detail::reactive_serial_port_service
-# endif
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a serial port.
-typedef basic_serial_port<> serial_port;
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-/// Provides serial port functionality.
-/**
- * The serial_port class provides a wrapper over serial port functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class serial_port
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
- public serial_port_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a serial port.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef BOOST_ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// A basic_serial_port is always the lowest layer.
- typedef serial_port lowest_layer_type;
-
- /// Construct a serial_port without opening it.
- /**
- * This constructor creates a serial port without opening it.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- */
- explicit serial_port(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct and open a serial_port.
- /**
- * This constructor creates and opens a serial port for the specified device
- * name.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param device The platform-specific device name for this serial
- * port.
- */
- explicit serial_port(boost::asio::io_context& io_context,
- const char* device)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Construct and open a serial_port.
- /**
- * This constructor creates and opens a serial port for the specified device
- * name.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param device The platform-specific device name for this serial
- * port.
- */
- explicit serial_port(boost::asio::io_context& io_context,
- const std::string& device)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Construct a serial_port on an existing native serial port.
- /**
- * This constructor creates a serial port object to hold an existing native
- * serial port.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param native_serial_port A native serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- serial_port(boost::asio::io_context& io_context,
- const native_handle_type& native_serial_port)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a serial_port from another.
- /**
- * This constructor moves a serial port from one object to another.
- *
- * @param other The other serial_port 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 serial_port(io_context&) constructor.
- */
- serial_port(serial_port&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a serial_port from another.
- /**
- * This assignment operator moves a serial port from one object to another.
- *
- * @param other The other serial_port 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 serial_port(io_context&) constructor.
- */
- serial_port& operator=(serial_port&& 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 serial port.
- /**
- * This function destroys the serial port, cancelling any outstanding
- * asynchronous wait operations associated with the serial port as if by
- * calling @c cancel.
- */
- ~serial_port()
- {
- }
-
-#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();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a serial_port cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a serial_port cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Open the serial port using the specified device name.
- /**
- * This function opens the serial port for the specified device name.
- *
- * @param device The platform-specific device name.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void open(const std::string& device)
- {
- boost::system::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- boost::asio::detail::throw_error(ec, "open");
- }
-
- /// Open the serial port using the specified device name.
- /**
- * This function opens the serial port using the given platform-specific
- * device name.
- *
- * @param device The platform-specific device name.
- *
- * @param ec Set the indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID open(const std::string& device,
- boost::system::error_code& ec)
- {
- this->get_service().open(this->get_implementation(), device, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native serial port to the serial port.
- /*
- * This function opens the serial port to hold an existing native serial port.
- *
- * @param native_serial_port A native serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& native_serial_port)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native serial port to the serial port.
- /*
- * This function opens the serial port to hold an existing native serial port.
- *
- * @param native_serial_port A native serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
- boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the serial port is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the serial port.
- /**
- * This function is used to close the serial port. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the serial port.
- /**
- * This function is used to close the serial port. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native serial port representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * serial port. This is intended to allow access to native serial port
- * functionality that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the serial port.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the serial port.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Send a break sequence to the serial port.
- /**
- * This function causes a break sequence of platform-specific duration to be
- * sent out the serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void send_break()
- {
- boost::system::error_code ec;
- this->get_service().send_break(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "send_break");
- }
-
- /// Send a break sequence to the serial port.
- /**
- * This function causes a break sequence of platform-specific duration to be
- * sent out the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID send_break(boost::system::error_code& ec)
- {
- this->get_service().send_break(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set an option on the serial port.
- /**
- * This function is used to set an option on the serial port.
- *
- * @param option The option value to be set on the serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa SettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename SettableSerialPortOption>
- void set_option(const SettableSerialPortOption& option)
- {
- boost::system::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "set_option");
- }
-
- /// Set an option on the serial port.
- /**
- * This function is used to set an option on the serial port.
- *
- * @param option The option value to be set on the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa SettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename SettableSerialPortOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
- boost::system::error_code& ec)
- {
- this->get_service().set_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get an option from the serial port.
- /**
- * This function is used to get the current value of an option on the serial
- * port.
- *
- * @param option The option value to be obtained from the serial port.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @sa GettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename GettableSerialPortOption>
- void get_option(GettableSerialPortOption& option)
- {
- boost::system::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
- boost::asio::detail::throw_error(ec, "get_option");
- }
-
- /// Get an option from the serial port.
- /**
- * This function is used to get the current value of an option on the serial
- * port.
- *
- * @param option The option value to be obtained from the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa GettableSerialPortOption @n
- * boost::asio::serial_port_base::baud_rate @n
- * boost::asio::serial_port_base::flow_control @n
- * boost::asio::serial_port_base::parity @n
- * boost::asio::serial_port_base::stop_bits @n
- * boost::asio::serial_port_base::character_size
- */
- template <typename GettableSerialPortOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
- boost::system::error_code& ec)
- {
- this->get_service().get_option(this->get_implementation(), option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write some data to the serial port.
- /**
- * This function is used to write data to the serial port. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the serial port.
- /**
- * This function is used to write data to the serial port. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- *
- * @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 this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the serial port.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.async_write_some(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 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;
-
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_write_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the serial port.
- /**
- * This function is used to read data from the serial port. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the serial port.
- /**
- * This function is used to read data from the serial port. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the serial port.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.async_read_some(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.
- */
- 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;
-
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- this->get_service().async_read_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-} // 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 // defined(BOOST_ASIO_HAS_SERIAL_PORT)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_SERIAL_PORT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp b/src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp
deleted file mode 100644
index 3b8c4951f3e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp
+++ /dev/null
@@ -1,169 +0,0 @@
-//
-// serial_port_base.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_BASE_HPP
-#define BOOST_ASIO_SERIAL_PORT_BASE_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_SERIAL_PORT) \
- || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-# include <termios.h>
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
-
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/system/error_code.hpp>
-
-#if defined(GENERATING_DOCUMENTATION)
-# define BOOST_ASIO_OPTION_STORAGE implementation_defined
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# define BOOST_ASIO_OPTION_STORAGE DCB
-#else
-# define BOOST_ASIO_OPTION_STORAGE termios
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// The serial_port_base class is used as a base for the basic_serial_port class
-/// template so that we have a common place to define the serial port options.
-class serial_port_base
-{
-public:
- /// Serial port option to permit changing the baud rate.
- /**
- * Implements changing the baud rate for a given serial port.
- */
- class baud_rate
- {
- public:
- explicit baud_rate(unsigned int rate = 0);
- unsigned int value() const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
- BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec) const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
- const BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec);
- private:
- unsigned int value_;
- };
-
- /// Serial port option to permit changing the flow control.
- /**
- * Implements changing the flow control for a given serial port.
- */
- class flow_control
- {
- public:
- enum type { none, software, hardware };
- BOOST_ASIO_DECL explicit flow_control(type t = none);
- type value() const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
- BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec) const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
- const BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec);
- private:
- type value_;
- };
-
- /// Serial port option to permit changing the parity.
- /**
- * Implements changing the parity for a given serial port.
- */
- class parity
- {
- public:
- enum type { none, odd, even };
- BOOST_ASIO_DECL explicit parity(type t = none);
- type value() const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
- BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec) const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
- const BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec);
- private:
- type value_;
- };
-
- /// Serial port option to permit changing the number of stop bits.
- /**
- * Implements changing the number of stop bits for a given serial port.
- */
- class stop_bits
- {
- public:
- enum type { one, onepointfive, two };
- BOOST_ASIO_DECL explicit stop_bits(type t = one);
- type value() const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
- BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec) const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
- const BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec);
- private:
- type value_;
- };
-
- /// Serial port option to permit changing the character size.
- /**
- * Implements changing the character size for a given serial port.
- */
- class character_size
- {
- public:
- BOOST_ASIO_DECL explicit character_size(unsigned int t = 8);
- unsigned int value() const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
- BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec) const;
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
- const BOOST_ASIO_OPTION_STORAGE& storage,
- boost::system::error_code& ec);
- private:
- unsigned int value_;
- };
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~serial_port_base()
- {
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#undef BOOST_ASIO_OPTION_STORAGE
-
-#include <boost/asio/impl/serial_port_base.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/serial_port_base.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_SERIAL_PORT_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp b/src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp
deleted file mode 100644
index 935f92fffa1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp
+++ /dev/null
@@ -1,251 +0,0 @@
-//
-// serial_port_service.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_SERIAL_PORT_SERVICE_HPP
-#define BOOST_ASIO_SERIAL_PORT_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <string>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/reactive_serial_port_service.hpp>
-#include <boost/asio/detail/win_iocp_serial_port_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/serial_port_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a serial port.
-class serial_port_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<serial_port_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_serial_port_service service_impl_type;
-#else
- typedef detail::reactive_serial_port_service service_impl_type;
-#endif
-
-public:
- /// The type of a serial port implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new serial port service for the specified io_context.
- explicit serial_port_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<serial_port_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new serial port implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new serial port implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another serial port implementation.
- void move_assign(implementation_type& impl,
- serial_port_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a serial port implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a serial port.
- BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const std::string& device, boost::system::error_code& ec)
- {
- service_impl_.open(impl, device, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native handle to a serial port.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a serial port implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set a serial port option.
- template <typename SettableSerialPortOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSerialPortOption& option, boost::system::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a serial port option.
- template <typename GettableSerialPortOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSerialPortOption& option, boost::system::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Send a break sequence to the serial port.
- BOOST_ASIO_SYNC_OP_VOID send_break(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.send_break(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data to the stream.
- template <typename ConstBufferSequence>
- std::size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.write_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous write.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- template <typename MutableBufferSequence>
- std::size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.read_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous read.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_SERIAL_PORT_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/signal_set.hpp b/src/third_party/boost-1.69.0/boost/asio/signal_set.hpp
deleted file mode 100644
index 0ddb996a584..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/signal_set.hpp
+++ /dev/null
@@ -1,449 +0,0 @@
-//
-// signal_set.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_SIGNAL_SET_HPP
-#define BOOST_ASIO_SIGNAL_SET_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_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/basic_signal_set.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/detail/signal_set_service.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a signal set.
-typedef basic_signal_set<> signal_set;
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-/// Provides signal functionality.
-/**
- * The signal_set class provides the ability to perform an asynchronous wait
- * for one or more signals to occur.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Example
- * Performing an asynchronous wait:
- * @code
- * void handler(
- * const boost::system::error_code& error,
- * int signal_number)
- * {
- * if (!error)
- * {
- * // A signal occurred.
- * }
- * }
- *
- * ...
- *
- * // Construct a signal set registered for process termination.
- * boost::asio::signal_set signals(io_context, SIGINT, SIGTERM);
- *
- * // Start an asynchronous wait for one of the signals to occur.
- * signals.async_wait(handler);
- * @endcode
- *
- * @par Queueing of signal notifications
- *
- * If a signal is registered with a signal_set, and the signal occurs when
- * there are no waiting handlers, then the signal notification is queued. The
- * next async_wait operation on that signal_set will dequeue the notification.
- * If multiple notifications are queued, subsequent async_wait operations
- * dequeue them one at a time. Signal notifications are dequeued in order of
- * ascending signal number.
- *
- * If a signal number is removed from a signal_set (using the @c remove or @c
- * erase member functions) then any queued notifications for that signal are
- * discarded.
- *
- * @par Multiple registration of signals
- *
- * The same signal number may be registered with different signal_set objects.
- * When the signal occurs, one handler is called for each signal_set object.
- *
- * Note that multiple registration only works for signals that are registered
- * using Asio. The application must not also register a signal handler using
- * functions such as @c signal() or @c sigaction().
- *
- * @par Signal masking on POSIX platforms
- *
- * POSIX allows signals to be blocked using functions such as @c sigprocmask()
- * and @c pthread_sigmask(). For signals to be delivered, programs must ensure
- * that any signals registered using signal_set objects are unblocked in at
- * least one thread.
- */
-class signal_set
- : BOOST_ASIO_SVC_ACCESS basic_io_object<detail::signal_set_service>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// Construct a signal set without adding any signals.
- /**
- * This constructor creates a signal set without registering for any signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- */
- explicit signal_set(boost::asio::io_context& io_context)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- }
-
- /// Construct a signal set and add one signal.
- /**
- * This constructor creates a signal set and registers for one signal.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code boost::asio::signal_set signals(io_context);
- * signals.add(signal_number_1); @endcode
- */
- signal_set(boost::asio::io_context& io_context, int signal_number_1)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Construct a signal set and add two signals.
- /**
- * This constructor creates a signal set and registers for two signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The first signal number to be added.
- *
- * @param signal_number_2 The second signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code boost::asio::signal_set signals(io_context);
- * signals.add(signal_number_1);
- * signals.add(signal_number_2); @endcode
- */
- signal_set(boost::asio::io_context& io_context, int signal_number_1,
- int signal_number_2)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- boost::asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Construct a signal set and add three signals.
- /**
- * This constructor creates a signal set and registers for three signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The first signal number to be added.
- *
- * @param signal_number_2 The second signal number to be added.
- *
- * @param signal_number_3 The third signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code boost::asio::signal_set signals(io_context);
- * signals.add(signal_number_1);
- * signals.add(signal_number_2);
- * signals.add(signal_number_3); @endcode
- */
- signal_set(boost::asio::io_context& io_context, int signal_number_1,
- int signal_number_2, int signal_number_3)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- boost::asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
- boost::asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_3, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Destroys the signal set.
- /**
- * This function destroys the signal set, cancelling any outstanding
- * asynchronous wait operations associated with the signal set as if by
- * calling @c cancel.
- */
- ~signal_set()
- {
- }
-
-#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<detail::signal_set_service>::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<detail::signal_set_service>::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<detail::signal_set_service>::get_executor();
- }
-
- /// Add a signal to a signal_set.
- /**
- * This function adds the specified signal to the set. It has no effect if the
- * signal is already in the set.
- *
- * @param signal_number The signal to be added to the set.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void add(int signal_number)
- {
- boost::system::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number, ec);
- boost::asio::detail::throw_error(ec, "add");
- }
-
- /// Add a signal to a signal_set.
- /**
- * This function adds the specified signal to the set. It has no effect if the
- * signal is already in the set.
- *
- * @param signal_number The signal to be added to the set.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID add(int signal_number,
- boost::system::error_code& ec)
- {
- this->get_service().add(this->get_implementation(), signal_number, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove a signal from a signal_set.
- /**
- * This function removes the specified signal from the set. It has no effect
- * if the signal is not in the set.
- *
- * @param signal_number The signal to be removed from the set.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Removes any notifications that have been queued for the specified
- * signal number.
- */
- void remove(int signal_number)
- {
- boost::system::error_code ec;
- this->get_service().remove(this->get_implementation(), signal_number, ec);
- boost::asio::detail::throw_error(ec, "remove");
- }
-
- /// Remove a signal from a signal_set.
- /**
- * This function removes the specified signal from the set. It has no effect
- * if the signal is not in the set.
- *
- * @param signal_number The signal to be removed from the set.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Removes any notifications that have been queued for the specified
- * signal number.
- */
- BOOST_ASIO_SYNC_OP_VOID remove(int signal_number,
- boost::system::error_code& ec)
- {
- this->get_service().remove(this->get_implementation(), signal_number, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove all signals from a signal_set.
- /**
- * This function removes all signals from the set. It has no effect if the set
- * is already empty.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Removes all queued notifications.
- */
- void clear()
- {
- boost::system::error_code ec;
- this->get_service().clear(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "clear");
- }
-
- /// Remove all signals from a signal_set.
- /**
- * This function removes all signals from the set. It has no effect if the set
- * is already empty.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Removes all queued notifications.
- */
- BOOST_ASIO_SYNC_OP_VOID clear(boost::system::error_code& ec)
- {
- this->get_service().clear(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Cancel all operations associated with the signal set.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the signal set. The handler for each cancelled
- * operation will be invoked with the boost::asio::error::operation_aborted
- * error code.
- *
- * Cancellation does not alter the set of registered signals.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note If a registered signal occurred before cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all operations associated with the signal set.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the signal set. The handler for each cancelled
- * operation will be invoked with the boost::asio::error::operation_aborted
- * error code.
- *
- * Cancellation does not alter the set of registered signals.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note If a registered signal occurred before cancel() is called, then the
- * handlers for asynchronous wait operations will:
- *
- * @li have already been invoked; or
- *
- * @li have been queued for invocation in the near future.
- *
- * These handlers can no longer be cancelled, and therefore are passed an
- * error code that indicates the successful completion of the wait operation.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous operation to wait for a signal to be delivered.
- /**
- * This function may be used to initiate an asynchronous wait against the
- * signal set. It always returns immediately.
- *
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
- *
- * @li One of the registered signals in the signal set occurs; or
- *
- * @li The signal set was cancelled, in which case the handler is passed the
- * error code boost::asio::error::operation_aborted.
- *
- * @param handler The handler to be called when the signal occurs. 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.
- * int signal_number // Indicates which signal occurred.
- * ); @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 SignalHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(SignalHandler,
- void (boost::system::error_code, int))
- async_wait(BOOST_ASIO_MOVE_ARG(SignalHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a SignalHandler.
- BOOST_ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
-
- async_completion<SignalHandler,
- void (boost::system::error_code, int)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-} // namespace asio
-} // namespace boost
-
-#endif // BOOST_ASIO_SIGNAL_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp b/src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp
deleted file mode 100644
index 743611620d7..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//
-// signal_set_service.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_SIGNAL_SET_SERVICE_HPP
-#define BOOST_ASIO_SIGNAL_SET_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/signal_set_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a signal set.
-class signal_set_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<signal_set_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
-public:
- /// The type of a signal set implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef detail::signal_set_service::implementation_type implementation_type;
-#endif
-
- /// Construct a new signal set service for the specified io_context.
- explicit signal_set_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<signal_set_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new signal set implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- /// Destroy a signal set implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Add a signal to a signal_set.
- BOOST_ASIO_SYNC_OP_VOID add(implementation_type& impl,
- int signal_number, boost::system::error_code& ec)
- {
- service_impl_.add(impl, signal_number, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove a signal to a signal_set.
- BOOST_ASIO_SYNC_OP_VOID remove(implementation_type& impl,
- int signal_number, boost::system::error_code& ec)
- {
- service_impl_.remove(impl, signal_number, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove all signals from a signal_set.
- BOOST_ASIO_SYNC_OP_VOID clear(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.clear(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Cancel all operations associated with the signal set.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- // Start an asynchronous operation to wait for a signal to be delivered.
- template <typename SignalHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(SignalHandler,
- void (boost::system::error_code, int))
- async_wait(implementation_type& impl,
- BOOST_ASIO_MOVE_ARG(SignalHandler) handler)
- {
- async_completion<SignalHandler,
- void (boost::system::error_code, int)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(boost::asio::io_context::fork_event event)
- {
- service_impl_.notify_fork(event);
- }
-
- // The platform-specific implementation.
- detail::signal_set_service service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_SIGNAL_SET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp
deleted file mode 100644
index ed5c084401f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp
+++ /dev/null
@@ -1,374 +0,0 @@
-//
-// socket_acceptor_service.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_SOCKET_ACCEPTOR_SERVICE_HPP
-#define BOOST_ASIO_SOCKET_ACCEPTOR_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/basic_socket.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/null_socket_service.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-#else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a socket acceptor.
-template <typename Protocol>
-class socket_acceptor_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<socket_acceptor_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename protocol_type::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The native type of the socket acceptor.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native acceptor type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new socket acceptor service for the specified io_context.
- explicit socket_acceptor_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- socket_acceptor_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new socket acceptor implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new socket acceptor implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another socket acceptor implementation.
- void move_assign(implementation_type& impl,
- socket_acceptor_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- // All acceptor services have access to each other's implementations.
- template <typename Protocol1> friend class socket_acceptor_service;
-
- /// Move-construct a new socket acceptor implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- socket_acceptor_service<Protocol1>& other_service,
- typename socket_acceptor_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a socket acceptor implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a new socket acceptor implementation.
- BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- service_impl_.open(impl, protocol, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native acceptor to a socket acceptor.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_acceptor,
- boost::system::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_acceptor, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the acceptor is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Cancel all asynchronous operations associated with the acceptor.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Bind the socket acceptor to the specified local endpoint.
- BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Place the socket acceptor into the state where it will listen for new
- /// connections.
- BOOST_ASIO_SYNC_OP_VOID listen(implementation_type& impl, int backlog,
- boost::system::error_code& ec)
- {
- service_impl_.listen(impl, backlog, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Close a socket acceptor implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying acceptor.
- native_handle_type release(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.release(impl, ec);
- }
-
- /// Get the native acceptor implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, boost::system::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, boost::system::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, boost::system::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the acceptor.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the acceptor.
- BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native acceptor implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native acceptor implementation.
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Wait for the acceptor to become ready to read, ready to write, or to have
- /// pending error conditions.
- BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the acceptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Accept a new connection.
- template <typename Protocol1, typename SocketService>
- BOOST_ASIO_SYNC_OP_VOID accept(implementation_type& impl,
- basic_socket<Protocol1, SocketService>& peer,
- endpoint_type* peer_endpoint, boost::system::error_code& ec,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
- {
- service_impl_.accept(impl, peer, peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Accept a new connection.
- typename Protocol::socket accept(implementation_type& impl,
- io_context* peer_io_context, endpoint_type* peer_endpoint,
- boost::system::error_code& ec)
- {
- return service_impl_.accept(impl, peer_io_context, peer_endpoint, ec);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- /// Start an asynchronous accept.
- template <typename Protocol1, typename SocketService, typename AcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (boost::system::error_code))
- async_accept(implementation_type& impl,
- basic_socket<Protocol1, SocketService>& peer,
- endpoint_type* peer_endpoint,
- BOOST_ASIO_MOVE_ARG(AcceptHandler) handler,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
- {
- async_completion<AcceptHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_accept(impl,
- peer, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- /// Start an asynchronous accept.
- template <typename MoveAcceptHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (boost::system::error_code, typename Protocol::socket))
- async_accept(implementation_type& impl,
- boost::asio::io_context* peer_io_context, endpoint_type* peer_endpoint,
- BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- async_completion<MoveAcceptHandler,
- void (boost::system::error_code,
- typename Protocol::socket)> init(handler);
-
- service_impl_.async_accept(impl,
- peer_io_context, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_SOCKET_ACCEPTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/socket_base.hpp b/src/third_party/boost-1.69.0/boost/asio/socket_base.hpp
deleted file mode 100644
index ee8aa6b2621..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/socket_base.hpp
+++ /dev/null
@@ -1,561 +0,0 @@
-//
-// socket_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_SOCKET_BASE_HPP
-#define BOOST_ASIO_SOCKET_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/detail/io_control.hpp>
-#include <boost/asio/detail/socket_option.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// The socket_base class is used as a base for the basic_stream_socket and
-/// basic_datagram_socket class templates so that we have a common place to
-/// define the shutdown_type and enum.
-class socket_base
-{
-public:
- /// Different ways a socket may be shutdown.
- enum shutdown_type
- {
-#if defined(GENERATING_DOCUMENTATION)
- /// Shutdown the receive side of the socket.
- shutdown_receive = implementation_defined,
-
- /// Shutdown the send side of the socket.
- shutdown_send = implementation_defined,
-
- /// Shutdown both send and receive on the socket.
- shutdown_both = implementation_defined
-#else
- shutdown_receive = BOOST_ASIO_OS_DEF(SHUT_RD),
- shutdown_send = BOOST_ASIO_OS_DEF(SHUT_WR),
- shutdown_both = BOOST_ASIO_OS_DEF(SHUT_RDWR)
-#endif
- };
-
- /// Bitmask type for flags that can be passed to send and receive operations.
- typedef int message_flags;
-
-#if defined(GENERATING_DOCUMENTATION)
- /// Peek at incoming data without removing it from the input queue.
- static const int message_peek = implementation_defined;
-
- /// Process out-of-band data.
- static const int message_out_of_band = implementation_defined;
-
- /// Specify that the data should not be subject to routing.
- static const int message_do_not_route = implementation_defined;
-
- /// Specifies that the data marks the end of a record.
- static const int message_end_of_record = implementation_defined;
-#else
- BOOST_ASIO_STATIC_CONSTANT(int,
- message_peek = BOOST_ASIO_OS_DEF(MSG_PEEK));
- BOOST_ASIO_STATIC_CONSTANT(int,
- message_out_of_band = BOOST_ASIO_OS_DEF(MSG_OOB));
- BOOST_ASIO_STATIC_CONSTANT(int,
- message_do_not_route = BOOST_ASIO_OS_DEF(MSG_DONTROUTE));
- BOOST_ASIO_STATIC_CONSTANT(int,
- message_end_of_record = BOOST_ASIO_OS_DEF(MSG_EOR));
-#endif
-
- /// Wait types.
- /**
- * For use with basic_socket::wait() and basic_socket::async_wait().
- */
- enum wait_type
- {
- /// Wait for a socket to become ready to read.
- wait_read,
-
- /// Wait for a socket to become ready to write.
- wait_write,
-
- /// Wait for a socket to have error conditions pending.
- wait_error
- };
-
- /// Socket option to permit sending of broadcast messages.
- /**
- * Implements the SOL_SOCKET/SO_BROADCAST socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::broadcast option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::broadcast option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined broadcast;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_BROADCAST)>
- broadcast;
-#endif
-
- /// Socket option to enable socket-level debugging.
- /**
- * Implements the SOL_SOCKET/SO_DEBUG socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::debug option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::debug option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined debug;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DEBUG)> debug;
-#endif
-
- /// Socket option to prevent routing, use local interfaces only.
- /**
- * Implements the SOL_SOCKET/SO_DONTROUTE socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::do_not_route option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::udp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::do_not_route option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined do_not_route;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DONTROUTE)>
- do_not_route;
-#endif
-
- /// Socket option to send keep-alives.
- /**
- * Implements the SOL_SOCKET/SO_KEEPALIVE socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::keep_alive option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::keep_alive option;
- * socket.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined keep_alive;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_KEEPALIVE)> keep_alive;
-#endif
-
- /// Socket option for the send buffer size of a socket.
- /**
- * Implements the SOL_SOCKET/SO_SNDBUF socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::send_buffer_size option(8192);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::send_buffer_size option;
- * socket.get_option(option);
- * int size = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Integer_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined send_buffer_size;
-#else
- typedef boost::asio::detail::socket_option::integer<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDBUF)>
- send_buffer_size;
-#endif
-
- /// Socket option for the send low watermark.
- /**
- * Implements the SOL_SOCKET/SO_SNDLOWAT socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::send_low_watermark option(1024);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::send_low_watermark option;
- * socket.get_option(option);
- * int size = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Integer_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined send_low_watermark;
-#else
- typedef boost::asio::detail::socket_option::integer<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDLOWAT)>
- send_low_watermark;
-#endif
-
- /// Socket option for the receive buffer size of a socket.
- /**
- * Implements the SOL_SOCKET/SO_RCVBUF socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::receive_buffer_size option(8192);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::receive_buffer_size option;
- * socket.get_option(option);
- * int size = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Integer_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined receive_buffer_size;
-#else
- typedef boost::asio::detail::socket_option::integer<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVBUF)>
- receive_buffer_size;
-#endif
-
- /// Socket option for the receive low watermark.
- /**
- * Implements the SOL_SOCKET/SO_RCVLOWAT socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::receive_low_watermark option(1024);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::receive_low_watermark option;
- * socket.get_option(option);
- * int size = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Integer_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined receive_low_watermark;
-#else
- typedef boost::asio::detail::socket_option::integer<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVLOWAT)>
- receive_low_watermark;
-#endif
-
- /// Socket option to allow the socket to be bound to an address that is
- /// already in use.
- /**
- * Implements the SOL_SOCKET/SO_REUSEADDR socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::socket_base::reuse_address option(true);
- * acceptor.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::socket_base::reuse_address option;
- * acceptor.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined reuse_address;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_REUSEADDR)>
- reuse_address;
-#endif
-
- /// Socket option to specify whether the socket lingers on close if unsent
- /// data is present.
- /**
- * Implements the SOL_SOCKET/SO_LINGER socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::linger option(true, 30);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::linger option;
- * socket.get_option(option);
- * bool is_set = option.enabled();
- * unsigned short timeout = option.timeout();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Linger_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined linger;
-#else
- typedef boost::asio::detail::socket_option::linger<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_LINGER)>
- linger;
-#endif
-
- /// Socket option for putting received out-of-band data inline.
- /**
- * Implements the SOL_SOCKET/SO_OOBINLINE socket option.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::out_of_band_inline option(true);
- * socket.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::out_of_band_inline option;
- * socket.get_option(option);
- * bool value = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined out_of_band_inline;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_OOBINLINE)>
- out_of_band_inline;
-#endif
-
- /// Socket option to report aborted connections on accept.
- /**
- * Implements a custom socket option that determines whether or not an accept
- * operation is permitted to fail with boost::asio::error::connection_aborted.
- * By default the option is false.
- *
- * @par Examples
- * Setting the option:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::socket_base::enable_connection_aborted option(true);
- * acceptor.set_option(option);
- * @endcode
- *
- * @par
- * Getting the current option value:
- * @code
- * boost::asio::ip::tcp::acceptor acceptor(io_context);
- * ...
- * boost::asio::socket_base::enable_connection_aborted option;
- * acceptor.get_option(option);
- * bool is_set = option.value();
- * @endcode
- *
- * @par Concepts:
- * Socket_Option, Boolean_Socket_Option.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined enable_connection_aborted;
-#else
- typedef boost::asio::detail::socket_option::boolean<
- boost::asio::detail::custom_socket_option_level,
- boost::asio::detail::enable_connection_aborted_option>
- enable_connection_aborted;
-#endif
-
- /// IO control command to get the amount of data that can be read without
- /// blocking.
- /**
- * Implements the FIONREAD IO control command.
- *
- * @par Example
- * @code
- * boost::asio::ip::tcp::socket socket(io_context);
- * ...
- * boost::asio::socket_base::bytes_readable command(true);
- * socket.io_control(command);
- * std::size_t bytes_readable = command.get();
- * @endcode
- *
- * @par Concepts:
- * IO_Control_Command, Size_IO_Control_Command.
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined bytes_readable;
-#else
- typedef boost::asio::detail::io_control::bytes_readable bytes_readable;
-#endif
-
- /// The maximum length of the queue of pending incoming connections.
-#if defined(GENERATING_DOCUMENTATION)
- static const int max_listen_connections = implementation_defined;
-#else
- BOOST_ASIO_STATIC_CONSTANT(int, max_listen_connections
- = BOOST_ASIO_OS_DEF(SOMAXCONN));
-#endif
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use max_listen_connections.) The maximum length of the queue
- /// of pending incoming connections.
-#if defined(GENERATING_DOCUMENTATION)
- static const int max_connections = implementation_defined;
-#else
- BOOST_ASIO_STATIC_CONSTANT(int, max_connections
- = BOOST_ASIO_OS_DEF(SOMAXCONN));
-#endif
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~socket_base()
- {
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SOCKET_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/spawn.hpp
deleted file mode 100644
index b39cb901439..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/spawn.hpp
+++ /dev/null
@@ -1,338 +0,0 @@
-//
-// spawn.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_SPAWN_HPP
-#define BOOST_ASIO_SPAWN_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/coroutine/all.hpp>
-#include <boost/asio/bind_executor.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/detail/wrapped_handler.hpp>
-#include <boost/asio/executor.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/is_executor.hpp>
-#include <boost/asio/strand.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Context object the represents the currently executing coroutine.
-/**
- * The basic_yield_context class is used to represent the currently executing
- * stackful coroutine. A basic_yield_context may be passed as a handler to an
- * asynchronous operation. For example:
- *
- * @code template <typename Handler>
- * void my_coroutine(basic_yield_context<Handler> yield)
- * {
- * ...
- * std::size_t n = my_socket.async_read_some(buffer, yield);
- * ...
- * } @endcode
- *
- * The initiating function (async_read_some in the above example) suspends the
- * current coroutine. The coroutine is resumed when the asynchronous operation
- * completes, and the result of the operation is returned.
- */
-template <typename Handler>
-class basic_yield_context
-{
-public:
- /// The coroutine callee type, used by the implementation.
- /**
- * When using Boost.Coroutine v1, this type is:
- * @code typename coroutine<void()> @endcode
- * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
- * @code push_coroutine<void> @endcode
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined callee_type;
-#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
- typedef boost::coroutines::push_coroutine<void> callee_type;
-#else
- typedef boost::coroutines::coroutine<void()> callee_type;
-#endif
-
- /// The coroutine caller type, used by the implementation.
- /**
- * When using Boost.Coroutine v1, this type is:
- * @code typename coroutine<void()>::caller_type @endcode
- * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
- * @code pull_coroutine<void> @endcode
- */
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined caller_type;
-#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
- typedef boost::coroutines::pull_coroutine<void> caller_type;
-#else
- typedef boost::coroutines::coroutine<void()>::caller_type caller_type;
-#endif
-
- /// Construct a yield context to represent the specified coroutine.
- /**
- * Most applications do not need to use this constructor. Instead, the
- * spawn() function passes a yield context as an argument to the coroutine
- * function.
- */
- basic_yield_context(
- const detail::weak_ptr<callee_type>& coro,
- caller_type& ca, Handler& handler)
- : coro_(coro),
- ca_(ca),
- handler_(handler),
- ec_(0)
- {
- }
-
- /// Construct a yield context from another yield context type.
- /**
- * Requires that OtherHandler be convertible to Handler.
- */
- template <typename OtherHandler>
- basic_yield_context(const basic_yield_context<OtherHandler>& other)
- : coro_(other.coro_),
- ca_(other.ca_),
- handler_(other.handler_),
- ec_(other.ec_)
- {
- }
-
- /// Return a yield context that sets the specified error_code.
- /**
- * By default, when a yield context is used with an asynchronous operation, a
- * non-success error_code is converted to system_error and thrown. This
- * operator may be used to specify an error_code object that should instead be
- * set with the asynchronous operation's result. For example:
- *
- * @code template <typename Handler>
- * void my_coroutine(basic_yield_context<Handler> yield)
- * {
- * ...
- * std::size_t n = my_socket.async_read_some(buffer, yield[ec]);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * ...
- * } @endcode
- */
- basic_yield_context operator[](boost::system::error_code& ec) const
- {
- basic_yield_context tmp(*this);
- tmp.ec_ = &ec;
- return tmp;
- }
-
-#if defined(GENERATING_DOCUMENTATION)
-private:
-#endif // defined(GENERATING_DOCUMENTATION)
- detail::weak_ptr<callee_type> coro_;
- caller_type& ca_;
- Handler handler_;
- boost::system::error_code* ec_;
-};
-
-#if defined(GENERATING_DOCUMENTATION)
-/// Context object that represents the currently executing coroutine.
-typedef basic_yield_context<unspecified> yield_context;
-#else // defined(GENERATING_DOCUMENTATION)
-typedef basic_yield_context<
- executor_binder<void(*)(), executor> > yield_context;
-#endif // defined(GENERATING_DOCUMENTATION)
-
-/**
- * @defgroup spawn boost::asio::spawn
- *
- * @brief Start a new stackful coroutine.
- *
- * The spawn() function is a high-level wrapper over the Boost.Coroutine
- * library. This function enables programs to implement asynchronous logic in a
- * synchronous manner, as illustrated by the following example:
- *
- * @code boost::asio::spawn(my_strand, do_echo);
- *
- * // ...
- *
- * void do_echo(boost::asio::yield_context yield)
- * {
- * try
- * {
- * char data[128];
- * for (;;)
- * {
- * std::size_t length =
- * my_socket.async_read_some(
- * boost::asio::buffer(data), yield);
- *
- * boost::asio::async_write(my_socket,
- * boost::asio::buffer(data, length), yield);
- * }
- * }
- * catch (std::exception& e)
- * {
- * // ...
- * }
- * } @endcode
- */
-/*@{*/
-
-/// Start a new stackful coroutine, calling the specified handler when it
-/// completes.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Function>
-void spawn(BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes());
-
-/// Start a new stackful coroutine, calling the specified handler when it
-/// completes.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param handler A handler to be called when the coroutine exits. More
- * importantly, the handler provides an execution context (via the the handler
- * invocation hook) for the coroutine. The handler must have the signature:
- * @code void handler(); @endcode
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Handler, typename Function>
-void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes(),
- typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
- !is_convertible<Handler&, execution_context&>::value>::type* = 0);
-
-/// Start a new stackful coroutine, inheriting the execution context of another.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param ctx Identifies the current coroutine as a parent of the new
- * coroutine. This specifies that the new coroutine should inherit the
- * execution context of the parent. For example, if the parent coroutine is
- * executing in a particular strand, then the new coroutine will execute in the
- * same strand.
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Handler, typename Function>
-void spawn(basic_yield_context<Handler> ctx,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes());
-
-/// Start a new stackful coroutine that executes on a given executor.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param ex Identifies the executor that will run the coroutine. The new
- * coroutine is implicitly given its own strand within this executor.
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(yield_context yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Function, typename Executor>
-void spawn(const Executor& ex,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes(),
- typename enable_if<is_executor<Executor>::value>::type* = 0);
-
-/// Start a new stackful coroutine that executes on a given strand.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param ex Identifies the strand that will run the coroutine.
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(yield_context yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Function, typename Executor>
-void spawn(const strand<Executor>& ex,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes());
-
-/// Start a new stackful coroutine that executes in the context of a strand.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param s Identifies a strand. By starting multiple coroutines on the same
- * strand, the implementation ensures that none of those coroutines can execute
- * simultaneously.
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(yield_context yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Function>
-void spawn(const boost::asio::io_context::strand& s,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes());
-
-/// Start a new stackful coroutine that executes on a given execution context.
-/**
- * This function is used to launch a new coroutine.
- *
- * @param ctx Identifies the execution context that will run the coroutine. The
- * new coroutine is implicitly given its own strand within this execution
- * context.
- *
- * @param function The coroutine function. The function must have the signature:
- * @code void function(yield_context yield); @endcode
- *
- * @param attributes Boost.Coroutine attributes used to customise the coroutine.
- */
-template <typename Function, typename ExecutionContext>
-void spawn(ExecutionContext& ctx,
- BOOST_ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes
- = boost::coroutines::attributes(),
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/spawn.hpp>
-
-#endif // BOOST_ASIO_SPAWN_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl.hpp
deleted file mode 100644
index 35138880aea..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// ssl.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_HPP
-#define BOOST_ASIO_SSL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/ssl/context.hpp>
-#include <boost/asio/ssl/context_base.hpp>
-#include <boost/asio/ssl/error.hpp>
-#include <boost/asio/ssl/rfc2818_verification.hpp>
-#include <boost/asio/ssl/stream.hpp>
-#include <boost/asio/ssl/stream_base.hpp>
-#include <boost/asio/ssl/verify_context.hpp>
-#include <boost/asio/ssl/verify_mode.hpp>
-
-#endif // BOOST_ASIO_SSL_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp
deleted file mode 100644
index 3d0cbfbfbc1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp
+++ /dev/null
@@ -1,760 +0,0 @@
-//
-// ssl/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_SSL_CONTEXT_HPP
-#define BOOST_ASIO_SSL_CONTEXT_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/buffer.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/ssl/context_base.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-#include <boost/asio/ssl/detail/openssl_init.hpp>
-#include <boost/asio/ssl/detail/password_callback.hpp>
-#include <boost/asio/ssl/detail/verify_callback.hpp>
-#include <boost/asio/ssl/verify_mode.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-class context
- : public context_base,
- private noncopyable
-{
-public:
- /// The native handle type of the SSL context.
- typedef SSL_CTX* native_handle_type;
-
- /// Constructor.
- BOOST_ASIO_DECL explicit context(method m);
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a context from another.
- /**
- * This constructor moves an SSL context from one object to another.
- *
- * @param other The other context object from which the move will occur.
- *
- * @note Following the move, the following operations only are valid for the
- * moved-from object:
- * @li Destruction.
- * @li As a target for move-assignment.
- */
- BOOST_ASIO_DECL context(context&& other);
-
- /// Move-assign a context from another.
- /**
- * This assignment operator moves an SSL context from one object to another.
- *
- * @param other The other context object from which the move will occur.
- *
- * @note Following the move, the following operations only are valid for the
- * moved-from object:
- * @li Destruction.
- * @li As a target for move-assignment.
- */
- BOOST_ASIO_DECL context& operator=(context&& other);
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destructor.
- BOOST_ASIO_DECL ~context();
-
- /// 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.
- */
- BOOST_ASIO_DECL native_handle_type native_handle();
-
- /// Clear options on the context.
- /**
- * This function may be used to configure the SSL options used by the context.
- *
- * @param o A bitmask of options. The available option values are defined in
- * the context_base class. The specified options, if currently enabled on the
- * context, are cleared.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_clear_options.
- */
- BOOST_ASIO_DECL void clear_options(options o);
-
- /// Clear options on the context.
- /**
- * This function may be used to configure the SSL options used by the context.
- *
- * @param o A bitmask of options. The available option values are defined in
- * the context_base class. The specified options, if currently enabled on the
- * context, are cleared.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_clear_options.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID clear_options(options o,
- boost::system::error_code& ec);
-
- /// Set options on the context.
- /**
- * This function may be used to configure the SSL options used by the context.
- *
- * @param o A bitmask of options. The available option values are defined in
- * the context_base class. The options are bitwise-ored with any existing
- * value for the options.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_set_options.
- */
- BOOST_ASIO_DECL void set_options(options o);
-
- /// Set options on the context.
- /**
- * This function may be used to configure the SSL options used by the context.
- *
- * @param o A bitmask of options. The available option values are defined in
- * the context_base class. The options are bitwise-ored with any existing
- * value for the options.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_set_options.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_options(options o,
- boost::system::error_code& ec);
-
- /// Set the peer verification mode.
- /**
- * This function may be used to configure the peer verification mode used by
- * 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_CTX_set_verify.
- */
- BOOST_ASIO_DECL void set_verify_mode(verify_mode v);
-
- /// Set the peer verification mode.
- /**
- * This function may be used to configure the peer verification mode used by
- * 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_CTX_set_verify.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_verify_mode(
- verify_mode v, boost::system::error_code& ec);
-
- /// Set the peer verification depth.
- /**
- * This function may be used to configure the maximum verification depth
- * allowed by the context.
- *
- * @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_CTX_set_verify_depth.
- */
- BOOST_ASIO_DECL void set_verify_depth(int depth);
-
- /// Set the peer verification depth.
- /**
- * This function may be used to configure the maximum verification depth
- * allowed by the context.
- *
- * @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_CTX_set_verify_depth.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_verify_depth(
- int depth, boost::system::error_code& 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_CTX_set_verify.
- */
- template <typename VerifyCallback>
- void set_verify_callback(VerifyCallback 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_CTX_set_verify.
- */
- template <typename VerifyCallback>
- BOOST_ASIO_SYNC_OP_VOID set_verify_callback(VerifyCallback callback,
- boost::system::error_code& ec);
-
- /// Load a certification authority file for performing verification.
- /**
- * This function is used to load one or more trusted certification authorities
- * from a file.
- *
- * @param filename The name of a file containing certification authority
- * certificates in PEM format.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_load_verify_locations.
- */
- BOOST_ASIO_DECL void load_verify_file(const std::string& filename);
-
- /// Load a certification authority file for performing verification.
- /**
- * This function is used to load the certificates for one or more trusted
- * certification authorities from a file.
- *
- * @param filename The name of a file containing certification authority
- * certificates in PEM format.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_load_verify_locations.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load_verify_file(
- const std::string& filename, boost::system::error_code& ec);
-
- /// Add certification authority for performing verification.
- /**
- * This function is used to add one trusted certification authority
- * from a memory buffer.
- *
- * @param ca The buffer containing the certification authority certificate.
- * The certificate must use the PEM format.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_get_cert_store and @c X509_STORE_add_cert.
- */
- BOOST_ASIO_DECL void add_certificate_authority(const const_buffer& ca);
-
- /// Add certification authority for performing verification.
- /**
- * This function is used to add one trusted certification authority
- * from a memory buffer.
- *
- * @param ca The buffer containing the certification authority certificate.
- * The certificate must use the PEM format.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_get_cert_store and @c X509_STORE_add_cert.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID add_certificate_authority(
- const const_buffer& ca, boost::system::error_code& ec);
-
- /// Configures the context to use the default directories for finding
- /// certification authority certificates.
- /**
- * This function specifies that the context should use the default,
- * system-dependent directories for locating certification authority
- * certificates.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_set_default_verify_paths.
- */
- BOOST_ASIO_DECL void set_default_verify_paths();
-
- /// Configures the context to use the default directories for finding
- /// certification authority certificates.
- /**
- * This function specifies that the context should use the default,
- * system-dependent directories for locating certification authority
- * certificates.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_set_default_verify_paths.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_default_verify_paths(
- boost::system::error_code& ec);
-
- /// Add a directory containing certificate authority files to be used for
- /// performing verification.
- /**
- * This function is used to specify the name of a directory containing
- * certification authority certificates. Each file in the directory must
- * contain a single certificate. The files must be named using the subject
- * name's hash and an extension of ".0".
- *
- * @param path The name of a directory containing the certificates.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_load_verify_locations.
- */
- BOOST_ASIO_DECL void add_verify_path(const std::string& path);
-
- /// Add a directory containing certificate authority files to be used for
- /// performing verification.
- /**
- * This function is used to specify the name of a directory containing
- * certification authority certificates. Each file in the directory must
- * contain a single certificate. The files must be named using the subject
- * name's hash and an extension of ".0".
- *
- * @param path The name of a directory containing the certificates.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_load_verify_locations.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID add_verify_path(
- const std::string& path, boost::system::error_code& ec);
-
- /// Use a certificate from a memory buffer.
- /**
- * This function is used to load a certificate into the context from a buffer.
- *
- * @param certificate The buffer containing the certificate.
- *
- * @param format The certificate format (ASN.1 or PEM).
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.
- */
- BOOST_ASIO_DECL void use_certificate(
- const const_buffer& certificate, file_format format);
-
- /// Use a certificate from a memory buffer.
- /**
- * This function is used to load a certificate into the context from a buffer.
- *
- * @param certificate The buffer containing the certificate.
- *
- * @param format The certificate format (ASN.1 or PEM).
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate(
- const const_buffer& certificate, file_format format,
- boost::system::error_code& ec);
-
- /// Use a certificate from a file.
- /**
- * This function is used to load a certificate into the context from a file.
- *
- * @param filename The name of the file containing the certificate.
- *
- * @param format The file format (ASN.1 or PEM).
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_certificate_file.
- */
- BOOST_ASIO_DECL void use_certificate_file(
- const std::string& filename, file_format format);
-
- /// Use a certificate from a file.
- /**
- * This function is used to load a certificate into the context from a file.
- *
- * @param filename The name of the file containing the certificate.
- *
- * @param format The file format (ASN.1 or PEM).
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_certificate_file.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate_file(
- const std::string& filename, file_format format,
- boost::system::error_code& ec);
-
- /// Use a certificate chain from a memory buffer.
- /**
- * This function is used to load a certificate chain into the context from a
- * buffer.
- *
- * @param chain The buffer containing the certificate chain. The certificate
- * chain must use the PEM format.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.
- */
- BOOST_ASIO_DECL void use_certificate_chain(const const_buffer& chain);
-
- /// Use a certificate chain from a memory buffer.
- /**
- * This function is used to load a certificate chain into the context from a
- * buffer.
- *
- * @param chain The buffer containing the certificate chain. The certificate
- * chain must use the PEM format.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate_chain(
- const const_buffer& chain, boost::system::error_code& ec);
-
- /// Use a certificate chain from a file.
- /**
- * This function is used to load a certificate chain into the context from a
- * file.
- *
- * @param filename The name of the file containing the certificate. The file
- * must use the PEM format.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_certificate_chain_file.
- */
- BOOST_ASIO_DECL void use_certificate_chain_file(const std::string& filename);
-
- /// Use a certificate chain from a file.
- /**
- * This function is used to load a certificate chain into the context from a
- * file.
- *
- * @param filename The name of the file containing the certificate. The file
- * must use the PEM format.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_certificate_chain_file.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate_chain_file(
- const std::string& filename, boost::system::error_code& ec);
-
- /// Use a private key from a memory buffer.
- /**
- * This function is used to load a private key into the context from a buffer.
- *
- * @param private_key The buffer containing the private key.
- *
- * @param format The private key format (ASN.1 or PEM).
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.
- */
- BOOST_ASIO_DECL void use_private_key(
- const const_buffer& private_key, file_format format);
-
- /// Use a private key from a memory buffer.
- /**
- * This function is used to load a private key into the context from a buffer.
- *
- * @param private_key The buffer containing the private key.
- *
- * @param format The private key format (ASN.1 or PEM).
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_private_key(
- const const_buffer& private_key, file_format format,
- boost::system::error_code& ec);
-
- /// Use a private key from a file.
- /**
- * This function is used to load a private key into the context from a file.
- *
- * @param filename The name of the file containing the private key.
- *
- * @param format The file format (ASN.1 or PEM).
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_PrivateKey_file.
- */
- BOOST_ASIO_DECL void use_private_key_file(
- const std::string& filename, file_format format);
-
- /// Use a private key from a file.
- /**
- * This function is used to load a private key into the context from a file.
- *
- * @param filename The name of the file containing the private key.
- *
- * @param format The file format (ASN.1 or PEM).
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_PrivateKey_file.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_private_key_file(
- const std::string& filename, file_format format,
- boost::system::error_code& ec);
-
- /// Use an RSA private key from a memory buffer.
- /**
- * This function is used to load an RSA private key into the context from a
- * buffer.
- *
- * @param private_key The buffer containing the RSA private key.
- *
- * @param format The private key format (ASN.1 or PEM).
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.
- */
- BOOST_ASIO_DECL void use_rsa_private_key(
- const const_buffer& private_key, file_format format);
-
- /// Use an RSA private key from a memory buffer.
- /**
- * This function is used to load an RSA private key into the context from a
- * buffer.
- *
- * @param private_key The buffer containing the RSA private key.
- *
- * @param format The private key format (ASN.1 or PEM).
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_rsa_private_key(
- const const_buffer& private_key, file_format format,
- boost::system::error_code& ec);
-
- /// Use an RSA private key from a file.
- /**
- * This function is used to load an RSA private key into the context from a
- * file.
- *
- * @param filename The name of the file containing the RSA private key.
- *
- * @param format The file format (ASN.1 or PEM).
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_use_RSAPrivateKey_file.
- */
- BOOST_ASIO_DECL void use_rsa_private_key_file(
- const std::string& filename, file_format format);
-
- /// Use an RSA private key from a file.
- /**
- * This function is used to load an RSA private key into the context from a
- * file.
- *
- * @param filename The name of the file containing the RSA private key.
- *
- * @param format The file format (ASN.1 or PEM).
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_use_RSAPrivateKey_file.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_rsa_private_key_file(
- const std::string& filename, file_format format,
- boost::system::error_code& ec);
-
- /// Use the specified memory buffer to obtain the temporary Diffie-Hellman
- /// parameters.
- /**
- * This function is used to load Diffie-Hellman parameters into the context
- * from a buffer.
- *
- * @param dh The memory buffer containing the Diffie-Hellman parameters. The
- * buffer must use the PEM format.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_set_tmp_dh.
- */
- BOOST_ASIO_DECL void use_tmp_dh(const const_buffer& dh);
-
- /// Use the specified memory buffer to obtain the temporary Diffie-Hellman
- /// parameters.
- /**
- * This function is used to load Diffie-Hellman parameters into the context
- * from a buffer.
- *
- * @param dh The memory buffer containing the Diffie-Hellman parameters. The
- * buffer must use the PEM format.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_set_tmp_dh.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_tmp_dh(
- const const_buffer& dh, boost::system::error_code& ec);
-
- /// Use the specified file to obtain the temporary Diffie-Hellman parameters.
- /**
- * This function is used to load Diffie-Hellman parameters into the context
- * from a file.
- *
- * @param filename The name of the file containing the Diffie-Hellman
- * parameters. The file must use the PEM format.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_set_tmp_dh.
- */
- BOOST_ASIO_DECL void use_tmp_dh_file(const std::string& filename);
-
- /// Use the specified file to obtain the temporary Diffie-Hellman parameters.
- /**
- * This function is used to load Diffie-Hellman parameters into the context
- * from a file.
- *
- * @param filename The name of the file containing the Diffie-Hellman
- * parameters. The file must use the PEM format.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_set_tmp_dh.
- */
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_tmp_dh_file(
- const std::string& filename, boost::system::error_code& ec);
-
- /// Set the password callback.
- /**
- * This function is used to specify a callback function to obtain password
- * information about an encrypted key in PEM format.
- *
- * @param callback The function object to be used for obtaining the password.
- * The function signature of the handler must be:
- * @code std::string password_callback(
- * std::size_t max_length, // The maximum size for a password.
- * password_purpose purpose // Whether password is for reading or writing.
- * ); @endcode
- * The return value of the callback is a string containing the password.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_CTX_set_default_passwd_cb.
- */
- template <typename PasswordCallback>
- void set_password_callback(PasswordCallback callback);
-
- /// Set the password callback.
- /**
- * This function is used to specify a callback function to obtain password
- * information about an encrypted key in PEM format.
- *
- * @param callback The function object to be used for obtaining the password.
- * The function signature of the handler must be:
- * @code std::string password_callback(
- * std::size_t max_length, // The maximum size for a password.
- * password_purpose purpose // Whether password is for reading or writing.
- * ); @endcode
- * The return value of the callback is a string containing the password.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_CTX_set_default_passwd_cb.
- */
- template <typename PasswordCallback>
- BOOST_ASIO_SYNC_OP_VOID set_password_callback(PasswordCallback callback,
- boost::system::error_code& ec);
-
-private:
- struct bio_cleanup;
- struct x509_cleanup;
- struct evp_pkey_cleanup;
- struct rsa_cleanup;
- struct dh_cleanup;
-
- // Helper function used to set a peer certificate verification callback.
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID do_set_verify_callback(
- detail::verify_callback_base* callback, boost::system::error_code& ec);
-
- // Callback used when the SSL implementation wants to verify a certificate.
- BOOST_ASIO_DECL static int verify_callback_function(
- int preverified, X509_STORE_CTX* ctx);
-
- // Helper function used to set a password callback.
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID do_set_password_callback(
- detail::password_callback_base* callback, boost::system::error_code& ec);
-
- // Callback used when the SSL implementation wants a password.
- BOOST_ASIO_DECL static int password_callback_function(
- char* buf, int size, int purpose, void* data);
-
- // Helper function to set the temporary Diffie-Hellman parameters from a BIO.
- BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID do_use_tmp_dh(
- BIO* bio, boost::system::error_code& ec);
-
- // Helper function to make a BIO from a memory buffer.
- BOOST_ASIO_DECL BIO* make_buffer_bio(const const_buffer& b);
-
- // The underlying native implementation.
- native_handle_type handle_;
-
- // Ensure openssl is initialised.
- boost::asio::ssl::detail::openssl_init<> init_;
-};
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/ssl/impl/context.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ssl/impl/context.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // 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
deleted file mode 100644
index 625ccc7b5b3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/context_base.hpp
+++ /dev/null
@@ -1,211 +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 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.69.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
deleted file mode 100644
index a8963ec5908..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/buffered_handshake_op.hpp
+++ /dev/null
@@ -1,116 +0,0 @@
-//
-// ssl/detail/buffered_handshake_op.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_DETAIL_BUFFERED_HANDSHAKE_OP_HPP
-#define BOOST_ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_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/engine.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-template <typename ConstBufferSequence>
-class buffered_handshake_op
-{
-public:
- buffered_handshake_op(stream_base::handshake_type type,
- const ConstBufferSequence& buffers)
- : type_(type),
- buffers_(buffers),
- total_buffer_size_(boost::asio::buffer_size(buffers_))
- {
- }
-
- engine::want operator()(engine& eng,
- boost::system::error_code& ec,
- std::size_t& bytes_transferred) const
- {
- return this->process(eng, ec, bytes_transferred,
- boost::asio::buffer_sequence_begin(buffers_),
- boost::asio::buffer_sequence_end(buffers_));
- }
-
- template <typename Handler>
- void call_handler(Handler& handler,
- const boost::system::error_code& ec,
- const std::size_t& bytes_transferred) const
- {
- handler(ec, bytes_transferred);
- }
-
-private:
- template <typename Iterator>
- engine::want process(engine& eng,
- boost::system::error_code& ec,
- std::size_t& bytes_transferred,
- Iterator begin, Iterator end) const
- {
- Iterator iter = begin;
- std::size_t accumulated_size = 0;
-
- for (;;)
- {
- engine::want want = eng.handshake(type_, ec);
- if (want != engine::want_input_and_retry
- || bytes_transferred == total_buffer_size_)
- return want;
-
- // Find the next buffer piece to be fed to the engine.
- while (iter != end)
- {
- const_buffer buffer(*iter);
-
- // Skip over any buffers which have already been consumed by the engine.
- if (bytes_transferred >= accumulated_size + buffer.size())
- {
- accumulated_size += buffer.size();
- ++iter;
- continue;
- }
-
- // The current buffer may have been partially consumed by the engine on
- // a previous iteration. If so, adjust the buffer to point to the
- // unused portion.
- if (bytes_transferred > accumulated_size)
- buffer = buffer + (bytes_transferred - accumulated_size);
-
- // Pass the buffer to the engine, and update the bytes transferred to
- // reflect the total number of bytes consumed so far.
- bytes_transferred += buffer.size();
- buffer = eng.put_input(buffer);
- bytes_transferred -= buffer.size();
- break;
- }
- }
- }
-
- stream_base::handshake_type type_;
- ConstBufferSequence buffers_;
- std::size_t total_buffer_size_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp
deleted file mode 100644
index 01717e789ec..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp
+++ /dev/null
@@ -1,162 +0,0 @@
-//
-// ssl/detail/engine.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_DETAIL_ENGINE_HPP
-#define BOOST_ASIO_SSL_DETAIL_ENGINE_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/buffer.hpp>
-#include <boost/asio/detail/static_mutex.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-#include <boost/asio/ssl/detail/verify_callback.hpp>
-#include <boost/asio/ssl/stream_base.hpp>
-#include <boost/asio/ssl/verify_mode.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class engine
-{
-public:
- enum want
- {
- // Returned by functions to indicate that the engine wants input. The input
- // buffer should be updated to point to the data. The engine then needs to
- // be called again to retry the operation.
- want_input_and_retry = -2,
-
- // Returned by functions to indicate that the engine wants to write output.
- // The output buffer points to the data to be written. The engine then
- // needs to be called again to retry the operation.
- want_output_and_retry = -1,
-
- // Returned by functions to indicate that the engine doesn't need input or
- // output.
- want_nothing = 0,
-
- // Returned by functions to indicate that the engine wants to write output.
- // The output buffer points to the data to be written. After that the
- // operation is complete, and the engine does not need to be called again.
- want_output = 1
- };
-
- // Construct a new engine for the specified context.
- BOOST_ASIO_DECL explicit engine(SSL_CTX* context);
-
- // Destructor.
- BOOST_ASIO_DECL ~engine();
-
- // Get the underlying implementation in the native type.
- BOOST_ASIO_DECL SSL* native_handle();
-
- // Set the peer verification mode.
- BOOST_ASIO_DECL boost::system::error_code set_verify_mode(
- verify_mode v, boost::system::error_code& ec);
-
- // Set the peer verification depth.
- BOOST_ASIO_DECL boost::system::error_code set_verify_depth(
- int depth, boost::system::error_code& ec);
-
- // Set a peer certificate verification callback.
- BOOST_ASIO_DECL boost::system::error_code set_verify_callback(
- verify_callback_base* callback, boost::system::error_code& ec);
-
- // Perform an SSL handshake using either SSL_connect (client-side) or
- // SSL_accept (server-side).
- BOOST_ASIO_DECL want handshake(
- stream_base::handshake_type type, boost::system::error_code& ec);
-
- // Perform a graceful shutdown of the SSL session.
- BOOST_ASIO_DECL want shutdown(boost::system::error_code& ec);
-
- // Write bytes to the SSL session.
- BOOST_ASIO_DECL want write(const boost::asio::const_buffer& data,
- boost::system::error_code& ec, std::size_t& bytes_transferred);
-
- // Read bytes from the SSL session.
- BOOST_ASIO_DECL want read(const boost::asio::mutable_buffer& data,
- boost::system::error_code& ec, std::size_t& bytes_transferred);
-
- // Get output data to be written to the transport.
- BOOST_ASIO_DECL boost::asio::mutable_buffer get_output(
- const boost::asio::mutable_buffer& data);
-
- // Put input data that was read from the transport.
- BOOST_ASIO_DECL boost::asio::const_buffer put_input(
- const boost::asio::const_buffer& data);
-
- // Map an error::eof code returned by the underlying transport according to
- // the type and state of the SSL session. Returns a const reference to the
- // error code object, suitable for passing to a completion handler.
- BOOST_ASIO_DECL const boost::system::error_code& map_error_code(
- boost::system::error_code& ec) const;
-
-private:
- // Disallow copying and assignment.
- engine(const engine&);
- engine& operator=(const engine&);
-
- // Callback used when the SSL implementation wants to verify a certificate.
- BOOST_ASIO_DECL static int verify_callback_function(
- int preverified, X509_STORE_CTX* ctx);
-
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- // The SSL_accept function may not be thread safe. This mutex is used to
- // protect all calls to the SSL_accept function.
- BOOST_ASIO_DECL static boost::asio::detail::static_mutex& accept_mutex();
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-
- // Perform one operation. Returns >= 0 on success or error, want_read if the
- // operation needs more input, or want_write if it needs to write some output
- // before the operation can complete.
- BOOST_ASIO_DECL want perform(int (engine::* op)(void*, std::size_t),
- void* data, std::size_t length, boost::system::error_code& ec,
- std::size_t* bytes_transferred);
-
- // Adapt the SSL_accept function to the signature needed for perform().
- BOOST_ASIO_DECL int do_accept(void*, std::size_t);
-
- // Adapt the SSL_connect function to the signature needed for perform().
- BOOST_ASIO_DECL int do_connect(void*, std::size_t);
-
- // Adapt the SSL_shutdown function to the signature needed for perform().
- BOOST_ASIO_DECL int do_shutdown(void*, std::size_t);
-
- // Adapt the SSL_read function to the signature needed for perform().
- BOOST_ASIO_DECL int do_read(void* data, std::size_t length);
-
- // Adapt the SSL_write function to the signature needed for perform().
- BOOST_ASIO_DECL int do_write(void* data, std::size_t length);
-
- SSL* ssl_;
- BIO* ext_bio_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ssl/detail/impl/engine.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_SSL_DETAIL_ENGINE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp
deleted file mode 100644
index edb112eee23..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// ssl/detail/handshake_op.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_DETAIL_HANDSHAKE_OP_HPP
-#define BOOST_ASIO_SSL_DETAIL_HANDSHAKE_OP_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/engine.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class handshake_op
-{
-public:
- handshake_op(stream_base::handshake_type type)
- : type_(type)
- {
- }
-
- engine::want operator()(engine& eng,
- boost::system::error_code& ec,
- std::size_t& bytes_transferred) const
- {
- bytes_transferred = 0;
- return eng.handshake(type_, ec);
- }
-
- template <typename Handler>
- void call_handler(Handler& handler,
- const boost::system::error_code& ec,
- const std::size_t&) const
- {
- handler(ec);
- }
-
-private:
- stream_base::handshake_type type_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp
deleted file mode 100644
index 9142a5df3a3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp
+++ /dev/null
@@ -1,324 +0,0 @@
-//
-// ssl/detail/impl/engine.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_SSL_DETAIL_IMPL_ENGINE_IPP
-#define BOOST_ASIO_SSL_DETAIL_IMPL_ENGINE_IPP
-
-#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/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/ssl/detail/engine.hpp>
-#include <boost/asio/ssl/error.hpp>
-#include <boost/asio/ssl/verify_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-engine::engine(SSL_CTX* context)
- : ssl_(::SSL_new(context))
-{
- if (!ssl_)
- {
- boost::system::error_code ec(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- boost::asio::detail::throw_error(ec, "engine");
- }
-
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- accept_mutex().init();
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-
- ::SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE);
- ::SSL_set_mode(ssl_, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
-#if defined(SSL_MODE_RELEASE_BUFFERS)
- ::SSL_set_mode(ssl_, SSL_MODE_RELEASE_BUFFERS);
-#endif // defined(SSL_MODE_RELEASE_BUFFERS)
-
- ::BIO* int_bio = 0;
- ::BIO_new_bio_pair(&int_bio, 0, &ext_bio_, 0);
- ::SSL_set_bio(ssl_, int_bio, int_bio);
-}
-
-engine::~engine()
-{
- if (SSL_get_app_data(ssl_))
- {
- delete static_cast<verify_callback_base*>(SSL_get_app_data(ssl_));
- SSL_set_app_data(ssl_, 0);
- }
-
- ::BIO_free(ext_bio_);
- ::SSL_free(ssl_);
-}
-
-SSL* engine::native_handle()
-{
- return ssl_;
-}
-
-boost::system::error_code engine::set_verify_mode(
- verify_mode v, boost::system::error_code& ec)
-{
- ::SSL_set_verify(ssl_, v, ::SSL_get_verify_callback(ssl_));
-
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code engine::set_verify_depth(
- int depth, boost::system::error_code& ec)
-{
- ::SSL_set_verify_depth(ssl_, depth);
-
- ec = boost::system::error_code();
- return ec;
-}
-
-boost::system::error_code engine::set_verify_callback(
- verify_callback_base* callback, boost::system::error_code& ec)
-{
- if (SSL_get_app_data(ssl_))
- delete static_cast<verify_callback_base*>(SSL_get_app_data(ssl_));
-
- SSL_set_app_data(ssl_, callback);
-
- ::SSL_set_verify(ssl_, ::SSL_get_verify_mode(ssl_),
- &engine::verify_callback_function);
-
- ec = boost::system::error_code();
- return ec;
-}
-
-int engine::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_get_app_data(ssl))
- {
- verify_callback_base* callback =
- static_cast<verify_callback_base*>(
- SSL_get_app_data(ssl));
-
- verify_context verify_ctx(ctx);
- return callback->call(preverified != 0, verify_ctx) ? 1 : 0;
- }
- }
- }
-
- return 0;
-}
-
-engine::want engine::handshake(
- stream_base::handshake_type type, boost::system::error_code& ec)
-{
- return perform((type == boost::asio::ssl::stream_base::client)
- ? &engine::do_connect : &engine::do_accept, 0, 0, ec, 0);
-}
-
-engine::want engine::shutdown(boost::system::error_code& ec)
-{
- return perform(&engine::do_shutdown, 0, 0, ec, 0);
-}
-
-engine::want engine::write(const boost::asio::const_buffer& data,
- boost::system::error_code& ec, std::size_t& bytes_transferred)
-{
- if (data.size() == 0)
- {
- ec = boost::system::error_code();
- return engine::want_nothing;
- }
-
- return perform(&engine::do_write,
- const_cast<void*>(data.data()),
- data.size(), ec, &bytes_transferred);
-}
-
-engine::want engine::read(const boost::asio::mutable_buffer& data,
- boost::system::error_code& ec, std::size_t& bytes_transferred)
-{
- if (data.size() == 0)
- {
- ec = boost::system::error_code();
- return engine::want_nothing;
- }
-
- return perform(&engine::do_read, data.data(),
- data.size(), ec, &bytes_transferred);
-}
-
-boost::asio::mutable_buffer engine::get_output(
- const boost::asio::mutable_buffer& data)
-{
- int length = ::BIO_read(ext_bio_,
- data.data(), static_cast<int>(data.size()));
-
- return boost::asio::buffer(data,
- length > 0 ? static_cast<std::size_t>(length) : 0);
-}
-
-boost::asio::const_buffer engine::put_input(
- const boost::asio::const_buffer& data)
-{
- int length = ::BIO_write(ext_bio_,
- data.data(), static_cast<int>(data.size()));
-
- return boost::asio::buffer(data +
- (length > 0 ? static_cast<std::size_t>(length) : 0));
-}
-
-const boost::system::error_code& engine::map_error_code(
- boost::system::error_code& ec) const
-{
- // We only want to map the error::eof code.
- if (ec != boost::asio::error::eof)
- return ec;
-
- // If there's data yet to be read, it's an error.
- if (BIO_wpending(ext_bio_))
- {
- ec = boost::asio::ssl::error::stream_truncated;
- return ec;
- }
-
- // SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
- // underlying transport is passed through.
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- if (SSL_version(ssl_) == SSL2_VERSION)
- return ec;
-#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
-
- // Otherwise, the peer should have negotiated a proper shutdown.
- if ((::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN) == 0)
- {
- ec = boost::asio::ssl::error::stream_truncated;
- }
-
- return ec;
-}
-
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
-boost::asio::detail::static_mutex& engine::accept_mutex()
-{
- static boost::asio::detail::static_mutex mutex = BOOST_ASIO_STATIC_MUTEX_INIT;
- return mutex;
-}
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-
-engine::want engine::perform(int (engine::* op)(void*, std::size_t),
- void* data, std::size_t length, boost::system::error_code& ec,
- std::size_t* bytes_transferred)
-{
- std::size_t pending_output_before = ::BIO_ctrl_pending(ext_bio_);
- ::ERR_clear_error();
- int result = (this->*op)(data, length);
- int ssl_error = ::SSL_get_error(ssl_, result);
- int sys_error = static_cast<int>(::ERR_get_error());
- std::size_t pending_output_after = ::BIO_ctrl_pending(ext_bio_);
-
- if (ssl_error == SSL_ERROR_SSL)
- {
- ec = boost::system::error_code(sys_error,
- boost::asio::error::get_ssl_category());
- return want_nothing;
- }
-
- if (ssl_error == SSL_ERROR_SYSCALL)
- {
- ec = boost::system::error_code(sys_error,
- boost::asio::error::get_system_category());
- return want_nothing;
- }
-
- if (result > 0 && bytes_transferred)
- *bytes_transferred = static_cast<std::size_t>(result);
-
- if (ssl_error == SSL_ERROR_WANT_WRITE)
- {
- ec = boost::system::error_code();
- return want_output_and_retry;
- }
- else if (pending_output_after > pending_output_before)
- {
- ec = boost::system::error_code();
- return result > 0 ? want_output : want_output_and_retry;
- }
- else if (ssl_error == SSL_ERROR_WANT_READ)
- {
- ec = boost::system::error_code();
- return want_input_and_retry;
- }
- else if (::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN)
- {
- ec = boost::asio::error::eof;
- return want_nothing;
- }
- else
- {
- ec = boost::system::error_code();
- return want_nothing;
- }
-}
-
-int engine::do_accept(void*, std::size_t)
-{
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- boost::asio::detail::static_mutex::scoped_lock lock(accept_mutex());
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
- return ::SSL_accept(ssl_);
-}
-
-int engine::do_connect(void*, std::size_t)
-{
- return ::SSL_connect(ssl_);
-}
-
-int engine::do_shutdown(void*, std::size_t)
-{
- int result = ::SSL_shutdown(ssl_);
- if (result == 0)
- result = ::SSL_shutdown(ssl_);
- return result;
-}
-
-int engine::do_read(void* data, std::size_t length)
-{
- return ::SSL_read(ssl_, data,
- length < INT_MAX ? static_cast<int>(length) : INT_MAX);
-}
-
-int engine::do_write(void* data, std::size_t length)
-{
- return ::SSL_write(ssl_, data,
- length < INT_MAX ? static_cast<int>(length) : INT_MAX);
-}
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_IMPL_ENGINE_IPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 1608138e9de..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/openssl_init.ipp
+++ /dev/null
@@ -1,167 +0,0 @@
-//
-// ssl/detail/impl/openssl_init.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_DETAIL_IMPL_OPENSSL_INIT_IPP
-#define BOOST_ASIO_SSL_DETAIL_IMPL_OPENSSL_INIT_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <vector>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/mutex.hpp>
-#include <boost/asio/detail/tss_ptr.hpp>
-#include <boost/asio/ssl/detail/openssl_init.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class openssl_init_base::do_init
-{
-public:
- do_init()
- {
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ::SSL_library_init();
- ::SSL_load_error_strings();
- ::OpenSSL_add_all_algorithms();
-
- mutexes_.resize(::CRYPTO_num_locks());
- for (size_t i = 0; i < mutexes_.size(); ++i)
- mutexes_[i].reset(new boost::asio::detail::mutex);
- ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
-#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- ::CRYPTO_set_id_callback(&do_init::openssl_id_func);
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- null_compression_methods_ = sk_SSL_COMP_new_null();
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- }
-
- ~do_init()
- {
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- sk_SSL_COMP_free(null_compression_methods_);
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- ::CRYPTO_set_id_callback(0);
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ::CRYPTO_set_locking_callback(0);
- ::ERR_free_strings();
- ::EVP_cleanup();
- ::CRYPTO_cleanup_all_ex_data();
-#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- ::ERR_remove_state(0);
-#elif (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ::ERR_remove_thread_state(NULL);
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \
- && (OPENSSL_VERSION_NUMBER < 0x10100000L) \
- && !defined(SSL_OP_NO_COMPRESSION)
- ::SSL_COMP_free_compression_methods();
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
- // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- // && !defined(SSL_OP_NO_COMPRESSION)
-#if !defined(OPENSSL_IS_BORINGSSL)
- ::CONF_modules_unload(1);
-#endif // !defined(OPENSSL_IS_BORINGSSL)
-#if !defined(OPENSSL_NO_ENGINE) \
- && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ::ENGINE_cleanup();
-#endif // !defined(OPENSSL_NO_ENGINE)
- // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- }
-
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- STACK_OF(SSL_COMP)* get_null_compression_methods() const
- {
- return null_compression_methods_;
- }
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-
-private:
-#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
- static unsigned long openssl_id_func()
- {
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- return ::GetCurrentThreadId();
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- void* id = &errno;
- BOOST_ASIO_ASSERT(sizeof(unsigned long) >= sizeof(void*));
- return reinterpret_cast<unsigned long>(id);
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- }
-#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
-
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- static void openssl_locking_func(int mode, int n,
- const char* /*file*/, int /*line*/)
- {
- if (mode & CRYPTO_LOCK)
- instance()->mutexes_[n]->lock();
- else
- instance()->mutexes_[n]->unlock();
- }
-
- // Mutexes to be used in locking callbacks.
- std::vector<boost::asio::detail::shared_ptr<
- boost::asio::detail::mutex> > mutexes_;
-#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
-
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- STACK_OF(SSL_COMP)* null_compression_methods_;
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-};
-
-boost::asio::detail::shared_ptr<openssl_init_base::do_init>
-openssl_init_base::instance()
-{
- static boost::asio::detail::shared_ptr<do_init> init(new do_init);
- return init;
-}
-
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-STACK_OF(SSL_COMP)* openssl_init_base::get_null_compression_methods()
-{
- return instance()->get_null_compression_methods();
-}
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_IMPL_OPENSSL_INIT_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp
deleted file mode 100644
index 604148c795e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp
+++ /dev/null
@@ -1,374 +0,0 @@
-//
-// ssl/detail/io.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_DETAIL_IO_HPP
-#define BOOST_ASIO_SSL_DETAIL_IO_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/engine.hpp>
-#include <boost/asio/ssl/detail/stream_core.hpp>
-#include <boost/asio/write.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-template <typename Stream, typename Operation>
-std::size_t io(Stream& next_layer, stream_core& core,
- const Operation& op, boost::system::error_code& ec)
-{
- std::size_t bytes_transferred = 0;
- do switch (op(core.engine_, ec, bytes_transferred))
- {
- case engine::want_input_and_retry:
-
- // If the input buffer is empty then we need to read some more data from
- // the underlying transport.
- if (core.input_.size() == 0)
- core.input_ = boost::asio::buffer(core.input_buffer_,
- next_layer.read_some(core.input_buffer_, ec));
-
- // Pass the new input data to the engine.
- core.input_ = core.engine_.put_input(core.input_);
-
- // Try the operation again.
- continue;
-
- case engine::want_output_and_retry:
-
- // Get output data from the engine and write it to the underlying
- // transport.
- boost::asio::write(next_layer,
- core.engine_.get_output(core.output_buffer_), ec);
-
- // Try the operation again.
- continue;
-
- case engine::want_output:
-
- // Get output data from the engine and write it to the underlying
- // transport.
- boost::asio::write(next_layer,
- core.engine_.get_output(core.output_buffer_), ec);
-
- // Operation is complete. Return result to caller.
- core.engine_.map_error_code(ec);
- return bytes_transferred;
-
- default:
-
- // Operation is complete. Return result to caller.
- core.engine_.map_error_code(ec);
- return bytes_transferred;
-
- } while (!ec);
-
- // Operation failed. Return result to caller.
- core.engine_.map_error_code(ec);
- return 0;
-}
-
-template <typename Stream, typename Operation, typename Handler>
-class io_op
-{
-public:
- io_op(Stream& next_layer, stream_core& core,
- const Operation& op, Handler& handler)
- : next_layer_(next_layer),
- core_(core),
- op_(op),
- start_(0),
- want_(engine::want_nothing),
- bytes_transferred_(0),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- io_op(const io_op& other)
- : next_layer_(other.next_layer_),
- core_(other.core_),
- op_(other.op_),
- start_(other.start_),
- want_(other.want_),
- ec_(other.ec_),
- bytes_transferred_(other.bytes_transferred_),
- handler_(other.handler_)
- {
- }
-
- io_op(io_op&& other)
- : next_layer_(other.next_layer_),
- core_(other.core_),
- op_(BOOST_ASIO_MOVE_CAST(Operation)(other.op_)),
- start_(other.start_),
- want_(other.want_),
- ec_(other.ec_),
- bytes_transferred_(other.bytes_transferred_),
- handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(boost::system::error_code ec,
- std::size_t bytes_transferred = ~std::size_t(0), int start = 0)
- {
- switch (start_ = start)
- {
- case 1: // Called after at least one async operation.
- do
- {
- switch (want_ = op_(core_.engine_, ec_, bytes_transferred_))
- {
- case engine::want_input_and_retry:
-
- // If the input buffer already has data in it we can pass it to the
- // engine and then retry the operation immediately.
- if (core_.input_.size() != 0)
- {
- core_.input_ = core_.engine_.put_input(core_.input_);
- continue;
- }
-
- // The engine wants more data to be read from input. However, we
- // cannot allow more than one read operation at a time on the
- // underlying transport. The pending_read_ timer's expiry is set to
- // pos_infin if a read is in progress, and neg_infin otherwise.
- if (core_.expiry(core_.pending_read_) == core_.neg_infin())
- {
- // Prevent other read operations from being started.
- core_.pending_read_.expires_at(core_.pos_infin());
-
- // Start reading some data from the underlying transport.
- next_layer_.async_read_some(
- boost::asio::buffer(core_.input_buffer_),
- BOOST_ASIO_MOVE_CAST(io_op)(*this));
- }
- else
- {
- // Wait until the current read operation completes.
- core_.pending_read_.async_wait(BOOST_ASIO_MOVE_CAST(io_op)(*this));
- }
-
- // Yield control until asynchronous operation completes. Control
- // resumes at the "default:" label below.
- return;
-
- case engine::want_output_and_retry:
- case engine::want_output:
-
- // The engine wants some data to be written to the output. However, we
- // cannot allow more than one write operation at a time on the
- // underlying transport. The pending_write_ timer's expiry is set to
- // pos_infin if a write is in progress, and neg_infin otherwise.
- if (core_.expiry(core_.pending_write_) == core_.neg_infin())
- {
- // Prevent other write operations from being started.
- core_.pending_write_.expires_at(core_.pos_infin());
-
- // Start writing all the data to the underlying transport.
- boost::asio::async_write(next_layer_,
- core_.engine_.get_output(core_.output_buffer_),
- BOOST_ASIO_MOVE_CAST(io_op)(*this));
- }
- else
- {
- // Wait until the current write operation completes.
- core_.pending_write_.async_wait(BOOST_ASIO_MOVE_CAST(io_op)(*this));
- }
-
- // Yield control until asynchronous operation completes. Control
- // resumes at the "default:" label below.
- return;
-
- default:
-
- // The SSL operation is done and we can invoke the handler, but we
- // have to keep in mind that this function might be being called from
- // the async operation's initiating function. In this case we're not
- // allowed to call the handler directly. Instead, issue a zero-sized
- // read so the handler runs "as-if" posted using io_context::post().
- if (start)
- {
- next_layer_.async_read_some(
- boost::asio::buffer(core_.input_buffer_, 0),
- BOOST_ASIO_MOVE_CAST(io_op)(*this));
-
- // Yield control until asynchronous operation completes. Control
- // resumes at the "default:" label below.
- return;
- }
- else
- {
- // Continue on to run handler directly.
- break;
- }
- }
-
- default:
- if (bytes_transferred == ~std::size_t(0))
- bytes_transferred = 0; // Timer cancellation, no data transferred.
- else if (!ec_)
- ec_ = ec;
-
- switch (want_)
- {
- case engine::want_input_and_retry:
-
- // Add received data to the engine's input.
- core_.input_ = boost::asio::buffer(
- core_.input_buffer_, bytes_transferred);
- core_.input_ = core_.engine_.put_input(core_.input_);
-
- // Release any waiting read operations.
- core_.pending_read_.expires_at(core_.neg_infin());
-
- // Try the operation again.
- continue;
-
- case engine::want_output_and_retry:
-
- // Release any waiting write operations.
- core_.pending_write_.expires_at(core_.neg_infin());
-
- // Try the operation again.
- continue;
-
- case engine::want_output:
-
- // Release any waiting write operations.
- core_.pending_write_.expires_at(core_.neg_infin());
-
- // Fall through to call handler.
-
- default:
-
- // Pass the result to the handler.
- op_.call_handler(handler_,
- core_.engine_.map_error_code(ec_),
- ec_ ? 0 : bytes_transferred_);
-
- // Our work here is done.
- return;
- }
- } while (!ec_);
-
- // Operation failed. Pass the result to the handler.
- op_.call_handler(handler_, core_.engine_.map_error_code(ec_), 0);
- }
- }
-
-//private:
- Stream& next_layer_;
- stream_core& core_;
- Operation op_;
- int start_;
- engine::want want_;
- boost::system::error_code ec_;
- std::size_t bytes_transferred_;
- Handler handler_;
-};
-
-template <typename Stream, typename Operation, typename Handler>
-inline void* asio_handler_allocate(std::size_t size,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Stream, typename Operation, typename Handler>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Stream, typename Operation, typename Handler>
-inline bool asio_handler_is_continuation(
- io_op<Stream, Operation, Handler>* this_handler)
-{
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(this_handler->handler_);
-}
-
-template <typename Function, typename Stream,
- typename Operation, typename Handler>
-inline void asio_handler_invoke(Function& function,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Stream,
- typename Operation, typename Handler>
-inline void asio_handler_invoke(const Function& function,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Stream, typename Operation, typename Handler>
-inline void async_io(Stream& next_layer, stream_core& core,
- const Operation& op, Handler& handler)
-{
- io_op<Stream, Operation, Handler>(
- next_layer, core, op, handler)(
- boost::system::error_code(), 0, 1);
-}
-
-} // namespace detail
-} // namespace ssl
-
-template <typename Stream, typename Operation,
- typename Handler, typename Allocator>
-struct associated_allocator<
- ssl::detail::io_op<Stream, Operation, Handler>, Allocator>
-{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename Stream, typename Operation,
- typename Handler, typename Executor>
-struct associated_executor<
- ssl::detail::io_op<Stream, Operation, Handler>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
-
- static type get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_IO_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp
deleted file mode 100644
index 05b1ea4a338..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// ssl/detail/openssl_init.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_DETAIL_OPENSSL_INIT_HPP
-#define BOOST_ASIO_SSL_DETAIL_OPENSSL_INIT_HPP
-
-#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/memory.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class openssl_init_base
- : private noncopyable
-{
-protected:
- // Class that performs the actual initialisation.
- class do_init;
-
- // Helper function to manage a do_init singleton. The static instance of the
- // openssl_init object ensures that this function is always called before
- // main, and therefore before any other threads can get started. The do_init
- // instance must be static in this function to ensure that it gets
- // initialised before any other global objects try to use it.
- BOOST_ASIO_DECL static boost::asio::detail::shared_ptr<do_init> instance();
-
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- // Get an empty stack of compression methods, to be used when disabling
- // compression.
- BOOST_ASIO_DECL static STACK_OF(SSL_COMP)* get_null_compression_methods();
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-};
-
-template <bool Do_Init = true>
-class openssl_init : private openssl_init_base
-{
-public:
- // Constructor.
- openssl_init()
- : ref_(instance())
- {
- using namespace std; // For memmove.
-
- // Ensure openssl_init::instance_ is linked in.
- openssl_init* tmp = &instance_;
- memmove(&tmp, &tmp, sizeof(openssl_init*));
- }
-
- // Destructor.
- ~openssl_init()
- {
- }
-
-#if !defined(SSL_OP_NO_COMPRESSION) \
- && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- using openssl_init_base::get_null_compression_methods;
-#endif // !defined(SSL_OP_NO_COMPRESSION)
- // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-
-private:
- // Instance to force initialisation of openssl at global scope.
- static openssl_init instance_;
-
- // Reference to singleton do_init object to ensure that openssl does not get
- // cleaned up until the last user has finished with it.
- boost::asio::detail::shared_ptr<do_init> ref_;
-};
-
-template <bool Do_Init>
-openssl_init<Do_Init> openssl_init<Do_Init>::instance_;
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ssl/detail/impl/openssl_init.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_SSL_DETAIL_OPENSSL_INIT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp
deleted file mode 100644
index c955ac60131..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// ssl/detail/openssl_types.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_DETAIL_OPENSSL_TYPES_HPP
-#define BOOST_ASIO_SSL_DETAIL_OPENSSL_TYPES_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/socket_types.hpp>
-#include <openssl/conf.h>
-#include <openssl/ssl.h>
-#if !defined(OPENSSL_NO_ENGINE)
-# include <openssl/engine.h>
-#endif // !defined(OPENSSL_NO_ENGINE)
-#include <openssl/dh.h>
-#include <openssl/err.h>
-#include <openssl/rsa.h>
-#include <openssl/x509v3.h>
-
-#endif // BOOST_ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp
deleted file mode 100644
index 2a442f34d2f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// ssl/detail/password_callback.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_DETAIL_PASSWORD_CALLBACK_HPP
-#define BOOST_ASIO_SSL_DETAIL_PASSWORD_CALLBACK_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/ssl/context_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class password_callback_base
-{
-public:
- virtual ~password_callback_base()
- {
- }
-
- virtual std::string call(std::size_t size,
- context_base::password_purpose purpose) = 0;
-};
-
-template <typename PasswordCallback>
-class password_callback : public password_callback_base
-{
-public:
- explicit password_callback(PasswordCallback callback)
- : callback_(callback)
- {
- }
-
- virtual std::string call(std::size_t size,
- context_base::password_purpose purpose)
- {
- return callback_(size, purpose);
- }
-
-private:
- PasswordCallback callback_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_PASSWORD_CALLBACK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp
deleted file mode 100644
index 31929c9474a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ssl/detail/read_op.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_DETAIL_READ_OP_HPP
-#define BOOST_ASIO_SSL_DETAIL_READ_OP_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/buffer_sequence_adapter.hpp>
-#include <boost/asio/ssl/detail/engine.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-template <typename MutableBufferSequence>
-class read_op
-{
-public:
- read_op(const MutableBufferSequence& buffers)
- : buffers_(buffers)
- {
- }
-
- engine::want operator()(engine& eng,
- boost::system::error_code& ec,
- std::size_t& bytes_transferred) const
- {
- boost::asio::mutable_buffer buffer =
- boost::asio::detail::buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::first(buffers_);
-
- return eng.read(buffer, ec, bytes_transferred);
- }
-
- template <typename Handler>
- void call_handler(Handler& handler,
- const boost::system::error_code& ec,
- const std::size_t& bytes_transferred) const
- {
- handler(ec, bytes_transferred);
- }
-
-private:
- MutableBufferSequence buffers_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_READ_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp
deleted file mode 100644
index e98430621ea..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// ssl/detail/shutdown_op.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_DETAIL_SHUTDOWN_OP_HPP
-#define BOOST_ASIO_SSL_DETAIL_SHUTDOWN_OP_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/engine.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class shutdown_op
-{
-public:
- engine::want operator()(engine& eng,
- boost::system::error_code& ec,
- std::size_t& bytes_transferred) const
- {
- bytes_transferred = 0;
- return eng.shutdown(ec);
- }
-
- template <typename Handler>
- void call_handler(Handler& handler,
- const boost::system::error_code& ec,
- const std::size_t&) const
- {
- handler(ec);
- }
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp
deleted file mode 100644
index fc0a6ffffc0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// ssl/detail/stream_core.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_DETAIL_STREAM_CORE_HPP
-#define BOOST_ASIO_SSL_DETAIL_STREAM_CORE_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_BOOST_DATE_TIME)
-# include <boost/asio/deadline_timer.hpp>
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-# include <boost/asio/steady_timer.hpp>
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-#include <boost/asio/ssl/detail/engine.hpp>
-#include <boost/asio/buffer.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-struct stream_core
-{
- // According to the OpenSSL documentation, this is the buffer size that is
- // sufficient to hold the largest possible TLS record.
- enum { max_tls_record_size = 17 * 1024 };
-
- stream_core(SSL_CTX* context, boost::asio::io_context& io_context)
- : engine_(context),
- pending_read_(io_context),
- pending_write_(io_context),
- output_buffer_space_(max_tls_record_size),
- output_buffer_(boost::asio::buffer(output_buffer_space_)),
- input_buffer_space_(max_tls_record_size),
- input_buffer_(boost::asio::buffer(input_buffer_space_))
- {
- pending_read_.expires_at(neg_infin());
- pending_write_.expires_at(neg_infin());
- }
-
- ~stream_core()
- {
- }
-
- // The SSL engine.
- engine engine_;
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // Timer used for storing queued read operations.
- boost::asio::deadline_timer pending_read_;
-
- // Timer used for storing queued write operations.
- boost::asio::deadline_timer pending_write_;
-
- // Helper function for obtaining a time value that always fires.
- static boost::asio::deadline_timer::time_type neg_infin()
- {
- return boost::posix_time::neg_infin;
- }
-
- // Helper function for obtaining a time value that never fires.
- static boost::asio::deadline_timer::time_type pos_infin()
- {
- return boost::posix_time::pos_infin;
- }
-
- // Helper function to get a timer's expiry time.
- static boost::asio::deadline_timer::time_type expiry(
- const boost::asio::deadline_timer& timer)
- {
- return timer.expires_at();
- }
-#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // Timer used for storing queued read operations.
- boost::asio::steady_timer pending_read_;
-
- // Timer used for storing queued write operations.
- boost::asio::steady_timer pending_write_;
-
- // Helper function for obtaining a time value that always fires.
- static boost::asio::steady_timer::time_point neg_infin()
- {
- return (boost::asio::steady_timer::time_point::min)();
- }
-
- // Helper function for obtaining a time value that never fires.
- static boost::asio::steady_timer::time_point pos_infin()
- {
- return (boost::asio::steady_timer::time_point::max)();
- }
-
- // Helper function to get a timer's expiry time.
- static boost::asio::steady_timer::time_point expiry(
- const boost::asio::steady_timer& timer)
- {
- return timer.expiry();
- }
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
- // Buffer space used to prepare output intended for the transport.
- std::vector<unsigned char> output_buffer_space_;
-
- // A buffer that may be used to prepare output intended for the transport.
- const boost::asio::mutable_buffer output_buffer_;
-
- // Buffer space used to read input intended for the engine.
- std::vector<unsigned char> input_buffer_space_;
-
- // A buffer that may be used to read input intended for the engine.
- const boost::asio::mutable_buffer input_buffer_;
-
- // The buffer pointing to the engine's unconsumed input.
- boost::asio::const_buffer input_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_STREAM_CORE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp
deleted file mode 100644
index 1e96b2554b3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// ssl/detail/verify_callback.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_DETAIL_VERIFY_CALLBACK_HPP
-#define BOOST_ASIO_SSL_DETAIL_VERIFY_CALLBACK_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/verify_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-class verify_callback_base
-{
-public:
- virtual ~verify_callback_base()
- {
- }
-
- virtual bool call(bool preverified, verify_context& ctx) = 0;
-};
-
-template <typename VerifyCallback>
-class verify_callback : public verify_callback_base
-{
-public:
- explicit verify_callback(VerifyCallback callback)
- : callback_(callback)
- {
- }
-
- virtual bool call(bool preverified, verify_context& ctx)
- {
- return callback_(preverified, ctx);
- }
-
-private:
- VerifyCallback callback_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp
deleted file mode 100644
index 17ab95d67e1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ssl/detail/write_op.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_DETAIL_WRITE_OP_HPP
-#define BOOST_ASIO_SSL_DETAIL_WRITE_OP_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/buffer_sequence_adapter.hpp>
-#include <boost/asio/ssl/detail/engine.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-namespace detail {
-
-template <typename ConstBufferSequence>
-class write_op
-{
-public:
- write_op(const ConstBufferSequence& buffers)
- : buffers_(buffers)
- {
- }
-
- engine::want operator()(engine& eng,
- boost::system::error_code& ec,
- std::size_t& bytes_transferred) const
- {
- boost::asio::const_buffer buffer =
- boost::asio::detail::buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::first(buffers_);
-
- return eng.write(buffer, ec, bytes_transferred);
- }
-
- template <typename Handler>
- void call_handler(Handler& handler,
- const boost::system::error_code& ec,
- const std::size_t& bytes_transferred) const
- {
- handler(ec, bytes_transferred);
- }
-
-private:
- ConstBufferSequence buffers_;
-};
-
-} // namespace detail
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_DETAIL_WRITE_OP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp
deleted file mode 100644
index 4a68d717034..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//
-// ssl/error.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_ERROR_HPP
-#define BOOST_ASIO_SSL_ERROR_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/system/error_code.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace error {
-
-enum ssl_errors
-{
- // Error numbers are those produced by openssl.
-};
-
-extern BOOST_ASIO_DECL
-const boost::system::error_category& get_ssl_category();
-
-static const boost::system::error_category&
- ssl_category BOOST_ASIO_UNUSED_VARIABLE
- = boost::asio::error::get_ssl_category();
-
-} // namespace error
-namespace ssl {
-namespace error {
-
-enum stream_errors
-{
-#if defined(GENERATING_DOCUMENTATION)
- /// The underlying stream closed before the ssl stream gracefully shut down.
- stream_truncated
-#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
- stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)
-#else
- stream_truncated = 1
-#endif
-};
-
-extern BOOST_ASIO_DECL
-const boost::system::error_category& get_stream_category();
-
-static const boost::system::error_category&
- stream_category BOOST_ASIO_UNUSED_VARIABLE
- = boost::asio::ssl::error::get_stream_category();
-
-} // namespace error
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-namespace boost {
-namespace system {
-
-template<> struct is_error_code_enum<boost::asio::error::ssl_errors>
-{
- static const bool value = true;
-};
-
-template<> struct is_error_code_enum<boost::asio::ssl::error::stream_errors>
-{
- static const bool value = true;
-};
-
-} // namespace system
-} // namespace boost
-
-namespace boost {
-namespace asio {
-namespace error {
-
-inline boost::system::error_code make_error_code(ssl_errors e)
-{
- return boost::system::error_code(
- static_cast<int>(e), get_ssl_category());
-}
-
-} // namespace error
-namespace ssl {
-namespace error {
-
-inline boost::system::error_code make_error_code(stream_errors e)
-{
- return boost::system::error_code(
- static_cast<int>(e), get_stream_category());
-}
-
-} // namespace error
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ssl/impl/error.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_SSL_ERROR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp
deleted file mode 100644
index 8f016830f94..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ssl/impl/context.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// 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_HPP
-#define BOOST_ASIO_SSL_IMPL_CONTEXT_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/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-template <typename VerifyCallback>
-void context::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");
-}
-
-template <typename VerifyCallback>
-BOOST_ASIO_SYNC_OP_VOID context::set_verify_callback(
- VerifyCallback callback, boost::system::error_code& ec)
-{
- do_set_verify_callback(
- new detail::verify_callback<VerifyCallback>(callback), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-template <typename PasswordCallback>
-void context::set_password_callback(PasswordCallback callback)
-{
- boost::system::error_code ec;
- this->set_password_callback(callback, ec);
- boost::asio::detail::throw_error(ec, "set_password_callback");
-}
-
-template <typename PasswordCallback>
-BOOST_ASIO_SYNC_OP_VOID context::set_password_callback(
- PasswordCallback callback, boost::system::error_code& ec)
-{
- do_set_password_callback(
- new detail::password_callback<PasswordCallback>(callback), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index b331dea45d2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.ipp
+++ /dev/null
@@ -1,1206 +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;
-#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.69.0/boost/asio/ssl/impl/error.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/error.ipp
deleted file mode 100644
index a3596197650..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/error.ipp
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// ssl/impl/error.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_SSL_IMPL_ERROR_IPP
-#define BOOST_ASIO_SSL_IMPL_ERROR_IPP
-
-#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/error.hpp>
-#include <boost/asio/ssl/detail/openssl_init.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace error {
-namespace detail {
-
-class ssl_category : public boost::system::error_category
-{
-public:
- const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
- {
- return "asio.ssl";
- }
-
- std::string message(int value) const
- {
- const char* s = ::ERR_reason_error_string(value);
- return s ? s : "asio.ssl error";
- }
-};
-
-} // namespace detail
-
-const boost::system::error_category& get_ssl_category()
-{
- static detail::ssl_category instance;
- return instance;
-}
-
-} // namespace error
-namespace ssl {
-namespace error {
-
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
-
-const boost::system::error_category& get_stream_category()
-{
- return boost::asio::error::get_ssl_category();
-}
-
-#else
-
-namespace detail {
-
-class stream_category : public boost::system::error_category
-{
-public:
- const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
- {
- return "asio.ssl.stream";
- }
-
- std::string message(int value) const
- {
- switch (value)
- {
- case stream_truncated: return "stream truncated";
- default: return "asio.ssl.stream error";
- }
- }
-};
-
-} // namespace detail
-
-const boost::system::error_category& get_stream_category()
-{
- static detail::stream_category instance;
- return instance;
-}
-
-#endif
-
-} // namespace error
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_IMPL_ERROR_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp
deleted file mode 100644
index 63ce663bdcc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp
+++ /dev/null
@@ -1,162 +0,0 @@
-//
-// ssl/impl/rfc2818_verification.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_SSL_IMPL_RFC2818_VERIFICATION_IPP
-#define BOOST_ASIO_SSL_IMPL_RFC2818_VERIFICATION_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 <cstring>
-#include <boost/asio/ip/address.hpp>
-#include <boost/asio/ssl/rfc2818_verification.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-bool rfc2818_verification::operator()(
- bool preverified, verify_context& ctx) const
-{
- using namespace std; // For memcmp.
-
- // Don't bother looking at certificates that have failed pre-verification.
- if (!preverified)
- return false;
-
- // We're only interested in checking the certificate at the end of the chain.
- int depth = X509_STORE_CTX_get_error_depth(ctx.native_handle());
- if (depth > 0)
- return true;
-
- // Try converting the host name to an address. If it is an address then we
- // need to look for an IP address in the certificate rather than a host name.
- boost::system::error_code ec;
- ip::address address = ip::make_address(host_, ec);
- bool is_address = !ec;
-
- X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
-
- // Go through the alternate names in the certificate looking for matching DNS
- // or IP address entries.
- GENERAL_NAMES* gens = static_cast<GENERAL_NAMES*>(
- X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0));
- for (int i = 0; i < sk_GENERAL_NAME_num(gens); ++i)
- {
- GENERAL_NAME* gen = sk_GENERAL_NAME_value(gens, i);
- if (gen->type == GEN_DNS && !is_address)
- {
- ASN1_IA5STRING* domain = gen->d.dNSName;
- if (domain->type == V_ASN1_IA5STRING && domain->data && domain->length)
- {
- const char* pattern = reinterpret_cast<const char*>(domain->data);
- std::size_t pattern_length = domain->length;
- if (match_pattern(pattern, pattern_length, host_.c_str()))
- {
- GENERAL_NAMES_free(gens);
- return true;
- }
- }
- }
- else if (gen->type == GEN_IPADD && is_address)
- {
- ASN1_OCTET_STRING* ip_address = gen->d.iPAddress;
- if (ip_address->type == V_ASN1_OCTET_STRING && ip_address->data)
- {
- if (address.is_v4() && ip_address->length == 4)
- {
- ip::address_v4::bytes_type bytes = address.to_v4().to_bytes();
- if (memcmp(bytes.data(), ip_address->data, 4) == 0)
- {
- GENERAL_NAMES_free(gens);
- return true;
- }
- }
- else if (address.is_v6() && ip_address->length == 16)
- {
- ip::address_v6::bytes_type bytes = address.to_v6().to_bytes();
- if (memcmp(bytes.data(), ip_address->data, 16) == 0)
- {
- GENERAL_NAMES_free(gens);
- return true;
- }
- }
- }
- }
- }
- GENERAL_NAMES_free(gens);
-
- // No match in the alternate names, so try the common names. We should only
- // use the "most specific" common name, which is the last one in the list.
- X509_NAME* name = X509_get_subject_name(cert);
- int i = -1;
- ASN1_STRING* common_name = 0;
- while ((i = X509_NAME_get_index_by_NID(name, NID_commonName, i)) >= 0)
- {
- X509_NAME_ENTRY* name_entry = X509_NAME_get_entry(name, i);
- common_name = X509_NAME_ENTRY_get_data(name_entry);
- }
- if (common_name && common_name->data && common_name->length)
- {
- const char* pattern = reinterpret_cast<const char*>(common_name->data);
- std::size_t pattern_length = common_name->length;
- if (match_pattern(pattern, pattern_length, host_.c_str()))
- return true;
- }
-
- return false;
-}
-
-bool rfc2818_verification::match_pattern(const char* pattern,
- std::size_t pattern_length, const char* host)
-{
- using namespace std; // For tolower.
-
- const char* p = pattern;
- const char* p_end = p + pattern_length;
- const char* h = host;
-
- while (p != p_end && *h)
- {
- if (*p == '*')
- {
- ++p;
- while (*h && *h != '.')
- if (match_pattern(p, p_end - p, h++))
- return true;
- }
- else if (tolower(*p) == tolower(*h))
- {
- ++p;
- ++h;
- }
- else
- {
- return false;
- }
- }
-
- return p == p_end && !*h;
-}
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_IMPL_RFC2818_VERIFICATION_IPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp
deleted file mode 100644
index 2e8859ea2bc..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// impl/ssl/src.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_IMPL_SRC_HPP
-#define BOOST_ASIO_SSL_IMPL_SRC_HPP
-
-#define BOOST_ASIO_SOURCE
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
-#endif
-
-#include <boost/asio/ssl/impl/context.ipp>
-#include <boost/asio/ssl/impl/error.ipp>
-#include <boost/asio/ssl/detail/impl/engine.ipp>
-#include <boost/asio/ssl/detail/impl/openssl_init.ipp>
-#include <boost/asio/ssl/impl/rfc2818_verification.ipp>
-
-#endif // BOOST_ASIO_SSL_IMPL_SRC_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp
deleted file mode 100644
index 047688b0077..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// ssl/rfc2818_verification.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_RFC2818_VERIFICATION_HPP
-#define BOOST_ASIO_SSL_RFC2818_VERIFICATION_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/ssl/detail/openssl_types.hpp>
-#include <boost/asio/ssl/verify_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-/// Verifies a certificate against a hostname according to the rules described
-/// in RFC 2818.
-/**
- * @par Example
- * The following example shows how to synchronously open a secure connection to
- * a given host name:
- * @code
- * using boost::asio::ip::tcp;
- * namespace ssl = boost::asio::ssl;
- * typedef ssl::stream<tcp::socket> ssl_socket;
- *
- * // Create a context that uses the default paths for finding CA certificates.
- * ssl::context ctx(ssl::context::sslv23);
- * ctx.set_default_verify_paths();
- *
- * // Open a socket and connect it to the remote host.
- * boost::asio::io_context io_context;
- * ssl_socket sock(io_context, ctx);
- * tcp::resolver resolver(io_context);
- * tcp::resolver::query query("host.name", "https");
- * boost::asio::connect(sock.lowest_layer(), resolver.resolve(query));
- * sock.lowest_layer().set_option(tcp::no_delay(true));
- *
- * // Perform SSL handshake and verify the remote host's certificate.
- * sock.set_verify_mode(ssl::verify_peer);
- * sock.set_verify_callback(ssl::rfc2818_verification("host.name"));
- * sock.handshake(ssl_socket::client);
- *
- * // ... read and write as normal ...
- * @endcode
- */
-class rfc2818_verification
-{
-public:
- /// The type of the function object's result.
- typedef bool result_type;
-
- /// Constructor.
- explicit rfc2818_verification(const std::string& host)
- : host_(host)
- {
- }
-
- /// Perform certificate verification.
- BOOST_ASIO_DECL bool operator()(bool preverified, verify_context& ctx) const;
-
-private:
- // Helper function to check a host name against a pattern.
- BOOST_ASIO_DECL static bool match_pattern(const char* pattern,
- std::size_t pattern_length, const char* host);
-
- // Helper function to check a host name against an IPv4 address
- // The host name to be checked.
- std::string host_;
-};
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/ssl/impl/rfc2818_verification.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // 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
deleted file mode 100644
index 1acaceea457..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/stream.hpp
+++ /dev/null
@@ -1,764 +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 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.69.0/boost/asio/ssl/stream_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/stream_base.hpp
deleted file mode 100644
index 58472148949..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/stream_base.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// ssl/stream_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_STREAM_BASE_HPP
-#define BOOST_ASIO_SSL_STREAM_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/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-/// The stream_base class is used as a base for the boost::asio::ssl::stream
-/// class template so that we have a common place to define various enums.
-class stream_base
-{
-public:
- /// Different handshake types.
- enum handshake_type
- {
- /// Perform handshaking as a client.
- client,
-
- /// Perform handshaking as a server.
- server
- };
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~stream_base()
- {
- }
-};
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_STREAM_BASE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp
deleted file mode 100644
index c5fdaf4adb2..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// ssl/verify_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_SSL_VERIFY_CONTEXT_HPP
-#define BOOST_ASIO_SSL_VERIFY_CONTEXT_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/ssl/detail/openssl_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-/// A simple wrapper around the X509_STORE_CTX type, used during verification of
-/// a peer certificate.
-/**
- * @note The verify_context does not own the underlying X509_STORE_CTX object.
- */
-class verify_context
- : private noncopyable
-{
-public:
- /// The native handle type of the verification context.
- typedef X509_STORE_CTX* native_handle_type;
-
- /// Constructor.
- explicit verify_context(native_handle_type handle)
- : handle_(handle)
- {
- }
-
- /// 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.
- */
- native_handle_type native_handle()
- {
- return handle_;
- }
-
-private:
- // The underlying native implementation.
- native_handle_type handle_;
-};
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp
deleted file mode 100644
index 9ae60504422..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// ssl/verify_mode.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_VERIFY_MODE_HPP
-#define BOOST_ASIO_SSL_VERIFY_MODE_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 {
-
-/// Bitmask type for peer verification.
-/**
- * Possible values are:
- *
- * @li @ref verify_none
- * @li @ref verify_peer
- * @li @ref verify_fail_if_no_peer_cert
- * @li @ref verify_client_once
- */
-typedef int verify_mode;
-
-#if defined(GENERATING_DOCUMENTATION)
-/// No verification.
-const int verify_none = implementation_defined;
-
-/// Verify the peer.
-const int verify_peer = implementation_defined;
-
-/// Fail verification if the peer has no certificate. Ignored unless
-/// @ref verify_peer is set.
-const int verify_fail_if_no_peer_cert = implementation_defined;
-
-/// Do not request client certificate on renegotiation. Ignored unless
-/// @ref verify_peer is set.
-const int verify_client_once = implementation_defined;
-#else
-const int verify_none = SSL_VERIFY_NONE;
-const int verify_peer = SSL_VERIFY_PEER;
-const int verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
-const int verify_client_once = SSL_VERIFY_CLIENT_ONCE;
-#endif
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_VERIFY_MODE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp
deleted file mode 100644
index ab30b9c8fde..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// steady_timer.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_STEADY_TIMER_HPP
-#define BOOST_ASIO_STEADY_TIMER_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_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/detail/chrono.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Typedef for a timer based on the steady clock.
-/**
- * This typedef uses the C++11 @c &lt;chrono&gt; standard library facility, if
- * available. Otherwise, it may use the Boost.Chrono library. To explicitly
- * utilise Boost.Chrono, use the basic_waitable_timer template directly:
- * @code
- * typedef basic_waitable_timer<boost::chrono::steady_clock> timer;
- * @endcode
- */
-typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
-
-} // namespace asio
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_STEADY_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/strand.hpp b/src/third_party/boost-1.69.0/boost/asio/strand.hpp
deleted file mode 100644
index b82e988fe45..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/strand.hpp
+++ /dev/null
@@ -1,288 +0,0 @@
-//
-// strand.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_STRAND_HPP
-#define BOOST_ASIO_STRAND_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/strand_executor_service.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Provides serialised function invocation for any executor type.
-template <typename Executor>
-class strand
-{
-public:
- /// The type of the underlying executor.
- typedef Executor inner_executor_type;
-
- /// Default constructor.
- /**
- * This constructor is only valid if the underlying executor type is default
- * constructible.
- */
- strand()
- : executor_(),
- impl_(use_service<detail::strand_executor_service>(
- executor_.context()).create_implementation())
- {
- }
-
- /// Construct a strand for the specified executor.
- explicit strand(const Executor& e)
- : executor_(e),
- impl_(use_service<detail::strand_executor_service>(
- executor_.context()).create_implementation())
- {
- }
-
- /// Copy constructor.
- strand(const strand& other) BOOST_ASIO_NOEXCEPT
- : executor_(other.executor_),
- impl_(other.impl_)
- {
- }
-
- /// Converting constructor.
- /**
- * This constructor is only valid if the @c OtherExecutor type is convertible
- * to @c Executor.
- */
- template <class OtherExecutor>
- strand(
- const strand<OtherExecutor>& other) BOOST_ASIO_NOEXCEPT
- : executor_(other.executor_),
- impl_(other.impl_)
- {
- }
-
- /// Assignment operator.
- strand& operator=(const strand& other) BOOST_ASIO_NOEXCEPT
- {
- executor_ = other.executor_;
- impl_ = other.impl_;
- return *this;
- }
-
- /// Converting assignment operator.
- /**
- * This assignment operator is only valid if the @c OtherExecutor type is
- * convertible to @c Executor.
- */
- template <class OtherExecutor>
- strand& operator=(
- const strand<OtherExecutor>& other) BOOST_ASIO_NOEXCEPT
- {
- executor_ = other.executor_;
- impl_ = other.impl_;
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- strand(strand&& other) BOOST_ASIO_NOEXCEPT
- : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)),
- impl_(BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_))
- {
- }
-
- /// Converting move constructor.
- /**
- * This constructor is only valid if the @c OtherExecutor type is convertible
- * to @c Executor.
- */
- template <class OtherExecutor>
- strand(strand<OtherExecutor>&& other) BOOST_ASIO_NOEXCEPT
- : executor_(BOOST_ASIO_MOVE_CAST(OtherExecutor)(other)),
- impl_(BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_))
- {
- }
-
- /// Move assignment operator.
- strand& operator=(strand&& other) BOOST_ASIO_NOEXCEPT
- {
- executor_ = BOOST_ASIO_MOVE_CAST(Executor)(other);
- impl_ = BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_);
- return *this;
- }
-
- /// Converting move assignment operator.
- /**
- * This assignment operator is only valid if the @c OtherExecutor type is
- * convertible to @c Executor.
- */
- template <class OtherExecutor>
- strand& operator=(
- const strand<OtherExecutor>&& other) BOOST_ASIO_NOEXCEPT
- {
- executor_ = BOOST_ASIO_MOVE_CAST(OtherExecutor)(other);
- impl_ = BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_);
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destructor.
- ~strand()
- {
- }
-
- /// Obtain the underlying executor.
- inner_executor_type get_inner_executor() const BOOST_ASIO_NOEXCEPT
- {
- return executor_;
- }
-
- /// Obtain the underlying execution context.
- execution_context& context() const BOOST_ASIO_NOEXCEPT
- {
- return executor_.context();
- }
-
- /// Inform the strand that it has some outstanding work to do.
- /**
- * The strand delegates this call to its underlying executor.
- */
- void on_work_started() const BOOST_ASIO_NOEXCEPT
- {
- executor_.on_work_started();
- }
-
- /// Inform the strand that some work is no longer outstanding.
- /**
- * The strand delegates this call to its underlying executor.
- */
- void on_work_finished() const BOOST_ASIO_NOEXCEPT
- {
- executor_.on_work_finished();
- }
-
- /// Request the strand to invoke the given function object.
- /**
- * This function is used to ask the strand to execute the given function
- * object on its underlying executor. The function object will be executed
- * inside this function if the strand is not otherwise busy and if the
- * underlying executor's @c dispatch() function is also able to execute the
- * function before returning.
- *
- * @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
- {
- detail::strand_executor_service::dispatch(impl_,
- executor_, BOOST_ASIO_MOVE_CAST(Function)(f), a);
- }
-
- /// Request the strand to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will never be executed inside this function.
- * Instead, it will be scheduled by the underlying executor's defer function.
- *
- * @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
- {
- detail::strand_executor_service::post(impl_,
- executor_, BOOST_ASIO_MOVE_CAST(Function)(f), a);
- }
-
- /// Request the strand to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will never be executed inside this function.
- * Instead, it will be scheduled by the underlying executor's defer function.
- *
- * @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
- {
- detail::strand_executor_service::defer(impl_,
- executor_, BOOST_ASIO_MOVE_CAST(Function)(f), a);
- }
-
- /// Determine whether the strand is running in the current thread.
- /**
- * @return @c true if the current thread is executing a function that was
- * submitted to the strand using post(), dispatch() or defer(). Otherwise
- * returns @c false.
- */
- bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT
- {
- return detail::strand_executor_service::running_in_this_thread(impl_);
- }
-
- /// Compare two strands for equality.
- /**
- * Two strands are equal if they refer to the same ordered, non-concurrent
- * state.
- */
- friend bool operator==(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
- {
- return a.impl_ == b.impl_;
- }
-
- /// Compare two strands for inequality.
- /**
- * Two strands are equal if they refer to the same ordered, non-concurrent
- * state.
- */
- friend bool operator!=(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
- {
- return a.impl_ != b.impl_;
- }
-
-private:
- Executor executor_;
- typedef detail::strand_executor_service::implementation_type
- implementation_type;
- implementation_type impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-// If both io_context.hpp and strand.hpp have been included, automatically
-// include the header file needed for the io_context::strand class.
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# if defined(BOOST_ASIO_IO_CONTEXT_HPP)
-# include <boost/asio/io_context_strand.hpp>
-# endif // defined(BOOST_ASIO_IO_CONTEXT_HPP)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#endif // BOOST_ASIO_STRAND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp
deleted file mode 100644
index 04159ea66f9..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp
+++ /dev/null
@@ -1,414 +0,0 @@
-//
-// stream_socket_service.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_STREAM_SOCKET_SERVICE_HPP
-#define BOOST_ASIO_STREAM_SOCKET_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_ssocket_service.hpp>
-#elif defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_socket_service.hpp>
-#else
-# include <boost/asio/detail/reactive_socket_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a stream socket.
-template <typename Protocol>
-class stream_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<stream_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef detail::winrt_ssocket_service<Protocol> service_impl_type;
-#elif defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a stream socket implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new stream socket service for the specified io_context.
- explicit stream_socket_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- stream_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new stream socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new stream socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another stream socket implementation.
- void move_assign(implementation_type& impl,
- stream_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- // All socket services have access to each other's implementations.
- template <typename Protocol1> friend class stream_socket_service;
-
- /// Move-construct a new stream socket implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- stream_socket_service<Protocol1>& other_service,
- typename stream_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a stream socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a stream socket.
- BOOST_ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, boost::system::error_code& ec)
- {
- if (protocol.type() == BOOST_ASIO_OS_DEF(SOCK_STREAM))
- service_impl_.open(impl, protocol, ec);
- else
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a stream socket.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- boost::system::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a stream socket implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Release ownership of the underlying socket.
- native_handle_type release(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.release(impl, ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- /// Bind the stream socket to the specified local endpoint.
- BOOST_ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the stream socket to the specified endpoint.
- BOOST_ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, boost::system::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (boost::system::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- BOOST_ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, boost::system::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- BOOST_ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, boost::system::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- BOOST_ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, boost::system::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- BOOST_ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- BOOST_ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, boost::system::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- boost::system::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- BOOST_ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, boost::system::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- BOOST_ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, boost::system::error_code& ec)
- {
- return service_impl_.receive(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_STREAM_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/streambuf.hpp b/src/third_party/boost-1.69.0/boost/asio/streambuf.hpp
deleted file mode 100644
index 737a631151a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/streambuf.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// streambuf.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_STREAMBUF_HPP
-#define BOOST_ASIO_STREAMBUF_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_NO_IOSTREAM)
-
-#include <boost/asio/basic_streambuf.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Typedef for the typical usage of basic_streambuf.
-typedef basic_streambuf<> streambuf;
-
-} // namespace asio
-} // namespace boost
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-#endif // BOOST_ASIO_STREAMBUF_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/system_context.hpp b/src/third_party/boost-1.69.0/boost/asio/system_context.hpp
deleted file mode 100644
index 22f6b19426d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/system_context.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// system_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_SYSTEM_CONTEXT_HPP
-#define BOOST_ASIO_SYSTEM_CONTEXT_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/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 {
-
-class system_executor;
-
-/// The executor context for the system executor.
-class system_context : public execution_context
-{
-public:
- /// The executor type associated with the context.
- typedef system_executor executor_type;
-
- /// Destructor shuts down all threads in the system thread pool.
- BOOST_ASIO_DECL ~system_context();
-
- /// Obtain an executor for the context.
- executor_type get_executor() BOOST_ASIO_NOEXCEPT;
-
- /// Signal all threads in the system thread pool to stop.
- BOOST_ASIO_DECL void stop();
-
- /// Determine whether the system thread pool has been stopped.
- BOOST_ASIO_DECL bool stopped() const BOOST_ASIO_NOEXCEPT;
-
- /// Join all threads in the system thread pool.
- BOOST_ASIO_DECL void join();
-
-#if defined(GENERATING_DOCUMENTATION)
-private:
-#endif // defined(GENERATING_DOCUMENTATION)
- // Constructor creates all threads in the system thread pool.
- BOOST_ASIO_DECL system_context();
-
-private:
- friend class system_executor;
-
- struct thread_function;
-
- // The underlying scheduler.
- detail::scheduler& scheduler_;
-
- // The threads in the system thread pool.
- detail::thread_group threads_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/system_context.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/system_context.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_SYSTEM_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/system_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/system_executor.hpp
deleted file mode 100644
index d6f5b7def85..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/system_executor.hpp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// system_executor.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_SYSTEM_EXECUTOR_HPP
-#define BOOST_ASIO_SYSTEM_EXECUTOR_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/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class system_context;
-
-/// An executor that uses arbitrary threads.
-/**
- * The system executor represents an execution context where functions are
- * permitted to run on arbitrary threads. The post() and defer() functions
- * schedule the function to run on an unspecified system thread pool, and
- * dispatch() invokes the function immediately.
- */
-class system_executor
-{
-public:
- /// Obtain the underlying execution context.
- system_context& context() const BOOST_ASIO_NOEXCEPT;
-
- /// Inform the executor that it has some outstanding work to do.
- /**
- * For the system executor, this is a no-op.
- */
- void on_work_started() const BOOST_ASIO_NOEXCEPT
- {
- }
-
- /// Inform the executor that some work is no longer outstanding.
- /**
- * For the system executor, this is a no-op.
- */
- void on_work_finished() const BOOST_ASIO_NOEXCEPT
- {
- }
-
- /// Request the system executor to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will always be executed inside this function.
- *
- * @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 system executor to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will never be executed inside this function.
- * Instead, it will be scheduled to run on an unspecified system 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 system executor to invoke the given function object.
- /**
- * This function is used to ask the executor to execute the given function
- * object. The function object will never be executed inside this function.
- * Instead, it will be scheduled to run on an unspecified system 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 defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
-
- /// Compare two executors for equality.
- /**
- * System executors always compare equal.
- */
- friend bool operator==(const system_executor&,
- const system_executor&) BOOST_ASIO_NOEXCEPT
- {
- return true;
- }
-
- /// Compare two executors for inequality.
- /**
- * System executors always compare equal.
- */
- friend bool operator!=(const system_executor&,
- const system_executor&) BOOST_ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/system_executor.hpp>
-
-#endif // BOOST_ASIO_SYSTEM_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/system_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/system_timer.hpp
deleted file mode 100644
index c2ff9947b90..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/system_timer.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// system_timer.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_SYSTEM_TIMER_HPP
-#define BOOST_ASIO_SYSTEM_TIMER_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_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/detail/chrono.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Typedef for a timer based on the system clock.
-/**
- * This typedef uses the C++11 @c &lt;chrono&gt; standard library facility, if
- * available. Otherwise, it may use the Boost.Chrono library. To explicitly
- * utilise Boost.Chrono, use the basic_waitable_timer template directly:
- * @code
- * typedef basic_waitable_timer<boost::chrono::system_clock> timer;
- * @endcode
- */
-typedef basic_waitable_timer<chrono::system_clock> system_timer;
-
-} // namespace asio
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
-#endif // 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
deleted file mode 100644
index ac5f00d0916..00000000000
--- a/src/third_party/boost-1.69.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 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.69.0/boost/asio/time_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/time_traits.hpp
deleted file mode 100644
index d11ea0050f1..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/time_traits.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// time_traits.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_TIME_TRAITS_HPP
-#define BOOST_ASIO_TIME_TRAITS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/socket_types.hpp> // Must come before posix_time.
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/date_time/posix_time/posix_time_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Time traits suitable for use with the deadline timer.
-template <typename Time>
-struct time_traits;
-
-/// Time traits specialised for posix_time.
-template <>
-struct time_traits<boost::posix_time::ptime>
-{
- /// The time type.
- typedef boost::posix_time::ptime time_type;
-
- /// The duration type.
- typedef boost::posix_time::time_duration duration_type;
-
- /// Get the current time.
- static time_type now()
- {
-#if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
- return boost::posix_time::microsec_clock::universal_time();
-#else // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
- return boost::posix_time::second_clock::universal_time();
-#endif // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
- }
-
- /// Add a duration to a time.
- static time_type add(const time_type& t, const duration_type& d)
- {
- return t + d;
- }
-
- /// Subtract one time from another.
- static duration_type subtract(const time_type& t1, const time_type& t2)
- {
- return t1 - t2;
- }
-
- /// Test whether one time is less than another.
- static bool less_than(const time_type& t1, const time_type& t2)
- {
- return t1 < t2;
- }
-
- /// Convert to POSIX duration type.
- static boost::posix_time::time_duration to_posix_duration(
- const duration_type& d)
- {
- return d;
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_TIME_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp
deleted file mode 100644
index 2774935f1b0..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// ts/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_TS_BUFFER_HPP
-#define BOOST_ASIO_TS_BUFFER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/completion_condition.hpp>
-#include <boost/asio/read.hpp>
-#include <boost/asio/write.hpp>
-#include <boost/asio/read_until.hpp>
-
-#endif // BOOST_ASIO_TS_BUFFER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp
deleted file mode 100644
index df52817a352..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// ts/executor.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_TS_EXECUTOR_HPP
-#define BOOST_ASIO_TS_EXECUTOR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/handler_type.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/execution_context.hpp>
-#include <boost/asio/is_executor.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/bind_executor.hpp>
-#include <boost/asio/executor_work_guard.hpp>
-#include <boost/asio/system_executor.hpp>
-#include <boost/asio/executor.hpp>
-#include <boost/asio/dispatch.hpp>
-#include <boost/asio/post.hpp>
-#include <boost/asio/defer.hpp>
-#include <boost/asio/strand.hpp>
-#include <boost/asio/packaged_task.hpp>
-#include <boost/asio/use_future.hpp>
-
-#endif // BOOST_ASIO_TS_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp
deleted file mode 100644
index 7448015734b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// ts/internet.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_TS_INTERNET_HPP
-#define BOOST_ASIO_TS_INTERNET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/ip/address.hpp>
-#include <boost/asio/ip/address_v4.hpp>
-#include <boost/asio/ip/address_v4_iterator.hpp>
-#include <boost/asio/ip/address_v4_range.hpp>
-#include <boost/asio/ip/address_v6.hpp>
-#include <boost/asio/ip/address_v6_iterator.hpp>
-#include <boost/asio/ip/address_v6_range.hpp>
-#include <boost/asio/ip/bad_address_cast.hpp>
-#include <boost/asio/ip/basic_endpoint.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/basic_resolver_entry.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver.hpp>
-#include <boost/asio/ip/host_name.hpp>
-#include <boost/asio/ip/network_v4.hpp>
-#include <boost/asio/ip/network_v6.hpp>
-#include <boost/asio/ip/tcp.hpp>
-#include <boost/asio/ip/udp.hpp>
-#include <boost/asio/ip/v6_only.hpp>
-#include <boost/asio/ip/unicast.hpp>
-#include <boost/asio/ip/multicast.hpp>
-
-#endif // BOOST_ASIO_TS_INTERNET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp
deleted file mode 100644
index aea646cc4a6..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// ts/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_TS_IO_CONTEXT_HPP
-#define BOOST_ASIO_TS_IO_CONTEXT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/io_context.hpp>
-
-#endif // BOOST_ASIO_TS_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/net.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/net.hpp
deleted file mode 100644
index dbac252849d..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/net.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// ts/net.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_TS_NET_HPP
-#define BOOST_ASIO_TS_NET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/ts/netfwd.hpp>
-#include <boost/asio/ts/executor.hpp>
-#include <boost/asio/ts/io_context.hpp>
-#include <boost/asio/ts/timer.hpp>
-#include <boost/asio/ts/buffer.hpp>
-#include <boost/asio/ts/socket.hpp>
-#include <boost/asio/ts/internet.hpp>
-
-#endif // BOOST_ASIO_TS_NET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp
deleted file mode 100644
index 10800baea4c..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp
+++ /dev/null
@@ -1,199 +0,0 @@
-//
-// ts/netfwd.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_TS_NETFWD_HPP
-#define BOOST_ASIO_TS_NETFWD_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_CHRONO)
-# include <boost/asio/detail/chrono.hpp>
-#endif // defined(BOOST_ASIO_HAS_CHRONO)
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-# include <boost/asio/detail/date_time_fwd.hpp>
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class execution_context;
-
-template <typename T, typename Executor>
-class executor_binder;
-
-template <typename Executor>
-class executor_work_guard;
-
-class system_executor;
-
-class executor;
-
-template <typename Executor>
-class strand;
-
-class io_context;
-
-template <typename Clock>
-struct wait_traits;
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-template <typename Time>
-struct time_traits;
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-template <typename Clock, typename WaitTraits>
-class waitable_timer_service;
-
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-template <typename TimeType, typename TimeTraits>
-class deadline_timer_service;
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#if !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
-#define BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
-
-template <typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock>
- BOOST_ASIO_SVC_TPARAM_DEF2(= waitable_timer_service<Clock, WaitTraits>)>
-class basic_waitable_timer;
-
-#endif // !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
-
-#if defined(BOOST_ASIO_HAS_CHRONO)
-
-typedef basic_waitable_timer<chrono::system_clock> system_timer;
-
-typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
-
-typedef basic_waitable_timer<chrono::high_resolution_clock>
- high_resolution_timer;
-
-#endif // defined(BOOST_ASIO_HAS_CHRONO)
-
-template <class Protocol BOOST_ASIO_SVC_TPARAM>
-class basic_socket;
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM>
-class basic_datagram_socket;
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM>
-class basic_stream_socket;
-
-template <typename Protocol BOOST_ASIO_SVC_TPARAM>
-class basic_socket_acceptor;
-
-#if !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
-#define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
-
-// Forward declaration with defaulted arguments.
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
- typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
-#else
- typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
-#endif
-class basic_socket_streambuf;
-
-#endif // !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
-
-#if !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
-#define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
-
-// Forward declaration with defaulted arguments.
-template <typename Protocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
-#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
- typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
-#else
- typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- BOOST_ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
-#endif
-class basic_socket_iostream;
-
-#endif // !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
-
-namespace ip {
-
-class address;
-
-class address_v4;
-
-class address_v6;
-
-template <typename Address>
-class basic_address_iterator;
-
-typedef basic_address_iterator<address_v4> address_v4_iterator;
-
-typedef basic_address_iterator<address_v6> address_v6_iterator;
-
-template <typename Address>
-class basic_address_range;
-
-typedef basic_address_range<address_v4> address_v4_range;
-
-typedef basic_address_range<address_v6> address_v6_range;
-
-class network_v4;
-
-class network_v6;
-
-template <typename InternetProtocol>
-class basic_endpoint;
-
-template <typename InternetProtocol>
-class basic_resolver_entry;
-
-template <typename InternetProtocol>
-class basic_resolver_results;
-
-template <typename InternetProtocol BOOST_ASIO_SVC_TPARAM>
-class basic_resolver;
-
-class tcp;
-
-class udp;
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_TS_NETFWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp
deleted file mode 100644
index 01e68553329..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// ts/socket.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_TS_SOCKET_HPP
-#define BOOST_ASIO_TS_SOCKET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/socket_base.hpp>
-#include <boost/asio/basic_socket.hpp>
-#include <boost/asio/basic_datagram_socket.hpp>
-#include <boost/asio/basic_stream_socket.hpp>
-#include <boost/asio/basic_socket_acceptor.hpp>
-#include <boost/asio/basic_socket_streambuf.hpp>
-#include <boost/asio/basic_socket_iostream.hpp>
-#include <boost/asio/connect.hpp>
-
-#endif // BOOST_ASIO_TS_SOCKET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp
deleted file mode 100644
index adc6bf99c4b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// ts/timer.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_TS_TIMER_HPP
-#define BOOST_ASIO_TS_TIMER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/chrono.hpp>
-
-#include <boost/asio/wait_traits.hpp>
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/system_timer.hpp>
-#include <boost/asio/steady_timer.hpp>
-#include <boost/asio/high_resolution_timer.hpp>
-
-#endif // BOOST_ASIO_TS_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/unyield.hpp b/src/third_party/boost-1.69.0/boost/asio/unyield.hpp
deleted file mode 100644
index de3ed0275e4..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/unyield.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// unyield.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)
-//
-
-#ifdef reenter
-# undef reenter
-#endif
-
-#ifdef yield
-# undef yield
-#endif
-
-#ifdef fork
-# undef fork
-#endif
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
deleted file mode 100644
index 01fb2760f37..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/use_future.hpp
+++ /dev/null
@@ -1,162 +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>
-#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.69.0/boost/asio/uses_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/uses_executor.hpp
deleted file mode 100644
index 6398816fabb..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/uses_executor.hpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// uses_executor.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_USES_EXECUTOR_HPP
-#define BOOST_ASIO_USES_EXECUTOR_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 {
-
-/// A special type, similar to std::nothrow_t, used to disambiguate
-/// constructors that accept executor arguments.
-/**
- * The executor_arg_t struct is an empty structure type used as a unique type
- * to disambiguate constructor and function overloading. Specifically, some
- * types have constructors with executor_arg_t as the first argument,
- * immediately followed by an argument of a type that satisfies the Executor
- * type requirements.
- */
-struct executor_arg_t
-{
- /// Constructor.
- BOOST_ASIO_CONSTEXPR executor_arg_t() BOOST_ASIO_NOEXCEPT
- {
- }
-};
-
-/// A special value, similar to std::nothrow, used to disambiguate constructors
-/// that accept executor arguments.
-/**
- * See boost::asio::executor_arg_t and boost::asio::uses_executor
- * for more information.
- */
-#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-constexpr executor_arg_t executor_arg;
-#elif defined(BOOST_ASIO_MSVC)
-__declspec(selectany) executor_arg_t executor_arg;
-#endif
-
-/// The uses_executor trait detects whether a type T has an associated executor
-/// that is convertible from type Executor.
-/**
- * Meets the BinaryTypeTrait requirements. The Asio library provides a
- * definition that is derived from false_type. A program may specialize this
- * template to derive from true_type for a user-defined type T that can be
- * constructed with an executor, where the first argument of a constructor has
- * type executor_arg_t and the second argument is convertible from type
- * Executor.
- */
-template <typename T, typename Executor>
-struct uses_executor : false_type {};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // 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
deleted file mode 100644
index bedf15bd0cb..00000000000
--- a/src/third_party/boost-1.69.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 101202 // 1.12.2
-
-#endif // BOOST_ASIO_VERSION_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/wait_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/wait_traits.hpp
deleted file mode 100644
index 9f5be813a7a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/wait_traits.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// wait_traits.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_WAIT_TRAITS_HPP
-#define BOOST_ASIO_WAIT_TRAITS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Wait traits suitable for use with the basic_waitable_timer class template.
-template <typename Clock>
-struct wait_traits
-{
- /// Convert a clock duration into a duration used for waiting.
- /**
- * @returns @c d.
- */
- static typename Clock::duration to_wait_duration(
- const typename Clock::duration& d)
- {
- return d;
- }
-
- /// Convert a clock duration into a duration used for waiting.
- /**
- * @returns @c d.
- */
- static typename Clock::duration to_wait_duration(
- const typename Clock::time_point& t)
- {
- typename Clock::time_point now = Clock::now();
- if (now + (Clock::duration::max)() < t)
- return (Clock::duration::max)();
- if (now + (Clock::duration::min)() > t)
- return (Clock::duration::min)();
- return t - now;
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_WAIT_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp b/src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp
deleted file mode 100644
index 164aae90c67..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp
+++ /dev/null
@@ -1,212 +0,0 @@
-//
-// waitable_timer_service.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_WAITABLE_TIMER_SERVICE_HPP
-#define BOOST_ASIO_WAITABLE_TIMER_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/chrono_time_traits.hpp>
-#include <boost/asio/detail/deadline_timer_service.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/wait_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// Default service implementation for a timer.
-template <typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock> >
-class waitable_timer_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<
- waitable_timer_service<Clock, WaitTraits> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The clock type.
- typedef Clock clock_type;
-
- /// The duration type of the clock.
- typedef typename clock_type::duration duration;
-
- /// The time point type of the clock.
- typedef typename clock_type::time_point time_point;
-
- /// The wait traits type.
- typedef WaitTraits traits_type;
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::deadline_timer_service<
- detail::chrono_time_traits<Clock, WaitTraits> > service_impl_type;
-
-public:
- /// The implementation type of the waitable timer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new timer service for the specified io_context.
- explicit waitable_timer_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- waitable_timer_service<Clock, WaitTraits> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new timer implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- /// Destroy a timer implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new timer implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another timer implementation.
- void move_assign(implementation_type& impl,
- waitable_timer_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Cancel any asynchronous wait operations associated with the timer.
- std::size_t cancel(implementation_type& impl, boost::system::error_code& ec)
- {
- return service_impl_.cancel(impl, ec);
- }
-
- /// Cancels one asynchronous wait operation associated with the timer.
- std::size_t cancel_one(implementation_type& impl,
- boost::system::error_code& ec)
- {
- return service_impl_.cancel_one(impl, ec);
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the expiry time for the timer as an
- /// absolute time.
- time_point expires_at(const implementation_type& impl) const
- {
- return service_impl_.expiry(impl);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the expiry time for the timer as an absolute time.
- time_point expiry(const implementation_type& impl) const
- {
- return service_impl_.expiry(impl);
- }
-
- /// Set the expiry time for the timer as an absolute time.
- std::size_t expires_at(implementation_type& impl,
- const time_point& expiry_time, boost::system::error_code& ec)
- {
- return service_impl_.expires_at(impl, expiry_time, ec);
- }
-
- /// Set the expiry time for the timer relative to now.
- std::size_t expires_after(implementation_type& impl,
- const duration& expiry_time, boost::system::error_code& ec)
- {
- return service_impl_.expires_after(impl, expiry_time, ec);
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the expiry time for the timer relative to
- /// now.
- duration expires_from_now(const implementation_type& impl) const
- {
- typedef detail::chrono_time_traits<Clock, WaitTraits> traits;
- return traits::subtract(service_impl_.expiry(impl), traits::now());
- }
-
- /// (Deprecated: Use expires_after().) Set the expiry time for the timer
- /// relative to now.
- std::size_t expires_from_now(implementation_type& impl,
- const duration& expiry_time, boost::system::error_code& ec)
- {
- return service_impl_.expires_after(impl, expiry_time, ec);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- // Perform a blocking wait on the timer.
- void wait(implementation_type& impl, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, ec);
- }
-
- // Start an asynchronous wait on the timer.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WAITABLE_TIMER_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp
deleted file mode 100644
index ce7d0e8fa00..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp
+++ /dev/null
@@ -1,275 +0,0 @@
-//
-// windows/basic_handle.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_WINDOWS_BASIC_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_BASIC_HANDLE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Provides Windows handle functionality.
-/**
- * The windows::basic_handle class template provides the ability to wrap a
- * Windows handle.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename HandleService>
-class basic_handle
- : public basic_io_object<HandleService>
-{
-public:
- /// The native representation of a handle.
- typedef typename HandleService::native_handle_type native_handle_type;
-
- /// A basic_handle is always the lowest layer.
- typedef basic_handle<HandleService> lowest_layer_type;
-
- /// Construct a basic_handle without opening it.
- /**
- * This constructor creates a handle without opening it.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit basic_handle(boost::asio::io_context& io_context)
- : basic_io_object<HandleService>(io_context)
- {
- }
-
- /// Construct a basic_handle on an existing native handle.
- /**
- * This constructor creates a handle object to hold an existing native handle.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle A native handle.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_handle(boost::asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_io_object<HandleService>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_handle from another.
- /**
- * This constructor moves a handle from one object to another.
- *
- * @param other The other basic_handle 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_handle(io_context&) constructor.
- */
- basic_handle(basic_handle&& other)
- : basic_io_object<HandleService>(
- BOOST_ASIO_MOVE_CAST(basic_handle)(other))
- {
- }
-
- /// Move-assign a basic_handle from another.
- /**
- * This assignment operator moves a handle from one object to another.
- *
- * @param other The other basic_handle 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_handle(io_context&) constructor.
- */
- basic_handle& operator=(basic_handle&& other)
- {
- basic_io_object<HandleService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_handle)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a basic_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a basic_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& handle)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
- boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(), handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * handle. This is intended to allow access to native handle functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~basic_handle()
- {
- }
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_BASIC_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp
deleted file mode 100644
index b4a2565e23b..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp
+++ /dev/null
@@ -1,184 +0,0 @@
-//
-// windows/basic_object_handle.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
-//
-// Distributed under the 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_WINDOWS_BASIC_OBJECT_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/windows/basic_handle.hpp>
-#include <boost/asio/windows/object_handle_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Provides object-oriented handle functionality.
-/**
- * The windows::basic_object_handle class template provides asynchronous and
- * blocking object-oriented handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename ObjectHandleService = object_handle_service>
-class basic_object_handle
- : public basic_handle<ObjectHandleService>
-{
-public:
- /// The native representation of a handle.
- typedef typename ObjectHandleService::native_handle_type native_handle_type;
-
- /// Construct a basic_object_handle without opening it.
- /**
- * This constructor creates an object handle without opening it.
- *
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit basic_object_handle(boost::asio::io_context& io_context)
- : basic_handle<ObjectHandleService>(io_context)
- {
- }
-
- /// Construct a basic_object_handle on an existing native handle.
- /**
- * This constructor creates an object handle object to hold an existing native
- * handle.
- *
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param native_handle The new underlying handle implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_object_handle(boost::asio::io_context& io_context,
- const native_handle_type& native_handle)
- : basic_handle<ObjectHandleService>(io_context, native_handle)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_object_handle from another.
- /**
- * This constructor moves an object handle from one object to another.
- *
- * @param other The other basic_object_handle 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_object_handle(io_context&) constructor.
- */
- basic_object_handle(basic_object_handle&& other)
- : basic_handle<ObjectHandleService>(
- BOOST_ASIO_MOVE_CAST(basic_object_handle)(other))
- {
- }
-
- /// Move-assign a basic_object_handle from another.
- /**
- * This assignment operator moves an object handle from one object to another.
- *
- * @param other The other basic_object_handle 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_object_handle(io_context&) constructor.
- */
- basic_object_handle& operator=(basic_object_handle&& other)
- {
- basic_handle<ObjectHandleService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_object_handle)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Perform a blocking wait on the object handle.
- /**
- * This function is used to wait for the object handle to be set to the
- * signalled state. This function blocks and does not return until the object
- * handle has been set to the signalled state.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void wait()
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Perform a blocking wait on the object handle.
- /**
- * This function is used to wait for the object handle to be set to the
- * signalled state. This function blocks and does not return until the object
- * handle has been set to the signalled state.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- void wait(boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), ec);
- }
-
- /// Start an asynchronous wait on the object handle.
- /**
- * This function is be used to initiate an asynchronous wait against the
- * object handle. It always returns immediately.
- *
- * @param handler The handler to be called when the object handle is set to
- * the signalled state. 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.
- * ); @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 WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- return this->get_service().async_wait(this->get_implementation(),
- BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
- }
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 53765e17663..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/basic_random_access_handle.hpp
+++ /dev/null
@@ -1,378 +0,0 @@
-//
-// windows/basic_random_access_handle.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_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/windows/basic_handle.hpp>
-#include <boost/asio/windows/random_access_handle_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Provides random-access handle functionality.
-/**
- * The windows::basic_random_access_handle class template provides asynchronous
- * and blocking random-access handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename RandomAccessHandleService = random_access_handle_service>
-class basic_random_access_handle
- : public basic_handle<RandomAccessHandleService>
-{
-public:
- /// The native representation of a handle.
- typedef typename RandomAccessHandleService::native_handle_type
- native_handle_type;
-
- /// Construct a basic_random_access_handle without opening it.
- /**
- * This constructor creates a random-access handle without opening it. The
- * handle needs to be opened before data can be written to or read from it.
- *
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
- */
- explicit basic_random_access_handle(boost::asio::io_context& io_context)
- : basic_handle<RandomAccessHandleService>(io_context)
- {
- }
-
- /// Construct a basic_random_access_handle on an existing native handle.
- /**
- * This constructor creates a random-access handle object to hold an existing
- * native handle.
- *
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
- *
- * @param handle The new underlying handle implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_random_access_handle(boost::asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_handle<RandomAccessHandleService>(io_context, handle)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_random_access_handle from another.
- /**
- * This constructor moves a random-access handle from one object to another.
- *
- * @param other The other basic_random_access_handle 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_random_access_handle(io_context&)
- * constructor.
- */
- basic_random_access_handle(basic_random_access_handle&& other)
- : basic_handle<RandomAccessHandleService>(
- BOOST_ASIO_MOVE_CAST(basic_random_access_handle)(other))
- {
- }
-
- /// Move-assign a basic_random_access_handle from another.
- /**
- * This assignment operator moves a random-access handle from one object to
- * another.
- *
- * @param other The other basic_random_access_handle 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_random_access_handle(io_context&)
- * constructor.
- */
- basic_random_access_handle& operator=(basic_random_access_handle&& other)
- {
- basic_handle<RandomAccessHandleService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_random_access_handle)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the handle at the specified offset.
- /**
- * This function is used to write data to the random-access handle. The
- * function call will block until one or more bytes of the data has been
- * written successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The write_some_at operation may not write all of the data. Consider
- * using the @ref write_at function if you need to ensure that all data is
- * written before the blocking operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.write_some_at(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some_at");
- return s;
- }
-
- /// Write some data to the handle at the specified offset.
- /**
- * This function is used to write data to the random-access handle. The
- * function call will block until one or more bytes of the data has been
- * written successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @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_at function if you need to ensure that
- * all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
- }
-
- /// Start an asynchronous write at the specified offset.
- /**
- * This function is used to asynchronously write data to the random-access
- * handle. The function call always returns immediately.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- * 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.
- * ); @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 The write operation may not transmit all of the data to the peer.
- * Consider using the @ref async_write_at function if you need to ensure that
- * all data is written before the asynchronous operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_write_some_at(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 ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some_at(uint64_t offset,
- 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;
-
- return this->get_service().async_write_some_at(this->get_implementation(),
- offset, buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Read some data from the handle at the specified offset.
- /**
- * This function is used to read data from the random-access handle. The
- * function call will block until one or more bytes of data has been read
- * successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read_at function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.read_some_at(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some_at");
- return s;
- }
-
- /// Read some data from the handle at the specified offset.
- /**
- * This function is used to read data from the random-access handle. The
- * function call will block until one or more bytes of data has been read
- * successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more 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_at 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_at(uint64_t offset,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
- }
-
- /// Start an asynchronous read at the specified offset.
- /**
- * This function is used to asynchronously read data from the random-access
- * handle. The function call always returns immediately.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read operation may not read all of the requested number of bytes.
- * Consider using the @ref async_read_at function if you need to ensure that
- * the requested amount of data is read before the asynchronous operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_read_some_at(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.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some_at(uint64_t offset,
- 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;
-
- return this->get_service().async_read_some_at(this->get_implementation(),
- offset, buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp
deleted file mode 100644
index 80639879837..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp
+++ /dev/null
@@ -1,361 +0,0 @@
-//
-// windows/basic_stream_handle.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_WINDOWS_BASIC_STREAM_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_BASIC_STREAM_HANDLE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/windows/basic_handle.hpp>
-#include <boost/asio/windows/stream_handle_service.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Provides stream-oriented handle functionality.
-/**
- * The windows::basic_stream_handle class template provides asynchronous and
- * blocking stream-oriented handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename StreamHandleService = stream_handle_service>
-class basic_stream_handle
- : public basic_handle<StreamHandleService>
-{
-public:
- /// The native representation of a handle.
- typedef typename StreamHandleService::native_handle_type native_handle_type;
-
- /// Construct a basic_stream_handle without opening it.
- /**
- * This constructor creates a stream handle without opening it. The handle
- * needs to be opened and then connected or accepted before data can be sent
- * or received on it.
- *
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit basic_stream_handle(boost::asio::io_context& io_context)
- : basic_handle<StreamHandleService>(io_context)
- {
- }
-
- /// Construct a basic_stream_handle on an existing native handle.
- /**
- * This constructor creates a stream handle object to hold an existing native
- * handle.
- *
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle The new underlying handle implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- basic_stream_handle(boost::asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_handle<StreamHandleService>(io_context, handle)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_stream_handle from another.
- /**
- * This constructor moves a stream handle from one object to another.
- *
- * @param other The other basic_stream_handle 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_stream_handle(io_context&) constructor.
- */
- basic_stream_handle(basic_stream_handle&& other)
- : basic_handle<StreamHandleService>(
- BOOST_ASIO_MOVE_CAST(basic_stream_handle)(other))
- {
- }
-
- /// Move-assign a basic_stream_handle from another.
- /**
- * This assignment operator moves a stream handle from one object to
- * another.
- *
- * @param other The other basic_stream_handle 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_stream_handle(io_context&) constructor.
- */
- basic_stream_handle& operator=(basic_stream_handle&& other)
- {
- basic_handle<StreamHandleService>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_stream_handle)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the handle.
- /**
- * This function is used to write data to the stream handle. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the handle.
- /**
- * This function is used to write data to the stream handle. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @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 this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream handle.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the handle.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_write_some(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 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;
-
- return this->get_service().async_write_some(this->get_implementation(),
- buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
- }
-
- /// Read some data from the handle.
- /**
- * This function is used to read data from the stream handle. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the handle.
- /**
- * This function is used to read data from the stream handle. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream handle.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_read_some(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.
- */
- 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;
-
- return this->get_service().async_read_some(this->get_implementation(),
- buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
- }
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_BASIC_STREAM_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp
deleted file mode 100644
index 45eb23f4d80..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp
+++ /dev/null
@@ -1,383 +0,0 @@
-//
-// windows/object_handle.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
-//
-// Distributed under the 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_WINDOWS_OBJECT_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_OBJECT_HANDLE_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_WINDOWS_OBJECT_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_object_handle_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.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/windows/basic_object_handle.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#define BOOST_ASIO_SVC_T boost::asio::detail::win_object_handle_service
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of an object handle.
-typedef basic_object_handle<> object_handle;
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-/// Provides object-oriented handle functionality.
-/**
- * The windows::object_handle class provides asynchronous and blocking
- * object-oriented handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class object_handle
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a handle.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef BOOST_ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// An object_handle is always the lowest layer.
- typedef object_handle lowest_layer_type;
-
- /// Construct an object_handle without opening it.
- /**
- * This constructor creates an object handle without opening it.
- *
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit object_handle(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct an object_handle on an existing native handle.
- /**
- * This constructor creates an object handle object to hold an existing native
- * handle.
- *
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param native_handle The new underlying handle implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- object_handle(boost::asio::io_context& io_context,
- const native_handle_type& native_handle)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(), native_handle, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct an object_handle from another.
- /**
- * This constructor moves an object handle from one object to another.
- *
- * @param other The other object_handle 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 object_handle(io_context&) constructor.
- */
- object_handle(object_handle&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign an object_handle from another.
- /**
- * This assignment operator moves an object handle from one object to another.
- *
- * @param other The other object_handle 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 object_handle(io_context&) constructor.
- */
- object_handle& operator=(object_handle&& other)
- {
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#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();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since an object_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since an object_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& handle)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
- boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(), handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * handle. This is intended to allow access to native handle functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform a blocking wait on the object handle.
- /**
- * This function is used to wait for the object handle to be set to the
- * signalled state. This function blocks and does not return until the object
- * handle has been set to the signalled state.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void wait()
- {
- boost::system::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "wait");
- }
-
- /// Perform a blocking wait on the object handle.
- /**
- * This function is used to wait for the object handle to be set to the
- * signalled state. This function blocks and does not return until the object
- * handle has been set to the signalled state.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- void wait(boost::system::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), ec);
- }
-
- /// Start an asynchronous wait on the object handle.
- /**
- * This function is be used to initiate an asynchronous wait against the
- * object handle. It always returns immediately.
- *
- * @param handler The handler to be called when the object handle is set to
- * the signalled state. 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.
- * ); @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 WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- boost::asio::async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#undef BOOST_ASIO_SVC_T
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_WINDOWS_OBJECT_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp
deleted file mode 100644
index 6ff8197990f..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp
+++ /dev/null
@@ -1,185 +0,0 @@
-//
-// windows/object_handle_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
-//
-// Distributed under the 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_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
-#define BOOST_ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/win_object_handle_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Default service implementation for an object handle.
-class object_handle_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<object_handle_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::win_object_handle_service service_impl_type;
-
-public:
- /// The type of an object handle implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new object handle service for the specified io_context.
- explicit object_handle_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<object_handle_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new object handle implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new object handle implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another object handle implementation.
- void move_assign(implementation_type& impl,
- object_handle_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy an object handle implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native handle to an object handle.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close an object handle implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- // Wait for a signaled state.
- void wait(implementation_type& impl, boost::system::error_code& ec)
- {
- service_impl_.wait(impl, ec);
- }
-
- /// Start an asynchronous wait.
- template <typename WaitHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (boost::system::error_code))
- async_wait(implementation_type& impl,
- BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
- {
- boost::asio::async_completion<WaitHandler,
- void (boost::system::error_code)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp
deleted file mode 100644
index 16dcbedbb65..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp
+++ /dev/null
@@ -1,333 +0,0 @@
-//
-// windows/overlapped_handle.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_WINDOWS_OVERLAPPED_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_OVERLAPPED_HANDLE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_iocp_handle_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-#define BOOST_ASIO_SVC_T boost::asio::detail::win_iocp_handle_service
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Provides Windows handle functionality for objects that support
-/// overlapped I/O.
-/**
- * The windows::overlapped_handle class provides the ability to wrap a Windows
- * handle. The underlying object referred to by the handle must support
- * overlapped I/O.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class overlapped_handle
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a handle.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef BOOST_ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// An overlapped_handle is always the lowest layer.
- typedef overlapped_handle lowest_layer_type;
-
- /// Construct an overlapped_handle without opening it.
- /**
- * This constructor creates a handle without opening it.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit overlapped_handle(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct an overlapped_handle on an existing native handle.
- /**
- * This constructor creates a handle object to hold an existing native handle.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle A native handle.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- overlapped_handle(boost::asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct an overlapped_handle from another.
- /**
- * This constructor moves a handle from one object to another.
- *
- * @param other The other overlapped_handle 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 overlapped_handle(io_context&) constructor.
- */
- overlapped_handle(overlapped_handle&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign an overlapped_handle from another.
- /**
- * This assignment operator moves a handle from one object to another.
- *
- * @param other The other overlapped_handle 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 overlapped_handle(io_context&) constructor.
- */
- overlapped_handle& operator=(overlapped_handle&& other)
- {
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#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();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since an overlapped_handle cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since an overlapped_handle cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void assign(const native_handle_type& handle)
- {
- boost::system::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- boost::asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
- boost::system::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(), handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void close()
- {
- boost::system::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "close");
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * handle. This is intended to allow access to native handle functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void cancel()
- {
- boost::system::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- boost::asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the boost::asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- /**
- * This function destroys the handle, cancelling any outstanding asynchronous
- * wait operations associated with the handle as if by calling @c cancel.
- */
- ~overlapped_handle()
- {
- }
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#undef BOOST_ASIO_SVC_T
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_OVERLAPPED_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp
deleted file mode 100644
index 8c95ce45f9a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// windows/overlapped_ptr.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_WINDOWS_OVERLAPPED_PTR_HPP
-#define BOOST_ASIO_WINDOWS_OVERLAPPED_PTR_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_WINDOWS_OVERLAPPED_PTR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/win_iocp_overlapped_ptr.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Wraps a handler to create an OVERLAPPED object for use with overlapped I/O.
-/**
- * A special-purpose smart pointer used to wrap an application handler so that
- * it can be passed as the LPOVERLAPPED argument to overlapped I/O functions.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class overlapped_ptr
- : private noncopyable
-{
-public:
- /// Construct an empty overlapped_ptr.
- overlapped_ptr()
- : impl_()
- {
- }
-
- /// Construct an overlapped_ptr to contain the specified handler.
- template <typename Handler>
- explicit overlapped_ptr(boost::asio::io_context& io_context,
- BOOST_ASIO_MOVE_ARG(Handler) handler)
- : impl_(io_context, BOOST_ASIO_MOVE_CAST(Handler)(handler))
- {
- }
-
- /// Destructor automatically frees the OVERLAPPED object unless released.
- ~overlapped_ptr()
- {
- }
-
- /// Reset to empty.
- void reset()
- {
- impl_.reset();
- }
-
- /// Reset to contain the specified handler, freeing any current OVERLAPPED
- /// object.
- template <typename Handler>
- void reset(boost::asio::io_context& io_context,
- BOOST_ASIO_MOVE_ARG(Handler) handler)
- {
- impl_.reset(io_context, BOOST_ASIO_MOVE_CAST(Handler)(handler));
- }
-
- /// Get the contained OVERLAPPED object.
- OVERLAPPED* get()
- {
- return impl_.get();
- }
-
- /// Get the contained OVERLAPPED object.
- const OVERLAPPED* get() const
- {
- return impl_.get();
- }
-
- /// Release ownership of the OVERLAPPED object.
- OVERLAPPED* release()
- {
- return impl_.release();
- }
-
- /// Post completion notification for overlapped operation. Releases ownership.
- void complete(const boost::system::error_code& ec,
- std::size_t bytes_transferred)
- {
- impl_.complete(ec, bytes_transferred);
- }
-
-private:
- detail::win_iocp_overlapped_ptr impl_;
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_WINDOWS_OVERLAPPED_PTR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp
deleted file mode 100644
index 4ff62d39dfa..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp
+++ /dev/null
@@ -1,380 +0,0 @@
-//
-// windows/random_access_handle.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_WINDOWS_RANDOM_ACCESS_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_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/windows/overlapped_handle.hpp>
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/windows/basic_random_access_handle.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a random-access handle.
-typedef basic_random_access_handle<> random_access_handle;
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-/// Provides random-access handle functionality.
-/**
- * The windows::random_access_handle class provides asynchronous and
- * blocking random-access handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class random_access_handle
- : public overlapped_handle
-{
-public:
- /// Construct a random_access_handle without opening it.
- /**
- * This constructor creates a random-access handle without opening it. The
- * handle needs to be opened before data can be written to or read from it.
- *
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
- */
- explicit random_access_handle(boost::asio::io_context& io_context)
- : overlapped_handle(io_context)
- {
- }
-
- /// Construct a random_access_handle on an existing native handle.
- /**
- * This constructor creates a random-access handle object to hold an existing
- * native handle.
- *
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
- *
- * @param handle The new underlying handle implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- random_access_handle(boost::asio::io_context& io_context,
- const native_handle_type& handle)
- : overlapped_handle(io_context, handle)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a random_access_handle from another.
- /**
- * This constructor moves a random-access handle from one object to another.
- *
- * @param other The other random_access_handle 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 random_access_handle(io_context&)
- * constructor.
- */
- random_access_handle(random_access_handle&& other)
- : overlapped_handle(std::move(other))
- {
- }
-
- /// Move-assign a random_access_handle from another.
- /**
- * This assignment operator moves a random-access handle from one object to
- * another.
- *
- * @param other The other random_access_handle 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 random_access_handle(io_context&)
- * constructor.
- */
- random_access_handle& operator=(random_access_handle&& other)
- {
- overlapped_handle::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the handle at the specified offset.
- /**
- * This function is used to write data to the random-access handle. The
- * function call will block until one or more bytes of the data has been
- * written successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The write_some_at operation may not write all of the data. Consider
- * using the @ref write_at function if you need to ensure that all data is
- * written before the blocking operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.write_some_at(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some_at");
- return s;
- }
-
- /// Write some data to the handle at the specified offset.
- /**
- * This function is used to write data to the random-access handle. The
- * function call will block until one or more bytes of the data has been
- * written successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @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_at function if you need to ensure that
- * all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
- }
-
- /// Start an asynchronous write at the specified offset.
- /**
- * This function is used to asynchronously write data to the random-access
- * handle. The function call always returns immediately.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- * 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.
- * ); @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 The write operation may not transmit all of the data to the peer.
- * Consider using the @ref async_write_at function if you need to ensure that
- * all data is written before the asynchronous operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_write_some_at(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 ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some_at(uint64_t offset,
- 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);
-
- this->get_service().async_write_some_at(this->get_implementation(),
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the handle at the specified offset.
- /**
- * This function is used to read data from the random-access handle. The
- * function call will block until one or more bytes of data has been read
- * successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read_at function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.read_some_at(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some_at");
- return s;
- }
-
- /// Read some data from the handle at the specified offset.
- /**
- * This function is used to read data from the random-access handle. The
- * function call will block until one or more bytes of data has been read
- * successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more 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_at 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_at(uint64_t offset,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
- }
-
- /// Start an asynchronous read at the specified offset.
- /**
- * This function is used to asynchronously read data from the random-access
- * handle. The function call always returns immediately.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read operation may not read all of the requested number of bytes.
- * Consider using the @ref async_read_at function if you need to ensure that
- * the requested amount of data is read before the asynchronous operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_read_some_at(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.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some_at(uint64_t offset,
- 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);
-
- this->get_service().async_read_some_at(this->get_implementation(),
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 0ec0773acb5..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle_service.hpp
+++ /dev/null
@@ -1,216 +0,0 @@
-//
-// windows/random_access_handle_service.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_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP
-#define BOOST_ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/detail/win_iocp_handle_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Default service implementation for a random-access handle.
-class random_access_handle_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<random_access_handle_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::win_iocp_handle_service service_impl_type;
-
-public:
- /// The type of a random-access handle implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new random-access handle service for the specified io_context.
- explicit random_access_handle_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- random_access_handle_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new random-access handle implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new random-access handle implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another random-access handle implementation.
- void move_assign(implementation_type& impl,
- random_access_handle_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a random-access handle implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native handle to a random-access handle.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a random-access handle implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data at the specified offset.
- template <typename ConstBufferSequence>
- std::size_t write_some_at(implementation_type& impl, uint64_t offset,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.write_some_at(impl, offset, buffers, ec);
- }
-
- /// Start an asynchronous write at the specified offset.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some_at(implementation_type& impl,
- uint64_t offset, const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- boost::asio::async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some_at(impl,
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the specified offset.
- template <typename MutableBufferSequence>
- std::size_t read_some_at(implementation_type& impl, uint64_t offset,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.read_some_at(impl, offset, buffers, ec);
- }
-
- /// Start an asynchronous read at the specified offset.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some_at(implementation_type& impl,
- uint64_t offset, const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- boost::asio::async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some_at(impl,
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp
deleted file mode 100644
index a8962b6b123..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp
+++ /dev/null
@@ -1,364 +0,0 @@
-//
-// windows/stream_handle.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_WINDOWS_STREAM_HANDLE_HPP
-#define BOOST_ASIO_WINDOWS_STREAM_HANDLE_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/windows/overlapped_handle.hpp>
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/windows/basic_stream_handle.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a stream-oriented handle.
-typedef basic_stream_handle<> stream_handle;
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-/// Provides stream-oriented handle functionality.
-/**
- * The windows::stream_handle class provides asynchronous and blocking
- * stream-oriented handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-class stream_handle
- : public overlapped_handle
-{
-public:
- /// Construct a stream_handle without opening it.
- /**
- * This constructor creates a stream handle without opening it. The handle
- * needs to be opened and then connected or accepted before data can be sent
- * or received on it.
- *
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit stream_handle(boost::asio::io_context& io_context)
- : overlapped_handle(io_context)
- {
- }
-
- /// Construct a stream_handle on an existing native handle.
- /**
- * This constructor creates a stream handle object to hold an existing native
- * handle.
- *
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle The new underlying handle implementation.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- stream_handle(boost::asio::io_context& io_context,
- const native_handle_type& handle)
- : overlapped_handle(io_context, handle)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a stream_handle from another.
- /**
- * This constructor moves a stream handle from one object to another.
- *
- * @param other The other stream_handle 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 stream_handle(io_context&) constructor.
- */
- stream_handle(stream_handle&& other)
- : overlapped_handle(std::move(other))
- {
- }
-
- /// Move-assign a stream_handle from another.
- /**
- * This assignment operator moves a stream handle from one object to
- * another.
- *
- * @param other The other stream_handle 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 stream_handle(io_context&) constructor.
- */
- stream_handle& operator=(stream_handle&& other)
- {
- overlapped_handle::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the handle.
- /**
- * This function is used to write data to the stream handle. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.write_some(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.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the handle.
- /**
- * This function is used to write data to the stream handle. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @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 this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream handle.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the handle.
- * 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.
- * ); @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 The write 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.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_write_some(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 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);
-
- this->get_service().async_write_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the handle.
- /**
- * This function is used to read data from the stream handle. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure. An error code of
- * boost::asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.read_some(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.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the handle.
- /**
- * This function is used to read data from the stream handle. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more 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 this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream handle.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers 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 read.
- * ); @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 The read 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.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_read_some(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.
- */
- 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);
-
- this->get_service().async_read_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_WINDOWS_STREAM_HANDLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp
deleted file mode 100644
index d3d47d22361..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp
+++ /dev/null
@@ -1,212 +0,0 @@
-//
-// windows/stream_handle_service.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_WINDOWS_STREAM_HANDLE_SERVICE_HPP
-#define BOOST_ASIO_WINDOWS_STREAM_HANDLE_SERVICE_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_ENABLE_OLD_SERVICES)
-
-#if defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/win_iocp_handle_service.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace windows {
-
-/// Default service implementation for a stream handle.
-class stream_handle_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<stream_handle_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::win_iocp_handle_service service_impl_type;
-
-public:
- /// The type of a stream handle implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new stream handle service for the specified io_context.
- explicit stream_handle_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<stream_handle_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new stream handle implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new stream handle implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another stream handle implementation.
- void move_assign(implementation_type& impl,
- stream_handle_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a stream handle implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native handle to a stream handle.
- BOOST_ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, boost::system::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a stream handle implementation.
- BOOST_ASIO_SYNC_OP_VOID close(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.close(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- BOOST_ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- boost::system::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data to the stream.
- template <typename ConstBufferSequence>
- std::size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.write_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous write.
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- boost::asio::async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- template <typename MutableBufferSequence>
- std::size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, boost::system::error_code& ec)
- {
- return service_impl_.read_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous read.
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- boost::asio::async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace windows
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // 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
deleted file mode 100644
index e3f4d09cb7a..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/write.hpp
+++ /dev/null
@@ -1,930 +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 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
deleted file mode 100644
index 6330214bd3e..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/write_at.hpp
+++ /dev/null
@@ -1,681 +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 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.69.0/boost/asio/yield.hpp b/src/third_party/boost-1.69.0/boost/asio/yield.hpp
deleted file mode 100644
index 5ed7f9ae4f3..00000000000
--- a/src/third_party/boost-1.69.0/boost/asio/yield.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// yield.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)
-//
-
-#include "coroutine.hpp"
-
-#ifndef reenter
-# define reenter(c) BOOST_ASIO_CORO_REENTER(c)
-#endif
-
-#ifndef yield
-# define yield BOOST_ASIO_CORO_YIELD
-#endif
-
-#ifndef fork
-# define fork BOOST_ASIO_CORO_FORK
-#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
deleted file mode 100644
index a9e4e63037d..00000000000
--- a/src/third_party/boost-1.69.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::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/system_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/system_clocks.hpp
deleted file mode 100644
index 5ba6a3b0e9c..00000000000
--- a/src/third_party/boost-1.69.0/boost/chrono/system_clocks.hpp
+++ /dev/null
@@ -1,233 +0,0 @@
-// boost/chrono/system_clocks.hpp --------------------------------------------------------------//
-
-// Copyright 2008 Howard Hinnant
-// Copyright 2008 Beman Dawes
-// Copyright 2009-2011 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-/*
-
-This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
-Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
-See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
-
-time2_demo contained this comment:
-
- Much thanks to Andrei Alexandrescu,
- Walter Brown,
- Peter Dimov,
- Jeff Garland,
- Terry Golubiewski,
- Daniel Krugler,
- Anthony Williams.
-*/
-
-/*
-
-TODO:
-
- * Fully implement error handling, with test cases.
- * Consider issues raised by Michael Marcin:
-
- > In the past I've seen QueryPerformanceCounter give incorrect results,
- > especially with SpeedStep processors on laptops. This was many years ago and
- > might have been fixed by service packs and drivers.
- >
- > Typically you check the results of QPC against GetTickCount to see if the
- > results are reasonable.
- > http://support.microsoft.com/kb/274323
- >
- > I've also heard of problems with QueryPerformanceCounter in multi-processor
- > systems.
- >
- > I know some people SetThreadAffinityMask to 1 for the current thread call
- > their QueryPerformance* functions then restore SetThreadAffinityMask. This
- > seems horrible to me because it forces your program to jump to another
- > physical processor if it isn't already on cpu0 but they claim it worked well
- > in practice because they called the timing functions infrequently.
- >
- > In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
- > high resolution timers to avoid these issues.
-
-*/
-
-#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP
-#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/time_point.hpp>
-#include <boost/chrono/detail/system.hpp>
-#include <boost/chrono/clock_string.hpp>
-
-#include <ctime>
-
-# if defined( BOOST_CHRONO_POSIX_API )
-# if ! defined(CLOCK_REALTIME) && ! defined (__hpux__)
-# error <time.h> does not supply CLOCK_REALTIME
-# endif
-# endif
-
-#ifdef BOOST_CHRONO_WINDOWS_API
-// The system_clock tick is 100 nanoseconds
-# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
-#else
-# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
-#endif
-
-// this must occur after all of the includes and before any code appears:
-#ifndef BOOST_CHRONO_HEADER_ONLY
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-#endif
-
-
-//----------------------------------------------------------------------------//
-// //
-// 20.9 Time utilities [time] //
-// synopsis //
-// //
-//----------------------------------------------------------------------------//
-
-namespace boost {
-namespace chrono {
-
- // Clocks
- class BOOST_CHRONO_DECL system_clock;
-#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
- class BOOST_CHRONO_DECL steady_clock;
-#endif
-
-#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
- typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires]
-#else
- typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires]
-#endif
-
-//----------------------------------------------------------------------------//
-// //
-// 20.9.5 Clocks [time.clock] //
-// //
-//----------------------------------------------------------------------------//
-
-// If you're porting, clocks are the system-specific (non-portable) part.
-// You'll need to know how to get the current time and implement that under now().
-// You'll need to know what units (tick period) and representation makes the most
-// sense for your clock and set those accordingly.
-// If you know how to map this clock to time_t (perhaps your clock is std::time, which
-// makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t().
-
-//----------------------------------------------------------------------------//
-// 20.9.5.1 Class system_clock [time.clock.system] //
-//----------------------------------------------------------------------------//
-
- class BOOST_CHRONO_DECL system_clock
- {
- public:
- typedef BOOST_SYSTEM_CLOCK_DURATION duration;
- typedef duration::rep rep;
- typedef duration::period period;
- typedef chrono::time_point<system_clock> time_point;
- BOOST_STATIC_CONSTEXPR bool is_steady = false;
-
- static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
-#endif
-
- static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT;
- static BOOST_CHRONO_INLINE time_point from_time_t(std::time_t t) BOOST_NOEXCEPT;
- };
-
-//----------------------------------------------------------------------------//
-// 20.9.5.2 Class steady_clock [time.clock.steady] //
-//----------------------------------------------------------------------------//
-
-// As permitted by [time.clock.steady]
-// The class steady_clock is conditionally supported.
-
-#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
- class BOOST_CHRONO_DECL steady_clock
- {
- public:
- typedef nanoseconds duration;
- typedef duration::rep rep;
- typedef duration::period period;
- typedef chrono::time_point<steady_clock> time_point;
- BOOST_STATIC_CONSTEXPR bool is_steady = true;
-
- static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
-#endif
- };
-#endif
-//----------------------------------------------------------------------------//
-// 20.9.5.3 Class high_resolution_clock [time.clock.hires] //
-//----------------------------------------------------------------------------//
-
-// As permitted, steady_clock or system_clock is a typedef for high_resolution_clock.
-// See synopsis.
-
-
- template<class CharT>
- struct clock_string<system_clock, CharT>
- {
- static std::basic_string<CharT> name()
- {
- static const CharT u[] =
- { 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
- static const std::basic_string<CharT> str(u, u + sizeof(u)
- / sizeof(u[0]));
- return str;
- }
- static std::basic_string<CharT> since()
- {
- static const CharT
- u[] =
- { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' };
- static const std::basic_string<CharT> str(u, u + sizeof(u)
- / sizeof(u[0]));
- return str;
- }
- };
-
-#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
-
- template<class CharT>
- struct clock_string<steady_clock, CharT>
- {
- static std::basic_string<CharT> name()
- {
- static const CharT
- u[] =
- { 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' };
- static const std::basic_string<CharT> str(u, u + sizeof(u)
- / sizeof(u[0]));
- return str;
- }
- static std::basic_string<CharT> since()
- {
- const CharT u[] =
- { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' };
- const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
- return str;
- }
- };
-
-#endif
-
-} // namespace chrono
-} // namespace boost
-
-#ifndef BOOST_CHRONO_HEADER_ONLY
-// the suffix header occurs after all of our code:
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-#else
-#include <boost/chrono/detail/inlined/chrono.hpp>
-#endif
-
-#endif // BOOST_CHRONO_SYSTEM_CLOCKS_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
deleted file mode 100644
index f34353b53d2..00000000000
--- a/src/third_party/boost-1.69.0/boost/config/auto_link.hpp
+++ /dev/null
@@ -1,474 +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.
-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/clang.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/clang.hpp
deleted file mode 100644
index 3a59ff58781..00000000000
--- a/src/third_party/boost-1.69.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_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/gcc.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/gcc.hpp
deleted file mode 100644
index 594c44f5728..00000000000
--- a/src/third_party/boost-1.69.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 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.69.0/boost/config/platform/cygwin.hpp b/src/third_party/boost-1.69.0/boost/config/platform/cygwin.hpp
deleted file mode 100644
index 6dd7e57cfd1..00000000000
--- a/src/third_party/boost-1.69.0/boost/config/platform/cygwin.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// (C) Copyright John Maddock 2001 - 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.
-
-// cygwin specific config options:
-
-#define BOOST_PLATFORM "Cygwin"
-#define BOOST_HAS_DIRENT_H
-#define BOOST_HAS_LOG1P
-#define BOOST_HAS_EXPM1
-
-//
-// Threading API:
-// See if we have POSIX threads, if we do use them, otherwise
-// revert to native Win threads.
-#define BOOST_HAS_UNISTD_H
-#include <unistd.h>
-#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
-# define BOOST_HAS_PTHREADS
-# define BOOST_HAS_SCHED_YIELD
-# define BOOST_HAS_GETTIMEOFDAY
-# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
-//# define BOOST_HAS_SIGACTION
-#else
-# if !defined(BOOST_HAS_WINTHREADS)
-# define BOOST_HAS_WINTHREADS
-# endif
-# define BOOST_HAS_FTIME
-#endif
-
-//
-// find out if we have a stdint.h, there should be a better way to do this:
-//
-#include <sys/types.h>
-#ifdef _STDINT_H
-#define BOOST_HAS_STDINT_H
-#endif
-#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H)
-# define BOOST_HAS_STDINT_H
-#endif
-
-/// Cygwin has no fenv.h
-#define BOOST_NO_FENV_H
-
-// Cygwin has it's own <pthread.h> which breaks <shared_mutex> unless the correct compiler flags are used:
-#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#include <pthread.h>
-#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112)
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#endif
-#endif
-
-// boilerplate code:
-#include <boost/config/detail/posix_features.hpp>
-
-//
-// Cygwin lies about XSI conformance, there is no nl_types.h:
-//
-#ifdef BOOST_HAS_NL_TYPES_H
-# undef BOOST_HAS_NL_TYPES_H
-#endif
-
-
-
-
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
deleted file mode 100644
index 2a21afff409..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/allocator.hpp
+++ /dev/null
@@ -1,369 +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.69.0/boost/container/allocator_traits.hpp b/src/third_party/boost-1.69.0/boost/container/allocator_traits.hpp
deleted file mode 100644
index bb5a2d31b77..00000000000
--- a/src/third_party/boost-1.69.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 ; 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.69.0/boost/container/container_fwd.hpp b/src/third_party/boost-1.69.0/boost/container/container_fwd.hpp
deleted file mode 100644
index e4fe6f85c37..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/container_fwd.hpp
+++ /dev/null
@@ -1,296 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-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_CONTAINER_FWD_HPP
-#define BOOST_CONTAINER_CONTAINER_FWD_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-//! \file
-//! This header file forward declares the following containers:
-//! - boost::container::vector
-//! - boost::container::stable_vector
-//! - boost::container::static_vector
-//! - boost::container::small_vector
-//! - boost::container::slist
-//! - boost::container::list
-//! - boost::container::set
-//! - boost::container::multiset
-//! - boost::container::map
-//! - boost::container::multimap
-//! - boost::container::flat_set
-//! - boost::container::flat_multiset
-//! - boost::container::flat_map
-//! - boost::container::flat_multimap
-//! - boost::container::basic_string
-//! - boost::container::string
-//! - boost::container::wstring
-//!
-//! Forward declares the following allocators:
-//! - boost::container::allocator
-//! - boost::container::node_allocator
-//! - boost::container::adaptive_pool
-//!
-//! Forward declares the following polymorphic resource classes:
-//! - boost::container::pmr::memory_resource
-//! - boost::container::pmr::polymorphic_allocator
-//! - boost::container::pmr::monotonic_buffer_resource
-//! - boost::container::pmr::pool_options
-//! - boost::container::pmr::unsynchronized_pool_resource
-//! - boost::container::pmr::synchronized_pool_resource
-//!
-//! And finally it defines the following types
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//Std forward declarations
-#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
- #include <boost/container/detail/std_fwd.hpp>
-#endif
-
-namespace boost{
-namespace intrusive{
-namespace detail{
- //Create namespace to avoid compilation errors
-}}}
-
-namespace boost{ namespace container{ namespace dtl{
- namespace bi = boost::intrusive;
- namespace bid = boost::intrusive::detail;
-}}}
-
-namespace boost{ namespace container{ namespace pmr{
- namespace bi = boost::intrusive;
- namespace bid = boost::intrusive::detail;
-}}}
-
-#include <cstddef>
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//////////////////////////////////////////////////////////////////////////////
-// Containers
-//////////////////////////////////////////////////////////////////////////////
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template<class T>
-class new_allocator;
-
-template <class T
- ,class Allocator = new_allocator<T>
- ,class Options = void>
-class vector;
-
-template <class T
- ,class Allocator = new_allocator<T> >
-class stable_vector;
-
-template <class T, std::size_t Capacity>
-class static_vector;
-
-template < class T, std::size_t N
- , class Allocator= new_allocator<T> >
-class small_vector;
-
-template <class T
- ,class Allocator = new_allocator<T> >
-class deque;
-
-template <class T
- ,class Allocator = new_allocator<T> >
-class list;
-
-template <class T
- ,class Allocator = new_allocator<T> >
-class slist;
-
-template <class Key
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<Key>
- ,class Options = void>
-class set;
-
-template <class Key
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<Key>
- ,class Options = void >
-class multiset;
-
-template <class Key
- ,class T
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<std::pair<const Key, T> >
- ,class Options = void >
-class map;
-
-template <class Key
- ,class T
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<std::pair<const Key, T> >
- ,class Options = void >
-class multimap;
-
-template <class Key
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<Key> >
-class flat_set;
-
-template <class Key
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<Key> >
-class flat_multiset;
-
-template <class Key
- ,class T
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<std::pair<Key, T> > >
-class flat_map;
-
-template <class Key
- ,class T
- ,class Compare = std::less<Key>
- ,class Allocator = new_allocator<std::pair<Key, T> > >
-class flat_multimap;
-
-template <class CharT
- ,class Traits = std::char_traits<CharT>
- ,class Allocator = new_allocator<CharT> >
-class basic_string;
-
-typedef basic_string
- <char
- ,std::char_traits<char>
- ,new_allocator<char> >
-string;
-
-typedef basic_string
- <wchar_t
- ,std::char_traits<wchar_t>
- ,new_allocator<wchar_t> >
-wstring;
-
-static const std::size_t ADP_nodes_per_block = 256u;
-static const std::size_t ADP_max_free_blocks = 2u;
-static const std::size_t ADP_overhead_percent = 1u;
-static const std::size_t ADP_only_alignment = 0u;
-
-template < class T
- , std::size_t NodesPerBlock = ADP_nodes_per_block
- , std::size_t MaxFreeBlocks = ADP_max_free_blocks
- , std::size_t OverheadPercent = ADP_overhead_percent
- , unsigned Version = 2
- >
-class adaptive_pool;
-
-template < class T
- , unsigned Version = 2
- , unsigned int AllocationDisableMask = 0>
-class allocator;
-
-static const std::size_t NodeAlloc_nodes_per_block = 256u;
-
-template
- < class T
- , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
- , std::size_t Version = 2>
-class node_allocator;
-
-namespace pmr {
-
-class memory_resource;
-
-template<class T>
-class polymorphic_allocator;
-
-class monotonic_buffer_resource;
-
-struct pool_options;
-
-template <class Allocator>
-class resource_adaptor_imp;
-
-class unsynchronized_pool_resource;
-
-class synchronized_pool_resource;
-
-} //namespace pmr {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! Type used to tag that the input range is
-//! guaranteed to be ordered
-struct ordered_range_t
-{};
-
-//! Value used to tag that the input range is
-//! guaranteed to be ordered
-static const ordered_range_t ordered_range = ordered_range_t();
-
-//! Type used to tag that the input range is
-//! guaranteed to be ordered and unique
-struct ordered_unique_range_t
- : public ordered_range_t
-{};
-
-//! Value used to tag that the input range is
-//! guaranteed to be ordered and unique
-static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
-
-//! Type used to tag that the inserted values
-//! should be default initialized
-struct default_init_t
-{};
-
-//! Value used to tag that the inserted values
-//! should be default initialized
-static const default_init_t default_init = default_init_t();
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! Type used to tag that the inserted values
-//! should be value initialized
-struct value_init_t
-{};
-
-//! Value used to tag that the inserted values
-//! should be value initialized
-static const value_init_t value_init = value_init_t();
-
-namespace container_detail_really_deep_namespace {
-
-//Otherwise, gcc issues a warning of previously defined
-//anonymous_instance and unique_instance
-struct dummy
-{
- dummy()
- {
- (void)ordered_range;
- (void)ordered_unique_range;
- (void)default_init;
- }
-};
-
-} //detail_really_deep_namespace {
-
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}} //namespace boost { namespace container {
-
-#endif //#ifndef 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
deleted file mode 100644
index 35cea2fd935..00000000000
--- a/src/third_party/boost-1.69.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
-};
-
-#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.69.0/boost/container/detail/block_list.hpp b/src/third_party/boost-1.69.0/boost/container/detail/block_list.hpp
deleted file mode 100644
index 1a6057cb4a7..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/block_list.hpp
+++ /dev/null
@@ -1,139 +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_DETAIL_BLOCK_LIST_HEADER
-#define BOOST_CONTAINER_DETAIL_BLOCK_LIST_HEADER
-
-#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/pmr/memory_resource.hpp>
-#include <boost/container/throw_exception.hpp>
-#include <boost/intrusive/circular_list_algorithms.hpp>
-#include <boost/move/detail/type_traits.hpp>
-#include <boost/assert.hpp>
-
-#include <cstddef>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-struct list_node
-{
- list_node *next;
- list_node *previous;
-};
-
-struct list_node_traits
-{
- typedef list_node node;
- typedef list_node* node_ptr;
- typedef const list_node* const_node_ptr;
-
- static node_ptr get_next(const_node_ptr n)
- { return n->next; }
-
- static node_ptr get_previous(const_node_ptr n)
- { return n->previous; }
-
- static void set_next(const node_ptr & n, const node_ptr & next)
- { n->next = next; }
-
- static void set_previous(const node_ptr & n, const node_ptr & previous)
- { n->previous = previous; }
-};
-
-struct block_list_header
- : public list_node
-{
- std::size_t size;
-};
-
-typedef bi::circular_list_algorithms<list_node_traits> list_algo;
-
-
-template<class DerivedFromBlockListHeader = block_list_header>
-class block_list_base
-{
- list_node m_list;
-
- static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
-
- public:
-
- static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockListHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
-
- explicit block_list_base()
- { list_algo::init_header(&m_list); }
-
- #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- block_list_base(const block_list_base&) = delete;
- block_list_base operator=(const block_list_base&) = delete;
- #else
- private:
- block_list_base (const block_list_base&);
- block_list_base operator=(const block_list_base&);
- public:
- #endif
-
- ~block_list_base()
- {}
-
- void *allocate(std::size_t size, memory_resource &mr)
- {
- if((size_t(-1) - header_size) < size)
- throw_bad_alloc();
- void *p = mr.allocate(size+header_size);
- block_list_header &mb = *::new((void*)p) DerivedFromBlockListHeader;
- mb.size = size+header_size;
- list_algo::link_after(&m_list, &mb);
- return (char *)p + header_size;
- }
-
- void deallocate(void *p, memory_resource &mr) BOOST_NOEXCEPT
- {
- DerivedFromBlockListHeader *pheader = static_cast<DerivedFromBlockListHeader*>
- (static_cast<void*>((char*)p - header_size));
- list_algo::unlink(pheader);
- const std::size_t size = pheader->size;
- static_cast<DerivedFromBlockListHeader*>(pheader)->~DerivedFromBlockListHeader();
- mr.deallocate(pheader, size, memory_resource::max_align);
- }
-
- void release(memory_resource &mr) BOOST_NOEXCEPT
- {
- list_node *n = list_algo::node_traits::get_next(&m_list);
- while(n != &m_list){
- DerivedFromBlockListHeader &d = static_cast<DerivedFromBlockListHeader&>(*n);
- n = list_algo::node_traits::get_next(n);
- std::size_t size = d.size;
- d.~DerivedFromBlockListHeader();
- mr.deallocate(reinterpret_cast<char*>(&d), size, memory_resource::max_align);
- }
- list_algo::init_header(&m_list);
- }
-};
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_DETAIL_BLOCK_LIST_HEADER
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp b/src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp
deleted file mode 100644
index 278e6414a74..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp
+++ /dev/null
@@ -1,157 +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_DETAIL_BLOCK_SLIST_HEADER
-#define BOOST_CONTAINER_DETAIL_BLOCK_SLIST_HEADER
-
-#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/pmr/memory_resource.hpp>
-#include <boost/container/throw_exception.hpp>
-
-#include <boost/move/detail/type_traits.hpp>
-#include <boost/intrusive/linear_slist_algorithms.hpp>
-#include <boost/assert.hpp>
-
-#include <cstddef>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-struct slist_node
-{
- slist_node *next;
-};
-
-struct slist_node_traits
-{
- typedef slist_node node;
- typedef slist_node* node_ptr;
- typedef const slist_node* const_node_ptr;
-
- static node_ptr get_next(const_node_ptr n)
- { return n->next; }
-
- static void set_next(const node_ptr & n, const node_ptr & next)
- { n->next = next; }
-};
-
-struct block_slist_header
- : public slist_node
-{
- std::size_t size;
-};
-
-typedef bi::linear_slist_algorithms<slist_node_traits> slist_algo;
-
-template<class DerivedFromBlockSlistHeader = block_slist_header>
-class block_slist_base
-{
- slist_node m_slist;
-
- static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
-
- public:
-
- static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockSlistHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
-
- explicit block_slist_base()
- { slist_algo::init_header(&m_slist); }
-
- #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- block_slist_base(const block_slist_base&) = delete;
- block_slist_base operator=(const block_slist_base&) = delete;
- #else
- private:
- block_slist_base (const block_slist_base&);
- block_slist_base operator=(const block_slist_base&);
- public:
- #endif
-
- ~block_slist_base()
- {}
-
- void *allocate(std::size_t size, memory_resource &mr)
- {
- if((size_t(-1) - header_size) < size)
- throw_bad_alloc();
- void *p = mr.allocate(size+header_size);
- block_slist_header &mb = *::new((void*)p) DerivedFromBlockSlistHeader;
- mb.size = size+header_size;
- slist_algo::link_after(&m_slist, &mb);
- return (char *)p + header_size;
- }
-
- void release(memory_resource &mr) BOOST_NOEXCEPT
- {
- slist_node *n = slist_algo::node_traits::get_next(&m_slist);
- while(n){
- DerivedFromBlockSlistHeader &d = static_cast<DerivedFromBlockSlistHeader&>(*n);
- n = slist_algo::node_traits::get_next(n);
- std::size_t size = d.block_slist_header::size;
- d.~DerivedFromBlockSlistHeader();
- mr.deallocate(reinterpret_cast<char*>(&d), size, memory_resource::max_align);
- }
- slist_algo::init_header(&m_slist);
- }
-};
-
-class block_slist
- : public block_slist_base<>
-{
- memory_resource &m_upstream_rsrc;
-
- public:
-
- explicit block_slist(memory_resource &upstream_rsrc)
- : block_slist_base<>(), m_upstream_rsrc(upstream_rsrc)
- {}
-
- #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- block_slist(const block_slist&) = delete;
- block_slist operator=(const block_slist&) = delete;
- #else
- private:
- block_slist (const block_slist&);
- block_slist operator=(const block_slist&);
- public:
- #endif
-
- ~block_slist()
- { this->release(); }
-
- void *allocate(std::size_t size)
- { return this->block_slist_base<>::allocate(size, m_upstream_rsrc); }
-
- void release() BOOST_NOEXCEPT
- { return this->block_slist_base<>::release(m_upstream_rsrc); }
-
- memory_resource& upstream_resource() const BOOST_NOEXCEPT
- { return m_upstream_rsrc; }
-};
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_DETAIL_BLOCK_SLIST_HEADER
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
deleted file mode 100644
index 2c8dc6a1fe5..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/compare_functors.hpp
+++ /dev/null
@@ -1,130 +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
-
-#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.69.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
deleted file mode 100644
index d74df6c966a..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/container_or_allocator_rebind.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2017-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/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
-#define BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/detail/container_rebind.hpp>
-#include <boost/container/detail/is_container.hpp>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
-struct container_or_allocator_rebind_impl
- : container_rebind<AllocatorOrContainer, ToType>
-{};
-
-template<class AllocatorOrContainer, class ToType>
-struct container_or_allocator_rebind_impl<AllocatorOrContainer, ToType, false>
- : allocator_traits<AllocatorOrContainer>::template portable_rebind_alloc<ToType>
-
-{};
-
-template<class AllocatorOrContainer, class ToType>
-struct container_or_allocator_rebind
- : container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
-{};
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp
deleted file mode 100644
index 0b8cfea66c1..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp
+++ /dev/null
@@ -1,461 +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_DISPATCH_USES_ALLOCATOR_HPP
-#define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_HPP
-
-#if defined (_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/uses_allocator.hpp>
-
-#include <boost/container/detail/addressof.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/pair.hpp>
-#include <boost/container/detail/type_traits.hpp>
-
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/utility_core.hpp>
-
-#include <boost/core/no_exceptions_support.hpp>
-
-namespace boost { namespace container {
-
-namespace dtl {
-
-
-// Check if we can detect is_convertible using advanced SFINAE expressions
-#if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- //! Code inspired by Mathias Gaunard's is_convertible.cpp found in the Boost mailing list
- //! http://boost.2283326.n4.nabble.com/type-traits-is-constructible-when-decltype-is-supported-td3575452.html
- //! Thanks Mathias!
-
- //With variadic templates, we need a single class to implement the trait
- template<class T, class ...Args>
- struct is_constructible
- {
- typedef char yes_type;
- struct no_type
- { char padding[2]; };
-
- template<std::size_t N>
- struct dummy;
-
- template<class X>
- static decltype(X(boost::move_detail::declval<Args>()...), true_type()) test(int);
-
- template<class X>
- static no_type test(...);
-
- static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
- };
-
- template <class T, class InnerAlloc, class ...Args>
- struct is_constructible_with_allocator_prefix
- : is_constructible<T, allocator_arg_t, InnerAlloc, Args...>
- {};
-
-#else // #if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- //Without advanced SFINAE expressions, we can't use is_constructible
- //so backup to constructible_with_allocator_xxx
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template <class T, class InnerAlloc, class ...Args>
- struct is_constructible_with_allocator_prefix
- : constructible_with_allocator_prefix<T>
- {};
-
- template <class T, class InnerAlloc, class ...Args>
- struct is_constructible_with_allocator_suffix
- : constructible_with_allocator_suffix<T>
- {};
-
- #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template <class T, class InnerAlloc, BOOST_MOVE_CLASSDFLT9>
- struct is_constructible_with_allocator_prefix
- : constructible_with_allocator_prefix<T>
- {};
-
- template <class T, class InnerAlloc, BOOST_MOVE_CLASSDFLT9>
- struct is_constructible_with_allocator_suffix
- : constructible_with_allocator_suffix<T>
- {};
-
- #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-#endif // #if !defined(BOOST_NO_SFINAE_EXPR)
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-template < typename ConstructAlloc
- , typename ArgAlloc
- , typename T
- , class ...Args
- >
-inline typename dtl::enable_if_and
- < void
- , dtl::is_not_pair<T>
- , dtl::not_< uses_allocator<T, ArgAlloc> >
- >::type dispatch_uses_allocator
- ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args)
-{
- (void)arg_alloc;
- allocator_traits<ConstructAlloc>::construct(construct_alloc, p, ::boost::forward<Args>(args)...);
-}
-
-// allocator_arg_t
-template < typename ConstructAlloc
- , typename ArgAlloc
- , typename T
- , class ...Args
- >
-inline typename dtl::enable_if_and
- < void
- , dtl::is_not_pair<T>
- , uses_allocator<T, ArgAlloc>
- , is_constructible_with_allocator_prefix<T, ArgAlloc, Args...>
- >::type dispatch_uses_allocator
- ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args) ...args)
-{
- allocator_traits<ConstructAlloc>::construct
- ( construct_alloc, p, allocator_arg
- , ::boost::forward<ArgAlloc>(arg_alloc), ::boost::forward<Args>(args)...);
-}
-
-// allocator suffix
-template < typename ConstructAlloc
- , typename ArgAlloc
- , typename T
- , class ...Args
- >
-inline typename dtl::enable_if_and
- < void
- , dtl::is_not_pair<T>
- , uses_allocator<T, ArgAlloc>
- , dtl::not_<is_constructible_with_allocator_prefix<T, ArgAlloc, Args...> >
- >::type dispatch_uses_allocator
- ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args)
-{
- allocator_traits<ConstructAlloc>::construct
- (construct_alloc, p, ::boost::forward<Args>(args)..., ::boost::forward<ArgAlloc>(arg_alloc));
-}
-
-#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
- template <typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- inline typename dtl::enable_if_and\
- < void\
- , dtl::is_not_pair<T>\
- , dtl::not_<uses_allocator<T, ArgAlloc> >\
- >::type\
- dispatch_uses_allocator\
- (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- (void)arg_alloc;\
- allocator_traits<ConstructAlloc>::construct(construct_alloc, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- }\
-//
-BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE)
-#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE
-
-#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
- template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- inline typename dtl::enable_if_and\
- < void\
- , dtl::is_not_pair<T>\
- , uses_allocator<T, ArgAlloc>\
- , is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N>\
- >::type\
- dispatch_uses_allocator\
- (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- allocator_traits<ConstructAlloc>::construct\
- (construct_alloc, p, allocator_arg, ::boost::forward<ArgAlloc>(arg_alloc) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- }\
-//
-BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE)
-#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE
-
-#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
- template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- inline typename dtl::enable_if_and\
- < void\
- , dtl::is_not_pair<T>\
- , uses_allocator<T, ArgAlloc>\
- , dtl::not_<is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N> >\
- >::type\
- dispatch_uses_allocator\
- (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- allocator_traits<ConstructAlloc>::construct\
- (construct_alloc, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N, ::boost::forward<ArgAlloc>(arg_alloc));\
- }\
-//
-BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE)
-#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE
-
-#endif //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-template < typename ConstructAlloc
- , typename ArgAlloc
- , typename Pair
- > inline
-BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> >::type)
- dispatch_uses_allocator
- ( ConstructAlloc & construct_alloc
- , BOOST_FWD_REF(ArgAlloc) arg_alloc
- , Pair* p)
-{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first));
- BOOST_TRY{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second));
- }
- BOOST_CATCH(...) {
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
-}
-
-
-template < typename ConstructAlloc
- , typename ArgAlloc
- , class Pair, class U, class V>
-BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> >::type)
- dispatch_uses_allocator
- ( ConstructAlloc & construct_alloc
- , BOOST_FWD_REF(ArgAlloc) arg_alloc
- , Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y)
-{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<U>(x));
- BOOST_TRY{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<V>(y));
- }
- BOOST_CATCH(...){
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
-}
-
-template < typename ConstructAlloc
- , typename ArgAlloc
- , class Pair, class Pair2>
-BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if< dtl::is_pair<Pair> >::type)
- dispatch_uses_allocator
- (ConstructAlloc & construct_alloc
- , BOOST_FWD_REF(ArgAlloc) arg_alloc
- , Pair* p, Pair2& x)
-{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, x.first, x.second); }
-
-template < typename ConstructAlloc
- , typename ArgAlloc
- , class Pair, class Pair2>
-typename dtl::enable_if_and
- < void
- , dtl::is_pair<Pair>
- , dtl::not_<boost::move_detail::is_reference<Pair2> > >::type //This is needed for MSVC10 and ambiguous overloads
- dispatch_uses_allocator
- (ConstructAlloc & construct_alloc
- , BOOST_FWD_REF(ArgAlloc) arg_alloc
- , Pair* p, BOOST_RV_REF_BEG Pair2 BOOST_RV_REF_END x)
-{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, ::boost::move(x.first), ::boost::move(x.second)); }
-
-
-//piecewise construction from boost::tuple
-#define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\
-template< typename ConstructAlloc, typename ArgAlloc, class Pair \
- , template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \
- BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
-typename dtl::enable_if< dtl::is_pair<Pair> >::type\
- dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\
- , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
- , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q)\
-{\
- (void)p; (void)q;\
- (dispatch_uses_allocator)\
- (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\
- BOOST_TRY{\
- (dispatch_uses_allocator)\
- (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\
- }\
- BOOST_CATCH(...) {\
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
- BOOST_RETHROW\
- }\
- BOOST_CATCH_END\
-}\
-//
-BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
-#undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE
-
-//piecewise construction from Std Tuple
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template< typename ConstructAlloc, typename ArgAlloc, class Pair
- , template<class ...> class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2>
- void dispatch_uses_allocator_index( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair
- , Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>)
- {
- (void)t1; (void)t2;
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(pair->first), ::boost::forward<Args1>(get<Indexes1>(t1))...);
- BOOST_TRY{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(pair->second), ::boost::forward<Args2>(get<Indexes2>(t2))...);
- }
- BOOST_CATCH(...){
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- template< typename ConstructAlloc, typename ArgAlloc, class Pair
- , template<class ...> class Tuple, class... Args1, class... Args2>
- typename dtl::enable_if< dtl::is_pair<Pair> >::type
- dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t
- , Tuple<Args1...> t1, Tuple<Args2...> t2)
- {
- (dispatch_uses_allocator_index)( construct_alloc, arg_alloc, pair, t1, t2
- , typename build_number_seq<sizeof...(Args1)>::type()
- , typename build_number_seq<sizeof...(Args2)>::type());
- }
-
-#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
-
- //MSVC 2010 tuple implementation
- #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\
- template< typename ConstructAlloc, typename ArgAlloc, class Pair\
- , template<class, class, class, class, class, class, class, class, class, class> class StdTuple\
- BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
- typename dtl::enable_if< dtl::is_pair<Pair> >::type\
- dispatch_uses_allocator(ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\
- , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\
- , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
- {\
- (void)p; (void)q;\
- (dispatch_uses_allocator)\
- (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
- BOOST_TRY{\
- (dispatch_uses_allocator)\
- (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
- }\
- BOOST_CATCH(...) {\
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
- BOOST_RETHROW\
- }\
- BOOST_CATCH_END\
- }\
- //
- BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
- #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
-
-#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
- #if _VARIADIC_MAX >= 9
- #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9
- #else
- #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1)
- #endif
-
- //MSVC 2012 tuple implementation
- #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\
- template< typename ConstructAlloc, typename ArgAlloc, class Pair\
- , template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \
- BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
- typename dtl::enable_if< dtl::is_pair<Pair> >::type\
- dispatch_uses_allocator\
- ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\
- , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\
- , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
- {\
- (void)p; (void)q;\
- (dispatch_uses_allocator)\
- (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
- BOOST_TRY{\
- (dispatch_uses_allocator)\
- (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
- }\
- BOOST_CATCH(...) {\
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
- BOOST_RETHROW\
- }\
- BOOST_CATCH_END\
- }\
- //
- BOOST_MOVE_ITER2D_0TOMAX(BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
- #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
- #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT
-
-#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-template < typename ConstructAlloc
- , typename ArgAlloc
- , class Pair, class KeyType, class ... Args>
-typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
- dispatch_uses_allocator
- (ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args)
-{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));
- BOOST_TRY{
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<Args>(args)...);
- }
- BOOST_CATCH(...) {
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
-}
-
-#else
-
-#define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE(N) \
- template <typename ConstructAlloc, typename ArgAlloc, class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- inline typename dtl::enable_if\
- < dtl::is_pair<Pair>, void >::type\
- dispatch_uses_allocator\
- (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, \
- BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));\
- BOOST_TRY{\
- (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- }\
- BOOST_CATCH(...) {\
- allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));\
- BOOST_RETHROW\
- }\
- BOOST_CATCH_END\
- }\
-//
-BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE)
-#undef BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE
-
-#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-} //namespace dtl
-
-}} // namespace boost { namespace container {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_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
deleted file mode 100644
index e131cf1f55e..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/flat_tree.hpp
+++ /dev/null
@@ -1,1630 +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 *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.69.0/boost/container/detail/is_container.hpp b/src/third_party/boost-1.69.0/boost/container/detail/is_container.hpp
deleted file mode 100644
index feab702e9e3..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/is_container.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2017-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/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
-#define BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-//empty
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME empty
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
-#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>
-
-//size
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME size
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
-#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>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-template <class Container>
-struct is_container
-{
- static const bool value =
- boost::container::is_container_detail::
- has_member_function_callable_with_size <const Container>::value &&
- boost::container::is_container_detail::
- has_member_function_callable_with_empty<const Container>::value;
-};
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp b/src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp
deleted file mode 100644
index 7ccdac911c9..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp
+++ /dev/null
@@ -1,875 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013.
-// (C) Copyright Gennaro Prota 2003 - 2004.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (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_ITERATORS_HPP
-#define BOOST_CONTAINER_DETAIL_ITERATORS_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>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/value_init.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/intrusive/detail/reverse_iterator.hpp>
-
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#else
-#include <boost/container/detail/variadic_templates_tools.hpp>
-#endif
-#include <boost/container/detail/iterator.hpp>
-
-namespace boost {
-namespace container {
-
-template <class T, class Difference = std::ptrdiff_t>
-class constant_iterator
- : public ::boost::container::iterator
- <std::random_access_iterator_tag, T, Difference, const T*, const T &>
-{
- typedef constant_iterator<T, Difference> this_type;
-
- public:
- explicit constant_iterator(const T &ref, Difference range_size)
- : m_ptr(&ref), m_num(range_size){}
-
- //Constructors
- constant_iterator()
- : m_ptr(0), m_num(0){}
-
- constant_iterator& operator++()
- { increment(); return *this; }
-
- constant_iterator operator++(int)
- {
- constant_iterator result (*this);
- increment();
- return result;
- }
-
- constant_iterator& operator--()
- { decrement(); return *this; }
-
- constant_iterator operator--(int)
- {
- constant_iterator result (*this);
- decrement();
- return result;
- }
-
- friend bool operator== (const constant_iterator& i, const constant_iterator& i2)
- { return i.equal(i2); }
-
- friend bool operator!= (const constant_iterator& i, const constant_iterator& i2)
- { return !(i == i2); }
-
- friend bool operator< (const constant_iterator& i, const constant_iterator& i2)
- { return i.less(i2); }
-
- friend bool operator> (const constant_iterator& i, const constant_iterator& i2)
- { return i2 < i; }
-
- friend bool operator<= (const constant_iterator& i, const constant_iterator& i2)
- { return !(i > i2); }
-
- friend bool operator>= (const constant_iterator& i, const constant_iterator& i2)
- { return !(i < i2); }
-
- friend Difference operator- (const constant_iterator& i, const constant_iterator& i2)
- { return i2.distance_to(i); }
-
- //Arithmetic
- constant_iterator& operator+=(Difference off)
- { this->advance(off); return *this; }
-
- constant_iterator operator+(Difference off) const
- {
- constant_iterator other(*this);
- other.advance(off);
- return other;
- }
-
- friend constant_iterator operator+(Difference off, const constant_iterator& right)
- { return right + off; }
-
- constant_iterator& operator-=(Difference off)
- { this->advance(-off); return *this; }
-
- constant_iterator operator-(Difference off) const
- { return *this + (-off); }
-
- const T& operator*() const
- { return dereference(); }
-
- const T& operator[] (Difference ) const
- { return dereference(); }
-
- const T* operator->() const
- { return &(dereference()); }
-
- private:
- const T * m_ptr;
- Difference m_num;
-
- void increment()
- { --m_num; }
-
- void decrement()
- { ++m_num; }
-
- bool equal(const this_type &other) const
- { return m_num == other.m_num; }
-
- bool less(const this_type &other) const
- { return other.m_num < m_num; }
-
- const T & dereference() const
- { return *m_ptr; }
-
- void advance(Difference n)
- { m_num -= n; }
-
- Difference distance_to(const this_type &other)const
- { return m_num - other.m_num; }
-};
-
-template <class T, class Difference>
-class value_init_construct_iterator
- : public ::boost::container::iterator
- <std::random_access_iterator_tag, T, Difference, const T*, const T &>
-{
- typedef value_init_construct_iterator<T, Difference> this_type;
-
- public:
- explicit value_init_construct_iterator(Difference range_size)
- : m_num(range_size){}
-
- //Constructors
- value_init_construct_iterator()
- : m_num(0){}
-
- value_init_construct_iterator& operator++()
- { increment(); return *this; }
-
- value_init_construct_iterator operator++(int)
- {
- value_init_construct_iterator result (*this);
- increment();
- return result;
- }
-
- value_init_construct_iterator& operator--()
- { decrement(); return *this; }
-
- value_init_construct_iterator operator--(int)
- {
- value_init_construct_iterator result (*this);
- decrement();
- return result;
- }
-
- friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return i.equal(i2); }
-
- friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return !(i == i2); }
-
- friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return i.less(i2); }
-
- friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return i2 < i; }
-
- friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return !(i > i2); }
-
- friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return !(i < i2); }
-
- friend Difference operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
- { return i2.distance_to(i); }
-
- //Arithmetic
- value_init_construct_iterator& operator+=(Difference off)
- { this->advance(off); return *this; }
-
- value_init_construct_iterator operator+(Difference off) const
- {
- value_init_construct_iterator other(*this);
- other.advance(off);
- return other;
- }
-
- friend value_init_construct_iterator operator+(Difference off, const value_init_construct_iterator& right)
- { return right + off; }
-
- value_init_construct_iterator& operator-=(Difference off)
- { this->advance(-off); return *this; }
-
- value_init_construct_iterator operator-(Difference off) const
- { return *this + (-off); }
-
- //This pseudo-iterator's dereference operations have no sense since value is not
- //constructed until ::boost::container::construct_in_place is called.
- //So comment them to catch bad uses
- //const T& operator*() const;
- //const T& operator[](difference_type) const;
- //const T* operator->() const;
-
- private:
- Difference m_num;
-
- void increment()
- { --m_num; }
-
- void decrement()
- { ++m_num; }
-
- bool equal(const this_type &other) const
- { return m_num == other.m_num; }
-
- bool less(const this_type &other) const
- { return other.m_num < m_num; }
-
- const T & dereference() const
- {
- static T dummy;
- return dummy;
- }
-
- void advance(Difference n)
- { m_num -= n; }
-
- Difference distance_to(const this_type &other)const
- { return m_num - other.m_num; }
-};
-
-template <class T, class Difference>
-class default_init_construct_iterator
- : public ::boost::container::iterator
- <std::random_access_iterator_tag, T, Difference, const T*, const T &>
-{
- typedef default_init_construct_iterator<T, Difference> this_type;
-
- public:
- explicit default_init_construct_iterator(Difference range_size)
- : m_num(range_size){}
-
- //Constructors
- default_init_construct_iterator()
- : m_num(0){}
-
- default_init_construct_iterator& operator++()
- { increment(); return *this; }
-
- default_init_construct_iterator operator++(int)
- {
- default_init_construct_iterator result (*this);
- increment();
- return result;
- }
-
- default_init_construct_iterator& operator--()
- { decrement(); return *this; }
-
- default_init_construct_iterator operator--(int)
- {
- default_init_construct_iterator result (*this);
- decrement();
- return result;
- }
-
- friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return i.equal(i2); }
-
- friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return !(i == i2); }
-
- friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return i.less(i2); }
-
- friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return i2 < i; }
-
- friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return !(i > i2); }
-
- friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return !(i < i2); }
-
- friend Difference operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
- { return i2.distance_to(i); }
-
- //Arithmetic
- default_init_construct_iterator& operator+=(Difference off)
- { this->advance(off); return *this; }
-
- default_init_construct_iterator operator+(Difference off) const
- {
- default_init_construct_iterator other(*this);
- other.advance(off);
- return other;
- }
-
- friend default_init_construct_iterator operator+(Difference off, const default_init_construct_iterator& right)
- { return right + off; }
-
- default_init_construct_iterator& operator-=(Difference off)
- { this->advance(-off); return *this; }
-
- default_init_construct_iterator operator-(Difference off) const
- { return *this + (-off); }
-
- //This pseudo-iterator's dereference operations have no sense since value is not
- //constructed until ::boost::container::construct_in_place is called.
- //So comment them to catch bad uses
- //const T& operator*() const;
- //const T& operator[](difference_type) const;
- //const T* operator->() const;
-
- private:
- Difference m_num;
-
- void increment()
- { --m_num; }
-
- void decrement()
- { ++m_num; }
-
- bool equal(const this_type &other) const
- { return m_num == other.m_num; }
-
- bool less(const this_type &other) const
- { return other.m_num < m_num; }
-
- const T & dereference() const
- {
- static T dummy;
- return dummy;
- }
-
- void advance(Difference n)
- { m_num -= n; }
-
- Difference distance_to(const this_type &other)const
- { return m_num - other.m_num; }
-};
-
-
-template <class T, class Difference = std::ptrdiff_t>
-class repeat_iterator
- : public ::boost::container::iterator
- <std::random_access_iterator_tag, T, Difference, T*, T&>
-{
- typedef repeat_iterator<T, Difference> this_type;
- public:
- explicit repeat_iterator(T &ref, Difference range_size)
- : m_ptr(&ref), m_num(range_size){}
-
- //Constructors
- repeat_iterator()
- : m_ptr(0), m_num(0){}
-
- this_type& operator++()
- { increment(); return *this; }
-
- this_type operator++(int)
- {
- this_type result (*this);
- increment();
- return result;
- }
-
- this_type& operator--()
- { increment(); return *this; }
-
- this_type operator--(int)
- {
- this_type result (*this);
- increment();
- return result;
- }
-
- friend bool operator== (const this_type& i, const this_type& i2)
- { return i.equal(i2); }
-
- friend bool operator!= (const this_type& i, const this_type& i2)
- { return !(i == i2); }
-
- friend bool operator< (const this_type& i, const this_type& i2)
- { return i.less(i2); }
-
- friend bool operator> (const this_type& i, const this_type& i2)
- { return i2 < i; }
-
- friend bool operator<= (const this_type& i, const this_type& i2)
- { return !(i > i2); }
-
- friend bool operator>= (const this_type& i, const this_type& i2)
- { return !(i < i2); }
-
- friend Difference operator- (const this_type& i, const this_type& i2)
- { return i2.distance_to(i); }
-
- //Arithmetic
- this_type& operator+=(Difference off)
- { this->advance(off); return *this; }
-
- this_type operator+(Difference off) const
- {
- this_type other(*this);
- other.advance(off);
- return other;
- }
-
- friend this_type operator+(Difference off, const this_type& right)
- { return right + off; }
-
- this_type& operator-=(Difference off)
- { this->advance(-off); return *this; }
-
- this_type operator-(Difference off) const
- { return *this + (-off); }
-
- T& operator*() const
- { return dereference(); }
-
- T& operator[] (Difference ) const
- { return dereference(); }
-
- T *operator->() const
- { return &(dereference()); }
-
- private:
- T * m_ptr;
- Difference m_num;
-
- void increment()
- { --m_num; }
-
- void decrement()
- { ++m_num; }
-
- bool equal(const this_type &other) const
- { return m_num == other.m_num; }
-
- bool less(const this_type &other) const
- { return other.m_num < m_num; }
-
- T & dereference() const
- { return *m_ptr; }
-
- void advance(Difference n)
- { m_num -= n; }
-
- Difference distance_to(const this_type &other)const
- { return m_num - other.m_num; }
-};
-
-template <class T, class EmplaceFunctor, class Difference /*= std::ptrdiff_t*/>
-class emplace_iterator
- : public ::boost::container::iterator
- <std::random_access_iterator_tag, T, Difference, const T*, const T &>
-{
- typedef emplace_iterator this_type;
-
- public:
- typedef Difference difference_type;
- BOOST_CONTAINER_FORCEINLINE explicit emplace_iterator(EmplaceFunctor&e)
- : m_num(1), m_pe(&e){}
-
- BOOST_CONTAINER_FORCEINLINE emplace_iterator()
- : m_num(0), m_pe(0){}
-
- BOOST_CONTAINER_FORCEINLINE this_type& operator++()
- { increment(); return *this; }
-
- this_type operator++(int)
- {
- this_type result (*this);
- increment();
- return result;
- }
-
- BOOST_CONTAINER_FORCEINLINE this_type& operator--()
- { decrement(); return *this; }
-
- this_type operator--(int)
- {
- this_type result (*this);
- decrement();
- return result;
- }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2)
- { return i.equal(i2); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2)
- { return !(i == i2); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2)
- { return i.less(i2); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2)
- { return i2 < i; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2)
- { return !(i > i2); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2)
- { return !(i < i2); }
-
- BOOST_CONTAINER_FORCEINLINE friend difference_type operator- (const this_type& i, const this_type& i2)
- { return i2.distance_to(i); }
-
- //Arithmetic
- BOOST_CONTAINER_FORCEINLINE this_type& operator+=(difference_type off)
- { this->advance(off); return *this; }
-
- this_type operator+(difference_type off) const
- {
- this_type other(*this);
- other.advance(off);
- return other;
- }
-
- BOOST_CONTAINER_FORCEINLINE friend this_type operator+(difference_type off, const this_type& right)
- { return right + off; }
-
- BOOST_CONTAINER_FORCEINLINE this_type& operator-=(difference_type off)
- { this->advance(-off); return *this; }
-
- BOOST_CONTAINER_FORCEINLINE this_type operator-(difference_type off) const
- { return *this + (-off); }
-
- private:
- //This pseudo-iterator's dereference operations have no sense since value is not
- //constructed until ::boost::container::construct_in_place is called.
- //So comment them to catch bad uses
- const T& operator*() const;
- const T& operator[](difference_type) const;
- const T* operator->() const;
-
- public:
- template<class Allocator>
- void construct_in_place(Allocator &a, T* ptr)
- { (*m_pe)(a, ptr); }
-
- template<class DestIt>
- void assign_in_place(DestIt dest)
- { (*m_pe)(dest); }
-
- private:
- difference_type m_num;
- EmplaceFunctor * m_pe;
-
- BOOST_CONTAINER_FORCEINLINE void increment()
- { --m_num; }
-
- BOOST_CONTAINER_FORCEINLINE void decrement()
- { ++m_num; }
-
- BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
- { return m_num == other.m_num; }
-
- BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
- { return other.m_num < m_num; }
-
- BOOST_CONTAINER_FORCEINLINE const T & dereference() const
- {
- static T dummy;
- return dummy;
- }
-
- BOOST_CONTAINER_FORCEINLINE void advance(difference_type n)
- { m_num -= n; }
-
- BOOST_CONTAINER_FORCEINLINE difference_type distance_to(const this_type &other)const
- { return difference_type(m_num - other.m_num); }
-};
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-template<class ...Args>
-struct emplace_functor
-{
- typedef typename dtl::build_number_seq<sizeof...(Args)>::type index_tuple_t;
-
- emplace_functor(BOOST_FWD_REF(Args)... args)
- : args_(args...)
- {}
-
- template<class Allocator, class T>
- BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)
- { emplace_functor::inplace_impl(a, ptr, index_tuple_t()); }
-
- template<class DestIt>
- BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)
- { emplace_functor::inplace_impl(dest, index_tuple_t()); }
-
- private:
- template<class Allocator, class T, std::size_t ...IdxPack>
- BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple<IdxPack...>&)
- {
- allocator_traits<Allocator>::construct
- (a, ptr, ::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
- }
-
- template<class DestIt, std::size_t ...IdxPack>
- BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const dtl::index_tuple<IdxPack...>&)
- {
- typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;
- value_type && tmp= value_type(::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
- *dest = ::boost::move(tmp);
- }
-
- dtl::tuple<Args&...> args_;
-};
-
-template<class ...Args>
-struct emplace_functor_type
-{
- typedef emplace_functor<Args...> type;
-};
-
-#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-//Partial specializations cannot match argument list for primary template, so add an extra argument
-template <BOOST_MOVE_CLASSDFLT9, class Dummy = void>
-struct emplace_functor_type;
-
-#define BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE(N) \
-BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
-struct emplace_functor##N\
-{\
- explicit emplace_functor##N( BOOST_MOVE_UREF##N )\
- BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N{}\
- \
- template<class Allocator, class T>\
- void operator()(Allocator &a, T *ptr)\
- { allocator_traits<Allocator>::construct(a, ptr BOOST_MOVE_I##N BOOST_MOVE_MFWD##N); }\
- \
- template<class DestIt>\
- void operator()(DestIt dest)\
- {\
- typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;\
- BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), dtl::value_init<value_type> tmp) ;\
- *dest = ::boost::move(const_cast<value_type &>(BOOST_MOVE_IF(N, tmp, tmp.get())));\
- }\
- \
- BOOST_MOVE_MREF##N\
-};\
-\
-template <BOOST_MOVE_CLASS##N>\
-struct emplace_functor_type<BOOST_MOVE_TARG##N>\
-{\
- typedef emplace_functor##N BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N type;\
-};\
-//
-
-BOOST_MOVE_ITERATE_0TO9(BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE)
-
-#undef BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE
-
-#endif
-
-namespace dtl {
-
-template<class T>
-struct has_iterator_category
-{
- struct two { char _[2]; };
-
- template <typename X>
- static char test(int, typename X::iterator_category*);
-
- template <typename X>
- static two test(int, ...);
-
- static const bool value = (1 == sizeof(test<T>(0, 0)));
-};
-
-
-template<class T, bool = has_iterator_category<T>::value >
-struct is_input_iterator
-{
- static const bool value = is_same<typename T::iterator_category, std::input_iterator_tag>::value;
-};
-
-template<class T>
-struct is_input_iterator<T, false>
-{
- static const bool value = false;
-};
-
-template<class T>
-struct is_not_input_iterator
-{
- static const bool value = !is_input_iterator<T>::value;
-};
-
-template<class T, bool = has_iterator_category<T>::value >
-struct is_forward_iterator
-{
- static const bool value = is_same<typename T::iterator_category, std::forward_iterator_tag>::value;
-};
-
-template<class T>
-struct is_forward_iterator<T, false>
-{
- static const bool value = false;
-};
-
-template<class T, bool = has_iterator_category<T>::value >
-struct is_bidirectional_iterator
-{
- static const bool value = is_same<typename T::iterator_category, std::bidirectional_iterator_tag>::value;
-};
-
-template<class T>
-struct is_bidirectional_iterator<T, false>
-{
- static const bool value = false;
-};
-
-template<class IINodeType>
-struct iiterator_node_value_type {
- typedef typename IINodeType::value_type type;
-};
-
-template<class IIterator>
-struct iiterator_types
-{
- typedef typename IIterator::value_type it_value_type;
- typedef typename iiterator_node_value_type<it_value_type>::type value_type;
- typedef typename boost::container::iterator_traits<IIterator>::pointer it_pointer;
- typedef typename boost::container::iterator_traits<IIterator>::difference_type difference_type;
- typedef typename ::boost::intrusive::pointer_traits<it_pointer>::
- template rebind_pointer<value_type>::type pointer;
- typedef typename ::boost::intrusive::pointer_traits<it_pointer>::
- 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;
- typedef typename IIterator::iterator_category iterator_category;
-};
-
-template<class IIterator, bool IsConst>
-struct iterator_types
-{
- typedef typename ::boost::container::iterator
- < typename iiterator_types<IIterator>::iterator_category
- , typename iiterator_types<IIterator>::value_type
- , typename iiterator_types<IIterator>::difference_type
- , typename iiterator_types<IIterator>::const_pointer
- , typename iiterator_types<IIterator>::const_reference> type;
-};
-
-template<class IIterator>
-struct iterator_types<IIterator, false>
-{
- typedef typename ::boost::container::iterator
- < typename iiterator_types<IIterator>::iterator_category
- , typename iiterator_types<IIterator>::value_type
- , typename iiterator_types<IIterator>::difference_type
- , typename iiterator_types<IIterator>::pointer
- , typename iiterator_types<IIterator>::reference> type;
-};
-
-template<class IIterator, bool IsConst>
-class iterator_from_iiterator
-{
- typedef typename iterator_types<IIterator, IsConst>::type types_t;
-
- public:
- typedef typename types_t::pointer pointer;
- typedef typename types_t::reference reference;
- typedef typename types_t::difference_type difference_type;
- typedef typename types_t::iterator_category iterator_category;
- typedef typename types_t::value_type value_type;
-
- BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator()
- : m_iit()
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW
- : m_iit(iit)
- {}
-
- BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(iterator_from_iiterator<IIterator, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
- : m_iit(other.get())
- {}
-
- BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
- { ++this->m_iit; return *this; }
-
- BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
- {
- iterator_from_iiterator result (*this);
- ++this->m_iit;
- return result;
- }
-
- BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
- {
- //If the iterator_from_iiterator is not a bidirectional iterator, operator-- should not exist
- BOOST_STATIC_ASSERT((is_bidirectional_iterator<iterator_from_iiterator>::value));
- --this->m_iit; return *this;
- }
-
- BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
- {
- iterator_from_iiterator result (*this);
- --this->m_iit;
- return result;
- }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_iit == r.m_iit; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return !(l == r); }
-
- BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_iit->get_data(); }
-
- BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
- { return ::boost::intrusive::pointer_traits<pointer>::pointer_to(this->operator*()); }
-
- BOOST_CONTAINER_FORCEINLINE const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_iit; }
-
- private:
- IIterator m_iit;
-};
-
-} //namespace dtl {
-
-using ::boost::intrusive::reverse_iterator;
-
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/pair.hpp b/src/third_party/boost-1.69.0/boost/container/detail/pair.hpp
deleted file mode 100644
index 9cca9f6ba83..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/pair.hpp
+++ /dev/null
@@ -1,614 +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_PAIR_HPP
-#define BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_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/mpl.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/std_fwd.hpp>
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-# include <boost/container/detail/variadic_templates_tools.hpp>
-#endif
-#include <boost/move/adl_move_swap.hpp> //swap
-
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-#include <boost/move/utility_core.hpp>
-#include <boost/move/detail/fwd_macros.hpp>
-
-namespace boost {
-namespace tuples {
-
-struct null_type;
-
-template <
- class T0, class T1, class T2,
- class T3, class T4, class T5,
- class T6, class T7, class T8,
- class T9>
-class tuple;
-
-} //namespace tuples {
-} //namespace boost {
-
-namespace boost {
-namespace container {
-namespace pair_impl {
-
-template <class TupleClass>
-struct is_boost_tuple
-{
- static const bool value = false;
-};
-
-template <
- class T0, class T1, class T2,
- class T3, class T4, class T5,
- class T6, class T7, class T8,
- class T9>
-struct is_boost_tuple< boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
-{
- static const bool value = true;
-};
-
-template<class Tuple>
-struct disable_if_boost_tuple
- : boost::container::dtl::disable_if< is_boost_tuple<Tuple> >
-{};
-
-template<class T>
-struct is_tuple_null
-{
- static const bool value = false;
-};
-
-template<>
-struct is_tuple_null<boost::tuples::null_type>
-{
- static const bool value = true;
-};
-
-}}}
-
-#if defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
-//MSVC 2010 tuple marker
-namespace std { namespace tr1 { struct _Nil; }}
-#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
-//MSVC 2012 tuple marker
-namespace std { struct _Nil; }
-#endif
-
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- template <int Dummy = 0>
- struct std_piecewise_construct_holder
- {
- static ::std::piecewise_construct_t *dummy;
- };
-
- template <int Dummy>
- ::std::piecewise_construct_t *std_piecewise_construct_holder<Dummy>::dummy =
- reinterpret_cast< ::std::piecewise_construct_t *>(0x01234); //Avoid sanitizer errors on references to null pointers
-
-typedef const std::piecewise_construct_t & piecewise_construct_t;
-
-struct try_emplace_t{};
-
-#else
-
-//! The piecewise_construct_t struct is an empty structure type used as a unique type to
-//! disambiguate used to disambiguate between different functions that take two tuple arguments.
-typedef unspecified piecewise_construct_t;
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A instance of type
-//! piecewise_construct_t
-static piecewise_construct_t piecewise_construct = BOOST_CONTAINER_DOC1ST(unspecified, *std_piecewise_construct_holder<>::dummy);
-
-///@cond
-
-namespace dtl {
-
-struct piecewise_construct_use
-{
- //Avoid warnings of unused "piecewise_construct"
- piecewise_construct_use()
- { (void)&::boost::container::piecewise_construct; }
-};
-
-template <class T1, class T2>
-struct pair;
-
-template <class T>
-struct is_pair
-{
- static const bool value = false;
-};
-
-template <class T1, class T2>
-struct is_pair< pair<T1, T2> >
-{
- static const bool value = true;
-};
-
-template <class T1, class T2>
-struct is_pair< std::pair<T1, T2> >
-{
- static const bool value = true;
-};
-
-template <class T>
-struct is_not_pair
-{
- static const bool value = !is_pair<T>::value;
-};
-
-template <class T>
-struct is_std_pair
-{
- static const bool value = false;
-};
-
-template <class T1, class T2>
-struct is_std_pair< std::pair<T1, T2> >
-{
- static const bool value = true;
-};
-
-struct pair_nat;
-
-template<typename T, typename U, typename V>
-void get(T); //to enable ADL
-
-///@endcond
-
-template <class T1, class T2>
-struct pair
-{
- private:
- BOOST_COPYABLE_AND_MOVABLE(pair)
-
- public:
- typedef T1 first_type;
- typedef T2 second_type;
-
- T1 first;
- T2 second;
-
- //Default constructor
- pair()
- : first(), second()
- {}
-
- //pair copy assignment
- pair(const pair& x)
- : first(x.first), second(x.second)
- {}
-
- //pair move constructor
- pair(BOOST_RV_REF(pair) p)
- : first(::boost::move(p.first)), second(::boost::move(p.second))
- {}
-
- template <class D, class S>
- pair(const pair<D, S> &p)
- : first(p.first), second(p.second)
- {}
-
- template <class D, class S>
- pair(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
- : first(::boost::move(p.first)), second(::boost::move(p.second))
- {}
-
- //pair from two values
- pair(const T1 &t1, const T2 &t2)
- : first(t1)
- , second(t2)
- {}
-
- template<class U, class V>
- pair(BOOST_FWD_REF(U) u, BOOST_FWD_REF(V) v)
- : first(::boost::forward<U>(u))
- , second(::boost::forward<V>(v))
- {}
-
- //And now compatibility with std::pair
- pair(const std::pair<T1, T2>& x)
- : first(x.first), second(x.second)
- {}
-
- template <class D, class S>
- pair(const std::pair<D, S>& p)
- : first(p.first), second(p.second)
- {}
-
- pair(BOOST_RV_REF_BEG std::pair<T1, T2> BOOST_RV_REF_END p)
- : first(::boost::move(p.first)), second(::boost::move(p.second))
- {}
-
- template <class D, class S>
- pair(BOOST_RV_REF_BEG std::pair<D, S> BOOST_RV_REF_END p)
- : first(::boost::move(p.first)), second(::boost::move(p.second))
- {}
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template< class KeyType, class ...Args>
- pair(try_emplace_t, BOOST_FWD_REF(KeyType) k, Args && ...args)
- : first(boost::forward<KeyType>(k)), second(::boost::forward<Args>(args)...)\
- {}
- #else
-
- //piecewise construction from boost::tuple
- #define BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE(N)\
- template< class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N > \
- pair( try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\
- : first(boost::forward<KeyType>(k)), second(BOOST_MOVE_FWD##N)\
- {}\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE)
- #undef BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE
-
- #endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
-
- //piecewise construction from boost::tuple
- #define BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\
- template< template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \
- BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
- pair( piecewise_construct_t\
- , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
- , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q\
- , typename dtl::enable_if_c\
- < pair_impl::is_boost_tuple< BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> >::value &&\
- !(pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARG##N>::value || pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARGQ##M>::value) \
- >::type* = 0\
- )\
- : first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\
- { (void)p; (void)q; }\
- //
- BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
- #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE
-
- //piecewise construction from variadic tuple (with delegating constructors)
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- # if !defined(BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS)
- private:
- template<template<class ...> class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2>
- pair(Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>)
- : first (::boost::forward<Args1>(get<Indexes1>(t1))...)
- , second(::boost::forward<Args2>(get<Indexes2>(t2))...)
- { (void) t1; (void)t2; }
-
- public:
- template< template<class ...> class Tuple, class... Args1, class... Args2
- , class = typename pair_impl::disable_if_boost_tuple< Tuple<Args1...> >::type>
- pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
- : pair(t1, t2, typename build_number_seq<sizeof...(Args1)>::type(), typename build_number_seq<sizeof...(Args2)>::type())
- {}
- # else
- //piecewise construction from variadic tuple (suboptimal, without delegating constructors)
- private:
- template<typename T, template<class ...> class Tuple, typename... Args>
- static T build_from_args(Tuple<Args...>&& t)
- { return do_build_from_args<T>(::boost::move(t), typename build_number_seq<sizeof...(Args)>::type()); }
-
- template<typename T, template<class ...> class Tuple, typename... Args, std::size_t... Indexes>
- static T do_build_from_args(Tuple<Args...> && t, const index_tuple<Indexes...>&)
- { (void)t; return T(::boost::forward<Args>(get<Indexes>(t))...); }
-
- public:
- template< template<class ...> class Tuple, class... Args1, class... Args2
- , class = typename pair_impl::disable_if_boost_tuple< Tuple<Args1...> >::type>
- pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
- : first (build_from_args<first_type> (::boost::move(t1)))
- , second (build_from_args<second_type>(::boost::move(t2)))
- {}
- # endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
- #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
- //MSVC 2010 tuple implementation
- #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\
- template< template<class, class, class, class, class, class, class, class, class, class> class StdTuple \
- BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
- pair( piecewise_construct_t\
- , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\
- , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
- : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
- { (void)p; (void)q; }\
- //
- BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
- #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
- #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
- #if _VARIADIC_MAX >= 9
- #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9
- #else
- #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1)
- #endif
-
- //MSVC 2012 tuple implementation
- #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\
- template< template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \
- BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
- pair( piecewise_construct_t\
- , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\
- , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
- : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
- { (void)p; (void)q; }\
- //
- BOOST_MOVE_ITER2D_0TOMAX(BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
- #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
- #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT
- #endif
-
- //pair copy assignment
- pair& operator=(BOOST_COPY_ASSIGN_REF(pair) p)
- {
- first = p.first;
- second = p.second;
- return *this;
- }
-
- //pair move assignment
- pair& operator=(BOOST_RV_REF(pair) p)
- {
- first = ::boost::move(p.first);
- second = ::boost::move(p.second);
- return *this;
- }
-
- template <class D, class S>
- typename ::boost::container::dtl::disable_if_or
- < pair &
- , ::boost::container::dtl::is_same<T1, D>
- , ::boost::container::dtl::is_same<T2, S>
- >::type
- operator=(const pair<D, S>&p)
- {
- first = p.first;
- second = p.second;
- return *this;
- }
-
- template <class D, class S>
- typename ::boost::container::dtl::disable_if_or
- < pair &
- , ::boost::container::dtl::is_same<T1, D>
- , ::boost::container::dtl::is_same<T2, S>
- >::type
- operator=(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
- {
- first = ::boost::move(p.first);
- second = ::boost::move(p.second);
- return *this;
- }
-//std::pair copy assignment
- pair& operator=(const std::pair<T1, T2> &p)
- {
- first = p.first;
- second = p.second;
- return *this;
- }
-
- template <class D, class S>
- pair& operator=(const std::pair<D, S> &p)
- {
- first = ::boost::move(p.first);
- second = ::boost::move(p.second);
- return *this;
- }
-
- //std::pair move assignment
- pair& operator=(BOOST_RV_REF_BEG std::pair<T1, T2> BOOST_RV_REF_END p)
- {
- first = ::boost::move(p.first);
- second = ::boost::move(p.second);
- return *this;
- }
-
- template <class D, class S>
- pair& operator=(BOOST_RV_REF_BEG std::pair<D, S> BOOST_RV_REF_END p)
- {
- first = ::boost::move(p.first);
- second = ::boost::move(p.second);
- return *this;
- }
-
- //swap
- void swap(pair& p)
- {
- ::boost::adl_move_swap(this->first, p.first);
- ::boost::adl_move_swap(this->second, p.second);
- }
-};
-
-template <class T1, class T2>
-inline bool operator==(const pair<T1,T2>& x, const pair<T1,T2>& y)
-{ return static_cast<bool>(x.first == y.first && x.second == y.second); }
-
-template <class T1, class T2>
-inline bool operator< (const pair<T1,T2>& x, const pair<T1,T2>& y)
-{ return static_cast<bool>(x.first < y.first ||
- (!(y.first < x.first) && x.second < y.second)); }
-
-template <class T1, class T2>
-inline bool operator!=(const pair<T1,T2>& x, const pair<T1,T2>& y)
-{ return static_cast<bool>(!(x == y)); }
-
-template <class T1, class T2>
-inline bool operator> (const pair<T1,T2>& x, const pair<T1,T2>& y)
-{ return y < x; }
-
-template <class T1, class T2>
-inline bool operator>=(const pair<T1,T2>& x, const pair<T1,T2>& y)
-{ return static_cast<bool>(!(x < y)); }
-
-template <class T1, class T2>
-inline bool operator<=(const pair<T1,T2>& x, const pair<T1,T2>& y)
-{ return static_cast<bool>(!(y < x)); }
-
-template <class T1, class T2>
-inline pair<T1, T2> make_pair(T1 x, T2 y)
-{ return pair<T1, T2>(x, y); }
-
-template <class T1, class T2>
-inline void swap(pair<T1, T2>& x, pair<T1, T2>& y)
-{ x.swap(y); }
-
-} //namespace dtl {
-} //namespace container {
-
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template<class T1, class T2>
-struct has_move_emulation_enabled< ::boost::container::dtl::pair<T1, T2> >
-{
- static const bool value = true;
-};
-
-#endif
-
-namespace move_detail{
-
-template<class T>
-struct is_class_or_union;
-
-template <class T1, class T2>
-struct is_class_or_union< ::boost::container::dtl::pair<T1, T2> >
-//This specialization is needed to avoid instantiation of pair in
-//is_class, and allow recursive maps.
-{
- static const bool value = true;
-};
-
-template <class T1, class T2>
-struct is_class_or_union< std::pair<T1, T2> >
-//This specialization is needed to avoid instantiation of pair in
-//is_class, and allow recursive maps.
-{
- static const bool value = true;
-};
-
-template<class T>
-struct is_union;
-
-template <class T1, class T2>
-struct is_union< ::boost::container::dtl::pair<T1, T2> >
-//This specialization is needed to avoid instantiation of pair in
-//is_class, and allow recursive maps.
-{
- static const bool value = false;
-};
-
-template <class T1, class T2>
-struct is_union< std::pair<T1, T2> >
-//This specialization is needed to avoid instantiation of pair in
-//is_class, and allow recursive maps.
-{
- static const bool value = false;
-};
-
-template<class T>
-struct is_class;
-
-template <class T1, class T2>
-struct is_class< ::boost::container::dtl::pair<T1, T2> >
-//This specialization is needed to avoid instantiation of pair in
-//is_class, and allow recursive maps.
-{
- static const bool value = true;
-};
-
-template <class T1, class T2>
-struct is_class< std::pair<T1, T2> >
-//This specialization is needed to avoid instantiation of pair in
-//is_class, and allow recursive maps.
-{
- static const bool value = true;
-};
-
-
-//Triviality of pair
-template<class T>
-struct is_trivially_copy_constructible;
-
-template<class A, class B>
-struct is_trivially_copy_assignable
- <boost::container::dtl::pair<A,B> >
-{
- static const bool value = boost::move_detail::is_trivially_copy_assignable<A>::value &&
- boost::move_detail::is_trivially_copy_assignable<B>::value ;
-};
-
-template<class T>
-struct is_trivially_move_constructible;
-
-template<class A, class B>
-struct is_trivially_move_assignable
- <boost::container::dtl::pair<A,B> >
-{
- static const bool value = boost::move_detail::is_trivially_move_assignable<A>::value &&
- boost::move_detail::is_trivially_move_assignable<B>::value ;
-};
-
-template<class T>
-struct is_trivially_copy_assignable;
-
-template<class A, class B>
-struct is_trivially_copy_constructible<boost::container::dtl::pair<A,B> >
-{
- static const bool value = boost::move_detail::is_trivially_copy_constructible<A>::value &&
- boost::move_detail::is_trivially_copy_constructible<B>::value ;
-};
-
-template<class T>
-struct is_trivially_move_assignable;
-
-template<class A, class B>
-struct is_trivially_move_constructible<boost::container::dtl::pair<A,B> >
-{
- static const bool value = boost::move_detail::is_trivially_move_constructible<A>::value &&
- boost::move_detail::is_trivially_move_constructible<B>::value ;
-};
-
-template<class T>
-struct is_trivially_destructible;
-
-template<class A, class B>
-struct is_trivially_destructible<boost::container::dtl::pair<A,B> >
-{
- static const bool value = boost::move_detail::is_trivially_destructible<A>::value &&
- boost::move_detail::is_trivially_destructible<B>::value ;
-};
-
-
-} //namespace move_detail{
-
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_PAIR_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
deleted file mode 100644
index 498fc739687..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/tree.hpp
+++ /dev/null
@@ -1,1496 +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
-{
- 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/version_type.hpp b/src/third_party/boost-1.69.0/boost/container/detail/version_type.hpp
deleted file mode 100644
index c2531ccc311..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/version_type.hpp
+++ /dev/null
@@ -1,110 +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.
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// This code comes from N1953 document by Howard E. Hinnant
-//
-//////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP
-#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_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/mpl.hpp>
-#include <boost/container/detail/type_traits.hpp>
-
-namespace boost{
-namespace container {
-namespace dtl {
-
-template <class T, unsigned V>
-struct version_type
- : public dtl::integral_constant<unsigned, V>
-{
- typedef T type;
-
- version_type(const version_type<T, 0>&);
-};
-
-namespace impl{
-
-template <class T,
- bool = dtl::is_convertible<version_type<T, 0>, typename T::version>::value>
-struct extract_version
-{
- static const unsigned value = 1;
-};
-
-template <class T>
-struct extract_version<T, true>
-{
- static const unsigned value = T::version::value;
-};
-
-template <class T>
-struct has_version
-{
- private:
- struct two {char _[2];};
- template <class U> static two test(...);
- template <class U> static char test(const typename U::version*);
- public:
- static const bool value = sizeof(test<T>(0)) == 1;
- void dummy(){}
-};
-
-template <class T, bool = has_version<T>::value>
-struct version
-{
- static const unsigned value = 1;
-};
-
-template <class T>
-struct version<T, true>
-{
- static const unsigned value = extract_version<T>::value;
-};
-
-} //namespace impl
-
-template <class T>
-struct version
- : public dtl::integral_constant<unsigned, impl::version<T>::value>
-{};
-
-template<class T, unsigned N>
-struct is_version
-{
- static const bool value =
- is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
-};
-
-} //namespace dtl {
-
-typedef dtl::integral_constant<unsigned, 0> version_0;
-typedef dtl::integral_constant<unsigned, 1> version_1;
-typedef dtl::integral_constant<unsigned, 2> version_2;
-
-} //namespace container {
-} //namespace boost{
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#define 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
deleted file mode 100644
index 4e49c0a04c0..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/detail/workaround.hpp
+++ /dev/null
@@ -1,129 +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
-
-#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
deleted file mode 100644
index 736af1c0bf2..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/flat_map.hpp
+++ /dev/null
@@ -1,2976 +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))
- {}
-
- //! <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/list.hpp b/src/third_party/boost-1.69.0/boost/container/list.hpp
deleted file mode 100644
index 4be33fc111a..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/list.hpp
+++ /dev/null
@@ -1,1533 +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
-{
- 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
deleted file mode 100644
index 8592c2cb831..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/map.hpp
+++ /dev/null
@@ -1,2314 +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)
- {}
-
- //! <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.69.0/boost/container/pmr/global_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/global_resource.hpp
deleted file mode 100644
index 219309b072d..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/pmr/global_resource.hpp
+++ /dev/null
@@ -1,66 +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_GLOBAL_RESOURCE_HPP
-#define BOOST_CONTAINER_PMR_GLOBAL_RESOURCE_HPP
-
-#if defined (_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/container/detail/auto_link.hpp>
-
-#include <cstddef>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-/// @cond
-class memory_resource;
-/// @endcond
-
-//! <b>Returns</b>: A pointer to a static-duration object of a type derived from
-//! memory_resource that can serve as a resource for allocating memory using
-//! global `operator new` and global `operator delete`. The same value is returned every time this function
-//! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p.
-BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT;
-
-//! <b>Returns</b>: A pointer to a static-duration object of a type derived from
-//! memory_resource for which allocate() always throws bad_alloc and for which
-//! deallocate() has no effect. The same value is returned every time this function
-//! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p.
-BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT;
-
-//! <b>Effects</b>: If r is non-null, sets the value of the default memory resource
-//! pointer to r, otherwise sets the default memory resource pointer to new_delete_resource().
-//!
-//! <b>Postconditions</b>: get_default_resource() == r.
-//!
-//! <b>Returns</b>: The previous value of the default memory resource pointer.
-//!
-//! <b>Remarks</b>: Calling the set_default_resource and get_default_resource functions shall
-//! not incur a data race. A call to the set_default_resource function shall synchronize
-//! with subsequent calls to the set_default_resource and get_default_resource functions.
-BOOST_CONTAINER_DECL memory_resource* set_default_resource(memory_resource* r) BOOST_NOEXCEPT;
-
-//! <b>Returns</b>: The current value of the default
-//! memory resource pointer.
-BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT;
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_PMR_GLOBAL_RESOURCE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp
deleted file mode 100644
index 72338a75590..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp
+++ /dev/null
@@ -1,101 +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_MEMORY_RESOURCE_HPP
-#define BOOST_CONTAINER_PMR_MEMORY_RESOURCE_HPP
-
-#if defined (_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/move/detail/type_traits.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-//! The memory_resource class is an abstract interface to an
-//! unbounded set of classes encapsulating memory resources.
-class memory_resource
-{
- public:
- // For exposition only
- static BOOST_CONSTEXPR_OR_CONST std::size_t max_align =
- boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
-
- //! <b>Effects</b>: Destroys
- //! this memory_resource.
- virtual ~memory_resource(){}
-
- //! <b>Effects</b>: Equivalent to
- //! `return do_allocate(bytes, alignment);`
- void* allocate(std::size_t bytes, std::size_t alignment = max_align)
- { return this->do_allocate(bytes, alignment); }
-
- //! <b>Effects</b>: Equivalent to
- //! `return do_deallocate(bytes, alignment);`
- void deallocate(void* p, std::size_t bytes, std::size_t alignment = max_align)
- { return this->do_deallocate(p, bytes, alignment); }
-
- //! <b>Effects</b>: Equivalent to
- //! `return return do_is_equal(other);`
- bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT
- { return this->do_is_equal(other); }
-
- //! <b>Returns</b>:
- //! `&a == &b || a.is_equal(b)`.
- friend bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
- { return &a == &b || a.is_equal(b); }
-
- //! <b>Returns</b>:
- //! !(a == b).
- friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
- { return !(a == b); }
-
- protected:
- //! <b>Requires</b>: Alignment shall be a power of two.
- //!
- //! <b>Returns</b>: A derived class shall implement this function to return a pointer
- //! to allocated storage with a size of at least bytes. The returned storage is
- //! aligned to the specified alignment, if such alignment is supported; otherwise
- //! it is aligned to max_align.
- //!
- //! <b>Throws</b>: A derived class implementation shall throw an appropriate exception if
- //! it is unable to allocate memory with the requested size and alignment.
- virtual void* do_allocate(std::size_t bytes, std::size_t alignment) = 0;
-
- //! <b>Requires</b>: p shall have been returned from a prior call to
- //! `allocate(bytes, alignment)` on a memory resource equal to *this, and the storage
- //! at p shall not yet have been deallocated.
- //!
- //! <b>Effects</b>: A derived class shall implement this function to dispose of allocated storage.
- //!
- //! <b>Throws</b>: Nothing.
- virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) = 0;
-
- //! <b>Returns</b>: A derived class shall implement this function to return true if memory
- //! allocated from this can be deallocated from other and vice-versa; otherwise it shall
- //! return false. <i>[Note: The most-derived type of other might not match the type of this.
- //! For a derived class, D, a typical implementation of this function will compute
- //! `dynamic_cast<const D*>(&other)` and go no further (i.e., return false)
- //! if it returns nullptr. - end note]</i>.
- virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT = 0;
-};
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_PMR_MEMORY_RESOURCE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp
deleted file mode 100644
index 5a176a3d848..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp
+++ /dev/null
@@ -1,182 +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_MONOTONIC_BUFFER_RESOURCE_HPP
-#define BOOST_CONTAINER_PMR_MONOTONIC_BUFFER_RESOURCE_HPP
-
-#if defined (_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/container/detail/auto_link.hpp>
-#include <boost/container/pmr/memory_resource.hpp>
-#include <boost/container/detail/block_slist.hpp>
-
-#include <cstddef>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-//! A monotonic_buffer_resource is a special-purpose memory resource intended for
-//! very fast memory allocations in situations where memory is used to build up a
-//! few objects and then is released all at once when the memory resource object
-//! is destroyed. It has the following qualities:
-//!
-//! - A call to deallocate has no effect, thus the amount of memory consumed
-//! increases monotonically until the resource is destroyed.
-//!
-//! - The program can supply an initial buffer, which the allocator uses to satisfy
-//! memory requests.
-//!
-//! - When the initial buffer (if any) is exhausted, it obtains additional buffers
-//! from an upstream memory resource supplied at construction. Each additional
-//! buffer is larger than the previous one, following a geometric progression.
-//!
-//! - It is intended for access from one thread of control at a time. Specifically,
-//! calls to allocate and deallocate do not synchronize with one another.
-//!
-//! - It owns the allocated memory and frees it on destruction, even if deallocate has
-//! not been called for some of the allocated blocks.
-class BOOST_CONTAINER_DECL monotonic_buffer_resource
- : public memory_resource
-{
- block_slist m_memory_blocks;
- void * m_current_buffer;
- std::size_t m_current_buffer_size;
- std::size_t m_next_buffer_size;
- void * const m_initial_buffer;
- std::size_t const m_initial_buffer_size;
-
- /// @cond
- void increase_next_buffer();
- void increase_next_buffer_at_least_to(std::size_t minimum_size);
- void *allocate_from_current(std::size_t aligner, std::size_t bytes);
- /// @endcond
-
- public:
-
- //! The number of bytes that will be requested by the default in the first call
- //! to the upstream allocator
- //!
- //! <b>Note</b>: Non-standard extension.
- static const std::size_t initial_next_buffer_size = 32u*sizeof(void*);
-
- //! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`
- //!
- //! <b>Effects</b>: If `upstream` is not nullptr, sets the internal resource to `upstream`,
- //! to get_default_resource() otherwise.
- //! Sets the internal `current_buffer` to `nullptr` and the internal `next_buffer_size` to an
- //! implementation-defined size.
- explicit monotonic_buffer_resource(memory_resource* upstream = 0) BOOST_NOEXCEPT;
-
- //! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`
- //! and `initial_size` shall be greater than zero.
- //!
- //! <b>Effects</b>: If `upstream` is not nullptr, sets the internal resource to `upstream`,
- //! to get_default_resource() otherwise. Sets the internal `current_buffer` to `nullptr` and
- //! `next_buffer_size` to at least `initial_size`.
- explicit monotonic_buffer_resource(std::size_t initial_size, memory_resource* upstream = 0) BOOST_NOEXCEPT;
-
- //! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`,
- //! `buffer_size` shall be no larger than the number of bytes in buffer.
- //!
- //! <b>Effects</b>: If `upstream` is not nullptr, sets the internal resource to `upstream`,
- //! to get_default_resource() otherwise. Sets the internal `current_buffer` to `buffer`,
- //! and `next_buffer_size` to `buffer_size` (but not less than an implementation-defined size),
- //! then increases `next_buffer_size` by an implementation-defined growth factor (which need not be integral).
- monotonic_buffer_resource(void* buffer, std::size_t buffer_size, memory_resource* upstream = 0) BOOST_NOEXCEPT;
-
- #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- monotonic_buffer_resource(const monotonic_buffer_resource&) = delete;
- monotonic_buffer_resource operator=(const monotonic_buffer_resource&) = delete;
- #else
- private:
- monotonic_buffer_resource (const monotonic_buffer_resource&);
- monotonic_buffer_resource operator=(const monotonic_buffer_resource&);
- public:
- #endif
-
- //! <b>Effects</b>: Calls
- //! `this->release()`.
- virtual ~monotonic_buffer_resource();
-
- //! <b>Effects</b>: `upstream_resource()->deallocate()` as necessary to release all allocated memory.
- //! [Note: memory is released back to `upstream_resource()` even if some blocks that were allocated
- //! from this have not been deallocated from this. - end note]
- void release() BOOST_NOEXCEPT;
-
- //! <b>Returns</b>: The value of
- //! the internal resource.
- memory_resource* upstream_resource() const BOOST_NOEXCEPT;
-
- //! <b>Returns</b>:
- //! The number of bytes of storage available for the specified alignment and
- //! the number of bytes wasted due to the requested alignment.
- //!
- //! <b>Note</b>: Non-standard extension.
- std::size_t remaining_storage(std::size_t alignment, std::size_t &wasted_due_to_alignment) const BOOST_NOEXCEPT;
-
- //! <b>Returns</b>:
- //! The number of bytes of storage available for the specified alignment.
- //!
- //! <b>Note</b>: Non-standard extension.
- std::size_t remaining_storage(std::size_t alignment = 1u) const BOOST_NOEXCEPT;
-
- //! <b>Returns</b>:
- //! The address pointing to the start of the current free storage.
- //!
- //! <b>Note</b>: Non-standard extension.
- const void *current_buffer() const BOOST_NOEXCEPT;
-
- //! <b>Returns</b>:
- //! The number of bytes that will be requested for the next buffer once the
- //! current one is exhausted.
- //!
- //! <b>Note</b>: Non-standard extension.
- std::size_t next_buffer_size() const BOOST_NOEXCEPT;
-
- protected:
-
- //! <b>Returns</b>: A pointer to allocated storage with a size of at least `bytes`. The size
- //! and alignment of the allocated memory shall meet the requirements for a class derived
- //! from `memory_resource`.
- //!
- //! <b>Effects</b>: If the unused space in the internal `current_buffer` can fit a block with the specified
- //! bytes and alignment, then allocate the return block from the internal `current_buffer`; otherwise sets
- //! the internal `current_buffer` to `upstream_resource()->allocate(n, m)`, where `n` is not less than
- //! `max(bytes, next_buffer_size)` and `m` is not less than alignment, and increase
- //! `next_buffer_size` by an implementation-defined growth factor (which need not be integral),
- //! then allocate the return block from the newly-allocated internal `current_buffer`.
- //!
- //! <b>Throws</b>: Nothing unless `upstream_resource()->allocate()` throws.
- virtual void* do_allocate(std::size_t bytes, std::size_t alignment);
-
- //! <b>Effects</b>: None
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Remarks</b>: Memory used by this resource increases monotonically until its destruction.
- virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) BOOST_NOEXCEPT;
-
- //! <b>Returns</b>:
- //! `this == dynamic_cast<const monotonic_buffer_resource*>(&other)`.
- virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT;
-};
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_PMR_MONOTONIC_BUFFER_RESOURCE_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
deleted file mode 100644
index 8f9f58d67c6..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/set.hpp
+++ /dev/null
@@ -1,1710 +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)
- {}
-
- //! <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
deleted file mode 100644
index 6310f580959..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/slist.hpp
+++ /dev/null
@@ -1,1750 +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
-{
- 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
deleted file mode 100644
index c0edac84dc4..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/small_vector.hpp
+++ /dev/null
@@ -1,668 +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(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
deleted file mode 100644
index 1f55c435adb..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/stable_vector.hpp
+++ /dev/null
@@ -1,2181 +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;
-
- 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/string.hpp b/src/third_party/boost-1.69.0/boost/container/string.hpp
deleted file mode 100644
index ca51cfdd73f..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/string.hpp
+++ /dev/null
@@ -1,3504 +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_()
- {}
-
- 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.69.0/boost/container/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/container/throw_exception.hpp
deleted file mode 100644
index 1b6eec11794..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/throw_exception.hpp
+++ /dev/null
@@ -1,181 +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_THROW_EXCEPTION_HPP
-#define BOOST_CONTAINER_THROW_EXCEPTION_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>
-
-#ifndef BOOST_NO_EXCEPTIONS
- #include <stdexcept> //for std exception types
- #include <string> //for implicit std::string conversion
- #include <new> //for std::bad_alloc
-#else
- #include <boost/assert.hpp>
- #include <cstdlib> //for std::abort
-#endif
-
-namespace boost {
-namespace container {
-
-#if defined(BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS)
- //The user must provide definitions for the following functions
-
- void throw_bad_alloc();
-
- void throw_out_of_range(const char* str);
-
- void throw_length_error(const char* str);
-
- void throw_logic_error(const char* str);
-
- void throw_runtime_error(const char* str);
-
-#elif defined(BOOST_NO_EXCEPTIONS)
-
- inline void throw_bad_alloc()
- {
- const char msg[] = "boost::container bad_alloc thrown";
- (void)msg;
- BOOST_ASSERT(!msg);
- std::abort();
- }
-
- inline void throw_out_of_range(const char* str)
- {
- const char msg[] = "boost::container out_of_range thrown";
- (void)msg; (void)str;
- BOOST_ASSERT_MSG(!msg, str);
- std::abort();
- }
-
- inline void throw_length_error(const char* str)
- {
- const char msg[] = "boost::container length_error thrown";
- (void)msg; (void)str;
- BOOST_ASSERT_MSG(!msg, str);
- std::abort();
- }
-
- inline void throw_logic_error(const char* str)
- {
- const char msg[] = "boost::container logic_error thrown";
- (void)msg; (void)str;
- BOOST_ASSERT_MSG(!msg, str);
- std::abort();
- }
-
- inline void throw_runtime_error(const char* str)
- {
- const char msg[] = "boost::container runtime_error thrown";
- (void)msg; (void)str;
- BOOST_ASSERT_MSG(!msg, str);
- std::abort();
- }
-
-#else //defined(BOOST_NO_EXCEPTIONS)
-
- //! Exception callback called by Boost.Container when fails to allocate the requested storage space.
- //! <ul>
- //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::bad_alloc()</code> is thrown.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
- //! is NOT defined <code>BOOST_ASSERT(!"boost::container bad_alloc thrown")</code> is called
- //! and <code>std::abort()</code> if the former returns.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
- //! the user must provide an implementation and the function should not return.</li>
- //! </ul>
- inline void throw_bad_alloc()
- {
- throw std::bad_alloc();
- }
-
- //! Exception callback called by Boost.Container to signal arguments out of range.
- //! <ul>
- //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::out_of_range(str)</code> is thrown.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
- //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str)</code> is called
- //! and <code>std::abort()</code> if the former returns.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
- //! the user must provide an implementation and the function should not return.</li>
- //! </ul>
- inline void throw_out_of_range(const char* str)
- {
- throw std::out_of_range(str);
- }
-
- //! Exception callback called by Boost.Container to signal errors resizing.
- //! <ul>
- //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::length_error(str)</code> is thrown.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
- //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container length_error thrown", str)</code> is called
- //! and <code>std::abort()</code> if the former returns.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
- //! the user must provide an implementation and the function should not return.</li>
- //! </ul>
- inline void throw_length_error(const char* str)
- {
- throw std::length_error(str);
- }
-
- //! Exception callback called by Boost.Container to report errors in the internal logical
- //! of the program, such as violation of logical preconditions or class invariants.
- //! <ul>
- //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::logic_error(str)</code> is thrown.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
- //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str)</code> is called
- //! and <code>std::abort()</code> if the former returns.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
- //! the user must provide an implementation and the function should not return.</li>
- //! </ul>
- inline void throw_logic_error(const char* str)
- {
- throw std::logic_error(str);
- }
-
- //! Exception callback called by Boost.Container to report errors that can only be detected during runtime.
- //! <ul>
- //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::runtime_error(str)</code> is thrown.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
- //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str)</code> is called
- //! and <code>std::abort()</code> if the former returns.</li>
- //!
- //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
- //! the user must provide an implementation and the function should not return.</li>
- //! </ul>
- inline void throw_runtime_error(const char* str)
- {
- throw std::runtime_error(str);
- }
-
-#endif
-
-}} //namespace boost { namespace container {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_THROW_EXCEPTION_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
deleted file mode 100644
index b3ff8ed821f..00000000000
--- a/src/third_party/boost-1.69.0/boost/container/vector.hpp
+++ /dev/null
@@ -1,3401 +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 || !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.69.0/boost/context/detail/config.hpp b/src/third_party/boost-1.69.0/boost/context/detail/config.hpp
deleted file mode 100644
index 15d03574b18..00000000000
--- a/src/third_party/boost-1.69.0/boost/context/detail/config.hpp
+++ /dev/null
@@ -1,118 +0,0 @@
-
-// Copyright Oliver Kowalke 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_CONTEXT_DETAIL_CONFIG_H
-#define BOOST_CONTEXT_DETAIL_CONFIG_H
-
-// required for SD-6 compile-time integer sequences
-#include <utility>
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#ifdef BOOST_CONTEXT_DECL
-# undef BOOST_CONTEXT_DECL
-#endif
-
-#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTEXT_DYN_LINK) ) && ! defined(BOOST_CONTEXT_STATIC_LINK)
-# if defined(BOOST_CONTEXT_SOURCE)
-# define BOOST_CONTEXT_DECL BOOST_SYMBOL_EXPORT
-# define BOOST_CONTEXT_BUILD_DLL
-# else
-# define BOOST_CONTEXT_DECL BOOST_SYMBOL_IMPORT
-# endif
-#endif
-
-#if ! defined(BOOST_CONTEXT_DECL)
-# define BOOST_CONTEXT_DECL
-#endif
-
-#if ! defined(BOOST_CONTEXT_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_CONTEXT_NO_LIB)
-# define BOOST_LIB_NAME boost_context
-# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTEXT_DYN_LINK)
-# define BOOST_DYN_LINK
-# endif
-# include <boost/config/auto_link.hpp>
-#endif
-
-#undef BOOST_CONTEXT_CALLDECL
-#if (defined(i386) || defined(__i386__) || defined(__i386) \
- || defined(__i486__) || defined(__i586__) || defined(__i686__) \
- || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \
- || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \
- || defined(_M_IX86) || defined(_I86_)) && defined(BOOST_WINDOWS)
-# define BOOST_CONTEXT_CALLDECL __cdecl
-#else
-# define BOOST_CONTEXT_CALLDECL
-#endif
-
-#if defined(BOOST_USE_SEGMENTED_STACKS)
-# if ! ( (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) ) ) || \
- (defined(__clang__) && (__clang_major__ > 2 || ( __clang_major__ == 2 && __clang_minor__ > 3) ) ) )
-# error "compiler does not support segmented_stack stacks"
-# endif
-# define BOOST_CONTEXT_SEGMENTS 10
-#endif
-
-
-#define BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
-// use rd6 macros for std::integer_sequence
-#if defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304
-# undef BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
-#endif
-// workaroud: MSVC 14 does not provide macros to test for compile-time integer sequence
-#if _MSC_VER > 1800 // _MSC_VER == 1800 -> MS Visual Studio 2013
-# undef BOOST_CONTEXT_NO_INDEX_SEQUENCE
-#endif
-// workaround: Xcode clang feature detection
-#if ! defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304
-# if _LIBCPP_STD_VER > 11
-# undef BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
-# endif
-#endif
-
-// workaroud: MSVC 14 does support constexpr
-#if _MSC_VER > 1800 // _MSC_VER == 1800 -> MS Visual Studio 2013
-# undef BOOST_NO_CXX11_CONSTEXPR
-#endif
-
-#undef BOOST_CONTEXT_NO_CXX11
-#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \
- defined(BOOST_NO_CXX11_CONSTEXPR) || \
- defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
- defined(BOOST_NO_CXX11_FINAL) || \
- defined(BOOST_NO_CXX11_HDR_TUPLE) || \
- defined(BOOST_NO_CXX11_NOEXCEPT) || \
- defined(BOOST_NO_CXX11_NULLPTR) || \
- defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
- defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \
- defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \
- defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
- defined(BOOST_NO_HDR_ATOMIC) || \
- defined(BOOST_NO_HDR_TUPLE)
-# define BOOST_CONTEXT_NO_CXX11
-#endif
-
-#if ! defined(BOOST_EXECUTION_CONTEXT)
-# if defined(BOOST_USE_SEGMENTED_STACKS)
-# define BOOST_EXECUTION_CONTEXT 1
-# else
-# define BOOST_EXECUTION_CONTEXT 2
-# endif
-#endif
-
-#if ! defined(BOOST_NO_CXX11_CONSTEXPR)
-// modern architectures have cachelines with 64byte length
-// ARM Cortex-A15 32/64byte, Cortex-A9 16/32/64bytes
-// MIPS 74K: 32byte, 4KEc: 16byte
-// ist should be safe to use 64byte for all
-static constexpr std::size_t cache_alignment{ 64 };
-static constexpr std::size_t cacheline_length{ 64 };
-// lookahead size for prefetching
-static constexpr std::size_t prefetch_stride{ 4 * cacheline_length };
-#endif
-
-#endif // BOOST_CONTEXT_DETAIL_CONFIG_H
diff --git a/src/third_party/boost-1.69.0/boost/core/checked_delete.hpp b/src/third_party/boost-1.69.0/boost/core/checked_delete.hpp
deleted file mode 100644
index b086e03e88a..00000000000
--- a/src/third_party/boost-1.69.0/boost/core/checked_delete.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef BOOST_CORE_CHECKED_DELETE_HPP
-#define BOOST_CORE_CHECKED_DELETE_HPP
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/checked_delete.hpp
-//
-// Copyright (c) 2002, 2003 Peter Dimov
-// Copyright (c) 2003 Daniel Frey
-// Copyright (c) 2003 Howard Hinnant
-//
-// Distributed under the Boost Software License, Version 1.0. (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/checked_delete.html for documentation.
-//
-
-namespace boost
-{
-
-// verify that types are complete for increased safety
-
-template<class T> inline void checked_delete(T * x)
-{
- // intentionally complex - simplification causes regressions
- typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
- (void) sizeof(type_must_be_complete);
- delete x;
-}
-
-template<class T> inline void checked_array_delete(T * x)
-{
- typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
- (void) sizeof(type_must_be_complete);
- delete [] x;
-}
-
-template<class T> struct checked_deleter
-{
- typedef void result_type;
- typedef T * argument_type;
-
- void operator()(T * x) const
- {
- // boost:: disables ADL
- boost::checked_delete(x);
- }
-};
-
-template<class T> struct checked_array_deleter
-{
- typedef void result_type;
- typedef T * argument_type;
-
- void operator()(T * x) const
- {
- boost::checked_array_delete(x);
- }
-};
-
-} // namespace boost
-
-#endif // #ifndef BOOST_CORE_CHECKED_DELETE_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
deleted file mode 100644
index 13aa3f0335e..00000000000
--- a/src/third_party/boost-1.69.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 )
- {
- 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.69.0/boost/coroutine/asymmetric_coroutine.hpp b/src/third_party/boost-1.69.0/boost/coroutine/asymmetric_coroutine.hpp
deleted file mode 100644
index 7a0ddf277f8..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/asymmetric_coroutine.hpp
+++ /dev/null
@@ -1,2416 +0,0 @@
-
-// Copyright Oliver Kowalke 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)
-
-#ifndef BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
-#define BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
-
-#ifndef BOOST_COROUTINES_NO_DEPRECATION_WARNING
-# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-# pragma message ("Warning: Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING.")
-# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING."
-# endif
-#endif
-
-#include <cstddef>
-#include <iterator>
-#include <memory>
-
-#include <boost/assert.hpp>
-#include <boost/config.hpp>
-#include <boost/move/move.hpp>
-#include <boost/range.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/utility/explicit_operator_bool.hpp>
-
-#include <boost/coroutine/attributes.hpp>
-#include <boost/coroutine/detail/config.hpp>
-#include <boost/coroutine/detail/coroutine_context.hpp>
-#include <boost/coroutine/detail/parameters.hpp>
-#include <boost/coroutine/exceptions.hpp>
-#include <boost/coroutine/stack_allocator.hpp>
-#include <boost/coroutine/detail/pull_coroutine_impl.hpp>
-#include <boost/coroutine/detail/pull_coroutine_object.hpp>
-#include <boost/coroutine/detail/pull_coroutine_synthesized.hpp>
-#include <boost/coroutine/detail/push_coroutine_impl.hpp>
-#include <boost/coroutine/detail/push_coroutine_object.hpp>
-#include <boost/coroutine/detail/push_coroutine_synthesized.hpp>
-#include <boost/coroutine/stack_context.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost {
-namespace coroutines {
-
-template< typename R >
-class pull_coroutine;
-
-template< typename Arg >
-class push_coroutine
-{
-private:
- template< typename V, typename X, typename Y, typename Z >
- friend class detail::pull_coroutine_object;
-
- typedef detail::push_coroutine_impl< Arg > impl_type;
- typedef detail::push_coroutine_synthesized< Arg > synth_type;
- typedef detail::parameters< Arg > param_type;
-
- struct dummy {};
-
- impl_type * impl_;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE( push_coroutine)
-
- explicit push_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
- impl_( & impl)
- { BOOST_ASSERT( impl_); }
-
-public:
- push_coroutine() BOOST_NOEXCEPT :
- impl_( 0)
- {}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
- typedef void ( * coroutine_fn)( pull_coroutine< Arg > &);
-
- explicit push_coroutine( coroutine_fn,
- attributes const& = attributes() );
-
- template< typename StackAllocator >
- explicit push_coroutine( coroutine_fn,
- attributes const&,
- StackAllocator);
-# endif
- template< typename Fn >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const&,
- StackAllocator);
-#else
- template< typename Fn >
- explicit push_coroutine( Fn fn,
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( Fn fn,
- attributes const&,
- StackAllocator);
-
- template< typename Fn >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const&,
- StackAllocator);
-#endif
-
- ~push_coroutine()
- {
- if ( 0 != impl_)
- {
- impl_->destroy();
- impl_ = 0;
- }
- }
-
- push_coroutine( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT :
- impl_( 0)
- { swap( other); }
-
- push_coroutine & operator=( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT
- {
- push_coroutine tmp( boost::move( other) );
- swap( tmp);
- return * this;
- }
-
- BOOST_EXPLICIT_OPERATOR_BOOL();
-
- bool operator!() const BOOST_NOEXCEPT
- { return 0 == impl_ || impl_->is_complete(); }
-
- void swap( push_coroutine & other) BOOST_NOEXCEPT
- { std::swap( impl_, other.impl_); }
-
- push_coroutine & operator()( Arg arg)
- {
- BOOST_ASSERT( * this);
-
- impl_->push( arg);
- return * this;
- }
-
- class iterator
- {
- private:
- push_coroutine< Arg > * c_;
-
- public:
- typedef std::output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- iterator() :
- c_( 0)
- {}
-
- explicit iterator( push_coroutine< Arg > * c) :
- c_( c)
- {}
-
- iterator & operator=( Arg a)
- {
- BOOST_ASSERT( c_);
- if ( ! ( * c_)( a) ) c_ = 0;
- return * this;
- }
-
- bool operator==( iterator const& other) const
- { return other.c_ == c_; }
-
- bool operator!=( iterator const& other) const
- { return other.c_ != c_; }
-
- iterator & operator*()
- { return * this; }
-
- iterator & operator++()
- { return * this; }
- };
-
- struct const_iterator;
-};
-
-template< typename Arg >
-class push_coroutine< Arg & >
-{
-private:
- template< typename V, typename X, typename Y, typename Z >
- friend class detail::pull_coroutine_object;
-
- typedef detail::push_coroutine_impl< Arg & > impl_type;
- typedef detail::push_coroutine_synthesized< Arg & > synth_type;
- typedef detail::parameters< Arg & > param_type;
-
- struct dummy {};
-
- impl_type * impl_;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE( push_coroutine)
-
- explicit push_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
- impl_( & impl)
- { BOOST_ASSERT( impl_); }
-
-public:
- push_coroutine() BOOST_NOEXCEPT :
- impl_( 0)
- {}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
- typedef void ( * coroutine_fn)( pull_coroutine< Arg & > &);
-
- explicit push_coroutine( coroutine_fn,
- attributes const& = attributes() );
-
- template< typename StackAllocator >
- explicit push_coroutine( coroutine_fn,
- attributes const&,
- StackAllocator);
-# endif
- template< typename Fn >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const&,
- StackAllocator);
-#else
- template< typename Fn >
- explicit push_coroutine( Fn,
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( Fn,
- attributes const&,
- StackAllocator);
-
- template< typename Fn >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const&,
- StackAllocator);
-#endif
-
- ~push_coroutine()
- {
- if ( 0 != impl_)
- {
- impl_->destroy();
- impl_ = 0;
- }
- }
-
- push_coroutine( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT :
- impl_( 0)
- { swap( other); }
-
- push_coroutine & operator=( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT
- {
- push_coroutine tmp( boost::move( other) );
- swap( tmp);
- return * this;
- }
-
- BOOST_EXPLICIT_OPERATOR_BOOL();
-
- bool operator!() const BOOST_NOEXCEPT
- { return 0 == impl_ || impl_->is_complete(); }
-
- void swap( push_coroutine & other) BOOST_NOEXCEPT
- { std::swap( impl_, other.impl_); }
-
- push_coroutine & operator()( Arg & arg)
- {
- BOOST_ASSERT( * this);
-
- impl_->push( arg);
- return * this;
- }
-
- class iterator
- {
- private:
- push_coroutine< Arg & > * c_;
-
- public:
- typedef std::output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- iterator() :
- c_( 0)
- {}
-
- explicit iterator( push_coroutine< Arg & > * c) :
- c_( c)
- {}
-
- iterator & operator=( Arg & a)
- {
- BOOST_ASSERT( c_);
- if ( ! ( * c_)( a) ) c_ = 0;
- return * this;
- }
-
- bool operator==( iterator const& other) const
- { return other.c_ == c_; }
-
- bool operator!=( iterator const& other) const
- { return other.c_ != c_; }
-
- iterator & operator*()
- { return * this; }
-
- iterator & operator++()
- { return * this; }
- };
-
- struct const_iterator;
-};
-
-template<>
-class push_coroutine< void >
-{
-private:
- template< typename V, typename X, typename Y, typename Z >
- friend class detail::pull_coroutine_object;
-
- typedef detail::push_coroutine_impl< void > impl_type;
- typedef detail::push_coroutine_synthesized< void > synth_type;
- typedef detail::parameters< void > param_type;
-
- struct dummy {};
-
- impl_type * impl_;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE( push_coroutine)
-
- explicit push_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
- impl_( & impl)
- { BOOST_ASSERT( impl_); }
-
-public:
- push_coroutine() BOOST_NOEXCEPT :
- impl_( 0)
- {}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
- typedef void ( * coroutine_fn)( pull_coroutine< void > &);
-
- explicit push_coroutine( coroutine_fn,
- attributes const& = attributes() );
-
- template< typename StackAllocator >
- explicit push_coroutine( coroutine_fn,
- attributes const&,
- StackAllocator);
-# endif
- template< typename Fn >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const&,
- StackAllocator);
-#else
- template< typename Fn >
- explicit push_coroutine( Fn,
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( Fn,
- attributes const&,
- StackAllocator);
-
- template< typename Fn >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const& = attributes() );
-
- template< typename Fn, typename StackAllocator >
- explicit push_coroutine( BOOST_RV_REF( Fn),
- attributes const&,
- StackAllocator);
-#endif
-
- ~push_coroutine()
- {
- if ( 0 != impl_)
- {
- impl_->destroy();
- impl_ = 0;
- }
- }
-
- inline push_coroutine( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT :
- impl_( 0)
- { swap( other); }
-
- inline push_coroutine & operator=( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT
- {
- push_coroutine tmp( boost::move( other) );
- swap( tmp);
- return * this;
- }
-
- BOOST_EXPLICIT_OPERATOR_BOOL();
-
- inline bool operator!() const BOOST_NOEXCEPT
- { return 0 == impl_ || impl_->is_complete(); }
-
- inline void swap( push_coroutine & other) BOOST_NOEXCEPT
- { std::swap( impl_, other.impl_); }
-
- inline push_coroutine & operator()()
- {
- BOOST_ASSERT( * this);
-
- impl_->push();
- return * this;
- }
-
- struct iterator;
- struct const_iterator;
-};
-
-
-
-template< typename R >
-class pull_coroutine
-{
-private:
- template< typename V, typename X, typename Y, typename Z >
- friend class detail::push_coroutine_object;
-
- typedef detail::pull_coroutine_impl< R > impl_type;
- typedef detail::pull_coroutine_synthesized< R > synth_type;
- typedef detail::parameters< R > param_type;
-
- struct dummy {};
-
- impl_type * impl_;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE( pull_coroutine)
-
- explicit pull_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
- impl_( & impl)
- { BOOST_ASSERT( impl_); }
-
-public:
- pull_coroutine() BOOST_NOEXCEPT :
- impl_( 0)
- {}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
- typedef void ( * coroutine_fn)( push_coroutine< R > &);
-
- explicit pull_coroutine( coroutine_fn fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, coroutine_fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename StackAllocator >
- explicit pull_coroutine( coroutine_fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, coroutine_fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-# endif
- template< typename Fn >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-#else
- template< typename Fn >
- explicit pull_coroutine( Fn fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( Fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R >, R, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-#endif
-
- ~pull_coroutine()
- {
- if ( 0 != impl_)
- {
- impl_->destroy();
- impl_ = 0;
- }
- }
-
- pull_coroutine( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT :
- impl_( 0)
- { swap( other); }
-
- pull_coroutine & operator=( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT
- {
- pull_coroutine tmp( boost::move( other) );
- swap( tmp);
- return * this;
- }
-
- BOOST_EXPLICIT_OPERATOR_BOOL();
-
- bool operator!() const BOOST_NOEXCEPT
- { return 0 == impl_ || impl_->is_complete(); }
-
- void swap( pull_coroutine & other) BOOST_NOEXCEPT
- { std::swap( impl_, other.impl_); }
-
- pull_coroutine & operator()()
- {
- BOOST_ASSERT( * this);
-
- impl_->pull();
- return * this;
- }
-
- R get() const
- {
- BOOST_ASSERT( 0 != impl_);
-
- return impl_->get();
- }
-
- class iterator
- {
- private:
- pull_coroutine< R > * c_;
- R * val_;
-
- void fetch_()
- {
- BOOST_ASSERT( c_);
-
- if ( ! ( * c_) )
- {
- c_ = 0;
- val_ = 0;
- return;
- }
- val_ = c_->impl_->get_pointer();
- }
-
- void increment_()
- {
- BOOST_ASSERT( c_);
- BOOST_ASSERT( * c_);
-
- ( * c_)();
- fetch_();
- }
-
- public:
- typedef std::input_iterator_tag iterator_category;
- typedef typename remove_reference< R >::type value_type;
- typedef std::ptrdiff_t difference_type;
- typedef value_type * pointer;
- typedef value_type & reference;
-
- typedef pointer pointer_t;
- typedef reference reference_t;
-
- iterator() :
- c_( 0), val_( 0)
- {}
-
- explicit iterator( pull_coroutine< R > * c) :
- c_( c), val_( 0)
- { fetch_(); }
-
- iterator( iterator const& other) :
- c_( other.c_), val_( other.val_)
- {}
-
- iterator & operator=( iterator const& other)
- {
- if ( this == & other) return * this;
- c_ = other.c_;
- val_ = other.val_;
- return * this;
- }
-
- bool operator==( iterator const& other) const
- { return other.c_ == c_ && other.val_ == val_; }
-
- bool operator!=( iterator const& other) const
- { return other.c_ != c_ || other.val_ != val_; }
-
- iterator & operator++()
- {
- increment_();
- return * this;
- }
-
- iterator operator++( int);
-
- reference_t operator*() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return * val_;
- }
-
- pointer_t operator->() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return val_;
- }
- };
-
- class const_iterator
- {
- private:
- pull_coroutine< R > * c_;
- R * val_;
-
- void fetch_()
- {
- BOOST_ASSERT( c_);
-
- if ( ! ( * c_) )
- {
- c_ = 0;
- val_ = 0;
- return;
- }
- val_ = c_->impl_->get_pointer();
- }
-
- void increment_()
- {
- BOOST_ASSERT( c_);
- BOOST_ASSERT( * c_);
-
- ( * c_)();
- fetch_();
- }
-
- public:
- typedef std::input_iterator_tag iterator_category;
- typedef const typename remove_reference< R >::type value_type;
- typedef std::ptrdiff_t difference_type;
- typedef value_type * pointer;
- typedef value_type & reference;
-
- typedef pointer pointer_t;
- typedef reference reference_t;
-
- const_iterator() :
- c_( 0), val_( 0)
- {}
-
- explicit const_iterator( pull_coroutine< R > const* c) :
- c_( const_cast< pull_coroutine< R > * >( c) ),
- val_( 0)
- { fetch_(); }
-
- const_iterator( const_iterator const& other) :
- c_( other.c_), val_( other.val_)
- {}
-
- const_iterator & operator=( const_iterator const& other)
- {
- if ( this == & other) return * this;
- c_ = other.c_;
- val_ = other.val_;
- return * this;
- }
-
- bool operator==( const_iterator const& other) const
- { return other.c_ == c_ && other.val_ == val_; }
-
- bool operator!=( const_iterator const& other) const
- { return other.c_ != c_ || other.val_ != val_; }
-
- const_iterator & operator++()
- {
- increment_();
- return * this;
- }
-
- const_iterator operator++( int);
-
- reference_t operator*() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return * val_;
- }
-
- pointer_t operator->() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return val_;
- }
- };
-
- friend class iterator;
- friend class const_iterator;
-};
-
-template< typename R >
-class pull_coroutine< R & >
-{
-private:
- template< typename V, typename X, typename Y, typename Z >
- friend class detail::push_coroutine_object;
-
- typedef detail::pull_coroutine_impl< R & > impl_type;
- typedef detail::pull_coroutine_synthesized< R & > synth_type;
- typedef detail::parameters< R & > param_type;
-
- struct dummy {};
-
- impl_type * impl_;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE( pull_coroutine)
-
- explicit pull_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
- impl_( & impl)
- { BOOST_ASSERT( impl_); }
-
-public:
- pull_coroutine() BOOST_NOEXCEPT :
- impl_( 0)
- {}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
- typedef void ( * coroutine_fn)( push_coroutine< R & > &);
-
- explicit pull_coroutine( coroutine_fn fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, coroutine_fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename StackAllocator >
- explicit pull_coroutine( coroutine_fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, coroutine_fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-# endif
- template< typename Fn >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-#else
- template< typename Fn >
- explicit pull_coroutine( Fn fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( Fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< R & >, R &, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-#endif
-
- ~pull_coroutine()
- {
- if ( 0 != impl_)
- {
- impl_->destroy();
- impl_ = 0;
- }
- }
-
- pull_coroutine( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT :
- impl_( 0)
- { swap( other); }
-
- pull_coroutine & operator=( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT
- {
- pull_coroutine tmp( boost::move( other) );
- swap( tmp);
- return * this;
- }
-
- BOOST_EXPLICIT_OPERATOR_BOOL();
-
- bool operator!() const BOOST_NOEXCEPT
- { return 0 == impl_ || impl_->is_complete(); }
-
- void swap( pull_coroutine & other) BOOST_NOEXCEPT
- { std::swap( impl_, other.impl_); }
-
- pull_coroutine & operator()()
- {
- BOOST_ASSERT( * this);
-
- impl_->pull();
- return * this;
- }
-
- R & get() const
- { return impl_->get(); }
-
- class iterator
- {
- private:
- pull_coroutine< R & > * c_;
- R * val_;
-
- void fetch_()
- {
- BOOST_ASSERT( c_);
-
- if ( ! ( * c_) )
- {
- c_ = 0;
- val_ = 0;
- return;
- }
- val_ = c_->impl_->get_pointer();
- }
-
- void increment_()
- {
- BOOST_ASSERT( c_);
- BOOST_ASSERT( * c_);
-
- ( * c_)();
- fetch_();
- }
-
- public:
- typedef std::input_iterator_tag iterator_category;
- typedef typename remove_reference< R >::type value_type;
- typedef std::ptrdiff_t difference_type;
- typedef value_type * pointer;
- typedef value_type & reference;
-
- typedef pointer pointer_t;
- typedef reference reference_t;
-
- iterator() :
- c_( 0), val_( 0)
- {}
-
- explicit iterator( pull_coroutine< R & > * c) :
- c_( c), val_( 0)
- { fetch_(); }
-
- iterator( iterator const& other) :
- c_( other.c_), val_( other.val_)
- {}
-
- iterator & operator=( iterator const& other)
- {
- if ( this == & other) return * this;
- c_ = other.c_;
- val_ = other.val_;
- return * this;
- }
-
- bool operator==( iterator const& other) const
- { return other.c_ == c_ && other.val_ == val_; }
-
- bool operator!=( iterator const& other) const
- { return other.c_ != c_ || other.val_ != val_; }
-
- iterator & operator++()
- {
- increment_();
- return * this;
- }
-
- iterator operator++( int);
-
- reference_t operator*() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return * val_;
- }
-
- pointer_t operator->() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return val_;
- }
- };
-
- class const_iterator
- {
- private:
- pull_coroutine< R & > * c_;
- R * val_;
-
- void fetch_()
- {
- BOOST_ASSERT( c_);
-
- if ( ! ( * c_) )
- {
- c_ = 0;
- val_ = 0;
- return;
- }
- val_ = c_->impl_->get_pointer();
- }
-
- void increment_()
- {
- BOOST_ASSERT( c_);
- BOOST_ASSERT( * c_);
-
- ( * c_)();
- fetch_();
- }
-
- public:
- typedef std::input_iterator_tag iterator_category;
- typedef const typename remove_reference< R >::type value_type;
- typedef std::ptrdiff_t difference_type;
- typedef value_type * pointer;
- typedef value_type & reference;
-
- typedef pointer pointer_t;
- typedef reference reference_t;
-
- const_iterator() :
- c_( 0), val_( 0)
- {}
-
- explicit const_iterator( pull_coroutine< R & > const* c) :
- c_( const_cast< pull_coroutine< R & > * >( c) ),
- val_( 0)
- { fetch_(); }
-
- const_iterator( const_iterator const& other) :
- c_( other.c_), val_( other.val_)
- {}
-
- const_iterator & operator=( const_iterator const& other)
- {
- if ( this == & other) return * this;
- c_ = other.c_;
- val_ = other.val_;
- return * this;
- }
-
- bool operator==( const_iterator const& other) const
- { return other.c_ == c_ && other.val_ == val_; }
-
- bool operator!=( const_iterator const& other) const
- { return other.c_ != c_ || other.val_ != val_; }
-
- const_iterator & operator++()
- {
- increment_();
- return * this;
- }
-
- const_iterator operator++( int);
-
- reference_t operator*() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return * val_;
- }
-
- pointer_t operator->() const
- {
- if ( ! val_)
- boost::throw_exception(
- invalid_result() );
- return val_;
- }
- };
-
- friend class iterator;
- friend class const_iterator;
-};
-
-template<>
-class pull_coroutine< void >
-{
-private:
- template< typename V, typename X, typename Y, typename Z >
- friend class detail::push_coroutine_object;
-
- typedef detail::pull_coroutine_impl< void > impl_type;
- typedef detail::pull_coroutine_synthesized< void > synth_type;
- typedef detail::parameters< void > param_type;
-
- struct dummy {};
-
- impl_type * impl_;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE( pull_coroutine)
-
- explicit pull_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
- impl_( & impl)
- { BOOST_ASSERT( impl_); }
-
-public:
- pull_coroutine() BOOST_NOEXCEPT :
- impl_( 0)
- {}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
- typedef void ( * coroutine_fn)( push_coroutine< void > &);
-
- explicit pull_coroutine( coroutine_fn fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, coroutine_fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename StackAllocator >
- explicit pull_coroutine( coroutine_fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, coroutine_fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-# endif
- template< typename Fn >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-#else
- template< typename Fn >
- explicit pull_coroutine( Fn fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( Fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs = attributes() ) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-
- template< typename Fn, typename StackAllocator >
- explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
- {
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::pull_coroutine_object<
- push_coroutine< void >, void, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
- impl_->pull();
- }
-#endif
-
- ~pull_coroutine()
- {
- if ( 0 != impl_)
- {
- impl_->destroy();
- impl_ = 0;
- }
- }
-
- inline pull_coroutine( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT :
- impl_( 0)
- { swap( other); }
-
- inline pull_coroutine & operator=( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT
- {
- pull_coroutine tmp( boost::move( other) );
- swap( tmp);
- return * this;
- }
-
- BOOST_EXPLICIT_OPERATOR_BOOL();
-
- inline bool operator!() const BOOST_NOEXCEPT
- { return 0 == impl_ || impl_->is_complete(); }
-
- inline void swap( pull_coroutine & other) BOOST_NOEXCEPT
- { std::swap( impl_, other.impl_); }
-
- inline pull_coroutine & operator()()
- {
- BOOST_ASSERT( * this);
-
- impl_->pull();
- return * this;
- }
-
- struct iterator;
- struct const_iterator;
-};
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# ifdef BOOST_MSVC
-template< typename Arg >
-push_coroutine< Arg >::push_coroutine( coroutine_fn fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, coroutine_fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename StackAllocator >
-push_coroutine< Arg >::push_coroutine( coroutine_fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, coroutine_fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-push_coroutine< Arg & >::push_coroutine( coroutine_fn fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, coroutine_fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename StackAllocator >
-push_coroutine< Arg & >::push_coroutine( coroutine_fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, coroutine_fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-inline push_coroutine< void >::push_coroutine( coroutine_fn fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, coroutine_fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename StackAllocator >
-push_coroutine< void >::push_coroutine( coroutine_fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, coroutine_fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-# endif
-template< typename Arg >
-template< typename Fn >
-push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn, typename StackAllocator >
-push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn >
-push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn, typename StackAllocator >
-push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Fn >
-push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Fn, typename StackAllocator >
-push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-#else
-template< typename Arg >
-template< typename Fn >
-push_coroutine< Arg >::push_coroutine( Fn fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn, typename StackAllocator >
-push_coroutine< Arg >::push_coroutine( Fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn >
-push_coroutine< Arg & >::push_coroutine( Fn fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn, typename StackAllocator >
-push_coroutine< Arg & >::push_coroutine( Fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Fn >
-push_coroutine< void >::push_coroutine( Fn fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Fn, typename StackAllocator >
-push_coroutine< void >::push_coroutine( Fn fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn >
-push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn, typename StackAllocator >
-push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg >, Arg, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn >
-push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Arg >
-template< typename Fn, typename StackAllocator >
-push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< Arg & >, Arg &, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Fn >
-push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- stack_allocator stack_alloc;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, Fn, stack_allocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-
-template< typename Fn, typename StackAllocator >
-push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
- attributes const& attrs,
- StackAllocator stack_alloc) :
- impl_( 0)
-{
- // create a stack-context
- stack_context stack_ctx;
- // allocate the coroutine-stack
- stack_alloc.allocate( stack_ctx, attrs.size);
- BOOST_ASSERT( 0 != stack_ctx.sp);
- // typedef of internal coroutine-type
- typedef detail::push_coroutine_object<
- pull_coroutine< void >, void, Fn, StackAllocator
- > object_t;
- // reserve space on top of coroutine-stack for internal coroutine-type
- std::size_t size = stack_ctx.size - sizeof( object_t);
- BOOST_ASSERT( 0 != size);
- void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
- BOOST_ASSERT( 0 != sp);
- // placement new for internal coroutine
- impl_ = new ( sp) object_t(
- fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
- BOOST_ASSERT( impl_);
-}
-#endif
-
-template< typename R >
-void swap( pull_coroutine< R > & l, pull_coroutine< R > & r) BOOST_NOEXCEPT
-{ l.swap( r); }
-
-template< typename Arg >
-void swap( push_coroutine< Arg > & l, push_coroutine< Arg > & r) BOOST_NOEXCEPT
-{ l.swap( r); }
-
-template< typename R >
-typename pull_coroutine< R >::iterator
-range_begin( pull_coroutine< R > & c)
-{ return typename pull_coroutine< R >::iterator( & c); }
-
-template< typename R >
-typename pull_coroutine< R >::const_iterator
-range_begin( pull_coroutine< R > const& c)
-{ return typename pull_coroutine< R >::const_iterator( & c); }
-
-template< typename R >
-typename pull_coroutine< R >::iterator
-range_end( pull_coroutine< R > &)
-{ return typename pull_coroutine< R >::iterator(); }
-
-template< typename R >
-typename pull_coroutine< R >::const_iterator
-range_end( pull_coroutine< R > const&)
-{ return typename pull_coroutine< R >::const_iterator(); }
-
-template< typename Arg >
-typename push_coroutine< Arg >::iterator
-range_begin( push_coroutine< Arg > & c)
-{ return typename push_coroutine< Arg >::iterator( & c); }
-
-template< typename Arg >
-typename push_coroutine< Arg >::iterator
-range_end( push_coroutine< Arg > &)
-{ return typename push_coroutine< Arg >::iterator(); }
-
-template< typename T >
-struct asymmetric_coroutine
-{
- typedef push_coroutine< T > push_type;
- typedef pull_coroutine< T > pull_type;
-};
-
-// deprecated
-template< typename T >
-struct coroutine
-{
- typedef push_coroutine< T > push_type;
- typedef pull_coroutine< T > pull_type;
-};
-
-template< typename R >
-typename pull_coroutine< R >::iterator
-begin( pull_coroutine< R > & c)
-{ return boost::begin( c); }
-
-template< typename R >
-typename pull_coroutine< R >::const_iterator
-begin( pull_coroutine< R > const& c)
-{ return boost::begin( c); }
-
-template< typename R >
-typename pull_coroutine< R >::iterator
-end( pull_coroutine< R > & c)
-{ return boost::end( c); }
-
-template< typename R >
-typename pull_coroutine< R >::const_iterator
-end( pull_coroutine< R > const& c)
-{ return boost::end( c); }
-
-template< typename R >
-typename push_coroutine< R >::iterator
-begin( push_coroutine< R > & c)
-{ return boost::begin( c); }
-
-template< typename R >
-typename push_coroutine< R >::iterator
-end( push_coroutine< R > & c)
-{ return boost::end( c); }
-
-}
-
-template< typename Arg >
-struct range_mutable_iterator< coroutines::push_coroutine< Arg > >
-{ typedef typename coroutines::push_coroutine< Arg >::iterator type; };
-
-template< typename R >
-struct range_mutable_iterator< coroutines::pull_coroutine< R > >
-{ typedef typename coroutines::pull_coroutine< R >::iterator type; };
-
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp
deleted file mode 100644
index 12632bbf7b5..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-
-// Copyright Oliver Kowalke 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)
-
-#ifndef BOOST_COROUTINES_DETAIL_CONFIG_H
-#define BOOST_COROUTINES_DETAIL_CONFIG_H
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#ifndef BOOST_COROUTINES_NO_DEPRECATION_WARNING
-# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-# pragma message ("Warning: Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING.")
-# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING."
-# endif
-#endif
-
-#ifdef BOOST_COROUTINES_DECL
-# undef BOOST_COROUTINES_DECL
-#endif
-
-#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_COROUTINES_DYN_LINK) ) && ! defined(BOOST_COROUTINES_STATIC_LINK)
-# if defined(BOOST_COROUTINES_SOURCE)
-# define BOOST_COROUTINES_DECL BOOST_SYMBOL_EXPORT
-# define BOOST_COROUTINES_BUILD_DLL
-# else
-# define BOOST_COROUTINES_DECL BOOST_SYMBOL_IMPORT
-# endif
-#endif
-
-#if ! defined(BOOST_COROUTINES_DECL)
-# define BOOST_COROUTINES_DECL
-#endif
-
-#if ! defined(BOOST_COROUTINES_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_COROUTINES_NO_LIB)
-# define BOOST_LIB_NAME boost_coroutine
-# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_COROUTINES_DYN_LINK)
-# define BOOST_DYN_LINK
-# endif
-# include <boost/config/auto_link.hpp>
-#endif
-
-#define BOOST_COROUTINES_UNIDIRECT
-#define BOOST_COROUTINES_SYMMETRIC
-
-#endif // BOOST_COROUTINES_DETAIL_CONFIG_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp
deleted file mode 100644
index 1658561ac8a..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-
-// Copyright Oliver Kowalke 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_COROUTINES_DETAIL_PREALLOCATED_H
-#define BOOST_COROUTINES_DETAIL_PREALLOCATED_H
-
-#include <cstddef>
-
-#include <boost/config.hpp>
-
-#include <boost/coroutine/detail/config.hpp>
-#include <boost/coroutine/stack_context.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost {
-namespace coroutines {
-namespace detail {
-
-struct preallocated {
- void * sp;
- std::size_t size;
- stack_context sctx;
-
- preallocated() BOOST_NOEXCEPT :
- sp( 0), size( 0), sctx() {
- }
-
- preallocated( void * sp_, std::size_t size_, stack_context sctx_) BOOST_NOEXCEPT :
- sp( sp_), size( size_), sctx( sctx_) {
- }
-};
-
-}}}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_COROUTINES_DETAIL_PREALLOCATED_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp
deleted file mode 100644
index 36918489def..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp
+++ /dev/null
@@ -1,310 +0,0 @@
-
-// Copyright Oliver Kowalke 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)
-
-#ifndef BOOST_COROUTINES_DETAIL_PULL_COROUTINE_OBJECT_H
-#define BOOST_COROUTINES_DETAIL_PULL_COROUTINE_OBJECT_H
-
-#include <boost/assert.hpp>
-#include <boost/config.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/exception_ptr.hpp>
-#include <boost/move/move.hpp>
-
-#include <boost/coroutine/detail/config.hpp>
-#include <boost/coroutine/detail/coroutine_context.hpp>
-#include <boost/coroutine/detail/flags.hpp>
-#include <boost/coroutine/detail/preallocated.hpp>
-#include <boost/coroutine/detail/pull_coroutine_impl.hpp>
-#include <boost/coroutine/detail/trampoline_pull.hpp>
-#include <boost/coroutine/exceptions.hpp>
-#include <boost/coroutine/flags.hpp>
-#include <boost/coroutine/stack_context.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-#if defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable:4355)
-#endif
-
-namespace boost {
-namespace coroutines {
-namespace detail {
-
-struct pull_coroutine_context
-{
- coroutine_context caller;
- coroutine_context callee;
-
- template< typename Coro >
- pull_coroutine_context( preallocated const& palloc, Coro *) :
- caller(),
- callee( trampoline_pull< Coro >, palloc)
- {}
-};
-
-template< typename PushCoro, typename R, typename Fn, typename StackAllocator >
-class pull_coroutine_object : private pull_coroutine_context,
- public pull_coroutine_impl< R >
-{
-private:
- typedef pull_coroutine_context ctx_t;
- typedef pull_coroutine_impl< R > base_t;
- typedef pull_coroutine_object< PushCoro, R, Fn, StackAllocator > obj_t;
-
- Fn fn_;
- stack_context stack_ctx_;
- StackAllocator stack_alloc_;
-
- static void deallocate_( obj_t * obj)
- {
- stack_context stack_ctx( obj->stack_ctx_);
- StackAllocator stack_alloc( obj->stack_alloc_);
- obj->unwind_stack();
- obj->~obj_t();
- stack_alloc.deallocate( stack_ctx);
- }
-
-public:
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- pull_coroutine_object( Fn fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
- fn_( fn),
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-#endif
-
- pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- fn_( fn),
-#else
- fn_( boost::forward< Fn >( fn) ),
-#endif
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-
- void run()
- {
- BOOST_ASSERT( ! base_t::unwind_requested() );
-
- base_t::flags_ |= flag_started;
- base_t::flags_ |= flag_running;
-
- // create push_coroutine
- typename PushCoro::synth_type b( & this->callee, & this->caller, false);
- PushCoro push_coro( synthesized_t::syntesized, b);
- try
- { fn_( push_coro); }
- catch ( forced_unwind const&)
- {}
- catch (...)
- { base_t::except_ = current_exception(); }
-
- base_t::flags_ |= flag_complete;
- base_t::flags_ &= ~flag_running;
- typename base_t::param_type to;
- this->callee.jump(
- this->caller,
- & to);
- BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
- }
-
- void destroy()
- { deallocate_( this); }
-};
-
-template< typename PushCoro, typename R, typename Fn, typename StackAllocator >
-class pull_coroutine_object< PushCoro, R &, Fn, StackAllocator > : private pull_coroutine_context,
- public pull_coroutine_impl< R & >
-{
-private:
- typedef pull_coroutine_context ctx_t;
- typedef pull_coroutine_impl< R & > base_t;
- typedef pull_coroutine_object< PushCoro, R &, Fn, StackAllocator > obj_t;
-
- Fn fn_;
- stack_context stack_ctx_;
- StackAllocator stack_alloc_;
-
- static void deallocate_( obj_t * obj)
- {
- stack_context stack_ctx( obj->stack_ctx_);
- StackAllocator stack_alloc( obj->stack_alloc_);
- obj->unwind_stack();
- obj->~obj_t();
- stack_alloc.deallocate( stack_ctx);
- }
-
-public:
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- pull_coroutine_object( Fn fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
- fn_( fn),
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-#endif
-
- pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- fn_( fn),
-#else
- fn_( boost::forward< Fn >( fn) ),
-#endif
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-
- void run()
- {
- BOOST_ASSERT( ! base_t::unwind_requested() );
-
- base_t::flags_ |= flag_started;
- base_t::flags_ |= flag_running;
-
- // create push_coroutine
- typename PushCoro::synth_type b( & this->callee, & this->caller, false);
- PushCoro push_coro( synthesized_t::syntesized, b);
- try
- { fn_( push_coro); }
- catch ( forced_unwind const&)
- {}
- catch (...)
- { base_t::except_ = current_exception(); }
-
- base_t::flags_ |= flag_complete;
- base_t::flags_ &= ~flag_running;
- typename base_t::param_type to;
- this->callee.jump(
- this->caller,
- & to);
- BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
- }
-
- void destroy()
- { deallocate_( this); }
-};
-
-template< typename PushCoro, typename Fn, typename StackAllocator >
-class pull_coroutine_object< PushCoro, void, Fn, StackAllocator > : private pull_coroutine_context,
- public pull_coroutine_impl< void >
-{
-private:
- typedef pull_coroutine_context ctx_t;
- typedef pull_coroutine_impl< void > base_t;
- typedef pull_coroutine_object< PushCoro, void, Fn, StackAllocator > obj_t;
-
- Fn fn_;
- stack_context stack_ctx_;
- StackAllocator stack_alloc_;
-
- static void deallocate_( obj_t * obj)
- {
- stack_context stack_ctx( obj->stack_ctx_);
- StackAllocator stack_alloc( obj->stack_alloc_);
- obj->unwind_stack();
- obj->~obj_t();
- stack_alloc.deallocate( stack_ctx);
- }
-
-public:
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- pull_coroutine_object( Fn fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
- fn_( fn),
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-#endif
-
- pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- fn_( fn),
-#else
- fn_( boost::forward< Fn >( fn) ),
-#endif
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-
- void run()
- {
- BOOST_ASSERT( ! base_t::unwind_requested() );
-
- base_t::flags_ |= flag_started;
- base_t::flags_ |= flag_running;
-
- // create push_coroutine
- typename PushCoro::synth_type b( & this->callee, & this->caller, false);
- PushCoro push_coro( synthesized_t::syntesized, b);
- try
- { fn_( push_coro); }
- catch ( forced_unwind const&)
- {}
- catch (...)
- { base_t::except_ = current_exception(); }
-
- base_t::flags_ |= flag_complete;
- base_t::flags_ &= ~flag_running;
- typename base_t::param_type to;
- this->callee.jump(
- this->caller,
- & to);
- BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
- }
-
- void destroy()
- { deallocate_( this); }
-};
-
-}}}
-
-#if defined(BOOST_MSVC)
-# pragma warning(pop)
-#endif
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_COROUTINES_DETAIL_PULL_COROUTINE_OBJECT_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp
deleted file mode 100644
index c3115ebe114..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp
+++ /dev/null
@@ -1,322 +0,0 @@
-
-// Copyright Oliver Kowalke 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)
-
-#ifndef BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_OBJECT_H
-#define BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_OBJECT_H
-
-#include <boost/assert.hpp>
-#include <boost/config.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/exception_ptr.hpp>
-#include <boost/move/move.hpp>
-
-#include <boost/coroutine/detail/config.hpp>
-#include <boost/coroutine/detail/coroutine_context.hpp>
-#include <boost/coroutine/detail/flags.hpp>
-#include <boost/coroutine/detail/preallocated.hpp>
-#include <boost/coroutine/detail/push_coroutine_impl.hpp>
-#include <boost/coroutine/detail/trampoline_push.hpp>
-#include <boost/coroutine/exceptions.hpp>
-#include <boost/coroutine/flags.hpp>
-#include <boost/coroutine/stack_context.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-#if defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable:4355)
-#endif
-
-namespace boost {
-namespace coroutines {
-namespace detail {
-
-struct push_coroutine_context
-{
- coroutine_context caller;
- coroutine_context callee;
-
- template< typename Coro >
- push_coroutine_context( preallocated const& palloc, Coro *) :
- caller(),
- callee( trampoline_push< Coro >, palloc)
- {}
-};
-
-struct push_coroutine_context_void
-{
- coroutine_context caller;
- coroutine_context callee;
-
- template< typename Coro >
- push_coroutine_context_void( preallocated const& palloc, Coro *) :
- caller(),
- callee( trampoline_push_void< Coro >, palloc)
- {}
-};
-
-template< typename PullCoro, typename R, typename Fn, typename StackAllocator >
-class push_coroutine_object : private push_coroutine_context,
- public push_coroutine_impl< R >
-{
-private:
- typedef push_coroutine_context ctx_t;
- typedef push_coroutine_impl< R > base_t;
- typedef push_coroutine_object< PullCoro, R, Fn, StackAllocator > obj_t;
-
- Fn fn_;
- stack_context stack_ctx_;
- StackAllocator stack_alloc_;
-
- static void deallocate_( obj_t * obj)
- {
- stack_context stack_ctx( obj->stack_ctx_);
- StackAllocator stack_alloc( obj->stack_alloc_);
- obj->unwind_stack();
- obj->~obj_t();
- stack_alloc.deallocate( stack_ctx);
- }
-
-public:
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- push_coroutine_object( Fn fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
- fn_( fn),
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-#endif
-
- push_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- fn_( fn),
-#else
- fn_( boost::forward< Fn >( fn) ),
-#endif
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-
- void run( R * result)
- {
- BOOST_ASSERT( ! base_t::unwind_requested() );
-
- base_t::flags_ |= flag_started;
- base_t::flags_ |= flag_running;
-
- // create push_coroutine
- typename PullCoro::synth_type b( & this->callee, & this->caller, false, result);
- PullCoro pull_coro( synthesized_t::syntesized, b);
- try
- { fn_( pull_coro); }
- catch ( forced_unwind const&)
- {}
- catch (...)
- { base_t::except_ = current_exception(); }
-
- base_t::flags_ |= flag_complete;
- base_t::flags_ &= ~flag_running;
- typename base_t::param_type to;
- this->callee.jump(
- this->caller,
- & to);
- BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
- }
-
- void destroy()
- { deallocate_( this); }
-};
-
-template< typename PullCoro, typename R, typename Fn, typename StackAllocator >
-class push_coroutine_object< PullCoro, R &, Fn, StackAllocator > : private push_coroutine_context,
- public push_coroutine_impl< R & >
-{
-private:
- typedef push_coroutine_context ctx_t;
- typedef push_coroutine_impl< R & > base_t;
- typedef push_coroutine_object< PullCoro, R &, Fn, StackAllocator > obj_t;
-
- Fn fn_;
- stack_context stack_ctx_;
- StackAllocator stack_alloc_;
-
- static void deallocate_( obj_t * obj)
- {
- stack_context stack_ctx( obj->stack_ctx_);
- StackAllocator stack_alloc( obj->stack_alloc_);
- obj->unwind_stack();
- obj->~obj_t();
- stack_alloc.deallocate( stack_ctx);
- }
-
-public:
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- push_coroutine_object( Fn fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
- fn_( fn),
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-#endif
-
- push_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- fn_( fn),
-#else
- fn_( boost::forward< Fn >( fn) ),
-#endif
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-
- void run( R * result)
- {
- BOOST_ASSERT( ! base_t::unwind_requested() );
-
- base_t::flags_ |= flag_started;
- base_t::flags_ |= flag_running;
-
- // create push_coroutine
- typename PullCoro::synth_type b( & this->callee, & this->caller, false, result);
- PullCoro push_coro( synthesized_t::syntesized, b);
- try
- { fn_( push_coro); }
- catch ( forced_unwind const&)
- {}
- catch (...)
- { base_t::except_ = current_exception(); }
-
- base_t::flags_ |= flag_complete;
- base_t::flags_ &= ~flag_running;
- typename base_t::param_type to;
- this->callee.jump(
- this->caller,
- & to);
- BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
- }
-
- void destroy()
- { deallocate_( this); }
-};
-
-template< typename PullCoro, typename Fn, typename StackAllocator >
-class push_coroutine_object< PullCoro, void, Fn, StackAllocator > : private push_coroutine_context_void,
- public push_coroutine_impl< void >
-{
-private:
- typedef push_coroutine_context_void ctx_t;
- typedef push_coroutine_impl< void > base_t;
- typedef push_coroutine_object< PullCoro, void, Fn, StackAllocator > obj_t;
-
- Fn fn_;
- stack_context stack_ctx_;
- StackAllocator stack_alloc_;
-
- static void deallocate_( obj_t * obj)
- {
- stack_context stack_ctx( obj->stack_ctx_);
- StackAllocator stack_alloc( obj->stack_alloc_);
- obj->unwind_stack();
- obj->~obj_t();
- stack_alloc.deallocate( stack_ctx);
- }
-
-public:
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- push_coroutine_object( Fn fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
- fn_( fn),
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-#endif
-
- push_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
- preallocated const& palloc,
- StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
- ctx_t( palloc, this),
- base_t( & this->caller,
- & this->callee,
- stack_unwind == attrs.do_unwind),
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- fn_( fn),
-#else
- fn_( boost::forward< Fn >( fn) ),
-#endif
- stack_ctx_( palloc.sctx),
- stack_alloc_( stack_alloc)
- {}
-
- void run()
- {
- BOOST_ASSERT( ! base_t::unwind_requested() );
-
- base_t::flags_ |= flag_started;
- base_t::flags_ |= flag_running;
-
- // create push_coroutine
- typename PullCoro::synth_type b( & this->callee, & this->caller, false);
- PullCoro push_coro( synthesized_t::syntesized, b);
- try
- { fn_( push_coro); }
- catch ( forced_unwind const&)
- {}
- catch (...)
- { base_t::except_ = current_exception(); }
-
- base_t::flags_ |= flag_complete;
- base_t::flags_ &= ~flag_running;
- typename base_t::param_type to;
- this->callee.jump(
- this->caller,
- & to);
- BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
- }
-
- void destroy()
- { deallocate_( this); }
-};
-
-}}}
-
-#if defined(BOOST_MSVC)
-# pragma warning(pop)
-#endif
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_OBJECT_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp b/src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp
deleted file mode 100644
index 433056f7a14..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-
-// Copyright Oliver Kowalke 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)
-
-#ifndef BOOST_COROUTINES_STACK_CONTEXT_H
-#define BOOST_COROUTINES_STACK_CONTEXT_H
-
-#include <cstddef>
-
-#include <boost/config.hpp>
-
-#include <boost/coroutine/detail/config.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost {
-namespace coroutines {
-
-#if defined(BOOST_USE_SEGMENTED_STACKS)
-struct stack_context
-{
- typedef void * segments_context[BOOST_CONTEXT_SEGMENTS];
-
- std::size_t size;
- void * sp;
- segments_context segments_ctx;
-#if defined(BOOST_USE_VALGRIND)
- unsigned valgrind_stack_id;
-#endif
-
- stack_context() :
- size( 0), sp( 0), segments_ctx()
-#if defined(BOOST_USE_VALGRIND)
- , valgrind_stack_id( 0)
-#endif
- {}
-};
-#else
-struct stack_context
-{
- std::size_t size;
- void * sp;
-#if defined(BOOST_USE_VALGRIND)
- unsigned valgrind_stack_id;
-#endif
-
- stack_context() :
- size( 0), sp( 0)
-#if defined(BOOST_USE_VALGRIND)
- , valgrind_stack_id( 0)
-#endif
- {}
-};
-#endif
-
-}}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_COROUTINES_STACK_CONTEXT_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp b/src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp
deleted file mode 100644
index cf11136f709..00000000000
--- a/src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-
-// Copyright Oliver Kowalke 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)
-
-#ifndef BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
-#define BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
-
-#ifndef BOOST_COROUTINES_NO_DEPRECATION_WARNING
-# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-# pragma message ("Warning: Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING.")
-# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-# warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING."
-# endif
-#endif
-
-#include <boost/config.hpp>
-
-#include <boost/coroutine/detail/symmetric_coroutine_call.hpp>
-#include <boost/coroutine/detail/symmetric_coroutine_yield.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost {
-namespace coroutines {
-
-template< typename T >
-struct symmetric_coroutine
-{
- typedef detail::symmetric_coroutine_call< T > call_type;
- typedef detail::symmetric_coroutine_yield< T > yield_type;
-};
-
-}}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
diff --git a/src/third_party/boost-1.69.0/boost/current_function.hpp b/src/third_party/boost-1.69.0/boost/current_function.hpp
deleted file mode 100644
index 86955cb041b..00000000000
--- a/src/third_party/boost-1.69.0/boost/current_function.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
-#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/current_function.hpp - BOOST_CURRENT_FUNCTION
-//
-// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
-//
-// Distributed under the 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/assert/current_function.html
-//
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void current_function_helper()
-{
-
-#if defined( BOOST_DISABLE_CURRENT_FUNCTION )
-
-# define BOOST_CURRENT_FUNCTION "(unknown)"
-
-#elif defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
-
-# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
-
-#elif defined(__DMC__) && (__DMC__ >= 0x810)
-
-# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
-
-#elif defined(__FUNCSIG__)
-
-# define BOOST_CURRENT_FUNCTION __FUNCSIG__
-
-#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
-
-# define BOOST_CURRENT_FUNCTION __FUNCTION__
-
-#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
-
-# define BOOST_CURRENT_FUNCTION __FUNC__
-
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
-
-# define BOOST_CURRENT_FUNCTION __func__
-
-#elif defined(__cplusplus) && (__cplusplus >= 201103)
-
-# define BOOST_CURRENT_FUNCTION __func__
-
-#else
-
-# define BOOST_CURRENT_FUNCTION "(unknown)"
-
-#endif
-
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp
deleted file mode 100644
index 274ce1f06ab..00000000000
--- a/src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp
+++ /dev/null
@@ -1,509 +0,0 @@
-#ifndef DATE_TIME_DATE_GENERATORS_HPP__
-#define DATE_TIME_DATE_GENERATORS_HPP__
-
-/* Copyright (c) 2002,2003,2005 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$
- */
-
-/*! @file date_generators.hpp
- Definition and implementation of date algorithm templates
-*/
-
-#include <stdexcept>
-#include <sstream>
-#include <boost/throw_exception.hpp>
-#include <boost/date_time/date.hpp>
-#include <boost/date_time/compiler_config.hpp>
-
-namespace boost {
-namespace date_time {
-
- //! Base class for all generators that take a year and produce a date.
- /*! This class is a base class for polymorphic function objects that take
- a year and produce a concrete date.
- @param date_type The type representing a date. This type must
- export a calender_type which defines a year_type.
- */
- template<class date_type>
- class year_based_generator
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::year_type year_type;
- year_based_generator() {}
- virtual ~year_based_generator() {}
- virtual date_type get_date(year_type y) const = 0;
- //! Returns a string for use in a POSIX time_zone string
- virtual std::string to_string() const =0;
- };
-
- //! Generates a date by applying the year to the given month and day.
- /*!
- Example usage:
- @code
- partial_date pd(1, Jan);
- partial_date pd2(70);
- date d = pd.get_date(2002); //2002-Jan-01
- date d2 = pd2.get_date(2002); //2002-Mar-10
- @endcode
- \ingroup date_alg
- */
- template<class date_type>
- class partial_date : public year_based_generator<date_type>
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::day_type day_type;
- typedef typename calendar_type::month_type month_type;
- typedef typename calendar_type::year_type year_type;
- typedef typename date_type::duration_type duration_type;
- typedef typename duration_type::duration_rep duration_rep;
- partial_date(day_type d, month_type m) :
- day_(d),
- month_(m)
- {}
- //! Partial date created from number of days into year. Range 1-366
- /*! Allowable values range from 1 to 366. 1=Jan1, 366=Dec31. If argument
- * exceeds range, partial_date will be created with closest in-range value.
- * 60 will always be Feb29, if get_date() is called with a non-leap year
- * an exception will be thrown */
- partial_date(duration_rep days) :
- day_(1), // default values
- month_(1)
- {
- date_type d1(2000,1,1);
- if(days > 1) {
- if(days > 366) // prevents wrapping
- {
- days = 366;
- }
- days = days - 1;
- duration_type dd(days);
- d1 = d1 + dd;
- }
- day_ = d1.day();
- month_ = d1.month();
- }
- //! Return a concrete date when provided with a year specific year.
- /*! Will throw an 'invalid_argument' exception if a partial_date object,
- * instantiated with Feb-29, has get_date called with a non-leap year.
- * Example:
- * @code
- * partial_date pd(29, Feb);
- * pd.get_date(2003); // throws invalid_argument exception
- * pg.get_date(2000); // returns 2000-2-29
- * @endcode
- */
- date_type get_date(year_type y) const
- {
- if((day_ == 29) && (month_ == 2) && !(calendar_type::is_leap_year(y))) {
- std::ostringstream ss;
- ss << "No Feb 29th in given year of " << y << ".";
- boost::throw_exception(std::invalid_argument(ss.str()));
- }
- return date_type(y, month_, day_);
- }
- date_type operator()(year_type y) const
- {
- return get_date(y);
- //return date_type(y, month_, day_);
- }
- bool operator==(const partial_date& rhs) const
- {
- return (month_ == rhs.month_) && (day_ == rhs.day_);
- }
- bool operator<(const partial_date& rhs) const
- {
- if (month_ < rhs.month_) return true;
- if (month_ > rhs.month_) return false;
- //months are equal
- return (day_ < rhs.day_);
- }
-
- // added for streaming purposes
- month_type month() const
- {
- return month_;
- }
- day_type day() const
- {
- return day_;
- }
-
- //! Returns string suitable for use in POSIX time zone string
- /*! Returns string formatted with up to 3 digits:
- * Jan-01 == "0"
- * Feb-29 == "58"
- * Dec-31 == "365" */
- virtual std::string to_string() const
- {
- std::ostringstream ss;
- date_type d(2004, month_, day_);
- unsigned short c = d.day_of_year();
- c--; // numbered 0-365 while day_of_year is 1 based...
- ss << c;
- return ss.str();
- }
- private:
- day_type day_;
- month_type month_;
- };
-
-
- //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5.
- BOOST_DATE_TIME_DECL const char* nth_as_str(int n);
-
- //! Useful generator functor for finding holidays
- /*! Based on the idea in Cal. Calc. for finding holidays that are
- * the 'first Monday of September'. When instantiated with
- * 'fifth' kday of month, the result will be the last kday of month
- * which can be the fourth or fifth depending on the structure of
- * the month.
- *
- * The algorithm here basically guesses for the first
- * day of the month. Then finds the first day of the correct
- * type. That is, if the first of the month is a Tuesday
- * and it needs Wenesday then we simply increment by a day
- * and then we can add the length of a week until we get
- * to the 'nth kday'. There are probably more efficient
- * algorithms based on using a mod 7, but this one works
- * reasonably well for basic applications.
- * \ingroup date_alg
- */
- template<class date_type>
- class nth_kday_of_month : public year_based_generator<date_type>
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::day_of_week_type day_of_week_type;
- typedef typename calendar_type::month_type month_type;
- typedef typename calendar_type::year_type year_type;
- typedef typename date_type::duration_type duration_type;
- enum week_num {first=1, second, third, fourth, fifth};
- nth_kday_of_month(week_num week_no,
- day_of_week_type dow,
- month_type m) :
- month_(m),
- wn_(week_no),
- dow_(dow)
- {}
- //! Return a concrete date when provided with a year specific year.
- date_type get_date(year_type y) const
- {
- date_type d(y, month_, 1); //first day of month
- duration_type one_day(1);
- duration_type one_week(7);
- while (dow_ != d.day_of_week()) {
- d = d + one_day;
- }
- int week = 1;
- while (week < wn_) {
- d = d + one_week;
- week++;
- }
- // remove wrapping to next month behavior
- if(d.month() != month_) {
- d = d - one_week;
- }
- return d;
- }
- // added for streaming
- month_type month() const
- {
- return month_;
- }
- week_num nth_week() const
- {
- return wn_;
- }
- day_of_week_type day_of_week() const
- {
- return dow_;
- }
- const char* nth_week_as_str() const
- {
- return nth_as_str(wn_);
- }
- //! Returns string suitable for use in POSIX time zone string
- /*! Returns a string formatted as "M4.3.0" ==> 3rd Sunday in April. */
- virtual std::string to_string() const
- {
- std::ostringstream ss;
- ss << 'M'
- << static_cast<int>(month_) << '.'
- << static_cast<int>(wn_) << '.'
- << static_cast<int>(dow_);
- return ss.str();
- }
- private:
- month_type month_;
- week_num wn_;
- day_of_week_type dow_;
- };
-
- //! Useful generator functor for finding holidays and daylight savings
- /*! Similar to nth_kday_of_month, but requires less paramters
- * \ingroup date_alg
- */
- template<class date_type>
- class first_kday_of_month : public year_based_generator<date_type>
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::day_of_week_type day_of_week_type;
- typedef typename calendar_type::month_type month_type;
- typedef typename calendar_type::year_type year_type;
- typedef typename date_type::duration_type duration_type;
- //!Specify the first 'Sunday' in 'April' spec
- /*!@param dow The day of week, eg: Sunday, Monday, etc
- * @param m The month of the year, eg: Jan, Feb, Mar, etc
- */
- first_kday_of_month(day_of_week_type dow, month_type m) :
- month_(m),
- dow_(dow)
- {}
- //! Return a concrete date when provided with a year specific year.
- date_type get_date(year_type year) const
- {
- date_type d(year, month_,1);
- duration_type one_day(1);
- while (dow_ != d.day_of_week()) {
- d = d + one_day;
- }
- return d;
- }
- // added for streaming
- month_type month() const
- {
- return month_;
- }
- day_of_week_type day_of_week() const
- {
- return dow_;
- }
- //! Returns string suitable for use in POSIX time zone string
- /*! Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. */
- virtual std::string to_string() const
- {
- std::ostringstream ss;
- ss << 'M'
- << static_cast<int>(month_) << '.'
- << 1 << '.'
- << static_cast<int>(dow_);
- return ss.str();
- }
- private:
- month_type month_;
- day_of_week_type dow_;
- };
-
-
-
- //! Calculate something like Last Sunday of January
- /*! Useful generator functor for finding holidays and daylight savings
- * Get the last day of the month and then calculate the difference
- * to the last previous day.
- * @param date_type A date class that exports day_of_week, month_type, etc.
- * \ingroup date_alg
- */
- template<class date_type>
- class last_kday_of_month : public year_based_generator<date_type>
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::day_of_week_type day_of_week_type;
- typedef typename calendar_type::month_type month_type;
- typedef typename calendar_type::year_type year_type;
- typedef typename date_type::duration_type duration_type;
- //!Specify the date spec like last 'Sunday' in 'April' spec
- /*!@param dow The day of week, eg: Sunday, Monday, etc
- * @param m The month of the year, eg: Jan, Feb, Mar, etc
- */
- last_kday_of_month(day_of_week_type dow, month_type m) :
- month_(m),
- dow_(dow)
- {}
- //! Return a concrete date when provided with a year specific year.
- date_type get_date(year_type year) const
- {
- date_type d(year, month_, calendar_type::end_of_month_day(year,month_));
- duration_type one_day(1);
- while (dow_ != d.day_of_week()) {
- d = d - one_day;
- }
- return d;
- }
- // added for streaming
- month_type month() const
- {
- return month_;
- }
- day_of_week_type day_of_week() const
- {
- return dow_;
- }
- //! Returns string suitable for use in POSIX time zone string
- /*! Returns a string formatted as "M4.5.0" ==> last Sunday in April. */
- virtual std::string to_string() const
- {
- std::ostringstream ss;
- ss << 'M'
- << static_cast<int>(month_) << '.'
- << 5 << '.'
- << static_cast<int>(dow_);
- return ss.str();
- }
- private:
- month_type month_;
- day_of_week_type dow_;
- };
-
-
- //! Calculate something like "First Sunday after Jan 1,2002
- /*! Date generator that takes a date and finds kday after
- *@code
- typedef boost::date_time::first_kday_after<date> firstkdayafter;
- firstkdayafter fkaf(Monday);
- fkaf.get_date(date(2002,Feb,1));
- @endcode
- * \ingroup date_alg
- */
- template<class date_type>
- class first_kday_after
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::day_of_week_type day_of_week_type;
- typedef typename date_type::duration_type duration_type;
- first_kday_after(day_of_week_type dow) :
- dow_(dow)
- {}
- //! Return next kday given.
- date_type get_date(date_type start_day) const
- {
- duration_type one_day(1);
- date_type d = start_day + one_day;
- while (dow_ != d.day_of_week()) {
- d = d + one_day;
- }
- return d;
- }
- // added for streaming
- day_of_week_type day_of_week() const
- {
- return dow_;
- }
- private:
- day_of_week_type dow_;
- };
-
- //! Calculate something like "First Sunday before Jan 1,2002
- /*! Date generator that takes a date and finds kday after
- *@code
- typedef boost::date_time::first_kday_before<date> firstkdaybefore;
- firstkdaybefore fkbf(Monday);
- fkbf.get_date(date(2002,Feb,1));
- @endcode
- * \ingroup date_alg
- */
- template<class date_type>
- class first_kday_before
- {
- public:
- typedef typename date_type::calendar_type calendar_type;
- typedef typename calendar_type::day_of_week_type day_of_week_type;
- typedef typename date_type::duration_type duration_type;
- first_kday_before(day_of_week_type dow) :
- dow_(dow)
- {}
- //! Return next kday given.
- date_type get_date(date_type start_day) const
- {
- duration_type one_day(1);
- date_type d = start_day - one_day;
- while (dow_ != d.day_of_week()) {
- d = d - one_day;
- }
- return d;
- }
- // added for streaming
- day_of_week_type day_of_week() const
- {
- return dow_;
- }
- private:
- day_of_week_type dow_;
- };
-
- //! Calculates the number of days until the next weekday
- /*! Calculates the number of days until the next weekday.
- * If the date given falls on a Sunday and the given weekday
- * is Tuesday the result will be 2 days */
- template<typename date_type, class weekday_type>
- inline
- typename date_type::duration_type days_until_weekday(const date_type& d, const weekday_type& wd)
- {
- typedef typename date_type::duration_type duration_type;
- duration_type wks(0);
- duration_type dd(wd.as_number() - d.day_of_week().as_number());
- if(dd.is_negative()){
- wks = duration_type(7);
- }
- return dd + wks;
- }
-
- //! Calculates the number of days since the previous weekday
- /*! Calculates the number of days since the previous weekday
- * If the date given falls on a Sunday and the given weekday
- * is Tuesday the result will be 5 days. The answer will be a positive
- * number because Tuesday is 5 days before Sunday, not -5 days before. */
- template<typename date_type, class weekday_type>
- inline
- typename date_type::duration_type days_before_weekday(const date_type& d, const weekday_type& wd)
- {
- typedef typename date_type::duration_type duration_type;
- duration_type wks(0);
- duration_type dd(wd.as_number() - d.day_of_week().as_number());
- if(dd.days() > 0){
- wks = duration_type(7);
- }
- // we want a number of days, not an offset. The value returned must
- // be zero or larger.
- return (-dd + wks);
- }
-
- //! Generates a date object representing the date of the following weekday from the given date
- /*! Generates a date object representing the date of the following
- * weekday from the given date. If the date given is 2004-May-9
- * (a Sunday) and the given weekday is Tuesday then the resulting date
- * will be 2004-May-11. */
- template<class date_type, class weekday_type>
- inline
- date_type next_weekday(const date_type& d, const weekday_type& wd)
- {
- return d + days_until_weekday(d, wd);
- }
-
- //! Generates a date object representing the date of the previous weekday from the given date
- /*! Generates a date object representing the date of the previous
- * weekday from the given date. If the date given is 2004-May-9
- * (a Sunday) and the given weekday is Tuesday then the resulting date
- * will be 2004-May-4. */
- template<class date_type, class weekday_type>
- inline
- date_type previous_weekday(const date_type& d, const weekday_type& wd)
- {
- return d - days_before_weekday(d, wd);
- }
-
-} } //namespace date_time
-
-
-
-
-#endif
-
diff --git a/src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp b/src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp
deleted file mode 100644
index 73a98996d81..00000000000
--- a/src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp
+++ /dev/null
@@ -1,391 +0,0 @@
-#ifndef DATE_TIME_DST_RULES_HPP__
-#define DATE_TIME_DST_RULES_HPP__
-
-/* Copyright (c) 2002,2003, 2007 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$
- */
-
-/*! @file dst_rules.hpp
- Contains template class to provide static dst rule calculations
-*/
-
-#include "boost/date_time/date_generators.hpp"
-#include "boost/date_time/period.hpp"
-#include "boost/date_time/date_defs.hpp"
-#include <stdexcept>
-
-namespace boost {
- namespace date_time {
-
- enum time_is_dst_result {is_not_in_dst, is_in_dst,
- ambiguous, invalid_time_label};
-
-
- //! Dynamic class used to caluclate dst transition information
- template<class date_type_,
- class time_duration_type_>
- class dst_calculator
- {
- public:
- typedef time_duration_type_ time_duration_type;
- typedef date_type_ date_type;
-
- //! Check the local time offset when on dst start day
- /*! On this dst transition, the time label between
- * the transition boundary and the boudary + the offset
- * are invalid times. If before the boundary then still
- * not in dst.
- *@param time_of_day Time offset in the day for the local time
- *@param dst_start_offset_minutes Local day offset for start of dst
- *@param dst_length_minutes Number of minutes to adjust clock forward
- *@retval status of time label w.r.t. dst
- */
- static time_is_dst_result
- process_local_dst_start_day(const time_duration_type& time_of_day,
- unsigned int dst_start_offset_minutes,
- long dst_length_minutes)
- {
- //std::cout << "here" << std::endl;
- if (time_of_day < time_duration_type(0,dst_start_offset_minutes,0)) {
- return is_not_in_dst;
- }
- long offset = dst_start_offset_minutes + dst_length_minutes;
- if (time_of_day >= time_duration_type(0,offset,0)) {
- return is_in_dst;
- }
- return invalid_time_label;
- }
-
- //! Check the local time offset when on the last day of dst
- /*! This is the calculation for the DST end day. On that day times
- * prior to the conversion time - dst_length (1 am in US) are still
- * in dst. Times between the above and the switch time are
- * ambiguous. Times after the start_offset are not in dst.
- *@param time_of_day Time offset in the day for the local time
- *@param dst_end_offset_minutes Local time of day for end of dst
- *@retval status of time label w.r.t. dst
- */
- static time_is_dst_result
- process_local_dst_end_day(const time_duration_type& time_of_day,
- unsigned int dst_end_offset_minutes,
- long dst_length_minutes)
- {
- //in US this will be 60 so offset in day is 1,0,0
- int offset = dst_end_offset_minutes-dst_length_minutes;
- if (time_of_day < time_duration_type(0,offset,0)) {
- return is_in_dst;
- }
- if (time_of_day >= time_duration_type(0,dst_end_offset_minutes,0)) {
- return is_not_in_dst;
- }
- return ambiguous;
- }
-
- //! Calculates if the given local time is dst or not
- /*! Determines if the time is really in DST or not. Also checks for
- * invalid and ambiguous.
- * @param current_day The day to check for dst
- * @param time_of_day Time offset within the day to check
- * @param dst_start_day Starting day of dst for the given locality
- * @param dst_start_offset Time offset within day for dst boundary
- * @param dst_end_day Ending day of dst for the given locality
- * @param dst_end_offset Time offset within day given in dst for dst boundary
- * @param dst_length lenght of dst adjusment
- * @retval The time is either ambiguous, invalid, in dst, or not in dst
- */
- static time_is_dst_result
- local_is_dst(const date_type& current_day,
- const time_duration_type& time_of_day,
- const date_type& dst_start_day,
- const time_duration_type& dst_start_offset,
- const date_type& dst_end_day,
- const time_duration_type& dst_end_offset,
- const time_duration_type& dst_length_minutes)
- {
- unsigned int start_minutes = static_cast<unsigned>(
- dst_start_offset.hours() * 60 + dst_start_offset.minutes());
- unsigned int end_minutes = static_cast<unsigned>(
- dst_end_offset.hours() * 60 + dst_end_offset.minutes());
- long length_minutes = static_cast<long>(
- dst_length_minutes.hours() * 60 + dst_length_minutes.minutes());
-
- return local_is_dst(current_day, time_of_day,
- dst_start_day, start_minutes,
- dst_end_day, end_minutes,
- length_minutes);
- }
-
- //! Calculates if the given local time is dst or not
- /*! Determines if the time is really in DST or not. Also checks for
- * invalid and ambiguous.
- * @param current_day The day to check for dst
- * @param time_of_day Time offset within the day to check
- * @param dst_start_day Starting day of dst for the given locality
- * @param dst_start_offset_minutes Offset within day for dst
- * boundary (eg 120 for US which is 02:00:00)
- * @param dst_end_day Ending day of dst for the given locality
- * @param dst_end_offset_minutes Offset within day given in dst for dst
- * boundary (eg 120 for US which is 02:00:00)
- * @param dst_length_minutes Length of dst adjusment (eg: 60 for US)
- * @retval The time is either ambiguous, invalid, in dst, or not in dst
- */
- static time_is_dst_result
- local_is_dst(const date_type& current_day,
- const time_duration_type& time_of_day,
- const date_type& dst_start_day,
- unsigned int dst_start_offset_minutes,
- const date_type& dst_end_day,
- unsigned int dst_end_offset_minutes,
- long dst_length_minutes)
- {
- //in northern hemisphere dst is in the middle of the year
- if (dst_start_day < dst_end_day) {
- if ((current_day > dst_start_day) && (current_day < dst_end_day)) {
- return is_in_dst;
- }
- if ((current_day < dst_start_day) || (current_day > dst_end_day)) {
- return is_not_in_dst;
- }
- }
- else {//southern hemisphere dst is at begining /end of year
- if ((current_day < dst_start_day) && (current_day > dst_end_day)) {
- return is_not_in_dst;
- }
- if ((current_day > dst_start_day) || (current_day < dst_end_day)) {
- return is_in_dst;
- }
- }
-
- if (current_day == dst_start_day) {
- return process_local_dst_start_day(time_of_day,
- dst_start_offset_minutes,
- dst_length_minutes);
- }
-
- if (current_day == dst_end_day) {
- return process_local_dst_end_day(time_of_day,
- dst_end_offset_minutes,
- dst_length_minutes);
- }
- //you should never reach this statement
- return invalid_time_label;
- }
-
- };
-
-
- //! Compile-time configurable daylight savings time calculation engine
- /* This template provides the ability to configure a daylight savings
- * calculation at compile time covering all the cases. Unfortunately
- * because of the number of dimensions related to daylight savings
- * calculation the number of parameters is high. In addition, the
- * start and end transition rules are complex types that specify
- * an algorithm for calculation of the starting day and ending
- * day of daylight savings time including the month and day
- * specifications (eg: last sunday in October).
- *
- * @param date_type A type that represents dates, typically gregorian::date
- * @param time_duration_type Used for the offset in the day calculations
- * @param dst_traits A set of traits that define the rules of dst
- * calculation. The dst_trait must include the following:
- * start_rule_functor - Rule to calculate the starting date of a
- * dst transition (eg: last_kday_of_month).
- * start_day - static function that returns month of dst start for
- * start_rule_functor
- * start_month -static function that returns day or day of week for
- * dst start of dst
- * end_rule_functor - Rule to calculate the end of dst day.
- * end_day - static fucntion that returns end day for end_rule_functor
- * end_month - static function that returns end month for end_rule_functor
- * dst_start_offset_minutes - number of minutes from start of day to transition to dst -- 120 (or 2:00 am) is typical for the U.S. and E.U.
- * dst_start_offset_minutes - number of minutes from start of day to transition off of dst -- 180 (or 3:00 am) is typical for E.U.
- * dst_length_minutes - number of minutes that dst shifts clock
- */
- template<class date_type,
- class time_duration_type,
- class dst_traits>
- class dst_calc_engine
- {
- public:
- typedef typename date_type::year_type year_type;
- typedef typename date_type::calendar_type calendar_type;
- typedef dst_calculator<date_type, time_duration_type> dstcalc;
-
- //! Calculates if the given local time is dst or not
- /*! Determines if the time is really in DST or not. Also checks for
- * invalid and ambiguous.
- * @retval The time is either ambiguous, invalid, in dst, or not in dst
- */
- static time_is_dst_result local_is_dst(const date_type& d,
- const time_duration_type& td)
- {
-
- year_type y = d.year();
- date_type dst_start = local_dst_start_day(y);
- date_type dst_end = local_dst_end_day(y);
- return dstcalc::local_is_dst(d,td,
- dst_start,
- dst_traits::dst_start_offset_minutes(),
- dst_end,
- dst_traits::dst_end_offset_minutes(),
- dst_traits::dst_shift_length_minutes());
-
- }
-
- static bool is_dst_boundary_day(date_type d)
- {
- year_type y = d.year();
- return ((d == local_dst_start_day(y)) ||
- (d == local_dst_end_day(y)));
- }
-
- //! The time of day for the dst transition (eg: typically 01:00:00 or 02:00:00)
- static time_duration_type dst_offset()
- {
- return time_duration_type(0,dst_traits::dst_shift_length_minutes(),0);
- }
-
- static date_type local_dst_start_day(year_type year)
- {
- return dst_traits::local_dst_start_day(year);
- }
-
- static date_type local_dst_end_day(year_type year)
- {
- return dst_traits::local_dst_end_day(year);
- }
-
-
- };
-
- //! Depricated: Class to calculate dst boundaries for US time zones
- /* Use dst_calc_engine instead.
- * In 2007 US/Canada DST rules changed
- * (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_saving_time).
- */
- template<class date_type_,
- class time_duration_type_,
- unsigned int dst_start_offset_minutes=120, //from start of day
- short dst_length_minutes=60> //1 hour == 60 min in US
- class us_dst_rules
- {
- public:
- typedef time_duration_type_ time_duration_type;
- typedef date_type_ date_type;
- typedef typename date_type::year_type year_type;
- typedef typename date_type::calendar_type calendar_type;
- typedef date_time::last_kday_of_month<date_type> lkday;
- typedef date_time::first_kday_of_month<date_type> fkday;
- typedef date_time::nth_kday_of_month<date_type> nkday;
- typedef dst_calculator<date_type, time_duration_type> dstcalc;
-
- //! Calculates if the given local time is dst or not
- /*! Determines if the time is really in DST or not. Also checks for
- * invalid and ambiguous.
- * @retval The time is either ambiguous, invalid, in dst, or not in dst
- */
- static time_is_dst_result local_is_dst(const date_type& d,
- const time_duration_type& td)
- {
-
- year_type y = d.year();
- date_type dst_start = local_dst_start_day(y);
- date_type dst_end = local_dst_end_day(y);
- return dstcalc::local_is_dst(d,td,
- dst_start,dst_start_offset_minutes,
- dst_end, dst_start_offset_minutes,
- dst_length_minutes);
-
- }
-
-
- static bool is_dst_boundary_day(date_type d)
- {
- year_type y = d.year();
- return ((d == local_dst_start_day(y)) ||
- (d == local_dst_end_day(y)));
- }
-
- static date_type local_dst_start_day(year_type year)
- {
- if (year >= year_type(2007)) {
- //second sunday in march
- nkday ssim(nkday::second, Sunday, gregorian::Mar);
- return ssim.get_date(year);
- } else {
- //first sunday in april
- fkday fsia(Sunday, gregorian::Apr);
- return fsia.get_date(year);
- }
- }
-
- static date_type local_dst_end_day(year_type year)
- {
- if (year >= year_type(2007)) {
- //first sunday in november
- fkday fsin(Sunday, gregorian::Nov);
- return fsin.get_date(year);
- } else {
- //last sunday in october
- lkday lsio(Sunday, gregorian::Oct);
- return lsio.get_date(year);
- }
- }
-
- static time_duration_type dst_offset()
- {
- return time_duration_type(0,dst_length_minutes,0);
- }
-
- private:
-
-
- };
-
- //! Used for local time adjustments in places that don't use dst
- template<class date_type_, class time_duration_type_>
- class null_dst_rules
- {
- public:
- typedef time_duration_type_ time_duration_type;
- typedef date_type_ date_type;
-
-
- //! Calculates if the given local time is dst or not
- /*! @retval Always is_not_in_dst since this is for zones without dst
- */
- static time_is_dst_result local_is_dst(const date_type&,
- const time_duration_type&)
- {
- return is_not_in_dst;
- }
-
- //! Calculates if the given utc time is in dst
- static time_is_dst_result utc_is_dst(const date_type&,
- const time_duration_type&)
- {
- return is_not_in_dst;
- }
-
- static bool is_dst_boundary_day(date_type /*d*/)
- {
- return false;
- }
-
- static time_duration_type dst_offset()
- {
- return time_duration_type(0,0,0);
- }
-
- };
-
-
- } } //namespace date_time
-
-
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp b/src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp
deleted file mode 100644
index 16c1fd63610..00000000000
--- a/src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (c) 2002,2003,2005 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
- */
-#ifndef DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__
-#define DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__
-
-
-
-namespace boost {
-namespace date_time {
-
- //! Defines base interface for calculating start and end date of daylight savings
- template<class date_type>
- class dst_day_calc_rule
- {
- public:
- typedef typename date_type::year_type year_type;
- virtual ~dst_day_calc_rule() {}
- virtual date_type start_day(year_type y) const=0;
- virtual std::string start_rule_as_string() const=0;
- virtual date_type end_day(year_type y) const=0;
- virtual std::string end_rule_as_string() const=0;
-
- };
-
- //! Canonical form for a class that provides day rule calculation
- /*! This class is used to generate specific sets of dst rules
- *
- *@param spec Provides a specifiction of the function object types used
- * to generate start and end days of daylight savings as well
- * as the date type.
- */
- template<class spec>
- class day_calc_dst_rule : public dst_day_calc_rule<typename spec::date_type>
- {
- public:
- typedef typename spec::date_type date_type;
- typedef typename date_type::year_type year_type;
- typedef typename spec::start_rule start_rule;
- typedef typename spec::end_rule end_rule;
- day_calc_dst_rule(start_rule dst_start,
- end_rule dst_end) :
- dst_start_(dst_start),
- dst_end_(dst_end)
- {}
- virtual date_type start_day(year_type y) const
- {
- return dst_start_.get_date(y);
- }
- virtual std::string start_rule_as_string() const
- {
- return dst_start_.to_string();
- }
- virtual date_type end_day(year_type y) const
- {
- return dst_end_.get_date(y);
- }
- virtual std::string end_rule_as_string() const
- {
- return dst_end_.to_string();
- }
- private:
- start_rule dst_start_;
- end_rule dst_end_;
- };
-
-
-} }//namespace
-
-
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp
deleted file mode 100644
index 0478592941e..00000000000
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef DATE_TIME_GREGORIAN_CALENDAR_HPP__
-#define DATE_TIME_GREGORIAN_CALENDAR_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/date_time/compiler_config.hpp>
-
-namespace boost {
-namespace date_time {
-
-
- //! An implementation of the Gregorian calendar
- /*! This is a parameterized implementation of a proleptic Gregorian Calendar that
- can be used in the creation of date systems or just to perform calculations.
- All the methods of this class are static functions, so the intent is to
- never create instances of this class.
- @param ymd_type_ Struct type representing the year, month, day. The ymd_type must
- define a of types for the year, month, and day. These types need to be
- arithmetic types.
- @param date_int_type_ Underlying type for the date count. Must be an arithmetic type.
- */
- template<typename ymd_type_, typename date_int_type_>
- class BOOST_SYMBOL_VISIBLE gregorian_calendar_base {
- public:
- //! define a type a date split into components
- typedef ymd_type_ ymd_type;
- //! define a type for representing months
- typedef typename ymd_type::month_type month_type;
- //! define a type for representing days
- typedef typename ymd_type::day_type day_type;
- //! Type to hold a stand alone year value (eg: 2002)
- typedef typename ymd_type::year_type year_type;
- //! Define the integer type to use for internal calculations
- typedef date_int_type_ date_int_type;
-
-
- static unsigned short day_of_week(const ymd_type& ymd);
- static int week_number(const ymd_type&ymd);
- //static unsigned short day_of_year(date_int_type);
- static date_int_type day_number(const ymd_type& ymd);
- static date_int_type julian_day_number(const ymd_type& ymd);
- static date_int_type modjulian_day_number(const ymd_type& ymd);
- static ymd_type from_day_number(date_int_type);
- static ymd_type from_julian_day_number(date_int_type);
- static ymd_type from_modjulian_day_number(date_int_type);
- static bool is_leap_year(year_type);
- static unsigned short end_of_month_day(year_type y, month_type m);
- static ymd_type epoch();
- static unsigned short days_in_week();
-
- };
-
-
-
-} } //namespace
-
-#ifndef NO_BOOST_DATE_TIME_INLINE
-#include "boost/date_time/gregorian_calendar.ipp"
-#endif
-
-
-
-#endif
-
-
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
deleted file mode 100644
index 6337c3da1a5..00000000000
--- a/src/third_party/boost-1.69.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* = 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.69.0/boost/date_time/time_zone_base.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_zone_base.hpp
deleted file mode 100644
index a7884290735..00000000000
--- a/src/third_party/boost-1.69.0/boost/date_time/time_zone_base.hpp
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef _DATE_TIME_TIME_ZONE_BASE__
-#define _DATE_TIME_TIME_ZONE_BASE__
-
-/* Copyright (c) 2003-2005 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 <string>
-#include <sstream>
-#include <boost/date_time/compiler_config.hpp>
-
-namespace boost {
-namespace date_time {
-
-
-
- //! Interface class for dynamic time zones.
- /*! This class represents the base interface for all timezone
- * representations. Subclasses may provide different systems
- * for identifying a particular zone. For example some may
- * provide a geographical based zone construction while others
- * may specify the offset from GMT. Another possible implementation
- * would be to convert from POSIX timezone strings. Regardless of
- * the construction technique, this is the interface that these
- * time zone types must provide.
- *
- * Note that this class is intended to be used as a shared
- * resource (hence the derivation from boost::counted_base.
- */
- template<typename time_type, typename CharT>
- class BOOST_SYMBOL_VISIBLE time_zone_base {
- public:
- typedef CharT char_type;
- typedef std::basic_string<CharT> string_type;
- typedef std::basic_ostringstream<CharT> stringstream_type;
- typedef typename time_type::date_type::year_type year_type;
- typedef typename time_type::time_duration_type time_duration_type;
-
- time_zone_base() {}
- virtual ~time_zone_base() {}
- //!String for the timezone when in daylight savings (eg: EDT)
- virtual string_type dst_zone_abbrev() const=0;
- //!String for the zone when not in daylight savings (eg: EST)
- virtual string_type std_zone_abbrev() const=0;
- //!String for the timezone when in daylight savings (eg: Eastern Daylight Time)
- virtual string_type dst_zone_name() const=0;
- //!String for the zone when not in daylight savings (eg: Eastern Standard Time)
- virtual string_type std_zone_name() const=0;
- //! True if zone uses daylight savings adjustments otherwise false
- virtual bool has_dst() const=0;
- //! Local time that DST starts -- undefined if has_dst is false
- virtual time_type dst_local_start_time(year_type y) const=0;
- //! Local time that DST ends -- undefined if has_dst is false
- virtual time_type dst_local_end_time(year_type y) const=0;
- //! Base offset from UTC for zone (eg: -07:30:00)
- virtual time_duration_type base_utc_offset() const=0;
- //! Adjustment forward or back made while DST is in effect
- virtual time_duration_type dst_offset() const=0;
- //! Returns a POSIX time_zone string for this object
- virtual string_type to_posix_string() const =0;
-
- private:
-
- };
-
-
- //! Structure which holds the time offsets associated with daylight savings time
- /*!
- *@param time_duration_type A type used to represent the offset
- */
- template<class time_duration_type>
- class dst_adjustment_offsets
- {
- public:
- dst_adjustment_offsets(const time_duration_type& dst_adjust,
- const time_duration_type& dst_start_offset,
- const time_duration_type& dst_end_offset) :
- dst_adjust_(dst_adjust),
- dst_start_offset_(dst_start_offset),
- dst_end_offset_(dst_end_offset)
- {}
-
- //! Amount DST adjusts the clock eg: plus one hour
- time_duration_type dst_adjust_;
- //! Time past midnight on start transition day that dst starts
- time_duration_type dst_start_offset_;
- //! Time past midnight on end transition day that dst ends
- time_duration_type dst_end_offset_;
- };
-
-
-} } //namespace date_time
-
-
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp
deleted file mode 100644
index 405e7e0a708..00000000000
--- a/src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef DATE_TIME_TIME_ZONE_NAMES_HPP__
-#define DATE_TIME_TIME_ZONE_NAMES_HPP__
-
-/* Copyright (c) 2002-2003,2005 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 <string>
-
-namespace boost {
-namespace date_time {
-
- template<class CharT>
- struct default_zone_names {
- public:
- typedef CharT char_type;
- static const char_type standard_name[9];
- static const char_type standard_abbrev[11];
- static const char_type non_dst_identifier[7];
- };
- template <class CharT>
- const typename default_zone_names<CharT>::char_type
- default_zone_names<CharT>::standard_name[9] =
- {'s','t','d','_','n','a','m','e'};
-
- template <class CharT>
- const typename default_zone_names<CharT>::char_type
- default_zone_names<CharT>::standard_abbrev[11] =
- {'s','t','d','_','a','b','b','r','e','v'};
-
- template <class CharT>
- const typename default_zone_names<CharT>::char_type
- default_zone_names<CharT>::non_dst_identifier[7] =
- {'n','o','-','d','s','t'};
-
- //! Base type that holds various string names for timezone output.
- /*! Class that holds various types of strings used for timezones.
- * For example, for the western United States there is the full
- * name: Pacific Standard Time and the abbreviated name: PST.
- * During daylight savings there are additional names:
- * Pacific Daylight Time and PDT.
- *@parm CharT Allows class to support different character types
- */
- template<class CharT>
- class time_zone_names_base
- {
- public:
- typedef std::basic_string<CharT> string_type;
- time_zone_names_base() :
- std_zone_name_(default_zone_names<CharT>::standard_name),
- std_zone_abbrev_(default_zone_names<CharT>::standard_abbrev),
- dst_zone_name_(default_zone_names<CharT>::non_dst_identifier),
- dst_zone_abbrev_(default_zone_names<CharT>::non_dst_identifier)
- {}
- time_zone_names_base(const string_type& std_zone_name_str,
- const string_type& std_zone_abbrev_str,
- const string_type& dst_zone_name_str,
- const string_type& dst_zone_abbrev_str) :
- std_zone_name_(std_zone_name_str),
- std_zone_abbrev_(std_zone_abbrev_str),
- dst_zone_name_(dst_zone_name_str),
- dst_zone_abbrev_(dst_zone_abbrev_str)
- {}
- string_type dst_zone_abbrev() const
- {
- return dst_zone_abbrev_;
- }
- string_type std_zone_abbrev() const
- {
- return std_zone_abbrev_;
- }
- string_type dst_zone_name() const
- {
- return dst_zone_name_;
- }
- string_type std_zone_name() const
- {
- return std_zone_name_;
- }
- private:
- string_type std_zone_name_;
- string_type std_zone_abbrev_;
- string_type dst_zone_name_;
- string_type dst_zone_abbrev_;
-
- };
-
- //! Specialization of timezone names for standard char.
- //typedef time_zone_names_base<char> time_zone_names;
-
-} } //namespace
-
-
-#endif
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
deleted file mode 100644
index b9778a92e77..00000000000
--- a/src/third_party/boost-1.69.0/boost/detail/allocator_utilities.hpp
+++ /dev/null
@@ -1,193 +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/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.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp
deleted file mode 100644
index 599994662c2..00000000000
--- a/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp
+++ /dev/null
@@ -1,293 +0,0 @@
-// -----------------------------------------------------------
-//
-// 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/filesystem.hpp b/src/third_party/boost-1.69.0/boost/filesystem.hpp
deleted file mode 100644
index 0122634d363..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// boost/filesystem.hpp --------------------------------------------------------------//
-
-// 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
-
-//--------------------------------------------------------------------------------------//
-
-#ifndef BOOST_FILESYSTEM_FILESYSTEM_HPP
-#define BOOST_FILESYSTEM_FILESYSTEM_HPP
-
-# include <boost/filesystem/config.hpp>
-# include <boost/filesystem/path.hpp>
-# include <boost/filesystem/operations.hpp>
-# include <boost/filesystem/convenience.hpp>
-# include <boost/filesystem/string_file.hpp>
-
-#endif // BOOST_FILESYSTEM_FILESYSTEM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/config.hpp b/src/third_party/boost-1.69.0/boost/filesystem/config.hpp
deleted file mode 100644
index 815976959a3..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/config.hpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// boost/filesystem/v3/config.hpp ----------------------------------------------------//
-
-// Copyright Beman Dawes 2003
-
-// 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_CONFIG_HPP
-#define BOOST_FILESYSTEM3_CONFIG_HPP
-
-# if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION != 3
-# error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
-# endif
-
-# if !defined(BOOST_FILESYSTEM_VERSION)
-# define BOOST_FILESYSTEM_VERSION 3
-# endif
-
-#define BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions
-
-// This header implements separate compilation features as described in
-// http://www.boost.org/more/separate_compilation.html
-
-#include <boost/config.hpp>
-#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
-#include <boost/detail/workaround.hpp>
-
-// BOOST_FILESYSTEM_DEPRECATED needed for source compiles -----------------------------//
-
-# ifdef BOOST_FILESYSTEM_SOURCE
-# define BOOST_FILESYSTEM_DEPRECATED
-# undef BOOST_FILESYSTEM_NO_DEPRECATED // fixes #9454, src bld fails if NO_DEP defined
-# endif
-
-// throw an exception ----------------------------------------------------------------//
-//
-// Exceptions were originally thrown via boost::throw_exception().
-// As throw_exception() became more complex, it caused user error reporting
-// to be harder to interpret, since the exception reported became much more complex.
-// The immediate fix was to throw directly, wrapped in a macro to make any later change
-// easier.
-
-#define BOOST_FILESYSTEM_THROW(EX) throw EX
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
-// This header implements separate compilation features as described in
-// http://www.boost.org/more/separate_compilation.html
-
-// normalize macros ------------------------------------------------------------------//
-
-#if !defined(BOOST_FILESYSTEM_DYN_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) \
- && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
-# define BOOST_FILESYSTEM_STATIC_LINK
-#endif
-
-#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_FILESYSTEM_DYN_LINK)
-# define BOOST_FILESYSTEM_DYN_LINK
-#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK)
-# define BOOST_FILESYSTEM_STATIC_LINK
-#endif
-
-#if defined(BOOST_FILESYSTEM_DYN_LINK) && defined(BOOST_FILESYSTEM_STATIC_LINK)
-# error Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
-#endif
-
-#if defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB)
-# define BOOST_FILESYSTEM_NO_LIB
-#endif
-
-// enable dynamic linking ------------------------------------------------------------//
-
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
-# if defined(BOOST_FILESYSTEM_SOURCE)
-# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_EXPORT
-# else
-# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_IMPORT
-# endif
-#else
-# define BOOST_FILESYSTEM_DECL
-#endif
-
-// enable automatic library variant selection ----------------------------------------//
-
-#if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) \
- && !defined(BOOST_FILESYSTEM_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_filesystem
-//
-// If we're importing code from a dll, then tell auto_link.hpp about it:
-//
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_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_FILESYSTEM3_CONFIG_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp b/src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp
deleted file mode 100644
index f0bd9869092..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// boost/filesystem/convenience.hpp ----------------------------------------//
-
-// Copyright Beman Dawes, 2002-2005
-// Copyright Vladimir Prus, 2002
-// 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 library home page at http://www.boost.org/libs/filesystem
-
-//----------------------------------------------------------------------------//
-
-#ifndef BOOST_FILESYSTEM3_CONVENIENCE_HPP
-#define BOOST_FILESYSTEM3_CONVENIENCE_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/operations.hpp>
-#include <boost/system/error_code.hpp>
-
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-namespace boost
-{
- namespace filesystem
- {
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
-
- inline std::string extension(const path & p)
- {
- return p.extension().string();
- }
-
- inline std::string basename(const path & p)
- {
- return p.stem().string();
- }
-
- inline path change_extension( const path & p, const path & new_extension )
- {
- path new_p( p );
- new_p.replace_extension( new_extension );
- return new_p;
- }
-
-# endif
-
-
- } // namespace filesystem
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-#endif // BOOST_FILESYSTEM3_CONVENIENCE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp b/src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp
deleted file mode 100644
index 2c4a16a628e..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// boost/filesystem/detail/macro_value.hpp -------------------------------------------//
-
-// (C) Copyright John Maddock 2001 - 2003
-// (C) Copyright Jens Maurer 2001
-// (C) Copyright Peter Dimov 2001
-// (C) Copyright Darin Adler 2001
-// (C) Copyright Beman Dawes 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_FILESYSTEM_MACRO_VALUE_HPP
-#define BOOST_FILESYSTEM_MACRO_VALUE_HPP
-
-#include <boost/config.hpp>
-#include <boost/assert.hpp>
-#include <cstdlib>
-
-namespace boost
-{
- namespace detail
- {
- inline const char* macro_value(const char* name, const char* value)
- {
- static const char* no_value = "[no value]";
- static const char* not_defined = "[not defined]";
-
- BOOST_ASSERT_MSG(name, "name argument must not be a null pointer");
- BOOST_ASSERT_MSG(value, "value argument must not be a null pointer");
-
- return strcmp(name, value + 1)
- ? ((*value && *(value+1)) ? (value+1) : no_value)
- : not_defined; // name == value+1 so the macro is not defined
- }
- } // detail
-} // boost
-
-#define BOOST_MACRO_VALUE(X) boost::detail::macro_value(#X, BOOST_STRINGIZE(=X))
-
-#endif // BOOST_FILESYSTEM_MACRO_VALUE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp b/src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp
deleted file mode 100644
index 07272388763..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// boost/filesystem/fstream.hpp ------------------------------------------------------//
-
-// Copyright Beman Dawes 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_FSTREAM_HPP
-#define BOOST_FILESYSTEM3_FSTREAM_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/path.hpp>
-#include <iosfwd>
-#include <fstream>
-
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-// on Windows, except for standard libaries known to have wchar_t overloads for
-// file stream I/O, use path::string() to get a narrow character c_str()
-#if defined(BOOST_WINDOWS_API) \
- && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION))
- // !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware
-# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available
-#else // use the native c_str, which will be narrow on POSIX, wide on Windows
-# define BOOST_FILESYSTEM_C_STR c_str()
-#endif
-
-namespace boost
-{
-namespace filesystem
-{
-
-//--------------------------------------------------------------------------------------//
-// basic_filebuf //
-//--------------------------------------------------------------------------------------//
-
- template < class charT, class traits = std::char_traits<charT> >
- class basic_filebuf : public std::basic_filebuf<charT,traits>
- {
- private: // disallow copying
- basic_filebuf(const basic_filebuf&);
- const basic_filebuf& operator=(const basic_filebuf&);
-
- public:
- basic_filebuf() {}
- virtual ~basic_filebuf() {}
-
- basic_filebuf<charT,traits>*
- open(const path& p, std::ios_base::openmode mode)
- {
- return std::basic_filebuf<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode)
- ? this : 0;
- }
- };
-
-//--------------------------------------------------------------------------------------//
-// basic_ifstream //
-//--------------------------------------------------------------------------------------//
-
- template < class charT, class traits = std::char_traits<charT> >
- class basic_ifstream : public std::basic_ifstream<charT,traits>
- {
- private: // disallow copying
- basic_ifstream(const basic_ifstream&);
- const basic_ifstream& operator=(const basic_ifstream&);
-
- public:
- basic_ifstream() {}
-
- // use two signatures, rather than one signature with default second
- // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416)
-
- explicit basic_ifstream(const path& p)
- : std::basic_ifstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, std::ios_base::in) {}
-
- basic_ifstream(const path& p, std::ios_base::openmode mode)
- : std::basic_ifstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, mode) {}
-
- void open(const path& p)
- { std::basic_ifstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, std::ios_base::in); }
-
- void open(const path& p, std::ios_base::openmode mode)
- { std::basic_ifstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode); }
-
- virtual ~basic_ifstream() {}
- };
-
-//--------------------------------------------------------------------------------------//
-// basic_ofstream //
-//--------------------------------------------------------------------------------------//
-
- template < class charT, class traits = std::char_traits<charT> >
- class basic_ofstream : public std::basic_ofstream<charT,traits>
- {
- private: // disallow copying
- basic_ofstream(const basic_ofstream&);
- const basic_ofstream& operator=(const basic_ofstream&);
-
- public:
- basic_ofstream() {}
-
- // use two signatures, rather than one signature with default second
- // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416)
-
- explicit basic_ofstream(const path& p)
- : std::basic_ofstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, std::ios_base::out) {}
-
- basic_ofstream(const path& p, std::ios_base::openmode mode)
- : std::basic_ofstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, mode) {}
-
- void open(const path& p)
- { std::basic_ofstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, std::ios_base::out); }
-
- void open(const path& p, std::ios_base::openmode mode)
- { std::basic_ofstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode); }
-
- virtual ~basic_ofstream() {}
- };
-
-//--------------------------------------------------------------------------------------//
-// basic_fstream //
-//--------------------------------------------------------------------------------------//
-
- template < class charT, class traits = std::char_traits<charT> >
- class basic_fstream : public std::basic_fstream<charT,traits>
- {
- private: // disallow copying
- basic_fstream(const basic_fstream&);
- const basic_fstream & operator=(const basic_fstream&);
-
- public:
- basic_fstream() {}
-
- // use two signatures, rather than one signature with default second
- // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416)
-
- explicit basic_fstream(const path& p)
- : std::basic_fstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR,
- std::ios_base::in | std::ios_base::out) {}
-
- basic_fstream(const path& p, std::ios_base::openmode mode)
- : std::basic_fstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, mode) {}
-
- void open(const path& p)
- { std::basic_fstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR,
- std::ios_base::in | std::ios_base::out); }
-
- void open(const path& p, std::ios_base::openmode mode)
- { std::basic_fstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode); }
-
- virtual ~basic_fstream() {}
-
- };
-
-//--------------------------------------------------------------------------------------//
-// typedefs //
-//--------------------------------------------------------------------------------------//
-
- typedef basic_filebuf<char> filebuf;
- typedef basic_ifstream<char> ifstream;
- typedef basic_ofstream<char> ofstream;
- typedef basic_fstream<char> fstream;
-
- typedef basic_filebuf<wchar_t> wfilebuf;
- typedef basic_ifstream<wchar_t> wifstream;
- typedef basic_ofstream<wchar_t> wofstream;
- typedef basic_fstream<wchar_t> wfstream;
-
-} // namespace filesystem
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-#endif // BOOST_FILESYSTEM3_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
deleted file mode 100644
index 640d288882b..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/operations.hpp
+++ /dev/null
@@ -1,1376 +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/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.69.0/boost/filesystem/path.hpp b/src/third_party/boost-1.69.0/boost/filesystem/path.hpp
deleted file mode 100644
index 65e27b17dac..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/path.hpp
+++ /dev/null
@@ -1,1015 +0,0 @@
-// filesystem path.hpp ---------------------------------------------------------------//
-
-// Copyright Beman Dawes 2002-2005, 2009
-// 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
-
-// path::stem(), extension(), and replace_extension() are based on
-// basename(), extension(), and change_extension() from the original
-// filesystem/convenience.hpp header by Vladimir Prus.
-
-#ifndef BOOST_FILESYSTEM_PATH_HPP
-#define BOOST_FILESYSTEM_PATH_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_traits.hpp> // includes <cwchar>
-#include <boost/system/error_code.hpp>
-#include <boost/system/system_error.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/io/detail/quoted_manip.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/functional/hash_fwd.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <string>
-#include <iterator>
-#include <cstring>
-#include <iosfwd>
-#include <stdexcept>
-#include <cassert>
-#include <locale>
-#include <algorithm>
-
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-namespace boost
-{
-namespace filesystem
-{
-
- //------------------------------------------------------------------------------------//
- // //
- // class path //
- // //
- //------------------------------------------------------------------------------------//
-
- class BOOST_FILESYSTEM_DECL path
- {
- public:
-
- // value_type is the character type used by the operating system API to
- // represent paths.
-
-# ifdef BOOST_WINDOWS_API
- typedef wchar_t value_type;
- BOOST_STATIC_CONSTEXPR value_type separator = L'/';
- BOOST_STATIC_CONSTEXPR value_type preferred_separator = L'\\';
- BOOST_STATIC_CONSTEXPR value_type dot = L'.';
-# else
- typedef char value_type;
- BOOST_STATIC_CONSTEXPR value_type separator = '/';
- BOOST_STATIC_CONSTEXPR value_type preferred_separator = '/';
- BOOST_STATIC_CONSTEXPR value_type dot = '.';
-# endif
- typedef std::basic_string<value_type> string_type;
- typedef std::codecvt<wchar_t, char,
- std::mbstate_t> codecvt_type;
-
-
- // ----- character encoding conversions -----
-
- // Following the principle of least astonishment, path input arguments
- // passed to or obtained from the operating system via objects of
- // class path behave as if they were directly passed to or
- // obtained from the O/S API, unless conversion is explicitly requested.
- //
- // POSIX specfies that path strings are passed unchanged to and from the
- // API. Note that this is different from the POSIX command line utilities,
- // which convert according to a locale.
- //
- // Thus for POSIX, char strings do not undergo conversion. wchar_t strings
- // are converted to/from char using the path locale or, if a conversion
- // argument is given, using a conversion object modeled on
- // std::wstring_convert.
- //
- // The path locale, which is global to the thread, can be changed by the
- // imbue() function. It is initialized to an implementation defined locale.
- //
- // For Windows, wchar_t strings do not undergo conversion. char strings
- // are converted using the "ANSI" or "OEM" code pages, as determined by
- // the AreFileApisANSI() function, or, if a conversion argument is given,
- // using a conversion object modeled on std::wstring_convert.
- //
- // See m_pathname comments for further important rationale.
-
- // TODO: rules needed for operating systems that use / or .
- // differently, or format directory paths differently from file paths.
- //
- // **********************************************************************************
- //
- // More work needed: How to handle an operating system that may have
- // slash characters or dot characters in valid filenames, either because
- // it doesn't follow the POSIX standard, or because it allows MBCS
- // filename encodings that may contain slash or dot characters. For
- // example, ISO/IEC 2022 (JIS) encoding which allows switching to
- // JIS x0208-1983 encoding. A valid filename in this set of encodings is
- // 0x1B 0x24 0x42 [switch to X0208-1983] 0x24 0x2F [U+304F Kiragana letter KU]
- // ^^^^
- // Note that 0x2F is the ASCII slash character
- //
- // **********************************************************************************
-
- // Supported source arguments: half-open iterator range, container, c-array,
- // and single pointer to null terminated string.
-
- // All source arguments except pointers to null terminated byte strings support
- // multi-byte character strings which may have embedded nulls. Embedded null
- // support is required for some Asian languages on Windows.
-
- // "const codecvt_type& cvt=codecvt()" default arguments are not used because this
- // limits the impact of locale("") initialization failures on POSIX systems to programs
- // that actually depend on locale(""). It further ensures that exceptions thrown
- // as a result of such failues occur after main() has started, so can be caught.
-
- // ----- constructors -----
-
- path() BOOST_NOEXCEPT {}
- path(const path& p) : m_pathname(p.m_pathname) {}
-
- template <class Source>
- path(Source const& source,
- typename boost::enable_if<path_traits::is_pathable<
- typename boost::decay<Source>::type> >::type* =0)
- {
- path_traits::dispatch(source, m_pathname);
- }
-
- path(const value_type* s) : m_pathname(s) {}
- path(value_type* s) : m_pathname(s) {}
- path(const string_type& s) : m_pathname(s) {}
- path(string_type& s) : m_pathname(s) {}
-
- // 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)
- path(path&& p) BOOST_NOEXCEPT { m_pathname = std::move(p.m_pathname); }
- path& operator=(path&& p) BOOST_NOEXCEPT
- { m_pathname = std::move(p.m_pathname); return *this; }
-# endif
-
- template <class Source>
- path(Source const& source, const codecvt_type& cvt)
- {
- path_traits::dispatch(source, m_pathname, cvt);
- }
-
- template <class InputIterator>
- path(InputIterator begin, InputIterator end)
- {
- if (begin != end)
- {
- // convert requires contiguous string, so copy
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
- }
- }
-
- template <class InputIterator>
- path(InputIterator begin, InputIterator end, const codecvt_type& cvt)
- {
- if (begin != end)
- {
- // convert requires contiguous string, so copy
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
- }
- }
-
- // ----- assignments -----
-
- path& operator=(const path& p)
- {
- m_pathname = p.m_pathname;
- return *this;
- }
-
- template <class Source>
- typename boost::enable_if<path_traits::is_pathable<
- typename boost::decay<Source>::type>, path&>::type
- operator=(Source const& source)
- {
- m_pathname.clear();
- path_traits::dispatch(source, m_pathname);
- return *this;
- }
-
- // value_type overloads
-
- path& operator=(const value_type* ptr) // required in case ptr overlaps *this
- {m_pathname = ptr; return *this;}
- path& operator=(value_type* ptr) // required in case ptr overlaps *this
- {m_pathname = ptr; return *this;}
- path& operator=(const string_type& s) {m_pathname = s; return *this;}
- path& operator=(string_type& s) {m_pathname = s; return *this;}
-
- path& assign(const value_type* ptr, const codecvt_type&) // required in case ptr overlaps *this
- {m_pathname = ptr; return *this;}
- template <class Source>
- path& assign(Source const& source, const codecvt_type& cvt)
- {
- m_pathname.clear();
- path_traits::dispatch(source, m_pathname, cvt);
- return *this;
- }
-
- template <class InputIterator>
- path& assign(InputIterator begin, InputIterator end)
- {
- m_pathname.clear();
- if (begin != end)
- {
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
- }
- return *this;
- }
-
- template <class InputIterator>
- path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt)
- {
- m_pathname.clear();
- if (begin != end)
- {
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
- }
- return *this;
- }
-
- // ----- concatenation -----
-
- template <class Source>
- typename boost::enable_if<path_traits::is_pathable<
- typename boost::decay<Source>::type>, path&>::type
- operator+=(Source const& source)
- {
- return concat(source);
- }
-
- // value_type overloads. Same rationale as for constructors above
- path& operator+=(const path& p) { m_pathname += p.m_pathname; return *this; }
- path& operator+=(const value_type* ptr) { m_pathname += ptr; return *this; }
- path& operator+=(value_type* ptr) { m_pathname += ptr; return *this; }
- path& operator+=(const string_type& s) { m_pathname += s; return *this; }
- path& operator+=(string_type& s) { m_pathname += s; return *this; }
- path& operator+=(value_type c) { m_pathname += c; return *this; }
-
- template <class CharT>
- typename boost::enable_if<is_integral<CharT>, path&>::type
- operator+=(CharT c)
- {
- CharT tmp[2];
- tmp[0] = c;
- tmp[1] = 0;
- return concat(tmp);
- }
-
- template <class Source>
- path& concat(Source const& source)
- {
- path_traits::dispatch(source, m_pathname);
- return *this;
- }
-
- template <class Source>
- path& concat(Source const& source, const codecvt_type& cvt)
- {
- path_traits::dispatch(source, m_pathname, cvt);
- return *this;
- }
-
- template <class InputIterator>
- path& concat(InputIterator begin, InputIterator end)
- {
- if (begin == end)
- return *this;
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
- return *this;
- }
-
- template <class InputIterator>
- path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt)
- {
- if (begin == end)
- return *this;
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
- return *this;
- }
-
- // ----- appends -----
-
- // if a separator is added, it is the preferred separator for the platform;
- // slash for POSIX, backslash for Windows
-
- path& operator/=(const path& p);
-
- template <class Source>
- typename boost::enable_if<path_traits::is_pathable<
- typename boost::decay<Source>::type>, path&>::type
- operator/=(Source const& source)
- {
- return append(source);
- }
-
- path& operator/=(const value_type* ptr);
- path& operator/=(value_type* ptr)
- {
- return this->operator/=(const_cast<const value_type*>(ptr));
- }
- path& operator/=(const string_type& s) { return this->operator/=(path(s)); }
- path& operator/=(string_type& s) { return this->operator/=(path(s)); }
-
- path& append(const value_type* ptr) // required in case ptr overlaps *this
- {
- this->operator/=(ptr);
- return *this;
- }
-
- path& append(const value_type* ptr, const codecvt_type&) // required in case ptr overlaps *this
- {
- this->operator/=(ptr);
- return *this;
- }
-
- template <class Source>
- path& append(Source const& source);
-
- template <class Source>
- path& append(Source const& source, const codecvt_type& cvt);
-
- template <class InputIterator>
- path& append(InputIterator begin, InputIterator end);
-
- template <class InputIterator>
- path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt);
-
- // ----- modifiers -----
-
- void clear() BOOST_NOEXCEPT { m_pathname.clear(); }
- path& make_preferred()
-# ifdef BOOST_POSIX_API
- { return *this; } // POSIX no effect
-# else // BOOST_WINDOWS_API
- ; // change slashes to backslashes
-# endif
- path& remove_filename();
- path& remove_trailing_separator();
- path& replace_extension(const path& new_extension = path());
- void swap(path& rhs) BOOST_NOEXCEPT { m_pathname.swap(rhs.m_pathname); }
-
- // ----- observers -----
-
- // For operating systems that format file paths differently than directory
- // paths, return values from observers are formatted as file names unless there
- // is a trailing separator, in which case returns are formatted as directory
- // paths. POSIX and Windows make no such distinction.
-
- // Implementations are permitted to return const values or const references.
-
- // The string or path returned by an observer are specified as being formatted
- // as "native" or "generic".
- //
- // For POSIX, these are all the same format; slashes and backslashes are as input and
- // are not modified.
- //
- // For Windows, native: as input; slashes and backslashes are not modified;
- // this is the format of the internally stored string.
- // generic: backslashes are converted to slashes
-
- // ----- native format observers -----
-
- const string_type& native() const BOOST_NOEXCEPT { return m_pathname; }
- const value_type* c_str() const BOOST_NOEXCEPT { return m_pathname.c_str(); }
- string_type::size_type size() const BOOST_NOEXCEPT { return m_pathname.size(); }
-
- template <class String>
- String string() const;
-
- template <class String>
- String string(const codecvt_type& cvt) const;
-
-# ifdef BOOST_WINDOWS_API
- const std::string string() const
- {
- std::string tmp;
- if (!m_pathname.empty())
- path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
- tmp);
- return tmp;
- }
- const std::string string(const codecvt_type& cvt) const
- {
- std::string tmp;
- if (!m_pathname.empty())
- path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
- tmp, cvt);
- return tmp;
- }
-
- // string_type is std::wstring, so there is no conversion
- const std::wstring& wstring() const { return m_pathname; }
- const std::wstring& wstring(const codecvt_type&) const { return m_pathname; }
-
-# else // BOOST_POSIX_API
- // string_type is std::string, so there is no conversion
- const std::string& string() const { return m_pathname; }
- const std::string& string(const codecvt_type&) const { return m_pathname; }
-
- const std::wstring wstring() const
- {
- std::wstring tmp;
- if (!m_pathname.empty())
- path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
- tmp);
- return tmp;
- }
- const std::wstring wstring(const codecvt_type& cvt) const
- {
- std::wstring tmp;
- if (!m_pathname.empty())
- path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
- tmp, cvt);
- return tmp;
- }
-
-# endif
-
- // ----- generic format observers -----
-
- // Experimental generic function returning generic formatted path (i.e. separators
- // are forward slashes). Motivation: simpler than a family of generic_*string
- // functions.
- path generic_path() const
- {
-# ifdef BOOST_WINDOWS_API
- path tmp;
- std::replace_copy(m_pathname.begin(), m_pathname.end(),
- std::back_inserter(tmp.m_pathname), L'\\', L'/');
- return tmp;
-# else
- return path(*this);
-# endif
- }
-
- template <class String>
- String generic_string() const;
-
- template <class String>
- String generic_string(const codecvt_type& cvt) const;
-
-# ifdef BOOST_WINDOWS_API
- const std::string generic_string() const;
- const std::string generic_string(const codecvt_type& cvt) const;
- const std::wstring generic_wstring() const;
- const std::wstring generic_wstring(const codecvt_type&) const { return generic_wstring(); };
-
-# else // BOOST_POSIX_API
- // On POSIX-like systems, the generic format is the same as the native format
- const std::string& generic_string() const { return m_pathname; }
- const std::string& generic_string(const codecvt_type&) const { return m_pathname; }
- const std::wstring generic_wstring() const { return wstring(); }
- const std::wstring generic_wstring(const codecvt_type& cvt) const { return wstring(cvt); }
-
-# endif
-
- // ----- compare -----
-
- int compare(const path& p) const BOOST_NOEXCEPT; // generic, lexicographical
- int compare(const std::string& s) const { return compare(path(s)); }
- int compare(const value_type* s) const { return compare(path(s)); }
-
- // ----- decomposition -----
-
- path root_path() const;
- path root_name() const; // returns 0 or 1 element path
- // even on POSIX, root_name() is non-empty() for network paths
- path root_directory() const; // returns 0 or 1 element path
- path relative_path() const;
- path parent_path() const;
- path filename() const; // returns 0 or 1 element path
- path stem() const; // returns 0 or 1 element path
- path extension() const; // returns 0 or 1 element path
-
- // ----- query -----
-
- bool empty() const BOOST_NOEXCEPT{ return m_pathname.empty(); }
- bool filename_is_dot() const;
- bool filename_is_dot_dot() const;
- bool has_root_path() const { return has_root_directory() || has_root_name(); }
- bool has_root_name() const { return !root_name().empty(); }
- bool has_root_directory() const { return !root_directory().empty(); }
- bool has_relative_path() const { return !relative_path().empty(); }
- bool has_parent_path() const { return !parent_path().empty(); }
- bool has_filename() const { return !m_pathname.empty(); }
- bool has_stem() const { return !stem().empty(); }
- bool has_extension() const { return !extension().empty(); }
- bool is_relative() const { return !is_absolute(); }
- bool is_absolute() const
- {
-# ifdef BOOST_WINDOWS_API
- return has_root_name() && has_root_directory();
-# else
- return has_root_directory();
-# endif
- }
-
- // ----- lexical operations -----
-
- path lexically_normal() const;
- path lexically_relative(const path& base) const;
- path lexically_proximate(const path& base) const
- {
- path tmp(lexically_relative(base));
- return tmp.empty() ? *this : tmp;
- }
-
- // ----- iterators -----
-
- class iterator;
- typedef iterator const_iterator;
- class reverse_iterator;
- typedef reverse_iterator const_reverse_iterator;
-
- iterator begin() const;
- iterator end() const;
- reverse_iterator rbegin() const;
- reverse_iterator rend() const;
-
- // ----- static member functions -----
-
- static std::locale imbue(const std::locale& loc);
- static const codecvt_type& codecvt();
-
- // ----- deprecated functions -----
-
-# if defined(BOOST_FILESYSTEM_DEPRECATED) && defined(BOOST_FILESYSTEM_NO_DEPRECATED)
-# error both BOOST_FILESYSTEM_DEPRECATED and BOOST_FILESYSTEM_NO_DEPRECATED are defined
-# endif
-
-# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
- // recently deprecated functions supplied by default
- path& normalize() {
- path tmp(lexically_normal());
- m_pathname.swap(tmp.m_pathname);
- return *this;
- }
- path& remove_leaf() { return remove_filename(); }
- path leaf() const { return filename(); }
- path branch_path() const { return parent_path(); }
- path generic() const { return generic_path(); }
- bool has_leaf() const { return !m_pathname.empty(); }
- bool has_branch_path() const { return !parent_path().empty(); }
- bool is_complete() const { return is_absolute(); }
-# endif
-
-# if defined(BOOST_FILESYSTEM_DEPRECATED)
- // deprecated functions with enough signature or semantic changes that they are
- // not supplied by default
- const std::string file_string() const { return string(); }
- const std::string directory_string() const { return string(); }
- const std::string native_file_string() const { return string(); }
- const std::string native_directory_string() const { return string(); }
- const string_type external_file_string() const { return native(); }
- const string_type external_directory_string() const { return native(); }
-
- // older functions no longer supported
- //typedef bool (*name_check)(const std::string & name);
- //basic_path(const string_type& str, name_check) { operator/=(str); }
- //basic_path(const typename string_type::value_type* s, name_check)
- // { operator/=(s);}
- //static bool default_name_check_writable() { return false; }
- //static void default_name_check(name_check) {}
- //static name_check default_name_check() { return 0; }
- //basic_path& canonize();
-# endif
-
-//--------------------------------------------------------------------------------------//
-// class path private members //
-//--------------------------------------------------------------------------------------//
-
- private:
-
-# if defined(_MSC_VER)
-# pragma warning(push) // Save warning settings
-# pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>'
-# endif // needs to have dll-interface...
-/*
- m_pathname has the type, encoding, and format required by the native
- operating system. Thus for POSIX and Windows there is no conversion for
- passing m_pathname.c_str() to the O/S API or when obtaining a path from the
- O/S API. POSIX encoding is unspecified other than for dot and slash
- characters; POSIX just treats paths as a sequence of bytes. Windows
- encoding is UCS-2 or UTF-16 depending on the version.
-*/
- string_type m_pathname; // Windows: as input; backslashes NOT converted to slashes,
- // slashes NOT converted to backslashes
-# if defined(_MSC_VER)
-# pragma warning(pop) // restore warning settings.
-# endif
-
- string_type::size_type m_append_separator_if_needed();
- // Returns: If separator is to be appended, m_pathname.size() before append. Otherwise 0.
- // Note: An append is never performed if size()==0, so a returned 0 is unambiguous.
-
- void m_erase_redundant_separator(string_type::size_type sep_pos);
- string_type::size_type m_parent_path_end() const;
-
- path& m_normalize();
-
- // Was qualified; como433beta8 reports:
- // warning #427-D: qualified name is not allowed in member declaration
- friend class iterator;
- friend bool operator<(const path& lhs, const path& rhs);
-
- // see path::iterator::increment/decrement comment below
- static void m_path_iterator_increment(path::iterator & it);
- static void m_path_iterator_decrement(path::iterator & it);
-
- }; // class path
-
- namespace detail
- {
- BOOST_FILESYSTEM_DECL
- int lex_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2);
- BOOST_FILESYSTEM_DECL
- const path& dot_path();
- BOOST_FILESYSTEM_DECL
- const path& dot_dot_path();
- }
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- typedef path wpath;
-# endif
-
- //------------------------------------------------------------------------------------//
- // class path::iterator //
- //------------------------------------------------------------------------------------//
-
- class path::iterator
- : public boost::iterator_facade<
- path::iterator,
- path const,
- boost::bidirectional_traversal_tag >
- {
- private:
- friend class boost::iterator_core_access;
- friend class boost::filesystem::path;
- friend class boost::filesystem::path::reverse_iterator;
- friend void m_path_iterator_increment(path::iterator & it);
- friend void m_path_iterator_decrement(path::iterator & it);
-
- const path& dereference() const { return m_element; }
-
- bool equal(const iterator & rhs) const
- {
- return m_path_ptr == rhs.m_path_ptr && m_pos == rhs.m_pos;
- }
-
- // iterator_facade derived classes don't seem to like implementations in
- // separate translation unit dll's, so forward to class path static members
- void increment() { m_path_iterator_increment(*this); }
- void decrement() { m_path_iterator_decrement(*this); }
-
- path m_element; // current element
- const path* m_path_ptr; // path being iterated over
- string_type::size_type m_pos; // position of m_element in
- // m_path_ptr->m_pathname.
- // if m_element is implicit dot, m_pos is the
- // position of the last separator in the path.
- // end() iterator is indicated by
- // m_pos == m_path_ptr->m_pathname.size()
- }; // path::iterator
-
- //------------------------------------------------------------------------------------//
- // class path::reverse_iterator //
- //------------------------------------------------------------------------------------//
-
- class path::reverse_iterator
- : public boost::iterator_facade<
- path::reverse_iterator,
- path const,
- boost::bidirectional_traversal_tag >
- {
- public:
-
- explicit reverse_iterator(iterator itr) : m_itr(itr)
- {
- if (itr != itr.m_path_ptr->begin())
- m_element = *--itr;
- }
- private:
- friend class boost::iterator_core_access;
- friend class boost::filesystem::path;
-
- const path& dereference() const { return m_element; }
- bool equal(const reverse_iterator& rhs) const { return m_itr == rhs.m_itr; }
- void increment()
- {
- --m_itr;
- if (m_itr != m_itr.m_path_ptr->begin())
- {
- iterator tmp = m_itr;
- m_element = *--tmp;
- }
- }
- void decrement()
- {
- m_element = *m_itr;
- ++m_itr;
- }
-
- iterator m_itr;
- path m_element;
-
- }; // path::reverse_iterator
-
- //------------------------------------------------------------------------------------//
- // //
- // non-member functions //
- // //
- //------------------------------------------------------------------------------------//
-
- // std::lexicographical_compare would infinately recurse because path iterators
- // yield paths, so provide a path aware version
- inline bool lexicographical_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2)
- { return detail::lex_compare(first1, last1, first2, last2) < 0; }
-
- inline bool operator==(const path& lhs, const path& rhs) {return lhs.compare(rhs) == 0;}
- inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;}
- inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
- inline bool operator==(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) == 0;}
- inline bool operator==(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
-
- inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;}
- inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;}
- inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
- inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;}
- inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
-
- // TODO: why do == and != have additional overloads, but the others don't?
-
- inline bool operator<(const path& lhs, const path& rhs) {return lhs.compare(rhs) < 0;}
- inline bool operator<=(const path& lhs, const path& rhs) {return !(rhs < lhs);}
- inline bool operator> (const path& lhs, const path& rhs) {return rhs < lhs;}
- inline bool operator>=(const path& lhs, const path& rhs) {return !(lhs < rhs);}
-
- inline std::size_t hash_value(const path& x)
- {
-# ifdef BOOST_WINDOWS_API
- std::size_t seed = 0;
- for(const path::value_type* it = x.c_str(); *it; ++it)
- hash_combine(seed, *it == '/' ? L'\\' : *it);
- return seed;
-# else // BOOST_POSIX_API
- return hash_range(x.native().begin(), x.native().end());
-# endif
- }
-
- inline void swap(path& lhs, path& rhs) { lhs.swap(rhs); }
-
- inline path operator/(const path& lhs, const path& rhs) { return path(lhs) /= rhs; }
-
- // inserters and extractors
- // use boost::io::quoted() to handle spaces in paths
- // use '&' as escape character to ease use for Windows paths
-
- template <class Char, class Traits>
- inline std::basic_ostream<Char, Traits>&
- operator<<(std::basic_ostream<Char, Traits>& os, const path& p)
- {
- return os
- << boost::io::quoted(p.template string<std::basic_string<Char> >(), static_cast<Char>('&'));
- }
-
- template <class Char, class Traits>
- inline std::basic_istream<Char, Traits>&
- operator>>(std::basic_istream<Char, Traits>& is, path& p)
- {
- std::basic_string<Char> str;
- is >> boost::io::quoted(str, static_cast<Char>('&'));
- p = str;
- return is;
- }
-
- // name_checks
-
- // These functions are holdovers from version 1. It isn't clear they have much
- // usefulness, or how to generalize them for later versions.
-
- BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name);
- BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name);
- BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name);
- BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name);
- BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name);
- BOOST_FILESYSTEM_DECL bool native(const std::string & name);
-
- namespace detail
- {
- // For POSIX, is_directory_separator() and is_element_separator() are identical since
- // a forward slash is the only valid directory separator and also the only valid
- // element separator. For Windows, forward slash and back slash are the possible
- // directory separators, but colon (example: "c:foo") is also an element separator.
-
- inline bool is_directory_separator(path::value_type c) BOOST_NOEXCEPT
- {
- return c == path::separator
-# ifdef BOOST_WINDOWS_API
- || c == path::preferred_separator
-# endif
- ;
- }
- inline bool is_element_separator(path::value_type c) BOOST_NOEXCEPT
- {
- return c == path::separator
-# ifdef BOOST_WINDOWS_API
- || c == path::preferred_separator || c == L':'
-# endif
- ;
- }
- } // namespace detail
-
- //------------------------------------------------------------------------------------//
- // class path miscellaneous function implementations //
- //------------------------------------------------------------------------------------//
-
- inline path::reverse_iterator path::rbegin() const { return reverse_iterator(end()); }
- inline path::reverse_iterator path::rend() const { return reverse_iterator(begin()); }
-
- inline bool path::filename_is_dot() const
- {
- // implicit dot is tricky, so actually call filename(); see path::filename() example
- // in reference.html
- path p(filename());
- return p.size() == 1 && *p.c_str() == dot;
- }
-
- inline bool path::filename_is_dot_dot() const
- {
- return size() >= 2 && m_pathname[size()-1] == dot && m_pathname[size()-2] == dot
- && (m_pathname.size() == 2 || detail::is_element_separator(m_pathname[size()-3]));
- // use detail::is_element_separator() rather than detail::is_directory_separator
- // to deal with "c:.." edge case on Windows when ':' acts as a separator
- }
-
-//--------------------------------------------------------------------------------------//
-// class path member template implementation //
-//--------------------------------------------------------------------------------------//
-
- template <class InputIterator>
- path& path::append(InputIterator begin, InputIterator end)
- {
- if (begin == end)
- return *this;
- string_type::size_type sep_pos(m_append_separator_if_needed());
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
- if (sep_pos)
- m_erase_redundant_separator(sep_pos);
- return *this;
- }
-
- template <class InputIterator>
- path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt)
- {
- if (begin == end)
- return *this;
- string_type::size_type sep_pos(m_append_separator_if_needed());
- std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
- seq(begin, end);
- path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
- if (sep_pos)
- m_erase_redundant_separator(sep_pos);
- return *this;
- }
-
- template <class Source>
- path& path::append(Source const& source)
- {
- if (path_traits::empty(source))
- return *this;
- string_type::size_type sep_pos(m_append_separator_if_needed());
- path_traits::dispatch(source, m_pathname);
- if (sep_pos)
- m_erase_redundant_separator(sep_pos);
- return *this;
- }
-
- template <class Source>
- path& path::append(Source const& source, const codecvt_type& cvt)
- {
- if (path_traits::empty(source))
- return *this;
- string_type::size_type sep_pos(m_append_separator_if_needed());
- path_traits::dispatch(source, m_pathname, cvt);
- if (sep_pos)
- m_erase_redundant_separator(sep_pos);
- return *this;
- }
-
-//--------------------------------------------------------------------------------------//
-// class path member template specializations //
-//--------------------------------------------------------------------------------------//
-
- template <> inline
- std::string path::string<std::string>() const
- { return string(); }
-
- template <> inline
- std::wstring path::string<std::wstring>() const
- { return wstring(); }
-
- template <> inline
- std::string path::string<std::string>(const codecvt_type& cvt) const
- { return string(cvt); }
-
- template <> inline
- std::wstring path::string<std::wstring>(const codecvt_type& cvt) const
- { return wstring(cvt); }
-
- template <> inline
- std::string path::generic_string<std::string>() const
- { return generic_string(); }
-
- template <> inline
- std::wstring path::generic_string<std::wstring>() const
- { return generic_wstring(); }
-
- template <> inline
- std::string path::generic_string<std::string>(const codecvt_type& cvt) const
- { return generic_string(cvt); }
-
- template <> inline
- std::wstring path::generic_string<std::wstring>(const codecvt_type& cvt) const
- { return generic_wstring(cvt); }
-
- //--------------------------------------------------------------------------------------//
- // path_traits convert function implementations //
- // requiring path::codecvt() be visable //
- //--------------------------------------------------------------------------------------//
-
-namespace path_traits
-{ // without codecvt
-
- inline
- void convert(const char* from,
- const char* from_end, // 0 for null terminated MBCS
- std::wstring & to)
- {
- convert(from, from_end, to, path::codecvt());
- }
-
- inline
- void convert(const wchar_t* from,
- const wchar_t* from_end, // 0 for null terminated MBCS
- std::string & to)
- {
- convert(from, from_end, to, path::codecvt());
- }
-
- inline
- void convert(const char* from,
- std::wstring & to)
- {
- BOOST_ASSERT(from);
- convert(from, 0, to, path::codecvt());
- }
-
- inline
- void convert(const wchar_t* from,
- std::string & to)
- {
- BOOST_ASSERT(from);
- convert(from, 0, to, path::codecvt());
- }
-} // namespace path_traits
-} // namespace filesystem
-} // namespace boost
-
-//----------------------------------------------------------------------------//
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
-#endif // BOOST_FILESYSTEM_PATH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp b/src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp
deleted file mode 100644
index 129044a4693..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp
+++ /dev/null
@@ -1,352 +0,0 @@
-// filesystem path_traits.hpp --------------------------------------------------------//
-
-// 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
-
-#ifndef BOOST_FILESYSTEM_PATH_TRAITS_HPP
-#define BOOST_FILESYSTEM_PATH_TRAITS_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/utility/enable_if.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/decay.hpp>
-#include <boost/system/error_code.hpp>
-#include <cwchar> // for mbstate_t
-#include <string>
-#include <vector>
-#include <list>
-#include <iterator>
-#include <locale>
-#include <boost/assert.hpp>
-// #include <iostream> //**** comment me out ****
-
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-namespace boost { namespace filesystem {
-
- BOOST_FILESYSTEM_DECL const system::error_category& codecvt_error_category();
- // uses std::codecvt_base::result used for error codes:
- //
- // ok: Conversion successful.
- // partial: Not all source characters converted; one or more additional source
- // characters are needed to produce the final target character, or the
- // size of the target intermediate buffer was too small to hold the result.
- // error: A character in the source could not be converted to the target encoding.
- // noconv: The source and target characters have the same type and encoding, so no
- // conversion was necessary.
-
- class directory_entry;
-
-namespace path_traits {
-
- typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type;
-
- // is_pathable type trait; allows disabling over-agressive class path member templates
-
- template <class T>
- struct is_pathable { static const bool value = false; };
-
- template<> struct is_pathable<char*> { static const bool value = true; };
- template<> struct is_pathable<const char*> { static const bool value = true; };
- template<> struct is_pathable<wchar_t*> { static const bool value = true; };
- template<> struct is_pathable<const wchar_t*> { static const bool value = true; };
- template<> struct is_pathable<std::string> { static const bool value = true; };
- template<> struct is_pathable<std::wstring> { static const bool value = true; };
- template<> struct is_pathable<std::vector<char> > { static const bool value = true; };
- template<> struct is_pathable<std::vector<wchar_t> > { static const bool value = true; };
- template<> struct is_pathable<std::list<char> > { static const bool value = true; };
- template<> struct is_pathable<std::list<wchar_t> > { static const bool value = true; };
- template<> struct is_pathable<directory_entry> { static const bool value = true; };
-
- // Pathable empty
-
- template <class Container> inline
- // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for
- // conforming compilers. Replace by plain "bool" at some future date (2012?)
- typename boost::disable_if<boost::is_array<Container>, bool>::type
- empty(const Container & c)
- { return c.begin() == c.end(); }
-
- template <class T> inline
- bool empty(T * const & c_str)
- {
- BOOST_ASSERT(c_str);
- return !*c_str;
- }
-
- template <typename T, size_t N> inline
- bool empty(T (&x)[N])
- { return !x[0]; }
-
- // value types differ ---------------------------------------------------------------//
- //
- // A from_end argument of 0 is less efficient than a known end, so use only if needed
-
- // with codecvt
-
- BOOST_FILESYSTEM_DECL
- void convert(const char* from,
- const char* from_end, // 0 for null terminated MBCS
- std::wstring & to,
- const codecvt_type& cvt);
-
- BOOST_FILESYSTEM_DECL
- void convert(const wchar_t* from,
- const wchar_t* from_end, // 0 for null terminated MBCS
- std::string & to,
- const codecvt_type& cvt);
-
- inline
- void convert(const char* from,
- std::wstring & to,
- const codecvt_type& cvt)
- {
- BOOST_ASSERT(from);
- convert(from, 0, to, cvt);
- }
-
- inline
- void convert(const wchar_t* from,
- std::string & to,
- const codecvt_type& cvt)
- {
- BOOST_ASSERT(from);
- convert(from, 0, to, cvt);
- }
-
- // without codecvt
-
- inline
- void convert(const char* from,
- const char* from_end, // 0 for null terminated MBCS
- std::wstring & to);
-
- inline
- void convert(const wchar_t* from,
- const wchar_t* from_end, // 0 for null terminated MBCS
- std::string & to);
-
- inline
- void convert(const char* from,
- std::wstring & to);
-
- inline
- void convert(const wchar_t* from,
- std::string & to);
-
- // value types same -----------------------------------------------------------------//
-
- // char with codecvt
-
- inline
- void convert(const char* from, const char* from_end, std::string & to,
- const codecvt_type&)
- {
- BOOST_ASSERT(from);
- BOOST_ASSERT(from_end);
- to.append(from, from_end);
- }
-
- inline
- void convert(const char* from,
- std::string & to,
- const codecvt_type&)
- {
- BOOST_ASSERT(from);
- to += from;
- }
-
- // wchar_t with codecvt
-
- inline
- void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to,
- const codecvt_type&)
- {
- BOOST_ASSERT(from);
- BOOST_ASSERT(from_end);
- to.append(from, from_end);
- }
-
- inline
- void convert(const wchar_t* from,
- std::wstring & to,
- const codecvt_type&)
- {
- BOOST_ASSERT(from);
- to += from;
- }
-
- // char without codecvt
-
- inline
- void convert(const char* from, const char* from_end, std::string & to)
- {
- BOOST_ASSERT(from);
- BOOST_ASSERT(from_end);
- to.append(from, from_end);
- }
-
- inline
- void convert(const char* from, std::string & to)
- {
- BOOST_ASSERT(from);
- to += from;
- }
-
- // wchar_t without codecvt
-
- inline
- void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to)
- {
- BOOST_ASSERT(from);
- BOOST_ASSERT(from_end);
- to.append(from, from_end);
- }
-
- inline
- void convert(const wchar_t* from, std::wstring & to)
- {
- BOOST_ASSERT(from);
- to += from;
- }
-
- // Source dispatch -----------------------------------------------------------------//
-
- // contiguous containers with codecvt
- template <class U> inline
- void dispatch(const std::string& c, U& to, const codecvt_type& cvt)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
- }
- template <class U> inline
- void dispatch(const std::wstring& c, U& to, const codecvt_type& cvt)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
- }
- template <class U> inline
- void dispatch(const std::vector<char>& c, U& to, const codecvt_type& cvt)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
- }
- template <class U> inline
- void dispatch(const std::vector<wchar_t>& c, U& to, const codecvt_type& cvt)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
- }
-
- // contiguous containers without codecvt
- template <class U> inline
- void dispatch(const std::string& c, U& to)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to);
- }
- template <class U> inline
- void dispatch(const std::wstring& c, U& to)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to);
- }
- template <class U> inline
- void dispatch(const std::vector<char>& c, U& to)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to);
- }
- template <class U> inline
- void dispatch(const std::vector<wchar_t>& c, U& to)
- {
- if (c.size())
- convert(&*c.begin(), &*c.begin() + c.size(), to);
- }
-
- // non-contiguous containers with codecvt
- template <class Container, class U> inline
- // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for
- // conforming compilers. Replace by plain "void" at some future date (2012?)
- typename boost::disable_if<boost::is_array<Container>, void>::type
- dispatch(const Container & c, U& to, const codecvt_type& cvt)
- {
- if (c.size())
- {
- std::basic_string<typename Container::value_type> s(c.begin(), c.end());
- convert(s.c_str(), s.c_str()+s.size(), to, cvt);
- }
- }
-
- // c_str
- template <class T, class U> inline
- void dispatch(T * const & c_str, U& to, const codecvt_type& cvt)
- {
- // std::cout << "dispatch() const T *\n";
- BOOST_ASSERT(c_str);
- convert(c_str, to, cvt);
- }
-
- // Note: there is no dispatch on C-style arrays because the array may
- // contain a string smaller than the array size.
-
- BOOST_FILESYSTEM_DECL
- void dispatch(const directory_entry & de,
-# ifdef BOOST_WINDOWS_API
- std::wstring & to,
-# else
- std::string & to,
-# endif
- const codecvt_type&);
-
- // non-contiguous containers without codecvt
- template <class Container, class U> inline
- // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for
- // conforming compilers. Replace by plain "void" at some future date (2012?)
- typename boost::disable_if<boost::is_array<Container>, void>::type
- dispatch(const Container & c, U& to)
- {
- if (c.size())
- {
- std::basic_string<typename Container::value_type> seq(c.begin(), c.end());
- convert(seq.c_str(), seq.c_str()+seq.size(), to);
- }
- }
-
- // c_str
- template <class T, class U> inline
- void dispatch(T * const & c_str, U& to)
- {
- // std::cout << "dispatch() const T *\n";
- BOOST_ASSERT(c_str);
- convert(c_str, to);
- }
-
- // Note: there is no dispatch on C-style arrays because the array may
- // contain a string smaller than the array size.
-
- BOOST_FILESYSTEM_DECL
- void dispatch(const directory_entry & de,
-# ifdef BOOST_WINDOWS_API
- std::wstring & to
-# else
- std::string & to
-# endif
- );
-
-
-}}} // namespace boost::filesystem::path_traits
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
-#endif // BOOST_FILESYSTEM_PATH_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp b/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp
deleted file mode 100644
index 015f659080a..00000000000
--- a/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// filesystem/string_file.hpp --------------------------------------------------------//
-
-// Copyright Beman Dawes 2015
-
-// 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_FILESYSTEM_STRING_FILE_HPP
-#define BOOST_FILESYSTEM_STRING_FILE_HPP
-
-#include <string>
-#include <boost/filesystem/fstream.hpp>
-#include <boost/filesystem/operations.hpp>
-
-namespace boost
-{
-namespace filesystem
-{
-inline
-void save_string_file(const path& p, const std::string& str)
-{
- ofstream file;
- file.exceptions(std::ofstream::failbit | std::ofstream::badbit);
- file.open(p, std::ios_base::binary);
- file.write(str.c_str(), str.size());
-}
-
-inline
-void load_string_file(const path& p, std::string& str)
-{
- ifstream file;
- file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
- file.open(p, std::ios_base::binary);
- std::size_t sz = static_cast<std::size_t>(file_size(p));
- str.resize(sz, '\0');
- file.read(&str[0], sz);
-}
-} // namespace filesystem
-} // namespace boost
-
-#endif // include guard
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
deleted file mode 100644
index d79a9c574d7..00000000000
--- a/src/third_party/boost-1.69.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 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.69.0/boost/interprocess/streams/bufferstream.hpp b/src/third_party/boost-1.69.0/boost/interprocess/streams/bufferstream.hpp
deleted file mode 100644
index 51f52b09e08..00000000000
--- a/src/third_party/boost-1.69.0/boost/interprocess/streams/bufferstream.hpp
+++ /dev/null
@@ -1,491 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-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.
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's sstream file. Modified by Ion Gaztanaga 2005-2012.
-// Changed internal SGI string to a buffer. Added efficient
-// internal buffer get/set/swap functions, so that we can obtain/establish the
-// internal buffer without any reallocation or copy. Kill those temporaries!
-///////////////////////////////////////////////////////////////////////////////
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-//!\file
-//!This file defines basic_bufferbuf, basic_ibufferstream,
-//!basic_obufferstream, and basic_bufferstream classes. These classes
-//!represent streamsbufs and streams whose sources or destinations
-//!are fixed size character buffers.
-
-#ifndef BOOST_INTERPROCESS_BUFFERSTREAM_HPP
-#define BOOST_INTERPROCESS_BUFFERSTREAM_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 <iosfwd>
-#include <ios>
-#include <istream>
-#include <ostream>
-#include <string> // char traits
-#include <cstddef> // ptrdiff_t
-#include <boost/assert.hpp>
-#include <boost/interprocess/interprocess_fwd.hpp>
-
-namespace boost { namespace interprocess {
-
-//!A streambuf class that controls the transmission of elements to and from
-//!a basic_xbufferstream. The elements are transmitted from a to a fixed
-//!size buffer
-template <class CharT, class CharTraits>
-class basic_bufferbuf
- : public std::basic_streambuf<CharT, CharTraits>
-{
- public:
- typedef CharT char_type;
- typedef typename CharTraits::int_type int_type;
- typedef typename CharTraits::pos_type pos_type;
- typedef typename CharTraits::off_type off_type;
- typedef CharTraits traits_type;
- typedef std::basic_streambuf<char_type, traits_type> basic_streambuf_t;
-
- public:
- //!Constructor.
- //!Does not throw.
- explicit basic_bufferbuf(std::ios_base::openmode mode
- = std::ios_base::in | std::ios_base::out)
- : basic_streambuf_t(), m_mode(mode), m_buffer(0), m_length(0)
- {}
-
- //!Constructor. Assigns formatting buffer.
- //!Does not throw.
- explicit basic_bufferbuf(CharT *buf, std::size_t length,
- std::ios_base::openmode mode
- = std::ios_base::in | std::ios_base::out)
- : basic_streambuf_t(), m_mode(mode), m_buffer(buf), m_length(length)
- { this->set_pointers(); }
-
- virtual ~basic_bufferbuf(){}
-
- public:
- //!Returns the pointer and size of the internal buffer.
- //!Does not throw.
- std::pair<CharT *, std::size_t> buffer() const
- { return std::pair<CharT *, std::size_t>(m_buffer, m_length); }
-
- //!Sets the underlying buffer to a new value
- //!Does not throw.
- void buffer(CharT *buf, std::size_t length)
- { m_buffer = buf; m_length = length; this->set_pointers(); }
-
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private:
- void set_pointers()
- {
- // The initial read position is the beginning of the buffer.
- if(m_mode & std::ios_base::in)
- this->setg(m_buffer, m_buffer, m_buffer + m_length);
-
- // The initial write position is the beginning of the buffer.
- if(m_mode & std::ios_base::out)
- this->setp(m_buffer, m_buffer + m_length);
- }
-
- protected:
- virtual int_type underflow()
- {
- // Precondition: gptr() >= egptr(). Returns a character, if available.
- return this->gptr() != this->egptr() ?
- CharTraits::to_int_type(*this->gptr()) : CharTraits::eof();
- }
-
- virtual int_type pbackfail(int_type c = CharTraits::eof())
- {
- if(this->gptr() != this->eback()) {
- if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
- if(CharTraits::eq(CharTraits::to_char_type(c), this->gptr()[-1])) {
- this->gbump(-1);
- return c;
- }
- else if(m_mode & std::ios_base::out) {
- this->gbump(-1);
- *this->gptr() = c;
- return c;
- }
- else
- return CharTraits::eof();
- }
- else {
- this->gbump(-1);
- return CharTraits::not_eof(c);
- }
- }
- else
- return CharTraits::eof();
- }
-
- virtual int_type overflow(int_type c = CharTraits::eof())
- {
- if(m_mode & std::ios_base::out) {
- if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
-// if(!(m_mode & std::ios_base::in)) {
-// if(this->pptr() != this->epptr()) {
-// *this->pptr() = CharTraits::to_char_type(c);
-// this->pbump(1);
-// return c;
-// }
-// else
-// return CharTraits::eof();
-// }
-// else {
- if(this->pptr() == this->epptr()) {
- //We can't append to a static buffer
- return CharTraits::eof();
- }
- else {
- *this->pptr() = CharTraits::to_char_type(c);
- this->pbump(1);
- return c;
- }
-// }
- }
- else // c is EOF, so we don't have to do anything
- return CharTraits::not_eof(c);
- }
- else // Overflow always fails if it's read-only.
- return CharTraits::eof();
- }
-
- virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir,
- std::ios_base::openmode mode
- = std::ios_base::in | std::ios_base::out)
- {
- bool in = false;
- bool out = false;
-
- const std::ios_base::openmode inout =
- std::ios_base::in | std::ios_base::out;
-
- if((mode & inout) == inout) {
- if(dir == std::ios_base::beg || dir == std::ios_base::end)
- in = out = true;
- }
- else if(mode & std::ios_base::in)
- in = true;
- else if(mode & std::ios_base::out)
- out = true;
-
- if(!in && !out)
- return pos_type(off_type(-1));
- else if((in && (!(m_mode & std::ios_base::in) || (off != 0 && this->gptr() == 0) )) ||
- (out && (!(m_mode & std::ios_base::out) || (off != 0 && this->pptr() == 0))))
- return pos_type(off_type(-1));
-
- std::streamoff newoff;
- switch(dir) {
- case std::ios_base::beg:
- newoff = 0;
- break;
- case std::ios_base::end:
- newoff = static_cast<std::streamoff>(m_length);
- break;
- case std::ios_base::cur:
- newoff = in ? static_cast<std::streamoff>(this->gptr() - this->eback())
- : static_cast<std::streamoff>(this->pptr() - this->pbase());
- break;
- default:
- return pos_type(off_type(-1));
- }
-
- off += newoff;
-
- if(in) {
- std::ptrdiff_t n = this->egptr() - this->eback();
-
- if(off < 0 || off > n)
- return pos_type(off_type(-1));
- else
- this->setg(this->eback(), this->eback() + off, this->eback() + n);
- }
-
- if(out) {
- std::ptrdiff_t n = this->epptr() - this->pbase();
-
- if(off < 0 || off > n)
- return pos_type(off_type(-1));
- else {
- this->setp(this->pbase(), this->pbase() + n);
- this->pbump(off);
- }
- }
-
- return pos_type(off);
- }
-
- virtual pos_type seekpos(pos_type pos, std::ios_base::openmode mode
- = std::ios_base::in | std::ios_base::out)
- { return seekoff(pos - pos_type(off_type(0)), std::ios_base::beg, mode); }
-
- private:
- std::ios_base::openmode m_mode;
- CharT * m_buffer;
- std::size_t m_length;
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
-};
-
-//!A basic_istream class that uses a fixed size character buffer
-//!as its formatting buffer.
-template <class CharT, class CharTraits>
-class basic_ibufferstream :
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private basic_bufferbuf<CharT, CharTraits>,
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
- public std::basic_istream<CharT, CharTraits>
-{
- public: // Typedefs
- typedef typename std::basic_ios
- <CharT, CharTraits>::char_type char_type;
- typedef typename std::basic_ios<char_type, CharTraits>::int_type int_type;
- typedef typename std::basic_ios<char_type, CharTraits>::pos_type pos_type;
- typedef typename std::basic_ios<char_type, CharTraits>::off_type off_type;
- typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type;
-
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private:
- typedef basic_bufferbuf<CharT, CharTraits> bufferbuf_t;
- typedef std::basic_ios<char_type, CharTraits> basic_ios_t;
- typedef std::basic_istream<char_type, CharTraits> basic_streambuf_t;
- bufferbuf_t & get_buf() { return *this; }
- const bufferbuf_t & get_buf() const{ return *this; }
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
-
- public:
- //!Constructor.
- //!Does not throw.
- basic_ibufferstream(std::ios_base::openmode mode = std::ios_base::in)
- : //basic_ios_t() is called first (lefting it uninitialized) as it's a
- //virtual base of basic_istream. The class will be initialized when
- //basic_istream is constructed calling basic_ios_t::init().
- //As bufferbuf_t's constructor does not throw there is no risk of
- //calling the basic_ios_t's destructor without calling basic_ios_t::init()
- bufferbuf_t(mode | std::ios_base::in)
- , basic_streambuf_t(this)
- {}
-
- //!Constructor. Assigns formatting buffer.
- //!Does not throw.
- basic_ibufferstream(const CharT *buf, std::size_t length,
- std::ios_base::openmode mode = std::ios_base::in)
- : //basic_ios_t() is called first (lefting it uninitialized) as it's a
- //virtual base of basic_istream. The class will be initialized when
- //basic_istream is constructed calling basic_ios_t::init().
- //As bufferbuf_t's constructor does not throw there is no risk of
- //calling the basic_ios_t's destructor without calling basic_ios_t::init()
- bufferbuf_t(const_cast<CharT*>(buf), length, mode | std::ios_base::in)
- , basic_streambuf_t(this)
- {}
-
- ~basic_ibufferstream(){};
-
- public:
- //!Returns the address of the stored
- //!stream buffer.
- basic_bufferbuf<CharT, CharTraits>* rdbuf() const
- { return const_cast<basic_bufferbuf<CharT, CharTraits>*>(&get_buf()); }
-
- //!Returns the pointer and size of the internal buffer.
- //!Does not throw.
- std::pair<const CharT *, std::size_t> buffer() const
- { return get_buf().buffer(); }
-
- //!Sets the underlying buffer to a new value. Resets
- //!stream position. Does not throw.
- void buffer(const CharT *buf, std::size_t length)
- { get_buf().buffer(const_cast<CharT*>(buf), length); }
-};
-
-//!A basic_ostream class that uses a fixed size character buffer
-//!as its formatting buffer.
-template <class CharT, class CharTraits>
-class basic_obufferstream :
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private basic_bufferbuf<CharT, CharTraits>,
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
- public std::basic_ostream<CharT, CharTraits>
-{
- public:
- typedef typename std::basic_ios
- <CharT, CharTraits>::char_type char_type;
- typedef typename std::basic_ios<char_type, CharTraits>::int_type int_type;
- typedef typename std::basic_ios<char_type, CharTraits>::pos_type pos_type;
- typedef typename std::basic_ios<char_type, CharTraits>::off_type off_type;
- typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type;
-
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private:
- typedef basic_bufferbuf<CharT, CharTraits> bufferbuf_t;
- typedef std::basic_ios<char_type, CharTraits> basic_ios_t;
- typedef std::basic_ostream<char_type, CharTraits> basic_ostream_t;
- bufferbuf_t & get_buf() { return *this; }
- const bufferbuf_t & get_buf() const{ return *this; }
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
-
- public:
- //!Constructor.
- //!Does not throw.
- basic_obufferstream(std::ios_base::openmode mode = std::ios_base::out)
- : //basic_ios_t() is called first (lefting it uninitialized) as it's a
- //virtual base of basic_istream. The class will be initialized when
- //basic_istream is constructed calling basic_ios_t::init().
- //As bufferbuf_t's constructor does not throw there is no risk of
- //calling the basic_ios_t's destructor without calling basic_ios_t::init()
- bufferbuf_t(mode | std::ios_base::out)
- , basic_ostream_t(this)
- {}
-
- //!Constructor. Assigns formatting buffer.
- //!Does not throw.
- basic_obufferstream(CharT *buf, std::size_t length,
- std::ios_base::openmode mode = std::ios_base::out)
- : //basic_ios_t() is called first (lefting it uninitialized) as it's a
- //virtual base of basic_istream. The class will be initialized when
- //basic_istream is constructed calling basic_ios_t::init().
- //As bufferbuf_t's constructor does not throw there is no risk of
- //calling the basic_ios_t's destructor without calling basic_ios_t::init()
- bufferbuf_t(buf, length, mode | std::ios_base::out)
- , basic_ostream_t(this)
- {}
-
- ~basic_obufferstream(){}
-
- public:
- //!Returns the address of the stored
- //!stream buffer.
- basic_bufferbuf<CharT, CharTraits>* rdbuf() const
- { return const_cast<basic_bufferbuf<CharT, CharTraits>*>(&get_buf()); }
-
- //!Returns the pointer and size of the internal buffer.
- //!Does not throw.
- std::pair<CharT *, std::size_t> buffer() const
- { return get_buf().buffer(); }
-
- //!Sets the underlying buffer to a new value. Resets
- //!stream position. Does not throw.
- void buffer(CharT *buf, std::size_t length)
- { get_buf().buffer(buf, length); }
-};
-
-
-//!A basic_iostream class that uses a fixed size character buffer
-//!as its formatting buffer.
-template <class CharT, class CharTraits>
-class basic_bufferstream :
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private basic_bufferbuf<CharT, CharTraits>,
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
- public std::basic_iostream<CharT, CharTraits>
-{
- public: // Typedefs
- typedef typename std::basic_ios
- <CharT, CharTraits>::char_type char_type;
- typedef typename std::basic_ios<char_type, CharTraits>::int_type int_type;
- typedef typename std::basic_ios<char_type, CharTraits>::pos_type pos_type;
- typedef typename std::basic_ios<char_type, CharTraits>::off_type off_type;
- typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type;
-
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private:
- typedef basic_bufferbuf<CharT, CharTraits> bufferbuf_t;
- typedef std::basic_ios<char_type, CharTraits> basic_ios_t;
- typedef std::basic_iostream<char_type, CharTraits> basic_iostream_t;
- bufferbuf_t & get_buf() { return *this; }
- const bufferbuf_t & get_buf() const{ return *this; }
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
-
- public:
- //!Constructor.
- //!Does not throw.
- basic_bufferstream(std::ios_base::openmode mode
- = std::ios_base::in | std::ios_base::out)
- : //basic_ios_t() is called first (lefting it uninitialized) as it's a
- //virtual base of basic_istream. The class will be initialized when
- //basic_istream is constructed calling basic_ios_t::init().
- //As bufferbuf_t's constructor does not throw there is no risk of
- //calling the basic_ios_t's destructor without calling basic_ios_t::init()
- bufferbuf_t(mode)
- , basic_iostream_t(this)
- {}
-
- //!Constructor. Assigns formatting buffer.
- //!Does not throw.
- basic_bufferstream(CharT *buf, std::size_t length,
- std::ios_base::openmode mode
- = std::ios_base::in | std::ios_base::out)
- : //basic_ios_t() is called first (lefting it uninitialized) as it's a
- //virtual base of basic_istream. The class will be initialized when
- //basic_istream is constructed calling basic_ios_t::init().
- //As bufferbuf_t's constructor does not throw there is no risk of
- //calling the basic_ios_t's destructor without calling basic_ios_t::init()
- bufferbuf_t(buf, length, mode)
- , basic_iostream_t(this)
- {}
-
- ~basic_bufferstream(){}
-
- public:
- //!Returns the address of the stored
- //!stream buffer.
- basic_bufferbuf<CharT, CharTraits>* rdbuf() const
- { return const_cast<basic_bufferbuf<CharT, CharTraits>*>(&get_buf()); }
-
- //!Returns the pointer and size of the internal buffer.
- //!Does not throw.
- std::pair<CharT *, std::size_t> buffer() const
- { return get_buf().buffer(); }
-
- //!Sets the underlying buffer to a new value. Resets
- //!stream position. Does not throw.
- void buffer(CharT *buf, std::size_t length)
- { get_buf().buffer(buf, length); }
-};
-
-//Some typedefs to simplify usage
-typedef basic_bufferbuf<char> bufferbuf;
-typedef basic_bufferstream<char> bufferstream;
-typedef basic_ibufferstream<char> ibufferstream;
-typedef basic_obufferstream<char> obufferstream;
-
-typedef basic_bufferbuf<wchar_t> wbufferbuf;
-typedef basic_bufferstream<wchar_t> wbufferstream;
-typedef basic_ibufferstream<wchar_t> wibufferstream;
-typedef basic_obufferstream<wchar_t> wobufferstream;
-
-
-}} //namespace boost { namespace interprocess {
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif /* BOOST_INTERPROCESS_BUFFERSTREAM_HPP */
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp
deleted file mode 100644
index 7663673433a..00000000000
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-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_SPIN_MUTEX_HPP
-#define BOOST_INTERPROCESS_DETAIL_SPIN_MUTEX_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/posix_time_types_wrk.hpp>
-#include <boost/assert.hpp>
-#include <boost/interprocess/detail/atomic.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/interprocess/detail/os_thread_functions.hpp>
-#include <boost/interprocess/sync/detail/common_algorithms.hpp>
-
-namespace boost {
-namespace interprocess {
-namespace ipcdetail {
-
-class spin_mutex
-{
- spin_mutex(const spin_mutex &);
- spin_mutex &operator=(const spin_mutex &);
- public:
-
- spin_mutex();
- ~spin_mutex();
-
- void lock();
- bool try_lock();
- bool timed_lock(const boost::posix_time::ptime &abs_time);
- void unlock();
- void take_ownership(){};
- private:
- volatile boost::uint32_t m_s;
-};
-
-inline spin_mutex::spin_mutex()
- : m_s(0)
-{
- //Note that this class is initialized to zero.
- //So zeroed memory can be interpreted as an
- //initialized mutex
-}
-
-inline spin_mutex::~spin_mutex()
-{
- //Trivial destructor
-}
-
-inline void spin_mutex::lock(void)
-{ return ipcdetail::try_based_lock(*this); }
-
-inline bool spin_mutex::try_lock(void)
-{
- boost::uint32_t prev_s = ipcdetail::atomic_cas32(const_cast<boost::uint32_t*>(&m_s), 1, 0);
- return m_s == 1 && prev_s == 0;
-}
-
-inline bool spin_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
-{ return ipcdetail::try_based_timed_lock(*this, abs_time); }
-
-inline void spin_mutex::unlock(void)
-{ ipcdetail::atomic_cas32(const_cast<boost::uint32_t*>(&m_s), 0, 1); }
-
-} //namespace ipcdetail {
-} //namespace interprocess {
-} //namespace boost {
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif //BOOST_INTERPROCESS_DETAIL_SPIN_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 428a26eb662..00000000000
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
+++ /dev/null
@@ -1,97 +0,0 @@
- //////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2011-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_WINAPI_WRAPPER_COMMON_HPP
-#define BOOST_INTERPROCESS_DETAIL_WINAPI_WRAPPER_COMMON_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/win32_api.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/errors.hpp>
-#include <boost/interprocess/exceptions.hpp>
-#include <limits>
-
-namespace boost {
-namespace interprocess {
-namespace ipcdetail {
-
-inline void winapi_wrapper_wait_for_single_object(void *handle)
-{
- unsigned long ret = winapi::wait_for_single_object(handle, winapi::infinite_time);
- if(ret != winapi::wait_object_0){
- if(ret != winapi::wait_abandoned){
- error_info err = system_error_code();
- throw interprocess_exception(err);
- }
- else{ //Special case for orphaned mutexes
- winapi::release_mutex(handle);
- throw interprocess_exception(owner_dead_error);
- }
- }
-}
-
-inline bool winapi_wrapper_try_wait_for_single_object(void *handle)
-{
- unsigned long ret = winapi::wait_for_single_object(handle, 0);
- if(ret == winapi::wait_object_0){
- return true;
- }
- else if(ret == winapi::wait_timeout){
- return false;
- }
- else{
- error_info err = system_error_code();
- throw interprocess_exception(err);
- }
-}
-
-inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boost::posix_time::ptime &abs_time)
-{
- //Windows does not support infinity abs_time so check it
- if(abs_time == boost::posix_time::pos_infin){
- winapi_wrapper_wait_for_single_object(handle);
- return true;
- }
- const boost::posix_time::ptime cur_time = microsec_clock::universal_time();
- //Windows uses relative wait times so check for negative waits
- //and implement as 0 wait to allow try-semantics as POSIX mandates.
- unsigned long ret = winapi::wait_for_single_object
- ( handle
- , (abs_time <= cur_time) ? 0u
- : (abs_time - cur_time).total_milliseconds()
- );
- if(ret == winapi::wait_object_0){
- return true;
- }
- else if(ret == winapi::wait_timeout){
- return false;
- }
- else{
- error_info err = system_error_code();
- throw interprocess_exception(err);
- }
-}
-
-} //namespace ipcdetail {
-} //namespace interprocess {
-} //namespace boost {
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif //BOOST_INTERPROCESS_DETAIL_WINAPI_MUTEX_WRAPPER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp
deleted file mode 100644
index d150140abd2..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp
+++ /dev/null
@@ -1,1073 +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_AVL_SET_HPP
-#define BOOST_INTRUSIVE_AVL_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/avltree.hpp>
-#include <boost/intrusive/detail/mpl.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 {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class avl_multiset_impl;
-#endif
-
-//! The class template avl_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class avl_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set_impl)
-
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
-
- //! @copydoc ::boost::intrusive::avltree::avltree()
- avl_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(const key_compare &,const value_traits &)
- explicit avl_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- avl_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&)
- avl_set_impl(BOOST_RV_REF(avl_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&)
- avl_set_impl& operator=(BOOST_RV_REF(avl_set_impl) x)
- { return static_cast<avl_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::~avltree()
- ~avl_set_impl();
-
- //! @copydoc ::boost::intrusive::avltree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::avltree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::avltree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::avltree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::avltree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::avltree::begin()
- reverse_iterator avlegin();
-
- //! @copydoc ::boost::intrusive::avltree::begin()const
- const_reverse_iterator avlegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::avltree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::avltree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::avltree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::avltree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::avltree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
- static avl_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
- static const avl_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
- static avl_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
- static const avl_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::avltree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::avltree::swap
- void swap(avl_set_impl& other);
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(const avltree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const avl_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(avltree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::avltree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const key_type &key)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::avltree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::avltree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::avltree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::avltree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::merge_unique
- template<class ...Options2>
- void merge(avl_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::avltree::merge_unique
- template<class ...Options2>
- void merge(avl_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(avl_set_impl<T, Options...> &x, avl_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c 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>
-#endif
-struct make_avl_set
-{
- /// @cond
- typedef typename pack_options
- < avltree_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 avl_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 avl_set
- : public make_avl_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_avl_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- avl_set()
- : Base()
- {}
-
- explicit avl_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- avl_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- avl_set(BOOST_RV_REF(avl_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- avl_set& operator=(BOOST_RV_REF(avl_set) x)
- { return static_cast<avl_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const avl_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static avl_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<avl_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const avl_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const avl_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static avl_set &container_from_iterator(iterator it)
- { return static_cast<avl_set &>(Base::container_from_iterator(it)); }
-
- static const avl_set &container_from_iterator(const_iterator it)
- { return static_cast<const avl_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template avl_multiset is an intrusive container, that mimics most of
-//! the interface of std::_multiset as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class avl_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset_impl)
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::avltree::avltree()
- avl_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(const key_compare &,const value_traits &)
- explicit avl_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- avl_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&)
- avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&)
- avl_multiset_impl& operator=(BOOST_RV_REF(avl_multiset_impl) x)
- { return static_cast<avl_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::avltree::~avltree()
- ~avl_multiset_impl();
-
- //! @copydoc ::boost::intrusive::avltree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::avltree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::avltree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::avltree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::avltree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::avltree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::avltree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::avltree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::avltree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::avltree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::avltree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::avltree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
- static avl_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
- static const avl_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
- static avl_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
- static const avl_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::avltree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::avltree::swap
- void swap(avl_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(const avltree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const avl_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(avltree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::avltree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::avltree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &key upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::avltree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::avltree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::avltree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::merge_equal
- template<class ...Options2>
- void merge(avl_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::avltree::merge_equal
- template<class ...Options2>
- void merge(avl_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(avl_multiset_impl<T, Options...> &x, avl_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c avl_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>
-#endif
-struct make_avl_multiset
-{
- /// @cond
- typedef typename pack_options
- < avltree_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 avl_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 avl_multiset
- : public make_avl_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_avl_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- avl_multiset()
- : Base()
- {}
-
- explicit avl_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- avl_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- avl_multiset(BOOST_RV_REF(avl_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- avl_multiset& operator=(BOOST_RV_REF(avl_multiset) x)
- { return static_cast<avl_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const avl_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static avl_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const avl_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static avl_multiset &container_from_iterator(iterator it)
- { return static_cast<avl_multiset &>(Base::container_from_iterator(it)); }
-
- static const avl_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const avl_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_AVL_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp
deleted file mode 100644
index cdc9b75d608..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp
+++ /dev/null
@@ -1,588 +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_HPP
-#define BOOST_INTRUSIVE_AVLTREE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-#include <boost/intrusive/detail/minimal_pair_header.hpp>
-
-#include <boost/static_assert.hpp>
-#include <boost/intrusive/avl_set_hook.hpp>
-#include <boost/intrusive/detail/avltree_node.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/avltree_algorithms.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/move/utility_core.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-struct default_avltree_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_avltree_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_avltree_hook_applier>
-{ static const bool value = true; };
-
-struct avltree_defaults
- : bstree_defaults
-{
- typedef default_avltree_hook_applier proto_value_traits;
-};
-
-/// @endcond
-
-//! The class template avltree is an intrusive AVL tree container, that
-//! is used to construct intrusive avl_set and avl_multiset containers.
-//! The no-throw guarantee holds only, if the key_compare object
-//! doesn't throw.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class avltree_impl
- /// @cond
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
- /// @endcond
-{
- public:
- typedef ValueTraits value_traits;
- /// @cond
- typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
- , ConstantTimeSize, AvlTreeAlgorithms
- , HeaderHolder> tree_type;
- typedef tree_type implementation_defined;
- /// @endcond
-
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- 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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
- /// @cond
- private:
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avltree_impl)
-
- /// @endcond
-
- public:
-
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
-
- //! @copydoc ::boost::intrusive::bstree::bstree()
- avltree_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit avltree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- avltree_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(unique, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- avltree_impl(BOOST_RV_REF(avltree_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- avltree_impl& operator=(BOOST_RV_REF(avltree_impl) x)
- { return static_cast<avltree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~avltree_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static avltree_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const avltree_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static avltree_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const avltree_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(avltree_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const avltree_impl &src, Cloner cloner, Disposer disposer);
-
- #else //BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avltree_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
- iterator insert_equal(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
- iterator insert_equal(const_iterator hint, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
- std::pair<iterator, bool> insert_unique(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
- iterator insert_unique(const_iterator hint, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const key_type &key, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const key_type &key, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &ke)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &key)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
- template<class T, class ...Options2>
- void merge_unique(avltree<T, Options2...> &);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
- template<class T, class ...Options2>
- void merge_equal(avltree<T, Options2...> &);
-
- friend bool operator< (const avltree_impl &x, const avltree_impl &y);
-
- friend bool operator==(const avltree_impl &x, const avltree_impl &y);
-
- friend bool operator!= (const avltree_impl &x, const avltree_impl &y);
-
- friend bool operator>(const avltree_impl &x, const avltree_impl &y);
-
- friend bool operator<=(const avltree_impl &x, const avltree_impl &y);
-
- friend bool operator>=(const avltree_impl &x, const avltree_impl &y);
-
- friend void swap(avltree_impl &x, avltree_impl &y);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-
-//! Helper metafunction to define a \c avltree 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_avltree
-{
- /// @cond
- typedef typename pack_options
- < avltree_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 avltree_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 avltree
- : public make_avltree<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_avltree
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avltree)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::reverse_iterator reverse_iterator;
- typedef typename Base::const_reverse_iterator const_reverse_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- avltree()
- : Base()
- {}
-
- explicit avltree( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- avltree( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, v_traits)
- {}
-
- avltree(BOOST_RV_REF(avltree) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- avltree& operator=(BOOST_RV_REF(avltree) x)
- { return static_cast<avltree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const avltree &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avltree) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static avltree &container_from_end_iterator(iterator end_iterator)
- { return static_cast<avltree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const avltree &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const avltree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static avltree &container_from_iterator(iterator it)
- { return static_cast<avltree &>(Base::container_from_iterator(it)); }
-
- static const avltree &container_from_iterator(const_iterator it)
- { return static_cast<const avltree &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_AVLTREE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp
deleted file mode 100644
index 693b6d855c6..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp
+++ /dev/null
@@ -1,1069 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2013-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_BS_SET_HPP
-#define BOOST_INTRUSIVE_BS_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class bs_multiset_impl;
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! The class template bs_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class bs_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_set_impl)
-
- typedef tree_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::value_traits value_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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::bstree::bstree()
- bs_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit bs_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- bs_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- bs_set_impl(BOOST_RV_REF(bs_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- bs_set_impl& operator=(BOOST_RV_REF(bs_set_impl) x)
- { return static_cast<bs_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~bs_set_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static bs_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const bs_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static bs_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const bs_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(bs_set_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const bs_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type&,const key_type&,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type& lower_key, const key_type& upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type&,const key_type&,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type& lower_key, const key_type& upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class ...Options2>
- void merge(bs_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class ...Options2>
- void merge(bs_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(bs_set_impl<T, Options...> &x, bs_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c bs_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>
-#endif
-struct make_bs_set
-{
- /// @cond
- typedef typename pack_options
- < bstree_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 bs_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 bs_set
- : public make_bs_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_bs_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_set)
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::key_compare key_compare;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- bs_set()
- : Base()
- {}
-
- explicit bs_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- bs_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- bs_set(BOOST_RV_REF(bs_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- bs_set& operator=(BOOST_RV_REF(bs_set) x)
- { return static_cast<bs_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const bs_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static bs_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<bs_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const bs_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const bs_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static bs_set &container_from_iterator(iterator it)
- { return static_cast<bs_set &>(Base::container_from_iterator(it)); }
-
- static const bs_set &container_from_iterator(const_iterator it)
- { return static_cast<const bs_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template bs_multiset is an intrusive container, that mimics most of
-//! the interface of std::multiset as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class bs_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_multiset_impl)
- typedef tree_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::value_traits value_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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::bstree::bstree()
- bs_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit bs_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- bs_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- bs_multiset_impl(BOOST_RV_REF(bs_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- bs_multiset_impl& operator=(BOOST_RV_REF(bs_multiset_impl) x)
- { return static_cast<bs_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~bs_multiset_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static bs_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const bs_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static bs_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const bs_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(bs_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const bs_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type & lower_key, const key_type & upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type & lower_key, const key_type & upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal
- template<class ...Options2>
- void merge(bs_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal
- template<class ...Options2>
- void merge(bs_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(bs_multiset_impl<T, Options...> &x, bs_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c bs_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>
-#endif
-struct make_bs_multiset
-{
- /// @cond
- typedef typename pack_options
- < bstree_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 bs_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 bs_multiset
- : public make_bs_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_bs_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- bs_multiset()
- : Base()
- {}
-
- explicit bs_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- bs_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- bs_multiset(BOOST_RV_REF(bs_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- bs_multiset& operator=(BOOST_RV_REF(bs_multiset) x)
- { return static_cast<bs_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const bs_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static bs_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const bs_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static bs_multiset &container_from_iterator(iterator it)
- { return static_cast<bs_multiset &>(Base::container_from_iterator(it)); }
-
- static const bs_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const bs_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_BS_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp
deleted file mode 100644
index 410eedf9303..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp
+++ /dev/null
@@ -1,2246 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2013-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_HPP
-#define BOOST_INTRUSIVE_BSTREE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/bs_set_hook.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/detail/tree_iterator.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
-#include <boost/intrusive/detail/empty_node_checker.hpp>
-#include <boost/intrusive/detail/default_header_holder.hpp>
-#include <boost/intrusive/detail/reverse_iterator.hpp>
-#include <boost/intrusive/detail/exception_disposer.hpp>
-#include <boost/intrusive/detail/node_cloner_disposer.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/algo_type.hpp>
-#include <boost/intrusive/detail/algorithm.hpp>
-#include <boost/intrusive/detail/tree_value_compare.hpp>
-
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/parent_from_member.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-
-#include <boost/intrusive/detail/minimal_pair_header.hpp>
-#include <cstddef> //size_t...
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal_to
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-struct default_bstree_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_bstree_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_bstree_hook_applier>
-{ static const bool value = true; };
-
-struct bstree_defaults
-{
- typedef default_bstree_hook_applier proto_value_traits;
- static const bool constant_time_size = true;
- typedef std::size_t size_type;
- typedef void compare;
- typedef void key_of_value;
- static const bool floating_point = true; //For sgtree
- typedef void priority; //For treap
- typedef void header_holder_type;
-};
-
-template<class ValueTraits, algo_types AlgoType, typename HeaderHolder>
-struct bstbase3
-{
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node node_type;
- typedef typename get_algo<AlgoType, node_traits>::type node_algorithms;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef tree_iterator<value_traits, false> iterator;
- typedef tree_iterator<value_traits, true> const_iterator;
- typedef boost::intrusive::reverse_iterator<iterator> reverse_iterator;
- typedef boost::intrusive::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::const_pointer) const_pointer;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::element_type) value_type;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::reference) reference;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::reference) const_reference;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
- typedef typename detail::get_header_holder_type
- < value_traits,HeaderHolder >::type header_holder_type;
-
- 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;
- static const bool has_container_from_iterator =
- detail::is_same< header_holder_type, detail::default_header_holder< node_traits > >::value;
-
- struct holder_t : public ValueTraits
- {
- BOOST_INTRUSIVE_FORCEINLINE explicit holder_t(const ValueTraits &vtraits)
- : ValueTraits(vtraits)
- {}
- header_holder_type root;
- } holder;
-
- static bstbase3 &get_tree_base_from_end_iterator(const const_iterator &end_iterator)
- {
- BOOST_STATIC_ASSERT(has_container_from_iterator);
- node_ptr p = end_iterator.pointed_node();
- header_holder_type* h = header_holder_type::get_holder(p);
- holder_t *holder = get_parent_from_member<holder_t, header_holder_type>(h, &holder_t::root);
- bstbase3 *base = get_parent_from_member<bstbase3, holder_t> (holder, &bstbase3::holder);
- return *base;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE bstbase3(const ValueTraits &vtraits)
- : holder(vtraits)
- {
- node_algorithms::init_header(this->header_ptr());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE node_ptr header_ptr()
- { return holder.root.get_node(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_node_ptr header_ptr() const
- { return holder.root.get_node(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const value_traits &get_value_traits() const
- { return this->holder; }
-
- BOOST_INTRUSIVE_FORCEINLINE value_traits &get_value_traits()
- { return this->holder; }
-
- typedef typename boost::intrusive::value_traits_pointers
- <ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
- { return pointer_traits<const_value_traits_ptr>::pointer_to(this->get_value_traits()); }
-
- iterator begin()
- { return iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
- { return cbegin(); }
-
- const_iterator cbegin() const
- { return const_iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
-
- iterator end()
- { return iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
- { return cend(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
- { return const_iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE iterator root()
- { return iterator(node_algorithms::root_node(this->header_ptr()), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator root() const
- { return croot(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator croot() const
- { return const_iterator(node_algorithms::root_node(this->header_ptr()), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rbegin()
- { return reverse_iterator(end()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rbegin() const
- { return const_reverse_iterator(end()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crbegin() const
- { return const_reverse_iterator(end()); }
-
- BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rend()
- { return reverse_iterator(begin()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rend() const
- { return const_reverse_iterator(begin()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crend() const
- { return const_reverse_iterator(begin()); }
-
- void replace_node(iterator replace_this, reference with_this)
- {
- node_algorithms::replace_node( get_value_traits().to_node_ptr(*replace_this)
- , this->header_ptr()
- , get_value_traits().to_node_ptr(with_this));
- if(safemode_or_autounlink)
- node_algorithms::init(replace_this.pointed_node());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE void rebalance()
- { node_algorithms::rebalance(this->header_ptr()); }
-
- iterator rebalance_subtree(iterator root)
- { return iterator(node_algorithms::rebalance_subtree(root.pointed_node()), this->priv_value_traits_ptr()); }
-
- 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());
- }
-
- static const_iterator s_iterator_to(const_reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- return const_iterator (value_traits::to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), const_value_traits_ptr());
- }
-
- iterator iterator_to(reference value)
- { return iterator (this->get_value_traits().to_node_ptr(value), this->priv_value_traits_ptr()); }
-
- const_iterator iterator_to(const_reference value) const
- { return const_iterator (this->get_value_traits().to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void init_node(reference value)
- { node_algorithms::init(value_traits::to_node_ptr(value)); }
-
-};
-
-template<class Less, class T>
-struct get_compare
-{
- typedef Less type;
-};
-
-template<class T>
-struct get_compare<void, T>
-{
- typedef ::std::less<T> type;
-};
-
-template<class KeyOfValue, class T>
-struct get_key_of_value
-{
- typedef KeyOfValue type;
-};
-
-template<class T>
-struct get_key_of_value<void, T>
-{
- typedef ::boost::intrusive::detail::identity<T> type;
-};
-
-template<class ValuePtr, class VoidOrKeyOfValue, class VoidOrKeyComp>
-struct bst_key_types
-{
- typedef typename
- boost::movelib::pointer_element<ValuePtr>::type value_type;
- typedef typename get_key_of_value
- < VoidOrKeyOfValue, value_type>::type key_of_value;
- typedef typename key_of_value::type key_type;
- typedef typename get_compare< VoidOrKeyComp
- , key_type
- >::type key_compare;
- typedef tree_value_compare
- <ValuePtr, key_compare, key_of_value> value_compare;
-};
-
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, algo_types AlgoType, typename HeaderHolder>
-struct bstbase2
- //Put the (possibly empty) functor in the first position to get EBO in MSVC
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder
- < typename bst_key_types
- < typename ValueTraits::pointer
- , VoidOrKeyOfValue
- , VoidOrKeyComp
-
- >::value_compare
- >
- , public bstbase3<ValueTraits, AlgoType, HeaderHolder>
-{
- typedef bstbase3<ValueTraits, AlgoType, HeaderHolder> treeheader_t;
- typedef bst_key_types< typename ValueTraits::pointer
- , VoidOrKeyOfValue
- , VoidOrKeyComp> key_types;
- typedef typename treeheader_t::value_traits value_traits;
- typedef typename treeheader_t::node_algorithms node_algorithms;
- typedef typename ValueTraits::value_type value_type;
- typedef typename key_types::key_type key_type;
- typedef typename key_types::key_of_value key_of_value;
- typedef typename key_types::key_compare key_compare;
- typedef typename key_types::value_compare value_compare;
- typedef typename treeheader_t::iterator iterator;
- typedef typename treeheader_t::const_iterator const_iterator;
- typedef typename treeheader_t::node_ptr node_ptr;
- typedef typename treeheader_t::const_node_ptr const_node_ptr;
-
- bstbase2(const key_compare &comp, const ValueTraits &vtraits)
- : detail::ebo_functor_holder<value_compare>(value_compare(comp)), treeheader_t(vtraits)
- {}
-
- const value_compare &comp() const
- { return this->get(); }
-
- value_compare &comp()
- { return this->get(); }
-
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::const_pointer) const_pointer;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::reference) reference;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::reference) const_reference;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
- typedef typename node_algorithms::insert_commit_data insert_commit_data;
-
- BOOST_INTRUSIVE_FORCEINLINE value_compare value_comp() const
- { return this->comp(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_compare key_comp() const
- { return this->comp().key_comp(); }
-
- //lower_bound
- BOOST_INTRUSIVE_FORCEINLINE iterator lower_bound(const key_type &key)
- { return this->lower_bound(key, this->key_comp()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator lower_bound(const key_type &key) const
- { return this->lower_bound(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp)
- {
- return iterator(node_algorithms::lower_bound
- (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
- }
-
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp) const
- {
- return const_iterator(node_algorithms::lower_bound
- (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
- }
-
- //upper_bound
- BOOST_INTRUSIVE_FORCEINLINE iterator upper_bound(const key_type &key)
- { return this->upper_bound(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp)
- {
- return iterator(node_algorithms::upper_bound
- (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator upper_bound(const key_type &key) const
- { return this->upper_bound(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp) const
- {
- return const_iterator(node_algorithms::upper_bound
- (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
- }
-
- template<class KeyTypeKeyCompare>
- struct key_node_comp_ret
- { typedef detail::key_nodeptr_comp<KeyTypeKeyCompare, value_traits, key_of_value> type; };
-
- template<class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_FORCEINLINE typename key_node_comp_ret<KeyTypeKeyCompare>::type key_node_comp(KeyTypeKeyCompare comp) const
- {
- return detail::key_nodeptr_comp<KeyTypeKeyCompare, value_traits, key_of_value>(comp, &this->get_value_traits());
- }
-
- //find
- BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
- { return this->find(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType &key, KeyTypeKeyCompare comp)
- {
- return iterator
- (node_algorithms::find(this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
- { return this->find(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType &key, KeyTypeKeyCompare comp) const
- {
- return const_iterator
- (node_algorithms::find(this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
- }
-
- //equal_range
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->equal_range(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp)
- {
- std::pair<node_ptr, node_ptr> ret
- (node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp)));
- return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
- , iterator(ret.second, this->priv_value_traits_ptr()));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->equal_range(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType &key, KeyTypeKeyCompare comp) const
- {
- std::pair<node_ptr, node_ptr> ret
- (node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp)));
- return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
- , const_iterator(ret.second, this->priv_value_traits_ptr()));
- }
-
- //lower_bound_range
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> lower_bound_range(const key_type &key)
- { return this->lower_bound_range(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> lower_bound_range(const KeyType &key, KeyTypeKeyCompare comp)
- {
- std::pair<node_ptr, node_ptr> ret
- (node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp)));
- return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
- , iterator(ret.second, this->priv_value_traits_ptr()));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
- lower_bound_range(const key_type &key) const
- { return this->lower_bound_range(key, this->key_comp()); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- lower_bound_range(const KeyType &key, KeyTypeKeyCompare comp) const
- {
- std::pair<node_ptr, node_ptr> ret
- (node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp)));
- return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
- , const_iterator(ret.second, this->priv_value_traits_ptr()));
- }
-
- //bounded_range
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed)
- { return this->bounded_range(lower_key, upper_key, this->key_comp(), left_closed, right_closed); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed)
- {
- std::pair<node_ptr, node_ptr> ret
- (node_algorithms::bounded_range
- (this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed));
- return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
- , iterator(ret.second, this->priv_value_traits_ptr()));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator,const_iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const
- { return this->bounded_range(lower_key, upper_key, this->key_comp(), left_closed, right_closed); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator,const_iterator> bounded_range
- (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const
- {
- std::pair<node_ptr, node_ptr> ret
- (node_algorithms::bounded_range
- (this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed));
- return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
- , const_iterator(ret.second, this->priv_value_traits_ptr()));
- }
-
- //insert_unique_check
- 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->key_comp(), commit_data); }
-
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(hint, key, this->key_comp(), commit_data); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
- , typename detail::disable_if_convertible
- <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
- std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
- insert_unique_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- (node_algorithms::insert_unique_check
- (this->header_ptr(), key, this->key_node_comp(comp), commit_data));
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- (node_algorithms::insert_unique_check
- (this->header_ptr(), hint.pointed_node(), key, this->key_node_comp(comp), commit_data));
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-};
-
-//Due to MSVC's EBO implementation, to save space and maintain the ABI, we must put the non-empty size member
-//in the first position, but if size is not going to be stored then we'll use an specialization
-//that doesn't inherit from size_holder
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, bool ConstantTimeSize, class SizeType, algo_types AlgoType, typename HeaderHolder>
-struct bstbase_hack
- : public detail::size_holder<ConstantTimeSize, SizeType>
- , public bstbase2 < ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder>
-{
- typedef bstbase2< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder> base_type;
- typedef typename base_type::key_compare key_compare;
- typedef typename base_type::value_compare value_compare;
- typedef SizeType size_type;
- typedef typename base_type::node_traits node_traits;
- typedef typename get_algo
- <AlgoType, node_traits>::type algo_type;
-
- BOOST_INTRUSIVE_FORCEINLINE bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
- : base_type(comp, vtraits)
- {
- this->sz_traits().set_size(size_type(0));
- }
-
- typedef detail::size_holder<ConstantTimeSize, SizeType> size_traits;
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits &sz_traits()
- { return static_cast<size_traits &>(*this); }
-
- BOOST_INTRUSIVE_FORCEINLINE const size_traits &sz_traits() const
- { return static_cast<const size_traits &>(*this); }
-};
-
-//Specialization for ConstantTimeSize == false
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, algo_types AlgoType, typename HeaderHolder>
-struct bstbase_hack<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, false, SizeType, AlgoType, HeaderHolder>
- : public bstbase2 < ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder>
-{
- typedef bstbase2< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder> base_type;
- typedef typename base_type::value_compare value_compare;
- typedef typename base_type::key_compare key_compare;
- BOOST_INTRUSIVE_FORCEINLINE bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
- : base_type(comp, vtraits)
- {}
-
- typedef detail::size_holder<false, SizeType> size_traits;
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits sz_traits() const
- { return size_traits(); }
-};
-
-//This class will
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, bool ConstantTimeSize, class SizeType, algo_types AlgoType, typename HeaderHolder>
-struct bstbase
- : public bstbase_hack< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder>
-{
- typedef bstbase_hack< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder> base_type;
- typedef ValueTraits value_traits;
- typedef typename base_type::value_compare value_compare;
- typedef typename base_type::key_compare key_compare;
- typedef typename base_type::const_reference const_reference;
- typedef typename base_type::reference reference;
- typedef typename base_type::iterator iterator;
- typedef typename base_type::const_iterator const_iterator;
- typedef typename base_type::node_traits node_traits;
- typedef typename get_algo
- <AlgoType, node_traits>::type node_algorithms;
- typedef SizeType size_type;
-
- BOOST_INTRUSIVE_FORCEINLINE bstbase(const key_compare & comp, const ValueTraits &vtraits)
- : base_type(comp, vtraits)
- {}
-
- //Detach all inserted nodes. This will add exception safety to bstree_impl
- //constructors inserting elements.
- ~bstbase()
- {
- if(is_safe_autounlink<value_traits::link_mode>::value){
- node_algorithms::clear_and_dispose
- ( this->header_ptr()
- , detail::node_disposer<detail::null_disposer, value_traits, AlgoType>
- (detail::null_disposer(), &this->get_value_traits()));
- node_algorithms::init(this->header_ptr());
- }
- }
-};
-
-
-/// @endcond
-
-//! The class template bstree is an unbalanced intrusive binary search tree
-//! container. The no-throw guarantee holds only, if the key_compare object
-//! doesn't throw.
-//!
-//! The complexity guarantees only hold if the tree is balanced, logarithmic
-//! complexity would increase to linear if the tree is totally unbalanced.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, algo_types AlgoType, typename HeaderHolder>
-#endif
-class bstree_impl
- : public bstbase<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder>
-{
- public:
- /// @cond
- typedef bstbase<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder> data_type;
- typedef tree_iterator<ValueTraits, false> iterator_type;
- typedef tree_iterator<ValueTraits, true> const_iterator_type;
- /// @endcond
-
- typedef BOOST_INTRUSIVE_IMPDEF(ValueTraits) value_traits;
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::const_pointer) const_pointer;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::element_type) value_type;
- typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::key_type) key_type;
- typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::key_of_value) key_of_value;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::reference) reference;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::reference) const_reference;
- typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
- typedef BOOST_INTRUSIVE_IMPDEF(SizeType) size_type;
- typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::value_compare) value_compare;
- typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::key_compare) key_compare;
- typedef BOOST_INTRUSIVE_IMPDEF(iterator_type) iterator;
- typedef BOOST_INTRUSIVE_IMPDEF(const_iterator_type) const_iterator;
- typedef BOOST_INTRUSIVE_IMPDEF(boost::intrusive::reverse_iterator<iterator>) reverse_iterator;
- typedef BOOST_INTRUSIVE_IMPDEF(boost::intrusive::reverse_iterator<const_iterator>) const_reverse_iterator;
- typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::node_traits) node_traits;
- typedef BOOST_INTRUSIVE_IMPDEF(typename node_traits::node) node;
- typedef BOOST_INTRUSIVE_IMPDEF(typename node_traits::node_ptr) node_ptr;
- typedef BOOST_INTRUSIVE_IMPDEF(typename node_traits::const_node_ptr) const_node_ptr;
- /// @cond
- typedef typename get_algo<AlgoType, node_traits>::type algo_type;
- /// @endcond
- typedef BOOST_INTRUSIVE_IMPDEF(algo_type) node_algorithms;
-
- static const bool constant_time_size = ConstantTimeSize;
- static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
- /// @cond
- private:
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bstree_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)));
-
-
- protected:
-
-
- /// @endcond
-
- public:
-
- typedef typename node_algorithms::insert_commit_data insert_commit_data;
-
- //! <b>Effects</b>: Constructs an empty container.
- //!
- //! <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 of the key_compare object throws. Basic guarantee.
- bstree_impl()
- : data_type(key_compare(), value_traits())
- {}
-
- //! <b>Effects</b>: Constructs an empty container with given comparison and traits.
- //!
- //! <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 of the key_compare object throws. Basic guarantee.
- explicit bstree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : data_type(cmp, v_traits)
- {}
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
- //! cmp must be a comparison function that induces a strict weak ordering.
- //!
- //! <b>Effects</b>: Constructs an empty container and inserts elements from
- //! [b, e).
- //!
- //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
- //! comp and otherwise N * log N, where N is the distance between first and last.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor/operator() of the key_compare object throws. Basic guarantee.
- template<class Iterator>
- bstree_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : data_type(cmp, v_traits)
- {
- //bstbase releases elements in case of exceptions
- 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 comparison object and 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 the comparison objet throws.
- bstree_impl(BOOST_RV_REF(bstree_impl) x)
- : data_type(::boost::move(x.comp()), ::boost::move(x.get_value_traits()))
- {
- this->swap(x);
- }
-
- //! <b>Effects</b>: Equivalent to swap
- //!
- BOOST_INTRUSIVE_FORCEINLINE bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x)
- { this->swap(x); return *this; }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! <b>Effects</b>: Detaches all elements from this. The objects in the set
- //! are not deleted (i.e. no destructors are called), but the nodes according to
- //! the value_traits template parameter are reinitialized and thus can be reused.
- //!
- //! <b>Complexity</b>: Linear to elements contained in *this.
- //!
- //! <b>Throws</b>: Nothing.
- ~bstree_impl()
- {}
-
- //! <b>Effects</b>: Returns an iterator pointing to the beginning of the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator begin();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the beginning of the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator begin() const;
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the beginning of the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator cbegin() const;
-
- //! <b>Effects</b>: Returns an iterator pointing to the end of the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator end();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the end of the container.
- //!
- //! <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 container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator cend() const;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning of the
- //! reversed container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- reverse_iterator rbegin();
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator rbegin() const;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator crbegin() const;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- reverse_iterator rend();
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator rend() const;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator crend() const;
-
- //! <b>Effects</b>: Returns a iterator pointing to the root node of the container or end() if not present.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator root();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator root() const;
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator croot() const;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Precondition</b>: end_iterator must be a valid end iterator
- //! of the container.
- //!
- //! <b>Effects</b>: Returns a const reference to the container associated to the end iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- static bstree_impl &container_from_end_iterator(iterator end_iterator)
- {
- return static_cast<bstree_impl&>
- (data_type::get_tree_base_from_end_iterator(end_iterator));
- }
-
- //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
- //! of the container.
- //!
- //! <b>Effects</b>: Returns a const reference to the container associated to the iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- static const bstree_impl &container_from_end_iterator(const_iterator end_iterator)
- {
- return static_cast<bstree_impl&>
- (data_type::get_tree_base_from_end_iterator(end_iterator));
- }
-
- //! <b>Precondition</b>: it must be a valid iterator
- //! of the container.
- //!
- //! <b>Effects</b>: Returns a const reference to the container associated to the iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Logarithmic.
- static bstree_impl &container_from_iterator(iterator it)
- { return container_from_end_iterator(it.end_iterator_from_it()); }
-
- //! <b>Precondition</b>: it must be a valid end const_iterator
- //! of container.
- //!
- //! <b>Effects</b>: Returns a const reference to the container associated to the end iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Logarithmic.
- static const bstree_impl &container_from_iterator(const_iterator it)
- { return container_from_end_iterator(it.end_iterator_from_it()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Returns the key_compare object used by the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If key_compare copy-constructor throws.
- key_compare key_comp() const;
-
- //! <b>Effects</b>: Returns the value_compare object used by the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_compare copy-constructor throws.
- value_compare value_comp() const;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Returns true if the container is empty.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- bool empty() const
- {
- if(ConstantTimeSize){
- return !this->data_type::sz_traits().get_size();
- }
- else{
- return algo_type::unique(this->header_ptr());
- }
- }
-
- //! <b>Effects</b>: Returns the number of elements stored in the container.
- //!
- //! <b>Complexity</b>: Linear to elements contained in *this
- //! if constant-time size option is disabled. Constant time otherwise.
- //!
- //! <b>Throws</b>: Nothing.
- size_type size() const
- {
- if(constant_time_size)
- return this->sz_traits().get_size();
- else{
- return (size_type)node_algorithms::size(this->header_ptr());
- }
- }
-
- //! <b>Effects</b>: Swaps the contents of two containers.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the comparison functor's swap call throws.
- void swap(bstree_impl& other)
- {
- //This can throw
- ::boost::adl_move_swap(this->comp(), other.comp());
- //These can't throw
- node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
- this->sz_traits().swap(other.sz_traits());
- }
-
- //! <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. Copies the predicate from the source container.
- //!
- //! 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 or predicate copy assignment throws. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(const bstree_impl &src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- if(!src.empty()){
- detail::exception_disposer<bstree_impl, Disposer>
- rollback(*this, disposer);
- node_algorithms::clone
- (src.header_ptr()
- ,this->header_ptr()
- ,detail::node_cloner <Cloner, value_traits, AlgoType>(cloner, &this->get_value_traits())
- ,detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
- this->sz_traits().set_size(src.sz_traits().get_size());
- this->comp() = src.comp();
- 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. Copies the predicate from the source container.
- //!
- //! 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 or predicate copy assignment throws. Basic guarantee.
- //!
- //! <b>Note</b>: This version can modify the source container, useful to implement
- //! move semantics.
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bstree_impl) src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- if(!src.empty()){
- detail::exception_disposer<bstree_impl, Disposer>
- rollback(*this, disposer);
- node_algorithms::clone
- (src.header_ptr()
- ,this->header_ptr()
- ,detail::node_cloner <Cloner, value_traits, AlgoType, false>(cloner, &this->get_value_traits())
- ,detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
- this->sz_traits().set_size(src.sz_traits().get_size());
- this->comp() = src.comp();
- rollback.release();
- }
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts value into the container before the upper bound.
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If the internal key_compare ordering function 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)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- iterator ret(node_algorithms::insert_equal_upper_bound
- (this->header_ptr(), to_insert, this->key_node_comp(this->key_comp())), this->priv_value_traits_ptr());
- this->sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: value must be an lvalue, and "hint" must be
- //! a valid iterator.
- //!
- //! <b>Effects</b>: Inserts x into the container, 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 t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the internal key_compare ordering function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(const_iterator hint, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- iterator ret(node_algorithms::insert_equal
- (this->header_ptr(), hint.pointed_node(), to_insert, this->key_node_comp(this->key_comp())), this->priv_value_traits_ptr());
- this->sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Inserts a each element of a range into the container
- //! before the upper bound of the key of each element.
- //!
- //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
- //! size of the range. However, it is linear in N if the range is already sorted
- //! by value_comp().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <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)
- {
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_equal(iend, *b);
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts value into the container if the value
- //! is not already present.
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <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<node_ptr, bool> ret =
- (node_algorithms::insert_unique_check
- (this->header_ptr(), key_of_value()(value), this->key_node_comp(this->key_comp()), commit_data));
- return std::pair<iterator, bool>
- ( ret.second ? this->insert_unique_commit(value, commit_data)
- : iterator(ret.first, this->priv_value_traits_ptr())
- , ret.second);
- }
-
- //! <b>Requires</b>: value must be an lvalue, and "hint" must be
- //! a valid iterator
- //!
- //! <b>Effects</b>: Tries to insert x into the container, using "hint" as a hint
- //! to where it will be inserted.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time (two comparisons in the worst case)
- //! if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_unique(const_iterator hint, reference value)
- {
- insert_commit_data commit_data;
- std::pair<node_ptr, bool> ret =
- (node_algorithms::insert_unique_check
- (this->header_ptr(), hint.pointed_node(), key_of_value()(value), this->key_node_comp(this->key_comp()), commit_data));
- return ret.second ? this->insert_unique_commit(value, commit_data)
- : iterator(ret.first, this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Tries to insert each element of a range into the container.
- //!
- //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
- //! size of the range. However, it is linear in N if the range is already sorted
- //! by value_comp().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <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)
- {
- if(this->empty()){
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_unique(iend, *b);
- }
- else{
- for (; b != e; ++b)
- this->insert_unique(*b);
- }
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If the comp ordering function throws. Strong guarantee.
- std::pair<iterator, bool> insert_unique_check(const key_type &key, insert_commit_data &commit_data);
-
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself, using "hint"
- //! as a hint to where it will be inserted.
- //!
- //! <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>: Logarithmic in general, but it's amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the comp ordering function throws. Strong guarantee.
- std::pair<iterator, bool> insert_unique_check(const_iterator hint, const key_type &key, insert_commit_data &commit_data);
-
- //! <b>Requires</b>: comp must be a comparison function that induces
- //! the same strict weak ordering as key_compare. The difference is that
- //! comp compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If the comp ordering function throws. 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 order is much cheaper to construct
- //! than the value_type 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 value_type and use
- //! "insert_commit" to insert the object 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_commit" only if no more
- //! objects are inserted or erased from the container.
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! <b>Requires</b>: comp must be a comparison function that induces
- //! the same strict weak ordering as key_compare. The difference is that
- //! comp compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself, using "hint"
- //! as a hint to where it will be inserted.
- //!
- //! <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>: Logarithmic in general, but it's amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the comp ordering function throws. 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
- //! constructing that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that key
- //! 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. This can give a total
- //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <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 container between
- //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
- //!
- //! <b>Effects</b>: Inserts the value in the container 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.
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
-
- #if !(defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ))
- //Test insertion position is correct
- iterator p(commit_data.node, this->priv_value_traits_ptr());
- if(!commit_data.link_left){
- ++p;
- }
- //Check if the insertion point is correct to detect wrong
- //uses insert_unique_check
- BOOST_ASSERT(( p == this->end() || !this->comp()(*p, value) ));
- BOOST_ASSERT(( p == this->begin() || !this->comp()(value, *--p) ));
- #endif
-
- node_algorithms::insert_unique_commit
- (this->header_ptr(), to_insert, commit_data);
- this->sz_traits().increment();
- return iterator(to_insert, this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be an lvalue, "pos" must be
- //! a valid iterator (or end) and must be the succesor of value
- //! once inserted according to the predicate
- //!
- //! <b>Effects</b>: Inserts x into the container before "pos".
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function does not check preconditions so if "pos" is not
- //! the successor of "value" container ordering invariant will be broken.
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- iterator insert_before(const_iterator pos, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->sz_traits().increment();
- return iterator(node_algorithms::insert_before
- (this->header_ptr(), pos.pointed_node(), to_insert), this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be an lvalue, and it must be no less
- //! than the greatest inserted key
- //!
- //! <b>Effects</b>: Inserts x into the container in the last position.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function does not check preconditions so if value is
- //! less than the greatest inserted key container ordering invariant will be broken.
- //! This function is slightly more efficient than using "insert_before".
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- void push_back(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->sz_traits().increment();
- node_algorithms::push_back(this->header_ptr(), to_insert);
- }
-
- //! <b>Requires</b>: value must be an lvalue, and it must be no greater
- //! than the minimum inserted key
- //!
- //! <b>Effects</b>: Inserts x into the container in the first position.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function does not check preconditions so if value is
- //! greater than the minimum inserted key container ordering invariant will be broken.
- //! This function is slightly more efficient than using "insert_before".
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- void push_front(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->sz_traits().increment();
- node_algorithms::push_front(this->header_ptr(), to_insert);
- }
-
- //! <b>Effects</b>: Erases the element pointed to by i.
- //!
- //! <b>Complexity</b>: Average complexity for erase element is constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- iterator erase(const_iterator i)
- {
- const_iterator ret(i);
- ++ret;
- node_ptr to_erase(i.pointed_node());
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase));
- node_algorithms::erase(this->header_ptr(), to_erase);
- this->sz_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- return ret.unconst();
- }
-
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //!
- //! <b>Complexity</b>: Average complexity for erase range is at most
- //! O(log(size() + N)), where N is the number of elements in the range.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- iterator erase(const_iterator b, const_iterator e)
- { size_type n; return this->private_erase(b, e, n); }
-
- //! <b>Effects</b>: Erases all the elements with the given value.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- size_type erase(const key_type &key)
- { return this->erase(key, this->key_comp()); }
-
- //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
- //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
- //! with nk the key_type of a value_type inserted into `*this`.
- //!
- //! <b>Effects</b>: Erases all the elements with the given key.
- //! according to the comparison functor "comp".
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class KeyType, class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase(const KeyType& key, KeyTypeKeyCompare comp)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- this->private_erase(p.first, p.second, n);
- return n;
- }
-
- //! <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 complexity for erase element is constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer)
- {
- node_ptr to_erase(i.pointed_node());
- iterator ret(this->erase(i));
- disposer(this->get_value_traits().to_value_ptr(to_erase));
- return ret;
- }
-
- //! <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>: O(log(size() + N).
- //!
- //! <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>
- size_type erase_and_dispose(const key_type &key, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key);
- size_type n;
- this->private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! <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 complexity for erase range is at most
- //! O(log(size() + N)), where N is the number of elements in the range.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- { size_type n; return this->private_erase(b, e, n, disposer); }
-
- //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
- //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk)
- //! and nk the key_type of a value_type inserted into `*this`.
- //!
- //! <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 "comp".
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- this->private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! <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()
- {
- if(safemode_or_autounlink){
- this->clear_and_dispose(detail::null_disposer());
- }
- else{
- node_algorithms::init_header(this->header_ptr());
- this->sz_traits().set_size(0);
- }
- }
-
- //! <b>Effects</b>: Erases all of the elements calling disposer(p) for
- //! each node to be erased.
- //! <b>Complexity</b>: Average complexity for is at most O(log(size() + N)),
- //! where N is the number of elements in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. Calls N times to disposer functor.
- template<class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- node_algorithms::clear_and_dispose(this->header_ptr()
- , detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
- node_algorithms::init_header(this->header_ptr());
- this->sz_traits().set_size(0);
- }
-
- //! <b>Effects</b>: Returns the number of contained elements with the given value
- //!
- //! <b>Complexity</b>: Logarithmic to the number of elements contained plus lineal
- //! to number of objects with the given value.
- //!
- //! <b>Throws</b>: If `key_compare` throws.
- size_type count(const key_type &key) const
- { return size_type(this->count(key, this->key_comp())); }
-
- //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
- //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
- //! and nk the key_type of a value_type inserted into `*this`.
- //!
- //! <b>Effects</b>: Returns the number of contained elements with the given key
- //!
- //! <b>Complexity</b>: Logarithmic to the number of elements contained plus lineal
- //! to number of objects with the given key.
- //!
- //! <b>Throws</b>: If `comp` throws.
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType &key, KeyTypeKeyCompare comp) const
- {
- std::pair<const_iterator, const_iterator> ret = this->equal_range(key, comp);
- size_type n = 0;
- for(; ret.first != ret.second; ++ret.first){ ++n; }
- return n;
- }
-
- #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //Add non-const overloads to theoretically const members
- //as some algorithms have different behavior when non-const versions are used (like splay trees).
- size_type count(const key_type &key)
- { return size_type(this->count(key, this->key_comp())); }
-
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType &key, KeyTypeKeyCompare comp)
- {
- std::pair<const_iterator, const_iterator> ret = this->equal_range(key, comp);
- size_type n = 0;
- for(; ret.first != ret.second; ++ret.first){ ++n; }
- return n;
- }
-
- #else //defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Returns an iterator to the first element whose
- //! key is not less than k or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `key_compare` throws.
- iterator lower_bound(const key_type &key);
-
- //! <b>Effects</b>: Returns an iterator to the first element whose
- //! key is not less than k or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `key_compare` throws.
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! <b>Effects</b>: Returns an iterator to the first element whose
- //! key is greater than k or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `key_compare` throws.
- iterator upper_bound(const key_type &key);
-
- //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
- //! !comp(key, nk), with nk the key_type of a value_type inserted into `*this`.
- //!
- //! <b>Effects</b>: Returns an iterator to the first element whose
- //! key is greater than k according to comp or end() if that element
- //! does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `comp` throws.
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! <b>Effects</b>: Finds an iterator to the first element whose key is
- //! k or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `key_compare` throws.
- iterator find(const key_type &key);
-
- //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
- //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
- //! and nk the key_type of a value_type inserted into `*this`.
- //!
- //! <b>Effects</b>: Finds an iterator to the first element whose key is
- //! k or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `comp` throws.
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! <b>Effects</b>: Finds a range containing all elements whose key is k or
- //! an empty range that indicates the position where those elements would be
- //! if they there is no elements with key k.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `key_compare` throws.
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
- //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
- //! with nk the key_type of a value_type inserted into `*this`.
- //!
- //! <b>Effects</b>: Finds a range containing all elements whose key is k or
- //! an empty range that indicates the position where those elements would be
- //! if they there is no elements with key k.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If `comp` throws.
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<const_iterator, const_iterator> equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! <b>Requires</b>:
- //! `upper_key` shall not precede `lower_key` according to key_compare.
- //! [key_comp()(upper_key, lower_key) shall be false]
- //!
- //! If `lower_key` is equivalent to `upper_key`
- //! [!key_comp()(upper_key, lower_key) && !key_comp()(lower_key, upper_key)] then
- //! ('left_closed' || 'right_closed') must be false.
- //!
- //! <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 `key_compare` throws.
- //!
- //! <b>Note</b>: This function can be more efficient than calling upper_bound
- //! and lower_bound for lower_value and upper_value.
- //!
- //! <b>Note</b>: Experimental function, the interface might change in future releases.
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_value, bool left_closed, bool right_closed);
-
- //! <b>Requires</b>:
- //! `lower_key` is a value such that `*this` is partitioned with respect to
- //! comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.
- //!
- //! `upper_key` is a value such that `*this` is partitioned with respect to
- //! !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.
- //!
- //! `upper_key` shall not precede `lower_key` according to comp
- //! [comp(upper_key, lower_key) shall be false]
- //!
- //! If `lower_key` is equivalent to `upper_key`
- //! [!comp(upper_key, lower_key) && !comp(lower_key, upper_key)] then
- //! ('left_closed' || 'right_closed') must be false.
- //!
- //! <b>Effects</b>: Returns an a pair with the following criteria:
- //!
- //! first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise
- //!
- //! second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) 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 in future releases.
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<const_iterator,const_iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator,const_iterator> bounded_range
- (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid iterator i belonging to the 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 iterator s_iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_iterator i belonging to the
- //! 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_iterator s_iterator_to(const_reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid iterator i belonging to the set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_iterator i belonging to the
- //! set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator iterator_to(const_reference value) const;
-
- //! <b>Requires</b>: value shall not be in a container.
- //!
- //! <b>Effects</b>: init_node puts the hook of a value in a well-known default
- //! state.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: This function puts the hook in the well-known default state
- //! used by auto_unlink and safe hooks.
- static void init_node(reference value);
-
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Unlinks the leftmost node from the container.
- //!
- //! <b>Complexity</b>: Average complexity is constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function breaks the container and the container 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 container.
- pointer unlink_leftmost_without_rebalance()
- {
- node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance
- (this->header_ptr()));
- if(!to_be_disposed)
- return 0;
- this->sz_traits().decrement();
- if(safemode_or_autounlink)//If this is commented does not work with normal_link
- node_algorithms::init(to_be_disposed);
- return this->get_value_traits().to_value_ptr(to_be_disposed);
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: replace_this must be a valid iterator of *this
- //! and with_this must not be inserted in any container.
- //!
- //! <b>Effects</b>: Replaces replace_this in its position in the
- //! container with with_this. The container 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
- //! with_this is not equivalent to *replace_this according to the
- //! ordering rules. This function is faster than erasing and inserting
- //! the node, since no rebalancing or comparison is needed.
- void replace_node(iterator replace_this, reference with_this);
-
- //! <b>Effects</b>: Rebalances the tree.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear.
- void rebalance();
-
- //! <b>Requires</b>: old_root is a node of a tree.
- //!
- //! <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 to the elements in the subtree.
- iterator rebalance_subtree(iterator root);
-
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: removes "value" from the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Logarithmic time.
- //!
- //! <b>Note</b>: This static function is only usable with non-constant
- //! time size containers that have stateless comparison functors.
- //!
- //! If the user calls
- //! this function with a constant time size container or stateful comparison
- //! functor a compilation error will be issued.
- static void remove_node(reference value)
- {
- BOOST_STATIC_ASSERT((!constant_time_size));
- node_ptr to_remove(value_traits::to_node_ptr(value));
- node_algorithms::unlink(to_remove);
- if(safemode_or_autounlink)
- node_algorithms::init(to_remove);
- }
-
- //! <b>Requires</b>: "source" container's Options can only can differ in the comparison
- //! function from *this.
- //!
- //! <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())
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- template<class T, class ...Options2> void merge_unique(bstree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_unique(bstree_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, AlgoType, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
- if( node_algorithms::transfer_unique(this->header_ptr(), this->key_node_comp(this->key_comp()), source.header_ptr(), p) ){
- source.sz_traits().decrement();
- this->sz_traits().increment();
- }
- }
- }
-
- //! <b>Requires</b>: "source" container's Options can only can differ in the comparison
- //! function from *this.
- //!
- //! <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())
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- template<class T, class ...Options2> void merge_equal(bstree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_equal(bstree_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, AlgoType, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
- node_algorithms::transfer_equal(this->header_ptr(), this->key_node_comp(this->key_comp()), source.header_ptr(), p);
- source.sz_traits().decrement();
- this->sz_traits().increment();
- }
- }
-
- //! <b>Effects</b>: Asserts the integrity of the container with additional checks provided by the user.
- //!
- //! <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 ExtraChecker>
- void check(ExtraChecker extra_checker) const
- {
- typedef detail::key_nodeptr_comp<key_compare, value_traits, key_of_value> nodeptr_comp_t;
- nodeptr_comp_t nodeptr_comp(this->key_comp(), &this->get_value_traits());
- typedef typename get_node_checker<AlgoType, ValueTraits, nodeptr_comp_t, ExtraChecker>::type node_checker_t;
- typename node_checker_t::return_type checker_return;
- node_algorithms::check(this->header_ptr(), node_checker_t(nodeptr_comp, extra_checker), checker_return);
- if (constant_time_size)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(this->sz_traits().get_size() == checker_return.node_count);
- }
-
- //! <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
- {
- check(detail::empty_node_checker<ValueTraits>());
- }
-
- friend bool operator==(const bstree_impl &x, const bstree_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 bstree_impl &x, const bstree_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const bstree_impl &x, const bstree_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const bstree_impl &x, const bstree_impl &y)
- { return y < x; }
-
- friend bool operator<=(const bstree_impl &x, const bstree_impl &y)
- { return !(x > y); }
-
- friend bool operator>=(const bstree_impl &x, const bstree_impl &y)
- { return !(x < y); }
-
- friend void swap(bstree_impl &x, bstree_impl &y)
- { x.swap(y); }
-
- /// @cond
- private:
- template<class Disposer>
- iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
- {
- for(n = 0; b != e; ++n)
- this->erase_and_dispose(b++, disposer);
- return b.unconst();
- }
-
- iterator private_erase(const_iterator b, const_iterator e, size_type &n)
- {
- for(n = 0; b != e; ++n)
- this->erase(b++);
- return b.unconst();
- }
- /// @endcond
-};
-
-//! Helper metafunction to define a \c bstree 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_bstree
-{
- /// @cond
- typedef typename pack_options
- < bstree_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 bstree_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , BsTreeAlgorithms
- , 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 bstree
- : public make_bstree<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_bstree
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bstree)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- bstree()
- : Base()
- {}
-
- explicit bstree( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- bstree( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, v_traits)
- {}
-
- bstree(BOOST_RV_REF(bstree) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- bstree& operator=(BOOST_RV_REF(bstree) x)
- { return static_cast<bstree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const bstree &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bstree) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static bstree &container_from_end_iterator(iterator end_iterator)
- { return static_cast<bstree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const bstree &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const bstree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static bstree &container_from_iterator(iterator it)
- { return static_cast<bstree &>(Base::container_from_iterator(it)); }
-
- static const bstree &container_from_iterator(const_iterator it)
- { return static_cast<const bstree &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //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
deleted file mode 100644
index 006d9c238bf..00000000000
--- a/src/third_party/boost-1.69.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(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/detail/ebo_functor_holder.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/ebo_functor_holder.hpp
deleted file mode 100644
index 27415c11703..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/ebo_functor_holder.hpp
+++ /dev/null
@@ -1,292 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Joaquin M Lopez Munoz 2006-2013
-// (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_EBO_HOLDER_HPP
-#define BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_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/move/utility_core.hpp>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-#if defined(BOOST_MSVC) || defined(__BORLANDC_)
-#define BOOST_INTRUSIVE_TT_DECL __cdecl
-#else
-#define BOOST_INTRUSIVE_TT_DECL
-#endif
-
-#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(_M_ARM) && !defined(_M_ARM64) && !defined(UNDER_CE)
-#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-#endif
-
-template <typename T>
-struct is_unary_or_binary_function_impl
-{ static const bool value = false; };
-
-// see boost ticket #4094
-// avoid duplicate definitions of is_unary_or_binary_function_impl
-#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-
-template <typename R>
-struct is_unary_or_binary_function_impl<R (*)()>
-{ static const bool value = true; };
-
-template <typename R>
-struct is_unary_or_binary_function_impl<R (*)(...)>
-{ static const bool value = true; };
-
-#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-
-template <typename R>
-struct is_unary_or_binary_function_impl<R (__stdcall*)()>
-{ static const bool value = true; };
-
-#ifndef _MANAGED
-
-template <typename R>
-struct is_unary_or_binary_function_impl<R (__fastcall*)()>
-{ static const bool value = true; };
-
-#endif
-
-template <typename R>
-struct is_unary_or_binary_function_impl<R (__cdecl*)()>
-{ static const bool value = true; };
-
-template <typename R>
-struct is_unary_or_binary_function_impl<R (__cdecl*)(...)>
-{ static const bool value = true; };
-
-#endif
-
-// see boost ticket #4094
-// avoid duplicate definitions of is_unary_or_binary_function_impl
-#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-
-template <typename R, class T0>
-struct is_unary_or_binary_function_impl<R (*)(T0)>
-{ static const bool value = true; };
-
-template <typename R, class T0>
-struct is_unary_or_binary_function_impl<R (*)(T0...)>
-{ static const bool value = true; };
-
-#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-
-template <typename R, class T0>
-struct is_unary_or_binary_function_impl<R (__stdcall*)(T0)>
-{ static const bool value = true; };
-
-#ifndef _MANAGED
-
-template <typename R, class T0>
-struct is_unary_or_binary_function_impl<R (__fastcall*)(T0)>
-{ static const bool value = true; };
-
-#endif
-
-template <typename R, class T0>
-struct is_unary_or_binary_function_impl<R (__cdecl*)(T0)>
-{ static const bool value = true; };
-
-template <typename R, class T0>
-struct is_unary_or_binary_function_impl<R (__cdecl*)(T0...)>
-{ static const bool value = true; };
-
-#endif
-
-// see boost ticket #4094
-// avoid duplicate definitions of is_unary_or_binary_function_impl
-#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-
-template <typename R, class T0, class T1>
-struct is_unary_or_binary_function_impl<R (*)(T0, T1)>
-{ static const bool value = true; };
-
-template <typename R, class T0, class T1>
-struct is_unary_or_binary_function_impl<R (*)(T0, T1...)>
-{ static const bool value = true; };
-
-#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
-
-template <typename R, class T0, class T1>
-struct is_unary_or_binary_function_impl<R (__stdcall*)(T0, T1)>
-{ static const bool value = true; };
-
-#ifndef _MANAGED
-
-template <typename R, class T0, class T1>
-struct is_unary_or_binary_function_impl<R (__fastcall*)(T0, T1)>
-{ static const bool value = true; };
-
-#endif
-
-template <typename R, class T0, class T1>
-struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1)>
-{ static const bool value = true; };
-
-template <typename R, class T0, class T1>
-struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1...)>
-{ static const bool value = true; };
-#endif
-
-template <typename T>
-struct is_unary_or_binary_function_impl<T&>
-{ static const bool value = false; };
-
-template<typename T>
-struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T>
-{};
-
-template<typename T, bool = is_unary_or_binary_function<T>::value>
-class ebo_functor_holder
-{
- BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
-
- public:
- typedef T functor_type;
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder()
- : t_()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(const T &t)
- : t_(t)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(BOOST_RV_REF(T) t)
- : t_(::boost::move(t))
- {}
-
- template<class Arg1, class Arg2>
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
- : t_(::boost::forward<Arg1>(arg1), ::boost::forward<Arg2>(arg2))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(const ebo_functor_holder &x)
- : t_(x.t_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_RV_REF(ebo_functor_holder) x)
- : t_(x.t_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_COPY_ASSIGN_REF(ebo_functor_holder) x)
- {
- this->get() = x.get();
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(ebo_functor_holder) x)
- {
- this->get() = ::boost::move(x.get());
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(const T &x)
- {
- this->get() = x;
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(T) x)
- {
- this->get() = ::boost::move(x);
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE T& get(){return t_;}
- BOOST_INTRUSIVE_FORCEINLINE const T& get()const{return t_;}
-
- private:
- T t_;
-};
-
-template<typename T>
-class ebo_functor_holder<T, false>
- : public T
-{
- BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
-
- public:
- typedef T functor_type;
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder()
- : T()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(const T &t)
- : T(t)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(BOOST_RV_REF(T) t)
- : T(::boost::move(t))
- {}
-
- template<class Arg1, class Arg2>
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
- : T(::boost::forward<Arg1>(arg1), ::boost::forward<Arg2>(arg2))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(const ebo_functor_holder &x)
- : T(static_cast<const T&>(x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_RV_REF(ebo_functor_holder) x)
- : T(BOOST_MOVE_BASE(T, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_COPY_ASSIGN_REF(ebo_functor_holder) x)
- {
- const ebo_functor_holder&r = x;
- this->get() = r;
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(ebo_functor_holder) x)
- {
- this->get() = ::boost::move(x.get());
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(const T &x)
- {
- this->get() = x;
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(T) x)
- {
- this->get() = ::boost::move(x);
- return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE T& get(){return *this;}
- BOOST_INTRUSIVE_FORCEINLINE const T& get()const{return *this;}
-};
-
-} //namespace detail {
-} //namespace intrusive {
-} //namespace boost {
-
-#endif //#ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp
deleted file mode 100644
index 13421b88050..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp
+++ /dev/null
@@ -1,223 +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_GENERIC_HOOK_HPP
-#define BOOST_INTRUSIVE_GENERIC_HOOK_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/node_holder.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/static_assert.hpp>
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-namespace detail {
-
-template <link_mode_type LinkMode>
-struct link_dispatch
-{};
-
-template<class Hook>
-void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
-{ //If this assertion raises, you might have destroyed an object
- //while it was still inserted in a container that is alive.
- //If so, remove the object from the container before destroying it.
- (void)hook; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!hook.is_linked());
-}
-
-template<class Hook>
-void destructor_impl(Hook &hook, detail::link_dispatch<auto_unlink>)
-{ hook.unlink(); }
-
-template<class Hook>
-void destructor_impl(Hook &, detail::link_dispatch<normal_link>)
-{}
-
-} //namespace detail {
-
-enum base_hook_type
-{ NoBaseHookId
-, ListBaseHookId
-, SlistBaseHookId
-, RbTreeBaseHookId
-, HashBaseHookId
-, AvlTreeBaseHookId
-, BsTreeBaseHookId
-, TreapTreeBaseHookId
-, AnyBaseHookId
-};
-
-
-template <class HookTags, unsigned int>
-struct hook_tags_definer{};
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, ListBaseHookId>
-{ typedef HookTags default_list_hook; };
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, SlistBaseHookId>
-{ typedef HookTags default_slist_hook; };
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, RbTreeBaseHookId>
-{ typedef HookTags default_rbtree_hook; };
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, HashBaseHookId>
-{ typedef HookTags default_hashtable_hook; };
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, AvlTreeBaseHookId>
-{ typedef HookTags default_avltree_hook; };
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, BsTreeBaseHookId>
-{ typedef HookTags default_bstree_hook; };
-
-template <class HookTags>
-struct hook_tags_definer<HookTags, AnyBaseHookId>
-{ typedef HookTags default_any_hook; };
-
-template
- < class NodeTraits
- , class Tag
- , link_mode_type LinkMode
- , base_hook_type BaseHookType
- >
-struct hooktags_impl
-{
- static const link_mode_type link_mode = LinkMode;
- typedef Tag tag;
- typedef NodeTraits node_traits;
- static const bool is_base_hook = !detail::is_same<Tag, member_tag>::value;
- static const bool safemode_or_autounlink = is_safe_autounlink<link_mode>::value;
- static const unsigned int type = BaseHookType;
-};
-
-/// @endcond
-
-template
- < boost::intrusive::algo_types Algo
- , class NodeTraits
- , class Tag
- , link_mode_type LinkMode
- , base_hook_type BaseHookType
- >
-class generic_hook
- /// @cond
- //If the hook is a base hook, derive generic hook from node_holder
- //so that a unique base class is created to convert from the node
- //to the type. This mechanism will be used by bhtraits.
- //
- //If the hook is a member hook, generic hook will directly derive
- //from the hook.
- : public detail::if_c
- < detail::is_same<Tag, member_tag>::value
- , typename NodeTraits::node
- , node_holder<typename NodeTraits::node, Tag, BaseHookType>
- >::type
- //If this is the a default-tagged base hook derive from a class that
- //will define an special internal typedef. Containers will be able to detect this
- //special typedef and obtain generic_hook's internal types in order to deduce
- //value_traits for this hook.
- , public hook_tags_definer
- < generic_hook<Algo, NodeTraits, Tag, LinkMode, BaseHookType>
- , detail::is_same<Tag, dft_tag>::value ? BaseHookType : NoBaseHookId>
- /// @endcond
-{
- /// @cond
- typedef typename get_algo<Algo, NodeTraits>::type node_algorithms;
- typedef typename node_algorithms::node node;
- typedef typename node_algorithms::node_ptr node_ptr;
- typedef typename node_algorithms::const_node_ptr const_node_ptr;
-
- public:
-
- typedef hooktags_impl
- < NodeTraits
- , Tag, LinkMode, BaseHookType> hooktags;
-
- node_ptr this_ptr()
- { return pointer_traits<node_ptr>::pointer_to(static_cast<node&>(*this)); }
-
- const_node_ptr this_ptr() const
- { return pointer_traits<const_node_ptr>::pointer_to(static_cast<const node&>(*this)); }
-
- public:
- /// @endcond
-
- generic_hook()
- {
- if(hooktags::safemode_or_autounlink){
- node_algorithms::init(this->this_ptr());
- }
- }
-
- generic_hook(const generic_hook& )
- {
- if(hooktags::safemode_or_autounlink){
- node_algorithms::init(this->this_ptr());
- }
- }
-
- generic_hook& operator=(const generic_hook& )
- { return *this; }
-
- ~generic_hook()
- {
- destructor_impl
- (*this, detail::link_dispatch<hooktags::link_mode>());
- }
-
- void swap_nodes(generic_hook &other)
- {
- node_algorithms::swap_nodes
- (this->this_ptr(), other.this_ptr());
- }
-
- bool is_linked() const
- {
- //is_linked() can be only used in safe-mode or auto-unlink
- BOOST_STATIC_ASSERT(( hooktags::safemode_or_autounlink ));
- return !node_algorithms::unique(this->this_ptr());
- }
-
- void unlink()
- {
- BOOST_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
- node_ptr n(this->this_ptr());
- if(!node_algorithms::inited(n)){
- node_algorithms::unlink(n);
- node_algorithms::init(n);
- }
- }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_GENERIC_HOOK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp
deleted file mode 100644
index d3b11d1b229..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp
+++ /dev/null
@@ -1,286 +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_HASHTABLE_NODE_HPP
-#define BOOST_INTRUSIVE_HASHTABLE_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/detail/assert.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/trivial_value_traits.hpp>
-#include <boost/intrusive/slist.hpp> //make_slist
-#include <cstddef>
-#include <climits>
-#include <boost/move/core.hpp>
-
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template <class Slist>
-struct bucket_impl : public Slist
-{
- typedef Slist slist_type;
- BOOST_INTRUSIVE_FORCEINLINE bucket_impl()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_impl(const bucket_impl &)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE ~bucket_impl()
- {
- //This bucket is still being used!
- BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_impl &operator=(const bucket_impl&)
- {
- //This bucket is still in use!
- BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
- return *this;
- }
-};
-
-template<class Slist>
-struct bucket_traits_impl
-{
- private:
- BOOST_COPYABLE_AND_MOVABLE(bucket_traits_impl)
-
- public:
- /// @cond
-
- typedef typename pointer_traits
- <typename Slist::pointer>::template rebind_pointer
- < bucket_impl<Slist> >::type bucket_ptr;
- typedef Slist slist;
- typedef typename Slist::size_type size_type;
- /// @endcond
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(bucket_ptr buckets, size_type len)
- : buckets_(buckets), buckets_len_(len)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(const bucket_traits_impl &x)
- : buckets_(x.buckets_), buckets_len_(x.buckets_len_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(BOOST_RV_REF(bucket_traits_impl) x)
- : buckets_(x.buckets_), buckets_len_(x.buckets_len_)
- { x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_RV_REF(bucket_traits_impl) x)
- {
- buckets_ = x.buckets_; buckets_len_ = x.buckets_len_;
- x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_COPY_ASSIGN_REF(bucket_traits_impl) x)
- {
- buckets_ = x.buckets_; buckets_len_ = x.buckets_len_; return *this;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &bucket_begin() const
- { return buckets_; }
-
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
- { return buckets_len_; }
-
- private:
- bucket_ptr buckets_;
- size_type buckets_len_;
-};
-
-template <class NodeTraits>
-struct hash_reduced_slist_node_traits
-{
- template <class U> static detail::no_type test(...);
- template <class U> static detail::yes_type test(typename U::reduced_slist_node_traits*);
- static const bool value = sizeof(test<NodeTraits>(0)) == sizeof(detail::yes_type);
-};
-
-template <class NodeTraits>
-struct apply_reduced_slist_node_traits
-{
- typedef typename NodeTraits::reduced_slist_node_traits type;
-};
-
-template <class NodeTraits>
-struct reduced_slist_node_traits
-{
- typedef typename detail::eval_if_c
- < hash_reduced_slist_node_traits<NodeTraits>::value
- , apply_reduced_slist_node_traits<NodeTraits>
- , detail::identity<NodeTraits>
- >::type type;
-};
-
-template<class NodeTraits>
-struct get_slist_impl
-{
- typedef trivial_value_traits<NodeTraits, normal_link> trivial_traits;
-
- //Reducing symbol length
- struct type : make_slist
- < typename NodeTraits::node
- , boost::intrusive::value_traits<trivial_traits>
- , boost::intrusive::constant_time_size<false>
- , boost::intrusive::size_type<std::size_t>
- >::type
- {};
-};
-
-} //namespace detail {
-
-template<class BucketValueTraits, bool IsConst>
-class hashtable_iterator
-{
- typedef typename BucketValueTraits::value_traits value_traits;
- typedef typename BucketValueTraits::bucket_traits bucket_traits;
-
- typedef iiterator< value_traits, IsConst
- , std::forward_iterator_tag> types_t;
- 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;
-
- private:
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename detail::get_slist_impl
- < typename detail::reduced_slist_node_traits
- <node_traits>::type >::type slist_impl;
- typedef typename slist_impl::iterator siterator;
- typedef typename slist_impl::const_iterator const_siterator;
- typedef detail::bucket_impl<slist_impl> bucket_type;
-
- typedef typename pointer_traits
- <pointer>::template rebind_pointer
- < const BucketValueTraits >::type const_bucketvaltraits_ptr;
- typedef typename slist_impl::size_type size_type;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_ptr p)
- {
- return pointer_traits<node_ptr>::
- pointer_to(static_cast<typename node_traits::node&>(*p));
- }
-
- public:
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator ()
- : slist_it_() //Value initialization to achieve "null iterators" (N3644)
- {}
-
- explicit hashtable_iterator(siterator ptr, const BucketValueTraits *cont)
- : slist_it_ (ptr)
- , traitsptr_ (cont ? pointer_traits<const_bucketvaltraits_ptr>::pointer_to(*cont) : const_bucketvaltraits_ptr() )
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator<BucketValueTraits, false> &other)
- : slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const siterator &slist_it() const
- { return slist_it_; }
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, false> unconst() const
- { return hashtable_iterator<BucketValueTraits, false>(this->slist_it(), this->get_bucket_value_traits()); }
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
- { this->increment(); return *this; }
-
- hashtable_iterator operator++(int)
- {
- hashtable_iterator result (*this);
- this->increment();
- return result;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const hashtable_iterator& i, const hashtable_iterator& i2)
- { return i.slist_it_ == i2.slist_it_; }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const hashtable_iterator& i, const hashtable_iterator& i2)
- { return !(i == i2); }
-
- BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
- { return *this->operator ->(); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
- {
- return this->priv_value_traits().to_value_ptr
- (downcast_bucket(slist_it_.pointed_node()));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const const_bucketvaltraits_ptr &get_bucket_value_traits() const
- { return traitsptr_; }
-
- BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
- { return traitsptr_->priv_value_traits(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
- { return traitsptr_->priv_bucket_traits(); }
-
- private:
- void increment()
- {
- const bucket_traits &rbuck_traits = this->priv_bucket_traits();
- bucket_type* const buckets = boost::movelib::to_raw_pointer(rbuck_traits.bucket_begin());
- const size_type buckets_len = rbuck_traits.bucket_count();
-
- ++slist_it_;
- const typename slist_impl::node_ptr n = slist_it_.pointed_node();
- const siterator first_bucket_bbegin = buckets->end();
- if(first_bucket_bbegin.pointed_node() <= n && n <= buckets[buckets_len-1].cend().pointed_node()){
- //If one-past the node is inside the bucket then look for the next non-empty bucket
- //1. get the bucket_impl from the iterator
- const bucket_type &b = static_cast<const bucket_type&>
- (bucket_type::slist_type::container_from_end_iterator(slist_it_));
-
- //2. Now just calculate the index b has in the bucket array
- size_type n_bucket = static_cast<size_type>(&b - buckets);
-
- //3. Iterate until a non-empty bucket is found
- do{
- if (++n_bucket >= buckets_len){ //bucket overflow, return end() iterator
- slist_it_ = buckets->before_begin();
- return;
- }
- }
- while (buckets[n_bucket].empty());
- slist_it_ = buckets[n_bucket].begin();
- }
- else{
- //++slist_it_ yield to a valid object
- }
- }
-
- siterator slist_it_;
- const_bucketvaltraits_ptr traitsptr_;
-};
-
-} //namespace intrusive {
-} //namespace boost {
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp
deleted file mode 100644
index 7a6f206ca2b..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp
+++ /dev/null
@@ -1,187 +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_DETAIL_HOOK_TRAITS_HPP
-#define BOOST_INTRUSIVE_DETAIL_HOOK_TRAITS_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_traits.hpp>
-#include <boost/intrusive/detail/parent_from_member.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/intrusive/detail/node_holder.hpp>
-
-namespace boost {
-namespace intrusive {
-
-template<class T, class NodePtr, class Tag, unsigned int Type>
-struct bhtraits_base
-{
- public:
- typedef NodePtr node_ptr;
- typedef typename pointer_traits<node_ptr>::element_type node;
- typedef node_holder<node, Tag, Type> node_holder_type;
- typedef T value_type;
- typedef typename pointer_traits<node_ptr>::
- template rebind_pointer<const node>::type const_node_ptr;
- typedef typename pointer_traits<node_ptr>::
- template rebind_pointer<T>::type pointer;
- typedef typename pointer_traits<node_ptr>::
- template rebind_pointer<const T>::type const_pointer;
- //typedef typename pointer_traits<pointer>::reference reference;
- //typedef typename pointer_traits<const_pointer>::reference const_reference;
- typedef T & reference;
- typedef const T & const_reference;
- typedef node_holder_type & node_holder_reference;
- typedef const node_holder_type & const_node_holder_reference;
- typedef node& node_reference;
- typedef const node & const_node_reference;
-
- BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
- {
- return pointer_traits<pointer>::pointer_to
- (static_cast<reference>(static_cast<node_holder_reference>(*n)));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
- {
- return pointer_traits<const_pointer>::pointer_to
- (static_cast<const_reference>(static_cast<const_node_holder_reference>(*n)));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
- {
- return pointer_traits<node_ptr>::pointer_to
- (static_cast<node_reference>(static_cast<node_holder_reference>(value)));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
- {
- return pointer_traits<const_node_ptr>::pointer_to
- (static_cast<const_node_reference>(static_cast<const_node_holder_reference>(value)));
- }
-};
-
-template<class T, class NodeTraits, link_mode_type LinkMode, class Tag, unsigned int Type>
-struct bhtraits
- : public bhtraits_base<T, typename NodeTraits::node_ptr, Tag, Type>
-{
- static const link_mode_type link_mode = LinkMode;
- typedef NodeTraits node_traits;
-};
-
-
-template<class T, class Hook, Hook T::* P>
-struct mhtraits
-{
- public:
- typedef Hook hook_type;
- typedef typename hook_type::hooktags::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef T value_type;
- 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<T>::type pointer;
- typedef typename pointer_traits<node_ptr>::
- template rebind_pointer<const T>::type const_pointer;
- typedef T & reference;
- typedef const T & const_reference;
- typedef node& node_reference;
- typedef const node & const_node_reference;
- typedef hook_type& hook_reference;
- typedef const hook_type & const_hook_reference;
-
- static const link_mode_type link_mode = Hook::hooktags::link_mode;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
- {
- return pointer_traits<node_ptr>::pointer_to
- (static_cast<node_reference>(static_cast<hook_reference>(value.*P)));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
- {
- return pointer_traits<const_node_ptr>::pointer_to
- (static_cast<const_node_reference>(static_cast<const_hook_reference>(value.*P)));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
- {
- return pointer_traits<pointer>::pointer_to
- (*detail::parent_from_member<T, Hook>
- (static_cast<Hook*>(boost::movelib::to_raw_pointer(n)), P));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
- {
- return pointer_traits<const_pointer>::pointer_to
- (*detail::parent_from_member<T, Hook>
- (static_cast<const Hook*>(boost::movelib::to_raw_pointer(n)), P));
- }
-};
-
-
-template<class Functor>
-struct fhtraits
-{
- public:
- typedef typename Functor::hook_type hook_type;
- typedef typename Functor::hook_ptr hook_ptr;
- typedef typename Functor::const_hook_ptr const_hook_ptr;
- typedef typename hook_type::hooktags::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename Functor::value_type value_type;
- 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 value_type & reference;
- typedef const value_type & const_reference;
- static const link_mode_type link_mode = hook_type::hooktags::link_mode;
-
- static node_ptr to_node_ptr(reference value)
- { return static_cast<node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
-
- static const_node_ptr to_node_ptr(const_reference value)
- { return static_cast<const node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
-
- static pointer to_value_ptr(const node_ptr & n)
- { return Functor::to_value_ptr(to_hook_ptr(n)); }
-
- static const_pointer to_value_ptr(const const_node_ptr & n)
- { return Functor::to_value_ptr(to_hook_ptr(n)); }
-
- private:
- static hook_ptr to_hook_ptr(const node_ptr & n)
- { return hook_ptr(&*static_cast<hook_type*>(&*n)); }
-
- static const_hook_ptr to_hook_ptr(const const_node_ptr & n)
- { return const_hook_ptr(&*static_cast<const hook_type*>(&*n)); }
-};
-
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_DETAIL_HOOK_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp
deleted file mode 100644
index c25be430a2c..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp
+++ /dev/null
@@ -1,262 +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_ITERATOR_HPP
-#define BOOST_INTRUSIVE_DETAIL_ITERATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <cstddef>
-#include <boost/intrusive/detail/std_fwd.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/move/detail/iterator_traits.hpp>
-#include <boost/move/detail/meta_utils_core.hpp>
-
-namespace boost{
-namespace iterators{
-
-struct incrementable_traversal_tag;
-struct single_pass_traversal_tag;
-struct forward_traversal_tag;
-struct bidirectional_traversal_tag;
-struct random_access_traversal_tag;
-
-namespace detail{
-
-template <class Category, class Traversal>
-struct iterator_category_with_traversal;
-
-} //namespace boost{
-} //namespace iterators{
-} //namespace detail{
-
-namespace boost {
-namespace intrusive {
-
-using boost::movelib::iterator_traits;
-
-////////////////////
-// iterator
-////////////////////
-template<class Category, class T, class Difference, class Pointer, class Reference>
-struct iterator
-{
- typedef Category iterator_category;
- typedef T value_type;
- typedef Difference difference_type;
- typedef Pointer pointer;
- typedef Reference reference;
-};
-
-////////////////////////////////////////
-// iterator_[dis|en]able_if_boost_iterator
-////////////////////////////////////////
-template<class I>
-struct is_boost_iterator
-{
- static const bool value = false;
-};
-
-template<class Category, class Traversal>
-struct is_boost_iterator< boost::iterators::detail::iterator_category_with_traversal<Category, Traversal> >
-{
- static const bool value = true;
-};
-
-template<class I, class R = void>
-struct iterator_enable_if_boost_iterator
- : ::boost::move_detail::enable_if_c
- < is_boost_iterator<typename boost::intrusive::iterator_traits<I>::iterator_category >::value
- , R>
-{};
-
-////////////////////////////////////////
-// iterator_[dis|en]able_if_tag
-////////////////////////////////////////
-template<class I, class Tag, class R = void>
-struct iterator_enable_if_tag
- : ::boost::move_detail::enable_if_c
- < ::boost::move_detail::is_same
- < typename boost::intrusive::iterator_traits<I>::iterator_category
- , Tag
- >::value
- , R>
-{};
-
-template<class I, class Tag, class R = void>
-struct iterator_disable_if_tag
- : ::boost::move_detail::enable_if_c
- < !::boost::move_detail::is_same
- < typename boost::intrusive::iterator_traits<I>::iterator_category
- , Tag
- >::value
- , R>
-{};
-
-////////////////////////////////////////
-// iterator_[dis|en]able_if_tag
-////////////////////////////////////////
-template<class I, class Tag, class Tag2, class R = void>
-struct iterator_enable_if_convertible_tag
- : ::boost::move_detail::enable_if_c
- < ::boost::move_detail::is_same_or_convertible
- < typename boost::intrusive::iterator_traits<I>::iterator_category
- , Tag
- >::value &&
- !::boost::move_detail::is_same_or_convertible
- < typename boost::intrusive::iterator_traits<I>::iterator_category
- , Tag2
- >::value
- , R>
-{};
-
-////////////////////////////////////////
-// iterator_[dis|en]able_if_tag_difference_type
-////////////////////////////////////////
-template<class I, class Tag>
-struct iterator_enable_if_tag_difference_type
- : iterator_enable_if_tag<I, Tag, typename boost::intrusive::iterator_traits<I>::difference_type>
-{};
-
-template<class I, class Tag>
-struct iterator_disable_if_tag_difference_type
- : iterator_disable_if_tag<I, Tag, typename boost::intrusive::iterator_traits<I>::difference_type>
-{};
-
-////////////////////
-// advance
-////////////////////
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::input_iterator_tag>::type
- iterator_advance(InputIt& it, Distance n)
-{
- while(n--)
- ++it;
-}
-
-template<class InputIt, class Distance>
-typename iterator_enable_if_tag<InputIt, std::forward_iterator_tag>::type
- iterator_advance(InputIt& it, Distance n)
-{
- while(n--)
- ++it;
-}
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::bidirectional_iterator_tag>::type
- iterator_advance(InputIt& it, Distance n)
-{
- for (; 0 < n; --n)
- ++it;
- for (; n < 0; ++n)
- --it;
-}
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random_access_iterator_tag>::type
- iterator_advance(InputIt& it, Distance n)
-{
- it += n;
-}
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
- <InputIt, const boost::iterators::incrementable_traversal_tag&, const boost::iterators::single_pass_traversal_tag&>::type
- iterator_advance(InputIt& it, Distance n)
-{
- while(n--)
- ++it;
-}
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
- <InputIt, const boost::iterators::single_pass_traversal_tag &, const boost::iterators::forward_traversal_tag&>::type
- iterator_advance(InputIt& it, Distance n)
-{
- while(n--)
- ++it;
-}
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
- <InputIt, const boost::iterators::forward_traversal_tag&, const boost::iterators::bidirectional_traversal_tag&>::type
- iterator_advance(InputIt& it, Distance n)
-{
- while(n--)
- ++it;
-}
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
- <InputIt, const boost::iterators::bidirectional_traversal_tag&, const boost::iterators::random_access_traversal_tag&>::type
- iterator_advance(InputIt& it, Distance n)
-{
- for (; 0 < n; --n)
- ++it;
- for (; n < 0; ++n)
- --it;
-}
-
-class fake{};
-
-template<class InputIt, class Distance>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
- <InputIt, const boost::iterators::random_access_traversal_tag&, const fake&>::type
- iterator_advance(InputIt& it, Distance n)
-{
- it += n;
-}
-
-////////////////////
-// distance
-////////////////////
-template<class InputIt> inline
-typename iterator_disable_if_tag_difference_type
- <InputIt, std::random_access_iterator_tag>::type
- iterator_distance(InputIt first, InputIt last)
-{
- typename iterator_traits<InputIt>::difference_type off = 0;
- while(first != last){
- ++off;
- ++first;
- }
- return off;
-}
-
-template<class InputIt>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag_difference_type
- <InputIt, std::random_access_iterator_tag>::type
- iterator_distance(InputIt first, InputIt last)
-{
- typename iterator_traits<InputIt>::difference_type off = last - first;
- return off;
-}
-
-template<class I>
-BOOST_INTRUSIVE_FORCEINLINE typename iterator_traits<I>::pointer iterator_arrow_result(const I &i)
-{ return i.operator->(); }
-
-template<class T>
-BOOST_INTRUSIVE_FORCEINLINE T * iterator_arrow_result(T *p)
-{ return p; }
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_DETAIL_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp
deleted file mode 100644
index bdc025e5ab3..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp
+++ /dev/null
@@ -1,125 +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_KEY_NODEPTR_COMP_HPP
-#define BOOST_INTRUSIVE_DETAIL_KEY_NODEPTR_COMP_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/detail/tree_value_compare.hpp>
-
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template < class KeyTypeKeyCompare
- , class ValueTraits
- , class KeyOfValue
- >
-struct key_nodeptr_comp_types
-{
- typedef ValueTraits value_traits;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::node_ptr node_ptr;
- typedef typename value_traits::const_node_ptr const_node_ptr;
- typedef typename detail::if_c
- < detail::is_same<KeyOfValue, void>::value
- , detail::identity<value_type>
- , KeyOfValue
- >::type key_of_value;
- typedef tree_value_compare
- <typename ValueTraits::pointer, KeyTypeKeyCompare, key_of_value> base_t;
-};
-
-//This function object transforms a key comparison type to
-//a function that can compare nodes or nodes with nodes or keys.
-template < class KeyTypeKeyCompare
- , class ValueTraits
- , class KeyOfValue = void
- >
-struct key_nodeptr_comp
- //Use public inheritance to avoid MSVC bugs with closures
- : public key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue>::base_t
-{
-private:
- struct sfinae_type;
-
-public:
- typedef key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue> types_t;
- typedef typename types_t::value_traits value_traits;
- typedef typename types_t::value_type value_type;
- typedef typename types_t::node_ptr node_ptr;
- typedef typename types_t::const_node_ptr const_node_ptr;
- typedef typename types_t::base_t base_t;
- typedef typename types_t::key_of_value key_of_value;
-
- template <class P1>
- struct is_same_or_nodeptr_convertible
- {
- static const bool same_type = is_same<P1,const_node_ptr>::value || is_same<P1,node_ptr>::value;
- static const bool value = same_type || is_convertible<P1, const_node_ptr>::value;
- };
-
- base_t base() const
- { return static_cast<const base_t&>(*this); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_nodeptr_comp(KeyTypeKeyCompare kcomp, const ValueTraits *traits)
- : base_t(kcomp), traits_(traits)
- {}
-
- //pred(pnode)
- template<class T1>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value, sfinae_type* >::type = 0) const
- { return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); }
-
- //operator() 2 arg
- //pred(pnode, pnode)
- template<class T1, class T2>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
- { return base()(*traits_->to_value_ptr(t1), *traits_->to_value_ptr(t2)); }
-
- //pred(pnode, key)
- template<class T1, class T2>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
- { return base()(*traits_->to_value_ptr(t1), t2); }
-
- //pred(key, pnode)
- template<class T1, class T2>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
- { return base()(t1, *traits_->to_value_ptr(t2)); }
-
- //pred(key, key)
- template<class T1, class T2>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()
- (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
- { return base()(t1, t2); }
-
- const ValueTraits *const traits_;
-};
-
-} //namespace detail{
-} //namespace intrusive{
-} //namespace boost{
-
-#endif //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
deleted file mode 100644
index 3aae2d5a54d..00000000000
--- a/src/third_party/boost-1.69.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 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/math.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/math.hpp
deleted file mode 100644
index 4901053cb3e..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/math.hpp
+++ /dev/null
@@ -1,295 +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_MATH_HPP
-#define BOOST_INTRUSIVE_DETAIL_MATH_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <cstddef>
-#include <climits>
-#include <boost/intrusive/detail/mpl.hpp>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-///////////////////////////
-// floor_log2 Dispatcher
-////////////////////////////
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1300)
-
- }}} //namespace boost::intrusive::detail
-
- //Use _BitScanReverseXX intrinsics
-
- #if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IA64) //64 bit target
- #define BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
- #endif
-
- #ifndef __INTRIN_H_ // Avoid including any windows system header
- #ifdef __cplusplus
- extern "C" {
- #endif // __cplusplus
-
- #if defined(BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT) //64 bit target
- unsigned char _BitScanReverse64(unsigned long *index, unsigned __int64 mask);
- #pragma intrinsic(_BitScanReverse64)
- #else //32 bit target
- unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
- #pragma intrinsic(_BitScanReverse)
- #endif
-
- #ifdef __cplusplus
- }
- #endif // __cplusplus
- #endif // __INTRIN_H_
-
- #ifdef BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
- #define BOOST_INTRUSIVE_BSR_INTRINSIC _BitScanReverse64
- #undef BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
- #else
- #define BOOST_INTRUSIVE_BSR_INTRINSIC _BitScanReverse
- #endif
-
- namespace boost {
- namespace intrusive {
- namespace detail {
-
- inline std::size_t floor_log2 (std::size_t x)
- {
- unsigned long log2;
- BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, (unsigned long)x );
- return log2;
- }
-
- #undef BOOST_INTRUSIVE_BSR_INTRINSIC
-
-#elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) //GCC >=3.4
-
- //Compile-time error in case of missing specialization
- template<class Uint>
- struct builtin_clz_dispatch;
-
- #if defined(BOOST_HAS_LONG_LONG)
- template<>
- struct builtin_clz_dispatch< ::boost::ulong_long_type >
- {
- static ::boost::ulong_long_type call(::boost::ulong_long_type n)
- { return __builtin_clzll(n); }
- };
- #endif
-
- template<>
- struct builtin_clz_dispatch<unsigned long>
- {
- static unsigned long call(unsigned long n)
- { return __builtin_clzl(n); }
- };
-
- template<>
- struct builtin_clz_dispatch<unsigned int>
- {
- static unsigned int call(unsigned int n)
- { return __builtin_clz(n); }
- };
-
- inline std::size_t floor_log2(std::size_t n)
- {
- return sizeof(std::size_t)*CHAR_BIT - std::size_t(1) - builtin_clz_dispatch<std::size_t>::call(n);
- }
-
-#else //Portable methods
-
-////////////////////////////
-// Generic method
-////////////////////////////
-
- inline std::size_t floor_log2_get_shift(std::size_t n, true_ )//power of two size_t
- { return n >> 1; }
-
- inline std::size_t floor_log2_get_shift(std::size_t n, false_ )//non-power of two size_t
- { return (n >> 1) + ((n & 1u) & (n != 1)); }
-
- template<std::size_t N>
- inline std::size_t floor_log2 (std::size_t x, integral_constant<std::size_t, N>)
- {
- const std::size_t Bits = N;
- const bool Size_t_Bits_Power_2= !(Bits & (Bits-1));
-
- std::size_t n = x;
- std::size_t log2 = 0;
-
- std::size_t remaining_bits = Bits;
- std::size_t shift = floor_log2_get_shift(remaining_bits, bool_<Size_t_Bits_Power_2>());
- while(shift){
- std::size_t tmp = n >> shift;
- if (tmp){
- log2 += shift, n = tmp;
- }
- shift = floor_log2_get_shift(shift, bool_<Size_t_Bits_Power_2>());
- }
-
- return log2;
- }
-
- ////////////////////////////
- // DeBruijn method
- ////////////////////////////
-
- //Taken from:
- //http://stackoverflow.com/questions/11376288/fast-computing-of-log2-for-64-bit-integers
- //Thanks to Desmond Hume
-
- inline std::size_t floor_log2 (std::size_t v, integral_constant<std::size_t, 32>)
- {
- static const int MultiplyDeBruijnBitPosition[32] =
- {
- 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
- 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
- };
-
- v |= v >> 1;
- v |= v >> 2;
- v |= v >> 4;
- v |= v >> 8;
- v |= v >> 16;
-
- return MultiplyDeBruijnBitPosition[(std::size_t)(v * 0x07C4ACDDU) >> 27];
- }
-
- inline std::size_t floor_log2 (std::size_t v, integral_constant<std::size_t, 64>)
- {
- static const std::size_t MultiplyDeBruijnBitPosition[64] = {
- 63, 0, 58, 1, 59, 47, 53, 2,
- 60, 39, 48, 27, 54, 33, 42, 3,
- 61, 51, 37, 40, 49, 18, 28, 20,
- 55, 30, 34, 11, 43, 14, 22, 4,
- 62, 57, 46, 52, 38, 26, 32, 41,
- 50, 36, 17, 19, 29, 10, 13, 21,
- 56, 45, 25, 31, 35, 16, 9, 12,
- 44, 24, 15, 8, 23, 7, 6, 5};
-
- v |= v >> 1;
- v |= v >> 2;
- v |= v >> 4;
- v |= v >> 8;
- v |= v >> 16;
- v |= v >> 32;
- return MultiplyDeBruijnBitPosition[((std::size_t)((v - (v >> 1))*0x07EDD5E59A4E28C2ULL)) >> 58];
- }
-
-
- inline std::size_t floor_log2 (std::size_t x)
- {
- const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT;
- return floor_log2(x, integral_constant<std::size_t, Bits>());
- }
-
-#endif
-
-//Thanks to Laurent de Soras in
-//http://www.flipcode.com/archives/Fast_log_Function.shtml
-inline float fast_log2 (float val)
-{
- union caster_t
- {
- unsigned x;
- float val;
- } caster;
-
- caster.val = val;
- unsigned x = caster.x;
- const int log_2 = int((x >> 23) & 255) - 128;
- x &= ~(unsigned(255u) << 23u);
- x += unsigned(127) << 23u;
- caster.x = x;
- val = caster.val;
- //1+log2(m), m ranging from 1 to 2
- //3rd degree polynomial keeping first derivate continuity.
- //For less precision the line can be commented out
- val = ((-1.f/3.f) * val + 2.f) * val - (2.f/3.f);
- return val + static_cast<float>(log_2);
-}
-
-inline bool is_pow2(std::size_t x)
-{ return (x & (x-1)) == 0; }
-
-template<std::size_t N>
-struct static_is_pow2
-{
- static const bool value = (N & (N-1)) == 0;
-};
-
-inline std::size_t ceil_log2 (std::size_t x)
-{
- return static_cast<std::size_t>(!(is_pow2)(x)) + floor_log2(x);
-}
-
-inline std::size_t ceil_pow2 (std::size_t x)
-{
- return std::size_t(1u) << (ceil_log2)(x);
-}
-
-inline std::size_t previous_or_equal_pow2(std::size_t x)
-{
- return std::size_t(1u) << floor_log2(x);
-}
-
-template<class SizeType, std::size_t N>
-struct numbits_eq
-{
- static const bool value = sizeof(SizeType)*CHAR_BIT == N;
-};
-
-template<class SizeType, class Enabler = void >
-struct sqrt2_pow_max;
-
-template <class SizeType>
-struct sqrt2_pow_max<SizeType, typename enable_if< numbits_eq<SizeType, 32> >::type>
-{
- static const SizeType value = 0xb504f334;
- static const std::size_t pow = 31;
-};
-
-#ifndef BOOST_NO_INT64_T
-
-template <class SizeType>
-struct sqrt2_pow_max<SizeType, typename enable_if< numbits_eq<SizeType, 64> >::type>
-{
- static const SizeType value = 0xb504f333f9de6484ull;
- static const std::size_t pow = 63;
-};
-
-#endif //BOOST_NO_INT64_T
-
-// Returns floor(pow(sqrt(2), x * 2 + 1)).
-// Defined for X from 0 up to the number of bits in size_t minus 1.
-inline std::size_t sqrt2_pow_2xplus1 (std::size_t x)
-{
- const std::size_t value = (std::size_t)sqrt2_pow_max<std::size_t>::value;
- const std::size_t pow = (std::size_t)sqrt2_pow_max<std::size_t>::pow;
- return (value >> (pow - x)) + 1;
-}
-
-} //namespace detail
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_DETAIL_MATH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp
deleted file mode 100644
index 15230881611..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp
+++ /dev/null
@@ -1,216 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2014
-// (C) Copyright 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 http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_DETAIL_MPL_HPP
-#define BOOST_INTRUSIVE_DETAIL_MPL_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/move/detail/type_traits.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-using boost::move_detail::is_same;
-using boost::move_detail::add_const;
-using boost::move_detail::remove_const;
-using boost::move_detail::remove_cv;
-using boost::move_detail::remove_reference;
-using boost::move_detail::add_reference;
-using boost::move_detail::remove_pointer;
-using boost::move_detail::add_pointer;
-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::disable_if_c;
-using boost::move_detail::disable_if;
-using boost::move_detail::is_convertible;
-using boost::move_detail::if_c;
-using boost::move_detail::if_;
-using boost::move_detail::is_const;
-using boost::move_detail::identity;
-using boost::move_detail::alignment_of;
-using boost::move_detail::is_empty;
-using boost::move_detail::addressof;
-using boost::move_detail::integral_constant;
-using boost::move_detail::enable_if_convertible;
-using boost::move_detail::disable_if_convertible;
-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::apply;
-using boost::move_detail::eval_if_c;
-using boost::move_detail::eval_if;
-using boost::move_detail::unvoid_ref;
-using boost::move_detail::add_const_if_c;
-
-template<std::size_t S>
-struct ls_zeros
-{
- static const std::size_t value = (S & std::size_t(1)) ? 0 : (1 + ls_zeros<(S>>1u)>::value);
-};
-
-template<>
-struct ls_zeros<0>
-{
- static const std::size_t value = 0;
-};
-
-template<>
-struct ls_zeros<1>
-{
- static const std::size_t value = 0;
-};
-
-// Infrastructure for providing a default type for T::TNAME if absent.
-#define BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(TNAME) \
- template <typename T> \
- struct boost_intrusive_has_type_ ## TNAME \
- { \
- template <typename X> \
- static char test(int, typename X::TNAME*); \
- \
- template <typename X> \
- static int test(...); \
- \
- static const bool value = (1 == sizeof(test<T>(0, 0))); \
- }; \
- \
- template <typename T, typename DefaultType> \
- struct boost_intrusive_default_type_ ## TNAME \
- { \
- struct DefaultWrap { typedef DefaultType TNAME; }; \
- \
- typedef typename \
- ::boost::intrusive::detail::if_c \
- < boost_intrusive_has_type_ ## TNAME<T>::value \
- , T, DefaultWrap>::type::TNAME type; \
- }; \
- //
-
-#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
- typename INSTANTIATION_NS_PREFIX \
- boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
-//
-
-#define BOOST_INTRUSIVE_HAS_TYPE(INSTANTIATION_NS_PREFIX, T, TNAME) \
- INSTANTIATION_NS_PREFIX \
- boost_intrusive_has_type_ ## TNAME< T >::value \
-//
-
-#define BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(TNAME)\
- template <typename T, typename DefaultType> \
- struct boost_intrusive_eval_default_type_ ## TNAME \
- { \
- template <typename X> \
- static char test(int, typename X::TNAME*); \
- \
- template <typename X> \
- static int test(...); \
- \
- struct DefaultWrap \
- { typedef typename DefaultType::type TNAME; }; \
- \
- static const bool value = (1 == sizeof(test<T>(0, 0))); \
- \
- typedef typename \
- ::boost::intrusive::detail::eval_if_c \
- < value \
- , ::boost::intrusive::detail::identity<T> \
- , ::boost::intrusive::detail::identity<DefaultWrap> \
- >::type::TNAME type; \
- }; \
-//
-
-#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
- typename INSTANTIATION_NS_PREFIX \
- boost_intrusive_eval_default_type_ ## TNAME< T, TIMPL >::type \
-//
-
-#define BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(TRAITS_PREFIX, TYPEDEF_TO_FIND) \
-template <class T>\
-struct TRAITS_PREFIX##_bool\
-{\
- 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::TYPEDEF_TO_FIND> test (int);\
- static const std::size_t value = sizeof(test<T>(0));\
-};\
-\
-template <class T>\
-struct TRAITS_PREFIX##_bool_is_true\
-{\
- static const bool value = TRAITS_PREFIX##_bool<T>::value > sizeof(yes_type)*2;\
-};\
-//
-
-#define BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(TRAITS_NAME, FUNC_NAME) \
- template <typename U, typename Signature> \
- class TRAITS_NAME \
- { \
- private: \
- template<Signature> struct helper;\
- template<typename T> \
- static ::boost::intrusive::detail::yes_type test(helper<&T::FUNC_NAME>*); \
- template<typename T> static ::boost::intrusive::detail::no_type test(...); \
- public: \
- static const bool value = sizeof(test<U>(0)) == sizeof(::boost::intrusive::detail::yes_type); \
- }; \
-//
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED(TRAITS_NAME, FUNC_NAME) \
-template <typename Type> \
-struct TRAITS_NAME \
-{ \
- struct BaseMixin \
- { \
- void FUNC_NAME(); \
- }; \
- struct Base : public Type, public BaseMixin { Base(); }; \
- template <typename T, T t> class Helper{}; \
- template <typename U> \
- static ::boost::intrusive::detail::no_type test(U*, Helper<void (BaseMixin::*)(), &U::FUNC_NAME>* = 0); \
- static ::boost::intrusive::detail::yes_type test(...); \
- static const bool value = sizeof(::boost::intrusive::detail::yes_type) == sizeof(test((Base*)(0))); \
-};\
-//
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(TRAITS_NAME, FUNC_NAME) \
-BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED(TRAITS_NAME##_ignore_signature, FUNC_NAME) \
-\
-template <typename Type, class> \
-struct TRAITS_NAME \
- : public TRAITS_NAME##_ignore_signature<Type> \
-{};\
-//
-
-} //namespace detail
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_DETAIL_MPL_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
deleted file mode 100644
index 96a5ac01912..00000000000
--- a/src/third_party/boost-1.69.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 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/tree_iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_iterator.hpp
deleted file mode 100644
index a4bbc1b0667..00000000000
--- a/src/third_party/boost-1.69.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 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/workaround.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/workaround.hpp
deleted file mode 100644
index 594ac0b2e54..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/workaround.hpp
+++ /dev/null
@@ -1,53 +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/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
-#define BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- #define BOOST_INTRUSIVE_PERFECT_FORWARDING
-#endif
-
-//Macros for documentation purposes. For code, expands to the argument
-#define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
-#define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
-#define BOOST_INTRUSIVE_DOC1ST(TYPE1, TYPE2) TYPE2
-#define BOOST_INTRUSIVE_I ,
-#define BOOST_INTRUSIVE_DOCIGN(T1) T1
-
-#define BOOST_INTRUSIVE_DISABLE_FORCEINLINE
-
-#if defined(BOOST_INTRUSIVE_DISABLE_FORCEINLINE)
- #define BOOST_INTRUSIVE_FORCEINLINE inline
-#elif defined(BOOST_INTRUSIVE_FORCEINLINE_IS_BOOST_FORCELINE)
- #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
-#elif defined(BOOST_MSVC) && defined(_DEBUG)
- //"__forceinline" and MSVC seems to have some bugs in debug mode
- #define BOOST_INTRUSIVE_FORCEINLINE inline
-#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
- //Older GCCs have problems with forceinline
- #define BOOST_INTRUSIVE_FORCEINLINE inline
-#else
- #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
-#endif
-
-#endif //#ifndef 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
deleted file mode 100644
index 1f1f1696715..00000000000
--- a/src/third_party/boost-1.69.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
- (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.69.0/boost/intrusive/intrusive_fwd.hpp b/src/third_party/boost-1.69.0/boost/intrusive/intrusive_fwd.hpp
deleted file mode 100644
index f51276d636e..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/intrusive_fwd.hpp
+++ /dev/null
@@ -1,763 +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_FWD_HPP
-#define BOOST_INTRUSIVE_FWD_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#ifndef BOOST_CSTDINT_HPP
-# include <boost/cstdint.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-//! \file
-//! This header file forward declares most Intrusive classes.
-//!
-//! It forward declares the following containers and hooks:
-//! - boost::intrusive::slist / boost::intrusive::slist_base_hook / boost::intrusive::slist_member_hook
-//! - boost::intrusive::list / boost::intrusive::list_base_hook / boost::intrusive::list_member_hook
-//! - boost::intrusive::bstree / boost::intrusive::bs_set / boost::intrusive::bs_multiset /
-//! boost::intrusive::bs_set_base_hook / boost::intrusive::bs_set_member_hook
-//! - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
-//! boost::intrusive::set_base_hook / boost::intrusive::set_member_hook
-//! - boost::intrusive::avltree / boost::intrusive::avl_set / boost::intrusive::avl_multiset /
-//! boost::intrusive::avl_set_base_hook / boost::intrusive::avl_set_member_hook
-//! - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
-//! - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
-//! - boost::intrusive::treap / boost::intrusive::treap_set / boost::intrusive::treap_multiset
-//! - boost::intrusive::hashtable / boost::intrusive::unordered_set / boost::intrusive::unordered_multiset /
-//! boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
-//! - boost::intrusive::any_base_hook / boost::intrusive::any_member_hook
-//!
-//! It forward declares the following container or hook options:
-//! - boost::intrusive::constant_time_size / boost::intrusive::size_type / boost::intrusive::compare / boost::intrusive::equal
-//! - boost::intrusive::floating_point / boost::intrusive::priority / boost::intrusive::hash
-//! - boost::intrusive::value_traits / boost::intrusive::member_hook / boost::intrusive::function_hook / boost::intrusive::base_hook
-//! - boost::intrusive::void_pointer / boost::intrusive::tag / boost::intrusive::link_mode
-//! - boost::intrusive::optimize_size / boost::intrusive::linear / boost::intrusive::cache_last
-//! - boost::intrusive::bucket_traits / boost::intrusive::store_hash / boost::intrusive::optimize_multikey
-//! - boost::intrusive::power_2_buckets / boost::intrusive::cache_begin / boost::intrusive::compare_hash / boost::intrusive::incremental
-//!
-//! It forward declares the following value traits utilities:
-//! - boost::intrusive::value_traits / boost::intrusive::derivation_value_traits /
-//! boost::intrusive::trivial_value_traits
-//!
-//! Finally it forward declares the following general purpose utilities:
-//! - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-#include <cstddef>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-
-namespace boost {
-namespace intrusive {
-
-#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
-# ifdef BOOST_HAS_INTPTR_T
- using ::boost::uintptr_t;
-# else
- typedef std::size_t uintptr_t;
-# endif
-#endif
-
-////////////////////////////
-// Node algorithms
-////////////////////////////
-
-//Algorithms predeclarations
-template<class NodeTraits>
-class circular_list_algorithms;
-
-template<class NodeTraits>
-class circular_slist_algorithms;
-
-template<class NodeTraits>
-class linear_slist_algorithms;
-
-template<class NodeTraits>
-class bstree_algorithms;
-
-template<class NodeTraits>
-class rbtree_algorithms;
-
-template<class NodeTraits>
-class avltree_algorithms;
-
-template<class NodeTraits>
-class sgtree_algorithms;
-
-template<class NodeTraits>
-class splaytree_algorithms;
-
-template<class NodeTraits>
-class treap_algorithms;
-
-////////////////////////////
-// Containers
-////////////////////////////
-
-//slist
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class slist;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class slist_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class slist_member_hook;
-
-//list
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class list;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class list_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class list_member_hook;
-
-//rbtree/set/multiset
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class rbtree;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class multiset;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class ...Options>
-#endif
-class set_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class ...Options>
-#endif
-class set_member_hook;
-
-//splaytree/splay_set/splay_multiset
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class splaytree;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class splay_set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class splay_multiset;
-
-//avltree/avl_set/avl_multiset
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class avltree;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class avl_set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class avl_multiset;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class ...Options>
-#endif
-class avl_set_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class ...Options>
-#endif
-class avl_set_member_hook;
-
-
-//treap/treap_set/treap_multiset
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class treap;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class treap_set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class treap_multiset;
-
-//sgtree/sg_set/sg_multiset
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class sgtree;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class sg_set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class sg_multiset;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class bstree;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class bs_set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class T
- , class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- , class O5 = void
- , class O6 = void
- >
-#else
-template<class T, class ...Options>
-#endif
-class bs_multiset;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class bs_set_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class bs_set_member_hook;
-
-//hashtable/unordered_set/unordered_multiset
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-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
- >
-#else
-template<class T, class ...Options>
-#endif
-class hashtable;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-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
- >
-#else
-template<class T, class ...Options>
-#endif
-class unordered_set;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-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
- >
-#else
-template<class T, class ...Options>
-#endif
-class unordered_multiset;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class ...Options>
-#endif
-class unordered_set_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- , class O4 = void
- >
-#else
-template<class ...Options>
-#endif
-class unordered_set_member_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class any_base_hook;
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template
- < class O1 = void
- , class O2 = void
- , class O3 = void
- >
-#else
-template<class ...Options>
-#endif
-class any_member_hook;
-
-//Options
-
-template<bool Enabled>
-struct constant_time_size;
-
-template<typename SizeType>
-struct size_type;
-
-template<typename Compare>
-struct compare;
-
-template<bool Enabled>
-struct floating_point;
-
-template<typename Equal>
-struct equal;
-
-template<typename Priority>
-struct priority;
-
-template<typename Hash>
-struct hash;
-
-template<typename ValueTraits> struct value_traits;
-
-template< typename Parent
- , typename MemberHook
- , MemberHook Parent::* PtrToMember>
-struct member_hook;
-
-template<typename Functor>
-struct function_hook;
-
-template<typename BaseHook>
-struct base_hook;
-
-template<typename VoidPointer>
-struct void_pointer;
-
-template<typename Tag>
-struct tag;
-
-template<link_mode_type LinkType>
-struct link_mode;
-
-template<bool Enabled> struct
-optimize_size;
-
-template<bool Enabled>
-struct linear;
-
-template<bool Enabled>
-struct cache_last;
-
-template<typename BucketTraits>
-struct bucket_traits;
-
-template<bool Enabled>
-struct store_hash;
-
-template<bool Enabled>
-struct optimize_multikey;
-
-template<bool Enabled>
-struct power_2_buckets;
-
-template<bool Enabled>
-struct cache_begin;
-
-template<bool Enabled>
-struct compare_hash;
-
-template<bool Enabled>
-struct incremental;
-
-//Value traits
-
-template<typename ValueTraits>
-struct value_traits;
-
-template< typename Parent
- , typename MemberHook
- , MemberHook Parent::* PtrToMember>
-struct member_hook;
-
-template< typename Functor>
-struct function_hook;
-
-template<typename BaseHook>
-struct base_hook;
-
-template<class T, class NodeTraits, link_mode_type LinkMode = safe_link>
-struct derivation_value_traits;
-
-template<class NodeTraits, link_mode_type LinkMode = normal_link>
-struct trivial_value_traits;
-
-//Additional utilities
-
-template<typename VoidPointer, std::size_t Alignment>
-struct max_pointer_plus_bits;
-
-template<std::size_t Alignment>
-struct max_pointer_plus_bits<void *, Alignment>;
-
-template<typename Pointer, std::size_t NumBits>
-struct pointer_plus_bits;
-
-template<typename T, std::size_t NumBits>
-struct pointer_plus_bits<T *, NumBits>;
-
-template<typename Ptr>
-struct pointer_traits;
-
-template<typename T>
-struct pointer_traits<T *>;
-
-} //namespace intrusive {
-} //namespace boost {
-
-#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-#endif //#ifndef BOOST_INTRUSIVE_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/list.hpp b/src/third_party/boost-1.69.0/boost/intrusive/list.hpp
deleted file mode 100644
index 71eac5c42e7..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/list.hpp
+++ /dev/null
@@ -1,1516 +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_LIST_HPP
-#define BOOST_INTRUSIVE_LIST_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/list_hook.hpp>
-#include <boost/intrusive/circular_list_algorithms.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.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/reverse_iterator.hpp>
-#include <boost/intrusive/detail/uncast.hpp>
-#include <boost/intrusive/detail/list_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, etc.
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-struct default_list_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_list_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_list_hook_applier>
-{ static const bool value = true; };
-
-struct list_defaults
-{
- typedef default_list_hook_applier proto_value_traits;
- static const bool constant_time_size = true;
- typedef std::size_t size_type;
- typedef void header_holder_type;
-};
-
-/// @endcond
-
-//! The class template list is an intrusive container that mimics most of the
-//! interface of std::list as described in the C++ standard.
-//!
-//! 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<> and \c size_type<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template <class ValueTraits, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class list_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 list_iterator<value_traits, false> iterator;
- typedef list_iterator<value_traits, true> const_iterator;
- typedef boost::intrusive::reverse_iterator<iterator> reverse_iterator;
- typedef boost::intrusive::reverse_iterator<const_iterator> const_reverse_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 circular_list_algorithms<node_traits> node_algorithms;
- typedef typename detail::get_header_holder_type
- < value_traits, HeaderHolder >::type header_holder_type;
-
- static const bool constant_time_size = ConstantTimeSize;
- static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
- static const bool has_container_from_iterator =
- detail::is_same< header_holder_type, detail::default_header_holder< node_traits > >::value;
-
- /// @cond
-
- private:
- typedef detail::size_holder<constant_time_size, size_type> size_traits;
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(list_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)
- ));
-
- node_ptr get_root_node()
- { return data_.root_plus_size_.m_header.get_node(); }
-
- const_node_ptr get_root_node() const
- { return data_.root_plus_size_.m_header.get_node(); }
-
- struct root_plus_size : public size_traits
- {
- header_holder_type m_header;
- };
-
- struct data_t : public value_traits
- {
- typedef typename list_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:
-
- //! <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).
- list_impl()
- : data_(value_traits())
- {
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
- }
-
- //! <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 list_impl(const value_traits &v_traits)
- : data_(v_traits)
- {
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
- //!
- //! <b>Effects</b>: Constructs a list equal to the range [first,last).
- //!
- //! <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>
- list_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
- : data_(v_traits)
- {
- //nothrow, no need to rollback to release elements on exception
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
- //nothrow, no need to rollback to release elements on exception
- this->insert(this->cend(), 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.
- list_impl(BOOST_RV_REF(list_impl) x)
- : data_(::boost::move(x.priv_value_traits()))
- {
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
- //nothrow, no need to rollback to release elements on exception
- this->swap(x);
- }
-
- //! <b>Effects</b>: Equivalent to swap
- //!
- list_impl& operator=(BOOST_RV_REF(list_impl) x)
- { this->swap(x); return *this; }
-
- //! <b>Effects</b>: If it's not a safe-mode or an auto-unlink value_type
- //! 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 ValueTraits 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.
- ~list_impl()
- {
- if(is_safe_autounlink<ValueTraits::link_mode>::value){
- this->clear();
- node_algorithms::init(this->get_root_node());
- }
- }
-
- //! <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.
- void push_back(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));
- node_algorithms::link_before(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 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));
- node_algorithms::link_before(node_traits::get_next(this->get_root_node()), to_insert);
- this->priv_size_traits().increment();
- }
-
- //! <b>Effects</b>: Erases the last 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_back()
- { return this->pop_back_and_dispose(detail::null_disposer()); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the last element of the list.
- //! No destructors are called.
- //! 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_back_and_dispose(Disposer disposer)
- {
- node_ptr to_erase = node_traits::get_previous(this->get_root_node());
- node_algorithms::unlink(to_erase);
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- }
-
- //! <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.
- //! No destructors are called.
- //! 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(to_erase);
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- }
-
- //! <b>Effects</b>: Returns a reference to the first element of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front()
- { return *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 *priv_value_traits().to_value_ptr(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.
- reference back()
- { return *priv_value_traits().to_value_ptr(node_traits::get_previous(this->get_root_node())); }
-
- //! <b>Effects</b>: Returns a const_reference to the last element of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference back() const
- { return *priv_value_traits().to_value_ptr(detail::uncast(node_traits::get_previous(this->get_root_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 this->cbegin(); }
-
- //! <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_root_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 this->cend(); }
-
- //! <b>Effects</b>: Returns a constant iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const
- { return const_iterator(detail::uncast(this->get_root_node()), this->priv_value_traits_ptr()); }
-
- //! <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()
- { return reverse_iterator(this->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
- { return this->crbegin(); }
-
- //! <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
- { return const_reverse_iterator(end()); }
-
- //! <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()
- { 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
- { return this->crend(); }
-
- //! <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
- { return const_reverse_iterator(this->begin()); }
-
- //! <b>Precondition</b>: end_iterator must be a valid end iterator
- //! of list.
- //!
- //! <b>Effects</b>: Returns a const reference to the list associated to the end iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- static list_impl &container_from_end_iterator(iterator end_iterator)
- { return list_impl::priv_container_from_end_iterator(end_iterator); }
-
- //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
- //! of list.
- //!
- //! <b>Effects</b>: Returns a const reference to the list associated to the end iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- static const list_impl &container_from_end_iterator(const_iterator end_iterator)
- { return list_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 option is disabled. 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>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- void swap(list_impl& other)
- {
- node_algorithms::swap_nodes(this->get_root_node(), other.get_root_node());
- 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 shifts.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- void shift_backwards(size_type n = 1)
- { node_algorithms::move_forward(this->get_root_node(), n); }
-
- //! <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 shifts.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- void shift_forward(size_type n = 1)
- { node_algorithms::move_backwards(this->get_root_node(), n); }
-
- //! <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>: Constant.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- iterator erase(const_iterator i)
- { return this->erase_and_dispose(i, detail::null_disposer()); }
-
- //! <b>Requires</b>: b and e must be valid iterators to elements in *this.
- //!
- //! <b>Effects</b>: Erases the element 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 number of erased elements if it's a safe-mode
- //! or auto-unlink value, or constant-time size is enabled. Constant-time otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased elements.
- iterator erase(const_iterator b, const_iterator e)
- {
- if(safemode_or_autounlink || constant_time_size){
- return this->erase_and_dispose(b, e, detail::null_disposer());
- }
- else{
- node_algorithms::unlink(b.pointed_node(), e.pointed_node());
- return e.unconst();
- }
- }
-
- //! <b>Requires</b>: b and e must be valid iterators to elements in *this.
- //! n must be distance(b, e).
- //!
- //! <b>Effects</b>: Erases the element 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 number of erased elements if it's a safe-mode
- //! or auto-unlink value is enabled. Constant-time otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased elements.
- iterator erase(const_iterator b, const_iterator e, size_type n)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(b.pointed_node(), e.pointed_node()) == n);
- if(safemode_or_autounlink || constant_time_size){
- return this->erase_and_dispose(b, e, detail::null_disposer());
- }
- else{
- if(constant_time_size){
- this->priv_size_traits().decrease(n);
- }
- node_algorithms::unlink(b.pointed_node(), e.pointed_node());
- return e.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>: Constant.
- //!
- //! <b>Note</b>: Invalidates the iterators to the erased element.
- template <class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer)
- {
- node_ptr to_erase(i.pointed_node());
- ++i;
- node_algorithms::unlink(to_erase);
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(this->priv_value_traits().to_value_ptr(to_erase));
- return i.unconst();
- }
-
- #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>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the element 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 elements erased.
- //!
- //! <b>Note</b>: Invalidates the iterators to the erased elements.
- template <class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- {
- node_ptr bp(b.pointed_node()), ep(e.pointed_node());
- node_algorithms::unlink(bp, ep);
- while(bp != ep){
- node_ptr to_erase(bp);
- bp = node_traits::get_next(bp);
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- this->priv_size_traits().decrement();
- }
- return e.unconst();
- }
-
- //! <b>Effects</b>: Erases all the elements of the container.
- //! No destructors are called.
- //!
- //! <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{
- node_algorithms::init_header(this->get_root_node());
- this->priv_size_traits().set_size(size_type(0));
- }
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements of the container.
- //! No destructors are called.
- //! 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));
- }
- node_algorithms::init_header(this->get_root_node());
- this->priv_size_traits().set_size(0);
- }
-
- //! <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. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(const list_impl &src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- detail::exception_disposer<list_impl, Disposer>
- rollback(*this, disposer);
- const_iterator b(src.begin()), e(src.end());
- for(; b != e; ++b){
- this->push_back(*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. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(list_impl) src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- detail::exception_disposer<list_impl, Disposer>
- rollback(*this, disposer);
- iterator b(src.begin()), e(src.end());
- for(; b != e; ++b){
- this->push_back(*cloner(*b));
- }
- rollback.release();
- }
-
- //! <b>Requires</b>: value must be an lvalue and p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts the value before the position pointed by p.
- //!
- //! <b>Returns</b>: An iterator to the inserted element.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time. No copy constructors are called.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- iterator insert(const_iterator p, reference value)
- {
- node_ptr to_insert = this->priv_value_traits().to_node_ptr(value);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
- node_algorithms::link_before(p.pointed_node(), to_insert);
- this->priv_size_traits().increment();
- return iterator(to_insert, this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield
- //! an lvalue of type value_type and p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts the range 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.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- template<class Iterator>
- void insert(const_iterator p, Iterator b, Iterator e)
- {
- for (; b != e; ++b)
- this->insert(p, *b);
- }
-
- //! <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(this->cend(), 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(this->cend(), b, e);
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <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_impl& x)
- {
- if(!x.empty()){
- node_algorithms::transfer
- (p.pointed_node(), x.begin().pointed_node(), x.end().pointed_node());
- size_traits &thist = this->priv_size_traits();
- size_traits &xt = x.priv_size_traits();
- thist.increase(xt.get_size());
- xt.set_size(size_type(0));
- }
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //! new_ele must point to an element contained in list x.
- //!
- //! <b>Effects</b>: Transfers the value pointed by new_ele, from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //! If p == new_ele or p == ++new_ele, 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_impl&x, const_iterator new_ele)
- {
- node_algorithms::transfer(p.pointed_node(), new_ele.pointed_node());
- x.priv_size_traits().decrement();
- this->priv_size_traits().increment();
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //! f and e must point to elements contained in list x.
- //!
- //! <b>Effects</b>: Transfers the range pointed by f and e 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
- //! if constant-time size option is enabled. 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(const_iterator p, list_impl&x, const_iterator f, const_iterator e)
- {
- if(constant_time_size)
- this->splice(p, x, f, e, node_algorithms::distance(f.pointed_node(), e.pointed_node()));
- else
- this->splice(p, x, f, e, 1);//intrusive::iterator_distance is a dummy value
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //! f and e must point to elements contained in list x.
- //! n == distance(f, e)
- //!
- //! <b>Effects</b>: Transfers the range pointed by f and e 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.
- void splice(const_iterator p, list_impl&x, const_iterator f, const_iterator e, size_type n)
- {
- if(n){
- if(constant_time_size){
- BOOST_INTRUSIVE_INVARIANT_ASSERT(n == node_algorithms::distance(f.pointed_node(), e.pointed_node()));
- node_algorithms::transfer(p.pointed_node(), f.pointed_node(), e.pointed_node());
- size_traits &thist = this->priv_size_traits();
- size_traits &xt = x.priv_size_traits();
- thist.increase(n);
- xt.decrease(n);
- }
- else{
- node_algorithms::transfer(p.pointed_node(), f.pointed_node(), e.pointed_node());
- }
- }
- }
-
- //! <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 std::less<value_type> throws. Basic guarantee.
- //!
- //! <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(std::less<value_type>()); }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak ordering
- //!
- //! <b>Effects</b>: This function sorts the list *this according to p. 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>Notes</b>: This won't throw if list_base_hook<> or
- //! list_member_hook are used.
- //! 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 Predicate>
- void sort(Predicate p)
- {
- if(node_traits::get_next(this->get_root_node())
- != node_traits::get_previous(this->get_root_node())){
- list_impl carry(this->priv_value_traits());
- detail::array_initializer<list_impl, 64> counter(this->priv_value_traits());
- int fill = 0;
- while(!this->empty()){
- carry.splice(carry.cbegin(), *this, this->cbegin());
- int i = 0;
- while(i < fill && !counter[i].empty()) {
- counter[i].merge(carry, p);
- carry.swap(counter[i++]);
- }
- carry.swap(counter[i]);
- if(i == fill)
- ++fill;
- }
- for (int i = 1; i < fill; ++i)
- counter[i].merge(counter[i-1], p);
- this->swap(counter[fill-1]);
- }
- }
-
- //! <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(list_impl& x)
- { this->merge(x, 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>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.
- template<class Predicate>
- void merge(list_impl& x, Predicate p)
- {
- const_iterator e(this->cend()), ex(x.cend());
- const_iterator b(this->cbegin());
- while(!x.empty()){
- const_iterator ix(x.cbegin());
- while (b != e && !p(*ix, *b)){
- ++b;
- }
- if(b == e){
- //Now transfer the rest to the end of the container
- this->splice(e, x);
- break;
- }
- else{
- size_type n(0);
- do{
- ++ix; ++n;
- } while(ix != ex && p(*ix, *b));
- this->splice(b, x, x.begin(), ix, n);
- }
- }
- }
-
- //! <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()
- { node_algorithms::reverse(this->get_root_node()); }
-
- //! <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.
- 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 root_node = this->get_root_node();
- typename node_algorithms::stable_partition_info info;
- node_algorithms::stable_partition
- (node_traits::get_next(root_node), root_node, detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
- //Invariants preserved by stable_partition so erase can be safely called
- //The first element might have changed so calculate it again
- this->erase( const_iterator(node_traits::get_next(root_node), 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 root_node = this->get_root_node();
- typename node_algorithms::stable_partition_info info;
- node_algorithms::stable_partition
- (node_traits::get_next(root_node), root_node, detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
- //Invariants preserved by stable_partition so erase can be safely called
- //The first element might have changed so calculate it again
- this->erase_and_dispose( const_iterator(node_traits::get_next(root_node), 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 pred 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 are equal 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_and_dispose(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 pred 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 itend(this->cend());
- const_iterator cur(this->cbegin());
-
- if(cur != itend){
- const_iterator after(cur);
- ++after;
- while(after != itend){
- if(pred(*cur, *after)){
- after = this->erase_and_dispose(after, disposer);
- }
- else{
- cur = after;
- ++after;
- }
- }
- }
- }
-
- //! <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));
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(value)));
- 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));
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(r)));
- 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(!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(!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>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 and prev are never null
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_next(header_ptr));
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_previous(header_ptr));
- // header's next and prev either both point to header (empty list) or neither does
- BOOST_INTRUSIVE_INVARIANT_ASSERT((node_traits::get_next(header_ptr) == header_ptr)
- == (node_traits::get_previous(header_ptr) == 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);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(next_p);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_previous(next_p) == p);
- p = next_p;
- if (p == header_ptr) break;
- ++node_count;
- }
- if (constant_time_size)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == node_count);
- }
-
- friend bool operator==(const list_impl &x, const list_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 list_impl &x, const list_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const list_impl &x, const list_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const list_impl &x, const list_impl &y)
- { return y < x; }
-
- friend bool operator<=(const list_impl &x, const list_impl &y)
- { return !(y < x); }
-
- friend bool operator>=(const list_impl &x, const list_impl &y)
- { return !(x < y); }
-
- friend void swap(list_impl &x, list_impl &y)
- { x.swap(y); }
-
- /// @cond
-
- private:
- static list_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
- {
- BOOST_STATIC_ASSERT((has_container_from_iterator));
- node_ptr p = end_iterator.pointed_node();
- header_holder_type* h = header_holder_type::get_holder(p);
- root_plus_size* r = detail::parent_from_member
- < root_plus_size, header_holder_type>(h, &root_plus_size::m_header);
- data_t *d = detail::parent_from_member<data_t, root_plus_size>
- ( r, &data_t::root_plus_size_);
- list_impl *s = detail::parent_from_member<list_impl, data_t>(d, &list_impl::data_);
- return *s;
- }
- /// @endcond
-};
-
-
-//! Helper metafunction to define a \c list 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>
-#endif
-struct make_list
-{
- /// @cond
- typedef typename pack_options
- < list_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
- typedef list_impl
- <
- value_traits,
- typename packed_options::size_type,
- packed_options::constant_time_size,
- 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>
-#else
-template<class T, class ...Options>
-#endif
-class list
- : public make_list<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_list
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #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(list)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- list()
- : Base()
- {}
-
- explicit list(const value_traits &v_traits)
- : Base(v_traits)
- {}
-
- template<class Iterator>
- list(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
- : Base(b, e, v_traits)
- {}
-
- list(BOOST_RV_REF(list) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- list& operator=(BOOST_RV_REF(list) x)
- { return static_cast<list &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const list &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(list) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static list &container_from_end_iterator(iterator end_iterator)
- { return static_cast<list &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const list &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const list &>(Base::container_from_end_iterator(end_iterator)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_LIST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/options.hpp b/src/third_party/boost-1.69.0/boost/intrusive/options.hpp
deleted file mode 100644
index 6523ffb5742..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/options.hpp
+++ /dev/null
@@ -1,256 +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_OPTIONS_HPP
-#define BOOST_INTRUSIVE_OPTIONS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/pack_options.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-struct empty
-{};
-
-template<class Functor>
-struct fhtraits;
-
-template<class T, class Hook, Hook T::* P>
-struct mhtraits;
-
-struct dft_tag;
-struct member_tag;
-
-template<class SupposedValueTraits>
-struct is_default_hook_tag;
-
-#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-//!This option setter specifies if the intrusive
-//!container stores its size as a member to
-//!obtain constant-time size() member.
-BOOST_INTRUSIVE_OPTION_CONSTANT(constant_time_size, bool, Enabled, constant_time_size)
-
-//!This option setter specifies a container header holder type
-BOOST_INTRUSIVE_OPTION_TYPE(header_holder_type, HeaderHolder, HeaderHolder, header_holder_type)
-
-//!This option setter specifies the type that
-//!the container will use to store its size.
-BOOST_INTRUSIVE_OPTION_TYPE(size_type, SizeType, SizeType, size_type)
-
-//!This option setter specifies the strict weak ordering
-//!comparison functor for the value type
-BOOST_INTRUSIVE_OPTION_TYPE(compare, Compare, Compare, compare)
-
-//!This option setter specifies a function object
-//!that specifies the type of the key of an associative
-//!container and an operator to obtain it from a value type.
-//!
-//!This function object must the define a `type` member typedef and
-//!a member with signature `type [const&] operator()(const value_type &) const`
-//!that will return the key from a value_type of an associative container
-BOOST_INTRUSIVE_OPTION_TYPE(key_of_value, KeyOfValue, KeyOfValue, key_of_value)
-
-//!This option setter for scapegoat containers specifies if
-//!the intrusive scapegoat container should use a non-variable
-//!alpha value that does not need floating-point operations.
-//!
-//!If activated, the fixed alpha value is 1/sqrt(2). This
-//!option also saves some space in the container since
-//!the alpha value and some additional data does not need
-//!to be stored in the container.
-//!
-//!If the user only needs an alpha value near 1/sqrt(2), this
-//!option also improves performance since avoids logarithm
-//!and division operations when rebalancing the tree.
-BOOST_INTRUSIVE_OPTION_CONSTANT(floating_point, bool, Enabled, floating_point)
-
-//!This option setter specifies the equality
-//!functor for the value type
-BOOST_INTRUSIVE_OPTION_TYPE(equal, Equal, Equal, equal)
-
-//!This option setter specifies the priority comparison
-//!functor for the value type
-BOOST_INTRUSIVE_OPTION_TYPE(priority, Priority, Priority, priority)
-
-//!This option setter specifies the hash
-//!functor for the value type
-BOOST_INTRUSIVE_OPTION_TYPE(hash, Hash, Hash, hash)
-
-//!This option setter specifies the relationship between the type
-//!to be managed by the container (the value type) and the node to be
-//!used in the node algorithms. It also specifies the linking policy.
-BOOST_INTRUSIVE_OPTION_TYPE(value_traits, ValueTraits, ValueTraits, proto_value_traits)
-
-//#define BOOST_INTRUSIVE_COMMA ,
-//#define BOOST_INTRUSIVE_LESS <
-//#define BOOST_INTRUSIVE_MORE >
-//BOOST_INTRUSIVE_OPTION_TYPE (member_hook, Parent BOOST_INTRUSIVE_COMMA class MemberHook BOOST_INTRUSIVE_COMMA MemberHook Parent::* PtrToMember , mhtraits BOOST_INTRUSIVE_LESS Parent BOOST_INTRUSIVE_COMMA MemberHook BOOST_INTRUSIVE_COMMA PtrToMember BOOST_INTRUSIVE_MORE , proto_value_traits)
-//template< class Parent , class MemberHook , MemberHook Parent::* PtrToMember>
-//struct member_hook {
-// template<class Base> struct pack : Base {
-// typedef mhtraits < Parent , MemberHook , PtrToMember > proto_value_traits;
-// };
-//};
-//
-//#undef BOOST_INTRUSIVE_COMMA
-//#undef BOOST_INTRUSIVE_LESS
-//#undef BOOST_INTRUSIVE_MORE
-
-//!This option setter specifies the member hook the
-//!container must use.
-template< typename Parent
- , typename MemberHook
- , MemberHook Parent::* PtrToMember>
-struct member_hook
-{
-// @cond
-// typedef typename MemberHook::hooktags::node_traits node_traits;
-// typedef typename node_traits::node node_type;
-// typedef node_type Parent::* Ptr2MemNode;
-// typedef mhtraits
-// < Parent
-// , node_traits
-// //This cast is really ugly but necessary to reduce template bloat.
-// //Since we control the layout between the hook and the node, and there is
-// //always single inheritance, the offset of the node is exactly the offset of
-// //the hook. Since the node type is shared between all member hooks, this saves
-// //quite a lot of symbol stuff.
-// , (Ptr2MemNode)PtrToMember
-// , MemberHook::hooktags::link_mode> member_value_traits;
- typedef mhtraits <Parent, MemberHook, PtrToMember> member_value_traits;
- template<class Base>
- struct pack : Base
- {
- typedef member_value_traits proto_value_traits;
- };
-/// @endcond
-};
-
-//!This option setter specifies the function object that will
-//!be used to convert between values to be inserted in a container
-//!and the hook to be used for that purpose.
-BOOST_INTRUSIVE_OPTION_TYPE(function_hook, Functor, fhtraits<Functor>, proto_value_traits)
-
-//!This option setter specifies that the container
-//!must use the specified base hook
-BOOST_INTRUSIVE_OPTION_TYPE(base_hook, BaseHook, BaseHook, proto_value_traits)
-
-//!This option setter specifies the type of
-//!a void pointer. This will instruct the hook
-//!to use this type of pointer instead of the
-//!default one
-BOOST_INTRUSIVE_OPTION_TYPE(void_pointer, VoidPointer, VoidPointer, void_pointer)
-
-//!This option setter specifies the type of
-//!the tag of a base hook. A type cannot have two
-//!base hooks of the same type, so a tag can be used
-//!to differentiate two base hooks with otherwise same type
-BOOST_INTRUSIVE_OPTION_TYPE(tag, Tag, Tag, tag)
-
-//!This option setter specifies the link mode
-//!(normal_link, safe_link or auto_unlink)
-BOOST_INTRUSIVE_OPTION_CONSTANT(link_mode, link_mode_type, LinkType, link_mode)
-
-//!This option setter specifies if the hook
-//!should be optimized for size instead of for speed.
-BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size)
-
-//!This option setter specifies if the slist container should
-//!use a linear implementation instead of a circular one.
-BOOST_INTRUSIVE_OPTION_CONSTANT(linear, bool, Enabled, linear)
-
-//!If true, slist also stores a pointer to the last element of the singly linked list.
-//!This allows O(1) swap and splice_after(iterator, slist &) for circular slists and makes
-//!possible new functions like push_back(reference) and back().
-BOOST_INTRUSIVE_OPTION_CONSTANT(cache_last, bool, Enabled, cache_last)
-
-//!This option setter specifies the bucket traits
-//!class for unordered associative containers. When this option is specified,
-//!instead of using the default bucket traits, a user defined holder will be defined
-BOOST_INTRUSIVE_OPTION_TYPE(bucket_traits, BucketTraits, BucketTraits, bucket_traits)
-
-//!This option setter specifies if the unordered hook
-//!should offer room to store the hash value.
-//!Storing the hash in the hook will speed up rehashing
-//!processes in applications where rehashing is frequent,
-//!rehashing might throw or the value is heavy to hash.
-BOOST_INTRUSIVE_OPTION_CONSTANT(store_hash, bool, Enabled, store_hash)
-
-//!This option setter specifies if the unordered hook
-//!should offer room to store another link to another node
-//!with the same key.
-//!Storing this link will speed up lookups and insertions on
-//!unordered_multiset containers with a great number of elements
-//!with the same key.
-BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_multikey, bool, Enabled, optimize_multikey)
-
-//!This option setter specifies if the bucket array will be always power of two.
-//!This allows using masks instead of the default modulo operation to determine
-//!the bucket number from the hash value, leading to better performance.
-//!In debug mode, if power of two buckets mode is activated, the bucket length
-//!will be checked with assertions.
-BOOST_INTRUSIVE_OPTION_CONSTANT(power_2_buckets, bool, Enabled, power_2_buckets)
-
-//!This option setter specifies if the container will cache a pointer to the first
-//!non-empty bucket so that begin() is always constant-time.
-//!This is specially helpful when we can have containers with a few elements
-//!but with big bucket arrays (that is, hashtables with low load factors).
-BOOST_INTRUSIVE_OPTION_CONSTANT(cache_begin, bool, Enabled, cache_begin)
-
-//!This option setter specifies if the container will compare the hash value
-//!before comparing objects. This option can't be specified if store_hash<>
-//!is not true.
-//!This is specially helpful when we have containers with a high load factor.
-//!and the comparison function is much more expensive that comparing already
-//!stored hash values.
-BOOST_INTRUSIVE_OPTION_CONSTANT(compare_hash, bool, Enabled, compare_hash)
-
-//!This option setter specifies if the hash container will use incremental
-//!hashing. With incremental hashing the cost of hash table expansion is spread
-//!out across each hash table insertion operation, as opposed to be incurred all at once.
-//!Therefore linear hashing is well suited for interactive applications or real-time
-//!appplications where the worst-case insertion time of non-incremental hash containers
-//!(rehashing the whole bucket array) is not admisible.
-BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, incremental)
-
-/// @cond
-
-struct hook_defaults
-{
- typedef void* void_pointer;
- static const link_mode_type link_mode = safe_link;
- typedef dft_tag tag;
- static const bool optimize_size = false;
- static const bool store_hash = false;
- static const bool linear = false;
- static const bool optimize_multikey = false;
-};
-
-/// @endcond
-
-} //namespace intrusive {
-} //namespace boost {
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_INTRUSIVE_OPTIONS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp
deleted file mode 100644
index 4216c7ee9ca..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp
+++ /dev/null
@@ -1,318 +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-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_POINTER_TRAITS_HPP
-#define BOOST_INTRUSIVE_POINTER_TRAITS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-#include <boost/move/detail/pointer_element.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <cstddef>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1310)
-BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_pointer_to, pointer_to)
-BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_dynamic_cast_from, dynamic_cast_from)
-BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_static_cast_from, static_cast_from)
-BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_const_cast_from, const_cast_from)
-#else
-BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_pointer_to, pointer_to)
-BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_dynamic_cast_from, dynamic_cast_from)
-BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_static_cast_from, static_cast_from)
-BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_const_cast_from, const_cast_from)
-#endif
-
-BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(element_type)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
-
-} //namespace detail {
-
-
-//! pointer_traits is the implementation of C++11 std::pointer_traits class with some
-//! extensions like castings.
-//!
-//! pointer_traits supplies a uniform interface to certain attributes of pointer-like types.
-//!
-//! <b>Note</b>: When defining a custom family of pointers or references to be used with BI
-//! library, make sure the public static conversion functions accessed through
-//! the `pointer_traits` interface (`*_cast_from` and `pointer_to`) can
-//! properly convert between const and nonconst referred member types
-//! <b>without the use of implicit constructor calls</b>. It is suggested these
-//! conversions be implemented as function templates, where the template
-//! argument is the type of the object being converted from.
-template <typename Ptr>
-struct pointer_traits
-{
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //!The pointer type
- //!queried by this pointer_traits instantiation
- typedef Ptr pointer;
-
- //!Ptr::element_type if such a type exists; otherwise, T if Ptr is a class
- //!template instantiation of the form SomePointer<T, Args>, where Args is zero or
- //!more type arguments ; otherwise , the specialization is ill-formed.
- typedef unspecified_type element_type;
-
- //!Ptr::difference_type if such a type exists; otherwise,
- //!std::ptrdiff_t.
- typedef unspecified_type difference_type;
-
- //!Ptr::rebind<U> if such a type exists; otherwise, SomePointer<U, Args> if Ptr is
- //!a class template instantiation of the form SomePointer<T, Args>, where Args is zero or
- //!more type arguments ; otherwise, the instantiation of rebind is ill-formed.
- //!
- //!For portable code for C++03 and C++11, <pre>typename rebind_pointer<U>::type</pre>
- //!shall be used instead of rebind<U> to obtain a pointer to U.
- template <class U> using rebind = unspecified;
-
- //!Ptr::reference if such a type exists (non-standard extension); otherwise, element_type &
- //!
- typedef unspecified_type reference;
- #else
- typedef Ptr pointer;
- //
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT
- ( boost::intrusive::detail::, Ptr, element_type
- , boost::movelib::detail::first_param<Ptr>) element_type;
- //
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
- (boost::intrusive::detail::, Ptr, difference_type, std::ptrdiff_t) difference_type;
-
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
- (boost::intrusive::detail::, Ptr, reference, typename boost::intrusive::detail::unvoid_ref<element_type>::type) reference;
- //
- template <class U> struct rebind_pointer
- {
- typedef typename boost::intrusive::pointer_rebind<Ptr, U>::type type;
- };
-
- #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
- template <class U> using rebind = typename boost::intrusive::pointer_rebind<Ptr, U>::type;
- #endif
- #endif //#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-
- //! <b>Remark</b>: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise,
- //! it is element_type &.
- //!
- //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(reference).
- //! Non-standard extension: If such function does not exist, returns pointer(addressof(r));
- //!
- //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
- //! <code>pointer_to</code> is checked.
- static pointer pointer_to(reference r)
- {
- //Non-standard extension, it does not require Ptr::pointer_to. If not present
- //tries to converts &r to pointer.
- const bool value = boost::intrusive::detail::
- has_member_function_callable_with_pointer_to
- <Ptr, Ptr (*)(reference)>::value;
- boost::intrusive::detail::bool_<value> flag;
- return pointer_traits::priv_pointer_to(flag, r);
- }
-
- //! <b>Remark</b>: Non-standard extension.
- //!
- //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
- //! Ptr::static_cast_from(UPpr/const UPpr &).
- //! If such function does not exist, returns pointer_to(static_cast<element_type&>(*uptr))
- //!
- //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
- //! <code>static_cast_from</code> is checked.
- template<class UPtr>
- static pointer static_cast_from(const UPtr &uptr)
- {
- typedef const UPtr &RefArg;
- const bool value = boost::intrusive::detail::
- has_member_function_callable_with_static_cast_from
- <pointer, pointer(*)(RefArg)>::value
- || boost::intrusive::detail::
- has_member_function_callable_with_static_cast_from
- <pointer, pointer(*)(UPtr)>::value;
- return pointer_traits::priv_static_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
- }
-
- //! <b>Remark</b>: Non-standard extension.
- //!
- //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
- //! Ptr::const_cast_from<UPtr>(UPpr/const UPpr &).
- //! If such function does not exist, returns pointer_to(const_cast<element_type&>(*uptr))
- //!
- //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
- //! <code>const_cast_from</code> is checked.
- template<class UPtr>
- static pointer const_cast_from(const UPtr &uptr)
- {
- typedef const UPtr &RefArg;
- const bool value = boost::intrusive::detail::
- has_member_function_callable_with_const_cast_from
- <pointer, pointer(*)(RefArg)>::value
- || boost::intrusive::detail::
- has_member_function_callable_with_const_cast_from
- <pointer, pointer(*)(UPtr)>::value;
- return pointer_traits::priv_const_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
- }
-
- //! <b>Remark</b>: Non-standard extension.
- //!
- //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
- //! Ptr::dynamic_cast_from<UPtr>(UPpr/const UPpr &).
- //! If such function does not exist, returns pointer_to(*dynamic_cast<element_type*>(&*uptr))
- //!
- //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
- //! <code>dynamic_cast_from</code> is checked.
- template<class UPtr>
- static pointer dynamic_cast_from(const UPtr &uptr)
- {
- typedef const UPtr &RefArg;
- const bool value = boost::intrusive::detail::
- has_member_function_callable_with_dynamic_cast_from
- <pointer, pointer(*)(RefArg)>::value
- || boost::intrusive::detail::
- has_member_function_callable_with_dynamic_cast_from
- <pointer, pointer(*)(UPtr)>::value;
- return pointer_traits::priv_dynamic_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
- }
-
- ///@cond
- private:
- //priv_to_raw_pointer
- template <class T>
- static T* to_raw_pointer(T* p)
- { return p; }
-
- template <class Pointer>
- static typename pointer_traits<Pointer>::element_type*
- to_raw_pointer(const Pointer &p)
- { return pointer_traits::to_raw_pointer(p.operator->()); }
-
- //priv_pointer_to
- static pointer priv_pointer_to(boost::intrusive::detail::true_, reference r)
- { return Ptr::pointer_to(r); }
-
- static pointer priv_pointer_to(boost::intrusive::detail::false_, reference r)
- { return pointer(boost::intrusive::detail::addressof(r)); }
-
- //priv_static_cast_from
- template<class UPtr>
- static pointer priv_static_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
- { return Ptr::static_cast_from(uptr); }
-
- template<class UPtr>
- static pointer priv_static_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
- { return uptr ? pointer_to(*static_cast<element_type*>(to_raw_pointer(uptr))) : pointer(); }
-
- //priv_const_cast_from
- template<class UPtr>
- static pointer priv_const_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
- { return Ptr::const_cast_from(uptr); }
-
- template<class UPtr>
- static pointer priv_const_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
- { return uptr ? pointer_to(const_cast<element_type&>(*uptr)) : pointer(); }
-
- //priv_dynamic_cast_from
- template<class UPtr>
- static pointer priv_dynamic_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
- { return Ptr::dynamic_cast_from(uptr); }
-
- template<class UPtr>
- static pointer priv_dynamic_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
- { return uptr ? pointer_to(dynamic_cast<element_type&>(*uptr)) : pointer(); }
- ///@endcond
-};
-
-///@cond
-
-// Remove cv qualification from Ptr parameter to pointer_traits:
-template <typename Ptr>
-struct pointer_traits<const Ptr> : pointer_traits<Ptr> {};
-template <typename Ptr>
-struct pointer_traits<volatile Ptr> : pointer_traits<Ptr> { };
-template <typename Ptr>
-struct pointer_traits<const volatile Ptr> : pointer_traits<Ptr> { };
-// Remove reference from Ptr parameter to pointer_traits:
-template <typename Ptr>
-struct pointer_traits<Ptr&> : pointer_traits<Ptr> { };
-
-///@endcond
-
-//! Specialization of pointer_traits for raw pointers
-//!
-template <typename T>
-struct pointer_traits<T*>
-{
- typedef T element_type;
- typedef T* pointer;
- typedef std::ptrdiff_t difference_type;
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- typedef T & reference;
- //!typedef for <pre>U *</pre>
- //!
- //!For portable code for C++03 and C++11, <pre>typename rebind_pointer<U>::type</pre>
- //!shall be used instead of rebind<U> to obtain a pointer to U.
- template <class U> using rebind = U*;
- #else
- typedef typename boost::intrusive::detail::unvoid_ref<element_type>::type reference;
- #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
- template <class U> using rebind = U*;
- #endif
- #endif
-
- template <class U> struct rebind_pointer
- { typedef U* type; };
-
- //! <b>Returns</b>: addressof(r)
- //!
- BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r)
- { return boost::intrusive::detail::addressof(r); }
-
- //! <b>Returns</b>: static_cast<pointer>(uptr)
- //!
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(U *uptr)
- { return static_cast<pointer>(uptr); }
-
- //! <b>Returns</b>: const_cast<pointer>(uptr)
- //!
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(U *uptr)
- { return const_cast<pointer>(uptr); }
-
- //! <b>Returns</b>: dynamic_cast<pointer>(uptr)
- //!
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(U *uptr)
- { return dynamic_cast<pointer>(uptr); }
-};
-
-} //namespace container {
-} //namespace boost {
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif // ! defined(BOOST_INTRUSIVE_POINTER_TRAITS_HPP)
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp b/src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp
deleted file mode 100644
index f5589ce27b2..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
-#define BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class U>
-void priority_order();
-
-/// @endcond
-
-template <class T = void>
-struct priority_compare
-{
- //Compatibility with std::binary_function
- typedef T first_argument_type;
- typedef T second_argument_type;
- typedef bool result_type;
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &val, const T &val2) const
- {
- return priority_order(val, val2);
- }
-};
-
-template <>
-struct priority_compare<void>
-{
- template<class T, class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
- {
- return priority_order(t, u);
- }
-};
-
-/// @cond
-
-template<class PrioComp, class T>
-struct get_prio
-{
- typedef PrioComp type;
-};
-
-
-template<class T>
-struct get_prio<void, T>
-{
- typedef ::boost::intrusive::priority_compare<T> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp
deleted file mode 100644
index 4f5d86dd6aa..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp
+++ /dev/null
@@ -1,591 +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_RBTREE_HPP
-#define BOOST_INTRUSIVE_RBTREE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-
-#include <boost/intrusive/set_hook.hpp>
-#include <boost/intrusive/detail/rbtree_node.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/rbtree_algorithms.hpp>
-#include <boost/intrusive/link_mode.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 {
-
-/// @cond
-
-struct default_rbtree_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_rbtree_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_rbtree_hook_applier>
-{ static const bool value = true; };
-
-struct rbtree_defaults
- : bstree_defaults
-{
- typedef default_rbtree_hook_applier proto_value_traits;
-};
-
-/// @endcond
-
-//! The class template rbtree is an intrusive red-black tree container, that
-//! is used to construct intrusive set and multiset containers. The no-throw
-//! guarantee holds only, if the key_compare object
-//! doesn't throw.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class rbtree_impl
- /// @cond
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder>
- /// @endcond
-{
- public:
- typedef ValueTraits value_traits;
- /// @cond
- typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
- , ConstantTimeSize, RbTreeAlgorithms
- , HeaderHolder> tree_type;
- typedef tree_type implementation_defined;
- /// @endcond
-
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- 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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
- /// @cond
- private:
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(rbtree_impl)
-
- /// @endcond
-
- public:
-
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
-
- //! @copydoc ::boost::intrusive::bstree::bstree()
- rbtree_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit rbtree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- rbtree_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(unique, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- rbtree_impl(BOOST_RV_REF(rbtree_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- rbtree_impl& operator=(BOOST_RV_REF(rbtree_impl) x)
- { return static_cast<rbtree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~rbtree_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static rbtree_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const rbtree_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static rbtree_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const rbtree_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(rbtree_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const rbtree_impl &src, Cloner cloner, Disposer disposer);
-
- #else //BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(rbtree_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(rbtree_impl &&src, Cloner cloner, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
- iterator insert_equal(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
- iterator insert_equal(const_iterator hint, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
- std::pair<iterator, bool> insert_unique(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
- iterator insert_unique(const_iterator hint, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const key_type &key, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const key_type &key, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &key)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
- template<class T, class ...Options2>
- void merge_unique(rbtree<T, Options2...> &);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
- template<class T, class ...Options2>
- void merge_equal(rbtree<T, Options2...> &);
-
- friend bool operator< (const rbtree_impl &x, const rbtree_impl &y);
-
- friend bool operator==(const rbtree_impl &x, const rbtree_impl &y);
-
- friend bool operator!= (const rbtree_impl &x, const rbtree_impl &y);
-
- friend bool operator>(const rbtree_impl &x, const rbtree_impl &y);
-
- friend bool operator<=(const rbtree_impl &x, const rbtree_impl &y);
-
- friend bool operator>=(const rbtree_impl &x, const rbtree_impl &y);
-
- friend void swap(rbtree_impl &x, rbtree_impl &y);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-
-//! Helper metafunction to define a \c rbtree 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_rbtree
-{
- /// @cond
- typedef typename pack_options
- < rbtree_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 rbtree_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 rbtree
- : public make_rbtree<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_rbtree
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(rbtree)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::reverse_iterator reverse_iterator;
- typedef typename Base::const_reverse_iterator const_reverse_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- rbtree()
- : Base()
- {}
-
- explicit rbtree( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- rbtree( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, v_traits)
- {}
-
- rbtree(BOOST_RV_REF(rbtree) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- rbtree& operator=(BOOST_RV_REF(rbtree) x)
- { return static_cast<rbtree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const rbtree &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(rbtree) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static rbtree &container_from_end_iterator(iterator end_iterator)
- { return static_cast<rbtree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const rbtree &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const rbtree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static rbtree &container_from_iterator(iterator it)
- { return static_cast<rbtree &>(Base::container_from_iterator(it)); }
-
- static const rbtree &container_from_iterator(const_iterator it)
- { return static_cast<const rbtree &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //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
deleted file mode 100644
index ee5e13a7aab..00000000000
--- a/src/third_party/boost-1.69.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)
- {}
-
- 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.69.0/boost/intrusive/set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/set.hpp
deleted file mode 100644
index 3cd9013d4b7..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/set.hpp
+++ /dev/null
@@ -1,1073 +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_SET_HPP
-#define BOOST_INTRUSIVE_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/rbtree.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 {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class multiset_impl;
-#endif
-
-//! The class template set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(set_impl)
-
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::rbtree::rbtree()
- set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::rbtree(const key_compare &,const value_traits &)
- explicit set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::rbtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::rbtree(rbtree &&)
- set_impl(BOOST_RV_REF(set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::operator=(rbtree &&)
- set_impl& operator=(BOOST_RV_REF(set_impl) x)
- { return static_cast<set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::rbtree::~rbtree()
- ~set_impl();
-
- //! @copydoc ::boost::intrusive::rbtree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::rbtree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::rbtree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::rbtree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::rbtree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::rbtree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::rbtree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::rbtree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::rbtree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::rbtree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::rbtree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
- static set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(const_iterator)
- static const set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(iterator)
- static set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(const_iterator)
- static const set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::rbtree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::rbtree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::rbtree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::rbtree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::rbtree::swap
- void swap(set_impl& other);
-
- //! @copydoc ::boost::intrusive::rbtree::clone_from(const rbtree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::clone_from(rbtree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::rbtree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::rbtree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::rbtree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::rbtree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::rbtree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::rbtree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_unique
- template<class ...Options2>
- void merge(set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_unique
- template<class ...Options2>
- void merge(multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(set_impl<T, Options...> &x, set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c 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>
-#endif
-struct make_set
-{
- /// @cond
- typedef typename pack_options
- < rbtree_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 set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 set
- : public make_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- set()
- : Base()
- {}
-
- explicit set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- set(BOOST_RV_REF(set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- set& operator=(BOOST_RV_REF(set) x)
- { return static_cast<set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static set &container_from_iterator(iterator it)
- { return static_cast<set &>(Base::container_from_iterator(it)); }
-
- static const set &container_from_iterator(const_iterator it)
- { return static_cast<const set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template multiset is an intrusive container, that mimics most of
-//! the interface of std::multiset as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(multiset_impl)
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::rbtree::rbtree()
- multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::rbtree(const key_compare &,const value_traits &)
- explicit multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::rbtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::rbtree(rbtree &&)
- multiset_impl(BOOST_RV_REF(multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::rbtree::operator=(rbtree &&)
- multiset_impl& operator=(BOOST_RV_REF(multiset_impl) x)
- { return static_cast<multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::rbtree::~rbtree()
- ~multiset_impl();
-
- //! @copydoc ::boost::intrusive::rbtree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::rbtree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::rbtree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::rbtree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::rbtree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::rbtree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::rbtree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::rbtree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::rbtree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::rbtree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::rbtree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::rbtree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
- static multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(const_iterator)
- static const multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(iterator)
- static multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(const_iterator)
- static const multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::rbtree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::rbtree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::rbtree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::rbtree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::rbtree::swap
- void swap(multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::rbtree::clone_from(const rbtree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::clone_from(rbtree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::rbtree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::rbtree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::rbtree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::rbtree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::rbtree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::rbtree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_equal
- template<class ...Options2>
- void merge(multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_equal
- template<class ...Options2>
- void merge(set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(multiset_impl<T, Options...> &x, multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c 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>
-#endif
-struct make_multiset
-{
- /// @cond
- typedef typename pack_options
- < rbtree_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 multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 multiset
- : public make_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- multiset()
- : Base()
- {}
-
- explicit multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- multiset(BOOST_RV_REF(multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- multiset& operator=(BOOST_RV_REF(multiset) x)
- { return static_cast<multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static multiset &container_from_iterator(iterator it)
- { return static_cast<multiset &>(Base::container_from_iterator(it)); }
-
- static const multiset &container_from_iterator(const_iterator it)
- { return static_cast<const multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp
deleted file mode 100644
index 745c3790b99..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp
+++ /dev/null
@@ -1,1094 +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_SG_SET_HPP
-#define BOOST_INTRUSIVE_SG_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/sgtree.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class sg_multiset_impl;
-#endif
-
-//! The class template sg_set is an intrusive container, that mimics most of
-//! the interface of std::sg_set as described in the C++ standard.
-//!
-//! 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 floating_point<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool FloatingPoint, typename HeaderHolder>
-#endif
-class sg_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder>
-#endif
-{
- /// @cond
- typedef sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_set_impl)
-
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::sgtree::sgtree()
- sg_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(const key_compare &,const value_traits &)
- explicit sg_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- sg_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(sgtree &&)
- sg_set_impl(BOOST_RV_REF(sg_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::operator=(sgtree &&)
- sg_set_impl& operator=(BOOST_RV_REF(sg_set_impl) x)
- { return static_cast<sg_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::~sgtree()
- ~sg_set_impl();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::sgtree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::sgtree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::sgtree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::sgtree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
- static sg_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
- static const sg_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
- static sg_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
- static const sg_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::sgtree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::sgtree::swap
- void swap(sg_set_impl& other);
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(const sgtree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const sg_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(sgtree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::sgtree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::sgtree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor()
- float balance_factor() const;
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
- void balance_factor(float new_alpha);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_unique
- template<class ...Options2>
- void merge(sg_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_unique
- template<class ...Options2>
- void merge(sg_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- template<class Compare2>
- void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(sg_set_impl<T, Options...> &x, sg_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c sg_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>
-#endif
-struct make_sg_set
-{
- /// @cond
- typedef typename pack_options
- < sgtree_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 sg_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::floating_point
- , 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 sg_set
- : public make_sg_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_sg_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- sg_set()
- : Base()
- {}
-
- explicit sg_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- sg_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- sg_set(BOOST_RV_REF(sg_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- sg_set& operator=(BOOST_RV_REF(sg_set) x)
- { return static_cast<sg_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const sg_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static sg_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<sg_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const sg_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const sg_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static sg_set &container_from_iterator(iterator it)
- { return static_cast<sg_set &>(Base::container_from_iterator(it)); }
-
- static const sg_set &container_from_iterator(const_iterator it)
- { return static_cast<const sg_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template sg_multiset is an intrusive container, that mimics most of
-//! the interface of std::sg_multiset as described in the C++ standard.
-//!
-//! 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 floating_point<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool FloatingPoint, typename HeaderHolder>
-#endif
-class sg_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder>
-#endif
-{
- /// @cond
- typedef sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_multiset_impl)
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::sgtree::sgtree()
- sg_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(const key_compare &,const value_traits &)
- explicit sg_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- sg_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(sgtree &&)
- sg_multiset_impl(BOOST_RV_REF(sg_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::operator=(sgtree &&)
- sg_multiset_impl& operator=(BOOST_RV_REF(sg_multiset_impl) x)
- { return static_cast<sg_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::~sgtree()
- ~sg_multiset_impl();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::sgtree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::sgtree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::sgtree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::sgtree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
- static sg_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
- static const sg_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
- static sg_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
- static const sg_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::sgtree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::sgtree::swap
- void swap(sg_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(const sgtree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const sg_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(sgtree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::sgtree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::sgtree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor()
- float balance_factor() const;
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
- void balance_factor(float new_alpha);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(sg_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(sg_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(sg_multiset_impl<T, Options...> &x, sg_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c sg_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>
-#endif
-struct make_sg_multiset
-{
- /// @cond
- typedef typename pack_options
- < sgtree_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 sg_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::floating_point
- , 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 sg_multiset
- : public make_sg_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_sg_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- sg_multiset()
- : Base()
- {}
-
- explicit sg_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- sg_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- sg_multiset(BOOST_RV_REF(sg_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- sg_multiset& operator=(BOOST_RV_REF(sg_multiset) x)
- { return static_cast<sg_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const sg_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static sg_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const sg_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static sg_multiset &container_from_iterator(iterator it)
- { return static_cast<sg_multiset &>(Base::container_from_iterator(it)); }
-
- static const sg_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const sg_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SG_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp
deleted file mode 100644
index 033efb878d6..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp
+++ /dev/null
@@ -1,1081 +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 option that yields to non-floating point 1/sqrt(2) alpha is taken
-// from the scapegoat tree implementation of the PSPP library.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_SGTREE_HPP
-#define BOOST_INTRUSIVE_SGTREE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/intrusive/bs_set_hook.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/math.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/sgtree_algorithms.hpp>
-#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
-#include <boost/intrusive/link_mode.hpp>
-
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-#include <cmath>
-#include <cstddef>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-namespace detail{
-
-/////////////////////////////////////////////////////////////
-//
-// Halpha for fixed floating_point<false> option
-//
-/////////////////////////////////////////////////////////////
-
-//! Returns floor(log2(n)/log2(sqrt(2))) -> floor(2*log2(n))
-//! Undefined if N is 0.
-//!
-//! This function does not use float point operations.
-inline std::size_t calculate_h_sqrt2 (std::size_t n)
-{
- std::size_t f_log2 = detail::floor_log2(n);
- return (2*f_log2) + static_cast<std::size_t>(n >= detail::sqrt2_pow_2xplus1(f_log2));
-}
-
-struct h_alpha_sqrt2_t
-{
- h_alpha_sqrt2_t(void){}
- std::size_t operator()(std::size_t n) const
- { return calculate_h_sqrt2(n); }
-};
-
-struct alpha_0_75_by_max_size_t
-{
- alpha_0_75_by_max_size_t(void){}
-
- std::size_t operator()(std::size_t max_tree_size) const
- {
- const std::size_t max_tree_size_limit = ((~std::size_t(0))/std::size_t(3));
- return max_tree_size > max_tree_size_limit ? max_tree_size/4*3 : max_tree_size*3/4;
- }
-};
-
-/////////////////////////////////////////////////////////////
-//
-// Halpha for fixed floating_point<true> option
-//
-/////////////////////////////////////////////////////////////
-
-struct h_alpha_t
-{
- explicit h_alpha_t(float inv_minus_logalpha)
- : inv_minus_logalpha_(inv_minus_logalpha)
- {}
-
- std::size_t operator()(std::size_t n) const
- {
- ////////////////////////////////////////////////////////////
- // This function must return "floor(log2(1/alpha(n)))" ->
- // floor(log2(n)/log(1/alpha)) ->
- // floor(log2(n)/-log2(alpha))
- // floor(log2(n)*(1/-log2(alpha)))
- ////////////////////////////////////////////////////////////
- return static_cast<std::size_t>(detail::fast_log2(float(n))*inv_minus_logalpha_);
- }
-
- private:
- //Since the function will be repeatedly called
- //precalculate constant data to avoid repeated
- //calls to log and division.
- //This will store 1/(-std::log2(alpha_))
- float inv_minus_logalpha_;
-};
-
-struct alpha_by_max_size_t
-{
- explicit alpha_by_max_size_t(float alpha)
- : alpha_(alpha)
- {}
-
- float operator()(std::size_t max_tree_size) const
- { return float(max_tree_size)*alpha_; }
-
- private:
- float alpha_;
-};
-
-template<bool Activate, class SizeType>
-struct alpha_holder
-{
- typedef boost::intrusive::detail::h_alpha_t h_alpha_t;
- typedef boost::intrusive::detail::alpha_by_max_size_t multiply_by_alpha_t;
-
- alpha_holder()
- : max_tree_size_()
- { set_alpha(0.70711f); } // ~1/sqrt(2)
-
- float get_alpha() const
- { return alpha_; }
-
- void set_alpha(float alpha)
- {
- alpha_ = alpha;
- inv_minus_logalpha_ = 1/(-detail::fast_log2(alpha));
- }
-
- h_alpha_t get_h_alpha_t() const
- { return h_alpha_t(inv_minus_logalpha_); }
-
- multiply_by_alpha_t get_multiply_by_alpha_t() const
- { return multiply_by_alpha_t(alpha_); }
-
- SizeType &get_max_tree_size()
- { return max_tree_size_; }
-
- protected:
- float alpha_;
- float inv_minus_logalpha_;
- SizeType max_tree_size_;
-};
-
-template<class SizeType>
-struct alpha_holder<false, SizeType>
-{
- //This specialization uses alpha = 1/sqrt(2)
- //without using floating point operations
- //Downside: alpha CAN't be changed.
- typedef boost::intrusive::detail::h_alpha_sqrt2_t h_alpha_t;
- typedef boost::intrusive::detail::alpha_0_75_by_max_size_t multiply_by_alpha_t;
-
- alpha_holder()
- : max_tree_size_()
- {}
-
- float get_alpha() const
- { return 0.70710677f; }
-
- void set_alpha(float)
- { //alpha CAN't be changed.
- BOOST_INTRUSIVE_INVARIANT_ASSERT(0);
- }
-
- h_alpha_t get_h_alpha_t() const
- { return h_alpha_t(); }
-
- multiply_by_alpha_t get_multiply_by_alpha_t() const
- { return multiply_by_alpha_t(); }
-
- SizeType &get_max_tree_size()
- { return max_tree_size_; }
-
- protected:
- SizeType max_tree_size_;
-};
-
-} //namespace detail{
-
-struct sgtree_defaults
- : bstree_defaults
-{
- static const bool floating_point = true;
-};
-
-/// @endcond
-
-//! The class template sgtree is an intrusive scapegoat tree container, that
-//! is used to construct intrusive sg_set and sg_multiset containers.
-//! The no-throw guarantee holds only, if the value_compare object
-//! doesn't throw.
-//!
-//! 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 floating_point<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool FloatingPoint, typename HeaderHolder>
-#endif
-class sgtree_impl
- /// @cond
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, true, SgTreeAlgorithms, HeaderHolder>
- , public detail::alpha_holder<FloatingPoint, SizeType>
- /// @endcond
-{
- public:
- typedef ValueTraits value_traits;
- /// @cond
- typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
- , true, SgTreeAlgorithms, HeaderHolder> tree_type;
- typedef tree_type implementation_defined;
-
- /// @endcond
-
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- 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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_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 BOOST_INTRUSIVE_IMPDEF(sgtree_algorithms<node_traits>) node_algorithms;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
- static const bool floating_point = FloatingPoint;
- static const bool stateful_value_traits = implementation_defined::stateful_value_traits;
-
- /// @cond
- private:
-
- //noncopyable
- typedef detail::alpha_holder<FloatingPoint, SizeType> alpha_traits;
- typedef typename alpha_traits::h_alpha_t h_alpha_t;
- typedef typename alpha_traits::multiply_by_alpha_t multiply_by_alpha_t;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sgtree_impl)
- BOOST_STATIC_ASSERT(((int)value_traits::link_mode != (int)auto_unlink));
-
- enum { safemode_or_autounlink =
- (int)value_traits::link_mode == (int)auto_unlink ||
- (int)value_traits::link_mode == (int)safe_link };
-
- /// @endcond
-
- public:
-
- typedef BOOST_INTRUSIVE_IMPDEF(typename node_algorithms::insert_commit_data) insert_commit_data;
-
- //! @copydoc ::boost::intrusive::bstree::bstree()
- sgtree_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit sgtree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- sgtree_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {
- if(unique)
- this->insert_unique(b, e);
- else
- this->insert_equal(b, e);
- }
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- sgtree_impl(BOOST_RV_REF(sgtree_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x)), alpha_traits(x.get_alpha_traits())
- { ::boost::adl_move_swap(this->get_alpha_traits(), x.get_alpha_traits()); }
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- sgtree_impl& operator=(BOOST_RV_REF(sgtree_impl) x)
- {
- this->get_alpha_traits() = x.get_alpha_traits();
- return static_cast<sgtree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x)));
- }
-
- /// @cond
- private:
-
- const alpha_traits &get_alpha_traits() const
- { return *this; }
-
- alpha_traits &get_alpha_traits()
- { return *this; }
-
- h_alpha_t get_h_alpha_func() const
- { return this->get_alpha_traits().get_h_alpha_t(); }
-
- multiply_by_alpha_t get_alpha_by_max_size_func() const
- { return this->get_alpha_traits().get_multiply_by_alpha_t(); }
-
- /// @endcond
-
- public:
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~sgtree_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static sgtree_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const sgtree_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static sgtree_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const sgtree_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(sgtree_impl& other)
- {
- //This can throw
- this->tree_type::swap(static_cast<tree_type&>(other));
- ::boost::adl_move_swap(this->get_alpha_traits(), other.get_alpha_traits());
- }
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- //! Additional notes: it also copies the alpha factor from the source container.
- template <class Cloner, class Disposer>
- void clone_from(const sgtree_impl &src, Cloner cloner, Disposer disposer)
- {
- tree_type::clone_from(src, cloner, disposer);
- this->get_alpha_traits() = src.get_alpha_traits();
- }
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- //! Additional notes: it also copies the alpha factor from the source container.
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sgtree_impl) src, Cloner cloner, Disposer disposer)
- {
- tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer);
- this->get_alpha_traits() = ::boost::move(src.get_alpha_traits());
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
- iterator insert_equal(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
- node_ptr p = node_algorithms::insert_equal_upper_bound
- (this->tree_type::header_ptr(), to_insert, this->key_node_comp(this->key_comp())
- , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
- this->tree_type::sz_traits().increment();
- this->max_tree_size_ = (size_type)max_tree_size;
- return iterator(p, this->priv_value_traits_ptr());
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
- iterator insert_equal(const_iterator hint, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
- node_ptr p = node_algorithms::insert_equal
- ( this->tree_type::header_ptr(), hint.pointed_node(), to_insert, this->key_node_comp(this->key_comp())
- , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size);
- this->tree_type::sz_traits().increment();
- this->max_tree_size_ = (size_type)max_tree_size;
- return iterator(p, this->priv_value_traits_ptr());
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e)
- {
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_equal(iend, *b);
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
- 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), this->key_comp(), commit_data);
- if(!ret.second)
- return ret;
- return std::pair<iterator, bool> (this->insert_unique_commit(value, commit_data), true);
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
- iterator insert_unique(const_iterator hint, reference value)
- {
- insert_commit_data commit_data;
- std::pair<iterator, bool> ret = this->insert_unique_check
- (hint, key_of_value()(value), this->key_comp(), commit_data);
- if(!ret.second)
- return ret.first;
- return this->insert_unique_commit(value, commit_data);
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
- , typename detail::disable_if_convertible
- <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
- std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
- insert_unique_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- node_algorithms::insert_unique_check
- (this->tree_type::header_ptr(), key, this->key_node_comp(comp), commit_data);
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- node_algorithms::insert_unique_check
- (this->tree_type::header_ptr(), hint.pointed_node(), key, this->key_node_comp(comp), commit_data);
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(key, this->key_comp(), commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(hint, key, this->key_comp(), commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
- node_algorithms::insert_unique_commit
- ( this->tree_type::header_ptr(), to_insert, commit_data
- , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size);
- this->tree_type::sz_traits().increment();
- this->max_tree_size_ = (size_type)max_tree_size;
- return iterator(to_insert, this->priv_value_traits_ptr());
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e)
- {
- if(this->empty()){
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_unique(iend, *b);
- }
- else{
- for (; b != e; ++b)
- this->insert_unique(*b);
- }
- }
-
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
- node_ptr p = node_algorithms::insert_before
- ( this->tree_type::header_ptr(), pos.pointed_node(), to_insert
- , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
- this->tree_type::sz_traits().increment();
- this->max_tree_size_ = (size_type)max_tree_size;
- return iterator(p, this->priv_value_traits_ptr());
- }
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
- node_algorithms::push_back
- ( this->tree_type::header_ptr(), to_insert
- , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
- this->tree_type::sz_traits().increment();
- this->max_tree_size_ = (size_type)max_tree_size;
- }
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
- node_algorithms::push_front
- ( this->tree_type::header_ptr(), to_insert
- , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
- this->tree_type::sz_traits().increment();
- this->max_tree_size_ = (size_type)max_tree_size;
- }
-
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i)
- {
- const_iterator ret(i);
- ++ret;
- node_ptr to_erase(i.pointed_node());
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase));
- std::size_t max_tree_size = this->max_tree_size_;
- node_algorithms::erase
- ( this->tree_type::header_ptr(), to_erase, (std::size_t)this->size()
- , max_tree_size, this->get_alpha_by_max_size_func());
- this->max_tree_size_ = (size_type)max_tree_size;
- this->tree_type::sz_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- return ret.unconst();
- }
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e)
- { size_type n; return private_erase(b, e, n); }
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key)
- { return this->erase(key, this->key_comp()); }
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase(const KeyType& key, KeyTypeKeyCompare comp)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- private_erase(p.first, p.second, n);
- return n;
- }
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer)
- {
- node_ptr to_erase(i.pointed_node());
- iterator ret(this->erase(i));
- disposer(this->get_value_traits().to_value_ptr(to_erase));
- return ret;
- }
-
- #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
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- { size_type n; return private_erase(b, e, n, disposer); }
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key);
- size_type n;
- private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear()
- {
- tree_type::clear();
- this->max_tree_size_ = 0;
- }
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- tree_type::clear_and_dispose(disposer);
- this->max_tree_size_ = 0;
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_unique(sgtree_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
-
- std::size_t max_tree1_size = this->max_tree_size_;
- std::size_t max_tree2_size = source.get_max_tree_size();
- if( node_algorithms::transfer_unique
- ( this->header_ptr(), this->key_node_comp(this->key_comp()), this->size(), max_tree1_size
- , source.header_ptr(), p, source.size(), max_tree2_size
- , this->get_h_alpha_func(), this->get_alpha_by_max_size_func()) ){
- this->max_tree_size_ = (size_type)max_tree1_size;
- this->sz_traits().increment();
- source.get_max_tree_size() = (size_type)max_tree2_size;
- source.sz_traits().decrement();
- }
- }
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::bstree::merge_equal
- template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_equal(sgtree_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
- std::size_t max_tree1_size = this->max_tree_size_;
- std::size_t max_tree2_size = source.get_max_tree_size();
- node_algorithms::transfer_equal
- ( this->header_ptr(), this->key_node_comp(this->key_comp()), this->size(), max_tree1_size
- , source.header_ptr(), p, source.size(), max_tree2_size
- , this->get_h_alpha_func(), this->get_alpha_by_max_size_func());
- this->max_tree_size_ = (size_type)max_tree1_size;
- this->sz_traits().increment();
- source.get_max_tree_size() = (size_type)max_tree2_size;
- source.sz_traits().decrement();
- }
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- friend bool operator< (const sgtree_impl &x, const sgtree_impl &y);
-
- friend bool operator==(const sgtree_impl &x, const sgtree_impl &y);
-
- friend bool operator!= (const sgtree_impl &x, const sgtree_impl &y);
-
- friend bool operator>(const sgtree_impl &x, const sgtree_impl &y);
-
- friend bool operator<=(const sgtree_impl &x, const sgtree_impl &y);
-
- friend bool operator>=(const sgtree_impl &x, const sgtree_impl &y);
-
- friend void swap(sgtree_impl &x, sgtree_impl &y);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Returns</b>: The balance factor (alpha) used in this tree
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- float balance_factor() const
- { return this->get_alpha_traits().get_alpha(); }
-
- //! <b>Requires</b>: new_alpha must be a value between 0.5 and 1.0
- //!
- //! <b>Effects</b>: Establishes a new balance factor (alpha) and rebalances
- //! the tree if the new balance factor is stricter (less) than the old factor.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements in the subtree.
- void balance_factor(float new_alpha)
- {
- //The alpha factor CAN't be changed if the fixed, floating operation-less
- //1/sqrt(2) alpha factor option is activated
- BOOST_STATIC_ASSERT((floating_point));
- BOOST_INTRUSIVE_INVARIANT_ASSERT((new_alpha > 0.5f && new_alpha < 1.0f));
- if(new_alpha >= 0.5f && new_alpha < 1.0f){
- float old_alpha = this->get_alpha_traits().get_alpha();
- this->get_alpha_traits().set_alpha(new_alpha);
- if(new_alpha < old_alpha){
- this->max_tree_size_ = this->size();
- this->rebalance();
- }
- }
- }
-
- /// @cond
- private:
- template<class Disposer>
- iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
- {
- for(n = 0; b != e; ++n)
- this->erase_and_dispose(b++, disposer);
- return b.unconst();
- }
-
- iterator private_erase(const_iterator b, const_iterator e, size_type &n)
- {
- for(n = 0; b != e; ++n)
- this->erase(b++);
- return b.unconst();
- }
- /// @endcond
-};
-
-
-//! Helper metafunction to define a \c sgtree 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_sgtree
-{
- /// @cond
- typedef typename pack_options
- < sgtree_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 sgtree_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::floating_point
- , 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 sgtree
- : public make_sgtree<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_sgtree
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sgtree)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::reverse_iterator reverse_iterator;
- typedef typename Base::const_reverse_iterator const_reverse_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- sgtree()
- : Base()
- {}
-
- explicit sgtree(const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- sgtree( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, v_traits)
- {}
-
- sgtree(BOOST_RV_REF(sgtree) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- sgtree& operator=(BOOST_RV_REF(sgtree) x)
- { return static_cast<sgtree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const sgtree &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sgtree) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static sgtree &container_from_end_iterator(iterator end_iterator)
- { return static_cast<sgtree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const sgtree &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const sgtree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static sgtree &container_from_iterator(iterator it)
- { return static_cast<sgtree &>(Base::container_from_iterator(it)); }
-
- static const sgtree &container_from_iterator(const_iterator it)
- { return static_cast<const sgtree &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SGTREE_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
deleted file mode 100644
index 1dc90a80a9a..00000000000
--- a/src/third_party/boost-1.69.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(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.69.0/boost/intrusive/splay_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/splay_set.hpp
deleted file mode 100644
index da7662eeb14..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/splay_set.hpp
+++ /dev/null
@@ -1,1110 +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_SPLAY_SET_HPP
-#define BOOST_INTRUSIVE_SPLAY_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/splaytree.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class splay_multiset_impl;
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! The class template splay_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class splay_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- typedef splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_set_impl)
-
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::splaytree::splaytree()
- splay_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(const key_compare &,const value_traits &)
- explicit splay_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- splay_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(splaytree &&)
- splay_set_impl(BOOST_RV_REF(splay_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::operator=(splaytree &&)
- splay_set_impl& operator=(BOOST_RV_REF(splay_set_impl) x)
- { return static_cast<splay_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::~splaytree()
- ~splay_set_impl();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::splaytree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::splaytree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::splaytree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::splaytree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
- static splay_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
- static const splay_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
- static splay_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
- static const splay_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::splaytree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::splaytree::swap
- void swap(splay_set_impl& other);
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(const splaytree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const splay_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(splaytree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&,const key_type&,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&,const key_type&,bool,bool)const
- std::pair<const_iterator, const_iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::splaytree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::splaytree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
- void splay_up(iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const key_type &key)
- iterator splay_down(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_unique
- template<class ...Options2>
- void merge(splay_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_unique
- template<class ...Options2>
- void merge(splay_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(splay_set_impl<T, Options...> &x, splay_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c splay_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>
-#endif
-struct make_splay_set
-{
- /// @cond
- typedef typename pack_options
- < splaytree_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 splay_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 splay_set
- : public make_splay_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_splay_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- splay_set()
- : Base()
- {}
-
- explicit splay_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- splay_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- splay_set(BOOST_RV_REF(splay_set) x)
- : Base(::boost::move(static_cast<Base&>(x)))
- {}
-
- splay_set& operator=(BOOST_RV_REF(splay_set) x)
- { return static_cast<splay_set &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const splay_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static splay_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<splay_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const splay_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const splay_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static splay_set &container_from_iterator(iterator it)
- { return static_cast<splay_set &>(Base::container_from_iterator(it)); }
-
- static const splay_set &container_from_iterator(const_iterator it)
- { return static_cast<const splay_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template splay_multiset is an intrusive container, that mimics most of
-//! the interface of std::multiset as described in the C++ standard.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class splay_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- typedef splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_multiset_impl)
- typedef tree_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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::splaytree::splaytree()
- splay_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(const key_compare &,const value_traits &)
- explicit splay_multiset_impl(const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- splay_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(splaytree &&)
- splay_multiset_impl(BOOST_RV_REF(splay_multiset_impl) x)
- : tree_type(::boost::move(static_cast<tree_type&>(x)))
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::operator=(splaytree &&)
- splay_multiset_impl& operator=(BOOST_RV_REF(splay_multiset_impl) x)
- { return static_cast<splay_multiset_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::~splaytree()
- ~splay_multiset_impl();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::splaytree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::splaytree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::splaytree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::splaytree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
- static splay_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
- static const splay_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
- static splay_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
- static const splay_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::splaytree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::splaytree::swap
- void swap(splay_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(const splaytree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const splay_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(splaytree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const key_type&)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type&, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::count(const key_type&)
- size_type count(const key_type&);
-
- //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type&)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type&)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type&)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type&)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type&)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type&)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const key_type&)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const key_type&)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&, const key_type&,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&, const key_type&,bool,bool)const
- std::pair<const_iterator, const_iterator> bounded_range
- (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::splaytree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::splaytree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
- void splay_up(iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const key_type &key)
- iterator splay_down(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_equal
- template<class ...Options2>
- void merge(splay_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_equal
- template<class ...Options2>
- void merge(splay_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(splay_multiset_impl<T, Options...> &x, splay_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c splay_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>
-#endif
-struct make_splay_multiset
-{
- /// @cond
- typedef typename pack_options
- < splaytree_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 splay_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 splay_multiset
- : public make_splay_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_splay_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- splay_multiset()
- : Base()
- {}
-
- explicit splay_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- splay_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- splay_multiset(BOOST_RV_REF(splay_multiset) x)
- : Base(::boost::move(static_cast<Base&>(x)))
- {}
-
- splay_multiset& operator=(BOOST_RV_REF(splay_multiset) x)
- { return static_cast<splay_multiset &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const splay_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static splay_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const splay_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static splay_multiset &container_from_iterator(iterator it)
- { return static_cast<splay_multiset &>(Base::container_from_iterator(it)); }
-
- static const splay_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const splay_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SPLAY_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp
deleted file mode 100644
index f6a1a93a9dd..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp
+++ /dev/null
@@ -1,666 +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_SPLAYTREE_HPP
-#define BOOST_INTRUSIVE_SPLAYTREE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-
-#include <boost/static_assert.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/function_detector.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/splaytree_algorithms.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
-#include <boost/move/utility_core.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-struct splaytree_defaults
- : bstree_defaults
-{};
-
-/// @endcond
-
-//! The class template splaytree is an intrusive splay tree container that
-//! is used to construct intrusive splay_set and splay_multiset containers. The no-throw
-//! guarantee holds only, if the key_compare object
-//! doesn't throw.
-//!
-//! 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<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class splaytree_impl
- /// @cond
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, SplayTreeAlgorithms, HeaderHolder>
- /// @endcond
-{
- public:
- typedef ValueTraits value_traits;
- /// @cond
- typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
- , ConstantTimeSize, SplayTreeAlgorithms
- , HeaderHolder> tree_type;
- typedef tree_type implementation_defined;
- /// @endcond
-
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- 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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
- /// @cond
- private:
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splaytree_impl)
-
- /// @endcond
-
- public:
-
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
-
- //! @copydoc ::boost::intrusive::bstree::bstree()
- splaytree_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit splaytree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- splaytree_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {
- if(unique)
- this->insert_unique(b, e);
- else
- this->insert_equal(b, e);
- }
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- splaytree_impl(BOOST_RV_REF(splaytree_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- splaytree_impl& operator=(BOOST_RV_REF(splaytree_impl) x)
- { return static_cast<splaytree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~splaytree_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static splaytree_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const splaytree_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static splaytree_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const splaytree_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(splaytree_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- //! Additional notes: it also copies the alpha factor from the source container.
- template <class Cloner, class Disposer>
- void clone_from(const splaytree_impl &src, Cloner cloner, Disposer disposer);
-
- #else //BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splaytree_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
- iterator insert_equal(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
- iterator insert_equal(const_iterator hint, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
- std::pair<iterator, bool> insert_unique(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
- iterator insert_unique(const_iterator hint, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const key_type &key, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const key_type &key, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_unique_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- //! Additional note: non-const function, splaying is performed.
- size_type count(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- //! Additional note: non-const function, splaying is performed.
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- //! Additional note: const function, no splaying is performed
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- //! Additional note: const function, no splaying is performed
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- //! Additional note: non-const function, splaying is performed.
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- //! Additional note: const function, no splaying is performed
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "key"
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- //! Additional note: const function, no splaying is performed
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "value"
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- //! Additional note: const function, no splaying is performed
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "key"
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- //! Additional note: const function, no splaying is performed
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "value"
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- //! Additional note: const function, no splaying is performed
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "key"
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- //! Additional note: const function, no splaying is performed
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "value"
- std::pair<iterator, iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- //! Additional note: const function, no splaying is performed
- std::pair<const_iterator, const_iterator> equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- //! Additional note: non-const function, splaying is performed for the first
- //! element of the equal range of "key"
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- //! Additional note: const function, no splaying is performed
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
- template<class T, class ...Options2>
- void merge_unique(splaytree<T, Options2...> &);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
- template<class T, class ...Options2>
- void merge_equal(splaytree<T, Options2...> &);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Requires</b>: i must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Rearranges the container so that the element pointed by i
- //! is placed as the root of the tree, improving future searches of this value.
- //!
- //! <b>Complexity</b>: Amortized logarithmic.
- //!
- //! <b>Throws</b>: Nothing.
- void splay_up(iterator i)
- { return node_algorithms::splay_up(i.pointed_node(), tree_type::header_ptr()); }
-
- //! <b>Effects</b>: Rearranges the container so that if *this stores an element
- //! with a key equivalent to value the element is placed as the root of the
- //! tree. If the element is not present returns the last node compared with the key.
- //! If the tree is empty, end() is returned.
- //!
- //! <b>Complexity</b>: Amortized logarithmic.
- //!
- //! <b>Returns</b>: An iterator to the new root of the tree, end() if the tree is empty.
- //!
- //! <b>Throws</b>: If the comparison functor throws.
- template<class KeyType, class KeyTypeKeyCompare>
- iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp)
- {
- detail::key_nodeptr_comp<value_compare, value_traits>
- key_node_comp(comp, &this->get_value_traits());
- node_ptr r = node_algorithms::splay_down(tree_type::header_ptr(), key, key_node_comp);
- return iterator(r, this->priv_value_traits_ptr());
- }
-
- //! <b>Effects</b>: Rearranges the container so that if *this stores an element
- //! with a key equivalent to value the element is placed as the root of the
- //! tree.
- //!
- //! <b>Complexity</b>: Amortized logarithmic.
- //!
- //! <b>Returns</b>: An iterator to the new root of the tree, end() if the tree is empty.
- //!
- //! <b>Throws</b>: If the predicate throws.
- iterator splay_down(const key_type &key)
- { return this->splay_down(key, this->key_comp()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- friend bool operator< (const splaytree_impl &x, const splaytree_impl &y);
-
- friend bool operator==(const splaytree_impl &x, const splaytree_impl &y);
-
- friend bool operator!= (const splaytree_impl &x, const splaytree_impl &y);
-
- friend bool operator>(const splaytree_impl &x, const splaytree_impl &y);
-
- friend bool operator<=(const splaytree_impl &x, const splaytree_impl &y);
-
- friend bool operator>=(const splaytree_impl &x, const splaytree_impl &y);
-
- friend void swap(splaytree_impl &x, splaytree_impl &y);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-//! Helper metafunction to define a \c splaytree 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_splaytree
-{
- /// @cond
- typedef typename pack_options
- < splaytree_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 splaytree_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 splaytree
- : public make_splaytree<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_splaytree
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splaytree)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::reverse_iterator reverse_iterator;
- typedef typename Base::const_reverse_iterator const_reverse_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- splaytree()
- : Base()
- {}
-
- explicit splaytree( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- splaytree( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, v_traits)
- {}
-
- splaytree(BOOST_RV_REF(splaytree) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- splaytree& operator=(BOOST_RV_REF(splaytree) x)
- { return static_cast<splaytree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const splaytree &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splaytree) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static splaytree &container_from_end_iterator(iterator end_iterator)
- { return static_cast<splaytree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const splaytree &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const splaytree &>(Base::container_from_end_iterator(end_iterator)); }
-
- static splaytree &container_from_iterator(iterator it)
- { return static_cast<splaytree &>(Base::container_from_iterator(it)); }
-
- static const splaytree &container_from_iterator(const_iterator it)
- { return static_cast<const splaytree &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SPLAYTREE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/treap.hpp b/src/third_party/boost-1.69.0/boost/intrusive/treap.hpp
deleted file mode 100644
index c6f63ff2deb..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/treap.hpp
+++ /dev/null
@@ -1,1344 +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/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_TREAP_HPP
-#define BOOST_INTRUSIVE_TREAP_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/bs_set_hook.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/treap_algorithms.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/priority_compare.hpp>
-#include <boost/intrusive/detail/node_cloner_disposer.hpp>
-#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
-
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-struct treap_defaults
- : bstree_defaults
-{
- typedef void priority;
-};
-
-/// @endcond
-
-//! The class template treap is an intrusive treap container that
-//! is used to construct intrusive set and multiset containers. The no-throw
-//! guarantee holds only, if the key_compare object and priority_compare object
-//! don't throw.
-//!
-//! 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 compare<> and \c priority_compare<>
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class treap_impl
- /// @cond
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
- //Use public inheritance to avoid MSVC bugs with closures
- , public detail::ebo_functor_holder
- < typename get_prio
- < VoidOrPrioComp
- , typename bstree_impl
- <ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>::key_type>::type
- >
- /// @endcond
-{
- public:
- typedef ValueTraits value_traits;
- /// @cond
- typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
- , ConstantTimeSize, BsTreeAlgorithms
- , HeaderHolder> tree_type;
- typedef tree_type implementation_defined;
- typedef get_prio
- < VoidOrPrioComp
- , typename tree_type::key_type> get_prio_type;
-
- typedef detail::ebo_functor_holder
- <typename get_prio_type::type> prio_base;
-
- /// @endcond
-
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- 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::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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_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 BOOST_INTRUSIVE_IMPDEF(treap_algorithms<node_traits>) node_algorithms;
- typedef BOOST_INTRUSIVE_IMPDEF(typename get_prio_type::type) priority_compare;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
- static const bool stateful_value_traits = implementation_defined::stateful_value_traits;
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
-
- typedef detail::key_nodeptr_comp<priority_compare, value_traits, key_of_value> key_node_prio_comp_t;
-
- template<class KeyPrioComp>
- detail::key_nodeptr_comp<KeyPrioComp, value_traits, key_of_value> key_node_prio_comp(KeyPrioComp keypriocomp) const
- { return detail::key_nodeptr_comp<KeyPrioComp, value_traits, key_of_value>(keypriocomp, &this->get_value_traits()); }
-
- /// @cond
- private:
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_impl)
-
- const priority_compare &priv_pcomp() const
- { return static_cast<const prio_base&>(*this).get(); }
-
- priority_compare &priv_pcomp()
- { return static_cast<prio_base&>(*this).get(); }
-
- /// @endcond
-
- public:
- typedef typename node_algorithms::insert_commit_data insert_commit_data;
-
- //! <b>Effects</b>: Constructs an empty container.
- //!
- //! <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 of the value_compare/priority_compare objects throw. Basic guarantee.
- treap_impl()
- : tree_type(), prio_base(priority_compare())
- {}
-
- //! <b>Effects</b>: Constructs an empty container.
- //!
- //! <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 of the value_compare/priority_compare objects throw. Basic guarantee.
- explicit treap_impl( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits), prio_base(pcmp)
- {}
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
- //! cmp must be a comparison function that induces a strict weak ordering.
- //!
- //! <b>Effects</b>: Constructs an empty container and inserts elements from
- //! [b, e).
- //!
- //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
- //! comp and otherwise N * log N, where N is the distance between first and last.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor/operator() of the key_compare/priority_compare objects
- //! throw. Basic guarantee.
- template<class Iterator>
- treap_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits), prio_base(pcmp)
- {
- if(unique)
- this->insert_unique(b, e);
- else
- this->insert_equal(b, e);
- }
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- treap_impl(BOOST_RV_REF(treap_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- , prio_base(::boost::move(x.priv_pcomp()))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- treap_impl& operator=(BOOST_RV_REF(treap_impl) x)
- { this->swap(x); return *this; }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~treap_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
- #endif
-
- //! <b>Effects</b>: Returns an iterator pointing to the highest priority object of the treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator top()
- { return this->tree_type::root(); }
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator top() const
- { return this->ctop(); }
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator ctop() const
- { return this->tree_type::root(); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- #endif
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the highest priority object of the
- //! reversed treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- reverse_iterator rtop()
- { return reverse_iterator(this->top()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority objec
- //! of the reversed treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator rtop() const
- { return const_reverse_iterator(this->top()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority object
- //! of the reversed treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator crtop() const
- { return const_reverse_iterator(this->top()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static treap_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const treap_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static treap_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const treap_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Returns the priority_compare object used by the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If priority_compare copy-constructor throws.
- priority_compare priority_comp() const
- { return this->priv_pcomp(); }
-
- //! <b>Effects</b>: Swaps the contents of two treaps.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the comparison functor's swap call throws.
- void swap(treap_impl& other)
- {
- //This can throw
- ::boost::adl_move_swap(this->priv_pcomp(), other.priv_pcomp());
- tree_type::swap(other);
- }
-
- //! <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. Copies the predicate from the source container.
- //!
- //! 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 or predicate copy assignment throws. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(const treap_impl &src, Cloner cloner, Disposer disposer)
- {
- tree_type::clone_from(src, cloner, disposer);
- this->priv_pcomp() = src.priv_pcomp();
- }
-
- //! <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. Copies the predicate from the source container.
- //!
- //! 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 or predicate copy assignment throws. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_impl) src, Cloner cloner, Disposer disposer)
- {
- tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer);
- this->priv_pcomp() = ::boost::move(src.priv_pcomp());
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts value into the container before the upper bound.
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- iterator ret
- ( node_algorithms::insert_equal_upper_bound
- ( this->tree_type::header_ptr()
- , to_insert
- , this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()))
- , this->priv_value_traits_ptr());
- this->tree_type::sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: value must be an lvalue, and "hint" must be
- //! a valid iterator.
- //!
- //! <b>Effects</b>: Inserts x into the container, 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 t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(const_iterator hint, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- iterator ret
- (node_algorithms::insert_equal
- ( this->tree_type::header_ptr()
- , hint.pointed_node()
- , to_insert
- , this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()))
- , this->priv_value_traits_ptr());
- this->tree_type::sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Inserts a each element of a range into the container
- //! before the upper bound of the key of each element.
- //!
- //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
- //! size of the range. However, it is linear in N if the range is already sorted
- //! by key_comp().
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong 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)
- {
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_equal(iend, *b);
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts value into the container if the value
- //! is not already present.
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! 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)
- return ret;
- return std::pair<iterator, bool> (this->insert_unique_commit(value, commit_data), true);
- }
-
- //! <b>Requires</b>: value must be an lvalue, and "hint" must be
- //! a valid iterator
- //!
- //! <b>Effects</b>: Tries to insert x into the container, using "hint" as a hint
- //! to where it will be inserted.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time (two comparisons in the worst case)
- //! if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_unique(const_iterator hint, reference value)
- {
- insert_commit_data commit_data;
- std::pair<iterator, bool> ret = this->insert_unique_check(hint, key_of_value()(value), commit_data);
- if(!ret.second)
- return ret.first;
- return this->insert_unique_commit(value, commit_data);
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Tries to insert each element of a range into the container.
- //!
- //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
- //! size of the range. However, it is linear in N if the range is already sorted
- //! by key_comp().
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong 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)
- {
- if(this->empty()){
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_unique(iend, *b);
- }
- else{
- for (; b != e; ++b)
- this->insert_unique(*b);
- }
- }
-
- //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If the comparison or predicate functions 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 order is much cheaper to construct
- //! than the value_type 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 value_type and use
- //! "insert_commit" to insert the object 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_commit" only if no more
- //! objects are inserted or erased from the container.
- std::pair<iterator, bool> insert_unique_check
- ( const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(key, this->key_comp(), this->priv_pcomp(), commit_data); }
-
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself, using "hint"
- //! as a hint to where it will be inserted.
- //!
- //! <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>: Logarithmic in general, but it's amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the comparison or predicate functions 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
- //! constructing that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that key
- //! 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. This can give a total
- //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- std::pair<iterator, bool> insert_unique_check
- ( const_iterator hint, const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(hint, key, this->key_comp(), this->priv_pcomp(), commit_data); }
-
- //! <b>Requires</b>: comp must be a comparison function that induces
- //! the same strict weak ordering as key_compare.
- //! key_value_pcomp must be a comparison function that induces
- //! the same strict weak ordering as priority_compare. The difference is that
- //! key_value_pcomp and comp compare an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If the comp or key_value_pcomp
- //! ordering functions 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 order is much cheaper to construct
- //! than the value_type 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 value_type and use
- //! "insert_commit" to insert the object 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_commit" only if no more
- //! objects are inserted or erased from the container.
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
- , typename detail::disable_if_convertible
- <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
- std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
- insert_unique_check
- ( const KeyType &key, KeyTypeKeyCompare comp
- , KeyValuePrioCompare key_value_pcomp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> const ret =
- (node_algorithms::insert_unique_check
- ( this->tree_type::header_ptr(), key
- , this->key_node_comp(comp), this->key_node_prio_comp(key_value_pcomp), commit_data));
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- //! <b>Requires</b>: comp must be a comparison function that induces
- //! the same strict weak ordering as key_compare.
- //! key_value_pcomp must be a comparison function that induces
- //! the same strict weak ordering as priority_compare. The difference is that
- //! key_value_pcomp and comp compare an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself, using "hint"
- //! as a hint to where it will be inserted.
- //!
- //! <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>: Logarithmic in general, but it's amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the comp or key_value_pcomp
- //! ordering functions 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
- //! constructing that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that key
- //! 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. This can give a total
- //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- std::pair<iterator, bool> insert_unique_check
- ( const_iterator hint, const KeyType &key
- , KeyTypeKeyCompare comp
- , KeyValuePrioCompare key_value_pcomp
- , insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> const ret =
- (node_algorithms::insert_unique_check
- ( this->tree_type::header_ptr(), hint.pointed_node(), key
- , this->key_node_comp(comp), this->key_node_prio_comp(key_value_pcomp), commit_data));
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- //! <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 container between
- //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
- //!
- //! <b>Effects</b>: Inserts the value in the avl_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.
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- node_algorithms::insert_unique_commit(this->tree_type::header_ptr(), to_insert, commit_data);
- this->tree_type::sz_traits().increment();
- return iterator(to_insert, this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be an lvalue, "pos" must be
- //! a valid iterator (or end) and must be the succesor of value
- //! once inserted according to the predicate
- //!
- //! <b>Effects</b>: Inserts x into the container before "pos".
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: This function does not check preconditions so if "pos" is not
- //! the successor of "value" container ordering invariant will be broken.
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- iterator insert_before(const_iterator pos, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- iterator ret
- ( node_algorithms::insert_before
- ( this->tree_type::header_ptr()
- , pos.pointed_node()
- , to_insert
- , this->key_node_prio_comp(this->priv_pcomp())
- )
- , this->priv_value_traits_ptr());
- this->tree_type::sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: value must be an lvalue, and it must be no less
- //! than the greatest inserted key
- //!
- //! <b>Effects</b>: Inserts x into the container in the last position.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: This function does not check preconditions so if value is
- //! less than the greatest inserted key container ordering invariant will be broken.
- //! This function is slightly more efficient than using "insert_before".
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- void push_back(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- node_algorithms::push_back
- (this->tree_type::header_ptr(), to_insert, this->key_node_prio_comp(this->priv_pcomp()));
- this->tree_type::sz_traits().increment();
- }
-
- //! <b>Requires</b>: value must be an lvalue, and it must be no greater
- //! than the minimum inserted key
- //!
- //! <b>Effects</b>: Inserts x into the container in the first position.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: This function does not check preconditions so if value is
- //! greater than the minimum inserted key container ordering invariant will be broken.
- //! This function is slightly more efficient than using "insert_before".
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- void push_front(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- node_algorithms::push_front
- (this->tree_type::header_ptr(), to_insert, this->key_node_prio_comp(this->priv_pcomp()));
- this->tree_type::sz_traits().increment();
- }
-
- //! <b>Effects</b>: Erases the element pointed to by i.
- //!
- //! <b>Complexity</b>: Average complexity for erase element is constant time.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- iterator erase(const_iterator i)
- {
- const_iterator ret(i);
- ++ret;
- node_ptr to_erase(i.pointed_node());
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(to_erase));
- node_algorithms::erase
- (this->tree_type::header_ptr(), to_erase, this->key_node_prio_comp(this->priv_pcomp()));
- this->tree_type::sz_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- return ret.unconst();
- }
-
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //!
- //! <b>Complexity</b>: Average complexity for erase range is at most
- //! O(log(size() + N)), where N is the number of elements in the range.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- iterator erase(const_iterator b, const_iterator e)
- { size_type n; return private_erase(b, e, n); }
-
- //! <b>Effects</b>: Erases all the elements with the given value.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- size_type erase(const key_type &key)
- { return this->erase(key, this->key_comp()); }
-
- //! <b>Effects</b>: Erases all the elements with the given key.
- //! according to the comparison functor "comp".
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws.
- //! Equivalent guarantee to <i>while(beg != end) erase(beg++);</i>
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class KeyType, class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase(const KeyType& key, KeyTypeKeyCompare comp)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- private_erase(p.first, p.second, n);
- return n;
- }
-
- //! <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 complexity for erase element is constant time.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer)
- {
- node_ptr to_erase(i.pointed_node());
- iterator ret(this->erase(i));
- disposer(this->get_value_traits().to_value_ptr(to_erase));
- return ret;
- }
-
- #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>: 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 complexity for erase range is at most
- //! O(log(size() + N)), where N is the number of elements in the range.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- { size_type n; return private_erase(b, e, n, disposer); }
-
- //! <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>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the priority_compare function throws then weak guarantee and heap invariants are broken.
- //! The safest thing would be to clear or destroy the container.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key);
- size_type n;
- private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! <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 "comp".
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the priority_compare function throws then weak guarantee and heap invariants are broken.
- //! The safest thing would be to clear or destroy the container.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! <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()
- { tree_type::clear(); }
-
- //! <b>Effects</b>: Erases all of the elements calling disposer(p) for
- //! each node to be erased.
- //! <b>Complexity</b>: Average complexity for is at most O(log(size() + N)),
- //! where N is the number of elements in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. Calls N times to disposer functor.
- template<class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- node_algorithms::clear_and_dispose(this->tree_type::header_ptr()
- , detail::node_disposer<Disposer, value_traits, TreapAlgorithms>(disposer, &this->get_value_traits()));
- node_algorithms::init_header(this->tree_type::header_ptr());
- this->tree_type::sz_traits().set_size(0);
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_unique(treap_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
-
- if( node_algorithms::transfer_unique
- ( this->header_ptr(), this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p) ){
- this->sz_traits().increment();
- source.sz_traits().decrement();
- }
- }
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
- template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_equal(treap_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
- node_algorithms::transfer_equal
- ( this->header_ptr(), this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p);
- this->sz_traits().increment();
- source.sz_traits().decrement();
- }
- }
-
- //! @copydoc ::boost::intrusive::bstree::check(ExtraChecker)const
- template <class ExtraChecker>
- void check(ExtraChecker extra_checker) const
- {
- typedef detail::key_nodeptr_comp<priority_compare, value_traits, key_of_value> nodeptr_prio_comp_t;
- tree_type::check(detail::treap_node_extra_checker
- <ValueTraits, nodeptr_prio_comp_t, ExtraChecker>
- (this->key_node_prio_comp(this->priv_pcomp()), extra_checker));
- }
-
- //! @copydoc ::boost::intrusive::bstree::check()const
- void check() const
- { check(detail::empty_node_checker<ValueTraits>()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- friend bool operator< (const treap_impl &x, const treap_impl &y);
-
- friend bool operator==(const treap_impl &x, const treap_impl &y);
-
- friend bool operator!= (const treap_impl &x, const treap_impl &y);
-
- friend bool operator>(const treap_impl &x, const treap_impl &y);
-
- friend bool operator<=(const treap_impl &x, const treap_impl &y);
-
- friend bool operator>=(const treap_impl &x, const treap_impl &y);
-
- friend void swap(treap_impl &x, treap_impl &y);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- /// @cond
- private:
- template<class Disposer>
- iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
- {
- for(n = 0; b != e; ++n)
- this->erase_and_dispose(b++, disposer);
- return b.unconst();
- }
-
- iterator private_erase(const_iterator b, const_iterator e, size_type &n)
- {
- for(n = 0; b != e; ++n)
- this->erase(b++);
- return b.unconst();
- }
- /// @endcond
-};
-
-
-//! Helper metafunction to define a \c treap 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_treap
-{
- typedef typename pack_options
- < treap_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 treap_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::priority
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 treap
- : public make_treap<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_treap
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::priority_compare priority_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::reverse_iterator reverse_iterator;
- typedef typename Base::const_reverse_iterator const_reverse_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
- treap()
- : Base()
- {}
-
- explicit treap( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(cmp, pcmp, v_traits)
- {}
-
- template<class Iterator>
- treap( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, pcmp, v_traits)
- {}
-
- treap(BOOST_RV_REF(treap) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- treap& operator=(BOOST_RV_REF(treap) x)
- { return static_cast<treap&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const treap &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static treap &container_from_end_iterator(iterator end_iterator)
- { return static_cast<treap &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const treap &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const treap &>(Base::container_from_end_iterator(end_iterator)); }
-
- static treap &container_from_iterator(iterator it)
- { return static_cast<treap &>(Base::container_from_iterator(it)); }
-
- static const treap &container_from_iterator(const_iterator it)
- { return static_cast<const treap &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //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
deleted file mode 100644
index e9b8b233975..00000000000
--- a/src/third_party/boost-1.69.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(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.69.0/boost/intrusive/treap_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/treap_set.hpp
deleted file mode 100644
index bf162badf0d..00000000000
--- a/src/third_party/boost-1.69.0/boost/intrusive/treap_set.hpp
+++ /dev/null
@@ -1,1106 +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_TREAP_SET_HPP
-#define BOOST_INTRUSIVE_TREAP_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/treap.hpp>
-#include <boost/intrusive/detail/mpl.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 {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class treap_multiset_impl;
-#endif
-
-//! The class template treap_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! 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 compare<> and \c priority_compare<>
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class treap_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- public:
- typedef treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- 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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::priority_compare priority_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::treap::treap()
- treap_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(const key_compare &,const priority_compare &,const value_traits &)
- explicit treap_set_impl( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, pcmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(bool,Iterator,Iterator,const key_compare &,const priority_compare &,const value_traits &)
- template<class Iterator>
- treap_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, pcmp, v_traits)
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_set_impl(BOOST_RV_REF(treap_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x)
- { return static_cast<treap_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::~treap()
- ~treap_set_impl();
-
- //! @copydoc ::boost::intrusive::treap::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::treap::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::treap::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::treap::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::treap::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::treap::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::treap::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::treap::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::treap::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::treap::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::treap::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::treap::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
- static treap_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
- static const treap_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
- static treap_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
- static const treap_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::treap::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::treap::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::treap::swap
- void swap(treap_set_impl& other);
-
- //! @copydoc ::boost::intrusive::treap::clone_from(const treap&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const treap_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif
-
- //! @copydoc ::boost::intrusive::treap::clone_from(treap&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::intrusive::treap::top()
- iterator top();
-
- //! @copydoc ::boost::intrusive::treap::top()const
- const_iterator top() const;
-
- //! @copydoc ::boost::intrusive::treap::ctop()const
- const_iterator ctop() const;
-
- //! @copydoc ::boost::intrusive::treap::rtop()
- reverse_iterator rtop();
-
- //! @copydoc ::boost::intrusive::treap::rtop()const
- const_reverse_iterator rtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop()const
- const_reverse_iterator crtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop() const
- priority_compare priority_comp() const;
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check( const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- ( const_iterator hint, const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const KeyType&,KeyTypeKeyCompare,KeyValuePrioCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- std::pair<iterator, bool> insert_check
- ( const KeyType &key, KeyTypeKeyCompare comp, KeyValuePrioCompare key_value_pcomp
- , insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, key_value_pcomp, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,KeyValuePrioCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- std::pair<iterator, bool> insert_check
- ( const_iterator hint, const KeyType &key
- , KeyTypeKeyCompare comp, KeyValuePrioCompare key_value_pcomp
- , insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, key_value_pcomp, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::treap::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::treap::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::treap::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::treap::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::treap::remove_node
- void remove_node(reference value);
-
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- template<class Compare2>
- void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-
-//! Helper metafunction to define a \c treap_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>
-#endif
-struct make_treap_set
-{
- typedef typename pack_options
- < treap_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 treap_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::priority
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 treap_set
- : public make_treap_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_treap_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::priority_compare priority_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- treap_set()
- : Base()
- {}
-
- explicit treap_set( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(cmp, pcmp, v_traits)
- {}
-
- template<class Iterator>
- treap_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, pcmp, v_traits)
- {}
-
- treap_set(BOOST_RV_REF(treap_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- treap_set& operator=(BOOST_RV_REF(treap_set) x)
- { return static_cast<treap_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const treap_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static treap_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const treap_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const treap_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static treap_set &container_from_iterator(iterator it)
- { return static_cast<treap_set &>(Base::container_from_iterator(it)); }
-
- static const treap_set &container_from_iterator(const_iterator it)
- { return static_cast<const treap_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template treap_multiset is an intrusive container, that mimics most of
-//! the interface of std::treap_multiset as described in the C++ standard.
-//!
-//! 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 compare<> and \c priority_compare<>
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class treap_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- typedef treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- 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::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::priority_compare priority_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- 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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
-
- public:
-
- //! @copydoc ::boost::intrusive::treap::treap()
- treap_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(const key_compare &,const priority_compare &,const value_traits &)
- explicit treap_multiset_impl( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, pcmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(bool,Iterator,Iterator,const key_compare &,const priority_compare &,const value_traits &)
- template<class Iterator>
- treap_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, pcmp, v_traits)
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x)
- { return static_cast<treap_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::~treap()
- ~treap_multiset_impl();
-
- //! @copydoc ::boost::intrusive::treap::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::treap::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::treap::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::treap::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::treap::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::treap::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::treap::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::treap::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::treap::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::treap::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::treap::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::treap::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
- static treap_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
- static const treap_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
- static treap_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
- static const treap_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::treap::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::treap::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::treap::swap
- void swap(treap_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::treap::clone_from(const treap&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const treap_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif
-
- //! @copydoc ::boost::intrusive::treap::clone_from(treap&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::intrusive::treap::top()
- iterator top();
-
- //! @copydoc ::boost::intrusive::treap::top()const
- const_iterator top() const;
-
- //! @copydoc ::boost::intrusive::treap::ctop()const
- const_iterator ctop() const;
-
- //! @copydoc ::boost::intrusive::treap::rtop()
- reverse_iterator rtop();
-
- //! @copydoc ::boost::intrusive::treap::rtop()const
- const_reverse_iterator rtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop()const
- const_reverse_iterator crtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop() const
- priority_compare priority_comp() const;
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::treap::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::treap::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::treap::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::treap::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::treap::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-
-//! Helper metafunction to define a \c treap_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>
-#endif
-struct make_treap_multiset
-{
- typedef typename pack_options
- < treap_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 treap_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::priority
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , 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 treap_multiset
- : public make_treap_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_treap_multiset
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::priority_compare priority_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- treap_multiset()
- : Base()
- {}
-
- explicit treap_multiset( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(cmp, pcmp, v_traits)
- {}
-
- template<class Iterator>
- treap_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, pcmp, v_traits)
- {}
-
- treap_multiset(BOOST_RV_REF(treap_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- treap_multiset& operator=(BOOST_RV_REF(treap_multiset) x)
- { return static_cast<treap_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const treap_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static treap_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const treap_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static treap_multiset &container_from_iterator(iterator it)
- { return static_cast<treap_multiset &>(Base::container_from_iterator(it)); }
-
- static const treap_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const treap_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREAP_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
deleted file mode 100644
index f03940bdfb0..00000000000
--- a/src/third_party/boost-1.69.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(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.69.0/boost/iostreams/detail/config/fpos.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/fpos.hpp
deleted file mode 100644
index b46b168973e..00000000000
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/fpos.hpp
+++ /dev/null
@@ -1,44 +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__) \
- && !(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.69.0/boost/iterator/detail/facade_iterator_category.hpp b/src/third_party/boost-1.69.0/boost/iterator/detail/facade_iterator_category.hpp
deleted file mode 100644
index 67fdf446b0d..00000000000
--- a/src/third_party/boost-1.69.0/boost/iterator/detail/facade_iterator_category.hpp
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright David Abrahams 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)
-#ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
-# define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
-
-# include <boost/iterator/iterator_categories.hpp>
-
-# include <boost/mpl/or.hpp> // used in iterator_tag inheritance logic
-# include <boost/mpl/and.hpp>
-# include <boost/mpl/if.hpp>
-# include <boost/mpl/eval_if.hpp>
-# include <boost/mpl/identity.hpp>
-# include <boost/mpl/assert.hpp>
-
-# include <boost/type_traits/is_same.hpp>
-# include <boost/type_traits/is_const.hpp>
-# include <boost/type_traits/is_reference.hpp>
-# include <boost/type_traits/is_convertible.hpp>
-
-# include <boost/type_traits/is_same.hpp>
-
-# include <boost/iterator/detail/config_def.hpp> // try to keep this last
-
-# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
-# include <boost/detail/indirect_traits.hpp>
-# endif
-
-//
-// iterator_category deduction for iterator_facade
-//
-
-namespace boost {
-namespace iterators {
-
-// forward declaration
-struct use_default;
-
-namespace detail {
-
-struct input_output_iterator_tag
- : std::input_iterator_tag
-{
- // Using inheritance for only input_iterator_tag helps to avoid
- // ambiguities when a stdlib implementation dispatches on a
- // function which is overloaded on both input_iterator_tag and
- // output_iterator_tag, as STLPort does, in its __valid_range
- // function. I claim it's better to avoid the ambiguity in these
- // cases.
- operator std::output_iterator_tag() const
- {
- return std::output_iterator_tag();
- }
-};
-
-//
-// True iff the user has explicitly disabled writability of this
-// iterator. Pass the iterator_facade's Value parameter and its
-// nested ::reference type.
-//
-template <class ValueParam, class Reference>
-struct iterator_writability_disabled
-# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic?
- : mpl::or_<
- is_const<Reference>
- , boost::detail::indirect_traits::is_reference_to_const<Reference>
- , is_const<ValueParam>
- >
-# else
- : is_const<ValueParam>
-# endif
-{};
-
-
-//
-// Convert an iterator_facade's traversal category, Value parameter,
-// and ::reference type to an appropriate old-style category.
-//
-// Due to changeset 21683, this now never results in a category convertible
-// to output_iterator_tag.
-//
-// Change at: https://svn.boost.org/trac/boost/changeset/21683
-template <class Traversal, class ValueParam, class Reference>
-struct iterator_facade_default_category
- : mpl::eval_if<
- mpl::and_<
- is_reference<Reference>
- , is_convertible<Traversal,forward_traversal_tag>
- >
- , mpl::eval_if<
- is_convertible<Traversal,random_access_traversal_tag>
- , mpl::identity<std::random_access_iterator_tag>
- , mpl::if_<
- is_convertible<Traversal,bidirectional_traversal_tag>
- , std::bidirectional_iterator_tag
- , std::forward_iterator_tag
- >
- >
- , typename mpl::eval_if<
- mpl::and_<
- is_convertible<Traversal, single_pass_traversal_tag>
-
- // check for readability
- , is_convertible<Reference, ValueParam>
- >
- , mpl::identity<std::input_iterator_tag>
- , mpl::identity<Traversal>
- >
- >
-{
-};
-
-// True iff T is convertible to an old-style iterator category.
-template <class T>
-struct is_iterator_category
- : mpl::or_<
- is_convertible<T,std::input_iterator_tag>
- , is_convertible<T,std::output_iterator_tag>
- >
-{
-};
-
-template <class T>
-struct is_iterator_traversal
- : is_convertible<T,incrementable_traversal_tag>
-{};
-
-//
-// A composite iterator_category tag convertible to Category (a pure
-// old-style category) and Traversal (a pure traversal tag).
-// Traversal must be a strict increase of the traversal power given by
-// Category.
-//
-template <class Category, class Traversal>
-struct iterator_category_with_traversal
- : Category, Traversal
-{
- // Make sure this isn't used to build any categories where
- // convertibility to Traversal is redundant. Should just use the
- // Category element in that case.
- BOOST_MPL_ASSERT_NOT((
- is_convertible<
- typename iterator_category_to_traversal<Category>::type
- , Traversal
- >));
-
- BOOST_MPL_ASSERT((is_iterator_category<Category>));
- BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
- BOOST_MPL_ASSERT_NOT((is_iterator_traversal<Category>));
-# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
- BOOST_MPL_ASSERT((is_iterator_traversal<Traversal>));
-# endif
-};
-
-// Computes an iterator_category tag whose traversal is Traversal and
-// which is appropriate for an iterator
-template <class Traversal, class ValueParam, class Reference>
-struct facade_iterator_category_impl
-{
- BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
-
- typedef typename iterator_facade_default_category<
- Traversal,ValueParam,Reference
- >::type category;
-
- typedef typename mpl::if_<
- is_same<
- Traversal
- , typename iterator_category_to_traversal<category>::type
- >
- , category
- , iterator_category_with_traversal<category,Traversal>
- >::type type;
-};
-
-//
-// Compute an iterator_category for iterator_facade
-//
-template <class CategoryOrTraversal, class ValueParam, class Reference>
-struct facade_iterator_category
- : mpl::eval_if<
- is_iterator_category<CategoryOrTraversal>
- , mpl::identity<CategoryOrTraversal> // old-style categories are fine as-is
- , facade_iterator_category_impl<CategoryOrTraversal,ValueParam,Reference>
- >
-{
-};
-
-}}} // namespace boost::iterators::detail
-
-# include <boost/iterator/detail/config_undef.hpp>
-
-#endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
diff --git a/src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp
deleted file mode 100644
index f803fc65ed6..00000000000
--- a/src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp
+++ /dev/null
@@ -1,358 +0,0 @@
-// (C) Copyright David Abrahams 2002.
-// (C) Copyright Jeremy Siek 2002.
-// (C) Copyright Thomas Witt 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 BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
-#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
-
-#include <boost/static_assert.hpp>
-
-#include <boost/iterator/iterator_categories.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/iterator/detail/enable_if.hpp>
-
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/or.hpp>
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
-# include <boost/type_traits/remove_reference.hpp>
-#endif
-
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/iterator/detail/config_def.hpp>
-
-#include <boost/iterator/iterator_traits.hpp>
-
-namespace boost {
-namespace iterators {
-
- // Used as a default template argument internally, merely to
- // indicate "use the default", this can also be passed by users
- // explicitly in order to specify that the default should be used.
- struct use_default;
-
-} // namespace iterators
-
-using iterators::use_default;
-
-// the incompleteness of use_default causes massive problems for
-// is_convertible (naturally). This workaround is fortunately not
-// needed for vc6/vc7.
-template<class To>
-struct is_convertible<use_default,To>
- : mpl::false_ {};
-
-namespace iterators {
-
- namespace detail
- {
-
- //
- // Result type used in enable_if_convertible meta function.
- // This can be an incomplete type, as only pointers to
- // enable_if_convertible< ... >::type are used.
- // We could have used void for this, but conversion to
- // void* is just to easy.
- //
- struct enable_type;
- }
-
-
- //
- // enable_if for use in adapted iterators constructors.
- //
- // In order to provide interoperability between adapted constant and
- // mutable iterators, adapted iterators will usually provide templated
- // conversion constructors of the following form
- //
- // template <class BaseIterator>
- // class adapted_iterator :
- // public iterator_adaptor< adapted_iterator<Iterator>, Iterator >
- // {
- // public:
- //
- // ...
- //
- // template <class OtherIterator>
- // adapted_iterator(
- // OtherIterator const& it
- // , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0);
- //
- // ...
- // };
- //
- // enable_if_convertible is used to remove those overloads from the overload
- // set that cannot be instantiated. For all practical purposes only overloads
- // for constant/mutable interaction will remain. This has the advantage that
- // meta functions like boost::is_convertible do not return false positives,
- // as they can only look at the signature of the conversion constructor
- // and not at the actual instantiation.
- //
- // enable_if_interoperable can be safely used in user code. It falls back to
- // always enabled for compilers that don't support enable_if or is_convertible.
- // There is no need for compiler specific workarounds in user code.
- //
- // The operators implementation relies on boost::is_convertible not returning
- // false positives for user/library defined iterator types. See comments
- // on operator implementation for consequences.
- //
-# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
-
- template <class From, class To>
- struct enable_if_convertible
- {
- typedef boost::iterators::detail::enable_type type;
- };
-
-# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292))
-
- // For some reason vc7.1 needs us to "cut off" instantiation
- // of is_convertible in a few cases.
- template<typename From, typename To>
- struct enable_if_convertible
- : iterators::enable_if<
- mpl::or_<
- is_same<From,To>
- , is_convertible<From, To>
- >
- , boost::iterators::detail::enable_type
- >
- {};
-
-# else
-
- template<typename From, typename To>
- struct enable_if_convertible
- : iterators::enable_if<
- is_convertible<From, To>
- , boost::iterators::detail::enable_type
- >
- {};
-
-# endif
-
- //
- // Default template argument handling for iterator_adaptor
- //
- namespace detail
- {
- // If T is use_default, return the result of invoking
- // DefaultNullaryFn, otherwise return T.
- template <class T, class DefaultNullaryFn>
- struct ia_dflt_help
- : mpl::eval_if<
- is_same<T, use_default>
- , DefaultNullaryFn
- , mpl::identity<T>
- >
- {
- };
-
- // A metafunction which computes an iterator_adaptor's base class,
- // a specialization of iterator_facade.
- template <
- class Derived
- , class Base
- , class Value
- , class Traversal
- , class Reference
- , class Difference
- >
- struct iterator_adaptor_base
- {
- typedef iterator_facade<
- Derived
-
-# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
- , typename boost::iterators::detail::ia_dflt_help<
- Value
- , mpl::eval_if<
- is_same<Reference,use_default>
- , iterator_value<Base>
- , remove_reference<Reference>
- >
- >::type
-# else
- , typename boost::iterators::detail::ia_dflt_help<
- Value, iterator_value<Base>
- >::type
-# endif
-
- , typename boost::iterators::detail::ia_dflt_help<
- Traversal
- , iterator_traversal<Base>
- >::type
-
- , typename boost::iterators::detail::ia_dflt_help<
- Reference
- , mpl::eval_if<
- is_same<Value,use_default>
- , iterator_reference<Base>
- , add_reference<Value>
- >
- >::type
-
- , typename boost::iterators::detail::ia_dflt_help<
- Difference, iterator_difference<Base>
- >::type
- >
- type;
- };
-
- // workaround for aC++ CR JAGaf33512
- template <class Tr1, class Tr2>
- inline void iterator_adaptor_assert_traversal ()
- {
- BOOST_STATIC_ASSERT((is_convertible<Tr1, Tr2>::value));
- }
- }
-
- //
- // Iterator Adaptor
- //
- // The parameter ordering changed slightly with respect to former
- // versions of iterator_adaptor The idea is that when the user needs
- // to fiddle with the reference type it is highly likely that the
- // iterator category has to be adjusted as well. Any of the
- // following four template arguments may be ommitted or explicitly
- // replaced by use_default.
- //
- // Value - if supplied, the value_type of the resulting iterator, unless
- // const. If const, a conforming compiler strips constness for the
- // value_type. If not supplied, iterator_traits<Base>::value_type is used
- //
- // Category - the traversal category of the resulting iterator. If not
- // supplied, iterator_traversal<Base>::type is used.
- //
- // Reference - the reference type of the resulting iterator, and in
- // particular, the result type of operator*(). If not supplied but
- // Value is supplied, Value& is used. Otherwise
- // iterator_traits<Base>::reference is used.
- //
- // Difference - the difference_type of the resulting iterator. If not
- // supplied, iterator_traits<Base>::difference_type is used.
- //
- template <
- class Derived
- , class Base
- , class Value = use_default
- , class Traversal = use_default
- , class Reference = use_default
- , class Difference = use_default
- >
- class iterator_adaptor
- : public boost::iterators::detail::iterator_adaptor_base<
- Derived, Base, Value, Traversal, Reference, Difference
- >::type
- {
- friend class iterator_core_access;
-
- protected:
- typedef typename boost::iterators::detail::iterator_adaptor_base<
- Derived, Base, Value, Traversal, Reference, Difference
- >::type super_t;
- public:
- iterator_adaptor() {}
-
- explicit iterator_adaptor(Base const &iter)
- : m_iterator(iter)
- {
- }
-
- typedef Base base_type;
-
- Base const& base() const
- { return m_iterator; }
-
- protected:
- // for convenience in derived classes
- typedef iterator_adaptor<Derived,Base,Value,Traversal,Reference,Difference> iterator_adaptor_;
-
- //
- // lvalue access to the Base object for Derived
- //
- Base const& base_reference() const
- { return m_iterator; }
-
- Base& base_reference()
- { return m_iterator; }
-
- private:
- //
- // Core iterator interface for iterator_facade. This is private
- // to prevent temptation for Derived classes to use it, which
- // will often result in an error. Derived classes should use
- // base_reference(), above, to get direct access to m_iterator.
- //
- typename super_t::reference dereference() const
- { return *m_iterator; }
-
- template <
- class OtherDerived, class OtherIterator, class V, class C, class R, class D
- >
- bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const
- {
- // Maybe readd with same_distance
- // BOOST_STATIC_ASSERT(
- // (detail::same_category_and_difference<Derived,OtherDerived>::value)
- // );
- return m_iterator == x.base();
- }
-
- typedef typename iterator_category_to_traversal<
- typename super_t::iterator_category
- >::type my_traversal;
-
-# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \
- boost::iterators::detail::iterator_adaptor_assert_traversal<my_traversal, cat>();
-
- void advance(typename super_t::difference_type n)
- {
- BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag)
- m_iterator += n;
- }
-
- void increment() { ++m_iterator; }
-
- void decrement()
- {
- BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag)
- --m_iterator;
- }
-
- template <
- class OtherDerived, class OtherIterator, class V, class C, class R, class D
- >
- typename super_t::difference_type distance_to(
- iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const
- {
- BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag)
- // Maybe readd with same_distance
- // BOOST_STATIC_ASSERT(
- // (detail::same_category_and_difference<Derived,OtherDerived>::value)
- // );
- return y.base() - m_iterator;
- }
-
-# undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL
-
- private: // data members
- Base m_iterator;
- };
-
-} // namespace iterators
-
-using iterators::iterator_adaptor;
-using iterators::enable_if_convertible;
-
-} // namespace boost
-
-#include <boost/iterator/detail/config_undef.hpp>
-
-#endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
diff --git a/src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp
deleted file mode 100644
index 225c53a231d..00000000000
--- a/src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp
+++ /dev/null
@@ -1,981 +0,0 @@
-// (C) Copyright David Abrahams 2002.
-// (C) Copyright Jeremy Siek 2002.
-// (C) Copyright Thomas Witt 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 BOOST_ITERATOR_FACADE_23022003THW_HPP
-#define BOOST_ITERATOR_FACADE_23022003THW_HPP
-
-#include <boost/config.hpp>
-#include <boost/iterator/interoperable.hpp>
-#include <boost/iterator/iterator_traits.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-#include <boost/iterator/detail/facade_iterator_category.hpp>
-#include <boost/iterator/detail/enable_if.hpp>
-
-#include <boost/static_assert.hpp>
-#include <boost/utility/addressof.hpp>
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/add_pointer.hpp>
-#include <boost/type_traits/add_lvalue_reference.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_pod.hpp>
-
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/always.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/mpl/identity.hpp>
-
-#include <cstddef>
-
-#include <boost/iterator/detail/config_def.hpp> // this goes last
-
-namespace boost {
-namespace iterators {
-
- // This forward declaration is required for the friend declaration
- // in iterator_core_access
- template <class I, class V, class TC, class R, class D> class iterator_facade;
-
- namespace detail
- {
- // A binary metafunction class that always returns bool. VC6
- // ICEs on mpl::always<bool>, probably because of the default
- // parameters.
- struct always_bool2
- {
- template <class T, class U>
- struct apply
- {
- typedef bool type;
- };
- };
-
- // The type trait checks if the category or traversal is at least as advanced as the specified required traversal
- template< typename CategoryOrTraversal, typename Required >
- struct is_traversal_at_least :
- public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required >
- {};
-
- //
- // enable if for use in operator implementation.
- //
- template <
- class Facade1
- , class Facade2
- , class Return
- >
- struct enable_if_interoperable :
- public boost::iterators::enable_if<
- is_interoperable< Facade1, Facade2 >
- , Return
- >
- {};
-
- //
- // enable if for use in implementation of operators specific for random access traversal.
- //
- template <
- class Facade1
- , class Facade2
- , class Return
- >
- struct enable_if_interoperable_and_random_access_traversal :
- public boost::iterators::enable_if<
- mpl::and_<
- is_interoperable< Facade1, Facade2 >
- , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag >
- , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag >
- >
- , Return
- >
- {};
-
- //
- // Generates associated types for an iterator_facade with the
- // given parameters.
- //
- template <
- class ValueParam
- , class CategoryOrTraversal
- , class Reference
- , class Difference
- >
- struct iterator_facade_types
- {
- typedef typename facade_iterator_category<
- CategoryOrTraversal, ValueParam, Reference
- >::type iterator_category;
-
- typedef typename remove_const<ValueParam>::type value_type;
-
- // Not the real associated pointer type
- typedef typename mpl::eval_if<
- boost::iterators::detail::iterator_writability_disabled<ValueParam,Reference>
- , add_pointer<const value_type>
- , add_pointer<value_type>
- >::type pointer;
-
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \
- || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \
- || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \
- || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310)
-
- // To interoperate with some broken library/compiler
- // combinations, user-defined iterators must be derived from
- // std::iterator. It is possible to implement a standard
- // library for broken compilers without this limitation.
-# define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1
-
- typedef
- iterator<iterator_category, value_type, Difference, pointer, Reference>
- base;
-# endif
- };
-
- // iterators whose dereference operators reference the same value
- // for all iterators into the same sequence (like many input
- // iterators) need help with their postfix ++: the referenced
- // value must be read and stored away before the increment occurs
- // so that *a++ yields the originally referenced element and not
- // the next one.
- template <class Iterator>
- class postfix_increment_proxy
- {
- typedef typename iterator_value<Iterator>::type value_type;
- public:
- explicit postfix_increment_proxy(Iterator const& x)
- : stored_value(*x)
- {}
-
- // Returning a mutable reference allows nonsense like
- // (*r++).mutate(), but it imposes fewer assumptions about the
- // behavior of the value_type. In particular, recall that
- // (*r).mutate() is legal if operator* returns by value.
- value_type&
- operator*() const
- {
- return this->stored_value;
- }
- private:
- mutable value_type stored_value;
- };
-
- //
- // In general, we can't determine that such an iterator isn't
- // writable -- we also need to store a copy of the old iterator so
- // that it can be written into.
- template <class Iterator>
- class writable_postfix_increment_proxy
- {
- typedef typename iterator_value<Iterator>::type value_type;
- public:
- explicit writable_postfix_increment_proxy(Iterator const& x)
- : stored_value(*x)
- , stored_iterator(x)
- {}
-
- // Dereferencing must return a proxy so that both *r++ = o and
- // value_type(*r++) can work. In this case, *r is the same as
- // *r++, and the conversion operator below is used to ensure
- // readability.
- writable_postfix_increment_proxy const&
- operator*() const
- {
- return *this;
- }
-
- // Provides readability of *r++
- operator value_type&() const
- {
- return stored_value;
- }
-
- // Provides writability of *r++
- template <class T>
- T const& operator=(T const& x) const
- {
- *this->stored_iterator = x;
- return x;
- }
-
- // This overload just in case only non-const objects are writable
- template <class T>
- T& operator=(T& x) const
- {
- *this->stored_iterator = x;
- return x;
- }
-
- // Provides X(r++)
- operator Iterator const&() const
- {
- return stored_iterator;
- }
-
- private:
- mutable value_type stored_value;
- Iterator stored_iterator;
- };
-
-# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- template <class Reference, class Value>
- struct is_non_proxy_reference_impl
- {
- static Reference r;
-
- template <class R>
- static typename mpl::if_<
- is_convertible<
- R const volatile*
- , Value const volatile*
- >
- , char[1]
- , char[2]
- >::type& helper(R const&);
-
- BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1);
- };
-
- template <class Reference, class Value>
- struct is_non_proxy_reference
- : mpl::bool_<
- is_non_proxy_reference_impl<Reference, Value>::value
- >
- {};
-# else
- template <class Reference, class Value>
- struct is_non_proxy_reference
- : is_convertible<
- typename remove_reference<Reference>::type
- const volatile*
- , Value const volatile*
- >
- {};
-# endif
-
- // A metafunction to choose the result type of postfix ++
- //
- // Because the C++98 input iterator requirements say that *r++ has
- // type T (value_type), implementations of some standard
- // algorithms like lexicographical_compare may use constructions
- // like:
- //
- // *r++ < *s++
- //
- // If *r++ returns a proxy (as required if r is writable but not
- // multipass), this sort of expression will fail unless the proxy
- // supports the operator<. Since there are any number of such
- // operations, we're not going to try to support them. Therefore,
- // even if r++ returns a proxy, *r++ will only return a proxy if
- // *r also returns a proxy.
- template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
- struct postfix_increment_result
- : mpl::eval_if<
- mpl::and_<
- // A proxy is only needed for readable iterators
- is_convertible<
- Reference
- // Use add_lvalue_reference to form `reference to Value` due to
- // some (strict) C++03 compilers (e.g. `gcc -std=c++03`) reject
- // 'reference-to-reference' in the template which described in CWG
- // DR106.
- // http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_defects.html#106
- , typename add_lvalue_reference<Value const>::type
- >
-
- // No multipass iterator can have values that disappear
- // before positions can be re-visited
- , mpl::not_<
- is_convertible<
- typename iterator_category_to_traversal<CategoryOrTraversal>::type
- , forward_traversal_tag
- >
- >
- >
- , mpl::if_<
- is_non_proxy_reference<Reference,Value>
- , postfix_increment_proxy<Iterator>
- , writable_postfix_increment_proxy<Iterator>
- >
- , mpl::identity<Iterator>
- >
- {};
-
- // operator->() needs special support for input iterators to strictly meet the
- // standard's requirements. If *i is not a reference type, we must still
- // produce an lvalue to which a pointer can be formed. We do that by
- // returning a proxy object containing an instance of the reference object.
- template <class Reference, class Pointer>
- struct operator_arrow_dispatch // proxy references
- {
- struct proxy
- {
- explicit proxy(Reference const & x) : m_ref(x) {}
- Reference* operator->() { return boost::addressof(m_ref); }
- // This function is needed for MWCW and BCC, which won't call
- // operator-> again automatically per 13.3.1.2 para 8
- operator Reference*() { return boost::addressof(m_ref); }
- Reference m_ref;
- };
- typedef proxy result_type;
- static result_type apply(Reference const & x)
- {
- return result_type(x);
- }
- };
-
- template <class T, class Pointer>
- struct operator_arrow_dispatch<T&, Pointer> // "real" references
- {
- typedef Pointer result_type;
- static result_type apply(T& x)
- {
- return boost::addressof(x);
- }
- };
-
- // A proxy return type for operator[], needed to deal with
- // iterators that may invalidate referents upon destruction.
- // Consider the temporary iterator in *(a + n)
- template <class Iterator>
- class operator_brackets_proxy
- {
- // Iterator is actually an iterator_facade, so we do not have to
- // go through iterator_traits to access the traits.
- typedef typename Iterator::reference reference;
- typedef typename Iterator::value_type value_type;
-
- public:
- operator_brackets_proxy(Iterator const& iter)
- : m_iter(iter)
- {}
-
- operator reference() const
- {
- return *m_iter;
- }
-
- operator_brackets_proxy& operator=(value_type const& val)
- {
- *m_iter = val;
- return *this;
- }
-
- private:
- Iterator m_iter;
- };
-
- // A metafunction that determines whether operator[] must return a
- // proxy, or whether it can simply return a copy of the value_type.
- template <class ValueType, class Reference>
- struct use_operator_brackets_proxy
- : mpl::not_<
- mpl::and_<
- // Really we want an is_copy_constructible trait here,
- // but is_POD will have to suffice in the meantime.
- boost::is_POD<ValueType>
- , iterator_writability_disabled<ValueType,Reference>
- >
- >
- {};
-
- template <class Iterator, class Value, class Reference>
- struct operator_brackets_result
- {
- typedef typename mpl::if_<
- use_operator_brackets_proxy<Value,Reference>
- , operator_brackets_proxy<Iterator>
- , Value
- >::type type;
- };
-
- template <class Iterator>
- operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_)
- {
- return operator_brackets_proxy<Iterator>(iter);
- }
-
- template <class Iterator>
- typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_)
- {
- return *iter;
- }
-
- struct choose_difference_type
- {
- template <class I1, class I2>
- struct apply
- :
-# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
- iterator_difference<I1>
-# else
- mpl::eval_if<
- is_convertible<I2,I1>
- , iterator_difference<I1>
- , iterator_difference<I2>
- >
-# endif
- {};
-
- };
-
- template <
- class Derived
- , class Value
- , class CategoryOrTraversal
- , class Reference
- , class Difference
- , bool IsBidirectionalTraversal
- , bool IsRandomAccessTraversal
- >
- class iterator_facade_base;
-
- } // namespace detail
-
-
- // Macros which describe the declarations of binary operators
-# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
-# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
- template < \
- class Derived1, class V1, class TC1, class Reference1, class Difference1 \
- , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
- > \
- prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \
- operator op( \
- iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
- , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
-# else
-# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
- template < \
- class Derived1, class V1, class TC1, class Reference1, class Difference1 \
- , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
- > \
- prefix typename enabler< \
- Derived1, Derived2 \
- , typename mpl::apply2<result_type,Derived1,Derived2>::type \
- >::type \
- operator op( \
- iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
- , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
-# endif
-
-# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
- BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable)
-
-# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \
- BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal)
-
-# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \
- template <class Derived, class V, class TC, class R, class D> \
- prefix typename boost::iterators::enable_if< \
- boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \
- Derived \
- >::type operator+ args
-
- //
- // Helper class for granting access to the iterator core interface.
- //
- // The simple core interface is used by iterator_facade. The core
- // interface of a user/library defined iterator type should not be made public
- // so that it does not clutter the public interface. Instead iterator_core_access
- // should be made friend so that iterator_facade can access the core
- // interface through iterator_core_access.
- //
- class iterator_core_access
- {
-# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
- // Tasteless as this may seem, making all members public allows member templates
- // to work in the absence of member template friends.
- public:
-# else
-
- template <class I, class V, class TC, class R, class D> friend class iterator_facade;
- template <class I, class V, class TC, class R, class D, bool IsBidirectionalTraversal, bool IsRandomAccessTraversal>
- friend class detail::iterator_facade_base;
-
-# define BOOST_ITERATOR_FACADE_RELATION(op) \
- BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2);
-
- BOOST_ITERATOR_FACADE_RELATION(==)
- BOOST_ITERATOR_FACADE_RELATION(!=)
-
-# undef BOOST_ITERATOR_FACADE_RELATION
-
-# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2);
-
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<)
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>)
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=)
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=)
-
-# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
-
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(
- friend, -, boost::iterators::detail::choose_difference_type)
- ;
-
- BOOST_ITERATOR_FACADE_PLUS_HEAD(
- friend inline
- , (iterator_facade<Derived, V, TC, R, D> const&
- , typename Derived::difference_type)
- )
- ;
-
- BOOST_ITERATOR_FACADE_PLUS_HEAD(
- friend inline
- , (typename Derived::difference_type
- , iterator_facade<Derived, V, TC, R, D> const&)
- )
- ;
-
-# endif
-
- template <class Facade>
- static typename Facade::reference dereference(Facade const& f)
- {
- return f.dereference();
- }
-
- template <class Facade>
- static void increment(Facade& f)
- {
- f.increment();
- }
-
- template <class Facade>
- static void decrement(Facade& f)
- {
- f.decrement();
- }
-
- template <class Facade1, class Facade2>
- static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_)
- {
- return f1.equal(f2);
- }
-
- template <class Facade1, class Facade2>
- static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_)
- {
- return f2.equal(f1);
- }
-
- template <class Facade>
- static void advance(Facade& f, typename Facade::difference_type n)
- {
- f.advance(n);
- }
-
- template <class Facade1, class Facade2>
- static typename Facade1::difference_type distance_from(
- Facade1 const& f1, Facade2 const& f2, mpl::true_)
- {
- return -f1.distance_to(f2);
- }
-
- template <class Facade1, class Facade2>
- static typename Facade2::difference_type distance_from(
- Facade1 const& f1, Facade2 const& f2, mpl::false_)
- {
- return f2.distance_to(f1);
- }
-
- //
- // Curiously Recurring Template interface.
- //
- template <class I, class V, class TC, class R, class D>
- static I& derived(iterator_facade<I,V,TC,R,D>& facade)
- {
- return *static_cast<I*>(&facade);
- }
-
- template <class I, class V, class TC, class R, class D>
- static I const& derived(iterator_facade<I,V,TC,R,D> const& facade)
- {
- return *static_cast<I const*>(&facade);
- }
-
- // objects of this class are useless
- BOOST_DELETED_FUNCTION(iterator_core_access())
- };
-
- namespace detail {
-
- // Implementation for forward traversal iterators
- template <
- class Derived
- , class Value
- , class CategoryOrTraversal
- , class Reference
- , class Difference
- >
- class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
-# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
- : public boost::iterators::detail::iterator_facade_types<
- Value, CategoryOrTraversal, Reference, Difference
- >::base
-# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
-# endif
- {
- private:
- typedef boost::iterators::detail::iterator_facade_types<
- Value, CategoryOrTraversal, Reference, Difference
- > associated_types;
-
- typedef boost::iterators::detail::operator_arrow_dispatch<
- Reference
- , typename associated_types::pointer
- > operator_arrow_dispatch_;
-
- public:
- typedef typename associated_types::value_type value_type;
- typedef Reference reference;
- typedef Difference difference_type;
-
- typedef typename operator_arrow_dispatch_::result_type pointer;
-
- typedef typename associated_types::iterator_category iterator_category;
-
- public:
- reference operator*() const
- {
- return iterator_core_access::dereference(this->derived());
- }
-
- pointer operator->() const
- {
- return operator_arrow_dispatch_::apply(*this->derived());
- }
-
- Derived& operator++()
- {
- iterator_core_access::increment(this->derived());
- return this->derived();
- }
-
- protected:
- //
- // Curiously Recurring Template interface.
- //
- Derived& derived()
- {
- return *static_cast<Derived*>(this);
- }
-
- Derived const& derived() const
- {
- return *static_cast<Derived const*>(this);
- }
- };
-
- // Implementation for bidirectional traversal iterators
- template <
- class Derived
- , class Value
- , class CategoryOrTraversal
- , class Reference
- , class Difference
- >
- class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > :
- public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
- {
- public:
- Derived& operator--()
- {
- iterator_core_access::decrement(this->derived());
- return this->derived();
- }
-
- Derived operator--(int)
- {
- Derived tmp(this->derived());
- --*this;
- return tmp;
- }
- };
-
- // Implementation for random access traversal iterators
- template <
- class Derived
- , class Value
- , class CategoryOrTraversal
- , class Reference
- , class Difference
- >
- class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > :
- public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false >
- {
- private:
- typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type;
-
- public:
- typedef typename base_type::reference reference;
- typedef typename base_type::difference_type difference_type;
-
- public:
- typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type
- operator[](difference_type n) const
- {
- typedef boost::iterators::detail::use_operator_brackets_proxy<Value, Reference> use_proxy;
-
- return boost::iterators::detail::make_operator_brackets_result<Derived>(
- this->derived() + n
- , use_proxy()
- );
- }
-
- Derived& operator+=(difference_type n)
- {
- iterator_core_access::advance(this->derived(), n);
- return this->derived();
- }
-
- Derived& operator-=(difference_type n)
- {
- iterator_core_access::advance(this->derived(), -n);
- return this->derived();
- }
-
- Derived operator-(difference_type x) const
- {
- Derived result(this->derived());
- return result -= x;
- }
- };
-
- } // namespace detail
-
- //
- // iterator_facade - use as a public base class for defining new
- // standard-conforming iterators.
- //
- template <
- class Derived // The derived iterator type being constructed
- , class Value
- , class CategoryOrTraversal
- , class Reference = Value&
- , class Difference = std::ptrdiff_t
- >
- class iterator_facade :
- public detail::iterator_facade_base<
- Derived,
- Value,
- CategoryOrTraversal,
- Reference,
- Difference,
- detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value,
- detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value
- >
- {
- protected:
- // For use by derived classes
- typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_;
- };
-
- template <class I, class V, class TC, class R, class D>
- inline typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
- operator++(
- iterator_facade<I,V,TC,R,D>& i
- , int
- )
- {
- typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
- tmp(*static_cast<I*>(&i));
-
- ++i;
-
- return tmp;
- }
-
-
- //
- // Comparison operator implementation. The library supplied operators
- // enables the user to provide fully interoperable constant/mutable
- // iterator types. I.e. the library provides all operators
- // for all mutable/constant iterator combinations.
- //
- // Note though that this kind of interoperability for constant/mutable
- // iterators is not required by the standard for container iterators.
- // All the standard asks for is a conversion mutable -> constant.
- // Most standard library implementations nowadays provide fully interoperable
- // iterator implementations, but there are still heavily used implementations
- // that do not provide them. (Actually it's even worse, they do not provide
- // them for only a few iterators.)
- //
- // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should
- // enable the user to turn off mixed type operators
- //
- // The library takes care to provide only the right operator overloads.
- // I.e.
- //
- // bool operator==(Iterator, Iterator);
- // bool operator==(ConstIterator, Iterator);
- // bool operator==(Iterator, ConstIterator);
- // bool operator==(ConstIterator, ConstIterator);
- //
- // ...
- //
- // In order to do so it uses c++ idioms that are not yet widely supported
- // by current compiler releases. The library is designed to degrade gracefully
- // in the face of compiler deficiencies. In general compiler
- // deficiencies result in less strict error checking and more obscure
- // error messages, functionality is not affected.
- //
- // For full operation compiler support for "Substitution Failure Is Not An Error"
- // (aka. enable_if) and boost::is_convertible is required.
- //
- // The following problems occur if support is lacking.
- //
- // Pseudo code
- //
- // ---------------
- // AdaptorA<Iterator1> a1;
- // AdaptorA<Iterator2> a2;
- //
- // // This will result in a no such overload error in full operation
- // // If enable_if or is_convertible is not supported
- // // The instantiation will fail with an error hopefully indicating that
- // // there is no operator== for Iterator1, Iterator2
- // // The same will happen if no enable_if is used to remove
- // // false overloads from the templated conversion constructor
- // // of AdaptorA.
- //
- // a1 == a2;
- // ----------------
- //
- // AdaptorA<Iterator> a;
- // AdaptorB<Iterator> b;
- //
- // // This will result in a no such overload error in full operation
- // // If enable_if is not supported the static assert used
- // // in the operator implementation will fail.
- // // This will accidently work if is_convertible is not supported.
- //
- // a == b;
- // ----------------
- //
-
-# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
-# define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_()
-# else
-# define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible<a,b>()
-# endif
-
-# define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \
- BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \
- { \
- /* For those compilers that do not support enable_if */ \
- BOOST_STATIC_ASSERT(( \
- is_interoperable< Derived1, Derived2 >::value \
- )); \
- return_prefix iterator_core_access::base_op( \
- *static_cast<Derived1 const*>(&lhs) \
- , *static_cast<Derived2 const*>(&rhs) \
- , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
- ); \
- }
-
-# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \
- BOOST_ITERATOR_FACADE_INTEROP( \
- op \
- , boost::iterators::detail::always_bool2 \
- , return_prefix \
- , base_op \
- )
-
- BOOST_ITERATOR_FACADE_RELATION(==, return, equal)
- BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal)
-
-# undef BOOST_ITERATOR_FACADE_RELATION
-
-
-# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \
- { \
- /* For those compilers that do not support enable_if */ \
- BOOST_STATIC_ASSERT(( \
- is_interoperable< Derived1, Derived2 >::value && \
- boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \
- boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \
- )); \
- return_prefix iterator_core_access::base_op( \
- *static_cast<Derived1 const*>(&lhs) \
- , *static_cast<Derived2 const*>(&rhs) \
- , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
- ); \
- }
-
-# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \
- op \
- , boost::iterators::detail::always_bool2 \
- , return_prefix \
- , base_op \
- )
-
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from)
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from)
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from)
- BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from)
-
-# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
-
- // operator- requires an additional part in the static assertion
- BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(
- -
- , boost::iterators::detail::choose_difference_type
- , return
- , distance_from
- )
-
-# undef BOOST_ITERATOR_FACADE_INTEROP
-# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS
-
-# define BOOST_ITERATOR_FACADE_PLUS(args) \
- BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \
- { \
- Derived tmp(static_cast<Derived const&>(i)); \
- return tmp += n; \
- }
-
- BOOST_ITERATOR_FACADE_PLUS((
- iterator_facade<Derived, V, TC, R, D> const& i
- , typename Derived::difference_type n
- ))
-
- BOOST_ITERATOR_FACADE_PLUS((
- typename Derived::difference_type n
- , iterator_facade<Derived, V, TC, R, D> const& i
- ))
-
-# undef BOOST_ITERATOR_FACADE_PLUS
-# undef BOOST_ITERATOR_FACADE_PLUS_HEAD
-
-# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD
-# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD
-# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL
-
-} // namespace iterators
-
-using iterators::iterator_core_access;
-using iterators::iterator_facade;
-
-} // namespace boost
-
-#include <boost/iterator/detail/config_undef.hpp>
-
-#endif // BOOST_ITERATOR_FACADE_23022003THW_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
deleted file mode 100644
index 48884898de1..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index 1cb51d79dc3..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index a50eab36e1e..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index a4c8ab9ef9d..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index d153e907138..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index 2861a369e8c..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index 379f88293f7..00000000000
--- a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/is_character.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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
deleted file mode 100644
index 883e82c45ca..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index 4c5f3262e91..00000000000
--- a/src/third_party/boost-1.69.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-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
deleted file mode 100644
index c9dee10b6c4..00000000000
--- a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/widest_char.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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
deleted file mode 100644
index 187779d673d..00000000000
--- a/src/third_party/boost-1.69.0/boost/lexical_cast/try_lexical_convert.hpp
+++ /dev/null
@@ -1,232 +0,0 @@
-// 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.69.0/boost/math/constants/constants.hpp b/src/third_party/boost-1.69.0/boost/math/constants/constants.hpp
deleted file mode 100644
index 19edc5b0e79..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/constants/constants.hpp
+++ /dev/null
@@ -1,348 +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.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.69.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
deleted file mode 100644
index c70f42e57a2..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i0.hpp
+++ /dev/null
@@ -1,554 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// Copyright (c) 2017 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_BESSEL_I0_HPP
-#define BOOST_MATH_BESSEL_I0_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/assert.hpp>
-
-// Modified Bessel function of the first kind of order zero
-// we use the approximating forms derived in:
-// "Rational Approximations for the Modified Bessel Function of the First Kind - I0(x) for Computations with Double Precision"
-// by Pavel Holoborodko,
-// see http://www.advanpix.com/2015/11/11/rational-approximations-for-the-modified-bessel-function-of-the-first-kind-i0-computations-double-precision
-// The actual coefficients used are our own, and extend Pavel's work to precision's other than double.
-
-namespace boost { namespace math { namespace detail{
-
-template <typename T>
-T bessel_i0(const T& x);
-
-template <class T, class tag>
-struct bessel_i0_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- static void do_init(const mpl::int_<64>&)
- {
- bessel_i0(T(1));
- bessel_i0(T(8));
- bessel_i0(T(12));
- bessel_i0(T(40));
- bessel_i0(T(101));
- }
- static void do_init(const mpl::int_<113>&)
- {
- bessel_i0(T(1));
- bessel_i0(T(10));
- bessel_i0(T(20));
- bessel_i0(T(40));
- bessel_i0(T(101));
- }
- template <class U>
- static void do_init(const U&) {}
- void force_instantiate()const {}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class tag>
-const typename bessel_i0_initializer<T, tag>::init bessel_i0_initializer<T, tag>::initializer;
-
-template <typename T, int N>
-T bessel_i0_imp(const T&, const mpl::int_<N>&)
-{
- BOOST_ASSERT(0);
- return 0;
-}
-
-template <typename T>
-T bessel_i0_imp(const T& x, const mpl::int_<24>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Max error in interpolated form: 3.929e-08
- // Max Error found at float precision = Poly: 1.991226e-07
- static const float P[] = {
- 1.00000003928615375e+00f,
- 2.49999576572179639e-01f,
- 2.77785268558399407e-02f,
- 1.73560257755821695e-03f,
- 6.96166518788906424e-05f,
- 1.89645733877137904e-06f,
- 4.29455004657565361e-08f,
- 3.90565476357034480e-10f,
- 1.48095934745267240e-11f
- };
- T a = x * x / 4;
- return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
- }
- else if(x < 50)
- {
- // Max error in interpolated form: 5.195e-08
- // Max Error found at float precision = Poly: 8.502534e-08
- static const float P[] = {
- 3.98942651588301770e-01f,
- 4.98327234176892844e-02f,
- 2.91866904423115499e-02f,
- 1.35614940793742178e-02f,
- 1.31409251787866793e-01f
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else
- {
- // Max error in interpolated form: 1.782e-09
- // Max Error found at float precision = Poly: 6.473568e-08
- static const float P[] = {
- 3.98942391532752700e-01f,
- 4.98455950638200020e-02f,
- 2.94835666900682535e-02f
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i0_imp(const T& x, const mpl::int_<53>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Bessel I0 over[10 ^ -16, 7.75]
- // Max error in interpolated form : 3.042e-18
- // Max Error found at double precision = Poly : 5.106609e-16 Cheb : 5.239199e-16
- static const double P[] = {
- 1.00000000000000000e+00,
- 2.49999999999999909e-01,
- 2.77777777777782257e-02,
- 1.73611111111023792e-03,
- 6.94444444453352521e-05,
- 1.92901234513219920e-06,
- 3.93675991102510739e-08,
- 6.15118672704439289e-10,
- 7.59407002058973446e-12,
- 7.59389793369836367e-14,
- 6.27767773636292611e-16,
- 4.34709704153272287e-18,
- 2.63417742690109154e-20,
- 1.13943037744822825e-22,
- 9.07926920085624812e-25
- };
- T a = x * x / 4;
- return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
- }
- else if(x < 500)
- {
- // Max error in interpolated form : 1.685e-16
- // Max Error found at double precision = Poly : 2.575063e-16 Cheb : 2.247615e+00
- static const double P[] = {
- 3.98942280401425088e-01,
- 4.98677850604961985e-02,
- 2.80506233928312623e-02,
- 2.92211225166047873e-02,
- 4.44207299493659561e-02,
- 1.30970574605856719e-01,
- -3.35052280231727022e+00,
- 2.33025711583514727e+02,
- -1.13366350697172355e+04,
- 4.24057674317867331e+05,
- -1.23157028595698731e+07,
- 2.80231938155267516e+08,
- -5.01883999713777929e+09,
- 7.08029243015109113e+10,
- -7.84261082124811106e+11,
- 6.76825737854096565e+12,
- -4.49034849696138065e+13,
- 2.24155239966958995e+14,
- -8.13426467865659318e+14,
- 2.02391097391687777e+15,
- -3.08675715295370878e+15,
- 2.17587543863819074e+15
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else
- {
- // Max error in interpolated form : 2.437e-18
- // Max Error found at double precision = Poly : 1.216719e-16
- static const double P[] = {
- 3.98942280401432905e-01,
- 4.98677850491434560e-02,
- 2.80506308916506102e-02,
- 2.92179096853915176e-02,
- 4.53371208762579442e-02
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i0_imp(const T& x, const mpl::int_<64>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Bessel I0 over[10 ^ -16, 7.75]
- // Max error in interpolated form : 3.899e-20
- // Max Error found at float80 precision = Poly : 1.770840e-19
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.99999999999999999961011629e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.50000000000000001321873912e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.77777777777777703400424216e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.73611111111112764793802701e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.94444444444251461247253525e-05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.92901234569262206386118739e-06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.93675988851131457141005209e-08),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.15118734688297476454205352e-10),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.59405797058091016449222685e-12),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.59406599631719800679835140e-14),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.27598961062070013516660425e-16),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.35920318970387940278362992e-18),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.57372492687715452949437981e-20),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.33908663475949906992942204e-22),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.15976668870980234582896010e-25),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.46240478946376069211156548e-27)
- };
- T a = x * x / 4;
- return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
- }
- else if(x < 10)
- {
- // Maximum Deviation Found: 6.906e-21
- // Expected Error Term : -6.903e-21
- // Maximum Relative Change in Control Points : 1.631e-04
- // Max Error found at float80 precision = Poly : 7.811948e-21
- static const T Y = 4.051098823547363281250e-01f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -6.158081780620616479492e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.883635969834048766148e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.892782002476195771920e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.478784996478070170327e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.988611837308006851257e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.140133766747436806179e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.117316447921276453271e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.942353667455141676001e+04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.493482682461387081534e+05),
- BOOST_MATH_BIG_CONSTANT(T, 64, -5.228100538921466124653e+05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.195279248600467989454e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.601530760654337045917e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.504921137873298402679e+05)
- };
- return exp(x) * (boost::math::tools::evaluate_polynomial(P, T(1 / x)) + Y) / sqrt(x);
- }
- else if(x < 15)
- {
- // Maximum Deviation Found: 4.083e-21
- // Expected Error Term : -4.025e-21
- // Maximum Relative Change in Control Points : 1.304e-03
- // Max Error found at float80 precision = Poly : 2.303527e-20
- static const T Y = 4.033188819885253906250e-01f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.376373876116109401062e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.982899138682911273321e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.109477529533515397644e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.163760580110576407673e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.776501832837367371883e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.101478069227776656318e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.892071912448960299773e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.417739279982328117483e+04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.296963447724067390552e+05),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.598589306710589358747e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.903662411851774878322e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.622677059040339516093e+07),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.227776578828667629347e+07),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.727797957441040896878e+07)
- };
- return exp(x) * (boost::math::tools::evaluate_polynomial(P, T(1 / x)) + Y) / sqrt(x);
- }
- else if(x < 50)
- {
- // Max error in interpolated form: 1.035e-21
- // Max Error found at float80 precision = Poly: 1.885872e-21
- static const T Y = 4.011702537536621093750e-01f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.227973351806078464328e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.986778486088017419036e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.805066823812285310011e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.921443721160964964623e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.517504941996594744052e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.316922639868793684401e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.535891099168810015433e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.706078229522448308087e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.351015763079160914632e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.948809013999277355098e+04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.967598958582595361757e+05),
- BOOST_MATH_BIG_CONSTANT(T, 64, -6.346924657995383019558e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.998794574259956613472e+07),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.016371355801690142095e+08),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.768791455631826490838e+09),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.441995678177349895640e+09),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.482292669974971387738e+09)
- };
- return exp(x) * (boost::math::tools::evaluate_polynomial(P, T(1 / x)) + Y) / sqrt(x);
- }
- else
- {
- // Bessel I0 over[50, INF]
- // Max error in interpolated form : 5.587e-20
- // Max Error found at float80 precision = Poly : 8.776852e-20
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942280401432677955074061e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.98677850501789875615574058e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.80506290908675604202206833e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.92194052159035901631494784e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.47422430732256364094681137e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.05971614435738691235525172e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.29180522595459823234266708e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.15122547776140254569073131e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.48491812136365376477357324e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.45569740166506688169730713e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.66857566379480730407063170e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.71924083955641197750323901e+05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.74276685704579268845870586e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, -8.89753803265734681907148778e+07),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.82590905134996782086242180e+08),
- BOOST_MATH_BIG_CONSTANT(T, 64, -7.30623197145529889358596301e+09),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.27310000726207055200805893e+10),
- BOOST_MATH_BIG_CONSTANT(T, 64, -6.64365417189215599168817064e+10)
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i0_imp(const T& x, const mpl::int_<113>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Bessel I0 over[10 ^ -34, 7.75]
- // Max error in interpolated form : 1.274e-34
- // Max Error found at float128 precision = Poly : 3.096091e-34
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000001273856e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.4999999999999999999999999999999107477496e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.7777777777777777777777777777881795230918e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.7361111111111111111111111106290091648808e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.9444444444444444444444445629960334523101e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.9290123456790123456790105563456483249753e-06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.9367598891408415217940836339080514004844e-08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.1511873267825648777900014857992724731476e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281266233066162999610732449709209e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281266232783124723601470051895304e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.2760813455591936763439337059117957836078e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.3583898233049738471136482147779094353096e-18),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.5789288895299965395422423848480340736308e-20),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.3157800456718804437960453545507623434606e-22),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.8479113149412360748032684260932041506493e-25),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.2843403488398038539283241944594140493394e-27),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.9042925594356556196790242908697582021825e-30),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.4395919891312152120710245152115597111101e-32),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.7580986145276689333214547502373003196707e-35),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.6886514018062348877723837017198859723889e-37),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.8540558465757554512570197585002702777999e-40),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.4684706070226893763741850944911705726436e-43),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.0210715309399646335858150349406935414314e-45)
- };
- T a = x * x / 4;
- return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
- }
- else if(x < 15)
- {
- // Bessel I0 over[7.75, 15]
- // Max error in interpolated form : 7.534e-35
- // Max Error found at float128 precision = Poly : 6.123912e-34
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.9999999999999999992388573069504617493518e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.5000000000000000007304739268173096975340e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.7777777777777777744261405400543564492074e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.7361111111111111209006987259719750726867e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.9444444444444442399703186871329381908321e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.9290123456790126709286741580242189785431e-06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.9367598891408374246503061422528266924389e-08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.1511873267826068395343047827801353170966e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281262673459688011737168286944521e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281291583769928563167645746144508e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.2760813455438840231126529638737436950274e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.3583898233839583885132809584770578894948e-18),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.5789288891798658971960571838369339742994e-20),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.3157800470129311623308216856009970266088e-22),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.8479112701534604520063520412207286692581e-25),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.2843404822552330714586265081801727491890e-27),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.9042888166225242675881424439818162458179e-30),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.4396027771820721384198604723320045236973e-32),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.7577659910606076328136207973456511895030e-35),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.6896548123724136624716224328803899914646e-37),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.8285850162160539150210466453921758781984e-40),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.9419071894227736216423562425429524883562e-43),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.4720374049498608905571855665134539425038e-45),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.7763533278527958112907118930154738930378e-48),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.1213839473168678646697528580511702663617e-51),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0648035313124146852372607519737686740964e-53),
- -BOOST_MATH_BIG_CONSTANT(T, 113, 5.1255595184052024349371058585102280860878e-57),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.4652470895944157957727948355523715335882e-59)
- };
- T a = x * x / 4;
- return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
- }
- else if(x < 30)
- {
- // Max error in interpolated form : 1.808e-34
- // Max Error found at float128 precision = Poly : 2.399403e-34
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040870793650581242239624530714032e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.9867780576714783790784348982178607842250e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.8051948347934462928487999569249907599510e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.8971143420388958551176254291160976367263e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.8197359701715582763961322341827341098897e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.3430484862908317377522273217643346601271e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.7884507603213662610604413960838990199224e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.8304926482356755790062999202373909300514e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.8867173178574875515293357145875120137676e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.4261178812193528551544261731796888257644e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.6453010340778116475788083817762403540097e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.0432401330113978669454035365747869477960e+10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.2462165331309799059332310595587606836357e+12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.3299800389951335932792950236410844978273e+13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.5748218240248714177527965706790413406639e+14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.8330014378766930869945511450377736037385e+15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.8494610073827453236940544799030787866218e+17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.7244661371420647691301043350229977856476e+18),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.2386378807889388140099109087465781254321e+20),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.1104000573102013529518477353943384110982e+21),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.9426541092239879262282594572224300191016e+22),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.4061439136301913488512592402635688101020e+23),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.2836554760521986358980180942859101564671e+24),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.6270285589905206294944214795661236766988e+25),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.7278631455211972017740134341610659484259e+26),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.1971734473772196124736986948034978906801e+26),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.8669270707172568763908838463689093500098e+27),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.2368879358870281916900125550129211146626e+28),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.8296235063297831758204519071113999839858e+28),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.1253861666023020670144616019148954773662e+28),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.8809536950051955163648980306847791014734e+28) };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else if(x < 100)
- {
- // Bessel I0 over[30, 100]
- // Max error in interpolated form : 1.487e-34
- // Max Error found at float128 precision = Poly : 1.929924e-34
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040143267793996798658172135362278e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.9867785050179084714910130342157246539820e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.8050629090725751585266360464766768437048e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.9219405302833158254515212437025679637597e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.4742214371598631578107310396249912330627e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.0602983776478659136184969363625092585520e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.2839507231977478205885469900971893734770e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.8925739165733823730525449511456529001868e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.4238082222874015159424842335385854632223e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.6759648427182491050716309699208988458050e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.7292246491169360014875196108746167872215e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.1001411442786230340015781205680362993575e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.8277628835804873490331739499978938078848e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.1208326312801432038715638596517882759639e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.4813611580683862051838126076298945680803e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.1278197693321821164135890132925119054391e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.3190303792682886967459489059860595063574e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.1580767338646580750893606158043485767644e+10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.0256008808415702780816006134784995506549e+11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.9044186472918017896554580836514681614475e+13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.2521078890073151875661384381880225635135e+14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.3620352486836976842181057590770636605454e+15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.0375525734060401555856465179734887312420e+16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.6392664899881014534361728644608549445131e+16)
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else
- {
- // Bessel I0 over[100, INF]
- // Max error in interpolated form : 5.459e-35
- // Max Error found at float128 precision = Poly : 1.472240e-34
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040143267793994605993438166526772e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.9867785050179084742493257495245185241487e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.8050629090725735167652437695397756897920e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.9219405302839307466358297347675795965363e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.4742214369972689474366968442268908028204e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.0602984099194778006610058410222616383078e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.2839502241666629677015839125593079416327e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.8926354981801627920292655818232972385750e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.4231921590621824187100989532173995000655e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.7264260959693775207585700654645245723497e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.3890136225398811195878046856373030127018e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.1999720924619285464910452647408431234369e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.2076909538525038580501368530598517194748e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.5684635141332367730007149159063086133399e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.5178192543258299267923025833141286569141e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.2966297919851965784482163987240461837728e+05) };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i0_imp(const T& x, const mpl::int_<0>&)
-{
- if(boost::math::tools::digits<T>() <= 24)
- return bessel_i0_imp(x, mpl::int_<24>());
- else if(boost::math::tools::digits<T>() <= 53)
- return bessel_i0_imp(x, mpl::int_<53>());
- else if(boost::math::tools::digits<T>() <= 64)
- return bessel_i0_imp(x, mpl::int_<64>());
- else if(boost::math::tools::digits<T>() <= 113)
- return bessel_i0_imp(x, mpl::int_<113>());
- BOOST_ASSERT(0);
- return 0;
-}
-
-template <typename T>
-inline T bessel_i0(const T& x)
-{
- typedef mpl::int_<
- ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
- 0 :
- std::numeric_limits<T>::digits <= 24 ?
- 24 :
- std::numeric_limits<T>::digits <= 53 ?
- 53 :
- std::numeric_limits<T>::digits <= 64 ?
- 64 :
- std::numeric_limits<T>::digits <= 113 ?
- 113 : -1
- > tag_type;
-
- bessel_i0_initializer<T, tag_type>::force_instantiate();
- return bessel_i0_imp(x, tag_type());
-}
-
-}}} // namespaces
-
-#endif // BOOST_MATH_BESSEL_I0_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 3c288d72e51..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i1.hpp
+++ /dev/null
@@ -1,582 +0,0 @@
-// Copyright (c) 2017 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)
-
-// Modified Bessel function of the first kind of order zero
-// we use the approximating forms derived in:
-// "Rational Approximations for the Modified Bessel Function of the First Kind - I1(x) for Computations with Double Precision"
-// by Pavel Holoborodko,
-// see http://www.advanpix.com/2015/11/12/rational-approximations-for-the-modified-bessel-function-of-the-first-kind-i1-for-computations-with-double-precision/
-// The actual coefficients used are our own, and extend Pavel's work to precision's other than double.
-
-#ifndef BOOST_MATH_BESSEL_I1_HPP
-#define BOOST_MATH_BESSEL_I1_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/assert.hpp>
-
-// Modified Bessel function of the first kind of order one
-// minimax rational approximations on intervals, see
-// Blair and Edwards, Chalk River Report AECL-4928, 1974
-
-namespace boost { namespace math { namespace detail{
-
-template <typename T>
-T bessel_i1(const T& x);
-
-template <class T, class tag>
-struct bessel_i1_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- static void do_init(const mpl::int_<64>&)
- {
- bessel_i1(T(1));
- bessel_i1(T(15));
- bessel_i1(T(80));
- bessel_i1(T(101));
- }
- static void do_init(const mpl::int_<113>&)
- {
- bessel_i1(T(1));
- bessel_i1(T(10));
- bessel_i1(T(14));
- bessel_i1(T(19));
- bessel_i1(T(34));
- bessel_i1(T(99));
- bessel_i1(T(101));
- }
- template <class U>
- static void do_init(const U&) {}
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class tag>
-const typename bessel_i1_initializer<T, tag>::init bessel_i1_initializer<T, tag>::initializer;
-
-template <typename T, int N>
-T bessel_i1_imp(const T&, const mpl::int_<N>&)
-{
- BOOST_ASSERT(0);
- return 0;
-}
-
-template <typename T>
-T bessel_i1_imp(const T& x, const mpl::int_<24>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- //Max error in interpolated form : 1.348e-08
- // Max Error found at float precision = Poly : 1.469121e-07
- static const float P[] = {
- 8.333333221e-02f,
- 6.944453712e-03f,
- 3.472097211e-04f,
- 1.158047174e-05f,
- 2.739745142e-07f,
- 5.135884609e-09f,
- 5.262251502e-11f,
- 1.331933703e-12f
- };
- T a = x * x / 4;
- T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
- return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
- }
- else
- {
- // Max error in interpolated form: 9.000e-08
- // Max Error found at float precision = Poly: 1.044345e-07
-
- static const float P[] = {
- 3.98942115977513013e-01f,
- -1.49581264836620262e-01f,
- -4.76475741878486795e-02f,
- -2.65157315524784407e-02f,
- -1.47148600683672014e-01f
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i1_imp(const T& x, const mpl::int_<53>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Bessel I0 over[10 ^ -16, 7.75]
- // Max error in interpolated form: 5.639e-17
- // Max Error found at double precision = Poly: 1.795559e-16
-
- static const double P[] = {
- 8.333333333333333803e-02,
- 6.944444444444341983e-03,
- 3.472222222225921045e-04,
- 1.157407407354987232e-05,
- 2.755731926254790268e-07,
- 4.920949692800671435e-09,
- 6.834657311305621830e-11,
- 7.593969849687574339e-13,
- 6.904822652741917551e-15,
- 5.220157095351373194e-17,
- 3.410720494727771276e-19,
- 1.625212890947171108e-21,
- 1.332898928162290861e-23
- };
- T a = x * x / 4;
- T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
- return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
- }
- else if(x < 500)
- {
- // Max error in interpolated form: 1.796e-16
- // Max Error found at double precision = Poly: 2.898731e-16
-
- static const double P[] = {
- 3.989422804014406054e-01,
- -1.496033551613111533e-01,
- -4.675104253598537322e-02,
- -4.090895951581637791e-02,
- -5.719036414430205390e-02,
- -1.528189554374492735e-01,
- 3.458284470977172076e+00,
- -2.426181371595021021e+02,
- 1.178785865993440669e+04,
- -4.404655582443487334e+05,
- 1.277677779341446497e+07,
- -2.903390398236656519e+08,
- 5.192386898222206474e+09,
- -7.313784438967834057e+10,
- 8.087824484994859552e+11,
- -6.967602516005787001e+12,
- 4.614040809616582764e+13,
- -2.298849639457172489e+14,
- 8.325554073334618015e+14,
- -2.067285045778906105e+15,
- 3.146401654361325073e+15,
- -2.213318202179221945e+15
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else
- {
- // Max error in interpolated form: 1.320e-19
- // Max Error found at double precision = Poly: 7.065357e-17
- static const double P[] = {
- 3.989422804014314820e-01,
- -1.496033551467584157e-01,
- -4.675105322571775911e-02,
- -4.090421597376992892e-02,
- -5.843630344778927582e-02
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i1_imp(const T& x, const mpl::int_<64>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Bessel I0 over[10 ^ -16, 7.75]
- // Max error in interpolated form: 8.086e-21
- // Max Error found at float80 precision = Poly: 7.225090e-20
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.33333333333333333340071817e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.94444444444444442462728070e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.47222222222222318886683883e-04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.15740740740738880709555060e-05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.75573192240046222242685145e-07),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.92094986131253986838697503e-09),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.83465258979924922633502182e-11),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.59405830675154933645967137e-13),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.90369179710633344508897178e-15),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.23003610041709452814262671e-17),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.35291901027762552549170038e-19),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.83991379419781823063672109e-21),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.87732714140192556332037815e-24),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.32120654663773147206454247e-26),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.95294659305369207813486871e-28)
- };
- T a = x * x / 4;
- T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
- return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
- }
- else if(x < 20)
- {
- // Max error in interpolated form: 4.258e-20
- // Max Error found at float80 precision = Poly: 2.851105e-19
- // Maximum Deviation Found : 3.887e-20
- // Expected Error Term : 3.887e-20
- // Maximum Relative Change in Control Points : 1.681e-04
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942260530218897338680e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.49599542849073670179540e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.70492865454119188276875e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.12389893307392002405869e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.49696126385202602071197e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.84206507612717711565967e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.14748094784412558689584e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -7.70652726663596993005669e+04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.01659736164815617174439e+06),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.04740659606466305607544e+07),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.38383394696382837263656e+08),
- BOOST_MATH_BIG_CONSTANT(T, 64, -8.00779638649147623107378e+09),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.02338237858684714480491e+10),
- BOOST_MATH_BIG_CONSTANT(T, 64, -6.41198553664947312995879e+11),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.05915186909564986897554e+12),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.00907636964168581116181e+13),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.60855263982359981275199e+13),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.12901817219239205393806e+14),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.14861794397709807823575e+14),
- BOOST_MATH_BIG_CONSTANT(T, 64, -5.02808138522587680348583e+14),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.85505477056514919387171e+14)
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else if(x < 100)
- {
- // Bessel I0 over [15, 50]
- // Maximum Deviation Found: 2.444e-20
- // Expected Error Term : 2.438e-20
- // Maximum Relative Change in Control Points : 2.101e-03
- // Max Error found at float80 precision = Poly : 6.029974e-20
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942280401431675205845e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.49603355149968887210170e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.67510486284376330257260e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.09071458907089270559464e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -5.75278280327696940044714e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.10591299500956620739254e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.77061766699949309115618e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -5.42683771801837596371638e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -9.17021412070404158464316e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.04154379346763380543310e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.43462345357478348323006e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.98109660274422449523837e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.74438822767781410362757e+04)
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else
- {
- // Bessel I0 over[100, INF]
- // Max error in interpolated form: 2.456e-20
- // Max Error found at float80 precision = Poly: 5.446356e-20
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942280401432677958445e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.49603355150537411254359e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.67510484842456251368526e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.09071676503922479645155e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -5.75256179814881566010606e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.10754910257965227825040e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.67858639515616079840294e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -9.17266479586791298924367e-01)
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i1_imp(const T& x, const mpl::int_<113>&)
-{
- BOOST_MATH_STD_USING
- if(x < 7.75)
- {
- // Bessel I0 over[10 ^ -34, 7.75]
- // Max error in interpolated form: 1.835e-35
- // Max Error found at float128 precision = Poly: 1.645036e-34
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.3333333333333333333333333333333331804098e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.9444444444444444444444444444445418303082e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.4722222222222222222222222222119082346591e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.1574074074074074074074074078415867655987e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.7557319223985890652557318255143448192453e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.9209498614260519022423916850415000626427e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.8346525853139609753354247043900442393686e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281266233060080535940234144302217e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.9036894801151120925605467963949641957095e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.2300677879659941472662086395055636394839e-17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.3526075563884539394691458717439115962233e-19),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.8420920639497841692288943167036233338434e-21),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.7718669711748690065381181691546032291365e-24),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.6549445715236427401845636880769861424730e-26),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.3437296196812697924703896979250126739676e-28),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.3912734588619073883015937023564978854893e-31),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.2839967682792395867255384448052781306897e-33),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.3790094235693528861015312806394354114982e-36),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.0423861671932104308662362292359563970482e-39),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.7493858979396446292135661268130281652945e-41),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.2786079392547776769387921361408303035537e-44),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.2335693685833531118863552173880047183822e-47)
- };
- T a = x * x / 4;
- T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
- return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
- }
- else if(x < 11)
- {
- // Max error in interpolated form: 8.574e-36
- // Maximum Deviation Found : 4.689e-36
- // Expected Error Term : 3.760e-36
- // Maximum Relative Change in Control Points : 5.204e-03
- // Max Error found at float128 precision = Poly : 2.882561e-34
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.333333333333333326889717360850080939e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.944444444444444511272790848815114507e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.472222222222221892451965054394153443e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.157407407407408437378868534321538798e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.755731922398566216824909767320161880e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.920949861426434829568192525456800388e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.834652585308926245465686943255486934e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.594058428179852047689599244015979196e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.903689479655006062822949671528763738e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.230067791254403974475987777406992984e-17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.352607536815161679702105115200693346e-19),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.842092161364672561828681848278567885e-21),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.771862912600611801856514076709932773e-24),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.654958704184380914803366733193713605e-26),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.343688672071130980471207297730607625e-28),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.392252844664709532905868749753463950e-31),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.282086786672692641959912811902298600e-33),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.408812012322547015191398229942864809e-36),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.681220437734066258673404589233009892e-39),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.072417451640733785626701738789290055e-41),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.352218520142636864158849446833681038e-44),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.407918492276267527897751358794783640e-46)
- };
- T a = x * x / 4;
- T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
- return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
- }
- else if(x < 15)
- {
- //Max error in interpolated form: 7.599e-36
- // Maximum Deviation Found : 1.766e-35
- // Expected Error Term : 1.021e-35
- // Maximum Relative Change in Control Points : 6.228e-03
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.333333333333255774414858563409941233e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.944444444444897867884955912228700291e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.472222222220954970397343617150959467e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.157407407409660682751155024932538578e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.755731922369973706427272809014190998e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.920949861702265600960449699129258153e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.834652583208361401197752793379677147e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.594058441128280500819776168239988143e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.903689413939268702265479276217647209e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.230068069012898202890718644753625569e-17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.352606552027491657204243201021677257e-19),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.842095100698532984651921750204843362e-21),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.771789051329870174925649852681844169e-24),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.655114381199979536997025497438385062e-26),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.343415732516712339472538688374589373e-28),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.396177019032432392793591204647901390e-31),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.277563309255167951005939802771456315e-33),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.449201419305514579791370198046544736e-36),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.415430703400740634202379012388035255e-39),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.195458831864936225409005027914934499e-41),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.829726762743879793396637797534668039e-45),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.698302711685624490806751012380215488e-46),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.062520475425422618494185821587228317e-49),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.732372906742845717148185173723304360e-52)
- };
- T a = x * x / 4;
- T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
- return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
- }
- else if(x < 20)
- {
- // Max error in interpolated form: 8.864e-36
- // Max Error found at float128 precision = Poly: 8.522841e-35
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.989422793693152031514179994954750043e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.496029423752889591425633234009799670e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.682975926820553021482820043377990241e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.138871171577224532369979905856458929e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.765350219426341341990447005798111212e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.321389275507714530941178258122955540e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.727748393898888756515271847678850411e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.123040820686242586086564998713862335e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.784112378374753535335272752884808068e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.054920416060932189433079126269416563e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.450129415468060676827180524327749553e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.758831882046487398739784498047935515e+10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.736936520262204842199620784338052937e+11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.051128683324042629513978256179115439e+13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.188008285959794869092624343537262342e+14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.108530004906954627420484180793165669e+15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.441516828490144766650287123765318484e+15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.158251664797753450664499268756393535e+16),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.467314522709016832128790443932896401e+17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.896222045367960462945885220710294075e+17),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.273382139594876997203657902425653079e+18),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.669871448568623680543943144842394531e+18),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.813923031370708069940575240509912588e+18)
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else if(x < 35)
- {
- // Max error in interpolated form: 6.028e-35
- // Max Error found at float128 precision = Poly: 1.368313e-34
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.989422804012941975429616956496046931e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.496033550576049830976679315420681402e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.675107835141866009896710750800622147e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.090104965125365961928716504473692957e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.842241652296980863361375208605487570e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.063604828033747303936724279018650633e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -9.113375972811586130949401996332817152e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.334748570425075872639817839399823709e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.759150758768733692594821032784124765e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.863672813448915255286274382558526321e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.798248643371718775489178767529282534e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.769963173932801026451013022000669267e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.381780137198278741566746511015220011e+10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.163891337116820832871382141011952931e+12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.764325864671438675151635117936912390e+13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.925668307403332887856809510525154955e+14),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.416692606589060039334938090985713641e+16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.892398600219306424294729851605944429e+17),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.107232903741874160308537145391245060e+18),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.930223393531877588898224144054112045e+19),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.427759576167665663373350433236061007e+20),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.306019279465532835530812122374386654e+20),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.653753000392125229440044977239174472e+21),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.140760686989511568435076842569804906e+22),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.249149337812510200795436107962504749e+22),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.101619088427348382058085685849420866e+22)
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else if(x < 100)
- {
- // Max error in interpolated form: 5.494e-35
- // Max Error found at float128 precision = Poly: 1.214651e-34
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.989422804014326779399307367861631577e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.496033551505372542086590873271571919e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.675104848454290286276466276677172664e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.090716742397105403027549796269213215e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.752570419098513588311026680089351230e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.107369803696534592906420980901195808e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.699214194000085622941721628134575121e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.953006169077813678478720427604462133e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.746618809476524091493444128605380593e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.084446249943196826652788161656973391e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.020325182518980633783194648285500554e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.510195971266257573425196228564489134e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.241661863814900938075696173192225056e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.323374362891993686413568398575539777e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.112838452096066633754042734723911040e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.369270194978310081563767560113534023e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.704295412488936504389347368131134993e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.320829576277038198439987439508754886e+10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.258818139077875493434420764260185306e+11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.396791306321498426110315039064592443e+12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.217617301585849875301440316301068439e+12)
- };
- return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- }
- else
- {
- // Bessel I0 over[100, INF]
- // Max error in interpolated form: 6.081e-35
- // Max Error found at float128 precision = Poly: 1.407151e-34
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040143267793994605993438200208417e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.4960335515053725422747977247811372936584e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.6751048484542891946087411826356811991039e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.0907167423975030452875828826630006305665e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.7525704189964886494791082898669060345483e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.1073698056568248642163476807108190176386e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.6992139012879749064623499618582631684228e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.9530409594026597988098934027440110587905e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.7462844478733532517044536719240098183686e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.0870711340681926669381449306654104739256e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.8510175413216969245241059608553222505228e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.4094682286011573747064907919522894740063e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.3128845936764406865199641778959502795443e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.1655901321962541203257516341266838487359e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.8019591025686295090160445920753823994556e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, -6.7008089049178178697338128837158732831105e+05)
- };
- T ex = exp(x / 2);
- T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
- result *= ex;
- return result;
- }
-}
-
-template <typename T>
-T bessel_i1_imp(const T& x, const mpl::int_<0>&)
-{
- if(boost::math::tools::digits<T>() <= 24)
- return bessel_i1_imp(x, mpl::int_<24>());
- else if(boost::math::tools::digits<T>() <= 53)
- return bessel_i1_imp(x, mpl::int_<53>());
- else if(boost::math::tools::digits<T>() <= 64)
- return bessel_i1_imp(x, mpl::int_<64>());
- else if(boost::math::tools::digits<T>() <= 113)
- return bessel_i1_imp(x, mpl::int_<113>());
- BOOST_ASSERT(0);
- return 0;
-}
-
-template <typename T>
-inline T bessel_i1(const T& x)
-{
- typedef mpl::int_<
- ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
- 0 :
- std::numeric_limits<T>::digits <= 24 ?
- 24 :
- std::numeric_limits<T>::digits <= 53 ?
- 53 :
- std::numeric_limits<T>::digits <= 64 ?
- 64 :
- std::numeric_limits<T>::digits <= 113 ?
- 113 : -1
- > tag_type;
-
- bessel_i1_initializer<T, tag_type>::force_instantiate();
- return bessel_i1_imp(x, tag_type());
-}
-
-}}} // namespaces
-
-#endif // BOOST_MATH_BESSEL_I1_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index ebcab17240f..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j0.hpp
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// 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_BESSEL_J0_HPP
-#define BOOST_MATH_BESSEL_J0_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/constants/constants.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/assert.hpp>
-
-// Bessel function of the first kind of order zero
-// x <= 8, minimax rational approximations on root-bracketing intervals
-// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
-
-namespace boost { namespace math { namespace detail{
-
-template <typename T>
-T bessel_j0(T x);
-
-template <class T>
-struct bessel_j0_initializer
-{
- struct init
- {
- init()
- {
- do_init();
- }
- static void do_init()
- {
- bessel_j0(T(1));
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T>
-const typename bessel_j0_initializer<T>::init bessel_j0_initializer<T>::initializer;
-
-template <typename T>
-T bessel_j0(T x)
-{
- bessel_j0_initializer<T>::force_instantiate();
-
- static const T P1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.1298668500990866786e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.7282507878605942706e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.2140700423540120665e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6302997904833794242e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.6629814655107086448e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0344222815443188943e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2117036164593528341e-01))
- };
- static const T Q1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.3883787996332290397e+12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.6328198300859648632e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3985097372263433271e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.5612696224219938200e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.3614022392337710626e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
- };
- static const T P2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8319397969392084011e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2254078161378989535e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -7.2879702464464618998e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0341910641583726701e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1725046279757103576e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.4176707025325087628e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.4321196680624245801e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.8591703355916499363e+01))
- };
- static const T Q2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.5783478026152301072e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4599102262586308984e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.4055062591169562211e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8680990008359188352e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.9458766545509337327e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.3307310774649071172e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.5258076240801555057e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
- };
- static const T PC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684302e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1345386639580765797e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1170523380864944322e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4806486443249270347e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5376201909008354296e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.8961548424210455236e-01))
- };
- static const T QC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684318e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1370412495510416640e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1215350561880115730e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5028735138235608207e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5711159858080893649e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
- };
- static const T PS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.9226600200800094098e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8591953644342993800e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1183429920482737611e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.2300261666214198472e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2441026745835638459e+00)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.8033303048680751817e-03))
- };
- static const T QS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.7105024128512061905e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1951131543434613647e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.2642780169211018836e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4887231232283756582e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.0593769594993125859e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
- };
- static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4048255576957727686e+00)),
- x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.5200781102863106496e+00)),
- x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.160e+02)),
- x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.42444230422723137837e-03)),
- x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4130e+03)),
- x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.46860286310649596604e-04));
-
- T value, factor, r, rc, rs;
-
- BOOST_MATH_STD_USING
- using namespace boost::math::tools;
- using namespace boost::math::constants;
-
- if (x < 0)
- {
- x = -x; // even function
- }
- if (x == 0)
- {
- return static_cast<T>(1);
- }
- if (x <= 4) // x in (0, 4]
- {
- T y = x * x;
- BOOST_ASSERT(sizeof(P1) == sizeof(Q1));
- r = evaluate_rational(P1, Q1, y);
- factor = (x + x1) * ((x - x11/256) - x12);
- value = factor * r;
- }
- else if (x <= 8.0) // x in (4, 8]
- {
- T y = 1 - (x * x)/64;
- BOOST_ASSERT(sizeof(P2) == sizeof(Q2));
- r = evaluate_rational(P2, Q2, y);
- factor = (x + x2) * ((x - x21/256) - x22);
- value = factor * r;
- }
- else // x in (8, \infty)
- {
- T y = 8 / x;
- T y2 = y * y;
- BOOST_ASSERT(sizeof(PC) == sizeof(QC));
- BOOST_ASSERT(sizeof(PS) == sizeof(QS));
- rc = evaluate_rational(PC, QC, y2);
- rs = evaluate_rational(PS, QS, y2);
- factor = constants::one_div_root_pi<T>() / sqrt(x);
- //
- // What follows is really just:
- //
- // T z = x - pi/4;
- // value = factor * (rc * cos(z) - y * rs * sin(z));
- //
- // But using the addition formulae for sin and cos, plus
- // the special values for sin/cos of pi/4.
- //
- T sx = sin(x);
- T cx = cos(x);
- value = factor * (rc * (cx + sx) - y * rs * (sx - cx));
- }
-
- return value;
-}
-
-}}} // namespaces
-
-#endif // BOOST_MATH_BESSEL_J0_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 91ecd2832d0..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j1.hpp
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// 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_BESSEL_J1_HPP
-#define BOOST_MATH_BESSEL_J1_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/constants/constants.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/assert.hpp>
-
-// Bessel function of the first kind of order one
-// x <= 8, minimax rational approximations on root-bracketing intervals
-// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
-
-namespace boost { namespace math{ namespace detail{
-
-template <typename T>
-T bessel_j1(T x);
-
-template <class T>
-struct bessel_j1_initializer
-{
- struct init
- {
- init()
- {
- do_init();
- }
- static void do_init()
- {
- bessel_j1(T(1));
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T>
-const typename bessel_j1_initializer<T>::init bessel_j1_initializer<T>::initializer;
-
-template <typename T>
-T bessel_j1(T x)
-{
- bessel_j1_initializer<T>::force_instantiate();
-
- static const T P1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4258509801366645672e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6781041261492395835e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1548696764841276794e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.8062904098958257677e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4615792982775076130e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0650724020080236441e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0767857011487300348e-02))
- };
- static const T Q1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1868604460820175290e+12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.2091902282580133541e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.0228375140097033958e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.9117614494174794095e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0742272239517380498e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
- };
- static const T P2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.7527881995806511112e+16)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.6608531731299018674e+15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.6658018905416665164e+13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5580665670910619166e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8113931269860667829e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.0793266148011179143e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -7.5023342220781607561e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.6179191852758252278e+00))
- };
- static const T Q2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7253905888447681194e+18)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7128800897135812012e+16)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.4899346165481429307e+13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.7622777286244082666e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.4872502899596389593e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1267125065029138050e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3886978985861357615e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
- };
- static const T PC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278571e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9422465050776411957e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.6033732483649391093e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5235293511811373833e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0982405543459346727e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6116166443246101165e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
- };
- static const T QC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278568e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9341243899345856590e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.5853394797230870728e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5118095066341608816e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0726385991103820119e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4550094401904961825e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
- };
- static const T PS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.3220913409857223519e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.5145160675335701966e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6178836581270835179e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8494262873223866797e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7063754290207680021e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5265133846636032186e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
- };
- static const T QS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0871281941028743574e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8194580422439972989e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4194606696037208929e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0029443582266975117e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.7890229745772202641e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.6383677696049909675e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
- };
- static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.8317059702075123156e+00)),
- x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0155866698156187535e+00)),
- x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.810e+02)),
- x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.2527979248768438556e-04)),
- x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7960e+03)),
- x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.8330184381246462950e-05));
-
- T value, factor, r, rc, rs, w;
-
- BOOST_MATH_STD_USING
- using namespace boost::math::tools;
- using namespace boost::math::constants;
-
- w = abs(x);
- if (x == 0)
- {
- return static_cast<T>(0);
- }
- if (w <= 4) // w in (0, 4]
- {
- T y = x * x;
- BOOST_ASSERT(sizeof(P1) == sizeof(Q1));
- r = evaluate_rational(P1, Q1, y);
- factor = w * (w + x1) * ((w - x11/256) - x12);
- value = factor * r;
- }
- else if (w <= 8) // w in (4, 8]
- {
- T y = x * x;
- BOOST_ASSERT(sizeof(P2) == sizeof(Q2));
- r = evaluate_rational(P2, Q2, y);
- factor = w * (w + x2) * ((w - x21/256) - x22);
- value = factor * r;
- }
- else // w in (8, \infty)
- {
- T y = 8 / w;
- T y2 = y * y;
- BOOST_ASSERT(sizeof(PC) == sizeof(QC));
- BOOST_ASSERT(sizeof(PS) == sizeof(QS));
- rc = evaluate_rational(PC, QC, y2);
- rs = evaluate_rational(PS, QS, y2);
- factor = 1 / (sqrt(w) * constants::root_pi<T>());
- //
- // What follows is really just:
- //
- // T z = w - 0.75f * pi<T>();
- // value = factor * (rc * cos(z) - y * rs * sin(z));
- //
- // but using the sin/cos addition rules plus constants
- // for the values of sin/cos of 3PI/4 which then cancel
- // out with corresponding terms in "factor".
- //
- T sx = sin(x);
- T cx = cos(x);
- value = factor * (rc * (sx - cx) + y * rs * (sx + cx));
- }
-
- if (x < 0)
- {
- value *= -1; // odd function
- }
- return value;
-}
-
-}}} // namespaces
-
-#endif // BOOST_MATH_BESSEL_J1_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 74f4014bd9b..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k0.hpp
+++ /dev/null
@@ -1,509 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// Copyright (c) 2017 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_BESSEL_K0_HPP
-#define BOOST_MATH_BESSEL_K0_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#pragma warning(push)
-#pragma warning(disable:4702) // Unreachable code (release mode only warning)
-#endif
-
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/assert.hpp>
-
-// Modified Bessel function of the second kind of order zero
-// minimax rational approximations on intervals, see
-// Russon and Blair, Chalk River Report AECL-3461, 1969,
-// as revised by Pavel Holoborodko in "Rational Approximations
-// for the Modified Bessel Function of the Second Kind - K0(x)
-// for Computations with Double Precision", see
-// http://www.advanpix.com/2015/11/25/rational-approximations-for-the-modified-bessel-function-of-the-second-kind-k0-for-computations-with-double-precision/
-//
-// The actual coefficients used are our own derivation (by JM)
-// since we extend to both greater and lesser precision than the
-// references above. We can also improve performance WRT to
-// Holoborodko without loss of precision.
-
-namespace boost { namespace math { namespace detail{
-
-template <typename T>
-T bessel_k0(const T& x);
-
-template <class T, class tag>
-struct bessel_k0_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- static void do_init(const mpl::int_<113>&)
- {
- bessel_k0(T(0.5));
- bessel_k0(T(1.5));
- }
- static void do_init(const mpl::int_<64>&)
- {
- bessel_k0(T(0.5));
- bessel_k0(T(1.5));
- }
- template <class U>
- static void do_init(const U&){}
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class tag>
-const typename bessel_k0_initializer<T, tag>::init bessel_k0_initializer<T, tag>::initializer;
-
-
-template <typename T, int N>
-T bessel_k0_imp(const T& x, const mpl::int_<N>&)
-{
- BOOST_ASSERT(0);
- return 0;
-}
-
-template <typename T>
-T bessel_k0_imp(const T& x, const mpl::int_<24>&)
-{
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found : 2.358e-09
- // Expected Error Term : -2.358e-09
- // Maximum Relative Change in Control Points : 9.552e-02
- // Max Error found at float precision = Poly : 4.448220e-08
- static const T Y = 1.137250900268554688f;
- static const T P[] =
- {
- -1.372508979104259711e-01f,
- 2.622545986273687617e-01f,
- 5.047103728247919836e-03f
- };
- static const T Q[] =
- {
- 1.000000000000000000e+00f,
- -8.928694018000029415e-02f,
- 2.985980684180969241e-03f
- };
- T a = x * x / 4;
- a = (tools::evaluate_rational(P, Q, a) + Y) * a + 1;
-
- // Maximum Deviation Found: 1.346e-09
- // Expected Error Term : -1.343e-09
- // Maximum Relative Change in Control Points : 2.405e-02
- // Max Error found at float precision = Poly : 1.354814e-07
- static const T P2[] = {
- 1.159315158e-01f,
- 2.789828686e-01f,
- 2.524902861e-02f,
- 8.457241514e-04f,
- 1.530051997e-05f
- };
- return tools::evaluate_polynomial(P2, T(x * x)) - log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 1.587e-08
- // Expected Error Term : 1.531e-08
- // Maximum Relative Change in Control Points : 9.064e-02
- // Max Error found at float precision = Poly : 5.065020e-08
-
- static const T P[] =
- {
- 2.533141220e-01,
- 5.221502603e-01,
- 6.380180669e-02,
- -5.934976547e-02
- };
- static const T Q[] =
- {
- 1.000000000e+00,
- 2.679722431e+00,
- 1.561635813e+00,
- 1.573660661e-01
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + 1) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + 1) * ex / sqrt(x)) * ex;
- }
- }
-}
-
-template <typename T>
-T bessel_k0_imp(const T& x, const mpl::int_<53>&)
-{
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 6.077e-17
- // Expected Error Term : -6.077e-17
- // Maximum Relative Change in Control Points : 7.797e-02
- // Max Error found at double precision = Poly : 1.003156e-16
- static const T Y = 1.137250900268554688;
- static const T P[] =
- {
- -1.372509002685546267e-01,
- 2.574916117833312855e-01,
- 1.395474602146869316e-02,
- 5.445476986653926759e-04,
- 7.125159422136622118e-06
- };
- static const T Q[] =
- {
- 1.000000000000000000e+00,
- -5.458333438017788530e-02,
- 1.291052816975251298e-03,
- -1.367653946978586591e-05
- };
-
- T a = x * x / 4;
- a = (tools::evaluate_polynomial(P, a) / tools::evaluate_polynomial(Q, a) + Y) * a + 1;
-
- // Maximum Deviation Found: 3.429e-18
- // Expected Error Term : 3.392e-18
- // Maximum Relative Change in Control Points : 2.041e-02
- // Max Error found at double precision = Poly : 2.513112e-16
- static const T P2[] =
- {
- 1.159315156584124484e-01,
- 2.789828789146031732e-01,
- 2.524892993216121934e-02,
- 8.460350907213637784e-04,
- 1.491471924309617534e-05,
- 1.627106892422088488e-07,
- 1.208266102392756055e-09,
- 6.611686391749704310e-12
- };
-
- return tools::evaluate_polynomial(P2, T(x * x)) - log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 4.316e-17
- // Expected Error Term : 9.570e-18
- // Maximum Relative Change in Control Points : 2.757e-01
- // Max Error found at double precision = Poly : 1.001560e-16
-
- static const T Y = 1;
- static const T P[] =
- {
- 2.533141373155002416e-01,
- 3.628342133984595192e+00,
- 1.868441889406606057e+01,
- 4.306243981063412784e+01,
- 4.424116209627428189e+01,
- 1.562095339356220468e+01,
- -1.810138978229410898e+00,
- -1.414237994269995877e+00,
- -9.369168119754924625e-02
- };
- static const T Q[] =
- {
- 1.000000000000000000e+00,
- 1.494194694879908328e+01,
- 8.265296455388554217e+01,
- 2.162779506621866970e+02,
- 2.845145155184222157e+02,
- 1.851714491916334995e+02,
- 5.486540717439723515e+01,
- 6.118075837628957015e+00,
- 1.586261269326235053e-01
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
-}
-
-template <typename T>
-T bessel_k0_imp(const T& x, const mpl::int_<64>&)
-{
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 2.180e-22
- // Expected Error Term : 2.180e-22
- // Maximum Relative Change in Control Points : 2.943e-01
- // Max Error found at float80 precision = Poly : 3.923207e-20
- static const T Y = 1.137250900268554687500e+00;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.372509002685546875002e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.566481981037407600436e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.551881122448948854873e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.646112454323276529650e-04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.213747930378196492543e-05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.423709328020389560844e-08)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.843828412587773008342e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.088484822515098936140e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.374724008530702784829e-05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.452665455952581680339e-08)
- };
-
-
- T a = x * x / 4;
- a = (tools::evaluate_polynomial(P, a) / tools::evaluate_polynomial(Q, a) + Y) * a + 1;
-
- // Maximum Deviation Found: 2.440e-21
- // Expected Error Term : -2.434e-21
- // Maximum Relative Change in Control Points : 2.459e-02
- // Max Error found at float80 precision = Poly : 1.482487e-19
- static const T P2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.159315156584124488110e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.764832791416047889734e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.926062887220923354112e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.660777862036966089410e-04),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.094942446930673386849e-06)
- };
- static const T Q2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.156100313881251616320e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.315993873344905957033e-04),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.529444499350703363451e-06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.524988589917857531177e-09)
- };
- return tools::evaluate_rational(P2, Q2, T(x * x)) - log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 4.291e-20
- // Expected Error Term : 2.236e-21
- // Maximum Relative Change in Control Points : 3.021e-01
- //Max Error found at float80 precision = Poly : 8.727378e-20
- static const T Y = 1;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.533141373155002512056e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.417942070721928652715e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.477464607463971754433e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.838745728725943889876e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.009736314927811202517e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.557411293123609803452e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.360222564015361268955e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.385435333168505701022e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.750195760942181592050e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.059789241612946683713e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.612783121537333908889e-01)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.200669254769325861404e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.900177593527144126549e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.361003989965786932682e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.041319870804843395893e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.828491555113790345068e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.190342229261529076624e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.003330795963812219852e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.773371397243777891569e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.368634935531158398439e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.543310879400359967327e-01)
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
-}
-
-template <typename T>
-T bessel_k0_imp(const T& x, const mpl::int_<113>&)
-{
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 5.682e-37
- // Expected Error Term : 5.682e-37
- // Maximum Relative Change in Control Points : 6.094e-04
- // Max Error found at float128 precision = Poly : 5.338213e-35
- static const T Y = 1.137250900268554687500000000000000000e+00f;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.372509002685546875000000000000000006e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.556212905071072782462974351698081303e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.742459135264203478530904179889103929e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.077860530453688571555479526961318918e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.868173911669241091399374307788635148e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.496405768838992243478709145123306602e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.752489221949580551692915881999762125e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.243010555737173524710512824955368526e-12)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.095631064064621099785696980653193721e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.313880983725212151967078809725835532e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.095229912293480063501285562382835142e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.022828799511943141130509410251996277e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, -6.860874007419812445494782795829046836e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.107297802344970725756092082686799037e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.460529579244623559164763757787600944e-15)
- };
- T a = x * x / 4;
- a = (tools::evaluate_rational(P, Q, a) + Y) * a + 1;
-
- // Maximum Deviation Found: 5.173e-38
- // Expected Error Term : 5.105e-38
- // Maximum Relative Change in Control Points : 9.734e-03
- // Max Error found at float128 precision = Poly : 1.688806e-34
- static const T P2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.159315156584124488107200313757741370e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.789828789146031122026800078439435369e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.524892993216269451266750049024628432e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.460350907082229957222453839935101823e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.491471929926042875260452849503857976e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.627105610481598430816014719558896866e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.208426165007797264194914898538250281e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.508697838747354949164182457073784117e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.659784680639805301101014383907273109e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.531090131964391104248859415958109654e-17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.205195117066478034260323124669936314e-19),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.692219280289030165761119775783115426e-22),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.362350161092532344171965861545860747e-25),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.277990623924628999539014980773738258e-27)
- };
-
- return tools::evaluate_polynomial(P2, T(x * x)) - log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 1.462e-34
- // Expected Error Term : 4.917e-40
- // Maximum Relative Change in Control Points : 3.385e-01
- // Max Error found at float128 precision = Poly : 1.567573e-34
- static const T Y = 1;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.533141373155002512078826424055226265e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.001949740768235770078339977110749204e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.991516715983883248363351472378349986e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.429587951594593159075690819360687720e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.911933815201948768044660065771258450e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.769943016204926614862175317962439875e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.170866154649560750500954150401105606e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.634687099724383996792011977705727661e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.989524036456492581597607246664394014e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.160394785715328062088529400178080360e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.778173054417826368076483100902201433e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.335667778588806892764139643950439733e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.283635100080306980206494425043706838e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.300616188213640626577036321085025855e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.277591957076162984986406540894621482e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.564360536834214058158565361486115932e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.043505161612403359098596828115690596e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.217035248223503605127967970903027314e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.422938158797326748375799596769964430e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.229125746200586805278634786674745210e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.201632288615609937883545928660649813e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.690820607338480548346746717311811406e+01)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.964877874035741452203497983642653107e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.808929943826193766839360018583294769e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.814524004679994110944366890912384139e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.897794522506725610540209610337355118e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.456339470955813675629523617440433672e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.057818717813969772198911392875127212e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.513821619536852436424913886081133209e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.255938846873380596038513316919990776e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.537077551699028079347581816919572141e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.176769339768120752974843214652367321e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.828722317390455845253191337207432060e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.698864296569996402006511705803675890e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.007803261356636409943826918468544629e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.016564631288740308993071395104715469e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.595893010619754750655947035567624730e+09),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.241241839120481076862742189989406856e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.168778094393076220871007550235840858e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.156200301360388147635052029404211109e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.752130382550379886741949463587008794e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.370574966987293592457152146806662562e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.871254714311063594080644835895740323e+01)
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
-}
-
-template <typename T>
-T bessel_k0_imp(const T& x, const mpl::int_<0>&)
-{
- if(boost::math::tools::digits<T>() <= 24)
- return bessel_k0_imp(x, mpl::int_<24>());
- else if(boost::math::tools::digits<T>() <= 53)
- return bessel_k0_imp(x, mpl::int_<53>());
- else if(boost::math::tools::digits<T>() <= 64)
- return bessel_k0_imp(x, mpl::int_<64>());
- else if(boost::math::tools::digits<T>() <= 113)
- return bessel_k0_imp(x, mpl::int_<113>());
- BOOST_ASSERT(0);
- return 0;
-}
-
-template <typename T>
-inline T bessel_k0(const T& x)
-{
- typedef mpl::int_<
- ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
- 0 :
- std::numeric_limits<T>::digits <= 24 ?
- 24 :
- std::numeric_limits<T>::digits <= 53 ?
- 53 :
- std::numeric_limits<T>::digits <= 64 ?
- 64 :
- std::numeric_limits<T>::digits <= 113 ?
- 113 : -1
- > tag_type;
-
- bessel_k0_initializer<T, tag_type>::force_instantiate();
- return bessel_k0_imp(x, tag_type());
-}
-
-}}} // namespaces
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MATH_BESSEL_K0_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 2ab191fb498..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k1.hpp
+++ /dev/null
@@ -1,551 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// Copyright (c) 2017 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_BESSEL_K1_HPP
-#define BOOST_MATH_BESSEL_K1_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#pragma warning(push)
-#pragma warning(disable:4702) // Unreachable code (release mode only warning)
-#endif
-
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/assert.hpp>
-
-// Modified Bessel function of the second kind of order zero
-// minimax rational approximations on intervals, see
-// Russon and Blair, Chalk River Report AECL-3461, 1969,
-// as revised by Pavel Holoborodko in "Rational Approximations
-// for the Modified Bessel Function of the Second Kind - K0(x)
-// for Computations with Double Precision", see
-// http://www.advanpix.com/2016/01/05/rational-approximations-for-the-modified-bessel-function-of-the-second-kind-k1-for-computations-with-double-precision/
-//
-// The actual coefficients used are our own derivation (by JM)
-// since we extend to both greater and lesser precision than the
-// references above. We can also improve performance WRT to
-// Holoborodko without loss of precision.
-
-namespace boost { namespace math { namespace detail{
-
- template <typename T>
- T bessel_k1(const T& x);
-
- template <class T, class tag>
- struct bessel_k1_initializer
- {
- struct init
- {
- init()
- {
- do_init(tag());
- }
- static void do_init(const mpl::int_<113>&)
- {
- bessel_k1(T(0.5));
- bessel_k1(T(2));
- bessel_k1(T(6));
- }
- static void do_init(const mpl::int_<64>&)
- {
- bessel_k1(T(0.5));
- bessel_k1(T(6));
- }
- template <class U>
- static void do_init(const U&) {}
- void force_instantiate()const {}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
- };
-
- template <class T, class tag>
- const typename bessel_k1_initializer<T, tag>::init bessel_k1_initializer<T, tag>::initializer;
-
-
- template <typename T, int N>
- inline T bessel_k1_imp(const T& x, const mpl::int_<N>&)
- {
- BOOST_ASSERT(0);
- return 0;
- }
-
- template <typename T>
- T bessel_k1_imp(const T& x, const mpl::int_<24>&)
- {
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 3.090e-12
- // Expected Error Term : -3.053e-12
- // Maximum Relative Change in Control Points : 4.927e-02
- // Max Error found at float precision = Poly : 7.918347e-10
- static const T Y = 8.695471287e-02f;
- static const T P[] =
- {
- -3.621379531e-03f,
- 7.131781976e-03f,
- -1.535278300e-05f
- };
- static const T Q[] =
- {
- 1.000000000e+00f,
- -5.173102701e-02f,
- 9.203530671e-04f
- };
-
- T a = x * x / 4;
- a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
-
- // Maximum Deviation Found: 3.556e-08
- // Expected Error Term : -3.541e-08
- // Maximum Relative Change in Control Points : 8.203e-02
- static const T P2[] =
- {
- -3.079657469e-01f,
- -8.537108913e-02f,
- -4.640275408e-03f,
- -1.156442414e-04f
- };
-
- return tools::evaluate_polynomial(P2, T(x * x)) * x + 1 / x + log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 3.369e-08
- // Expected Error Term : -3.227e-08
- // Maximum Relative Change in Control Points : 9.917e-02
- // Max Error found at float precision = Poly : 6.084411e-08
- static const T Y = 1.450342178f;
- static const T P[] =
- {
- -1.970280088e-01f,
- 2.188747807e-02f,
- 7.270394756e-01f,
- 2.490678196e-01f
- };
- static const T Q[] =
- {
- 1.000000000e+00f,
- 2.274292882e+00f,
- 9.904984851e-01f,
- 4.585534549e-02f
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
- }
-
- template <typename T>
- T bessel_k1_imp(const T& x, const mpl::int_<53>&)
- {
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 1.922e-17
- // Expected Error Term : 1.921e-17
- // Maximum Relative Change in Control Points : 5.287e-03
- // Max Error found at double precision = Poly : 2.004747e-17
- static const T Y = 8.69547128677368164e-02f;
- static const T P[] =
- {
- -3.62137953440350228e-03,
- 7.11842087490330300e-03,
- 1.00302560256614306e-05,
- 1.77231085381040811e-06
- };
- static const T Q[] =
- {
- 1.00000000000000000e+00,
- -4.80414794429043831e-02,
- 9.85972641934416525e-04,
- -8.91196859397070326e-06
- };
-
- T a = x * x / 4;
- a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
-
- // Maximum Deviation Found: 4.053e-17
- // Expected Error Term : -4.053e-17
- // Maximum Relative Change in Control Points : 3.103e-04
- // Max Error found at double precision = Poly : 1.246698e-16
-
- static const T P2[] =
- {
- -3.07965757829206184e-01,
- -7.80929703673074907e-02,
- -2.70619343754051620e-03,
- -2.49549522229072008e-05
- };
- static const T Q2[] =
- {
- 1.00000000000000000e+00,
- -2.36316836412163098e-02,
- 2.64524577525962719e-04,
- -1.49749618004162787e-06
- };
-
- return tools::evaluate_rational(P2, Q2, T(x * x)) * x + 1 / x + log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 8.883e-17
- // Expected Error Term : -1.641e-17
- // Maximum Relative Change in Control Points : 2.786e-01
- // Max Error found at double precision = Poly : 1.258798e-16
-
- static const T Y = 1.45034217834472656f;
- static const T P[] =
- {
- -1.97028041029226295e-01,
- -2.32408961548087617e+00,
- -7.98269784507699938e+00,
- -2.39968410774221632e+00,
- 3.28314043780858713e+01,
- 5.67713761158496058e+01,
- 3.30907788466509823e+01,
- 6.62582288933739787e+00,
- 3.08851840645286691e-01
- };
- static const T Q[] =
- {
- 1.00000000000000000e+00,
- 1.41811409298826118e+01,
- 7.35979466317556420e+01,
- 1.77821793937080859e+02,
- 2.11014501598705982e+02,
- 1.19425262951064454e+02,
- 2.88448064302447607e+01,
- 2.27912927104139732e+00,
- 2.50358186953478678e-02
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
- }
-
- template <typename T>
- T bessel_k1_imp(const T& x, const mpl::int_<64>&)
- {
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 5.549e-23
- // Expected Error Term : -5.548e-23
- // Maximum Relative Change in Control Points : 2.002e-03
- // Max Error found at float80 precision = Poly : 9.352785e-22
- static const T Y = 8.695471286773681640625e-02f;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.621379534403483072861e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.102135866103952705932e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.167545240236717601167e-05),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.537484002571894870830e-06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.603228256820000135990e-09)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.354457194045068370363e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.709137201220209072820e-04),
- BOOST_MATH_BIG_CONSTANT(T, 64, -9.676151796359590545143e-06),
- BOOST_MATH_BIG_CONSTANT(T, 64, 5.162715192766245311659e-08)
- };
-
- T a = x * x / 4;
- a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
-
- // Maximum Deviation Found: 1.995e-23
- // Expected Error Term : 1.995e-23
- // Maximum Relative Change in Control Points : 8.174e-04
- // Max Error found at float80 precision = Poly : 4.137325e-20
- static const T P2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.079657578292062244054e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -7.963049154965966503231e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.103277523735639924895e-03),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.023052834702215699504e-05),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.719459155018493821839e-07)
- };
- static const T Q2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.863917670410152669768e-02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.699367098849735298090e-04),
- BOOST_MATH_BIG_CONSTANT(T, 64, -9.309358790546076298429e-07),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.708893480271612711933e-09)
- };
-
- return tools::evaluate_rational(P2, Q2, T(x * x)) * x + 1 / x + log(x) * a;
- }
- else
- {
- // Maximum Deviation Found: 9.785e-20
- // Expected Error Term : -3.302e-21
- // Maximum Relative Change in Control Points : 3.432e-01
- // Max Error found at float80 precision = Poly : 1.083755e-19
- static const T Y = 1.450342178344726562500e+00f;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.970280410292263112917e-01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.058564803062959169322e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.036658174194917777473e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -9.576825392332820142173e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, -6.706969489248020941949e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.264572499406168221382e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.584972047303151034100e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 8.422082733280017909550e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.738005441471368178383e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.016938390144121276609e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.319614662598089438939e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.710715864316521856193e-02)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.298433045824439052398e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.082047745067709230037e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 9.662367854250262046592e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.504148628460454004686e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.712730364911389908905e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.108002081150068641112e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.400149940532448553143e+03),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.083303048095846226299e+02),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.748706060530351833346e+01),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.321900849331506946977e-01),
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
- }
-
- template <typename T>
- T bessel_k1_imp(const T& x, const mpl::int_<113>&)
- {
- BOOST_MATH_STD_USING
- if(x <= 1)
- {
- // Maximum Deviation Found: 7.120e-35
- // Expected Error Term : -7.119e-35
- // Maximum Relative Change in Control Points : 1.207e-03
- // Max Error found at float128 precision = Poly : 7.143688e-35
- static const T Y = 8.695471286773681640625000000000000000e-02f;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.621379534403483072916666666666595475e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.074117676930975433219826471336547627e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.631337631362776369069668419033041661e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.468935967870048731821071646104412775e-06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.956705020559599861444492614737168261e-08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.347140307321161346703214099534250263e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.569608494081482873946791086435679661e-13)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.580768910152105375615558920428350204e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.197467671701485365363068445534557369e-04),
- BOOST_MATH_BIG_CONSTANT(T, 113, -6.707466533308630411966030561446666237e-06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.846687802282250112624373388491123527e-08),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.248493131151981569517383040323900343e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.319279786372775264555728921709381080e-13)
- };
-
- T a = x * x / 4;
- a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
-
- // Maximum Deviation Found: 4.473e-37
- // Expected Error Term : 4.473e-37
- // Maximum Relative Change in Control Points : 8.550e-04
- // Max Error found at float128 precision = Poly : 8.167701e-35
- static const T P2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.079657578292062244053600156878870690e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.133183745732467770755578848987414875e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.548968792764174773125420229299431951e-03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.886125468718182876076972186152445490e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.506712111733707245745396404449639865e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.632502325880313239698965376754406011e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.311973065898784812266544485665624227e-12)
- };
- static const T Q2[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.311471216733781016657962995723287450e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.571876054797365417068164018709472969e-05),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.630181215268238731442496851497901293e-07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.070176111227805048604885986867484807e-09),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.129046580769872602793220056461084761e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.294906469421390890762001971790074432e-15)
- };
-
- return tools::evaluate_rational(P2, Q2, T(x * x)) * x + 1 / x + log(x) * a;
- }
- else if(x < 4)
- {
- // Max error in interpolated form: 5.307e-37
- // Max Error found at float128 precision = Poly: 7.087862e-35
- static const T Y = 1.5023040771484375f;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.489899398329369710528254347931380044e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -6.819080211203854781858815596508456873e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -7.599915699069767382647695624952723034e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.450211910821295507926582231071300718e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.451374687870925175794150513723956533e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.405805746895098802803503988539098226e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.638808326778389656403861103277220518e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.513958744081268456191778822780865708e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.121301640926540743072258116122834804e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.080094900175649541266613109971296190e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.896531083639613332407534434915552429e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.856602122319645694042555107114028437e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.237121918853145421414003823957537419e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.842072954561323076230238664623893504e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.039705646510167437971862966128055524e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.008418100718254816100425022904039530e-02)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.927456835239137986889227412815459529e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.598985593265577043711382994516531273e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.449897377085510281395819892689690579e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.025555887684561913263090023158085327e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.774140447181062463181892531100679195e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.962055507843204417243602332246120418e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.908269326976180183216954452196772931e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.655160454422016855911700790722577942e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.383586885019548163464418964577684608e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.679920375586960324298491662159976419e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.478586421028842906987799049804565008e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.565384974896746094224942654383537090e+02),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.902617937084010911005732488607114511e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.429293010387921526110949911029094926e-01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.880342607911083143560111853491047663e-04)
- };
- return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- }
- else
- {
- // Maximum Deviation Found: 4.359e-37
- // Expected Error Term : -6.565e-40
- // Maximum Relative Change in Control Points : 1.880e-01
- // Max Error found at float128 precision = Poly : 2.943572e-35
- static const T Y = 1.308816909790039062500000000000000000f;
- static const T P[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, -5.550277247453881129211735759447737350e-02),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.485883080219574328217554864956175929e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.903760658131484239300875153154881958e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.144813672213626237418235110712293337e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, -6.498400501156131446691826557494158173e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.573531831870363502604119835922166116e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.417416550054632009958262596048841154e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.271266450613557412825896604269130661e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.898386013314389952534433455681107783e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 5.353798784656436259250791761023512750e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 9.839619195427352438957774052763490067e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.169246368651532232388152442538005637e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.696368884166831199967845883371116431e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.810226630422736458064005843327500169e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.854996610560406127438950635716757614e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.981057433937398731355768088809437625e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.519440069856232098711793483639792952e+04)
- };
- static const T Q[] =
- {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
- BOOST_MATH_BIG_CONSTANT(T, 113, 7.127348248283623146544565916604103560e+01),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.205092684176906740104488180754982065e+03),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.911249195069050636298346469740075758e+04),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.426103406579046249654548481377792614e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.365861555422488771286500241966208541e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.765377714160383676864913709252529840e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 6.453822726931857253365138260720815246e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.643207885048369990391975749439783892e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.882540678243694621895816336640877878e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.410120808992380266174106812005338148e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.628138016559335882019310900426773027e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.250794693811010646965360198541047961e+08),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.378723408195485594610593014072950078e+07),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.488253856312453816451380319061865560e+06),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.202167197882689873967723350537104582e+05),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.673233230356966539460728211412989843e+03)
- };
- if(x < tools::log_max_value<T>())
- return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
- else
- {
- T ex = exp(-x / 2);
- return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
- }
- }
- }
-
- template <typename T>
- T bessel_k1_imp(const T& x, const mpl::int_<0>&)
- {
- if(boost::math::tools::digits<T>() <= 24)
- return bessel_k1_imp(x, mpl::int_<24>());
- else if(boost::math::tools::digits<T>() <= 53)
- return bessel_k1_imp(x, mpl::int_<53>());
- else if(boost::math::tools::digits<T>() <= 64)
- return bessel_k1_imp(x, mpl::int_<64>());
- else if(boost::math::tools::digits<T>() <= 113)
- return bessel_k1_imp(x, mpl::int_<113>());
- BOOST_ASSERT(0);
- return 0;
- }
-
- template <typename T>
- inline T bessel_k1(const T& x)
- {
- typedef mpl::int_<
- ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
- 0 :
- std::numeric_limits<T>::digits <= 24 ?
- 24 :
- std::numeric_limits<T>::digits <= 53 ?
- 53 :
- std::numeric_limits<T>::digits <= 64 ?
- 64 :
- std::numeric_limits<T>::digits <= 113 ?
- 113 : -1
- > tag_type;
-
- bessel_k1_initializer<T, tag_type>::force_instantiate();
- return bessel_k1_imp(x, tag_type());
- }
-
-}}} // namespaces
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MATH_BESSEL_K1_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 84b64aaa733..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y0.hpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// 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_BESSEL_Y0_HPP
-#define BOOST_MATH_BESSEL_Y0_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#pragma warning(push)
-#pragma warning(disable:4702) // Unreachable code (release mode only warning)
-#endif
-
-#include <boost/math/special_functions/detail/bessel_j0.hpp>
-#include <boost/math/constants/constants.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/assert.hpp>
-
-// Bessel function of the second kind of order zero
-// x <= 8, minimax rational approximations on root-bracketing intervals
-// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
-
-namespace boost { namespace math { namespace detail{
-
-template <typename T, typename Policy>
-T bessel_y0(T x, const Policy&);
-
-template <class T, class Policy>
-struct bessel_y0_initializer
-{
- struct init
- {
- init()
- {
- do_init();
- }
- static void do_init()
- {
- bessel_y0(T(1), Policy());
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class Policy>
-const typename bessel_y0_initializer<T, Policy>::init bessel_y0_initializer<T, Policy>::initializer;
-
-template <typename T, typename Policy>
-T bessel_y0(T x, const Policy& pol)
-{
- bessel_y0_initializer<T, Policy>::force_instantiate();
-
- static const T P1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0723538782003176831e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.3716255451260504098e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.0422274357376619816e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.1287548474401797963e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0102532948020907590e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8402381979244993524e+01)),
- };
- static const T Q1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.8873865738997033405e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.1617187777290363573e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.5662956624278251596e+07)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.3889393209447253406e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6475986689240190091e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T P2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.2213976967566192242e+13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.5107435206722644429e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.3600098638603061642e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.9590439394619619534e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.6905288611678631510e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4566865832663635920e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7427031242901594547e+01)),
- };
- static const T Q2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.3386146580707264428e+14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.4266824419412347550e+12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4015103849971240096e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3960202770986831075e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0669982352539552018e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.3030857612070288823e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T P3[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.0728726905150210443e+15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.7016641869173237784e+14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2829912364088687306e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.9363051266772083678e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1958827170518100757e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0085539923498211426e+07)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1363534169313901632e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.7439661319197499338e+01)),
- };
- static const T Q3[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4563724628846457519e+17)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.9272425569640309819e+15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2598377924042897629e+13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.6926121104209825246e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4727219475672302327e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.3924739209768057030e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.7903362168128450017e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T PC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684302e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1345386639580765797e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1170523380864944322e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4806486443249270347e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5376201909008354296e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.8961548424210455236e-01)),
- };
- static const T QC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684318e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1370412495510416640e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1215350561880115730e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5028735138235608207e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5711159858080893649e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T PS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.9226600200800094098e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8591953644342993800e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1183429920482737611e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.2300261666214198472e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2441026745835638459e+00)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.8033303048680751817e-03)),
- };
- static const T QS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.7105024128512061905e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1951131543434613647e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.2642780169211018836e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4887231232283756582e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.0593769594993125859e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.9357696627916752158e-01)),
- x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.9576784193148578684e+00)),
- x3 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0860510603017726976e+00)),
- x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.280e+02)),
- x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.9519662791675215849e-03)),
- x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0130e+03)),
- x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.4716931485786837568e-04)),
- x31 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8140e+03)),
- x32 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1356030177269762362e-04))
- ;
- T value, factor, r, rc, rs;
-
- BOOST_MATH_STD_USING
- using namespace boost::math::tools;
- using namespace boost::math::constants;
-
- static const char* function = "boost::math::bessel_y0<%1%>(%1%,%1%)";
-
- if (x < 0)
- {
- return policies::raise_domain_error<T>(function,
- "Got x = %1% but x must be non-negative, complex result not supported.", x, pol);
- }
- if (x == 0)
- {
- return -policies::raise_overflow_error<T>(function, 0, pol);
- }
- if (x <= 3) // x in (0, 3]
- {
- T y = x * x;
- T z = 2 * log(x/x1) * bessel_j0(x) / pi<T>();
- r = evaluate_rational(P1, Q1, y);
- factor = (x + x1) * ((x - x11/256) - x12);
- value = z + factor * r;
- }
- else if (x <= 5.5f) // x in (3, 5.5]
- {
- T y = x * x;
- T z = 2 * log(x/x2) * bessel_j0(x) / pi<T>();
- r = evaluate_rational(P2, Q2, y);
- factor = (x + x2) * ((x - x21/256) - x22);
- value = z + factor * r;
- }
- else if (x <= 8) // x in (5.5, 8]
- {
- T y = x * x;
- T z = 2 * log(x/x3) * bessel_j0(x) / pi<T>();
- r = evaluate_rational(P3, Q3, y);
- factor = (x + x3) * ((x - x31/256) - x32);
- value = z + factor * r;
- }
- else // x in (8, \infty)
- {
- T y = 8 / x;
- T y2 = y * y;
- rc = evaluate_rational(PC, QC, y2);
- rs = evaluate_rational(PS, QS, y2);
- factor = constants::one_div_root_pi<T>() / sqrt(x);
- //
- // The following code is really just:
- //
- // T z = x - 0.25f * pi<T>();
- // value = factor * (rc * sin(z) + y * rs * cos(z));
- //
- // But using the sin/cos addition formulae and constant values for
- // sin/cos of PI/4 which then cancel part of the "factor" term as they're all
- // 1 / sqrt(2):
- //
- T sx = sin(x);
- T cx = cos(x);
- value = factor * (rc * (sx - cx) + y * rs * (cx + sx));
- }
-
- return value;
-}
-
-}}} // namespaces
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MATH_BESSEL_Y0_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 7dc99c42cd9..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y1.hpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (c) 2006 Xiaogang Zhang
-// 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_BESSEL_Y1_HPP
-#define BOOST_MATH_BESSEL_Y1_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#pragma warning(push)
-#pragma warning(disable:4702) // Unreachable code (release mode only warning)
-#endif
-
-#include <boost/math/special_functions/detail/bessel_j1.hpp>
-#include <boost/math/constants/constants.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/assert.hpp>
-
-// Bessel function of the second kind of order one
-// x <= 8, minimax rational approximations on root-bracketing intervals
-// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
-
-namespace boost { namespace math { namespace detail{
-
-template <typename T, typename Policy>
-T bessel_y1(T x, const Policy&);
-
-template <class T, class Policy>
-struct bessel_y1_initializer
-{
- struct init
- {
- init()
- {
- do_init();
- }
- static void do_init()
- {
- bessel_y1(T(1), Policy());
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class Policy>
-const typename bessel_y1_initializer<T, Policy>::init bessel_y1_initializer<T, Policy>::initializer;
-
-template <typename T, typename Policy>
-T bessel_y1(T x, const Policy& pol)
-{
- bessel_y1_initializer<T, Policy>::force_instantiate();
-
- static const T P1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0535726612579544093e+13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.4708611716525426053e+12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.7595974497819597599e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.2144548214502560419e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.9157479997408395984e+07)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2157953222280260820e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.1714424660046133456e+02)),
- };
- static const T Q1[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.0737873921079286084e+14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1272286200406461981e+12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.7800352738690585613e+10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.2250435122182963220e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.8136470753052572164e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.2079908168393867438e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T P2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1514276357909013326e+19)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.6808094574724204577e+18)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.3638408497043134724e+16)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0686275289804744814e+15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.9530713129741981618e+13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.7453673962438488783e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1957961912070617006e+09)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.9153806858264202986e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2337180442012953128e+03)),
- };
- static const T Q2[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.3321844313316185697e+20)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.6968198822857178911e+18)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.0837179548112881950e+16)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1187010065856971027e+14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.0221766852960403645e+11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.3550318087088919566e+08)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0453748201934079734e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.2855164849321609336e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T PC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278571e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9422465050776411957e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.6033732483649391093e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5235293511811373833e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0982405543459346727e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6116166443246101165e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0)),
- };
- static const T QC[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278568e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9341243899345856590e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.5853394797230870728e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5118095066341608816e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0726385991103820119e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4550094401904961825e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T PS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.3220913409857223519e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.5145160675335701966e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6178836581270835179e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8494262873223866797e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7063754290207680021e+03)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5265133846636032186e+01)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0)),
- };
- static const T QS[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0871281941028743574e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8194580422439972989e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4194606696037208929e+06)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0029443582266975117e+05)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.7890229745772202641e+04)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.6383677696049909675e+02)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
- };
- static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1971413260310170351e+00)),
- x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.4296810407941351328e+00)),
- x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.620e+02)),
- x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8288260310170351490e-03)),
- x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3900e+03)),
- x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.4592058648672279948e-06))
- ;
- T value, factor, r, rc, rs;
-
- BOOST_MATH_STD_USING
- using namespace boost::math::tools;
- using namespace boost::math::constants;
-
- if (x <= 0)
- {
- return policies::raise_domain_error<T>("bost::math::bessel_y1<%1%>(%1%,%1%)",
- "Got x == %1%, but x must be > 0, complex result not supported.", x, pol);
- }
- if (x <= 4) // x in (0, 4]
- {
- T y = x * x;
- T z = 2 * log(x/x1) * bessel_j1(x) / pi<T>();
- r = evaluate_rational(P1, Q1, y);
- factor = (x + x1) * ((x - x11/256) - x12) / x;
- value = z + factor * r;
- }
- else if (x <= 8) // x in (4, 8]
- {
- T y = x * x;
- T z = 2 * log(x/x2) * bessel_j1(x) / pi<T>();
- r = evaluate_rational(P2, Q2, y);
- factor = (x + x2) * ((x - x21/256) - x22) / x;
- value = z + factor * r;
- }
- else // x in (8, \infty)
- {
- T y = 8 / x;
- T y2 = y * y;
- rc = evaluate_rational(PC, QC, y2);
- rs = evaluate_rational(PS, QS, y2);
- factor = 1 / (sqrt(x) * root_pi<T>());
- //
- // This code is really just:
- //
- // T z = x - 0.75f * pi<T>();
- // value = factor * (rc * sin(z) + y * rs * cos(z));
- //
- // But using the sin/cos addition rules, plus constants for sin/cos of 3PI/4
- // which then cancel out with corresponding terms in "factor".
- //
- T sx = sin(x);
- T cx = cos(x);
- value = factor * (y * rs * (sx - cx) - rc * (sx + cx));
- }
-
- return value;
-}
-
-}}} // namespaces
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MATH_BESSEL_Y1_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index eb3d4ba93e7..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_large.hpp
+++ /dev/null
@@ -1,768 +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)
-//
-// This file implements the asymptotic expansions of the incomplete
-// gamma functions P(a, x) and Q(a, x), used when a is large and
-// x ~ a.
-//
-// The primary reference is:
-//
-// "The Asymptotic Expansion of the Incomplete Gamma Functions"
-// N. M. Temme.
-// Siam J. Math Anal. Vol 10 No 4, July 1979, p757.
-//
-// A different way of evaluating these expansions,
-// plus a lot of very useful background information is in:
-//
-// "A Set of Algorithms For the Incomplete Gamma Functions."
-// N. M. Temme.
-// Probability in the Engineering and Informational Sciences,
-// 8, 1994, 291.
-//
-// An alternative implementation is in:
-//
-// "Computation of the Incomplete Gamma Function Ratios and their Inverse."
-// A. R. Didonato and A. H. Morris.
-// ACM TOMS, Vol 12, No 4, Dec 1986, p377.
-//
-// There are various versions of the same code below, each accurate
-// to a different precision. To understand the code, refer to Didonato
-// and Morris, from Eq 17 and 18 onwards.
-//
-// The coefficients used here are not taken from Didonato and Morris:
-// the domain over which these expansions are used is slightly different
-// to theirs, and their constants are not quite accurate enough for
-// 128-bit long double's. Instead the coefficients were calculated
-// using the methods described by Temme p762 from Eq 3.8 onwards.
-// The values obtained agree with those obtained by Didonato and Morris
-// (at least to the first 30 digits that they provide).
-// At double precision the degrees of polynomial required for full
-// machine precision are close to those recomended to Didonato and Morris,
-// but of course many more terms are needed for larger types.
-//
-#ifndef BOOST_MATH_DETAIL_IGAMMA_LARGE
-#define BOOST_MATH_DETAIL_IGAMMA_LARGE
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-namespace boost{ namespace math{ namespace detail{
-
-// This version will never be called (at runtime), it's a stub used
-// when T is unsuitable to be passed to these routines:
-//
-template <class T, class Policy>
-inline T igamma_temme_large(T, T, const Policy& /* pol */, mpl::int_<0> const *)
-{
- // stub function, should never actually be called
- BOOST_ASSERT(0);
- return 0;
-}
-//
-// This version is accurate for up to 64-bit mantissa's,
-// (80-bit long double, or 10^-20).
-//
-template <class T, class Policy>
-T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<64> const *)
-{
- BOOST_MATH_STD_USING // ADL of std functions
- T sigma = (x - a) / a;
- T phi = -boost::math::log1pmx(sigma, pol);
- T y = a * phi;
- T z = sqrt(2 * phi);
- if(x < a)
- z = -z;
-
- T workspace[13];
-
- static const T C0[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.333333333333333333333),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0833333333333333333333),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0148148148148148148148),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00115740740740740740741),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000352733686067019400353),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0001787551440329218107),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.39192631785224377817e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.218544851067999216147e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.18540622107151599607e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.829671134095308600502e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.176659527368260793044e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.670785354340149858037e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.102618097842403080426e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.438203601845335318655e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.914769958223679023418e-9),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.255141939949462497669e-10),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.583077213255042506746e-10),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.243619480206674162437e-10),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.502766928011417558909e-11),
- };
- workspace[0] = tools::evaluate_polynomial(C0, z);
-
- static const T C1[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00185185185185185185185),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00347222222222222222222),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00264550264550264550265),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000990226337448559670782),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000205761316872427983539),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.40187757201646090535e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.18098550334489977837e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.764916091608111008464e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.161209008945634460038e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.464712780280743434226e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.137863344691572095931e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.575254560351770496402e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.119516285997781473243e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.175432417197476476238e-10),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.100915437106004126275e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.416279299184258263623e-9),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.856390702649298063807e-10),
- };
- workspace[1] = tools::evaluate_polynomial(C1, z);
-
- static const T C2[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00413359788359788359788),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00268132716049382716049),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000771604938271604938272),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.200938786008230452675e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000107366532263651605215),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.529234488291201254164e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.127606351886187277134e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.342357873409613807419e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.137219573090629332056e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.629899213838005502291e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.142806142060642417916e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.204770984219908660149e-9),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.140925299108675210533e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.622897408492202203356e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.136704883966171134993e-8),
- };
- workspace[2] = tools::evaluate_polynomial(C2, z);
-
- static const T C3[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000649434156378600823045),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000229472093621399176955),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000469189494395255712128),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000267720632062838852962),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.756180167188397641073e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.239650511386729665193e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.110826541153473023615e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.56749528269915965675e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.142309007324358839146e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.278610802915281422406e-10),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.169584040919302772899e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.809946490538808236335e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.191111684859736540607e-7),
- };
- workspace[3] = tools::evaluate_polynomial(C3, z);
-
- static const T C4[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000861888290916711698605),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000784039221720066627474),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000299072480303190179733),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.146384525788434181781e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.664149821546512218666e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.396836504717943466443e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.113757269706784190981e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.250749722623753280165e-9),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.169541495365583060147e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.890750753220530968883e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.229293483400080487057e-6),
- };
- workspace[4] = tools::evaluate_polynomial(C4, z);
-
- static const T C5[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000336798553366358150309),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.697281375836585777429e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000277275324495939207873),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000199325705161888477003),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.679778047793720783882e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.141906292064396701483e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.135940481897686932785e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.801847025633420153972e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.229148117650809517038e-5),
- };
- workspace[5] = tools::evaluate_polynomial(C5, z);
-
- static const T C6[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000531307936463992223166),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000592166437353693882865),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000270878209671804482771),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.790235323266032787212e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.815396936756196875093e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.561168275310624965004e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.183291165828433755673e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.307961345060330478256e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.346515536880360908674e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.20291327396058603727e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.57887928631490037089e-6),
- };
- workspace[6] = tools::evaluate_polynomial(C6, z);
-
- static const T C7[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000344367606892377671254),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.517179090826059219337e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000334931610811422363117),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000281269515476323702274),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000109765822446847310235),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.127410090954844853795e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.277444515115636441571e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.182634888057113326614e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.578769494973505239894e-5),
- };
- workspace[7] = tools::evaluate_polynomial(C7, z);
-
- static const T C8[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000652623918595309418922),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000839498720672087279993),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000438297098541721005061),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.696909145842055197137e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000166448466420675478374),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000127835176797692185853),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.462995326369130429061e-4),
- };
- workspace[8] = tools::evaluate_polynomial(C8, z);
-
- static const T C9[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000596761290192746250124),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.720489541602001055909e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000678230883766732836162),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0006401475260262758451),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000277501076343287044992),
- };
- workspace[9] = tools::evaluate_polynomial(C9, z);
-
- static const T C10[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00133244544948006563713),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0019144384985654775265),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00110893691345966373396),
- };
- workspace[10] = tools::evaluate_polynomial(C10, z);
-
- static const T C11[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00157972766073083495909),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000162516262783915816899),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00206334210355432762645),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00213896861856890981541),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00101085593912630031708),
- };
- workspace[11] = tools::evaluate_polynomial(C11, z);
-
- static const T C12[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00407251211951401664727),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00640336283380806979482),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00404101610816766177474),
- };
- workspace[12] = tools::evaluate_polynomial(C12, z);
-
- T result = tools::evaluate_polynomial<13, T, T>(workspace, 1/a);
- result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
- if(x < a)
- result = -result;
-
- result += boost::math::erfc(sqrt(y), pol) / 2;
-
- return result;
-}
-//
-// This one is accurate for 53-bit mantissa's
-// (IEEE double precision or 10^-17).
-//
-template <class T, class Policy>
-T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<53> const *)
-{
- BOOST_MATH_STD_USING // ADL of std functions
- T sigma = (x - a) / a;
- T phi = -boost::math::log1pmx(sigma, pol);
- T y = a * phi;
- T z = sqrt(2 * phi);
- if(x < a)
- z = -z;
-
- T workspace[10];
-
- static const T C0[] = {
- static_cast<T>(-0.33333333333333333L),
- static_cast<T>(0.083333333333333333L),
- static_cast<T>(-0.014814814814814815L),
- static_cast<T>(0.0011574074074074074L),
- static_cast<T>(0.0003527336860670194L),
- static_cast<T>(-0.00017875514403292181L),
- static_cast<T>(0.39192631785224378e-4L),
- static_cast<T>(-0.21854485106799922e-5L),
- static_cast<T>(-0.185406221071516e-5L),
- static_cast<T>(0.8296711340953086e-6L),
- static_cast<T>(-0.17665952736826079e-6L),
- static_cast<T>(0.67078535434014986e-8L),
- static_cast<T>(0.10261809784240308e-7L),
- static_cast<T>(-0.43820360184533532e-8L),
- static_cast<T>(0.91476995822367902e-9L),
- };
- workspace[0] = tools::evaluate_polynomial(C0, z);
-
- static const T C1[] = {
- static_cast<T>(-0.0018518518518518519L),
- static_cast<T>(-0.0034722222222222222L),
- static_cast<T>(0.0026455026455026455L),
- static_cast<T>(-0.00099022633744855967L),
- static_cast<T>(0.00020576131687242798L),
- static_cast<T>(-0.40187757201646091e-6L),
- static_cast<T>(-0.18098550334489978e-4L),
- static_cast<T>(0.76491609160811101e-5L),
- static_cast<T>(-0.16120900894563446e-5L),
- static_cast<T>(0.46471278028074343e-8L),
- static_cast<T>(0.1378633446915721e-6L),
- static_cast<T>(-0.5752545603517705e-7L),
- static_cast<T>(0.11951628599778147e-7L),
- };
- workspace[1] = tools::evaluate_polynomial(C1, z);
-
- static const T C2[] = {
- static_cast<T>(0.0041335978835978836L),
- static_cast<T>(-0.0026813271604938272L),
- static_cast<T>(0.00077160493827160494L),
- static_cast<T>(0.20093878600823045e-5L),
- static_cast<T>(-0.00010736653226365161L),
- static_cast<T>(0.52923448829120125e-4L),
- static_cast<T>(-0.12760635188618728e-4L),
- static_cast<T>(0.34235787340961381e-7L),
- static_cast<T>(0.13721957309062933e-5L),
- static_cast<T>(-0.6298992138380055e-6L),
- static_cast<T>(0.14280614206064242e-6L),
- };
- workspace[2] = tools::evaluate_polynomial(C2, z);
-
- static const T C3[] = {
- static_cast<T>(0.00064943415637860082L),
- static_cast<T>(0.00022947209362139918L),
- static_cast<T>(-0.00046918949439525571L),
- static_cast<T>(0.00026772063206283885L),
- static_cast<T>(-0.75618016718839764e-4L),
- static_cast<T>(-0.23965051138672967e-6L),
- static_cast<T>(0.11082654115347302e-4L),
- static_cast<T>(-0.56749528269915966e-5L),
- static_cast<T>(0.14230900732435884e-5L),
- };
- workspace[3] = tools::evaluate_polynomial(C3, z);
-
- static const T C4[] = {
- static_cast<T>(-0.0008618882909167117L),
- static_cast<T>(0.00078403922172006663L),
- static_cast<T>(-0.00029907248030319018L),
- static_cast<T>(-0.14638452578843418e-5L),
- static_cast<T>(0.66414982154651222e-4L),
- static_cast<T>(-0.39683650471794347e-4L),
- static_cast<T>(0.11375726970678419e-4L),
- };
- workspace[4] = tools::evaluate_polynomial(C4, z);
-
- static const T C5[] = {
- static_cast<T>(-0.00033679855336635815L),
- static_cast<T>(-0.69728137583658578e-4L),
- static_cast<T>(0.00027727532449593921L),
- static_cast<T>(-0.00019932570516188848L),
- static_cast<T>(0.67977804779372078e-4L),
- static_cast<T>(0.1419062920643967e-6L),
- static_cast<T>(-0.13594048189768693e-4L),
- static_cast<T>(0.80184702563342015e-5L),
- static_cast<T>(-0.22914811765080952e-5L),
- };
- workspace[5] = tools::evaluate_polynomial(C5, z);
-
- static const T C6[] = {
- static_cast<T>(0.00053130793646399222L),
- static_cast<T>(-0.00059216643735369388L),
- static_cast<T>(0.00027087820967180448L),
- static_cast<T>(0.79023532326603279e-6L),
- static_cast<T>(-0.81539693675619688e-4L),
- static_cast<T>(0.56116827531062497e-4L),
- static_cast<T>(-0.18329116582843376e-4L),
- };
- workspace[6] = tools::evaluate_polynomial(C6, z);
-
- static const T C7[] = {
- static_cast<T>(0.00034436760689237767L),
- static_cast<T>(0.51717909082605922e-4L),
- static_cast<T>(-0.00033493161081142236L),
- static_cast<T>(0.0002812695154763237L),
- static_cast<T>(-0.00010976582244684731L),
- };
- workspace[7] = tools::evaluate_polynomial(C7, z);
-
- static const T C8[] = {
- static_cast<T>(-0.00065262391859530942L),
- static_cast<T>(0.00083949872067208728L),
- static_cast<T>(-0.00043829709854172101L),
- };
- workspace[8] = tools::evaluate_polynomial(C8, z);
- workspace[9] = static_cast<T>(-0.00059676129019274625L);
-
- T result = tools::evaluate_polynomial<10, T, T>(workspace, 1/a);
- result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
- if(x < a)
- result = -result;
-
- result += boost::math::erfc(sqrt(y), pol) / 2;
-
- return result;
-}
-//
-// This one is accurate for 24-bit mantissa's
-// (IEEE float precision, or 10^-8)
-//
-template <class T, class Policy>
-T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<24> const *)
-{
- BOOST_MATH_STD_USING // ADL of std functions
- T sigma = (x - a) / a;
- T phi = -boost::math::log1pmx(sigma, pol);
- T y = a * phi;
- T z = sqrt(2 * phi);
- if(x < a)
- z = -z;
-
- T workspace[3];
-
- static const T C0[] = {
- static_cast<T>(-0.333333333L),
- static_cast<T>(0.0833333333L),
- static_cast<T>(-0.0148148148L),
- static_cast<T>(0.00115740741L),
- static_cast<T>(0.000352733686L),
- static_cast<T>(-0.000178755144L),
- static_cast<T>(0.391926318e-4L),
- };
- workspace[0] = tools::evaluate_polynomial(C0, z);
-
- static const T C1[] = {
- static_cast<T>(-0.00185185185L),
- static_cast<T>(-0.00347222222L),
- static_cast<T>(0.00264550265L),
- static_cast<T>(-0.000990226337L),
- static_cast<T>(0.000205761317L),
- };
- workspace[1] = tools::evaluate_polynomial(C1, z);
-
- static const T C2[] = {
- static_cast<T>(0.00413359788L),
- static_cast<T>(-0.00268132716L),
- static_cast<T>(0.000771604938L),
- };
- workspace[2] = tools::evaluate_polynomial(C2, z);
-
- T result = tools::evaluate_polynomial(workspace, 1/a);
- result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
- if(x < a)
- result = -result;
-
- result += boost::math::erfc(sqrt(y), pol) / 2;
-
- return result;
-}
-//
-// And finally, a version for 113-bit mantissa's
-// (128-bit long doubles, or 10^-34).
-// Note this one has been optimised for a > 200
-// It's use for a < 200 is not recomended, that would
-// require many more terms in the polynomials.
-//
-template <class T, class Policy>
-T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<113> const *)
-{
- BOOST_MATH_STD_USING // ADL of std functions
- T sigma = (x - a) / a;
- T phi = -boost::math::log1pmx(sigma, pol);
- T y = a * phi;
- T z = sqrt(2 * phi);
- if(x < a)
- z = -z;
-
- T workspace[14];
-
- static const T C0[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.333333333333333333333333333333333333),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0833333333333333333333333333333333333),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0148148148148148148148148148148148148),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00115740740740740740740740740740740741),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0003527336860670194003527336860670194),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000178755144032921810699588477366255144),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.391926317852243778169704095630021556e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.218544851067999216147364295512443661e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.185406221071515996070179883622956325e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.829671134095308600501624213166443227e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.17665952736826079304360054245742403e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.670785354340149858036939710029613572e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.102618097842403080425739573227252951e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.438203601845335318655297462244719123e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.914769958223679023418248817633113681e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.255141939949462497668779537993887013e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.583077213255042506746408945040035798e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.243619480206674162436940696707789943e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.502766928011417558909054985925744366e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.110043920319561347708374174497293411e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.337176326240098537882769884169200185e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.13923887224181620659193661848957998e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.285348938070474432039669099052828299e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.513911183424257261899064580300494205e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.197522882943494428353962401580710912e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.809952115670456133407115668702575255e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.165225312163981618191514820265351162e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.253054300974788842327061090060267385e-17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.116869397385595765888230876507793475e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.477003704982048475822167804084816597e-17),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.969912605905623712420709685898585354e-18),
- };
- workspace[0] = tools::evaluate_polynomial(C0, z);
-
- static const T C1[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00185185185185185185185185185185185185),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00347222222222222222222222222222222222),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0026455026455026455026455026455026455),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000990226337448559670781893004115226337),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000205761316872427983539094650205761317),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.401877572016460905349794238683127572e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.180985503344899778370285914867533523e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.76491609160811100846374214980916921e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.16120900894563446003775221882217767e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.464712780280743434226135033938722401e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.137863344691572095931187533077488877e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.575254560351770496402194531835048307e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.119516285997781473243076536699698169e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.175432417197476476237547551202312502e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.100915437106004126274577504686681675e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.416279299184258263623372347219858628e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.856390702649298063807431562579670208e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.606721510160475861512701762169919581e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.716249896481148539007961017165545733e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.293318664377143711740636683615595403e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.599669636568368872330374527568788909e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.216717865273233141017100472779701734e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.497833997236926164052815522048108548e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.202916288237134247736694804325894226e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.413125571381061004935108332558187111e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.828651623988309644380188591057589316e-18),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.341003088693333279336339355910600992e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.138541953028939715357034547426313703e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.281234665322887466568860332727259483e-16),
- };
- workspace[1] = tools::evaluate_polynomial(C1, z);
-
- static const T C2[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0041335978835978835978835978835978836),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00268132716049382716049382716049382716),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000771604938271604938271604938271604938),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.200938786008230452674897119341563786e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000107366532263651605215391223621676297),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.529234488291201254164217127180090143e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.127606351886187277133779191392360117e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.34235787340961380741902003904747389e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.137219573090629332055943852926020279e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.629899213838005502290672234278391876e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.142806142060642417915846008822771748e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.204770984219908660149195854409200226e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.140925299108675210532930244154315272e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.622897408492202203356394293530327112e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.136704883966171134992724380284402402e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.942835615901467819547711211663208075e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.128722524000893180595479368872770442e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.556459561343633211465414765894951439e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.119759355463669810035898150310311343e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.416897822518386350403836626692480096e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.109406404278845944099299008640802908e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.4662239946390135746326204922464679e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.990510576390690597844122258212382301e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.189318767683735145056885183170630169e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.885922187259112726176031067028740667e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.373782039804640545306560251777191937e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.786883363903515525774088394065960751e-15),
- };
- workspace[2] = tools::evaluate_polynomial(C2, z);
-
- static const T C3[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000649434156378600823045267489711934156),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000229472093621399176954732510288065844),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000469189494395255712128140111679206329),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000267720632062838852962309752433209223),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.756180167188397641072538191879755666e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.239650511386729665193314027333231723e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.110826541153473023614770299726861227e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.567495282699159656749963105701560205e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.14230900732435883914551894470580433e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.278610802915281422405802158211174452e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.16958404091930277289864168795820267e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.809946490538808236335278504852724081e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.191111684859736540606728140872727635e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.239286204398081179686413514022282056e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.206201318154887984369925818486654549e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.946049666185513217375417988510192814e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.215410497757749078380130268468744512e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.138882333681390304603424682490735291e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.218947616819639394064123400466489455e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.979099895117168512568262802255883368e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.217821918801809621153859472011393244e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.62088195734079014258166361684972205e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.212697836327973697696702537114614471e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.934468879151743333127396765626749473e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.204536712267828493249215913063207436e-13),
- };
- workspace[3] = tools::evaluate_polynomial(C3, z);
-
- static const T C4[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000861888290916711698604702719929057378),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00078403922172006662747403488144228885),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000299072480303190179733389609932819809),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.146384525788434181781232535690697556e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.664149821546512218665853782451862013e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.396836504717943466443123507595386882e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.113757269706784190980552042885831759e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.250749722623753280165221942390057007e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.169541495365583060147164356781525752e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.890750753220530968882898422505515924e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.229293483400080487057216364891158518e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.295679413754404904696572852500004588e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.288658297427087836297341274604184504e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.141897394378032193894774303903982717e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.344635804994648970659527720474194356e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.230245171745280671320192735850147087e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.394092330280464052750697640085291799e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.186023389685045019134258533045185639e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.435632300505661804380678327446262424e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.127860010162962312660550463349930726e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.467927502665791946200382739991760062e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.214924647061348285410535341910721086e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.490881561480965216323649688463984082e-12),
- };
- workspace[4] = tools::evaluate_polynomial(C4, z);
-
- static const T C5[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000336798553366358150308767592718210002),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.697281375836585777429398828575783308e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00027727532449593920787336425196507501),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000199325705161888477003360405280844238),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.679778047793720783881640176604435742e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.141906292064396701483392727105575757e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.135940481897686932784583938837504469e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.80184702563342015397192571980419684e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.229148117650809517038048790128781806e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.325247355129845395166230137750005047e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.346528464910852649559195496827579815e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.184471871911713432765322367374920978e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.482409670378941807563762631738989002e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.179894667217435153025754291716644314e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.630619450001352343517516981425944698e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.316241762877456793773762181540969623e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.784092425369742929000839303523267545e-9),
- };
- workspace[5] = tools::evaluate_polynomial(C5, z);
-
- static const T C6[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00053130793646399222316574854297762391),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000592166437353693882864836225604401187),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000270878209671804482771279183488328692),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.790235323266032787212032944390816666e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.815396936756196875092890088464682624e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.561168275310624965003775619041471695e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.183291165828433755673259749374098313e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.307961345060330478256414192546677006e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.346515536880360908673728529745376913e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.202913273960586037269527254582695285e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.578879286314900370889997586203187687e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.233863067382665698933480579231637609e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.88286007463304835250508524317926246e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.474359588804081278032150770595852426e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.125454150207103824457130611214783073e-7),
- };
- workspace[6] = tools::evaluate_polynomial(C6, z);
-
- static const T C7[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000344367606892377671254279625108523655),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.517179090826059219337057843002058823e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000334931610811422363116635090580012327),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000281269515476323702273722110707777978),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000109765822446847310235396824500789005),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.127410090954844853794579954588107623e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.277444515115636441570715073933712622e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.182634888057113326614324442681892723e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.578769494973505239894178121070843383e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.493875893393627039981813418398565502e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.105953670140260427338098566209633945e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.616671437611040747858836254004890765e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.175629733590604619378669693914265388e-6),
- };
- workspace[7] = tools::evaluate_polynomial(C7, z);
-
- static const T C8[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000652623918595309418922034919726622692),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000839498720672087279993357516764983445),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000438297098541721005061087953050560377),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.696909145842055197136911097362072702e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00016644846642067547837384572662326101),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000127835176797692185853344001461664247),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.462995326369130429061361032704489636e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.455790986792270771162749294232219616e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.105952711258051954718238500312872328e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.678334290486516662273073740749269432e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.210754766662588042469972680229376445e-5),
- };
- workspace[8] = tools::evaluate_polynomial(C8, z);
-
- static const T C9[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000596761290192746250124390067179459605),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.720489541602001055908571930225015052e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000678230883766732836161951166000673426),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000640147526026275845100045652582354779),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000277501076343287044992374518205845463),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.181970083804651510461686554030325202e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.847950711706850318239732559632810086e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.610519208250153101764709122740859458e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.210739201834048624082975255893773306e-4),
- };
- workspace[9] = tools::evaluate_polynomial(C9, z);
-
- static const T C10[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00133244544948006563712694993432717968),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00191443849856547752650089885832852254),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0011089369134596637339607446329267522),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.993240412264229896742295262075817566e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000508745012930931989848393025305956774),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00042735056665392884328432271160040444),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000168588537679107988033552814662382059),
- };
- workspace[10] = tools::evaluate_polynomial(C10, z);
-
- static const T C11[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00157972766073083495908785631307733022),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000162516262783915816898635123980270998),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00206334210355432762645284467690276817),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00213896861856890981541061922797693947),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00101085593912630031708085801712479376),
- };
- workspace[11] = tools::evaluate_polynomial(C11, z);
-
- static const T C12[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00407251211951401664727281097914544601),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00640336283380806979482363809026579583),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00404101610816766177473974858518094879),
- };
- workspace[12] = tools::evaluate_polynomial(C12, z);
- workspace[13] = -0.0059475779383993002845382844736066323L;
-
- T result = tools::evaluate_polynomial(workspace, T(1/a));
- result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
- if(x < a)
- result = -result;
-
- result += boost::math::erfc(sqrt(y), pol) / 2;
-
- return result;
-}
-
-} // namespace detail
-} // namespace math
-} // namespace math
-
-
-#endif // BOOST_MATH_DETAIL_IGAMMA_LARGE
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index e65f8b7e98e..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lgamma_small.hpp
+++ /dev/null
@@ -1,522 +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_FUNCTIONS_DETAIL_LGAMMA_SMALL
-#define BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/tools/big_constant.hpp>
-
-namespace boost{ namespace math{ namespace detail{
-
-//
-// These need forward declaring to keep GCC happy:
-//
-template <class T, class Policy, class Lanczos>
-T gamma_imp(T z, const Policy& pol, const Lanczos& l);
-template <class T, class Policy>
-T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l);
-
-//
-// lgamma for small arguments:
-//
-template <class T, class Policy, class Lanczos>
-T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<64>&, const Policy& /* l */, const Lanczos&)
-{
- // This version uses rational approximations for small
- // values of z accurate enough for 64-bit mantissas
- // (80-bit long doubles), works well for 53-bit doubles as well.
- // Lanczos is only used to select the Lanczos function.
-
- BOOST_MATH_STD_USING // for ADL of std names
- T result = 0;
- if(z < tools::epsilon<T>())
- {
- result = -log(z);
- }
- else if((zm1 == 0) || (zm2 == 0))
- {
- // nothing to do, result is zero....
- }
- else if(z > 2)
- {
- //
- // Begin by performing argument reduction until
- // z is in [2,3):
- //
- if(z >= 3)
- {
- do
- {
- z -= 1;
- zm2 -= 1;
- result += log(z);
- }while(z >= 3);
- // Update zm2, we need it below:
- zm2 = z - 2;
- }
-
- //
- // Use the following form:
- //
- // lgamma(z) = (z-2)(z+1)(Y + R(z-2))
- //
- // where R(z-2) is a rational approximation optimised for
- // low absolute error - as long as it's absolute error
- // is small compared to the constant Y - then any rounding
- // error in it's computation will get wiped out.
- //
- // R(z-2) has the following properties:
- //
- // At double: Max error found: 4.231e-18
- // At long double: Max error found: 1.987e-21
- // Maximum Deviation Found (approximation error): 5.900e-24
- //
- static const T P[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.180355685678449379109e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.25126649619989678683e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.494103151567532234274e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.172491608709613993966e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.259453563205438108893e-3)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.541009869215204396339e-3)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.324588649825948492091e-4))
- };
- static const T Q[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.196202987197795200688e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.148019669424231326694e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.541391432071720958364e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.988504251128010129477e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.82130967464889339326e-2)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.224936291922115757597e-3)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.223352763208617092964e-6))
- };
-
- static const float Y = 0.158963680267333984375e0f;
-
- T r = zm2 * (z + 1);
- T R = tools::evaluate_polynomial(P, zm2);
- R /= tools::evaluate_polynomial(Q, zm2);
-
- result += r * Y + r * R;
- }
- else
- {
- //
- // If z is less than 1 use recurrance to shift to
- // z in the interval [1,2]:
- //
- if(z < 1)
- {
- result += -log(z);
- zm2 = zm1;
- zm1 = z;
- z += 1;
- }
- //
- // Two approximations, on for z in [1,1.5] and
- // one for z in [1.5,2]:
- //
- if(z <= 1.5)
- {
- //
- // Use the following form:
- //
- // lgamma(z) = (z-1)(z-2)(Y + R(z-1))
- //
- // where R(z-1) is a rational approximation optimised for
- // low absolute error - as long as it's absolute error
- // is small compared to the constant Y - then any rounding
- // error in it's computation will get wiped out.
- //
- // R(z-1) has the following properties:
- //
- // At double precision: Max error found: 1.230011e-17
- // At 80-bit long double precision: Max error found: 5.631355e-21
- // Maximum Deviation Found: 3.139e-021
- // Expected Error Term: 3.139e-021
-
- //
- static const float Y = 0.52815341949462890625f;
-
- static const T P[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.490622454069039543534e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.969117530159521214579e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.414983358359495381969e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.406567124211938417342e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.158413586390692192217e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.240149820648571559892e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.100346687696279557415e-2))
- };
- static const T Q[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.302349829846463038743e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.348739585360723852576e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.191415588274426679201e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.507137738614363510846e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.577039722690451849648e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.195768102601107189171e-2))
- };
-
- T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1);
- T prefix = zm1 * zm2;
-
- result += prefix * Y + prefix * r;
- }
- else
- {
- //
- // Use the following form:
- //
- // lgamma(z) = (2-z)(1-z)(Y + R(2-z))
- //
- // where R(2-z) is a rational approximation optimised for
- // low absolute error - as long as it's absolute error
- // is small compared to the constant Y - then any rounding
- // error in it's computation will get wiped out.
- //
- // R(2-z) has the following properties:
- //
- // At double precision, max error found: 1.797565e-17
- // At 80-bit long double precision, max error found: 9.306419e-21
- // Maximum Deviation Found: 2.151e-021
- // Expected Error Term: 2.150e-021
- //
- static const float Y = 0.452017307281494140625f;
-
- static const T P[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.292329721830270012337e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.144216267757192309184e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.142440390738631274135e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.542809694055053558157e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.850535976868336437746e-2)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.431171342679297331241e-3))
- };
- static const T Q[] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.150169356054485044494e1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.846973248876495016101e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.220095151814995745555e0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.25582797155975869989e-1)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.100666795539143372762e-2)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.827193521891290553639e-6))
- };
- T r = zm2 * zm1;
- T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2));
-
- result += r * Y + r * R;
- }
- }
- return result;
-}
-template <class T, class Policy, class Lanczos>
-T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<113>&, const Policy& /* l */, const Lanczos&)
-{
- //
- // This version uses rational approximations for small
- // values of z accurate enough for 113-bit mantissas
- // (128-bit long doubles).
- //
- BOOST_MATH_STD_USING // for ADL of std names
- T result = 0;
- if(z < tools::epsilon<T>())
- {
- result = -log(z);
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- else if((zm1 == 0) || (zm2 == 0))
- {
- // nothing to do, result is zero....
- }
- else if(z > 2)
- {
- //
- // Begin by performing argument reduction until
- // z is in [2,3):
- //
- if(z >= 3)
- {
- do
- {
- z -= 1;
- result += log(z);
- }while(z >= 3);
- zm2 = z - 2;
- }
- BOOST_MATH_INSTRUMENT_CODE(zm2);
- BOOST_MATH_INSTRUMENT_CODE(z);
- BOOST_MATH_INSTRUMENT_CODE(result);
-
- //
- // Use the following form:
- //
- // lgamma(z) = (z-2)(z+1)(Y + R(z-2))
- //
- // where R(z-2) is a rational approximation optimised for
- // low absolute error - as long as it's absolute error
- // is small compared to the constant Y - then any rounding
- // error in it's computation will get wiped out.
- //
- // Maximum Deviation Found (approximation error) 3.73e-37
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.018035568567844937910504030027467476655),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.013841458273109517271750705401202404195),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.062031842739486600078866923383017722399),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.052518418329052161202007865149435256093),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.01881718142472784129191838493267755758),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0025104830367021839316463675028524702846),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00021043176101831873281848891452678568311),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00010249622350908722793327719494037981166),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.11381479670982006841716879074288176994e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.49999811718089980992888533630523892389e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.70529798686542184668416911331718963364e-8)
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.5877485070422317542808137697939233685),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.8797959228352591788629602533153837126),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.8030885955284082026405495275461180977),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.69774331297747390169238306148355428436),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.17261566063277623942044077039756583802),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.02729301254544230229429621192443000121),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0026776425891195270663133581960016620433),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00015244249160486584591370355730402168106),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.43997034032479866020546814475414346627e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.46295080708455613044541885534408170934e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.93326638207459533682980757982834180952e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.42316456553164995177177407325292867513e-13)
- };
-
- T R = tools::evaluate_polynomial(P, zm2);
- R /= tools::evaluate_polynomial(Q, zm2);
-
- static const float Y = 0.158963680267333984375F;
-
- T r = zm2 * (z + 1);
-
- result += r * Y + r * R;
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- else
- {
- //
- // If z is less than 1 use recurrance to shift to
- // z in the interval [1,2]:
- //
- if(z < 1)
- {
- result += -log(z);
- zm2 = zm1;
- zm1 = z;
- z += 1;
- }
- BOOST_MATH_INSTRUMENT_CODE(result);
- BOOST_MATH_INSTRUMENT_CODE(z);
- BOOST_MATH_INSTRUMENT_CODE(zm2);
- //
- // Three approximations, on for z in [1,1.35], [1.35,1.625] and [1.625,1]
- //
- if(z <= 1.35)
- {
- //
- // Use the following form:
- //
- // lgamma(z) = (z-1)(z-2)(Y + R(z-1))
- //
- // where R(z-1) is a rational approximation optimised for
- // low absolute error - as long as it's absolute error
- // is small compared to the constant Y - then any rounding
- // error in it's computation will get wiped out.
- //
- // R(z-1) has the following properties:
- //
- // Maximum Deviation Found (approximation error) 1.659e-36
- // Expected Error Term (theoretical error) 1.343e-36
- // Max error found at 128-bit long double precision 1.007e-35
- //
- static const float Y = 0.54076099395751953125f;
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.036454670944013329356512090082402429697),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.066235835556476033710068679907798799959),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.67492399795577182387312206593595565371),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.4345555263962411429855341651960000166),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.4894319559821365820516771951249649563),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.87210277668067964629483299712322411566),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.29602090537771744401524080430529369136),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0561832587517836908929331992218879676),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0053236785487328044334381502530383140443),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00018629360291358130461736386077971890789),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.10164985672213178500790406939467614498e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.13680157145361387405588201461036338274e-8)
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 4.9106336261005990534095838574132225599),
- BOOST_MATH_BIG_CONSTANT(T, 113, 10.258804800866438510889341082793078432),
- BOOST_MATH_BIG_CONSTANT(T, 113, 11.88588976846826108836629960537466889),
- BOOST_MATH_BIG_CONSTANT(T, 113, 8.3455000546999704314454891036700998428),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.6428823682421746343233362007194282703),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.97465989807254572142266753052776132252),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.15121052897097822172763084966793352524),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.012017363555383555123769849654484594893),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0003583032812720649835431669893011257277)
- };
-
- T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1);
- T prefix = zm1 * zm2;
-
- result += prefix * Y + prefix * r;
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- else if(z <= 1.625)
- {
- //
- // Use the following form:
- //
- // lgamma(z) = (2-z)(1-z)(Y + R(2-z))
- //
- // where R(2-z) is a rational approximation optimised for
- // low absolute error - as long as it's absolute error
- // is small compared to the constant Y - then any rounding
- // error in it's computation will get wiped out.
- //
- // R(2-z) has the following properties:
- //
- // Max error found at 128-bit long double precision 9.634e-36
- // Maximum Deviation Found (approximation error) 1.538e-37
- // Expected Error Term (theoretical error) 2.350e-38
- //
- static const float Y = 0.483787059783935546875f;
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.017977422421608624353488126610933005432),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.18484528905298309555089509029244135703),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.40401251514859546989565001431430884082),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.40277179799147356461954182877921388182),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.21993421441282936476709677700477598816),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.069595742223850248095697771331107571011),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.012681481427699686635516772923547347328),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0012489322866834830413292771335113136034),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.57058739515423112045108068834668269608e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.8207548771933585614380644961342925976e-6)
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.9629552288944259229543137757200262073),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.7118380799042118987185957298964772755),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.5569815272165399297600586376727357187),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0546764918220835097855665680632153367),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.26574021300894401276478730940980810831),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.03996289731752081380552901986471233462),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0033398680924544836817826046380586480873),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00013288854760548251757651556792598235735),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.17194794958274081373243161848194745111e-5)
- };
- T r = zm2 * zm1;
- T R = tools::evaluate_polynomial(P, T(0.625 - zm1)) / tools::evaluate_polynomial(Q, T(0.625 - zm1));
-
- result += r * Y + r * R;
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- else
- {
- //
- // Same form as above.
- //
- // Max error found (at 128-bit long double precision) 1.831e-35
- // Maximum Deviation Found (approximation error) 8.588e-36
- // Expected Error Term (theoretical error) 1.458e-36
- //
- static const float Y = 0.443811893463134765625f;
-
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.021027558364667626231512090082402429494),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.15128811104498736604523586803722368377),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.26249631480066246699388544451126410278),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.21148748610533489823742352180628489742),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.093964130697489071999873506148104370633),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.024292059227009051652542804957550866827),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0036284453226534839926304745756906117066),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0002939230129315195346843036254392485984),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.11088589183158123733132268042570710338e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.13240510580220763969511741896361984162e-6)
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.4240003754444040525462170802796471996),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.4868383476933178722203278602342786002),
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.4047068395206343375520721509193698547),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.47583809087867443858344765659065773369),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.09865724264554556400463655444270700132),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.012238223514176587501074150988445109735),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00084625068418239194670614419707491797097),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.2796574430456237061420839429225710602e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.30202973883316730694433702165188835331e-6)
- };
- // (2 - x) * (1 - x) * (c + R(2 - x))
- T r = zm2 * zm1;
- T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2));
-
- result += r * Y + r * R;
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- }
- BOOST_MATH_INSTRUMENT_CODE(result);
- return result;
-}
-template <class T, class Policy, class Lanczos>
-T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<0>&, const Policy& pol, const Lanczos&)
-{
- //
- // No rational approximations are available because either
- // T has no numeric_limits support (so we can't tell how
- // many digits it has), or T has more digits than we know
- // what to do with.... we do have a Lanczos approximation
- // though, and that can be used to keep errors under control.
- //
- BOOST_MATH_STD_USING // for ADL of std names
- T result = 0;
- if(z < tools::epsilon<T>())
- {
- result = -log(z);
- }
- else if(z < 0.5)
- {
- // taking the log of tgamma reduces the error, no danger of overflow here:
- result = log(gamma_imp(z, pol, Lanczos()));
- }
- else if(z >= 3)
- {
- // taking the log of tgamma reduces the error, no danger of overflow here:
- result = log(gamma_imp(z, pol, Lanczos()));
- }
- else if(z >= 1.5)
- {
- // special case near 2:
- T dz = zm2;
- result = dz * log((z + Lanczos::g() - T(0.5)) / boost::math::constants::e<T>());
- result += boost::math::log1p(dz / (Lanczos::g() + T(1.5)), pol) * T(1.5);
- result += boost::math::log1p(Lanczos::lanczos_sum_near_2(dz), pol);
- }
- else
- {
- // special case near 1:
- T dz = zm1;
- result = dz * log((z + Lanczos::g() - T(0.5)) / boost::math::constants::e<T>());
- result += boost::math::log1p(dz / (Lanczos::g() + T(0.5)), pol) / 2;
- result += boost::math::log1p(Lanczos::lanczos_sum_near_1(dz), pol);
- }
- return result;
-}
-
-}}} // namespaces
-
-#endif // BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 17366742c46..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_factorial.hpp
+++ /dev/null
@@ -1,805 +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_MATH_SP_UC_FACTORIALS_HPP
-#define BOOST_MATH_SP_UC_FACTORIALS_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push) // Temporary until lexical cast fixed.
-#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 <cmath>
-#include <boost/math/special_functions/math_fwd.hpp>
-
-#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
-#include <array>
-#else
-#include <boost/array.hpp>
-#endif
-
-namespace boost { namespace math
-{
-// Forward declarations:
-template <class T>
-struct max_factorial;
-
-// Definitions:
-template <>
-inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION float unchecked_factorial<float>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(float))
-{
-#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
- constexpr std::array<float, 35> factorials = { {
-#else
- static const boost::array<float, 35> factorials = {{
-#endif
- 1.0F,
- 1.0F,
- 2.0F,
- 6.0F,
- 24.0F,
- 120.0F,
- 720.0F,
- 5040.0F,
- 40320.0F,
- 362880.0F,
- 3628800.0F,
- 39916800.0F,
- 479001600.0F,
- 6227020800.0F,
- 87178291200.0F,
- 1307674368000.0F,
- 20922789888000.0F,
- 355687428096000.0F,
- 6402373705728000.0F,
- 121645100408832000.0F,
- 0.243290200817664e19F,
- 0.5109094217170944e20F,
- 0.112400072777760768e22F,
- 0.2585201673888497664e23F,
- 0.62044840173323943936e24F,
- 0.15511210043330985984e26F,
- 0.403291461126605635584e27F,
- 0.10888869450418352160768e29F,
- 0.304888344611713860501504e30F,
- 0.8841761993739701954543616e31F,
- 0.26525285981219105863630848e33F,
- 0.822283865417792281772556288e34F,
- 0.26313083693369353016721801216e36F,
- 0.868331761881188649551819440128e37F,
- 0.29523279903960414084761860964352e39F,
- }};
-
- return factorials[i];
-}
-
-template <>
-struct max_factorial<float>
-{
- BOOST_STATIC_CONSTANT(unsigned, value = 34);
-};
-
-
-template <>
-inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION long double unchecked_factorial<long double>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(long double))
-{
-#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
- constexpr std::array<long double, 171> factorials = { {
-#else
- static const boost::array<long double, 171> factorials = {{
-#endif
- 1L,
- 1L,
- 2L,
- 6L,
- 24L,
- 120L,
- 720L,
- 5040L,
- 40320L,
- 362880.0L,
- 3628800.0L,
- 39916800.0L,
- 479001600.0L,
- 6227020800.0L,
- 87178291200.0L,
- 1307674368000.0L,
- 20922789888000.0L,
- 355687428096000.0L,
- 6402373705728000.0L,
- 121645100408832000.0L,
- 0.243290200817664e19L,
- 0.5109094217170944e20L,
- 0.112400072777760768e22L,
- 0.2585201673888497664e23L,
- 0.62044840173323943936e24L,
- 0.15511210043330985984e26L,
- 0.403291461126605635584e27L,
- 0.10888869450418352160768e29L,
- 0.304888344611713860501504e30L,
- 0.8841761993739701954543616e31L,
- 0.26525285981219105863630848e33L,
- 0.822283865417792281772556288e34L,
- 0.26313083693369353016721801216e36L,
- 0.868331761881188649551819440128e37L,
- 0.29523279903960414084761860964352e39L,
- 0.103331479663861449296666513375232e41L,
- 0.3719933267899012174679994481508352e42L,
- 0.137637530912263450463159795815809024e44L,
- 0.5230226174666011117600072241000742912e45L,
- 0.203978820811974433586402817399028973568e47L,
- 0.815915283247897734345611269596115894272e48L,
- 0.3345252661316380710817006205344075166515e50L,
- 0.1405006117752879898543142606244511569936e52L,
- 0.6041526306337383563735513206851399750726e53L,
- 0.265827157478844876804362581101461589032e55L,
- 0.1196222208654801945619631614956577150644e57L,
- 0.5502622159812088949850305428800254892962e58L,
- 0.2586232415111681806429643551536119799692e60L,
- 0.1241391559253607267086228904737337503852e62L,
- 0.6082818640342675608722521633212953768876e63L,
- 0.3041409320171337804361260816606476884438e65L,
- 0.1551118753287382280224243016469303211063e67L,
- 0.8065817517094387857166063685640376697529e68L,
- 0.427488328406002556429801375338939964969e70L,
- 0.2308436973392413804720927426830275810833e72L,
- 0.1269640335365827592596510084756651695958e74L,
- 0.7109985878048634518540456474637249497365e75L,
- 0.4052691950487721675568060190543232213498e77L,
- 0.2350561331282878571829474910515074683829e79L,
- 0.1386831185456898357379390197203894063459e81L,
- 0.8320987112741390144276341183223364380754e82L,
- 0.507580213877224798800856812176625227226e84L,
- 0.3146997326038793752565312235495076408801e86L,
- 0.1982608315404440064116146708361898137545e88L,
- 0.1268869321858841641034333893351614808029e90L,
- 0.8247650592082470666723170306785496252186e91L,
- 0.5443449390774430640037292402478427526443e93L,
- 0.3647111091818868528824985909660546442717e95L,
- 0.2480035542436830599600990418569171581047e97L,
- 0.1711224524281413113724683388812728390923e99L,
- 0.1197857166996989179607278372168909873646e101L,
- 0.8504785885678623175211676442399260102886e102L,
- 0.6123445837688608686152407038527467274078e104L,
- 0.4470115461512684340891257138125051110077e106L,
- 0.3307885441519386412259530282212537821457e108L,
- 0.2480914081139539809194647711659403366093e110L,
- 0.188549470166605025498793226086114655823e112L,
- 0.1451830920282858696340707840863082849837e114L,
- 0.1132428117820629783145752115873204622873e116L,
- 0.8946182130782975286851441715398316520698e117L,
- 0.7156945704626380229481153372318653216558e119L,
- 0.5797126020747367985879734231578109105412e121L,
- 0.4753643337012841748421382069894049466438e123L,
- 0.3945523969720658651189747118012061057144e125L,
- 0.3314240134565353266999387579130131288001e127L,
- 0.2817104114380550276949479442260611594801e129L,
- 0.2422709538367273238176552320344125971528e131L,
- 0.210775729837952771721360051869938959523e133L,
- 0.1854826422573984391147968456455462843802e135L,
- 0.1650795516090846108121691926245361930984e137L,
- 0.1485715964481761497309522733620825737886e139L,
- 0.1352001527678402962551665687594951421476e141L,
- 0.1243841405464130725547532432587355307758e143L,
- 0.1156772507081641574759205162306240436215e145L,
- 0.1087366156656743080273652852567866010042e147L,
- 0.103299784882390592625997020993947270954e149L,
- 0.9916779348709496892095714015418938011582e150L,
- 0.9619275968248211985332842594956369871234e152L,
- 0.942689044888324774562618574305724247381e154L,
- 0.9332621544394415268169923885626670049072e156L,
- 0.9332621544394415268169923885626670049072e158L,
- 0.9425947759838359420851623124482936749562e160L,
- 0.9614466715035126609268655586972595484554e162L,
- 0.990290071648618040754671525458177334909e164L,
- 0.1029901674514562762384858386476504428305e167L,
- 0.1081396758240290900504101305800329649721e169L,
- 0.1146280563734708354534347384148349428704e171L,
- 0.1226520203196137939351751701038733888713e173L,
- 0.132464181945182897449989183712183259981e175L,
- 0.1443859583202493582204882102462797533793e177L,
- 0.1588245541522742940425370312709077287172e179L,
- 0.1762952551090244663872161047107075788761e181L,
- 0.1974506857221074023536820372759924883413e183L,
- 0.2231192748659813646596607021218715118256e185L,
- 0.2543559733472187557120132004189335234812e187L,
- 0.2925093693493015690688151804817735520034e189L,
- 0.339310868445189820119825609358857320324e191L,
- 0.396993716080872089540195962949863064779e193L,
- 0.4684525849754290656574312362808384164393e195L,
- 0.5574585761207605881323431711741977155627e197L,
- 0.6689502913449127057588118054090372586753e199L,
- 0.8094298525273443739681622845449350829971e201L,
- 0.9875044200833601362411579871448208012564e203L,
- 0.1214630436702532967576624324188129585545e206L,
- 0.1506141741511140879795014161993280686076e208L,
- 0.1882677176888926099743767702491600857595e210L,
- 0.237217324288004688567714730513941708057e212L,
- 0.3012660018457659544809977077527059692324e214L,
- 0.3856204823625804217356770659234636406175e216L,
- 0.4974504222477287440390234150412680963966e218L,
- 0.6466855489220473672507304395536485253155e220L,
- 0.8471580690878820510984568758152795681634e222L,
- 0.1118248651196004307449963076076169029976e225L,
- 0.1487270706090685728908450891181304809868e227L,
- 0.1992942746161518876737324194182948445223e229L,
- 0.269047270731805048359538766214698040105e231L,
- 0.3659042881952548657689727220519893345429e233L,
- 0.5012888748274991661034926292112253883237e235L,
- 0.6917786472619488492228198283114910358867e237L,
- 0.9615723196941089004197195613529725398826e239L,
- 0.1346201247571752460587607385894161555836e242L,
- 0.1898143759076170969428526414110767793728e244L,
- 0.2695364137888162776588507508037290267094e246L,
- 0.3854370717180072770521565736493325081944e248L,
- 0.5550293832739304789551054660550388118e250L,
- 0.80479260574719919448490292577980627711e252L,
- 0.1174997204390910823947958271638517164581e255L,
- 0.1727245890454638911203498659308620231933e257L,
- 0.2556323917872865588581178015776757943262e259L,
- 0.380892263763056972698595524350736933546e261L,
- 0.571338395644585459047893286526105400319e263L,
- 0.8627209774233240431623188626544191544816e265L,
- 0.1311335885683452545606724671234717114812e268L,
- 0.2006343905095682394778288746989117185662e270L,
- 0.308976961384735088795856467036324046592e272L,
- 0.4789142901463393876335775239063022722176e274L,
- 0.7471062926282894447083809372938315446595e276L,
- 0.1172956879426414428192158071551315525115e279L,
- 0.1853271869493734796543609753051078529682e281L,
- 0.2946702272495038326504339507351214862195e283L,
- 0.4714723635992061322406943211761943779512e285L,
- 0.7590705053947218729075178570936729485014e287L,
- 0.1229694218739449434110178928491750176572e290L,
- 0.2004401576545302577599591653441552787813e292L,
- 0.3287218585534296227263330311644146572013e294L,
- 0.5423910666131588774984495014212841843822e296L,
- 0.9003691705778437366474261723593317460744e298L,
- 0.1503616514864999040201201707840084015944e301L,
- 0.2526075744973198387538018869171341146786e303L,
- 0.4269068009004705274939251888899566538069e305L,
- 0.7257415615307998967396728211129263114717e307L,
- }};
-
- return factorials[i];
-}
-
-template <>
-struct max_factorial<long double>
-{
- BOOST_STATIC_CONSTANT(unsigned, value = 170);
-};
-
-#ifdef BOOST_MATH_USE_FLOAT128
-
-template <>
-inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION BOOST_MATH_FLOAT128_TYPE unchecked_factorial<BOOST_MATH_FLOAT128_TYPE>(unsigned i)
-{
-#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
- constexpr std::array<BOOST_MATH_FLOAT128_TYPE, 171> factorials = { {
-#else
- static const boost::array<BOOST_MATH_FLOAT128_TYPE, 171> factorials = { {
-#endif
- 1,
- 1,
- 2,
- 6,
- 24,
- 120,
- 720,
- 5040,
- 40320,
- 362880.0Q,
- 3628800.0Q,
- 39916800.0Q,
- 479001600.0Q,
- 6227020800.0Q,
- 87178291200.0Q,
- 1307674368000.0Q,
- 20922789888000.0Q,
- 355687428096000.0Q,
- 6402373705728000.0Q,
- 121645100408832000.0Q,
- 0.243290200817664e19Q,
- 0.5109094217170944e20Q,
- 0.112400072777760768e22Q,
- 0.2585201673888497664e23Q,
- 0.62044840173323943936e24Q,
- 0.15511210043330985984e26Q,
- 0.403291461126605635584e27Q,
- 0.10888869450418352160768e29Q,
- 0.304888344611713860501504e30Q,
- 0.8841761993739701954543616e31Q,
- 0.26525285981219105863630848e33Q,
- 0.822283865417792281772556288e34Q,
- 0.26313083693369353016721801216e36Q,
- 0.868331761881188649551819440128e37Q,
- 0.29523279903960414084761860964352e39Q,
- 0.103331479663861449296666513375232e41Q,
- 0.3719933267899012174679994481508352e42Q,
- 0.137637530912263450463159795815809024e44Q,
- 0.5230226174666011117600072241000742912e45Q,
- 0.203978820811974433586402817399028973568e47Q,
- 0.815915283247897734345611269596115894272e48Q,
- 0.3345252661316380710817006205344075166515e50Q,
- 0.1405006117752879898543142606244511569936e52Q,
- 0.6041526306337383563735513206851399750726e53Q,
- 0.265827157478844876804362581101461589032e55Q,
- 0.1196222208654801945619631614956577150644e57Q,
- 0.5502622159812088949850305428800254892962e58Q,
- 0.2586232415111681806429643551536119799692e60Q,
- 0.1241391559253607267086228904737337503852e62Q,
- 0.6082818640342675608722521633212953768876e63Q,
- 0.3041409320171337804361260816606476884438e65Q,
- 0.1551118753287382280224243016469303211063e67Q,
- 0.8065817517094387857166063685640376697529e68Q,
- 0.427488328406002556429801375338939964969e70Q,
- 0.2308436973392413804720927426830275810833e72Q,
- 0.1269640335365827592596510084756651695958e74Q,
- 0.7109985878048634518540456474637249497365e75Q,
- 0.4052691950487721675568060190543232213498e77Q,
- 0.2350561331282878571829474910515074683829e79Q,
- 0.1386831185456898357379390197203894063459e81Q,
- 0.8320987112741390144276341183223364380754e82Q,
- 0.507580213877224798800856812176625227226e84Q,
- 0.3146997326038793752565312235495076408801e86Q,
- 0.1982608315404440064116146708361898137545e88Q,
- 0.1268869321858841641034333893351614808029e90Q,
- 0.8247650592082470666723170306785496252186e91Q,
- 0.5443449390774430640037292402478427526443e93Q,
- 0.3647111091818868528824985909660546442717e95Q,
- 0.2480035542436830599600990418569171581047e97Q,
- 0.1711224524281413113724683388812728390923e99Q,
- 0.1197857166996989179607278372168909873646e101Q,
- 0.8504785885678623175211676442399260102886e102Q,
- 0.6123445837688608686152407038527467274078e104Q,
- 0.4470115461512684340891257138125051110077e106Q,
- 0.3307885441519386412259530282212537821457e108Q,
- 0.2480914081139539809194647711659403366093e110Q,
- 0.188549470166605025498793226086114655823e112Q,
- 0.1451830920282858696340707840863082849837e114Q,
- 0.1132428117820629783145752115873204622873e116Q,
- 0.8946182130782975286851441715398316520698e117Q,
- 0.7156945704626380229481153372318653216558e119Q,
- 0.5797126020747367985879734231578109105412e121Q,
- 0.4753643337012841748421382069894049466438e123Q,
- 0.3945523969720658651189747118012061057144e125Q,
- 0.3314240134565353266999387579130131288001e127Q,
- 0.2817104114380550276949479442260611594801e129Q,
- 0.2422709538367273238176552320344125971528e131Q,
- 0.210775729837952771721360051869938959523e133Q,
- 0.1854826422573984391147968456455462843802e135Q,
- 0.1650795516090846108121691926245361930984e137Q,
- 0.1485715964481761497309522733620825737886e139Q,
- 0.1352001527678402962551665687594951421476e141Q,
- 0.1243841405464130725547532432587355307758e143Q,
- 0.1156772507081641574759205162306240436215e145Q,
- 0.1087366156656743080273652852567866010042e147Q,
- 0.103299784882390592625997020993947270954e149Q,
- 0.9916779348709496892095714015418938011582e150Q,
- 0.9619275968248211985332842594956369871234e152Q,
- 0.942689044888324774562618574305724247381e154Q,
- 0.9332621544394415268169923885626670049072e156Q,
- 0.9332621544394415268169923885626670049072e158Q,
- 0.9425947759838359420851623124482936749562e160Q,
- 0.9614466715035126609268655586972595484554e162Q,
- 0.990290071648618040754671525458177334909e164Q,
- 0.1029901674514562762384858386476504428305e167Q,
- 0.1081396758240290900504101305800329649721e169Q,
- 0.1146280563734708354534347384148349428704e171Q,
- 0.1226520203196137939351751701038733888713e173Q,
- 0.132464181945182897449989183712183259981e175Q,
- 0.1443859583202493582204882102462797533793e177Q,
- 0.1588245541522742940425370312709077287172e179Q,
- 0.1762952551090244663872161047107075788761e181Q,
- 0.1974506857221074023536820372759924883413e183Q,
- 0.2231192748659813646596607021218715118256e185Q,
- 0.2543559733472187557120132004189335234812e187Q,
- 0.2925093693493015690688151804817735520034e189Q,
- 0.339310868445189820119825609358857320324e191Q,
- 0.396993716080872089540195962949863064779e193Q,
- 0.4684525849754290656574312362808384164393e195Q,
- 0.5574585761207605881323431711741977155627e197Q,
- 0.6689502913449127057588118054090372586753e199Q,
- 0.8094298525273443739681622845449350829971e201Q,
- 0.9875044200833601362411579871448208012564e203Q,
- 0.1214630436702532967576624324188129585545e206Q,
- 0.1506141741511140879795014161993280686076e208Q,
- 0.1882677176888926099743767702491600857595e210Q,
- 0.237217324288004688567714730513941708057e212Q,
- 0.3012660018457659544809977077527059692324e214Q,
- 0.3856204823625804217356770659234636406175e216Q,
- 0.4974504222477287440390234150412680963966e218Q,
- 0.6466855489220473672507304395536485253155e220Q,
- 0.8471580690878820510984568758152795681634e222Q,
- 0.1118248651196004307449963076076169029976e225Q,
- 0.1487270706090685728908450891181304809868e227Q,
- 0.1992942746161518876737324194182948445223e229Q,
- 0.269047270731805048359538766214698040105e231Q,
- 0.3659042881952548657689727220519893345429e233Q,
- 0.5012888748274991661034926292112253883237e235Q,
- 0.6917786472619488492228198283114910358867e237Q,
- 0.9615723196941089004197195613529725398826e239Q,
- 0.1346201247571752460587607385894161555836e242Q,
- 0.1898143759076170969428526414110767793728e244Q,
- 0.2695364137888162776588507508037290267094e246Q,
- 0.3854370717180072770521565736493325081944e248Q,
- 0.5550293832739304789551054660550388118e250Q,
- 0.80479260574719919448490292577980627711e252Q,
- 0.1174997204390910823947958271638517164581e255Q,
- 0.1727245890454638911203498659308620231933e257Q,
- 0.2556323917872865588581178015776757943262e259Q,
- 0.380892263763056972698595524350736933546e261Q,
- 0.571338395644585459047893286526105400319e263Q,
- 0.8627209774233240431623188626544191544816e265Q,
- 0.1311335885683452545606724671234717114812e268Q,
- 0.2006343905095682394778288746989117185662e270Q,
- 0.308976961384735088795856467036324046592e272Q,
- 0.4789142901463393876335775239063022722176e274Q,
- 0.7471062926282894447083809372938315446595e276Q,
- 0.1172956879426414428192158071551315525115e279Q,
- 0.1853271869493734796543609753051078529682e281Q,
- 0.2946702272495038326504339507351214862195e283Q,
- 0.4714723635992061322406943211761943779512e285Q,
- 0.7590705053947218729075178570936729485014e287Q,
- 0.1229694218739449434110178928491750176572e290Q,
- 0.2004401576545302577599591653441552787813e292Q,
- 0.3287218585534296227263330311644146572013e294Q,
- 0.5423910666131588774984495014212841843822e296Q,
- 0.9003691705778437366474261723593317460744e298Q,
- 0.1503616514864999040201201707840084015944e301Q,
- 0.2526075744973198387538018869171341146786e303Q,
- 0.4269068009004705274939251888899566538069e305Q,
- 0.7257415615307998967396728211129263114717e307Q,
- } };
-
- return factorials[i];
-}
-
-template <>
-struct max_factorial<BOOST_MATH_FLOAT128_TYPE>
-{
- BOOST_STATIC_CONSTANT(unsigned, value = 170);
-};
-
-#endif
-
-template <>
-inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION double unchecked_factorial<double>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(double))
-{
- return static_cast<double>(boost::math::unchecked_factorial<long double>(i));
-}
-
-template <>
-struct max_factorial<double>
-{
- BOOST_STATIC_CONSTANT(unsigned,
- value = ::boost::math::max_factorial<long double>::value);
-};
-
-#ifndef BOOST_MATH_NO_LEXICAL_CAST
-
-template <class T>
-struct unchecked_factorial_initializer
-{
- struct init
- {
- init()
- {
- boost::math::unchecked_factorial<T>(3);
- }
- void force_instantiate()const {}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T>
-const typename unchecked_factorial_initializer<T>::init unchecked_factorial_initializer<T>::initializer;
-
-
-template <class T, int N>
-inline T unchecked_factorial_imp(unsigned i, const mpl::int_<N>&)
-{
- BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
- // factorial<unsigned int>(n) is not implemented
- // because it would overflow integral type T for too small n
- // to be useful. Use instead a floating-point type,
- // and convert to an unsigned type if essential, for example:
- // unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
- // See factorial documentation for more detail.
-
- unchecked_factorial_initializer<T>::force_instantiate();
-
- static const boost::array<T, 101> factorials = {{
- T(boost::math::tools::convert_from_string<T>("1")),
- T(boost::math::tools::convert_from_string<T>("1")),
- T(boost::math::tools::convert_from_string<T>("2")),
- T(boost::math::tools::convert_from_string<T>("6")),
- T(boost::math::tools::convert_from_string<T>("24")),
- T(boost::math::tools::convert_from_string<T>("120")),
- T(boost::math::tools::convert_from_string<T>("720")),
- T(boost::math::tools::convert_from_string<T>("5040")),
- T(boost::math::tools::convert_from_string<T>("40320")),
- T(boost::math::tools::convert_from_string<T>("362880")),
- T(boost::math::tools::convert_from_string<T>("3628800")),
- T(boost::math::tools::convert_from_string<T>("39916800")),
- T(boost::math::tools::convert_from_string<T>("479001600")),
- T(boost::math::tools::convert_from_string<T>("6227020800")),
- T(boost::math::tools::convert_from_string<T>("87178291200")),
- T(boost::math::tools::convert_from_string<T>("1307674368000")),
- T(boost::math::tools::convert_from_string<T>("20922789888000")),
- T(boost::math::tools::convert_from_string<T>("355687428096000")),
- T(boost::math::tools::convert_from_string<T>("6402373705728000")),
- T(boost::math::tools::convert_from_string<T>("121645100408832000")),
- T(boost::math::tools::convert_from_string<T>("2432902008176640000")),
- T(boost::math::tools::convert_from_string<T>("51090942171709440000")),
- T(boost::math::tools::convert_from_string<T>("1124000727777607680000")),
- T(boost::math::tools::convert_from_string<T>("25852016738884976640000")),
- T(boost::math::tools::convert_from_string<T>("620448401733239439360000")),
- T(boost::math::tools::convert_from_string<T>("15511210043330985984000000")),
- T(boost::math::tools::convert_from_string<T>("403291461126605635584000000")),
- T(boost::math::tools::convert_from_string<T>("10888869450418352160768000000")),
- T(boost::math::tools::convert_from_string<T>("304888344611713860501504000000")),
- T(boost::math::tools::convert_from_string<T>("8841761993739701954543616000000")),
- T(boost::math::tools::convert_from_string<T>("265252859812191058636308480000000")),
- T(boost::math::tools::convert_from_string<T>("8222838654177922817725562880000000")),
- T(boost::math::tools::convert_from_string<T>("263130836933693530167218012160000000")),
- T(boost::math::tools::convert_from_string<T>("8683317618811886495518194401280000000")),
- T(boost::math::tools::convert_from_string<T>("295232799039604140847618609643520000000")),
- T(boost::math::tools::convert_from_string<T>("10333147966386144929666651337523200000000")),
- T(boost::math::tools::convert_from_string<T>("371993326789901217467999448150835200000000")),
- T(boost::math::tools::convert_from_string<T>("13763753091226345046315979581580902400000000")),
- T(boost::math::tools::convert_from_string<T>("523022617466601111760007224100074291200000000")),
- T(boost::math::tools::convert_from_string<T>("20397882081197443358640281739902897356800000000")),
- T(boost::math::tools::convert_from_string<T>("815915283247897734345611269596115894272000000000")),
- T(boost::math::tools::convert_from_string<T>("33452526613163807108170062053440751665152000000000")),
- T(boost::math::tools::convert_from_string<T>("1405006117752879898543142606244511569936384000000000")),
- T(boost::math::tools::convert_from_string<T>("60415263063373835637355132068513997507264512000000000")),
- T(boost::math::tools::convert_from_string<T>("2658271574788448768043625811014615890319638528000000000")),
- T(boost::math::tools::convert_from_string<T>("119622220865480194561963161495657715064383733760000000000")),
- T(boost::math::tools::convert_from_string<T>("5502622159812088949850305428800254892961651752960000000000")),
- T(boost::math::tools::convert_from_string<T>("258623241511168180642964355153611979969197632389120000000000")),
- T(boost::math::tools::convert_from_string<T>("12413915592536072670862289047373375038521486354677760000000000")),
- T(boost::math::tools::convert_from_string<T>("608281864034267560872252163321295376887552831379210240000000000")),
- T(boost::math::tools::convert_from_string<T>("30414093201713378043612608166064768844377641568960512000000000000")),
- T(boost::math::tools::convert_from_string<T>("1551118753287382280224243016469303211063259720016986112000000000000")),
- T(boost::math::tools::convert_from_string<T>("80658175170943878571660636856403766975289505440883277824000000000000")),
- T(boost::math::tools::convert_from_string<T>("4274883284060025564298013753389399649690343788366813724672000000000000")),
- T(boost::math::tools::convert_from_string<T>("230843697339241380472092742683027581083278564571807941132288000000000000")),
- T(boost::math::tools::convert_from_string<T>("12696403353658275925965100847566516959580321051449436762275840000000000000")),
- T(boost::math::tools::convert_from_string<T>("710998587804863451854045647463724949736497978881168458687447040000000000000")),
- T(boost::math::tools::convert_from_string<T>("40526919504877216755680601905432322134980384796226602145184481280000000000000")),
- T(boost::math::tools::convert_from_string<T>("2350561331282878571829474910515074683828862318181142924420699914240000000000000")),
- T(boost::math::tools::convert_from_string<T>("138683118545689835737939019720389406345902876772687432540821294940160000000000000")),
- T(boost::math::tools::convert_from_string<T>("8320987112741390144276341183223364380754172606361245952449277696409600000000000000")),
- T(boost::math::tools::convert_from_string<T>("507580213877224798800856812176625227226004528988036003099405939480985600000000000000")),
- T(boost::math::tools::convert_from_string<T>("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000")),
- T(boost::math::tools::convert_from_string<T>("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000")),
- T(boost::math::tools::convert_from_string<T>("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000")),
- T(boost::math::tools::convert_from_string<T>("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000")),
- T(boost::math::tools::convert_from_string<T>("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000")),
- T(boost::math::tools::convert_from_string<T>("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000")),
- T(boost::math::tools::convert_from_string<T>("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000")),
- T(boost::math::tools::convert_from_string<T>("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000")),
- T(boost::math::tools::convert_from_string<T>("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000")),
- T(boost::math::tools::convert_from_string<T>("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000")),
- T(boost::math::tools::convert_from_string<T>("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000")),
- T(boost::math::tools::convert_from_string<T>("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000")),
- T(boost::math::tools::convert_from_string<T>("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000")),
- T(boost::math::tools::convert_from_string<T>("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000")),
- T(boost::math::tools::convert_from_string<T>("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000")),
- }};
-
- return factorials[i];
-}
-
-template <class T>
-inline T unchecked_factorial_imp(unsigned i, const mpl::int_<0>&)
-{
- BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
- // factorial<unsigned int>(n) is not implemented
- // because it would overflow integral type T for too small n
- // to be useful. Use instead a floating-point type,
- // and convert to an unsigned type if essential, for example:
- // unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
- // See factorial documentation for more detail.
-#ifdef BOOST_NO_CXX11_THREAD_LOCAL
- unchecked_factorial_initializer<T>::force_instantiate();
-#endif
- static const char* const factorial_strings[] = {
- "1",
- "1",
- "2",
- "6",
- "24",
- "120",
- "720",
- "5040",
- "40320",
- "362880",
- "3628800",
- "39916800",
- "479001600",
- "6227020800",
- "87178291200",
- "1307674368000",
- "20922789888000",
- "355687428096000",
- "6402373705728000",
- "121645100408832000",
- "2432902008176640000",
- "51090942171709440000",
- "1124000727777607680000",
- "25852016738884976640000",
- "620448401733239439360000",
- "15511210043330985984000000",
- "403291461126605635584000000",
- "10888869450418352160768000000",
- "304888344611713860501504000000",
- "8841761993739701954543616000000",
- "265252859812191058636308480000000",
- "8222838654177922817725562880000000",
- "263130836933693530167218012160000000",
- "8683317618811886495518194401280000000",
- "295232799039604140847618609643520000000",
- "10333147966386144929666651337523200000000",
- "371993326789901217467999448150835200000000",
- "13763753091226345046315979581580902400000000",
- "523022617466601111760007224100074291200000000",
- "20397882081197443358640281739902897356800000000",
- "815915283247897734345611269596115894272000000000",
- "33452526613163807108170062053440751665152000000000",
- "1405006117752879898543142606244511569936384000000000",
- "60415263063373835637355132068513997507264512000000000",
- "2658271574788448768043625811014615890319638528000000000",
- "119622220865480194561963161495657715064383733760000000000",
- "5502622159812088949850305428800254892961651752960000000000",
- "258623241511168180642964355153611979969197632389120000000000",
- "12413915592536072670862289047373375038521486354677760000000000",
- "608281864034267560872252163321295376887552831379210240000000000",
- "30414093201713378043612608166064768844377641568960512000000000000",
- "1551118753287382280224243016469303211063259720016986112000000000000",
- "80658175170943878571660636856403766975289505440883277824000000000000",
- "4274883284060025564298013753389399649690343788366813724672000000000000",
- "230843697339241380472092742683027581083278564571807941132288000000000000",
- "12696403353658275925965100847566516959580321051449436762275840000000000000",
- "710998587804863451854045647463724949736497978881168458687447040000000000000",
- "40526919504877216755680601905432322134980384796226602145184481280000000000000",
- "2350561331282878571829474910515074683828862318181142924420699914240000000000000",
- "138683118545689835737939019720389406345902876772687432540821294940160000000000000",
- "8320987112741390144276341183223364380754172606361245952449277696409600000000000000",
- "507580213877224798800856812176625227226004528988036003099405939480985600000000000000",
- "31469973260387937525653122354950764088012280797258232192163168247821107200000000000000",
- "1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000",
- "126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000",
- "8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000",
- "544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000",
- "36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000",
- "2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000",
- "171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000",
- "11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000",
- "850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000",
- "61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000",
- "4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000",
- "330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000",
- "24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000",
- "1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000",
- "145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000",
- "11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000",
- "894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000",
- "71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000",
- "5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000",
- "475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000",
- "39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000",
- "3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000",
- "281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000",
- "24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000",
- "2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000",
- "185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000",
- "16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000",
- "1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000",
- "135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000",
- "12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000",
- "1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000",
- "108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000",
- "10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000",
- "991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000",
- "96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000",
- "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000",
- "933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000",
- "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000",
- };
-
- static BOOST_MATH_THREAD_LOCAL T factorials[sizeof(factorial_strings) / sizeof(factorial_strings[0])];
- static BOOST_MATH_THREAD_LOCAL int digits = 0;
-
- int current_digits = boost::math::tools::digits<T>();
-
- if(digits != current_digits)
- {
- digits = current_digits;
- for(unsigned k = 0; k < sizeof(factorials) / sizeof(factorials[0]); ++k)
- factorials[k] = static_cast<T>(boost::math::tools::convert_from_string<T>(factorial_strings[k]));
- }
-
- return factorials[i];
-}
-
-template <class T>
-inline T unchecked_factorial(unsigned i)
-{
- typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type tag_type;
- return unchecked_factorial_imp<T>(i, tag_type());
-}
-
-template <class T>
-struct max_factorial
-{
- BOOST_STATIC_CONSTANT(unsigned, value = 100);
-};
-
-#else // BOOST_MATH_NO_LEXICAL_CAST
-
-template <class T>
-inline T unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
-{
- return 1;
-}
-
-template <class T>
-struct max_factorial
-{
- BOOST_STATIC_CONSTANT(unsigned, value = 0);
-};
-
-#endif
-
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-template <class T>
-const unsigned max_factorial<T>::value;
-#endif
-
-} // namespace math
-} // namespace boost
-
-#endif // BOOST_MATH_SP_UC_FACTORIALS_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
deleted file mode 100644
index 1fe51e335d2..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/erf.hpp
+++ /dev/null
@@ -1,1276 +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 ((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.69.0/boost/math/special_functions/expm1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/expm1.hpp
deleted file mode 100644
index 9cecc897560..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/expm1.hpp
+++ /dev/null
@@ -1,347 +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_EXPM1_INCLUDED
-#define BOOST_MATH_EXPM1_INCLUDED
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/config/no_tr1/cmath.hpp>
-#include <math.h> // platform's ::expm1
-#include <boost/limits.hpp>
-#include <boost/math/tools/config.hpp>
-#include <boost/math/tools/series.hpp>
-#include <boost/math/tools/precision.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/special_functions/math_fwd.hpp>
-#include <boost/mpl/less_equal.hpp>
-
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# include <boost/static_assert.hpp>
-#else
-# include <boost/assert.hpp>
-#endif
-
-namespace boost{ namespace math{
-
-namespace detail
-{
- // Functor expm1_series returns the next term in the Taylor series
- // x^k / k!
- // each time that operator() is invoked.
- //
- template <class T>
- struct expm1_series
- {
- typedef T result_type;
-
- expm1_series(T x)
- : k(0), m_x(x), m_term(1) {}
-
- T operator()()
- {
- ++k;
- m_term *= m_x;
- m_term /= k;
- return m_term;
- }
-
- int count()const
- {
- return k;
- }
-
- private:
- int k;
- const T m_x;
- T m_term;
- expm1_series(const expm1_series&);
- expm1_series& operator=(const expm1_series&);
- };
-
-template <class T, class Policy, class tag>
-struct expm1_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- template <int N>
- static void do_init(const mpl::int_<N>&){}
- static void do_init(const mpl::int_<64>&)
- {
- expm1(T(0.5));
- }
- static void do_init(const mpl::int_<113>&)
- {
- expm1(T(0.5));
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class Policy, class tag>
-const typename expm1_initializer<T, Policy, tag>::init expm1_initializer<T, Policy, tag>::initializer;
-
-//
-// Algorithm expm1 is part of C99, but is not yet provided by many compilers.
-//
-// This version uses a Taylor series expansion for 0.5 > |x| > epsilon.
-//
-template <class T, class Policy>
-T expm1_imp(T x, const mpl::int_<0>&, const Policy& pol)
-{
- BOOST_MATH_STD_USING
-
- T a = fabs(x);
- if((boost::math::isnan)(a))
- {
- return policies::raise_domain_error<T>("boost::math::expm1<%1%>(%1%)", "expm1 requires a finite argument, but got %1%", a, pol);
- }
- if(a > T(0.5f))
- {
- if(a >= tools::log_max_value<T>())
- {
- if(x > 0)
- return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
- return -1;
- }
- return exp(x) - T(1);
- }
- if(a < tools::epsilon<T>())
- return x;
- detail::expm1_series<T> s(x);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
- T result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter);
-#else
- T zero = 0;
- T result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, zero);
-#endif
- policies::check_series_iterations<T>("boost::math::expm1<%1%>(%1%)", max_iter, pol);
- return result;
-}
-
-template <class T, class P>
-T expm1_imp(T x, const mpl::int_<53>&, const P& pol)
-{
- BOOST_MATH_STD_USING
-
- T a = fabs(x);
- if(a > T(0.5L))
- {
- if(a >= tools::log_max_value<T>())
- {
- if(x > 0)
- return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
- return -1;
- }
- return exp(x) - T(1);
- }
- if(a < tools::epsilon<T>())
- return x;
-
- static const float Y = 0.10281276702880859e1f;
- static const T n[] = { static_cast<T>(-0.28127670288085937e-1), static_cast<T>(0.51278186299064534e0), static_cast<T>(-0.6310029069350198e-1), static_cast<T>(0.11638457975729296e-1), static_cast<T>(-0.52143390687521003e-3), static_cast<T>(0.21491399776965688e-4) };
- static const T d[] = { 1, static_cast<T>(-0.45442309511354755e0), static_cast<T>(0.90850389570911714e-1), static_cast<T>(-0.10088963629815502e-1), static_cast<T>(0.63003407478692265e-3), static_cast<T>(-0.17976570003654402e-4) };
-
- T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x);
- return result;
-}
-
-template <class T, class P>
-T expm1_imp(T x, const mpl::int_<64>&, const P& pol)
-{
- BOOST_MATH_STD_USING
-
- T a = fabs(x);
- if(a > T(0.5L))
- {
- if(a >= tools::log_max_value<T>())
- {
- if(x > 0)
- return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
- return -1;
- }
- return exp(x) - T(1);
- }
- if(a < tools::epsilon<T>())
- return x;
-
- static const float Y = 0.10281276702880859375e1f;
- static const T n[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.281276702880859375e-1),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.512980290285154286358e0),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.667758794592881019644e-1),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.131432469658444745835e-1),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.72303795326880286965e-3),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.447441185192951335042e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.714539134024984593011e-6)
- };
- static const T d[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.461477618025562520389e0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.961237488025708540713e-1),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.116483957658204450739e-1),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.873308008461557544458e-3),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.387922804997682392562e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.807473180049193557294e-6)
- };
-
- T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x);
- return result;
-}
-
-template <class T, class P>
-T expm1_imp(T x, const mpl::int_<113>&, const P& pol)
-{
- BOOST_MATH_STD_USING
-
- T a = fabs(x);
- if(a > T(0.5L))
- {
- if(a >= tools::log_max_value<T>())
- {
- if(x > 0)
- return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
- return -1;
- }
- return exp(x) - T(1);
- }
- if(a < tools::epsilon<T>())
- return x;
-
- static const float Y = 0.10281276702880859375e1f;
- static const T n[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.28127670288085937499999999999999999854e-1),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.51278156911210477556524452177540792214e0),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.63263178520747096729500254678819588223e-1),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.14703285606874250425508446801230572252e-1),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.8675686051689527802425310407898459386e-3),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.88126359618291165384647080266133492399e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.25963087867706310844432390015463138953e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.14226691087800461778631773363204081194e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.15995603306536496772374181066765665596e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.45261820069007790520447958280473183582e-10)
- };
- static const T d[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.45441264709074310514348137469214538853e0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.96827131936192217313133611655555298106e-1),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.12745248725908178612540554584374876219e-1),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.11473613871583259821612766907781095472e-2),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.73704168477258911962046591907690764416e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.34087499397791555759285503797256103259e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.11114024704296196166272091230695179724e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.23987051614110848595909588343223896577e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.29477341859111589208776402638429026517e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.13222065991022301420255904060628100924e-12)
- };
-
- T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x);
- return result;
-}
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type expm1(T x, 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;
-
- typedef typename mpl::if_c<
- ::std::numeric_limits<result_type>::is_specialized == 0,
- mpl::int_<0>, // no numeric_limits, use generic solution
- typename mpl::if_<
- typename mpl::less_equal<precision_type, mpl::int_<53> >::type,
- mpl::int_<53>, // double
- typename mpl::if_<
- typename mpl::less_equal<precision_type, mpl::int_<64> >::type,
- mpl::int_<64>, // 80-bit long double
- typename mpl::if_<
- typename mpl::less_equal<precision_type, mpl::int_<113> >::type,
- mpl::int_<113>, // 128-bit long double
- mpl::int_<0> // too many bits, use generic version.
- >::type
- >::type
- >::type
- >::type tag_type;
-
- detail::expm1_initializer<value_type, forwarding_policy, tag_type>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::expm1_imp(
- static_cast<value_type>(x),
- tag_type(), forwarding_policy()), "boost::math::expm1<%1%>(%1%)");
-}
-
-#ifdef expm1
-# ifndef BOOST_HAS_expm1
-# define BOOST_HAS_expm1
-# endif
-# undef expm1
-#endif
-
-#if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER))
-# ifdef BOOST_MATH_USE_C99
-inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); }
-# ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); }
-# endif
-# else
-inline float expm1(float x, const policies::policy<>&){ return static_cast<float>(::expm1(x)); }
-# endif
-inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); }
-#endif
-
-template <class T>
-inline typename tools::promote_args<T>::type expm1(T x)
-{
- return expm1(x, policies::policy<>());
-}
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-inline float expm1(float z)
-{
- return expm1<float>(z);
-}
-inline double expm1(double z)
-{
- return expm1<double>(z);
-}
-#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-inline long double expm1(long double z)
-{
- return expm1<long double>(z);
-}
-#endif
-#endif
-
-} // namespace math
-} // namespace boost
-
-#endif // BOOST_MATH_HYPOT_INCLUDED
-
-
-
-
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp
deleted file mode 100644
index 1903b997cbf..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp
+++ /dev/null
@@ -1,2080 +0,0 @@
-
-// Copyright John Maddock 2006-7, 2013-14.
-// Copyright Paul A. Bristow 2007, 2013-14.
-// Copyright Nikhar Agrawal 2013-14
-// Copyright Christopher Kormanyos 2013-14
-
-// 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_SF_GAMMA_HPP
-#define BOOST_MATH_SF_GAMMA_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/config.hpp>
-#include <boost/math/tools/series.hpp>
-#include <boost/math/tools/fraction.hpp>
-#include <boost/math/tools/precision.hpp>
-#include <boost/math/tools/promotion.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/constants/constants.hpp>
-#include <boost/math/special_functions/math_fwd.hpp>
-#include <boost/math/special_functions/log1p.hpp>
-#include <boost/math/special_functions/trunc.hpp>
-#include <boost/math/special_functions/powm1.hpp>
-#include <boost/math/special_functions/sqrt1pm1.hpp>
-#include <boost/math/special_functions/lanczos.hpp>
-#include <boost/math/special_functions/fpclassify.hpp>
-#include <boost/math/special_functions/detail/igamma_large.hpp>
-#include <boost/math/special_functions/detail/unchecked_factorial.hpp>
-#include <boost/math/special_functions/detail/lgamma_small.hpp>
-#include <boost/math/special_functions/bernoulli.hpp>
-#include <boost/math/special_functions/zeta.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/assert.hpp>
-#include <boost/mpl/greater.hpp>
-#include <boost/mpl/equal_to.hpp>
-#include <boost/mpl/greater.hpp>
-
-#include <boost/config/no_tr1/cmath.hpp>
-#include <algorithm>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
-# pragma warning(disable: 4127) // conditional expression is constant.
-# pragma warning(disable: 4100) // unreferenced formal parameter.
-// Several variables made comments,
-// but some difficulty as whether referenced on not may depend on macro values.
-// So to be safe, 4100 warnings suppressed.
-// TODO - revisit this?
-#endif
-
-namespace boost{ namespace math{
-
-namespace detail{
-
-template <class T>
-inline bool is_odd(T v, const boost::true_type&)
-{
- int i = static_cast<int>(v);
- return i&1;
-}
-template <class T>
-inline bool is_odd(T v, const boost::false_type&)
-{
- // Oh dear can't cast T to int!
- BOOST_MATH_STD_USING
- T modulus = v - 2 * floor(v/2);
- return static_cast<bool>(modulus != 0);
-}
-template <class T>
-inline bool is_odd(T v)
-{
- return is_odd(v, ::boost::is_convertible<T, int>());
-}
-
-template <class T>
-T sinpx(T z)
-{
- // Ad hoc function calculates x * sin(pi * x),
- // taking extra care near when x is near a whole number.
- BOOST_MATH_STD_USING
- int sign = 1;
- if(z < 0)
- {
- z = -z;
- }
- T fl = floor(z);
- T dist;
- if(is_odd(fl))
- {
- fl += 1;
- dist = fl - z;
- sign = -sign;
- }
- else
- {
- dist = z - fl;
- }
- BOOST_ASSERT(fl >= 0);
- if(dist > 0.5)
- dist = 1 - dist;
- T result = sin(dist*boost::math::constants::pi<T>());
- return sign*z*result;
-} // template <class T> T sinpx(T z)
-//
-// tgamma(z), with Lanczos support:
-//
-template <class T, class Policy, class Lanczos>
-T gamma_imp(T z, const Policy& pol, const Lanczos& l)
-{
- BOOST_MATH_STD_USING
-
- T result = 1;
-
-#ifdef BOOST_MATH_INSTRUMENT
- static bool b = false;
- if(!b)
- {
- std::cout << "tgamma_imp called with " << typeid(z).name() << " " << typeid(l).name() << std::endl;
- b = true;
- }
-#endif
- static const char* function = "boost::math::tgamma<%1%>(%1%)";
-
- if(z <= 0)
- {
- if(floor(z) == z)
- return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
- if(z <= -20)
- {
- result = gamma_imp(T(-z), pol, l) * sinpx(z);
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- if((fabs(result) < 1) && (tools::max_value<T>() * fabs(result) < boost::math::constants::pi<T>()))
- return -boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
- result = -boost::math::constants::pi<T>() / result;
- if(result == 0)
- return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
- if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL)
- return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- return result;
- }
-
- // shift z to > 1:
- while(z < 0)
- {
- result /= z;
- z += 1;
- }
- }
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- if((floor(z) == z) && (z < max_factorial<T>::value))
- {
- result *= unchecked_factorial<T>(itrunc(z, pol) - 1);
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- }
- else if (z < tools::root_epsilon<T>())
- {
- if (z < 1 / tools::max_value<T>())
- result = policies::raise_overflow_error<T>(function, 0, pol);
- result *= 1 / z - constants::euler<T>();
- }
- else
- {
- result *= Lanczos::lanczos_sum(z);
- T zgh = (z + static_cast<T>(Lanczos::g()) - boost::math::constants::half<T>());
- T lzgh = log(zgh);
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- BOOST_MATH_INSTRUMENT_VARIABLE(tools::log_max_value<T>());
- if(z * lzgh > tools::log_max_value<T>())
- {
- // we're going to overflow unless this is done with care:
- BOOST_MATH_INSTRUMENT_VARIABLE(zgh);
- if(lzgh * z / 2 > tools::log_max_value<T>())
- return boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
- T hp = pow(zgh, (z / 2) - T(0.25));
- BOOST_MATH_INSTRUMENT_VARIABLE(hp);
- result *= hp / exp(zgh);
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- if(tools::max_value<T>() / hp < result)
- return boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
- result *= hp;
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- }
- else
- {
- BOOST_MATH_INSTRUMENT_VARIABLE(zgh);
- BOOST_MATH_INSTRUMENT_VARIABLE(pow(zgh, z - boost::math::constants::half<T>()));
- BOOST_MATH_INSTRUMENT_VARIABLE(exp(zgh));
- result *= pow(zgh, z - boost::math::constants::half<T>()) / exp(zgh);
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- }
- }
- return result;
-}
-//
-// lgamma(z) with Lanczos support:
-//
-template <class T, class Policy, class Lanczos>
-T lgamma_imp(T z, const Policy& pol, const Lanczos& l, int* sign = 0)
-{
-#ifdef BOOST_MATH_INSTRUMENT
- static bool b = false;
- if(!b)
- {
- std::cout << "lgamma_imp called with " << typeid(z).name() << " " << typeid(l).name() << std::endl;
- b = true;
- }
-#endif
-
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::lgamma<%1%>(%1%)";
-
- T result = 0;
- int sresult = 1;
- if(z <= -tools::root_epsilon<T>())
- {
- // reflection formula:
- if(floor(z) == z)
- return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
-
- T t = sinpx(z);
- z = -z;
- if(t < 0)
- {
- t = -t;
- }
- else
- {
- sresult = -sresult;
- }
- result = log(boost::math::constants::pi<T>()) - lgamma_imp(z, pol, l) - log(t);
- }
- else if (z < tools::root_epsilon<T>())
- {
- if (0 == z)
- return policies::raise_pole_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
- if (fabs(z) < 1 / tools::max_value<T>())
- result = -log(fabs(z));
- else
- result = log(fabs(1 / z - constants::euler<T>()));
- if (z < 0)
- sresult = -1;
- }
- else if(z < 15)
- {
- typedef typename policies::precision<T, Policy>::type precision_type;
- typedef typename mpl::if_<
- mpl::and_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::greater<precision_type, mpl::int_<0> >
- >,
- mpl::int_<64>,
- typename mpl::if_<
- mpl::and_<
- mpl::less_equal<precision_type, mpl::int_<113> >,
- mpl::greater<precision_type, mpl::int_<0> >
- >,
- mpl::int_<113>, mpl::int_<0> >::type
- >::type tag_type;
- result = lgamma_small_imp<T>(z, T(z - 1), T(z - 2), tag_type(), pol, l);
- }
- else if((z >= 3) && (z < 100) && (std::numeric_limits<T>::max_exponent >= 1024))
- {
- // taking the log of tgamma reduces the error, no danger of overflow here:
- result = log(gamma_imp(z, pol, l));
- }
- else
- {
- // regular evaluation:
- T zgh = static_cast<T>(z + Lanczos::g() - boost::math::constants::half<T>());
- result = log(zgh) - 1;
- result *= z - 0.5f;
- result += log(Lanczos::lanczos_sum_expG_scaled(z));
- }
-
- if(sign)
- *sign = sresult;
- return result;
-}
-
-//
-// Incomplete gamma functions follow:
-//
-template <class T>
-struct upper_incomplete_gamma_fract
-{
-private:
- T z, a;
- int k;
-public:
- typedef std::pair<T,T> result_type;
-
- upper_incomplete_gamma_fract(T a1, T z1)
- : z(z1-a1+1), a(a1), k(0)
- {
- }
-
- result_type operator()()
- {
- ++k;
- z += 2;
- return result_type(k * (a - k), z);
- }
-};
-
-template <class T>
-inline T upper_gamma_fraction(T a, T z, T eps)
-{
- // Multiply result by z^a * e^-z to get the full
- // upper incomplete integral. Divide by tgamma(z)
- // to normalise.
- upper_incomplete_gamma_fract<T> f(a, z);
- return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps));
-}
-
-template <class T>
-struct lower_incomplete_gamma_series
-{
-private:
- T a, z, result;
-public:
- typedef T result_type;
- lower_incomplete_gamma_series(T a1, T z1) : a(a1), z(z1), result(1){}
-
- T operator()()
- {
- T r = result;
- a += 1;
- result *= z/a;
- return r;
- }
-};
-
-template <class T, class Policy>
-inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0)
-{
- // Multiply result by ((z^a) * (e^-z) / a) to get the full
- // lower incomplete integral. Then divide by tgamma(a)
- // to get the normalised value.
- lower_incomplete_gamma_series<T> s(a, z);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T factor = policies::get_epsilon<T, Policy>();
- T result = boost::math::tools::sum_series(s, factor, max_iter, init_value);
- policies::check_series_iterations<T>("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol);
- return result;
-}
-
-//
-// Fully generic tgamma and lgamma use Stirling's approximation
-// with Bernoulli numbers.
-//
-template<class T>
-std::size_t highest_bernoulli_index()
-{
- const float digits10_of_type = (std::numeric_limits<T>::is_specialized
- ? static_cast<float>(std::numeric_limits<T>::digits10)
- : static_cast<float>(boost::math::tools::digits<T>() * 0.301F));
-
- // Find the high index n for Bn to produce the desired precision in Stirling's calculation.
- return static_cast<std::size_t>(18.0F + (0.6F * digits10_of_type));
-}
-
-template<class T>
-T minimum_argument_for_bernoulli_recursion()
-{
- const float digits10_of_type = (std::numeric_limits<T>::is_specialized
- ? static_cast<float>(std::numeric_limits<T>::digits10)
- : static_cast<float>(boost::math::tools::digits<T>() * 0.301F));
-
- return T(digits10_of_type * 1.7F);
-}
-
-// Forward declaration of the lgamma_imp template specialization.
-template <class T, class Policy>
-T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign = 0);
-
-template <class T, class Policy>
-T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&)
-{
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::tgamma<%1%>(%1%)";
-
- // Check if the argument of tgamma is identically zero.
- const bool is_at_zero = (z == 0);
-
- if((is_at_zero) || ((boost::math::isinf)(z) && (z < 0)))
- return policies::raise_domain_error<T>(function, "Evaluation of tgamma at %1%.", z, pol);
-
- const bool b_neg = (z < 0);
-
- const bool floor_of_z_is_equal_to_z = (floor(z) == z);
-
- // Special case handling of small factorials:
- if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial<T>::value))
- {
- return boost::math::unchecked_factorial<T>(itrunc(z) - 1);
- }
-
- // Make a local, unsigned copy of the input argument.
- T zz((!b_neg) ? z : -z);
-
- // Special case for ultra-small z:
- if(zz < tools::cbrt_epsilon<T>())
- {
- const T a0(1);
- const T a1(boost::math::constants::euler<T>());
- const T six_euler_squared((boost::math::constants::euler<T>() * boost::math::constants::euler<T>()) * 6);
- const T a2((six_euler_squared - boost::math::constants::pi_sqr<T>()) / 12);
-
- const T inverse_tgamma_series = z * ((a2 * z + a1) * z + a0);
-
- return 1 / inverse_tgamma_series;
- }
-
- // Scale the argument up for the calculation of lgamma,
- // and use downward recursion later for the final result.
- const T min_arg_for_recursion = minimum_argument_for_bernoulli_recursion<T>();
-
- int n_recur;
-
- if(zz < min_arg_for_recursion)
- {
- n_recur = boost::math::itrunc(min_arg_for_recursion - zz) + 1;
-
- zz += n_recur;
- }
- else
- {
- n_recur = 0;
- }
-
- const T log_gamma_value = lgamma_imp(zz, pol, lanczos::undefined_lanczos());
-
- if(log_gamma_value > tools::log_max_value<T>())
- return policies::raise_overflow_error<T>(function, 0, pol);
-
- T gamma_value = exp(log_gamma_value);
-
- // Rescale the result using downward recursion if necessary.
- if(n_recur)
- {
- // The order of divides is important, if we keep subtracting 1 from zz
- // we DO NOT get back to z (cancellation error). Further if z < epsilon
- // we would end up dividing by zero. Also in order to prevent spurious
- // overflow with the first division, we must save dividing by |z| till last,
- // so the optimal order of divides is z+1, z+2, z+3...z+n_recur-1,z.
- zz = fabs(z) + 1;
- for(int k = 1; k < n_recur; ++k)
- {
- gamma_value /= zz;
- zz += 1;
- }
- gamma_value /= fabs(z);
- }
-
- // Return the result, accounting for possible negative arguments.
- if(b_neg)
- {
- // Provide special error analysis for:
- // * arguments in the neighborhood of a negative integer
- // * arguments exactly equal to a negative integer.
-
- // Check if the argument of tgamma is exactly equal to a negative integer.
- if(floor_of_z_is_equal_to_z)
- return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
-
- gamma_value *= sinpx(z);
-
- BOOST_MATH_INSTRUMENT_VARIABLE(gamma_value);
-
- const bool result_is_too_large_to_represent = ( (abs(gamma_value) < 1)
- && ((tools::max_value<T>() * abs(gamma_value)) < boost::math::constants::pi<T>()));
-
- if(result_is_too_large_to_represent)
- return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
-
- gamma_value = -boost::math::constants::pi<T>() / gamma_value;
- BOOST_MATH_INSTRUMENT_VARIABLE(gamma_value);
-
- if(gamma_value == 0)
- return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
-
- if((boost::math::fpclassify)(gamma_value) == static_cast<int>(FP_SUBNORMAL))
- return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", gamma_value, pol);
- }
-
- return gamma_value;
-}
-
-template <class T, class Policy>
-inline T log_gamma_near_1(const T& z, Policy const& pol)
-{
- //
- // This is for the multiprecision case where there is
- // no lanczos support...
- //
- BOOST_MATH_STD_USING // ADL of std names
-
- BOOST_ASSERT(fabs(z) < 1);
-
- T result = -constants::euler<T>() * z;
-
- T power_term = z * z;
- T term;
- unsigned j = 0;
-
- do
- {
- term = boost::math::zeta<T>(j + 2, pol) * power_term / (j + 2);
- if(j & 1)
- result -= term;
- else
- result += term;
- power_term *= z;
- ++j;
- } while(fabs(result) * tools::epsilon<T>() < fabs(term));
-
- return result;
-}
-
-template <class T, class Policy>
-T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign)
-{
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::lgamma<%1%>(%1%)";
-
- // Check if the argument of lgamma is identically zero.
- const bool is_at_zero = (z == 0);
-
- if(is_at_zero)
- return policies::raise_domain_error<T>(function, "Evaluation of lgamma at zero %1%.", z, pol);
- if((boost::math::isnan)(z))
- return policies::raise_domain_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
- if((boost::math::isinf)(z))
- return policies::raise_overflow_error<T>(function, 0, pol);
-
- const bool b_neg = (z < 0);
-
- const bool floor_of_z_is_equal_to_z = (floor(z) == z);
-
- // Special case handling of small factorials:
- if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial<T>::value))
- {
- return log(boost::math::unchecked_factorial<T>(itrunc(z) - 1));
- }
-
- // Make a local, unsigned copy of the input argument.
- T zz((!b_neg) ? z : -z);
-
- const T min_arg_for_recursion = minimum_argument_for_bernoulli_recursion<T>();
-
- T log_gamma_value;
-
- if (zz < min_arg_for_recursion)
- {
- // Here we simply take the logarithm of tgamma(). This is somewhat
- // inefficient, but simple. The rationale is that the argument here
- // is relatively small and overflow is not expected to be likely.
- if(fabs(z - 1) < 0.25)
- {
- return log_gamma_near_1(T(zz - 1), pol);
- }
- else if(fabs(z - 2) < 0.25)
- {
- return log_gamma_near_1(T(zz - 2), pol) + log(zz - 1);
- }
- else if (z > -tools::root_epsilon<T>())
- {
- // Reflection formula may fail if z is very close to zero, let the series
- // expansion for tgamma close to zero do the work:
- log_gamma_value = log(abs(gamma_imp(z, pol, lanczos::undefined_lanczos())));
- if (sign)
- {
- *sign = z < 0 ? -1 : 1;
- }
- return log_gamma_value;
- }
- else
- {
- // No issue with spurious overflow in reflection formula,
- // just fall through to regular code:
- log_gamma_value = log(abs(gamma_imp(zz, pol, lanczos::undefined_lanczos())));
- }
- }
- else
- {
- // Perform the Bernoulli series expansion of Stirling's approximation.
-
- const std::size_t number_of_bernoullis_b2n = highest_bernoulli_index<T>();
-
- T one_over_x_pow_two_n_minus_one = 1 / zz;
- const T one_over_x2 = one_over_x_pow_two_n_minus_one * one_over_x_pow_two_n_minus_one;
- T sum = (boost::math::bernoulli_b2n<T>(1) / 2) * one_over_x_pow_two_n_minus_one;
- const T target_epsilon_to_break_loop = (sum * boost::math::tools::epsilon<T>()) * T(1.0E-10F);
-
- for(std::size_t n = 2U; n < number_of_bernoullis_b2n; ++n)
- {
- one_over_x_pow_two_n_minus_one *= one_over_x2;
-
- const std::size_t n2 = static_cast<std::size_t>(n * 2U);
-
- const T term = (boost::math::bernoulli_b2n<T>(static_cast<int>(n)) * one_over_x_pow_two_n_minus_one) / (n2 * (n2 - 1U));
-
- if((n >= 8U) && (abs(term) < target_epsilon_to_break_loop))
- {
- // We have reached the desired precision in Stirling's expansion.
- // Adding additional terms to the sum of this divergent asymptotic
- // expansion will not improve the result.
-
- // Break from the loop.
- break;
- }
-
- sum += term;
- }
-
- // Complete Stirling's approximation.
- const T half_ln_two_pi = log(boost::math::constants::two_pi<T>()) / 2;
-
- log_gamma_value = ((((zz - boost::math::constants::half<T>()) * log(zz)) - zz) + half_ln_two_pi) + sum;
- }
-
- int sign_of_result = 1;
-
- if(b_neg)
- {
- // Provide special error analysis if the argument is exactly
- // equal to a negative integer.
-
- // Check if the argument of lgamma is exactly equal to a negative integer.
- if(floor_of_z_is_equal_to_z)
- return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
-
- T t = sinpx(z);
-
- if(t < 0)
- {
- t = -t;
- }
- else
- {
- sign_of_result = -sign_of_result;
- }
-
- log_gamma_value = - log_gamma_value
- + log(boost::math::constants::pi<T>())
- - log(t);
- }
-
- if(sign != static_cast<int*>(0U)) { *sign = sign_of_result; }
-
- return log_gamma_value;
-}
-
-//
-// This helper calculates tgamma(dz+1)-1 without cancellation errors,
-// used by the upper incomplete gamma with z < 1:
-//
-template <class T, class Policy, class Lanczos>
-T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l)
-{
- BOOST_MATH_STD_USING
-
- typedef typename policies::precision<T,Policy>::type precision_type;
-
- typedef typename mpl::if_<
- mpl::or_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::greater<precision_type, mpl::int_<113> >
- >,
- typename mpl::if_<
- mpl::and_<is_same<Lanczos, lanczos::lanczos24m113>, mpl::greater<precision_type, mpl::int_<0> > >,
- mpl::int_<113>,
- mpl::int_<0>
- >::type,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::int_<64>, mpl::int_<113> >::type
- >::type tag_type;
-
- T result;
- if(dz < 0)
- {
- if(dz < -0.5)
- {
- // Best method is simply to subtract 1 from tgamma:
- result = boost::math::tgamma(1+dz, pol) - 1;
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- else
- {
- // Use expm1 on lgamma:
- result = boost::math::expm1(-boost::math::log1p(dz, pol)
- + lgamma_small_imp<T>(dz+2, dz + 1, dz, tag_type(), pol, l));
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- }
- else
- {
- if(dz < 2)
- {
- // Use expm1 on lgamma:
- result = boost::math::expm1(lgamma_small_imp<T>(dz+1, dz, dz-1, tag_type(), pol, l), pol);
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- else
- {
- // Best method is simply to subtract 1 from tgamma:
- result = boost::math::tgamma(1+dz, pol) - 1;
- BOOST_MATH_INSTRUMENT_CODE(result);
- }
- }
-
- return result;
-}
-
-template <class T, class Policy>
-inline T tgammap1m1_imp(T z, Policy const& pol,
- const ::boost::math::lanczos::undefined_lanczos&)
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- if(fabs(z) < 0.55)
- {
- return boost::math::expm1(log_gamma_near_1(z, pol));
- }
- return boost::math::expm1(boost::math::lgamma(1 + z, pol));
-}
-
-//
-// Series representation for upper fraction when z is small:
-//
-template <class T>
-struct small_gamma2_series
-{
- typedef T result_type;
-
- small_gamma2_series(T a_, T x_) : result(-x_), x(-x_), apn(a_+1), n(1){}
-
- T operator()()
- {
- T r = result / (apn);
- result *= x;
- result /= ++n;
- apn += 1;
- return r;
- }
-
-private:
- T result, x, apn;
- int n;
-};
-//
-// calculate power term prefix (z^a)(e^-z) used in the non-normalised
-// incomplete gammas:
-//
-template <class T, class Policy>
-T full_igamma_prefix(T a, T z, const Policy& pol)
-{
- BOOST_MATH_STD_USING
-
- T prefix;
- T alz = a * log(z);
-
- if(z >= 1)
- {
- if((alz < tools::log_max_value<T>()) && (-z > tools::log_min_value<T>()))
- {
- prefix = pow(z, a) * exp(-z);
- }
- else if(a >= 1)
- {
- prefix = pow(z / exp(z/a), a);
- }
- else
- {
- prefix = exp(alz - z);
- }
- }
- else
- {
- if(alz > tools::log_min_value<T>())
- {
- prefix = pow(z, a) * exp(-z);
- }
- else if(z/a < tools::log_max_value<T>())
- {
- prefix = pow(z / exp(z/a), a);
- }
- else
- {
- prefix = exp(alz - z);
- }
- }
- //
- // This error handling isn't very good: it happens after the fact
- // rather than before it...
- //
- if((boost::math::fpclassify)(prefix) == (int)FP_INFINITE)
- return policies::raise_overflow_error<T>("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol);
-
- return prefix;
-}
-//
-// Compute (z^a)(e^-z)/tgamma(a)
-// most if the error occurs in this function:
-//
-template <class T, class Policy, class Lanczos>
-T regularised_gamma_prefix(T a, T z, const Policy& pol, const Lanczos& l)
-{
- BOOST_MATH_STD_USING
- T agh = a + static_cast<T>(Lanczos::g()) - T(0.5);
- T prefix;
- T d = ((z - a) - static_cast<T>(Lanczos::g()) + T(0.5)) / agh;
-
- if(a < 1)
- {
- //
- // We have to treat a < 1 as a special case because our Lanczos
- // approximations are optimised against the factorials with a > 1,
- // and for high precision types especially (128-bit reals for example)
- // very small values of a can give rather eroneous results for gamma
- // unless we do this:
- //
- // TODO: is this still required? Lanczos approx should be better now?
- //
- if(z <= tools::log_min_value<T>())
- {
- // Oh dear, have to use logs, should be free of cancellation errors though:
- return exp(a * log(z) - z - lgamma_imp(a, pol, l));
- }
- else
- {
- // direct calculation, no danger of overflow as gamma(a) < 1/a
- // for small a.
- return pow(z, a) * exp(-z) / gamma_imp(a, pol, l);
- }
- }
- else if((fabs(d*d*a) <= 100) && (a > 150))
- {
- // special case for large a and a ~ z.
- prefix = a * boost::math::log1pmx(d, pol) + z * static_cast<T>(0.5 - Lanczos::g()) / agh;
- prefix = exp(prefix);
- }
- else
- {
- //
- // general case.
- // direct computation is most accurate, but use various fallbacks
- // for different parts of the problem domain:
- //
- T alz = a * log(z / agh);
- T amz = a - z;
- if(((std::min)(alz, amz) <= tools::log_min_value<T>()) || ((std::max)(alz, amz) >= tools::log_max_value<T>()))
- {
- T amza = amz / a;
- if(((std::min)(alz, amz)/2 > tools::log_min_value<T>()) && ((std::max)(alz, amz)/2 < tools::log_max_value<T>()))
- {
- // compute square root of the result and then square it:
- T sq = pow(z / agh, a / 2) * exp(amz / 2);
- prefix = sq * sq;
- }
- else if(((std::min)(alz, amz)/4 > tools::log_min_value<T>()) && ((std::max)(alz, amz)/4 < tools::log_max_value<T>()) && (z > a))
- {
- // compute the 4th root of the result then square it twice:
- T sq = pow(z / agh, a / 4) * exp(amz / 4);
- prefix = sq * sq;
- prefix *= prefix;
- }
- else if((amza > tools::log_min_value<T>()) && (amza < tools::log_max_value<T>()))
- {
- prefix = pow((z * exp(amza)) / agh, a);
- }
- else
- {
- prefix = exp(alz + amz);
- }
- }
- else
- {
- prefix = pow(z / agh, a) * exp(amz);
- }
- }
- prefix *= sqrt(agh / boost::math::constants::e<T>()) / Lanczos::lanczos_sum_expG_scaled(a);
- return prefix;
-}
-//
-// And again, without Lanczos support:
-//
-template <class T, class Policy>
-T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined_lanczos&)
-{
- BOOST_MATH_STD_USING
-
- T limit = (std::max)(T(10), a);
- T sum = detail::lower_gamma_series(a, limit, pol) / a;
- sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policies::get_epsilon<T, Policy>());
-
- if(a < 10)
- {
- // special case for small a:
- T prefix = pow(z / 10, a);
- prefix *= exp(10-z);
- if(0 == prefix)
- {
- prefix = pow((z * exp((10-z)/a)) / 10, a);
- }
- prefix /= sum;
- return prefix;
- }
-
- T zoa = z / a;
- T amz = a - z;
- T alzoa = a * log(zoa);
- T prefix;
- if(((std::min)(alzoa, amz) <= tools::log_min_value<T>()) || ((std::max)(alzoa, amz) >= tools::log_max_value<T>()))
- {
- T amza = amz / a;
- if((amza <= tools::log_min_value<T>()) || (amza >= tools::log_max_value<T>()))
- {
- prefix = exp(alzoa + amz);
- }
- else
- {
- prefix = pow(zoa * exp(amza), a);
- }
- }
- else
- {
- prefix = pow(zoa, a) * exp(amz);
- }
- prefix /= sum;
- return prefix;
-}
-//
-// Upper gamma fraction for very small a:
-//
-template <class T, class Policy>
-inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0)
-{
- BOOST_MATH_STD_USING // ADL of std functions.
- //
- // Compute the full upper fraction (Q) when a is very small:
- //
- T result;
- result = boost::math::tgamma1pm1(a, pol);
- if(pgam)
- *pgam = (result + 1) / a;
- T p = boost::math::powm1(x, a, pol);
- result -= p;
- result /= a;
- detail::small_gamma2_series<T> s(a, x);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>() - 10;
- p += 1;
- if(pderivative)
- *pderivative = p / (*pgam * exp(x));
- T init_value = invert ? *pgam : 0;
- result = -p * tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, (init_value - result) / p);
- policies::check_series_iterations<T>("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol);
- if(invert)
- result = -result;
- return result;
-}
-//
-// Upper gamma fraction for integer a:
-//
-template <class T, class Policy>
-inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0)
-{
- //
- // Calculates normalised Q when a is an integer:
- //
- BOOST_MATH_STD_USING
- T e = exp(-x);
- T sum = e;
- if(sum != 0)
- {
- T term = sum;
- for(unsigned n = 1; n < a; ++n)
- {
- term /= n;
- term *= x;
- sum += term;
- }
- }
- if(pderivative)
- {
- *pderivative = e * pow(x, a) / boost::math::unchecked_factorial<T>(itrunc(T(a - 1), pol));
- }
- return sum;
-}
-//
-// Upper gamma fraction for half integer a:
-//
-template <class T, class Policy>
-T finite_half_gamma_q(T a, T x, T* p_derivative, const Policy& pol)
-{
- //
- // Calculates normalised Q when a is a half-integer:
- //
- BOOST_MATH_STD_USING
- T e = boost::math::erfc(sqrt(x), pol);
- if((e != 0) && (a > 1))
- {
- T term = exp(-x) / sqrt(constants::pi<T>() * x);
- term *= x;
- static const T half = T(1) / 2;
- term /= half;
- T sum = term;
- for(unsigned n = 2; n < a; ++n)
- {
- term /= n - half;
- term *= x;
- sum += term;
- }
- e += sum;
- if(p_derivative)
- {
- *p_derivative = 0;
- }
- }
- else if(p_derivative)
- {
- // We'll be dividing by x later, so calculate derivative * x:
- *p_derivative = sqrt(x) * exp(-x) / constants::root_pi<T>();
- }
- return e;
-}
-//
-// Main incomplete gamma entry point, handles all four incomplete gamma's:
-//
-template <class T, class Policy>
-T gamma_incomplete_imp(T a, T x, bool normalised, bool invert,
- const Policy& pol, T* p_derivative)
-{
- static const char* function = "boost::math::gamma_p<%1%>(%1%, %1%)";
- if(a <= 0)
- return policies::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
- if(x < 0)
- return policies::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
-
- BOOST_MATH_STD_USING
-
- typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
-
- T result = 0; // Just to avoid warning C4701: potentially uninitialized local variable 'result' used
-
- if(a >= max_factorial<T>::value && !normalised)
- {
- //
- // When we're computing the non-normalized incomplete gamma
- // and a is large the result is rather hard to compute unless
- // we use logs. There are really two options - if x is a long
- // way from a in value then we can reliably use methods 2 and 4
- // below in logarithmic form and go straight to the result.
- // Otherwise we let the regularized gamma take the strain
- // (the result is unlikely to unerflow in the central region anyway)
- // and combine with lgamma in the hopes that we get a finite result.
- //
- if(invert && (a * 4 < x))
- {
- // This is method 4 below, done in logs:
- result = a * log(x) - x;
- if(p_derivative)
- *p_derivative = exp(result);
- result += log(upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>()));
- }
- else if(!invert && (a > 4 * x))
- {
- // This is method 2 below, done in logs:
- result = a * log(x) - x;
- if(p_derivative)
- *p_derivative = exp(result);
- T init_value = 0;
- result += log(detail::lower_gamma_series(a, x, pol, init_value) / a);
- }
- else
- {
- result = gamma_incomplete_imp(a, x, true, invert, pol, p_derivative);
- if(result == 0)
- {
- if(invert)
- {
- // Try http://functions.wolfram.com/06.06.06.0039.01
- result = 1 + 1 / (12 * a) + 1 / (288 * a * a);
- result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi<T>());
- if(p_derivative)
- *p_derivative = exp(a * log(x) - x);
- }
- else
- {
- // This is method 2 below, done in logs, we're really outside the
- // range of this method, but since the result is almost certainly
- // infinite, we should probably be OK:
- result = a * log(x) - x;
- if(p_derivative)
- *p_derivative = exp(result);
- T init_value = 0;
- result += log(detail::lower_gamma_series(a, x, pol, init_value) / a);
- }
- }
- else
- {
- result = log(result) + boost::math::lgamma(a, pol);
- }
- }
- if(result > tools::log_max_value<T>())
- return policies::raise_overflow_error<T>(function, 0, pol);
- return exp(result);
- }
-
- BOOST_ASSERT((p_derivative == 0) || (normalised == true));
-
- bool is_int, is_half_int;
- bool is_small_a = (a < 30) && (a <= x + 1) && (x < tools::log_max_value<T>());
- if(is_small_a)
- {
- T fa = floor(a);
- is_int = (fa == a);
- is_half_int = is_int ? false : (fabs(fa - a) == 0.5f);
- }
- else
- {
- is_int = is_half_int = false;
- }
-
- int eval_method;
-
- if(is_int && (x > 0.6))
- {
- // calculate Q via finite sum:
- invert = !invert;
- eval_method = 0;
- }
- else if(is_half_int && (x > 0.2))
- {
- // calculate Q via finite sum for half integer a:
- invert = !invert;
- eval_method = 1;
- }
- else if((x < tools::root_epsilon<T>()) && (a > 1))
- {
- eval_method = 6;
- }
- else if(x < 0.5)
- {
- //
- // Changeover criterion chosen to give a changeover at Q ~ 0.33
- //
- if(-0.4 / log(x) < a)
- {
- eval_method = 2;
- }
- else
- {
- eval_method = 3;
- }
- }
- else if(x < 1.1)
- {
- //
- // Changover here occurs when P ~ 0.75 or Q ~ 0.25:
- //
- if(x * 0.75f < a)
- {
- eval_method = 2;
- }
- else
- {
- eval_method = 3;
- }
- }
- else
- {
- //
- // Begin by testing whether we're in the "bad" zone
- // where the result will be near 0.5 and the usual
- // series and continued fractions are slow to converge:
- //
- bool use_temme = false;
- if(normalised && std::numeric_limits<T>::is_specialized && (a > 20))
- {
- T sigma = fabs((x-a)/a);
- if((a > 200) && (policies::digits<T, Policy>() <= 113))
- {
- //
- // This limit is chosen so that we use Temme's expansion
- // only if the result would be larger than about 10^-6.
- // Below that the regular series and continued fractions
- // converge OK, and if we use Temme's method we get increasing
- // errors from the dominant erfc term as it's (inexact) argument
- // increases in magnitude.
- //
- if(20 / a > sigma * sigma)
- use_temme = true;
- }
- else if(policies::digits<T, Policy>() <= 64)
- {
- // Note in this zone we can't use Temme's expansion for
- // types longer than an 80-bit real:
- // it would require too many terms in the polynomials.
- if(sigma < 0.4)
- use_temme = true;
- }
- }
- if(use_temme)
- {
- eval_method = 5;
- }
- else
- {
- //
- // Regular case where the result will not be too close to 0.5.
- //
- // Changeover here occurs at P ~ Q ~ 0.5
- // Note that series computation of P is about x2 faster than continued fraction
- // calculation of Q, so try and use the CF only when really necessary, especially
- // for small x.
- //
- if(x - (1 / (3 * x)) < a)
- {
- eval_method = 2;
- }
- else
- {
- eval_method = 4;
- invert = !invert;
- }
- }
- }
-
- switch(eval_method)
- {
- case 0:
- {
- result = finite_gamma_q(a, x, pol, p_derivative);
- if(normalised == false)
- result *= boost::math::tgamma(a, pol);
- break;
- }
- case 1:
- {
- result = finite_half_gamma_q(a, x, p_derivative, pol);
- if(normalised == false)
- result *= boost::math::tgamma(a, pol);
- if(p_derivative && (*p_derivative == 0))
- *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
- break;
- }
- case 2:
- {
- // Compute P:
- result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
- if(p_derivative)
- *p_derivative = result;
- if(result != 0)
- {
- //
- // If we're going to be inverting the result then we can
- // reduce the number of series evaluations by quite
- // a few iterations if we set an initial value for the
- // series sum based on what we'll end up subtracting it from
- // at the end.
- // Have to be careful though that this optimization doesn't
- // lead to spurious numberic overflow. Note that the
- // scary/expensive overflow checks below are more often
- // than not bypassed in practice for "sensible" input
- // values:
- //
- T init_value = 0;
- bool optimised_invert = false;
- if(invert)
- {
- init_value = (normalised ? 1 : boost::math::tgamma(a, pol));
- if(normalised || (result >= 1) || (tools::max_value<T>() * result > init_value))
- {
- init_value /= result;
- if(normalised || (a < 1) || (tools::max_value<T>() / a > init_value))
- {
- init_value *= -a;
- optimised_invert = true;
- }
- else
- init_value = 0;
- }
- else
- init_value = 0;
- }
- result *= detail::lower_gamma_series(a, x, pol, init_value) / a;
- if(optimised_invert)
- {
- invert = false;
- result = -result;
- }
- }
- break;
- }
- case 3:
- {
- // Compute Q:
- invert = !invert;
- T g;
- result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative);
- invert = false;
- if(normalised)
- result /= g;
- break;
- }
- case 4:
- {
- // Compute Q:
- result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
- if(p_derivative)
- *p_derivative = result;
- if(result != 0)
- result *= upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>());
- break;
- }
- case 5:
- {
- //
- // Use compile time dispatch to the appropriate
- // Temme asymptotic expansion. This may be dead code
- // if T does not have numeric limits support, or has
- // too many digits for the most precise version of
- // these expansions, in that case we'll be calling
- // an empty function.
- //
- typedef typename policies::precision<T, Policy>::type precision_type;
-
- typedef typename mpl::if_<
- mpl::or_<mpl::equal_to<precision_type, mpl::int_<0> >,
- mpl::greater<precision_type, mpl::int_<113> > >,
- mpl::int_<0>,
- 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>,
- mpl::int_<113>
- >::type
- >::type
- >::type tag_type;
-
- result = igamma_temme_large(a, x, pol, static_cast<tag_type const*>(0));
- if(x >= a)
- invert = !invert;
- if(p_derivative)
- *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
- break;
- }
- case 6:
- {
- // x is so small that P is necessarily very small too,
- // use http://functions.wolfram.com/GammaBetaErf/GammaRegularized/06/01/05/01/01/
- result = !normalised ? pow(x, a) / (a) : pow(x, a) / boost::math::tgamma(a + 1, pol);
- result *= 1 - a * x / (a + 1);
- }
- }
-
- if(normalised && (result > 1))
- result = 1;
- if(invert)
- {
- T gam = normalised ? 1 : boost::math::tgamma(a, pol);
- result = gam - result;
- }
- if(p_derivative)
- {
- //
- // Need to convert prefix term to derivative:
- //
- if((x < 1) && (tools::max_value<T>() * x < *p_derivative))
- {
- // overflow, just return an arbitrarily large value:
- *p_derivative = tools::max_value<T>() / 2;
- }
-
- *p_derivative /= x;
- }
-
- return result;
-}
-
-//
-// Ratios of two gamma functions:
-//
-template <class T, class Policy, class Lanczos>
-T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const Lanczos& l)
-{
- BOOST_MATH_STD_USING
- if(z < tools::epsilon<T>())
- {
- //
- // We get spurious numeric overflow unless we're very careful, this
- // can occur either inside Lanczos::lanczos_sum(z) or in the
- // final combination of terms, to avoid this, split the product up
- // into 2 (or 3) parts:
- //
- // G(z) / G(L) = 1 / (z * G(L)) ; z < eps, L = z + delta = delta
- // z * G(L) = z * G(lim) * (G(L)/G(lim)) ; lim = largest factorial
- //
- if(boost::math::max_factorial<T>::value < delta)
- {
- T ratio = tgamma_delta_ratio_imp_lanczos(delta, T(boost::math::max_factorial<T>::value - delta), pol, l);
- ratio *= z;
- ratio *= boost::math::unchecked_factorial<T>(boost::math::max_factorial<T>::value - 1);
- return 1 / ratio;
- }
- else
- {
- return 1 / (z * boost::math::tgamma(z + delta, pol));
- }
- }
- T zgh = static_cast<T>(z + Lanczos::g() - constants::half<T>());
- T result;
- if(z + delta == z)
- {
- if(fabs(delta) < 10)
- result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
- else
- result = 1;
- }
- else
- {
- if(fabs(delta) < 10)
- {
- result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
- }
- else
- {
- result = pow(zgh / (zgh + delta), z - constants::half<T>());
- }
- // Split the calculation up to avoid spurious overflow:
- result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta));
- }
- result *= pow(constants::e<T>() / (zgh + delta), delta);
- return result;
-}
-//
-// And again without Lanczos support this time:
-//
-template <class T, class Policy>
-T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos&)
-{
- BOOST_MATH_STD_USING
- //
- // The upper gamma fraction is *very* slow for z < 6, actually it's very
- // slow to converge everywhere but recursing until z > 6 gets rid of the
- // worst of it's behaviour.
- //
- T prefix = 1;
- T zd = z + delta;
- while((zd < 6) && (z < 6))
- {
- prefix /= z;
- prefix *= zd;
- z += 1;
- zd += 1;
- }
- if(delta < 10)
- {
- prefix *= exp(-z * boost::math::log1p(delta / z, pol));
- }
- else
- {
- prefix *= pow(z / zd, z);
- }
- prefix *= pow(constants::e<T>() / zd, delta);
- T sum = detail::lower_gamma_series(z, z, pol) / z;
- sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::get_epsilon<T, Policy>());
- T sumd = detail::lower_gamma_series(zd, zd, pol) / zd;
- sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policies::get_epsilon<T, Policy>());
- sum /= sumd;
- if(fabs(tools::max_value<T>() / prefix) < fabs(sum))
- return policies::raise_overflow_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Result of tgamma is too large to represent.", pol);
- return sum * prefix;
-}
-
-template <class T, class Policy>
-T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol)
-{
- BOOST_MATH_STD_USING
-
- if((z <= 0) || (z + delta <= 0))
- {
- // This isn't very sofisticated, or accurate, but it does work:
- return boost::math::tgamma(z, pol) / boost::math::tgamma(z + delta, pol);
- }
-
- if(floor(delta) == delta)
- {
- if(floor(z) == z)
- {
- //
- // Both z and delta are integers, see if we can just use table lookup
- // of the factorials to get the result:
- //
- if((z <= max_factorial<T>::value) && (z + delta <= max_factorial<T>::value))
- {
- return unchecked_factorial<T>((unsigned)itrunc(z, pol) - 1) / unchecked_factorial<T>((unsigned)itrunc(T(z + delta), pol) - 1);
- }
- }
- if(fabs(delta) < 20)
- {
- //
- // delta is a small integer, we can use a finite product:
- //
- if(delta == 0)
- return 1;
- if(delta < 0)
- {
- z -= 1;
- T result = z;
- while(0 != (delta += 1))
- {
- z -= 1;
- result *= z;
- }
- return result;
- }
- else
- {
- T result = 1 / z;
- while(0 != (delta -= 1))
- {
- z += 1;
- result /= z;
- }
- return result;
- }
- }
- }
- typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
- return tgamma_delta_ratio_imp_lanczos(z, delta, pol, lanczos_type());
-}
-
-template <class T, class Policy>
-T tgamma_ratio_imp(T x, T y, const Policy& pol)
-{
- BOOST_MATH_STD_USING
-
- if((x <= 0) || (boost::math::isinf)(x))
- return policies::raise_domain_error<T>("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", x, pol);
- if((y <= 0) || (boost::math::isinf)(y))
- return policies::raise_domain_error<T>("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", y, pol);
-
- if(x <= tools::min_value<T>())
- {
- // Special case for denorms...Ugh.
- T shift = ldexp(T(1), tools::digits<T>());
- return shift * tgamma_ratio_imp(T(x * shift), y, pol);
- }
-
- if((x < max_factorial<T>::value) && (y < max_factorial<T>::value))
- {
- // Rather than subtracting values, lets just call the gamma functions directly:
- return boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
- }
- T prefix = 1;
- if(x < 1)
- {
- if(y < 2 * max_factorial<T>::value)
- {
- // We need to sidestep on x as well, otherwise we'll underflow
- // before we get to factor in the prefix term:
- prefix /= x;
- x += 1;
- while(y >= max_factorial<T>::value)
- {
- y -= 1;
- prefix /= y;
- }
- return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
- }
- //
- // result is almost certainly going to underflow to zero, try logs just in case:
- //
- return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol));
- }
- if(y < 1)
- {
- if(x < 2 * max_factorial<T>::value)
- {
- // We need to sidestep on y as well, otherwise we'll overflow
- // before we get to factor in the prefix term:
- prefix *= y;
- y += 1;
- while(x >= max_factorial<T>::value)
- {
- x -= 1;
- prefix *= x;
- }
- return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
- }
- //
- // Result will almost certainly overflow, try logs just in case:
- //
- return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol));
- }
- //
- // Regular case, x and y both large and similar in magnitude:
- //
- return boost::math::tgamma_delta_ratio(x, y - x, pol);
-}
-
-template <class T, class Policy>
-T gamma_p_derivative_imp(T a, T x, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- //
- // Usual error checks first:
- //
- if(a <= 0)
- return policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
- if(x < 0)
- return policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
- //
- // Now special cases:
- //
- if(x == 0)
- {
- return (a > 1) ? 0 :
- (a == 1) ? 1 : policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
- }
- //
- // Normal case:
- //
- typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
- T f1 = detail::regularised_gamma_prefix(a, x, pol, lanczos_type());
- if((x < 1) && (tools::max_value<T>() * x < f1))
- {
- // overflow:
- return policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
- }
- if(f1 == 0)
- {
- // Underflow in calculation, use logs instead:
- f1 = a * log(x) - x - lgamma(a, pol) - log(x);
- f1 = exp(f1);
- }
- else
- f1 /= x;
-
- return f1;
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type
- tgamma(T z, const Policy& /* pol */, const mpl::true_)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)");
-}
-
-template <class T, class Policy>
-struct igamma_initializer
-{
- struct init
- {
- init()
- {
- typedef typename policies::precision<T, Policy>::type precision_type;
-
- typedef typename mpl::if_<
- mpl::or_<mpl::equal_to<precision_type, mpl::int_<0> >,
- mpl::greater<precision_type, mpl::int_<113> > >,
- mpl::int_<0>,
- 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>,
- mpl::int_<113>
- >::type
- >::type
- >::type tag_type;
-
- do_init(tag_type());
- }
- template <int N>
- static void do_init(const mpl::int_<N>&)
- {
- // If std::numeric_limits<T>::digits is zero, we must not call
- // our inituialization code here as the precision presumably
- // varies at runtime, and will not have been set yet. Plus the
- // code requiring initialization isn't called when digits == 0.
- if(std::numeric_limits<T>::digits)
- {
- boost::math::gamma_p(static_cast<T>(400), static_cast<T>(400), Policy());
- }
- }
- static void do_init(const mpl::int_<53>&){}
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class Policy>
-const typename igamma_initializer<T, Policy>::init igamma_initializer<T, Policy>::initializer;
-
-template <class T, class Policy>
-struct lgamma_initializer
-{
- struct init
- {
- init()
- {
- typedef typename policies::precision<T, Policy>::type precision_type;
- typedef typename mpl::if_<
- mpl::and_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::greater<precision_type, mpl::int_<0> >
- >,
- mpl::int_<64>,
- typename mpl::if_<
- mpl::and_<
- mpl::less_equal<precision_type, mpl::int_<113> >,
- mpl::greater<precision_type, mpl::int_<0> >
- >,
- mpl::int_<113>, mpl::int_<0> >::type
- >::type tag_type;
- do_init(tag_type());
- }
- static void do_init(const mpl::int_<64>&)
- {
- boost::math::lgamma(static_cast<T>(2.5), Policy());
- boost::math::lgamma(static_cast<T>(1.25), Policy());
- boost::math::lgamma(static_cast<T>(1.75), Policy());
- }
- static void do_init(const mpl::int_<113>&)
- {
- boost::math::lgamma(static_cast<T>(2.5), Policy());
- boost::math::lgamma(static_cast<T>(1.25), Policy());
- boost::math::lgamma(static_cast<T>(1.5), Policy());
- boost::math::lgamma(static_cast<T>(1.75), Policy());
- }
- static void do_init(const mpl::int_<0>&)
- {
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class Policy>
-const typename lgamma_initializer<T, Policy>::init lgamma_initializer<T, Policy>::initializer;
-
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- tgamma(T1 a, T2 z, const Policy&, const mpl::false_)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- igamma_initializer<value_type, forwarding_policy>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(
- detail::gamma_incomplete_imp(static_cast<value_type>(a),
- static_cast<value_type>(z), false, true,
- forwarding_policy(), static_cast<value_type*>(0)), "boost::math::tgamma<%1%>(%1%, %1%)");
-}
-
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- tgamma(T1 a, T2 z, const mpl::false_ tag)
-{
- return tgamma(a, z, policies::policy<>(), tag);
-}
-
-
-} // namespace detail
-
-template <class T>
-inline typename tools::promote_args<T>::type
- tgamma(T z)
-{
- return tgamma(z, policies::policy<>());
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type
- lgamma(T z, int* sign, const Policy&)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- detail::lgamma_initializer<value_type, forwarding_policy>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::lgamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)");
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type
- lgamma(T z, int* sign)
-{
- return lgamma(z, sign, policies::policy<>());
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type
- lgamma(T x, const Policy& pol)
-{
- return ::boost::math::lgamma(x, 0, pol);
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type
- lgamma(T x)
-{
- return ::boost::math::lgamma(x, 0, policies::policy<>());
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type
- tgamma1pm1(T z, const Policy& /* pol */)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- return policies::checked_narrowing_cast<typename remove_cv<result_type>::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)");
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type
- tgamma1pm1(T z)
-{
- return tgamma1pm1(z, policies::policy<>());
-}
-
-//
-// Full upper incomplete gamma:
-//
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- tgamma(T1 a, T2 z)
-{
- //
- // Type T2 could be a policy object, or a value, select the
- // right overload based on T2:
- //
- typedef typename policies::is_policy<T2>::type maybe_policy;
- return detail::tgamma(a, z, maybe_policy());
-}
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- tgamma(T1 a, T2 z, const Policy& pol)
-{
- return detail::tgamma(a, z, pol, mpl::false_());
-}
-//
-// Full lower incomplete gamma:
-//
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- tgamma_lower(T1 a, T2 z, const Policy&)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- detail::igamma_initializer<value_type, forwarding_policy>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(
- detail::gamma_incomplete_imp(static_cast<value_type>(a),
- static_cast<value_type>(z), false, false,
- forwarding_policy(), static_cast<value_type*>(0)), "tgamma_lower<%1%>(%1%, %1%)");
-}
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- tgamma_lower(T1 a, T2 z)
-{
- return tgamma_lower(a, z, policies::policy<>());
-}
-//
-// Regularised upper incomplete gamma:
-//
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- gamma_q(T1 a, T2 z, const Policy& /* pol */)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- detail::igamma_initializer<value_type, forwarding_policy>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(
- detail::gamma_incomplete_imp(static_cast<value_type>(a),
- static_cast<value_type>(z), true, true,
- forwarding_policy(), static_cast<value_type*>(0)), "gamma_q<%1%>(%1%, %1%)");
-}
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- gamma_q(T1 a, T2 z)
-{
- return gamma_q(a, z, policies::policy<>());
-}
-//
-// Regularised lower incomplete gamma:
-//
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- gamma_p(T1 a, T2 z, const Policy&)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- detail::igamma_initializer<value_type, forwarding_policy>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(
- detail::gamma_incomplete_imp(static_cast<value_type>(a),
- static_cast<value_type>(z), true, false,
- forwarding_policy(), static_cast<value_type*>(0)), "gamma_p<%1%>(%1%, %1%)");
-}
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- gamma_p(T1 a, T2 z)
-{
- return gamma_p(a, z, policies::policy<>());
-}
-
-// ratios of gamma functions:
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- tgamma_delta_ratio(T1 z, T2 delta, const Policy& /* pol */)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(z), static_cast<value_type>(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
-}
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- tgamma_delta_ratio(T1 z, T2 delta)
-{
- return tgamma_delta_ratio(z, delta, policies::policy<>());
-}
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- tgamma_ratio(T1 a, T2 b, const Policy&)
-{
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_ratio_imp(static_cast<value_type>(a), static_cast<value_type>(b), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
-}
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- tgamma_ratio(T1 a, T2 b)
-{
- return tgamma_ratio(a, b, policies::policy<>());
-}
-
-template <class T1, class T2, class Policy>
-inline typename tools::promote_args<T1, T2>::type
- gamma_p_derivative(T1 a, T2 x, const Policy&)
-{
- BOOST_FPU_EXCEPTION_GUARD
- typedef typename tools::promote_args<T1, T2>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_p_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)");
-}
-template <class T1, class T2>
-inline typename tools::promote_args<T1, T2>::type
- gamma_p_derivative(T1 a, T2 x)
-{
- return gamma_p_derivative(a, x, policies::policy<>());
-}
-
-} // namespace math
-} // namespace boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#include <boost/math/special_functions/detail/igamma_inverse.hpp>
-#include <boost/math/special_functions/detail/gamma_inva.hpp>
-#include <boost/math/special_functions/erf.hpp>
-
-#endif // BOOST_MATH_SF_GAMMA_HPP
-
-
-
-
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp
deleted file mode 100644
index c1ff86930b6..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp
+++ /dev/null
@@ -1,1296 +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_FUNCTIONS_LANCZOS
-#define BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/config.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/limits.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/policies/policy.hpp>
-#include <boost/mpl/less_equal.hpp>
-
-#include <limits.h>
-
-namespace boost{ namespace math{ namespace lanczos{
-
-//
-// Individual lanczos approximations start here.
-//
-// Optimal values for G for each N are taken from
-// http://web.mala.bc.ca/pughg/phdThesis/phdThesis.pdf,
-// as are the theoretical error bounds.
-//
-// Constants calculated using the method described by Godfrey
-// http://my.fit.edu/~gabdo/gamma.txt and elaborated by Toth at
-// http://www.rskey.org/gamma.htm using NTL::RR at 1000 bit precision.
-//
-// Begin with a small helper to force initialization of constants prior
-// to main. This makes the constant initialization thread safe, even
-// when called with a user-defined number type.
-//
-template <class Lanczos, class T>
-struct lanczos_initializer
-{
- struct init
- {
- init()
- {
- T t(1);
- Lanczos::lanczos_sum(t);
- Lanczos::lanczos_sum_expG_scaled(t);
- Lanczos::lanczos_sum_near_1(t);
- Lanczos::lanczos_sum_near_2(t);
- Lanczos::g();
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-template <class Lanczos, class T>
-typename lanczos_initializer<Lanczos, T>::init const lanczos_initializer<Lanczos, T>::initializer;
-//
-// Lanczos Coefficients for N=6 G=5.581
-// Max experimental error (with arbitary precision arithmetic) 9.516e-12
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos6 : public mpl::int_<35>
-{
- //
- // Produces slightly better than float precision when evaluated at
- // double precision:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[6] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 8706.349592549009182288174442774377925882)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 8523.650341121874633477483696775067709735)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 3338.029219476423550899999750161289306564)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 653.6424994294008795995653541449610986791)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 63.99951844938187085666201263218840287667)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.506628274631006311133031631822390264407))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
- static_cast<boost::uint16_t>(0u),
- static_cast<boost::uint16_t>(24u),
- static_cast<boost::uint16_t>(50u),
- static_cast<boost::uint16_t>(35u),
- static_cast<boost::uint16_t>(10u),
- static_cast<boost::uint16_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[6] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 32.81244541029783471623665933780748627823)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 32.12388941444332003446077108933558534361)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 12.58034729455216106950851080138931470954)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.463444478353241423633780693218408889251)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.2412010548258800231126240760264822486599)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.009446967704539249494420221613134244048319))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
- static_cast<boost::uint16_t>(0u),
- static_cast<boost::uint16_t>(24u),
- static_cast<boost::uint16_t>(50u),
- static_cast<boost::uint16_t>(35u),
- static_cast<boost::uint16_t>(10u),
- static_cast<boost::uint16_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[5] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.044879010930422922760429926121241330235)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -2.751366405578505366591317846728753993668)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 1.02282965224225004296750609604264824677)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -0.09786124911582813985028889636665335893627)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.0009829742267506615183144364420540766510112)),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[5] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 5.748142489536043490764289256167080091892)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -7.734074268282457156081021756682138251825)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.875167944990511006997713242805893543947)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -0.2750873773533504542306766137703788781776)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.002763134585812698552178368447708846850353)),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 5.581000000000000405009359383257105946541; }
-};
-
-//
-// Lanczos Coefficients for N=11 G=10.900511
-// Max experimental error (with arbitary precision arithmetic) 2.16676e-19
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos11 : public mpl::int_<60>
-{
- //
- // Produces slightly better than double precision when evaluated at
- // extended-double precision:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[11] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 38474670393.31776828316099004518914832218)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 36857665043.51950660081971227404959150474)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 15889202453.72942008945006665994637853242)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 4059208354.298834770194507810788393801607)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 680547661.1834733286087695557084801366446)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 78239755.00312005289816041245285376206263)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 6246580.776401795264013335510453568106366)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 341986.3488721347032223777872763188768288)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 12287.19451182455120096222044424100527629)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 261.6140441641668190791708576058805625502)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 2.506628274631000502415573855452633787834))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[11] = {
- static_cast<boost::uint32_t>(0u),
- static_cast<boost::uint32_t>(362880u),
- static_cast<boost::uint32_t>(1026576u),
- static_cast<boost::uint32_t>(1172700u),
- static_cast<boost::uint32_t>(723680u),
- static_cast<boost::uint32_t>(269325u),
- static_cast<boost::uint32_t>(63273u),
- static_cast<boost::uint32_t>(9450u),
- static_cast<boost::uint32_t>(870u),
- static_cast<boost::uint32_t>(45u),
- static_cast<boost::uint32_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[11] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 709811.662581657956893540610814842699825)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 679979.847415722640161734319823103390728)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 293136.785721159725251629480984140341656)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 74887.5403291467179935942448101441897121)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 12555.29058241386295096255111537516768137)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 1443.42992444170669746078056942194198252)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 115.2419459613734722083208906727972935065)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 6.30923920573262762719523981992008976989)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.2266840463022436475495508977579735223818)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.004826466289237661857584712046231435101741)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.4624429436045378766270459638520555557321e-4))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[11] = {
- static_cast<boost::uint32_t>(0u),
- static_cast<boost::uint32_t>(362880u),
- static_cast<boost::uint32_t>(1026576u),
- static_cast<boost::uint32_t>(1172700u),
- static_cast<boost::uint32_t>(723680u),
- static_cast<boost::uint32_t>(269325u),
- static_cast<boost::uint32_t>(63273u),
- static_cast<boost::uint32_t>(9450u),
- static_cast<boost::uint32_t>(870u),
- static_cast<boost::uint32_t>(45u),
- static_cast<boost::uint32_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[10] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 4.005853070677940377969080796551266387954)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -13.17044315127646469834125159673527183164)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 17.19146865350790353683895137079288129318)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -11.36446409067666626185701599196274701126)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 4.024801119349323770107694133829772634737)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.7445703262078094128346501724255463005006)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.06513861351917497265045550019547857713172)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.00217899958561830354633560009312512312758)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.17655204574495137651670832229571934738e-4)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.1036282091079938047775645941885460820853e-7)),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[10] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 19.05889633808148715159575716844556056056)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -62.66183664701721716960978577959655644762)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 81.7929198065004751699057192860287512027)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -54.06941772964234828416072865069196553015)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 19.14904664790693019642068229478769661515)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -3.542488556926667589704590409095331790317)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.3099140334815639910894627700232804503017)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.01036716187296241640634252431913030440825)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.8399926504443119927673843789048514017761e-4)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.493038376656195010308610694048822561263e-7)),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 10.90051099999999983936049829935654997826; }
-};
-
-//
-// Lanczos Coefficients for N=13 G=13.144565
-// Max experimental error (with arbitary precision arithmetic) 9.2213e-23
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos13 : public mpl::int_<72>
-{
- //
- // Produces slightly better than extended-double precision when evaluated at
- // higher precision:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[13] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 44012138428004.60895436261759919070125699)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 41590453358593.20051581730723108131357995)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 18013842787117.99677796276038389462742949)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 4728736263475.388896889723995205703970787)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 837910083628.4046470415724300225777912264)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 105583707273.4299344907359855510105321192)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 9701363618.494999493386608345339104922694)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 654914397.5482052641016767125048538245644)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 32238322.94213356530668889463945849409184)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1128514.219497091438040721811544858643121)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 26665.79378459858944762533958798805525125)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 381.8801248632926870394389468349331394196)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 2.506628274631000502415763426076722427007))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
- static_cast<boost::uint32_t>(0u),
- static_cast<boost::uint32_t>(39916800u),
- static_cast<boost::uint32_t>(120543840u),
- static_cast<boost::uint32_t>(150917976u),
- static_cast<boost::uint32_t>(105258076u),
- static_cast<boost::uint32_t>(45995730u),
- static_cast<boost::uint32_t>(13339535u),
- static_cast<boost::uint32_t>(2637558u),
- static_cast<boost::uint32_t>(357423u),
- static_cast<boost::uint32_t>(32670u),
- static_cast<boost::uint32_t>(1925u),
- static_cast<boost::uint32_t>(66u),
- static_cast<boost::uint32_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[13] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 86091529.53418537217994842267760536134841)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 81354505.17858011242874285785316135398567)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 35236626.38815461910817650960734605416521)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 9249814.988024471294683815872977672237195)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1639024.216687146960253839656643518985826)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 206530.8157641225032631778026076868855623)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 18976.70193530288915698282139308582105936)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1281.068909912559479885759622791374106059)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 63.06093343420234536146194868906771599354)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 2.207470909792527638222674678171050209691)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.05216058694613505427476207805814960742102)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.0007469903808915448316510079585999893674101)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.4903180573459871862552197089738373164184e-5))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
- static_cast<boost::uint32_t>(0u),
- static_cast<boost::uint32_t>(39916800u),
- static_cast<boost::uint32_t>(120543840u),
- static_cast<boost::uint32_t>(150917976u),
- static_cast<boost::uint32_t>(105258076u),
- static_cast<boost::uint32_t>(45995730u),
- static_cast<boost::uint32_t>(13339535u),
- static_cast<boost::uint32_t>(2637558u),
- static_cast<boost::uint32_t>(357423u),
- static_cast<boost::uint32_t>(32670u),
- static_cast<boost::uint32_t>(1925u),
- static_cast<boost::uint32_t>(66u),
- static_cast<boost::uint32_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[12] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 4.832115561461656947793029596285626840312)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -19.86441536140337740383120735104359034688)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 33.9927422807443239927197864963170585331)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -31.41520692249765980987427413991250886138)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 17.0270866009599345679868972409543597821)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -5.5077216950865501362506920516723682167)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1.037811741948214855286817963800439373362)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.106640468537356182313660880481398642811)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.005276450526660653288757565778182586742831)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.0001000935625597121545867453746252064770029)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.462590910138598083940803704521211569234e-6)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.1735307814426389420248044907765671743012e-9)),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[12] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 26.96979819614830698367887026728396466395)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -110.8705424709385114023884328797900204863)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 189.7258846119231466417015694690434770085)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -175.3397202971107486383321670769397356553)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 95.03437648691551457087250340903980824948)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -30.7406022781665264273675797983497141978)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 5.792405601630517993355102578874590410552)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.5951993240669148697377539518639997795831)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.02944979359164017509944724739946255067671)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.0005586586555377030921194246330399163602684)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.2581888478270733025288922038673392636029e-5)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.9685385411006641478305219367315965391289e-9)),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 13.1445650000000000545696821063756942749; }
-};
-
-//
-// Lanczos Coefficients for N=22 G=22.61891
-// Max experimental error (with arbitary precision arithmetic) 2.9524e-38
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos22 : public mpl::int_<120>
-{
- //
- // Produces slightly better than 128-bit long-double precision when
- // evaluated at higher precision:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[22] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 46198410803245094237463011094.12173081986)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 43735859291852324413622037436.321513777)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 19716607234435171720534556386.97481377748)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 5629401471315018442177955161.245623932129)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1142024910634417138386281569.245580222392)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 175048529315951173131586747.695329230778)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 21044290245653709191654675.41581372963167)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2033001410561031998451380.335553678782601)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 160394318862140953773928.8736211601848891)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 10444944438396359705707.48957290388740896)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 565075825801617290121.1466393747967538948)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 25475874292116227538.99448534450411942597)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 957135055846602154.6720835535232270205725)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 29874506304047462.23662392445173880821515)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 769651310384737.2749087590725764959689181)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 16193289100889.15989633624378404096011797)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 273781151680.6807433264462376754578933261)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3630485900.32917021712188739762161583295)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 36374352.05577334277856865691538582936484)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 258945.7742115532455441786924971194951043)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1167.501919472435718934219997431551246996)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2.50662827463100050241576528481104525333))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[22] = {
- BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(2432902008176640000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(8752948036761600000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(13803759753640704000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(12870931245150988800, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(8037811822645051776, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(3599979517947607200, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1206647803780373360, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(311333643161390640, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(63030812099294896, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(10142299865511450, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1307535010540395, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(135585182899530, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(11310276995381, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(756111184500, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(40171771630, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1672280820, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(53327946, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1256850, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(20615, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(210, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[22] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 6939996264376682180.277485395074954356211)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 6570067992110214451.87201438870245659384)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2961859037444440551.986724631496417064121)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 845657339772791245.3541226499766163431651)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 171556737035449095.2475716923888737881837)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 26296059072490867.7822441885603400926007)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3161305619652108.433798300149816829198706)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 305400596026022.4774396904484542582526472)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 24094681058862.55120507202622377623528108)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1569055604375.919477574824168939428328839)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 84886558909.02047889339710230696942513159)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3827024985.166751989686050643579753162298)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 143782298.9273215199098728674282885500522)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 4487794.24541641841336786238909171265944)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 115618.2025760830513505888216285273541959)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2432.580773108508276957461757328744780439)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 41.12782532742893597168530008461874360191)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.5453771709477689805460179187388702295792)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.005464211062612080347167337964166505282809)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.388992321263586767037090706042788910953e-4)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.1753839324538447655939518484052327068859e-6)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.3765495513732730583386223384116545391759e-9))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[22] = {
- BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(2432902008176640000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(8752948036761600000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(13803759753640704000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(12870931245150988800, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(8037811822645051776, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(3599979517947607200, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1206647803780373360, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(311333643161390640, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(63030812099294896, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(10142299865511450, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1307535010540395, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(135585182899530, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(11310276995381, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(756111184500, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(40171771630, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1672280820, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(53327946, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1256850, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(20615, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(210, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[21] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 8.318998691953337183034781139546384476554)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -63.15415991415959158214140353299240638675)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 217.3108224383632868591462242669081540163)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -448.5134281386108366899784093610397354889)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 619.2903759363285456927248474593012711346)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -604.1630177420625418522025080080444177046)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 428.8166750424646119935047118287362193314)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -224.6988753721310913866347429589434550302)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 87.32181627555510833499451817622786940961)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -25.07866854821128965662498003029199058098)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 5.264398125689025351448861011657789005392)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.792518936256495243383586076579921559914)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.08317448364744713773350272460937904691566)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.005845345166274053157781068150827567998882)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.0002599412126352082483326238522490030412391)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.6748102079670763884917431338234783496303e-5)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.908824383434109002762325095643458603605e-7)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.5299325929309389890892469299969669579725e-9)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.994306085859549890267983602248532869362e-12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.3499893692975262747371544905820891835298e-15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.7260746353663365145454867069182884694961e-20)),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[21] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 75.39272007105208086018421070699575462226)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -572.3481967049935412452681346759966390319)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1969.426202741555335078065370698955484358)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -4064.74968778032030891520063865996757519)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 5612.452614138013929794736248384309574814)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -5475.357667500026172903620177988213902339)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3886.243614216111328329547926490398103492)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -2036.382026072125407192448069428134470564)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 791.3727954936062108045551843636692287652)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -227.2808432388436552794021219198885223122)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 47.70974355562144229897637024320739257284)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -7.182373807798293545187073539819697141572)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.7537866989631514559601547530490976100468)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.05297470142240154822658739758236594717787)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.00235577330936380542539812701472320434133)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.6115613067659273118098229498679502138802e-4)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.8236417010170941915758315020695551724181e-6)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.4802628430993048190311242611330072198089e-8)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.9011113376981524418952720279739624707342e-11)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.3171854152689711198382455703658589996796e-14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.6580207998808093935798753964580596673177e-19)),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 22.61890999999999962710717227309942245483; }
-};
-
-//
-// Lanczos Coefficients for N=6 G=1.428456135094165802001953125
-// Max experimental error (with arbitary precision arithmetic) 8.111667e-8
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos6m24 : public mpl::int_<24>
-{
- //
- // Use for float precision, when evaluated as a float:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- static const T num[6] = {
- static_cast<T>(58.52061591769095910314047740215847630266L),
- static_cast<T>(182.5248962595894264831189414768236280862L),
- static_cast<T>(211.0971093028510041839168287718170827259L),
- static_cast<T>(112.2526547883668146736465390902227161763L),
- static_cast<T>(27.5192015197455403062503721613097825345L),
- static_cast<T>(2.50662858515256974113978724717473206342L)
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
- static_cast<boost::uint16_t>(0u),
- static_cast<boost::uint16_t>(24u),
- static_cast<boost::uint16_t>(50u),
- static_cast<boost::uint16_t>(35u),
- static_cast<boost::uint16_t>(10u),
- static_cast<boost::uint16_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- static const T num[6] = {
- static_cast<T>(14.0261432874996476619570577285003839357L),
- static_cast<T>(43.74732405540314316089531289293124360129L),
- static_cast<T>(50.59547402616588964511581430025589038612L),
- static_cast<T>(26.90456680562548195593733429204228910299L),
- static_cast<T>(6.595765571169314946316366571954421695196L),
- static_cast<T>(0.6007854010515290065101128585795542383721L)
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
- static_cast<boost::uint16_t>(0u),
- static_cast<boost::uint16_t>(24u),
- static_cast<boost::uint16_t>(50u),
- static_cast<boost::uint16_t>(35u),
- static_cast<boost::uint16_t>(10u),
- static_cast<boost::uint16_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- static const T d[5] = {
- static_cast<T>(0.4922488055204602807654354732674868442106L),
- static_cast<T>(0.004954497451132152436631238060933905650346L),
- static_cast<T>(-0.003374784572167105840686977985330859371848L),
- static_cast<T>(0.001924276018962061937026396537786414831385L),
- static_cast<T>(-0.00056533046336427583708166383712907694434L),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- static const T d[5] = {
- static_cast<T>(0.6534966888520080645505805298901130485464L),
- static_cast<T>(0.006577461728560758362509168026049182707101L),
- static_cast<T>(-0.004480276069269967207178373559014835978161L),
- static_cast<T>(0.00255461870648818292376982818026706528842L),
- static_cast<T>(-0.000750517993690428370380996157470900204524L),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 1.428456135094165802001953125; }
-};
-
-//
-// Lanczos Coefficients for N=13 G=6.024680040776729583740234375
-// Max experimental error (with arbitary precision arithmetic) 1.196214e-17
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos13m53 : public mpl::int_<53>
-{
- //
- // Use for double precision, when evaluated as a double:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- static const T num[13] = {
- static_cast<T>(23531376880.41075968857200767445163675473L),
- static_cast<T>(42919803642.64909876895789904700198885093L),
- static_cast<T>(35711959237.35566804944018545154716670596L),
- static_cast<T>(17921034426.03720969991975575445893111267L),
- static_cast<T>(6039542586.35202800506429164430729792107L),
- static_cast<T>(1439720407.311721673663223072794912393972L),
- static_cast<T>(248874557.8620541565114603864132294232163L),
- static_cast<T>(31426415.58540019438061423162831820536287L),
- static_cast<T>(2876370.628935372441225409051620849613599L),
- static_cast<T>(186056.2653952234950402949897160456992822L),
- static_cast<T>(8071.672002365816210638002902272250613822L),
- static_cast<T>(210.8242777515793458725097339207133627117L),
- static_cast<T>(2.506628274631000270164908177133837338626L)
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
- static_cast<boost::uint32_t>(0u),
- static_cast<boost::uint32_t>(39916800u),
- static_cast<boost::uint32_t>(120543840u),
- static_cast<boost::uint32_t>(150917976u),
- static_cast<boost::uint32_t>(105258076u),
- static_cast<boost::uint32_t>(45995730u),
- static_cast<boost::uint32_t>(13339535u),
- static_cast<boost::uint32_t>(2637558u),
- static_cast<boost::uint32_t>(357423u),
- static_cast<boost::uint32_t>(32670u),
- static_cast<boost::uint32_t>(1925u),
- static_cast<boost::uint32_t>(66u),
- static_cast<boost::uint32_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- static const T num[13] = {
- static_cast<T>(56906521.91347156388090791033559122686859L),
- static_cast<T>(103794043.1163445451906271053616070238554L),
- static_cast<T>(86363131.28813859145546927288977868422342L),
- static_cast<T>(43338889.32467613834773723740590533316085L),
- static_cast<T>(14605578.08768506808414169982791359218571L),
- static_cast<T>(3481712.15498064590882071018964774556468L),
- static_cast<T>(601859.6171681098786670226533699352302507L),
- static_cast<T>(75999.29304014542649875303443598909137092L),
- static_cast<T>(6955.999602515376140356310115515198987526L),
- static_cast<T>(449.9445569063168119446858607650988409623L),
- static_cast<T>(19.51992788247617482847860966235652136208L),
- static_cast<T>(0.5098416655656676188125178644804694509993L),
- static_cast<T>(0.006061842346248906525783753964555936883222L)
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
- static_cast<boost::uint32_t>(0u),
- static_cast<boost::uint32_t>(39916800u),
- static_cast<boost::uint32_t>(120543840u),
- static_cast<boost::uint32_t>(150917976u),
- static_cast<boost::uint32_t>(105258076u),
- static_cast<boost::uint32_t>(45995730u),
- static_cast<boost::uint32_t>(13339535u),
- static_cast<boost::uint32_t>(2637558u),
- static_cast<boost::uint32_t>(357423u),
- static_cast<boost::uint32_t>(32670u),
- static_cast<boost::uint32_t>(1925u),
- static_cast<boost::uint32_t>(66u),
- static_cast<boost::uint32_t>(1u)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- static const T d[12] = {
- static_cast<T>(2.208709979316623790862569924861841433016L),
- static_cast<T>(-3.327150580651624233553677113928873034916L),
- static_cast<T>(1.483082862367253753040442933770164111678L),
- static_cast<T>(-0.1993758927614728757314233026257810172008L),
- static_cast<T>(0.004785200610085071473880915854204301886437L),
- static_cast<T>(-0.1515973019871092388943437623825208095123e-5L),
- static_cast<T>(-0.2752907702903126466004207345038327818713e-7L),
- static_cast<T>(0.3075580174791348492737947340039992829546e-7L),
- static_cast<T>(-0.1933117898880828348692541394841204288047e-7L),
- static_cast<T>(0.8690926181038057039526127422002498960172e-8L),
- static_cast<T>(-0.2499505151487868335680273909354071938387e-8L),
- static_cast<T>(0.3394643171893132535170101292240837927725e-9L),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- static const T d[12] = {
- static_cast<T>(6.565936202082889535528455955485877361223L),
- static_cast<T>(-9.8907772644920670589288081640128194231L),
- static_cast<T>(4.408830289125943377923077727900630927902L),
- static_cast<T>(-0.5926941084905061794445733628891024027949L),
- static_cast<T>(0.01422519127192419234315002746252160965831L),
- static_cast<T>(-0.4506604409707170077136555010018549819192e-5L),
- static_cast<T>(-0.8183698410724358930823737982119474130069e-7L),
- static_cast<T>(0.9142922068165324132060550591210267992072e-7L),
- static_cast<T>(-0.5746670642147041587497159649318454348117e-7L),
- static_cast<T>(0.2583592566524439230844378948704262291927e-7L),
- static_cast<T>(-0.7430396708998719707642735577238449585822e-8L),
- static_cast<T>(0.1009141566987569892221439918230042368112e-8L),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 6.024680040776729583740234375; }
-};
-
-//
-// Lanczos Coefficients for N=17 G=12.2252227365970611572265625
-// Max experimental error (with arbitary precision arithmetic) 2.7699e-26
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos17m64 : public mpl::int_<64>
-{
- //
- // Use for extended-double precision, when evaluated as an extended-double:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[17] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 553681095419291969.2230556393350368550504)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 731918863887667017.2511276782146694632234)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 453393234285807339.4627124634539085143364)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 174701893724452790.3546219631779712198035)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 46866125995234723.82897281620357050883077)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9281280675933215.169109622777099699054272)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1403600894156674.551057997617468721789536)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 165345984157572.7305349809894046783973837)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 15333629842677.31531822808737907246817024)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1123152927963.956626161137169462874517318)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 64763127437.92329018717775593533620578237)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2908830362.657527782848828237106640944457)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 99764700.56999856729959383751710026787811)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2525791.604886139959837791244686290089331)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 44516.94034970167828580039370201346554872)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 488.0063567520005730476791712814838113252)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.50662827463100050241576877135758834683))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[17] = {
- BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1307674368000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(4339163001600, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(6165817614720, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(5056995703824, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(2706813345600, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1009672107080, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(272803210680, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(54631129553, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(8207628000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(928095740, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(78558480, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(4899622, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(218400, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(6580, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(120, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[17] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2715894658327.717377557655133124376674911)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3590179526097.912105038525528721129550434)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2223966599737.814969312127353235818710172)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 856940834518.9562481809925866825485883417)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 229885871668.749072933597446453399395469)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 45526171687.54610815813502794395753410032)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6884887713.165178784550917647709216424823)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 811048596.1407531864760282453852372777439)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 75213915.96540822314499613623119501704812)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5509245.417224265151697527957954952830126)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 317673.5368435419126714931842182369574221)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 14268.27989845035520147014373320337523596)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 489.3618720403263670213909083601787814792)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 12.38941330038454449295883217865458609584)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.2183627389504614963941574507281683147897)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.002393749522058449186690627996063983095463)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1229541408909435212800785616808830746135e-4))
- };
- static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[17] = {
- BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1307674368000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(4339163001600, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(6165817614720, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(5056995703824, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(2706813345600, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1009672107080, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(272803210680, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(54631129553, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(8207628000, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(928095740, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(78558480, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(4899622, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(218400, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(6580, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(120, uLL),
- BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[16] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.493645054286536365763334986866616581265)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -16.95716370392468543800733966378143997694)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 26.19196892983737527836811770970479846644)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -21.3659076437988814488356323758179283908)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.913992596774556590710751047594507535764)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.62888300018780199210536267080940382158)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.3807056693542503606384861890663080735588)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.02714647489697685807340312061034730486958)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0007815484715461206757220527133967191796747)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.6108630817371501052576880554048972272435e-5)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.5037380238864836824167713635482801545086e-8)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.1483232144262638814568926925964858237006e-13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1346609158752142460943888149156716841693e-14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.660492688923978805315914918995410340796e-15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1472114697343266749193617793755763792681e-15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.1410901942033374651613542904678399264447e-16)),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[16] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 23.56409085052261327114594781581930373708)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -88.92116338946308797946237246006238652361)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 137.3472822086847596961177383569603988797)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -112.0400438263562152489272966461114852861)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 51.98768915202973863076166956576777843805)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -13.78552090862799358221343319574970124948)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.996371068830872830250406773917646121742)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.1423525874909934506274738563671862576161)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.004098338646046865122459664947239111298524)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.3203286637326511000882086573060433529094e-4)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.2641536751640138646146395939004587594407e-7)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.7777876663062235617693516558976641009819e-13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.7061443477097101636871806229515157914789e-14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.3463537849537988455590834887691613484813e-14)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.7719578215795234036320348283011129450595e-15)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.7398586479708476329563577384044188912075e-16)),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 12.2252227365970611572265625; }
-};
-
-//
-// Lanczos Coefficients for N=24 G=20.3209821879863739013671875
-// Max experimental error (with arbitary precision arithmetic) 1.0541e-38
-// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
-//
-struct lanczos24m113 : public mpl::int_<113>
-{
- //
- // Use for long-double precision, when evaluated as an long-double:
- //
- template <class T>
- static T lanczos_sum(const T& z)
- {
- lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[24] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516))
- };
- static const T denom[24] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.112400072777760768e22)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.414847677933545472e22)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6756146673770930688000.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6548684852703068697600.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4280722865357147142912.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2021687376910682741568.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 720308216440924653696.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 199321978221066137360.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 43714229649594412832.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 7707401101297361068.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1103230881185949736.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 129006659818331295.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 12363045847086207.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 971250460939913.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 62382416421941.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3256091103430.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 136717357942.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4546047198.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 116896626.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2240315.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 30107.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 253.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1.0))
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
- template <class T>
- static T lanczos_sum_expG_scaled(const T& z)
- {
- lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T num[24] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8))
- };
- static const T denom[24] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.112400072777760768e22)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.414847677933545472e22)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6756146673770930688000.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6548684852703068697600.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4280722865357147142912.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2021687376910682741568.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 720308216440924653696.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 199321978221066137360.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 43714229649594412832.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 7707401101297361068.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1103230881185949736.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 129006659818331295.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 12363045847086207.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 971250460939913.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 62382416421941.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3256091103430.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 136717357942.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4546047198.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 116896626.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2240315.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 30107.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 253.0)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1.0))
- };
- return boost::math::tools::evaluate_rational(num, denom, z);
- }
-
-
- template<class T>
- static T lanczos_sum_near_1(const T& dz)
- {
- lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[23] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26)),
- };
- T result = 0;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(k*dz + k*k);
- }
- return result;
- }
-
- template<class T>
- static T lanczos_sum_near_2(const T& dz)
- {
- lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
- static const T d[23] = {
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24)),
- static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25)),
- };
- T result = 0;
- T z = dz + 2;
- for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
- {
- result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
- }
- return result;
- }
-
- static double g(){ return 20.3209821879863739013671875; }
-};
-
-
-//
-// placeholder for no lanczos info available:
-//
-struct undefined_lanczos : public mpl::int_<INT_MAX - 1> { };
-
-#if 0
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#define BOOST_MATH_FLT_DIGITS ::std::numeric_limits<float>::digits
-#define BOOST_MATH_DBL_DIGITS ::std::numeric_limits<double>::digits
-#define BOOST_MATH_LDBL_DIGITS ::std::numeric_limits<long double>::digits
-#else
-#define BOOST_MATH_FLT_DIGITS FLT_MANT_DIG
-#define BOOST_MATH_DBL_DIGITS DBL_MANT_DIG
-#define BOOST_MATH_LDBL_DIGITS LDBL_MANT_DIG
-#endif
-#endif
-
-typedef mpl::list<
- lanczos6m24,
-/* lanczos6, */
- lanczos13m53,
-/* lanczos13, */
- lanczos17m64,
- lanczos24m113,
- lanczos22,
- undefined_lanczos> lanczos_list;
-
-template <class Real, class Policy>
-struct lanczos
-{
- typedef typename mpl::if_<
- typename mpl::less_equal<
- typename policies::precision<Real, Policy>::type,
- mpl::int_<0>
- >::type,
- mpl::int_<INT_MAX - 2>,
- typename policies::precision<Real, Policy>::type
- >::type target_precision;
-
- typedef typename mpl::deref<typename mpl::find_if<
- lanczos_list,
- mpl::less_equal<target_precision, mpl::_1> >::type>::type type;
-};
-
-} // namespace lanczos
-} // namespace math
-} // namespace boost
-
-#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__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_MANAGED)
-#include <boost/math/special_functions/detail/lanczos_sse2.hpp>
-#endif
-#endif
-
-#endif // BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS
-
-
-
-
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp
deleted file mode 100644
index 7fa1eb8de99..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp
+++ /dev/null
@@ -1,509 +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_LOG1P_INCLUDED
-#define BOOST_MATH_LOG1P_INCLUDED
-
-#ifdef _MSC_VER
-#pragma once
-#pragma warning(push)
-#pragma warning(disable:4702) // Unreachable code (release mode only warning)
-#endif
-
-#include <boost/config/no_tr1/cmath.hpp>
-#include <math.h> // platform's ::log1p
-#include <boost/limits.hpp>
-#include <boost/math/tools/config.hpp>
-#include <boost/math/tools/series.hpp>
-#include <boost/math/tools/rational.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/special_functions/math_fwd.hpp>
-
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# include <boost/static_assert.hpp>
-#else
-# include <boost/assert.hpp>
-#endif
-
-namespace boost{ namespace math{
-
-namespace detail
-{
- // Functor log1p_series returns the next term in the Taylor series
- // pow(-1, k-1)*pow(x, k) / k
- // each time that operator() is invoked.
- //
- template <class T>
- struct log1p_series
- {
- typedef T result_type;
-
- log1p_series(T x)
- : k(0), m_mult(-x), m_prod(-1){}
-
- T operator()()
- {
- m_prod *= m_mult;
- return m_prod / ++k;
- }
-
- int count()const
- {
- return k;
- }
-
- private:
- int k;
- const T m_mult;
- T m_prod;
- log1p_series(const log1p_series&);
- log1p_series& operator=(const log1p_series&);
- };
-
-// Algorithm log1p is part of C99, but is not yet provided by many compilers.
-//
-// This version uses a Taylor series expansion for 0.5 > x > epsilon, which may
-// require up to std::numeric_limits<T>::digits+1 terms to be calculated.
-// It would be much more efficient to use the equivalence:
-// log(1+x) == (log(1+x) * x) / ((1-x) - 1)
-// Unfortunately many optimizing compilers make such a mess of this, that
-// it performs no better than log(1+x): which is to say not very well at all.
-//
-template <class T, class Policy>
-T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&)
-{ // The function returns the natural logarithm of 1 + x.
- typedef typename tools::promote_args<T>::type result_type;
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::log1p<%1%>(%1%)";
-
- if((x < -1) || (boost::math::isnan)(x))
- return policies::raise_domain_error<T>(
- function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<T>(
- function, 0, pol);
-
- result_type a = abs(result_type(x));
- if(a > result_type(0.5f))
- return log(1 + result_type(x));
- // Note that without numeric_limits specialisation support,
- // epsilon just returns zero, and our "optimisation" will always fail:
- if(a < tools::epsilon<result_type>())
- return x;
- detail::log1p_series<result_type> s(x);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
- result_type result = tools::sum_series(s, policies::get_epsilon<result_type, Policy>(), max_iter);
-#else
- result_type zero = 0;
- result_type result = tools::sum_series(s, policies::get_epsilon<result_type, Policy>(), max_iter, zero);
-#endif
- policies::check_series_iterations<T>(function, max_iter, pol);
- return result;
-}
-
-template <class T, class Policy>
-T log1p_imp(T const& x, const Policy& pol, const mpl::int_<53>&)
-{ // The function returns the natural logarithm of 1 + x.
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::log1p<%1%>(%1%)";
-
- if(x < -1)
- return policies::raise_domain_error<T>(
- function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<T>(
- function, 0, pol);
-
- T a = fabs(x);
- if(a > 0.5f)
- return log(1 + x);
- // Note that without numeric_limits specialisation support,
- // epsilon just returns zero, and our "optimisation" will always fail:
- if(a < tools::epsilon<T>())
- return x;
-
- // Maximum Deviation Found: 1.846e-017
- // Expected Error Term: 1.843e-017
- // Maximum Relative Change in Control Points: 8.138e-004
- // Max Error found at double precision = 3.250766e-016
- static const T P[] = {
- 0.15141069795941984e-16L,
- 0.35495104378055055e-15L,
- 0.33333333333332835L,
- 0.99249063543365859L,
- 1.1143969784156509L,
- 0.58052937949269651L,
- 0.13703234928513215L,
- 0.011294864812099712L
- };
- static const T Q[] = {
- 1L,
- 3.7274719063011499L,
- 5.5387948649720334L,
- 4.159201143419005L,
- 1.6423855110312755L,
- 0.31706251443180914L,
- 0.022665554431410243L,
- -0.29252538135177773e-5L
- };
-
- T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x);
- result *= x;
-
- return result;
-}
-
-template <class T, class Policy>
-T log1p_imp(T const& x, const Policy& pol, const mpl::int_<64>&)
-{ // The function returns the natural logarithm of 1 + x.
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::log1p<%1%>(%1%)";
-
- if(x < -1)
- return policies::raise_domain_error<T>(
- function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<T>(
- function, 0, pol);
-
- T a = fabs(x);
- if(a > 0.5f)
- return log(1 + x);
- // Note that without numeric_limits specialisation support,
- // epsilon just returns zero, and our "optimisation" will always fail:
- if(a < tools::epsilon<T>())
- return x;
-
- // Maximum Deviation Found: 8.089e-20
- // Expected Error Term: 8.088e-20
- // Maximum Relative Change in Control Points: 9.648e-05
- // Max Error found at long double precision = 2.242324e-19
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.807533446680736736712e-19),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.490881544804798926426e-18),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.333333333333333373941),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.17141290782087994162),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.62790522814926264694),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.13156411870766876113),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.408087379932853785336),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0706537026422828914622),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00441709903782239229447)
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.26423872346263928361),
- BOOST_MATH_BIG_CONSTANT(T, 64, 7.48189472704477708962),
- BOOST_MATH_BIG_CONSTANT(T, 64, 6.94757016732904280913),
- BOOST_MATH_BIG_CONSTANT(T, 64, 3.6493508622280767304),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.06884863623790638317),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.158292216998514145947),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00885295524069924328658),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.560026216133415663808e-6)
- };
-
- T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x);
- result *= x;
-
- return result;
-}
-
-template <class T, class Policy>
-T log1p_imp(T const& x, const Policy& pol, const mpl::int_<24>&)
-{ // The function returns the natural logarithm of 1 + x.
- BOOST_MATH_STD_USING
-
- static const char* function = "boost::math::log1p<%1%>(%1%)";
-
- if(x < -1)
- return policies::raise_domain_error<T>(
- function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<T>(
- function, 0, pol);
-
- T a = fabs(x);
- if(a > 0.5f)
- return log(1 + x);
- // Note that without numeric_limits specialisation support,
- // epsilon just returns zero, and our "optimisation" will always fail:
- if(a < tools::epsilon<T>())
- return x;
-
- // Maximum Deviation Found: 6.910e-08
- // Expected Error Term: 6.910e-08
- // Maximum Relative Change in Control Points: 2.509e-04
- // Max Error found at double precision = 6.910422e-08
- // Max Error found at float precision = 8.357242e-08
- static const T P[] = {
- -0.671192866803148236519e-7L,
- 0.119670999140731844725e-6L,
- 0.333339469182083148598L,
- 0.237827183019664122066L
- };
- static const T Q[] = {
- 1L,
- 1.46348272586988539733L,
- 0.497859871350117338894L,
- -0.00471666268910169651936L
- };
-
- T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x);
- result *= x;
-
- return result;
-}
-
-template <class T, class Policy, class tag>
-struct log1p_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- template <int N>
- static void do_init(const mpl::int_<N>&){}
- static void do_init(const mpl::int_<64>&)
- {
- boost::math::log1p(static_cast<T>(0.25), 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 log1p_initializer<T, Policy, tag>::init log1p_initializer<T, Policy, tag>::initializer;
-
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type log1p(T x, const Policy&)
-{
- 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;
-
- 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
- mpl::int_<0> // too many bits, use generic version.
- >::type
- >::type
- >::type tag_type;
-
- detail::log1p_initializer<value_type, forwarding_policy, tag_type>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(
- detail::log1p_imp(static_cast<value_type>(x), forwarding_policy(), tag_type()), "boost::math::log1p<%1%>(%1%)");
-}
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-// These overloads work around a type deduction bug:
-inline float log1p(float z)
-{
- return log1p<float>(z);
-}
-inline double log1p(double z)
-{
- return log1p<double>(z);
-}
-#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-inline long double log1p(long double z)
-{
- return log1p<long double>(z);
-}
-#endif
-#endif
-
-#ifdef log1p
-# ifndef BOOST_HAS_LOG1P
-# define BOOST_HAS_LOG1P
-# endif
-# undef log1p
-#endif
-
-#if defined(BOOST_HAS_LOG1P) && !(defined(__osf__) && defined(__DECCXX_VER))
-# ifdef BOOST_MATH_USE_C99
-template <class Policy>
-inline float log1p(float x, const Policy& pol)
-{
- if(x < -1)
- return policies::raise_domain_error<float>(
- "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<float>(
- "log1p<%1%>(%1%)", 0, pol);
- return ::log1pf(x);
-}
-#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-template <class Policy>
-inline long double log1p(long double x, const Policy& pol)
-{
- if(x < -1)
- return policies::raise_domain_error<long double>(
- "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<long double>(
- "log1p<%1%>(%1%)", 0, pol);
- return ::log1pl(x);
-}
-#endif
-#else
-template <class Policy>
-inline float log1p(float x, const Policy& pol)
-{
- if(x < -1)
- return policies::raise_domain_error<float>(
- "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<float>(
- "log1p<%1%>(%1%)", 0, pol);
- return ::log1p(x);
-}
-#endif
-template <class Policy>
-inline double log1p(double x, const Policy& pol)
-{
- if(x < -1)
- return policies::raise_domain_error<double>(
- "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<double>(
- "log1p<%1%>(%1%)", 0, pol);
- return ::log1p(x);
-}
-#elif defined(_MSC_VER) && (BOOST_MSVC >= 1400)
-//
-// You should only enable this branch if you are absolutely sure
-// that your compilers optimizer won't mess this code up!!
-// Currently tested with VC8 and Intel 9.1.
-//
-template <class Policy>
-inline double log1p(double x, const Policy& pol)
-{
- if(x < -1)
- return policies::raise_domain_error<double>(
- "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<double>(
- "log1p<%1%>(%1%)", 0, pol);
- double u = 1+x;
- if(u == 1.0)
- return x;
- else
- return ::log(u)*(x/(u-1.0));
-}
-template <class Policy>
-inline float log1p(float x, const Policy& pol)
-{
- return static_cast<float>(boost::math::log1p(static_cast<double>(x), pol));
-}
-#ifndef _WIN32_WCE
-//
-// For some reason this fails to compile under WinCE...
-// Needs more investigation.
-//
-template <class Policy>
-inline long double log1p(long double x, const Policy& pol)
-{
- if(x < -1)
- return policies::raise_domain_error<long double>(
- "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<long double>(
- "log1p<%1%>(%1%)", 0, pol);
- long double u = 1+x;
- if(u == 1.0)
- return x;
- else
- return ::logl(u)*(x/(u-1.0));
-}
-#endif
-#endif
-
-template <class T>
-inline typename tools::promote_args<T>::type log1p(T x)
-{
- return boost::math::log1p(x, policies::policy<>());
-}
-//
-// Compute log(1+x)-x:
-//
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type
- log1pmx(T x, const Policy& pol)
-{
- typedef typename tools::promote_args<T>::type result_type;
- BOOST_MATH_STD_USING
- static const char* function = "boost::math::log1pmx<%1%>(%1%)";
-
- if(x < -1)
- return policies::raise_domain_error<T>(
- function, "log1pmx(x) requires x > -1, but got x = %1%.", x, pol);
- if(x == -1)
- return -policies::raise_overflow_error<T>(
- function, 0, pol);
-
- result_type a = abs(result_type(x));
- if(a > result_type(0.95f))
- return log(1 + result_type(x)) - result_type(x);
- // Note that without numeric_limits specialisation support,
- // epsilon just returns zero, and our "optimisation" will always fail:
- if(a < tools::epsilon<result_type>())
- return -x * x / 2;
- boost::math::detail::log1p_series<T> s(x);
- s();
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- T zero = 0;
- T result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, zero);
-#else
- T result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter);
-#endif
- policies::check_series_iterations<T>(function, max_iter, pol);
- return result;
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type log1pmx(T x)
-{
- return log1pmx(x, policies::policy<>());
-}
-
-} // namespace math
-} // namespace boost
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MATH_LOG1P_INCLUDED
-
-
-
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp
deleted file mode 100644
index e21f7185d18..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp
+++ /dev/null
@@ -1,132 +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_ROUND_HPP
-#define BOOST_MATH_ROUND_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/tools/config.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/special_functions/math_fwd.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 round(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::round<%1%>(%1%)", 0, static_cast<result_type>(v), static_cast<result_type>(v), pol);
- //
- // The logic here is rather convoluted, but avoids a number of traps,
- // see discussion here https://github.com/boostorg/math/pull/8
- //
- if (-0.5 < v && v < 0.5)
- {
- // special case to avoid rounding error on the direct
- // predecessor of +0.5 resp. the direct successor of -0.5 in
- // IEEE floating point types
- return 0;
- }
- else if (v > 0)
- {
- // subtract v from ceil(v) first in order to avoid rounding
- // errors on largest representable integer numbers
- result_type c(ceil(v));
- return 0.5 < c - v ? c - 1 : c;
- }
- else
- {
- // see former branch
- result_type f(floor(v));
- return 0.5 < v - f ? f + 1 : f;
- }
-}
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type round(const T& v, const Policy&, const mpl::true_)
-{
- return v;
-}
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type round(const T& v, const Policy& pol)
-{
- return detail::round(v, pol, mpl::bool_<detail::is_integer_for_rounding<T>::value>());
-}
-template <class T>
-inline typename tools::promote_args<T>::type round(const T& v)
-{
- return round(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 iround(const T& v, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- T r = boost::math::round(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::iround<%1%>(%1%)", 0, v, 0, pol));
- return static_cast<int>(r);
-}
-template <class T>
-inline int iround(const T& v)
-{
- return iround(v, policies::policy<>());
-}
-
-template <class T, class Policy>
-inline long lround(const T& v, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- T r = boost::math::round(v, pol);
- if((r > (std::numeric_limits<long>::max)()) || (r < (std::numeric_limits<long>::min)()))
- return static_cast<long int>(policies::raise_rounding_error("boost::math::lround<%1%>(%1%)", 0, v, 0L, pol));
- return static_cast<long int>(r);
-}
-template <class T>
-inline long lround(const T& v)
-{
- return lround(v, policies::policy<>());
-}
-
-#ifdef BOOST_HAS_LONG_LONG
-
-template <class T, class Policy>
-inline boost::long_long_type llround(const T& v, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- T r = boost::math::round(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::llround<%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 llround(const T& v)
-{
- return llround(v, policies::policy<>());
-}
-
-#endif
-
-}} // namespaces
-
-#endif // BOOST_MATH_ROUND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp
deleted file mode 100644
index 91b83c1b2ee..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp
+++ /dev/null
@@ -1,1100 +0,0 @@
-// Copyright John Maddock 2007, 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)
-
-#ifndef BOOST_MATH_ZETA_HPP
-#define BOOST_MATH_ZETA_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/special_functions/math_fwd.hpp>
-#include <boost/math/tools/precision.hpp>
-#include <boost/math/tools/series.hpp>
-#include <boost/math/tools/big_constant.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/special_functions/gamma.hpp>
-#include <boost/math/special_functions/factorials.hpp>
-#include <boost/math/special_functions/sin_pi.hpp>
-
-namespace boost{ namespace math{ namespace detail{
-
-#if 0
-//
-// This code is commented out because we have a better more rapidly converging series
-// now. Retained for future reference and in case the new code causes any issues down the line....
-//
-
-template <class T, class Policy>
-struct zeta_series_cache_size
-{
- //
- // Work how large to make our cache size when evaluating the series
- // evaluation: normally this is just large enough for the series
- // to have converged, but for arbitrary precision types we need a
- // really large cache to achieve reasonable precision in a reasonable
- // time. This is important when constructing rational approximations
- // to zeta for example.
- //
- typedef typename boost::math::policies::precision<T,Policy>::type precision_type;
- typedef typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::int_<5000>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::int_<70>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<113> >,
- mpl::int_<100>,
- mpl::int_<5000>
- >::type
- >::type
- >::type type;
-};
-
-template <class T, class Policy>
-T zeta_series_imp(T s, T sc, const Policy&)
-{
- //
- // Series evaluation from:
- // Havil, J. Gamma: Exploring Euler's Constant.
- // Princeton, NJ: Princeton University Press, 2003.
- //
- // See also http://mathworld.wolfram.com/RiemannZetaFunction.html
- //
- BOOST_MATH_STD_USING
- T sum = 0;
- T mult = 0.5;
- T change;
- typedef typename zeta_series_cache_size<T,Policy>::type cache_size;
- T powers[cache_size::value] = { 0, };
- unsigned n = 0;
- do{
- T binom = -static_cast<T>(n);
- T nested_sum = 1;
- if(n < sizeof(powers) / sizeof(powers[0]))
- powers[n] = pow(static_cast<T>(n + 1), -s);
- for(unsigned k = 1; k <= n; ++k)
- {
- T p;
- if(k < sizeof(powers) / sizeof(powers[0]))
- {
- p = powers[k];
- //p = pow(k + 1, -s);
- }
- else
- p = pow(static_cast<T>(k + 1), -s);
- nested_sum += binom * p;
- binom *= (k - static_cast<T>(n)) / (k + 1);
- }
- change = mult * nested_sum;
- sum += change;
- mult /= 2;
- ++n;
- }while(fabs(change / sum) > tools::epsilon<T>());
-
- return sum * 1 / -boost::math::powm1(T(2), sc);
-}
-
-//
-// Classical p-series:
-//
-template <class T>
-struct zeta_series2
-{
- typedef T result_type;
- zeta_series2(T _s) : s(-_s), k(1){}
- T operator()()
- {
- BOOST_MATH_STD_USING
- return pow(static_cast<T>(k++), s);
- }
-private:
- T s;
- unsigned k;
-};
-
-template <class T, class Policy>
-inline T zeta_series2_imp(T s, const Policy& pol)
-{
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();;
- zeta_series2<T> f(s);
- T result = tools::sum_series(
- f,
- policies::get_epsilon<T, Policy>(),
- max_iter);
- policies::check_series_iterations<T>("boost::math::zeta_series2<%1%>(%1%)", max_iter, pol);
- return result;
-}
-#endif
-
-template <class T, class Policy>
-T zeta_polynomial_series(T s, T sc, Policy const &)
-{
- //
- // This is algorithm 3 from:
- //
- // "An Efficient Algorithm for the Riemann Zeta Function", P. Borwein,
- // Canadian Mathematical Society, Conference Proceedings.
- // See: http://www.cecm.sfu.ca/personal/pborwein/PAPERS/P155.pdf
- //
- BOOST_MATH_STD_USING
- int n = itrunc(T(log(boost::math::tools::epsilon<T>()) / -2));
- 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 * (-powm1(T(2), sc)));
-}
-
-template <class T, class Policy>
-T zeta_imp_prec(T s, T sc, const Policy& pol, const mpl::int_<0>&)
-{
- BOOST_MATH_STD_USING
- T result;
- if(s >= policies::digits<T, Policy>())
- return 1;
- result = zeta_polynomial_series(s, sc, pol);
-#if 0
- // Old code archived for future reference:
-
- //
- // Only use power series if it will converge in 100
- // iterations or less: the more iterations it consumes
- // the slower convergence becomes so we have to be very
- // careful in it's usage.
- //
- if (s > -log(tools::epsilon<T>()) / 4.5)
- result = detail::zeta_series2_imp(s, pol);
- else
- result = detail::zeta_series_imp(s, sc, pol);
-#endif
- return result;
-}
-
-template <class T, class Policy>
-inline T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<53>&)
-{
- BOOST_MATH_STD_USING
- T result;
- if(s < 1)
- {
- // Rational Approximation
- // Maximum Deviation Found: 2.020e-18
- // Expected Error Term: -2.020e-18
- // Max error found at double precision: 3.994987e-17
- static const T P[6] = {
- static_cast<T>(0.24339294433593750202L),
- static_cast<T>(-0.49092470516353571651L),
- static_cast<T>(0.0557616214776046784287L),
- static_cast<T>(-0.00320912498879085894856L),
- static_cast<T>(0.000451534528645796438704L),
- static_cast<T>(-0.933241270357061460782e-5L),
- };
- static const T Q[6] = {
- static_cast<T>(1L),
- static_cast<T>(-0.279960334310344432495L),
- static_cast<T>(0.0419676223309986037706L),
- static_cast<T>(-0.00413421406552171059003L),
- static_cast<T>(0.00024978985622317935355L),
- static_cast<T>(-0.101855788418564031874e-4L),
- };
- result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc);
- result -= 1.2433929443359375F;
- result += (sc);
- result /= (sc);
- }
- else if(s <= 2)
- {
- // Maximum Deviation Found: 9.007e-20
- // Expected Error Term: 9.007e-20
- static const T P[6] = {
- static_cast<T>(0.577215664901532860516L),
- static_cast<T>(0.243210646940107164097L),
- static_cast<T>(0.0417364673988216497593L),
- static_cast<T>(0.00390252087072843288378L),
- static_cast<T>(0.000249606367151877175456L),
- static_cast<T>(0.110108440976732897969e-4L),
- };
- static const T Q[6] = {
- static_cast<T>(1.0),
- static_cast<T>(0.295201277126631761737L),
- static_cast<T>(0.043460910607305495864L),
- static_cast<T>(0.00434930582085826330659L),
- static_cast<T>(0.000255784226140488490982L),
- static_cast<T>(0.10991819782396112081e-4L),
- };
- result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
- result += 1 / (-sc);
- }
- else if(s <= 4)
- {
- // Maximum Deviation Found: 5.946e-22
- // Expected Error Term: -5.946e-22
- static const float Y = 0.6986598968505859375;
- static const T P[6] = {
- static_cast<T>(-0.0537258300023595030676L),
- static_cast<T>(0.0445163473292365591906L),
- static_cast<T>(0.0128677673534519952905L),
- static_cast<T>(0.00097541770457391752726L),
- static_cast<T>(0.769875101573654070925e-4L),
- static_cast<T>(0.328032510000383084155e-5L),
- };
- static const T Q[7] = {
- 1.0f,
- static_cast<T>(0.33383194553034051422L),
- static_cast<T>(0.0487798431291407621462L),
- static_cast<T>(0.00479039708573558490716L),
- static_cast<T>(0.000270776703956336357707L),
- static_cast<T>(0.106951867532057341359e-4L),
- static_cast<T>(0.236276623974978646399e-7L),
- };
- result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
- result += Y + 1 / (-sc);
- }
- else if(s <= 7)
- {
- // Maximum Deviation Found: 2.955e-17
- // Expected Error Term: 2.955e-17
- // Max error found at double precision: 2.009135e-16
-
- static const T P[6] = {
- static_cast<T>(-2.49710190602259410021L),
- static_cast<T>(-2.60013301809475665334L),
- static_cast<T>(-0.939260435377109939261L),
- static_cast<T>(-0.138448617995741530935L),
- static_cast<T>(-0.00701721240549802377623L),
- static_cast<T>(-0.229257310594893932383e-4L),
- };
- static const T Q[9] = {
- 1.0f,
- static_cast<T>(0.706039025937745133628L),
- static_cast<T>(0.15739599649558626358L),
- static_cast<T>(0.0106117950976845084417L),
- static_cast<T>(-0.36910273311764618902e-4L),
- static_cast<T>(0.493409563927590008943e-5L),
- static_cast<T>(-0.234055487025287216506e-6L),
- static_cast<T>(0.718833729365459760664e-8L),
- static_cast<T>(-0.1129200113474947419e-9L),
- };
- result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
- result = 1 + exp(result);
- }
- else if(s < 15)
- {
- // Maximum Deviation Found: 7.117e-16
- // Expected Error Term: 7.117e-16
- // Max error found at double precision: 9.387771e-16
- static const T P[7] = {
- static_cast<T>(-4.78558028495135619286L),
- static_cast<T>(-1.89197364881972536382L),
- static_cast<T>(-0.211407134874412820099L),
- static_cast<T>(-0.000189204758260076688518L),
- static_cast<T>(0.00115140923889178742086L),
- static_cast<T>(0.639949204213164496988e-4L),
- static_cast<T>(0.139348932445324888343e-5L),
- };
- static const T Q[9] = {
- 1.0f,
- static_cast<T>(0.244345337378188557777L),
- static_cast<T>(0.00873370754492288653669L),
- static_cast<T>(-0.00117592765334434471562L),
- static_cast<T>(-0.743743682899933180415e-4L),
- static_cast<T>(-0.21750464515767984778e-5L),
- static_cast<T>(0.471001264003076486547e-8L),
- static_cast<T>(-0.833378440625385520576e-10L),
- static_cast<T>(0.699841545204845636531e-12L),
- };
- result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7));
- result = 1 + exp(result);
- }
- else if(s < 36)
- {
- // Max error in interpolated form: 1.668e-17
- // Max error found at long double precision: 1.669714e-17
- static const T P[8] = {
- static_cast<T>(-10.3948950573308896825L),
- static_cast<T>(-2.85827219671106697179L),
- static_cast<T>(-0.347728266539245787271L),
- static_cast<T>(-0.0251156064655346341766L),
- static_cast<T>(-0.00119459173416968685689L),
- static_cast<T>(-0.382529323507967522614e-4L),
- static_cast<T>(-0.785523633796723466968e-6L),
- static_cast<T>(-0.821465709095465524192e-8L),
- };
- static const T Q[10] = {
- 1.0f,
- static_cast<T>(0.208196333572671890965L),
- static_cast<T>(0.0195687657317205033485L),
- static_cast<T>(0.00111079638102485921877L),
- static_cast<T>(0.408507746266039256231e-4L),
- static_cast<T>(0.955561123065693483991e-6L),
- static_cast<T>(0.118507153474022900583e-7L),
- static_cast<T>(0.222609483627352615142e-14L),
- };
- result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15));
- result = 1 + exp(result);
- }
- else if(s < 56)
- {
- result = 1 + pow(T(2), -s);
- }
- else
- {
- result = 1;
- }
- return result;
-}
-
-template <class T, class Policy>
-T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<64>&)
-{
- BOOST_MATH_STD_USING
- T result;
- if(s < 1)
- {
- // Rational Approximation
- // Maximum Deviation Found: 3.099e-20
- // Expected Error Term: 3.099e-20
- // Max error found at long double precision: 5.890498e-20
- static const T P[6] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.243392944335937499969),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.496837806864865688082),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0680008039723709987107),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00511620413006619942112),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000455369899250053003335),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.279496685273033761927e-4),
- };
- static const T Q[7] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.30425480068225790522),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.050052748580371598736),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00519355671064700627862),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000360623385771198350257),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.159600883054550987633e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.339770279812410586032e-6),
- };
- result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc);
- result -= 1.2433929443359375F;
- result += (sc);
- result /= (sc);
- }
- else if(s <= 2)
- {
- // Maximum Deviation Found: 1.059e-21
- // Expected Error Term: 1.059e-21
- // Max error found at long double precision: 1.626303e-19
-
- static const T P[6] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.577215664901532860605),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.222537368917162139445),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0356286324033215682729),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00304465292366350081446),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000178102511649069421904),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.700867470265983665042e-5),
- };
- static const T Q[7] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.259385759149531030085),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0373974962106091316854),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00332735159183332820617),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000188690420706998606469),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.635994377921861930071e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.226583954978371199405e-7),
- };
- result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
- result += 1 / (-sc);
- }
- else if(s <= 4)
- {
- // Maximum Deviation Found: 5.946e-22
- // Expected Error Term: -5.946e-22
- static const float Y = 0.6986598968505859375;
- static const T P[7] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.053725830002359501027),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0470551187571475844778),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0101339410415759517471),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00100240326666092854528),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.685027119098122814867e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.390972820219765942117e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.540319769113543934483e-7),
- };
- static const T Q[8] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.286577739726542730421),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0447355811517733225843),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00430125107610252363302),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000284956969089786662045),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.116188101609848411329e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.278090318191657278204e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.19683620233222028478e-8),
- };
- result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
- result += Y + 1 / (-sc);
- }
- else if(s <= 7)
- {
- // Max error found at long double precision: 8.132216e-19
- static const T P[8] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.49710190602259407065),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.36664913245960625334),
- BOOST_MATH_BIG_CONSTANT(T, 64, -1.77180020623777595452),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.464717885249654313933),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0643694921293579472583),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00464265386202805715487),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000165556579779704340166),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.252884970740994069582e-5),
- };
- static const T Q[9] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.01300131390690459085),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.387898115758643503827),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0695071490045701135188),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00586908595251442839291),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000217752974064612188616),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.397626583349419011731e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.927884739284359700764e-8),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.119810501805618894381e-9),
- };
- result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
- result = 1 + exp(result);
- }
- else if(s < 15)
- {
- // Max error in interpolated form: 1.133e-18
- // Max error found at long double precision: 2.183198e-18
- static const T P[9] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -4.78558028495135548083),
- BOOST_MATH_BIG_CONSTANT(T, 64, -3.23873322238609358947),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.892338582881021799922),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.131326296217965913809),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0115651591773783712996),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000657728968362695775205),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.252051328129449973047e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.626503445372641798925e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.815696314790853893484e-8),
- };
- static const T Q[9] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.525765665400123515036),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.10852641753657122787),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0115669945375362045249),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000732896513858274091966),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.30683952282420248448e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.819649214609633126119e-6),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.117957556472335968146e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.193432300973017671137e-12),
- };
- result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7));
- result = 1 + exp(result);
- }
- else if(s < 42)
- {
- // Max error in interpolated form: 1.668e-17
- // Max error found at long double precision: 1.669714e-17
- static const T P[9] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -10.3948950573308861781),
- BOOST_MATH_BIG_CONSTANT(T, 64, -2.82646012777913950108),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.342144362739570333665),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0249285145498722647472),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00122493108848097114118),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.423055371192592850196e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.1025215577185967488e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.165096762663509467061e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.145392555873022044329e-9),
- };
- static const T Q[10] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.205135978585281988052),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0192359357875879453602),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00111496452029715514119),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.434928449016693986857e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.116911068726610725891e-5),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.206704342290235237475e-7),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.209772836100827647474e-9),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.939798249922234703384e-16),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.264584017421245080294e-18),
- };
- result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15));
- result = 1 + exp(result);
- }
- else if(s < 63)
- {
- result = 1 + pow(T(2), -s);
- }
- else
- {
- result = 1;
- }
- return result;
-}
-
-template <class T, class Policy>
-T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<113>&)
-{
- BOOST_MATH_STD_USING
- T result;
- if(s < 1)
- {
- // Rational Approximation
- // Maximum Deviation Found: 9.493e-37
- // Expected Error Term: 9.492e-37
- // Max error found at long double precision: 7.281332e-31
-
- static const T P[10] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0353008629988648122808504280990313668),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0107795651204927743049369868548706909),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000523961870530500751114866884685172975),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.661805838304910731947595897966487515e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.658932670403818558510656304189164638e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.103437265642266106533814021041010453e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.116818787212666457105375746642927737e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.660690993901506912123512551294239036e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.113103113698388531428914333768142527e-10),
- };
- static const T Q[11] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.387483472099602327112637481818565459),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0802265315091063135271497708694776875),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0110727276164171919280036408995078164),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00112552716946286252000434849173787243),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.874554160748626916455655180296834352e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.530097847491828379568636739662278322e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.248461553590496154705565904497247452e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.881834921354014787309644951507523899e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.217062446168217797598596496310953025e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.315823200002384492377987848307151168e-11),
- };
- result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc);
- result += (sc);
- result /= (sc);
- }
- else if(s <= 2)
- {
- // Maximum Deviation Found: 1.616e-37
- // Expected Error Term: -1.615e-37
-
- static const T P[10] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.577215664901532860606512090082402431),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.255597968739771510415479842335906308),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0494056503552807274142218876983542205),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00551372778611700965268920983472292325),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00043667616723970574871427830895192731),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.268562259154821957743669387915239528e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.109249633923016310141743084480436612e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.273895554345300227466534378753023924e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.583103205551702720149237384027795038e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.835774625259919268768735944711219256e-11),
- };
- static const T Q[11] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.316661751179735502065583176348292881),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0540401806533507064453851182728635272),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00598621274107420237785899476374043797),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000474907812321704156213038740142079615),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.272125421722314389581695715835862418e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.112649552156479800925522445229212933e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.301838975502992622733000078063330461e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.422960728687211282539769943184270106e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.377105263588822468076813329270698909e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.581926559304525152432462127383600681e-13),
- };
- result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
- result += 1 / (-sc);
- }
- else if(s <= 4)
- {
- // Maximum Deviation Found: 1.891e-36
- // Expected Error Term: -1.891e-36
- // Max error found: 2.171527e-35
-
- static const float Y = 0.6986598968505859375;
- static const T P[11] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0537258300023595010275848333539748089),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0429086930802630159457448174466342553),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0136148228754303412510213395034056857),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00190231601036042925183751238033763915),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000186880390916311438818302549192456581),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.145347370745893262394287982691323657e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.805843276446813106414036600485884885e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.340818159286739137503297172091882574e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.115762357488748996526167305116837246e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.231904754577648077579913403645767214e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.340169592866058506675897646629036044e-12),
- };
- static const T Q[12] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.363755247765087100018556983050520554),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0696581979014242539385695131258321598),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00882208914484611029571547753782014817),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000815405623261946661762236085660996718),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.571366167062457197282642344940445452e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.309278269271853502353954062051797838e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.12822982083479010834070516053794262e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.397876357325018976733953479182110033e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.8484432107648683277598472295289279e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.105677416606909614301995218444080615e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.547223964564003701979951154093005354e-15),
- };
- result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
- result += Y + 1 / (-sc);
- }
- else if(s <= 6)
- {
- // Max error in interpolated form: 1.510e-37
- // Max error found at long double precision: 2.769266e-34
-
- static const T Y = 3.28348541259765625F;
-
- static const T P[13] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.786383506575062179339611614117697622),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.495766593395271370974685959652073976),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.409116737851754766422360889037532228),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.57340744006238263817895456842655987),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.280479899797421910694892949057963111),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0753148409447590257157585696212649869),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0122934003684672788499099362823748632),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00126148398446193639247961370266962927),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.828465038179772939844657040917364896e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.361008916706050977143208468690645684e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.109879825497910544424797771195928112e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.214539416789686920918063075528797059e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.15090220092460596872172844424267351e-10),
- };
- static const T Q[14] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.69490865837142338462982225731926485),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.22697696630994080733321401255942464),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.495409420862526540074366618006341533),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.122368084916843823462872905024259633),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0191412993625268971656513890888208623),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00191401538628980617753082598351559642),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000123318142456272424148930280876444459),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.531945488232526067889835342277595709e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.161843184071894368337068779669116236e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.305796079600152506743828859577462778e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.233582592298450202680170811044408894e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.275363878344548055574209713637734269e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.221564186807357535475441900517843892e-15),
- };
- result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
- result -= Y;
- result = 1 + exp(result);
- }
- else if(s < 10)
- {
- // Max error in interpolated form: 1.999e-34
- // Max error found at long double precision: 2.156186e-33
-
- static const T P[13] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.0545627381873738086704293881227365),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.70088348734699134347906176097717782),
- BOOST_MATH_BIG_CONSTANT(T, 113, -2.36921550900925512951976617607678789),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.684322583796369508367726293719322866),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.126026534540165129870721937592996324),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.015636903921778316147260572008619549),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00135442294754728549644376325814460807),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.842793965853572134365031384646117061e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.385602133791111663372015460784978351e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.130458500394692067189883214401478539e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.315861074947230418778143153383660035e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.500334720512030826996373077844707164e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.420204769185233365849253969097184005e-12),
- };
- static const T Q[14] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.97663511666410096104783358493318814),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.40878780231201806504987368939673249),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0963890666609396058945084107597727252),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0142207619090854604824116070866614505),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00139010220902667918476773423995750877),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.940669540194694997889636696089994734e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.458220848507517004399292480807026602e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.16345521617741789012782420625435495e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.414007452533083304371566316901024114e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.68701473543366328016953742622661377e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.603461891080716585087883971886075863e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.294670713571839023181857795866134957e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.147003914536437243143096875069813451e-18),
- };
- result = tools::evaluate_polynomial(P, T(s - 6)) / tools::evaluate_polynomial(Q, T(s - 6));
- result = 1 + exp(result);
- }
- else if(s < 17)
- {
- // Max error in interpolated form: 1.641e-32
- // Max error found at long double precision: 1.696121e-32
- static const T P[13] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -6.91319491921722925920883787894829678),
- BOOST_MATH_BIG_CONSTANT(T, 113, -3.65491257639481960248690596951049048),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.813557553449954526442644544105257881),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0994317301685870959473658713841138083),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00726896610245676520248617014211734906),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000317253318715075854811266230916762929),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.66851422826636750855184211580127133e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.879464154730985406003332577806849971e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.113838903158254250631678791998294628e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.379184410304927316385211327537817583e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.612992858643904887150527613446403867e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.347873737198164757035457841688594788e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.289187187441625868404494665572279364e-15),
- };
- static const T Q[14] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.427310044448071818775721584949868806),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.074602514873055756201435421385243062),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00688651562174480772901425121653945942),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000360174847635115036351323894321880445),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.973556847713307543918865405758248777e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.853455848314516117964634714780874197e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.118203513654855112421673192194622826e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.462521662511754117095006543363328159e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.834212591919475633107355719369463143e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.5354594751002702935740220218582929e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.406451690742991192964889603000756203e-15),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.887948682401000153828241615760146728e-19),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.34980761098820347103967203948619072e-21),
- };
- result = tools::evaluate_polynomial(P, T(s - 10)) / tools::evaluate_polynomial(Q, T(s - 10));
- result = 1 + exp(result);
- }
- else if(s < 30)
- {
- // Max error in interpolated form: 1.563e-31
- // Max error found at long double precision: 1.562725e-31
-
- static const T P[13] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -11.7824798233959252791987402769438322),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.36131215284987731928174218354118102),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.732260980060982349410898496846972204),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0744985185694913074484248803015717388),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00517228281320594683022294996292250527),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000260897206152101522569969046299309939),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.989553462123121764865178453128769948e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.286916799741891410827712096608826167e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.637262477796046963617949532211619729e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.106796831465628373325491288787760494e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.129343095511091870860498356205376823e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.102397936697965977221267881716672084e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.402663128248642002351627980255756363e-16),
- };
- static const T Q[14] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.311288325355705609096155335186466508),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0438318468940415543546769437752132748),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00374396349183199548610264222242269536),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000218707451200585197339671707189281302),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.927578767487930747532953583797351219e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.294145760625753561951137473484889639e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.704618586690874460082739479535985395e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.126333332872897336219649130062221257e-9),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.16317315713773503718315435769352765e-11),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.137846712823719515148344938160275695e-13),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.580975420554224366450994232723910583e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.291354445847552426900293580511392459e-22),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.73614324724785855925025452085443636e-25),
- };
- result = tools::evaluate_polynomial(P, T(s - 17)) / tools::evaluate_polynomial(Q, T(s - 17));
- result = 1 + exp(result);
- }
- else if(s < 74)
- {
- // Max error in interpolated form: 2.311e-27
- // Max error found at long double precision: 2.297544e-27
- static const T P[14] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -20.7944102007844314586649688802236072),
- BOOST_MATH_BIG_CONSTANT(T, 113, -4.95759941987499442499908748130192187),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.563290752832461751889194629200298688),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0406197001137935911912457120706122877),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0020846534789473022216888863613422293),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.808095978462109173749395599401375667e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.244706022206249301640890603610060959e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.589477682919645930544382616501666572e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.113699573675553496343617442433027672e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.174767860183598149649901223128011828e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.210051620306761367764549971980026474e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.189187969537370950337212675466400599e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.116313253429564048145641663778121898e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.376708747782400769427057630528578187e-19),
- };
- static const T Q[16] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.205076752981410805177554569784219717),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0202526722696670378999575738524540269),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.001278305290005994980069466658219057),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.576404779858501791742255670403304787e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.196477049872253010859712483984252067e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.521863830500876189501054079974475762e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.109524209196868135198775445228552059e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.181698713448644481083966260949267825e-10),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.234793316975091282090312036524695562e-12),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.227490441461460571047545264251399048e-14),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.151500292036937400913870642638520668e-16),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.543475775154780935815530649335936121e-19),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.241647013434111434636554455083309352e-28),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.557103423021951053707162364713587374e-31),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.618708773442584843384712258199645166e-34),
- };
- result = tools::evaluate_polynomial(P, T(s - 30)) / tools::evaluate_polynomial(Q, T(s - 30));
- result = 1 + exp(result);
- }
- else if(s < 117)
- {
- result = 1 + pow(T(2), -s);
- }
- else
- {
- result = 1;
- }
- return result;
-}
-
-template <class T, class Policy>
-T zeta_imp_odd_integer(int s, const T&, const Policy&, const mpl::true_&)
-{
- static const T results[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.2020569031595942853997381615114500), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0369277551433699263313654864570342), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0083492773819228268397975498497968), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0020083928260822144178527692324121), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0004941886041194645587022825264699), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0001227133475784891467518365263574), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000305882363070204935517285106451), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000076371976378997622736002935630), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000019082127165539389256569577951), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000004769329867878064631167196044), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000001192199259653110730677887189), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000298035035146522801860637051), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000074507117898354294919810042), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000018626597235130490064039099), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000004656629065033784072989233), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000001164155017270051977592974), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000291038504449709968692943), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000072759598350574810145209), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000018189896503070659475848), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000004547473783042154026799), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000001136868407680227849349), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000284217097688930185546), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000071054273952108527129), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000017763568435791203275), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000004440892103143813364), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000001110223025141066134), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000277555756213612417), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000069388939045441537), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000017347234760475766), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000004336808690020650), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000001084202172494241), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000271050543122347), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000067762635780452), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000016940658945098), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000004235164736273), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000001058791184068), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000264697796017), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000066174449004), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000016543612251), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000004135903063), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000001033975766), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000258493941), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000064623485), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000016155871), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000004038968), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000001009742), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000252435), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000063109), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000015777), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000003944), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000986), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000247), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000062), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000015), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000004), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000001),
- };
- return s > 113 ? 1 : results[(s - 3) / 2];
-}
-
-template <class T, class Policy>
-T zeta_imp_odd_integer(int s, const T& sc, const Policy& pol, const mpl::false_&)
-{
- static BOOST_MATH_THREAD_LOCAL bool is_init = false;
- static BOOST_MATH_THREAD_LOCAL T results[50] = {};
- static BOOST_MATH_THREAD_LOCAL int digits = tools::digits<T>();
- int current_digits = tools::digits<T>();
- if(digits != current_digits)
- {
- // Oh my precision has changed...
- is_init = false;
- }
- if(!is_init)
- {
- is_init = true;
- digits = current_digits;
- for(unsigned k = 0; k < sizeof(results) / sizeof(results[0]); ++k)
- {
- T arg = k * 2 + 3;
- T c_arg = 1 - arg;
- results[k] = zeta_polynomial_series(arg, c_arg, pol);
- }
- }
- unsigned index = (s - 3) / 2;
- return index >= sizeof(results) / sizeof(results[0]) ? zeta_polynomial_series(T(s), sc, pol): results[index];
-}
-
-template <class T, class Policy, class Tag>
-T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag)
-{
- BOOST_MATH_STD_USING
- static const char* function = "boost::math::zeta<%1%>";
- if(sc == 0)
- return policies::raise_pole_error<T>(
- function,
- "Evaluation of zeta function at pole %1%",
- s, pol);
- T result;
- //
- // Trivial case:
- //
- if(s > policies::digits<T, Policy>())
- return 1;
- //
- // Start by seeing if we have a simple closed form:
- //
- if(floor(s) == s)
- {
-#ifndef BOOST_NO_EXCEPTIONS
- // Without exceptions we expect itrunc to return INT_MAX on overflow
- // and we fall through anyway.
- try
- {
-#endif
- int v = itrunc(s);
- if(v == s)
- {
- if(v < 0)
- {
- if(((-v) & 1) == 0)
- return 0;
- int n = (-v + 1) / 2;
- if(n <= (int)boost::math::max_bernoulli_b2n<T>::value)
- return T((-v & 1) ? -1 : 1) * boost::math::unchecked_bernoulli_b2n<T>(n) / (1 - v);
- }
- else if((v & 1) == 0)
- {
- if(((v / 2) <= (int)boost::math::max_bernoulli_b2n<T>::value) && (v <= (int)boost::math::max_factorial<T>::value))
- return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi<T, Policy>(), v) *
- boost::math::unchecked_bernoulli_b2n<T>(v / 2) / boost::math::unchecked_factorial<T>(v);
- return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi<T, Policy>(), v) *
- boost::math::bernoulli_b2n<T>(v / 2) / boost::math::factorial<T>(v);
- }
- else
- return zeta_imp_odd_integer(v, sc, pol, mpl::bool_<(Tag::value <= 113) && Tag::value>());
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(const boost::math::rounding_error&){} // Just fall through, s is too large to round
- catch(const std::overflow_error&){}
-#endif
- }
-
- if(fabs(s) < tools::root_epsilon<T>())
- {
- result = -0.5f - constants::log_root_two_pi<T, Policy>() * s;
- }
- else if(s < 0)
- {
- std::swap(s, sc);
- if(floor(sc/2) == sc/2)
- result = 0;
- else
- {
- if(s > max_factorial<T>::value)
- {
- T mult = boost::math::sin_pi(0.5f * sc, pol) * 2 * zeta_imp(s, sc, pol, tag);
- result = boost::math::lgamma(s, pol);
- result -= s * log(2 * constants::pi<T>());
- if(result > tools::log_max_value<T>())
- return sign(mult) * policies::raise_overflow_error<T>(function, 0, pol);
- result = exp(result);
- if(tools::max_value<T>() / fabs(mult) < result)
- return boost::math::sign(mult) * policies::raise_overflow_error<T>(function, 0, pol);
- result *= mult;
- }
- else
- {
- result = boost::math::sin_pi(0.5f * sc, pol)
- * 2 * pow(2 * constants::pi<T>(), -s)
- * boost::math::tgamma(s, pol)
- * zeta_imp(s, sc, pol, tag);
- }
- }
- }
- else
- {
- result = zeta_imp_prec(s, sc, pol, tag);
- }
- return result;
-}
-
-template <class T, class Policy, class tag>
-struct zeta_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- static void do_init(const mpl::int_<0>&){ boost::math::zeta(static_cast<T>(5), Policy()); }
- static void do_init(const mpl::int_<53>&){ boost::math::zeta(static_cast<T>(5), Policy()); }
- static void do_init(const mpl::int_<64>&)
- {
- boost::math::zeta(static_cast<T>(0.5), Policy());
- boost::math::zeta(static_cast<T>(1.5), Policy());
- boost::math::zeta(static_cast<T>(3.5), Policy());
- boost::math::zeta(static_cast<T>(6.5), Policy());
- boost::math::zeta(static_cast<T>(14.5), Policy());
- boost::math::zeta(static_cast<T>(40.5), Policy());
-
- boost::math::zeta(static_cast<T>(5), Policy());
- }
- static void do_init(const mpl::int_<113>&)
- {
- boost::math::zeta(static_cast<T>(0.5), Policy());
- boost::math::zeta(static_cast<T>(1.5), Policy());
- boost::math::zeta(static_cast<T>(3.5), Policy());
- boost::math::zeta(static_cast<T>(5.5), Policy());
- boost::math::zeta(static_cast<T>(9.5), Policy());
- boost::math::zeta(static_cast<T>(16.5), Policy());
- boost::math::zeta(static_cast<T>(25.5), Policy());
- boost::math::zeta(static_cast<T>(70.5), Policy());
-
- boost::math::zeta(static_cast<T>(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 zeta_initializer<T, Policy, tag>::init zeta_initializer<T, Policy, tag>::initializer;
-
-} // detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type zeta(T s, const Policy&)
-{
- 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;
- 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;
- //typedef mpl::int_<0> tag_type;
-
- detail::zeta_initializer<value_type, forwarding_policy, tag_type>::force_instantiate();
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::zeta_imp(
- static_cast<value_type>(s),
- static_cast<value_type>(1 - static_cast<value_type>(s)),
- forwarding_policy(),
- tag_type()), "boost::math::zeta<%1%>(%1%)");
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type zeta(T s)
-{
- return zeta(s, policies::policy<>());
-}
-
-}} // namespaces
-
-#endif // BOOST_MATH_ZETA_HPP
-
-
-
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/config.hpp b/src/third_party/boost-1.69.0/boost/math/tools/config.hpp
deleted file mode 100644
index 17bfec16fee..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/tools/config.hpp
+++ /dev/null
@@ -1,469 +0,0 @@
-// Copyright (c) 2006-7 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_TOOLS_CONFIG_HPP
-#define BOOST_MATH_TOOLS_CONFIG_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/config.hpp>
-#include <boost/predef.h>
-#include <boost/cstdint.hpp> // for boost::uintmax_t
-#include <boost/detail/workaround.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <algorithm> // for min and max
-#include <boost/config/no_tr1/cmath.hpp>
-#include <climits>
-#include <cfloat>
-#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
-# include <math.h>
-#endif
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# include <limits>
-#endif
-
-#include <boost/math/tools/user.hpp>
-
-#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
- || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
- && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#endif
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
-//
-// Borland post 5.8.2 uses Dinkumware's std C lib which
-// doesn't have true long double precision. Earlier
-// versions are problematic too:
-//
-# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
-# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
-# include <float.h>
-#endif
-#ifdef __IBMCPP__
-//
-// For reasons I don't unserstand, the tests with IMB's compiler all
-// pass at long double precision, but fail with real_concept, those tests
-// are disabled for now. (JM 2012).
-# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
-#endif
-#ifdef sun
-// Any use of __float128 in program startup code causes a segfault (tested JM 2015, Solaris 11).
-# define BOOST_MATH_DISABLE_FLOAT128
-#endif
-#ifdef __HAIKU__
-//
-// Not sure what's up with the math detection on Haiku, but linking fails with
-// float128 code enabled, and we don't have an implementation of __expl, so
-// disabling long double functions for now as well.
-# define BOOST_MATH_DISABLE_FLOAT128
-# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#endif
-#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-//
-// Darwin's rather strange "double double" is rather hard to
-// support, it should be possible given enough effort though...
-//
-# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#endif
-#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-//
-// Intel compiler prior to version 10 has sporadic problems
-// calling the long double overloads of the std lib math functions:
-// calling ::powl is OK, but std::pow(long double, long double)
-// may segfault depending upon the value of the arguments passed
-// and the specific Linux distribution.
-//
-// We'll be conservative and disable long double support for this compiler.
-//
-// Comment out this #define and try building the tests to determine whether
-// your Intel compiler version has this issue or not.
-//
-# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#endif
-#if defined(unix) && defined(__INTEL_COMPILER)
-//
-// Intel compiler has sporadic issues compiling std::fpclassify depending on
-// the exact OS version used. Use our own code for this as we know it works
-// well on Intel processors:
-//
-#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
-#endif
-
-#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
- // Better safe than sorry, our tests don't support hardware exceptions:
-# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
-#endif
-
-#ifdef __IBMCPP__
-# define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
-#endif
-
-#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
-# define BOOST_MATH_USE_C99
-#endif
-
-#if (defined(__hpux) && !defined(__hppa))
-# define BOOST_MATH_USE_C99
-#endif
-
-#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
-# define BOOST_MATH_USE_C99
-#endif
-
-#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
-# define BOOST_MATH_USE_C99
-#endif
-
-#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
- || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
- || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
- || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
-#endif
-
-#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
-
-# include "boost/type.hpp"
-# include "boost/non_type.hpp"
-
-# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
-# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
-# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
-# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
-
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
- , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
- , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
- , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
- , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-#else
-
-// no workaround needed: expand to nothing
-
-# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-
-#endif // __SUNPRO_CC
-
-#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
-// Sun's compiler emits a hard error if a constant underflows,
-// as does aCC on PA-RISC, while gcc issues a large number of warnings:
-# define BOOST_MATH_SMALL_CONSTANT(x) 0.0
-#else
-# define BOOST_MATH_SMALL_CONSTANT(x) x
-#endif
-
-
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
-//
-// Define if constants too large for a float cause "bad"
-// values to be stored in the data, rather than infinity
-// or a suitably large value.
-//
-# define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
-#endif
-//
-// Tune performance options for specific compilers:
-//
-#ifdef BOOST_MSVC
-# define BOOST_MATH_POLY_METHOD 2
-# define BOOST_MATH_RATIONAL_METHOD 1
-#elif defined(BOOST_INTEL)
-# define BOOST_MATH_POLY_METHOD 2
-# define BOOST_MATH_RATIONAL_METHOD 1
-#elif defined(__GNUC__)
-#if __GNUC__ < 4
-# define BOOST_MATH_POLY_METHOD 3
-# define BOOST_MATH_RATIONAL_METHOD 3
-# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
-# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
-#else
-# define BOOST_MATH_POLY_METHOD 3
-# define BOOST_MATH_RATIONAL_METHOD 1
-#endif
-#endif
-
-#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
-# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
-# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
-#endif
-
-//
-// constexpr support, early GCC implementations can't cope so disable
-// constexpr for them:
-//
-#if !defined(__clang__) && defined(__GNUC__)
-#if (__GNUC__ * 100 + __GNUC_MINOR__) < 490
-# define BOOST_MATH_DISABLE_CONSTEXPR
-#endif
-#endif
-
-#ifdef BOOST_MATH_DISABLE_CONSTEXPR
-# define BOOST_MATH_CONSTEXPR
-#else
-# define BOOST_MATH_CONSTEXPR BOOST_CONSTEXPR
-#endif
-
-//
-// noexcept support:
-//
-#ifndef BOOST_NO_CXX11_NOEXCEPT
-#ifndef BOOST_NO_CXX11_HDR_TYPE_TRAITS
-#include <type_traits>
-# define BOOST_MATH_NOEXCEPT(T) noexcept(std::is_floating_point<T>::value)
-# define BOOST_MATH_IS_FLOAT(T) (std::is_floating_point<T>::value)
-#else
-#include <boost/type_traits/is_floating_point.hpp>
-# define BOOST_MATH_NOEXCEPT(T) noexcept(boost::is_floating_point<T>::value)
-# define BOOST_MATH_IS_FLOAT(T) (boost::is_floating_point<T>::value)
-#endif
-#else
-# define BOOST_MATH_NOEXCEPT(T)
-# define BOOST_MATH_IS_FLOAT(T) false
-#endif
-
-//
-// The maximum order of polynomial that will be evaluated
-// via an unrolled specialisation:
-//
-#ifndef BOOST_MATH_MAX_POLY_ORDER
-# define BOOST_MATH_MAX_POLY_ORDER 20
-#endif
-//
-// Set the method used to evaluate polynomials and rationals:
-//
-#ifndef BOOST_MATH_POLY_METHOD
-# define BOOST_MATH_POLY_METHOD 2
-#endif
-#ifndef BOOST_MATH_RATIONAL_METHOD
-# define BOOST_MATH_RATIONAL_METHOD 1
-#endif
-//
-// decide whether to store constants as integers or reals:
-//
-#ifndef BOOST_MATH_INT_TABLE_TYPE
-# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
-#endif
-#ifndef BOOST_MATH_INT_VALUE_SUFFIX
-# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
-#endif
-//
-// And then the actual configuration:
-//
-#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \
- && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128)
-//
-// Only enable this when the compiler really is GCC as clang and probably
-// intel too don't support __float128 yet :-(
-//
-#ifndef BOOST_MATH_USE_FLOAT128
-# define BOOST_MATH_USE_FLOAT128
-#endif
-
-# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__)
-# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
-# define BOOST_MATH_FLOAT128_TYPE __float128
-# endif
-# elif defined(__GNUC__)
-# define BOOST_MATH_FLOAT128_TYPE __float128
-# endif
-
-# ifndef BOOST_MATH_FLOAT128_TYPE
-# define BOOST_MATH_FLOAT128_TYPE _Quad
-# endif
-#endif
-//
-// Check for WinCE with no iostream support:
-//
-#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT)
-# define BOOST_MATH_NO_LEXICAL_CAST
-#endif
-
-//
-// Helper macro for controlling the FP behaviour:
-//
-#ifndef BOOST_MATH_CONTROL_FP
-# define BOOST_MATH_CONTROL_FP
-#endif
-//
-// Helper macro for using statements:
-//
-#define BOOST_MATH_STD_USING_CORE \
- using std::abs;\
- using std::acos;\
- using std::cos;\
- using std::fmod;\
- using std::modf;\
- using std::tan;\
- using std::asin;\
- using std::cosh;\
- using std::frexp;\
- using std::pow;\
- using std::tanh;\
- using std::atan;\
- using std::exp;\
- using std::ldexp;\
- using std::sin;\
- using std::atan2;\
- using std::fabs;\
- using std::log;\
- using std::sinh;\
- using std::ceil;\
- using std::floor;\
- using std::log10;\
- using std::sqrt;
-
-#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE
-
-namespace boost{ namespace math{
-namespace tools
-{
-
-template <class T>
-inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) BOOST_MATH_NOEXCEPT(T)
-{
- return (std::max)((std::max)(a, b), c);
-}
-
-template <class T>
-inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) BOOST_MATH_NOEXCEPT(T)
-{
- return (std::max)((std::max)(a, b), (std::max)(c, d));
-}
-
-} // namespace tools
-
-template <class T>
-void suppress_unused_variable_warning(const T&) BOOST_MATH_NOEXCEPT(T)
-{
-}
-
-namespace detail{
-
-template <class T>
-struct is_integer_for_rounding
-{
- static const bool value = boost::is_integral<T>::value
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer)
-#endif
- ;
-};
-
-}
-
-}} // namespace boost namespace math
-
-#ifdef __GLIBC_PREREQ
-# if __GLIBC_PREREQ(2,14)
-# define BOOST_MATH_HAVE_FIXED_GLIBC
-# endif
-#endif
-
-#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
-//
-// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445
-// Basically powl and expl can return garbage when the result is small and certain exception flags are set
-// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011).
-// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4
-//
-
- #include <boost/detail/fenv.hpp>
-
-# ifdef FE_ALL_EXCEPT
-
-namespace boost{ namespace math{
- namespace detail
- {
- struct fpu_guard
- {
- fpu_guard()
- {
- fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
- feclearexcept(FE_ALL_EXCEPT);
- }
- ~fpu_guard()
- {
- fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
- }
- private:
- fexcept_t m_flags;
- };
-
- } // namespace detail
- }} // namespaces
-
-# define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
-# define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0);
-
-# else
-
-# define BOOST_FPU_EXCEPTION_GUARD
-# define BOOST_MATH_INSTRUMENT_FPU
-
-# endif
-
-#else // All other platforms.
-# define BOOST_FPU_EXCEPTION_GUARD
-# define BOOST_MATH_INSTRUMENT_FPU
-#endif
-
-#ifdef BOOST_MATH_INSTRUMENT
-
-# include <iostream>
-# include <iomanip>
-# include <typeinfo>
-
-# define BOOST_MATH_INSTRUMENT_CODE(x) \
- std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
-# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
-
-#else
-
-# define BOOST_MATH_INSTRUMENT_CODE(x)
-# define BOOST_MATH_INSTRUMENT_VARIABLE(name)
-
-#endif
-
-//
-// Thread local storage:
-//
-#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL)
-# define BOOST_MATH_THREAD_LOCAL thread_local
-#else
-# define BOOST_MATH_THREAD_LOCAL
-#endif
-
-//
-// Can we have constexpr tables?
-//
-#if (!defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_CXX14_CONSTEXPR)) || BOOST_WORKAROUND(BOOST_MSVC, >= 1910)
-#define BOOST_MATH_HAVE_CONSTEXPR_TABLES
-#define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION constexpr
-#else
-#define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION
-#endif
-
-
-#endif // BOOST_MATH_TOOLS_CONFIG_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
deleted file mode 100644
index 81e84661382..00000000000
--- a/src/third_party/boost-1.69.0/boost/math/tools/roots.hpp
+++ /dev/null
@@ -1,568 +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.
- 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/move/algo/adaptive_merge.hpp b/src/third_party/boost-1.69.0/boost/move/algo/adaptive_merge.hpp
deleted file mode 100644
index 4de4007e2d7..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/algo/adaptive_merge.hpp
+++ /dev/null
@@ -1,343 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_MOVE_ADAPTIVE_MERGE_HPP
-#define BOOST_MOVE_ADAPTIVE_MERGE_HPP
-
-#include <boost/move/detail/config_begin.hpp>
-#include <boost/move/algo/detail/adaptive_sort_merge.hpp>
-
-namespace boost {
-namespace movelib {
-
-///@cond
-namespace detail_adaptive {
-
-template<class RandIt, class Compare, class XBuf>
-inline void adaptive_merge_combine_blocks( RandIt first
- , typename iterator_traits<RandIt>::size_type len1
- , typename iterator_traits<RandIt>::size_type len2
- , typename iterator_traits<RandIt>::size_type collected
- , typename iterator_traits<RandIt>::size_type n_keys
- , typename iterator_traits<RandIt>::size_type l_block
- , bool use_internal_buf
- , bool xbuf_used
- , Compare comp
- , XBuf & xbuf
- )
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const len = len1+len2;
- size_type const l_combine = len-collected;
- size_type const l_combine1 = len1-collected;
-
- if(n_keys){
- RandIt const first_data = first+collected;
- RandIt const keys = first;
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combine: ", len);
- if(xbuf_used){
- if(xbuf.size() < l_block){
- xbuf.initialize_until(l_block, *first);
- }
- BOOST_ASSERT(xbuf.size() >= l_block);
- size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
- combine_params( keys, comp, l_combine
- , l_combine1, l_block, xbuf
- , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
- op_merge_blocks_with_buf
- (keys, comp, first_data, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op(), xbuf.data());
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A mrg xbf: ", len);
- }
- else{
- size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
- combine_params( keys, comp, l_combine
- , l_combine1, l_block, xbuf
- , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
- if(use_internal_buf){
- op_merge_blocks_with_buf
- (keys, comp, first_data, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, swap_op(), first_data-l_block);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A mrg buf: ", len);
- }
- else{
- merge_blocks_bufferless
- (keys, comp, first_data, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A mrg nbf: ", len);
- }
- }
- }
- else{
- xbuf.shrink_to_fit(l_block);
- if(xbuf.size() < l_block){
- xbuf.initialize_until(l_block, *first);
- }
- size_type *const uint_keys = xbuf.template aligned_trailing<size_type>(l_block);
- size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
- combine_params( uint_keys, less(), l_combine
- , l_combine1, l_block, xbuf
- , n_block_a, n_block_b, l_irreg1, l_irreg2, true); //Outputs
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combine: ", len);
- BOOST_ASSERT(xbuf.size() >= l_block);
- op_merge_blocks_with_buf
- (uint_keys, less(), first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op(), xbuf.data());
- xbuf.clear();
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A mrg buf: ", len);
- }
-}
-
-template<class RandIt, class Compare, class XBuf>
-inline void adaptive_merge_final_merge( RandIt first
- , typename iterator_traits<RandIt>::size_type len1
- , typename iterator_traits<RandIt>::size_type len2
- , typename iterator_traits<RandIt>::size_type collected
- , typename iterator_traits<RandIt>::size_type l_intbuf
- , typename iterator_traits<RandIt>::size_type l_block
- , bool use_internal_buf
- , bool xbuf_used
- , Compare comp
- , XBuf & xbuf
- )
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- (void)l_block;
- size_type n_keys = collected-l_intbuf;
- size_type len = len1+len2;
- if(use_internal_buf){
- if(xbuf_used){
- xbuf.clear();
- //Nothing to do
- if(n_keys){
- unstable_sort(first, first+n_keys, comp, xbuf);
- stable_merge(first, first+n_keys, first+len, comp, xbuf);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A key mrg: ", len);
- }
- }
- else{
- xbuf.clear();
- unstable_sort(first, first+collected, comp, xbuf);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A k/b srt: ", len);
- stable_merge(first, first+collected, first+len, comp, xbuf);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A k/b mrg: ", len);
- }
- }
- else{
- xbuf.clear();
- unstable_sort(first, first+collected, comp, xbuf);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A k/b srt: ", len);
- stable_merge(first, first+collected, first+len1+len2, comp, xbuf);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A k/b mrg: ", len);
- }
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A fin mrg: ", len);
-}
-
-template<class SizeType>
-inline static SizeType adaptive_merge_n_keys_without_external_keys(SizeType l_block, SizeType len1, SizeType len2, SizeType l_intbuf)
-{
- typedef SizeType size_type;
- //This is the minimum number of keys to implement the ideal algorithm
- size_type n_keys = len1/l_block+len2/l_block;
- const size_type second_half_blocks = len2/l_block;
- const size_type first_half_aux = len1-l_intbuf;
- while(n_keys >= ((first_half_aux-n_keys)/l_block + second_half_blocks)){
- --n_keys;
- }
- ++n_keys;
- return n_keys;
-}
-
-template<class SizeType>
-inline static SizeType adaptive_merge_n_keys_with_external_keys(SizeType l_block, SizeType len1, SizeType len2, SizeType l_intbuf)
-{
- typedef SizeType size_type;
- //This is the minimum number of keys to implement the ideal algorithm
- size_type n_keys = (len1-l_intbuf)/l_block + len2/l_block;
- return n_keys;
-}
-
-template<class SizeType, class Xbuf>
-inline SizeType adaptive_merge_n_keys_intbuf(SizeType &rl_block, SizeType len1, SizeType len2, Xbuf & xbuf, SizeType &l_intbuf_inout)
-{
- typedef SizeType size_type;
- size_type l_block = rl_block;
- size_type l_intbuf = xbuf.capacity() >= l_block ? 0u : l_block;
-
- while(xbuf.capacity() >= l_block*2){
- l_block *= 2;
- }
-
- //This is the minimum number of keys to implement the ideal algorithm
- size_type n_keys = adaptive_merge_n_keys_without_external_keys(l_block, len1, len2, l_intbuf);
- BOOST_ASSERT(n_keys >= ((len1-l_intbuf-n_keys)/l_block + len2/l_block));
-
- if(xbuf.template supports_aligned_trailing<size_type>
- ( l_block
- , adaptive_merge_n_keys_with_external_keys(l_block, len1, len2, l_intbuf)))
- {
- n_keys = 0u;
- }
- l_intbuf_inout = l_intbuf;
- rl_block = l_block;
- return n_keys;
-}
-
-// Main explanation of the merge algorithm.
-//
-// csqrtlen = ceil(sqrt(len));
-//
-// * First, csqrtlen [to be used as buffer] + (len/csqrtlen - 1) [to be used as keys] => to_collect
-// unique elements are extracted from elements to be sorted and placed in the beginning of the range.
-//
-// * Step "combine_blocks": the leading (len1-to_collect) elements plus trailing len2 elements
-// are merged with a non-trivial ("smart") algorithm to form an ordered range trailing "len-to_collect" elements.
-//
-// Explanation of the "combine_blocks" step:
-//
-// * Trailing [first+to_collect, first+len1) elements are divided in groups of cqrtlen elements.
-// Remaining elements that can't form a group are grouped in front of those elements.
-// * Trailing [first+len1, first+len1+len2) elements are divided in groups of cqrtlen elements.
-// Remaining elements that can't form a group are grouped in the back of those elements.
-// * In parallel the following two steps are performed:
-// * Groups are selection-sorted by first or last element (depending whether they are going
-// to be merged to left or right) and keys are reordered accordingly as an imitation-buffer.
-// * Elements of each block pair are merged using the csqrtlen buffer taking into account
-// if they belong to the first half or second half (marked by the key).
-//
-// * In the final merge step leading "to_collect" elements are merged with rotations
-// with the rest of merged elements in the "combine_blocks" step.
-//
-// Corner cases:
-//
-// * If no "to_collect" elements can be extracted:
-//
-// * If more than a minimum number of elements is extracted
-// then reduces the number of elements used as buffer and keys in the
-// and "combine_blocks" steps. If "combine_blocks" has no enough keys due to this reduction
-// then uses a rotation based smart merge.
-//
-// * If the minimum number of keys can't be extracted, a rotation-based merge is performed.
-//
-// * If auxiliary memory is more or equal than min(len1, len2), a buffered merge is performed.
-//
-// * If the len1 or len2 are less than 2*csqrtlen then a rotation-based merge is performed.
-//
-// * If auxiliary memory is more than csqrtlen+n_keys*sizeof(std::size_t),
-// then no csqrtlen need to be extracted and "combine_blocks" will use integral
-// keys to combine blocks.
-template<class RandIt, class Compare, class XBuf>
-void adaptive_merge_impl
- ( RandIt first
- , typename iterator_traits<RandIt>::size_type len1
- , typename iterator_traits<RandIt>::size_type len2
- , Compare comp
- , XBuf & xbuf
- )
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
-
- if(xbuf.capacity() >= min_value<size_type>(len1, len2)){
- buffered_merge(first, first+len1, first+(len1+len2), comp, xbuf);
- }
- else{
- const size_type len = len1+len2;
- //Calculate ideal parameters and try to collect needed unique keys
- size_type l_block = size_type(ceil_sqrt(len));
-
- //One range is not big enough to extract keys and the internal buffer so a
- //rotation-based based merge will do just fine
- if(len1 <= l_block*2 || len2 <= l_block*2){
- merge_bufferless(first, first+len1, first+len1+len2, comp);
- return;
- }
-
- //Detail the number of keys and internal buffer. If xbuf has enough memory, no
- //internal buffer is needed so l_intbuf will remain 0.
- size_type l_intbuf = 0;
- size_type n_keys = adaptive_merge_n_keys_intbuf(l_block, len1, len2, xbuf, l_intbuf);
- size_type const to_collect = l_intbuf+n_keys;
- //Try to extract needed unique values from the first range
- size_type const collected = collect_unique(first, first+len1, to_collect, comp, xbuf);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1("\n A collect: ", len);
-
- //Not the minimum number of keys is not available on the first range, so fallback to rotations
- if(collected != to_collect && collected < 4){
- merge_bufferless(first, first+collected, first+len1, comp);
- merge_bufferless(first, first + len1, first + len1 + len2, comp);
- return;
- }
-
- //If not enough keys but more than minimum, adjust the internal buffer and key count
- bool use_internal_buf = collected == to_collect;
- if (!use_internal_buf){
- l_intbuf = 0u;
- n_keys = collected;
- l_block = lblock_for_combine(l_intbuf, n_keys, len, use_internal_buf);
- //If use_internal_buf is false, then then internal buffer will be zero and rotation-based combination will be used
- l_intbuf = use_internal_buf ? l_block : 0u;
- }
-
- bool const xbuf_used = collected == to_collect && xbuf.capacity() >= l_block;
- //Merge trailing elements using smart merges
- adaptive_merge_combine_blocks(first, len1, len2, collected, n_keys, l_block, use_internal_buf, xbuf_used, comp, xbuf);
- //Merge buffer and keys with the rest of the values
- adaptive_merge_final_merge (first, len1, len2, collected, l_intbuf, l_block, use_internal_buf, xbuf_used, comp, xbuf);
- }
-}
-
-} //namespace detail_adaptive {
-
-///@endcond
-
-//! <b>Effects</b>: Merges two consecutive sorted ranges [first, middle) and [middle, last)
-//! into one sorted range [first, last) according to the given comparison function comp.
-//! The algorithm is stable (if there are equivalent elements in the original two ranges,
-//! the elements from the first range (preserving their original order) precede the elements
-//! from the second range (preserving their original order).
-//!
-//! <b>Requires</b>:
-//! - RandIt must meet the requirements of ValueSwappable and RandomAccessIterator.
-//! - The type of dereferenced RandIt must meet the requirements of MoveAssignable and MoveConstructible.
-//!
-//! <b>Parameters</b>:
-//! - first: the beginning of the first sorted range.
-//! - middle: the end of the first sorted range and the beginning of the second
-//! - last: the end of the second sorted range
-//! - comp: comparison function object which returns true if the first argument is is ordered before the second.
-//! - uninitialized, uninitialized_len: raw storage starting on "uninitialized", able to hold "uninitialized_len"
-//! elements of type iterator_traits<RandIt>::value_type. Maximum performance is achieved when uninitialized_len
-//! is min(std::distance(first, middle), std::distance(middle, last)).
-//!
-//! <b>Throws</b>: If comp throws or the move constructor, move assignment or swap of the type
-//! of dereferenced RandIt throws.
-//!
-//! <b>Complexity</b>: Always K x O(N) comparisons and move assignments/constructors/swaps.
-//! Constant factor for comparisons and data movement is minimized when uninitialized_len
-//! is min(std::distance(first, middle), std::distance(middle, last)).
-//! Pretty good enough performance is achieved when uninitialized_len is
-//! ceil(sqrt(std::distance(first, last)))*2.
-//!
-//! <b>Caution</b>: Experimental implementation, not production-ready.
-template<class RandIt, class Compare>
-void adaptive_merge( RandIt first, RandIt middle, RandIt last, Compare comp
- , typename iterator_traits<RandIt>::value_type* uninitialized = 0
- , std::size_t uninitialized_len = 0)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- typedef typename iterator_traits<RandIt>::value_type value_type;
-
- ::boost::movelib::detail_adaptive::adaptive_xbuf<value_type> xbuf(uninitialized, uninitialized_len);
- ::boost::movelib::detail_adaptive::adaptive_merge_impl(first, size_type(middle - first), size_type(last - middle), comp, xbuf);
-}
-
-} //namespace movelib {
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#define BOOST_MOVE_ADAPTIVE_MERGE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp
deleted file mode 100644
index 4f50bf1cff3..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp
+++ /dev/null
@@ -1,631 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_MOVE_ADAPTIVE_SORT_HPP
-#define BOOST_MOVE_ADAPTIVE_SORT_HPP
-
-#include <boost/move/detail/config_begin.hpp>
-#include <boost/move/algo/detail/adaptive_sort_merge.hpp>
-
-namespace boost {
-namespace movelib {
-
-///@cond
-namespace detail_adaptive {
-
-template<class RandIt>
-void move_data_backward( RandIt cur_pos
- , typename iterator_traits<RandIt>::size_type const l_data
- , RandIt new_pos
- , bool const xbuf_used)
-{
- //Move buffer to the total combination right
- if(xbuf_used){
- boost::move_backward(cur_pos, cur_pos+l_data, new_pos+l_data);
- }
- else{
- boost::adl_move_swap_ranges_backward(cur_pos, cur_pos+l_data, new_pos+l_data);
- //Rotate does less moves but it seems slower due to cache issues
- //rotate_gcd(first-l_block, first+len-l_block, first+len);
- }
-}
-
-template<class RandIt>
-void move_data_forward( RandIt cur_pos
- , typename iterator_traits<RandIt>::size_type const l_data
- , RandIt new_pos
- , bool const xbuf_used)
-{
- //Move buffer to the total combination right
- if(xbuf_used){
- boost::move(cur_pos, cur_pos+l_data, new_pos);
- }
- else{
- boost::adl_move_swap_ranges(cur_pos, cur_pos+l_data, new_pos);
- //Rotate does less moves but it seems slower due to cache issues
- //rotate_gcd(first-l_block, first+len-l_block, first+len);
- }
-}
-
-// build blocks of length 2*l_build_buf. l_build_buf is power of two
-// input: [0, l_build_buf) elements are buffer, rest unsorted elements
-// output: [0, l_build_buf) elements are buffer, blocks 2*l_build_buf and last subblock sorted
-//
-// First elements are merged from right to left until elements start
-// at first. All old elements [first, first + l_build_buf) are placed at the end
-// [first+len-l_build_buf, first+len). To achieve this:
-// - If we have external memory to merge, we save elements from the buffer
-// so that a non-swapping merge is used. Buffer elements are restored
-// at the end of the buffer from the external memory.
-//
-// - When the external memory is not available or it is insufficient
-// for a merge operation, left swap merging is used.
-//
-// Once elements are merged left to right in blocks of l_build_buf, then a single left
-// to right merge step is performed to achieve merged blocks of size 2K.
-// If external memory is available, usual merge is used, swap merging otherwise.
-//
-// As a last step, if auxiliary memory is available in-place merge is performed.
-// until all is merged or auxiliary memory is not large enough.
-template<class RandIt, class Compare, class XBuf>
-typename iterator_traits<RandIt>::size_type
- adaptive_sort_build_blocks
- ( RandIt const first
- , typename iterator_traits<RandIt>::size_type const len
- , typename iterator_traits<RandIt>::size_type const l_base
- , typename iterator_traits<RandIt>::size_type const l_build_buf
- , XBuf & xbuf
- , Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- BOOST_ASSERT(l_build_buf <= len);
- BOOST_ASSERT(0 == ((l_build_buf / l_base)&(l_build_buf/l_base-1)));
-
- //Place the start pointer after the buffer
- RandIt first_block = first + l_build_buf;
- size_type const elements_in_blocks = len - l_build_buf;
-
- //////////////////////////////////
- // Start of merge to left step
- //////////////////////////////////
- size_type l_merged = 0u;
-
- BOOST_ASSERT(l_build_buf);
- //If there is no enough buffer for the insertion sort step, just avoid the external buffer
- size_type kbuf = min_value<size_type>(l_build_buf, size_type(xbuf.capacity()));
- kbuf = kbuf < l_base ? 0 : kbuf;
-
- if(kbuf){
- //Backup internal buffer values in external buffer so they can be overwritten
- xbuf.move_assign(first+l_build_buf-kbuf, kbuf);
- l_merged = op_insertion_sort_step_left(first_block, elements_in_blocks, l_base, comp, move_op());
-
- //Now combine them using the buffer. Elements from buffer can be
- //overwritten since they've been saved to xbuf
- l_merged = op_merge_left_step_multiple
- ( first_block - l_merged, elements_in_blocks, l_merged, l_build_buf, kbuf - l_merged, comp, move_op());
-
- //Restore internal buffer from external buffer unless kbuf was l_build_buf,
- //in that case restoration will happen later
- if(kbuf != l_build_buf){
- boost::move(xbuf.data()+kbuf-l_merged, xbuf.data() + kbuf, first_block-l_merged+elements_in_blocks);
- }
- }
- else{
- l_merged = insertion_sort_step(first_block, elements_in_blocks, l_base, comp);
- rotate_gcd(first_block - l_merged, first_block, first_block+elements_in_blocks);
- }
-
- //Now combine elements using the buffer. Elements from buffer can't be
- //overwritten since xbuf was not big enough, so merge swapping elements.
- l_merged = op_merge_left_step_multiple
- (first_block - l_merged, elements_in_blocks, l_merged, l_build_buf, l_build_buf - l_merged, comp, swap_op());
-
- BOOST_ASSERT(l_merged == l_build_buf);
-
- //////////////////////////////////
- // Start of merge to right step
- //////////////////////////////////
-
- //If kbuf is l_build_buf then we can merge right without swapping
- //Saved data is still in xbuf
- if(kbuf && kbuf == l_build_buf){
- op_merge_right_step_once(first, elements_in_blocks, l_build_buf, comp, move_op());
- //Restore internal buffer from external buffer if kbuf was l_build_buf.
- //as this operation was previously delayed.
- boost::move(xbuf.data(), xbuf.data() + kbuf, first);
- }
- else{
- op_merge_right_step_once(first, elements_in_blocks, l_build_buf, comp, swap_op());
- }
- xbuf.clear();
- //2*l_build_buf or total already merged
- return min_value(elements_in_blocks, 2*l_build_buf);
-}
-
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class XBuf>
-void adaptive_sort_combine_blocks
- ( RandItKeys const keys
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const len
- , typename iterator_traits<RandIt>::size_type const l_prev_merged
- , typename iterator_traits<RandIt>::size_type const l_block
- , bool const use_buf
- , bool const xbuf_used
- , XBuf & xbuf
- , Compare comp
- , bool merge_left)
-{
- (void)xbuf;
- typedef typename iterator_traits<RandIt>::size_type size_type;
-
- size_type const l_reg_combined = 2*l_prev_merged;
- size_type l_irreg_combined = 0;
- size_type const l_total_combined = calculate_total_combined(len, l_prev_merged, &l_irreg_combined);
- size_type const n_reg_combined = len/l_reg_combined;
- RandIt combined_first = first;
-
- (void)l_total_combined;
- BOOST_ASSERT(l_total_combined <= len);
-
- size_type const max_i = n_reg_combined + (l_irreg_combined != 0);
-
- if(merge_left || !use_buf) {
- for( size_type combined_i = 0; combined_i != max_i; ++combined_i, combined_first += l_reg_combined) {
- //Now merge blocks
- bool const is_last = combined_i==n_reg_combined;
- size_type const l_cur_combined = is_last ? l_irreg_combined : l_reg_combined;
-
- range_xbuf<RandIt, move_op> rbuf( (use_buf && xbuf_used) ? (combined_first-l_block) : combined_first, combined_first);
- size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
- combine_params( keys, key_comp, l_cur_combined
- , l_prev_merged, l_block, rbuf
- , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combpar: ", len + l_block);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(combined_first, combined_first + n_block_a*l_block+l_irreg1, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(combined_first + n_block_a*l_block+l_irreg1, combined_first + n_block_a*l_block+l_irreg1+n_block_b*l_block+l_irreg2, comp));
- if(!use_buf){
- merge_blocks_bufferless
- (keys, key_comp, combined_first, l_block, 0u, n_block_a, n_block_b, l_irreg2, comp);
- }
- else{
- merge_blocks_left
- (keys, key_comp, combined_first, l_block, 0u, n_block_a, n_block_b, l_irreg2, comp, xbuf_used);
- }
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" After merge_blocks_L: ", len + l_block);
- }
- }
- else{
- combined_first += l_reg_combined*(max_i-1);
- for( size_type combined_i = max_i; combined_i--; combined_first -= l_reg_combined) {
- bool const is_last = combined_i==n_reg_combined;
- size_type const l_cur_combined = is_last ? l_irreg_combined : l_reg_combined;
-
- RandIt const combined_last(combined_first+l_cur_combined);
- range_xbuf<RandIt, move_op> rbuf(combined_last, xbuf_used ? (combined_last+l_block) : combined_last);
- size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
- combine_params( keys, key_comp, l_cur_combined
- , l_prev_merged, l_block, rbuf
- , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combpar: ", len + l_block);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(combined_first, combined_first + n_block_a*l_block+l_irreg1, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(combined_first + n_block_a*l_block+l_irreg1, combined_first + n_block_a*l_block+l_irreg1+n_block_b*l_block+l_irreg2, comp));
- merge_blocks_right
- (keys, key_comp, combined_first, l_block, n_block_a, n_block_b, l_irreg2, comp, xbuf_used);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" After merge_blocks_R: ", len + l_block);
- }
- }
-}
-
-//Returns true if buffer is placed in
-//[buffer+len-l_intbuf, buffer+len). Otherwise, buffer is
-//[buffer,buffer+l_intbuf)
-template<class RandIt, class Compare, class XBuf>
-bool adaptive_sort_combine_all_blocks
- ( RandIt keys
- , typename iterator_traits<RandIt>::size_type &n_keys
- , RandIt const buffer
- , typename iterator_traits<RandIt>::size_type const l_buf_plus_data
- , typename iterator_traits<RandIt>::size_type l_merged
- , typename iterator_traits<RandIt>::size_type &l_intbuf
- , XBuf & xbuf
- , Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- RandIt const first = buffer + l_intbuf;
- size_type const l_data = l_buf_plus_data - l_intbuf;
- size_type const l_unique = l_intbuf+n_keys;
- //Backup data to external buffer once if possible
- bool const common_xbuf = l_data > l_merged && l_intbuf && l_intbuf <= xbuf.capacity();
- if(common_xbuf){
- xbuf.move_assign(buffer, l_intbuf);
- }
-
- bool prev_merge_left = true;
- size_type l_prev_total_combined = l_merged, l_prev_block = 0;
- bool prev_use_internal_buf = true;
-
- for( size_type n = 0; l_data > l_merged
- ; l_merged*=2
- , ++n){
- //If l_intbuf is non-zero, use that internal buffer.
- // Implies l_block == l_intbuf && use_internal_buf == true
- //If l_intbuf is zero, see if half keys can be reused as a reduced emergency buffer,
- // Implies l_block == n_keys/2 && use_internal_buf == true
- //Otherwise, just give up and and use all keys to merge using rotations (use_internal_buf = false)
- bool use_internal_buf = false;
- size_type const l_block = lblock_for_combine(l_intbuf, n_keys, 2*l_merged, use_internal_buf);
- BOOST_ASSERT(!l_intbuf || (l_block == l_intbuf));
- BOOST_ASSERT(n == 0 || (!use_internal_buf || prev_use_internal_buf) );
- BOOST_ASSERT(n == 0 || (!use_internal_buf || l_prev_block == l_block) );
-
- bool const is_merge_left = (n&1) == 0;
- size_type const l_total_combined = calculate_total_combined(l_data, l_merged);
- if(n && prev_use_internal_buf && prev_merge_left){
- if(is_merge_left || !use_internal_buf){
- move_data_backward(first-l_prev_block, l_prev_total_combined, first, common_xbuf);
- }
- else{
- //Put the buffer just after l_total_combined
- RandIt const buf_end = first+l_prev_total_combined;
- RandIt const buf_beg = buf_end-l_block;
- if(l_prev_total_combined > l_total_combined){
- size_type const l_diff = l_prev_total_combined - l_total_combined;
- move_data_backward(buf_beg-l_diff, l_diff, buf_end-l_diff, common_xbuf);
- }
- else if(l_prev_total_combined < l_total_combined){
- size_type const l_diff = l_total_combined - l_prev_total_combined;
- move_data_forward(buf_end, l_diff, buf_beg, common_xbuf);
- }
- }
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" After move_data : ", l_data + l_intbuf);
- }
-
- //Combine to form l_merged*2 segments
- if(n_keys){
- size_type upper_n_keys_this_iter = 2*l_merged/l_block;
- if(upper_n_keys_this_iter > 256){
- adaptive_sort_combine_blocks
- ( keys, comp, !use_internal_buf || is_merge_left ? first : first-l_block
- , l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
- }
- else{
- unsigned char uint_keys[256];
- adaptive_sort_combine_blocks
- ( uint_keys, less(), !use_internal_buf || is_merge_left ? first : first-l_block
- , l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
- }
- }
- else{
- size_type *const uint_keys = xbuf.template aligned_trailing<size_type>();
- adaptive_sort_combine_blocks
- ( uint_keys, less(), !use_internal_buf || is_merge_left ? first : first-l_block
- , l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
- }
-
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(is_merge_left ? " After comb blocks L: " : " After comb blocks R: ", l_data + l_intbuf);
- prev_merge_left = is_merge_left;
- l_prev_total_combined = l_total_combined;
- l_prev_block = l_block;
- prev_use_internal_buf = use_internal_buf;
- }
- BOOST_ASSERT(l_prev_total_combined == l_data);
- bool const buffer_right = prev_use_internal_buf && prev_merge_left;
-
- l_intbuf = prev_use_internal_buf ? l_prev_block : 0u;
- n_keys = l_unique - l_intbuf;
- //Restore data from to external common buffer if used
- if(common_xbuf){
- if(buffer_right){
- boost::move(xbuf.data(), xbuf.data() + l_intbuf, buffer+l_data);
- }
- else{
- boost::move(xbuf.data(), xbuf.data() + l_intbuf, buffer);
- }
- }
- return buffer_right;
-}
-
-
-template<class RandIt, class Compare, class XBuf>
-void adaptive_sort_final_merge( bool buffer_right
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_intbuf
- , typename iterator_traits<RandIt>::size_type const n_keys
- , typename iterator_traits<RandIt>::size_type const len
- , XBuf & xbuf
- , Compare comp)
-{
- //BOOST_ASSERT(n_keys || xbuf.size() == l_intbuf);
- xbuf.clear();
-
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const n_key_plus_buf = l_intbuf+n_keys;
- if(buffer_right){
- //Use stable sort as some buffer elements might not be unique (see non_unique_buf)
- stable_sort(first+len-l_intbuf, first+len, comp, xbuf);
- stable_merge(first+n_keys, first+len-l_intbuf, first+len, antistable<Compare>(comp), xbuf);
- unstable_sort(first, first+n_keys, comp, xbuf);
- stable_merge(first, first+n_keys, first+len, comp, xbuf);
- }
- else{
- //Use stable sort as some buffer elements might not be unique (see non_unique_buf)
- stable_sort(first, first+n_key_plus_buf, comp, xbuf);
- if(xbuf.capacity() >= n_key_plus_buf){
- buffered_merge(first, first+n_key_plus_buf, first+len, comp, xbuf);
- }
- else if(xbuf.capacity() >= min_value<size_type>(l_intbuf, n_keys)){
- stable_merge(first+n_keys, first+n_key_plus_buf, first+len, comp, xbuf);
- stable_merge(first, first+n_keys, first+len, comp, xbuf);
- }
- else{
- stable_merge(first, first+n_key_plus_buf, first+len, comp, xbuf);
- }
- }
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" After final_merge : ", len);
-}
-
-template<class RandIt, class Compare, class Unsigned, class XBuf>
-bool adaptive_sort_build_params
- (RandIt first, Unsigned const len, Compare comp
- , Unsigned &n_keys, Unsigned &l_intbuf, Unsigned &l_base, Unsigned &l_build_buf
- , XBuf & xbuf
- )
-{
- typedef Unsigned size_type;
-
- //Calculate ideal parameters and try to collect needed unique keys
- l_base = 0u;
-
- //Try to find a value near sqrt(len) that is 2^N*l_base where
- //l_base <= AdaptiveSortInsertionSortThreshold. This property is important
- //as build_blocks merges to the left iteratively duplicating the
- //merged size and all the buffer must be used just before the final
- //merge to right step. This guarantees "build_blocks" produces
- //segments of size l_build_buf*2, maximizing the classic merge phase.
- l_intbuf = size_type(ceil_sqrt_multiple(len, &l_base));
-
- //The internal buffer can be expanded if there is enough external memory
- while(xbuf.capacity() >= l_intbuf*2){
- l_intbuf *= 2;
- }
-
- //This is the minimum number of keys to implement the ideal algorithm
- //
- //l_intbuf is used as buffer plus the key count
- size_type n_min_ideal_keys = l_intbuf-1;
- while(n_min_ideal_keys >= (len-l_intbuf-n_min_ideal_keys)/l_intbuf){
- --n_min_ideal_keys;
- }
- n_min_ideal_keys += 1;
- BOOST_ASSERT(n_min_ideal_keys <= l_intbuf);
-
- if(xbuf.template supports_aligned_trailing<size_type>(l_intbuf, (len-l_intbuf-1)/l_intbuf+1)){
- n_keys = 0u;
- l_build_buf = l_intbuf;
- }
- else{
- //Try to achieve a l_build_buf of length l_intbuf*2, so that we can merge with that
- //l_intbuf*2 buffer in "build_blocks" and use half of them as buffer and the other half
- //as keys in combine_all_blocks. In that case n_keys >= n_min_ideal_keys but by a small margin.
- //
- //If available memory is 2*sqrt(l), then only sqrt(l) unique keys are needed,
- //(to be used for keys in combine_all_blocks) as the whole l_build_buf
- //will be backuped in the buffer during build_blocks.
- bool const non_unique_buf = xbuf.capacity() >= l_intbuf;
- size_type const to_collect = non_unique_buf ? n_min_ideal_keys : l_intbuf*2;
- size_type collected = collect_unique(first, first+len, to_collect, comp, xbuf);
-
- //If available memory is 2*sqrt(l), then for "build_params"
- //the situation is the same as if 2*l_intbuf were collected.
- if(non_unique_buf && collected == n_min_ideal_keys){
- l_build_buf = l_intbuf;
- n_keys = n_min_ideal_keys;
- }
- else if(collected == 2*l_intbuf){
- //l_intbuf*2 elements found. Use all of them in the build phase
- l_build_buf = l_intbuf*2;
- n_keys = l_intbuf;
- }
- else if(collected == (n_min_ideal_keys+l_intbuf)){
- l_build_buf = l_intbuf;
- n_keys = n_min_ideal_keys;
- }
- //If collected keys are not enough, try to fix n_keys and l_intbuf. If no fix
- //is possible (due to very low unique keys), then go to a slow sort based on rotations.
- else{
- BOOST_ASSERT(collected < (n_min_ideal_keys+l_intbuf));
- if(collected < 4){ //No combination possible with less that 4 keys
- return false;
- }
- n_keys = l_intbuf;
- while(n_keys&(n_keys-1)){
- n_keys &= n_keys-1; // make it power or 2
- }
- while(n_keys > collected){
- n_keys/=2;
- }
- //AdaptiveSortInsertionSortThreshold is always power of two so the minimum is power of two
- l_base = min_value<Unsigned>(n_keys, AdaptiveSortInsertionSortThreshold);
- l_intbuf = 0;
- l_build_buf = n_keys;
- }
- BOOST_ASSERT((n_keys+l_intbuf) >= l_build_buf);
- }
-
- return true;
-}
-
-// Main explanation of the sort algorithm.
-//
-// csqrtlen = ceil(sqrt(len));
-//
-// * First, 2*csqrtlen unique elements elements are extracted from elements to be
-// sorted and placed in the beginning of the range.
-//
-// * Step "build_blocks": In this nearly-classic merge step, 2*csqrtlen unique elements
-// will be used as auxiliary memory, so trailing len-2*csqrtlen elements are
-// are grouped in blocks of sorted 4*csqrtlen elements. At the end of the step
-// 2*csqrtlen unique elements are again the leading elements of the whole range.
-//
-// * Step "combine_blocks": pairs of previously formed blocks are merged with a different
-// ("smart") algorithm to form blocks of 8*csqrtlen elements. This step is slower than the
-// "build_blocks" step and repeated iteratively (forming blocks of 16*csqrtlen, 32*csqrtlen
-// elements, etc) of until all trailing (len-2*csqrtlen) elements are merged.
-//
-// In "combine_blocks" len/csqrtlen elements used are as "keys" (markers) to
-// know if elements belong to the first or second block to be merged and another
-// leading csqrtlen elements are used as buffer. Explanation of the "combine_blocks" step:
-//
-// Iteratively until all trailing (len-2*csqrtlen) elements are merged:
-// Iteratively for each pair of previously merged block:
-// * Blocks are divided groups of csqrtlen elements and
-// 2*merged_block/csqrtlen keys are sorted to be used as markers
-// * Groups are selection-sorted by first or last element (depending whether they are going
-// to be merged to left or right) and keys are reordered accordingly as an imitation-buffer.
-// * Elements of each block pair are merged using the csqrtlen buffer taking into account
-// if they belong to the first half or second half (marked by the key).
-//
-// * In the final merge step leading elements (2*csqrtlen) are sorted and merged with
-// rotations with the rest of sorted elements in the "combine_blocks" step.
-//
-// Corner cases:
-//
-// * If no 2*csqrtlen elements can be extracted:
-//
-// * If csqrtlen+len/csqrtlen are extracted, then only csqrtlen elements are used
-// as buffer in the "build_blocks" step forming blocks of 2*csqrtlen elements. This
-// means that an additional "combine_blocks" step will be needed to merge all elements.
-//
-// * If no csqrtlen+len/csqrtlen elements can be extracted, but still more than a minimum,
-// then reduces the number of elements used as buffer and keys in the "build_blocks"
-// and "combine_blocks" steps. If "combine_blocks" has no enough keys due to this reduction
-// then uses a rotation based smart merge.
-//
-// * If the minimum number of keys can't be extracted, a rotation-based sorting is performed.
-//
-// * If auxiliary memory is more or equal than ceil(len/2), half-copying mergesort is used.
-//
-// * If auxiliary memory is more than csqrtlen+n_keys*sizeof(std::size_t),
-// then only csqrtlen elements need to be extracted and "combine_blocks" will use integral
-// keys to combine blocks.
-//
-// * If auxiliary memory is available, the "build_blocks" will be extended to build bigger blocks
-// using classic merge and "combine_blocks" will use bigger blocks when merging.
-template<class RandIt, class Compare, class XBuf>
-void adaptive_sort_impl
- ( RandIt first
- , typename iterator_traits<RandIt>::size_type const len
- , Compare comp
- , XBuf & xbuf
- )
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
-
- //Small sorts go directly to insertion sort
- if(len <= size_type(AdaptiveSortInsertionSortThreshold)){
- insertion_sort(first, first + len, comp);
- }
- else if((len-len/2) <= xbuf.capacity()){
- merge_sort(first, first+len, comp, xbuf.data());
- }
- else{
- //Make sure it is at least four
- BOOST_STATIC_ASSERT(AdaptiveSortInsertionSortThreshold >= 4);
-
- size_type l_base = 0;
- size_type l_intbuf = 0;
- size_type n_keys = 0;
- size_type l_build_buf = 0;
-
- //Calculate and extract needed unique elements. If a minimum is not achieved
- //fallback to a slow stable sort
- if(!adaptive_sort_build_params(first, len, comp, n_keys, l_intbuf, l_base, l_build_buf, xbuf)){
- stable_sort(first, first+len, comp, xbuf);
- }
- else{
- BOOST_ASSERT(l_build_buf);
- //Otherwise, continue the adaptive_sort
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1("\n After collect_unique: ", len);
- size_type const n_key_plus_buf = l_intbuf+n_keys;
- //l_build_buf is always power of two if l_intbuf is zero
- BOOST_ASSERT(l_intbuf || (0 == (l_build_buf & (l_build_buf-1))));
-
- //Classic merge sort until internal buffer and xbuf are exhausted
- size_type const l_merged = adaptive_sort_build_blocks
- (first+n_key_plus_buf-l_build_buf, len-n_key_plus_buf+l_build_buf, l_base, l_build_buf, xbuf, comp);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" After build_blocks: ", len);
-
- //Non-trivial merge
- bool const buffer_right = adaptive_sort_combine_all_blocks
- (first, n_keys, first+n_keys, len-n_keys, l_merged, l_intbuf, xbuf, comp);
-
- //Sort keys and buffer and merge the whole sequence
- adaptive_sort_final_merge(buffer_right, first, l_intbuf, n_keys, len, xbuf, comp);
- }
- }
-}
-
-} //namespace detail_adaptive {
-
-///@endcond
-
-//! <b>Effects</b>: Sorts the elements in the range [first, last) in ascending order according
-//! to comparison functor "comp". The sort is stable (order of equal elements
-//! is guaranteed to be preserved). Performance is improved if additional raw storage is
-//! provided.
-//!
-//! <b>Requires</b>:
-//! - RandIt must meet the requirements of ValueSwappable and RandomAccessIterator.
-//! - The type of dereferenced RandIt must meet the requirements of MoveAssignable and MoveConstructible.
-//!
-//! <b>Parameters</b>:
-//! - first, last: the range of elements to sort
-//! - comp: comparison function object which returns true if the first argument is is ordered before the second.
-//! - uninitialized, uninitialized_len: raw storage starting on "uninitialized", able to hold "uninitialized_len"
-//! elements of type iterator_traits<RandIt>::value_type. Maximum performance is achieved when uninitialized_len
-//! is ceil(std::distance(first, last)/2).
-//!
-//! <b>Throws</b>: If comp throws or the move constructor, move assignment or swap of the type
-//! of dereferenced RandIt throws.
-//!
-//! <b>Complexity</b>: Always K x O(Nxlog(N)) comparisons and move assignments/constructors/swaps.
-//! Comparisons are close to minimum even with no additional memory. Constant factor for data movement is minimized
-//! when uninitialized_len is ceil(std::distance(first, last)/2). Pretty good enough performance is achieved when
-//! ceil(sqrt(std::distance(first, last)))*2.
-//!
-//! <b>Caution</b>: Experimental implementation, not production-ready.
-template<class RandIt, class RandRawIt, class Compare>
-void adaptive_sort( RandIt first, RandIt last, Compare comp
- , RandRawIt uninitialized
- , std::size_t uninitialized_len)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- typedef typename iterator_traits<RandIt>::value_type value_type;
-
- ::boost::movelib::detail_adaptive::adaptive_xbuf<value_type, RandRawIt> xbuf(uninitialized, uninitialized_len);
- ::boost::movelib::detail_adaptive::adaptive_sort_impl(first, size_type(last - first), comp, xbuf);
-}
-
-template<class RandIt, class Compare>
-void adaptive_sort( RandIt first, RandIt last, Compare comp)
-{
- typedef typename iterator_traits<RandIt>::value_type value_type;
- adaptive_sort(first, last, comp, (value_type*)0, 0u);
-}
-
-} //namespace movelib {
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#define BOOST_MOVE_ADAPTIVE_SORT_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 4c2808622ae..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/adaptive_sort_merge.hpp
+++ /dev/null
@@ -1,1690 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// Stable sorting that works in O(N*log(N)) worst time
-// and uses O(1) extra memory
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// The main idea of the adaptive_sort algorithm was developed by Andrey Astrelin
-// and explained in the article from the russian collaborative blog
-// Habrahabr (http://habrahabr.ru/post/205290/). The algorithm is based on
-// ideas from B-C. Huang and M. A. Langston explained in their article
-// "Fast Stable Merging and Sorting in Constant Extra Space (1989-1992)"
-// (http://comjnl.oxfordjournals.org/content/35/6/643.full.pdf).
-//
-// This implementation by Ion Gaztanaga uses previous ideas with additional changes:
-//
-// - Use of GCD-based rotation.
-// - Non power of two buffer-sizes.
-// - Tries to find sqrt(len)*2 unique keys, so that the merge sort
-// phase can form up to sqrt(len)*4 segments if enough keys are found.
-// - The merge-sort phase can take advantage of external memory to
-// save some additional combination steps.
-// - Combination phase: Blocks are selection sorted and merged in parallel.
-// - The combination phase is performed alternating merge to left and merge
-// to right phases minimizing swaps due to internal buffer repositioning.
-// - When merging blocks special optimizations are made to avoid moving some
-// elements twice.
-//
-// The adaptive_merge algorithm was developed by Ion Gaztanaga reusing some parts
-// from the sorting algorithm and implementing an additional block merge algorithm
-// without moving elements to left or right.
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
-#define BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
-
-#include <boost/move/detail/config_begin.hpp>
-#include <boost/move/detail/reverse_iterator.hpp>
-#include <boost/move/algo/move.hpp>
-#include <boost/move/algo/detail/merge.hpp>
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/algo/detail/insertion_sort.hpp>
-#include <boost/move/algo/detail/merge_sort.hpp>
-#include <boost/move/algo/detail/heap_sort.hpp>
-#include <boost/move/algo/detail/merge.hpp>
-#include <boost/move/algo/detail/is_sorted.hpp>
-#include <boost/assert.hpp>
-#include <boost/cstdint.hpp>
-
-#ifndef BOOST_MOVE_ADAPTIVE_SORT_STATS_LEVEL
- #define BOOST_MOVE_ADAPTIVE_SORT_STATS_LEVEL 1
-#endif
-
-#ifdef BOOST_MOVE_ADAPTIVE_SORT_STATS
- #if BOOST_MOVE_ADAPTIVE_SORT_STATS_LEVEL == 2
- #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(STR, L) \
- print_stats(STR, L)\
- //
-
- #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(STR, L) \
- print_stats(STR, L)\
- //
- #else
- #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(STR, L) \
- print_stats(STR, L)\
- //
-
- #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(STR, L)
- #endif
-#else
- #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(STR, L)
- #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(STR, L)
-#endif
-
-#ifdef BOOST_MOVE_ADAPTIVE_SORT_INVARIANTS
- #define BOOST_MOVE_ADAPTIVE_SORT_INVARIANT BOOST_ASSERT
-#else
- #define BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(L)
-#endif
-
-namespace boost {
-namespace movelib {
-
-#if defined(BOOST_MOVE_ADAPTIVE_SORT_INVARIANTS)
-
-bool is_sorted(::order_perf_type *first, ::order_perf_type *last, ::order_type_less)
-{
- if (first != last) {
- const order_perf_type *next = first, *cur(first);
- while (++next != last) {
- if (!(cur->key < next->key || (cur->key == next->key && cur->val < next->val)))
- return false;
- cur = next;
- }
- }
- return true;
-}
-
-#endif //BOOST_MOVE_ADAPTIVE_SORT_INVARIANTS
-
-namespace detail_adaptive {
-
-static const std::size_t AdaptiveSortInsertionSortThreshold = 16;
-//static const std::size_t AdaptiveSortInsertionSortThreshold = 4;
-BOOST_STATIC_ASSERT((AdaptiveSortInsertionSortThreshold&(AdaptiveSortInsertionSortThreshold-1)) == 0);
-
-#if defined BOOST_HAS_INTPTR_T
- typedef ::boost::uintptr_t uintptr_t;
-#else
- typedef std::size_t uintptr_t;
-#endif
-
-template<class T>
-const T &min_value(const T &a, const T &b)
-{
- return a < b ? a : b;
-}
-
-template<class T>
-const T &max_value(const T &a, const T &b)
-{
- return a > b ? a : b;
-}
-
-template<class ForwardIt, class Pred, class V>
-typename iterator_traits<ForwardIt>::size_type
- count_if_with(ForwardIt first, ForwardIt last, Pred pred, const V &v)
-{
- typedef typename iterator_traits<ForwardIt>::size_type size_type;
- size_type count = 0;
- while(first != last) {
- count += static_cast<size_type>(0 != pred(*first, v));
- ++first;
- }
- return count;
-}
-
-template<class T, class RandRawIt = T*>
-class adaptive_xbuf
-{
- adaptive_xbuf(const adaptive_xbuf &);
- adaptive_xbuf & operator=(const adaptive_xbuf &);
-
- public:
- typedef RandRawIt iterator;
-
- adaptive_xbuf()
- : m_ptr(), m_size(0), m_capacity(0)
- {}
-
- adaptive_xbuf(RandRawIt raw_memory, std::size_t capacity)
- : m_ptr(raw_memory), m_size(0), m_capacity(capacity)
- {}
-
- template<class RandIt>
- void move_assign(RandIt first, std::size_t n)
- {
- if(n <= m_size){
- boost::move(first, first+n, m_ptr);
- std::size_t size = m_size;
- while(size-- != n){
- m_ptr[size].~T();
- }
- m_size = n;
- }
- else{
- RandRawIt result = boost::move(first, first+m_size, m_ptr);
- boost::uninitialized_move(first+m_size, first+n, result);
- m_size = n;
- }
- }
-
- template<class RandIt>
- void push_back(RandIt first, std::size_t n)
- {
- BOOST_ASSERT(m_capacity - m_size >= n);
- boost::uninitialized_move(first, first+n, m_ptr+m_size);
- m_size += n;
- }
-
- template<class RandIt>
- iterator add(RandIt it)
- {
- BOOST_ASSERT(m_size < m_capacity);
- RandRawIt p_ret = m_ptr + m_size;
- ::new(&*p_ret) T(::boost::move(*it));
- ++m_size;
- return p_ret;
- }
-
- template<class RandIt>
- void insert(iterator pos, RandIt it)
- {
- if(pos == (m_ptr + m_size)){
- this->add(it);
- }
- else{
- this->add(m_ptr+m_size-1);
- //m_size updated
- boost::move_backward(pos, m_ptr+m_size-2, m_ptr+m_size-1);
- *pos = boost::move(*it);
- }
- }
-
- void set_size(std::size_t size)
- {
- m_size = size;
- }
-
- void shrink_to_fit(std::size_t const size)
- {
- if(m_size > size){
- for(std::size_t szt_i = size; szt_i != m_size; ++szt_i){
- m_ptr[szt_i].~T();
- }
- m_size = size;
- }
- }
-
- void initialize_until(std::size_t const size, T &t)
- {
- BOOST_ASSERT(m_size < m_capacity);
- if(m_size < size){
- ::new((void*)&m_ptr[m_size]) T(::boost::move(t));
- ++m_size;
- for(; m_size != size; ++m_size){
- ::new((void*)&m_ptr[m_size]) T(::boost::move(m_ptr[m_size-1]));
- }
- t = ::boost::move(m_ptr[m_size-1]);
- }
- }
-
- private:
- template<class RIt>
- static bool is_raw_ptr(RIt)
- {
- return false;
- }
-
- static bool is_raw_ptr(T*)
- {
- return true;
- }
-
- public:
- template<class U>
- bool supports_aligned_trailing(std::size_t size, std::size_t trail_count) const
- {
- if(this->is_raw_ptr(this->data()) && m_capacity){
- uintptr_t u_addr_sz = uintptr_t(&*(this->data()+size));
- uintptr_t u_addr_cp = uintptr_t(&*(this->data()+this->capacity()));
- u_addr_sz = ((u_addr_sz + sizeof(U)-1)/sizeof(U))*sizeof(U);
- return (u_addr_cp >= u_addr_sz) && ((u_addr_cp - u_addr_sz)/sizeof(U) >= trail_count);
- }
- return false;
- }
-
- template<class U>
- U *aligned_trailing() const
- {
- return this->aligned_trailing<U>(this->size());
- }
-
- template<class U>
- U *aligned_trailing(std::size_t pos) const
- {
- uintptr_t u_addr = uintptr_t(&*(this->data()+pos));
- u_addr = ((u_addr + sizeof(U)-1)/sizeof(U))*sizeof(U);
- return (U*)u_addr;
- }
-
- ~adaptive_xbuf()
- {
- this->clear();
- }
-
- std::size_t capacity() const
- { return m_capacity; }
-
- iterator data() const
- { return m_ptr; }
-
- iterator end() const
- { return m_ptr+m_size; }
-
- std::size_t size() const
- { return m_size; }
-
- bool empty() const
- { return !m_size; }
-
- void clear()
- {
- this->shrink_to_fit(0u);
- }
-
- private:
- RandRawIt m_ptr;
- std::size_t m_size;
- std::size_t m_capacity;
-};
-
-template<class Iterator, class Op>
-class range_xbuf
-{
- range_xbuf(const range_xbuf &);
- range_xbuf & operator=(const range_xbuf &);
-
- public:
- typedef typename iterator_traits<Iterator>::size_type size_type;
- typedef Iterator iterator;
-
- range_xbuf(Iterator first, Iterator last)
- : m_first(first), m_last(first), m_cap(last)
- {}
-
- template<class RandIt>
- void move_assign(RandIt first, std::size_t n)
- {
- BOOST_ASSERT(size_type(n) <= size_type(m_cap-m_first));
- m_last = Op()(forward_t(), first, first+n, m_first);
- }
-
- ~range_xbuf()
- {}
-
- std::size_t capacity() const
- { return m_cap-m_first; }
-
- Iterator data() const
- { return m_first; }
-
- Iterator end() const
- { return m_last; }
-
- std::size_t size() const
- { return m_last-m_first; }
-
- bool empty() const
- { return m_first == m_last; }
-
- void clear()
- {
- m_last = m_first;
- }
-
- template<class RandIt>
- iterator add(RandIt it)
- {
- Iterator pos(m_last);
- *pos = boost::move(*it);
- ++m_last;
- return pos;
- }
-
- void set_size(std::size_t size)
- {
- m_last = m_first;
- m_last += size;
- }
-
- private:
- Iterator const m_first;
- Iterator m_last;
- Iterator const m_cap;
-};
-
-
-template<class RandIt, class Compare>
-RandIt skip_until_merge
- ( RandIt first1, RandIt const last1
- , const typename iterator_traits<RandIt>::value_type &next_key, Compare comp)
-{
- while(first1 != last1 && !comp(next_key, *first1)){
- ++first1;
- }
- return first1;
-}
-
-
-template<class RandItKeys, class RandIt>
-void swap_and_update_key
- ( RandItKeys const key_next
- , RandItKeys const key_range2
- , RandItKeys &key_mid
- , RandIt const begin
- , RandIt const end
- , RandIt const with)
-{
- if(begin != with){
- ::boost::adl_move_swap_ranges(begin, end, with);
- ::boost::adl_move_swap(*key_next, *key_range2);
- if(key_next == key_mid){
- key_mid = key_range2;
- }
- else if(key_mid == key_range2){
- key_mid = key_next;
- }
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// MERGE BUFFERLESS
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// [first1, last1) merge [last1,last2) -> [first1,last2)
-template<class RandIt, class Compare>
-RandIt partial_merge_bufferless_impl
- (RandIt first1, RandIt last1, RandIt const last2, bool *const pis_range1_A, Compare comp)
-{
- if(last1 == last2){
- return first1;
- }
- bool const is_range1_A = *pis_range1_A;
- if(first1 != last1 && comp(*last1, last1[-1])){
- do{
- RandIt const old_last1 = last1;
- last1 = boost::movelib::lower_bound(last1, last2, *first1, comp);
- first1 = rotate_gcd(first1, old_last1, last1);//old_last1 == last1 supported
- if(last1 == last2){
- return first1;
- }
- do{
- ++first1;
- } while(last1 != first1 && !comp(*last1, *first1) );
- } while(first1 != last1);
- }
- *pis_range1_A = !is_range1_A;
- return last1;
-}
-
-// [first1, last1) merge [last1,last2) -> [first1,last2)
-template<class RandIt, class Compare>
-RandIt partial_merge_bufferless
- (RandIt first1, RandIt last1, RandIt const last2, bool *const pis_range1_A, Compare comp)
-{
- return *pis_range1_A ? partial_merge_bufferless_impl(first1, last1, last2, pis_range1_A, comp)
- : partial_merge_bufferless_impl(first1, last1, last2, pis_range1_A, antistable<Compare>(comp));
-}
-
-template<class SizeType>
-static SizeType needed_keys_count(SizeType n_block_a, SizeType n_block_b)
-{
- return n_block_a + n_block_b;
-}
-
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
-typename iterator_traits<RandIt>::size_type
- find_next_block
- ( RandItKeys key_first
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const ix_first_block
- , typename iterator_traits<RandIt>::size_type const ix_last_block
- , Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- typedef typename iterator_traits<RandIt>::value_type value_type;
- typedef typename iterator_traits<RandItKeys>::value_type key_type;
- BOOST_ASSERT(ix_first_block <= ix_last_block);
- size_type ix_min_block = 0u;
- for (size_type szt_i = ix_first_block; szt_i < ix_last_block; ++szt_i) {
- const value_type &min_val = first[ix_min_block*l_block];
- const value_type &cur_val = first[szt_i*l_block];
- const key_type &min_key = key_first[ix_min_block];
- const key_type &cur_key = key_first[szt_i];
-
- bool const less_than_minimum = comp(cur_val, min_val) ||
- (!comp(min_val, cur_val) && key_comp(cur_key, min_key));
-
- if (less_than_minimum) {
- ix_min_block = szt_i;
- }
- }
- return ix_min_block;
-}
-
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
-void merge_blocks_bufferless
- ( RandItKeys key_first
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const l_irreg1
- , typename iterator_traits<RandIt>::size_type const n_block_a
- , typename iterator_traits<RandIt>::size_type const n_block_b
- , typename iterator_traits<RandIt>::size_type const l_irreg2
- , Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const key_count = needed_keys_count(n_block_a, n_block_b); (void)key_count;
- //BOOST_ASSERT(n_block_a || n_block_b);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted_and_unique(key_first, key_first + key_count, key_comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + key_count, key_comp, key_first[n_block_a]));
-
- size_type n_bef_irreg2 = 0;
- bool l_irreg_pos_count = true;
- RandItKeys key_mid(key_first + n_block_a);
- RandIt const first_irr2 = first + l_irreg1 + (n_block_a+n_block_b)*l_block;
- RandIt const last_irr2 = first_irr2 + l_irreg2;
-
- { //Selection sort blocks
- size_type n_block_left = n_block_b + n_block_a;
- RandItKeys key_range2(key_first);
-
- size_type min_check = n_block_a == n_block_left ? 0u : n_block_a;
- size_type max_check = min_value(min_check+1, n_block_left);
- for (RandIt f = first+l_irreg1; n_block_left; --n_block_left, ++key_range2, f += l_block, min_check -= min_check != 0, max_check -= max_check != 0) {
- size_type const next_key_idx = find_next_block(key_range2, key_comp, f, l_block, min_check, max_check, comp);
- RandItKeys const key_next(key_range2 + next_key_idx);
- max_check = min_value(max_value(max_check, next_key_idx+2), n_block_left);
-
- RandIt const first_min = f + next_key_idx*l_block;
-
- //Check if irregular b block should go here.
- //If so, break to the special code handling the irregular block
- if (l_irreg_pos_count && l_irreg2 && comp(*first_irr2, *first_min)){
- l_irreg_pos_count = false;
- }
- n_bef_irreg2 += l_irreg_pos_count;
-
- swap_and_update_key(key_next, key_range2, key_mid, f, f + l_block, first_min);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(f, f+l_block, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first_min, first_min + l_block, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT((f == (first+l_irreg1)) || !comp(*f, *(f-l_block)));
- }
- }
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first+l_irreg1+n_bef_irreg2*l_block, first_irr2, comp));
-
- RandIt first1 = first;
- RandIt last1 = first+l_irreg1;
- RandItKeys const key_end (key_first+n_bef_irreg2);
- bool is_range1_A = true;
-
- for( ; key_first != key_end; ++key_first){
- bool is_range2_A = key_mid == (key_first+key_count) || key_comp(*key_first, *key_mid);
- first1 = is_range1_A == is_range2_A
- ? last1 : partial_merge_bufferless(first1, last1, last1 + l_block, &is_range1_A, comp);
- last1 += l_block;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first, first1, comp));
- }
-
- merge_bufferless(is_range1_A ? first1 : last1, first_irr2, last_irr2, comp);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first, last_irr2, comp));
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// BUFFERED MERGE
-//
-///////////////////////////////////////////////////////////////////////////////
-template<class RandIt, class Compare, class Op, class Buf>
-void op_buffered_merge
- ( RandIt first, RandIt const middle, RandIt last
- , Compare comp, Op op
- , Buf &xbuf)
-{
- if(first != middle && middle != last && comp(*middle, middle[-1])){
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const len1 = size_type(middle-first);
- size_type const len2 = size_type(last-middle);
- if(len1 <= len2){
- first = boost::movelib::upper_bound(first, middle, *middle, comp);
- xbuf.move_assign(first, size_type(middle-first));
- op_merge_with_right_placed
- (xbuf.data(), xbuf.end(), first, middle, last, comp, op);
- }
- else{
- last = boost::movelib::lower_bound(middle, last, middle[-1], comp);
- xbuf.move_assign(middle, size_type(last-middle));
- op_merge_with_left_placed
- (first, middle, last, xbuf.data(), xbuf.end(), comp, op);
- }
- }
-}
-
-template<class RandIt, class Compare, class XBuf>
-void buffered_merge
- ( RandIt first, RandIt const middle, RandIt last
- , Compare comp
- , XBuf &xbuf)
-{
- op_buffered_merge(first, middle, last, comp, move_op(), xbuf);
-}
-
-// Complexity: 2*distance(first, last)+max_collected^2/2
-//
-// Tries to collect at most n_keys unique elements from [first, last),
-// in the begining of the range, and ordered according to comp
-//
-// Returns the number of collected keys
-template<class RandIt, class Compare, class XBuf>
-typename iterator_traits<RandIt>::size_type
- collect_unique
- ( RandIt const first, RandIt const last
- , typename iterator_traits<RandIt>::size_type const max_collected, Compare comp
- , XBuf & xbuf)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type h = 0;
- if(max_collected){
- ++h; // first key is always here
- RandIt h0 = first;
- RandIt u = first; ++u;
- RandIt search_end = u;
-
- if(xbuf.capacity() >= max_collected){
- typename XBuf::iterator const ph0 = xbuf.add(first);
- while(u != last && h < max_collected){
- typename XBuf::iterator const r = boost::movelib::lower_bound(ph0, xbuf.end(), *u, comp);
- //If key not found add it to [h, h+h0)
- if(r == xbuf.end() || comp(*u, *r) ){
- RandIt const new_h0 = boost::move(search_end, u, h0);
- search_end = u;
- ++search_end;
- ++h;
- xbuf.insert(r, u);
- h0 = new_h0;
- }
- ++u;
- }
- boost::move_backward(first, h0, h0+h);
- boost::move(xbuf.data(), xbuf.end(), first);
- }
- else{
- while(u != last && h < max_collected){
- RandIt const r = boost::movelib::lower_bound(h0, search_end, *u, comp);
- //If key not found add it to [h, h+h0)
- if(r == search_end || comp(*u, *r) ){
- RandIt const new_h0 = rotate_gcd(h0, search_end, u);
- search_end = u;
- ++search_end;
- ++h;
- rotate_gcd(r+(new_h0-h0), u, search_end);
- h0 = new_h0;
- }
- ++u;
- }
- rotate_gcd(first, h0, h0+h);
- }
- }
- return h;
-}
-
-template<class Unsigned>
-Unsigned floor_sqrt(Unsigned const n)
-{
- Unsigned x = n;
- Unsigned y = x/2 + (x&1);
- while (y < x){
- x = y;
- y = (x + n / x)/2;
- }
- return x;
-}
-
-template<class Unsigned>
-Unsigned ceil_sqrt(Unsigned const n)
-{
- Unsigned r = floor_sqrt(n);
- return r + Unsigned((n%r) != 0);
-}
-
-template<class Unsigned>
-Unsigned floor_merge_multiple(Unsigned const n, Unsigned &base, Unsigned &pow)
-{
- Unsigned s = n;
- Unsigned p = 0;
- while(s > AdaptiveSortInsertionSortThreshold){
- s /= 2;
- ++p;
- }
- base = s;
- pow = p;
- return s << p;
-}
-
-template<class Unsigned>
-Unsigned ceil_merge_multiple(Unsigned const n, Unsigned &base, Unsigned &pow)
-{
- Unsigned fm = floor_merge_multiple(n, base, pow);
-
- if(fm != n){
- if(base < AdaptiveSortInsertionSortThreshold){
- ++base;
- }
- else{
- base = AdaptiveSortInsertionSortThreshold/2 + 1;
- ++pow;
- }
- }
- return base << pow;
-}
-
-template<class Unsigned>
-Unsigned ceil_sqrt_multiple(Unsigned const n, Unsigned *pbase = 0)
-{
- Unsigned const r = ceil_sqrt(n);
- Unsigned pow = 0;
- Unsigned base = 0;
- Unsigned const res = ceil_merge_multiple(r, base, pow);
- if(pbase) *pbase = base;
- return res;
-}
-
-struct less
-{
- template<class T>
- bool operator()(const T &l, const T &r)
- { return l < r; }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// MERGE BLOCKS
-//
-///////////////////////////////////////////////////////////////////////////////
-
-//#define ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
-
-#if defined ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
-template<class RandIt, class Compare>
-void slow_stable_sort
- ( RandIt const first, RandIt const last, Compare comp)
-{
- boost::movelib::inplace_stable_sort(first, last, comp);
-}
-
-#else //ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
-
-template<class RandIt, class Compare>
-void slow_stable_sort
- ( RandIt const first, RandIt const last, Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type L = size_type(last - first);
- { //Use insertion sort to merge first elements
- size_type m = 0;
- while((L - m) > size_type(AdaptiveSortInsertionSortThreshold)){
- insertion_sort(first+m, first+m+size_type(AdaptiveSortInsertionSortThreshold), comp);
- m += AdaptiveSortInsertionSortThreshold;
- }
- insertion_sort(first+m, last, comp);
- }
-
- size_type h = AdaptiveSortInsertionSortThreshold;
- for(bool do_merge = L > h; do_merge; h*=2){
- do_merge = (L - h) > h;
- size_type p0 = 0;
- if(do_merge){
- size_type const h_2 = 2*h;
- while((L-p0) > h_2){
- merge_bufferless(first+p0, first+p0+h, first+p0+h_2, comp);
- p0 += h_2;
- }
- }
- if((L-p0) > h){
- merge_bufferless(first+p0, first+p0+h, last, comp);
- }
- }
-}
-
-#endif //ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
-
-//Returns new l_block and updates use_buf
-template<class Unsigned>
-Unsigned lblock_for_combine
- (Unsigned const l_block, Unsigned const n_keys, Unsigned const l_data, bool &use_buf)
-{
- BOOST_ASSERT(l_data > 1);
-
- //We need to guarantee lblock >= l_merged/(n_keys/2) keys for the combination.
- //We have at least 4 keys guaranteed (which are the minimum to merge 2 ranges)
- //If l_block != 0, then n_keys is already enough to merge all blocks in all
- //phases as we've found all needed keys for that buffer and length before.
- //If l_block == 0 then see if half keys can be used as buffer and the rest
- //as keys guaranteeing that n_keys >= (2*l_merged)/lblock =
- if(!l_block){
- //If l_block == 0 then n_keys is power of two
- //(guaranteed by build_params(...))
- BOOST_ASSERT(n_keys >= 4);
- //BOOST_ASSERT(0 == (n_keys &(n_keys-1)));
-
- //See if half keys are at least 4 and if half keys fulfill
- Unsigned const new_buf = n_keys/2;
- Unsigned const new_keys = n_keys-new_buf;
- use_buf = new_keys >= 4 && new_keys >= l_data/new_buf;
- if(use_buf){
- return new_buf;
- }
- else{
- return l_data/n_keys;
- }
- }
- else{
- use_buf = true;
- return l_block;
- }
-}
-
-template<class RandIt, class Compare, class XBuf>
-void stable_sort( RandIt first, RandIt last, Compare comp, XBuf & xbuf)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const len = size_type(last - first);
- size_type const half_len = len/2 + (len&1);
- if(std::size_t(xbuf.capacity() - xbuf.size()) >= half_len) {
- merge_sort(first, last, comp, xbuf.data()+xbuf.size());
- }
- else{
- slow_stable_sort(first, last, comp);
- }
-}
-
-template<class RandIt, class Comp, class XBuf>
-void unstable_sort( RandIt first, RandIt last
- , Comp comp
- , XBuf & xbuf)
-{
- heap_sort(first, last, comp);(void)xbuf;
-}
-
-template<class RandIt, class Compare, class XBuf>
-void stable_merge
- ( RandIt first, RandIt const middle, RandIt last
- , Compare comp
- , XBuf &xbuf)
-{
- BOOST_ASSERT(xbuf.empty());
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const len1 = size_type(middle-first);
- size_type const len2 = size_type(last-middle);
- size_type const l_min = min_value(len1, len2);
- if(xbuf.capacity() >= l_min){
- buffered_merge(first, middle, last, comp, xbuf);
- xbuf.clear();
- }
- else{
- merge_bufferless(first, middle, last, comp);
- }
-}
-
-template<class RandIt, class Comp, class XBuf>
-void initialize_keys( RandIt first, RandIt last
- , Comp comp
- , XBuf & xbuf)
-{
- unstable_sort(first, last, comp, xbuf);
- BOOST_ASSERT(boost::movelib::is_sorted_and_unique(first, last, comp));
-}
-
-template<class RandIt, class U>
-void initialize_keys( RandIt first, RandIt last
- , less
- , U &)
-{
- typedef typename iterator_traits<RandIt>::value_type value_type;
- std::size_t count = std::size_t(last - first);
- for(std::size_t i = 0; i != count; ++i){
- *first = static_cast<value_type>(i);
- ++first;
- }
-}
-
-template <class Unsigned>
-Unsigned calculate_total_combined(Unsigned const len, Unsigned const l_prev_merged, Unsigned *pl_irreg_combined = 0)
-{
- typedef Unsigned size_type;
-
- size_type const l_combined = 2*l_prev_merged;
- size_type l_irreg_combined = len%l_combined;
- size_type l_total_combined = len;
- if(l_irreg_combined <= l_prev_merged){
- l_total_combined -= l_irreg_combined;
- l_irreg_combined = 0;
- }
- if(pl_irreg_combined)
- *pl_irreg_combined = l_irreg_combined;
- return l_total_combined;
-}
-
-template<class RandItKeys, class KeyCompare, class SizeType, class XBuf>
-void combine_params
- ( RandItKeys const keys
- , KeyCompare key_comp
- , SizeType l_combined
- , SizeType const l_prev_merged
- , SizeType const l_block
- , XBuf & xbuf
- //Output
- , SizeType &n_block_a
- , SizeType &n_block_b
- , SizeType &l_irreg1
- , SizeType &l_irreg2
- //Options
- , bool do_initialize_keys = true)
-{
- typedef SizeType size_type;
-
- //Initial parameters for selection sort blocks
- l_irreg1 = l_prev_merged%l_block;
- l_irreg2 = (l_combined-l_irreg1)%l_block;
- BOOST_ASSERT(((l_combined-l_irreg1-l_irreg2)%l_block) == 0);
- size_type const n_reg_block = (l_combined-l_irreg1-l_irreg2)/l_block;
- n_block_a = l_prev_merged/l_block;
- n_block_b = n_reg_block - n_block_a;
- BOOST_ASSERT(n_reg_block>=n_block_a);
-
- //Key initialization
- if (do_initialize_keys) {
- initialize_keys(keys, keys + needed_keys_count(n_block_a, n_block_b), key_comp, xbuf);
- }
-}
-
-
-
-//////////////////////////////////
-//
-// partial_merge
-//
-//////////////////////////////////
-template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
-OutputIt op_partial_merge_impl
- (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, OutputIt d_first, Compare comp, Op op)
-{
- InputIt1 first1(r_first1);
- InputIt2 first2(r_first2);
- if(first2 != last2 && last1 != first1)
- while(1){
- if(comp(*first2, *first1)) {
- op(first2++, d_first++);
- if(first2 == last2){
- break;
- }
- }
- else{
- op(first1++, d_first++);
- if(first1 == last1){
- break;
- }
- }
- }
- r_first1 = first1;
- r_first2 = first2;
- return d_first;
-}
-
-template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
-OutputIt op_partial_merge
- (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, OutputIt d_first, Compare comp, Op op, bool is_stable)
-{
- return is_stable ? op_partial_merge_impl(r_first1, last1, r_first2, last2, d_first, comp, op)
- : op_partial_merge_impl(r_first1, last1, r_first2, last2, d_first, antistable<Compare>(comp), op);
-}
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// op_partial_merge_and_save
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
-OutputIt op_partial_merge_and_swap_impl
- (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, InputIt2 &r_first_min, OutputIt d_first, Compare comp, Op op)
-{
- InputIt1 first1(r_first1);
- InputIt2 first2(r_first2);
-
- if(first2 != last2 && last1 != first1) {
- InputIt2 first_min(r_first_min);
- bool non_empty_ranges = true;
- do{
- if(comp(*first_min, *first1)) {
- op(three_way_t(), first2++, first_min++, d_first++);
- non_empty_ranges = first2 != last2;
- }
- else{
- op(first1++, d_first++);
- non_empty_ranges = first1 != last1;
- }
- } while(non_empty_ranges);
- r_first_min = first_min;
- r_first1 = first1;
- r_first2 = first2;
- }
- return d_first;
-}
-
-template<class RandIt, class InputIt2, class OutputIt, class Compare, class Op>
-OutputIt op_partial_merge_and_swap
- (RandIt &r_first1, RandIt const last1, InputIt2 &r_first2, InputIt2 const last2, InputIt2 &r_first_min, OutputIt d_first, Compare comp, Op op, bool is_stable)
-{
- return is_stable ? op_partial_merge_and_swap_impl(r_first1, last1, r_first2, last2, r_first_min, d_first, comp, op)
- : op_partial_merge_and_swap_impl(r_first1, last1, r_first2, last2, r_first_min, d_first, antistable<Compare>(comp), op);
-}
-
-template<class RandIt1, class RandIt2, class RandItB, class Compare, class Op>
-RandItB op_buffered_partial_merge_and_swap_to_range1_and_buffer
- ( RandIt1 first1, RandIt1 const last1
- , RandIt2 &rfirst2, RandIt2 const last2, RandIt2 &rfirst_min
- , RandItB &rfirstb, Compare comp, Op op )
-{
- RandItB firstb = rfirstb;
- RandItB lastb = firstb;
- RandIt2 first2 = rfirst2;
-
- //Move to buffer while merging
- //Three way moves need less moves when op is swap_op so use it
- //when merging elements from range2 to the destination occupied by range1
- if(first1 != last1 && first2 != last2){
- RandIt2 first_min = rfirst_min;
- op(four_way_t(), first2++, first_min++, first1++, lastb++);
-
- while(first1 != last1){
- if(first2 == last2){
- lastb = op(forward_t(), first1, last1, firstb);
- break;
- }
-
- if(comp(*first_min, *firstb)){
- op( four_way_t(), first2++, first_min++, first1++, lastb++);
- }
- else{
- op(three_way_t(), firstb++, first1++, lastb++);
- }
- }
- rfirst2 = first2;
- rfirstb = firstb;
- rfirst_min = first_min;
- }
-
- return lastb;
-}
-
-template<class RandIt1, class RandIt2, class RandItB, class Compare, class Op>
-RandItB op_buffered_partial_merge_to_range1_and_buffer
- ( RandIt1 first1, RandIt1 const last1
- , RandIt2 &rfirst2, RandIt2 const last2
- , RandItB &rfirstb, Compare comp, Op op )
-{
- RandItB firstb = rfirstb;
- RandItB lastb = firstb;
- RandIt2 first2 = rfirst2;
-
- //Move to buffer while merging
- //Three way moves need less moves when op is swap_op so use it
- //when merging elements from range2 to the destination occupied by range1
- if(first1 != last1 && first2 != last2){
- op(three_way_t(), first2++, first1++, lastb++);
-
- while(true){
- if(first1 == last1){
- break;
- }
- if(first2 == last2){
- lastb = op(forward_t(), first1, last1, firstb);
- break;
- }
- if (comp(*first2, *firstb)) {
- op(three_way_t(), first2++, first1++, lastb++);
- }
- else {
- op(three_way_t(), firstb++, first1++, lastb++);
- }
- }
- rfirst2 = first2;
- rfirstb = firstb;
- }
-
- return lastb;
-}
-
-template<class RandIt, class RandItBuf, class Compare, class Op>
-RandIt op_partial_merge_and_save_impl
- ( RandIt first1, RandIt const last1, RandIt &rfirst2, RandIt last2, RandIt first_min
- , RandItBuf &buf_first1_in_out, RandItBuf &buf_last1_in_out
- , Compare comp, Op op
- )
-{
- RandItBuf buf_first1 = buf_first1_in_out;
- RandItBuf buf_last1 = buf_last1_in_out;
- RandIt first2(rfirst2);
-
- bool const do_swap = first2 != first_min;
- if(buf_first1 == buf_last1){
- //Skip any element that does not need to be moved
- RandIt new_first1 = skip_until_merge(first1, last1, *first_min, comp);
- buf_first1 += (new_first1-first1);
- first1 = new_first1;
- buf_last1 = do_swap ? op_buffered_partial_merge_and_swap_to_range1_and_buffer(first1, last1, first2, last2, first_min, buf_first1, comp, op)
- : op_buffered_partial_merge_to_range1_and_buffer (first1, last1, first2, last2, buf_first1, comp, op);
- first1 = last1;
- }
- else{
- BOOST_ASSERT((last1-first1) == (buf_last1 - buf_first1));
- }
-
- //Now merge from buffer
- first1 = do_swap ? op_partial_merge_and_swap_impl(buf_first1, buf_last1, first2, last2, first_min, first1, comp, op)
- : op_partial_merge_impl (buf_first1, buf_last1, first2, last2, first1, comp, op);
- buf_first1_in_out = buf_first1;
- buf_last1_in_out = buf_last1;
- rfirst2 = first2;
- return first1;
-}
-
-template<class RandIt, class RandItBuf, class Compare, class Op>
-RandIt op_partial_merge_and_save
- ( RandIt first1, RandIt const last1, RandIt &rfirst2, RandIt last2, RandIt first_min
- , RandItBuf &buf_first1_in_out
- , RandItBuf &buf_last1_in_out
- , Compare comp
- , Op op
- , bool is_stable)
-{
- return is_stable
- ? op_partial_merge_and_save_impl
- (first1, last1, rfirst2, last2, first_min, buf_first1_in_out, buf_last1_in_out, comp, op)
- : op_partial_merge_and_save_impl
- (first1, last1, rfirst2, last2, first_min, buf_first1_in_out, buf_last1_in_out, antistable<Compare>(comp), op)
- ;
-}
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// op_merge_blocks_with_irreg
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-
-template<class RandItKeys, class KeyCompare, class RandIt, class RandIt2, class OutputIt, class Compare, class Op>
-OutputIt op_merge_blocks_with_irreg
- ( RandItKeys key_first
- , RandItKeys key_mid
- , KeyCompare key_comp
- , RandIt first_reg
- , RandIt2 &first_irr
- , RandIt2 const last_irr
- , OutputIt dest
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type n_block_left
- , typename iterator_traits<RandIt>::size_type min_check
- , typename iterator_traits<RandIt>::size_type max_check
- , Compare comp, bool const is_stable, Op op)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
-
- for(; n_block_left; --n_block_left, ++key_first, min_check -= min_check != 0, max_check -= max_check != 0){
- size_type next_key_idx = find_next_block(key_first, key_comp, first_reg, l_block, min_check, max_check, comp);
- max_check = min_value(max_value(max_check, next_key_idx+2), n_block_left);
- RandIt const last_reg = first_reg + l_block;
- RandIt first_min = first_reg + next_key_idx*l_block;
- RandIt const last_min = first_min + l_block; (void)last_min;
-
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first_reg, last_reg, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!next_key_idx || is_sorted(first_min, last_min, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT((!next_key_idx || !comp(*first_reg, *first_min )));
-
- OutputIt orig_dest = dest; (void)orig_dest;
- dest = next_key_idx ? op_partial_merge_and_swap(first_irr, last_irr, first_reg, last_reg, first_min, dest, comp, op, is_stable)
- : op_partial_merge (first_irr, last_irr, first_reg, last_reg, dest, comp, op, is_stable);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(orig_dest, dest, comp));
-
- if(first_reg == dest){
- dest = next_key_idx ? ::boost::adl_move_swap_ranges(first_min, last_min, first_reg)
- : last_reg;
- }
- else{
- dest = next_key_idx ? op(three_way_forward_t(), first_reg, last_reg, first_min, dest)
- : op(forward_t(), first_reg, last_reg, dest);
- }
-
- RandItKeys const key_next(key_first + next_key_idx);
- swap_and_update_key(key_next, key_first, key_mid, last_reg, last_reg, first_min);
-
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(orig_dest, dest, comp));
- first_reg = last_reg;
- }
- return dest;
-}
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// op_merge_blocks_left/right
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class Op>
-void op_merge_blocks_left
- ( RandItKeys const key_first
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const l_irreg1
- , typename iterator_traits<RandIt>::size_type const n_block_a
- , typename iterator_traits<RandIt>::size_type const n_block_b
- , typename iterator_traits<RandIt>::size_type const l_irreg2
- , Compare comp, Op op)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const key_count = needed_keys_count(n_block_a, n_block_b); (void)key_count;
-// BOOST_ASSERT(n_block_a || n_block_b);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted_and_unique(key_first, key_first + key_count, key_comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + key_count, key_comp, key_first[n_block_a]));
-
- size_type n_block_b_left = n_block_b;
- size_type n_block_a_left = n_block_a;
- size_type n_block_left = n_block_b + n_block_a;
- RandItKeys key_mid(key_first + n_block_a);
-
- RandIt buffer = first - l_block;
- RandIt first1 = first;
- RandIt last1 = first1 + l_irreg1;
- RandIt first2 = last1;
- RandIt const irreg2 = first2 + n_block_left*l_block;
- bool is_range1_A = true;
-
- RandItKeys key_range2(key_first);
-
- ////////////////////////////////////////////////////////////////////////////
- //Process all regular blocks before the irregular B block
- ////////////////////////////////////////////////////////////////////////////
- size_type min_check = n_block_a == n_block_left ? 0u : n_block_a;
- size_type max_check = min_value(min_check+1, n_block_left);
- for (; n_block_left; --n_block_left, ++key_range2, min_check -= min_check != 0, max_check -= max_check != 0) {
- size_type const next_key_idx = find_next_block(key_range2, key_comp, first2, l_block, min_check, max_check, comp);
- max_check = min_value(max_value(max_check, next_key_idx+2), n_block_left);
- RandIt const first_min = first2 + next_key_idx*l_block;
- RandIt const last_min = first_min + l_block; (void)last_min;
- RandIt const last2 = first2 + l_block;
-
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first1, last1, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first2, last2, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_left || is_sorted(first_min, last_min, comp));
-
- //Check if irregular b block should go here.
- //If so, break to the special code handling the irregular block
- if (!n_block_b_left &&
- ( (l_irreg2 && comp(*irreg2, *first_min)) || (!l_irreg2 && is_range1_A)) ){
- break;
- }
-
- RandItKeys const key_next(key_range2 + next_key_idx);
- bool const is_range2_A = key_mid == (key_first+key_count) || key_comp(*key_next, *key_mid);
-
- bool const is_buffer_middle = last1 == buffer;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT( ( is_buffer_middle && size_type(first2-buffer) == l_block && buffer == last1) ||
- (!is_buffer_middle && size_type(first1-buffer) == l_block && first2 == last1));
-
- if(is_range1_A == is_range2_A){
- BOOST_ASSERT((first1 == last1) || !comp(*first_min, last1[-1]));
- if(!is_buffer_middle){
- buffer = op(forward_t(), first1, last1, buffer);
- }
- swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
- first1 = first2;
- last1 = last2;
- }
- else {
- RandIt unmerged;
- RandIt buf_beg;
- RandIt buf_end;
- if(is_buffer_middle){
- buf_end = buf_beg = first2 - (last1-first1);
- unmerged = op_partial_merge_and_save( first1, last1, first2, last2, first_min
- , buf_beg, buf_end, comp, op, is_range1_A);
- }
- else{
- buf_beg = first1;
- buf_end = last1;
- unmerged = op_partial_merge_and_save
- (buffer, buffer+(last1-first1), first2, last2, first_min, buf_beg, buf_end, comp, op, is_range1_A);
- }
- (void)unmerged;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first-l_block, unmerged, comp));
-
- swap_and_update_key( key_next, key_range2, key_mid, first2, last2
- , last_min - size_type(last2 - first2));
-
- if(buf_beg != buf_end){ //range2 exhausted: is_buffer_middle for the next iteration
- first1 = buf_beg;
- last1 = buf_end;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(buf_end == (last2-l_block));
- buffer = last1;
- }
- else{ //range1 exhausted: !is_buffer_middle for the next iteration
- first1 = first2;
- last1 = last2;
- buffer = first2 - l_block;
- is_range1_A = is_range2_A;
- }
- }
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT( (is_range2_A && n_block_a_left) || (!is_range2_A && n_block_b_left));
- is_range2_A ? --n_block_a_left : --n_block_b_left;
- first2 = last2;
- }
-
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_range2 + n_block_left, key_comp, *key_mid));
- BOOST_ASSERT(!n_block_b_left);
-
- ////////////////////////////////////////////////////////////////////////////
- //Process remaining range 1 left before the irregular B block
- ////////////////////////////////////////////////////////////////////////////
- bool const is_buffer_middle = last1 == buffer;
- RandIt first_irr2 = irreg2;
- RandIt const last_irr2 = first_irr2 + l_irreg2;
- if(l_irreg2 && is_range1_A){
- if(is_buffer_middle){
- first1 = skip_until_merge(first1, last1, *first_irr2, comp);
- //Even if we copy backward, no overlapping occurs so use forward copy
- //that can be faster specially with trivial types
- RandIt const new_first1 = first2 - (last1 - first1);
- op(forward_t(), first1, last1, new_first1);
- first1 = new_first1;
- last1 = first2;
- buffer = first1 - l_block;
- }
- buffer = op_partial_merge_impl(first1, last1, first_irr2, last_irr2, buffer, comp, op);
- buffer = op(forward_t(), first1, last1, buffer);
- }
- else if(!is_buffer_middle){
- buffer = op(forward_t(), first1, last1, buffer);
- }
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first-l_block, buffer, comp));
-
- ////////////////////////////////////////////////////////////////////////////
- //Process irregular B block and remaining A blocks
- ////////////////////////////////////////////////////////////////////////////
- buffer = op_merge_blocks_with_irreg
- ( key_range2, key_mid, key_comp, first2, first_irr2, last_irr2
- , buffer, l_block, n_block_left, min_check, max_check, comp, false, op);
- buffer = op(forward_t(), first_irr2, last_irr2, buffer);(void)buffer;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first-l_block, buffer, comp));
-}
-
-// first - first element to merge.
-// first[-l_block, 0) - buffer (if use_buf == true)
-// l_block - length of regular blocks. First nblocks are stable sorted by 1st elements and key-coded
-// keys - sequence of keys, in same order as blocks. key<midkey means stream A
-// n_bef_irreg2/n_aft_irreg2 are regular blocks
-// l_irreg2 is a irregular block, that is to be combined after n_bef_irreg2 blocks and before n_aft_irreg2 blocks
-// If l_irreg2==0 then n_aft_irreg2==0 (no irregular blocks).
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
-void merge_blocks_left
- ( RandItKeys const key_first
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const l_irreg1
- , typename iterator_traits<RandIt>::size_type const n_block_a
- , typename iterator_traits<RandIt>::size_type const n_block_b
- , typename iterator_traits<RandIt>::size_type const l_irreg2
- , Compare comp
- , bool const xbuf_used)
-{
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + needed_keys_count(n_block_a, n_block_b), key_comp, key_first[n_block_a]));
- if(xbuf_used){
- op_merge_blocks_left
- (key_first, key_comp, first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op());
- }
- else{
- op_merge_blocks_left
- (key_first, key_comp, first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, swap_op());
- }
-}
-
-// first - first element to merge.
-// [first+l_block*(n_bef_irreg2+n_aft_irreg2)+l_irreg2, first+l_block*(n_bef_irreg2+n_aft_irreg2+1)+l_irreg2) - buffer
-// l_block - length of regular blocks. First nblocks are stable sorted by 1st elements and key-coded
-// keys - sequence of keys, in same order as blocks. key<midkey means stream A
-// n_bef_irreg2/n_aft_irreg2 are regular blocks
-// l_irreg2 is a irregular block, that is to be combined after n_bef_irreg2 blocks and before n_aft_irreg2 blocks
-// If l_irreg2==0 then n_aft_irreg2==0 (no irregular blocks).
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
-void merge_blocks_right
- ( RandItKeys const key_first
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const n_block_a
- , typename iterator_traits<RandIt>::size_type const n_block_b
- , typename iterator_traits<RandIt>::size_type const l_irreg2
- , Compare comp
- , bool const xbuf_used)
-{
- merge_blocks_left
- ( (make_reverse_iterator)(key_first + needed_keys_count(n_block_a, n_block_b))
- , inverse<KeyCompare>(key_comp)
- , (make_reverse_iterator)(first + ((n_block_a+n_block_b)*l_block+l_irreg2))
- , l_block
- , l_irreg2
- , n_block_b
- , n_block_a
- , 0
- , inverse<Compare>(comp), xbuf_used);
-}
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// op_merge_blocks_with_buf
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class Op, class RandItBuf>
-void op_merge_blocks_with_buf
- ( RandItKeys key_first
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const l_irreg1
- , typename iterator_traits<RandIt>::size_type const n_block_a
- , typename iterator_traits<RandIt>::size_type const n_block_b
- , typename iterator_traits<RandIt>::size_type const l_irreg2
- , Compare comp
- , Op op
- , RandItBuf const buf_first)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const key_count = needed_keys_count(n_block_a, n_block_b); (void)key_count;
- //BOOST_ASSERT(n_block_a || n_block_b);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted_and_unique(key_first, key_first + key_count, key_comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + key_count, key_comp, key_first[n_block_a]));
-
- size_type n_block_b_left = n_block_b;
- size_type n_block_a_left = n_block_a;
- size_type n_block_left = n_block_b + n_block_a;
- RandItKeys key_mid(key_first + n_block_a);
-
- RandItBuf buffer = buf_first;
- RandItBuf buffer_end = buffer;
- RandIt first1 = first;
- RandIt last1 = first1 + l_irreg1;
- RandIt first2 = last1;
- RandIt const first_irr2 = first2 + n_block_left*l_block;
- bool is_range1_A = true;
-
- RandItKeys key_range2(key_first);
-
- ////////////////////////////////////////////////////////////////////////////
- //Process all regular blocks before the irregular B block
- ////////////////////////////////////////////////////////////////////////////
- size_type min_check = n_block_a == n_block_left ? 0u : n_block_a;
- size_type max_check = min_value(min_check+1, n_block_left);
- for (; n_block_left; --n_block_left, ++key_range2, min_check -= min_check != 0, max_check -= max_check != 0) {
- size_type const next_key_idx = find_next_block(key_range2, key_comp, first2, l_block, min_check, max_check, comp);
- max_check = min_value(max_value(max_check, next_key_idx+2), n_block_left);
- RandIt first_min = first2 + next_key_idx*l_block;
- RandIt const last_min = first_min + l_block; (void)last_min;
- RandIt const last2 = first2 + l_block;
-
- bool const buffer_empty = buffer == buffer_end; (void)buffer_empty;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(buffer_empty ? is_sorted(first1, last1, comp) : is_sorted(buffer, buffer_end, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first2, last2, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_left || is_sorted(first_min, last_min, comp));
-
- //Check if irregular b block should go here.
- //If so, break to the special code handling the irregular block
- if (!n_block_b_left &&
- ( (l_irreg2 && comp(*first_irr2, *first_min)) || (!l_irreg2 && is_range1_A)) ){
- break;
- }
-
- RandItKeys const key_next(key_range2 + next_key_idx);
- bool const is_range2_A = key_mid == (key_first+key_count) || key_comp(*key_next, *key_mid);
-
- if(is_range1_A == is_range2_A){
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT((first1 == last1) || (buffer_empty ? !comp(*first_min, last1[-1]) : !comp(*first_min, buffer_end[-1])));
- //If buffered, put those elements in place
- RandIt res = op(forward_t(), buffer, buffer_end, first1);
- buffer = buffer_end = buf_first;
- BOOST_ASSERT(buffer_empty || res == last1); (void)res;
- swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first2, last2, comp));
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first_min, last_min, comp));
- first1 = first2;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first, first1, comp));
- }
- else {
- RandIt const unmerged = op_partial_merge_and_save(first1, last1, first2, last2, first_min, buffer, buffer_end, comp, op, is_range1_A);
- bool const is_range_1_empty = buffer == buffer_end;
- BOOST_ASSERT(is_range_1_empty || (buffer_end-buffer) == (last1+l_block-unmerged));
- if(is_range_1_empty){
- buffer = buffer_end = buf_first;
- first_min = last_min - (last2 - first2);
- }
- else{
- first_min = last_min;
- }
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!is_range_1_empty || (last_min-first_min) == (last2-unmerged));
- swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
-
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first_min, last_min, comp));
- is_range1_A ^= is_range_1_empty;
- first1 = unmerged;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first, unmerged, comp));
- }
- BOOST_ASSERT( (is_range2_A && n_block_a_left) || (!is_range2_A && n_block_b_left));
- is_range2_A ? --n_block_a_left : --n_block_b_left;
- last1 += l_block;
- first2 = last2;
- }
-
- RandIt res = op(forward_t(), buffer, buffer_end, first1); (void)res;
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first, res, comp));
-
- ////////////////////////////////////////////////////////////////////////////
- //Process irregular B block and remaining A blocks
- ////////////////////////////////////////////////////////////////////////////
- RandIt const last_irr2 = first_irr2 + l_irreg2;
- op(forward_t(), first_irr2, first_irr2+l_irreg2, buf_first);
- buffer = buf_first;
- buffer_end = buffer+l_irreg2;
-
- reverse_iterator<RandItBuf> rbuf_beg(buffer_end);
- RandIt dest = op_merge_blocks_with_irreg
- ((make_reverse_iterator)(key_first + n_block_b + n_block_a), (make_reverse_iterator)(key_mid), inverse<KeyCompare>(key_comp)
- , (make_reverse_iterator)(first_irr2), rbuf_beg
- , (make_reverse_iterator)(buffer), (make_reverse_iterator)(last_irr2)
- , l_block, n_block_left, 0, n_block_left
- , inverse<Compare>(comp), true, op).base();
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(dest, last_irr2, comp));
-
- buffer_end = rbuf_beg.base();
- BOOST_ASSERT((dest-last1) == (buffer_end-buffer));
- op_merge_with_left_placed(is_range1_A ? first1 : last1, last1, dest, buffer, buffer_end, comp, op);
-
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(first, last_irr2, comp));
-}
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// op_insertion_sort_step_left/right
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-
-template<class RandIt, class Compare, class Op>
-typename iterator_traits<RandIt>::size_type
- op_insertion_sort_step_left
- ( RandIt const first
- , typename iterator_traits<RandIt>::size_type const length
- , typename iterator_traits<RandIt>::size_type const step
- , Compare comp, Op op)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const s = min_value<size_type>(step, AdaptiveSortInsertionSortThreshold);
- size_type m = 0;
-
- while((length - m) > s){
- insertion_sort_op(first+m, first+m+s, first+m-s, comp, op);
- m += s;
- }
- insertion_sort_op(first+m, first+length, first+m-s, comp, op);
- return s;
-}
-
-template<class RandIt, class Compare, class Op>
-void op_merge_right_step_once
- ( RandIt first_block
- , typename iterator_traits<RandIt>::size_type const elements_in_blocks
- , typename iterator_traits<RandIt>::size_type const l_build_buf
- , Compare comp
- , Op op)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type restk = elements_in_blocks%(2*l_build_buf);
- size_type p = elements_in_blocks - restk;
- BOOST_ASSERT(0 == (p%(2*l_build_buf)));
-
- if(restk <= l_build_buf){
- op(backward_t(),first_block+p, first_block+p+restk, first_block+p+restk+l_build_buf);
- }
- else{
- op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+restk, first_block+p+restk+l_build_buf, comp, op);
- }
- while(p>0){
- p -= 2*l_build_buf;
- op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+2*l_build_buf, first_block+p+3*l_build_buf, comp, op);
- }
-}
-
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// insertion_sort_step
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-template<class RandIt, class Compare>
-typename iterator_traits<RandIt>::size_type
- insertion_sort_step
- ( RandIt const first
- , typename iterator_traits<RandIt>::size_type const length
- , typename iterator_traits<RandIt>::size_type const step
- , Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const s = min_value<size_type>(step, AdaptiveSortInsertionSortThreshold);
- size_type m = 0;
-
- while((length - m) > s){
- insertion_sort(first+m, first+m+s, comp);
- m += s;
- }
- insertion_sort(first+m, first+length, comp);
- return s;
-}
-
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-//
-// op_merge_left_step_multiple
-//
-//////////////////////////////////
-//////////////////////////////////
-//////////////////////////////////
-template<class RandIt, class Compare, class Op>
-typename iterator_traits<RandIt>::size_type
- op_merge_left_step_multiple
- ( RandIt first_block
- , typename iterator_traits<RandIt>::size_type const elements_in_blocks
- , typename iterator_traits<RandIt>::size_type l_merged
- , typename iterator_traits<RandIt>::size_type const l_build_buf
- , typename iterator_traits<RandIt>::size_type l_left_space
- , Compare comp
- , Op op)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- for(; l_merged < l_build_buf && l_left_space >= l_merged; l_merged*=2){
- size_type p0=0;
- RandIt pos = first_block;
- while((elements_in_blocks - p0) > 2*l_merged) {
- op_merge_left(pos-l_merged, pos, pos+l_merged, pos+2*l_merged, comp, op);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(pos-l_merged, pos+l_merged, comp));
- p0 += 2*l_merged;
- pos = first_block+p0;
- }
- if((elements_in_blocks-p0) > l_merged) {
- op_merge_left(pos-l_merged, pos, pos+l_merged, first_block+elements_in_blocks, comp, op);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(pos-l_merged, pos-l_merged+(first_block+elements_in_blocks-pos), comp));
- }
- else {
- op(forward_t(), pos, first_block+elements_in_blocks, pos-l_merged);
- BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(is_sorted(pos-l_merged, first_block+elements_in_blocks-l_merged, comp));
- }
- first_block -= l_merged;
- l_left_space -= l_merged;
- }
- return l_merged;
-}
-
-
-} //namespace detail_adaptive {
-} //namespace movelib {
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#define BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp
deleted file mode 100644
index 860773579c7..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp
+++ /dev/null
@@ -1,553 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_MOVE_MERGE_HPP
-#define BOOST_MOVE_MERGE_HPP
-
-#include <boost/move/algo/move.hpp>
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/algo/detail/basic_op.hpp>
-#include <boost/move/detail/iterator_traits.hpp>
-#include <boost/move/detail/destruct_n.hpp>
-#include <boost/move/algo/predicate.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/assert.hpp>
-
-namespace boost {
-namespace movelib {
-
-// @cond
-
-/*
-template<typename Unsigned>
-inline Unsigned gcd(Unsigned x, Unsigned y)
-{
- if(0 == ((x &(x-1)) | (y & (y-1)))){
- return x < y ? x : y;
- }
- else{
- do
- {
- Unsigned t = x % y;
- x = y;
- y = t;
- } while (y);
- return x;
- }
-}
-*/
-
-//Modified version from "An Optimal In-Place Array Rotation Algorithm", Ching-Kuang Shene
-template<typename Unsigned>
-Unsigned gcd(Unsigned x, Unsigned y)
-{
- if(0 == ((x &(x-1)) | (y & (y-1)))){
- return x < y ? x : y;
- }
- else{
- Unsigned z = 1;
- while((!(x&1)) & (!(y&1))){
- z <<=1, x>>=1, y>>=1;
- }
- while(x && y){
- if(!(x&1))
- x >>=1;
- else if(!(y&1))
- y >>=1;
- else if(x >=y)
- x = (x-y) >> 1;
- else
- y = (y-x) >> 1;
- }
- return z*(x+y);
- }
-}
-
-template<typename RandIt>
-RandIt rotate_gcd(RandIt first, RandIt middle, RandIt last)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- typedef typename iterator_traits<RandIt>::value_type value_type;
-
- if(first == middle)
- return last;
- if(middle == last)
- return first;
- const size_type middle_pos = size_type(middle - first);
- RandIt ret = last - middle_pos;
- if (middle == ret){
- boost::adl_move_swap_ranges(first, middle, middle);
- }
- else{
- const size_type length = size_type(last - first);
- for( RandIt it_i(first), it_gcd(it_i + gcd(length, middle_pos))
- ; it_i != it_gcd
- ; ++it_i){
- value_type temp(boost::move(*it_i));
- RandIt it_j = it_i;
- RandIt it_k = it_j+middle_pos;
- do{
- *it_j = boost::move(*it_k);
- it_j = it_k;
- size_type const left = size_type(last - it_j);
- it_k = left > middle_pos ? it_j + middle_pos : first + (middle_pos - left);
- } while(it_k != it_i);
- *it_j = boost::move(temp);
- }
- }
- return ret;
-}
-
-template <class RandIt, class T, class Compare>
-RandIt lower_bound
- (RandIt first, const RandIt last, const T& key, Compare comp)
-{
- typedef typename iterator_traits
- <RandIt>::size_type size_type;
- size_type len = size_type(last - first);
- RandIt middle;
-
- while (len) {
- size_type step = len >> 1;
- middle = first;
- middle += step;
-
- if (comp(*middle, key)) {
- first = ++middle;
- len -= step + 1;
- }
- else{
- len = step;
- }
- }
- return first;
-}
-
-template <class RandIt, class T, class Compare>
-RandIt upper_bound
- (RandIt first, const RandIt last, const T& key, Compare comp)
-{
- typedef typename iterator_traits
- <RandIt>::size_type size_type;
- size_type len = size_type(last - first);
- RandIt middle;
-
- while (len) {
- size_type step = len >> 1;
- middle = first;
- middle += step;
-
- if (!comp(key, *middle)) {
- first = ++middle;
- len -= step + 1;
- }
- else{
- len = step;
- }
- }
- return first;
-}
-
-
-template<class RandIt, class Compare, class Op>
-void op_merge_left( RandIt buf_first
- , RandIt first1
- , RandIt const last1
- , RandIt const last2
- , Compare comp
- , Op op)
-{
- for(RandIt first2=last1; first2 != last2; ++buf_first){
- if(first1 == last1){
- op(forward_t(), first2, last2, buf_first);
- return;
- }
- else if(comp(*first2, *first1)){
- op(first2, buf_first);
- ++first2;
- }
- else{
- op(first1, buf_first);
- ++first1;
- }
- }
- if(buf_first != first1){//In case all remaining elements are in the same place
- //(e.g. buffer is exactly the size of the second half
- //and all elements from the second half are less)
- op(forward_t(), first1, last1, buf_first);
- }
-}
-
-// [buf_first, first1) -> buffer
-// [first1, last1) merge [last1,last2) -> [buf_first,buf_first+(last2-first1))
-// Elements from buffer are moved to [last2 - (first1-buf_first), last2)
-// Note: distance(buf_first, first1) >= distance(last1, last2), so no overlapping occurs
-template<class RandIt, class Compare>
-void merge_left
- (RandIt buf_first, RandIt first1, RandIt const last1, RandIt const last2, Compare comp)
-{
- op_merge_left(buf_first, first1, last1, last2, comp, move_op());
-}
-
-// [buf_first, first1) -> buffer
-// [first1, last1) merge [last1,last2) -> [buf_first,buf_first+(last2-first1))
-// Elements from buffer are swapped to [last2 - (first1-buf_first), last2)
-// Note: distance(buf_first, first1) >= distance(last1, last2), so no overlapping occurs
-template<class RandIt, class Compare>
-void swap_merge_left
- (RandIt buf_first, RandIt first1, RandIt const last1, RandIt const last2, Compare comp)
-{
- op_merge_left(buf_first, first1, last1, last2, comp, swap_op());
-}
-
-template<class RandIt, class Compare, class Op>
-void op_merge_right
- (RandIt const first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp, Op op)
-{
- RandIt const first2 = last1;
- while(first1 != last1){
- if(last2 == first2){
- op(backward_t(), first1, last1, buf_last);
- return;
- }
- --last2;
- --last1;
- --buf_last;
- if(comp(*last2, *last1)){
- op(last1, buf_last);
- ++last2;
- }
- else{
- op(last2, buf_last);
- ++last1;
- }
- }
- if(last2 != buf_last){ //In case all remaining elements are in the same place
- //(e.g. buffer is exactly the size of the first half
- //and all elements from the second half are less)
- op(backward_t(), first2, last2, buf_last);
- }
-}
-
-// [last2, buf_last) - buffer
-// [first1, last1) merge [last1,last2) -> [first1+(buf_last-last2), buf_last)
-// Note: distance[last2, buf_last) >= distance[first1, last1), so no overlapping occurs
-template<class RandIt, class Compare>
-void merge_right
- (RandIt first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp)
-{
- op_merge_right(first1, last1, last2, buf_last, comp, move_op());
-}
-
-// [last2, buf_last) - buffer
-// [first1, last1) merge [last1,last2) -> [first1+(buf_last-last2), buf_last)
-// Note: distance[last2, buf_last) >= distance[first1, last1), so no overlapping occurs
-template<class RandIt, class Compare>
-void swap_merge_right
- (RandIt first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp)
-{
- op_merge_right(first1, last1, last2, buf_last, comp, swap_op());
-}
-
-//Complexity: min(len1,len2)^2 + max(len1,len2)
-template<class RandIt, class Compare>
-void merge_bufferless_ON2(RandIt first, RandIt middle, RandIt last, Compare comp)
-{
- if((middle - first) < (last - middle)){
- while(first != middle){
- RandIt const old_last1 = middle;
- middle = boost::movelib::lower_bound(middle, last, *first, comp);
- first = rotate_gcd(first, old_last1, middle);
- if(middle == last){
- break;
- }
- do{
- ++first;
- } while(first != middle && !comp(*middle, *first));
- }
- }
- else{
- while(middle != last){
- RandIt p = boost::movelib::upper_bound(first, middle, last[-1], comp);
- last = rotate_gcd(p, middle, last);
- middle = p;
- if(middle == first){
- break;
- }
- --p;
- do{
- --last;
- } while(middle != last && !comp(last[-1], *p));
- }
- }
-}
-
-static const std::size_t MergeBufferlessONLogNRotationThreshold = 32;
-
-template <class RandIt, class Distance, class Compare>
-void merge_bufferless_ONlogN_recursive
- (RandIt first, RandIt middle, RandIt last, Distance len1, Distance len2, Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
-
- while(1) {
- //trivial cases
- if (!len2) {
- return;
- }
- else if (!len1) {
- return;
- }
- else if (size_type(len1 | len2) == 1u) {
- if (comp(*middle, *first))
- adl_move_swap(*first, *middle);
- return;
- }
- else if(size_type(len1+len2) < MergeBufferlessONLogNRotationThreshold){
- merge_bufferless_ON2(first, middle, last, comp);
- return;
- }
-
- RandIt first_cut = first;
- RandIt second_cut = middle;
- Distance len11 = 0;
- Distance len22 = 0;
- if (len1 > len2) {
- len11 = len1 / 2;
- first_cut += len11;
- second_cut = boost::movelib::lower_bound(middle, last, *first_cut, comp);
- len22 = size_type(second_cut - middle);
- }
- else {
- len22 = len2 / 2;
- second_cut += len22;
- first_cut = boost::movelib::upper_bound(first, middle, *second_cut, comp);
- len11 = size_type(first_cut - first);
- }
- RandIt new_middle = rotate_gcd(first_cut, middle, second_cut);
-
- //Avoid one recursive call doing a manual tail call elimination on the biggest range
- const Distance len_internal = len11+len22;
- if( len_internal < (len1 + len2 - len_internal) ) {
- merge_bufferless_ONlogN_recursive(first, first_cut, new_middle, len11, len22, comp);
- first = new_middle;
- middle = second_cut;
- len1 -= len11;
- len2 -= len22;
- }
- else {
- merge_bufferless_ONlogN_recursive(new_middle, second_cut, last, len1 - len11, len2 - len22, comp);
- middle = first_cut;
- last = new_middle;
- len1 = len11;
- len2 = len22;
- }
- }
-}
-
-//Complexity: NlogN
-template<class RandIt, class Compare>
-void merge_bufferless_ONlogN(RandIt first, RandIt middle, RandIt last, Compare comp)
-{
- merge_bufferless_ONlogN_recursive
- (first, middle, last, middle - first, last - middle, comp);
-}
-
-template<class RandIt, class Compare>
-void merge_bufferless(RandIt first, RandIt middle, RandIt last, Compare comp)
-{
- #define BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
- #ifdef BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
- merge_bufferless_ONlogN(first, middle, last, comp);
- #else
- merge_bufferless_ON2(first, middle, last, comp);
- #endif //BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
-}
-
-// [r_first, r_last) are already in the right part of the destination range.
-template <class Compare, class InputIterator, class InputOutIterator, class Op>
-void op_merge_with_right_placed
- ( InputIterator first, InputIterator last
- , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
- , Compare comp, Op op)
-{
- BOOST_ASSERT((last - first) == (r_first - dest_first));
- while ( first != last ) {
- if (r_first == r_last) {
- InputOutIterator end = op(forward_t(), first, last, dest_first);
- BOOST_ASSERT(end == r_last);
- (void)end;
- return;
- }
- else if (comp(*r_first, *first)) {
- op(r_first, dest_first);
- ++r_first;
- }
- else {
- op(first, dest_first);
- ++first;
- }
- ++dest_first;
- }
- // Remaining [r_first, r_last) already in the correct place
-}
-
-template <class Compare, class InputIterator, class InputOutIterator>
-void swap_merge_with_right_placed
- ( InputIterator first, InputIterator last
- , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
- , Compare comp)
-{
- op_merge_with_right_placed(first, last, dest_first, r_first, r_last, comp, swap_op());
-}
-
-// [first, last) are already in the right part of the destination range.
-template <class Compare, class Op, class BidirIterator, class BidirOutIterator>
-void op_merge_with_left_placed
- ( BidirOutIterator const first, BidirOutIterator last, BidirOutIterator dest_last
- , BidirIterator const r_first, BidirIterator r_last
- , Compare comp, Op op)
-{
- BOOST_ASSERT((dest_last - last) == (r_last - r_first));
- while( r_first != r_last ) {
- if(first == last) {
- BidirOutIterator res = op(backward_t(), r_first, r_last, dest_last);
- BOOST_ASSERT(last == res);
- (void)res;
- return;
- }
- --r_last;
- --last;
- if(comp(*r_last, *last)){
- ++r_last;
- --dest_last;
- op(last, dest_last);
- }
- else{
- ++last;
- --dest_last;
- op(r_last, dest_last);
- }
- }
- // Remaining [first, last) already in the correct place
-}
-
-// @endcond
-
-// [irst, last) are already in the right part of the destination range.
-template <class Compare, class BidirIterator, class BidirOutIterator>
-void merge_with_left_placed
- ( BidirOutIterator const first, BidirOutIterator last, BidirOutIterator dest_last
- , BidirIterator const r_first, BidirIterator r_last
- , Compare comp)
-{
- op_merge_with_left_placed(first, last, dest_last, r_first, r_last, comp, move_op());
-}
-
-// [r_first, r_last) are already in the right part of the destination range.
-template <class Compare, class InputIterator, class InputOutIterator>
-void merge_with_right_placed
- ( InputIterator first, InputIterator last
- , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
- , Compare comp)
-{
- op_merge_with_right_placed(first, last, dest_first, r_first, r_last, comp, move_op());
-}
-
-// [r_first, r_last) are already in the right part of the destination range.
-// [dest_first, r_first) is uninitialized memory
-template <class Compare, class InputIterator, class InputOutIterator>
-void uninitialized_merge_with_right_placed
- ( InputIterator first, InputIterator last
- , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
- , Compare comp)
-{
- BOOST_ASSERT((last - first) == (r_first - dest_first));
- typedef typename iterator_traits<InputOutIterator>::value_type value_type;
- InputOutIterator const original_r_first = r_first;
-
- destruct_n<value_type, InputOutIterator> d(dest_first);
-
- while ( first != last && dest_first != original_r_first ) {
- if (r_first == r_last) {
- for(; dest_first != original_r_first; ++dest_first, ++first){
- ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*first));
- d.incr();
- }
- d.release();
- InputOutIterator end = ::boost::move(first, last, original_r_first);
- BOOST_ASSERT(end == r_last);
- (void)end;
- return;
- }
- else if (comp(*r_first, *first)) {
- ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*r_first));
- d.incr();
- ++r_first;
- }
- else {
- ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*first));
- d.incr();
- ++first;
- }
- ++dest_first;
- }
- d.release();
- merge_with_right_placed(first, last, original_r_first, r_first, r_last, comp);
-}
-
-/*
-// [r_first, r_last) are already in the right part of the destination range.
-// [dest_first, r_first) is uninitialized memory
-template <class Compare, class BidirOutIterator, class BidirIterator>
-void uninitialized_merge_with_left_placed
- ( BidirOutIterator dest_first, BidirOutIterator r_first, BidirOutIterator r_last
- , BidirIterator first, BidirIterator last
- , Compare comp)
-{
- BOOST_ASSERT((last - first) == (r_last - r_first));
- typedef typename iterator_traits<BidirOutIterator>::value_type value_type;
- BidirOutIterator const original_r_last = r_last;
-
- destruct_n<value_type> d(&*dest_last);
-
- while ( first != last && dest_first != original_r_first ) {
- if (r_first == r_last) {
- for(; dest_first != original_r_first; ++dest_first, ++first){
- ::new(&*dest_first) value_type(::boost::move(*first));
- d.incr();
- }
- d.release();
- BidirOutIterator end = ::boost::move(first, last, original_r_first);
- BOOST_ASSERT(end == r_last);
- (void)end;
- return;
- }
- else if (comp(*r_first, *first)) {
- ::new(&*dest_first) value_type(::boost::move(*r_first));
- d.incr();
- ++r_first;
- }
- else {
- ::new(&*dest_first) value_type(::boost::move(*first));
- d.incr();
- ++first;
- }
- ++dest_first;
- }
- d.release();
- merge_with_right_placed(first, last, original_r_first, r_first, r_last, comp);
-}
-*/
-
-} //namespace movelib {
-} //namespace boost {
-
-#endif //#define BOOST_MOVE_MERGE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp
deleted file mode 100644
index 62d185acb63..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp
+++ /dev/null
@@ -1,139 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! \file
-
-#ifndef BOOST_MOVE_DETAIL_MERGE_SORT_HPP
-#define BOOST_MOVE_DETAIL_MERGE_SORT_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>
-
-#include <boost/move/utility_core.hpp>
-#include <boost/move/algo/move.hpp>
-#include <boost/move/algo/detail/merge.hpp>
-#include <boost/move/detail/iterator_traits.hpp>
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/detail/destruct_n.hpp>
-#include <boost/move/algo/detail/insertion_sort.hpp>
-#include <cassert>
-
-namespace boost {
-namespace movelib {
-
-// @cond
-
-static const unsigned MergeSortInsertionSortThreshold = 16;
-
-template <class RandIt, class Compare>
-void inplace_stable_sort(RandIt first, RandIt last, Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- if (size_type(last - first) <= size_type(MergeSortInsertionSortThreshold)) {
- insertion_sort(first, last, comp);
- return;
- }
- RandIt middle = first + (last - first) / 2;
- inplace_stable_sort(first, middle, comp);
- inplace_stable_sort(middle, last, comp);
- merge_bufferless_ONlogN_recursive
- (first, middle, last, size_type(middle - first), size_type(last - middle), comp);
-}
-
-// @endcond
-
-template<class RandIt, class RandIt2, class Compare>
-void merge_sort_copy( RandIt first, RandIt last
- , RandIt2 dest, Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
-
- size_type const count = size_type(last - first);
- if(count <= MergeSortInsertionSortThreshold){
- insertion_sort_copy(first, last, dest, comp);
- }
- else{
- size_type const half = count/2;
- merge_sort_copy(first + half, last , dest+half , comp);
- merge_sort_copy(first , first + half, first + half, comp);
- merge_with_right_placed
- ( first + half, first + half + half
- , dest, dest+half, dest + count
- , comp);
- }
-}
-
-template<class RandIt, class RandItRaw, class Compare>
-void merge_sort_uninitialized_copy( RandIt first, RandIt last
- , RandItRaw uninitialized
- , Compare comp)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- typedef typename iterator_traits<RandIt>::value_type value_type;
-
- size_type const count = size_type(last - first);
- if(count <= MergeSortInsertionSortThreshold){
- insertion_sort_uninitialized_copy(first, last, uninitialized, comp);
- }
- else{
- size_type const half = count/2;
- merge_sort_uninitialized_copy(first + half, last, uninitialized + half, comp);
- destruct_n<value_type, RandItRaw> d(uninitialized+half);
- d.incr(count-half);
- merge_sort_copy(first, first + half, first + half, comp);
- uninitialized_merge_with_right_placed
- ( first + half, first + half + half
- , uninitialized, uninitialized+half, uninitialized+count
- , comp);
- d.release();
- }
-}
-
-template<class RandIt, class RandItRaw, class Compare>
-void merge_sort( RandIt first, RandIt last, Compare comp
- , RandItRaw uninitialized)
-{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- typedef typename iterator_traits<RandIt>::value_type value_type;
-
- size_type const count = size_type(last - first);
- if(count <= MergeSortInsertionSortThreshold){
- insertion_sort(first, last, comp);
- }
- else{
- size_type const half = count/2;
- size_type const rest = count - half;
- RandIt const half_it = first + half;
- RandIt const rest_it = first + rest;
-
- merge_sort_uninitialized_copy(half_it, last, uninitialized, comp);
- destruct_n<value_type, RandItRaw> d(uninitialized);
- d.incr(rest);
- merge_sort_copy(first, half_it, rest_it, comp);
- merge_with_right_placed
- ( uninitialized, uninitialized + rest
- , first, rest_it, last, antistable<Compare>(comp));
- }
-}
-
-}} //namespace boost { namespace movelib{
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_MOVE_DETAIL_MERGE_SORT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp b/src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp
deleted file mode 100644
index 0287d663184..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 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)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_MOVE_ALGO_PREDICATE_HPP
-#define BOOST_MOVE_ALGO_PREDICATE_HPP
-
-#include <boost/move/algo/move.hpp>
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/algo/detail/basic_op.hpp>
-#include <boost/move/detail/iterator_traits.hpp>
-#include <boost/move/detail/destruct_n.hpp>
-#include <boost/assert.hpp>
-
-namespace boost {
-namespace movelib {
-
-template<class Comp>
-struct antistable
-{
- explicit antistable(Comp &comp)
- : m_comp(comp)
- {}
-
- template<class U, class V>
- bool operator()(const U &u, const V & v)
- { return !m_comp(v, u); }
-
- private:
- antistable & operator=(const antistable &);
- Comp &m_comp;
-};
-
-template <class Comp>
-class negate
-{
- public:
- negate()
- {}
-
- explicit negate(Comp comp)
- : m_comp(comp)
- {}
-
- template <class T1, class T2>
- bool operator()(const T1& l, const T2& r)
- {
- return !m_comp(l, r);
- }
-
- private:
- Comp m_comp;
-};
-
-
-template <class Comp>
-class inverse
-{
- public:
- inverse()
- {}
-
- explicit inverse(Comp comp)
- : m_comp(comp)
- {}
-
- template <class T1, class T2>
- bool operator()(const T1& l, const T2& r)
- {
- return m_comp(r, l);
- }
-
- private:
- Comp m_comp;
-};
-
-} //namespace movelib {
-} //namespace boost {
-
-#endif //#define BOOST_MOVE_ALGO_PREDICATE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp b/src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp
deleted file mode 100644
index 40dbb6efc3d..00000000000
--- a/src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp
+++ /dev/null
@@ -1,132 +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/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! \file
-
-#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
-#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-//Small meta-typetraits to support move
-
-namespace boost {
-namespace move_detail {
-
-//////////////////////////////////////
-// if_c
-//////////////////////////////////////
-template<bool C, typename T1, typename T2>
-struct if_c
-{
- typedef T1 type;
-};
-
-template<typename T1, typename T2>
-struct if_c<false,T1,T2>
-{
- typedef T2 type;
-};
-
-//////////////////////////////////////
-// if_
-//////////////////////////////////////
-template<typename T1, typename T2, typename T3>
-struct if_ : if_c<0 != T1::value, T2, T3>
-{};
-
-//////////////////////////////////////
-// enable_if_c
-//////////////////////////////////////
-template <bool B, class T = void>
-struct enable_if_c
-{
- typedef T type;
-};
-
-template <class T>
-struct enable_if_c<false, T> {};
-
-//////////////////////////////////////
-// enable_if
-//////////////////////////////////////
-template <class Cond, class T = void>
-struct enable_if : enable_if_c<Cond::value, T> {};
-
-//////////////////////////////////////
-// disable_if_c
-//////////////////////////////////////
-template <bool B, class T = void>
-struct disable_if_c
- : enable_if_c<!B, T>
-{};
-
-//////////////////////////////////////
-// disable_if
-//////////////////////////////////////
-template <class Cond, class T = void>
-struct disable_if : enable_if_c<!Cond::value, T> {};
-
-//////////////////////////////////////
-// integral_constant
-//////////////////////////////////////
-template<class T, T v>
-struct integral_constant
-{
- static const T value = v;
- typedef T value_type;
- typedef integral_constant<T, v> type;
-
- operator T() const { return value; }
- T operator()() const { return value; }
-};
-
-typedef integral_constant<bool, true > true_type;
-typedef integral_constant<bool, false > false_type;
-
-
-//////////////////////////////////////
-// is_same
-//////////////////////////////////////
-template<class T, class U>
-struct is_same
-{
- static const bool value = false;
-};
-
-template<class T>
-struct is_same<T, T>
-{
- static const bool value = true;
-};
-
-//////////////////////////////////////
-// enable_if_same
-//////////////////////////////////////
-template <class T, class U, class R = void>
-struct enable_if_same : enable_if<is_same<T, U>, R> {};
-
-//////////////////////////////////////
-// disable_if_same
-//////////////////////////////////////
-template <class T, class U, class R = void>
-struct disable_if_same : disable_if<is_same<T, U>, R> {};
-
-} //namespace move_detail {
-} //namespace boost {
-
-#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp
deleted file mode 100644
index 911f810f8fa..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/* 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_DETAIL_AUTO_SPACE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_AUTO_SPACE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/adl_swap.hpp>
-#include <boost/noncopyable.hpp>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* auto_space provides uninitialized space suitably to store
- * a given number of elements of a given type.
- */
-
-/* NB: it is not clear whether using an allocator to handle
- * zero-sized arrays of elements is conformant or not. GCC 3.3.1
- * and prior fail here, other stdlibs handle the issue gracefully.
- * To be on the safe side, the case n==0 is given special treatment.
- * References:
- * GCC Bugzilla, "standard allocator crashes when deallocating segment
- * "of zero length", http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14176
- * C++ Standard Library Defect Report List (Revision 28), issue 199
- * "What does allocate(0) return?",
- * http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199
- */
-
-template<typename T,typename Allocator=std::allocator<T> >
-struct auto_space:private noncopyable
-{
- typedef typename boost::detail::allocator::rebind_to<
- Allocator,T
- >::type allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator::pointer pointer;
-#else
- typedef std::allocator_traits<allocator> traits;
- typedef typename traits::pointer pointer;
-#endif
-
- explicit auto_space(const Allocator& al=Allocator(),std::size_t n=1):
- al_(al),n_(n),
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- data_(n_?al_.allocate(n_):pointer(0))
-#else
- data_(n_?traits::allocate(al_,n_):pointer(0))
-#endif
- {}
-
- ~auto_space()
- {
- if(n_)
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- al_.deallocate(data_,n_);
-#else
- traits::deallocate(al_,data_,n_);
-#endif
- }
-
- Allocator get_allocator()const{return al_;}
-
- pointer data()const{return data_;}
-
- void swap(auto_space& x)
- {
- if(al_!=x.al_)adl_swap(al_,x.al_);
- std::swap(n_,x.n_);
- std::swap(data_,x.data_);
- }
-
-private:
- allocator al_;
- std::size_t n_;
- pointer data_;
-};
-
-template<typename T,typename Allocator>
-void swap(auto_space<T,Allocator>& x,auto_space<T,Allocator>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 9be5ec84b43..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/bidir_node_iterator.hpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Copyright 2003-2014 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_DETAIL_BIDIR_NODE_ITERATOR_HPP
-#define BOOST_MULTI_INDEX_DETAIL_BIDIR_NODE_ITERATOR_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/operators.hpp>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Iterator class for node-based indices with bidirectional
- * iterators (ordered and sequenced indices.)
- */
-
-template<typename Node>
-class bidir_node_iterator:
- public bidirectional_iterator_helper<
- bidir_node_iterator<Node>,
- typename Node::value_type,
- std::ptrdiff_t,
- const typename Node::value_type*,
- const typename Node::value_type&>
-{
-public:
- /* coverity[uninit_ctor]: suppress warning */
- bidir_node_iterator(){}
- explicit bidir_node_iterator(Node* node_):node(node_){}
-
- const typename Node::value_type& operator*()const
- {
- return node->value();
- }
-
- bidir_node_iterator& operator++()
- {
- Node::increment(node);
- return *this;
- }
-
- bidir_node_iterator& operator--()
- {
- Node::decrement(node);
- return *this;
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* Serialization. As for why the following is public,
- * see explanation in safe_mode_iterator notes in safe_mode.hpp.
- */
-
- BOOST_SERIALIZATION_SPLIT_MEMBER()
-
- typedef typename Node::base_type node_base_type;
-
- template<class Archive>
- void save(Archive& ar,const unsigned int)const
- {
- node_base_type* bnode=node;
- ar<<serialization::make_nvp("pointer",bnode);
- }
-
- template<class Archive>
- void load(Archive& ar,const unsigned int)
- {
- node_base_type* bnode;
- ar>>serialization::make_nvp("pointer",bnode);
- node=static_cast<Node*>(bnode);
- }
-#endif
-
- /* get_node is not to be used by the user */
-
- typedef Node node_type;
-
- Node* get_node()const{return node;}
-
-private:
- Node* node;
-};
-
-template<typename Node>
-bool operator==(
- const bidir_node_iterator<Node>& x,
- const bidir_node_iterator<Node>& y)
-{
- return x.get_node()==y.get_node();
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp
deleted file mode 100644
index d9fa434d9a9..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Copyright 2003-2015 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_DETAIL_BUCKET_ARRAY_HPP
-#define BOOST_MULTI_INDEX_DETAIL_BUCKET_ARRAY_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/hash_index_node.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/seq/elem.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <cstddef>
-#include <limits.h>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/archive/archive_exception.hpp>
-#include <boost/serialization/access.hpp>
-#include <boost/throw_exception.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* bucket structure for use by hashed indices */
-
-#define BOOST_MULTI_INDEX_BA_SIZES_32BIT \
-(53ul)(97ul)(193ul)(389ul)(769ul) \
-(1543ul)(3079ul)(6151ul)(12289ul)(24593ul) \
-(49157ul)(98317ul)(196613ul)(393241ul)(786433ul) \
-(1572869ul)(3145739ul)(6291469ul)(12582917ul)(25165843ul) \
-(50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \
-(1610612741ul)(3221225473ul)
-
-#if ((((ULONG_MAX>>16)>>16)>>16)>>15)==0 /* unsigned long less than 64 bits */
-#define BOOST_MULTI_INDEX_BA_SIZES \
-BOOST_MULTI_INDEX_BA_SIZES_32BIT \
-(4294967291ul)
-#else
- /* obtained with aid from
- * http://javaboutique.internet.com/prime_numb/
- * http://www.rsok.com/~jrm/next_ten_primes.html
- * and verified with
- * http://www.alpertron.com.ar/ECM.HTM
- */
-
-#define BOOST_MULTI_INDEX_BA_SIZES \
-BOOST_MULTI_INDEX_BA_SIZES_32BIT \
-(6442450939ul)(12884901893ul)(25769803751ul)(51539607551ul) \
-(103079215111ul)(206158430209ul)(412316860441ul)(824633720831ul) \
-(1649267441651ul)(3298534883309ul)(6597069766657ul)(13194139533299ul) \
-(26388279066623ul)(52776558133303ul)(105553116266489ul)(211106232532969ul) \
-(422212465066001ul)(844424930131963ul)(1688849860263953ul) \
-(3377699720527861ul)(6755399441055731ul)(13510798882111483ul) \
-(27021597764222939ul)(54043195528445957ul)(108086391056891903ul) \
-(216172782113783843ul)(432345564227567621ul)(864691128455135207ul) \
-(1729382256910270481ul)(3458764513820540933ul)(6917529027641081903ul) \
-(13835058055282163729ul)(18446744073709551557ul)
-#endif
-
-template<bool _=true> /* templatized to have in-header static var defs */
-class bucket_array_base:private noncopyable
-{
-protected:
- static const std::size_t sizes[
- BOOST_PP_SEQ_SIZE(BOOST_MULTI_INDEX_BA_SIZES)];
-
- static std::size_t size_index(std::size_t n)
- {
- const std::size_t *bound=std::lower_bound(sizes,sizes+sizes_length,n);
- if(bound==sizes+sizes_length)--bound;
- return bound-sizes;
- }
-
-#define BOOST_MULTI_INDEX_BA_POSITION_CASE(z,n,_) \
- case n:return hash%BOOST_PP_SEQ_ELEM(n,BOOST_MULTI_INDEX_BA_SIZES);
-
- static std::size_t position(std::size_t hash,std::size_t size_index_)
- {
- /* Accelerate hash%sizes[size_index_] by replacing with a switch on
- * hash%Ci expressions, each Ci a compile-time constant, which the
- * compiler can implement without using integer division.
- */
-
- switch(size_index_){
- default: /* never used */
- BOOST_PP_REPEAT(
- BOOST_PP_SEQ_SIZE(BOOST_MULTI_INDEX_BA_SIZES),
- BOOST_MULTI_INDEX_BA_POSITION_CASE,~)
- }
- }
-
-private:
- static const std::size_t sizes_length;
-};
-
-template<bool _>
-const std::size_t bucket_array_base<_>::sizes[]={
- BOOST_PP_SEQ_ENUM(BOOST_MULTI_INDEX_BA_SIZES)
-};
-
-template<bool _>
-const std::size_t bucket_array_base<_>::sizes_length=
- sizeof(bucket_array_base<_>::sizes)/
- sizeof(bucket_array_base<_>::sizes[0]);
-
-#undef BOOST_MULTI_INDEX_BA_POSITION_CASE
-#undef BOOST_MULTI_INDEX_BA_SIZES
-#undef BOOST_MULTI_INDEX_BA_SIZES_32BIT
-
-template<typename Allocator>
-class bucket_array:bucket_array_base<>
-{
- typedef bucket_array_base<> super;
- typedef hashed_index_base_node_impl<
- typename boost::detail::allocator::rebind_to<
- Allocator,
- char
- >::type
- > base_node_impl_type;
-
-public:
- typedef typename base_node_impl_type::base_pointer base_pointer;
- typedef typename base_node_impl_type::pointer pointer;
-
- bucket_array(const Allocator& al,pointer end_,std::size_t size_):
- size_index_(super::size_index(size_)),
- spc(al,super::sizes[size_index_]+1)
- {
- clear(end_);
- }
-
- std::size_t size()const
- {
- return super::sizes[size_index_];
- }
-
- std::size_t position(std::size_t hash)const
- {
- return super::position(hash,size_index_);
- }
-
- base_pointer begin()const{return buckets();}
- base_pointer end()const{return buckets()+size();}
- base_pointer at(std::size_t n)const{return buckets()+n;}
-
- void clear(pointer end_)
- {
- for(base_pointer x=begin(),y=end();x!=y;++x)x->prior()=pointer(0);
- end()->prior()=end_->prior()=end_;
- end_->next()=end();
- }
-
- void swap(bucket_array& x)
- {
- std::swap(size_index_,x.size_index_);
- spc.swap(x.spc);
- }
-
-private:
- std::size_t size_index_;
- auto_space<base_node_impl_type,Allocator> spc;
-
- base_pointer buckets()const
- {
- return spc.data();
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- friend class boost::serialization::access;
-
- /* bucket_arrays do not emit any kind of serialization info. They are
- * fed to Boost.Serialization as hashed index iterators need to track
- * them during serialization.
- */
-
- template<class Archive>
- void serialize(Archive&,const unsigned int)
- {
- }
-#endif
-};
-
-template<typename Allocator>
-void swap(bucket_array<Allocator>& x,bucket_array<Allocator>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-/* bucket_arrays never get constructed directly by Boost.Serialization,
- * as archives are always fed pointers to previously existent
- * arrays. So, if this is called it means we are dealing with a
- * somehow invalid archive.
- */
-
-#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
-namespace serialization{
-#else
-namespace multi_index{
-namespace detail{
-#endif
-
-template<class Archive,typename Allocator>
-inline void load_construct_data(
- Archive&,boost::multi_index::detail::bucket_array<Allocator>*,
- const unsigned int)
-{
- throw_exception(
- archive::archive_exception(archive::archive_exception::other_exception));
-}
-
-#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
-} /* namespace serialization */
-#else
-} /* namespace multi_index::detail */
-} /* namespace multi_index */
-#endif
-
-#endif
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp
deleted file mode 100644
index 1ab2bf00433..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/* 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_DETAIL_COPY_MAP_HPP
-#define BOOST_MULTI_INDEX_DETAIL_COPY_MAP_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/raw_ptr.hpp>
-#include <boost/noncopyable.hpp>
-#include <cstddef>
-#include <functional>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* copy_map is used as an auxiliary structure during copy_() operations.
- * When a container with n nodes is replicated, node_map holds the pairings
- * between original and copied nodes, and provides a fast way to find a
- * copied node from an original one.
- * The semantics of the class are not simple, and no attempt has been made
- * to enforce it: multi_index_container handles it right. On the other hand,
- * the const interface, which is the one provided to index implementations,
- * only allows for:
- * - Enumeration of pairs of (original,copied) nodes (excluding the headers),
- * - fast retrieval of copied nodes (including the headers.)
- */
-
-template <typename Node>
-struct copy_map_entry
-{
- copy_map_entry(Node* f,Node* s):first(f),second(s){}
-
- Node* first;
- Node* second;
-
- bool operator<(const copy_map_entry<Node>& x)const
- {
- return std::less<Node*>()(first,x.first);
- }
-};
-
-template <typename Node,typename Allocator>
-class copy_map:private noncopyable
-{
-public:
- typedef const copy_map_entry<Node>* const_iterator;
-
- copy_map(
- const Allocator& al,std::size_t size,Node* header_org,Node* header_cpy):
- al_(al),size_(size),spc(al_,size_),n(0),
- header_org_(header_org),header_cpy_(header_cpy),released(false)
- {}
-
- ~copy_map()
- {
- if(!released){
- for(std::size_t i=0;i<n;++i){
- boost::detail::allocator::destroy(
- boost::addressof((spc.data()+i)->second->value()));
- deallocate((spc.data()+i)->second);
- }
- }
- }
-
- const_iterator begin()const{return raw_ptr<const_iterator>(spc.data());}
- const_iterator end()const{return raw_ptr<const_iterator>(spc.data()+n);}
-
- void clone(Node* node)
- {
- (spc.data()+n)->first=node;
- (spc.data()+n)->second=raw_ptr<Node*>(allocate());
- BOOST_TRY{
- boost::detail::allocator::construct(
- boost::addressof((spc.data()+n)->second->value()),node->value());
- }
- BOOST_CATCH(...){
- deallocate((spc.data()+n)->second);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- ++n;
-
- if(n==size_){
- std::sort(
- raw_ptr<copy_map_entry<Node>*>(spc.data()),
- raw_ptr<copy_map_entry<Node>*>(spc.data())+size_);
- }
- }
-
- Node* find(Node* node)const
- {
- if(node==header_org_)return header_cpy_;
- return std::lower_bound(
- begin(),end(),copy_map_entry<Node>(node,0))->second;
- }
-
- void release()
- {
- released=true;
- }
-
-private:
- typedef typename boost::detail::allocator::rebind_to<
- Allocator,Node
- >::type allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer allocator_pointer;
-#else
- typedef std::allocator_traits<allocator_type> allocator_traits;
- typedef typename allocator_traits::pointer allocator_pointer;
-#endif
-
- allocator_type al_;
- std::size_t size_;
- auto_space<copy_map_entry<Node>,Allocator> spc;
- std::size_t n;
- Node* header_org_;
- Node* header_cpy_;
- bool released;
-
- allocator_pointer allocate()
- {
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- return al_.allocate(1);
-#else
- return allocator_traits::allocate(al_,1);
-#endif
- }
-
- void deallocate(Node* node)
- {
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- al_.deallocate(static_cast<allocator_pointer>(node),1);
-#else
- allocator_traits::deallocate(al_,static_cast<allocator_pointer>(node),1);
-#endif
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp
deleted file mode 100644
index cbebf264045..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp
+++ /dev/null
@@ -1,120 +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 http://www.boost.org/libs/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_DUPLICATES_ITERATOR_HPP
-#define BOOST_MULTI_INDEX_DETAIL_DUPLICATES_ITERATOR_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <cstddef>
-#include <iterator>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* duplicates_operator is given a range of ordered elements and
- * passes only over those which are duplicated.
- */
-
-template<typename Node,typename Predicate>
-class duplicates_iterator
-{
-public:
- typedef typename Node::value_type value_type;
- typedef std::ptrdiff_t difference_type;
- typedef const typename Node::value_type* pointer;
- typedef const typename Node::value_type& reference;
- typedef std::forward_iterator_tag iterator_category;
-
- duplicates_iterator(Node* node_,Node* end_,Predicate pred_):
- node(node_),begin_chunk(0),end(end_),pred(pred_)
- {
- advance();
- }
-
- duplicates_iterator(Node* end_,Predicate pred_):
- node(end_),begin_chunk(end_),end(end_),pred(pred_)
- {
- }
-
- reference operator*()const
- {
- return node->value();
- }
-
- pointer operator->()const
- {
- return &node->value();
- }
-
- duplicates_iterator& operator++()
- {
- Node::increment(node);
- sync();
- return *this;
- }
-
- duplicates_iterator operator++(int)
- {
- duplicates_iterator tmp(*this);
- ++(*this);
- return tmp;
- }
-
- Node* get_node()const{return node;}
-
-private:
- void sync()
- {
- if(node!=end&&pred(begin_chunk->value(),node->value()))advance();
- }
-
- void advance()
- {
- for(Node* node2=node;node!=end;node=node2){
- Node::increment(node2);
- if(node2!=end&&!pred(node->value(),node2->value()))break;
- }
- begin_chunk=node;
- }
-
- Node* node;
- Node* begin_chunk;
- Node* end;
- Predicate pred;
-};
-
-template<typename Node,typename Predicate>
-bool operator==(
- const duplicates_iterator<Node,Predicate>& x,
- const duplicates_iterator<Node,Predicate>& y)
-{
- return x.get_node()==y.get_node();
-}
-
-template<typename Node,typename Predicate>
-bool operator!=(
- const duplicates_iterator<Node,Predicate>& x,
- const duplicates_iterator<Node,Predicate>& y)
-{
- return !(x==y);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 8d063002a1d..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_iterator.hpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Copyright 2003-2014 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_DETAIL_HASH_INDEX_ITERATOR_HPP
-#define BOOST_MULTI_INDEX_DETAIL_HASH_INDEX_ITERATOR_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/operators.hpp>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#include <boost/serialization/version.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Iterator class for hashed indices.
- */
-
-struct hashed_index_global_iterator_tag{};
-struct hashed_index_local_iterator_tag{};
-
-template<typename Node,typename BucketArray,typename Category>
-class hashed_index_iterator:
- public forward_iterator_helper<
- hashed_index_iterator<Node,BucketArray,Category>,
- typename Node::value_type,
- std::ptrdiff_t,
- const typename Node::value_type*,
- const typename Node::value_type&>
-{
-public:
- /* coverity[uninit_ctor]: suppress warning */
- hashed_index_iterator(){}
- hashed_index_iterator(Node* node_):node(node_){}
-
- const typename Node::value_type& operator*()const
- {
- return node->value();
- }
-
- hashed_index_iterator& operator++()
- {
- this->increment(Category());
- return *this;
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* Serialization. As for why the following is public,
- * see explanation in safe_mode_iterator notes in safe_mode.hpp.
- */
-
- BOOST_SERIALIZATION_SPLIT_MEMBER()
-
- typedef typename Node::base_type node_base_type;
-
- template<class Archive>
- void save(Archive& ar,const unsigned int)const
- {
- node_base_type* bnode=node;
- ar<<serialization::make_nvp("pointer",bnode);
- }
-
- template<class Archive>
- void load(Archive& ar,const unsigned int version)
- {
- load(ar,version,Category());
- }
-
- template<class Archive>
- void load(
- Archive& ar,const unsigned int version,hashed_index_global_iterator_tag)
- {
- node_base_type* bnode;
- ar>>serialization::make_nvp("pointer",bnode);
- node=static_cast<Node*>(bnode);
- if(version<1){
- BucketArray* throw_away; /* consume unused ptr */
- ar>>serialization::make_nvp("pointer",throw_away);
- }
- }
-
- template<class Archive>
- void load(
- Archive& ar,const unsigned int version,hashed_index_local_iterator_tag)
- {
- node_base_type* bnode;
- ar>>serialization::make_nvp("pointer",bnode);
- node=static_cast<Node*>(bnode);
- if(version<1){
- BucketArray* buckets;
- ar>>serialization::make_nvp("pointer",buckets);
- if(buckets&&node&&node->impl()==buckets->end()->prior()){
- /* end local_iterators used to point to end node, now they are null */
- node=0;
- }
- }
- }
-#endif
-
- /* get_node is not to be used by the user */
-
- typedef Node node_type;
-
- Node* get_node()const{return node;}
-
-private:
-
- void increment(hashed_index_global_iterator_tag)
- {
- Node::increment(node);
- }
-
- void increment(hashed_index_local_iterator_tag)
- {
- Node::increment_local(node);
- }
-
- Node* node;
-};
-
-template<typename Node,typename BucketArray,typename Category>
-bool operator==(
- const hashed_index_iterator<Node,BucketArray,Category>& x,
- const hashed_index_iterator<Node,BucketArray,Category>& y)
-{
- return x.get_node()==y.get_node();
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-/* class version = 1 : hashed_index_iterator does no longer serialize a bucket
- * array pointer.
- */
-
-namespace serialization {
-template<typename Node,typename BucketArray,typename Category>
-struct version<
- boost::multi_index::detail::hashed_index_iterator<Node,BucketArray,Category>
->
-{
- BOOST_STATIC_CONSTANT(int,value=1);
-};
-} /* namespace serialization */
-#endif
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 2be575b4693..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_node.hpp
+++ /dev/null
@@ -1,789 +0,0 @@
-/* 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_DETAIL_HASH_INDEX_NODE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_HASH_INDEX_NODE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/raw_ptr.hpp>
-#include <utility>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Certain C++ requirements on unordered associative containers (see LWG issue
- * #579) imply a data structure where nodes are linked in a single list, which
- * in its turn forces implementors to add additional overhed per node to
- * associate each with its corresponding bucket. Others resort to storing hash
- * values, we use an alternative structure providing unconditional O(1)
- * manipulation, even in situations of unfair hash distribution, plus some
- * lookup speedups. For unique indices we maintain a doubly linked list of
- * nodes except that if N is the first node of a bucket its associated
- * bucket node is embedded between N and the preceding node in the following
- * manner:
- *
- * +---+ +---+ +---+ +---+
- * <--+ |<--+ | <--+ |<--+ |
- * ... | B0| | B1| ... | B1| | B2| ...
- * | |-+ | +--> | |-+ | +-->
- * +-+-+ | +---+ +-+-+ | +---+
- * | ^ | ^
- * | | | |
- * | +-+ | +-+
- * | | | |
- * v | v |
- * --+---+---+---+-- --+---+---+---+--
- * ... | | B1| | ... | | B2| | ...
- * --+---+---+---+-- --+---+---+---+--
- *
- *
- * The fist and last nodes of buckets can be checked with
- *
- * first node of a bucket: Npn != N
- * last node of a bucket: Nnp != N
- *
- * (n and p short for ->next(), ->prior(), bucket nodes have prior pointers
- * only). Pure insert and erase (without lookup) can be unconditionally done
- * in O(1).
- * For non-unique indices we add the following additional complexity: when
- * there is a group of 3 or more equivalent elements, they are linked as
- * follows:
- *
- * +-----------------------+
- * | v
- * +---+ | +---+ +---+ +---+
- * | | +-+ | | |<--+ |
- * | F | | S | ... | P | | L |
- * | +-->| | | +-+ | |
- * +---+ +---+ +---+ | +---+
- * ^ |
- * +-----------------------+
- *
- * F, S, P and L are the first, second, penultimate and last node in the
- * group, respectively (S and P can coincide if the group has size 3.) This
- * arrangement is used to skip equivalent elements in O(1) when doing lookup,
- * while preserving O(1) insert/erase. The following invariants identify
- * special positions (some of the operations have to be carefully implemented
- * as Xnn is not valid if Xn points to a bucket):
- *
- * first node of a bucket: Npnp == N
- * last node of a bucket: Nnpp == N
- * first node of a group: Nnp != N && Nnppn == N
- * second node of a group: Npn != N && Nppnn == N
- * n-1 node of a group: Nnp != N && Nnnpp == N
- * last node of a group: Npn != N && Npnnp == N
- *
- * The memory overhead is one pointer per bucket plus two pointers per node,
- * probably unbeatable. The resulting structure is bidirectonally traversable,
- * though currently we are just providing forward iteration.
- */
-
-template<typename Allocator>
-struct hashed_index_node_impl;
-
-/* half-header (only prior() pointer) to use for the bucket array */
-
-template<typename Allocator>
-struct hashed_index_base_node_impl
-{
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,hashed_index_base_node_impl
- >::type base_allocator;
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,
- hashed_index_node_impl<Allocator>
- >::type node_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename base_allocator::pointer base_pointer;
- typedef typename base_allocator::const_pointer const_base_pointer;
- typedef typename node_allocator::pointer pointer;
- typedef typename node_allocator::const_pointer const_pointer;
-#else
- typedef typename std::allocator_traits<
- base_allocator
- >::pointer base_pointer;
- typedef typename std::allocator_traits<
- base_allocator
- >::const_pointer const_base_pointer;
- typedef typename std::allocator_traits<
- node_allocator
- >::pointer pointer;
- typedef typename std::allocator_traits<
- node_allocator
- >::const_pointer const_pointer;
-#endif
-
- pointer& prior(){return prior_;}
- pointer prior()const{return prior_;}
-
-private:
- pointer prior_;
-};
-
-/* full header (prior() and next()) for the nodes */
-
-template<typename Allocator>
-struct hashed_index_node_impl:hashed_index_base_node_impl<Allocator>
-{
-private:
- typedef hashed_index_base_node_impl<Allocator> super;
-
-public:
- typedef typename super::base_pointer base_pointer;
- typedef typename super::const_base_pointer const_base_pointer;
- typedef typename super::pointer pointer;
- typedef typename super::const_pointer const_pointer;
-
- base_pointer& next(){return next_;}
- base_pointer next()const{return next_;}
-
- static pointer pointer_from(base_pointer x)
- {
- return static_cast<pointer>(
- static_cast<hashed_index_node_impl*>(
- raw_ptr<super*>(x)));
- }
-
- static base_pointer base_pointer_from(pointer x)
- {
- return static_cast<base_pointer>(
- raw_ptr<hashed_index_node_impl*>(x));
- }
-
-private:
- base_pointer next_;
-};
-
-/* Boost.MultiIndex requires machinery to reverse unlink operations. A simple
- * way to make a pointer-manipulation function undoable is to templatize
- * its internal pointer assignments with a functor that, besides doing the
- * assignment, keeps track of the original pointer values and can later undo
- * the operations in reverse order.
- */
-
-struct default_assigner
-{
- template<typename T> void operator()(T& x,const T& val){x=val;}
-};
-
-template<typename Node>
-struct unlink_undo_assigner
-{
- typedef typename Node::base_pointer base_pointer;
- typedef typename Node::pointer pointer;
-
- unlink_undo_assigner():pointer_track_count(0),base_pointer_track_count(0){}
-
- void operator()(pointer& x,pointer val)
- {
- pointer_tracks[pointer_track_count].x=&x;
- pointer_tracks[pointer_track_count++].val=x;
- x=val;
- }
-
- void operator()(base_pointer& x,base_pointer val)
- {
- base_pointer_tracks[base_pointer_track_count].x=&x;
- base_pointer_tracks[base_pointer_track_count++].val=x;
- x=val;
- }
-
- void operator()() /* undo op */
- {
- /* in the absence of aliasing, restitution order is immaterial */
-
- while(pointer_track_count--){
- *(pointer_tracks[pointer_track_count].x)=
- pointer_tracks[pointer_track_count].val;
- }
- while(base_pointer_track_count--){
- *(base_pointer_tracks[base_pointer_track_count].x)=
- base_pointer_tracks[base_pointer_track_count].val;
- }
- }
-
- struct pointer_track {pointer* x; pointer val;};
- struct base_pointer_track{base_pointer* x; base_pointer val;};
-
- /* We know the maximum number of pointer and base pointer assignments that
- * the two unlink versions do, so we can statically reserve the needed
- * storage.
- */
-
- pointer_track pointer_tracks[3];
- int pointer_track_count;
- base_pointer_track base_pointer_tracks[2];
- int base_pointer_track_count;
-};
-
-/* algorithmic stuff for unique and non-unique variants */
-
-struct hashed_unique_tag{};
-struct hashed_non_unique_tag{};
-
-template<typename Node,typename Category>
-struct hashed_index_node_alg;
-
-template<typename Node>
-struct hashed_index_node_alg<Node,hashed_unique_tag>
-{
- typedef typename Node::base_pointer base_pointer;
- typedef typename Node::const_base_pointer const_base_pointer;
- typedef typename Node::pointer pointer;
- typedef typename Node::const_pointer const_pointer;
-
- static bool is_first_of_bucket(pointer x)
- {
- return x->prior()->next()!=base_pointer_from(x);
- }
-
- static pointer after(pointer x)
- {
- return is_last_of_bucket(x)?x->next()->prior():pointer_from(x->next());
- }
-
- static pointer after_local(pointer x)
- {
- return is_last_of_bucket(x)?pointer(0):pointer_from(x->next());
- }
-
- static pointer next_to_inspect(pointer x)
- {
- return is_last_of_bucket(x)?pointer(0):pointer_from(x->next());
- }
-
- static void link(pointer x,base_pointer buc,pointer end)
- {
- if(buc->prior()==pointer(0)){ /* empty bucket */
- x->prior()=end->prior();
- x->next()=end->prior()->next();
- x->prior()->next()=buc;
- buc->prior()=x;
- end->prior()=x;
- }
- else{
- x->prior()=buc->prior()->prior();
- x->next()=base_pointer_from(buc->prior());
- buc->prior()=x;
- x->next()->prior()=x;
- }
- }
-
- static void unlink(pointer x)
- {
- default_assigner assign;
- unlink(x,assign);
- }
-
- typedef unlink_undo_assigner<Node> unlink_undo;
-
- template<typename Assigner>
- static void unlink(pointer x,Assigner& assign)
- {
- if(is_first_of_bucket(x)){
- if(is_last_of_bucket(x)){
- assign(x->prior()->next()->prior(),pointer(0));
- assign(x->prior()->next(),x->next());
- assign(x->next()->prior()->prior(),x->prior());
- }
- else{
- assign(x->prior()->next()->prior(),pointer_from(x->next()));
- assign(x->next()->prior(),x->prior());
- }
- }
- else if(is_last_of_bucket(x)){
- assign(x->prior()->next(),x->next());
- assign(x->next()->prior()->prior(),x->prior());
- }
- else{
- assign(x->prior()->next(),x->next());
- assign(x->next()->prior(),x->prior());
- }
- }
-
- /* used only at rehashing */
-
- static void append(pointer x,pointer end)
- {
- x->prior()=end->prior();
- x->next()=end->prior()->next();
- x->prior()->next()=base_pointer_from(x);
- end->prior()=x;
- }
-
- static bool unlink_last(pointer end)
- {
- /* returns true iff bucket is emptied */
-
- pointer x=end->prior();
- if(x->prior()->next()==base_pointer_from(x)){
- x->prior()->next()=x->next();
- end->prior()=x->prior();
- return false;
- }
- else{
- x->prior()->next()->prior()=pointer(0);
- x->prior()->next()=x->next();
- end->prior()=x->prior();
- return true;
- }
- }
-
-private:
- static pointer pointer_from(base_pointer x)
- {
- return Node::pointer_from(x);
- }
-
- static base_pointer base_pointer_from(pointer x)
- {
- return Node::base_pointer_from(x);
- }
-
- static bool is_last_of_bucket(pointer x)
- {
- return x->next()->prior()!=x;
- }
-};
-
-template<typename Node>
-struct hashed_index_node_alg<Node,hashed_non_unique_tag>
-{
- typedef typename Node::base_pointer base_pointer;
- typedef typename Node::const_base_pointer const_base_pointer;
- typedef typename Node::pointer pointer;
- typedef typename Node::const_pointer const_pointer;
-
- static bool is_first_of_bucket(pointer x)
- {
- return x->prior()->next()->prior()==x;
- }
-
- static bool is_first_of_group(pointer x)
- {
- return
- x->next()->prior()!=x&&
- x->next()->prior()->prior()->next()==base_pointer_from(x);
- }
-
- static pointer after(pointer x)
- {
- if(x->next()->prior()==x)return pointer_from(x->next());
- if(x->next()->prior()->prior()==x)return x->next()->prior();
- if(x->next()->prior()->prior()->next()==base_pointer_from(x))
- return pointer_from(x->next());
- return pointer_from(x->next())->next()->prior();
- }
-
- static pointer after_local(pointer x)
- {
- if(x->next()->prior()==x)return pointer_from(x->next());
- if(x->next()->prior()->prior()==x)return pointer(0);
- if(x->next()->prior()->prior()->next()==base_pointer_from(x))
- return pointer_from(x->next());
- return pointer_from(x->next())->next()->prior();
- }
-
- static pointer next_to_inspect(pointer x)
- {
- if(x->next()->prior()==x)return pointer_from(x->next());
- if(x->next()->prior()->prior()==x)return pointer(0);
- if(x->next()->prior()->next()->prior()!=x->next()->prior())
- return pointer(0);
- return pointer_from(x->next()->prior()->next());
- }
-
- static void link(pointer x,base_pointer buc,pointer end)
- {
- if(buc->prior()==pointer(0)){ /* empty bucket */
- x->prior()=end->prior();
- x->next()=end->prior()->next();
- x->prior()->next()=buc;
- buc->prior()=x;
- end->prior()=x;
- }
- else{
- x->prior()=buc->prior()->prior();
- x->next()=base_pointer_from(buc->prior());
- buc->prior()=x;
- x->next()->prior()=x;
- }
- };
-
- static void link(pointer x,pointer first,pointer last)
- {
- x->prior()=first->prior();
- x->next()=base_pointer_from(first);
- if(is_first_of_bucket(first)){
- x->prior()->next()->prior()=x;
- }
- else{
- x->prior()->next()=base_pointer_from(x);
- }
-
- if(first==last){
- last->prior()=x;
- }
- else if(first->next()==base_pointer_from(last)){
- first->prior()=last;
- first->next()=base_pointer_from(x);
- }
- else{
- pointer second=pointer_from(first->next()),
- lastbutone=last->prior();
- second->prior()=first;
- first->prior()=last;
- lastbutone->next()=base_pointer_from(x);
- }
- }
-
- static void unlink(pointer x)
- {
- default_assigner assign;
- unlink(x,assign);
- }
-
- typedef unlink_undo_assigner<Node> unlink_undo;
-
- template<typename Assigner>
- static void unlink(pointer x,Assigner& assign)
- {
- if(x->prior()->next()==base_pointer_from(x)){
- if(x->next()->prior()==x){
- left_unlink(x,assign);
- right_unlink(x,assign);
- }
- else if(x->next()->prior()->prior()==x){ /* last of bucket */
- left_unlink(x,assign);
- right_unlink_last_of_bucket(x,assign);
- }
- else if(x->next()->prior()->prior()->next()==
- base_pointer_from(x)){ /* first of group size */
- left_unlink(x,assign);
- right_unlink_first_of_group(x,assign);
- }
- else{ /* n-1 of group */
- unlink_last_but_one_of_group(x,assign);
- }
- }
- else if(x->prior()->next()->prior()==x){ /* first of bucket */
- if(x->next()->prior()==x){
- left_unlink_first_of_bucket(x,assign);
- right_unlink(x,assign);
- }
- else if(x->next()->prior()->prior()==x){ /* last of bucket */
- assign(x->prior()->next()->prior(),pointer(0));
- assign(x->prior()->next(),x->next());
- assign(x->next()->prior()->prior(),x->prior());
- }
- else{ /* first of group */
- left_unlink_first_of_bucket(x,assign);
- right_unlink_first_of_group(x,assign);
- }
- }
- else if(x->next()->prior()->prior()==x){ /* last of group and bucket */
- left_unlink_last_of_group(x,assign);
- right_unlink_last_of_bucket(x,assign);
- }
- else if(pointer_from(x->prior()->prior()->next())
- ->next()==base_pointer_from(x)){ /* second of group */
- unlink_second_of_group(x,assign);
- }
- else{ /* last of group, ~(last of bucket) */
- left_unlink_last_of_group(x,assign);
- right_unlink(x,assign);
- }
- }
-
- /* used only at rehashing */
-
- static void link_range(
- pointer first,pointer last,base_pointer buc,pointer cend)
- {
- if(buc->prior()==pointer(0)){ /* empty bucket */
- first->prior()=cend->prior();
- last->next()=cend->prior()->next();
- first->prior()->next()=buc;
- buc->prior()=first;
- cend->prior()=last;
- }
- else{
- first->prior()=buc->prior()->prior();
- last->next()=base_pointer_from(buc->prior());
- buc->prior()=first;
- last->next()->prior()=last;
- }
- }
-
- static void append_range(pointer first,pointer last,pointer cend)
- {
- first->prior()=cend->prior();
- last->next()=cend->prior()->next();
- first->prior()->next()=base_pointer_from(first);
- cend->prior()=last;
- }
-
- static std::pair<pointer,bool> unlink_last_group(pointer end)
- {
- /* returns first of group true iff bucket is emptied */
-
- pointer x=end->prior();
- if(x->prior()->next()==base_pointer_from(x)){
- x->prior()->next()=x->next();
- end->prior()=x->prior();
- return std::make_pair(x,false);
- }
- else if(x->prior()->next()->prior()==x){
- x->prior()->next()->prior()=pointer(0);
- x->prior()->next()=x->next();
- end->prior()=x->prior();
- return std::make_pair(x,true);
- }
- else{
- pointer y=pointer_from(x->prior()->next());
-
- if(y->prior()->next()==base_pointer_from(y)){
- y->prior()->next()=x->next();
- end->prior()=y->prior();
- return std::make_pair(y,false);
- }
- else{
- y->prior()->next()->prior()=pointer(0);
- y->prior()->next()=x->next();
- end->prior()=y->prior();
- return std::make_pair(y,true);
- }
- }
- }
-
- static void unlink_range(pointer first,pointer last)
- {
- if(is_first_of_bucket(first)){
- if(is_last_of_bucket(last)){
- first->prior()->next()->prior()=pointer(0);
- first->prior()->next()=last->next();
- last->next()->prior()->prior()=first->prior();
- }
- else{
- first->prior()->next()->prior()=pointer_from(last->next());
- last->next()->prior()=first->prior();
- }
- }
- else if(is_last_of_bucket(last)){
- first->prior()->next()=last->next();
- last->next()->prior()->prior()=first->prior();
- }
- else{
- first->prior()->next()=last->next();
- last->next()->prior()=first->prior();
- }
- }
-
-private:
- static pointer pointer_from(base_pointer x)
- {
- return Node::pointer_from(x);
- }
-
- static base_pointer base_pointer_from(pointer x)
- {
- return Node::base_pointer_from(x);
- }
-
- static bool is_last_of_bucket(pointer x)
- {
- return x->next()->prior()->prior()==x;
- }
-
- template<typename Assigner>
- static void left_unlink(pointer x,Assigner& assign)
- {
- assign(x->prior()->next(),x->next());
- }
-
- template<typename Assigner>
- static void right_unlink(pointer x,Assigner& assign)
- {
- assign(x->next()->prior(),x->prior());
- }
-
- template<typename Assigner>
- static void left_unlink_first_of_bucket(pointer x,Assigner& assign)
- {
- assign(x->prior()->next()->prior(),pointer_from(x->next()));
- }
-
- template<typename Assigner>
- static void right_unlink_last_of_bucket(pointer x,Assigner& assign)
- {
- assign(x->next()->prior()->prior(),x->prior());
- }
-
- template<typename Assigner>
- static void right_unlink_first_of_group(pointer x,Assigner& assign)
- {
- pointer second=pointer_from(x->next()),
- last=second->prior(),
- lastbutone=last->prior();
- if(second==lastbutone){
- assign(second->next(),base_pointer_from(last));
- assign(second->prior(),x->prior());
- }
- else{
- assign(lastbutone->next(),base_pointer_from(second));
- assign(second->next()->prior(),last);
- assign(second->prior(),x->prior());
- }
- }
-
- template<typename Assigner>
- static void left_unlink_last_of_group(pointer x,Assigner& assign)
- {
- pointer lastbutone=x->prior(),
- first=pointer_from(lastbutone->next()),
- second=pointer_from(first->next());
- if(lastbutone==second){
- assign(lastbutone->prior(),first);
- assign(lastbutone->next(),x->next());
- }
- else{
- assign(second->prior(),lastbutone);
- assign(lastbutone->prior()->next(),base_pointer_from(first));
- assign(lastbutone->next(),x->next());
- }
- }
-
- template<typename Assigner>
- static void unlink_last_but_one_of_group(pointer x,Assigner& assign)
- {
- pointer first=pointer_from(x->next()),
- second=pointer_from(first->next()),
- last=second->prior();
- if(second==x){
- assign(last->prior(),first);
- assign(first->next(),base_pointer_from(last));
- }
- else{
- assign(last->prior(),x->prior());
- assign(x->prior()->next(),base_pointer_from(first));
- }
- }
-
- template<typename Assigner>
- static void unlink_second_of_group(pointer x,Assigner& assign)
- {
- pointer last=x->prior(),
- lastbutone=last->prior(),
- first=pointer_from(lastbutone->next());
- if(lastbutone==x){
- assign(first->next(),base_pointer_from(last));
- assign(last->prior(),first);
- }
- else{
- assign(first->next(),x->next());
- assign(x->next()->prior(),last);
- }
- }
-};
-
-template<typename Super>
-struct hashed_index_node_trampoline:
- hashed_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- >
-{
- typedef typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type impl_allocator_type;
- typedef hashed_index_node_impl<impl_allocator_type> impl_type;
-};
-
-template<typename Super,typename Category>
-struct hashed_index_node:
- Super,hashed_index_node_trampoline<Super>
-{
-private:
- typedef hashed_index_node_trampoline<Super> trampoline;
-
-public:
- typedef typename trampoline::impl_type impl_type;
- typedef hashed_index_node_alg<
- impl_type,Category> node_alg;
- typedef typename trampoline::base_pointer impl_base_pointer;
- typedef typename trampoline::const_base_pointer const_impl_base_pointer;
- typedef typename trampoline::pointer impl_pointer;
- typedef typename trampoline::const_pointer const_impl_pointer;
-
- impl_pointer& prior(){return trampoline::prior();}
- impl_pointer prior()const{return trampoline::prior();}
- impl_base_pointer& next(){return trampoline::next();}
- impl_base_pointer next()const{return trampoline::next();}
-
- impl_pointer impl()
- {
- return static_cast<impl_pointer>(
- static_cast<impl_type*>(static_cast<trampoline*>(this)));
- }
-
- const_impl_pointer impl()const
- {
- return static_cast<const_impl_pointer>(
- static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
- }
-
- static hashed_index_node* from_impl(impl_pointer x)
- {
- return
- static_cast<hashed_index_node*>(
- static_cast<trampoline*>(
- raw_ptr<impl_type*>(x)));
- }
-
- static const hashed_index_node* from_impl(const_impl_pointer x)
- {
- return
- static_cast<const hashed_index_node*>(
- static_cast<const trampoline*>(
- raw_ptr<const impl_type*>(x)));
- }
-
- /* interoperability with hashed_index_iterator */
-
- static void increment(hashed_index_node*& x)
- {
- x=from_impl(node_alg::after(x->impl()));
- }
-
- static void increment_local(hashed_index_node*& x)
- {
- x=from_impl(node_alg::after_local(x->impl()));
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp
deleted file mode 100644
index 22cf0f14027..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/* Copyright 2003-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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_INDEX_BASE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_INDEX_BASE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/core/addressof.hpp>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/multi_index/detail/copy_map.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/node_type.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/multi_index_container_fwd.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <utility>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/multi_index/detail/index_loader.hpp>
-#include <boost/multi_index/detail/index_saver.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* The role of this class is threefold:
- * - tops the linear hierarchy of indices.
- * - terminates some cascading backbone function calls (insert_, etc.),
- * - grants access to the backbone functions of the final
- * multi_index_container class (for access restriction reasons, these
- * cannot be called directly from the index classes.)
- */
-
-struct lvalue_tag{};
-struct rvalue_tag{};
-struct emplaced_tag{};
-
-template<typename Value,typename IndexSpecifierList,typename Allocator>
-class index_base
-{
-protected:
- typedef index_node_base<Value,Allocator> node_type;
- typedef typename multi_index_node_type<
- Value,IndexSpecifierList,Allocator>::type final_node_type;
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> final_type;
- typedef tuples::null_type ctor_args_list;
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,
- typename Allocator::value_type
- >::type final_allocator_type;
- typedef mpl::vector0<> index_type_list;
- typedef mpl::vector0<> iterator_type_list;
- typedef mpl::vector0<> const_iterator_type_list;
- typedef copy_map<
- final_node_type,
- final_allocator_type> copy_map_type;
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- typedef index_saver<
- node_type,
- final_allocator_type> index_saver_type;
- typedef index_loader<
- node_type,
- final_node_type,
- final_allocator_type> index_loader_type;
-#endif
-
-private:
- typedef Value value_type;
-
-protected:
- explicit index_base(const ctor_args_list&,const Allocator&){}
-
- index_base(
- const index_base<Value,IndexSpecifierList,Allocator>&,
- do_not_copy_elements_tag)
- {}
-
- void copy_(
- const index_base<Value,IndexSpecifierList,Allocator>&,const copy_map_type&)
- {}
-
- final_node_type* insert_(const value_type& v,final_node_type*& x,lvalue_tag)
- {
- x=final().allocate_node();
- BOOST_TRY{
- boost::detail::allocator::construct(boost::addressof(x->value()),v);
- }
- BOOST_CATCH(...){
- final().deallocate_node(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return x;
- }
-
- final_node_type* insert_(const value_type& v,final_node_type*& x,rvalue_tag)
- {
- x=final().allocate_node();
- BOOST_TRY{
- /* This shoud have used a modified, T&&-compatible version of
- * boost::detail::allocator::construct, but
- * <boost/detail/allocator_utilities.hpp> is too old and venerable to
- * mess with; besides, it is a general internal utility and the imperfect
- * perfect forwarding emulation of Boost.Move might break other libs.
- */
-
- new (boost::addressof(x->value()))
- value_type(boost::move(const_cast<value_type&>(v)));
- }
- BOOST_CATCH(...){
- final().deallocate_node(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return x;
- }
-
- final_node_type* insert_(const value_type&,final_node_type*& x,emplaced_tag)
- {
- return x;
- }
-
- final_node_type* insert_(
- const value_type& v,node_type*,final_node_type*& x,lvalue_tag)
- {
- return insert_(v,x,lvalue_tag());
- }
-
- final_node_type* insert_(
- const value_type& v,node_type*,final_node_type*& x,rvalue_tag)
- {
- return insert_(v,x,rvalue_tag());
- }
-
- final_node_type* insert_(
- const value_type&,node_type*,final_node_type*& x,emplaced_tag)
- {
- return x;
- }
-
- void erase_(node_type* x)
- {
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- }
-
- void delete_node_(node_type* x)
- {
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- }
-
- void clear_(){}
-
- void swap_(index_base<Value,IndexSpecifierList,Allocator>&){}
-
- void swap_elements_(index_base<Value,IndexSpecifierList,Allocator>&){}
-
- bool replace_(const value_type& v,node_type* x,lvalue_tag)
- {
- x->value()=v;
- return true;
- }
-
- bool replace_(const value_type& v,node_type* x,rvalue_tag)
- {
- x->value()=boost::move(const_cast<value_type&>(v));
- return true;
- }
-
- bool modify_(node_type*){return true;}
-
- bool modify_rollback_(node_type*){return true;}
-
- bool check_rollback_(node_type*)const{return true;}
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- template<typename Archive>
- void save_(Archive&,const unsigned int,const index_saver_type&)const{}
-
- template<typename Archive>
- void load_(Archive&,const unsigned int,const index_loader_type&){}
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const{return true;}
-#endif
-
- /* access to backbone memfuns of Final class */
-
- final_type& final(){return *static_cast<final_type*>(this);}
- const final_type& final()const{return *static_cast<const final_type*>(this);}
-
- final_node_type* final_header()const{return final().header();}
-
- bool final_empty_()const{return final().empty_();}
- std::size_t final_size_()const{return final().size_();}
- std::size_t final_max_size_()const{return final().max_size_();}
-
- std::pair<final_node_type*,bool> final_insert_(const value_type& x)
- {return final().insert_(x);}
- std::pair<final_node_type*,bool> final_insert_rv_(const value_type& x)
- {return final().insert_rv_(x);}
- template<typename T>
- std::pair<final_node_type*,bool> final_insert_ref_(const T& t)
- {return final().insert_ref_(t);}
- template<typename T>
- std::pair<final_node_type*,bool> final_insert_ref_(T& t)
- {return final().insert_ref_(t);}
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<final_node_type*,bool> final_emplace_(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return final().emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- std::pair<final_node_type*,bool> final_insert_(
- const value_type& x,final_node_type* position)
- {return final().insert_(x,position);}
- std::pair<final_node_type*,bool> final_insert_rv_(
- const value_type& x,final_node_type* position)
- {return final().insert_rv_(x,position);}
- template<typename T>
- std::pair<final_node_type*,bool> final_insert_ref_(
- const T& t,final_node_type* position)
- {return final().insert_ref_(t,position);}
- template<typename T>
- std::pair<final_node_type*,bool> final_insert_ref_(
- T& t,final_node_type* position)
- {return final().insert_ref_(t,position);}
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<final_node_type*,bool> final_emplace_hint_(
- final_node_type* position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return final().emplace_hint_(
- position,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- void final_erase_(final_node_type* x){final().erase_(x);}
-
- void final_delete_node_(final_node_type* x){final().delete_node_(x);}
- void final_delete_all_nodes_(){final().delete_all_nodes_();}
- void final_clear_(){final().clear_();}
-
- void final_swap_(final_type& x){final().swap_(x);}
-
- bool final_replace_(
- const value_type& k,final_node_type* x)
- {return final().replace_(k,x);}
- bool final_replace_rv_(
- const value_type& k,final_node_type* x)
- {return final().replace_rv_(k,x);}
-
- template<typename Modifier>
- bool final_modify_(Modifier& mod,final_node_type* x)
- {return final().modify_(mod,x);}
-
- template<typename Modifier,typename Rollback>
- bool final_modify_(Modifier& mod,Rollback& back,final_node_type* x)
- {return final().modify_(mod,back,x);}
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- void final_check_invariant_()const{final().check_invariant_();}
-#endif
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 1093b87c99e..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl.hpp
+++ /dev/null
@@ -1,1585 +0,0 @@
-/* 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.
- *
- * The internal implementation of red-black trees is based on that of SGI STL
- * stl_tree.h file:
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_IMPL_HPP
-#define BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_IMPL_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/call_traits.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/foreach_fwd.hpp>
-#include <boost/iterator/reverse_iterator.hpp>
-#include <boost/move/core.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/push_front.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/multi_index/detail/bidir_node_iterator.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/index_node_base.hpp>
-#include <boost/multi_index/detail/modify_key_adaptor.hpp>
-#include <boost/multi_index/detail/ord_index_node.hpp>
-#include <boost/multi_index/detail/ord_index_ops.hpp>
-#include <boost/multi_index/detail/safe_mode.hpp>
-#include <boost/multi_index/detail/scope_guard.hpp>
-#include <boost/multi_index/detail/unbounded.hpp>
-#include <boost/multi_index/detail/value_compare.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/multi_index/detail/ord_index_impl_fwd.hpp>
-#include <boost/ref.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <utility>
-#include <memory>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/archive/archive_exception.hpp>
-#include <boost/bind.hpp>
-#include <boost/multi_index/detail/duplicates_iterator.hpp>
-#include <boost/throw_exception.hpp>
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
-#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(x) \
- detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
- detail::make_obj_guard(x,&ordered_index_impl::check_invariant_); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT \
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(*this)
-#else
-#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(x)
-#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* ordered_index adds a layer of ordered indexing to a given Super and accepts
- * an augmenting policy for optional addition of order statistics.
- */
-
-/* Most of the implementation of unique and non-unique indices is
- * shared. We tell from one another on instantiation time by using
- * these tags.
- */
-
-struct ordered_unique_tag{};
-struct ordered_non_unique_tag{};
-
-template<
- typename KeyFromValue,typename Compare,
- typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
->
-class ordered_index;
-
-template<
- typename KeyFromValue,typename Compare,
- typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
->
-class ordered_index_impl:
- BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,public safe_mode::safe_container<
- ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy> >
-#endif
-
-{
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
- * lifetime of const references bound to temporaries --precisely what
- * scopeguards are.
- */
-
-#pragma parse_mfunc_templ off
-#endif
-
- typedef typename SuperMeta::type super;
-
-protected:
- typedef ordered_index_node<
- AugmentPolicy,typename super::node_type> node_type;
-
-protected: /* for the benefit of AugmentPolicy::augmented_interface */
- typedef typename node_type::impl_type node_impl_type;
- typedef typename node_impl_type::pointer node_impl_pointer;
-
-public:
- /* types */
-
- typedef typename KeyFromValue::result_type key_type;
- typedef typename node_type::value_type value_type;
- typedef KeyFromValue key_from_value;
- typedef Compare key_compare;
- typedef value_comparison<
- value_type,KeyFromValue,Compare> value_compare;
- typedef tuple<key_from_value,key_compare> ctor_args;
- typedef typename super::final_allocator_type allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::reference reference;
- typedef typename allocator_type::const_reference const_reference;
-#else
- typedef value_type& reference;
- typedef const value_type& const_reference;
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_iterator<
- bidir_node_iterator<node_type>,
- ordered_index_impl> iterator;
-#else
- typedef bidir_node_iterator<node_type> iterator;
-#endif
-
- typedef iterator const_iterator;
-
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer pointer;
- typedef typename allocator_type::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<allocator_type> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
-#endif
- typedef typename
- boost::reverse_iterator<iterator> reverse_iterator;
- typedef typename
- boost::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef TagList tag_list;
-
-protected:
- typedef typename super::final_node_type final_node_type;
- typedef tuples::cons<
- ctor_args,
- typename super::ctor_args_list> ctor_args_list;
- typedef typename mpl::push_front<
- typename super::index_type_list,
- ordered_index<
- KeyFromValue,Compare,
- SuperMeta,TagList,Category,AugmentPolicy
- > >::type index_type_list;
- typedef typename mpl::push_front<
- typename super::iterator_type_list,
- iterator>::type iterator_type_list;
- typedef typename mpl::push_front<
- typename super::const_iterator_type_list,
- const_iterator>::type const_iterator_type_list;
- typedef typename super::copy_map_type copy_map_type;
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- typedef typename super::index_saver_type index_saver_type;
- typedef typename super::index_loader_type index_loader_type;
-#endif
-
-protected:
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_container<
- ordered_index_impl> safe_super;
-#endif
-
- typedef typename call_traits<
- value_type>::param_type value_param_type;
- typedef typename call_traits<
- key_type>::param_type key_param_type;
-
- /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
- * expansion.
- */
-
- typedef std::pair<iterator,bool> emplace_return_type;
-
-public:
-
- /* construct/copy/destroy
- * Default and copy ctors are in the protected section as indices are
- * not supposed to be created on their own. No range ctor either.
- * Assignment operators defined at ordered_index rather than here.
- */
-
- allocator_type get_allocator()const BOOST_NOEXCEPT
- {
- return this->final().get_allocator();
- }
-
- /* iterators */
-
- iterator
- begin()BOOST_NOEXCEPT{return make_iterator(leftmost());}
- const_iterator
- begin()const BOOST_NOEXCEPT{return make_iterator(leftmost());}
- iterator
- end()BOOST_NOEXCEPT{return make_iterator(header());}
- const_iterator
- end()const BOOST_NOEXCEPT{return make_iterator(header());}
- reverse_iterator
- rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- const_reverse_iterator
- rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- reverse_iterator
- rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_reverse_iterator
- rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_iterator
- cbegin()const BOOST_NOEXCEPT{return begin();}
- const_iterator
- cend()const BOOST_NOEXCEPT{return end();}
- const_reverse_iterator
- crbegin()const BOOST_NOEXCEPT{return rbegin();}
- const_reverse_iterator
- crend()const BOOST_NOEXCEPT{return rend();}
-
- iterator iterator_to(const value_type& x)
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- const_iterator iterator_to(const value_type& x)const
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- /* capacity */
-
- bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
- size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
- size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
-
- /* modifiers */
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace,emplace_impl)
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
- iterator,emplace_hint,emplace_hint_impl,iterator,position)
-
- std::pair<iterator,bool> insert(const value_type& x)
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(x);
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- iterator insert(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(
- x,static_cast<final_node_type*>(position.get_node()));
- return make_iterator(p.first);
- }
-
- iterator insert(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- return make_iterator(p.first);
- }
-
- template<typename InputIterator>
- void insert(InputIterator first,InputIterator last)
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- node_type* hint=header(); /* end() */
- for(;first!=last;++first){
- hint=this->final_insert_ref_(
- *first,static_cast<final_node_type*>(hint)).first;
- node_type::increment(hint);
- }
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void insert(std::initializer_list<value_type> list)
- {
- insert(list.begin(),list.end());
- }
-#endif
-
- iterator erase(iterator position)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
- return position;
- }
-
- size_type erase(key_param_type x)
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<iterator,iterator> p=equal_range(x);
- size_type s=0;
- while(p.first!=p.second){
- p.first=erase(p.first);
- ++s;
- }
- return s;
- }
-
- iterator erase(iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- while(first!=last){
- first=erase(first);
- }
- return first;
- }
-
- bool replace(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- return this->final_replace_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- bool replace(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- return this->final_replace_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,back_,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify_key(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- return modify(
- position,modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify_key(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- return modify(
- position,
- modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key),
- modify_key_adaptor<Rollback,value_type,KeyFromValue>(back_,key));
- }
-
- void swap(
- ordered_index<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x)
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(x);
- this->final_swap_(x.final());
- }
-
- void clear()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- this->final_clear_();
- }
-
- /* observers */
-
- key_from_value key_extractor()const{return key;}
- key_compare key_comp()const{return comp_;}
- value_compare value_comp()const{return value_compare(key,comp_);}
-
- /* set operations */
-
- /* Internally, these ops rely on const_iterator being the same
- * type as iterator.
- */
-
- template<typename CompatibleKey>
- iterator find(const CompatibleKey& x)const
- {
- return make_iterator(ordered_index_find(root(),header(),key,x,comp_));
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- iterator find(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return make_iterator(ordered_index_find(root(),header(),key,x,comp));
- }
-
- template<typename CompatibleKey>
- size_type count(const CompatibleKey& x)const
- {
- return count(x,comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- std::pair<iterator,iterator> p=equal_range(x,comp);
- size_type n=std::distance(p.first,p.second);
- return n;
- }
-
- template<typename CompatibleKey>
- iterator lower_bound(const CompatibleKey& x)const
- {
- return make_iterator(
- ordered_index_lower_bound(root(),header(),key,x,comp_));
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- iterator lower_bound(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return make_iterator(
- ordered_index_lower_bound(root(),header(),key,x,comp));
- }
-
- template<typename CompatibleKey>
- iterator upper_bound(const CompatibleKey& x)const
- {
- return make_iterator(
- ordered_index_upper_bound(root(),header(),key,x,comp_));
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- iterator upper_bound(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return make_iterator(
- ordered_index_upper_bound(root(),header(),key,x,comp));
- }
-
- template<typename CompatibleKey>
- std::pair<iterator,iterator> equal_range(
- const CompatibleKey& x)const
- {
- std::pair<node_type*,node_type*> p=
- ordered_index_equal_range(root(),header(),key,x,comp_);
- return std::pair<iterator,iterator>(
- make_iterator(p.first),make_iterator(p.second));
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::pair<iterator,iterator> equal_range(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- std::pair<node_type*,node_type*> p=
- ordered_index_equal_range(root(),header(),key,x,comp);
- return std::pair<iterator,iterator>(
- make_iterator(p.first),make_iterator(p.second));
- }
-
- /* range */
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<iterator,iterator>
- range(LowerBounder lower,UpperBounder upper)const
- {
- typedef typename mpl::if_<
- is_same<LowerBounder,unbounded_type>,
- BOOST_DEDUCED_TYPENAME mpl::if_<
- is_same<UpperBounder,unbounded_type>,
- both_unbounded_tag,
- lower_unbounded_tag
- >::type,
- BOOST_DEDUCED_TYPENAME mpl::if_<
- is_same<UpperBounder,unbounded_type>,
- upper_unbounded_tag,
- none_unbounded_tag
- >::type
- >::type dispatch;
-
- return range(lower,upper,dispatch());
- }
-
-BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
- ordered_index_impl(const ctor_args_list& args_list,const allocator_type& al):
- super(args_list.get_tail(),al),
- key(tuples::get<0>(args_list.get_head())),
- comp_(tuples::get<1>(args_list.get_head()))
- {
- empty_initialize();
- }
-
- ordered_index_impl(
- const ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x):
- super(x),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- key(x.key),
- comp_(x.comp_)
- {
- /* Copy ctor just takes the key and compare objects from x. The rest is
- * done in a subsequent call to copy_().
- */
- }
-
- ordered_index_impl(
- const ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x,
- do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- key(x.key),
- comp_(x.comp_)
- {
- empty_initialize();
- }
-
- ~ordered_index_impl()
- {
- /* the container is guaranteed to be empty by now */
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- iterator make_iterator(node_type* node){return iterator(node,this);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node,const_cast<ordered_index_impl*>(this));}
-#else
- iterator make_iterator(node_type* node){return iterator(node);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node);}
-#endif
-
- void copy_(
- const ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x,
- const copy_map_type& map)
- {
- if(!x.root()){
- empty_initialize();
- }
- else{
- header()->color()=x.header()->color();
- AugmentPolicy::copy(x.header()->impl(),header()->impl());
-
- node_type* root_cpy=map.find(static_cast<final_node_type*>(x.root()));
- header()->parent()=root_cpy->impl();
-
- node_type* leftmost_cpy=map.find(
- static_cast<final_node_type*>(x.leftmost()));
- header()->left()=leftmost_cpy->impl();
-
- node_type* rightmost_cpy=map.find(
- static_cast<final_node_type*>(x.rightmost()));
- header()->right()=rightmost_cpy->impl();
-
- typedef typename copy_map_type::const_iterator copy_map_iterator;
- for(copy_map_iterator it=map.begin(),it_end=map.end();it!=it_end;++it){
- node_type* org=it->first;
- node_type* cpy=it->second;
-
- cpy->color()=org->color();
- AugmentPolicy::copy(org->impl(),cpy->impl());
-
- node_impl_pointer parent_org=org->parent();
- if(parent_org==node_impl_pointer(0))cpy->parent()=node_impl_pointer(0);
- else{
- node_type* parent_cpy=map.find(
- static_cast<final_node_type*>(node_type::from_impl(parent_org)));
- cpy->parent()=parent_cpy->impl();
- if(parent_org->left()==org->impl()){
- parent_cpy->left()=cpy->impl();
- }
- else if(parent_org->right()==org->impl()){
- /* header() does not satisfy this nor the previous check */
- parent_cpy->right()=cpy->impl();
- }
- }
-
- if(org->left()==node_impl_pointer(0))
- cpy->left()=node_impl_pointer(0);
- if(org->right()==node_impl_pointer(0))
- cpy->right()=node_impl_pointer(0);
- }
- }
-
- super::copy_(x,map);
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,final_node_type*& x,Variant variant)
- {
- link_info inf;
- if(!link_point(key(v),inf,Category())){
- return static_cast<final_node_type*>(node_type::from_impl(inf.pos));
- }
-
- final_node_type* res=super::insert_(v,x,variant);
- if(res==x){
- node_impl_type::link(
- static_cast<node_type*>(x)->impl(),inf.side,inf.pos,header()->impl());
- }
- return res;
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,node_type* position,final_node_type*& x,Variant variant)
- {
- link_info inf;
- if(!hinted_link_point(key(v),position,inf,Category())){
- return static_cast<final_node_type*>(node_type::from_impl(inf.pos));
- }
-
- final_node_type* res=super::insert_(v,position,x,variant);
- if(res==x){
- node_impl_type::link(
- static_cast<node_type*>(x)->impl(),inf.side,inf.pos,header()->impl());
- }
- return res;
- }
-
- void erase_(node_type* x)
- {
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- }
-
- void delete_all_nodes_()
- {
- delete_all_nodes(root());
- }
-
- void clear_()
- {
- super::clear_();
- empty_initialize();
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::detach_dereferenceable_iterators();
-#endif
- }
-
- void swap_(
- ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x)
- {
- std::swap(key,x.key);
- std::swap(comp_,x.comp_);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_(x);
- }
-
- void swap_elements_(
- ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x)
- {
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_elements_(x);
- }
-
- template<typename Variant>
- bool replace_(value_param_type v,node_type* x,Variant variant)
- {
- if(in_place(v,x,Category())){
- return super::replace_(v,x,variant);
- }
-
- node_type* next=x;
- node_type::increment(next);
-
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
-
- BOOST_TRY{
- link_info inf;
- if(link_point(key(v),inf,Category())&&super::replace_(v,x,variant)){
- node_impl_type::link(x->impl(),inf.side,inf.pos,header()->impl());
- return true;
- }
- node_impl_type::restore(x->impl(),next->impl(),header()->impl());
- return false;
- }
- BOOST_CATCH(...){
- node_impl_type::restore(x->impl(),next->impl(),header()->impl());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_(node_type* x)
- {
- bool b;
- BOOST_TRY{
- b=in_place(x->value(),x,Category());
- }
- BOOST_CATCH(...){
- erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- if(!b){
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
- BOOST_TRY{
- link_info inf;
- if(!link_point(key(x->value()),inf,Category())){
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- return false;
- }
- node_impl_type::link(x->impl(),inf.side,inf.pos,header()->impl());
- }
- BOOST_CATCH(...){
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- BOOST_TRY{
- if(!super::modify_(x)){
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_rollback_(node_type* x)
- {
- if(in_place(x->value(),x,Category())){
- return super::modify_rollback_(x);
- }
-
- node_type* next=x;
- node_type::increment(next);
-
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
-
- BOOST_TRY{
- link_info inf;
- if(link_point(key(x->value()),inf,Category())&&
- super::modify_rollback_(x)){
- node_impl_type::link(x->impl(),inf.side,inf.pos,header()->impl());
- return true;
- }
- node_impl_type::restore(x->impl(),next->impl(),header()->impl());
- return false;
- }
- BOOST_CATCH(...){
- node_impl_type::restore(x->impl(),next->impl(),header()->impl());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool check_rollback_(node_type* x)const
- {
- return in_place(x->value(),x,Category())&&super::check_rollback_(x);
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm)const
- {
- save_(ar,version,sm,Category());
- }
-
- template<typename Archive>
- void load_(Archive& ar,const unsigned int version,const index_loader_type& lm)
- {
- load_(ar,version,lm,Category());
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const
- {
- if(size()==0||begin()==end()){
- if(size()!=0||begin()!=end()||
- header()->left()!=header()->impl()||
- header()->right()!=header()->impl())return false;
- }
- else{
- if((size_type)std::distance(begin(),end())!=size())return false;
-
- std::size_t len=node_impl_type::black_count(
- leftmost()->impl(),root()->impl());
- for(const_iterator it=begin(),it_end=end();it!=it_end;++it){
- node_type* x=it.get_node();
- node_type* left_x=node_type::from_impl(x->left());
- node_type* right_x=node_type::from_impl(x->right());
-
- if(x->color()==red){
- if((left_x&&left_x->color()==red)||
- (right_x&&right_x->color()==red))return false;
- }
- if(left_x&&comp_(key(x->value()),key(left_x->value())))return false;
- if(right_x&&comp_(key(right_x->value()),key(x->value())))return false;
- if(!left_x&&!right_x&&
- node_impl_type::black_count(x->impl(),root()->impl())!=len)
- return false;
- if(!AugmentPolicy::invariant(x->impl()))return false;
- }
-
- if(leftmost()->impl()!=node_impl_type::minimum(root()->impl()))
- return false;
- if(rightmost()->impl()!=node_impl_type::maximum(root()->impl()))
- return false;
- }
-
- return super::invariant_();
- }
-
-
- /* This forwarding function eases things for the boost::mem_fn construct
- * in BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT. Actually,
- * final_check_invariant is already an inherited member function of
- * ordered_index_impl.
- */
- void check_invariant_()const{this->final_check_invariant_();}
-#endif
-
-protected: /* for the benefit of AugmentPolicy::augmented_interface */
- node_type* header()const{return this->final_header();}
- node_type* root()const{return node_type::from_impl(header()->parent());}
- node_type* leftmost()const{return node_type::from_impl(header()->left());}
- node_type* rightmost()const{return node_type::from_impl(header()->right());}
-
-private:
- void empty_initialize()
- {
- header()->color()=red;
- /* used to distinguish header() from root, in iterator.operator++ */
-
- header()->parent()=node_impl_pointer(0);
- header()->left()=header()->impl();
- header()->right()=header()->impl();
- }
-
- struct link_info
- {
- /* coverity[uninit_ctor]: suppress warning */
- link_info():side(to_left){}
-
- ordered_index_side side;
- node_impl_pointer pos;
- };
-
- bool link_point(key_param_type k,link_info& inf,ordered_unique_tag)
- {
- node_type* y=header();
- node_type* x=root();
- bool c=true;
- while(x){
- y=x;
- c=comp_(k,key(x->value()));
- x=node_type::from_impl(c?x->left():x->right());
- }
- node_type* yy=y;
- if(c){
- if(yy==leftmost()){
- inf.side=to_left;
- inf.pos=y->impl();
- return true;
- }
- else node_type::decrement(yy);
- }
-
- if(comp_(key(yy->value()),k)){
- inf.side=c?to_left:to_right;
- inf.pos=y->impl();
- return true;
- }
- else{
- inf.pos=yy->impl();
- return false;
- }
- }
-
- bool link_point(key_param_type k,link_info& inf,ordered_non_unique_tag)
- {
- node_type* y=header();
- node_type* x=root();
- bool c=true;
- while (x){
- y=x;
- c=comp_(k,key(x->value()));
- x=node_type::from_impl(c?x->left():x->right());
- }
- inf.side=c?to_left:to_right;
- inf.pos=y->impl();
- return true;
- }
-
- bool lower_link_point(key_param_type k,link_info& inf,ordered_non_unique_tag)
- {
- node_type* y=header();
- node_type* x=root();
- bool c=false;
- while (x){
- y=x;
- c=comp_(key(x->value()),k);
- x=node_type::from_impl(c?x->right():x->left());
- }
- inf.side=c?to_right:to_left;
- inf.pos=y->impl();
- return true;
- }
-
- bool hinted_link_point(
- key_param_type k,node_type* position,link_info& inf,ordered_unique_tag)
- {
- if(position->impl()==header()->left()){
- if(size()>0&&comp_(k,key(position->value()))){
- inf.side=to_left;
- inf.pos=position->impl();
- return true;
- }
- else return link_point(k,inf,ordered_unique_tag());
- }
- else if(position==header()){
- if(comp_(key(rightmost()->value()),k)){
- inf.side=to_right;
- inf.pos=rightmost()->impl();
- return true;
- }
- else return link_point(k,inf,ordered_unique_tag());
- }
- else{
- node_type* before=position;
- node_type::decrement(before);
- if(comp_(key(before->value()),k)&&comp_(k,key(position->value()))){
- if(before->right()==node_impl_pointer(0)){
- inf.side=to_right;
- inf.pos=before->impl();
- return true;
- }
- else{
- inf.side=to_left;
- inf.pos=position->impl();
- return true;
- }
- }
- else return link_point(k,inf,ordered_unique_tag());
- }
- }
-
- bool hinted_link_point(
- key_param_type k,node_type* position,link_info& inf,ordered_non_unique_tag)
- {
- if(position->impl()==header()->left()){
- if(size()>0&&!comp_(key(position->value()),k)){
- inf.side=to_left;
- inf.pos=position->impl();
- return true;
- }
- else return lower_link_point(k,inf,ordered_non_unique_tag());
- }
- else if(position==header()){
- if(!comp_(k,key(rightmost()->value()))){
- inf.side=to_right;
- inf.pos=rightmost()->impl();
- return true;
- }
- else return link_point(k,inf,ordered_non_unique_tag());
- }
- else{
- node_type* before=position;
- node_type::decrement(before);
- if(!comp_(k,key(before->value()))){
- if(!comp_(key(position->value()),k)){
- if(before->right()==node_impl_pointer(0)){
- inf.side=to_right;
- inf.pos=before->impl();
- return true;
- }
- else{
- inf.side=to_left;
- inf.pos=position->impl();
- return true;
- }
- }
- else return lower_link_point(k,inf,ordered_non_unique_tag());
- }
- else return link_point(k,inf,ordered_non_unique_tag());
- }
- }
-
- void delete_all_nodes(node_type* x)
- {
- if(!x)return;
-
- delete_all_nodes(node_type::from_impl(x->left()));
- delete_all_nodes(node_type::from_impl(x->right()));
- this->final_delete_node_(static_cast<final_node_type*>(x));
- }
-
- bool in_place(value_param_type v,node_type* x,ordered_unique_tag)const
- {
- node_type* y;
- if(x!=leftmost()){
- y=x;
- node_type::decrement(y);
- if(!comp_(key(y->value()),key(v)))return false;
- }
-
- y=x;
- node_type::increment(y);
- return y==header()||comp_(key(v),key(y->value()));
- }
-
- bool in_place(value_param_type v,node_type* x,ordered_non_unique_tag)const
- {
- node_type* y;
- if(x!=leftmost()){
- y=x;
- node_type::decrement(y);
- if(comp_(key(v),key(y->value())))return false;
- }
-
- y=x;
- node_type::increment(y);
- return y==header()||!comp_(key(y->value()),key(v));
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- void detach_iterators(node_type* x)
- {
- iterator it=make_iterator(x);
- safe_mode::detach_equivalent_iterators(it);
- }
-#endif
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_impl(BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool>p=
- this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- iterator emplace_hint_impl(
- iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool>p=
- this->final_emplace_hint_(
- static_cast<final_node_type*>(position.get_node()),
- BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- return make_iterator(p.first);
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<iterator,iterator>
- range(LowerBounder lower,UpperBounder upper,none_unbounded_tag)const
- {
- node_type* y=header();
- node_type* z=root();
-
- while(z){
- if(!lower(key(z->value()))){
- z=node_type::from_impl(z->right());
- }
- else if(!upper(key(z->value()))){
- y=z;
- z=node_type::from_impl(z->left());
- }
- else{
- return std::pair<iterator,iterator>(
- make_iterator(
- lower_range(node_type::from_impl(z->left()),z,lower)),
- make_iterator(
- upper_range(node_type::from_impl(z->right()),y,upper)));
- }
- }
-
- return std::pair<iterator,iterator>(make_iterator(y),make_iterator(y));
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<iterator,iterator>
- range(LowerBounder,UpperBounder upper,lower_unbounded_tag)const
- {
- return std::pair<iterator,iterator>(
- begin(),
- make_iterator(upper_range(root(),header(),upper)));
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<iterator,iterator>
- range(LowerBounder lower,UpperBounder,upper_unbounded_tag)const
- {
- return std::pair<iterator,iterator>(
- make_iterator(lower_range(root(),header(),lower)),
- end());
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<iterator,iterator>
- range(LowerBounder,UpperBounder,both_unbounded_tag)const
- {
- return std::pair<iterator,iterator>(begin(),end());
- }
-
- template<typename LowerBounder>
- node_type * lower_range(node_type* top,node_type* y,LowerBounder lower)const
- {
- while(top){
- if(lower(key(top->value()))){
- y=top;
- top=node_type::from_impl(top->left());
- }
- else top=node_type::from_impl(top->right());
- }
-
- return y;
- }
-
- template<typename UpperBounder>
- node_type * upper_range(node_type* top,node_type* y,UpperBounder upper)const
- {
- while(top){
- if(!upper(key(top->value()))){
- y=top;
- top=node_type::from_impl(top->left());
- }
- else top=node_type::from_impl(top->right());
- }
-
- return y;
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm,
- ordered_unique_tag)const
- {
- super::save_(ar,version,sm);
- }
-
- template<typename Archive>
- void load_(
- Archive& ar,const unsigned int version,const index_loader_type& lm,
- ordered_unique_tag)
- {
- super::load_(ar,version,lm);
- }
-
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm,
- ordered_non_unique_tag)const
- {
- typedef duplicates_iterator<node_type,value_compare> dup_iterator;
-
- sm.save(
- dup_iterator(begin().get_node(),end().get_node(),value_comp()),
- dup_iterator(end().get_node(),value_comp()),
- ar,version);
- super::save_(ar,version,sm);
- }
-
- template<typename Archive>
- void load_(
- Archive& ar,const unsigned int version,const index_loader_type& lm,
- ordered_non_unique_tag)
- {
- lm.load(
- ::boost::bind(
- &ordered_index_impl::rearranger,this,
- ::boost::arg<1>(),::boost::arg<2>()),
- ar,version);
- super::load_(ar,version,lm);
- }
-
- void rearranger(node_type* position,node_type *x)
- {
- if(!position||comp_(key(position->value()),key(x->value()))){
- position=lower_bound(key(x->value())).get_node();
- }
- else if(comp_(key(x->value()),key(position->value()))){
- /* inconsistent rearrangement */
- throw_exception(
- archive::archive_exception(
- archive::archive_exception::other_exception));
- }
- else node_type::increment(position);
-
- if(position!=x){
- node_impl_type::rebalance_for_erase(
- x->impl(),header()->parent(),header()->left(),header()->right());
- node_impl_type::restore(
- x->impl(),position->impl(),header()->impl());
- }
- }
-#endif /* serialization */
-
-protected: /* for the benefit of AugmentPolicy::augmented_interface */
- key_from_value key;
- key_compare comp_;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-};
-
-template<
- typename KeyFromValue,typename Compare,
- typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
->
-class ordered_index:
- public AugmentPolicy::template augmented_interface<
- ordered_index_impl<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy
- >
- >::type
-{
- typedef typename AugmentPolicy::template
- augmented_interface<
- ordered_index_impl<
- KeyFromValue,Compare,
- SuperMeta,TagList,Category,AugmentPolicy
- >
- >::type super;
-public:
- typedef typename super::ctor_args_list ctor_args_list;
- typedef typename super::allocator_type allocator_type;
- typedef typename super::iterator iterator;
-
- /* construct/copy/destroy
- * Default and copy ctors are in the protected section as indices are
- * not supposed to be created on their own. No range ctor either.
- */
-
- ordered_index& operator=(const ordered_index& x)
- {
- this->final()=x.final();
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- ordered_index& operator=(
- std::initializer_list<BOOST_DEDUCED_TYPENAME super::value_type> list)
- {
- this->final()=list;
- return *this;
- }
-#endif
-
-protected:
- ordered_index(
- const ctor_args_list& args_list,const allocator_type& al):
- super(args_list,al){}
-
- ordered_index(const ordered_index& x):super(x){};
-
- ordered_index(const ordered_index& x,do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()){};
-};
-
-/* comparison */
-
-template<
- typename KeyFromValue1,typename Compare1,
- typename SuperMeta1,typename TagList1,typename Category1,
- typename AugmentPolicy1,
- typename KeyFromValue2,typename Compare2,
- typename SuperMeta2,typename TagList2,typename Category2,
- typename AugmentPolicy2
->
-bool operator==(
- const ordered_index<
- KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
- const ordered_index<
- KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
-{
- return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
-}
-
-template<
- typename KeyFromValue1,typename Compare1,
- typename SuperMeta1,typename TagList1,typename Category1,
- typename AugmentPolicy1,
- typename KeyFromValue2,typename Compare2,
- typename SuperMeta2,typename TagList2,typename Category2,
- typename AugmentPolicy2
->
-bool operator<(
- const ordered_index<
- KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
- const ordered_index<
- KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
-{
- return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
-}
-
-template<
- typename KeyFromValue1,typename Compare1,
- typename SuperMeta1,typename TagList1,typename Category1,
- typename AugmentPolicy1,
- typename KeyFromValue2,typename Compare2,
- typename SuperMeta2,typename TagList2,typename Category2,
- typename AugmentPolicy2
->
-bool operator!=(
- const ordered_index<
- KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
- const ordered_index<
- KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
-{
- return !(x==y);
-}
-
-template<
- typename KeyFromValue1,typename Compare1,
- typename SuperMeta1,typename TagList1,typename Category1,
- typename AugmentPolicy1,
- typename KeyFromValue2,typename Compare2,
- typename SuperMeta2,typename TagList2,typename Category2,
- typename AugmentPolicy2
->
-bool operator>(
- const ordered_index<
- KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
- const ordered_index<
- KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
-{
- return y<x;
-}
-
-template<
- typename KeyFromValue1,typename Compare1,
- typename SuperMeta1,typename TagList1,typename Category1,
- typename AugmentPolicy1,
- typename KeyFromValue2,typename Compare2,
- typename SuperMeta2,typename TagList2,typename Category2,
- typename AugmentPolicy2
->
-bool operator>=(
- const ordered_index<
- KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
- const ordered_index<
- KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
-{
- return !(x<y);
-}
-
-template<
- typename KeyFromValue1,typename Compare1,
- typename SuperMeta1,typename TagList1,typename Category1,
- typename AugmentPolicy1,
- typename KeyFromValue2,typename Compare2,
- typename SuperMeta2,typename TagList2,typename Category2,
- typename AugmentPolicy2
->
-bool operator<=(
- const ordered_index<
- KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
- const ordered_index<
- KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
-{
- return !(x>y);
-}
-
-/* specialized algorithms */
-
-template<
- typename KeyFromValue,typename Compare,
- typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
->
-void swap(
- ordered_index<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x,
- ordered_index<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-/* Boost.Foreach compatibility */
-
-template<
- typename KeyFromValue,typename Compare,
- typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
->
-inline boost::mpl::true_* boost_foreach_is_noncopyable(
- boost::multi_index::detail::ordered_index<
- KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>*&,
- boost_foreach_argument_dependent_lookup_hack)
-{
- return 0;
-}
-
-#undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT
-#undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 09627fd19cb..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_node.hpp
+++ /dev/null
@@ -1,669 +0,0 @@
-/* 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.
- *
- * The internal implementation of red-black trees is based on that of SGI STL
- * stl_tree.h file:
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_NODE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_NODE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <cstddef>
-#include <memory>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/raw_ptr.hpp>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES)
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/multi_index/detail/uintptr_type.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/type_traits/is_same.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* definition of red-black nodes for ordered_index */
-
-enum ordered_index_color{red=false,black=true};
-enum ordered_index_side{to_left=false,to_right=true};
-
-template<typename AugmentPolicy,typename Allocator>
-struct ordered_index_node_impl; /* fwd decl. */
-
-template<typename AugmentPolicy,typename Allocator>
-struct ordered_index_node_traits
-{
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,
- ordered_index_node_impl<AugmentPolicy,Allocator>
- >::type allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator::pointer pointer;
- typedef typename allocator::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<allocator> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
-#endif
-};
-
-template<typename AugmentPolicy,typename Allocator>
-struct ordered_index_node_std_base
-{
- typedef ordered_index_node_traits<
- AugmentPolicy,Allocator> node_traits;
- typedef typename node_traits::allocator node_allocator;
- typedef typename node_traits::pointer pointer;
- typedef typename node_traits::const_pointer const_pointer;
- typedef ordered_index_color& color_ref;
- typedef pointer& parent_ref;
-
- ordered_index_color& color(){return color_;}
- ordered_index_color color()const{return color_;}
- pointer& parent(){return parent_;}
- pointer parent()const{return parent_;}
- pointer& left(){return left_;}
- pointer left()const{return left_;}
- pointer& right(){return right_;}
- pointer right()const{return right_;}
-
-private:
- ordered_index_color color_;
- pointer parent_;
- pointer left_;
- pointer right_;
-};
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES)
-/* If ordered_index_node_impl has even alignment, we can use the least
- * significant bit of one of the ordered_index_node_impl pointers to
- * store color information. This typically reduces the size of
- * ordered_index_node_impl by 25%.
- */
-
-#if defined(BOOST_MSVC)
-/* This code casts pointers to an integer type that has been computed
- * to be large enough to hold the pointer, however the metaprogramming
- * logic is not always spotted by the VC++ code analyser that issues a
- * long list of warnings.
- */
-
-#pragma warning(push)
-#pragma warning(disable:4312 4311)
-#endif
-
-template<typename AugmentPolicy,typename Allocator>
-struct ordered_index_node_compressed_base
-{
- typedef ordered_index_node_impl<
- AugmentPolicy,Allocator>* pointer;
- typedef const ordered_index_node_impl<
- AugmentPolicy,Allocator>* const_pointer;
-
- struct color_ref
- {
- color_ref(uintptr_type* r_):r(r_){}
-
- operator ordered_index_color()const
- {
- return ordered_index_color(*r&uintptr_type(1));
- }
-
- color_ref& operator=(ordered_index_color c)
- {
- *r&=~uintptr_type(1);
- *r|=uintptr_type(c);
- return *this;
- }
-
- color_ref& operator=(const color_ref& x)
- {
- return operator=(x.operator ordered_index_color());
- }
-
- private:
- uintptr_type* r;
- };
-
- struct parent_ref
- {
- parent_ref(uintptr_type* r_):r(r_){}
-
- operator pointer()const
- {
- return (pointer)(void*)(*r&~uintptr_type(1));
- }
-
- parent_ref& operator=(pointer p)
- {
- *r=((uintptr_type)(void*)p)|(*r&uintptr_type(1));
- return *this;
- }
-
- parent_ref& operator=(const parent_ref& x)
- {
- return operator=(x.operator pointer());
- }
-
- pointer operator->()const
- {
- return operator pointer();
- }
-
- private:
- uintptr_type* r;
- };
-
- color_ref color(){return color_ref(&parentcolor_);}
- ordered_index_color color()const
- {
- return ordered_index_color(parentcolor_&uintptr_type(1));
- }
-
- parent_ref parent(){return parent_ref(&parentcolor_);}
- pointer parent()const
- {
- return (pointer)(void*)(parentcolor_&~uintptr_type(1));
- }
-
- pointer& left(){return left_;}
- pointer left()const{return left_;}
- pointer& right(){return right_;}
- pointer right()const{return right_;}
-
-private:
- uintptr_type parentcolor_;
- pointer left_;
- pointer right_;
-};
-#if defined(BOOST_MSVC)
-#pragma warning(pop)
-#endif
-#endif
-
-template<typename AugmentPolicy,typename Allocator>
-struct ordered_index_node_impl_base:
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES)
- AugmentPolicy::template augmented_node<
- typename mpl::if_c<
- !(has_uintptr_type::value)||
- (alignment_of<
- ordered_index_node_compressed_base<AugmentPolicy,Allocator>
- >::value%2)||
- !(is_same<
- typename ordered_index_node_traits<AugmentPolicy,Allocator>::pointer,
- ordered_index_node_impl<AugmentPolicy,Allocator>*>::value),
- ordered_index_node_std_base<AugmentPolicy,Allocator>,
- ordered_index_node_compressed_base<AugmentPolicy,Allocator>
- >::type
- >::type
-#else
- AugmentPolicy::template augmented_node<
- ordered_index_node_std_base<AugmentPolicy,Allocator>
- >::type
-#endif
-
-{};
-
-template<typename AugmentPolicy,typename Allocator>
-struct ordered_index_node_impl:
- ordered_index_node_impl_base<AugmentPolicy,Allocator>
-{
-private:
- typedef ordered_index_node_impl_base<AugmentPolicy,Allocator> super;
-
-public:
- typedef typename super::color_ref color_ref;
- typedef typename super::parent_ref parent_ref;
- typedef typename super::pointer pointer;
- typedef typename super::const_pointer const_pointer;
-
- /* interoperability with bidir_node_iterator */
-
- static void increment(pointer& x)
- {
- if(x->right()!=pointer(0)){
- x=x->right();
- while(x->left()!=pointer(0))x=x->left();
- }
- else{
- pointer y=x->parent();
- while(x==y->right()){
- x=y;
- y=y->parent();
- }
- if(x->right()!=y)x=y;
- }
- }
-
- static void decrement(pointer& x)
- {
- if(x->color()==red&&x->parent()->parent()==x){
- x=x->right();
- }
- else if(x->left()!=pointer(0)){
- pointer y=x->left();
- while(y->right()!=pointer(0))y=y->right();
- x=y;
- }else{
- pointer y=x->parent();
- while(x==y->left()){
- x=y;
- y=y->parent();
- }
- x=y;
- }
- }
-
- /* algorithmic stuff */
-
- static void rotate_left(pointer x,parent_ref root)
- {
- pointer y=x->right();
- x->right()=y->left();
- if(y->left()!=pointer(0))y->left()->parent()=x;
- y->parent()=x->parent();
-
- if(x==root) root=y;
- else if(x==x->parent()->left())x->parent()->left()=y;
- else x->parent()->right()=y;
- y->left()=x;
- x->parent()=y;
- AugmentPolicy::rotate_left(x,y);
- }
-
- static pointer minimum(pointer x)
- {
- while(x->left()!=pointer(0))x=x->left();
- return x;
- }
-
- static pointer maximum(pointer x)
- {
- while(x->right()!=pointer(0))x=x->right();
- return x;
- }
-
- static void rotate_right(pointer x,parent_ref root)
- {
- pointer y=x->left();
- x->left()=y->right();
- if(y->right()!=pointer(0))y->right()->parent()=x;
- y->parent()=x->parent();
-
- if(x==root) root=y;
- else if(x==x->parent()->right())x->parent()->right()=y;
- else x->parent()->left()=y;
- y->right()=x;
- x->parent()=y;
- AugmentPolicy::rotate_right(x,y);
- }
-
- static void rebalance(pointer x,parent_ref root)
- {
- x->color()=red;
- while(x!=root&&x->parent()->color()==red){
- if(x->parent()==x->parent()->parent()->left()){
- pointer y=x->parent()->parent()->right();
- if(y!=pointer(0)&&y->color()==red){
- x->parent()->color()=black;
- y->color()=black;
- x->parent()->parent()->color()=red;
- x=x->parent()->parent();
- }
- else{
- if(x==x->parent()->right()){
- x=x->parent();
- rotate_left(x,root);
- }
- x->parent()->color()=black;
- x->parent()->parent()->color()=red;
- rotate_right(x->parent()->parent(),root);
- }
- }
- else{
- pointer y=x->parent()->parent()->left();
- if(y!=pointer(0)&&y->color()==red){
- x->parent()->color()=black;
- y->color()=black;
- x->parent()->parent()->color()=red;
- x=x->parent()->parent();
- }
- else{
- if(x==x->parent()->left()){
- x=x->parent();
- rotate_right(x,root);
- }
- x->parent()->color()=black;
- x->parent()->parent()->color()=red;
- rotate_left(x->parent()->parent(),root);
- }
- }
- }
- root->color()=black;
- }
-
- static void link(
- pointer x,ordered_index_side side,pointer position,pointer header)
- {
- if(side==to_left){
- position->left()=x; /* also makes leftmost=x when parent==header */
- if(position==header){
- header->parent()=x;
- header->right()=x;
- }
- else if(position==header->left()){
- header->left()=x; /* maintain leftmost pointing to min node */
- }
- }
- else{
- position->right()=x;
- if(position==header->right()){
- header->right()=x; /* maintain rightmost pointing to max node */
- }
- }
- x->parent()=position;
- x->left()=pointer(0);
- x->right()=pointer(0);
- AugmentPolicy::add(x,pointer(header->parent()));
- ordered_index_node_impl::rebalance(x,header->parent());
- }
-
- static pointer rebalance_for_erase(
- pointer z,parent_ref root,pointer& leftmost,pointer& rightmost)
- {
- pointer y=z;
- pointer x=pointer(0);
- pointer x_parent=pointer(0);
- if(y->left()==pointer(0)){ /* z has at most one non-null child. y==z. */
- x=y->right(); /* x might be null */
- }
- else{
- if(y->right()==pointer(0)){ /* z has exactly one non-null child. y==z. */
- x=y->left(); /* x is not null */
- }
- else{ /* z has two non-null children. Set y to */
- y=y->right(); /* z's successor. x might be null. */
- while(y->left()!=pointer(0))y=y->left();
- x=y->right();
- }
- }
- AugmentPolicy::remove(y,pointer(root));
- if(y!=z){
- AugmentPolicy::copy(z,y);
- z->left()->parent()=y; /* relink y in place of z. y is z's successor */
- y->left()=z->left();
- if(y!=z->right()){
- x_parent=y->parent();
- if(x!=pointer(0))x->parent()=y->parent();
- y->parent()->left()=x; /* y must be a child of left */
- y->right()=z->right();
- z->right()->parent()=y;
- }
- else{
- x_parent=y;
- }
-
- if(root==z) root=y;
- else if(z->parent()->left()==z)z->parent()->left()=y;
- else z->parent()->right()=y;
- y->parent()=z->parent();
- ordered_index_color c=y->color();
- y->color()=z->color();
- z->color()=c;
- y=z; /* y now points to node to be actually deleted */
- }
- else{ /* y==z */
- x_parent=y->parent();
- if(x!=pointer(0))x->parent()=y->parent();
- if(root==z){
- root=x;
- }
- else{
- if(z->parent()->left()==z)z->parent()->left()=x;
- else z->parent()->right()=x;
- }
- if(leftmost==z){
- if(z->right()==pointer(0)){ /* z->left() must be null also */
- leftmost=z->parent();
- }
- else{
- leftmost=minimum(x); /* makes leftmost==header if z==root */
- }
- }
- if(rightmost==z){
- if(z->left()==pointer(0)){ /* z->right() must be null also */
- rightmost=z->parent();
- }
- else{ /* x==z->left() */
- rightmost=maximum(x); /* makes rightmost==header if z==root */
- }
- }
- }
- if(y->color()!=red){
- while(x!=root&&(x==pointer(0)|| x->color()==black)){
- if(x==x_parent->left()){
- pointer w=x_parent->right();
- if(w->color()==red){
- w->color()=black;
- x_parent->color()=red;
- rotate_left(x_parent,root);
- w=x_parent->right();
- }
- if((w->left()==pointer(0)||w->left()->color()==black) &&
- (w->right()==pointer(0)||w->right()->color()==black)){
- w->color()=red;
- x=x_parent;
- x_parent=x_parent->parent();
- }
- else{
- if(w->right()==pointer(0 )
- || w->right()->color()==black){
- if(w->left()!=pointer(0)) w->left()->color()=black;
- w->color()=red;
- rotate_right(w,root);
- w=x_parent->right();
- }
- w->color()=x_parent->color();
- x_parent->color()=black;
- if(w->right()!=pointer(0))w->right()->color()=black;
- rotate_left(x_parent,root);
- break;
- }
- }
- else{ /* same as above,with right <-> left */
- pointer w=x_parent->left();
- if(w->color()==red){
- w->color()=black;
- x_parent->color()=red;
- rotate_right(x_parent,root);
- w=x_parent->left();
- }
- if((w->right()==pointer(0)||w->right()->color()==black) &&
- (w->left()==pointer(0)||w->left()->color()==black)){
- w->color()=red;
- x=x_parent;
- x_parent=x_parent->parent();
- }
- else{
- if(w->left()==pointer(0)||w->left()->color()==black){
- if(w->right()!=pointer(0))w->right()->color()=black;
- w->color()=red;
- rotate_left(w,root);
- w=x_parent->left();
- }
- w->color()=x_parent->color();
- x_parent->color()=black;
- if(w->left()!=pointer(0))w->left()->color()=black;
- rotate_right(x_parent,root);
- break;
- }
- }
- }
- if(x!=pointer(0))x->color()=black;
- }
- return y;
- }
-
- static void restore(pointer x,pointer position,pointer header)
- {
- if(position->left()==pointer(0)||position->left()==header){
- link(x,to_left,position,header);
- }
- else{
- decrement(position);
- link(x,to_right,position,header);
- }
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- static std::size_t black_count(pointer node,pointer root)
- {
- if(node==pointer(0))return 0;
- std::size_t sum=0;
- for(;;){
- if(node->color()==black)++sum;
- if(node==root)break;
- node=node->parent();
- }
- return sum;
- }
-#endif
-};
-
-template<typename AugmentPolicy,typename Super>
-struct ordered_index_node_trampoline:
- ordered_index_node_impl<
- AugmentPolicy,
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- >
-{
- typedef ordered_index_node_impl<
- AugmentPolicy,
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- > impl_type;
-};
-
-template<typename AugmentPolicy,typename Super>
-struct ordered_index_node:
- Super,ordered_index_node_trampoline<AugmentPolicy,Super>
-{
-private:
- typedef ordered_index_node_trampoline<AugmentPolicy,Super> trampoline;
-
-public:
- typedef typename trampoline::impl_type impl_type;
- typedef typename trampoline::color_ref impl_color_ref;
- typedef typename trampoline::parent_ref impl_parent_ref;
- typedef typename trampoline::pointer impl_pointer;
- typedef typename trampoline::const_pointer const_impl_pointer;
-
- impl_color_ref color(){return trampoline::color();}
- ordered_index_color color()const{return trampoline::color();}
- impl_parent_ref parent(){return trampoline::parent();}
- impl_pointer parent()const{return trampoline::parent();}
- impl_pointer& left(){return trampoline::left();}
- impl_pointer left()const{return trampoline::left();}
- impl_pointer& right(){return trampoline::right();}
- impl_pointer right()const{return trampoline::right();}
-
- impl_pointer impl()
- {
- return static_cast<impl_pointer>(
- static_cast<impl_type*>(static_cast<trampoline*>(this)));
- }
-
- const_impl_pointer impl()const
- {
- return static_cast<const_impl_pointer>(
- static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
- }
-
- static ordered_index_node* from_impl(impl_pointer x)
- {
- return
- static_cast<ordered_index_node*>(
- static_cast<trampoline*>(
- raw_ptr<impl_type*>(x)));
- }
-
- static const ordered_index_node* from_impl(const_impl_pointer x)
- {
- return
- static_cast<const ordered_index_node*>(
- static_cast<const trampoline*>(
- raw_ptr<const impl_type*>(x)));
- }
-
- /* interoperability with bidir_node_iterator */
-
- static void increment(ordered_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::increment(xi);
- x=from_impl(xi);
- }
-
- static void decrement(ordered_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::decrement(xi);
- x=from_impl(xi);
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 4b00345a6d9..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_loader.hpp
+++ /dev/null
@@ -1,173 +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 http://www.boost.org/libs/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RND_INDEX_LOADER_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_LOADER_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
-#include <boost/noncopyable.hpp>
-#include <cstddef>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* This class implements a serialization rearranger for random access
- * indices. In order to achieve O(n) performance, the following strategy
- * is followed: the nodes of the index are handled as if in a bidirectional
- * list, where the next pointers are stored in the original
- * random_access_index_ptr_array and the prev pointers are stored in
- * an auxiliary array. Rearranging of nodes in such a bidirectional list
- * is constant time. Once all the arrangements are performed (on destruction
- * time) the list is traversed in reverse order and
- * pointers are swapped and set accordingly so that they recover its
- * original semantics ( *(node->up())==node ) while retaining the
- * new order.
- */
-
-template<typename Allocator>
-class random_access_index_loader_base:private noncopyable
-{
-protected:
- typedef random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- Allocator,
- char
- >::type
- > node_impl_type;
- typedef typename node_impl_type::pointer node_impl_pointer;
- typedef random_access_index_ptr_array<Allocator> ptr_array;
-
- random_access_index_loader_base(const Allocator& al_,ptr_array& ptrs_):
- al(al_),
- ptrs(ptrs_),
- header(*ptrs.end()),
- prev_spc(al,0),
- preprocessed(false)
- {}
-
- ~random_access_index_loader_base()
- {
- if(preprocessed)
- {
- node_impl_pointer n=header;
- next(n)=n;
-
- for(std::size_t i=ptrs.size();i--;){
- n=prev(n);
- std::size_t d=position(n);
- if(d!=i){
- node_impl_pointer m=prev(next_at(i));
- std::swap(m->up(),n->up());
- next_at(d)=next_at(i);
- std::swap(prev_at(d),prev_at(i));
- }
- next(n)=n;
- }
- }
- }
-
- void rearrange(node_impl_pointer position_,node_impl_pointer x)
- {
- preprocess(); /* only incur this penalty if rearrange() is ever called */
- if(position_==node_impl_pointer(0))position_=header;
- next(prev(x))=next(x);
- prev(next(x))=prev(x);
- prev(x)=position_;
- next(x)=next(position_);
- next(prev(x))=prev(next(x))=x;
- }
-
-private:
- void preprocess()
- {
- if(!preprocessed){
- /* get space for the auxiliary prev array */
- auto_space<node_impl_pointer,Allocator> tmp(al,ptrs.size()+1);
- prev_spc.swap(tmp);
-
- /* prev_spc elements point to the prev nodes */
- std::rotate_copy(
- &*ptrs.begin(),&*ptrs.end(),&*ptrs.end()+1,&*prev_spc.data());
-
- /* ptrs elements point to the next nodes */
- std::rotate(&*ptrs.begin(),&*ptrs.begin()+1,&*ptrs.end()+1);
-
- preprocessed=true;
- }
- }
-
- std::size_t position(node_impl_pointer x)const
- {
- return (std::size_t)(x->up()-ptrs.begin());
- }
-
- node_impl_pointer& next_at(std::size_t n)const
- {
- return *ptrs.at(n);
- }
-
- node_impl_pointer& prev_at(std::size_t n)const
- {
- return *(prev_spc.data()+n);
- }
-
- node_impl_pointer& next(node_impl_pointer x)const
- {
- return *(x->up());
- }
-
- node_impl_pointer& prev(node_impl_pointer x)const
- {
- return prev_at(position(x));
- }
-
- Allocator al;
- ptr_array& ptrs;
- node_impl_pointer header;
- auto_space<node_impl_pointer,Allocator> prev_spc;
- bool preprocessed;
-};
-
-template<typename Node,typename Allocator>
-class random_access_index_loader:
- private random_access_index_loader_base<Allocator>
-{
- typedef random_access_index_loader_base<Allocator> super;
- typedef typename super::node_impl_pointer node_impl_pointer;
- typedef typename super::ptr_array ptr_array;
-
-public:
- random_access_index_loader(const Allocator& al_,ptr_array& ptrs_):
- super(al_,ptrs_)
- {}
-
- void rearrange(Node* position_,Node *x)
- {
- super::rearrange(
- position_?position_->impl():node_impl_pointer(0),x->impl());
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 72d93846a00..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_node.hpp
+++ /dev/null
@@ -1,283 +0,0 @@
-/* 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_DETAIL_RND_INDEX_NODE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_NODE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/integer/common_factor_rt.hpp>
-#include <boost/multi_index/detail/raw_ptr.hpp>
-#include <cstddef>
-#include <functional>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-template<typename Allocator>
-struct random_access_index_node_impl
-{
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,random_access_index_node_impl
- >::type node_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename node_allocator::pointer pointer;
- typedef typename node_allocator::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<node_allocator> node_traits;
- typedef typename node_traits::pointer pointer;
- typedef typename node_traits::const_pointer const_pointer;
-#endif
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,pointer
- >::type ptr_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename ptr_allocator::pointer ptr_pointer;
-#else
- typedef std::allocator_traits<ptr_allocator> ptr_traits;
- typedef typename ptr_traits::pointer ptr_pointer;
-#endif
- ptr_pointer& up(){return up_;}
- ptr_pointer up()const{return up_;}
-
- /* interoperability with rnd_node_iterator */
-
- static void increment(pointer& x)
- {
- x=*(x->up()+1);
- }
-
- static void decrement(pointer& x)
- {
- x=*(x->up()-1);
- }
-
- static void advance(pointer& x,std::ptrdiff_t n)
- {
- x=*(x->up()+n);
- }
-
- static std::ptrdiff_t distance(pointer x,pointer y)
- {
- return y->up()-x->up();
- }
-
- /* algorithmic stuff */
-
- static void relocate(ptr_pointer pos,ptr_pointer x)
- {
- pointer n=*x;
- if(x<pos){
- extract(x,pos);
- *(pos-1)=n;
- n->up()=pos-1;
- }
- else{
- while(x!=pos){
- *x=*(x-1);
- (*x)->up()=x;
- --x;
- }
- *pos=n;
- n->up()=pos;
- }
- };
-
- static void relocate(ptr_pointer pos,ptr_pointer first,ptr_pointer last)
- {
- ptr_pointer begin,middle,end;
- if(pos<first){
- begin=pos;
- middle=first;
- end=last;
- }
- else{
- begin=first;
- middle=last;
- end=pos;
- }
-
- std::ptrdiff_t n=end-begin;
- std::ptrdiff_t m=middle-begin;
- std::ptrdiff_t n_m=n-m;
- std::ptrdiff_t p=integer::gcd(n,m);
-
- for(std::ptrdiff_t i=0;i<p;++i){
- pointer tmp=begin[i];
- for(std::ptrdiff_t j=i,k;;){
- if(j<n_m)k=j+m;
- else k=j-n_m;
- if(k==i){
- *(begin+j)=tmp;
- (*(begin+j))->up()=begin+j;
- break;
- }
- else{
- *(begin+j)=*(begin+k);
- (*(begin+j))->up()=begin+j;
- }
-
- if(k<n_m)j=k+m;
- else j=k-n_m;
- if(j==i){
- *(begin+k)=tmp;
- (*(begin+k))->up()=begin+k;
- break;
- }
- else{
- *(begin+k)=*(begin+j);
- (*(begin+k))->up()=begin+k;
- }
- }
- }
- };
-
- static void extract(ptr_pointer x,ptr_pointer pend)
- {
- --pend;
- while(x!=pend){
- *x=*(x+1);
- (*x)->up()=x;
- ++x;
- }
- }
-
- static void transfer(
- ptr_pointer pbegin0,ptr_pointer pend0,ptr_pointer pbegin1)
- {
- while(pbegin0!=pend0){
- *pbegin1=*pbegin0++;
- (*pbegin1)->up()=pbegin1;
- ++pbegin1;
- }
- }
-
- static void reverse(ptr_pointer pbegin,ptr_pointer pend)
- {
- std::ptrdiff_t d=(pend-pbegin)/2;
- for(std::ptrdiff_t i=0;i<d;++i){
- std::swap(*pbegin,*--pend);
- (*pbegin)->up()=pbegin;
- (*pend)->up()=pend;
- ++pbegin;
- }
- }
-
-private:
- ptr_pointer up_;
-};
-
-template<typename Super>
-struct random_access_index_node_trampoline:
- random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- >
-{
- typedef random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- > impl_type;
-};
-
-template<typename Super>
-struct random_access_index_node:
- Super,random_access_index_node_trampoline<Super>
-{
-private:
- typedef random_access_index_node_trampoline<Super> trampoline;
-
-public:
- typedef typename trampoline::impl_type impl_type;
- typedef typename trampoline::pointer impl_pointer;
- typedef typename trampoline::const_pointer const_impl_pointer;
- typedef typename trampoline::ptr_pointer impl_ptr_pointer;
-
- impl_ptr_pointer& up(){return trampoline::up();}
- impl_ptr_pointer up()const{return trampoline::up();}
-
- impl_pointer impl()
- {
- return static_cast<impl_pointer>(
- static_cast<impl_type*>(static_cast<trampoline*>(this)));
- }
-
- const_impl_pointer impl()const
- {
- return static_cast<const_impl_pointer>(
- static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
- }
-
- static random_access_index_node* from_impl(impl_pointer x)
- {
- return
- static_cast<random_access_index_node*>(
- static_cast<trampoline*>(
- raw_ptr<impl_type*>(x)));
- }
-
- static const random_access_index_node* from_impl(const_impl_pointer x)
- {
- return
- static_cast<const random_access_index_node*>(
- static_cast<const trampoline*>(
- raw_ptr<const impl_type*>(x)));
- }
-
- /* interoperability with rnd_node_iterator */
-
- static void increment(random_access_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::increment(xi);
- x=from_impl(xi);
- }
-
- static void decrement(random_access_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::decrement(xi);
- x=from_impl(xi);
- }
-
- static void advance(random_access_index_node*& x,std::ptrdiff_t n)
- {
- impl_pointer xi=x->impl();
- trampoline::advance(xi,n);
- x=from_impl(xi);
- }
-
- static std::ptrdiff_t distance(
- random_access_index_node* x,random_access_index_node* y)
- {
- return trampoline::distance(x->impl(),y->impl());
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 795f9cf2742..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ptr_array.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* 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_DETAIL_RND_INDEX_PTR_ARRAY_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_PTR_ARRAY_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/rnd_index_node.hpp>
-#include <boost/noncopyable.hpp>
-#include <cstddef>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* pointer structure for use by random access indices */
-
-template<typename Allocator>
-class random_access_index_ptr_array:private noncopyable
-{
- typedef random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- Allocator,
- char
- >::type
- > node_impl_type;
-
-public:
- typedef typename node_impl_type::pointer value_type;
- typedef typename boost::detail::allocator::rebind_to<
- Allocator,value_type
- >::type value_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename value_allocator::pointer pointer;
-#else
- typedef typename std::allocator_traits<
- value_allocator
- >::pointer pointer;
-#endif
-
- random_access_index_ptr_array(
- const Allocator& al,value_type end_,std::size_t sz):
- size_(sz),
- capacity_(sz),
- spc(al,capacity_+1)
- {
- *end()=end_;
- end_->up()=end();
- }
-
- std::size_t size()const{return size_;}
- std::size_t capacity()const{return capacity_;}
-
- void room_for_one()
- {
- if(size_==capacity_){
- reserve(capacity_<=10?15:capacity_+capacity_/2);
- }
- }
-
- void reserve(std::size_t c)
- {
- if(c>capacity_)set_capacity(c);
- }
-
- void shrink_to_fit()
- {
- if(capacity_>size_)set_capacity(size_);
- }
-
- pointer begin()const{return ptrs();}
- pointer end()const{return ptrs()+size_;}
- pointer at(std::size_t n)const{return ptrs()+n;}
-
- void push_back(value_type x)
- {
- *(end()+1)=*end();
- (*(end()+1))->up()=end()+1;
- *end()=x;
- (*end())->up()=end();
- ++size_;
- }
-
- void erase(value_type x)
- {
- node_impl_type::extract(x->up(),end()+1);
- --size_;
- }
-
- void clear()
- {
- *begin()=*end();
- (*begin())->up()=begin();
- size_=0;
- }
-
- void swap(random_access_index_ptr_array& x)
- {
- std::swap(size_,x.size_);
- std::swap(capacity_,x.capacity_);
- spc.swap(x.spc);
- }
-
-private:
- std::size_t size_;
- std::size_t capacity_;
- auto_space<value_type,Allocator> spc;
-
- pointer ptrs()const
- {
- return spc.data();
- }
-
- void set_capacity(std::size_t c)
- {
- auto_space<value_type,Allocator> spc1(spc.get_allocator(),c+1);
- node_impl_type::transfer(begin(),end()+1,spc1.data());
- spc.swap(spc1);
- capacity_=c;
- }
-};
-
-template<typename Allocator>
-void swap(
- random_access_index_ptr_array<Allocator>& x,
- random_access_index_ptr_array<Allocator>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 48026132fb7..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_node_iterator.hpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright 2003-2014 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_DETAIL_RND_NODE_ITERATOR_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_NODE_ITERATOR_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/operators.hpp>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Iterator class for node-based indices with random access iterators. */
-
-template<typename Node>
-class rnd_node_iterator:
- public random_access_iterator_helper<
- rnd_node_iterator<Node>,
- typename Node::value_type,
- std::ptrdiff_t,
- const typename Node::value_type*,
- const typename Node::value_type&>
-{
-public:
- /* coverity[uninit_ctor]: suppress warning */
- rnd_node_iterator(){}
- explicit rnd_node_iterator(Node* node_):node(node_){}
-
- const typename Node::value_type& operator*()const
- {
- return node->value();
- }
-
- rnd_node_iterator& operator++()
- {
- Node::increment(node);
- return *this;
- }
-
- rnd_node_iterator& operator--()
- {
- Node::decrement(node);
- return *this;
- }
-
- rnd_node_iterator& operator+=(std::ptrdiff_t n)
- {
- Node::advance(node,n);
- return *this;
- }
-
- rnd_node_iterator& operator-=(std::ptrdiff_t n)
- {
- Node::advance(node,-n);
- return *this;
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* Serialization. As for why the following is public,
- * see explanation in safe_mode_iterator notes in safe_mode.hpp.
- */
-
- BOOST_SERIALIZATION_SPLIT_MEMBER()
-
- typedef typename Node::base_type node_base_type;
-
- template<class Archive>
- void save(Archive& ar,const unsigned int)const
- {
- node_base_type* bnode=node;
- ar<<serialization::make_nvp("pointer",bnode);
- }
-
- template<class Archive>
- void load(Archive& ar,const unsigned int)
- {
- node_base_type* bnode;
- ar>>serialization::make_nvp("pointer",bnode);
- node=static_cast<Node*>(bnode);
- }
-#endif
-
- /* get_node is not to be used by the user */
-
- typedef Node node_type;
-
- Node* get_node()const{return node;}
-
-private:
- Node* node;
-};
-
-template<typename Node>
-bool operator==(
- const rnd_node_iterator<Node>& x,
- const rnd_node_iterator<Node>& y)
-{
- return x.get_node()==y.get_node();
-}
-
-template<typename Node>
-bool operator<(
- const rnd_node_iterator<Node>& x,
- const rnd_node_iterator<Node>& y)
-{
- return Node::distance(x.get_node(),y.get_node())>0;
-}
-
-template<typename Node>
-std::ptrdiff_t operator-(
- const rnd_node_iterator<Node>& x,
- const rnd_node_iterator<Node>& y)
-{
- return Node::distance(y.get_node(),x.get_node());
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index fb233cf4973..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnk_index_ops.hpp
+++ /dev/null
@@ -1,300 +0,0 @@
-/* Copyright 2003-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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RNK_INDEX_OPS_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RNK_INDEX_OPS_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/mpl/and.hpp>
-#include <boost/multi_index/detail/promotes_arg.hpp>
-#include <cstddef>
-#include <utility>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Common code for ranked_index memfuns having templatized and
- * non-templatized versions.
- */
-
-template<typename Pointer>
-inline std::size_t ranked_node_size(Pointer x)
-{
- return x!=Pointer(0)?x->size:0;
-}
-
-template<typename Pointer>
-inline Pointer ranked_index_nth(std::size_t n,Pointer end_)
-{
- Pointer top=end_->parent();
- if(top==Pointer(0)||n>=top->size)return end_;
-
- for(;;){
- std::size_t s=ranked_node_size(top->left());
- if(n==s)return top;
- if(n<s)top=top->left();
- else{
- top=top->right();
- n-=s+1;
- }
- }
-}
-
-template<typename Pointer>
-inline std::size_t ranked_index_rank(Pointer x,Pointer end_)
-{
- Pointer top=end_->parent();
- if(top==Pointer(0))return 0;
- if(x==end_)return top->size;
-
- std::size_t s=ranked_node_size(x->left());
- while(x!=top){
- Pointer z=x->parent();
- if(x==z->right()){
- s+=ranked_node_size(z->left())+1;
- }
- x=z;
- }
- return s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_find_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_find_rank(
- top,y,key,x,comp,
- mpl::and_<
- promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
- promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::size_t ranked_index_find_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_find_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_find_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return 0;
-
- std::size_t s=top->impl()->size,
- s0=s;
- Node* y0=y;
-
- do{
- if(!comp(key(top->value()),x)){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else top=Node::from_impl(top->right());
- }while(top);
-
- return (y==y0||comp(x,key(y->value())))?s0:s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_lower_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_lower_bound_rank(
- top,y,key,x,comp,
- promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey>());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::size_t ranked_index_lower_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_lower_bound_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_lower_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(!comp(key(top->value()),x)){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else top=Node::from_impl(top->right());
- }while(top);
-
- return s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_upper_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_upper_bound_rank(
- top,y,key,x,comp,
- promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::size_t ranked_index_upper_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_upper_bound_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_upper_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(comp(x,key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else top=Node::from_impl(top->right());
- }while(top);
-
- return s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::pair<std::size_t,std::size_t> ranked_index_equal_range_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_equal_range_rank(
- top,y,key,x,comp,
- mpl::and_<
- promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
- promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::pair<std::size_t,std::size_t> ranked_index_equal_range_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_equal_range_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::pair<std::size_t,std::size_t> ranked_index_equal_range_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return std::pair<std::size_t,std::size_t>(0,0);
-
- std::size_t s=top->impl()->size;
-
- do{
- if(comp(key(top->value()),x)){
- top=Node::from_impl(top->right());
- }
- else if(comp(x,key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else{
- return std::pair<std::size_t,std::size_t>(
- s-top->impl()->size+
- ranked_index_lower_bound_rank(
- Node::from_impl(top->left()),top,key,x,comp,mpl::false_()),
- s-ranked_node_size(top->right())+
- ranked_index_upper_bound_rank(
- Node::from_impl(top->right()),y,key,x,comp,mpl::false_()));
- }
- }while(top);
-
- return std::pair<std::size_t,std::size_t>(s,s);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index abbe4e5795f..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_node.hpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/* 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_DETAIL_SEQ_INDEX_NODE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_SEQ_INDEX_NODE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <memory>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/raw_ptr.hpp>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* doubly-linked node for use by sequenced_index */
-
-template<typename Allocator>
-struct sequenced_index_node_impl
-{
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,sequenced_index_node_impl
- >::type node_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename node_allocator::pointer pointer;
- typedef typename node_allocator::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<node_allocator> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
-#endif
- pointer& prior(){return prior_;}
- pointer prior()const{return prior_;}
- pointer& next(){return next_;}
- pointer next()const{return next_;}
-
- /* interoperability with bidir_node_iterator */
-
- static void increment(pointer& x){x=x->next();}
- static void decrement(pointer& x){x=x->prior();}
-
- /* algorithmic stuff */
-
- static void link(pointer x,pointer header)
- {
- x->prior()=header->prior();
- x->next()=header;
- x->prior()->next()=x->next()->prior()=x;
- };
-
- static void unlink(pointer x)
- {
- x->prior()->next()=x->next();
- x->next()->prior()=x->prior();
- }
-
- static void relink(pointer position,pointer x)
- {
- unlink(x);
- x->prior()=position->prior();
- x->next()=position;
- x->prior()->next()=x->next()->prior()=x;
- }
-
- static void relink(pointer position,pointer x,pointer y)
- {
- /* position is assumed not to be in [x,y) */
-
- if(x!=y){
- pointer z=y->prior();
- x->prior()->next()=y;
- y->prior()=x->prior();
- x->prior()=position->prior();
- z->next()=position;
- x->prior()->next()=x;
- z->next()->prior()=z;
- }
- }
-
- static void reverse(pointer header)
- {
- pointer x=header;
- do{
- pointer y=x->next();
- std::swap(x->prior(),x->next());
- x=y;
- }while(x!=header);
- }
-
- static void swap(pointer x,pointer y)
- {
- /* This swap function does not exchange the header nodes,
- * but rather their pointers. This is *not* used for implementing
- * sequenced_index::swap.
- */
-
- if(x->next()!=x){
- if(y->next()!=y){
- std::swap(x->next(),y->next());
- std::swap(x->prior(),y->prior());
- x->next()->prior()=x->prior()->next()=x;
- y->next()->prior()=y->prior()->next()=y;
- }
- else{
- y->next()=x->next();
- y->prior()=x->prior();
- x->next()=x->prior()=x;
- y->next()->prior()=y->prior()->next()=y;
- }
- }
- else if(y->next()!=y){
- x->next()=y->next();
- x->prior()=y->prior();
- y->next()=y->prior()=y;
- x->next()->prior()=x->prior()->next()=x;
- }
- }
-
-private:
- pointer prior_;
- pointer next_;
-};
-
-template<typename Super>
-struct sequenced_index_node_trampoline:
- sequenced_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- >
-{
- typedef sequenced_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- > impl_type;
-};
-
-template<typename Super>
-struct sequenced_index_node:Super,sequenced_index_node_trampoline<Super>
-{
-private:
- typedef sequenced_index_node_trampoline<Super> trampoline;
-
-public:
- typedef typename trampoline::impl_type impl_type;
- typedef typename trampoline::pointer impl_pointer;
- typedef typename trampoline::const_pointer const_impl_pointer;
-
- impl_pointer& prior(){return trampoline::prior();}
- impl_pointer prior()const{return trampoline::prior();}
- impl_pointer& next(){return trampoline::next();}
- impl_pointer next()const{return trampoline::next();}
-
- impl_pointer impl()
- {
- return static_cast<impl_pointer>(
- static_cast<impl_type*>(static_cast<trampoline*>(this)));
- }
-
- const_impl_pointer impl()const
- {
- return static_cast<const_impl_pointer>(
- static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
- }
-
- static sequenced_index_node* from_impl(impl_pointer x)
- {
- return
- static_cast<sequenced_index_node*>(
- static_cast<trampoline*>(
- raw_ptr<impl_type*>(x)));
- }
-
- static const sequenced_index_node* from_impl(const_impl_pointer x)
- {
- return
- static_cast<const sequenced_index_node*>(
- static_cast<const trampoline*>(
- raw_ptr<const impl_type*>(x)));
- }
-
- /* interoperability with bidir_node_iterator */
-
- static void increment(sequenced_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::increment(xi);
- x=from_impl(xi);
- }
-
- static void decrement(sequenced_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::decrement(xi);
- x=from_impl(xi);
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp
deleted file mode 100644
index 7b142223742..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp
+++ /dev/null
@@ -1,1743 +0,0 @@
-/* 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_HASHED_INDEX_HPP
-#define BOOST_MULTI_INDEX_HASHED_INDEX_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/call_traits.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/foreach_fwd.hpp>
-#include <boost/limits.hpp>
-#include <boost/move/core.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/push_front.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/bucket_array.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/hash_index_iterator.hpp>
-#include <boost/multi_index/detail/index_node_base.hpp>
-#include <boost/multi_index/detail/modify_key_adaptor.hpp>
-#include <boost/multi_index/detail/promotes_arg.hpp>
-#include <boost/multi_index/detail/safe_mode.hpp>
-#include <boost/multi_index/detail/scope_guard.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/multi_index/hashed_index_fwd.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <cmath>
-#include <cstddef>
-#include <functional>
-#include <iterator>
-#include <utility>
-#include <memory>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/serialization/nvp.hpp>
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
-#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(x) \
- detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
- detail::make_obj_guard(x,&hashed_index::check_invariant_); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT \
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(*this)
-#else
-#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(x)
-#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* hashed_index adds a layer of hashed indexing to a given Super */
-
-/* Most of the implementation of unique and non-unique indices is
- * shared. We tell from one another on instantiation time by using
- * Category tags defined in hash_index_node.hpp.
- */
-
-template<
- typename KeyFromValue,typename Hash,typename Pred,
- typename SuperMeta,typename TagList,typename Category
->
-class hashed_index:
- BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,public safe_mode::safe_container<
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category> >
-#endif
-
-{
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
- * lifetime of const references bound to temporaries --precisely what
- * scopeguards are.
- */
-
-#pragma parse_mfunc_templ off
-#endif
-
- typedef typename SuperMeta::type super;
-
-protected:
- typedef hashed_index_node<
- typename super::node_type,Category> node_type;
-
-private:
- typedef typename node_type::node_alg node_alg;
- typedef typename node_type::impl_type node_impl_type;
- typedef typename node_impl_type::pointer node_impl_pointer;
- typedef typename node_impl_type::base_pointer node_impl_base_pointer;
- typedef bucket_array<
- typename super::final_allocator_type> bucket_array_type;
-
-public:
- /* types */
-
- typedef typename KeyFromValue::result_type key_type;
- typedef typename node_type::value_type value_type;
- typedef KeyFromValue key_from_value;
- typedef Hash hasher;
- typedef Pred key_equal;
- typedef tuple<std::size_t,
- key_from_value,hasher,key_equal> ctor_args;
- typedef typename super::final_allocator_type allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer pointer;
- typedef typename allocator_type::const_pointer const_pointer;
- typedef typename allocator_type::reference reference;
- typedef typename allocator_type::const_reference const_reference;
-#else
- typedef std::allocator_traits<allocator_type> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
- typedef value_type& reference;
- typedef const value_type& const_reference;
-#endif
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_iterator<
- hashed_index_iterator<
- node_type,bucket_array_type,
- hashed_index_global_iterator_tag>,
- hashed_index> iterator;
-#else
- typedef hashed_index_iterator<
- node_type,bucket_array_type,
- hashed_index_global_iterator_tag> iterator;
-#endif
-
- typedef iterator const_iterator;
-
- typedef hashed_index_iterator<
- node_type,bucket_array_type,
- hashed_index_local_iterator_tag> local_iterator;
- typedef local_iterator const_local_iterator;
-
- typedef TagList tag_list;
-
-protected:
- typedef typename super::final_node_type final_node_type;
- typedef tuples::cons<
- ctor_args,
- typename super::ctor_args_list> ctor_args_list;
- typedef typename mpl::push_front<
- typename super::index_type_list,
- hashed_index>::type index_type_list;
- typedef typename mpl::push_front<
- typename super::iterator_type_list,
- iterator>::type iterator_type_list;
- typedef typename mpl::push_front<
- typename super::const_iterator_type_list,
- const_iterator>::type const_iterator_type_list;
- typedef typename super::copy_map_type copy_map_type;
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- typedef typename super::index_saver_type index_saver_type;
- typedef typename super::index_loader_type index_loader_type;
-#endif
-
-private:
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_container<
- hashed_index> safe_super;
-#endif
-
- typedef typename call_traits<value_type>::param_type value_param_type;
- typedef typename call_traits<
- key_type>::param_type key_param_type;
-
- /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
- * expansion.
- */
-
- typedef std::pair<iterator,bool> emplace_return_type;
-
-public:
-
- /* construct/destroy/copy
- * Default and copy ctors are in the protected section as indices are
- * not supposed to be created on their own. No range ctor either.
- */
-
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& operator=(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
- {
- this->final()=x.final();
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& operator=(
- std::initializer_list<value_type> list)
- {
- this->final()=list;
- return *this;
- }
-#endif
-
- allocator_type get_allocator()const BOOST_NOEXCEPT
- {
- return this->final().get_allocator();
- }
-
- /* size and capacity */
-
- bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
- size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
- size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
-
- /* iterators */
-
- iterator begin()BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(header()->next()->prior()));}
- const_iterator begin()const BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(header()->next()->prior()));}
- iterator end()BOOST_NOEXCEPT{return make_iterator(header());}
- const_iterator end()const BOOST_NOEXCEPT{return make_iterator(header());}
- const_iterator cbegin()const BOOST_NOEXCEPT{return begin();}
- const_iterator cend()const BOOST_NOEXCEPT{return end();}
-
- iterator iterator_to(const value_type& x)
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- const_iterator iterator_to(const value_type& x)const
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- /* modifiers */
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace,emplace_impl)
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
- iterator,emplace_hint,emplace_hint_impl,iterator,position)
-
- std::pair<iterator,bool> insert(const value_type& x)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(x);
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- iterator insert(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(
- x,static_cast<final_node_type*>(position.get_node()));
- return make_iterator(p.first);
- }
-
- iterator insert(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- return make_iterator(p.first);
- }
-
- template<typename InputIterator>
- void insert(InputIterator first,InputIterator last)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- for(;first!=last;++first)this->final_insert_ref_(*first);
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void insert(std::initializer_list<value_type> list)
- {
- insert(list.begin(),list.end());
- }
-#endif
-
- iterator erase(iterator position)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
- return position;
- }
-
- size_type erase(key_param_type k)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
-
- std::size_t buc=buckets.position(hash_(k));
- for(node_impl_pointer x=buckets.at(buc)->prior();
- x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
- if(eq_(k,key(node_type::from_impl(x)->value()))){
- node_impl_pointer y=end_of_range(x);
- size_type s=0;
- do{
- node_impl_pointer z=node_alg::after(x);
- this->final_erase_(
- static_cast<final_node_type*>(node_type::from_impl(x)));
- x=z;
- ++s;
- }while(x!=y);
- return s;
- }
- }
- return 0;
- }
-
- iterator erase(iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- while(first!=last){
- first=erase(first);
- }
- return first;
- }
-
- bool replace(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- return this->final_replace_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- bool replace(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- return this->final_replace_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,back_,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify_key(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- return modify(
- position,modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify_key(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- return modify(
- position,
- modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key),
- modify_key_adaptor<Rollback,value_type,KeyFromValue>(back_,key));
- }
-
- void clear()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- this->final_clear_();
- }
-
- void swap(hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(x);
- this->final_swap_(x.final());
- }
-
- /* observers */
-
- key_from_value key_extractor()const{return key;}
- hasher hash_function()const{return hash_;}
- key_equal key_eq()const{return eq_;}
-
- /* lookup */
-
- /* Internally, these ops rely on const_iterator being the same
- * type as iterator.
- */
-
- /* Implementation note: When CompatibleKey is consistently promoted to
- * KeyFromValue::result_type for equality comparison, the promotion is made
- * once in advance to increase efficiency.
- */
-
- template<typename CompatibleKey>
- iterator find(const CompatibleKey& k)const
- {
- return find(k,hash_,eq_);
- }
-
- template<
- typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
- >
- iterator find(
- const CompatibleKey& k,
- const CompatibleHash& hash,const CompatiblePred& eq)const
- {
- return find(
- k,hash,eq,promotes_1st_arg<CompatiblePred,CompatibleKey,key_type>());
- }
-
- template<typename CompatibleKey>
- size_type count(const CompatibleKey& k)const
- {
- return count(k,hash_,eq_);
- }
-
- template<
- typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
- >
- size_type count(
- const CompatibleKey& k,
- const CompatibleHash& hash,const CompatiblePred& eq)const
- {
- return count(
- k,hash,eq,promotes_1st_arg<CompatiblePred,CompatibleKey,key_type>());
- }
-
- template<typename CompatibleKey>
- std::pair<iterator,iterator> equal_range(const CompatibleKey& k)const
- {
- return equal_range(k,hash_,eq_);
- }
-
- template<
- typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
- >
- std::pair<iterator,iterator> equal_range(
- const CompatibleKey& k,
- const CompatibleHash& hash,const CompatiblePred& eq)const
- {
- return equal_range(
- k,hash,eq,promotes_1st_arg<CompatiblePred,CompatibleKey,key_type>());
- }
-
- /* bucket interface */
-
- size_type bucket_count()const BOOST_NOEXCEPT{return buckets.size();}
- size_type max_bucket_count()const BOOST_NOEXCEPT{return static_cast<size_type>(-1);}
-
- size_type bucket_size(size_type n)const
- {
- size_type res=0;
- for(node_impl_pointer x=buckets.at(n)->prior();
- x!=node_impl_pointer(0);x=node_alg::after_local(x)){
- ++res;
- }
- return res;
- }
-
- size_type bucket(key_param_type k)const
- {
- return buckets.position(hash_(k));
- }
-
- local_iterator begin(size_type n)
- {
- return const_cast<const hashed_index*>(this)->begin(n);
- }
-
- const_local_iterator begin(size_type n)const
- {
- node_impl_pointer x=buckets.at(n)->prior();
- if(x==node_impl_pointer(0))return end(n);
- return make_local_iterator(node_type::from_impl(x));
- }
-
- local_iterator end(size_type n)
- {
- return const_cast<const hashed_index*>(this)->end(n);
- }
-
- const_local_iterator end(size_type)const
- {
- return make_local_iterator(0);
- }
-
- const_local_iterator cbegin(size_type n)const{return begin(n);}
- const_local_iterator cend(size_type n)const{return end(n);}
-
- local_iterator local_iterator_to(const value_type& x)
- {
- return make_local_iterator(
- node_from_value<node_type>(boost::addressof(x)));
- }
-
- const_local_iterator local_iterator_to(const value_type& x)const
- {
- return make_local_iterator(
- node_from_value<node_type>(boost::addressof(x)));
- }
-
- /* hash policy */
-
- float load_factor()const BOOST_NOEXCEPT
- {return static_cast<float>(size())/bucket_count();}
- float max_load_factor()const BOOST_NOEXCEPT{return mlf;}
- void max_load_factor(float z){mlf=z;calculate_max_load();}
-
- void rehash(size_type n)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- if(size()<=max_load&&n<=bucket_count())return;
-
- size_type bc =(std::numeric_limits<size_type>::max)();
- float fbc=1.0f+static_cast<float>(size())/mlf;
- if(bc>fbc){
- bc=static_cast<size_type>(fbc);
- if(bc<n)bc=n;
- }
- unchecked_rehash(bc);
- }
-
- void reserve(size_type n)
- {
- rehash(static_cast<size_type>(std::ceil(static_cast<float>(n)/mlf)));
- }
-
-BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
- hashed_index(const ctor_args_list& args_list,const allocator_type& al):
- super(args_list.get_tail(),al),
- key(tuples::get<1>(args_list.get_head())),
- hash_(tuples::get<2>(args_list.get_head())),
- eq_(tuples::get<3>(args_list.get_head())),
- buckets(al,header()->impl(),tuples::get<0>(args_list.get_head())),
- mlf(1.0f)
- {
- calculate_max_load();
- }
-
- hashed_index(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x):
- super(x),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- key(x.key),
- hash_(x.hash_),
- eq_(x.eq_),
- buckets(x.get_allocator(),header()->impl(),x.buckets.size()),
- mlf(x.mlf),
- max_load(x.max_load)
- {
- /* Copy ctor just takes the internal configuration objects from x. The rest
- * is done in subsequent call to copy_().
- */
- }
-
- hashed_index(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- key(x.key),
- hash_(x.hash_),
- eq_(x.eq_),
- buckets(x.get_allocator(),header()->impl(),0),
- mlf(1.0f)
- {
- calculate_max_load();
- }
-
- ~hashed_index()
- {
- /* the container is guaranteed to be empty by now */
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- iterator make_iterator(node_type* node)
- {
- return iterator(node,this);
- }
-
- const_iterator make_iterator(node_type* node)const
- {
- return const_iterator(node,const_cast<hashed_index*>(this));
- }
-#else
- iterator make_iterator(node_type* node)
- {
- return iterator(node);
- }
-
- const_iterator make_iterator(node_type* node)const
- {
- return const_iterator(node);
- }
-#endif
-
- local_iterator make_local_iterator(node_type* node)
- {
- return local_iterator(node);
- }
-
- const_local_iterator make_local_iterator(node_type* node)const
- {
- return const_local_iterator(node);
- }
-
- void copy_(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- const copy_map_type& map)
- {
- copy_(x,map,Category());
- }
-
- void copy_(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- const copy_map_type& map,hashed_unique_tag)
- {
- if(x.size()!=0){
- node_impl_pointer end_org=x.header()->impl(),
- org=end_org,
- cpy=header()->impl();
- do{
- node_impl_pointer prev_org=org->prior(),
- prev_cpy=
- static_cast<node_type*>(map.find(static_cast<final_node_type*>(
- node_type::from_impl(prev_org))))->impl();
- cpy->prior()=prev_cpy;
- if(node_alg::is_first_of_bucket(org)){
- node_impl_base_pointer buc_org=prev_org->next(),
- buc_cpy=
- buckets.begin()+(buc_org-x.buckets.begin());
- prev_cpy->next()=buc_cpy;
- buc_cpy->prior()=cpy;
- }
- else{
- prev_cpy->next()=node_impl_type::base_pointer_from(cpy);
- }
- org=prev_org;
- cpy=prev_cpy;
- }while(org!=end_org);
- }
-
- super::copy_(x,map);
- }
-
- void copy_(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- const copy_map_type& map,hashed_non_unique_tag)
- {
- if(x.size()!=0){
- node_impl_pointer end_org=x.header()->impl(),
- org=end_org,
- cpy=header()->impl();
- do{
- node_impl_pointer next_org=node_alg::after(org),
- next_cpy=
- static_cast<node_type*>(map.find(static_cast<final_node_type*>(
- node_type::from_impl(next_org))))->impl();
- if(node_alg::is_first_of_bucket(next_org)){
- node_impl_base_pointer buc_org=org->next(),
- buc_cpy=
- buckets.begin()+(buc_org-x.buckets.begin());
- cpy->next()=buc_cpy;
- buc_cpy->prior()=next_cpy;
- next_cpy->prior()=cpy;
- }
- else{
- if(org->next()==node_impl_type::base_pointer_from(next_org)){
- cpy->next()=node_impl_type::base_pointer_from(next_cpy);
- }
- else{
- cpy->next()=
- node_impl_type::base_pointer_from(
- static_cast<node_type*>(map.find(static_cast<final_node_type*>(
- node_type::from_impl(
- node_impl_type::pointer_from(org->next())))))->impl());
- }
-
- if(next_org->prior()!=org){
- next_cpy->prior()=
- static_cast<node_type*>(map.find(static_cast<final_node_type*>(
- node_type::from_impl(next_org->prior()))))->impl();
- }
- else{
- next_cpy->prior()=cpy;
- }
- }
- org=next_org;
- cpy=next_cpy;
- }while(org!=end_org);
- }
-
- super::copy_(x,map);
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,final_node_type*& x,Variant variant)
- {
- reserve_for_insert(size()+1);
-
- std::size_t buc=find_bucket(v);
- link_info pos(buckets.at(buc));
- if(!link_point(v,pos)){
- return static_cast<final_node_type*>(
- node_type::from_impl(node_impl_type::pointer_from(pos)));
- }
-
- final_node_type* res=super::insert_(v,x,variant);
- if(res==x)link(static_cast<node_type*>(x),pos);
- return res;
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,node_type* position,final_node_type*& x,Variant variant)
- {
- reserve_for_insert(size()+1);
-
- std::size_t buc=find_bucket(v);
- link_info pos(buckets.at(buc));
- if(!link_point(v,pos)){
- return static_cast<final_node_type*>(
- node_type::from_impl(node_impl_type::pointer_from(pos)));
- }
-
- final_node_type* res=super::insert_(v,position,x,variant);
- if(res==x)link(static_cast<node_type*>(x),pos);
- return res;
- }
-
- void erase_(node_type* x)
- {
- unlink(x);
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- }
-
- void delete_all_nodes_()
- {
- delete_all_nodes_(Category());
- }
-
- void delete_all_nodes_(hashed_unique_tag)
- {
- for(node_impl_pointer x_end=header()->impl(),x=x_end->prior();x!=x_end;){
- node_impl_pointer y=x->prior();
- this->final_delete_node_(
- static_cast<final_node_type*>(node_type::from_impl(x)));
- x=y;
- }
- }
-
- void delete_all_nodes_(hashed_non_unique_tag)
- {
- for(node_impl_pointer x_end=header()->impl(),x=x_end->prior();x!=x_end;){
- node_impl_pointer y=x->prior();
- if(y->next()!=node_impl_type::base_pointer_from(x)&&
- y->next()->prior()!=x){ /* n-1 of group */
- /* Make the second node prior() pointer back-linked so that it won't
- * refer to a deleted node when the time for its own destruction comes.
- */
-
- node_impl_pointer first=node_impl_type::pointer_from(y->next());
- first->next()->prior()=first;
- }
- this->final_delete_node_(
- static_cast<final_node_type*>(node_type::from_impl(x)));
- x=y;
- }
- }
-
- void clear_()
- {
- super::clear_();
- buckets.clear(header()->impl());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::detach_dereferenceable_iterators();
-#endif
- }
-
- void swap_(
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
- {
- std::swap(key,x.key);
- std::swap(hash_,x.hash_);
- std::swap(eq_,x.eq_);
- buckets.swap(x.buckets);
- std::swap(mlf,x.mlf);
- std::swap(max_load,x.max_load);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_(x);
- }
-
- void swap_elements_(
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
- {
- buckets.swap(x.buckets);
- std::swap(mlf,x.mlf);
- std::swap(max_load,x.max_load);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_elements_(x);
- }
-
- template<typename Variant>
- bool replace_(value_param_type v,node_type* x,Variant variant)
- {
- if(eq_(key(v),key(x->value()))){
- return super::replace_(v,x,variant);
- }
-
- unlink_undo undo;
- unlink(x,undo);
-
- BOOST_TRY{
- std::size_t buc=find_bucket(v);
- link_info pos(buckets.at(buc));
- if(link_point(v,pos)&&super::replace_(v,x,variant)){
- link(x,pos);
- return true;
- }
- undo();
- return false;
- }
- BOOST_CATCH(...){
- undo();
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_(node_type* x)
- {
- std::size_t buc;
- bool b;
- BOOST_TRY{
- buc=find_bucket(x->value());
- b=in_place(x->impl(),key(x->value()),buc);
- }
- BOOST_CATCH(...){
- erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- if(!b){
- unlink(x);
- BOOST_TRY{
- link_info pos(buckets.at(buc));
- if(!link_point(x->value(),pos)){
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- return false;
- }
- link(x,pos);
- }
- BOOST_CATCH(...){
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- BOOST_TRY{
- if(!super::modify_(x)){
- unlink(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- unlink(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_rollback_(node_type* x)
- {
- std::size_t buc=find_bucket(x->value());
- if(in_place(x->impl(),key(x->value()),buc)){
- return super::modify_rollback_(x);
- }
-
- unlink_undo undo;
- unlink(x,undo);
-
- BOOST_TRY{
- link_info pos(buckets.at(buc));
- if(link_point(x->value(),pos)&&super::modify_rollback_(x)){
- link(x,pos);
- return true;
- }
- undo();
- return false;
- }
- BOOST_CATCH(...){
- undo();
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool check_rollback_(node_type* x)const
- {
- std::size_t buc=find_bucket(x->value());
- return in_place(x->impl(),key(x->value()),buc)&&super::check_rollback_(x);
- }
-
- /* comparison */
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
- /* defect macro refers to class, not function, templates, but anyway */
-
- template<typename K,typename H,typename P,typename S,typename T,typename C>
- friend bool operator==(
- const hashed_index<K,H,P,S,T,C>&,const hashed_index<K,H,P,S,T,C>& y);
-#endif
-
- bool equals(const hashed_index& x)const{return equals(x,Category());}
-
- bool equals(const hashed_index& x,hashed_unique_tag)const
- {
- if(size()!=x.size())return false;
- for(const_iterator it=begin(),it_end=end(),it2_end=x.end();
- it!=it_end;++it){
- const_iterator it2=x.find(key(*it));
- if(it2==it2_end||!(*it==*it2))return false;
- }
- return true;
- }
-
- bool equals(const hashed_index& x,hashed_non_unique_tag)const
- {
- if(size()!=x.size())return false;
- for(const_iterator it=begin(),it_end=end();it!=it_end;){
- const_iterator it2,it2_last;
- boost::tie(it2,it2_last)=x.equal_range(key(*it));
- if(it2==it2_last)return false;
-
- const_iterator it_last=make_iterator(
- node_type::from_impl(end_of_range(it.get_node()->impl())));
- if(std::distance(it,it_last)!=std::distance(it2,it2_last))return false;
-
- /* From is_permutation code in
- * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3068.pdf
- */
-
- for(;it!=it_last;++it,++it2){
- if(!(*it==*it2))break;
- }
- if(it!=it_last){
- for(const_iterator scan=it;scan!=it_last;++scan){
- if(std::find(it,scan,*scan)!=scan)continue;
- std::ptrdiff_t matches=std::count(it2,it2_last,*scan);
- if(matches==0||matches!=std::count(scan,it_last,*scan))return false;
- }
- it=it_last;
- }
- }
- return true;
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm)const
- {
- ar<<serialization::make_nvp("position",buckets);
- super::save_(ar,version,sm);
- }
-
- template<typename Archive>
- void load_(Archive& ar,const unsigned int version,const index_loader_type& lm)
- {
- ar>>serialization::make_nvp("position",buckets);
- super::load_(ar,version,lm);
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const
- {
- if(size()==0||begin()==end()){
- if(size()!=0||begin()!=end())return false;
- }
- else{
- size_type s0=0;
- for(const_iterator it=begin(),it_end=end();it!=it_end;++it,++s0){}
- if(s0!=size())return false;
-
- size_type s1=0;
- for(size_type buc=0;buc<bucket_count();++buc){
- size_type ss1=0;
- for(const_local_iterator it=begin(buc),it_end=end(buc);
- it!=it_end;++it,++ss1){
- if(find_bucket(*it)!=buc)return false;
- }
- if(ss1!=bucket_size(buc))return false;
- s1+=ss1;
- }
- if(s1!=size())return false;
- }
-
- return super::invariant_();
- }
-
- /* This forwarding function eases things for the boost::mem_fn construct
- * in BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT. Actually,
- * final_check_invariant is already an inherited member function of index.
- */
- void check_invariant_()const{this->final_check_invariant_();}
-#endif
-
-private:
- node_type* header()const{return this->final_header();}
-
- std::size_t find_bucket(value_param_type v)const
- {
- return bucket(key(v));
- }
-
- struct link_info_non_unique
- {
- link_info_non_unique(node_impl_base_pointer pos):
- first(pos),last(node_impl_base_pointer(0)){}
-
- operator const node_impl_base_pointer&()const{return this->first;}
-
- node_impl_base_pointer first,last;
- };
-
- typedef typename mpl::if_<
- is_same<Category,hashed_unique_tag>,
- node_impl_base_pointer,
- link_info_non_unique
- >::type link_info;
-
- bool link_point(value_param_type v,link_info& pos)
- {
- return link_point(v,pos,Category());
- }
-
- bool link_point(
- value_param_type v,node_impl_base_pointer& pos,hashed_unique_tag)
- {
- for(node_impl_pointer x=pos->prior();x!=node_impl_pointer(0);
- x=node_alg::after_local(x)){
- if(eq_(key(v),key(node_type::from_impl(x)->value()))){
- pos=node_impl_type::base_pointer_from(x);
- return false;
- }
- }
- return true;
- }
-
- bool link_point(
- value_param_type v,link_info_non_unique& pos,hashed_non_unique_tag)
- {
- for(node_impl_pointer x=pos.first->prior();x!=node_impl_pointer(0);
- x=node_alg::next_to_inspect(x)){
- if(eq_(key(v),key(node_type::from_impl(x)->value()))){
- pos.first=node_impl_type::base_pointer_from(x);
- pos.last=node_impl_type::base_pointer_from(last_of_range(x));
- return true;
- }
- }
- return true;
- }
-
- node_impl_pointer last_of_range(node_impl_pointer x)const
- {
- return last_of_range(x,Category());
- }
-
- node_impl_pointer last_of_range(node_impl_pointer x,hashed_unique_tag)const
- {
- return x;
- }
-
- node_impl_pointer last_of_range(
- node_impl_pointer x,hashed_non_unique_tag)const
- {
- node_impl_base_pointer y=x->next();
- node_impl_pointer z=y->prior();
- if(z==x){ /* range of size 1 or 2 */
- node_impl_pointer yy=node_impl_type::pointer_from(y);
- return
- eq_(
- key(node_type::from_impl(x)->value()),
- key(node_type::from_impl(yy)->value()))?yy:x;
- }
- else if(z->prior()==x) /* last of bucket */
- return x;
- else /* group of size>2 */
- return z;
- }
-
- node_impl_pointer end_of_range(node_impl_pointer x)const
- {
- return end_of_range(x,Category());
- }
-
- node_impl_pointer end_of_range(node_impl_pointer x,hashed_unique_tag)const
- {
- return node_alg::after(last_of_range(x));
- }
-
- node_impl_pointer end_of_range(
- node_impl_pointer x,hashed_non_unique_tag)const
- {
- node_impl_base_pointer y=x->next();
- node_impl_pointer z=y->prior();
- if(z==x){ /* range of size 1 or 2 */
- node_impl_pointer yy=node_impl_type::pointer_from(y);
- if(!eq_(
- key(node_type::from_impl(x)->value()),
- key(node_type::from_impl(yy)->value())))yy=x;
- return yy->next()->prior()==yy?
- node_impl_type::pointer_from(yy->next()):
- yy->next()->prior();
- }
- else if(z->prior()==x) /* last of bucket */
- return z;
- else /* group of size>2 */
- return z->next()->prior()==z?
- node_impl_type::pointer_from(z->next()):
- z->next()->prior();
- }
-
- void link(node_type* x,const link_info& pos)
- {
- link(x,pos,Category());
- }
-
- void link(node_type* x,node_impl_base_pointer pos,hashed_unique_tag)
- {
- node_alg::link(x->impl(),pos,header()->impl());
- }
-
- void link(node_type* x,const link_info_non_unique& pos,hashed_non_unique_tag)
- {
- if(pos.last==node_impl_base_pointer(0)){
- node_alg::link(x->impl(),pos.first,header()->impl());
- }
- else{
- node_alg::link(
- x->impl(),
- node_impl_type::pointer_from(pos.first),
- node_impl_type::pointer_from(pos.last));
- }
- }
-
- void unlink(node_type* x)
- {
- node_alg::unlink(x->impl());
- }
-
- typedef typename node_alg::unlink_undo unlink_undo;
-
- void unlink(node_type* x,unlink_undo& undo)
- {
- node_alg::unlink(x->impl(),undo);
- }
-
- void calculate_max_load()
- {
- float fml=mlf*static_cast<float>(bucket_count());
- max_load=(std::numeric_limits<size_type>::max)();
- if(max_load>fml)max_load=static_cast<size_type>(fml);
- }
-
- void reserve_for_insert(size_type n)
- {
- if(n>max_load){
- size_type bc =(std::numeric_limits<size_type>::max)();
- float fbc=1.0f+static_cast<float>(n)/mlf;
- if(bc>fbc)bc =static_cast<size_type>(fbc);
- unchecked_rehash(bc);
- }
- }
-
- void unchecked_rehash(size_type n){unchecked_rehash(n,Category());}
-
- void unchecked_rehash(size_type n,hashed_unique_tag)
- {
- node_impl_type cpy_end_node;
- node_impl_pointer cpy_end=node_impl_pointer(&cpy_end_node),
- end_=header()->impl();
- bucket_array_type buckets_cpy(get_allocator(),cpy_end,n);
-
- if(size()!=0){
- auto_space<
- std::size_t,allocator_type> hashes(get_allocator(),size());
- auto_space<
- node_impl_pointer,allocator_type> node_ptrs(get_allocator(),size());
- std::size_t i=0,size_=size();
- bool within_bucket=false;
- BOOST_TRY{
- for(;i!=size_;++i){
- node_impl_pointer x=end_->prior();
-
- /* only this can possibly throw */
- std::size_t h=hash_(key(node_type::from_impl(x)->value()));
-
- hashes.data()[i]=h;
- node_ptrs.data()[i]=x;
- within_bucket=!node_alg::unlink_last(end_);
- node_alg::link(x,buckets_cpy.at(buckets_cpy.position(h)),cpy_end);
- }
- }
- BOOST_CATCH(...){
- if(i!=0){
- std::size_t prev_buc=buckets.position(hashes.data()[i-1]);
- if(!within_bucket)prev_buc=~prev_buc;
-
- for(std::size_t j=i;j--;){
- std::size_t buc=buckets.position(hashes.data()[j]);
- node_impl_pointer x=node_ptrs.data()[j];
- if(buc==prev_buc)node_alg::append(x,end_);
- else node_alg::link(x,buckets.at(buc),end_);
- prev_buc=buc;
- }
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- end_->prior()=cpy_end->prior()!=cpy_end?cpy_end->prior():end_;
- end_->next()=cpy_end->next();
- end_->prior()->next()->prior()=end_->next()->prior()->prior()=end_;
- buckets.swap(buckets_cpy);
- calculate_max_load();
- }
-
- void unchecked_rehash(size_type n,hashed_non_unique_tag)
- {
- node_impl_type cpy_end_node;
- node_impl_pointer cpy_end=node_impl_pointer(&cpy_end_node),
- end_=header()->impl();
- bucket_array_type buckets_cpy(get_allocator(),cpy_end,n);
-
- if(size()!=0){
- auto_space<
- std::size_t,allocator_type> hashes(get_allocator(),size());
- auto_space<
- node_impl_pointer,allocator_type> node_ptrs(get_allocator(),size());
- std::size_t i=0;
- bool within_bucket=false;
- BOOST_TRY{
- for(;;++i){
- node_impl_pointer x=end_->prior();
- if(x==end_)break;
-
- /* only this can possibly throw */
- std::size_t h=hash_(key(node_type::from_impl(x)->value()));
-
- hashes.data()[i]=h;
- node_ptrs.data()[i]=x;
- std::pair<node_impl_pointer,bool> p=
- node_alg::unlink_last_group(end_);
- node_alg::link_range(
- p.first,x,buckets_cpy.at(buckets_cpy.position(h)),cpy_end);
- within_bucket=!(p.second);
- }
- }
- BOOST_CATCH(...){
- if(i!=0){
- std::size_t prev_buc=buckets.position(hashes.data()[i-1]);
- if(!within_bucket)prev_buc=~prev_buc;
-
- for(std::size_t j=i;j--;){
- std::size_t buc=buckets.position(hashes.data()[j]);
- node_impl_pointer x=node_ptrs.data()[j],
- y=
- x->prior()->next()!=node_impl_type::base_pointer_from(x)&&
- x->prior()->next()->prior()!=x?
- node_impl_type::pointer_from(x->prior()->next()):x;
- node_alg::unlink_range(y,x);
- if(buc==prev_buc)node_alg::append_range(y,x,end_);
- else node_alg::link_range(y,x,buckets.at(buc),end_);
- prev_buc=buc;
- }
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- end_->prior()=cpy_end->prior()!=cpy_end?cpy_end->prior():end_;
- end_->next()=cpy_end->next();
- end_->prior()->next()->prior()=end_->next()->prior()->prior()=end_;
- buckets.swap(buckets_cpy);
- calculate_max_load();
- }
-
- bool in_place(node_impl_pointer x,key_param_type k,std::size_t buc)const
- {
- return in_place(x,k,buc,Category());
- }
-
- bool in_place(
- node_impl_pointer x,key_param_type k,std::size_t buc,
- hashed_unique_tag)const
- {
- bool found=false;
- for(node_impl_pointer y=buckets.at(buc)->prior();
- y!=node_impl_pointer(0);y=node_alg::after_local(y)){
- if(y==x)found=true;
- else if(eq_(k,key(node_type::from_impl(y)->value())))return false;
- }
- return found;
- }
-
- bool in_place(
- node_impl_pointer x,key_param_type k,std::size_t buc,
- hashed_non_unique_tag)const
- {
- bool found=false;
- int range_size=0;
- for(node_impl_pointer y=buckets.at(buc)->prior();y!=node_impl_pointer(0);){
- if(node_alg::is_first_of_group(y)){ /* group of 3 or more */
- if(y==x){
- /* in place <-> equal to some other member of the group */
- return eq_(
- k,
- key(node_type::from_impl(
- node_impl_type::pointer_from(y->next()))->value()));
- }
- else{
- node_impl_pointer z=
- node_alg::after_local(y->next()->prior()); /* end of range */
- if(eq_(k,key(node_type::from_impl(y)->value()))){
- if(found)return false; /* x lies outside */
- do{
- if(y==x)return true;
- y=node_alg::after_local(y);
- }while(y!=z);
- return false; /* x not found */
- }
- else{
- if(range_size==1&&!found)return false;
- if(range_size==2)return found;
- range_size=0;
- y=z; /* skip range (and potentially x, too, which is fine) */
- }
- }
- }
- else{ /* group of 1 or 2 */
- if(y==x){
- if(range_size==1)return true;
- range_size=1;
- found=true;
- }
- else if(eq_(k,key(node_type::from_impl(y)->value()))){
- if(range_size==0&&found)return false;
- if(range_size==1&&!found)return false;
- if(range_size==2)return false;
- ++range_size;
- }
- else{
- if(range_size==1&&!found)return false;
- if(range_size==2)return found;
- range_size=0;
- }
- y=node_alg::after_local(y);
- }
- }
- return found;
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- void detach_iterators(node_type* x)
- {
- iterator it=make_iterator(x);
- safe_mode::detach_equivalent_iterators(it);
- }
-#endif
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_impl(BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool>p=
- this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- iterator emplace_hint_impl(
- iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool>p=
- this->final_emplace_hint_(
- static_cast<final_node_type*>(position.get_node()),
- BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- return make_iterator(p.first);
- }
-
- template<
- typename CompatibleHash,typename CompatiblePred
- >
- iterator find(
- const key_type& k,
- const CompatibleHash& hash,const CompatiblePred& eq,mpl::true_)const
- {
- return find(k,hash,eq,mpl::false_());
- }
-
- template<
- typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
- >
- iterator find(
- const CompatibleKey& k,
- const CompatibleHash& hash,const CompatiblePred& eq,mpl::false_)const
- {
- std::size_t buc=buckets.position(hash(k));
- for(node_impl_pointer x=buckets.at(buc)->prior();
- x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
- if(eq(k,key(node_type::from_impl(x)->value()))){
- return make_iterator(node_type::from_impl(x));
- }
- }
- return end();
- }
-
- template<
- typename CompatibleHash,typename CompatiblePred
- >
- size_type count(
- const key_type& k,
- const CompatibleHash& hash,const CompatiblePred& eq,mpl::true_)const
- {
- return count(k,hash,eq,mpl::false_());
- }
-
- template<
- typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
- >
- size_type count(
- const CompatibleKey& k,
- const CompatibleHash& hash,const CompatiblePred& eq,mpl::false_)const
- {
- std::size_t buc=buckets.position(hash(k));
- for(node_impl_pointer x=buckets.at(buc)->prior();
- x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
- if(eq(k,key(node_type::from_impl(x)->value()))){
- size_type res=0;
- node_impl_pointer y=end_of_range(x);
- do{
- ++res;
- x=node_alg::after(x);
- }while(x!=y);
- return res;
- }
- }
- return 0;
- }
-
- template<
- typename CompatibleHash,typename CompatiblePred
- >
- std::pair<iterator,iterator> equal_range(
- const key_type& k,
- const CompatibleHash& hash,const CompatiblePred& eq,mpl::true_)const
- {
- return equal_range(k,hash,eq,mpl::false_());
- }
-
- template<
- typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
- >
- std::pair<iterator,iterator> equal_range(
- const CompatibleKey& k,
- const CompatibleHash& hash,const CompatiblePred& eq,mpl::false_)const
- {
- std::size_t buc=buckets.position(hash(k));
- for(node_impl_pointer x=buckets.at(buc)->prior();
- x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
- if(eq(k,key(node_type::from_impl(x)->value()))){
- return std::pair<iterator,iterator>(
- make_iterator(node_type::from_impl(x)),
- make_iterator(node_type::from_impl(end_of_range(x))));
- }
- }
- return std::pair<iterator,iterator>(end(),end());
- }
-
- key_from_value key;
- hasher hash_;
- key_equal eq_;
- bucket_array_type buckets;
- float mlf;
- size_type max_load;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-};
-
-/* comparison */
-
-template<
- typename KeyFromValue,typename Hash,typename Pred,
- typename SuperMeta,typename TagList,typename Category
->
-bool operator==(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& y)
-{
- return x.equals(y);
-}
-
-template<
- typename KeyFromValue,typename Hash,typename Pred,
- typename SuperMeta,typename TagList,typename Category
->
-bool operator!=(
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& y)
-{
- return !(x==y);
-}
-
-/* specialized algorithms */
-
-template<
- typename KeyFromValue,typename Hash,typename Pred,
- typename SuperMeta,typename TagList,typename Category
->
-void swap(
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
- hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-/* hashed index specifiers */
-
-template<typename Arg1,typename Arg2,typename Arg3,typename Arg4>
-struct hashed_unique
-{
- typedef typename detail::hashed_index_args<
- Arg1,Arg2,Arg3,Arg4> index_args;
- typedef typename index_args::tag_list_type::type tag_list_type;
- typedef typename index_args::key_from_value_type key_from_value_type;
- typedef typename index_args::hash_type hash_type;
- typedef typename index_args::pred_type pred_type;
-
- template<typename Super>
- struct node_class
- {
- typedef detail::hashed_index_node<Super,detail::hashed_unique_tag> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::hashed_index<
- key_from_value_type,hash_type,pred_type,
- SuperMeta,tag_list_type,detail::hashed_unique_tag> type;
- };
-};
-
-template<typename Arg1,typename Arg2,typename Arg3,typename Arg4>
-struct hashed_non_unique
-{
- typedef typename detail::hashed_index_args<
- Arg1,Arg2,Arg3,Arg4> index_args;
- typedef typename index_args::tag_list_type::type tag_list_type;
- typedef typename index_args::key_from_value_type key_from_value_type;
- typedef typename index_args::hash_type hash_type;
- typedef typename index_args::pred_type pred_type;
-
- template<typename Super>
- struct node_class
- {
- typedef detail::hashed_index_node<
- Super,detail::hashed_non_unique_tag> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::hashed_index<
- key_from_value_type,hash_type,pred_type,
- SuperMeta,tag_list_type,detail::hashed_non_unique_tag> type;
- };
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-/* Boost.Foreach compatibility */
-
-template<
- typename KeyFromValue,typename Hash,typename Pred,
- typename SuperMeta,typename TagList,typename Category
->
-inline boost::mpl::true_* boost_foreach_is_noncopyable(
- boost::multi_index::detail::hashed_index<
- KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>*&,
- boost_foreach_argument_dependent_lookup_hack)
-{
- return 0;
-}
-
-#undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT
-#undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp
deleted file mode 100644
index 9db54380699..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp
+++ /dev/null
@@ -1,1185 +0,0 @@
-/* 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_RANDOM_ACCESS_INDEX_HPP
-#define BOOST_MULTI_INDEX_RANDOM_ACCESS_INDEX_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/bind.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/foreach_fwd.hpp>
-#include <boost/iterator/reverse_iterator.hpp>
-#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/push_front.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/index_node_base.hpp>
-#include <boost/multi_index/detail/rnd_node_iterator.hpp>
-#include <boost/multi_index/detail/rnd_index_node.hpp>
-#include <boost/multi_index/detail/rnd_index_ops.hpp>
-#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
-#include <boost/multi_index/detail/safe_mode.hpp>
-#include <boost/multi_index/detail/scope_guard.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/multi_index/random_access_index_fwd.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <cstddef>
-#include <functional>
-#include <stdexcept>
-#include <utility>
-#include <memory>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include<initializer_list>
-#endif
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/multi_index/detail/rnd_index_loader.hpp>
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x) \
- detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
- detail::make_obj_guard(x,&random_access_index::check_invariant_); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT \
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(*this)
-#else
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x)
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* random_access_index adds a layer of random access indexing
- * to a given Super
- */
-
-template<typename SuperMeta,typename TagList>
-class random_access_index:
- BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,public safe_mode::safe_container<
- random_access_index<SuperMeta,TagList> >
-#endif
-
-{
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
- * lifetime of const references bound to temporaries --precisely what
- * scopeguards are.
- */
-
-#pragma parse_mfunc_templ off
-#endif
-
- typedef typename SuperMeta::type super;
-
-protected:
- typedef random_access_index_node<
- typename super::node_type> node_type;
-
-private:
- typedef typename node_type::impl_type node_impl_type;
- typedef random_access_index_ptr_array<
- typename super::final_allocator_type> ptr_array;
- typedef typename ptr_array::pointer node_impl_ptr_pointer;
-
-public:
- /* types */
-
- typedef typename node_type::value_type value_type;
- typedef tuples::null_type ctor_args;
- typedef typename super::final_allocator_type allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::reference reference;
- typedef typename allocator_type::const_reference const_reference;
-#else
- typedef value_type& reference;
- typedef const value_type& const_reference;
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_iterator<
- rnd_node_iterator<node_type>,
- random_access_index> iterator;
-#else
- typedef rnd_node_iterator<node_type> iterator;
-#endif
-
- typedef iterator const_iterator;
-
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer pointer;
- typedef typename allocator_type::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<allocator_type> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
-#endif
- typedef typename
- boost::reverse_iterator<iterator> reverse_iterator;
- typedef typename
- boost::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef TagList tag_list;
-
-protected:
- typedef typename super::final_node_type final_node_type;
- typedef tuples::cons<
- ctor_args,
- typename super::ctor_args_list> ctor_args_list;
- typedef typename mpl::push_front<
- typename super::index_type_list,
- random_access_index>::type index_type_list;
- typedef typename mpl::push_front<
- typename super::iterator_type_list,
- iterator>::type iterator_type_list;
- typedef typename mpl::push_front<
- typename super::const_iterator_type_list,
- const_iterator>::type const_iterator_type_list;
- typedef typename super::copy_map_type copy_map_type;
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- typedef typename super::index_saver_type index_saver_type;
- typedef typename super::index_loader_type index_loader_type;
-#endif
-
-private:
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_container<
- random_access_index> safe_super;
-#endif
-
- typedef typename call_traits<
- value_type>::param_type value_param_type;
-
- /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
- * expansion.
- */
-
- typedef std::pair<iterator,bool> emplace_return_type;
-
-public:
-
- /* construct/copy/destroy
- * Default and copy ctors are in the protected section as indices are
- * not supposed to be created on their own. No range ctor either.
- */
-
- random_access_index<SuperMeta,TagList>& operator=(
- const random_access_index<SuperMeta,TagList>& x)
- {
- this->final()=x.final();
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- random_access_index<SuperMeta,TagList>& operator=(
- std::initializer_list<value_type> list)
- {
- this->final()=list;
- return *this;
- }
-#endif
-
- template <class InputIterator>
- void assign(InputIterator first,InputIterator last)
- {
- assign_iter(first,last,mpl::not_<is_integral<InputIterator> >());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void assign(std::initializer_list<value_type> list)
- {
- assign(list.begin(),list.end());
- }
-#endif
-
- void assign(size_type n,value_param_type value)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- clear();
- for(size_type i=0;i<n;++i)push_back(value);
- }
-
- allocator_type get_allocator()const BOOST_NOEXCEPT
- {
- return this->final().get_allocator();
- }
-
- /* iterators */
-
- iterator begin()BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(*ptrs.begin()));}
- const_iterator begin()const BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(*ptrs.begin()));}
- iterator
- end()BOOST_NOEXCEPT{return make_iterator(header());}
- const_iterator
- end()const BOOST_NOEXCEPT{return make_iterator(header());}
- reverse_iterator
- rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- const_reverse_iterator
- rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- reverse_iterator
- rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_reverse_iterator
- rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_iterator
- cbegin()const BOOST_NOEXCEPT{return begin();}
- const_iterator
- cend()const BOOST_NOEXCEPT{return end();}
- const_reverse_iterator
- crbegin()const BOOST_NOEXCEPT{return rbegin();}
- const_reverse_iterator
- crend()const BOOST_NOEXCEPT{return rend();}
-
- iterator iterator_to(const value_type& x)
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- const_iterator iterator_to(const value_type& x)const
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- /* capacity */
-
- bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
- size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
- size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
- size_type capacity()const BOOST_NOEXCEPT{return ptrs.capacity();}
-
- void reserve(size_type n)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- ptrs.reserve(n);
- }
-
- void shrink_to_fit()
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- ptrs.shrink_to_fit();
- }
-
- void resize(size_type n)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(n>size())
- for(size_type m=n-size();m--;)
- this->final_emplace_(BOOST_MULTI_INDEX_NULL_PARAM_PACK);
- else if(n<size())erase(begin()+n,end());
- }
-
- void resize(size_type n,value_param_type x)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(n>size())for(size_type m=n-size();m--;)this->final_insert_(x);
- else if(n<size())erase(begin()+n,end());
- }
-
- /* access: no non-const versions provided as random_access_index
- * handles const elements.
- */
-
- const_reference operator[](size_type n)const
- {
- BOOST_MULTI_INDEX_SAFE_MODE_ASSERT(n<size(),safe_mode::out_of_bounds);
- return node_type::from_impl(*ptrs.at(n))->value();
- }
-
- const_reference at(size_type n)const
- {
- if(n>=size())throw_exception(std::out_of_range("random access index"));
- return node_type::from_impl(*ptrs.at(n))->value();
- }
-
- const_reference front()const{return operator[](0);}
- const_reference back()const{return operator[](size()-1);}
-
- /* modifiers */
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace_front,emplace_front_impl)
-
- std::pair<iterator,bool> push_front(const value_type& x)
- {return insert(begin(),x);}
- std::pair<iterator,bool> push_front(BOOST_RV_REF(value_type) x)
- {return insert(begin(),boost::move(x));}
- void pop_front(){erase(begin());}
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace_back,emplace_back_impl)
-
- std::pair<iterator,bool> push_back(const value_type& x)
- {return insert(end(),x);}
- std::pair<iterator,bool> push_back(BOOST_RV_REF(value_type) x)
- {return insert(end(),boost::move(x));}
- void pop_back(){erase(--end());}
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
- emplace_return_type,emplace,emplace_impl,iterator,position)
-
- std::pair<iterator,bool> insert(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(x);
- if(p.second&&position.get_node()!=header()){
- relocate(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- std::pair<iterator,bool> insert(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
- if(p.second&&position.get_node()!=header()){
- relocate(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- void insert(iterator position,size_type n,value_param_type x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=0;
- BOOST_TRY{
- while(n--){
- if(push_back(x).second)++s;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-s,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-s,end());
- }
-
- template<typename InputIterator>
- void insert(iterator position,InputIterator first,InputIterator last)
- {
- insert_iter(position,first,last,mpl::not_<is_integral<InputIterator> >());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void insert(iterator position,std::initializer_list<value_type> list)
- {
- insert(position,list.begin(),list.end());
- }
-#endif
-
- iterator erase(iterator position)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
- return position;
- }
-
- iterator erase(iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=last-first;
- relocate(end(),first,last);
- while(n--)pop_back();
- return last;
- }
-
- bool replace(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- return this->final_replace_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- bool replace(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- return this->final_replace_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,back_,static_cast<final_node_type*>(position.get_node()));
- }
-
- void swap(random_access_index<SuperMeta,TagList>& x)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x);
- this->final_swap_(x.final());
- }
-
- void clear()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- this->final_clear_();
- }
-
- /* list operations */
-
- void splice(iterator position,random_access_index<SuperMeta,TagList>& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_DIFFERENT_CONTAINER(*this,x);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- iterator first=x.begin(),last=x.end();
- size_type n=0;
- BOOST_TRY{
- while(first!=last){
- if(push_back(*first).second){
- first=x.erase(first);
- ++n;
- }
- else ++first;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-n,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-n,end());
- }
-
- void splice(
- iterator position,random_access_index<SuperMeta,TagList>& x,iterator i)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,x);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(&x==this)relocate(position,i);
- else{
- if(insert(position,*i).second){
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer has a hard time with safe mode, and the following
- * workaround is needed. Left it for all compilers as it does no
- * harm.
- */
- i.detach();
- x.erase(x.make_iterator(i.get_node()));
-#else
- x.erase(i);
-#endif
-
- }
- }
- }
-
- void splice(
- iterator position,random_access_index<SuperMeta,TagList>& x,
- iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,x);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,x);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(&x==this)relocate(position,first,last);
- else{
- size_type n=0;
- BOOST_TRY{
- while(first!=last){
- if(push_back(*first).second){
- first=x.erase(first);
- ++n;
- }
- else ++first;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-n,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-n,end());
- }
- }
-
- void remove(value_param_type value)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(
- random_access_index_remove<node_type>(
- ptrs,
- ::boost::bind(std::equal_to<value_type>(),::boost::arg<1>(),value)));
- while(n--)pop_back();
- }
-
- template<typename Predicate>
- void remove_if(Predicate pred)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(random_access_index_remove<node_type>(ptrs,pred));
- while(n--)pop_back();
- }
-
- void unique()
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(
- random_access_index_unique<node_type>(
- ptrs,std::equal_to<value_type>()));
- while(n--)pop_back();
- }
-
- template <class BinaryPredicate>
- void unique(BinaryPredicate binary_pred)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(
- random_access_index_unique<node_type>(ptrs,binary_pred));
- while(n--)pop_back();
- }
-
- void merge(random_access_index<SuperMeta,TagList>& x)
- {
- if(this!=&x){
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=size();
- splice(end(),x);
- random_access_index_inplace_merge<node_type>(
- get_allocator(),ptrs,ptrs.at(s),std::less<value_type>());
- }
- }
-
- template <typename Compare>
- void merge(random_access_index<SuperMeta,TagList>& x,Compare comp)
- {
- if(this!=&x){
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=size();
- splice(end(),x);
- random_access_index_inplace_merge<node_type>(
- get_allocator(),ptrs,ptrs.at(s),comp);
- }
- }
-
- void sort()
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- random_access_index_sort<node_type>(
- get_allocator(),ptrs,std::less<value_type>());
- }
-
- template <typename Compare>
- void sort(Compare comp)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- random_access_index_sort<node_type>(
- get_allocator(),ptrs,comp);
- }
-
- void reverse()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- node_impl_type::reverse(ptrs.begin(),ptrs.end());
- }
-
- /* rearrange operations */
-
- void relocate(iterator position,iterator i)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(position!=i)relocate(position.get_node(),i.get_node());
- }
-
- void relocate(iterator position,iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(position!=last)relocate(
- position.get_node(),first.get_node(),last.get_node());
- }
-
- template<typename InputIterator>
- void rearrange(InputIterator first)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- for(node_impl_ptr_pointer p0=ptrs.begin(),p0_end=ptrs.end();
- p0!=p0_end;++first,++p0){
- const value_type& v1=*first;
- node_impl_ptr_pointer p1=node_from_value<node_type>(&v1)->up();
-
- std::swap(*p0,*p1);
- (*p0)->up()=p0;
- (*p1)->up()=p1;
- }
- }
-
-BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
- random_access_index(
- const ctor_args_list& args_list,const allocator_type& al):
- super(args_list.get_tail(),al),
- ptrs(al,header()->impl(),0)
- {
- }
-
- random_access_index(const random_access_index<SuperMeta,TagList>& x):
- super(x),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- ptrs(x.get_allocator(),header()->impl(),x.size())
- {
- /* The actual copying takes place in subsequent call to copy_().
- */
- }
-
- random_access_index(
- const random_access_index<SuperMeta,TagList>& x,do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- ptrs(x.get_allocator(),header()->impl(),0)
- {
- }
-
- ~random_access_index()
- {
- /* the container is guaranteed to be empty by now */
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- iterator make_iterator(node_type* node){return iterator(node,this);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node,const_cast<random_access_index*>(this));}
-#else
- iterator make_iterator(node_type* node){return iterator(node);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node);}
-#endif
-
- void copy_(
- const random_access_index<SuperMeta,TagList>& x,const copy_map_type& map)
- {
- for(node_impl_ptr_pointer begin_org=x.ptrs.begin(),
- begin_cpy=ptrs.begin(),
- end_org=x.ptrs.end();
- begin_org!=end_org;++begin_org,++begin_cpy){
- *begin_cpy=
- static_cast<node_type*>(
- map.find(
- static_cast<final_node_type*>(
- node_type::from_impl(*begin_org))))->impl();
- (*begin_cpy)->up()=begin_cpy;
- }
-
- super::copy_(x,map);
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,final_node_type*& x,Variant variant)
- {
- ptrs.room_for_one();
- final_node_type* res=super::insert_(v,x,variant);
- if(res==x)ptrs.push_back(static_cast<node_type*>(x)->impl());
- return res;
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,node_type* position,final_node_type*& x,Variant variant)
- {
- ptrs.room_for_one();
- final_node_type* res=super::insert_(v,position,x,variant);
- if(res==x)ptrs.push_back(static_cast<node_type*>(x)->impl());
- return res;
- }
-
- void erase_(node_type* x)
- {
- ptrs.erase(x->impl());
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- }
-
- void delete_all_nodes_()
- {
- for(node_impl_ptr_pointer x=ptrs.begin(),x_end=ptrs.end();x!=x_end;++x){
- this->final_delete_node_(
- static_cast<final_node_type*>(node_type::from_impl(*x)));
- }
- }
-
- void clear_()
- {
- super::clear_();
- ptrs.clear();
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::detach_dereferenceable_iterators();
-#endif
- }
-
- void swap_(random_access_index<SuperMeta,TagList>& x)
- {
- ptrs.swap(x.ptrs);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_(x);
- }
-
- void swap_elements_(random_access_index<SuperMeta,TagList>& x)
- {
- ptrs.swap(x.ptrs);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_elements_(x);
- }
-
- template<typename Variant>
- bool replace_(value_param_type v,node_type* x,Variant variant)
- {
- return super::replace_(v,x,variant);
- }
-
- bool modify_(node_type* x)
- {
- BOOST_TRY{
- if(!super::modify_(x)){
- ptrs.erase(x->impl());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- ptrs.erase(x->impl());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_rollback_(node_type* x)
- {
- return super::modify_rollback_(x);
- }
-
- bool check_rollback_(node_type* x)const
- {
- return super::check_rollback_(x);
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm)const
- {
- sm.save(begin(),end(),ar,version);
- super::save_(ar,version,sm);
- }
-
- template<typename Archive>
- void load_(
- Archive& ar,const unsigned int version,const index_loader_type& lm)
- {
- {
- typedef random_access_index_loader<node_type,allocator_type> loader;
-
- loader ld(get_allocator(),ptrs);
- lm.load(
- ::boost::bind(
- &loader::rearrange,&ld,::boost::arg<1>(),::boost::arg<2>()),
- ar,version);
- } /* exit scope so that ld frees its resources */
- super::load_(ar,version,lm);
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const
- {
- if(size()>capacity())return false;
- if(size()==0||begin()==end()){
- if(size()!=0||begin()!=end())return false;
- }
- else{
- size_type s=0;
- for(const_iterator it=begin(),it_end=end();;++it,++s){
- if(*(it.get_node()->up())!=it.get_node()->impl())return false;
- if(it==it_end)break;
- }
- if(s!=size())return false;
- }
-
- return super::invariant_();
- }
-
- /* This forwarding function eases things for the boost::mem_fn construct
- * in BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT. Actually,
- * final_check_invariant is already an inherited member function of index.
- */
- void check_invariant_()const{this->final_check_invariant_();}
-#endif
-
-private:
- node_type* header()const{return this->final_header();}
-
- static void relocate(node_type* position,node_type* x)
- {
- node_impl_type::relocate(position->up(),x->up());
- }
-
- static void relocate(node_type* position,node_type* first,node_type* last)
- {
- node_impl_type::relocate(
- position->up(),first->up(),last->up());
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- void detach_iterators(node_type* x)
- {
- iterator it=make_iterator(x);
- safe_mode::detach_equivalent_iterators(it);
- }
-#endif
-
- template <class InputIterator>
- void assign_iter(InputIterator first,InputIterator last,mpl::true_)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- clear();
- for(;first!=last;++first)this->final_insert_ref_(*first);
- }
-
- void assign_iter(size_type n,value_param_type value,mpl::false_)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- clear();
- for(size_type i=0;i<n;++i)push_back(value);
- }
-
- template<typename InputIterator>
- void insert_iter(
- iterator position,InputIterator first,InputIterator last,mpl::true_)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=0;
- BOOST_TRY{
- for(;first!=last;++first){
- if(this->final_insert_ref_(*first).second)++s;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-s,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-s,end());
- }
-
- void insert_iter(
- iterator position,size_type n,value_param_type x,mpl::false_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=0;
- BOOST_TRY{
- while(n--){
- if(push_back(x).second)++s;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-s,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-s,end());
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_front_impl(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return emplace_impl(begin(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_back_impl(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return emplace_impl(end(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_impl(
- iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=
- this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- if(p.second&&position.get_node()!=header()){
- relocate(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- ptr_array ptrs;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-};
-
-/* comparison */
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator==(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator!=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return !(x==y);
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return y<x;
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return !(x<y);
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return !(x>y);
-}
-
-/* specialized algorithms */
-
-template<typename SuperMeta,typename TagList>
-void swap(
- random_access_index<SuperMeta,TagList>& x,
- random_access_index<SuperMeta,TagList>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-/* random access index specifier */
-
-template <typename TagList>
-struct random_access
-{
- BOOST_STATIC_ASSERT(detail::is_tag<TagList>::value);
-
- template<typename Super>
- struct node_class
- {
- typedef detail::random_access_index_node<Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::random_access_index<
- SuperMeta,typename TagList::type> type;
- };
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-/* Boost.Foreach compatibility */
-
-template<typename SuperMeta,typename TagList>
-inline boost::mpl::true_* boost_foreach_is_noncopyable(
- boost::multi_index::detail::random_access_index<SuperMeta,TagList>*&,
- boost_foreach_argument_dependent_lookup_hack)
-{
- return 0;
-}
-
-#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
-#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp
deleted file mode 100644
index 4b24c4f5937..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Copyright 2003-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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_RANKED_INDEX_HPP
-#define BOOST_MULTI_INDEX_RANKED_INDEX_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/detail/ord_index_impl.hpp>
-#include <boost/multi_index/detail/rnk_index_ops.hpp>
-#include <boost/multi_index/ranked_index_fwd.hpp>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* ranked_index augments a given ordered index to provide rank operations */
-
-template<typename OrderedIndexNodeImpl>
-struct ranked_node:OrderedIndexNodeImpl
-{
- std::size_t size;
-};
-
-template<typename OrderedIndexImpl>
-class ranked_index:public OrderedIndexImpl
-{
- typedef OrderedIndexImpl super;
-
-protected:
- typedef typename super::node_type node_type;
- typedef typename super::node_impl_pointer node_impl_pointer;
-
-public:
- typedef typename super::ctor_args_list ctor_args_list;
- typedef typename super::allocator_type allocator_type;
- typedef typename super::iterator iterator;
-
- /* rank operations */
-
- iterator nth(std::size_t n)const
- {
- return this->make_iterator(node_type::from_impl(
- ranked_index_nth(n,this->header()->impl())));
- }
-
- std::size_t rank(iterator position)const
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
-
- return ranked_index_rank(
- position.get_node()->impl(),this->header()->impl());
- }
-
- template<typename CompatibleKey>
- std::size_t find_rank(const CompatibleKey& x)const
- {
- return ranked_index_find_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::size_t find_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_find_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename CompatibleKey>
- std::size_t lower_bound_rank(const CompatibleKey& x)const
- {
- return ranked_index_lower_bound_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::size_t lower_bound_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_lower_bound_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename CompatibleKey>
- std::size_t upper_bound_rank(const CompatibleKey& x)const
- {
- return ranked_index_upper_bound_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::size_t upper_bound_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_upper_bound_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename CompatibleKey>
- std::pair<std::size_t,std::size_t> equal_range_rank(
- const CompatibleKey& x)const
- {
- return ranked_index_equal_range_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::pair<std::size_t,std::size_t> equal_range_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_equal_range_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder lower,UpperBounder upper)const
- {
- typedef typename mpl::if_<
- is_same<LowerBounder,unbounded_type>,
- BOOST_DEDUCED_TYPENAME mpl::if_<
- is_same<UpperBounder,unbounded_type>,
- both_unbounded_tag,
- lower_unbounded_tag
- >::type,
- BOOST_DEDUCED_TYPENAME mpl::if_<
- is_same<UpperBounder,unbounded_type>,
- upper_unbounded_tag,
- none_unbounded_tag
- >::type
- >::type dispatch;
-
- return range_rank(lower,upper,dispatch());
- }
-
-protected:
- ranked_index(const ranked_index& x):super(x){};
-
- ranked_index(const ranked_index& x,do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()){};
-
- ranked_index(
- const ctor_args_list& args_list,const allocator_type& al):
- super(args_list,al){}
-
-private:
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder lower,UpperBounder upper,none_unbounded_tag)const
- {
- node_type* y=this->header();
- node_type* z=this->root();
-
- if(!z)return std::pair<std::size_t,std::size_t>(0,0);
-
- std::size_t s=z->impl()->size;
-
- do{
- if(!lower(this->key(z->value()))){
- z=node_type::from_impl(z->right());
- }
- else if(!upper(this->key(z->value()))){
- y=z;
- s-=ranked_node_size(y->right())+1;
- z=node_type::from_impl(z->left());
- }
- else{
- return std::pair<std::size_t,std::size_t>(
- s-z->impl()->size+
- lower_range_rank(node_type::from_impl(z->left()),z,lower),
- s-ranked_node_size(z->right())+
- upper_range_rank(node_type::from_impl(z->right()),y,upper));
- }
- }while(z);
-
- return std::pair<std::size_t,std::size_t>(s,s);
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder,UpperBounder upper,lower_unbounded_tag)const
- {
- return std::pair<std::size_t,std::size_t>(
- 0,
- upper_range_rank(this->root(),this->header(),upper));
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder lower,UpperBounder,upper_unbounded_tag)const
- {
- return std::pair<std::size_t,std::size_t>(
- lower_range_rank(this->root(),this->header(),lower),
- this->size());
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder,UpperBounder,both_unbounded_tag)const
- {
- return std::pair<std::size_t,std::size_t>(0,this->size());
- }
-
- template<typename LowerBounder>
- std::size_t
- lower_range_rank(node_type* top,node_type* y,LowerBounder lower)const
- {
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(lower(this->key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=node_type::from_impl(top->left());
- }
- else top=node_type::from_impl(top->right());
- }while(top);
-
- return s;
- }
-
- template<typename UpperBounder>
- std::size_t
- upper_range_rank(node_type* top,node_type* y,UpperBounder upper)const
- {
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(!upper(this->key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=node_type::from_impl(top->left());
- }
- else top=node_type::from_impl(top->right());
- }while(top);
-
- return s;
- }
-};
-
-/* augmenting policy for ordered_index */
-
-struct rank_policy
-{
- template<typename OrderedIndexNodeImpl>
- struct augmented_node
- {
- typedef ranked_node<OrderedIndexNodeImpl> type;
- };
-
- template<typename OrderedIndexImpl>
- struct augmented_interface
- {
- typedef ranked_index<OrderedIndexImpl> type;
- };
-
- /* algorithmic stuff */
-
- template<typename Pointer>
- static void add(Pointer x,Pointer root)
- {
- x->size=1;
- while(x!=root){
- x=x->parent();
- ++(x->size);
- }
- }
-
- template<typename Pointer>
- static void remove(Pointer x,Pointer root)
- {
- while(x!=root){
- x=x->parent();
- --(x->size);
- }
- }
-
- template<typename Pointer>
- static void copy(Pointer x,Pointer y)
- {
- y->size=x->size;
- }
-
- template<typename Pointer>
- static void rotate_left(Pointer x,Pointer y) /* in: x==y->left() */
- {
- y->size=x->size;
- x->size=ranked_node_size(x->left())+ranked_node_size(x->right())+1;
- }
-
- template<typename Pointer>
- static void rotate_right(Pointer x,Pointer y) /* in: x==y->right() */
- {
- rotate_left(x,y);
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- template<typename Pointer>
- static bool invariant(Pointer x)
- {
- return x->size==ranked_node_size(x->left())+ranked_node_size(x->right())+1;
- }
-#endif
-};
-
-} /* namespace multi_index::detail */
-
-/* ranked_index specifiers */
-
-template<typename Arg1,typename Arg2,typename Arg3>
-struct ranked_unique
-{
- typedef typename detail::ordered_index_args<
- Arg1,Arg2,Arg3> index_args;
- typedef typename index_args::tag_list_type::type tag_list_type;
- typedef typename index_args::key_from_value_type key_from_value_type;
- typedef typename index_args::compare_type compare_type;
-
- template<typename Super>
- struct node_class
- {
- typedef detail::ordered_index_node<detail::rank_policy,Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::ordered_index<
- key_from_value_type,compare_type,
- SuperMeta,tag_list_type,detail::ordered_unique_tag,
- detail::rank_policy> type;
- };
-};
-
-template<typename Arg1,typename Arg2,typename Arg3>
-struct ranked_non_unique
-{
- typedef detail::ordered_index_args<
- Arg1,Arg2,Arg3> index_args;
- typedef typename index_args::tag_list_type::type tag_list_type;
- typedef typename index_args::key_from_value_type key_from_value_type;
- typedef typename index_args::compare_type compare_type;
-
- template<typename Super>
- struct node_class
- {
- typedef detail::ordered_index_node<detail::rank_policy,Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::ordered_index<
- key_from_value_type,compare_type,
- SuperMeta,tag_list_type,detail::ordered_non_unique_tag,
- detail::rank_policy> type;
- };
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp
deleted file mode 100644
index ad538e0c4b5..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp
+++ /dev/null
@@ -1,1080 +0,0 @@
-/* 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_SEQUENCED_INDEX_HPP
-#define BOOST_MULTI_INDEX_SEQUENCED_INDEX_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/bind.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/foreach_fwd.hpp>
-#include <boost/iterator/reverse_iterator.hpp>
-#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/push_front.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/multi_index/detail/bidir_node_iterator.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/index_node_base.hpp>
-#include <boost/multi_index/detail/safe_mode.hpp>
-#include <boost/multi_index/detail/scope_guard.hpp>
-#include <boost/multi_index/detail/seq_index_node.hpp>
-#include <boost/multi_index/detail/seq_index_ops.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/multi_index/sequenced_index_fwd.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <cstddef>
-#include <functional>
-#include <utility>
-#include <memory>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include<initializer_list>
-#endif
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/bind.hpp>
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
-#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(x) \
- detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
- detail::make_obj_guard(x,&sequenced_index::check_invariant_); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT \
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(*this)
-#else
-#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(x)
-#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* sequenced_index adds a layer of sequenced indexing to a given Super */
-
-template<typename SuperMeta,typename TagList>
-class sequenced_index:
- BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,public safe_mode::safe_container<
- sequenced_index<SuperMeta,TagList> >
-#endif
-
-{
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
- * lifetime of const references bound to temporaries --precisely what
- * scopeguards are.
- */
-
-#pragma parse_mfunc_templ off
-#endif
-
- typedef typename SuperMeta::type super;
-
-protected:
- typedef sequenced_index_node<
- typename super::node_type> node_type;
-
-private:
- typedef typename node_type::impl_type node_impl_type;
-
-public:
- /* types */
-
- typedef typename node_type::value_type value_type;
- typedef tuples::null_type ctor_args;
- typedef typename super::final_allocator_type allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::reference reference;
- typedef typename allocator_type::const_reference const_reference;
-#else
- typedef value_type& reference;
- typedef const value_type& const_reference;
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_iterator<
- bidir_node_iterator<node_type>,
- sequenced_index> iterator;
-#else
- typedef bidir_node_iterator<node_type> iterator;
-#endif
-
- typedef iterator const_iterator;
-
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer pointer;
- typedef typename allocator_type::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<allocator_type> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
-#endif
- typedef typename
- boost::reverse_iterator<iterator> reverse_iterator;
- typedef typename
- boost::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef TagList tag_list;
-
-protected:
- typedef typename super::final_node_type final_node_type;
- typedef tuples::cons<
- ctor_args,
- typename super::ctor_args_list> ctor_args_list;
- typedef typename mpl::push_front<
- typename super::index_type_list,
- sequenced_index>::type index_type_list;
- typedef typename mpl::push_front<
- typename super::iterator_type_list,
- iterator>::type iterator_type_list;
- typedef typename mpl::push_front<
- typename super::const_iterator_type_list,
- const_iterator>::type const_iterator_type_list;
- typedef typename super::copy_map_type copy_map_type;
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- typedef typename super::index_saver_type index_saver_type;
- typedef typename super::index_loader_type index_loader_type;
-#endif
-
-private:
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_container<
- sequenced_index> safe_super;
-#endif
-
- typedef typename call_traits<value_type>::param_type value_param_type;
-
- /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
- * expansion.
- */
-
- typedef std::pair<iterator,bool> emplace_return_type;
-
-public:
-
- /* construct/copy/destroy
- * Default and copy ctors are in the protected section as indices are
- * not supposed to be created on their own. No range ctor either.
- */
-
- sequenced_index<SuperMeta,TagList>& operator=(
- const sequenced_index<SuperMeta,TagList>& x)
- {
- this->final()=x.final();
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- sequenced_index<SuperMeta,TagList>& operator=(
- std::initializer_list<value_type> list)
- {
- this->final()=list;
- return *this;
- }
-#endif
-
- template <class InputIterator>
- void assign(InputIterator first,InputIterator last)
- {
- assign_iter(first,last,mpl::not_<is_integral<InputIterator> >());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void assign(std::initializer_list<value_type> list)
- {
- assign(list.begin(),list.end());
- }
-#endif
-
- void assign(size_type n,value_param_type value)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- clear();
- for(size_type i=0;i<n;++i)push_back(value);
- }
-
- allocator_type get_allocator()const BOOST_NOEXCEPT
- {
- return this->final().get_allocator();
- }
-
- /* iterators */
-
- iterator begin()BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(header()->next()));}
- const_iterator begin()const BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(header()->next()));}
- iterator
- end()BOOST_NOEXCEPT{return make_iterator(header());}
- const_iterator
- end()const BOOST_NOEXCEPT{return make_iterator(header());}
- reverse_iterator
- rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- const_reverse_iterator
- rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- reverse_iterator
- rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_reverse_iterator
- rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_iterator
- cbegin()const BOOST_NOEXCEPT{return begin();}
- const_iterator
- cend()const BOOST_NOEXCEPT{return end();}
- const_reverse_iterator
- crbegin()const BOOST_NOEXCEPT{return rbegin();}
- const_reverse_iterator
- crend()const BOOST_NOEXCEPT{return rend();}
-
- iterator iterator_to(const value_type& x)
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- const_iterator iterator_to(const value_type& x)const
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- /* capacity */
-
- bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
- size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
- size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
-
- void resize(size_type n)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- if(n>size()){
- for(size_type m=n-size();m--;)
- this->final_emplace_(BOOST_MULTI_INDEX_NULL_PARAM_PACK);
- }
- else if(n<size()){for(size_type m=size()-n;m--;)pop_back();}
- }
-
- void resize(size_type n,value_param_type x)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- if(n>size())insert(end(),n-size(),x);
- else if(n<size())for(size_type m=size()-n;m--;)pop_back();
- }
-
- /* access: no non-const versions provided as sequenced_index
- * handles const elements.
- */
-
- const_reference front()const{return *begin();}
- const_reference back()const{return *--end();}
-
- /* modifiers */
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace_front,emplace_front_impl)
-
- std::pair<iterator,bool> push_front(const value_type& x)
- {return insert(begin(),x);}
- std::pair<iterator,bool> push_front(BOOST_RV_REF(value_type) x)
- {return insert(begin(),boost::move(x));}
- void pop_front(){erase(begin());}
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace_back,emplace_back_impl)
-
- std::pair<iterator,bool> push_back(const value_type& x)
- {return insert(end(),x);}
- std::pair<iterator,bool> push_back(BOOST_RV_REF(value_type) x)
- {return insert(end(),boost::move(x));}
- void pop_back(){erase(--end());}
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
- emplace_return_type,emplace,emplace_impl,iterator,position)
-
- std::pair<iterator,bool> insert(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(x);
- if(p.second&&position.get_node()!=header()){
- relink(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- std::pair<iterator,bool> insert(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
- if(p.second&&position.get_node()!=header()){
- relink(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- void insert(iterator position,size_type n,value_param_type x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- for(size_type i=0;i<n;++i)insert(position,x);
- }
-
- template<typename InputIterator>
- void insert(iterator position,InputIterator first,InputIterator last)
- {
- insert_iter(position,first,last,mpl::not_<is_integral<InputIterator> >());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void insert(iterator position,std::initializer_list<value_type> list)
- {
- insert(position,list.begin(),list.end());
- }
-#endif
-
- iterator erase(iterator position)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
- return position;
- }
-
- iterator erase(iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- while(first!=last){
- first=erase(first);
- }
- return first;
- }
-
- bool replace(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- return this->final_replace_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- bool replace(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- return this->final_replace_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,back_,static_cast<final_node_type*>(position.get_node()));
- }
-
- void swap(sequenced_index<SuperMeta,TagList>& x)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(x);
- this->final_swap_(x.final());
- }
-
- void clear()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- this->final_clear_();
- }
-
- /* list operations */
-
- void splice(iterator position,sequenced_index<SuperMeta,TagList>& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_DIFFERENT_CONTAINER(*this,x);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- iterator first=x.begin(),last=x.end();
- while(first!=last){
- if(insert(position,*first).second)first=x.erase(first);
- else ++first;
- }
- }
-
- void splice(iterator position,sequenced_index<SuperMeta,TagList>& x,iterator i)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,x);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- if(&x==this){
- if(position!=i)relink(position.get_node(),i.get_node());
- }
- else{
- if(insert(position,*i).second){
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer has a hard time with safe mode, and the following
- * workaround is needed. Left it for all compilers as it does no
- * harm.
- */
- i.detach();
- x.erase(x.make_iterator(i.get_node()));
-#else
- x.erase(i);
-#endif
-
- }
- }
- }
-
- void splice(
- iterator position,sequenced_index<SuperMeta,TagList>& x,
- iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,x);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,x);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- if(&x==this){
- BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
- if(position!=last)relink(
- position.get_node(),first.get_node(),last.get_node());
- }
- else{
- while(first!=last){
- if(insert(position,*first).second)first=x.erase(first);
- else ++first;
- }
- }
- }
-
- void remove(value_param_type value)
- {
- sequenced_index_remove(
- *this,
- ::boost::bind(std::equal_to<value_type>(),::boost::arg<1>(),value));
- }
-
- template<typename Predicate>
- void remove_if(Predicate pred)
- {
- sequenced_index_remove(*this,pred);
- }
-
- void unique()
- {
- sequenced_index_unique(*this,std::equal_to<value_type>());
- }
-
- template <class BinaryPredicate>
- void unique(BinaryPredicate binary_pred)
- {
- sequenced_index_unique(*this,binary_pred);
- }
-
- void merge(sequenced_index<SuperMeta,TagList>& x)
- {
- sequenced_index_merge(*this,x,std::less<value_type>());
- }
-
- template <typename Compare>
- void merge(sequenced_index<SuperMeta,TagList>& x,Compare comp)
- {
- sequenced_index_merge(*this,x,comp);
- }
-
- void sort()
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- sequenced_index_sort(header(),std::less<value_type>());
- }
-
- template <typename Compare>
- void sort(Compare comp)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- sequenced_index_sort(header(),comp);
- }
-
- void reverse()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- node_impl_type::reverse(header()->impl());
- }
-
- /* rearrange operations */
-
- void relocate(iterator position,iterator i)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- if(position!=i)relink(position.get_node(),i.get_node());
- }
-
- void relocate(iterator position,iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- if(position!=last)relink(
- position.get_node(),first.get_node(),last.get_node());
- }
-
- template<typename InputIterator>
- void rearrange(InputIterator first)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- node_type* pos=header();
- for(size_type s=size();s--;){
- const value_type& v=*first++;
- relink(pos,node_from_value<node_type>(&v));
- }
- }
-
-BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
- sequenced_index(const ctor_args_list& args_list,const allocator_type& al):
- super(args_list.get_tail(),al)
- {
- empty_initialize();
- }
-
- sequenced_index(const sequenced_index<SuperMeta,TagList>& x):
- super(x)
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,safe_super()
-#endif
-
- {
- /* the actual copying takes place in subsequent call to copy_() */
- }
-
- sequenced_index(
- const sequenced_index<SuperMeta,TagList>& x,do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag())
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,safe_super()
-#endif
-
- {
- empty_initialize();
- }
-
- ~sequenced_index()
- {
- /* the container is guaranteed to be empty by now */
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- iterator make_iterator(node_type* node){return iterator(node,this);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node,const_cast<sequenced_index*>(this));}
-#else
- iterator make_iterator(node_type* node){return iterator(node);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node);}
-#endif
-
- void copy_(
- const sequenced_index<SuperMeta,TagList>& x,const copy_map_type& map)
- {
- node_type* org=x.header();
- node_type* cpy=header();
- do{
- node_type* next_org=node_type::from_impl(org->next());
- node_type* next_cpy=map.find(static_cast<final_node_type*>(next_org));
- cpy->next()=next_cpy->impl();
- next_cpy->prior()=cpy->impl();
- org=next_org;
- cpy=next_cpy;
- }while(org!=x.header());
-
- super::copy_(x,map);
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,final_node_type*& x,Variant variant)
- {
- final_node_type* res=super::insert_(v,x,variant);
- if(res==x)link(static_cast<node_type*>(x));
- return res;
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,node_type* position,final_node_type*& x,Variant variant)
- {
- final_node_type* res=super::insert_(v,position,x,variant);
- if(res==x)link(static_cast<node_type*>(x));
- return res;
- }
-
- void erase_(node_type* x)
- {
- unlink(x);
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- }
-
- void delete_all_nodes_()
- {
- for(node_type* x=node_type::from_impl(header()->next());x!=header();){
- node_type* y=node_type::from_impl(x->next());
- this->final_delete_node_(static_cast<final_node_type*>(x));
- x=y;
- }
- }
-
- void clear_()
- {
- super::clear_();
- empty_initialize();
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::detach_dereferenceable_iterators();
-#endif
- }
-
- void swap_(sequenced_index<SuperMeta,TagList>& x)
- {
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_(x);
- }
-
- void swap_elements_(sequenced_index<SuperMeta,TagList>& x)
- {
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_elements_(x);
- }
-
- template<typename Variant>
- bool replace_(value_param_type v,node_type* x,Variant variant)
- {
- return super::replace_(v,x,variant);
- }
-
- bool modify_(node_type* x)
- {
- BOOST_TRY{
- if(!super::modify_(x)){
- unlink(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- unlink(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_rollback_(node_type* x)
- {
- return super::modify_rollback_(x);
- }
-
- bool check_rollback_(node_type* x)const
- {
- return super::check_rollback_(x);
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm)const
- {
- sm.save(begin(),end(),ar,version);
- super::save_(ar,version,sm);
- }
-
- template<typename Archive>
- void load_(
- Archive& ar,const unsigned int version,const index_loader_type& lm)
- {
- lm.load(
- ::boost::bind(
- &sequenced_index::rearranger,this,::boost::arg<1>(),::boost::arg<2>()),
- ar,version);
- super::load_(ar,version,lm);
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const
- {
- if(size()==0||begin()==end()){
- if(size()!=0||begin()!=end()||
- header()->next()!=header()->impl()||
- header()->prior()!=header()->impl())return false;
- }
- else{
- size_type s=0;
- for(const_iterator it=begin(),it_end=end();it!=it_end;++it,++s){
- if(it.get_node()->next()->prior()!=it.get_node()->impl())return false;
- if(it.get_node()->prior()->next()!=it.get_node()->impl())return false;
- }
- if(s!=size())return false;
- }
-
- return super::invariant_();
- }
-
- /* This forwarding function eases things for the boost::mem_fn construct
- * in BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT. Actually,
- * final_check_invariant is already an inherited member function of index.
- */
- void check_invariant_()const{this->final_check_invariant_();}
-#endif
-
-private:
- node_type* header()const{return this->final_header();}
-
- void empty_initialize()
- {
- header()->prior()=header()->next()=header()->impl();
- }
-
- void link(node_type* x)
- {
- node_impl_type::link(x->impl(),header()->impl());
- };
-
- static void unlink(node_type* x)
- {
- node_impl_type::unlink(x->impl());
- }
-
- static void relink(node_type* position,node_type* x)
- {
- node_impl_type::relink(position->impl(),x->impl());
- }
-
- static void relink(node_type* position,node_type* first,node_type* last)
- {
- node_impl_type::relink(
- position->impl(),first->impl(),last->impl());
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- void rearranger(node_type* position,node_type *x)
- {
- if(!position)position=header();
- node_type::increment(position);
- if(position!=x)relink(position,x);
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- void detach_iterators(node_type* x)
- {
- iterator it=make_iterator(x);
- safe_mode::detach_equivalent_iterators(it);
- }
-#endif
-
- template <class InputIterator>
- void assign_iter(InputIterator first,InputIterator last,mpl::true_)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- clear();
- for(;first!=last;++first)this->final_insert_ref_(*first);
- }
-
- void assign_iter(size_type n,value_param_type value,mpl::false_)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- clear();
- for(size_type i=0;i<n;++i)push_back(value);
- }
-
- template<typename InputIterator>
- void insert_iter(
- iterator position,InputIterator first,InputIterator last,mpl::true_)
- {
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- for(;first!=last;++first){
- std::pair<final_node_type*,bool> p=
- this->final_insert_ref_(*first);
- if(p.second&&position.get_node()!=header()){
- relink(position.get_node(),p.first);
- }
- }
- }
-
- void insert_iter(
- iterator position,size_type n,value_param_type x,mpl::false_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- for(size_type i=0;i<n;++i)insert(position,x);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_front_impl(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return emplace_impl(begin(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_back_impl(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return emplace_impl(end(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_impl(
- iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=
- this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- if(p.second&&position.get_node()!=header()){
- relink(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-};
-
-/* comparison */
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator==(
- const sequenced_index<SuperMeta1,TagList1>& x,
- const sequenced_index<SuperMeta2,TagList2>& y)
-{
- return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<(
- const sequenced_index<SuperMeta1,TagList1>& x,
- const sequenced_index<SuperMeta2,TagList2>& y)
-{
- return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator!=(
- const sequenced_index<SuperMeta1,TagList1>& x,
- const sequenced_index<SuperMeta2,TagList2>& y)
-{
- return !(x==y);
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>(
- const sequenced_index<SuperMeta1,TagList1>& x,
- const sequenced_index<SuperMeta2,TagList2>& y)
-{
- return y<x;
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>=(
- const sequenced_index<SuperMeta1,TagList1>& x,
- const sequenced_index<SuperMeta2,TagList2>& y)
-{
- return !(x<y);
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<=(
- const sequenced_index<SuperMeta1,TagList1>& x,
- const sequenced_index<SuperMeta2,TagList2>& y)
-{
- return !(x>y);
-}
-
-/* specialized algorithms */
-
-template<typename SuperMeta,typename TagList>
-void swap(
- sequenced_index<SuperMeta,TagList>& x,
- sequenced_index<SuperMeta,TagList>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-/* sequenced index specifier */
-
-template <typename TagList>
-struct sequenced
-{
- BOOST_STATIC_ASSERT(detail::is_tag<TagList>::value);
-
- template<typename Super>
- struct node_class
- {
- typedef detail::sequenced_index_node<Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::sequenced_index<SuperMeta,typename TagList::type> type;
- };
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-/* Boost.Foreach compatibility */
-
-template<typename SuperMeta,typename TagList>
-inline boost::mpl::true_* boost_foreach_is_noncopyable(
- boost::multi_index::detail::sequenced_index<SuperMeta,TagList>*&,
- boost_foreach_argument_dependent_lookup_hack)
-{
- return 0;
-}
-
-#undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT
-#undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index_container.hpp b/src/third_party/boost-1.69.0/boost/multi_index_container.hpp
deleted file mode 100644
index b50bdbc90a6..00000000000
--- a/src/third_party/boost-1.69.0/boost/multi_index_container.hpp
+++ /dev/null
@@ -1,1407 +0,0 @@
-/* Multiply indexed container.
- *
- * 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_HPP
-#define BOOST_MULTI_INDEX_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <memory>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/move/core.hpp>
-#include <boost/mpl/at.hpp>
-#include <boost/mpl/contains.hpp>
-#include <boost/mpl/find_if.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/deref.hpp>
-#include <boost/multi_index_container_fwd.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/multi_index/detail/adl_swap.hpp>
-#include <boost/multi_index/detail/base_type.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/converter.hpp>
-#include <boost/multi_index/detail/header_holder.hpp>
-#include <boost/multi_index/detail/has_tag.hpp>
-#include <boost/multi_index/detail/no_duplicate_tags.hpp>
-#include <boost/multi_index/detail/safe_mode.hpp>
-#include <boost/multi_index/detail/scope_guard.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/utility/base_from_member.hpp>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/multi_index/detail/archive_constructed.hpp>
-#include <boost/multi_index/detail/serialization_version.hpp>
-#include <boost/serialization/collection_size_type.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#include <boost/serialization/version.hpp>
-#include <boost/throw_exception.hpp>
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
-#include <boost/multi_index/detail/invariant_assert.hpp>
-#define BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x) \
- detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
- detail::make_obj_guard(x,&multi_index_container::check_invariant_); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-#define BOOST_MULTI_INDEX_CHECK_INVARIANT \
- BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(*this)
-#else
-#define BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x)
-#define BOOST_MULTI_INDEX_CHECK_INVARIANT
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
-#pragma warning(push)
-#pragma warning(disable:4522) /* spurious warning on multiple operator=()'s */
-#endif
-
-template<typename Value,typename IndexSpecifierList,typename Allocator>
-class multi_index_container:
- private ::boost::base_from_member<
- typename boost::detail::allocator::rebind_to<
- Allocator,
- typename detail::multi_index_node_type<
- Value,IndexSpecifierList,Allocator>::type
- >::type>,
- BOOST_MULTI_INDEX_PRIVATE_IF_MEMBER_TEMPLATE_FRIENDS detail::header_holder<
-#ifndef BOOST_NO_CXX11_ALLOCATOR
- typename std::allocator_traits<
-#endif
- typename boost::detail::allocator::rebind_to<
- Allocator,
- typename detail::multi_index_node_type<
- Value,IndexSpecifierList,Allocator>::type
- >::type
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- ::pointer,
-#else
- >::pointer,
-#endif
- multi_index_container<Value,IndexSpecifierList,Allocator> >,
- public detail::multi_index_base_type<
- Value,IndexSpecifierList,Allocator>::type
-{
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
- * lifetime of const references bound to temporaries --precisely what
- * scopeguards are.
- */
-
-#pragma parse_mfunc_templ off
-#endif
-
-private:
- BOOST_COPYABLE_AND_MOVABLE(multi_index_container)
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
- template <typename,typename,typename> friend class detail::index_base;
- template <typename,typename> friend struct detail::header_holder;
- template <typename,typename> friend struct detail::converter;
-#endif
-
- typedef typename detail::multi_index_base_type<
- Value,IndexSpecifierList,Allocator>::type super;
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,
- typename super::node_type
- >::type node_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename node_allocator::pointer node_pointer;
-#else
- typedef std::allocator_traits<node_allocator> node_allocator_traits;
- typedef typename node_allocator_traits::pointer node_pointer;
-#endif
- typedef ::boost::base_from_member<
- node_allocator> bfm_allocator;
- typedef detail::header_holder<
- node_pointer,
- multi_index_container> bfm_header;
-
-public:
- /* All types are inherited from super, a few are explicitly
- * brought forward here to save us some typename's.
- */
-
- typedef typename super::ctor_args_list ctor_args_list;
- typedef IndexSpecifierList index_specifier_type_list;
-
- typedef typename super::index_type_list index_type_list;
-
- typedef typename super::iterator_type_list iterator_type_list;
- typedef typename super::const_iterator_type_list const_iterator_type_list;
- typedef typename super::value_type value_type;
- typedef typename super::final_allocator_type allocator_type;
- typedef typename super::iterator iterator;
- typedef typename super::const_iterator const_iterator;
-
- BOOST_STATIC_ASSERT(
- detail::no_duplicate_tags_in_index_list<index_type_list>::value);
-
- /* global project() needs to see this publicly */
-
- typedef typename super::node_type node_type;
-
- /* construct/copy/destroy */
-
- multi_index_container():
- bfm_allocator(allocator_type()),
- super(ctor_args_list(),bfm_allocator::member),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- }
-
- explicit multi_index_container(
- const ctor_args_list& args_list,
-
-#if BOOST_WORKAROUND(__IBMCPP__,<=600)
- /* VisualAge seems to have an ETI issue with the default value for
- * argument al.
- */
-
- const allocator_type& al=
- typename mpl::identity<multi_index_container>::type::
- allocator_type()):
-#else
- const allocator_type& al=allocator_type()):
-#endif
-
- bfm_allocator(al),
- super(args_list,bfm_allocator::member),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- }
-
- explicit multi_index_container(const allocator_type& al):
- bfm_allocator(al),
- super(ctor_args_list(),bfm_allocator::member),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- }
-
- template<typename InputIterator>
- multi_index_container(
- InputIterator first,InputIterator last,
-
-#if BOOST_WORKAROUND(__IBMCPP__,<=600)
- /* VisualAge seems to have an ETI issue with the default values
- * for arguments args_list and al.
- */
-
- const ctor_args_list& args_list=
- typename mpl::identity<multi_index_container>::type::
- ctor_args_list(),
- const allocator_type& al=
- typename mpl::identity<multi_index_container>::type::
- allocator_type()):
-#else
- const ctor_args_list& args_list=ctor_args_list(),
- const allocator_type& al=allocator_type()):
-#endif
-
- bfm_allocator(al),
- super(args_list,bfm_allocator::member),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- BOOST_TRY{
- iterator hint=super::end();
- for(;first!=last;++first){
- hint=super::make_iterator(
- insert_ref_(*first,hint.get_node()).first);
- ++hint;
- }
- }
- BOOST_CATCH(...){
- clear_();
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- multi_index_container(
- std::initializer_list<Value> list,
- const ctor_args_list& args_list=ctor_args_list(),
- const allocator_type& al=allocator_type()):
- bfm_allocator(al),
- super(args_list,bfm_allocator::member),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- BOOST_TRY{
- typedef const Value* init_iterator;
-
- iterator hint=super::end();
- for(init_iterator first=list.begin(),last=list.end();
- first!=last;++first){
- hint=super::make_iterator(insert_(*first,hint.get_node()).first);
- ++hint;
- }
- }
- BOOST_CATCH(...){
- clear_();
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-#endif
-
- multi_index_container(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& x):
- bfm_allocator(x.bfm_allocator::member),
- bfm_header(),
- super(x),
- node_count(0)
- {
- copy_map_type map(bfm_allocator::member,x.size(),x.header(),header());
- for(const_iterator it=x.begin(),it_end=x.end();it!=it_end;++it){
- map.clone(it.get_node());
- }
- super::copy_(x,map);
- map.release();
- node_count=x.size();
-
- /* Not until this point are the indices required to be consistent,
- * hence the position of the invariant checker.
- */
-
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- }
-
- multi_index_container(BOOST_RV_REF(multi_index_container) x):
- bfm_allocator(x.bfm_allocator::member),
- bfm_header(),
- super(x,detail::do_not_copy_elements_tag()),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x);
- swap_elements_(x);
- }
-
- ~multi_index_container()
- {
- delete_all_nodes_();
- }
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- /* As per http://www.boost.org/doc/html/move/emulation_limitations.html
- * #move.emulation_limitations.assignment_operator
- */
-
- multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& x)
- {
- multi_index_container y(x);
- this->swap(y);
- return *this;
- }
-#endif
-
- multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
- BOOST_COPY_ASSIGN_REF(multi_index_container) x)
- {
- multi_index_container y(x);
- this->swap(y);
- return *this;
- }
-
- multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
- BOOST_RV_REF(multi_index_container) x)
- {
- this->swap(x);
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
- std::initializer_list<Value> list)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- typedef const Value* init_iterator;
-
- multi_index_container x(*this,detail::do_not_copy_elements_tag());
- iterator hint=x.end();
- for(init_iterator first=list.begin(),last=list.end();
- first!=last;++first){
- hint=x.make_iterator(x.insert_(*first,hint.get_node()).first);
- ++hint;
- }
- x.swap_elements_(*this);
- return*this;
- }
-#endif
-
- allocator_type get_allocator()const BOOST_NOEXCEPT
- {
- return allocator_type(bfm_allocator::member);
- }
-
- /* retrieval of indices by number */
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATES)
- template<int N>
- struct nth_index
- {
- BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
- typedef typename mpl::at_c<index_type_list,N>::type type;
- };
-
- template<int N>
- typename nth_index<N>::type& get()BOOST_NOEXCEPT
- {
- BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
- return *this;
- }
-
- template<int N>
- const typename nth_index<N>::type& get()const BOOST_NOEXCEPT
- {
- BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
- return *this;
- }
-#endif
-
- /* retrieval of indices by tag */
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATES)
- template<typename Tag>
- struct index
- {
- typedef typename mpl::find_if<
- index_type_list,
- detail::has_tag<Tag>
- >::type iter;
-
- BOOST_STATIC_CONSTANT(
- bool,index_found=!(is_same<iter,typename mpl::end<index_type_list>::type >::value));
- BOOST_STATIC_ASSERT(index_found);
-
- typedef typename mpl::deref<iter>::type type;
- };
-
- template<typename Tag>
- typename index<Tag>::type& get()BOOST_NOEXCEPT
- {
- return *this;
- }
-
- template<typename Tag>
- const typename index<Tag>::type& get()const BOOST_NOEXCEPT
- {
- return *this;
- }
-#endif
-
- /* projection of iterators by number */
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATES)
- template<int N>
- struct nth_index_iterator
- {
- typedef typename nth_index<N>::type::iterator type;
- };
-
- template<int N>
- struct nth_index_const_iterator
- {
- typedef typename nth_index<N>::type::const_iterator type;
- };
-
- template<int N,typename IteratorType>
- typename nth_index_iterator<N>::type project(IteratorType it)
- {
- typedef typename nth_index<N>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
- BOOST_STATIC_ASSERT(
- (mpl::contains<iterator_type_list,IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(
- it,static_cast<typename IteratorType::container_type&>(*this));
-
- return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
- }
-
- template<int N,typename IteratorType>
- typename nth_index_const_iterator<N>::type project(IteratorType it)const
- {
- typedef typename nth_index<N>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
- BOOST_STATIC_ASSERT((
- mpl::contains<iterator_type_list,IteratorType>::value||
- mpl::contains<const_iterator_type_list,IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(
- it,static_cast<const typename IteratorType::container_type&>(*this));
- return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
- }
-#endif
-
- /* projection of iterators by tag */
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATES)
- template<typename Tag>
- struct index_iterator
- {
- typedef typename index<Tag>::type::iterator type;
- };
-
- template<typename Tag>
- struct index_const_iterator
- {
- typedef typename index<Tag>::type::const_iterator type;
- };
-
- template<typename Tag,typename IteratorType>
- typename index_iterator<Tag>::type project(IteratorType it)
- {
- typedef typename index<Tag>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
- BOOST_STATIC_ASSERT(
- (mpl::contains<iterator_type_list,IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(
- it,static_cast<typename IteratorType::container_type&>(*this));
- return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
- }
-
- template<typename Tag,typename IteratorType>
- typename index_const_iterator<Tag>::type project(IteratorType it)const
- {
- typedef typename index<Tag>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
- BOOST_STATIC_ASSERT((
- mpl::contains<iterator_type_list,IteratorType>::value||
- mpl::contains<const_iterator_type_list,IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(
- it,static_cast<const typename IteratorType::container_type&>(*this));
- return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
- }
-#endif
-
-BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
- typedef typename super::copy_map_type copy_map_type;
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- multi_index_container(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& x,
- detail::do_not_copy_elements_tag):
- bfm_allocator(x.bfm_allocator::member),
- bfm_header(),
- super(x,detail::do_not_copy_elements_tag()),
- node_count(0)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
- }
-#endif
-
- node_type* header()const
- {
- return &*bfm_header::member;
- }
-
- node_type* allocate_node()
- {
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- return &*bfm_allocator::member.allocate(1);
-#else
- return &*node_allocator_traits::allocate(bfm_allocator::member,1);
-#endif
- }
-
- void deallocate_node(node_type* x)
- {
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- bfm_allocator::member.deallocate(static_cast<node_pointer>(x),1);
-#else
- node_allocator_traits::deallocate(bfm_allocator::member,static_cast<node_pointer>(x),1);
-#endif
- }
-
- bool empty_()const
- {
- return node_count==0;
- }
-
- std::size_t size_()const
- {
- return node_count;
- }
-
- std::size_t max_size_()const
- {
- return static_cast<std::size_t >(-1);
- }
-
- template<typename Variant>
- std::pair<node_type*,bool> insert_(const Value& v,Variant variant)
- {
- node_type* x=0;
- node_type* res=super::insert_(v,x,variant);
- if(res==x){
- ++node_count;
- return std::pair<node_type*,bool>(res,true);
- }
- else{
- return std::pair<node_type*,bool>(res,false);
- }
- }
-
- std::pair<node_type*,bool> insert_(const Value& v)
- {
- return insert_(v,detail::lvalue_tag());
- }
-
- std::pair<node_type*,bool> insert_rv_(const Value& v)
- {
- return insert_(v,detail::rvalue_tag());
- }
-
- template<typename T>
- std::pair<node_type*,bool> insert_ref_(T& t)
- {
- node_type* x=allocate_node();
- BOOST_TRY{
- new(boost::addressof(x->value())) value_type(t);
- BOOST_TRY{
- node_type* res=super::insert_(x->value(),x,detail::emplaced_tag());
- if(res==x){
- ++node_count;
- return std::pair<node_type*,bool>(res,true);
- }
- else{
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- deallocate_node(x);
- return std::pair<node_type*,bool>(res,false);
- }
- }
- BOOST_CATCH(...){
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
- BOOST_CATCH(...){
- deallocate_node(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- std::pair<node_type*,bool> insert_ref_(const value_type& x)
- {
- return insert_(x);
- }
-
- std::pair<node_type*,bool> insert_ref_(value_type& x)
- {
- return insert_(x);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<node_type*,bool> emplace_(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- node_type* x=allocate_node();
- BOOST_TRY{
- detail::vartempl_placement_new(
- boost::addressof(x->value()),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- BOOST_TRY{
- node_type* res=super::insert_(x->value(),x,detail::emplaced_tag());
- if(res==x){
- ++node_count;
- return std::pair<node_type*,bool>(res,true);
- }
- else{
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- deallocate_node(x);
- return std::pair<node_type*,bool>(res,false);
- }
- }
- BOOST_CATCH(...){
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
- BOOST_CATCH(...){
- deallocate_node(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- template<typename Variant>
- std::pair<node_type*,bool> insert_(
- const Value& v,node_type* position,Variant variant)
- {
- node_type* x=0;
- node_type* res=super::insert_(v,position,x,variant);
- if(res==x){
- ++node_count;
- return std::pair<node_type*,bool>(res,true);
- }
- else{
- return std::pair<node_type*,bool>(res,false);
- }
- }
-
- std::pair<node_type*,bool> insert_(const Value& v,node_type* position)
- {
- return insert_(v,position,detail::lvalue_tag());
- }
-
- std::pair<node_type*,bool> insert_rv_(const Value& v,node_type* position)
- {
- return insert_(v,position,detail::rvalue_tag());
- }
-
- template<typename T>
- std::pair<node_type*,bool> insert_ref_(
- T& t,node_type* position)
- {
- node_type* x=allocate_node();
- BOOST_TRY{
- new(boost::addressof(x->value())) value_type(t);
- BOOST_TRY{
- node_type* res=super::insert_(
- x->value(),position,x,detail::emplaced_tag());
- if(res==x){
- ++node_count;
- return std::pair<node_type*,bool>(res,true);
- }
- else{
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- deallocate_node(x);
- return std::pair<node_type*,bool>(res,false);
- }
- }
- BOOST_CATCH(...){
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
- BOOST_CATCH(...){
- deallocate_node(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- std::pair<node_type*,bool> insert_ref_(
- const value_type& x,node_type* position)
- {
- return insert_(x,position);
- }
-
- std::pair<node_type*,bool> insert_ref_(
- value_type& x,node_type* position)
- {
- return insert_(x,position);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<node_type*,bool> emplace_hint_(
- node_type* position,
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- node_type* x=allocate_node();
- BOOST_TRY{
- detail::vartempl_placement_new(
- boost::addressof(x->value()),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- BOOST_TRY{
- node_type* res=super::insert_(
- x->value(),position,x,detail::emplaced_tag());
- if(res==x){
- ++node_count;
- return std::pair<node_type*,bool>(res,true);
- }
- else{
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- deallocate_node(x);
- return std::pair<node_type*,bool>(res,false);
- }
- }
- BOOST_CATCH(...){
- boost::detail::allocator::destroy(boost::addressof(x->value()));
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
- BOOST_CATCH(...){
- deallocate_node(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- void erase_(node_type* x)
- {
- --node_count;
- super::erase_(x);
- deallocate_node(x);
- }
-
- void delete_node_(node_type* x)
- {
- super::delete_node_(x);
- deallocate_node(x);
- }
-
- void delete_all_nodes_()
- {
- super::delete_all_nodes_();
- }
-
- void clear_()
- {
- delete_all_nodes_();
- super::clear_();
- node_count=0;
- }
-
- void swap_(multi_index_container<Value,IndexSpecifierList,Allocator>& x)
- {
- if(bfm_allocator::member!=x.bfm_allocator::member){
- detail::adl_swap(bfm_allocator::member,x.bfm_allocator::member);
- }
- std::swap(bfm_header::member,x.bfm_header::member);
- super::swap_(x);
- std::swap(node_count,x.node_count);
- }
-
- void swap_elements_(
- multi_index_container<Value,IndexSpecifierList,Allocator>& x)
- {
- std::swap(bfm_header::member,x.bfm_header::member);
- super::swap_elements_(x);
- std::swap(node_count,x.node_count);
- }
-
- bool replace_(const Value& k,node_type* x)
- {
- return super::replace_(k,x,detail::lvalue_tag());
- }
-
- bool replace_rv_(const Value& k,node_type* x)
- {
- return super::replace_(k,x,detail::rvalue_tag());
- }
-
- template<typename Modifier>
- bool modify_(Modifier& mod,node_type* x)
- {
- BOOST_TRY{
- mod(const_cast<value_type&>(x->value()));
- }
- BOOST_CATCH(...){
- this->erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
-
- BOOST_TRY{
- if(!super::modify_(x)){
- deallocate_node(x);
- --node_count;
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- deallocate_node(x);
- --node_count;
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- template<typename Modifier,typename Rollback>
- bool modify_(Modifier& mod,Rollback& back_,node_type* x)
- {
- BOOST_TRY{
- mod(const_cast<value_type&>(x->value()));
- }
- BOOST_CATCH(...){
- this->erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
-
- bool b;
- BOOST_TRY{
- b=super::modify_rollback_(x);
- }
- BOOST_CATCH(...){
- BOOST_TRY{
- back_(const_cast<value_type&>(x->value()));
- if(!super::check_rollback_(x))this->erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH(...){
- this->erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
- BOOST_CATCH_END
-
- BOOST_TRY{
- if(!b){
- back_(const_cast<value_type&>(x->value()));
- if(!super::check_rollback_(x))this->erase_(x);
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- this->erase_(x);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- friend class boost::serialization::access;
-
- BOOST_SERIALIZATION_SPLIT_MEMBER()
-
- typedef typename super::index_saver_type index_saver_type;
- typedef typename super::index_loader_type index_loader_type;
-
- template<class Archive>
- void save(Archive& ar,const unsigned int version)const
- {
- const serialization::collection_size_type s(size_());
- const detail::serialization_version<value_type> value_version;
- ar<<serialization::make_nvp("count",s);
- ar<<serialization::make_nvp("value_version",value_version);
-
- index_saver_type sm(bfm_allocator::member,s);
-
- for(iterator it=super::begin(),it_end=super::end();it!=it_end;++it){
- serialization::save_construct_data_adl(
- ar,boost::addressof(*it),value_version);
- ar<<serialization::make_nvp("item",*it);
- sm.add(it.get_node(),ar,version);
- }
- sm.add_track(header(),ar,version);
-
- super::save_(ar,version,sm);
- }
-
- template<class Archive>
- void load(Archive& ar,const unsigned int version)
- {
- BOOST_MULTI_INDEX_CHECK_INVARIANT;
-
- clear_();
- serialization::collection_size_type s;
- detail::serialization_version<value_type> value_version;
- if(version<1){
- std::size_t sz;
- ar>>serialization::make_nvp("count",sz);
- s=static_cast<serialization::collection_size_type>(sz);
- }
- else{
- ar>>serialization::make_nvp("count",s);
- }
- if(version<2){
- value_version=0;
- }
- else{
- ar>>serialization::make_nvp("value_version",value_version);
- }
-
- index_loader_type lm(bfm_allocator::member,s);
-
- for(std::size_t n=0;n<s;++n){
- detail::archive_constructed<Value> value("item",ar,value_version);
- std::pair<node_type*,bool> p=insert_rv_(
- value.get(),super::end().get_node());
- if(!p.second)throw_exception(
- archive::archive_exception(
- archive::archive_exception::other_exception));
- ar.reset_object_address(
- boost::addressof(p.first->value()),boost::addressof(value.get()));
- lm.add(p.first,ar,version);
- }
- lm.add_track(header(),ar,version);
-
- super::load_(ar,version,lm);
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const
- {
- return super::invariant_();
- }
-
- void check_invariant_()const
- {
- BOOST_MULTI_INDEX_INVARIANT_ASSERT(invariant_());
- }
-#endif
-
-private:
- std::size_t node_count;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-};
-
-#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
-#pragma warning(pop) /* C4522 */
-#endif
-
-/* retrieval of indices by number */
-
-template<typename MultiIndexContainer,int N>
-struct nth_index
-{
- BOOST_STATIC_CONSTANT(
- int,
- M=mpl::size<typename MultiIndexContainer::index_type_list>::type::value);
- BOOST_STATIC_ASSERT(N>=0&&N<M);
- typedef typename mpl::at_c<
- typename MultiIndexContainer::index_type_list,N>::type type;
-};
-
-template<int N,typename Value,typename IndexSpecifierList,typename Allocator>
-typename nth_index<
- multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type&
-get(
- multi_index_container<Value,IndexSpecifierList,Allocator>& m)BOOST_NOEXCEPT
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename nth_index<
- multi_index_container<
- Value,IndexSpecifierList,Allocator>,
- N
- >::type index_type;
-
- BOOST_STATIC_ASSERT(N>=0&&
- N<
- mpl::size<
- BOOST_DEDUCED_TYPENAME multi_index_type::index_type_list
- >::type::value);
-
- return detail::converter<multi_index_type,index_type>::index(m);
-}
-
-template<int N,typename Value,typename IndexSpecifierList,typename Allocator>
-const typename nth_index<
- multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type&
-get(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& m
-)BOOST_NOEXCEPT
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename nth_index<
- multi_index_container<
- Value,IndexSpecifierList,Allocator>,
- N
- >::type index_type;
-
- BOOST_STATIC_ASSERT(N>=0&&
- N<
- mpl::size<
- BOOST_DEDUCED_TYPENAME multi_index_type::index_type_list
- >::type::value);
-
- return detail::converter<multi_index_type,index_type>::index(m);
-}
-
-/* retrieval of indices by tag */
-
-template<typename MultiIndexContainer,typename Tag>
-struct index
-{
- typedef typename MultiIndexContainer::index_type_list index_type_list;
-
- typedef typename mpl::find_if<
- index_type_list,
- detail::has_tag<Tag>
- >::type iter;
-
- BOOST_STATIC_CONSTANT(
- bool,index_found=!(is_same<iter,typename mpl::end<index_type_list>::type >::value));
- BOOST_STATIC_ASSERT(index_found);
-
- typedef typename mpl::deref<iter>::type type;
-};
-
-template<
- typename Tag,typename Value,typename IndexSpecifierList,typename Allocator
->
-typename ::boost::multi_index::index<
- multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type&
-get(
- multi_index_container<Value,IndexSpecifierList,Allocator>& m)BOOST_NOEXCEPT
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename ::boost::multi_index::index<
- multi_index_container<
- Value,IndexSpecifierList,Allocator>,
- Tag
- >::type index_type;
-
- return detail::converter<multi_index_type,index_type>::index(m);
-}
-
-template<
- typename Tag,typename Value,typename IndexSpecifierList,typename Allocator
->
-const typename ::boost::multi_index::index<
- multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type&
-get(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& m
-)BOOST_NOEXCEPT
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename ::boost::multi_index::index<
- multi_index_container<
- Value,IndexSpecifierList,Allocator>,
- Tag
- >::type index_type;
-
- return detail::converter<multi_index_type,index_type>::index(m);
-}
-
-/* projection of iterators by number */
-
-template<typename MultiIndexContainer,int N>
-struct nth_index_iterator
-{
- typedef typename nth_index<MultiIndexContainer,N>::type::iterator type;
-};
-
-template<typename MultiIndexContainer,int N>
-struct nth_index_const_iterator
-{
- typedef typename nth_index<MultiIndexContainer,N>::type::const_iterator type;
-};
-
-template<
- int N,typename IteratorType,
- typename Value,typename IndexSpecifierList,typename Allocator>
-typename nth_index_iterator<
- multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type
-project(
- multi_index_container<Value,IndexSpecifierList,Allocator>& m,
- IteratorType it)
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename nth_index<multi_index_type,N>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
- BOOST_STATIC_ASSERT((
- mpl::contains<
- BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
- IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef detail::converter<
- multi_index_type,
- BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
-#endif
-
- return detail::converter<multi_index_type,index_type>::iterator(
- m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
-}
-
-template<
- int N,typename IteratorType,
- typename Value,typename IndexSpecifierList,typename Allocator>
-typename nth_index_const_iterator<
- multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type
-project(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& m,
- IteratorType it)
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename nth_index<multi_index_type,N>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
- BOOST_STATIC_ASSERT((
- mpl::contains<
- BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
- IteratorType>::value||
- mpl::contains<
- BOOST_DEDUCED_TYPENAME multi_index_type::const_iterator_type_list,
- IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef detail::converter<
- multi_index_type,
- BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
-#endif
-
- return detail::converter<multi_index_type,index_type>::const_iterator(
- m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
-}
-
-/* projection of iterators by tag */
-
-template<typename MultiIndexContainer,typename Tag>
-struct index_iterator
-{
- typedef typename ::boost::multi_index::index<
- MultiIndexContainer,Tag>::type::iterator type;
-};
-
-template<typename MultiIndexContainer,typename Tag>
-struct index_const_iterator
-{
- typedef typename ::boost::multi_index::index<
- MultiIndexContainer,Tag>::type::const_iterator type;
-};
-
-template<
- typename Tag,typename IteratorType,
- typename Value,typename IndexSpecifierList,typename Allocator>
-typename index_iterator<
- multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type
-project(
- multi_index_container<Value,IndexSpecifierList,Allocator>& m,
- IteratorType it)
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename ::boost::multi_index::index<
- multi_index_type,Tag>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
- BOOST_STATIC_ASSERT((
- mpl::contains<
- BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
- IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef detail::converter<
- multi_index_type,
- BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
-#endif
-
- return detail::converter<multi_index_type,index_type>::iterator(
- m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
-}
-
-template<
- typename Tag,typename IteratorType,
- typename Value,typename IndexSpecifierList,typename Allocator>
-typename index_const_iterator<
- multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type
-project(
- const multi_index_container<Value,IndexSpecifierList,Allocator>& m,
- IteratorType it)
-{
- typedef multi_index_container<
- Value,IndexSpecifierList,Allocator> multi_index_type;
- typedef typename ::boost::multi_index::index<
- multi_index_type,Tag>::type index_type;
-
-#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
- BOOST_STATIC_ASSERT((
- mpl::contains<
- BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
- IteratorType>::value||
- mpl::contains<
- BOOST_DEDUCED_TYPENAME multi_index_type::const_iterator_type_list,
- IteratorType>::value));
-#endif
-
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef detail::converter<
- multi_index_type,
- BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
-#endif
-
- return detail::converter<multi_index_type,index_type>::const_iterator(
- m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
-}
-
-/* Comparison. Simple forward to first index. */
-
-template<
- typename Value1,typename IndexSpecifierList1,typename Allocator1,
- typename Value2,typename IndexSpecifierList2,typename Allocator2
->
-bool operator==(
- const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
- const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
-{
- return get<0>(x)==get<0>(y);
-}
-
-template<
- typename Value1,typename IndexSpecifierList1,typename Allocator1,
- typename Value2,typename IndexSpecifierList2,typename Allocator2
->
-bool operator<(
- const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
- const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
-{
- return get<0>(x)<get<0>(y);
-}
-
-template<
- typename Value1,typename IndexSpecifierList1,typename Allocator1,
- typename Value2,typename IndexSpecifierList2,typename Allocator2
->
-bool operator!=(
- const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
- const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
-{
- return get<0>(x)!=get<0>(y);
-}
-
-template<
- typename Value1,typename IndexSpecifierList1,typename Allocator1,
- typename Value2,typename IndexSpecifierList2,typename Allocator2
->
-bool operator>(
- const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
- const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
-{
- return get<0>(x)>get<0>(y);
-}
-
-template<
- typename Value1,typename IndexSpecifierList1,typename Allocator1,
- typename Value2,typename IndexSpecifierList2,typename Allocator2
->
-bool operator>=(
- const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
- const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
-{
- return get<0>(x)>=get<0>(y);
-}
-
-template<
- typename Value1,typename IndexSpecifierList1,typename Allocator1,
- typename Value2,typename IndexSpecifierList2,typename Allocator2
->
-bool operator<=(
- const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
- const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
-{
- return get<0>(x)<=get<0>(y);
-}
-
-/* specialized algorithms */
-
-template<typename Value,typename IndexSpecifierList,typename Allocator>
-void swap(
- multi_index_container<Value,IndexSpecifierList,Allocator>& x,
- multi_index_container<Value,IndexSpecifierList,Allocator>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index */
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-/* class version = 1 : we now serialize the size through
- * boost::serialization::collection_size_type.
- * class version = 2 : proper use of {save|load}_construct_data.
- */
-
-namespace serialization {
-template<typename Value,typename IndexSpecifierList,typename Allocator>
-struct version<
- boost::multi_index_container<Value,IndexSpecifierList,Allocator>
->
-{
- BOOST_STATIC_CONSTANT(int,value=2);
-};
-} /* namespace serialization */
-#endif
-
-/* Associated global functions are promoted to namespace boost, except
- * comparison operators and swap, which are meant to be Koenig looked-up.
- */
-
-using multi_index::get;
-using multi_index::project;
-
-} /* namespace boost */
-
-#undef BOOST_MULTI_INDEX_CHECK_INVARIANT
-#undef BOOST_MULTI_INDEX_CHECK_INVARIANT_OF
-
-#endif
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
deleted file mode 100644
index 03daf96fe4e..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float.hpp
+++ /dev/null
@@ -1,2026 +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;
-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.69.0/boost/multiprecision/cpp_bin_float/transcendental.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
deleted file mode 100644
index 5c969716a54..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
+++ /dev/null
@@ -1,148 +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_MULTIPRECISION_CPP_BIN_FLOAT_TRANSCENDENTAL_HPP
-#define BOOST_MULTIPRECISION_CPP_BIN_FLOAT_TRANSCENDENTAL_HPP
-
-namespace boost{ namespace multiprecision{ namespace backends{
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-void eval_exp_taylor(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- static const int bits = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count;
- //
- // Taylor series for small argument, note returns exp(x) - 1:
- //
- res = limb_type(0);
- cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> num(arg), denom, t;
- denom = limb_type(1);
- eval_add(res, num);
-
- for(unsigned k = 2; ; ++k)
- {
- eval_multiply(denom, k);
- eval_multiply(num, arg);
- eval_divide(t, num, denom);
- eval_add(res, t);
- if(eval_is_zero(t) || (res.exponent() - bits > t.exponent()))
- break;
- }
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-void eval_exp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- //
- // This is based on MPFR's method, let:
- //
- // n = floor(x / ln(2))
- //
- // Then:
- //
- // r = x - n ln(2) : 0 <= r < ln(2)
- //
- // We can reduce r further by dividing by 2^k, with k ~ sqrt(n),
- // so if:
- //
- // e0 = exp(r / 2^k) - 1
- //
- // With e0 evaluated by taylor series for small arguments, then:
- //
- // exp(x) = 2^n (1 + e0)^2^k
- //
- // Note that to preserve precision we actually square (1 + e0) k times, calculating
- // the result less one each time, i.e.
- //
- // (1 + e0)^2 - 1 = e0^2 + 2e0
- //
- // Then add the final 1 at the end, given that e0 is small, this effectively wipes
- // out the error in the last step.
- //
- using default_ops::eval_multiply;
- using default_ops::eval_subtract;
- using default_ops::eval_add;
- using default_ops::eval_convert_to;
-
- int type = eval_fpclassify(arg);
- bool isneg = eval_get_sign(arg) < 0;
- if(type == (int)FP_NAN)
- {
- res = arg;
- errno = EDOM;
- return;
- }
- else if(type == (int)FP_INFINITE)
- {
- res = arg;
- if(isneg)
- res = limb_type(0u);
- else
- res = arg;
- return;
- }
- else if(type == (int)FP_ZERO)
- {
- res = limb_type(1);
- return;
- }
- cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> t, n;
- if(isneg)
- {
- t = arg;
- t.negate();
- eval_exp(res, t);
- t.swap(res);
- res = limb_type(1);
- eval_divide(res, t);
- return;
- }
-
- eval_divide(n, arg, default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >());
- eval_floor(n, n);
- eval_multiply(t, n, default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >());
- eval_subtract(t, arg);
- t.negate();
- if(eval_get_sign(t) < 0)
- {
- // There are some very rare cases where arg/ln2 is an integer, and the subsequent multiply
- // rounds up, in that situation t ends up negative at this point which breaks our invariants below:
- t = limb_type(0);
- }
-
- Exponent k, nn;
- eval_convert_to(&nn, n);
-
- if (nn == (std::numeric_limits<Exponent>::max)())
- {
- // The result will necessarily oveflow:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
- return;
- }
-
- BOOST_ASSERT(t.compare(default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >()) < 0);
-
- k = nn ? Exponent(1) << (msb(nn) / 2) : 0;
- k = (std::min)(k, (Exponent)(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count / 4));
- eval_ldexp(t, t, -k);
-
- eval_exp_taylor(res, t);
- //
- // Square 1 + res k times:
- //
- for(Exponent s = 0; s < k; ++s)
- {
- t.swap(res);
- eval_multiply(res, t, t);
- eval_ldexp(t, t, 1);
- eval_add(res, t);
- }
- eval_add(res, limb_type(1));
- eval_ldexp(res, res, nn);
-}
-
-}}} // namespaces
-
-#endif
-
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
deleted file mode 100644
index d81831b8a6d..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int.hpp
+++ /dev/null
@@ -1,1986 +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/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.69.0/boost/multiprecision/cpp_int/serialize.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/serialize.hpp
deleted file mode 100644
index 042a9f89f7e..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/serialize.hpp
+++ /dev/null
@@ -1,199 +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_MP_CPP_INT_SERIALIZE_HPP
-#define BOOST_MP_CPP_INT_SERIALIZE_HPP
-
-namespace boost {
-
-namespace archive{
-
-class binary_oarchive;
-class binary_iarchive;
-
-}
-
-namespace serialization {
-
-namespace mp = boost::multiprecision;
-
-namespace cpp_int_detail{
-
-using namespace boost::multiprecision;
-using namespace boost::multiprecision::backends;
-
-template <class T>
-struct is_binary_archive : public mpl::false_ {};
-template <>
-struct is_binary_archive<boost::archive::binary_oarchive> : public mpl::true_ {};
-template <>
-struct is_binary_archive<boost::archive::binary_iarchive> : public mpl::true_ {};
-
-//
-// We have 8 serialization methods to fill out (and test), they are all permutations of:
-// Load vs Store.
-// Trivial or non-trivial cpp_int type.
-// Binary or not archive.
-//
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::false_ const&)
-{
- // Load.
- // Non-trivial.
- // Non binary.
-
- bool s;
- ar & s;
- std::size_t limb_count;
- std::size_t byte_count;
- ar & byte_count;
- limb_count = byte_count / sizeof(limb_type) + ((byte_count % sizeof(limb_type)) ? 1 : 0);
- val.resize(limb_count, limb_count);
- limb_type* pl = val.limbs();
- for(std::size_t i = 0; i < limb_count; ++i)
- {
- pl[i] = 0;
- for(std::size_t j = 0; (j < sizeof(limb_type)) && byte_count; ++j)
- {
- unsigned char byte;
- ar & byte;
- pl[i] |= static_cast<limb_type>(byte) << (j * CHAR_BIT);
- --byte_count;
- }
- }
- if(s != val.sign())
- val.negate();
- val.normalize();
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::false_ const&)
-{
- // Store.
- // Non-trivial.
- // Non binary.
-
- bool s = val.sign();
- ar & s;
- limb_type* pl = val.limbs();
- std::size_t limb_count = val.size();
- std::size_t byte_count = limb_count * sizeof(limb_type);
- ar & byte_count;
-
- for(std::size_t i = 0; i < limb_count; ++i)
- {
- limb_type l = pl[i];
- for(std::size_t j = 0; j < sizeof(limb_type); ++j)
- {
- unsigned char byte = static_cast<unsigned char>((l >> (j * CHAR_BIT)) & ((1u << CHAR_BIT) - 1));
- ar & byte;
- }
- }
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::false_ const&)
-{
- // Load.
- // Trivial.
- // Non binary.
- bool s;
- typename Int::local_limb_type l = 0;
- ar & s;
- std::size_t byte_count;
- ar & byte_count;
- for(std::size_t i = 0; i < byte_count; ++i)
- {
- unsigned char b;
- ar & b;
- l |= static_cast<typename Int::local_limb_type>(b) << (i * CHAR_BIT);
- }
- *val.limbs() = l;
- if(s != val.sign())
- val.negate();
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::false_ const&)
-{
- // Store.
- // Trivial.
- // Non binary.
- bool s = val.sign();
- typename Int::local_limb_type l = *val.limbs();
- ar & s;
- std::size_t limb_count = sizeof(l);
- ar & limb_count;
- for(std::size_t i = 0; i < limb_count; ++i)
- {
- unsigned char b = static_cast<unsigned char>(static_cast<typename Int::local_limb_type>(l >> (i * CHAR_BIT)) & static_cast<typename Int::local_limb_type>((1u << CHAR_BIT) - 1));
- ar & b;
- }
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::true_ const&)
-{
- // Load.
- // Non-trivial.
- // Binary.
- bool s;
- std::size_t c;
- ar & s;
- ar & c;
- val.resize(c, c);
- ar.load_binary(val.limbs(), c * sizeof(limb_type));
- if(s != val.sign())
- val.negate();
- val.normalize();
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::true_ const&)
-{
- // Store.
- // Non-trivial.
- // Binary.
- bool s = val.sign();
- std::size_t c = val.size();
- ar & s;
- ar & c;
- ar.save_binary(val.limbs(), c * sizeof(limb_type));
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::true_ const&)
-{
- // Load.
- // Trivial.
- // Binary.
- bool s;
- ar & s;
- ar.load_binary(val.limbs(), sizeof(*val.limbs()));
- if(s != val.sign())
- val.negate();
-}
-template <class Archive, class Int>
-void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::true_ const&)
-{
- // Store.
- // Trivial.
- // Binary.
- bool s = val.sign();
- ar & s;
- ar.save_binary(val.limbs(), sizeof(*val.limbs()));
-}
-
-}
-
-template<class Archive, unsigned MinBits, unsigned MaxBits, mp::cpp_integer_type SignType, mp::cpp_int_check_type Checked, class Allocator>
-void serialize(Archive & ar, mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& val, const unsigned int /*version*/)
-{
- typedef typename Archive::is_saving save_tag;
- typedef mpl::bool_<mp::backends::is_trivial_cpp_int<mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> trivial_tag;
- typedef typename cpp_int_detail::is_binary_archive<Archive>::type binary_tag;
-
- // Just dispatch to the correct method:
- cpp_int_detail::do_serialize(ar, val, save_tag(), trivial_tag(), binary_tag());
-}
-
-}} // namespaces
-
-#endif // BOOST_MP_CPP_INT_SERIALIZE_HPP
-
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp
deleted file mode 100644
index cb61c5b59b6..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp
+++ /dev/null
@@ -1,525 +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_
-
-#ifndef BOOST_MATH_DEBUG_ADAPTER_HPP
-#define BOOST_MATH_DEBUG_ADAPTER_HPP
-
-#include <boost/multiprecision/traits/extract_exponent_type.hpp>
-#include <boost/multiprecision/detail/integer_ops.hpp>
-
-namespace boost{
-namespace multiprecision{
-namespace backends{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127) // conditional expression is constant
-#endif
-
- template <class Backend>
-struct debug_adaptor
-{
- typedef typename Backend::signed_types signed_types;
- typedef typename Backend::unsigned_types unsigned_types;
- typedef typename Backend::float_types float_types;
- typedef typename extract_exponent_type<
- Backend, number_category<Backend>::value>::type exponent_type;
-
-private:
- std::string debug_value;
- Backend m_value;
-public:
- void update_view()
- {
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- debug_value = m_value.str(0, static_cast<std::ios_base::fmtflags>(0));
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(const std::exception& e)
- {
- debug_value = "String conversion failed with message: \"";
- debug_value += e.what();
- debug_value += "\"";
- }
-#endif
- }
- debug_adaptor()
- {
- update_view();
- }
- debug_adaptor(const debug_adaptor& o) : debug_value(o.debug_value), m_value(o.m_value)
- {
- }
- debug_adaptor& operator = (const debug_adaptor& o)
- {
- debug_value = o.debug_value;
- m_value = o.m_value;
- return *this;
- }
- template <class T>
- debug_adaptor(const T& i, const typename enable_if_c<is_convertible<T, Backend>::value>::type* = 0)
- : m_value(i)
- {
- update_view();
- }
- template <class T>
- debug_adaptor(const T& i, const T& j)
- : m_value(i, j)
- {
- update_view();
- }
- template <class T>
- typename enable_if_c<is_arithmetic<T>::value || is_convertible<T, Backend>::value, debug_adaptor&>::type operator = (const T& i)
- {
- m_value = i;
- update_view();
- return *this;
- }
- debug_adaptor& operator = (const char* s)
- {
- m_value = s;
- update_view();
- return *this;
- }
- void swap(debug_adaptor& o)
- {
- std::swap(m_value, o.value());
- std::swap(debug_value, o.debug_value);
- }
- std::string str(std::streamsize digits, std::ios_base::fmtflags f)const
- {
- return m_value.str(digits, f);
- }
- void negate()
- {
- m_value.negate();
- update_view();
- }
- int compare(const debug_adaptor& o)const
- {
- return m_value.compare(o.value());
- }
- template <class T>
- int compare(const T& i)const
- {
- return m_value.compare(i);
- }
- Backend& value()
- {
- return m_value;
- }
- const Backend& value()const
- {
- return m_value;
- }
- template <class Archive>
- void serialize(Archive& ar, const unsigned int /*version*/)
- {
- ar & m_value;
- typedef typename Archive::is_loading tag;
- if(tag::value)
- update_view();
- }
- static unsigned default_precision() BOOST_NOEXCEPT
- {
- return Backend::default_precision();
- }
- static void default_precision(unsigned v) BOOST_NOEXCEPT
- {
- Backend::default_precision(v);
- }
- unsigned precision()const BOOST_NOEXCEPT
- {
- return value().precision();
- }
- void precision(unsigned digits10) BOOST_NOEXCEPT
- {
- value().precision(digits10);
- }
-};
-
-template <class Backend>
-inline Backend const& unwrap_debug_type(debug_adaptor<Backend> const& val)
-{
- return val.value();
-}
-template <class T>
-inline const T& unwrap_debug_type(const T& val)
-{
- return val;
-}
-
-#define NON_MEMBER_OP1(name, str) \
- template <class Backend>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value());\
- result.update_view();\
- }
-
-#define NON_MEMBER_OP2(name, str) \
- template <class Backend, class T>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a));\
- result.update_view();\
- }\
- template <class Backend>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a));\
- result.update_view();\
- }
-
-#define NON_MEMBER_OP3(name, str) \
- template <class Backend, class T, class U>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const U& b)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
- result.update_view();\
- }\
- template <class Backend, class T>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const T& b)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
- result.update_view();\
- }\
- template <class Backend, class T>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const debug_adaptor<Backend>& b)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
- result.update_view();\
- }\
- template <class Backend>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const debug_adaptor<Backend>& b)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
- result.update_view();\
- }
-
-#define NON_MEMBER_OP4(name, str) \
- template <class Backend, class T, class U, class V>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const U& b, const V& c)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
- result.update_view();\
- }\
- template <class Backend, class T>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const debug_adaptor<Backend>& b, const T& c)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
- result.update_view();\
- }\
- template <class Backend, class T>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const T& b, const debug_adaptor<Backend>& c)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
- result.update_view();\
- }\
- template <class Backend, class T>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const debug_adaptor<Backend>& b, const debug_adaptor<Backend>& c)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
- result.update_view();\
- }\
- template <class Backend>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const debug_adaptor<Backend>& b, const debug_adaptor<Backend>& c)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
- result.update_view();\
- }\
- template <class Backend, class T, class U>\
- inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const T& b, const U& c)\
- {\
- using default_ops::BOOST_JOIN(eval_, name);\
- BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
- result.update_view();\
- }\
-
-NON_MEMBER_OP2(add, "+=")
-NON_MEMBER_OP2(subtract, "-=")
-NON_MEMBER_OP2(multiply, "*=")
-NON_MEMBER_OP2(divide, "/=")
-
-template <class Backend, class R>
-inline void eval_convert_to(R* result, const debug_adaptor<Backend>& val)
-{
- using default_ops::eval_convert_to;
- eval_convert_to(result, val.value());
-}
-
-template <class Backend, class Exp>
-inline void eval_frexp(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& arg, Exp* exp)
-{
- eval_frexp(result.value(), arg.value(), exp);
- result.update_view();
-}
-
-template <class Backend, class Exp>
-inline void eval_ldexp(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& arg, Exp exp)
-{
- eval_ldexp(result.value(), arg.value(), exp);
- result.update_view();
-}
-
-template <class Backend, class Exp>
-inline void eval_scalbn(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& arg, Exp exp)
-{
- using default_ops::eval_scalbn;
- eval_scalbn(result.value(), arg.value(), exp);
- result.update_view();
-}
-
-template <class Backend>
-inline typename Backend::exponent_type eval_ilogb(const debug_adaptor<Backend>& arg)
-{
- using default_ops::eval_ilogb;
- return eval_ilogb(arg.value());
-}
-
-NON_MEMBER_OP2(floor, "floor")
-NON_MEMBER_OP2(ceil, "ceil")
-NON_MEMBER_OP2(sqrt, "sqrt")
-NON_MEMBER_OP2(logb, "logb")
-
-template <class Backend>
-inline int eval_fpclassify(const debug_adaptor<Backend>& arg)
-{
- using default_ops::eval_fpclassify;
- return eval_fpclassify(arg.value());
-}
-
-/*********************************************************************
-*
-* Optional arithmetic operations come next:
-*
-*********************************************************************/
-
-NON_MEMBER_OP3(add, "+")
-NON_MEMBER_OP3(subtract, "-")
-NON_MEMBER_OP3(multiply, "*")
-NON_MEMBER_OP3(divide, "/")
-NON_MEMBER_OP3(multiply_add, "fused-multiply-add")
-NON_MEMBER_OP3(multiply_subtract, "fused-multiply-subtract")
-NON_MEMBER_OP4(multiply_add, "fused-multiply-add")
-NON_MEMBER_OP4(multiply_subtract, "fused-multiply-subtract")
-
-NON_MEMBER_OP1(increment, "increment")
-NON_MEMBER_OP1(decrement, "decrement")
-
-/*********************************************************************
-*
-* Optional integer operations come next:
-*
-*********************************************************************/
-
-NON_MEMBER_OP2(modulus, "%=")
-NON_MEMBER_OP3(modulus, "%")
-NON_MEMBER_OP2(bitwise_or, "|=")
-NON_MEMBER_OP3(bitwise_or, "|")
-NON_MEMBER_OP2(bitwise_and, "&=")
-NON_MEMBER_OP3(bitwise_and, "&")
-NON_MEMBER_OP2(bitwise_xor, "^=")
-NON_MEMBER_OP3(bitwise_xor, "^")
-NON_MEMBER_OP4(qr, "quotient-and-remainder")
-NON_MEMBER_OP2(complement, "~")
-
-template <class Backend>
-inline void eval_left_shift(debug_adaptor<Backend>& arg, std::size_t a)
-{
- using default_ops::eval_left_shift;
- eval_left_shift(arg.value(), a);
- arg.update_view();\
-}
-template <class Backend>
-inline void eval_left_shift(debug_adaptor<Backend>& arg, const debug_adaptor<Backend>& a, std::size_t b)
-{
- using default_ops::eval_left_shift;
- eval_left_shift(arg.value(), a.value(), b);
- arg.update_view();\
-}
-template <class Backend>
-inline void eval_right_shift(debug_adaptor<Backend>& arg, std::size_t a)
-{
- using default_ops::eval_right_shift;
- eval_right_shift(arg.value(), a);
- arg.update_view();\
-}
-template <class Backend>
-inline void eval_right_shift(debug_adaptor<Backend>& arg, const debug_adaptor<Backend>& a, std::size_t b)
-{
- using default_ops::eval_right_shift;
- eval_right_shift(arg.value(), a.value(), b);
- arg.update_view();\
-}
-
-template <class Backend, class T>
-inline unsigned eval_integer_modulus(const debug_adaptor<Backend>& arg, const T& a)
-{
- using default_ops::eval_integer_modulus;
- return eval_integer_modulus(arg.value(), a);
-}
-
-template <class Backend>
-inline unsigned eval_lsb(const debug_adaptor<Backend>& arg)
-{
- using default_ops::eval_lsb;
- return eval_lsb(arg.value());
-}
-
-template <class Backend>
-inline unsigned eval_msb(const debug_adaptor<Backend>& arg)
-{
- using default_ops::eval_msb;
- return eval_msb(arg.value());
-}
-
-template <class Backend>
-inline bool eval_bit_test(const debug_adaptor<Backend>& arg, unsigned a)
-{
- using default_ops::eval_bit_test;
- return eval_bit_test(arg.value(), a);
-}
-
-template <class Backend>
-inline void eval_bit_set(const debug_adaptor<Backend>& arg, unsigned a)
-{
- using default_ops::eval_bit_set;
- eval_bit_set(arg.value(), a);
- arg.update_view();\
-}
-template <class Backend>
-inline void eval_bit_unset(const debug_adaptor<Backend>& arg, unsigned a)
-{
- using default_ops::eval_bit_unset;
- eval_bit_unset(arg.value(), a);
- arg.update_view();\
-}
-template <class Backend>
-inline void eval_bit_flip(const debug_adaptor<Backend>& arg, unsigned a)
-{
- using default_ops::eval_bit_flip;
- eval_bit_flip(arg.value(), a);
- arg.update_view();\
-}
-
-NON_MEMBER_OP3(gcd, "gcd")
-NON_MEMBER_OP3(lcm, "lcm")
-NON_MEMBER_OP4(powm, "powm");
-
-/*********************************************************************
-*
-* abs/fabs:
-*
-*********************************************************************/
-
-NON_MEMBER_OP2(abs, "abs")
-NON_MEMBER_OP2(fabs, "fabs")
-
-/*********************************************************************
-*
-* Floating point functions:
-*
-*********************************************************************/
-
-NON_MEMBER_OP2(trunc, "trunc")
-NON_MEMBER_OP2(round, "round")
-NON_MEMBER_OP2(exp, "exp")
-NON_MEMBER_OP2(log, "log")
-NON_MEMBER_OP2(log10, "log10")
-NON_MEMBER_OP2(sin, "sin")
-NON_MEMBER_OP2(cos, "cos")
-NON_MEMBER_OP2(tan, "tan")
-NON_MEMBER_OP2(asin, "asin")
-NON_MEMBER_OP2(acos, "acos")
-NON_MEMBER_OP2(atan, "atan")
-NON_MEMBER_OP2(sinh, "sinh")
-NON_MEMBER_OP2(cosh, "cosh")
-NON_MEMBER_OP2(tanh, "tanh")
-NON_MEMBER_OP3(fmod, "fmod")
-NON_MEMBER_OP3(pow, "pow")
-NON_MEMBER_OP3(atan2, "atan2")
-
-template <class Backend>
-int eval_signbit(const debug_adaptor<Backend>& val)
-{
- return eval_signbit(val.value());
-}
-
-template <class Backend>
-std::size_t hash_value(const debug_adaptor<Backend>& val)
-{
- return hash_value(val.value());
-}
-
-} // namespace backends
-
-using backends::debug_adaptor;
-
-template<class Backend>
-struct number_category<backends::debug_adaptor<Backend> > : public number_category<Backend> {};
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}} // namespaces
-
-namespace std{
-
-template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
-class numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::debug_adaptor<Backend>, ExpressionTemplates> >
- : public std::numeric_limits<boost::multiprecision::number<Backend, ExpressionTemplates> >
-{
- typedef std::numeric_limits<boost::multiprecision::number<Backend, ExpressionTemplates> > base_type;
- typedef boost::multiprecision::number<boost::multiprecision::backends::debug_adaptor<Backend>, ExpressionTemplates> number_type;
-public:
- static number_type (min)() BOOST_NOEXCEPT { return (base_type::min)(); }
- static number_type (max)() BOOST_NOEXCEPT { return (base_type::max)(); }
- static number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
- static number_type epsilon() BOOST_NOEXCEPT { return base_type::epsilon(); }
- static number_type round_error() BOOST_NOEXCEPT { return epsilon() / 2; }
- static number_type infinity() BOOST_NOEXCEPT { return base_type::infinity(); }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return base_type::quiet_NaN(); }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return base_type::signaling_NaN(); }
- static number_type denorm_min() BOOST_NOEXCEPT { return base_type::denorm_min(); }
-};
-
-} // namespace std
-
-namespace boost{ namespace math{
-
-namespace policies{
-
-template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates, class Policy>
-struct precision< boost::multiprecision::number<boost::multiprecision::debug_adaptor<Backend>, ExpressionTemplates>, Policy>
- : public precision<boost::multiprecision::number<Backend, ExpressionTemplates>, Policy>
-{};
-
-#undef NON_MEMBER_OP1
-#undef NON_MEMBER_OP2
-#undef NON_MEMBER_OP3
-#undef NON_MEMBER_OP4
-
-} // namespace policies
-
-}} // namespaces boost::math
-
-
-#endif
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
deleted file mode 100644
index 1abc705a9a3..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/pow.hpp
+++ /dev/null
@@ -1,909 +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 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.69.0/boost/multiprecision/detail/generic_interconvert.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/generic_interconvert.hpp
deleted file mode 100644
index 730f45cc3a8..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/generic_interconvert.hpp
+++ /dev/null
@@ -1,590 +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_MP_GENERIC_INTERCONVERT_HPP
-#define BOOST_MP_GENERIC_INTERCONVERT_HPP
-
-#include <boost/multiprecision/detail/default_ops.hpp>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127 6326)
-#endif
-
-namespace boost{ namespace multiprecision{ namespace detail{
-
-template <class To, class From>
-inline To do_cast(const From & from)
-{
- return static_cast<To>(from);
-}
-template <class To, class B, ::boost::multiprecision::expression_template_option et>
-inline To do_cast(const number<B, et>& from)
-{
- return from.template convert_to<To>();
-}
-
-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*/)
-{
- using default_ops::eval_get_sign;
- using default_ops::eval_bitwise_and;
- using default_ops::eval_convert_to;
- using default_ops::eval_right_shift;
- using default_ops::eval_ldexp;
- using default_ops::eval_add;
- using default_ops::eval_is_zero;
- // smallest unsigned type handled natively by "From" is likely to be it's limb_type:
- typedef typename canonical<unsigned char, From>::type l_limb_type;
- // get the corresponding type that we can assign to "To":
- typedef typename canonical<l_limb_type, To>::type to_type;
- From t(from);
- bool is_neg = eval_get_sign(t) < 0;
- if(is_neg)
- t.negate();
- // Pick off the first limb:
- l_limb_type limb;
- l_limb_type mask = static_cast<l_limb_type>(~static_cast<l_limb_type>(0));
- From fl;
- eval_bitwise_and(fl, t, mask);
- eval_convert_to(&limb, fl);
- to = static_cast<to_type>(limb);
- eval_right_shift(t, std::numeric_limits<l_limb_type>::digits);
- //
- // Then keep picking off more limbs until "t" is zero:
- //
- To l;
- unsigned shift = std::numeric_limits<l_limb_type>::digits;
- while(!eval_is_zero(t))
- {
- eval_bitwise_and(fl, t, mask);
- eval_convert_to(&limb, fl);
- l = static_cast<to_type>(limb);
- eval_right_shift(t, std::numeric_limits<l_limb_type>::digits);
- eval_ldexp(l, l, shift);
- eval_add(to, l);
- shift += std::numeric_limits<l_limb_type>::digits;
- }
- //
- // Finish off by setting the sign:
- //
- if(is_neg)
- to.negate();
-}
-
-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*/)
-{
- using default_ops::eval_get_sign;
- using default_ops::eval_bitwise_and;
- using default_ops::eval_convert_to;
- using default_ops::eval_right_shift;
- using default_ops::eval_left_shift;
- using default_ops::eval_bitwise_or;
- using default_ops::eval_is_zero;
- // smallest unsigned type handled natively by "From" is likely to be it's limb_type:
- typedef typename canonical<unsigned char, From>::type limb_type;
- // get the corresponding type that we can assign to "To":
- typedef typename canonical<limb_type, To>::type to_type;
- From t(from);
- bool is_neg = eval_get_sign(t) < 0;
- if(is_neg)
- t.negate();
- // Pick off the first limb:
- limb_type limb;
- limb_type mask = static_cast<limb_type>(~static_cast<limb_type>(0));
- From fl;
- eval_bitwise_and(fl, t, mask);
- eval_convert_to(&limb, fl);
- to = static_cast<to_type>(limb);
- eval_right_shift(t, std::numeric_limits<limb_type>::digits);
- //
- // Then keep picking off more limbs until "t" is zero:
- //
- To l;
- unsigned shift = std::numeric_limits<limb_type>::digits;
- while(!eval_is_zero(t))
- {
- eval_bitwise_and(fl, t, mask);
- eval_convert_to(&limb, fl);
- l = static_cast<to_type>(limb);
- eval_right_shift(t, std::numeric_limits<limb_type>::digits);
- eval_left_shift(l, shift);
- eval_bitwise_or(to, l);
- shift += std::numeric_limits<limb_type>::digits;
- }
- //
- // Finish off by setting the sign:
- //
- if(is_neg)
- to.negate();
-}
-
-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*/)
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
- //
- // The code here only works when the radix of "From" is 2, we could try shifting by other
- // radixes but it would complicate things.... use a string conversion when the radix is other
- // than 2:
- //
- if(std::numeric_limits<number<From> >::radix != 2)
- {
- to = from.str(0, std::ios_base::fmtflags()).c_str();
- return;
- }
-
-
- typedef typename canonical<unsigned char, To>::type ui_type;
-
- using default_ops::eval_fpclassify;
- using default_ops::eval_add;
- using default_ops::eval_subtract;
- using default_ops::eval_convert_to;
- using default_ops::eval_get_sign;
- using default_ops::eval_is_zero;
-
- //
- // First classify the input, then handle the special cases:
- //
- int c = eval_fpclassify(from);
-
- if(c == (int)FP_ZERO)
- {
- to = ui_type(0);
- return;
- }
- else if(c == (int)FP_NAN)
- {
- to = static_cast<const char*>("nan");
- return;
- }
- else if(c == (int)FP_INFINITE)
- {
- to = static_cast<const char*>("inf");
- if(eval_get_sign(from) < 0)
- to.negate();
- return;
- }
-
- typename From::exponent_type e;
- From f, term;
- to = ui_type(0);
-
- eval_frexp(f, from, &e);
-
- static const int shift = std::numeric_limits<boost::intmax_t>::digits - 1;
-
- while(!eval_is_zero(f))
- {
- // extract int sized bits from f:
- eval_ldexp(f, f, shift);
- eval_floor(term, f);
- e -= shift;
- eval_ldexp(to, to, shift);
- typename boost::multiprecision::detail::canonical<boost::intmax_t, To>::type ll;
- eval_convert_to(&ll, term);
- eval_add(to, ll);
- eval_subtract(f, term);
- }
- typedef typename To::exponent_type to_exponent;
- if((e > (std::numeric_limits<to_exponent>::max)()) || (e < (std::numeric_limits<to_exponent>::min)()))
- {
- to = static_cast<const char*>("inf");
- if(eval_get_sign(from) < 0)
- to.negate();
- return;
- }
- eval_ldexp(to, to, static_cast<to_exponent>(e));
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-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*/)
-{
- typedef typename component_type<number<To> >::type to_component_type;
-
- number<From> t(from);
- to_component_type n(numerator(t)), d(denominator(t));
- using default_ops::assign_components;
- assign_components(to, n.backend(), d.backend());
-}
-
-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*/)
-{
- typedef typename component_type<number<To> >::type to_component_type;
-
- number<From> t(from);
- to_component_type n(t), d(1);
- using default_ops::assign_components;
- assign_components(to, n.backend(), d.backend());
-}
-
-template <class R, class LargeInteger>
-R safe_convert_to_float(const LargeInteger& i)
-{
- using std::ldexp;
- if(!i)
- return R(0);
- if(std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::max_exponent)
- {
- LargeInteger val(i);
- if(val.sign() < 0)
- val = -val;
- unsigned mb = msb(val);
- if(mb >= std::numeric_limits<R>::max_exponent)
- {
- int scale_factor = (int)mb + 1 - std::numeric_limits<R>::max_exponent;
- BOOST_ASSERT(scale_factor >= 1);
- val >>= scale_factor;
- R result = val.template convert_to<R>();
- if(std::numeric_limits<R>::digits == 0 || std::numeric_limits<R>::digits >= std::numeric_limits<R>::max_exponent)
- {
- //
- // Calculate and add on the remainder, only if there are more
- // digits in the mantissa that the size of the exponent, in
- // other words if we are dropping digits in the conversion
- // otherwise:
- //
- LargeInteger remainder(i);
- remainder &= (LargeInteger(1) << scale_factor) - 1;
- result += ldexp(safe_convert_to_float<R>(remainder), -scale_factor);
- }
- return i.sign() < 0 ? static_cast<R>(-result) : result;
- }
- }
- return i.template convert_to<R>();
-}
-
-template <class To, class Integer>
-inline typename disable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
- generic_convert_rational_to_float_imp(To& result, const Integer& n, const Integer& d, const mpl::true_&)
-{
- //
- // If we get here, then there's something about one type or the other
- // that prevents an exactly rounded result from being calculated
- // (or at least it's not clear how to implement such a thing).
- //
- using default_ops::eval_divide;
- number<To> fn(safe_convert_to_float<number<To> >(n)), fd(safe_convert_to_float<number<To> >(d));
- eval_divide(result, fn.backend(), fd.backend());
-}
-template <class To, class Integer>
-inline typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
- generic_convert_rational_to_float_imp(To& result, const Integer& n, const Integer& d, const mpl::true_&)
-{
- //
- // If we get here, then there's something about one type or the other
- // that prevents an exactly rounded result from being calculated
- // (or at least it's not clear how to implement such a thing).
- //
- To fd(safe_convert_to_float<To>(d));
- result = safe_convert_to_float<To>(n);
- result /= fd;
-}
-
-template <class To, class Integer>
-typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
- generic_convert_rational_to_float_imp(To& result, Integer& num, Integer& denom, const mpl::false_&)
-{
- //
- // If we get here, then the precision of type To is known, and the integer type is unbounded
- // so we can use integer division plus manipulation of the remainder to get an exactly
- // rounded result.
- //
- if(num == 0)
- {
- result = 0;
- return;
- }
- bool s = false;
- if(num < 0)
- {
- s = true;
- num = -num;
- }
- int denom_bits = msb(denom);
- int shift = std::numeric_limits<To>::digits + denom_bits - msb(num);
- if(shift > 0)
- num <<= shift;
- else if(shift < 0)
- denom <<= boost::multiprecision::detail::unsigned_abs(shift);
- Integer q, r;
- divide_qr(num, denom, q, r);
- int q_bits = msb(q);
- if(q_bits == std::numeric_limits<To>::digits - 1)
- {
- //
- // Round up if 2 * r > denom:
- //
- r <<= 1;
- int c = r.compare(denom);
- if(c > 0)
- ++q;
- else if((c == 0) && (q & 1u))
- {
- ++q;
- }
- }
- else
- {
- BOOST_ASSERT(q_bits == std::numeric_limits<To>::digits);
- //
- // We basically already have the rounding info:
- //
- if(q & 1u)
- {
- if(r || (q & 2u))
- ++q;
- }
- }
- using std::ldexp;
- result = do_cast<To>(q);
- result = ldexp(result, -shift);
- if(s)
- result = -result;
-}
-template <class To, class Integer>
-inline typename disable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
- generic_convert_rational_to_float_imp(To& result, Integer& num, Integer& denom, const mpl::false_& tag)
-{
- number<To> t;
- generic_convert_rational_to_float_imp(t, num, denom, tag);
- result = t.backend();
-}
-
-template <class To, class From>
-inline void generic_convert_rational_to_float(To& result, const From& f)
-{
- //
- // Type From is always a Backend to number<>, or an
- // instance of number<>, but we allow
- // To to be either a Backend type, or a real number type,
- // that way we can call this from generic conversions, and
- // from specific conversions to built in types.
- //
- typedef typename mpl::if_c<is_number<From>::value, From, number<From> >::type actual_from_type;
- typedef typename mpl::if_c<is_number<To>::value || is_floating_point<To>::value, To, number<To> >::type actual_to_type;
- typedef typename component_type<actual_from_type>::type integer_type;
- typedef mpl::bool_<!std::numeric_limits<integer_type>::is_specialized
- || std::numeric_limits<integer_type>::is_bounded
- || !std::numeric_limits<actual_to_type>::is_specialized
- || !std::numeric_limits<actual_to_type>::is_bounded
- || (std::numeric_limits<actual_to_type>::radix != 2)> dispatch_tag;
-
- integer_type n(numerator(static_cast<actual_from_type>(f))), d(denominator(static_cast<actual_from_type>(f)));
- generic_convert_rational_to_float_imp(result, n, d, dispatch_tag());
-}
-
-template <class To, class From>
-inline void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/)
-{
- generic_convert_rational_to_float(to, from);
-}
-
-template <class To, class From>
-void generic_interconvert_float2rational(To& to, const From& from, const mpl::int_<2>& /*radix*/)
-{
- typedef typename mpl::front<typename To::unsigned_types>::type ui_type;
- static const int shift = std::numeric_limits<boost::long_long_type>::digits;
- typename From::exponent_type e;
- typename component_type<number<To> >::type num, denom;
- number<From> val(from);
- val = frexp(val, &e);
- while(val)
- {
- val = ldexp(val, shift);
- e -= shift;
- boost::long_long_type ll = boost::math::lltrunc(val);
- val -= ll;
- num <<= shift;
- num += ll;
- }
- denom = ui_type(1u);
- if(e < 0)
- denom <<= -e;
- else if(e > 0)
- num <<= e;
- assign_components(to, num.backend(), denom.backend());
-}
-
-template <class To, class From, int Radix>
-void generic_interconvert_float2rational(To& to, const From& from, const mpl::int_<Radix>& /*radix*/)
-{
- //
- // This is almost the same as the binary case above, but we have to use
- // scalbn and ilogb rather than ldexp and frexp, we also only extract
- // one Radix digit at a time which is terribly inefficient!
- //
- typedef typename mpl::front<typename To::unsigned_types>::type ui_type;
- typename From::exponent_type e;
- typename component_type<number<To> >::type num, denom;
- number<From> val(from);
-
- if (!val)
- {
- to = ui_type(0u);
- return;
- }
-
- e = ilogb(val);
- val = scalbn(val, -e);
- while(val)
- {
- boost::long_long_type ll = boost::math::lltrunc(val);
- val -= ll;
- val = scalbn(val, 1);
- num *= Radix;
- num += ll;
- --e;
- }
- ++e;
- denom = ui_type(Radix);
- denom = pow(denom, abs(e));
- if(e > 0)
- {
- num *= denom;
- denom = 1;
- }
- assign_components(to, num.backend(), denom.backend());
-}
-
-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_floating_point>& /*from_type*/)
-{
- generic_interconvert_float2rational(to, from, mpl::int_<std::numeric_limits<number<From> >::radix>());
-}
-
-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_rational>& /*from_type*/)
-{
- number<From> t(from);
- number<To> result(numerator(t) / denominator(t));
- to = result.backend();
-}
-
-template <class To, class From>
-void generic_interconvert_float2int(To& to, const From& from, const mpl::int_<2>& /*radix*/)
-{
- typedef typename From::exponent_type exponent_type;
- static const exponent_type shift = std::numeric_limits<boost::long_long_type>::digits;
- exponent_type e;
- number<To> num(0u);
- number<From> val(from);
- val = frexp(val, &e);
- while(e > 0)
- {
- int s = (std::min)(e, shift);
- val = ldexp(val, s);
- e -= s;
- boost::long_long_type ll = boost::math::lltrunc(val);
- val -= ll;
- num <<= s;
- num += ll;
- }
- to = num.backend();
-}
-
-template <class To, class From, int Radix>
-void generic_interconvert_float2int(To& to, const From& from, const mpl::int_<Radix>& /*radix*/)
-{
- //
- // This is almost the same as the binary case above, but we have to use
- // scalbn and ilogb rather than ldexp and frexp, we also only extract
- // one Radix digit at a time which is terribly inefficient!
- //
- typename From::exponent_type e;
- number<To> num(0u);
- number<From> val(from);
- e = ilogb(val);
- val = scalbn(val, -e);
- while(e >= 0)
- {
- boost::long_long_type ll = boost::math::lltrunc(val);
- val -= ll;
- val = scalbn(val, 1);
- num *= Radix;
- num += ll;
- --e;
- }
- to = num.backend();
-}
-
-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_floating_point>& /*from_type*/)
-{
- generic_interconvert_float2int(to, from, mpl::int_<std::numeric_limits<number<From> >::radix>());
-}
-
-template <class To, class From, class tag>
-void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::true_&, const tag&)
-{
- // We just want the real part, and "to" is the correct type already:
- eval_real(to, from);
-
- To im;
- eval_imag(im, from);
- if(!eval_is_zero(im))
- BOOST_THROW_EXCEPTION(std::runtime_error("Could not convert imaginary number to scalar."));
-}
-template <class To, class From>
-void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::false_&, const mpl::true_&)
-{
- typedef typename component_type<number<From> >::type component_number;
- typedef typename component_number::backend_type component_backend;
- //
- // Get the real part and copy-construct the result from it:
- //
- component_backend r;
- generic_interconvert_complex_to_scalar(r, from, mpl::true_(), mpl::true_());
- to = r;
-}
-template <class To, class From>
-void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::false_&, const mpl::false_&)
-{
- typedef typename component_type<number<From> >::type component_number;
- typedef typename component_number::backend_type component_backend;
- //
- // Get the real part and use a generic_interconvert to type To:
- //
- component_backend r;
- generic_interconvert_complex_to_scalar(r, from, mpl::true_(), mpl::true_());
- generic_interconvert(to, r, mpl::int_<number_category<To>::value>(), mpl::int_<number_category<To>::value>());
-}
-
-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_complex>& /*from_type*/)
-{
- typedef typename component_type<number<From> >::type component_number;
- typedef typename component_number::backend_type component_backend;
-
- generic_interconvert_complex_to_scalar(to, from, mpl::bool_<boost::is_same<component_backend, To>::value>(), mpl::bool_<boost::is_constructible<To, const component_backend&>::value>());
-}
-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_complex>& /*from_type*/)
-{
- typedef typename component_type<number<From> >::type component_number;
- typedef typename component_number::backend_type component_backend;
-
- generic_interconvert_complex_to_scalar(to, from, mpl::bool_<boost::is_same<component_backend, To>::value>(), mpl::bool_<boost::is_constructible<To, const component_backend&>::value>());
-}
-
-}
-}
-} // namespaces
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MP_GENERIC_INTERCONVERT_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
deleted file mode 100644
index 9665a825a02..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_base.hpp
+++ /dev/null
@@ -1,1637 +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) || (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.69.0/boost/multiprecision/detail/precision.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/precision.hpp
deleted file mode 100644
index f5963abf697..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/precision.hpp
+++ /dev/null
@@ -1,139 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// 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/number.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/number.hpp
deleted file mode 100644
index 42c6a8fa5df..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/number.hpp
+++ /dev/null
@@ -1,2278 +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/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.69.0/boost/multiprecision/rational_adaptor.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/rational_adaptor.hpp
deleted file mode 100644
index b06a157010f..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/rational_adaptor.hpp
+++ /dev/null
@@ -1,367 +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_
-
-#ifndef BOOST_MATH_RATIONAL_ADAPTER_HPP
-#define BOOST_MATH_RATIONAL_ADAPTER_HPP
-
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <boost/cstdint.hpp>
-#include <boost/functional/hash_fwd.hpp>
-#include <boost/multiprecision/number.hpp>
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4512 4127)
-#endif
-#include <boost/rational.hpp>
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-namespace boost{
-namespace multiprecision{
-namespace backends{
-
-template <class IntBackend>
-struct rational_adaptor
-{
- typedef number<IntBackend> integer_type;
- typedef boost::rational<integer_type> rational_type;
-
- typedef typename IntBackend::signed_types signed_types;
- typedef typename IntBackend::unsigned_types unsigned_types;
- typedef typename IntBackend::float_types float_types;
-
- rational_adaptor() BOOST_MP_NOEXCEPT_IF(noexcept(rational_type())) {}
- rational_adaptor(const rational_adaptor& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<rational_type&>() = std::declval<const rational_type&>()))
- {
- m_value = o.m_value;
- }
- rational_adaptor(const IntBackend& o) BOOST_MP_NOEXCEPT_IF(noexcept(rational_type(std::declval<const IntBackend&>()))) : m_value(o) {}
-
- template <class U>
- rational_adaptor(const U& u, typename enable_if_c<is_convertible<U, IntBackend>::value>::type* = 0)
- : m_value(static_cast<integer_type>(u)){}
- template <class U>
- explicit rational_adaptor(const U& u,
- typename enable_if_c<
- boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_convertible<U, IntBackend>::value
- >::type* = 0)
- : m_value(IntBackend(u)){}
- template <class U>
- typename enable_if_c<(boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_arithmetic<U>::value), rational_adaptor&>::type operator = (const U& u)
- {
- m_value = IntBackend(u);
- return *this;
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- rational_adaptor(rational_adaptor&& o) BOOST_MP_NOEXCEPT_IF(noexcept(rational_type(std::declval<rational_type>()))) : m_value(static_cast<rational_type&&>(o.m_value)) {}
- rational_adaptor(IntBackend&& o) BOOST_MP_NOEXCEPT_IF(noexcept(rational_type(std::declval<IntBackend>()))) : m_value(static_cast<IntBackend&&>(o)) {}
- rational_adaptor& operator = (rational_adaptor&& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<rational_type&>() = std::declval<rational_type>()))
- {
- m_value = static_cast<rational_type&&>(o.m_value);
- return *this;
- }
-#endif
- rational_adaptor& operator = (const rational_adaptor& o)
- {
- m_value = o.m_value;
- return *this;
- }
- rational_adaptor& operator = (const IntBackend& o)
- {
- m_value = o;
- return *this;
- }
- template <class Int>
- typename enable_if<is_integral<Int>, rational_adaptor&>::type operator = (Int i)
- {
- m_value = i;
- return *this;
- }
- template <class Float>
- typename enable_if<is_floating_point<Float>, rational_adaptor&>::type operator = (Float i)
- {
- int e;
- Float f = std::frexp(i, &e);
- f = std::ldexp(f, std::numeric_limits<Float>::digits);
- e -= std::numeric_limits<Float>::digits;
- integer_type num(f);
- integer_type denom(1u);
- if(e > 0)
- {
- num <<= e;
- }
- else if(e < 0)
- {
- denom <<= -e;
- }
- m_value.assign(num, denom);
- return *this;
- }
- rational_adaptor& operator = (const char* s)
- {
- std::string s1;
- multiprecision::number<IntBackend> v1, v2;
- char c;
- bool have_hex = false;
- const char* p = s; // saved for later
-
- while((0 != (c = *s)) && (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);
- ++s;
- }
- v1.assign(s1);
- s1.erase();
- if(c == '/')
- {
- ++s;
- while((0 != (c = *s)) && (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);
- ++s;
- }
- v2.assign(s1);
- }
- else
- v2 = 1;
- if(*s)
- {
- BOOST_THROW_EXCEPTION(std::runtime_error(std::string("Could not parse the string \"") + p + std::string("\" as a valid rational number.")));
- }
- data().assign(v1, v2);
- return *this;
- }
- void swap(rational_adaptor& o)
- {
- std::swap(m_value, o.m_value);
- }
- std::string str(std::streamsize digits, std::ios_base::fmtflags f)const
- {
- //
- // We format the string ourselves so we can match what GMP's mpq type does:
- //
- std::string result = data().numerator().str(digits, f);
- if(data().denominator() != 1)
- {
- result.append(1, '/');
- result.append(data().denominator().str(digits, f));
- }
- return result;
- }
- void negate()
- {
- m_value = -m_value;
- }
- int compare(const rational_adaptor& o)const
- {
- return m_value > o.m_value ? 1 : (m_value < o.m_value ? -1 : 0);
- }
- template <class Arithmatic>
- typename enable_if_c<is_arithmetic<Arithmatic>::value && !is_floating_point<Arithmatic>::value, int>::type compare(Arithmatic i)const
- {
- return m_value > i ? 1 : (m_value < i ? -1 : 0);
- }
- template <class Arithmatic>
- typename enable_if_c<is_floating_point<Arithmatic>::value, int>::type compare(Arithmatic i)const
- {
- rational_adaptor r;
- r = i;
- return this->compare(r);
- }
- rational_type& data() { return m_value; }
- const rational_type& data()const { return m_value; }
-
- template <class Archive>
- void serialize(Archive& ar, const mpl::true_&)
- {
- // Saving
- integer_type n(m_value.numerator()), d(m_value.denominator());
- ar & n;
- ar & d;
- }
- template <class Archive>
- void serialize(Archive& ar, const mpl::false_&)
- {
- // Loading
- integer_type n, d;
- ar & n;
- ar & d;
- m_value.assign(n, d);
- }
- template <class Archive>
- void serialize(Archive& ar, const unsigned int /*version*/)
- {
- typedef typename Archive::is_saving tag;
- serialize(ar, tag());
- }
-private:
- rational_type m_value;
-};
-
-template <class IntBackend>
-inline void eval_add(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
-{
- result.data() += o.data();
-}
-template <class IntBackend>
-inline void eval_subtract(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
-{
- result.data() -= o.data();
-}
-template <class IntBackend>
-inline void eval_multiply(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
-{
- result.data() *= o.data();
-}
-template <class IntBackend>
-inline void eval_divide(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
-{
- using default_ops::eval_is_zero;
- if(eval_is_zero(o))
- {
- BOOST_THROW_EXCEPTION(std::overflow_error("Divide by zero."));
- }
- result.data() /= o.data();
-}
-
-template <class R, class IntBackend>
-inline typename enable_if_c<number_category<R>::value == number_kind_floating_point>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend)
-{
- //
- // The generic conversion is as good as anything we can write here:
- //
- ::boost::multiprecision::detail::generic_convert_rational_to_float(*result, backend);
-}
-
-template <class R, class IntBackend>
-inline typename enable_if_c<(number_category<R>::value != number_kind_integer) && (number_category<R>::value != number_kind_floating_point)>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend)
-{
- typedef typename component_type<number<rational_adaptor<IntBackend> > >::type comp_t;
- comp_t num(backend.data().numerator());
- comp_t denom(backend.data().denominator());
- *result = num.template convert_to<R>();
- *result /= denom.template convert_to<R>();
-}
-
-template <class R, class IntBackend>
-inline typename enable_if_c<number_category<R>::value == number_kind_integer>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend)
-{
- typedef typename component_type<number<rational_adaptor<IntBackend> > >::type comp_t;
- comp_t t = backend.data().numerator();
- t /= backend.data().denominator();
- *result = t.template convert_to<R>();
-}
-
-template <class IntBackend>
-inline bool eval_is_zero(const rational_adaptor<IntBackend>& val)
-{
- using default_ops::eval_is_zero;
- return eval_is_zero(val.data().numerator().backend());
-}
-template <class IntBackend>
-inline int eval_get_sign(const rational_adaptor<IntBackend>& val)
-{
- using default_ops::eval_get_sign;
- return eval_get_sign(val.data().numerator().backend());
-}
-
-template<class IntBackend, class V>
-inline void assign_components(rational_adaptor<IntBackend>& result, const V& v1, const V& v2)
-{
- result.data().assign(v1, v2);
-}
-
-template <class IntBackend>
-inline std::size_t hash_value(const rational_adaptor<IntBackend>& val)
-{
- std::size_t result = hash_value(val.data().numerator());
- boost::hash_combine(result, val.data().denominator());
- return result;
-}
-
-
-} // namespace backends
-
-template<class IntBackend>
-struct expression_template_default<backends::rational_adaptor<IntBackend> > : public expression_template_default<IntBackend> {};
-
-template<class IntBackend>
-struct number_category<backends::rational_adaptor<IntBackend> > : public mpl::int_<number_kind_rational>{};
-
-using boost::multiprecision::backends::rational_adaptor;
-
-template <class Backend, expression_template_option ExpressionTemplates>
-struct component_type<number<backends::rational_adaptor<Backend>, ExpressionTemplates> >
-{
- typedef number<Backend, ExpressionTemplates> type;
-};
-
-template <class IntBackend, expression_template_option ET>
-inline number<IntBackend, ET> numerator(const number<rational_adaptor<IntBackend>, ET>& val)
-{
- return val.backend().data().numerator();
-}
-template <class IntBackend, expression_template_option ET>
-inline number<IntBackend, ET> denominator(const number<rational_adaptor<IntBackend>, ET>& val)
-{
- return val.backend().data().denominator();
-}
-
-#ifdef BOOST_NO_SFINAE_EXPR
-
-namespace detail{
-
-template<class U, class IntBackend>
-struct is_explicitly_convertible<U, rational_adaptor<IntBackend> > : public is_explicitly_convertible<U, IntBackend> {};
-
-}
-
-#endif
-
-}} // namespaces
-
-
-namespace std{
-
-template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates>
-class numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> > : public std::numeric_limits<boost::multiprecision::number<IntBackend, ExpressionTemplates> >
-{
- typedef std::numeric_limits<boost::multiprecision::number<IntBackend> > base_type;
- typedef boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend> > number_type;
-public:
- BOOST_STATIC_CONSTEXPR bool is_integer = false;
- BOOST_STATIC_CONSTEXPR bool is_exact = true;
- BOOST_STATIC_CONSTEXPR number_type (min)() { return (base_type::min)(); }
- BOOST_STATIC_CONSTEXPR number_type (max)() { return (base_type::max)(); }
- BOOST_STATIC_CONSTEXPR number_type lowest() { return -(max)(); }
- BOOST_STATIC_CONSTEXPR number_type epsilon() { return base_type::epsilon(); }
- BOOST_STATIC_CONSTEXPR number_type round_error() { return epsilon() / 2; }
- BOOST_STATIC_CONSTEXPR number_type infinity() { return base_type::infinity(); }
- BOOST_STATIC_CONSTEXPR number_type quiet_NaN() { return base_type::quiet_NaN(); }
- BOOST_STATIC_CONSTEXPR number_type signaling_NaN() { return base_type::signaling_NaN(); }
- BOOST_STATIC_CONSTEXPR number_type denorm_min() { return base_type::denorm_min(); }
-};
-
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> >::is_integer;
-template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> >::is_exact;
-
-#endif
-
-
-}
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp
deleted file mode 100644
index 0a14f03442f..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright Vicente J. Botet Escriba 2009-2011
-// 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_EXPLICIT_CONVERTIBLE_HPP
-#define BOOST_MP_EXPLICIT_CONVERTIBLE_HPP
-
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/declval.hpp>
-
-
-namespace boost {
- namespace multiprecision {
- namespace detail {
-
- template <int N>
- struct dummy_size {};
-
- template<typename S, typename T>
- struct has_generic_interconversion
- {
- typedef typename mpl::if_c <
- is_number<S>::value && is_number<T>::value,
- typename mpl::if_c <
- number_category<S>::value == number_kind_integer,
- typename mpl::if_c<
- number_category<T>::value == number_kind_integer
- || number_category<T>::value == number_kind_floating_point
- || number_category<T>::value == number_kind_rational
- || number_category<T>::value == number_kind_fixed_point,
- mpl::true_,
- mpl::false_
- >::type,
- typename mpl::if_c<
- number_category<S>::value == number_kind_rational,
- typename mpl::if_c<
- number_category<T>::value == number_kind_rational
- || number_category<T>::value == number_kind_rational,
- mpl::true_,
- mpl::false_
- >::type,
- typename mpl::if_c<
- number_category<T>::value == number_kind_floating_point,
- mpl::true_,
- mpl::false_
- >::type
- >::type
- > ::type,
- mpl::false_
- > ::type type;
- };
-
- template<typename S, typename T>
- struct is_explicitly_convertible_imp
- {
-#ifndef BOOST_NO_SFINAE_EXPR
- template<typename S1, typename T1>
- static type_traits::yes_type selector(dummy_size<sizeof(static_cast<T1>(declval<S1>()))>*);
-
- template<typename S1, typename T1>
- static type_traits::no_type selector(...);
-
- static const bool value = sizeof(selector<S, T>(0)) == sizeof(type_traits::yes_type);
-
- typedef boost::integral_constant<bool, value> type;
-#else
- typedef typename has_generic_interconversion<S, T>::type gen_type;
- typedef mpl::bool_<boost::is_convertible<S, T>::value || gen_type::value> type;
-#endif
- };
-
-template<typename From, typename To>
-struct is_explicitly_convertible : public is_explicitly_convertible_imp<From, To>::type
-{
-};
-
-#ifdef BOOST_NO_SFINAE_EXPR
-template<class Backend1, expression_template_option ExpressionTemplates1, class Backend2, expression_template_option ExpressionTemplates2>
-struct is_explicitly_convertible<number<Backend1, ExpressionTemplates1>, number<Backend2, ExpressionTemplates2> >
- : public is_explicitly_convertible<Backend1, Backend2>
-{
-};
-#endif
-
-}}} // namespaces
-
-#endif
-
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp
deleted file mode 100644
index d97428f0f2d..00000000000
--- a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp
+++ /dev/null
@@ -1,33 +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_0.txt)
-
-#ifndef BOOST_IS_BYTE_CONTAINER_HPP
-#define BOOST_IS_BYTE_CONTAINER_HPP
-
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/type_traits/is_integral.hpp>
-
-namespace boost{ namespace multiprecision{ namespace detail{
-
- BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_value_type, value_type, false)
- BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_const_iterator, const_iterator, false)
-
- template <class C, bool b>
- struct is_byte_container_imp
- {
- static const bool value = boost::is_integral<typename C::value_type>::value && (sizeof(typename C::value_type) == 1);
- };
-
- template <class C>
- struct is_byte_container_imp<C, false> : public boost::false_type {};
-
- template <class C>
- struct is_byte_container : public is_byte_container_imp<C, has_member_value_type<C>::value && has_member_const_iterator<C>::value> {};
-
-
-}}} // namespaces
-
-#endif // BOOST_IS_BYTE_CONTAINER_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
deleted file mode 100644
index 938459463d8..00000000000
--- a/src/third_party/boost-1.69.0/boost/pending/integer_log2.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#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.69.0/boost/predef/architecture/arm.h b/src/third_party/boost-1.69.0/boost/predef/architecture/arm.h
deleted file mode 100644
index 96f89c86fd0..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/arm.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-Copyright Rene Rivera 2008-2015
-Copyright Franz Detro 2014
-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_PREDEF_ARCHITECTURE_ARM_H
-#define BOOST_PREDEF_ARCHITECTURE_ARM_H
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_ARCH_ARM`]
-
-[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`__arm__`] [__predef_detection__]]
- [[`__arm64`] [__predef_detection__]]
- [[`__thumb__`] [__predef_detection__]]
- [[`__TARGET_ARCH_ARM`] [__predef_detection__]]
- [[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
- [[`_M_ARM`] [__predef_detection__]]
- [[`_M_ARM64`] [__predef_detection__]]
-
- [[`__arm64`] [8.0.0]]
- [[`__TARGET_ARCH_ARM`] [V.0.0]]
- [[`__TARGET_ARCH_THUMB`] [V.0.0]]
- [[`__ARM_ARCH`] [V.0.0]]
- [[`_M_ARM`] [V.0.0]]
- [[`_M_ARM64`] [8.0.0]]
- ]
- */
-
-#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
- defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
- defined(__ARM_ARCH) || \
- defined(_M_ARM) || defined(_M_ARM64)
-# undef BOOST_ARCH_ARM
-# if !defined(BOOST_ARCH_ARM) && defined(__arm64)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
-# endif
-# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
-# endif
-# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
-# endif
-# if !defined(BOOST_ARCH_ARM) && defined(__ARM_ARCH)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__ARM_ARCH,0,0)
-# endif
-# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM64)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
-# endif
-# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
-# endif
-# if !defined(BOOST_ARCH_ARM)
-# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-#endif
-
-#if BOOST_ARCH_ARM
-# define BOOST_ARCH_ARM_AVAILABLE
-#endif
-
-#define BOOST_ARCH_ARM_NAME "ARM"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os.h b/src/third_party/boost-1.69.0/boost/predef/os.h
deleted file mode 100644
index bedf99ec549..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/os.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright Rene Rivera 2008-2015
-Copyright Franz Detro 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)
-*/
-
-#if !defined(BOOST_PREDEF_OS_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS)
-#ifndef BOOST_PREDEF_OS_H
-#define BOOST_PREDEF_OS_H
-#endif
-
-#include <boost/predef/os/aix.h>
-#include <boost/predef/os/amigaos.h>
-#include <boost/predef/os/android.h>
-#include <boost/predef/os/beos.h>
-#include <boost/predef/os/bsd.h>
-#include <boost/predef/os/cygwin.h>
-#include <boost/predef/os/haiku.h>
-#include <boost/predef/os/hpux.h>
-#include <boost/predef/os/irix.h>
-#include <boost/predef/os/ios.h>
-#include <boost/predef/os/linux.h>
-#include <boost/predef/os/macos.h>
-#include <boost/predef/os/os400.h>
-#include <boost/predef/os/qnxnto.h>
-#include <boost/predef/os/solaris.h>
-#include <boost/predef/os/unix.h>
-#include <boost/predef/os/vms.h>
-#include <boost/predef/os/windows.h>
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/android.h b/src/third_party/boost-1.69.0/boost/predef/os/android.h
deleted file mode 100644
index 125dbded9e1..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/os/android.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright Rene Rivera 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_ANDROID_H
-#define BOOST_PREDEF_OS_ANDROID_H
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_OS_ANDROID`]
-
-[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`__ANDROID__`] [__predef_detection__]]
- ]
- */
-
-#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
- defined(__ANDROID__) \
- )
-# undef BOOST_OS_ANDROID
-# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
-#endif
-
-#if BOOST_OS_ANDROID
-# define BOOST_OS_ANDROID_AVAILABLE
-# include <boost/predef/detail/os_detected.h>
-#endif
-
-#define BOOST_OS_ANDROID_NAME "Android"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_OS_ANDROID,BOOST_OS_ANDROID_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/bsd.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd.h
deleted file mode 100644
index fad9aed7876..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/os/bsd.h
+++ /dev/null
@@ -1,103 +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_BSD_H
-#define BOOST_PREDEF_OS_BSD_H
-
-/* Special case: OSX will define BSD predefs if the sys/param.h
- * header is included. We can guard against that, but only if we
- * detect OSX first. Hence we will force include OSX detection
- * before doing any BSD detection.
- */
-#include <boost/predef/os/macos.h>
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_OS_BSD`]
-
-[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system.
-
-BSD has various branch operating systems possible and each detected
-individually. This detects the following variations and sets a specific
-version number macro to match:
-
-* `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD]
-* `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD]
-* `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS]
-* `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD]
-* `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD]
-
-[note The general `BOOST_OS_BSD` is set in all cases to indicate some form
-of BSD. If the above variants is detected the corresponding macro is also set.]
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`BSD`] [__predef_detection__]]
- [[`_SYSTYPE_BSD`] [__predef_detection__]]
-
- [[`BSD4_2`] [4.2.0]]
- [[`BSD4_3`] [4.3.0]]
- [[`BSD4_4`] [4.4.0]]
- [[`BSD`] [V.R.0]]
- ]
- */
-
-#include <boost/predef/os/bsd/bsdi.h>
-#include <boost/predef/os/bsd/dragonfly.h>
-#include <boost/predef/os/bsd/free.h>
-#include <boost/predef/os/bsd/open.h>
-#include <boost/predef/os/bsd/net.h>
-
-#ifndef BOOST_OS_BSD
-#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE
-#endif
-
-#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
- defined(BSD) || \
- defined(_SYSTYPE_BSD) \
- )
-# undef BOOST_OS_BSD
-# include <sys/param.h>
-# if !defined(BOOST_OS_BSD) && defined(BSD4_4)
-# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0)
-# endif
-# if !defined(BOOST_OS_BSD) && defined(BSD4_3)
-# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0)
-# endif
-# if !defined(BOOST_OS_BSD) && defined(BSD4_2)
-# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0)
-# endif
-# if !defined(BOOST_OS_BSD) && defined(BSD)
-# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD)
-# endif
-# if !defined(BOOST_OS_BSD)
-# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-#endif
-
-#if BOOST_OS_BSD
-# define BOOST_OS_BSD_AVAILABLE
-# include <boost/predef/detail/os_detected.h>
-#endif
-
-#define BOOST_OS_BSD_NAME "BSD"
-
-#else
-
-#include <boost/predef/os/bsd/bsdi.h>
-#include <boost/predef/os/bsd/dragonfly.h>
-#include <boost/predef/os/bsd/free.h>
-#include <boost/predef/os/bsd/open.h>
-#include <boost/predef/os/bsd/net.h>
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h
deleted file mode 100644
index 387cbde54f1..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-Copyright Rene Rivera 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)
-*/
-
-#ifndef BOOST_PREDEF_OS_BSD_NET_H
-#define BOOST_PREDEF_OS_BSD_NET_H
-
-#include <boost/predef/os/bsd.h>
-
-/*`
-[heading `BOOST_OS_BSD_NET`]
-
-[@http://en.wikipedia.org/wiki/Netbsd NetBSD] operating system.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`__NETBSD__`] [__predef_detection__]]
- [[`__NetBSD__`] [__predef_detection__]]
-
- [[`__NETBSD_version`] [V.R.P]]
- [[`NetBSD0_8`] [0.8.0]]
- [[`NetBSD0_9`] [0.9.0]]
- [[`NetBSD1_0`] [1.0.0]]
- [[`__NetBSD_Version`] [V.R.P]]
- ]
- */
-
-#define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
- defined(__NETBSD__) || defined(__NetBSD__) \
- )
-# ifndef BOOST_OS_BSD_AVAILABLE
-# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
-# define BOOST_OS_BSD_AVAILABLE
-# endif
-# undef BOOST_OS_BSD_NET
-# if defined(__NETBSD__)
-# if defined(__NETBSD_version)
-# if __NETBSD_version < 500000
-# define BOOST_OS_BSD_NET \
- BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version)
-# else
-# define BOOST_OS_BSD_NET \
- BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version)
-# endif
-# else
-# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-# elif defined(__NetBSD__)
-# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8)
-# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0)
-# endif
-# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9)
-# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0)
-# endif
-# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0)
-# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0)
-# endif
-# if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version)
-# define BOOST_OS_BSD_NET \
- BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version)
-# endif
-# if !defined(BOOST_OS_BSD_NET)
-# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-# endif
-#endif
-
-#if BOOST_OS_BSD_NET
-# define BOOST_OS_BSD_NET_AVAILABLE
-# include <boost/predef/detail/os_detected.h>
-#endif
-
-#define BOOST_OS_BSD_NET_NAME "DragonFly BSD"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/linux.h b/src/third_party/boost-1.69.0/boost/predef/os/linux.h
deleted file mode 100644
index a297d089542..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/os/linux.h
+++ /dev/null
@@ -1,46 +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_LINUX_H
-#define BOOST_PREDEF_OS_LINUX_H
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_OS_LINUX`]
-
-[@http://en.wikipedia.org/wiki/Linux Linux] operating system.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`linux`] [__predef_detection__]]
- [[`__linux`] [__predef_detection__]]
- ]
- */
-
-#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
- defined(linux) || defined(__linux) \
- )
-# undef BOOST_OS_LINUX
-# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE
-#endif
-
-#if BOOST_OS_LINUX
-# define BOOST_OS_LINUX_AVAILABLE
-# include <boost/predef/detail/os_detected.h>
-#endif
-
-#define BOOST_OS_LINUX_NAME "Linux"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_OS_LINUX,BOOST_OS_LINUX_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform.h b/src/third_party/boost-1.69.0/boost/predef/platform.h
deleted file mode 100644
index 6c366d595c9..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/platform.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Copyright Rene Rivera 2013-2015
-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)
-*/
-
-#if !defined(BOOST_PREDEF_PLATFORM_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS)
-#ifndef BOOST_PREDEF_PLATFORM_H
-#define BOOST_PREDEF_PLATFORM_H
-#endif
-
-#include <boost/predef/platform/cloudabi.h>
-#include <boost/predef/platform/mingw.h>
-#include <boost/predef/platform/mingw32.h>
-#include <boost/predef/platform/mingw64.h>
-#include <boost/predef/platform/windows_uwp.h>
-#include <boost/predef/platform/windows_desktop.h>
-#include <boost/predef/platform/windows_phone.h>
-#include <boost/predef/platform/windows_server.h>
-#include <boost/predef/platform/windows_store.h>
-#include <boost/predef/platform/windows_system.h>
-#include <boost/predef/platform/windows_runtime.h> // deprecated
-#include <boost/predef/platform/ios.h>
-/*#include <boost/predef/platform/.h>*/
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/ios.h b/src/third_party/boost-1.69.0/boost/predef/platform/ios.h
deleted file mode 100644
index af1c364cf05..00000000000
--- a/src/third_party/boost-1.69.0/boost/predef/platform/ios.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright Ruslan Baratov 2017
-Copyright Rene Rivera 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)
-*/
-
-#ifndef BOOST_PREDEF_PLAT_IOS_H
-#define BOOST_PREDEF_PLAT_IOS_H
-
-#include <boost/predef/os/ios.h> // BOOST_OS_IOS
-#include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-/*`
-[heading `BOOST_PLAT_IOS_DEVICE`]
-[heading `BOOST_PLAT_IOS_SIMULATOR`]
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
- ]
- */
-
-#define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE
-#define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
-#if BOOST_OS_IOS
-# include <TargetConditionals.h>
-# if TARGET_IPHONE_SIMULATOR == 1
-# undef BOOST_PLAT_IOS_SIMULATOR
-# define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
-# else
-# undef BOOST_PLAT_IOS_DEVICE
-# define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-#endif
-
-#if BOOST_PLAT_IOS_SIMULATOR
-# define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
-# include <boost/predef/detail/platform_detected.h>
-#endif
-
-#if BOOST_PLAT_IOS_DEVICE
-# define BOOST_PLAT_IOS_DEVICE_AVAILABLE
-# include <boost/predef/detail/platform_detected.h>
-#endif
-
-#define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
-#define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
-
-#endif // BOOST_PREDEF_PLAT_IOS_H
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME)
-BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME)
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
deleted file mode 100644
index 19b12a78360..00000000000
--- a/src/third_party/boost-1.69.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,9,0)
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/progress.hpp b/src/third_party/boost-1.69.0/boost/progress.hpp
deleted file mode 100644
index 027d9f927b8..00000000000
--- a/src/third_party/boost-1.69.0/boost/progress.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-// boost progress.hpp header file ------------------------------------------//
-
-// Copyright Beman Dawes 1994-99. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/timer for documentation.
-
-// Revision History
-// 1 Dec 01 Add leading progress display strings (suggested by Toon Knapen)
-// 20 May 01 Introduce several static_casts<> to eliminate warning messages
-// (Fixed by Beman, reported by Herve Bronnimann)
-// 12 Jan 01 Change to inline implementation to allow use without library
-// builds. See docs for more rationale. (Beman Dawes)
-// 22 Jul 99 Name changed to .hpp
-// 16 Jul 99 Second beta
-// 6 Jul 99 Initial boost version
-
-#ifndef BOOST_PROGRESS_HPP
-#define BOOST_PROGRESS_HPP
-
-#include <boost/timer.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/cstdint.hpp> // for uintmax_t
-#include <iostream> // for ostream, cout, etc
-#include <string> // for string
-
-namespace boost {
-
-// progress_timer ----------------------------------------------------------//
-
-// A progress_timer behaves like a timer except that the destructor displays
-// an elapsed time message at an appropriate place in an appropriate form.
-
-class progress_timer : public timer, private noncopyable
-{
-
- public:
- explicit progress_timer( std::ostream & os = std::cout )
- // os is hint; implementation may ignore, particularly in embedded systems
- : timer(), noncopyable(), m_os(os) {}
- ~progress_timer()
- {
- // A) Throwing an exception from a destructor is a Bad Thing.
- // B) The progress_timer destructor does output which may throw.
- // C) A progress_timer is usually not critical to the application.
- // Therefore, wrap the I/O in a try block, catch and ignore all exceptions.
- try
- {
- // use istream instead of ios_base to workaround GNU problem (Greg Chicares)
- std::istream::fmtflags old_flags = m_os.setf( std::istream::fixed,
- std::istream::floatfield );
- std::streamsize old_prec = m_os.precision( 2 );
- m_os << elapsed() << " s\n" // "s" is System International d'Unites std
- << std::endl;
- m_os.flags( old_flags );
- m_os.precision( old_prec );
- }
-
- catch (...) {} // eat any exceptions
- } // ~progress_timer
-
- private:
- std::ostream & m_os;
-};
-
-
-// progress_display --------------------------------------------------------//
-
-// progress_display displays an appropriate indication of
-// progress at an appropriate place in an appropriate form.
-
-// NOTE: (Jan 12, 2001) Tried to change unsigned long to boost::uintmax_t, but
-// found some compilers couldn't handle the required conversion to double.
-// Reverted to unsigned long until the compilers catch up.
-
-class progress_display : private noncopyable
-{
- public:
- explicit progress_display( unsigned long expected_count_,
- std::ostream & os = std::cout,
- const std::string & s1 = "\n", //leading strings
- const std::string & s2 = "",
- const std::string & s3 = "" )
- // os is hint; implementation may ignore, particularly in embedded systems
- : noncopyable(), m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count_); }
-
- void restart( unsigned long expected_count_ )
- // Effects: display appropriate scale
- // Postconditions: count()==0, expected_count()==expected_count_
- {
- _count = _next_tic_count = _tic = 0;
- _expected_count = expected_count_;
-
- m_os << m_s1 << "0% 10 20 30 40 50 60 70 80 90 100%\n"
- << m_s2 << "|----|----|----|----|----|----|----|----|----|----|"
- << std::endl // endl implies flush, which ensures display
- << m_s3;
- if ( !_expected_count ) _expected_count = 1; // prevent divide by zero
- } // restart
-
- unsigned long operator+=( unsigned long increment )
- // Effects: Display appropriate progress tic if needed.
- // Postconditions: count()== original count() + increment
- // Returns: count().
- {
- if ( (_count += increment) >= _next_tic_count ) { display_tic(); }
- return _count;
- }
-
- unsigned long operator++() { return operator+=( 1 ); }
- unsigned long count() const { return _count; }
- unsigned long expected_count() const { return _expected_count; }
-
- private:
- std::ostream & m_os; // may not be present in all imps
- const std::string m_s1; // string is more general, safer than
- const std::string m_s2; // const char *, and efficiency or size are
- const std::string m_s3; // not issues
-
- unsigned long _count, _expected_count, _next_tic_count;
- unsigned int _tic;
- void display_tic()
- {
- // 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>(_count)
- / static_cast<double>(_expected_count)) * 50.0);
- do { m_os << '*' << std::flush; } while ( ++_tic < tics_needed );
- _next_tic_count =
- static_cast<unsigned long>((_tic/50.0) * static_cast<double>(_expected_count));
- if ( _count == _expected_count ) {
- if ( _tic < 51 ) m_os << '*';
- m_os << std::endl;
- }
- } // display_tic
-};
-
-} // namespace boost
-
-#endif // BOOST_PROGRESS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp b/src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp
deleted file mode 100644
index 248243a4b2e..00000000000
--- a/src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/* boost random/detail/integer_log2.hpp header file
- *
- * Copyright Steven Watanabe 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 including documentation.
- *
- * $Id$
- *
- */
-
-#ifndef BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP
-#define BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP
-
-#include <boost/config.hpp>
-#include <boost/limits.hpp>
-#include <boost/pending/integer_log2.hpp>
-
-namespace boost {
-namespace random {
-namespace detail {
-
-#if !defined(BOOST_NO_CXX11_CONSTEXPR)
-#define BOOST_RANDOM_DETAIL_CONSTEXPR constexpr
-#elif defined(BOOST_MSVC)
-#define BOOST_RANDOM_DETAIL_CONSTEXPR __forceinline
-#elif defined(__GNUC__) && __GNUC__ >= 4
-#define BOOST_RANDOM_DETAIL_CONSTEXPR inline __attribute__((__const__)) __attribute__((__always_inline__))
-#else
-#define BOOST_RANDOM_DETAIL_CONSTEXPR inline
-#endif
-
-template<int Shift>
-struct integer_log2_impl
-{
-#if defined(BOOST_NO_CXX11_CONSTEXPR)
- template<class T>
- BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum)
- {
- int update = ((t >> Shift) != 0) * Shift;
- return integer_log2_impl<Shift / 2>::apply(t >> update, accum + update);
- }
-#else
- template<class T>
- BOOST_RANDOM_DETAIL_CONSTEXPR static int apply2(T t, int accum, int update)
- {
- return integer_log2_impl<Shift / 2>::apply(t >> update, accum + update);
- }
-
- template<class T>
- BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum)
- {
- return apply2(t, accum, ((t >> Shift) != 0) * Shift);
- }
-#endif
-};
-
-template<>
-struct integer_log2_impl<1>
-{
- template<class T>
- BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum)
- {
- return int(t >> 1) + accum;
- }
-};
-
-template<class T>
-BOOST_RANDOM_DETAIL_CONSTEXPR int integer_log2(T t)
-{
- return integer_log2_impl<
- ::boost::detail::max_pow2_less<
- ::std::numeric_limits<T>::digits, 4
- >::value
- >::apply(t, 0);
-}
-
-} // namespace detail
-} // namespace random
-} // namespace boost
-
-#endif // BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP
diff --git a/src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp
deleted file mode 100644
index 9574cbcae5c..00000000000
--- a/src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp
+++ /dev/null
@@ -1,636 +0,0 @@
-/* boost random/discrete_distribution.hpp header file
- *
- * Copyright Steven Watanabe 2009-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 including documentation.
- *
- * $Id$
- */
-
-#ifndef BOOST_RANDOM_DISCRETE_DISTRIBUTION_HPP_INCLUDED
-#define BOOST_RANDOM_DISCRETE_DISTRIBUTION_HPP_INCLUDED
-
-#include <vector>
-#include <limits>
-#include <numeric>
-#include <utility>
-#include <iterator>
-#include <boost/assert.hpp>
-#include <boost/random/uniform_01.hpp>
-#include <boost/random/uniform_int_distribution.hpp>
-#include <boost/random/detail/config.hpp>
-#include <boost/random/detail/operators.hpp>
-#include <boost/random/detail/vector_io.hpp>
-
-#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#include <initializer_list>
-#endif
-
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-
-#include <boost/random/detail/disable_warnings.hpp>
-
-namespace boost {
-namespace random {
-namespace detail {
-
-template<class IntType, class WeightType>
-struct integer_alias_table {
- WeightType get_weight(IntType bin) const {
- WeightType result = _average;
- if(bin < _excess) ++result;
- return result;
- }
- template<class Iter>
- WeightType init_average(Iter begin, Iter end) {
- WeightType weight_average = 0;
- IntType excess = 0;
- IntType n = 0;
- // weight_average * n + excess == current partial sum
- // This is a bit messy, but it's guaranteed not to overflow
- for(Iter iter = begin; iter != end; ++iter) {
- ++n;
- if(*iter < weight_average) {
- WeightType diff = weight_average - *iter;
- weight_average -= diff / n;
- if(diff % n > excess) {
- --weight_average;
- excess += n - diff % n;
- } else {
- excess -= diff % n;
- }
- } else {
- WeightType diff = *iter - weight_average;
- weight_average += diff / n;
- if(diff % n < n - excess) {
- excess += diff % n;
- } else {
- ++weight_average;
- excess -= n - diff % n;
- }
- }
- }
- _alias_table.resize(static_cast<std::size_t>(n));
- _average = weight_average;
- _excess = excess;
- return weight_average;
- }
- void init_empty()
- {
- _alias_table.clear();
- _alias_table.push_back(std::make_pair(static_cast<WeightType>(1),
- static_cast<IntType>(0)));
- _average = static_cast<WeightType>(1);
- _excess = static_cast<IntType>(0);
- }
- bool operator==(const integer_alias_table& other) const
- {
- return _alias_table == other._alias_table &&
- _average == other._average && _excess == other._excess;
- }
- static WeightType normalize(WeightType val, WeightType /* average */)
- {
- return val;
- }
- static void normalize(std::vector<WeightType>&) {}
- template<class URNG>
- WeightType test(URNG &urng) const
- {
- return uniform_int_distribution<WeightType>(0, _average)(urng);
- }
- bool accept(IntType result, WeightType val) const
- {
- return result < _excess || val < _average;
- }
- static WeightType try_get_sum(const std::vector<WeightType>& weights)
- {
- WeightType result = static_cast<WeightType>(0);
- for(typename std::vector<WeightType>::const_iterator
- iter = weights.begin(), end = weights.end();
- iter != end; ++iter)
- {
- if((std::numeric_limits<WeightType>::max)() - result > *iter) {
- return static_cast<WeightType>(0);
- }
- result += *iter;
- }
- return result;
- }
- template<class URNG>
- static WeightType generate_in_range(URNG &urng, WeightType max)
- {
- return uniform_int_distribution<WeightType>(
- static_cast<WeightType>(0), max-1)(urng);
- }
- typedef std::vector<std::pair<WeightType, IntType> > alias_table_t;
- alias_table_t _alias_table;
- WeightType _average;
- IntType _excess;
-};
-
-template<class IntType, class WeightType>
-struct real_alias_table {
- WeightType get_weight(IntType) const
- {
- return WeightType(1.0);
- }
- template<class Iter>
- WeightType init_average(Iter first, Iter last)
- {
- std::size_t size = std::distance(first, last);
- WeightType weight_sum =
- std::accumulate(first, last, static_cast<WeightType>(0));
- _alias_table.resize(size);
- return weight_sum / size;
- }
- void init_empty()
- {
- _alias_table.clear();
- _alias_table.push_back(std::make_pair(static_cast<WeightType>(1),
- static_cast<IntType>(0)));
- }
- bool operator==(const real_alias_table& other) const
- {
- return _alias_table == other._alias_table;
- }
- static WeightType normalize(WeightType val, WeightType average)
- {
- return val / average;
- }
- static void normalize(std::vector<WeightType>& weights)
- {
- WeightType sum =
- std::accumulate(weights.begin(), weights.end(),
- static_cast<WeightType>(0));
- for(typename std::vector<WeightType>::iterator
- iter = weights.begin(),
- end = weights.end();
- iter != end; ++iter)
- {
- *iter /= sum;
- }
- }
- template<class URNG>
- WeightType test(URNG &urng) const
- {
- return uniform_01<WeightType>()(urng);
- }
- bool accept(IntType, WeightType) const
- {
- return true;
- }
- static WeightType try_get_sum(const std::vector<WeightType>& /* weights */)
- {
- return static_cast<WeightType>(1);
- }
- template<class URNG>
- static WeightType generate_in_range(URNG &urng, WeightType)
- {
- return uniform_01<WeightType>()(urng);
- }
- typedef std::vector<std::pair<WeightType, IntType> > alias_table_t;
- alias_table_t _alias_table;
-};
-
-template<bool IsIntegral>
-struct select_alias_table;
-
-template<>
-struct select_alias_table<true> {
- template<class IntType, class WeightType>
- struct apply {
- typedef integer_alias_table<IntType, WeightType> type;
- };
-};
-
-template<>
-struct select_alias_table<false> {
- template<class IntType, class WeightType>
- struct apply {
- typedef real_alias_table<IntType, WeightType> type;
- };
-};
-
-}
-
-/**
- * The class @c discrete_distribution models a \random_distribution.
- * It produces integers in the range [0, n) with the probability
- * of producing each value is specified by the parameters of the
- * distribution.
- */
-template<class IntType = int, class WeightType = double>
-class discrete_distribution {
-public:
- typedef WeightType input_type;
- typedef IntType result_type;
-
- class param_type {
- public:
-
- typedef discrete_distribution distribution_type;
-
- /**
- * Constructs a @c param_type object, representing a distribution
- * with \f$p(0) = 1\f$ and \f$p(k|k>0) = 0\f$.
- */
- param_type() : _probabilities(1, static_cast<WeightType>(1)) {}
- /**
- * If @c first == @c last, equivalent to the default constructor.
- * Otherwise, the values of the range represent weights for the
- * possible values of the distribution.
- */
- template<class Iter>
- param_type(Iter first, Iter last) : _probabilities(first, last)
- {
- normalize();
- }
-#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
- /**
- * If wl.size() == 0, equivalent to the default constructor.
- * Otherwise, the values of the @c initializer_list represent
- * weights for the possible values of the distribution.
- */
- param_type(const std::initializer_list<WeightType>& wl)
- : _probabilities(wl)
- {
- normalize();
- }
-#endif
- /**
- * If the range is empty, equivalent to the default constructor.
- * Otherwise, the elements of the range represent
- * weights for the possible values of the distribution.
- */
- template<class Range>
- explicit param_type(const Range& range)
- : _probabilities(boost::begin(range), boost::end(range))
- {
- normalize();
- }
-
- /**
- * If nw is zero, equivalent to the default constructor.
- * Otherwise, the range of the distribution is [0, nw),
- * and the weights are found by calling fw with values
- * evenly distributed between \f$\mbox{xmin} + \delta/2\f$ and
- * \f$\mbox{xmax} - \delta/2\f$, where
- * \f$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}\f$.
- */
- template<class Func>
- param_type(std::size_t nw, double xmin, double xmax, Func fw)
- {
- std::size_t n = (nw == 0) ? 1 : nw;
- double delta = (xmax - xmin) / n;
- BOOST_ASSERT(delta > 0);
- for(std::size_t k = 0; k < n; ++k) {
- _probabilities.push_back(fw(xmin + k*delta + delta/2));
- }
- normalize();
- }
-
- /**
- * Returns a vector containing the probabilities of each possible
- * value of the distribution.
- */
- std::vector<WeightType> probabilities() const
- {
- return _probabilities;
- }
-
- /** Writes the parameters to a @c std::ostream. */
- BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm)
- {
- detail::print_vector(os, parm._probabilities);
- return os;
- }
-
- /** Reads the parameters from a @c std::istream. */
- BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm)
- {
- std::vector<WeightType> temp;
- detail::read_vector(is, temp);
- if(is) {
- parm._probabilities.swap(temp);
- }
- return is;
- }
-
- /** Returns true if the two sets of parameters are the same. */
- BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
- {
- return lhs._probabilities == rhs._probabilities;
- }
- /** Returns true if the two sets of parameters are different. */
- BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)
- private:
- /// @cond show_private
- friend class discrete_distribution;
- explicit param_type(const discrete_distribution& dist)
- : _probabilities(dist.probabilities())
- {}
- void normalize()
- {
- impl_type::normalize(_probabilities);
- }
- std::vector<WeightType> _probabilities;
- /// @endcond
- };
-
- /**
- * Creates a new @c discrete_distribution object that has
- * \f$p(0) = 1\f$ and \f$p(i|i>0) = 0\f$.
- */
- discrete_distribution()
- {
- _impl.init_empty();
- }
- /**
- * Constructs a discrete_distribution from an iterator range.
- * If @c first == @c last, equivalent to the default constructor.
- * Otherwise, the values of the range represent weights for the
- * possible values of the distribution.
- */
- template<class Iter>
- discrete_distribution(Iter first, Iter last)
- {
- init(first, last);
- }
-#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
- /**
- * Constructs a @c discrete_distribution from a @c std::initializer_list.
- * If the @c initializer_list is empty, equivalent to the default
- * constructor. Otherwise, the values of the @c initializer_list
- * represent weights for the possible values of the distribution.
- * For example, given the distribution
- *
- * @code
- * discrete_distribution<> dist{1, 4, 5};
- * @endcode
- *
- * The probability of a 0 is 1/10, the probability of a 1 is 2/5,
- * the probability of a 2 is 1/2, and no other values are possible.
- */
- discrete_distribution(std::initializer_list<WeightType> wl)
- {
- init(wl.begin(), wl.end());
- }
-#endif
- /**
- * Constructs a discrete_distribution from a Boost.Range range.
- * If the range is empty, equivalent to the default constructor.
- * Otherwise, the values of the range represent weights for the
- * possible values of the distribution.
- */
- template<class Range>
- explicit discrete_distribution(const Range& range)
- {
- init(boost::begin(range), boost::end(range));
- }
- /**
- * Constructs a discrete_distribution that approximates a function.
- * If nw is zero, equivalent to the default constructor.
- * Otherwise, the range of the distribution is [0, nw),
- * and the weights are found by calling fw with values
- * evenly distributed between \f$\mbox{xmin} + \delta/2\f$ and
- * \f$\mbox{xmax} - \delta/2\f$, where
- * \f$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}\f$.
- */
- template<class Func>
- discrete_distribution(std::size_t nw, double xmin, double xmax, Func fw)
- {
- std::size_t n = (nw == 0) ? 1 : nw;
- double delta = (xmax - xmin) / n;
- BOOST_ASSERT(delta > 0);
- std::vector<WeightType> weights;
- for(std::size_t k = 0; k < n; ++k) {
- weights.push_back(fw(xmin + k*delta + delta/2));
- }
- init(weights.begin(), weights.end());
- }
- /**
- * Constructs a discrete_distribution from its parameters.
- */
- explicit discrete_distribution(const param_type& parm)
- {
- param(parm);
- }
-
- /**
- * Returns a value distributed according to the parameters of the
- * discrete_distribution.
- */
- template<class URNG>
- IntType operator()(URNG& urng) const
- {
- BOOST_ASSERT(!_impl._alias_table.empty());
- IntType result;
- WeightType test;
- do {
- result = uniform_int_distribution<IntType>((min)(), (max)())(urng);
- test = _impl.test(urng);
- } while(!_impl.accept(result, test));
- if(test < _impl._alias_table[static_cast<std::size_t>(result)].first) {
- return result;
- } else {
- return(_impl._alias_table[static_cast<std::size_t>(result)].second);
- }
- }
-
- /**
- * Returns a value distributed according to the parameters
- * specified by param.
- */
- template<class URNG>
- IntType operator()(URNG& urng, const param_type& parm) const
- {
- if(WeightType limit = impl_type::try_get_sum(parm._probabilities)) {
- WeightType val = impl_type::generate_in_range(urng, limit);
- WeightType sum = 0;
- std::size_t result = 0;
- for(typename std::vector<WeightType>::const_iterator
- iter = parm._probabilities.begin(),
- end = parm._probabilities.end();
- iter != end; ++iter, ++result)
- {
- sum += *iter;
- if(sum > val) {
- return result;
- }
- }
- // This shouldn't be reachable, but round-off error
- // can prevent any match from being found when val is
- // very close to 1.
- return static_cast<IntType>(parm._probabilities.size() - 1);
- } else {
- // WeightType is integral and sum(parm._probabilities)
- // would overflow. Just use the easy solution.
- return discrete_distribution(parm)(urng);
- }
- }
-
- /** Returns the smallest value that the distribution can produce. */
- result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; }
- /** Returns the largest value that the distribution can produce. */
- result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const
- { return static_cast<result_type>(_impl._alias_table.size() - 1); }
-
- /**
- * Returns a vector containing the probabilities of each
- * value of the distribution. For example, given
- *
- * @code
- * discrete_distribution<> dist = { 1, 4, 5 };
- * std::vector<double> p = dist.param();
- * @endcode
- *
- * the vector, p will contain {0.1, 0.4, 0.5}.
- *
- * If @c WeightType is integral, then the weights
- * will be returned unchanged.
- */
- std::vector<WeightType> probabilities() const
- {
- std::vector<WeightType> result(_impl._alias_table.size(), static_cast<WeightType>(0));
- std::size_t i = 0;
- for(typename impl_type::alias_table_t::const_iterator
- iter = _impl._alias_table.begin(),
- end = _impl._alias_table.end();
- iter != end; ++iter, ++i)
- {
- WeightType val = iter->first;
- result[i] += val;
- result[static_cast<std::size_t>(iter->second)] += _impl.get_weight(i) - val;
- }
- impl_type::normalize(result);
- return(result);
- }
-
- /** Returns the parameters of the distribution. */
- param_type param() const
- {
- return param_type(*this);
- }
- /** Sets the parameters of the distribution. */
- void param(const param_type& parm)
- {
- init(parm._probabilities.begin(), parm._probabilities.end());
- }
-
- /**
- * Effects: Subsequent uses of the distribution do not depend
- * on values produced by any engine prior to invoking reset.
- */
- void reset() {}
-
- /** Writes a distribution to a @c std::ostream. */
- BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, discrete_distribution, dd)
- {
- os << dd.param();
- return os;
- }
-
- /** Reads a distribution from a @c std::istream */
- BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, discrete_distribution, dd)
- {
- param_type parm;
- if(is >> parm) {
- dd.param(parm);
- }
- return is;
- }
-
- /**
- * Returns true if the two distributions will return the
- * same sequence of values, when passed equal generators.
- */
- BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(discrete_distribution, lhs, rhs)
- {
- return lhs._impl == rhs._impl;
- }
- /**
- * Returns true if the two distributions may return different
- * sequences of values, when passed equal generators.
- */
- BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(discrete_distribution)
-
-private:
-
- /// @cond show_private
-
- template<class Iter>
- void init(Iter first, Iter last, std::input_iterator_tag)
- {
- std::vector<WeightType> temp(first, last);
- init(temp.begin(), temp.end());
- }
- template<class Iter>
- void init(Iter first, Iter last, std::forward_iterator_tag)
- {
- std::vector<std::pair<WeightType, IntType> > below_average;
- std::vector<std::pair<WeightType, IntType> > above_average;
- WeightType weight_average = _impl.init_average(first, last);
- WeightType normalized_average = _impl.get_weight(0);
- std::size_t i = 0;
- for(; first != last; ++first, ++i) {
- WeightType val = impl_type::normalize(*first, weight_average);
- std::pair<WeightType, IntType> elem(val, static_cast<IntType>(i));
- if(val < normalized_average) {
- below_average.push_back(elem);
- } else {
- above_average.push_back(elem);
- }
- }
-
- typename impl_type::alias_table_t::iterator
- b_iter = below_average.begin(),
- b_end = below_average.end(),
- a_iter = above_average.begin(),
- a_end = above_average.end()
- ;
- while(b_iter != b_end && a_iter != a_end) {
- _impl._alias_table[static_cast<std::size_t>(b_iter->second)] =
- std::make_pair(b_iter->first, a_iter->second);
- a_iter->first -= (_impl.get_weight(b_iter->second) - b_iter->first);
- if(a_iter->first < normalized_average) {
- *b_iter = *a_iter++;
- } else {
- ++b_iter;
- }
- }
- for(; b_iter != b_end; ++b_iter) {
- _impl._alias_table[static_cast<std::size_t>(b_iter->second)].first =
- _impl.get_weight(b_iter->second);
- }
- for(; a_iter != a_end; ++a_iter) {
- _impl._alias_table[static_cast<std::size_t>(a_iter->second)].first =
- _impl.get_weight(a_iter->second);
- }
- }
- template<class Iter>
- void init(Iter first, Iter last)
- {
- if(first == last) {
- _impl.init_empty();
- } else {
- typename std::iterator_traits<Iter>::iterator_category category;
- init(first, last, category);
- }
- }
- typedef typename detail::select_alias_table<
- (::boost::is_integral<WeightType>::value)
- >::template apply<IntType, WeightType>::type impl_type;
- impl_type _impl;
- /// @endcond
-};
-
-}
-}
-
-#include <boost/random/detail/enable_warnings.hpp>
-
-#endif
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
deleted file mode 100644
index de817dbf1f2..00000000000
--- a/src/third_party/boost-1.69.0/boost/regex/config.hpp
+++ /dev/null
@@ -1,487 +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
-/*
- * 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.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
deleted file mode 100644
index 7591ba655ef..00000000000
--- a/src/third_party/boost-1.69.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 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
deleted file mode 100644
index c7d2df41cfd..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_shared_array.hpp
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
-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.69.0/boost/smart_ptr/bad_weak_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/bad_weak_ptr.hpp
deleted file mode 100644
index b086be595f4..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/bad_weak_ptr.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
-#define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/smart_ptr/bad_weak_ptr.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-//
-// Distributed under the 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>
-#include <exception>
-
-#ifdef __BORLANDC__
-# pragma warn -8026 // Functions with excep. spec. are not expanded inline
-#endif
-
-namespace boost
-{
-
-// The standard library that comes with Borland C++ 5.5.1, 5.6.4
-// defines std::exception and its members as having C calling
-// convention (-pc). When the definition of bad_weak_ptr
-// is compiled with -ps, the compiler issues an error.
-// Hence, the temporary #pragma option -pc below.
-
-#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
-# pragma option push -pc
-#endif
-
-#if defined(BOOST_CLANG)
-// Intel C++ on Mac defines __clang__ but doesn't support the pragma
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wweak-vtables"
-#endif
-
-class bad_weak_ptr: public std::exception
-{
-public:
-
- virtual char const * what() const throw()
- {
- return "tr1::bad_weak_ptr";
- }
-};
-
-#if defined(BOOST_CLANG)
-# pragma clang diagnostic pop
-#endif
-
-#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
-# pragma option pop
-#endif
-
-} // namespace boost
-
-#ifdef __BORLANDC__
-# pragma warn .8026 // Functions with excep. spec. are not expanded inline
-#endif
-
-#endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
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
deleted file mode 100644
index bda5f70d444..00000000000
--- a/src/third_party/boost-1.69.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 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.69.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
deleted file mode 100644
index 7d04f1dc527..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_sp_deleter.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/local_sp_deleter.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/local_counted_base.hpp>
-#include <boost/config.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-template<class D> class local_sp_deleter: public local_counted_impl_em
-{
-private:
-
- D d_;
-
-public:
-
- local_sp_deleter(): d_()
- {
- }
-
- explicit local_sp_deleter( D const& d ) BOOST_SP_NOEXCEPT: d_( d )
- {
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- explicit local_sp_deleter( D&& d ) BOOST_SP_NOEXCEPT: d_( std::move(d) )
- {
- }
-
-#endif
-
- D& deleter()
- {
- return d_;
- }
-
- template<class Y> void operator()( Y* p ) BOOST_SP_NOEXCEPT
- {
- d_( p );
- }
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-
- void operator()( boost::detail::sp_nullptr_t p ) BOOST_SP_NOEXCEPT
- {
- d_( p );
- }
-
-#endif
-};
-
-template<> class local_sp_deleter<void>
-{
-};
-
-template<class D> D * get_local_deleter( local_sp_deleter<D> * p )
-{
- return &p->deleter();
-}
-
-inline void * get_local_deleter( local_sp_deleter<void> * /*p*/ )
-{
- return 0;
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp
deleted file mode 100644
index ae7d0fb46f0..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp
+++ /dev/null
@@ -1,667 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/shared_count.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)
-//
-
-#ifdef __BORLANDC__
-# pragma warn -8027 // Functions containing try are not expanded inline
-#endif
-
-#include <boost/config.hpp>
-#include <boost/checked_delete.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/smart_ptr/bad_weak_ptr.hpp>
-#include <boost/smart_ptr/detail/sp_counted_base.hpp>
-#include <boost/smart_ptr/detail/sp_counted_impl.hpp>
-#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
-#include <boost/detail/workaround.hpp>
-// In order to avoid circular dependencies with Boost.TR1
-// we make sure that our include of <memory> doesn't try to
-// pull in the TR1 headers: that's why we use this header
-// rather than including <memory> directly:
-#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
-#include <functional> // std::less
-
-#ifdef BOOST_NO_EXCEPTIONS
-# include <new> // std::bad_alloc
-#endif
-
-#include <boost/core/addressof.hpp>
-
-#if defined( BOOST_SP_DISABLE_DEPRECATED )
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-namespace boost
-{
-
-namespace movelib
-{
-
-template< class T, class D > class unique_ptr;
-
-} // namespace movelib
-
-namespace detail
-{
-
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
-
-int const shared_count_id = 0x2C35F101;
-int const weak_count_id = 0x298C38A4;
-
-#endif
-
-struct sp_nothrow_tag {};
-
-template< class D > struct sp_inplace_tag
-{
-};
-
-template< class T > class sp_reference_wrapper
-{
-public:
-
- explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) )
- {
- }
-
- template< class Y > void operator()( Y * p ) const
- {
- (*t_)( p );
- }
-
-private:
-
- T * t_;
-};
-
-template< class D > struct sp_convert_reference
-{
- typedef D type;
-};
-
-template< class D > struct sp_convert_reference< D& >
-{
- typedef sp_reference_wrapper< D > type;
-};
-
-class weak_count;
-
-class shared_count
-{
-private:
-
- sp_counted_base * pi_;
-
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- int id_;
-#endif
-
- friend class weak_count;
-
-public:
-
- BOOST_CONSTEXPR shared_count(): pi_(0) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- }
-
- BOOST_CONSTEXPR explicit shared_count( sp_counted_base * pi ): pi_( pi ) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- }
-
- template<class Y> explicit shared_count( Y * p ): pi_( 0 )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
-#ifndef BOOST_NO_EXCEPTIONS
-
- try
- {
- pi_ = new sp_counted_impl_p<Y>( p );
- }
- catch(...)
- {
- boost::checked_delete( p );
- throw;
- }
-
-#else
-
- pi_ = new sp_counted_impl_p<Y>( p );
-
- if( pi_ == 0 )
- {
- boost::checked_delete( p );
- boost::throw_exception( std::bad_alloc() );
- }
-
-#endif
- }
-
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
- template<class Y, class D> shared_count( Y * p, D d ): pi_(0)
-#else
- template<class P, class D> shared_count( P p, D d ): pi_(0)
-#endif
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
- typedef Y* P;
-#endif
-#ifndef BOOST_NO_EXCEPTIONS
-
- try
- {
- pi_ = new sp_counted_impl_pd<P, D>(p, d);
- }
- catch(...)
- {
- d(p); // delete p
- throw;
- }
-
-#else
-
- pi_ = new sp_counted_impl_pd<P, D>(p, d);
-
- if(pi_ == 0)
- {
- d(p); // delete p
- boost::throw_exception(std::bad_alloc());
- }
-
-#endif
- }
-
-#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
-
- template< class P, class D > shared_count( P p, sp_inplace_tag<D> ): pi_( 0 )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
-#ifndef BOOST_NO_EXCEPTIONS
-
- try
- {
- pi_ = new sp_counted_impl_pd< P, D >( p );
- }
- catch( ... )
- {
- D::operator_fn( p ); // delete p
- throw;
- }
-
-#else
-
- pi_ = new sp_counted_impl_pd< P, D >( p );
-
- if( pi_ == 0 )
- {
- D::operator_fn( p ); // delete p
- boost::throw_exception( std::bad_alloc() );
- }
-
-#endif // #ifndef BOOST_NO_EXCEPTIONS
- }
-
-#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
-
- template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- typedef sp_counted_impl_pda<P, D, A> impl_type;
-
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- typedef typename std::allocator_traits<A>::template rebind_alloc< impl_type > A2;
-
-#else
-
- typedef typename A::template rebind< impl_type >::other A2;
-
-#endif
-
- A2 a2( a );
-
-#ifndef BOOST_NO_EXCEPTIONS
-
- try
- {
- pi_ = a2.allocate( 1 );
- ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
- }
- catch(...)
- {
- d( p );
-
- if( pi_ != 0 )
- {
- a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
- }
-
- throw;
- }
-
-#else
-
- pi_ = a2.allocate( 1 );
-
- if( pi_ != 0 )
- {
- ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
- }
- else
- {
- d( p );
- boost::throw_exception( std::bad_alloc() );
- }
-
-#endif
- }
-
-#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
-
- template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- typedef sp_counted_impl_pda< P, D, A > impl_type;
-
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- typedef typename std::allocator_traits<A>::template rebind_alloc< impl_type > A2;
-
-#else
-
- typedef typename A::template rebind< impl_type >::other A2;
-
-#endif
-
- A2 a2( a );
-
-#ifndef BOOST_NO_EXCEPTIONS
-
- try
- {
- pi_ = a2.allocate( 1 );
- ::new( static_cast< void* >( pi_ ) ) impl_type( p, a );
- }
- catch(...)
- {
- D::operator_fn( p );
-
- if( pi_ != 0 )
- {
- a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
- }
-
- throw;
- }
-
-#else
-
- pi_ = a2.allocate( 1 );
-
- if( pi_ != 0 )
- {
- ::new( static_cast< void* >( pi_ ) ) impl_type( p, a );
- }
- else
- {
- D::operator_fn( p );
- boost::throw_exception( std::bad_alloc() );
- }
-
-#endif // #ifndef BOOST_NO_EXCEPTIONS
- }
-
-#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
-
-#ifndef BOOST_NO_AUTO_PTR
-
- // auto_ptr<Y> is special cased to provide the strong guarantee
-
- template<class Y>
- explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
-#ifdef BOOST_NO_EXCEPTIONS
-
- if( pi_ == 0 )
- {
- boost::throw_exception(std::bad_alloc());
- }
-
-#endif
-
- r.release();
- }
-
-#endif
-
-#if !defined( BOOST_NO_CXX11_SMART_PTR )
-
- template<class Y, class D>
- explicit shared_count( std::unique_ptr<Y, D> & r ): pi_( 0 )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- typedef typename sp_convert_reference<D>::type D2;
-
- D2 d2( r.get_deleter() );
- pi_ = new sp_counted_impl_pd< typename std::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 );
-
-#ifdef BOOST_NO_EXCEPTIONS
-
- if( pi_ == 0 )
- {
- boost::throw_exception( std::bad_alloc() );
- }
-
-#endif
-
- r.release();
- }
-
-#endif
-
- template<class Y, class D>
- explicit shared_count( boost::movelib::unique_ptr<Y, D> & r ): pi_( 0 )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- typedef typename sp_convert_reference<D>::type D2;
-
- D2 d2( r.get_deleter() );
- pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 );
-
-#ifdef BOOST_NO_EXCEPTIONS
-
- if( pi_ == 0 )
- {
- boost::throw_exception( std::bad_alloc() );
- }
-
-#endif
-
- r.release();
- }
-
- ~shared_count() // nothrow
- {
- if( pi_ != 0 ) pi_->release();
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- id_ = 0;
-#endif
- }
-
- shared_count(shared_count const & r): pi_(r.pi_) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- if( pi_ != 0 ) pi_->add_ref_copy();
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- shared_count(shared_count && r): pi_(r.pi_) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
- {
- r.pi_ = 0;
- }
-
-#endif
-
- explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0
- shared_count( weak_count const & r, sp_nothrow_tag ); // constructs an empty *this when r.use_count() == 0
-
- shared_count & operator= (shared_count const & r) // nothrow
- {
- sp_counted_base * tmp = r.pi_;
-
- if( tmp != pi_ )
- {
- if( tmp != 0 ) tmp->add_ref_copy();
- if( pi_ != 0 ) pi_->release();
- pi_ = tmp;
- }
-
- return *this;
- }
-
- void swap(shared_count & r) // nothrow
- {
- sp_counted_base * tmp = r.pi_;
- r.pi_ = pi_;
- pi_ = tmp;
- }
-
- long use_count() const // nothrow
- {
- return pi_ != 0? pi_->use_count(): 0;
- }
-
- bool unique() const // nothrow
- {
- return use_count() == 1;
- }
-
- bool empty() const // nothrow
- {
- return pi_ == 0;
- }
-
- friend inline bool operator==(shared_count const & a, shared_count const & b)
- {
- return a.pi_ == b.pi_;
- }
-
- friend inline bool operator<(shared_count const & a, shared_count const & b)
- {
- return std::less<sp_counted_base *>()( a.pi_, b.pi_ );
- }
-
- void * get_deleter( sp_typeinfo const & ti ) const
- {
- return pi_? pi_->get_deleter( ti ): 0;
- }
-
- void * get_local_deleter( sp_typeinfo const & ti ) const
- {
- return pi_? pi_->get_local_deleter( ti ): 0;
- }
-
- void * get_untyped_deleter() const
- {
- return pi_? pi_->get_untyped_deleter(): 0;
- }
-};
-
-
-class weak_count
-{
-private:
-
- sp_counted_base * pi_;
-
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- int id_;
-#endif
-
- friend class shared_count;
-
-public:
-
- BOOST_CONSTEXPR weak_count(): pi_(0) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(weak_count_id)
-#endif
- {
- }
-
- weak_count(shared_count const & r): pi_(r.pi_) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(weak_count_id)
-#endif
- {
- if(pi_ != 0) pi_->weak_add_ref();
- }
-
- weak_count(weak_count const & r): pi_(r.pi_) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(weak_count_id)
-#endif
- {
- if(pi_ != 0) pi_->weak_add_ref();
- }
-
-// Move support
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- weak_count(weak_count && r): pi_(r.pi_) // nothrow
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(weak_count_id)
-#endif
- {
- r.pi_ = 0;
- }
-
-#endif
-
- ~weak_count() // nothrow
- {
- if(pi_ != 0) pi_->weak_release();
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- id_ = 0;
-#endif
- }
-
- weak_count & operator= (shared_count const & r) // nothrow
- {
- sp_counted_base * tmp = r.pi_;
-
- if( tmp != pi_ )
- {
- if(tmp != 0) tmp->weak_add_ref();
- if(pi_ != 0) pi_->weak_release();
- pi_ = tmp;
- }
-
- return *this;
- }
-
- weak_count & operator= (weak_count const & r) // nothrow
- {
- sp_counted_base * tmp = r.pi_;
-
- if( tmp != pi_ )
- {
- if(tmp != 0) tmp->weak_add_ref();
- if(pi_ != 0) pi_->weak_release();
- pi_ = tmp;
- }
-
- return *this;
- }
-
- void swap(weak_count & r) // nothrow
- {
- sp_counted_base * tmp = r.pi_;
- r.pi_ = pi_;
- pi_ = tmp;
- }
-
- long use_count() const // nothrow
- {
- return pi_ != 0? pi_->use_count(): 0;
- }
-
- bool empty() const // nothrow
- {
- return pi_ == 0;
- }
-
- friend inline bool operator==(weak_count const & a, weak_count const & b)
- {
- return a.pi_ == b.pi_;
- }
-
- friend inline bool operator<(weak_count const & a, weak_count const & b)
- {
- return std::less<sp_counted_base *>()(a.pi_, b.pi_);
- }
-};
-
-inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
-{
- if( pi_ == 0 || !pi_->add_ref_lock() )
- {
- boost::throw_exception( boost::bad_weak_ptr() );
- }
-}
-
-inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ )
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- , id_(shared_count_id)
-#endif
-{
- if( pi_ != 0 && !pi_->add_ref_lock() )
- {
- pi_ = 0;
- }
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#if defined( BOOST_SP_DISABLE_DEPRECATED )
-#pragma GCC diagnostic pop
-#endif
-
-#ifdef __BORLANDC__
-# pragma warn .8027 // Functions containing try are not expanded inline
-#endif
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_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
deleted file mode 100644
index c2c20d3ab9f..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
+++ /dev/null
@@ -1,151 +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/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_nt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
deleted file mode 100644
index e61bd88362e..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
+++ /dev/null
@@ -1,110 +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>
-#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
deleted file mode 100644
index 3110f2380fa..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
+++ /dev/null
@@ -1,139 +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 <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_std_atomic.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
deleted file mode 100644
index 8cd18c9541d..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
+++ /dev/null
@@ -1,139 +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 <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_impl.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_impl.hpp
deleted file mode 100644
index 3c0502a4ecf..00000000000
--- a/src/third_party/boost-1.69.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 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.69.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
deleted file mode 100644
index a61c1cd96d1..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// Copyright (c) 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/smart_ptr/detail/yield_k.hpp>
-#include <atomic>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class spinlock
-{
-public:
-
- std::atomic_flag v_;
-
-public:
-
- bool try_lock()
- {
- return !v_.test_and_set( std::memory_order_acquire );
- }
-
- void lock()
- {
- for( unsigned k = 0; !try_lock(); ++k )
- {
- boost::detail::yield( k );
- }
- }
-
- void unlock()
- {
- v_ .clear( std::memory_order_release );
- }
-
-public:
-
- class scoped_lock
- {
- private:
-
- spinlock & sp_;
-
- scoped_lock( scoped_lock const & );
- scoped_lock & operator=( scoped_lock const & );
-
- public:
-
- explicit scoped_lock( spinlock & sp ): sp_( sp )
- {
- sp.lock();
- }
-
- ~scoped_lock()
- {
- sp_.unlock();
- }
- };
-};
-
-} // namespace detail
-} // namespace boost
-
-#define BOOST_DETAIL_SPINLOCK_INIT { ATOMIC_FLAG_INIT }
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp
deleted file mode 100644
index 403f32f98be..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp
+++ /dev/null
@@ -1,183 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// yield_k.hpp
-//
-// Copyright (c) 2008 Peter Dimov
-// Copyright (c) Microsoft Corporation 2014
-//
-// void yield( unsigned k );
-//
-// Typical use:
-//
-// for( unsigned k = 0; !try_lock(); ++k ) yield( k );
-//
-// Distributed under the 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>
-#include <boost/predef.h>
-
-#if BOOST_PLAT_WINDOWS_RUNTIME
-#include <thread>
-#endif
-
-// BOOST_SMT_PAUSE
-
-#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) && !defined(__c2__)
-
-extern "C" void _mm_pause();
-
-#define BOOST_SMT_PAUSE _mm_pause();
-
-#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )
-
-#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );
-
-#endif
-
-//
-
-#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-
-#if defined( BOOST_USE_WINDOWS_H )
-# include <windows.h>
-#endif
-
-namespace boost
-{
-
-namespace detail
-{
-
-#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME
-
-#if defined(__clang__) && defined(__x86_64__)
-// clang x64 warns that __stdcall is ignored
-# define BOOST_SP_STDCALL
-#else
-# define BOOST_SP_STDCALL __stdcall
-#endif
-
-#if defined(__LP64__) // Cygwin 64
- extern "C" __declspec(dllimport) void BOOST_SP_STDCALL Sleep( unsigned int ms );
-#else
- extern "C" __declspec(dllimport) void BOOST_SP_STDCALL Sleep( unsigned long ms );
-#endif
-
-#undef BOOST_SP_STDCALL
-
-#endif // !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME
-
-inline void yield( unsigned k )
-{
- if( k < 4 )
- {
- }
-#if defined( BOOST_SMT_PAUSE )
- else if( k < 16 )
- {
- BOOST_SMT_PAUSE
- }
-#endif
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- else if( k < 32 )
- {
- Sleep( 0 );
- }
- else
- {
- Sleep( 1 );
- }
-#else
- else
- {
- // Sleep isn't supported on the Windows Runtime.
- std::this_thread::yield();
- }
-#endif
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#elif defined( BOOST_HAS_PTHREADS )
-
-#ifndef _AIX
-#include <sched.h>
-#else
- // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var
- extern "C" int sched_yield(void);
-#endif
-
-#include <time.h>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void yield( unsigned k )
-{
- if( k < 4 )
- {
- }
-#if defined( BOOST_SMT_PAUSE )
- else if( k < 16 )
- {
- BOOST_SMT_PAUSE
- }
-#endif
- else if( k < 32 || k & 1 )
- {
- sched_yield();
- }
- else
- {
- // g++ -Wextra warns on {} or {0}
- struct timespec rqtp = { 0, 0 };
-
- // POSIX says that timespec has tv_sec and tv_nsec
- // But it doesn't guarantee order or placement
-
- rqtp.tv_sec = 0;
- rqtp.tv_nsec = 1000;
-
- nanosleep( &rqtp, 0 );
- }
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#else
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void yield( unsigned )
-{
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#endif
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 663f83479bf..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_array.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-Copyright 2017 Peter Dimov
-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_MAKE_LOCAL_SHARED_ARRAY_HPP
-#define BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP
-
-#include <boost/smart_ptr/allocate_local_shared_array.hpp>
-
-namespace boost {
-
-template<class T>
-inline typename detail::lsp_if_size_array<T>::type
-make_local_shared()
-{
- return boost::allocate_local_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>());
-}
-
-template<class T>
-inline typename detail::lsp_if_size_array<T>::type
-make_local_shared(const typename detail::sp_array_element<T>::type& value)
-{
- return boost::allocate_local_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), value);
-}
-
-template<class T>
-inline typename detail::lsp_if_array<T>::type
-make_local_shared(std::size_t size)
-{
- return boost::allocate_local_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), size);
-}
-
-template<class T>
-inline typename detail::lsp_if_array<T>::type
-make_local_shared(std::size_t size,
- const typename detail::sp_array_element<T>::type& value)
-{
- return boost::allocate_local_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), size, value);
-}
-
-template<class T>
-inline typename detail::lsp_if_size_array<T>::type
-make_local_shared_noinit()
-{
- return allocate_local_shared_noinit<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>());
-}
-
-template<class T>
-inline typename detail::lsp_if_array<T>::type
-make_local_shared_noinit(std::size_t size)
-{
- return allocate_local_shared_noinit<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), size);
-}
-
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index ab83d60e612..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_object.hpp
+++ /dev/null
@@ -1,199 +0,0 @@
-#ifndef BOOST_SMART_PTR_MAKE_LOCAL_SHARED_OBJECT_HPP_INCLUDED
-#define BOOST_SMART_PTR_MAKE_LOCAL_SHARED_OBJECT_HPP_INCLUDED
-
-// make_local_shared_object.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/local_shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-#include <boost/config.hpp>
-#include <utility>
-#include <cstddef>
-
-namespace boost
-{
-
-namespace detail
-{
-
-// lsp_if_not_array
-
-template<class T> struct lsp_if_not_array
-{
- typedef boost::local_shared_ptr<T> type;
-};
-
-template<class T> struct lsp_if_not_array<T[]>
-{
-};
-
-template<class T, std::size_t N> struct lsp_if_not_array<T[N]>
-{
-};
-
-// lsp_ms_deleter
-
-template<class T, class A> class lsp_ms_deleter: public local_counted_impl_em
-{
-private:
-
- typedef typename sp_aligned_storage<sizeof(T), ::boost::alignment_of<T>::value>::type storage_type;
-
- storage_type storage_;
- A a_;
- bool initialized_;
-
-private:
-
- void destroy() BOOST_SP_NOEXCEPT
- {
- if( initialized_ )
- {
- T * p = reinterpret_cast< T* >( storage_.data_ );
-
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- std::allocator_traits<A>::destroy( a_, p );
-
-#else
-
- p->~T();
-
-#endif
-
- initialized_ = false;
- }
- }
-
-public:
-
- explicit lsp_ms_deleter( A const & a ) BOOST_SP_NOEXCEPT : a_( a ), initialized_( false )
- {
- }
-
- // optimization: do not copy storage_
- lsp_ms_deleter( lsp_ms_deleter const & r ) BOOST_SP_NOEXCEPT : a_( r.a_), initialized_( false )
- {
- }
-
- ~lsp_ms_deleter() BOOST_SP_NOEXCEPT
- {
- destroy();
- }
-
- void operator()( T * ) BOOST_SP_NOEXCEPT
- {
- destroy();
- }
-
- static void operator_fn( T* ) BOOST_SP_NOEXCEPT // operator() can't be static
- {
- }
-
- void * address() BOOST_SP_NOEXCEPT
- {
- return storage_.data_;
- }
-
- void set_initialized() BOOST_SP_NOEXCEPT
- {
- initialized_ = true;
- }
-};
-
-} // namespace detail
-
-template<class T, class A, class... Args> typename boost::detail::lsp_if_not_array<T>::type allocate_local_shared( A const & a, Args&&... args )
-{
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- typedef typename std::allocator_traits<A>::template rebind_alloc<T> A2;
-
-#else
-
- typedef typename A::template rebind<T>::other A2;
-
-#endif
-
- A2 a2( a );
-
- typedef boost::detail::lsp_ms_deleter<T, A2> D;
-
- boost::shared_ptr<T> pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag<D>(), a2 );
-
- D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() );
- void * pv = pd->address();
-
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- std::allocator_traits<A2>::construct( a2, static_cast< T* >( pv ), std::forward<Args>( args )... );
-
-#else
-
- ::new( pv ) T( std::forward<Args>( args )... );
-
-#endif
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
-
- pd->pn_ = pt._internal_count();
-
- return boost::local_shared_ptr<T>( boost::detail::lsp_internal_constructor_tag(), pt2, pd );
-}
-
-template<class T, class A> typename boost::detail::lsp_if_not_array<T>::type allocate_local_shared_noinit( A const & a )
-{
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- typedef typename std::allocator_traits<A>::template rebind_alloc<T> A2;
-
-#else
-
- typedef typename A::template rebind<T>::other A2;
-
-#endif
-
- A2 a2( a );
-
- typedef boost::detail::lsp_ms_deleter< T, std::allocator<T> > D;
-
- boost::shared_ptr<T> pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag<D>(), a2 );
-
- D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() );
- void * pv = pd->address();
-
- ::new( pv ) T;
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
-
- pd->pn_ = pt._internal_count();
-
- return boost::local_shared_ptr<T>( boost::detail::lsp_internal_constructor_tag(), pt2, pd );
-}
-
-template<class T, class... Args> typename boost::detail::lsp_if_not_array<T>::type make_local_shared( Args&&... args )
-{
- return boost::allocate_local_shared<T>( std::allocator<T>(), std::forward<Args>(args)... );
-}
-
-template<class T> typename boost::detail::lsp_if_not_array<T>::type make_local_shared_noinit()
-{
- return boost::allocate_shared_noinit<T>( std::allocator<T>() );
-}
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp
deleted file mode 100644
index 2eaf4db71b8..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp
+++ /dev/null
@@ -1,66 +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_MAKE_SHARED_ARRAY_HPP
-#define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP
-
-#include <boost/smart_ptr/allocate_shared_array.hpp>
-
-namespace boost {
-
-template<class T>
-inline typename detail::sp_if_size_array<T>::type
-make_shared()
-{
- return boost::allocate_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>());
-}
-
-template<class T>
-inline typename detail::sp_if_size_array<T>::type
-make_shared(const typename detail::sp_array_element<T>::type& value)
-{
- return boost::allocate_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), value);
-}
-
-template<class T>
-inline typename detail::sp_if_array<T>::type
-make_shared(std::size_t size)
-{
- return boost::allocate_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), size);
-}
-
-template<class T>
-inline typename detail::sp_if_array<T>::type
-make_shared(std::size_t size,
- const typename detail::sp_array_element<T>::type& value)
-{
- return boost::allocate_shared<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), size, value);
-}
-
-template<class T>
-inline typename detail::sp_if_size_array<T>::type
-make_shared_noinit()
-{
- return allocate_shared_noinit<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>());
-}
-
-template<class T>
-inline typename detail::sp_if_array<T>::type
-make_shared_noinit(std::size_t size)
-{
- return allocate_shared_noinit<T>(std::allocator<typename
- detail::sp_array_scalar<T>::type>(), size);
-}
-
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp
deleted file mode 100644
index eed503392b8..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-Copyright 2012-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_SMART_PTR_MAKE_UNIQUE_HPP
-#define BOOST_SMART_PTR_MAKE_UNIQUE_HPP
-
-#include <boost/config.hpp>
-#include <memory>
-#include <utility>
-
-namespace boost {
-namespace detail {
-
-template<class T>
-struct up_if_object {
- typedef std::unique_ptr<T> type;
-};
-
-template<class T>
-struct up_if_object<T[]> { };
-
-template<class T, std::size_t N>
-struct up_if_object<T[N]> { };
-
-template<class T>
-struct up_if_array { };
-
-template<class T>
-struct up_if_array<T[]> {
- typedef std::unique_ptr<T[]> type;
-};
-
-template<class T>
-struct up_remove_reference {
- typedef T type;
-};
-
-template<class T>
-struct up_remove_reference<T&> {
- typedef T type;
-};
-
-template<class T>
-struct up_remove_reference<T&&> {
- typedef T type;
-};
-
-template<class T>
-struct up_element { };
-
-template<class T>
-struct up_element<T[]> {
- typedef T type;
-};
-
-} /* detail */
-
-template<class T>
-inline typename detail::up_if_object<T>::type
-make_unique()
-{
- return std::unique_ptr<T>(new T());
-}
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-template<class T, class... Args>
-inline typename detail::up_if_object<T>::type
-make_unique(Args&&... args)
-{
- return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
-}
-#endif
-
-template<class T>
-inline typename detail::up_if_object<T>::type
-make_unique(typename detail::up_remove_reference<T>::type&& value)
-{
- return std::unique_ptr<T>(new T(std::move(value)));
-}
-
-template<class T>
-inline typename detail::up_if_object<T>::type
-make_unique_noinit()
-{
- return std::unique_ptr<T>(new T);
-}
-
-template<class T>
-inline typename detail::up_if_array<T>::type
-make_unique(std::size_t size)
-{
- return std::unique_ptr<T>(new typename
- detail::up_element<T>::type[size]());
-}
-
-template<class T>
-inline typename detail::up_if_array<T>::type
-make_unique_noinit(std::size_t size)
-{
- return std::unique_ptr<T>(new typename
- detail::up_element<T>::type[size]);
-}
-
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp
deleted file mode 100644
index 4ac0699ef67..00000000000
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp
+++ /dev/null
@@ -1,1184 +0,0 @@
-#ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED
-#define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED
-
-//
-// shared_ptr.hpp
-//
-// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001-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)
-//
-// See http://www.boost.org/libs/smart_ptr/ for documentation.
-//
-
-#include <boost/config.hpp> // for broken compiler workarounds
-
-// In order to avoid circular dependencies with Boost.TR1
-// we make sure that our include of <memory> doesn't try to
-// pull in the TR1 headers: that's why we use this header
-// rather than including <memory> directly:
-#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
-
-#include <boost/assert.hpp>
-#include <boost/checked_delete.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/smart_ptr/detail/shared_count.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/smart_ptr/detail/sp_convertible.hpp>
-#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
-#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
-#include <boost/smart_ptr/detail/sp_noexcept.hpp>
-
-#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
-#include <boost/smart_ptr/detail/spinlock_pool.hpp>
-#endif
-
-#include <algorithm> // for std::swap
-#include <functional> // for std::less
-#include <typeinfo> // for std::bad_cast
-#include <cstddef> // for std::size_t
-
-#if !defined(BOOST_NO_IOSTREAM)
-#if !defined(BOOST_NO_IOSFWD)
-#include <iosfwd> // for std::basic_ostream
-#else
-#include <ostream>
-#endif
-#endif
-
-#if defined( BOOST_SP_DISABLE_DEPRECATED )
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-namespace boost
-{
-
-template<class T> class shared_ptr;
-template<class T> class weak_ptr;
-template<class T> class enable_shared_from_this;
-class enable_shared_from_raw;
-
-namespace movelib
-{
-
- template< class T, class D > class unique_ptr;
-
-} // namespace movelib
-
-namespace detail
-{
-
-// sp_element, element_type
-
-template< class T > struct sp_element
-{
- typedef T type;
-};
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T > struct sp_element< T[] >
-{
- typedef T type;
-};
-
-#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
-
-template< class T, std::size_t N > struct sp_element< T[N] >
-{
- typedef T type;
-};
-
-#endif
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-// sp_dereference, return type of operator*
-
-template< class T > struct sp_dereference
-{
- typedef T & type;
-};
-
-template<> struct sp_dereference< void >
-{
- typedef void type;
-};
-
-#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
-
-template<> struct sp_dereference< void const >
-{
- typedef void type;
-};
-
-template<> struct sp_dereference< void volatile >
-{
- typedef void type;
-};
-
-template<> struct sp_dereference< void const volatile >
-{
- typedef void type;
-};
-
-#endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T > struct sp_dereference< T[] >
-{
- typedef void type;
-};
-
-#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
-
-template< class T, std::size_t N > struct sp_dereference< T[N] >
-{
- typedef void type;
-};
-
-#endif
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-// sp_member_access, return type of operator->
-
-template< class T > struct sp_member_access
-{
- typedef T * type;
-};
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T > struct sp_member_access< T[] >
-{
- typedef void type;
-};
-
-#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
-
-template< class T, std::size_t N > struct sp_member_access< T[N] >
-{
- typedef void type;
-};
-
-#endif
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-// sp_array_access, return type of operator[]
-
-template< class T > struct sp_array_access
-{
- typedef void type;
-};
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T > struct sp_array_access< T[] >
-{
- typedef T & type;
-};
-
-#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
-
-template< class T, std::size_t N > struct sp_array_access< T[N] >
-{
- typedef T & type;
-};
-
-#endif
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-// sp_extent, for operator[] index check
-
-template< class T > struct sp_extent
-{
- enum _vt { value = 0 };
-};
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T, std::size_t N > struct sp_extent< T[N] >
-{
- enum _vt { value = N };
-};
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-// enable_shared_from_this support
-
-template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )
-{
- if( pe != 0 )
- {
- pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
- }
-}
-
-template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe );
-
-#ifdef _MANAGED
-
-// Avoid C4793, ... causes native code generation
-
-struct sp_any_pointer
-{
- template<class T> sp_any_pointer( T* ) {}
-};
-
-inline void sp_enable_shared_from_this( sp_any_pointer, sp_any_pointer, sp_any_pointer )
-{
-}
-
-#else // _MANAGED
-
-inline void sp_enable_shared_from_this( ... )
-{
-}
-
-#endif // _MANAGED
-
-#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_AUTO_PTR )
-
-// rvalue auto_ptr support based on a technique by Dave Abrahams
-
-template< class T, class R > struct sp_enable_if_auto_ptr
-{
-};
-
-template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
-{
- typedef R type;
-};
-
-#endif
-
-// sp_assert_convertible
-
-template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
-{
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
-
- // static_assert( sp_convertible< Y, T >::value );
- typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
- (void)sizeof( tmp );
-
-#else
-
- T* p = static_cast< Y* >( 0 );
- (void)p;
-
-#endif
-}
-
-// pointer constructor helper
-
-template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn )
-{
- boost::detail::shared_count( p ).swap( pn );
- boost::detail::sp_enable_shared_from_this( ppx, p, p );
-}
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
-{
- sp_assert_convertible< Y[], T[] >();
- boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
-}
-
-template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
-{
- sp_assert_convertible< Y[N], T[N] >();
- boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
-}
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-// deleter constructor helper
-
-template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p )
-{
- boost::detail::sp_enable_shared_from_this( ppx, p, p );
-}
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ )
-{
- sp_assert_convertible< Y[], T[] >();
-}
-
-template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ )
-{
- sp_assert_convertible< Y[N], T[N] >();
-}
-
-#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-struct sp_internal_constructor_tag
-{
-};
-
-} // namespace detail
-
-
-//
-// shared_ptr
-//
-// An enhanced relative of scoped_ptr with reference counted copy semantics.
-// The object pointed to is deleted when the last shared_ptr pointing to it
-// is destroyed or reset.
-//
-
-template<class T> class shared_ptr
-{
-private:
-
- // Borland 5.5.1 specific workaround
- typedef shared_ptr<T> this_type;
-
-public:
-
- typedef typename boost::detail::sp_element< T >::type element_type;
-
- BOOST_CONSTEXPR shared_ptr() BOOST_SP_NOEXCEPT : px( 0 ), pn()
- {
- }
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-
- BOOST_CONSTEXPR shared_ptr( boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT : px( 0 ), pn()
- {
- }
-
-#endif
-
- BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) BOOST_SP_NOEXCEPT : px( px_ ), pn( pn_ )
- {
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) BOOST_SP_NOEXCEPT : px( px_ ), pn( std::move( pn_ ) )
- {
- }
-
-#endif
-
- template<class Y>
- explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
- {
- boost::detail::sp_pointer_construct( this, p, pn );
- }
-
- //
- // Requirements: D's copy constructor must not throw
- //
- // shared_ptr will release p by calling d(p)
- //
-
- template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, d )
- {
- boost::detail::sp_deleter_construct( this, p );
- }
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-
- template<class D> shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d )
- {
- }
-
-#endif
-
- // As above, but with allocator. A's copy constructor shall not throw.
-
- template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
- {
- boost::detail::sp_deleter_construct( this, p );
- }
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-
- template<class D, class A> shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a )
- {
- }
-
-#endif
-
-// generated copy constructor, destructor are fine...
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
-// ... except in C++0x, move disables the implicit copy
-
- shared_ptr( shared_ptr const & r ) BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
- {
- }
-
-#endif
-
- template<class Y>
- explicit shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) // may throw
- {
- boost::detail::sp_assert_convertible< Y, T >();
-
- // it is now safe to copy r.px, as pn(r.pn) did not throw
- px = r.px;
- }
-
- template<class Y>
- shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag )
- BOOST_SP_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
- {
- if( !pn.empty() )
- {
- px = r.px;
- }
- }
-
- template<class Y>
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
-
- shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
-
-#else
-
- shared_ptr( shared_ptr<Y> const & r )
-
-#endif
- BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
- {
- boost::detail::sp_assert_convertible< Y, T >();
- }
-
- // aliasing
- template< class Y >
- shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn( r.pn )
- {
- }
-
-#ifndef BOOST_NO_AUTO_PTR
-
- template<class Y>
- explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
- {
- boost::detail::sp_assert_convertible< Y, T >();
-
- Y * tmp = r.get();
- pn = boost::detail::shared_count( r );
-
- boost::detail::sp_deleter_construct( this, tmp );
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- template<class Y>
- shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
- {
- boost::detail::sp_assert_convertible< Y, T >();
-
- Y * tmp = r.get();
- pn = boost::detail::shared_count( r );
-
- boost::detail::sp_deleter_construct( this, tmp );
- }
-
-#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
- template<class Ap>
- explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()
- {
- typedef typename Ap::element_type Y;
-
- boost::detail::sp_assert_convertible< Y, T >();
-
- Y * tmp = r.get();
- pn = boost::detail::shared_count( r );
-
- boost::detail::sp_deleter_construct( this, tmp );
- }
-
-#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-#endif // BOOST_NO_AUTO_PTR
-
-#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- template< class Y, class D >
- shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn()
- {
- boost::detail::sp_assert_convertible< Y, T >();
-
- typename std::unique_ptr< Y, D >::pointer tmp = r.get();
-
- if( tmp != 0 )
- {
- pn = boost::detail::shared_count( r );
- boost::detail::sp_deleter_construct( this, tmp );
- }
- }
-
-#endif
-
- template< class Y, class D >
- shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn()
- {
- boost::detail::sp_assert_convertible< Y, T >();
-
- typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get();
-
- if( tmp != 0 )
- {
- pn = boost::detail::shared_count( r );
- boost::detail::sp_deleter_construct( this, tmp );
- }
- }
-
- // assignment
-
- shared_ptr & operator=( shared_ptr const & r ) BOOST_SP_NOEXCEPT
- {
- this_type(r).swap(*this);
- return *this;
- }
-
-#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
-
- template<class Y>
- shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_SP_NOEXCEPT
- {
- this_type(r).swap(*this);
- return *this;
- }
-
-#endif
-
-#ifndef BOOST_NO_AUTO_PTR
-
- template<class Y>
- shared_ptr & operator=( std::auto_ptr<Y> & r )
- {
- this_type( r ).swap( *this );
- return *this;
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- template<class Y>
- shared_ptr & operator=( std::auto_ptr<Y> && r )
- {
- this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );
- return *this;
- }
-
-#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
- template<class Ap>
- typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
- {
- this_type( r ).swap( *this );
- return *this;
- }
-
-#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-#endif // BOOST_NO_AUTO_PTR
-
-#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- template<class Y, class D>
- shared_ptr & operator=( std::unique_ptr<Y, D> && r )
- {
- this_type( static_cast< std::unique_ptr<Y, D> && >( r ) ).swap(*this);
- return *this;
- }
-
-#endif
-
- template<class Y, class D>
- shared_ptr & operator=( boost::movelib::unique_ptr<Y, D> r )
- {
- // this_type( static_cast< unique_ptr<Y, D> && >( r ) ).swap( *this );
-
- boost::detail::sp_assert_convertible< Y, T >();
-
- typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get();
-
- shared_ptr tmp;
-
- if( p != 0 )
- {
- tmp.px = p;
- tmp.pn = boost::detail::shared_count( r );
-
- boost::detail::sp_deleter_construct( &tmp, p );
- }
-
- tmp.swap( *this );
-
- return *this;
- }
-
-// Move support
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- shared_ptr( shared_ptr && r ) BOOST_SP_NOEXCEPT : px( r.px ), pn()
- {
- pn.swap( r.pn );
- r.px = 0;
- }
-
- template<class Y>
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
-
- shared_ptr( shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
-
-#else
-
- shared_ptr( shared_ptr<Y> && r )
-
-#endif
- BOOST_SP_NOEXCEPT : px( r.px ), pn()
- {
- boost::detail::sp_assert_convertible< Y, T >();
-
- pn.swap( r.pn );
- r.px = 0;
- }
-
- shared_ptr & operator=( shared_ptr && r ) BOOST_SP_NOEXCEPT
- {
- this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
- return *this;
- }
-
- template<class Y>
- shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_SP_NOEXCEPT
- {
- this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
- return *this;
- }
-
- // aliasing move
- template<class Y>
- shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn()
- {
- pn.swap( r.pn );
- r.px = 0;
- }
-
-#endif
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-
- shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
- {
- this_type().swap(*this);
- return *this;
- }
-
-#endif
-
- void reset() BOOST_SP_NOEXCEPT
- {
- this_type().swap(*this);
- }
-
- template<class Y> void reset( Y * p ) // Y must be complete
- {
- BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
- this_type( p ).swap( *this );
- }
-
- template<class Y, class D> void reset( Y * p, D d )
- {
- this_type( p, d ).swap( *this );
- }
-
- template<class Y, class D, class A> void reset( Y * p, D d, A a )
- {
- this_type( p, d, a ).swap( *this );
- }
-
- template<class Y> void reset( shared_ptr<Y> const & r, element_type * p ) BOOST_SP_NOEXCEPT
- {
- this_type( r, p ).swap( *this );
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- template<class Y> void reset( shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT
- {
- this_type( static_cast< shared_ptr<Y> && >( r ), p ).swap( *this );
- }
-
-#endif
-
- typename boost::detail::sp_dereference< T >::type operator* () const BOOST_SP_NOEXCEPT_WITH_ASSERT
- {
- BOOST_ASSERT( px != 0 );
- return *px;
- }
-
- typename boost::detail::sp_member_access< T >::type operator-> () const BOOST_SP_NOEXCEPT_WITH_ASSERT
- {
- BOOST_ASSERT( px != 0 );
- return px;
- }
-
- typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const BOOST_SP_NOEXCEPT_WITH_ASSERT
- {
- BOOST_ASSERT( px != 0 );
- BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) );
-
- return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] );
- }
-
- element_type * get() const BOOST_SP_NOEXCEPT
- {
- return px;
- }
-
-// implicit conversion to "bool"
-#include <boost/smart_ptr/detail/operator_bool.hpp>
-
- bool unique() const BOOST_SP_NOEXCEPT
- {
- return pn.unique();
- }
-
- long use_count() const BOOST_SP_NOEXCEPT
- {
- return pn.use_count();
- }
-
- void swap( shared_ptr & other ) BOOST_SP_NOEXCEPT
- {
- std::swap(px, other.px);
- pn.swap(other.pn);
- }
-
- template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
- {
- return pn < rhs.pn;
- }
-
- template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
- {
- return pn < rhs.pn;
- }
-
- void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
- {
- return pn.get_deleter( ti );
- }
-
- void * _internal_get_local_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
- {
- return pn.get_local_deleter( ti );
- }
-
- void * _internal_get_untyped_deleter() const BOOST_SP_NOEXCEPT
- {
- return pn.get_untyped_deleter();
- }
-
- bool _internal_equiv( shared_ptr const & r ) const BOOST_SP_NOEXCEPT
- {
- return px == r.px && pn == r.pn;
- }
-
- boost::detail::shared_count _internal_count() const BOOST_NOEXCEPT
- {
- return pn;
- }
-
-// Tasteless as this may seem, making all members public allows member templates
-// to work in the absence of member template friends. (Matthew Langston)
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-
-private:
-
- template<class Y> friend class shared_ptr;
- template<class Y> friend class weak_ptr;
-
-
-#endif
-
- element_type * px; // contained pointer
- boost::detail::shared_count pn; // reference counter
-
-}; // shared_ptr
-
-template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
-{
- return a.get() == b.get();
-}
-
-template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
-{
- return a.get() != b.get();
-}
-
-#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
-
-// Resolve the ambiguity between our op!= and the one in rel_ops
-
-template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_SP_NOEXCEPT
-{
- return a.get() != b.get();
-}
-
-#endif
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-
-template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
-{
- return p.get() == 0;
-}
-
-template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- return p.get() == 0;
-}
-
-template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
-{
- return p.get() != 0;
-}
-
-template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- return p.get() != 0;
-}
-
-#endif
-
-template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
-{
- return a.owner_before( b );
-}
-
-template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_SP_NOEXCEPT
-{
- a.swap(b);
-}
-
-template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
-{
- (void) static_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = static_cast< E* >( r.get() );
- return shared_ptr<T>( r, p );
-}
-
-template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
-{
- (void) const_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = const_cast< E* >( r.get() );
- return shared_ptr<T>( r, p );
-}
-
-template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
-{
- (void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = dynamic_cast< E* >( r.get() );
- return p? shared_ptr<T>( r, p ): shared_ptr<T>();
-}
-
-template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
-{
- (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = reinterpret_cast< E* >( r.get() );
- return shared_ptr<T>( r, p );
-}
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
-template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
-{
- (void) static_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = static_cast< E* >( r.get() );
- return shared_ptr<T>( std::move(r), p );
-}
-
-template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
-{
- (void) const_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = const_cast< E* >( r.get() );
- return shared_ptr<T>( std::move(r), p );
-}
-
-template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
-{
- (void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = dynamic_cast< E* >( r.get() );
- return p? shared_ptr<T>( std::move(r), p ): shared_ptr<T>();
-}
-
-template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
-{
- (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
-
- typedef typename shared_ptr<T>::element_type E;
-
- E * p = reinterpret_cast< E* >( r.get() );
- return shared_ptr<T>( std::move(r), p );
-}
-
-#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
-// get_pointer() enables boost::mem_fn to recognize shared_ptr
-
-template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_SP_NOEXCEPT
-{
- return p.get();
-}
-
-// operator<<
-
-#if !defined(BOOST_NO_IOSTREAM)
-
-#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) )
-
-template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
-{
- os << p.get();
- return os;
-}
-
-#else
-
-// in STLport's no-iostreams mode no iostream symbols can be used
-#ifndef _STLP_NO_IOSTREAMS
-
-# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT)
-// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL
-using std::basic_ostream;
-template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p)
-# else
-template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
-# endif
-{
- os << p.get();
- return os;
-}
-
-#endif // _STLP_NO_IOSTREAMS
-
-#endif // __GNUC__ < 3
-
-#endif // !defined(BOOST_NO_IOSTREAM)
-
-// get_deleter
-
-namespace detail
-{
-
-template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) );
-}
-
-template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
-template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
-
-class esft2_deleter_wrapper
-{
-private:
-
- shared_ptr<void const volatile> deleter_;
-
-public:
-
- esft2_deleter_wrapper()
- {
- }
-
- template< class T > void set_deleter( shared_ptr<T> const & deleter ) BOOST_SP_NOEXCEPT
- {
- deleter_ = deleter;
- }
-
- template<typename D> D* get_deleter() const BOOST_SP_NOEXCEPT
- {
- return boost::detail::basic_get_deleter<D>( deleter_ );
- }
-
- template< class T> void operator()( T* ) BOOST_SP_NOEXCEPT_WITH_ASSERT
- {
- BOOST_ASSERT( deleter_.use_count() <= 1 );
- deleter_.reset();
- }
-};
-
-} // namespace detail
-
-template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- D * d = boost::detail::basic_get_deleter<D>( p );
-
- if( d == 0 )
- {
- d = boost::detail::basic_get_local_deleter( d, p );
- }
-
- if( d == 0 )
- {
- boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
-// The following get_deleter method call is fully qualified because
-// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter<D>()
- if(del_wrapper) d = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
- }
-
- return d;
-}
-
-// atomic access
-
-#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
-
-template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_SP_NOEXCEPT
-{
- return false;
-}
-
-template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p ) BOOST_SP_NOEXCEPT
-{
- boost::detail::spinlock_pool<2>::scoped_lock lock( p );
- return *p;
-}
-
-template<class T, class M> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, /*memory_order mo*/ M ) BOOST_SP_NOEXCEPT
-{
- return atomic_load( p );
-}
-
-template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r ) BOOST_SP_NOEXCEPT
-{
- boost::detail::spinlock_pool<2>::scoped_lock lock( p );
- p->swap( r );
-}
-
-template<class T, class M> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ M ) BOOST_SP_NOEXCEPT
-{
- atomic_store( p, r ); // std::move( r )
-}
-
-template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r ) BOOST_SP_NOEXCEPT
-{
- boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
-
- sp.lock();
- p->swap( r );
- sp.unlock();
-
- return r; // return std::move( r )
-}
-
-template<class T, class M> shared_ptr<T> inline atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ M ) BOOST_SP_NOEXCEPT
-{
- return atomic_exchange( p, r ); // std::move( r )
-}
-
-template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w ) BOOST_SP_NOEXCEPT
-{
- boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
-
- sp.lock();
-
- if( p->_internal_equiv( *v ) )
- {
- p->swap( w );
-
- sp.unlock();
-
- return true;
- }
- else
- {
- shared_ptr<T> tmp( *p );
-
- sp.unlock();
-
- tmp.swap( *v );
- return false;
- }
-}
-
-template<class T, class M> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, /*memory_order success*/ M, /*memory_order failure*/ M ) BOOST_SP_NOEXCEPT
-{
- return atomic_compare_exchange( p, v, w ); // std::move( w )
-}
-
-#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS)
-
-// hash_value
-
-template< class T > struct hash;
-
-template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- return boost::hash< typename boost::shared_ptr<T>::element_type* >()( p.get() );
-}
-
-} // namespace boost
-
-#include <boost/smart_ptr/detail/local_sp_deleter.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
-}
-
-template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
-{
- return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#if defined( BOOST_SP_DISABLE_DEPRECATED )
-#pragma GCC diagnostic pop
-#endif
-
-#endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 38548770ebb..00000000000
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner.hpp
+++ /dev/null
@@ -1,329 +0,0 @@
-/*=============================================================================
- Copyright (c) 1998-2002 Joel de Guzman
- 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(BOOST_SPIRIT_SCANNER_HPP)
-#define BOOST_SPIRIT_SCANNER_HPP
-
-#include <iterator>
-#include <boost/config.hpp>
-#include <boost/spirit/home/classic/namespace.hpp>
-#include <boost/spirit/home/classic/core/match.hpp>
-#include <boost/spirit/home/classic/core/non_terminal/parser_id.hpp>
-#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits
-
-#include <boost/spirit/home/classic/core/scanner/scanner_fwd.hpp>
-
-namespace boost { namespace spirit {
-
-BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // iteration_policy class
- //
- ///////////////////////////////////////////////////////////////////////////
- struct iteration_policy
- {
- template <typename ScannerT>
- void
- advance(ScannerT const& scan) const
- {
- ++scan.first;
- }
-
- template <typename ScannerT>
- bool at_end(ScannerT const& scan) const
- {
- return scan.first == scan.last;
- }
-
- template <typename T>
- T filter(T ch) const
- {
- return ch;
- }
-
- template <typename ScannerT>
- typename ScannerT::ref_t
- get(ScannerT const& scan) const
- {
- return *scan.first;
- }
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // match_policy class
- //
- ///////////////////////////////////////////////////////////////////////////
- struct match_policy
- {
- template <typename T>
- struct result { typedef match<T> type; };
-
- const match<nil_t>
- no_match() const
- {
- return match<nil_t>();
- }
-
- const match<nil_t>
- empty_match() const
- {
- return match<nil_t>(0, nil_t());
- }
-
- template <typename AttrT, typename IteratorT>
- match<AttrT>
- create_match(
- std::size_t length,
- AttrT const& val,
- IteratorT const& /*first*/,
- IteratorT const& /*last*/) const
- {
- return match<AttrT>(length, val);
- }
-
- template <typename MatchT, typename IteratorT>
- void group_match(
- MatchT& /*m*/,
- parser_id const& /*id*/,
- IteratorT const& /*first*/,
- IteratorT const& /*last*/) const {}
-
- template <typename Match1T, typename Match2T>
- void concat_match(Match1T& l, Match2T const& r) const
- {
- l.concat(r);
- }
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // match_result class
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename MatchPolicyT, typename T>
- struct match_result
- {
- typedef typename MatchPolicyT::template result<T>::type type;
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // action_policy class
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename AttrT>
- struct attributed_action_policy
- {
- template <typename ActorT, typename IteratorT>
- static void
- call(
- ActorT const& actor,
- AttrT& val,
- IteratorT const&,
- IteratorT const&)
- {
- actor(val);
- }
- };
-
- //////////////////////////////////
- template <>
- struct attributed_action_policy<nil_t>
- {
- template <typename ActorT, typename IteratorT>
- static void
- call(
- ActorT const& actor,
- nil_t,
- IteratorT const& first,
- IteratorT const& last)
- {
- actor(first, last);
- }
- };
-
- //////////////////////////////////
- struct action_policy
- {
- template <typename ActorT, typename AttrT, typename IteratorT>
- void
- do_action(
- ActorT const& actor,
- AttrT& val,
- IteratorT const& first,
- IteratorT const& last) const
- {
- attributed_action_policy<AttrT>::call(actor, val, first, last);
- }
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // scanner_policies class
- //
- ///////////////////////////////////////////////////////////////////////////
- template <
- typename IterationPolicyT,
- typename MatchPolicyT,
- typename ActionPolicyT>
- struct scanner_policies :
- public IterationPolicyT,
- public MatchPolicyT,
- public ActionPolicyT
- {
- typedef IterationPolicyT iteration_policy_t;
- typedef MatchPolicyT match_policy_t;
- typedef ActionPolicyT action_policy_t;
-
- scanner_policies(
- IterationPolicyT const& i_policy = IterationPolicyT(),
- MatchPolicyT const& m_policy = MatchPolicyT(),
- ActionPolicyT const& a_policy = ActionPolicyT())
- : IterationPolicyT(i_policy)
- , MatchPolicyT(m_policy)
- , ActionPolicyT(a_policy) {}
-
- template <typename ScannerPoliciesT>
- scanner_policies(ScannerPoliciesT const& policies)
- : IterationPolicyT(policies)
- , MatchPolicyT(policies)
- , ActionPolicyT(policies) {}
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // scanner_policies_base class: the base class of all scanners
- //
- ///////////////////////////////////////////////////////////////////////////
- struct scanner_base {};
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // scanner class
- //
- ///////////////////////////////////////////////////////////////////////////
- template <
- typename IteratorT,
- typename PoliciesT>
- class scanner : public PoliciesT, public scanner_base
- {
- public:
-
- typedef IteratorT iterator_t;
- typedef PoliciesT policies_t;
-
- typedef typename boost::detail::
- iterator_traits<IteratorT>::value_type value_t;
- typedef typename boost::detail::
- iterator_traits<IteratorT>::reference ref_t;
- typedef typename boost::
- call_traits<IteratorT>::param_type iter_param_t;
-
- scanner(
- IteratorT& first_,
- iter_param_t last_,
- PoliciesT const& policies = PoliciesT())
- : PoliciesT(policies), first(first_), last(last_)
- {
- at_end();
- }
-
- scanner(scanner const& other)
- : PoliciesT(other), first(other.first), last(other.last) {}
-
- scanner(scanner const& other, IteratorT& first_)
- : PoliciesT(other), first(first_), last(other.last) {}
-
- template <typename PoliciesT1>
- scanner(scanner<IteratorT, PoliciesT1> const& other)
- : PoliciesT(other), first(other.first), last(other.last) {}
-
- bool
- at_end() const
- {
- typedef typename PoliciesT::iteration_policy_t iteration_policy_type;
- return iteration_policy_type::at_end(*this);
- }
-
- value_t
- operator*() const
- {
- typedef typename PoliciesT::iteration_policy_t iteration_policy_type;
- return iteration_policy_type::filter(iteration_policy_type::get(*this));
- }
-
- scanner const&
- operator++() const
- {
- typedef typename PoliciesT::iteration_policy_t iteration_policy_type;
- iteration_policy_type::advance(*this);
- return *this;
- }
-
- template <typename PoliciesT2>
- struct rebind_policies
- {
- typedef scanner<IteratorT, PoliciesT2> type;
- };
-
- template <typename PoliciesT2>
- scanner<IteratorT, PoliciesT2>
- change_policies(PoliciesT2 const& policies) const
- {
- return scanner<IteratorT, PoliciesT2>(first, last, policies);
- }
-
- template <typename IteratorT2>
- struct rebind_iterator
- {
- typedef scanner<IteratorT2, PoliciesT> type;
- };
-
- template <typename IteratorT2>
- scanner<IteratorT2, PoliciesT>
- change_iterator(IteratorT2 const& first_, IteratorT2 const &last_) const
- {
- return scanner<IteratorT2, PoliciesT>(first_, last_, *this);
- }
-
- IteratorT& first;
- IteratorT const last;
-
- private:
-
- scanner&
- operator=(scanner const& other);
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // rebind_scanner_policies class
- //
- ///////////////////////////////////////////////////////////////////////////
- template <typename ScannerT, typename PoliciesT>
- struct rebind_scanner_policies
- {
- typedef typename ScannerT::template
- rebind_policies<PoliciesT>::type type;
- };
-
- //////////////////////////////////
- template <typename ScannerT, typename IteratorT>
- struct rebind_scanner_iterator
- {
- typedef typename ScannerT::template
- rebind_iterator<IteratorT>::type type;
- };
-
-BOOST_SPIRIT_CLASSIC_NAMESPACE_END
-
-}}
-
-#endif
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
deleted file mode 100644
index f95532c5a3a..00000000000
--- a/src/third_party/boost-1.69.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 0x1810
-#define SPIRIT_PIZZA_VERSION SPIRIT_MEGA_VEGGI // :-)
-
-#endif // defined(SPIRIT_VERSION_HPP)
diff --git a/src/third_party/boost-1.69.0/boost/static_assert.hpp b/src/third_party/boost-1.69.0/boost/static_assert.hpp
deleted file mode 100644
index 07d461d492b..00000000000
--- a/src/third_party/boost-1.69.0/boost/static_assert.hpp
+++ /dev/null
@@ -1,180 +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/static_assert for documentation.
-
-/*
- Revision history:
- 02 August 2000
- Initial version.
-*/
-
-#ifndef BOOST_STATIC_ASSERT_HPP
-#define BOOST_STATIC_ASSERT_HPP
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.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
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
-# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
-# else
-# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg )
-# endif
-#else
-# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
-#endif
-
-#ifdef __BORLANDC__
-//
-// workaround for buggy integral-constant expression support:
-#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
-#endif
-
-#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4))
-// gcc 3.3 and 3.4 don't produce good error messages with the default version:
-# define BOOST_SA_GCC_WORKAROUND
-#endif
-
-//
-// If the compiler issues warnings about old C style casts,
-// then enable this:
-//
-#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)))
-# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true)
-# else
-# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true)
-# endif
-#else
-# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__)
-# else
-# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
-# endif
-#endif
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
-# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
-# else
-# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
-# endif
-#else
-
-namespace boost{
-
-// HP aCC cannot deal with missing names for template value parameters
-template <bool x> struct STATIC_ASSERTION_FAILURE;
-
-template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
-
-// HP aCC cannot deal with missing names for template value parameters
-template<int x> struct static_assert_test{};
-
-}
-
-//
-// Implicit instantiation requires that all member declarations be
-// instantiated, but that the definitions are *not* instantiated.
-//
-// It's not particularly clear how this applies to enum's or typedefs;
-// both are described as declarations [7.1.3] and [7.2] in the standard,
-// however some compilers use "delayed evaluation" of one or more of
-// these when implicitly instantiating templates. We use typedef declarations
-// by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum
-// version gets better results from your compiler...
-//
-// Implementation:
-// Both of these versions rely on sizeof(incomplete_type) generating an error
-// message containing the name of the incomplete type. We use
-// "STATIC_ASSERTION_FAILURE" as the type name here to generate
-// an eye catching error message. The result of the sizeof expression is either
-// used as an enum initialiser, or as a template argument depending which version
-// is in use...
-// Note that the argument to the assert is explicitly cast to bool using old-
-// style casts: too many compilers currently have problems with static_cast
-// when used inside integral constant expressions.
-//
-#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS)
-
-#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
-#define BOOST_STATIC_ASSERT( B ) \
- typedef ::boost::static_assert_test<\
- sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\
- BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
-#elif defined(BOOST_MSVC)
-#define BOOST_STATIC_ASSERT(...) \
- typedef ::boost::static_assert_test<\
- sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\
- BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
-#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
-// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
-// instead of warning in case of failure
-# define BOOST_STATIC_ASSERT( B ) \
- typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
- [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ]
-#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS)
-// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
-// instead of warning in case of failure
-# define BOOST_STATIC_ASSERT(...) \
- typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
- [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ]
-#elif defined(__sgi)
-// special version for SGI MIPSpro compiler
-#define BOOST_STATIC_ASSERT( B ) \
- BOOST_STATIC_CONSTANT(bool, \
- BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \
- typedef ::boost::static_assert_test<\
- sizeof(::boost::STATIC_ASSERTION_FAILURE< \
- BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\
- BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
-#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
-// special version for CodeWarrior <= 8.x
-#define BOOST_STATIC_ASSERT( B ) \
- BOOST_STATIC_CONSTANT(int, \
- BOOST_JOIN(boost_static_assert_test_, __LINE__) = \
- sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) )
-#else
-// generic version
-# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_STATIC_ASSERT( ... ) \
- typedef ::boost::static_assert_test<\
- sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\
- BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
-# else
-# define BOOST_STATIC_ASSERT( B ) \
- typedef ::boost::static_assert_test<\
- sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\
- BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
-# endif
-#endif
-
-#else
-// alternative enum based implementation:
-# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_STATIC_ASSERT( ... ) \
- enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
- = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) }
-# else
-# define BOOST_STATIC_ASSERT(B) \
- enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
- = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
-# endif
-#endif
-#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
-
-#endif // BOOST_STATIC_ASSERT_HPP
-
-
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
deleted file mode 100644
index 8a86e8180ea..00000000000
--- a/src/third_party/boost-1.69.0/boost/system/detail/system_category_win32.hpp
+++ /dev/null
@@ -1,324 +0,0 @@
-// 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
deleted file mode 100644
index d0c27353ad4..00000000000
--- a/src/third_party/boost-1.69.0/boost/system/error_code.hpp
+++ /dev/null
@@ -1,956 +0,0 @@
-#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/test/detail/config.hpp b/src/third_party/boost-1.69.0/boost/test/detail/config.hpp
deleted file mode 100644
index db9b5d2b928..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/detail/config.hpp
+++ /dev/null
@@ -1,127 +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 a central place for global configuration switches
-// ***************************************************************************
-
-#ifndef BOOST_TEST_CONFIG_HPP_071894GER
-#define BOOST_TEST_CONFIG_HPP_071894GER
-
-// Boost
-#include <boost/config.hpp> // compilers workarounds
-#include <boost/detail/workaround.hpp>
-
-#if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) && \
- (!defined(__COMO__) && !defined(__MWERKS__) && !defined(__GNUC__) || \
- BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
-# define BOOST_SEH_BASED_SIGNAL_HANDLING
-#endif
-
-#if defined(__COMO__) && defined(_MSC_VER)
-// eh.h uses type_info without declaring it.
-class type_info;
-# define BOOST_SEH_BASED_SIGNAL_HANDLING
-#endif
-
-//____________________________________________________________________________//
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) || \
- BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
- (defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
-# define BOOST_TEST_SHIFTED_LINE
-#endif
-
-//____________________________________________________________________________//
-
-#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
-# define BOOST_TEST_CALL_DECL __cdecl
-#else
-# define BOOST_TEST_CALL_DECL /**/
-#endif
-
-//____________________________________________________________________________//
-
-#if !defined(BOOST_NO_STD_LOCALE) && !defined(__MWERKS__)
-# define BOOST_TEST_USE_STD_LOCALE 1
-#endif
-
-//____________________________________________________________________________//
-
-#if BOOST_WORKAROUND(__BORLANDC__, <= 0x570) || \
- BOOST_WORKAROUND( __COMO__, <= 0x433 ) || \
- BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 ) || \
- defined(__sgi) && _COMPILER_VERSION <= 730 || \
- BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
- defined(__DECCXX) || \
- defined(__DMC__)
-# define BOOST_TEST_NO_PROTECTED_USING
-#endif
-
-//____________________________________________________________________________//
-
-#if defined(__GNUC__) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
-#define BOOST_TEST_PROTECTED_VIRTUAL virtual
-#else
-#define BOOST_TEST_PROTECTED_VIRTUAL
-#endif
-
-//____________________________________________________________________________//
-
-#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
-#define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
-#endif
-
-//____________________________________________________________________________//
-
-#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
-# define BOOST_TEST_DYN_LINK
-#endif
-
-#if defined(BOOST_TEST_INCLUDED)
-# undef BOOST_TEST_DYN_LINK
-#endif
-
-#if defined(BOOST_TEST_DYN_LINK)
-# define BOOST_TEST_ALTERNATIVE_INIT_API
-
-# ifdef BOOST_TEST_SOURCE
-# define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT
-# else
-# define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT
-# endif // BOOST_TEST_SOURCE
-#else
-# define BOOST_TEST_DECL
-#endif
-
-#if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
-#define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
-#endif
-
-#if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
-#define BOOST_TEST_MAIN BOOST_TEST_MODULE
-#endif
-
-
-
-#ifndef BOOST_PP_VARIADICS /* we can change this only if not already defined) */
-
-#ifdef __PGI
-#define BOOST_PP_VARIADICS 1
-#endif
-
-#if BOOST_CLANG
-#define BOOST_PP_VARIADICS 1
-#endif
-
-#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 8 * 100)
-#define BOOST_PP_VARIADICS 1
-#endif
-
-#endif /* ifndef BOOST_PP_VARIADICS */
-
-#endif // BOOST_TEST_CONFIG_HPP_071894GER
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp b/src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp
deleted file mode 100644
index d5c97fb7062..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp
+++ /dev/null
@@ -1,46 +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 forward eclarations for Boost.Test data types
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FWD_DECL_HPP_011605GER
-#define BOOST_TEST_FWD_DECL_HPP_011605GER
-
-namespace boost {
-
-class execution_monitor;
-class execution_exception;
-
-namespace unit_test {
-
-class test_unit;
-class test_case;
-class test_suite;
-class master_test_suite_t;
-
-class test_tree_visitor;
-class test_observer;
-class test_unit_fixture;
-
-// singletons
-class unit_test_monitor_t;
-class unit_test_log_t;
-
-class unit_test_log_formatter;
-struct log_entry_data;
-struct log_checkpoint_data;
-
-class lazy_ostream;
-
-} // namespace unit_test
-
-} // namespace boost
-
-#endif // BOOST_TEST_FWD_DECL_HPP_011605GER
-
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
deleted file mode 100644
index ae932a45149..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/detail/global_typedef.hpp
+++ /dev/null
@@ -1,145 +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;
-
-//____________________________________________________________________________//
-
-// 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.69.0/boost/test/detail/log_level.hpp b/src/third_party/boost-1.69.0/boost/test/detail/log_level.hpp
deleted file mode 100644
index abdecea7ec9..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/detail/log_level.hpp
+++ /dev/null
@@ -1,40 +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 shared definition for unit test log levels
-// ***************************************************************************
-
-#ifndef BOOST_TEST_LOG_LEVEL_HPP_011605GER
-#define BOOST_TEST_LOG_LEVEL_HPP_011605GER
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** log levels ************** //
-// ************************************************************************** //
-
-// each log level includes all subsequent higher loging levels
-enum log_level {
- invalid_log_level = -1,
- log_successful_tests = 0,
- log_test_units = 1,
- log_messages = 2,
- log_warnings = 3,
- log_all_errors = 4, // reported by unit test macros
- log_cpp_exception_errors = 5, // uncaught C++ exceptions
- log_system_errors = 6, // including timeouts, signals, traps
- log_fatal_errors = 7, // including unit test macros or
- // fatal system errors
- log_nothing = 8
-};
-
-} // namespace unit_test
-} // namespace boost
-
-#endif // BOOST_TEST_LOG_LEVEL_HPP_011605GER
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp
deleted file mode 100644
index 4ba3a7e9346..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp
+++ /dev/null
@@ -1,56 +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 mics. workarounds
-// ***************************************************************************
-
-#ifndef BOOST_TEST_WORKAROUND_HPP_021005GER
-#define BOOST_TEST_WORKAROUND_HPP_021005GER
-
-// Boost
-#include <boost/config.hpp> // compilers workarounds and std::ptrdiff_t
-
-// STL
-#include <iterator> // for std::distance
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace ut_detail {
-
-#ifdef BOOST_NO_STD_DISTANCE
-template <class T>
-std::ptrdiff_t distance( T const& x_, T const& y_ )
-{
- std::ptrdiff_t res = 0;
-
- std::distance( x_, y_, res );
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-#else
-using std::distance;
-#endif
-
-template <class T> inline void ignore_unused_variable_warning(const T&) {}
-
-} // namespace ut_detail
-} // namespace unit_test
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_WORKAROUND_HPP_021005GER
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
deleted file mode 100644
index bda732b9802..00000000000
--- a/src/third_party/boost-1.69.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_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.69.0/boost/test/framework.hpp b/src/third_party/boost-1.69.0/boost/test/framework.hpp
deleted file mode 100644
index 2f446791aae..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/framework.hpp
+++ /dev/null
@@ -1,301 +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/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
deleted file mode 100644
index cd7de1fe766..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/compiler_log_formatter.ipp
+++ /dev/null
@@ -1,293 +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 );
- 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.69.0/boost/test/impl/debug.ipp b/src/third_party/boost-1.69.0/boost/test/impl/debug.ipp
deleted file mode 100644
index a5e5f6da06d..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/debug.ipp
+++ /dev/null
@@ -1,1009 +0,0 @@
-// (C) Copyright Gennadiy Rozental 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 : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : debug interfaces implementation
-// ***************************************************************************
-
-#ifndef BOOST_TEST_DEBUG_API_IPP_112006GER
-#define BOOST_TEST_DEBUG_API_IPP_112006GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/workaround.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-
-#include <boost/test/debug.hpp>
-#include <boost/test/debug_config.hpp>
-
-// Implementation on Windows
-#if defined(_WIN32) && !defined(UNDER_CE) && !defined(BOOST_DISABLE_WIN32) // ******* WIN32
-
-# define BOOST_WIN32_BASED_DEBUG
-
-// SYSTEM API
-# include <windows.h>
-# include <winreg.h>
-# include <cstdio>
-# include <cstring>
-
-# if !defined(NDEBUG) && defined(_MSC_VER)
-# define BOOST_MS_CRT_BASED_DEBUG
-# include <crtdbg.h>
-# endif
-
-
-# ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::memset; using ::sprintf; }
-# endif
-
-#elif defined(unix) || defined(__unix) // ********************* UNIX
-
-# define BOOST_UNIX_BASED_DEBUG
-
-// Boost.Test
-#include <boost/test/utils/class_properties.hpp>
-#include <boost/test/utils/algorithm.hpp>
-
-// STL
-#include <cstring> // std::memcpy
-#include <map>
-#include <cstdio>
-#include <stdarg.h> // !! ?? cstdarg
-
-// SYSTEM API
-# include <unistd.h>
-# include <signal.h>
-# include <fcntl.h>
-
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <sys/wait.h>
-# include <sys/time.h>
-# include <stdio.h>
-# include <stdlib.h>
-
-# if defined(sun) || defined(__sun)
-
-# define BOOST_SUN_BASED_DEBUG
-
-# ifndef BOOST_TEST_DBG_LIST
-# define BOOST_TEST_DBG_LIST dbx;gdb
-# endif
-
-# define BOOST_TEST_CNL_DBG dbx
-# define BOOST_TEST_GUI_DBG dbx-ddd
-
-# include <procfs.h>
-
-# elif defined(linux) || defined(__linux)
-
-# define BOOST_LINUX_BASED_DEBUG
-
-# include <sys/ptrace.h>
-
-# ifndef BOOST_TEST_STAT_LINE_MAX
-# define BOOST_TEST_STAT_LINE_MAX 500
-# endif
-
-# ifndef BOOST_TEST_DBG_LIST
-# define BOOST_TEST_DBG_LIST gdb
-# endif
-
-# define BOOST_TEST_CNL_DBG gdb
-# define BOOST_TEST_GUI_DBG gdb-xterm
-
-# endif
-
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace debug {
-
-using unit_test::const_string;
-
-// ************************************************************************** //
-// ************** debug::info_t ************** //
-// ************************************************************************** //
-
-namespace {
-
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
-
-template<typename T>
-inline void
-dyn_symbol( T& res, char const* module_name, char const* symbol_name )
-{
- HMODULE m = ::GetModuleHandleA( module_name );
-
- if( !m )
- m = ::LoadLibraryA( module_name );
-
- res = reinterpret_cast<T>( ::GetProcAddress( m, symbol_name ) );
-}
-
-//____________________________________________________________________________//
-
-static struct info_t {
- typedef BOOL (WINAPI* IsDebuggerPresentT)();
- typedef LONG (WINAPI* RegQueryValueExT)( HKEY, char const* /*LPTSTR*/, LPDWORD, LPDWORD, LPBYTE, LPDWORD );
- typedef LONG (WINAPI* RegOpenKeyT)( HKEY, char const* /*LPCTSTR*/, PHKEY );
- typedef LONG (WINAPI* RegCloseKeyT)( HKEY );
-
- info_t();
-
- IsDebuggerPresentT m_is_debugger_present;
- RegOpenKeyT m_reg_open_key;
- RegQueryValueExT m_reg_query_value;
- RegCloseKeyT m_reg_close_key;
-
-} s_info;
-
-//____________________________________________________________________________//
-
-info_t::info_t()
-{
- dyn_symbol( m_is_debugger_present, "kernel32", "IsDebuggerPresent" );
- dyn_symbol( m_reg_open_key, "advapi32", "RegOpenKeyA" );
- dyn_symbol( m_reg_query_value, "advapi32", "RegQueryValueExA" );
- dyn_symbol( m_reg_close_key, "advapi32", "RegCloseKey" );
-}
-
-//____________________________________________________________________________//
-
-#elif defined(BOOST_UNIX_BASED_DEBUG)
-
-// ************************************************************************** //
-// ************** fd_holder ************** //
-// ************************************************************************** //
-
-struct fd_holder {
- explicit fd_holder( int fd ) : m_fd( fd ) {}
- ~fd_holder()
- {
- if( m_fd != -1 )
- ::close( m_fd );
- }
-
- operator int() { return m_fd; }
-
-private:
- // Data members
- int m_fd;
-};
-
-
-// ************************************************************************** //
-// ************** process_info ************** //
-// ************************************************************************** //
-
-struct process_info {
- // Constructor
- explicit process_info( int pid );
-
- // access methods
- int parent_pid() const { return m_parent_pid; }
- const_string binary_name() const { return m_binary_name; }
- const_string binary_path() const { return m_binary_path; }
-
-private:
- // Data members
- int m_parent_pid;
- const_string m_binary_name;
- const_string m_binary_path;
-
-#if defined(BOOST_SUN_BASED_DEBUG)
- struct psinfo m_psi;
- char m_binary_path_buff[500+1]; // !! ??
-#elif defined(BOOST_LINUX_BASED_DEBUG)
- char m_stat_line[BOOST_TEST_STAT_LINE_MAX+1];
- char m_binary_path_buff[500+1]; // !! ??
-#endif
-};
-
-//____________________________________________________________________________//
-
-process_info::process_info( int pid )
-: m_parent_pid( 0 )
-{
-#if defined(BOOST_SUN_BASED_DEBUG)
- char fname_buff[30];
-
- ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/psinfo", pid );
-
- fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) );
-
- if( psinfo_fd == -1 )
- return;
-
- if( ::read( psinfo_fd, &m_psi, sizeof(m_psi) ) == -1 )
- return;
-
- m_parent_pid = m_psi.pr_ppid;
-
- m_binary_name.assign( m_psi.pr_fname );
-
- //-------------------------- //
-
- ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/as", pid );
-
- fd_holder as_fd( ::open( fname_buff, O_RDONLY ) );
- uintptr_t binary_name_pos;
-
- // !! ?? could we avoid reading whole m_binary_path_buff?
- if( as_fd == -1 ||
- ::lseek( as_fd, m_psi.pr_argv, SEEK_SET ) == -1 ||
- ::read ( as_fd, &binary_name_pos, sizeof(binary_name_pos) ) == -1 ||
- ::lseek( as_fd, binary_name_pos, SEEK_SET ) == -1 ||
- ::read ( as_fd, m_binary_path_buff, sizeof(m_binary_path_buff) ) == -1 )
- return;
-
- m_binary_path.assign( m_binary_path_buff );
-
-#elif defined(BOOST_LINUX_BASED_DEBUG)
- char fname_buff[30];
-
- ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/stat", pid );
-
- fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) );
-
- if( psinfo_fd == -1 )
- return;
-
- ssize_t num_read = ::read( psinfo_fd, m_stat_line, sizeof(m_stat_line)-1 );
- if( num_read == -1 )
- return;
-
- m_stat_line[num_read] = 0;
-
- char const* name_beg = m_stat_line;
- while( *name_beg && *name_beg != '(' )
- ++name_beg;
-
- char const* name_end = name_beg+1;
- while( *name_end && *name_end != ')' )
- ++name_end;
-
- std::sscanf( name_end+1, "%*s%d", &m_parent_pid );
-
- m_binary_name.assign( name_beg+1, name_end );
-
- ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/exe", pid );
- num_read = ::readlink( fname_buff, m_binary_path_buff, sizeof(m_binary_path_buff)-1 );
-
- if( num_read == -1 )
- return;
-
- m_binary_path_buff[num_read] = 0;
- m_binary_path.assign( m_binary_path_buff, num_read );
-#endif
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** prepare_window_title ************** //
-// ************************************************************************** //
-
-static char*
-prepare_window_title( dbg_startup_info const& dsi )
-{
- typedef unit_test::const_string str_t;
-
- static char title_str[50];
-
- str_t path_sep( "\\/" );
-
- str_t::iterator it = unit_test::utils::find_last_of( dsi.binary_path.begin(), dsi.binary_path.end(),
- path_sep.begin(), path_sep.end() );
-
- if( it == dsi.binary_path.end() )
- it = dsi.binary_path.begin();
- else
- ++it;
-
- ::snprintf( title_str, sizeof(title_str), "%*s %ld", (int)(dsi.binary_path.end()-it), it, dsi.pid );
-
- return title_str;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** save_execlp ************** //
-// ************************************************************************** //
-
-typedef unit_test::basic_cstring<char> mbuffer;
-
-inline char*
-copy_arg( mbuffer& dest, const_string arg )
-{
- if( dest.size() < arg.size()+1 )
- return 0;
-
- char* res = dest.begin();
-
- std::memcpy( res, arg.begin(), arg.size()+1 );
-
- dest.trim_left( arg.size()+1 );
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-bool
-safe_execlp( char const* file, ... )
-{
- static char* argv_buff[200];
-
- va_list args;
- char const* arg;
-
- // first calculate actual number of arguments
- int num_args = 2; // file name and 0 at least
-
- va_start( args, file );
- while( !!(arg = va_arg( args, char const* )) )
- num_args++;
- va_end( args );
-
- // reserve space for the argument pointers array
- char** argv_it = argv_buff;
- mbuffer work_buff( reinterpret_cast<char*>(argv_buff), sizeof(argv_buff) );
- work_buff.trim_left( num_args * sizeof(char*) );
-
- // copy all the argument values into local storage
- if( !(*argv_it++ = copy_arg( work_buff, file )) )
- return false;
-
- printf( "!! %s\n", file );
-
- va_start( args, file );
- while( !!(arg = va_arg( args, char const* )) ) {
- printf( "!! %s\n", arg );
- if( !(*argv_it++ = copy_arg( work_buff, arg )) ) {
- va_end( args );
- return false;
- }
- }
- va_end( args );
-
- *argv_it = 0;
-
- return ::execvp( file, argv_buff ) != -1;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** start_debugger_in_emacs ************** //
-// ************************************************************************** //
-
-static void
-start_debugger_in_emacs( dbg_startup_info const& dsi, char const* emacs_name, char const* dbg_command )
-{
- char const* title = prepare_window_title( dsi );
-
- if( !title )
- return;
-
- dsi.display.is_empty()
- ? safe_execlp( emacs_name, "-title", title, "--eval", dbg_command, 0 )
- : safe_execlp( emacs_name, "-title", title, "-display", dsi.display.begin(), "--eval", dbg_command, 0 );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** gdb starters ************** //
-// ************************************************************************** //
-
-static char const*
-prepare_gdb_cmnd_file( dbg_startup_info const& dsi )
-{
- // prepare pid value
- char pid_buff[16];
- ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
- unit_test::const_string pid_str( pid_buff );
-
- static char cmd_file_name[] = "/tmp/btl_gdb_cmd_XXXXXX"; // !! ??
-
- // prepare commands
- fd_holder cmd_fd( ::mkstemp( cmd_file_name ) );
-
- if( cmd_fd == -1 )
- return 0;
-
-#define WRITE_STR( str ) if( ::write( cmd_fd, str.begin(), str.size() ) == -1 ) return 0;
-#define WRITE_CSTR( str ) if( ::write( cmd_fd, str, sizeof( str )-1 ) == -1 ) return 0;
-
- WRITE_CSTR( "file " );
- WRITE_STR( dsi.binary_path );
- WRITE_CSTR( "\nattach " );
- WRITE_STR( pid_str );
- WRITE_CSTR( "\nshell unlink " );
- WRITE_STR( dsi.init_done_lock );
- WRITE_CSTR( "\ncont" );
- if( dsi.break_or_continue )
- WRITE_CSTR( "\nup 4" );
-
- WRITE_CSTR( "\necho \\n" ); // !! ??
- WRITE_CSTR( "\nlist -" );
- WRITE_CSTR( "\nlist" );
- WRITE_CSTR( "\nshell unlink " );
- WRITE_CSTR( cmd_file_name );
-
- return cmd_file_name;
-}
-
-//____________________________________________________________________________//
-
-static void
-start_gdb_in_console( dbg_startup_info const& dsi )
-{
- char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
-
- if( !cmnd_file_name )
- return;
-
- safe_execlp( "gdb", "-q", "-x", cmnd_file_name, 0 );
-}
-
-//____________________________________________________________________________//
-
-static void
-start_gdb_in_xterm( dbg_startup_info const& dsi )
-{
- char const* title = prepare_window_title( dsi );
- char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
-
- if( !title || !cmnd_file_name )
- return;
-
- safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(),
- "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e",
- "gdb", "-q", "-x", cmnd_file_name, 0 );
-}
-
-//____________________________________________________________________________//
-
-static void
-start_gdb_in_emacs( dbg_startup_info const& dsi )
-{
- char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
- if( !cmnd_file_name )
- return;
-
- char dbg_cmd_buff[500]; // !! ??
- ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (gdb \"gdb -q -x %s\"))", cmnd_file_name );
-
- start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff );
-}
-
-//____________________________________________________________________________//
-
-static void
-start_gdb_in_xemacs( dbg_startup_info const& )
-{
- // !! ??
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** dbx starters ************** //
-// ************************************************************************** //
-
-static char const*
-prepare_dbx_cmd_line( dbg_startup_info const& dsi, bool list_source = true )
-{
- static char cmd_line_buff[500]; // !! ??
-
- ::snprintf( cmd_line_buff, sizeof(cmd_line_buff), "unlink %s;cont;%s%s",
- dsi.init_done_lock.begin(),
- dsi.break_or_continue ? "up 2;": "",
- list_source ? "echo \" \";list -w3;" : "" );
-
- return cmd_line_buff;
-}
-
-//____________________________________________________________________________//
-
-static void
-start_dbx_in_console( dbg_startup_info const& dsi )
-{
- char pid_buff[16];
- ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
-
- safe_execlp( "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 );
-}
-
-//____________________________________________________________________________//
-
-static void
-start_dbx_in_xterm( dbg_startup_info const& dsi )
-{
- char const* title = prepare_window_title( dsi );
- if( !title )
- return;
-
- char pid_buff[16]; // !! ??
- ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
-
- safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(),
- "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e",
- "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 );
-}
-
-//____________________________________________________________________________//
-
-static void
-start_dbx_in_emacs( dbg_startup_info const& /*dsi*/ )
-{
-// char dbg_cmd_buff[500]; // !! ??
-//
-// ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (dbx \"dbx -q -c cont %s %ld\"))", dsi.binary_path.begin(), dsi.pid );
-
-// start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff );
-}
-
-//____________________________________________________________________________//
-
-static void
-start_dbx_in_xemacs( dbg_startup_info const& )
-{
- // !! ??
-}
-
-//____________________________________________________________________________//
-
-static void
-start_dbx_in_ddd( dbg_startup_info const& dsi )
-{
- char const* title = prepare_window_title( dsi );
- if( !title )
- return;
-
- char pid_buff[16]; // !! ??
- ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
-
- safe_execlp( "ddd", "-display", dsi.display.begin(),
- "--dbx", "-q", "-c", prepare_dbx_cmd_line( dsi, false ), dsi.binary_path.begin(), pid_buff, 0 );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** debug::info_t ************** //
-// ************************************************************************** //
-
-static struct info_t {
- // Constructor
- info_t();
-
- // Public properties
- unit_test::readwrite_property<std::string> p_dbg;
-
- // Data members
- std::map<std::string,dbg_starter> m_dbg_starter_reg;
-} s_info;
-
-//____________________________________________________________________________//
-
-info_t::info_t()
-{
- p_dbg.value = ::getenv( "DISPLAY" )
- ? std::string( BOOST_STRINGIZE( BOOST_TEST_GUI_DBG ) )
- : std::string( BOOST_STRINGIZE( BOOST_TEST_CNL_DBG ) );
-
- m_dbg_starter_reg[std::string("gdb")] = &start_gdb_in_console;
- m_dbg_starter_reg[std::string("gdb-emacs")] = &start_gdb_in_emacs;
- m_dbg_starter_reg[std::string("gdb-xterm")] = &start_gdb_in_xterm;
- m_dbg_starter_reg[std::string("gdb-xemacs")] = &start_gdb_in_xemacs;
-
- m_dbg_starter_reg[std::string("dbx")] = &start_dbx_in_console;
- m_dbg_starter_reg[std::string("dbx-emacs")] = &start_dbx_in_emacs;
- m_dbg_starter_reg[std::string("dbx-xterm")] = &start_dbx_in_xterm;
- m_dbg_starter_reg[std::string("dbx-xemacs")] = &start_dbx_in_xemacs;
- m_dbg_starter_reg[std::string("dbx-ddd")] = &start_dbx_in_ddd;
-}
-
-//____________________________________________________________________________//
-
-#endif
-
-} // local namespace
-
-// ************************************************************************** //
-// ************** check if program is running under debugger ************** //
-// ************************************************************************** //
-
-bool
-under_debugger()
-{
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
-
- return !!s_info.m_is_debugger_present && s_info.m_is_debugger_present();
-
-#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
-
- // !! ?? could/should we cache the result somehow?
- const_string dbg_list = BOOST_TEST_STRINGIZE( BOOST_TEST_DBG_LIST );
-
- pid_t pid = ::getpid();
-
- while( pid != 0 ) {
- process_info pi( pid );
-
- // !! ?? should we use tokenizer here instead?
- if( dbg_list.find( pi.binary_name() ) != const_string::npos )
- return true;
-
- pid = (pi.parent_pid() == pid ? 0 : pi.parent_pid());
- }
-
- return false;
-
-#else // ****************************************************** default
-
- return false;
-
-#endif
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** cause program to break execution ************** //
-// ************** in debugger at call point ************** //
-// ************************************************************************** //
-
-void
-debugger_break()
-{
- // !! ?? auto-start debugger?
-
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
-
-#if defined(__GNUC__) && !defined(__MINGW32__) || \
- defined(__INTEL_COMPILER)
-# define BOOST_DEBUG_BREAK __debugbreak
-#else
-# define BOOST_DEBUG_BREAK DebugBreak
-#endif
-
-#ifndef __MINGW32__
- if( !under_debugger() ) {
- __try {
- __try {
- BOOST_DEBUG_BREAK();
- }
- __except( UnhandledExceptionFilter(GetExceptionInformation()) )
- {
- // User opted to ignore the breakpoint
- return;
- }
- }
- __except (EXCEPTION_EXECUTE_HANDLER)
- {
- // If we got here, the user has pushed Debug. Debugger is already attached to our process and we
- // continue to let the another BOOST_DEBUG_BREAK to be called.
- }
- }
-#endif
-
- BOOST_DEBUG_BREAK();
-
-#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
-
- ::kill( ::getpid(), SIGTRAP );
-
-#else // ****************************************************** default
-
-#endif
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** console debugger setup ************** //
-// ************************************************************************** //
-
-#if defined(BOOST_UNIX_BASED_DEBUG) // ************************ UNIX
-
-std::string
-set_debugger( unit_test::const_string dbg_id, dbg_starter s )
-{
- std::string old = s_info.p_dbg;
-
- assign_op( s_info.p_dbg.value, dbg_id, 0 );
-
- if( !!s )
- s_info.m_dbg_starter_reg[s_info.p_dbg.get()] = s;
-
- return old;
-}
-
-#else // ***************************************************** default
-
-std::string
-set_debugger( unit_test::const_string, dbg_starter )
-{
- return std::string();
-}
-
-#endif
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** attach debugger to the current process ************** //
-// ************************************************************************** //
-
-#if defined(BOOST_WIN32_BASED_DEBUG)
-
-struct safe_handle_helper
-{
- HANDLE& handle;
- safe_handle_helper(HANDLE &handle_) : handle(handle_) {}
-
- void close_handle()
- {
- if( handle != INVALID_HANDLE_VALUE )
- {
- ::CloseHandle( handle );
- handle = INVALID_HANDLE_VALUE;
- }
- }
-
- ~safe_handle_helper()
- {
- close_handle();
- }
-};
-#endif
-
-bool
-attach_debugger( bool break_or_continue )
-{
- if( under_debugger() )
- return false;
-
-#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
-
- const int MAX_CMD_LINE = 200;
-
- // *************************************************** //
- // Debugger "ready" event
-
- SECURITY_ATTRIBUTES attr;
- attr.nLength = sizeof(attr);
- attr.lpSecurityDescriptor = NULL;
- attr.bInheritHandle = true;
-
- // manual resettable, initially non signaled, unnamed event,
- // that will signal me that debugger initialization is done
- HANDLE dbg_init_done_ev = ::CreateEvent(
- &attr, // pointer to security attributes
- true, // flag for manual-reset event
- false, // flag for initial state
- NULL // pointer to event-object name
- );
-
- if( !dbg_init_done_ev )
- return false;
-
- safe_handle_helper safe_handle_obj( dbg_init_done_ev );
-
- // *************************************************** //
- // Debugger command line format
-
- HKEY reg_key;
-
- if( !s_info.m_reg_open_key || (*s_info.m_reg_open_key)(
- HKEY_LOCAL_MACHINE, // handle of open key
- "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", // name of subkey to open
- &reg_key ) != ERROR_SUCCESS ) // address of handle of open key
- return false;
-
- char format[MAX_CMD_LINE];
- DWORD format_size = MAX_CMD_LINE;
- DWORD type = REG_SZ;
-
- bool b_read_key = s_info.m_reg_query_value &&
- ((*s_info.m_reg_query_value)(
- reg_key, // handle of open key
- "Debugger", // name of subkey to query
- 0, // reserved
- &type, // value type
- (LPBYTE)format, // buffer for returned string
- &format_size ) == ERROR_SUCCESS ); // in: buffer size; out: actual size of returned string
-
- if( !s_info.m_reg_close_key || (*s_info.m_reg_close_key)( reg_key ) != ERROR_SUCCESS )
- return false;
-
- if( !b_read_key )
- return false;
-
- // *************************************************** //
- // Debugger command line
-
- char cmd_line[MAX_CMD_LINE];
- std::sprintf( cmd_line, format, ::GetCurrentProcessId(), dbg_init_done_ev );
-
- // *************************************************** //
- // Debugger window parameters
-
- STARTUPINFOA startup_info;
- std::memset( &startup_info, 0, sizeof(startup_info) );
-
- startup_info.cb = sizeof(startup_info);
- startup_info.dwFlags = STARTF_USESHOWWINDOW;
- startup_info.wShowWindow = SW_SHOWNORMAL;
-
- // debugger process s_info
- PROCESS_INFORMATION debugger_info;
-
- bool created = !!::CreateProcessA(
- NULL, // pointer to name of executable module; NULL - use the one in command line
- cmd_line, // pointer to command line string
- NULL, // pointer to process security attributes; NULL - debugger's handle can't be inherited
- NULL, // pointer to thread security attributes; NULL - debugger's handle can't be inherited
- true, // debugger inherit opened handles
- 0, // priority flags; 0 - normal priority
- NULL, // pointer to new environment block; NULL - use this process environment
- NULL, // pointer to current directory name; NULL - use this process correct directory
- &startup_info, // pointer to STARTUPINFO that specifies main window appearance
- &debugger_info // pointer to PROCESS_INFORMATION that will contain the new process identification
- );
-
- bool debugger_run_ok = false;
- if( created )
- {
- DWORD ret_code = ::WaitForSingleObject( dbg_init_done_ev, INFINITE );
- debugger_run_ok = ( ret_code == WAIT_OBJECT_0 );
- }
-
- safe_handle_obj.close_handle();
-
- if( !created || !debugger_run_ok )
- return false;
-
- if( break_or_continue )
- debugger_break();
-
- return true;
-
-#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
-
- char init_done_lock_fn[] = "/tmp/btl_dbg_init_done_XXXXXX";
- fd_holder init_done_lock_fd( ::mkstemp( init_done_lock_fn ) );
-
- if( init_done_lock_fd == -1 )
- return false;
-
- pid_t child_pid = fork();
-
- if( child_pid == -1 )
- return false;
-
- if( child_pid != 0 ) { // parent process - here we will start the debugger
- dbg_startup_info dsi;
-
- process_info pi( child_pid );
- if( pi.binary_path().is_empty() )
- ::exit( -1 );
-
- dsi.pid = child_pid;
- dsi.break_or_continue = break_or_continue;
- dsi.binary_path = pi.binary_path();
- dsi.display = ::getenv( "DISPLAY" );
- dsi.init_done_lock = init_done_lock_fn;
-
- dbg_starter starter = s_info.m_dbg_starter_reg[s_info.p_dbg];
- if( !!starter )
- starter( dsi );
-
- ::perror( "Boost.Test execution monitor failed to start a debugger:" );
-
- ::exit( -1 );
- }
-
- // child process - here we will continue our test module execution ; // !! ?? should it be vice versa
-
- while( ::access( init_done_lock_fn, F_OK ) == 0 ) {
- struct timeval to = { 0, 100 };
-
- ::select( 0, 0, 0, 0, &to );
- }
-
-// char dummy;
-// while( ::read( init_done_lock_fd, &dummy, sizeof(char) ) == 0 );
-
- if( break_or_continue )
- debugger_break();
-
- return true;
-
-#else // ****************************************************** default
- (void) break_or_continue; // silence 'unused variable' warning
- return false;
-
-#endif
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** switch on/off detect memory leaks feature ************** //
-// ************************************************************************** //
-
-void
-detect_memory_leaks( bool on_off, unit_test::const_string report_file )
-{
- unit_test::ut_detail::ignore_unused_variable_warning( on_off );
-
-#ifdef BOOST_MS_CRT_BASED_DEBUG
- int flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
-
- if( !on_off )
- flags &= ~_CRTDBG_LEAK_CHECK_DF;
- else {
- flags |= _CRTDBG_LEAK_CHECK_DF;
- _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
-
- if( report_file.is_empty() )
- _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
- else {
- HANDLE hreport_f = ::CreateFileA( report_file.begin(),
- GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- _CrtSetReportFile(_CRT_WARN, hreport_f );
- }
- }
-
- _CrtSetDbgFlag ( flags );
-#else
- unit_test::ut_detail::ignore_unused_variable_warning( report_file );
-#endif // BOOST_MS_CRT_BASED_DEBUG
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** cause program to break execution in ************** //
-// ************** debugger at specific allocation point ************** //
-// ************************************************************************** //
-
-void
-break_memory_alloc( long mem_alloc_order_num )
-{
- unit_test::ut_detail::ignore_unused_variable_warning( mem_alloc_order_num );
-
-#ifdef BOOST_MS_CRT_BASED_DEBUG
- // only set the value if one was supplied (do not use default used by UTF just as a indicator to enable leak detection)
- if( mem_alloc_order_num > 1 )
- _CrtSetBreakAlloc( mem_alloc_order_num );
-#endif // BOOST_MS_CRT_BASED_DEBUG
-}
-
-//____________________________________________________________________________//
-
-} // namespace debug
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_DEBUG_API_IPP_112006GER
-
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
deleted file mode 100644
index e4bf11ee268..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/decorator.ipp
+++ /dev/null
@@ -1,214 +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_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
deleted file mode 100644
index 9b7c5965b4a..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/execution_monitor.ipp
+++ /dev/null
@@ -1,1450 +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
-#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
deleted file mode 100644
index 60ba4accfeb..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/framework.ipp
+++ /dev/null
@@ -1,1725 +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
- // 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.69.0/boost/test/impl/junit_log_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/junit_log_formatter.ipp
deleted file mode 100644
index e82e2bd1b02..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/junit_log_formatter.ipp
+++ /dev/null
@@ -1,840 +0,0 @@
-// (C) Copyright 2016 Raffi Enficiaud.
-// Distributed under the Boost Software License, Version 1.0.
-// (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 the implementatoin of the Junit log formatter (OF_JUNIT)
-// ***************************************************************************
-
-#ifndef BOOST_TEST_JUNIT_LOG_FORMATTER_IPP__
-#define BOOST_TEST_JUNIT_LOG_FORMATTER_IPP__
-
-// Boost.Test
-#include <boost/test/output/junit_log_formatter.hpp>
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/framework.hpp>
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-#include <boost/test/utils/xml_printer.hpp>
-#include <boost/test/utils/string_cast.hpp>
-#include <boost/test/framework.hpp>
-
-#include <boost/test/tree/visitor.hpp>
-#include <boost/test/tree/test_case_counter.hpp>
-#include <boost/test/tree/traverse.hpp>
-#include <boost/test/results_collector.hpp>
-
-#include <boost/test/utils/algorithm.hpp>
-#include <boost/test/utils/string_cast.hpp>
-
-//#include <boost/test/results_reporter.hpp>
-
-
-// Boost
-#include <boost/version.hpp>
-
-// STL
-#include <iostream>
-#include <fstream>
-#include <set>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-
-struct s_replace_chars {
- template <class T>
- void operator()(T& to_replace)
- {
- if(to_replace == '/')
- to_replace = '.';
- else if(to_replace == ' ')
- to_replace = '_';
- }
-};
-
-inline std::string tu_name_normalize(std::string full_name)
-{
- // maybe directly using normalize_test_case_name instead?
- std::for_each(full_name.begin(), full_name.end(), s_replace_chars());
- return full_name;
-}
-
-inline std::string tu_name_remove_newlines(std::string full_name)
-{
- full_name.erase(std::remove(full_name.begin(), full_name.end(), '\n'), full_name.end());
- return full_name;
-}
-
-const_string file_basename(const_string filename) {
-
- const_string path_sep( "\\/" );
- const_string::iterator it = unit_test::utils::find_last_of( filename.begin(), filename.end(),
- path_sep.begin(), path_sep.end() );
- if( it != filename.end() )
- filename.trim_left( it + 1 );
-
- return filename;
-
-}
-
-// ************************************************************************** //
-// ************** junit_log_formatter ************** //
-// ************************************************************************** //
-
-void
-junit_log_formatter::log_start( std::ostream& /*ostr*/, counter_t /*test_cases_amount*/)
-{
- map_tests.clear();
- list_path_to_root.clear();
- runner_log_entry.clear();
-}
-
-//____________________________________________________________________________//
-
-class junit_result_helper : public test_tree_visitor {
-private:
- typedef junit_impl::junit_log_helper::assertion_entry assertion_entry;
- typedef std::vector< assertion_entry >::const_iterator vect_assertion_entry_citerator;
- typedef std::list<std::string>::const_iterator list_str_citerator;
-
-public:
- explicit junit_result_helper(
- std::ostream& stream,
- test_unit const& ts,
- junit_log_formatter::map_trace_t const& mt,
- junit_impl::junit_log_helper const& runner_log_,
- bool display_build_info )
- : m_stream(stream)
- , m_ts( ts )
- , m_map_test( mt )
- , runner_log( runner_log_ )
- , m_id( 0 )
- , m_display_build_info(display_build_info)
- { }
-
- void add_log_entry(assertion_entry const& log) const
- {
- std::string entry_type;
- if( log.log_entry == assertion_entry::log_entry_failure ) {
- entry_type = "failure";
- }
- else if( log.log_entry == assertion_entry::log_entry_error ) {
- entry_type = "error";
- }
- else {
- return;
- }
-
- m_stream
- << "<" << entry_type
- << " message" << utils::attr_value() << log.logentry_message
- << " type" << utils::attr_value() << log.logentry_type
- << ">";
-
- if(!log.output.empty()) {
- m_stream << utils::cdata() << "\n" + log.output;
- }
-
- m_stream << "</" << entry_type << ">";
- }
-
- struct conditional_cdata_helper {
- std::ostream &ostr;
- std::string const field;
- bool empty;
-
- conditional_cdata_helper(std::ostream &ostr_, std::string field_)
- : ostr(ostr_)
- , field(field_)
- , empty(true)
- {}
-
- ~conditional_cdata_helper() {
- if(!empty) {
- ostr << BOOST_TEST_L( "]]>" ) << "</" << field << '>' << std::endl;
- }
- }
-
- void operator()(const std::string& s) {
- bool current_empty = s.empty();
- if(empty) {
- if(!current_empty) {
- empty = false;
- ostr << '<' << field << '>' << BOOST_TEST_L( "<![CDATA[" );
- }
- }
- if(!current_empty) {
- ostr << s;
- }
- }
- };
-
- std::list<std::string> build_skipping_chain(test_unit const & tu) const
- {
- // we enter here because we know that the tu has been skipped.
- // either junit has not seen this tu, or it is indicated as disabled
- assert(m_map_test.count(tu.p_id) == 0 || results_collector.results( tu.p_id ).p_skipped);
-
- std::list<std::string> out;
-
- test_unit_id id(tu.p_id);
- while( id != m_ts.p_id && id != INV_TEST_UNIT_ID) {
- test_unit const& tu_hierarchy = boost::unit_test::framework::get( id, TUT_ANY );
- out.push_back("- disabled test unit: '" + tu_name_remove_newlines(tu_hierarchy.full_name()) + "'\n");
- if(m_map_test.count(id) > 0)
- {
- // junit has seen the reason: this is enough for constructing the chain
- break;
- }
- id = tu_hierarchy.p_parent_id;
- }
- junit_log_formatter::map_trace_t::const_iterator it_element_stack(m_map_test.find(id));
- if( it_element_stack != m_map_test.end() )
- {
- out.push_back("- reason: '" + it_element_stack->second.skipping_reason + "'");
- out.push_front("Test case disabled because of the following chain of decision:\n");
- }
-
- return out;
- }
-
- std::string get_class_name(test_unit const & tu_class) const {
- std::string classname;
- test_unit_id id(tu_class.p_parent_id);
- while( id != m_ts.p_id && id != INV_TEST_UNIT_ID ) {
- test_unit const& tu = boost::unit_test::framework::get( id, TUT_ANY );
- classname = tu_name_normalize(tu.p_name) + "." + classname;
- id = tu.p_parent_id;
- }
-
- // removes the trailing dot
- if(!classname.empty() && *classname.rbegin() == '.') {
- classname.erase(classname.size()-1);
- }
-
- return classname;
- }
-
- void write_testcase_header(test_unit const & tu,
- test_results const *tr,
- int nb_assertions) const
- {
- std::string name;
- std::string classname;
-
- if(tu.p_id == m_ts.p_id ) {
- name = "boost_test";
- }
- else {
- classname = get_class_name(tu);
- name = tu_name_normalize(tu.p_name);
- }
-
- if( tu.p_type == TUT_SUITE ) {
- name += "-setup-teardown";
- }
-
- m_stream << "<testcase assertions" << utils::attr_value() << nb_assertions;
- if(!classname.empty())
- m_stream << " classname" << utils::attr_value() << classname;
-
- // test case name and time taken
- m_stream
- << " name" << utils::attr_value() << name
- << " time" << utils::attr_value() << double(tr->p_duration_microseconds) * 1E-6
- << ">" << std::endl;
- }
-
- void write_testcase_system_out(junit_impl::junit_log_helper const &detailed_log,
- test_unit const * tu,
- bool skipped) const
- {
- // system-out + all info/messages, the object skips the empty entries
- conditional_cdata_helper system_out_helper(m_stream, "system-out");
-
- // indicate why the test has been skipped first
- if( skipped ) {
- std::list<std::string> skipping_decision_chain = build_skipping_chain(*tu);
- for(list_str_citerator it(skipping_decision_chain.begin()), ite(skipping_decision_chain.end());
- it != ite;
- ++it)
- {
- system_out_helper(*it);
- }
- }
-
- // stdout
- for(list_str_citerator it(detailed_log.system_out.begin()), ite(detailed_log.system_out.end());
- it != ite;
- ++it)
- {
- system_out_helper(*it);
- }
-
- // warning/info message last
- for(vect_assertion_entry_citerator it(detailed_log.assertion_entries.begin());
- it != detailed_log.assertion_entries.end();
- ++it)
- {
- if(it->log_entry != assertion_entry::log_entry_info)
- continue;
- system_out_helper(it->output);
- }
- }
-
- void write_testcase_system_err(junit_impl::junit_log_helper const &detailed_log,
- test_unit const * tu,
- test_results const *tr) const
- {
- // system-err output + test case informations
- bool has_failed = (tr != 0) ? !tr->p_skipped && !tr->passed() : false;
- if(!detailed_log.system_err.empty() || has_failed)
- {
- std::ostringstream o;
- if(has_failed) {
- o << "Failures detected in:" << std::endl;
- }
- else {
- o << "ERROR STREAM:" << std::endl;
- }
-
- if(tu->p_type == TUT_SUITE) {
- if( tu->p_id == m_ts.p_id ) {
- o << " boost.test global setup/teardown" << std::endl;
- } else {
- o << "- test suite: " << tu_name_remove_newlines(tu->full_name()) << std::endl;
- }
- }
- else {
- o << "- test case: " << tu_name_remove_newlines(tu->full_name());
- if(!tu->p_description.value.empty())
- o << " '" << tu->p_description << "'";
-
- o << std::endl
- << "- file: " << file_basename(tu->p_file_name) << std::endl
- << "- line: " << tu->p_line_num << std::endl
- ;
- }
-
- if(!detailed_log.system_err.empty())
- o << std::endl << "STDERR BEGIN: ------------" << std::endl;
-
- for(list_str_citerator it(detailed_log.system_err.begin()), ite(detailed_log.system_err.end());
- it != ite;
- ++it)
- {
- o << *it;
- }
-
- if(!detailed_log.system_err.empty())
- o << std::endl << "STDERR END ------------" << std::endl;
-
- conditional_cdata_helper system_err_helper(m_stream, "system-err");
- system_err_helper(o.str());
- }
- }
-
- int get_nb_assertions(junit_impl::junit_log_helper const &detailed_log,
- test_unit const & tu,
- test_results const *tr) const {
- int nb_assertions(-1);
- if( tu.p_type == TUT_SUITE ) {
- nb_assertions = 0;
- for(vect_assertion_entry_citerator it(detailed_log.assertion_entries.begin());
- it != detailed_log.assertion_entries.end();
- ++it)
- {
- if(it->log_entry != assertion_entry::log_entry_info)
- nb_assertions++;
- }
- }
- else {
- nb_assertions = tr->p_assertions_passed + tr->p_assertions_failed;
- }
-
- return nb_assertions;
- }
-
- void output_detailed_logs(junit_impl::junit_log_helper const &detailed_log,
- test_unit const & tu,
- bool skipped,
- test_results const *tr) const
- {
- int nb_assertions = get_nb_assertions(detailed_log, tu, tr);
- if(!nb_assertions && tu.p_type == TUT_SUITE)
- return;
-
- write_testcase_header(tu, tr, nb_assertions);
-
- if( skipped ) {
- m_stream << "<skipped/>" << std::endl;
- }
- else {
-
- for(vect_assertion_entry_citerator it(detailed_log.assertion_entries.begin());
- it != detailed_log.assertion_entries.end();
- ++it)
- {
- add_log_entry(*it);
- }
- }
-
- write_testcase_system_out(detailed_log, &tu, skipped);
- write_testcase_system_err(detailed_log, &tu, tr);
- m_stream << "</testcase>" << std::endl;
- }
-
- void visit( test_case const& tc )
- {
-
- test_results const& tr = results_collector.results( tc.p_id );
- junit_log_formatter::map_trace_t::const_iterator it_find = m_map_test.find(tc.p_id);
- if(it_find == m_map_test.end())
- {
- // test has been skipped and not seen by the logger
- output_detailed_logs(junit_impl::junit_log_helper(), tc, true, &tr);
- }
- else {
- output_detailed_logs(it_find->second, tc, tr.p_skipped, &tr);
- }
- }
-
- bool test_suite_start( test_suite const& ts )
- {
- test_results const& tr = results_collector.results( ts.p_id );
-
- // unique test suite, without s, nesting not supported in CI
- if( m_ts.p_id == ts.p_id ) {
- m_stream << "<testsuite";
-
- m_stream
- // << "disabled=\"" << tr.p_test_cases_skipped << "\" "
- << " tests" << utils::attr_value() << tr.p_test_cases_passed
- << " skipped" << utils::attr_value() << tr.p_test_cases_skipped
- << " errors" << utils::attr_value() << tr.p_test_cases_aborted
- << " failures" << utils::attr_value() << tr.p_test_cases_failed
- << " id" << utils::attr_value() << m_id++
- << " name" << utils::attr_value() << tu_name_normalize(ts.p_name)
- << " time" << utils::attr_value() << (tr.p_duration_microseconds * 1E-6)
- << ">" << std::endl;
-
- if(m_display_build_info)
- {
- m_stream << "<properties>" << std::endl;
- m_stream << "<property name=\"platform\" value" << utils::attr_value() << BOOST_PLATFORM << " />" << std::endl;
- m_stream << "<property name=\"compiler\" value" << utils::attr_value() << BOOST_COMPILER << " />" << std::endl;
- m_stream << "<property name=\"stl\" value" << utils::attr_value() << BOOST_STDLIB << " />" << std::endl;
-
- std::ostringstream o;
- o << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
- m_stream << "<property name=\"boost\" value" << utils::attr_value() << o.str() << " />" << std::endl;
- m_stream << "</properties>" << std::endl;
- }
- }
-
- if( !tr.p_skipped ) {
- // if we land here, then this is a chance that we are logging the fixture setup/teardown of a test-suite.
- // the setup/teardown logging of a test-case is part of the test case.
- // we do not care about the test-suite that were skipped (really??)
- junit_log_formatter::map_trace_t::const_iterator it_find = m_map_test.find(ts.p_id);
- if(it_find != m_map_test.end()) {
- output_detailed_logs(it_find->second, ts, false, &tr);
- }
- }
-
- return true; // indicates that the children should also be parsed
- }
-
- virtual void test_suite_finish( test_suite const& ts )
- {
- if( m_ts.p_id == ts.p_id ) {
- write_testcase_system_out(runner_log, 0, false);
- write_testcase_system_err(runner_log, 0, 0);
-
- m_stream << "</testsuite>";
- return;
- }
- }
-
-private:
- // Data members
- std::ostream& m_stream;
- test_unit const& m_ts;
- junit_log_formatter::map_trace_t const& m_map_test;
- junit_impl::junit_log_helper const& runner_log;
- size_t m_id;
- bool m_display_build_info;
-};
-
-
-
-void
-junit_log_formatter::log_finish( std::ostream& ostr )
-{
- ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
-
- // getting the root test suite
- if(!map_tests.empty()) {
- test_unit* root = &boost::unit_test::framework::get( map_tests.begin()->first, TUT_ANY );
-
- // looking for the root of the SUBtree (we stay in the subtree)
- while(root->p_parent_id != INV_TEST_UNIT_ID && map_tests.count(root->p_parent_id) > 0) {
- root = &boost::unit_test::framework::get( root->p_parent_id, TUT_ANY );
- }
- junit_result_helper ch( ostr, *root, map_tests, this->runner_log_entry, m_display_build_info );
- traverse_test_tree( root->p_id, ch, true ); // last is to ignore disabled suite special handling
- }
- else {
- ostr << "<testsuites errors=\"1\">";
- ostr << "<testsuite errors=\"1\" name=\"boost-test-framework\">";
- ostr << "<testcase assertions=\"1\" name=\"test-setup\">";
- ostr << "<system-out>Incorrect setup: no test case executed</system-out>";
- ostr << "</testcase></testsuite></testsuites>";
- }
- return;
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_build_info( std::ostream& /*ostr*/ )
-{
- m_display_build_info = true;
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::test_unit_start( std::ostream& /*ostr*/, test_unit const& tu )
-{
- list_path_to_root.push_back( tu.p_id );
- map_tests.insert(std::make_pair(tu.p_id, junit_impl::junit_log_helper())); // current_test_case_id not working here
-}
-
-
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::test_unit_finish( std::ostream& /*ostr*/, test_unit const& tu, unsigned long /*elapsed*/ )
-{
- // the time is already stored in the result_reporter
- assert( tu.p_id == list_path_to_root.back() );
- list_path_to_root.pop_back();
-}
-
-void
-junit_log_formatter::test_unit_aborted( std::ostream& /*ostr*/, test_unit const& tu )
-{
- assert( tu.p_id == list_path_to_root.back() );
- //list_path_to_root.pop_back();
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::test_unit_skipped( std::ostream& /*ostr*/, test_unit const& tu, const_string reason )
-{
- // if a test unit is skipped, then the start of this TU has not been called yet.
- // we cannot use get_current_log_entry here, but the TU id should appear in the map.
- // The "skip" boolean is given by the boost.test framework
- junit_impl::junit_log_helper& v = map_tests[tu.p_id]; // not sure if we can use get_current_log_entry()
- v.skipping_reason.assign(reason.begin(), reason.end());
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_exception_start( std::ostream& /*ostr*/, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
-{
- std::ostringstream o;
- execution_exception::location const& loc = ex.where();
-
- m_is_last_assertion_or_error = false;
-
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
-
- junit_impl::junit_log_helper::assertion_entry entry;
-
- entry.logentry_message = "unexpected exception";
- entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_error;
-
- switch(ex.code())
- {
- case execution_exception::cpp_exception_error:
- entry.logentry_type = "uncaught exception";
- break;
- case execution_exception::timeout_error:
- entry.logentry_type = "execution timeout";
- break;
- case execution_exception::user_error:
- entry.logentry_type = "user, assert() or CRT error";
- break;
- case execution_exception::user_fatal_error:
- // Looks like never used
- entry.logentry_type = "user fatal error";
- break;
- case execution_exception::system_error:
- entry.logentry_type = "system error";
- break;
- case execution_exception::system_fatal_error:
- entry.logentry_type = "system fatal error";
- break;
- default:
- entry.logentry_type = "no error"; // not sure how to handle this one
- break;
- }
-
- o << "UNCAUGHT EXCEPTION:" << std::endl;
- if( !loc.m_function.is_empty() )
- o << "- function: \"" << loc.m_function << "\"" << std::endl;
-
- o << "- file: " << file_basename(loc.m_file_name) << std::endl
- << "- line: " << loc.m_line_num << std::endl
- << std::endl;
-
- o << "\nEXCEPTION STACK TRACE: --------------\n" << ex.what()
- << "\n-------------------------------------";
-
- if( !checkpoint_data.m_file_name.is_empty() ) {
- o << std::endl << std::endl
- << "Last checkpoint:" << std::endl
- << "- message: \"" << checkpoint_data.m_message << "\"" << std::endl
- << "- file: " << file_basename(checkpoint_data.m_file_name) << std::endl
- << "- line: " << checkpoint_data.m_line_num << std::endl
- ;
- }
-
- entry.output = o.str();
-
- last_entry.assertion_entries.push_back(entry);
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_exception_finish( std::ostream& /*ostr*/ )
-{
- // sealing the last entry
- assert(!get_current_log_entry().assertion_entries.back().sealed);
- get_current_log_entry().assertion_entries.back().sealed = true;
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_entry_start( std::ostream& /*ostr*/, log_entry_data const& entry_data, log_entry_types let )
-{
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
- last_entry.skipping = false;
- m_is_last_assertion_or_error = true;
- switch(let)
- {
- case unit_test_log_formatter::BOOST_UTL_ET_INFO:
- {
- if(m_log_level_internal > log_successful_tests) {
- last_entry.skipping = true;
- break;
- }
- BOOST_FALLTHROUGH;
- }
- case unit_test_log_formatter::BOOST_UTL_ET_MESSAGE:
- {
- if(m_log_level_internal > log_messages) {
- last_entry.skipping = true;
- break;
- }
- BOOST_FALLTHROUGH;
- }
- case unit_test_log_formatter::BOOST_UTL_ET_WARNING:
- {
- if(m_log_level_internal > log_warnings) {
- last_entry.skipping = true;
- break;
- }
- std::ostringstream o;
- junit_impl::junit_log_helper::assertion_entry entry;
-
- entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_info;
- entry.logentry_message = "info";
- entry.logentry_type = "message";
-
- o << (let == unit_test_log_formatter::BOOST_UTL_ET_WARNING ?
- "WARNING:" : (let == unit_test_log_formatter::BOOST_UTL_ET_MESSAGE ?
- "MESSAGE:" : "INFO:"))
- << std::endl
- << "- file : " << file_basename(entry_data.m_file_name) << std::endl
- << "- line : " << entry_data.m_line_num << std::endl
- << "- message: "; // no CR
-
- entry.output += o.str();
- last_entry.assertion_entries.push_back(entry);
- break;
- }
- default:
- case unit_test_log_formatter::BOOST_UTL_ET_ERROR:
- case unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR:
- {
- std::ostringstream o;
- junit_impl::junit_log_helper::assertion_entry entry;
- entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_failure;
- entry.logentry_message = "failure";
- entry.logentry_type = (let == unit_test_log_formatter::BOOST_UTL_ET_ERROR ? "assertion error" : "fatal error");
-
- o << "ASSERTION FAILURE:" << std::endl
- << "- file : " << file_basename(entry_data.m_file_name) << std::endl
- << "- line : " << entry_data.m_line_num << std::endl
- << "- message: " ; // no CR
-
- entry.output += o.str();
- last_entry.assertion_entries.push_back(entry);
- break;
- }
- }
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_entry_value( std::ostream& /*ostr*/, const_string value )
-{
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
- if(last_entry.skipping)
- return;
-
- assert(last_entry.assertion_entries.empty() || !last_entry.assertion_entries.back().sealed);
-
- if(!last_entry.assertion_entries.empty())
- {
- junit_impl::junit_log_helper::assertion_entry& log_entry = last_entry.assertion_entries.back();
- log_entry.output += value;
- }
- else
- {
- // this may be a message coming from another observer
- // the prefix is set in the log_entry_start
- last_entry.system_out.push_back(std::string(value.begin(), value.end()));
- }
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_entry_finish( std::ostream& /*ostr*/ )
-{
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
- if(!last_entry.skipping)
- {
- assert(last_entry.assertion_entries.empty() || !last_entry.assertion_entries.back().sealed);
-
- if(!last_entry.assertion_entries.empty()) {
- junit_impl::junit_log_helper::assertion_entry& log_entry = last_entry.assertion_entries.back();
- log_entry.output += "\n\n"; // quote end, CR
- log_entry.sealed = true;
- }
- else {
- last_entry.system_out.push_back("\n\n"); // quote end, CR
- }
- }
-
- last_entry.skipping = false;
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::entry_context_start( std::ostream& /*ostr*/, log_level )
-{
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
- if(last_entry.skipping)
- return;
-
- std::vector< junit_impl::junit_log_helper::assertion_entry > &v_failure_or_error = last_entry.assertion_entries;
- assert(!v_failure_or_error.back().sealed);
-
- junit_impl::junit_log_helper::assertion_entry& last_log_entry = v_failure_or_error.back();
- if(m_is_last_assertion_or_error)
- {
- last_log_entry.output += "\n- context:\n";
- }
- else
- {
- last_log_entry.output += "\n\nCONTEXT:\n";
- }
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::entry_context_finish( std::ostream& /*ostr*/, log_level )
-{
- // no op, may be removed
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
- if(last_entry.skipping)
- return;
- assert(!get_current_log_entry().assertion_entries.back().sealed);
-}
-
-//____________________________________________________________________________//
-
-void
-junit_log_formatter::log_entry_context( std::ostream& /*ostr*/, log_level , const_string context_descr )
-{
- junit_impl::junit_log_helper& last_entry = get_current_log_entry();
- if(last_entry.skipping)
- return;
-
- assert(!last_entry.assertion_entries.back().sealed);
- junit_impl::junit_log_helper::assertion_entry& last_log_entry = get_current_log_entry().assertion_entries.back();
-
- last_log_entry.output +=
- (m_is_last_assertion_or_error ? " - '": "- '") + std::string(context_descr.begin(), context_descr.end()) + "'\n"; // quote end
-}
-
-//____________________________________________________________________________//
-
-
-std::string
-junit_log_formatter::get_default_stream_description() const {
- std::string name = framework::master_test_suite().p_name.value;
-
- static const std::string to_replace[] = { " ", "\"", "/", "\\", ":"};
- static const std::string replacement[] = { "_", "_" , "_", "_" , "_"};
-
- name = unit_test::utils::replace_all_occurrences_of(
- name,
- to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0]),
- replacement, replacement + sizeof(replacement)/sizeof(replacement[0]));
-
- std::ifstream check_init((name + ".xml").c_str());
- if(!check_init)
- return name + ".xml";
-
- int index = 0;
- for(; index < 100; index++) {
- std::string candidate = name + "_" + utils::string_cast(index) + ".xml";
- std::ifstream file(candidate.c_str());
- if(!file)
- return candidate;
- }
-
- return name + ".xml";
-}
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_junit_log_formatter_IPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp
deleted file mode 100644
index cbf5a4c029e..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp
+++ /dev/null
@@ -1,207 +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 : plain report formatter definition
-// ***************************************************************************
-
-#ifndef BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
-#define BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
-
-// Boost.Test
-#include <boost/test/output/plain_report_formatter.hpp>
-#include <boost/test/utils/custom_manip.hpp>
-#include <boost/test/results_collector.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/setcolor.hpp>
-
-// STL
-#include <iomanip>
-#include <boost/config/no_tr1/cmath.hpp>
-#include <iostream>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-# ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::log10; }
-# endif
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-namespace {
-
-typedef utils::custom_manip<struct quote_t> quote;
-
-template<typename T>
-inline std::ostream&
-operator<<( utils::custom_printer<quote> const& p, T const& value )
-{
- *p << '"' << value << '"';
-
- return *p;
-}
-
-//____________________________________________________________________________//
-
-void
-print_stat_value( std::ostream& ostr, counter_t v, counter_t indent, counter_t total, const_string name, const_string res )
-{
- if( v == 0 )
- return;
-
- if( total > 0 )
- ostr << std::setw( static_cast<int>(indent) ) << "" << v << ' ' << name << ( v != 1 ? "s" : "" )
- << " out of " << total << ' ' << res << '\n';
- else
- ostr << std::setw( static_cast<int>(indent) ) << "" << v << ' ' << res << ' ' << name << ( v != 1 ? "s" : "" ) << '\n';
-}
-
-//____________________________________________________________________________//
-
-} // local namespace
-
-// ************************************************************************** //
-// ************** plain_report_formatter ************** //
-// ************************************************************************** //
-
-void
-plain_report_formatter::results_report_start( std::ostream& ostr )
-{
- m_indent = 0;
- m_color_output = runtime_config::get<bool>( runtime_config::btrt_color_output );
- ostr << '\n';
-}
-
-//____________________________________________________________________________//
-
-void
-plain_report_formatter::results_report_finish( std::ostream& ostr )
-{
- ostr.flush();
-}
-
-//____________________________________________________________________________//
-
-void
-plain_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )
-{
- test_results const& tr = results_collector.results( tu.p_id );
-
- const_string descr;
-
- if( tr.passed() )
- descr = "has passed";
- else if( tr.p_skipped )
- descr = "was skipped";
- else if( tr.p_aborted )
- descr = "was aborted";
- else
- descr = "has failed";
-
- ostr << std::setw( static_cast<int>(m_indent) ) << ""
- << "Test " << tu.p_type_name << ' ' << quote() << tu.full_name() << ' ' << descr;
-
- if( tr.p_skipped ) {
- ostr << "\n";
- m_indent += 2;
- return;
- }
-
- counter_t total_assertions = tr.p_assertions_passed + tr.p_assertions_failed;
- counter_t total_tc = tr.p_test_cases_passed + tr.p_test_cases_warned + tr.p_test_cases_failed + tr.p_test_cases_skipped;
-
- if( total_assertions > 0 || total_tc > 0 || tr.p_warnings_failed > 0)
- ostr << " with:";
-
- ostr << '\n';
- m_indent += 2;
-
- print_stat_value( ostr, tr.p_test_cases_passed , m_indent, total_tc , "test case", "passed" );
- print_stat_value( ostr, tr.p_test_cases_warned , m_indent, total_tc , "test case", "passed with warnings" );
- print_stat_value( ostr, tr.p_test_cases_failed , m_indent, total_tc , "test case", "failed" );
- print_stat_value( ostr, tr.p_test_cases_skipped, m_indent, total_tc , "test case", "skipped" );
- print_stat_value( ostr, tr.p_test_cases_aborted, m_indent, total_tc , "test case", "aborted" );
- print_stat_value( ostr, tr.p_assertions_passed , m_indent, total_assertions, "assertion", "passed" );
- print_stat_value( ostr, tr.p_assertions_failed , m_indent, total_assertions, "assertion", "failed" );
- print_stat_value( ostr, tr.p_warnings_failed , m_indent, 0 , "warning" , "failed" );
- print_stat_value( ostr, tr.p_expected_failures , m_indent, 0 , "failure" , "expected" );
-
- ostr << '\n';
-}
-
-//____________________________________________________________________________//
-
-void
-plain_report_formatter::test_unit_report_finish( test_unit const&, std::ostream& )
-{
- m_indent -= 2;
-}
-
-//____________________________________________________________________________//
-
-void
-plain_report_formatter::do_confirmation_report( test_unit const& tu, std::ostream& ostr )
-{
- test_results const& tr = results_collector.results( tu.p_id );
-
- if( tr.passed() ) {
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, ostr, term_attr::BRIGHT, term_color::GREEN );
-
- ostr << "*** No errors detected\n";
- return;
- }
-
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, ostr, term_attr::BRIGHT, term_color::RED );
-
- if( tr.p_skipped ) {
- ostr << "*** The test " << tu.p_type_name << ' ' << quote() << tu.full_name() << " was skipped"
- << "; see standard output for details\n";
- return;
- }
-
- if( tr.p_aborted ) {
- ostr << "*** The test " << tu.p_type_name << ' ' << quote() << tu.full_name() << " was aborted"
- << "; see standard output for details\n";
- }
-
- if( tr.p_assertions_failed == 0 ) {
- if( !tr.p_aborted )
- ostr << "*** Errors were detected in the test " << tu.p_type_name << ' ' << quote() << tu.full_name()
- << "; see standard output for details\n";
- return;
- }
-
- counter_t num_failures = tr.p_assertions_failed;
-
- ostr << "*** " << num_failures << " failure" << ( num_failures != 1 ? "s are" : " is" ) << " detected";
-
- if( tr.p_expected_failures > 0 )
- ostr << " (" << tr.p_expected_failures << " failure" << ( tr.p_expected_failures != 1 ? "s are" : " is" ) << " expected)";
-
- ostr << " in the test " << tu.p_type_name << " " << quote() << tu.full_name() << "\n";
-}
-
-//____________________________________________________________________________//
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_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
deleted file mode 100644
index cfc34cf7934..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/results_collector.ipp
+++ /dev/null
@@ -1,299 +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
-
-//____________________________________________________________________________//
-
-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.69.0/boost/test/impl/test_tools.ipp b/src/third_party/boost-1.69.0/boost/test/impl/test_tools.ipp
deleted file mode 100644
index 2956879326b..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/test_tools.ipp
+++ /dev/null
@@ -1,823 +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 : supplies offline implementation for the Test Tools
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TEST_TOOLS_IPP_012205GER
-#define BOOST_TEST_TEST_TOOLS_IPP_012205GER
-
-// Boost.Test
-#include <boost/test/unit_test_log.hpp>
-#include <boost/test/tools/context.hpp>
-#include <boost/test/tools/output_test_stream.hpp>
-
-#include <boost/test/tools/detail/fwd.hpp>
-#include <boost/test/tools/detail/print_helper.hpp>
-
-#include <boost/test/framework.hpp>
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/execution_monitor.hpp> // execution_aborted
-
-#include <boost/test/detail/throw_exception.hpp>
-
-#include <boost/test/utils/algorithm.hpp>
-
-// Boost
-#include <boost/config.hpp>
-
-// STL
-#include <fstream>
-#include <string>
-#include <cstring>
-#include <cctype>
-#include <cwchar>
-#include <stdexcept>
-#include <vector>
-#include <utility>
-#include <ios>
-
-// !! should we use #include <cstdarg>
-#include <stdarg.h>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-# ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::strcmp; using ::strlen; using ::isprint; }
-#if !defined( BOOST_NO_CWCHAR )
-namespace std { using ::wcscmp; }
-#endif
-# endif
-
-namespace boost {
-namespace test_tools {
-namespace tt_detail {
-
-// ************************************************************************** //
-// ************** print_log_value ************** //
-// ************************************************************************** //
-
-void
-print_log_value<bool>::operator()( std::ostream& ostr, bool t )
-{
- ostr << std::boolalpha << t;
-}
-
-void
-print_log_value<char>::operator()( std::ostream& ostr, char t )
-{
- if( (std::isprint)( static_cast<unsigned char>(t) ) )
- ostr << '\'' << t << '\'';
- else
- ostr << std::hex
-#if BOOST_TEST_USE_STD_LOCALE
- << std::showbase
-#else
- << "0x"
-#endif
- << static_cast<int>(t);
-}
-
-//____________________________________________________________________________//
-
-void
-print_log_value<unsigned char>::operator()( std::ostream& ostr, unsigned char t )
-{
- ostr << std::hex
- // showbase is only available for new style streams:
-#if BOOST_TEST_USE_STD_LOCALE
- << std::showbase
-#else
- << "0x"
-#endif
- << static_cast<int>(t);
-}
-
-//____________________________________________________________________________//
-
-void
-print_log_value<char const*>::operator()( std::ostream& ostr, char const* t )
-{
- ostr << ( t ? t : "null string" );
-}
-
-//____________________________________________________________________________//
-
-void
-print_log_value<wchar_t const*>::operator()( std::ostream& ostr, wchar_t const* t )
-{
- ostr << ( t ? t : L"null string" );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** TOOL BOX Implementation ************** //
-// ************************************************************************** //
-
-using ::boost::unit_test::lazy_ostream;
-
-static char const* check_str [] = { " == ", " != ", " < " , " <= ", " > " , " >= " };
-static char const* rever_str [] = { " != ", " == ", " >= ", " > " , " <= ", " < " };
-
-template<typename OutStream>
-void
-format_report( OutStream& os, assertion_result const& pr, unit_test::lazy_ostream const& assertion_descr,
- tool_level tl, check_type ct,
- std::size_t num_args, va_list args,
- char const* prefix, char const* suffix )
-{
- using namespace unit_test;
-
- switch( ct ) {
- case CHECK_PRED:
- os << prefix << assertion_descr << suffix;
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
-
- case CHECK_BUILT_ASSERTION: {
- os << prefix << assertion_descr << suffix;
-
- if( tl != PASS ) {
- const_string details_message = pr.message();
-
- if( !details_message.is_empty() ) {
- os << details_message;
- }
- }
- break;
- }
-
- case CHECK_MSG:
- if( tl == PASS )
- os << prefix << "'" << assertion_descr << "'" << suffix;
- else
- os << assertion_descr;
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
-
- case CHECK_EQUAL:
- case CHECK_NE:
- case CHECK_LT:
- case CHECK_LE:
- case CHECK_GT:
- case CHECK_GE: {
- char const* arg1_descr = va_arg( args, char const* );
- lazy_ostream const* arg1_val = va_arg( args, lazy_ostream const* );
- char const* arg2_descr = va_arg( args, char const* );
- lazy_ostream const* arg2_val = va_arg( args, lazy_ostream const* );
-
- os << prefix << arg1_descr << check_str[ct-CHECK_EQUAL] << arg2_descr << suffix;
-
- if( tl != PASS )
- os << " [" << *arg1_val << rever_str[ct-CHECK_EQUAL] << *arg2_val << "]" ;
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
- }
-
- case CHECK_CLOSE:
- case CHECK_CLOSE_FRACTION: {
- char const* arg1_descr = va_arg( args, char const* );
- lazy_ostream const* arg1_val = va_arg( args, lazy_ostream const* );
- char const* arg2_descr = va_arg( args, char const* );
- lazy_ostream const* arg2_val = va_arg( args, lazy_ostream const* );
- /* toler_descr = */ va_arg( args, char const* );
- lazy_ostream const* toler_val = va_arg( args, lazy_ostream const* );
-
- os << "difference{" << pr.message()
- << "} between " << arg1_descr << "{" << *arg1_val
- << "} and " << arg2_descr << "{" << *arg2_val
- << ( tl == PASS ? "} doesn't exceed " : "} exceeds " )
- << *toler_val;
- if( ct == CHECK_CLOSE )
- os << "%";
- break;
- }
- case CHECK_SMALL: {
- char const* arg1_descr = va_arg( args, char const* );
- lazy_ostream const* arg1_val = va_arg( args, lazy_ostream const* );
- /* toler_descr = */ va_arg( args, char const* );
- lazy_ostream const* toler_val = va_arg( args, lazy_ostream const* );
-
- os << "absolute value of " << arg1_descr << "{" << *arg1_val << "}"
- << ( tl == PASS ? " doesn't exceed " : " exceeds " )
- << *toler_val;
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
- }
-
- case CHECK_PRED_WITH_ARGS: {
- std::vector< std::pair<char const*, lazy_ostream const*> > args_copy;
- args_copy.reserve( num_args );
- for( std::size_t i = 0; i < num_args; ++i ) {
- char const* desc = va_arg( args, char const* );
- lazy_ostream const* value = va_arg( args, lazy_ostream const* );
- args_copy.push_back( std::make_pair( desc, value ) );
- }
-
- os << prefix << assertion_descr;
-
- // print predicate call description
- os << "( ";
- for( std::size_t i = 0; i < num_args; ++i ) {
- os << args_copy[i].first;
-
- if( i != num_args-1 )
- os << ", ";
- }
- os << " )" << suffix;
-
- if( tl != PASS ) {
- os << " for ( ";
- for( std::size_t i = 0; i < num_args; ++i ) {
- os << *args_copy[i].second;
-
- if( i != num_args-1 )
- os << ", ";
- }
- os << " )";
- }
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
- }
-
- case CHECK_EQUAL_COLL: {
- char const* left_begin_descr = va_arg( args, char const* );
- char const* left_end_descr = va_arg( args, char const* );
- char const* right_begin_descr = va_arg( args, char const* );
- char const* right_end_descr = va_arg( args, char const* );
-
- os << prefix << "{ " << left_begin_descr << ", " << left_end_descr << " } == { "
- << right_begin_descr << ", " << right_end_descr << " }"
- << suffix;
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
- }
-
- case CHECK_BITWISE_EQUAL: {
- char const* left_descr = va_arg( args, char const* );
- char const* right_descr = va_arg( args, char const* );
-
- os << prefix << left_descr << " =.= " << right_descr << suffix;
-
- if( !pr.has_empty_message() )
- os << ". " << pr.message();
- break;
- }
- }
-}
-
-//____________________________________________________________________________//
-
-bool
-report_assertion( assertion_result const& ar,
- lazy_ostream const& assertion_descr,
- const_string file_name,
- std::size_t line_num,
- tool_level tl,
- check_type ct,
- std::size_t num_args, ... )
-{
- using namespace unit_test;
-
- if( !framework::test_in_progress() ) {
- // in case no test is in progress, we do not throw anything:
- // raising an exception here may result in raising an exception in a destructor of a global fixture
- // which will abort the process
- // We flag this as aborted instead
-
- //BOOST_TEST_I_ASSRT( framework::current_test_case_id() != INV_TEST_UNIT_ID,
- // std::runtime_error( "Can't use testing tools outside of test case implementation." ) );
-
- framework::test_aborted();
- return false;
- }
-
-
- if( !!ar )
- tl = PASS;
-
- log_level ll;
- char const* prefix;
- char const* suffix;
-
- switch( tl ) {
- case PASS:
- ll = log_successful_tests;
- prefix = "check ";
- suffix = " has passed";
- break;
- case WARN:
- ll = log_warnings;
- prefix = "condition ";
- suffix = " is not satisfied";
- break;
- case CHECK:
- ll = log_all_errors;
- prefix = "check ";
- suffix = " has failed";
- break;
- case REQUIRE:
- ll = log_fatal_errors;
- prefix = "critical check ";
- suffix = " has failed";
- break;
- default:
- return true;
- }
-
- unit_test_log << unit_test::log::begin( file_name, line_num ) << ll;
- va_list args;
- va_start( args, num_args );
-
- format_report( unit_test_log, ar, assertion_descr, tl, ct, num_args, args, prefix, suffix );
-
- va_end( args );
- unit_test_log << unit_test::log::end();
-
- switch( tl ) {
- case PASS:
- framework::assertion_result( AR_PASSED );
- return true;
-
- case WARN:
- framework::assertion_result( AR_TRIGGERED );
- return false;
-
- case CHECK:
- framework::assertion_result( AR_FAILED );
- return false;
-
- case REQUIRE:
- framework::assertion_result( AR_FAILED );
- framework::test_unit_aborted( framework::current_test_unit() );
- BOOST_TEST_I_THROW( execution_aborted() );
- return false;
- }
-
- return true;
-}
-
-//____________________________________________________________________________//
-
-assertion_result
-format_assertion_result( const_string expr_val, const_string details )
-{
- assertion_result res(false);
-
- bool starts_new_line = first_char( expr_val ) == '\n';
-
- if( !starts_new_line && !expr_val.is_empty() )
- res.message().stream() << " [" << expr_val << "]";
-
- if( !details.is_empty() ) {
- if( first_char(details) != '[' )
- res.message().stream() << ". ";
- else
- res.message().stream() << " ";
-
- res.message().stream() << details;
- }
-
- if( starts_new_line )
- res.message().stream() << "." << expr_val;
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-BOOST_TEST_DECL std::string
-prod_report_format( assertion_result const& ar, unit_test::lazy_ostream const& assertion_descr, check_type ct, std::size_t num_args, ... )
-{
- std::ostringstream msg_buff;
-
- va_list args;
- va_start( args, num_args );
-
- format_report( msg_buff, ar, assertion_descr, CHECK, ct, num_args, args, "assertion ", " failed" );
-
- va_end( args );
-
- return msg_buff.str();
-}
-
-//____________________________________________________________________________//
-
-assertion_result
-equal_impl( char const* left, char const* right )
-{
- return (left && right) ? std::strcmp( left, right ) == 0 : (left == right);
-}
-
-//____________________________________________________________________________//
-
-#if !defined( BOOST_NO_CWCHAR )
-
-assertion_result
-equal_impl( wchar_t const* left, wchar_t const* right )
-{
- return (left && right) ? std::wcscmp( left, right ) == 0 : (left == right);
-}
-
-#endif // !defined( BOOST_NO_CWCHAR )
-
-//____________________________________________________________________________//
-
-bool
-is_defined_impl( const_string symbol_name, const_string symbol_value )
-{
- symbol_value.trim_left( 2 );
- return symbol_name != symbol_value;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** context_frame ************** //
-// ************************************************************************** //
-
-context_frame::context_frame( ::boost::unit_test::lazy_ostream const& context_descr )
-: m_frame_id( unit_test::framework::add_context( context_descr, true ) )
-{
-}
-
-//____________________________________________________________________________//
-
-context_frame::~context_frame()
-{
- unit_test::framework::clear_context( m_frame_id );
-}
-
-//____________________________________________________________________________//
-
-context_frame::operator bool()
-{
- return true;
-}
-
-//____________________________________________________________________________//
-
-} // namespace tt_detail
-
-// ************************************************************************** //
-// ************** output_test_stream ************** //
-// ************************************************************************** //
-
-struct output_test_stream::Impl
-{
- std::fstream m_pattern;
- bool m_match_or_save;
- bool m_text_or_binary;
- std::string m_synced_string;
-
- char get_char()
- {
- char res = 0;
- do {
- m_pattern.get( res );
- } while( m_text_or_binary && res == '\r' && !m_pattern.fail() && !m_pattern.eof() );
-
- return res;
- }
-
- void check_and_fill( assertion_result& res )
- {
- if( !res.p_predicate_value )
- res.message() << "Output content: \"" << m_synced_string << '\"';
- }
-};
-
-//____________________________________________________________________________//
-
-output_test_stream::output_test_stream( const_string pattern_file_name, bool match_or_save, bool text_or_binary )
-: m_pimpl( new Impl )
-{
- if( !pattern_file_name.is_empty() ) {
- std::ios::openmode m = match_or_save ? std::ios::in : std::ios::out;
- if( !text_or_binary )
- m |= std::ios::binary;
-
- m_pimpl->m_pattern.open( pattern_file_name.begin(), m );
-
- if( !m_pimpl->m_pattern.is_open() )
- BOOST_TEST_FRAMEWORK_MESSAGE( "Can't open pattern file " << pattern_file_name << " for " << (match_or_save ? "reading" : "writing") );
- }
-
- m_pimpl->m_match_or_save = match_or_save;
- m_pimpl->m_text_or_binary = text_or_binary;
-}
-
-//____________________________________________________________________________//
-
-output_test_stream::~output_test_stream()
-{
- delete m_pimpl;
-}
-
-//____________________________________________________________________________//
-
-assertion_result
-output_test_stream::is_empty( bool flush_stream )
-{
- sync();
-
- assertion_result res( m_pimpl->m_synced_string.empty() );
-
- m_pimpl->check_and_fill( res );
-
- if( flush_stream )
- flush();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-assertion_result
-output_test_stream::check_length( std::size_t length_, bool flush_stream )
-{
- sync();
-
- assertion_result res( m_pimpl->m_synced_string.length() == length_ );
-
- m_pimpl->check_and_fill( res );
-
- if( flush_stream )
- flush();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-assertion_result
-output_test_stream::is_equal( const_string arg, bool flush_stream )
-{
- sync();
-
- assertion_result res( const_string( m_pimpl->m_synced_string ) == arg );
-
- m_pimpl->check_and_fill( res );
-
- if( flush_stream )
- flush();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-std::string pretty_print_log(std::string str) {
-
- static const std::string to_replace[] = { "\r", "\n" };
- static const std::string replacement[] = { "\\r", "\\n" };
-
- return unit_test::utils::replace_all_occurrences_of(
- str,
- to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0]),
- replacement, replacement + sizeof(replacement)/sizeof(replacement[0]));
-}
-
-assertion_result
-output_test_stream::match_pattern( bool flush_stream )
-{
- const std::string::size_type n_chars_presuffix = 10;
- sync();
-
- assertion_result result( true );
-
- const std::string stream_string_repr = get_stream_string_representation();
-
- if( !m_pimpl->m_pattern.is_open() ) {
- result = false;
- result.message() << "Pattern file can't be opened!";
- }
- else {
- if( m_pimpl->m_match_or_save ) {
-
- int offset = 0;
- std::vector<char> last_elements;
- for ( std::string::size_type i = 0; static_cast<int>(i + offset) < static_cast<int>(stream_string_repr.length()); ++i ) {
-
- char c = m_pimpl->get_char();
-
- if( last_elements.size() <= n_chars_presuffix ) {
- last_elements.push_back( c );
- }
- else {
- last_elements[ i % last_elements.size() ] = c;
- }
-
- bool is_same = !m_pimpl->m_pattern.fail() &&
- !m_pimpl->m_pattern.eof() &&
- (stream_string_repr[i+offset] == c);
-
- if( !is_same ) {
-
- result = false;
-
- std::string::size_type prefix_size = (std::min)( i + offset, n_chars_presuffix );
-
- std::string::size_type suffix_size = (std::min)( stream_string_repr.length() - i - offset,
- n_chars_presuffix );
-
- // try to log area around the mismatch
- std::string substr = stream_string_repr.substr(0, i+offset);
- std::size_t line = std::count(substr.begin(), substr.end(), '\n');
- std::size_t column = i + offset - substr.rfind('\n');
-
- result.message()
- << "Mismatch at position " << i
- << " (line " << line
- << ", column " << column
- << "): '" << pretty_print_log(std::string(1, stream_string_repr[i+offset])) << "' != '" << pretty_print_log(std::string(1, c)) << "' :\n";
-
- // we already escape this substring because we need its actual size for the pretty print
- // of the difference location.
- std::string sub_str_prefix(pretty_print_log(stream_string_repr.substr( i + offset - prefix_size, prefix_size )));
-
- // we need this substring as is because we compute the best matching substrings on it.
- std::string sub_str_suffix(stream_string_repr.substr( i + offset, suffix_size));
- result.message() << "... " << sub_str_prefix + pretty_print_log(sub_str_suffix) << " ..." << '\n';
-
- result.message() << "... ";
- for( std::size_t j = 0; j < last_elements.size() ; j++ )
- result.message() << pretty_print_log(std::string(1, last_elements[(i + j + 1) % last_elements.size()]));
-
- std::vector<char> last_elements_ordered;
- last_elements_ordered.push_back(c);
- for( std::string::size_type counter = 0; counter < suffix_size - 1 ; counter++ ) {
- char c2 = m_pimpl->get_char();
-
- if( m_pimpl->m_pattern.fail() || m_pimpl->m_pattern.eof() )
- break;
-
- result.message() << pretty_print_log(std::string(1, c2));
-
- last_elements_ordered.push_back(c2);
- }
-
- // tries to find the best substring matching in the remainder of the
- // two strings
- std::size_t max_nb_char_in_common = 0;
- std::size_t best_pattern_start_index = 0;
- std::size_t best_stream_start_index = 0;
- for( std::size_t pattern_start_index = best_pattern_start_index;
- pattern_start_index < last_elements_ordered.size();
- pattern_start_index++ ) {
- for( std::size_t stream_start_index = best_stream_start_index;
- stream_start_index < sub_str_suffix.size();
- stream_start_index++ ) {
-
- std::size_t max_size = (std::min)( last_elements_ordered.size() - pattern_start_index, sub_str_suffix.size() - stream_start_index );
- if( max_nb_char_in_common > max_size )
- break; // safely break to go to the outer loop
-
- std::size_t nb_char_in_common = 0;
- for( std::size_t k = 0; k < max_size; k++) {
- if( last_elements_ordered[pattern_start_index + k] == sub_str_suffix[stream_start_index + k] )
- nb_char_in_common ++;
- else
- break; // we take fully matching substring only
- }
-
- if( nb_char_in_common > max_nb_char_in_common ) {
- max_nb_char_in_common = nb_char_in_common;
- best_pattern_start_index = pattern_start_index;
- best_stream_start_index = stream_start_index;
- }
- }
- }
-
- // indicates with more precision the location of the mismatchs in "ascii arts" ...
- result.message() << " ...\n... ";
- for( std::string::size_type j = 0; j < sub_str_prefix.size(); j++) {
- result.message() << ' ';
- }
-
- result.message() << '~'; // places the first tilde at the current char that mismatches
-
- for( std::size_t k = 1; k < (std::max)(best_pattern_start_index, best_stream_start_index); k++ ) { // 1 is for the current char c
- std::string s1(pretty_print_log(std::string(1, last_elements_ordered[(std::min)(k, best_pattern_start_index)])));
- std::string s2(pretty_print_log(std::string(1, sub_str_suffix[(std::min)(k, best_stream_start_index)])));
- for( int h = (std::max)(s1.size(), s2.size()); h > 0; h--)
- result.message() << "~";
- }
-
- if( m_pimpl->m_pattern.eof() ) {
- result.message() << " (reference string shorter than current stream)";
- }
-
- result.message() << "\n";
-
- // no need to continue if the EOF is reached
- if( m_pimpl->m_pattern.eof() ) {
- break;
- }
-
- // first char is a replicat of c, so we do not copy it.
- for(std::string::size_type counter = 0; counter < last_elements_ordered.size() - 1 ; counter++)
- last_elements[ (i + 1 + counter) % last_elements.size() ] = last_elements_ordered[counter + 1];
-
- i += last_elements_ordered.size()-1;
- offset += best_stream_start_index - best_pattern_start_index;
-
- }
-
- }
-
- // not needed anymore
- /*
- if(offset > 0 && false) {
- m_pimpl->m_pattern.ignore(
- static_cast<std::streamsize>( offset ));
- }
- */
- }
- else {
- m_pimpl->m_pattern.write( stream_string_repr.c_str(),
- static_cast<std::streamsize>( stream_string_repr.length() ) );
- m_pimpl->m_pattern.flush();
- }
- }
-
- if( flush_stream )
- flush();
-
- return result;
-}
-
-//____________________________________________________________________________//
-
-void
-output_test_stream::flush()
-{
- m_pimpl->m_synced_string.erase();
-
-#ifndef BOOST_NO_STRINGSTREAM
- str( std::string() );
-#else
- seekp( 0, std::ios::beg );
-#endif
-}
-
-
-std::string
-output_test_stream::get_stream_string_representation() const {
- return m_pimpl->m_synced_string;
-}
-
-//____________________________________________________________________________//
-
-std::size_t
-output_test_stream::length()
-{
- sync();
-
- return m_pimpl->m_synced_string.length();
-}
-
-//____________________________________________________________________________//
-
-void
-output_test_stream::sync()
-{
-#ifdef BOOST_NO_STRINGSTREAM
- m_pimpl->m_synced_string.assign( str(), pcount() );
- freeze( false );
-#else
- m_pimpl->m_synced_string = str();
-#endif
-}
-
-//____________________________________________________________________________//
-
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TEST_TOOLS_IPP_012205GER
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
deleted file mode 100644
index 722b4815b22..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/test_tree.ipp
+++ /dev/null
@@ -1,566 +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 <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
deleted file mode 100644
index 40b54be223c..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/unit_test_log.ipp
+++ /dev/null
@@ -1,695 +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
-
-//____________________________________________________________________________//
-
-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.69.0/boost/test/impl/unit_test_main.ipp b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_main.ipp
deleted file mode 100644
index cad3d88ec62..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/unit_test_main.ipp
+++ /dev/null
@@ -1,312 +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 : main function implementation for Unit Test Framework
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
-
-// Boost.Test
-#include <boost/test/framework.hpp>
-#include <boost/test/results_collector.hpp>
-#include <boost/test/results_reporter.hpp>
-
-#include <boost/test/tree/visitor.hpp>
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/tree/traverse.hpp>
-
-#include <boost/test/unit_test_parameters.hpp>
-
-#include <boost/test/utils/foreach.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-
-// Boost
-#include <boost/cstdlib.hpp>
-
-// STL
-#include <cstdio>
-#include <stdexcept>
-#include <iostream>
-#include <iomanip>
-#include <set>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-namespace ut_detail {
-
-// ************************************************************************** //
-// ************** hrf_content_reporter ************** //
-// ************************************************************************** //
-
-struct hrf_content_reporter : test_tree_visitor {
- explicit hrf_content_reporter( std::ostream& os ) : m_os( os ), m_indent( -4 ) {} // skip master test suite
-
-private:
- void report_test_unit( test_unit const& tu )
- {
- m_os << std::setw( m_indent ) << "" << tu.p_name;
- m_os << (tu.p_default_status == test_unit::RS_ENABLED ? "*" : " ");
- //m_os << '[' << tu.p_sibling_rank << ']';
- if( !tu.p_description->empty() )
- m_os << ": " << tu.p_description;
-
- m_os << "\n";
- }
- virtual void visit( test_case const& tc ) { report_test_unit( tc ); }
- virtual bool test_suite_start( test_suite const& ts )
- {
- if( m_indent >= 0 )
- report_test_unit( ts );
- m_indent += 4;
- return true;
- }
- virtual void test_suite_finish( test_suite const& )
- {
- m_indent -= 4;
- }
-
- // Data members
- std::ostream& m_os;
- int m_indent;
-};
-
-// ************************************************************************** //
-// ************** dot_content_reporter ************** //
-// ************************************************************************** //
-
-struct dot_content_reporter : test_tree_visitor {
- explicit dot_content_reporter( std::ostream& os ) : m_os( os ) {}
-
-private:
- void report_test_unit( test_unit const& tu )
- {
- bool master_ts = tu.p_parent_id == INV_TEST_UNIT_ID;
-
- m_os << "tu" << tu.p_id;
-
- m_os << (master_ts ? "[shape=ellipse,peripheries=2" : "[shape=Mrecord" );
-
- m_os << ",fontname=Helvetica";
-
- m_os << (tu.p_default_status == test_unit::RS_ENABLED ? ",color=green" : ",color=yellow");
-
- if( master_ts )
- m_os << ",label=\"" << tu.p_name << "\"];\n";
- else {
- m_os << ",label=\"" << tu.p_name << "|" << tu.p_file_name << "(" << tu.p_line_num << ")";
- if( tu.p_timeout > 0 )
- m_os << "|timeout=" << tu.p_timeout;
- if( tu.p_expected_failures != 0 )
- m_os << "|expected failures=" << tu.p_expected_failures;
- if( !tu.p_labels->empty() ) {
- m_os << "|labels:";
-
- BOOST_TEST_FOREACH( std::string const&, l, tu.p_labels.get() )
- m_os << " @" << l;
- }
- m_os << "\"];\n";
- }
-
- if( !master_ts )
- m_os << "tu" << tu.p_parent_id << " -> " << "tu" << tu.p_id << ";\n";
-
- BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() ) {
- test_unit const& dep = framework::get( dep_id, TUT_ANY );
-
- m_os << "tu" << tu.p_id << " -> " << "tu" << dep.p_id << "[color=red,style=dotted,constraint=false];\n";
- }
-
- }
- virtual void visit( test_case const& tc )
- {
- report_test_unit( tc );
- }
- virtual bool test_suite_start( test_suite const& ts )
- {
- if( ts.p_parent_id == INV_TEST_UNIT_ID )
- m_os << "digraph G {rankdir=LR;\n";
-
- report_test_unit( ts );
-
- m_os << "{\n";
-
- return true;
- }
- virtual void test_suite_finish( test_suite const& ts )
- {
- m_os << "}\n";
- if( ts.p_parent_id == INV_TEST_UNIT_ID )
- m_os << "}\n";
- }
-
- std::ostream& m_os;
-};
-
-// ************************************************************************** //
-// ************** labels_collector ************** //
-// ************************************************************************** //
-
-struct labels_collector : test_tree_visitor {
- std::set<std::string> const& labels() const { return m_labels; }
-
-private:
- virtual bool visit( test_unit const& tu )
- {
- m_labels.insert( tu.p_labels->begin(), tu.p_labels->end() );
- return true;
- }
-
- // Data members
- std::set<std::string> m_labels;
-};
-
-struct framework_shutdown_helper {
- ~framework_shutdown_helper() {
- try {
- framework::shutdown();
- }
- catch(...) {
- std::cerr << "Boost.Test shutdown exception caught" << std::endl;
- }
- }
-};
-
-} // namespace ut_detail
-
-// ************************************************************************** //
-// ************** unit_test_main ************** //
-// ************************************************************************** //
-
-
-
-int BOOST_TEST_DECL
-unit_test_main( init_unit_test_func init_func, int argc, char* argv[] )
-{
- int result_code = 0;
-
- ut_detail::framework_shutdown_helper shutdown_helper;
-
- BOOST_TEST_I_TRY {
-
- framework::init( init_func, argc, argv );
-
- if( runtime_config::get<bool>( runtime_config::btrt_wait_for_debugger ) ) {
- results_reporter::get_stream() << "Press any key to continue..." << std::endl;
-
- // getchar is defined as a macro in uClibc. Use parenthesis to fix
- // gcc bug 58952 for gcc <= 4.8.2.
- (std::getchar)();
- results_reporter::get_stream() << "Continuing..." << std::endl;
- }
-
- framework::finalize_setup_phase();
-
- output_format list_cont = runtime_config::get<output_format>( runtime_config::btrt_list_content );
- if( list_cont != unit_test::OF_INVALID ) {
- if( list_cont == unit_test::OF_DOT ) {
- ut_detail::dot_content_reporter reporter( results_reporter::get_stream() );
-
- traverse_test_tree( framework::master_test_suite().p_id, reporter, true );
- }
- else {
- ut_detail::hrf_content_reporter reporter( results_reporter::get_stream() );
-
- traverse_test_tree( framework::master_test_suite().p_id, reporter, true );
- }
-
- return boost::exit_success;
- }
-
- if( runtime_config::get<bool>( runtime_config::btrt_list_labels ) ) {
- ut_detail::labels_collector collector;
-
- traverse_test_tree( framework::master_test_suite().p_id, collector, true );
-
- results_reporter::get_stream() << "Available labels:\n ";
- std::copy( collector.labels().begin(), collector.labels().end(),
- std::ostream_iterator<std::string>( results_reporter::get_stream(), "\n " ) );
- results_reporter::get_stream() << "\n";
-
- return boost::exit_success;
- }
-
- framework::run();
-
- result_code = !runtime_config::get<bool>( runtime_config::btrt_result_code )
- ? boost::exit_success
- : results_collector.results( framework::master_test_suite().p_id ).result_code();
- }
- BOOST_TEST_I_CATCH( framework::nothing_to_test, ex ) {
- result_code = ex.m_result_code;
- }
- BOOST_TEST_I_CATCH( framework::internal_error, ex ) {
- results_reporter::get_stream() << "Boost.Test framework internal error: " << ex.what() << std::endl;
-
- result_code = boost::exit_exception_failure;
- }
- BOOST_TEST_I_CATCH( framework::setup_error, ex ) {
- results_reporter::get_stream() << "Test setup error: " << ex.what() << std::endl;
-
- result_code = boost::exit_exception_failure;
- }
- BOOST_TEST_I_CATCH( std::logic_error, ex ) {
- results_reporter::get_stream() << "Test setup error: " << ex.what() << std::endl;
-
- result_code = boost::exit_exception_failure;
- }
- BOOST_TEST_I_CATCHALL() {
- results_reporter::get_stream() << "Boost.Test framework internal error: unknown reason" << std::endl;
-
- result_code = boost::exit_exception_failure;
- }
-
- return result_code;
-}
-
-} // namespace unit_test
-} // namespace boost
-
-#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
-
-// ************************************************************************** //
-// ************** main function for tests using lib ************** //
-// ************************************************************************** //
-
-int BOOST_TEST_CALL_DECL
-main( int argc, char* argv[] )
-{
- // prototype for user's unit test init function
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
- extern bool init_unit_test();
-
- boost::unit_test::init_unit_test_func init_func = &init_unit_test;
-#else
- extern ::boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] );
-
- boost::unit_test::init_unit_test_func init_func = &init_unit_test_suite;
-#endif
-
- return ::boost::unit_test::unit_test_main( init_func, argc, argv );
-}
-
-#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
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
deleted file mode 100644
index 70e78513b65..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/unit_test_monitor.ipp
+++ /dev/null
@@ -1,78 +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 {
-
-// 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.69.0/boost/test/impl/xml_log_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/xml_log_formatter.ipp
deleted file mode 100644
index ef44f1eadec..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/xml_log_formatter.ipp
+++ /dev/null
@@ -1,223 +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 OF_XML Log formatter
-// ***************************************************************************
-
-#ifndef BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
-#define BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
-
-// Boost.Test
-#include <boost/test/output/xml_log_formatter.hpp>
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/framework.hpp>
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-#include <boost/test/utils/xml_printer.hpp>
-
-// Boost
-#include <boost/version.hpp>
-
-// STL
-#include <iostream>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-static const_string tu_type_name( test_unit const& tu )
-{
- return tu.p_type == TUT_CASE ? "TestCase" : "TestSuite";
-}
-
-// ************************************************************************** //
-// ************** xml_log_formatter ************** //
-// ************************************************************************** //
-
-void
-xml_log_formatter::log_start( std::ostream& ostr, counter_t )
-{
- ostr << "<TestLog>";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_finish( std::ostream& ostr )
-{
- ostr << "</TestLog>";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_build_info( std::ostream& ostr )
-{
- ostr << "<BuildInfo"
- << " platform" << utils::attr_value() << BOOST_PLATFORM
- << " compiler" << utils::attr_value() << BOOST_COMPILER
- << " stl" << utils::attr_value() << BOOST_STDLIB
- << " boost=\"" << BOOST_VERSION/100000 << "."
- << BOOST_VERSION/100 % 1000 << "."
- << BOOST_VERSION % 100 << '\"'
- << "/>";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::test_unit_start( std::ostream& ostr, test_unit const& tu )
-{
- ostr << "<" << tu_type_name( tu ) << " name" << utils::attr_value() << tu.p_name.get();
-
- if( !tu.p_file_name.empty() )
- ostr << BOOST_TEST_L( " file" ) << utils::attr_value() << tu.p_file_name
- << BOOST_TEST_L( " line" ) << utils::attr_value() << tu.p_line_num;
-
- ostr << ">";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::test_unit_finish( std::ostream& ostr, test_unit const& tu, unsigned long elapsed )
-{
- if( tu.p_type == TUT_CASE )
- ostr << "<TestingTime>" << elapsed << "</TestingTime>";
-
- ostr << "</" << tu_type_name( tu ) << ">";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::test_unit_skipped( std::ostream& ostr, test_unit const& tu, const_string reason )
-{
- ostr << "<" << tu_type_name( tu )
- << " name" << utils::attr_value() << tu.p_name
- << " skipped" << utils::attr_value() << "yes"
- << " reason" << utils::attr_value() << reason
- << "/>";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_exception_start( std::ostream& ostr, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
-{
- execution_exception::location const& loc = ex.where();
-
- ostr << "<Exception file" << utils::attr_value() << loc.m_file_name
- << " line" << utils::attr_value() << loc.m_line_num;
-
- if( !loc.m_function.is_empty() )
- ostr << " function" << utils::attr_value() << loc.m_function;
-
- ostr << ">" << utils::cdata() << ex.what();
-
- if( !checkpoint_data.m_file_name.is_empty() ) {
- ostr << "<LastCheckpoint file" << utils::attr_value() << checkpoint_data.m_file_name
- << " line" << utils::attr_value() << checkpoint_data.m_line_num
- << ">"
- << utils::cdata() << checkpoint_data.m_message
- << "</LastCheckpoint>";
- }
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_exception_finish( std::ostream& ostr )
-{
- ostr << "</Exception>";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_entry_start( std::ostream& ostr, log_entry_data const& entry_data, log_entry_types let )
-{
- static literal_string xml_tags[] = { "Info", "Message", "Warning", "Error", "FatalError" };
-
- m_curr_tag = xml_tags[let];
- ostr << '<' << m_curr_tag
- << BOOST_TEST_L( " file" ) << utils::attr_value() << entry_data.m_file_name
- << BOOST_TEST_L( " line" ) << utils::attr_value() << entry_data.m_line_num
- << BOOST_TEST_L( "><![CDATA[" );
-
- m_value_closed = false;
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_entry_value( std::ostream& ostr, const_string value )
-{
- utils::print_escaped_cdata( ostr, value );
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_entry_finish( std::ostream& ostr )
-{
- if( !m_value_closed ) {
- ostr << BOOST_TEST_L( "]]>" );
- m_value_closed = true;
- }
-
- ostr << BOOST_TEST_L( "</" ) << m_curr_tag << BOOST_TEST_L( ">" );
-
- m_curr_tag.clear();
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::entry_context_start( std::ostream& ostr, log_level )
-{
- if( !m_value_closed ) {
- ostr << BOOST_TEST_L( "]]>" );
- m_value_closed = true;
- }
-
- ostr << BOOST_TEST_L( "<Context>" );
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::entry_context_finish( std::ostream& ostr, log_level )
-{
- ostr << BOOST_TEST_L( "</Context>" );
-}
-
-//____________________________________________________________________________//
-
-void
-xml_log_formatter::log_entry_context( std::ostream& ostr, log_level, const_string context_descr )
-{
- ostr << BOOST_TEST_L( "<Frame>" ) << utils::cdata() << context_descr << BOOST_TEST_L( "</Frame>" );
-}
-
-//____________________________________________________________________________//
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp
deleted file mode 100644
index 424ef4ba446..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp
+++ /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 : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : OF_XML report formatter
-// ***************************************************************************
-
-#ifndef BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
-#define BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
-
-// Boost.Test
-#include <boost/test/results_collector.hpp>
-#include <boost/test/output/xml_report_formatter.hpp>
-
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/utils/xml_printer.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-void
-xml_report_formatter::results_report_start( std::ostream& ostr )
-{
- ostr << "<TestResult>";
-}
-
-//____________________________________________________________________________//
-
-void
-xml_report_formatter::results_report_finish( std::ostream& ostr )
-{
- ostr << "</TestResult>";
-}
-
-
-//____________________________________________________________________________//
-
-void
-xml_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )
-{
- test_results const& tr = results_collector.results( tu.p_id );
-
- const_string descr;
-
- if( tr.passed() )
- descr = "passed";
- else if( tr.p_skipped )
- descr = "skipped";
- else if( tr.p_aborted )
- descr = "aborted";
- else
- descr = "failed";
-
- ostr << '<' << ( tu.p_type == TUT_CASE ? "TestCase" : "TestSuite" )
- << " name" << utils::attr_value() << tu.p_name.get()
- << " result" << utils::attr_value() << descr
- << " assertions_passed" << utils::attr_value() << tr.p_assertions_passed
- << " assertions_failed" << utils::attr_value() << tr.p_assertions_failed
- << " warnings_failed" << utils::attr_value() << tr.p_warnings_failed
- << " expected_failures" << utils::attr_value() << tr.p_expected_failures;
-
- if( tu.p_type == TUT_SUITE ) {
- ostr << " test_cases_passed" << utils::attr_value() << tr.p_test_cases_passed
- << " test_cases_passed_with_warnings" << utils::attr_value() << tr.p_test_cases_warned
- << " test_cases_failed" << utils::attr_value() << tr.p_test_cases_failed
- << " test_cases_skipped" << utils::attr_value() << tr.p_test_cases_skipped
- << " test_cases_aborted" << utils::attr_value() << tr.p_test_cases_aborted;
- }
-
- ostr << '>';
-}
-
-//____________________________________________________________________________//
-
-void
-xml_report_formatter::test_unit_report_finish( test_unit const& tu, std::ostream& ostr )
-{
- ostr << "</" << ( tu.p_type == TUT_CASE ? "TestCase" : "TestSuite" ) << '>';
-}
-
-//____________________________________________________________________________//
-
-void
-xml_report_formatter::do_confirmation_report( test_unit const& tu, std::ostream& ostr )
-{
- test_unit_report_start( tu, ostr );
- test_unit_report_finish( tu, ostr );
-}
-
-//____________________________________________________________________________//
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp
deleted file mode 100644
index 50359334b1b..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp
+++ /dev/null
@@ -1,70 +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 the formatter for the Human Readable Format (HRF)
-// ***************************************************************************
-
-#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
-#define BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/unit_test_log_formatter.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-// ************************************************************************** //
-// ************** compiler_log_formatter ************** //
-// ************************************************************************** //
-
-//!@brief Log formatter for the Human Readable Format (HRF) log format
-class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter {
-public:
- compiler_log_formatter() : m_color_output( false ) {}
-
- // Formatter interface
- void log_start( std::ostream&, counter_t test_cases_amount );
- void log_finish( std::ostream& );
- void log_build_info( std::ostream& );
-
- void test_unit_start( std::ostream&, test_unit const& tu );
- void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
- void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
-
- void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
- void log_exception_finish( std::ostream& );
-
- void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
- void log_entry_value( std::ostream&, const_string value );
- void log_entry_value( std::ostream&, lazy_ostream const& value );
- void log_entry_finish( std::ostream& );
-
- void entry_context_start( std::ostream&, log_level );
- void log_entry_context( std::ostream&, log_level l, const_string );
- void entry_context_finish( std::ostream&, log_level l );
-
-protected:
- virtual void print_prefix( std::ostream&, const_string file, std::size_t line );
-
- // Data members
- bool m_color_output;
-};
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp
deleted file mode 100644
index 713d3b016c6..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// (C) Copyright 2016 Raffi Enficiaud.
-// Distributed under the Boost Software License, Version 1.0.
-// (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 the definition of the Junit log formatter (OF_JUNIT)
-// ***************************************************************************
-
-#ifndef BOOST_TEST_JUNIT_LOG_FORMATTER__
-#define BOOST_TEST_JUNIT_LOG_FORMATTER__
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/unit_test_log_formatter.hpp>
-#include <boost/test/tree/test_unit.hpp>
-
-//#include <boost/test/results_collector.hpp>
-
-// STL
-#include <cstddef> // std::size_t
-#include <map>
-#include <list>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-
- namespace junit_impl {
-
- // helper for the JUnit logger
- struct junit_log_helper
- {
- struct assertion_entry {
-
- enum log_entry_t {
- log_entry_info,
- log_entry_error,
- log_entry_failure
- };
-
- assertion_entry() : sealed(false)
- {}
-
- std::string logentry_message; // the message associated to the JUnit error/entry
- std::string logentry_type; // the one that will get expanded in the final junit (failure, error)
- std::string output; // additional information/message generated by the assertion
-
- log_entry_t log_entry; // the type associated to the assertion (or error)
-
- bool sealed; // indicates if the entry can accept additional information
- };
-
- std::list<std::string> system_out; // sysout: additional information
- std::list<std::string> system_err; // syserr: additional information
- std::string skipping_reason;
-
- // list of failure, errors and messages (assertions message and the full log)
- std::vector< assertion_entry > assertion_entries;
-
- bool skipping;
-
- junit_log_helper(): skipping(false)
- {}
-
- void clear() {
- assertion_entries.clear();
- system_out.clear();
- system_err.clear();
- skipping_reason.clear();
- skipping = false;
- }
-
- };
- }
-
-// ************************************************************************** //
-// ************** junit_log_formatter ************** //
-// ************************************************************************** //
-
-/// JUnit logger class
-class junit_log_formatter : public unit_test_log_formatter {
-public:
-
- junit_log_formatter() : m_display_build_info(false)
- {
- // we log everything from the logger singleton point of view
- // because we need to know about all the messages/commands going to the logger
- // we decide what we put inside the logs internally
- this->m_log_level = log_successful_tests;
- m_log_level_internal = log_messages;
- }
-
- // Formatter interface
- void log_start( std::ostream&, counter_t test_cases_amount );
- void log_finish( std::ostream& );
- void log_build_info( std::ostream& );
-
- void test_unit_start( std::ostream&, test_unit const& tu );
- void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
- void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
- void test_unit_aborted( std::ostream& os, test_unit const& tu );
-
- void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
- void log_exception_finish( std::ostream& );
-
- void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
-
- using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set
- void log_entry_value( std::ostream&, const_string value );
- void log_entry_finish( std::ostream& );
-
- void entry_context_start( std::ostream&, log_level );
- void log_entry_context( std::ostream&, log_level, const_string );
- void entry_context_finish( std::ostream&, log_level );
-
- //! Discards changes in the log level
- virtual void set_log_level(log_level ll)
- {
- if(ll > log_successful_tests && ll < log_messages)
- ll = log_successful_tests;
- else if (ll > log_all_errors)
- ll = log_all_errors;
-
- this->m_log_level_internal = ll;
- }
-
- //! Instead of a regular stream, returns a file name corresponding to
- //! the current master test suite. If the file already exists, adds an index
- //! to it.
- virtual std::string get_default_stream_description() const;
-
-
-private:
- typedef std::map<test_unit_id, junit_impl::junit_log_helper> map_trace_t;
- map_trace_t map_tests;
- junit_impl::junit_log_helper runner_log_entry;
-
- junit_impl::junit_log_helper& get_current_log_entry() {
- if(list_path_to_root.empty())
- return runner_log_entry;
- map_trace_t::iterator it = map_tests.find(list_path_to_root.back());
- return (it == map_tests.end() ? runner_log_entry : it->second);
- }
-
- std::list<test_unit_id> list_path_to_root;
- bool m_display_build_info;
- bool m_is_last_assertion_or_error; // true if failure, false if error
-
- log_level m_log_level_internal;
- friend class junit_result_helper;
-};
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_JUNIT_LOG_FORMATTER__
diff --git a/src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp
deleted file mode 100644
index 1d8dec0f95f..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp
+++ /dev/null
@@ -1,72 +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 OF_XML Log formatter definition
-// ***************************************************************************
-
-#ifndef BOOST_TEST_XML_LOG_FORMATTER_020105GER
-#define BOOST_TEST_XML_LOG_FORMATTER_020105GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/unit_test_log_formatter.hpp>
-
-// STL
-#include <cstddef> // std::size_t
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-// ************************************************************************** //
-// ************** xml_log_formatter ************** //
-// ************************************************************************** //
-
-class xml_log_formatter : public unit_test_log_formatter {
-public:
- // Formatter interface
- void log_start( std::ostream&, counter_t test_cases_amount );
- void log_finish( std::ostream& );
- void log_build_info( std::ostream& );
-
- void test_unit_start( std::ostream&, test_unit const& tu );
- void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
- void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
-
- void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
- void log_exception_finish( std::ostream& );
-
- void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
- using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set
- void log_entry_value( std::ostream&, const_string value );
- void log_entry_finish( std::ostream& );
-
- void entry_context_start( std::ostream&, log_level );
- void log_entry_context( std::ostream&, log_level, const_string );
- void entry_context_finish( std::ostream&, log_level );
-
-private:
- // Data members
- const_string m_curr_tag;
- bool m_value_closed;
-};
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_XML_LOG_FORMATTER_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
deleted file mode 100644
index 8e8a6202ed4..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/results_collector.hpp
+++ /dev/null
@@ -1,148 +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/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.69.0/boost/test/tools/context.hpp b/src/third_party/boost-1.69.0/boost/test/tools/context.hpp
deleted file mode 100644
index 71650065ef4..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tools/context.hpp
+++ /dev/null
@@ -1,65 +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 : test tools context interfaces
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_CONTEXT_HPP_111712GER
-#define BOOST_TEST_TOOLS_CONTEXT_HPP_111712GER
-
-// Boost.Test
-#include <boost/test/utils/lazy_ostream.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace test_tools {
-namespace tt_detail {
-
-// ************************************************************************** //
-// ************** context_frame ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL context_frame {
- explicit context_frame( ::boost::unit_test::lazy_ostream const& context_descr );
- ~context_frame();
-
- operator bool();
-
-private:
- // Data members
- int m_frame_id;
-};
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_INFO( context_descr ) \
- ::boost::unit_test::framework::add_context( BOOST_TEST_LAZY_MSG( context_descr ) , false ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_CONTEXT( context_descr ) \
- if( ::boost::test_tools::tt_detail::context_frame BOOST_JOIN( context_frame_, __LINE__ ) = \
- ::boost::test_tools::tt_detail::context_frame( BOOST_TEST_LAZY_MSG( context_descr ) ) ) \
-/**/
-
-//____________________________________________________________________________//
-
-} // namespace tt_detail
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_CONTEXT_HPP_111712GER
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
deleted file mode 100644
index 232fad1509b..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/print_helper.hpp
+++ /dev/null
@@ -1,248 +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 <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.69.0/boost/test/tools/fpc_op.hpp b/src/third_party/boost-1.69.0/boost/test/tools/fpc_op.hpp
deleted file mode 100644
index c84820bdba0..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tools/fpc_op.hpp
+++ /dev/null
@@ -1,214 +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) \
- || (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.69.0/boost/test/tools/old/impl.hpp b/src/third_party/boost-1.69.0/boost/test/tools/old/impl.hpp
deleted file mode 100644
index b975f61b38a..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tools/old/impl.hpp
+++ /dev/null
@@ -1,358 +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 : implementation details for old toolbox
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_OLD_IMPL_HPP_012705GER
-#define BOOST_TEST_TOOLS_OLD_IMPL_HPP_012705GER
-
-// Boost.Test
-#include <boost/test/unit_test_log.hpp>
-#include <boost/test/tools/assertion_result.hpp>
-#include <boost/test/tools/floating_point_comparison.hpp>
-
-#include <boost/test/tools/detail/fwd.hpp>
-#include <boost/test/tools/detail/print_helper.hpp>
-
-// Boost
-#include <boost/limits.hpp>
-#include <boost/numeric/conversion/conversion_traits.hpp> // for numeric::conversion_traits
-#include <boost/type_traits/is_array.hpp>
-
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/arithmetic/add.hpp>
-
-// STL
-#include <cstddef> // for std::size_t
-#include <climits> // for CHAR_BIT
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace test_tools {
-namespace tt_detail {
-
-// ************************************************************************** //
-// ************** old TOOLBOX Implementation ************** //
-// ************************************************************************** //
-
-// This function adds level of indirection, but it makes sure we evaluate predicate
-// arguments only once
-
-#ifndef BOOST_TEST_PROD
-#define TEMPL_PARAMS( z, m, dummy ) , typename BOOST_JOIN( Arg, m )
-
-#define FUNC_PARAMS( z, m, dummy ) \
- , BOOST_JOIN( Arg, m ) const& BOOST_JOIN( arg, m ) \
- , char const* BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
-/**/
-
-#define PRED_PARAMS( z, m, dummy ) BOOST_PP_COMMA_IF( m ) BOOST_JOIN( arg, m )
-
-#define ARG_INFO( z, m, dummy ) \
- , BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
- , &static_cast<const unit_test::lazy_ostream&>(unit_test::lazy_ostream::instance() \
- << ::boost::test_tools::tt_detail::print_helper( BOOST_JOIN( arg, m ) )) \
-/**/
-
-#define IMPL_FRWD( z, n, dummy ) \
-template<typename Pred \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), TEMPL_PARAMS, _ )> \
-inline bool \
-check_frwd( Pred P, unit_test::lazy_ostream const& assertion_descr, \
- const_string file_name, std::size_t line_num, \
- tool_level tl, check_type ct \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), FUNC_PARAMS, _ ) \
-) \
-{ \
- return \
- report_assertion( P( BOOST_PP_REPEAT_ ## z(BOOST_PP_ADD(n, 1), PRED_PARAMS,_) ),\
- assertion_descr, file_name, line_num, tl, ct, \
- BOOST_PP_ADD( n, 1 ) \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), ARG_INFO, _ ) \
- ); \
-} \
-/**/
-
-#ifndef BOOST_TEST_MAX_PREDICATE_ARITY
-#define BOOST_TEST_MAX_PREDICATE_ARITY 5
-#endif
-
-BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
-
-#undef TEMPL_PARAMS
-#undef FUNC_PARAMS
-#undef PRED_INFO
-#undef ARG_INFO
-#undef IMPL_FRWD
-
-#endif
-
-//____________________________________________________________________________//
-
-template <class Left, class Right>
-inline assertion_result equal_impl( Left const& left, Right const& right )
-{
- return left == right;
-}
-
-//____________________________________________________________________________//
-
-inline assertion_result equal_impl( char* left, char const* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
-inline assertion_result equal_impl( char const* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
-inline assertion_result equal_impl( char* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
-
-#if !defined( BOOST_NO_CWCHAR )
-assertion_result BOOST_TEST_DECL equal_impl( wchar_t const* left, wchar_t const* right );
-inline assertion_result equal_impl( wchar_t* left, wchar_t const* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
-inline assertion_result equal_impl( wchar_t const* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
-inline assertion_result equal_impl( wchar_t* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
-#endif
-
-//____________________________________________________________________________//
-
-struct equal_impl_frwd {
- template <typename Left, typename Right>
- inline assertion_result
- call_impl( Left const& left, Right const& right, mpl::false_ ) const
- {
- return equal_impl( left, right );
- }
-
- template <typename Left, typename Right>
- inline assertion_result
- call_impl( Left const& left, Right const& right, mpl::true_ ) const
- {
- return (*this)( right, &left[0] );
- }
-
- template <typename Left, typename Right>
- inline assertion_result
- operator()( Left const& left, Right const& right ) const
- {
- typedef typename is_array<Left>::type left_is_array;
- return call_impl( left, right, left_is_array() );
- }
-};
-
-//____________________________________________________________________________//
-
-struct ne_impl {
- template <class Left, class Right>
- assertion_result operator()( Left const& left, Right const& right )
- {
- return !equal_impl_frwd()( left, right );
- }
-};
-
-//____________________________________________________________________________//
-
-struct lt_impl {
- template <class Left, class Right>
- assertion_result operator()( Left const& left, Right const& right )
- {
- return left < right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct le_impl {
- template <class Left, class Right>
- assertion_result operator()( Left const& left, Right const& right )
- {
- return left <= right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct gt_impl {
- template <class Left, class Right>
- assertion_result operator()( Left const& left, Right const& right )
- {
- return left > right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct ge_impl {
- template <class Left, class Right>
- assertion_result operator()( Left const& left, Right const& right )
- {
- return left >= right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct equal_coll_impl {
- template <typename Left, typename Right>
- assertion_result operator()( Left left_begin, Left left_end, Right right_begin, Right right_end )
- {
- assertion_result pr( true );
- std::size_t pos = 0;
-
- for( ; left_begin != left_end && right_begin != right_end; ++left_begin, ++right_begin, ++pos ) {
- if( *left_begin != *right_begin ) {
- pr = false;
- pr.message() << "\nMismatch at position " << pos << ": "
- << ::boost::test_tools::tt_detail::print_helper(*left_begin)
- << " != "
- << ::boost::test_tools::tt_detail::print_helper(*right_begin);
- }
- }
-
- if( left_begin != left_end ) {
- std::size_t r_size = pos;
- while( left_begin != left_end ) {
- ++pos;
- ++left_begin;
- }
-
- pr = false;
- pr.message() << "\nCollections size mismatch: " << pos << " != " << r_size;
- }
-
- if( right_begin != right_end ) {
- std::size_t l_size = pos;
- while( right_begin != right_end ) {
- ++pos;
- ++right_begin;
- }
-
- pr = false;
- pr.message() << "\nCollections size mismatch: " << l_size << " != " << pos;
- }
-
- return pr;
- }
-};
-
-//____________________________________________________________________________//
-
-struct bitwise_equal_impl {
- template <class Left, class Right>
- assertion_result operator()( Left const& left, Right const& right )
- {
- assertion_result pr( true );
-
- std::size_t left_bit_size = sizeof(Left)*CHAR_BIT;
- std::size_t right_bit_size = sizeof(Right)*CHAR_BIT;
-
- static Left const leftOne( 1 );
- static Right const rightOne( 1 );
-
- std::size_t total_bits = left_bit_size < right_bit_size ? left_bit_size : right_bit_size;
-
- for( std::size_t counter = 0; counter < total_bits; ++counter ) {
- if( ( left & ( leftOne << counter ) ) != ( right & ( rightOne << counter ) ) ) {
- pr = false;
- pr.message() << "\nMismatch at position " << counter;
- }
- }
-
- if( left_bit_size != right_bit_size ) {
- pr = false;
- pr.message() << "\nOperands bit sizes mismatch: " << left_bit_size << " != " << right_bit_size;
- }
-
- return pr;
- }
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT1, typename FPT2>
-struct comp_supertype {
- // deduce "better" type from types of arguments being compared
- // if one type is floating and the second integral we use floating type and
- // value of integral type is promoted to the floating. The same for float and double
- // But we don't want to compare two values of integral types using this tool.
- typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype type;
- BOOST_STATIC_ASSERT_MSG( !is_integral<type>::value, "Only floating-point types can be compared!");
-};
-
-} // namespace tt_detail
-
-namespace fpc = math::fpc;
-
-// ************************************************************************** //
-// ************** check_is_close ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL check_is_close_t {
- // Public typedefs
- typedef assertion_result result_type;
-
- template<typename FPT1, typename FPT2, typename ToleranceType>
- assertion_result
- operator()( FPT1 left, FPT2 right, ToleranceType tolerance ) const
- {
- fpc::close_at_tolerance<typename tt_detail::comp_supertype<FPT1,FPT2>::type> pred( tolerance, fpc::FPC_STRONG );
-
- assertion_result ar( pred( left, right ) );
-
- if( !ar )
- ar.message() << pred.tested_rel_diff();
-
- return ar;
- }
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT1, typename FPT2, typename ToleranceType>
-inline assertion_result
-check_is_close( FPT1 left, FPT2 right, ToleranceType tolerance )
-{
- return check_is_close_t()( left, right, tolerance );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** check_is_small ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL check_is_small_t {
- // Public typedefs
- typedef bool result_type;
-
- template<typename FPT>
- bool
- operator()( FPT fpv, FPT tolerance ) const
- {
- return fpc::is_small( fpv, tolerance );
- }
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-inline bool
-check_is_small( FPT fpv, FPT tolerance )
-{
- return fpc::is_small( fpv, tolerance );
-}
-
-//____________________________________________________________________________//
-
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_OLD_IMPL_HPP_012705GER
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp b/src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp
deleted file mode 100644
index 2d6f8b78c0c..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp
+++ /dev/null
@@ -1,282 +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: 81247 $
-//
-// Description : contains definition for all test tools in old test toolbox
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_OLD_INTERFACE_HPP_111712GER
-#define BOOST_TEST_TOOLS_OLD_INTERFACE_HPP_111712GER
-
-// Boost
-#include <boost/preprocessor/seq/for_each.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/seq/to_tuple.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** TOOL BOX ************** //
-// ************************************************************************** //
-
-// In macros below following argument abbreviations are used:
-// P - predicate
-// M - message
-// S - statement
-// E - exception
-// L - left argument
-// R - right argument
-// TL - tool level
-// CT - check type
-// ARGS - arguments list (as PP sequence)
-
-// frwd_type:
-// 0 - args exists and need to be forwarded; call check_frwd
-// 1 - args exists, but do not need to be forwarded; call report_assertion directly
-// 2 - no arguments; call report_assertion directly
-
-#define BOOST_TEST_TOOL_PASS_PRED0( P, ARGS ) P
-#define BOOST_TEST_TOOL_PASS_PRED1( P, ARGS ) P BOOST_PP_SEQ_TO_TUPLE(ARGS)
-#define BOOST_TEST_TOOL_PASS_PRED2( P, ARGS ) P
-
-#define BOOST_TEST_TOOL_PASS_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg )
-#define BOOST_TEST_TOOL_PASS_ARG_DSCR( r, _, arg ) , BOOST_STRINGIZE( arg )
-
-#define BOOST_TEST_TOOL_PASS_ARGS0( ARGS ) \
- BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG, _, ARGS )
-#define BOOST_TEST_TOOL_PASS_ARGS1( ARGS ) \
- , BOOST_PP_SEQ_SIZE(ARGS) BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG_DSCR, _, ARGS )
-#define BOOST_TEST_TOOL_PASS_ARGS2( ARGS ) \
- , 0
-
-#define BOOST_TEST_TOOL_IMPL( frwd_type, P, assertion_descr, TL, CT, ARGS ) \
-do { \
- BOOST_TEST_PASSPOINT(); \
- ::boost::test_tools::tt_detail:: \
- BOOST_PP_IF( frwd_type, report_assertion, check_frwd ) ( \
- BOOST_JOIN( BOOST_TEST_TOOL_PASS_PRED, frwd_type )( P, ARGS ), \
- BOOST_TEST_LAZY_MSG( assertion_descr ), \
- BOOST_TEST_L(__FILE__), \
- static_cast<std::size_t>(__LINE__), \
- ::boost::test_tools::tt_detail::TL, \
- ::boost::test_tools::tt_detail::CT \
- BOOST_JOIN( BOOST_TEST_TOOL_PASS_ARGS, frwd_type )( ARGS ) ); \
-} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN( P ) BOOST_TEST_TOOL_IMPL( 2, \
- (P), BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED, _ )
-#define BOOST_CHECK( P ) BOOST_TEST_TOOL_IMPL( 2, \
- (P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED, _ )
-#define BOOST_REQUIRE( P ) BOOST_TEST_TOOL_IMPL( 2, \
- (P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED, _ )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, WARN, CHECK_MSG, _ )
-#define BOOST_CHECK_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, CHECK, CHECK_MSG, _ )
-#define BOOST_REQUIRE_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, REQUIRE, CHECK_MSG, _ )
-
-//____________________________________________________________________________//
-
-#define BOOST_ERROR( M ) BOOST_CHECK_MESSAGE( false, M )
-#define BOOST_FAIL( M ) BOOST_REQUIRE_MESSAGE( false, M )
-
-//____________________________________________________________________________//
-
-#define BOOST_CHECK_THROW_IMPL( S, E, P, postfix, TL ) \
-do { \
- try { \
- BOOST_TEST_PASSPOINT(); \
- S; \
- BOOST_TEST_TOOL_IMPL( 2, false, "exception " BOOST_STRINGIZE(E) " expected but not raised", \
- TL, CHECK_MSG, _ ); \
- } catch( E const& ex ) { \
- ::boost::unit_test::ut_detail::ignore_unused_variable_warning( ex ); \
- BOOST_TEST_TOOL_IMPL( 2, P, \
- "exception \"" BOOST_STRINGIZE( E )"\" raised as expected" postfix, \
- TL, CHECK_MSG, _ ); \
- } \
-} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_THROW( S, E ) BOOST_CHECK_THROW_IMPL( S, E, true, "", WARN )
-#define BOOST_CHECK_THROW( S, E ) BOOST_CHECK_THROW_IMPL( S, E, true, "", CHECK )
-#define BOOST_REQUIRE_THROW( S, E ) BOOST_CHECK_THROW_IMPL( S, E, true, "", REQUIRE )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_EXCEPTION( S, E, P ) BOOST_CHECK_THROW_IMPL( S, E, P( ex ), \
- ": validation on the raised exception through predicate \"" BOOST_STRINGIZE(P) "\"", WARN )
-#define BOOST_CHECK_EXCEPTION( S, E, P ) BOOST_CHECK_THROW_IMPL( S, E, P( ex ), \
- ": validation on the raised exception through predicate \"" BOOST_STRINGIZE(P) "\"", CHECK )
-#define BOOST_REQUIRE_EXCEPTION( S, E, P ) BOOST_CHECK_THROW_IMPL( S, E, P( ex ), \
- ": validation on the raised exception through predicate \"" BOOST_STRINGIZE(P) "\"", REQUIRE )
-
-//____________________________________________________________________________//
-
-#define BOOST_CHECK_NO_THROW_IMPL( S, TL ) \
-do { \
- try { \
- S; \
- BOOST_TEST_TOOL_IMPL( 2, true, "no exceptions thrown by " BOOST_STRINGIZE( S ), \
- TL, CHECK_MSG, _ ); \
- } catch( ... ) { \
- BOOST_TEST_TOOL_IMPL( 2, false, "unexpected exception thrown by " BOOST_STRINGIZE( S ), \
- TL, CHECK_MSG, _ ); \
- } \
-} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
-/**/
-
-#define BOOST_WARN_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, WARN )
-#define BOOST_CHECK_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, CHECK )
-#define BOOST_REQUIRE_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::equal_impl_frwd(), "", WARN, CHECK_EQUAL, (L)(R) )
-#define BOOST_CHECK_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK, CHECK_EQUAL, (L)(R) )
-#define BOOST_REQUIRE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::equal_impl_frwd(), "", REQUIRE, CHECK_EQUAL, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_NE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::ne_impl(), "", WARN, CHECK_NE, (L)(R) )
-#define BOOST_CHECK_NE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::ne_impl(), "", CHECK, CHECK_NE, (L)(R) )
-#define BOOST_REQUIRE_NE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::ne_impl(), "", REQUIRE, CHECK_NE, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_LT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::lt_impl(), "", WARN, CHECK_LT, (L)(R) )
-#define BOOST_CHECK_LT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::lt_impl(), "", CHECK, CHECK_LT, (L)(R) )
-#define BOOST_REQUIRE_LT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::lt_impl(), "", REQUIRE, CHECK_LT, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_LE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::le_impl(), "", WARN, CHECK_LE, (L)(R) )
-#define BOOST_CHECK_LE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::le_impl(), "", CHECK, CHECK_LE, (L)(R) )
-#define BOOST_REQUIRE_LE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::le_impl(), "", REQUIRE, CHECK_LE, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_GT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::gt_impl(), "", WARN, CHECK_GT, (L)(R) )
-#define BOOST_CHECK_GT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::gt_impl(), "", CHECK, CHECK_GT, (L)(R) )
-#define BOOST_REQUIRE_GT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::gt_impl(), "", REQUIRE, CHECK_GT, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_GE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::ge_impl(), "", WARN, CHECK_GE, (L)(R) )
-#define BOOST_CHECK_GE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::ge_impl(), "", CHECK, CHECK_GE, (L)(R) )
-#define BOOST_REQUIRE_GE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::tt_detail::ge_impl(), "", REQUIRE, CHECK_GE, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_CLOSE( L, R, T ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_close_t(), "", WARN, CHECK_CLOSE, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
-#define BOOST_CHECK_CLOSE( L, R, T ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_close_t(), "", CHECK, CHECK_CLOSE, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
-#define BOOST_REQUIRE_CLOSE( L, R, T ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_close_t(), "", REQUIRE, CHECK_CLOSE, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_CLOSE_FRACTION(L, R, T) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_close_t(), "", WARN, CHECK_CLOSE_FRACTION, (L)(R)(T) )
-#define BOOST_CHECK_CLOSE_FRACTION(L, R, T) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_close_t(), "", CHECK, CHECK_CLOSE_FRACTION, (L)(R)(T) )
-#define BOOST_REQUIRE_CLOSE_FRACTION(L,R,T) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_close_t(), "", REQUIRE, CHECK_CLOSE_FRACTION, (L)(R)(T) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_SMALL( FPV, T ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_small_t(), "", WARN, CHECK_SMALL, (FPV)(T) )
-#define BOOST_CHECK_SMALL( FPV, T ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_small_t(), "", CHECK, CHECK_SMALL, (FPV)(T) )
-#define BOOST_REQUIRE_SMALL( FPV, T ) BOOST_TEST_TOOL_IMPL( 0, \
- ::boost::test_tools::check_is_small_t(), "", REQUIRE, CHECK_SMALL, (FPV)(T) )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_PREDICATE( P, ARGS ) BOOST_TEST_TOOL_IMPL( 0, \
- P, BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED_WITH_ARGS, ARGS )
-#define BOOST_CHECK_PREDICATE( P, ARGS ) BOOST_TEST_TOOL_IMPL( 0, \
- P, BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED_WITH_ARGS, ARGS )
-#define BOOST_REQUIRE_PREDICATE( P, ARGS ) BOOST_TEST_TOOL_IMPL( 0, \
- P, BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED_WITH_ARGS, ARGS )
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end ) \
- BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::equal_coll_impl(), \
- "", WARN, CHECK_EQUAL_COLL, (L_begin)(L_end)(R_begin)(R_end) ) \
-/**/
-#define BOOST_CHECK_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end ) \
- BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::equal_coll_impl(), \
- "", CHECK, CHECK_EQUAL_COLL, (L_begin)(L_end)(R_begin)(R_end) ) \
-/**/
-#define BOOST_REQUIRE_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end ) \
- BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::equal_coll_impl(), \
- "", REQUIRE, CHECK_EQUAL_COLL, (L_begin)(L_end)(R_begin)(R_end) ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_WARN_BITWISE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 1, \
- ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", WARN, CHECK_BITWISE_EQUAL, (L)(R) )
-#define BOOST_CHECK_BITWISE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 1, \
- ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", CHECK, CHECK_BITWISE_EQUAL, (L)(R) )
-#define BOOST_REQUIRE_BITWISE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 1, \
- ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", REQUIRE, CHECK_BITWISE_EQUAL, (L)(R) )
-
-//____________________________________________________________________________//
-
-#define BOOST_IS_DEFINED( symb ) ::boost::test_tools::tt_detail::is_defined_impl( #symb, BOOST_STRINGIZE(= symb) )
-
-//____________________________________________________________________________//
-
-#ifdef BOOST_TEST_NO_NEW_TOOLS
-
-#define BOOST_TEST_WARN( P ) BOOST_WARN( P )
-#define BOOST_TEST_CHECK( P ) BOOST_CHECK( P )
-#define BOOST_TEST_REQUIRE( P ) BOOST_REQUIRE( P )
-
-#define BOOST_TEST( P ) BOOST_CHECK( P )
-
-#endif
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_OLD_INTERFACE_HPP_111712GER
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
deleted file mode 100644
index 6537152538d..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tree/decorator.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 : $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.69.0/boost/test/tree/global_fixture.hpp b/src/third_party/boost-1.69.0/boost/test/tree/global_fixture.hpp
deleted file mode 100644
index 7c96d34e898..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tree/global_fixture.hpp
+++ /dev/null
@@ -1,123 +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 global_fixture
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
-#define BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-
-#include <boost/test/tree/observer.hpp>
-#include <boost/test/tree/fixture.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** global_configuration ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL global_configuration : public test_observer {
-
-public:
- // Constructor
- global_configuration();
-
- // Dtor
- virtual ~global_configuration();
-
- // Happens after the framework global observer init has been done
- virtual int priority() { return 1; }
-};
-
-
-
-// ************************************************************************** //
-// ************** global_fixture ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL global_fixture : public test_unit_fixture {
-
-public:
- // Constructor
- global_fixture();
-
- // Dtor
- virtual ~global_fixture();
-};
-
-//____________________________________________________________________________//
-
-namespace ut_detail {
-
-template<typename F>
-struct global_configuration_impl : public global_configuration {
- // Constructor
- global_configuration_impl() : m_configuration_observer( 0 ) {
- }
-
- // test observer interface
- virtual void test_start( counter_t ) {
- m_configuration_observer = new F;
- }
-
- // test observer interface
- virtual void test_finish() {
- if(m_configuration_observer) {
- delete m_configuration_observer;
- m_configuration_observer = 0;
- }
- }
-private:
- // Data members
- F* m_configuration_observer;
-};
-
-template<typename F>
-struct global_fixture_impl : public global_fixture {
- // Constructor
- global_fixture_impl() : m_fixture( 0 ) {
- }
-
- // test fixture interface
- virtual void setup() {
- m_fixture = new F;
- setup_conditional(*m_fixture);
- }
-
- // test fixture interface
- virtual void teardown() {
- if(m_fixture) {
- teardown_conditional(*m_fixture);
- }
- delete m_fixture;
- m_fixture = 0;
- }
-
-private:
- // Data members
- F* m_fixture;
-};
-
-} // namespace ut_detail
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
-
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/observer.hpp b/src/third_party/boost-1.69.0/boost/test/tree/observer.hpp
deleted file mode 100644
index bd6fc9bff59..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tree/observer.hpp
+++ /dev/null
@@ -1,116 +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 abstract interface for test observer
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TEST_OBSERVER_HPP_021005GER
-#define BOOST_TEST_TEST_OBSERVER_HPP_021005GER
-
-// Boost.Test
-#include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/config.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** test_observer ************** //
-// ************************************************************************** //
-
-/// @brief Generic test observer interface
-///
-/// This interface is used by observers in order to receive notifications from the
-/// Boost.Test framework on the current execution state.
-///
-/// Several observers can be running at the same time, and it is not unusual to
-/// have interactions among them. The @ref test_observer::priority member function allows the specification
-/// of a particular order among them (lowest priority executed first, except specified otherwise).
-///
-class BOOST_TEST_DECL test_observer {
-public:
-
- //! Called before the framework starts executing the test cases
- //!
- //! @param[in] number_of_test_cases indicates the number of test cases. Only active
- //! test cases are taken into account.
- virtual void test_start( counter_t /* number_of_test_cases */ ) {}
-
- //! Called after the framework ends executing the test cases
- //!
- //! @note The call is made with a reversed priority order.
- virtual void test_finish() {}
-
- //! Called when a critical error is detected
- //!
- //! The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework.
- //! Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining
- //! tests are discarded.
- //!
- //! @note may be called before test_observer::test_unit_finish()
- virtual void test_aborted() {}
-
- //! Called before the framework starts executing a test unit
- //!
- //! @param[in] test_unit the test being executed
- virtual void test_unit_start( test_unit const& /* test */) {}
-
- //! Called at each end of a test unit.
- //!
- //! @param elapsed duration of the test unit in microseconds.
- virtual void test_unit_finish( test_unit const& /* test */, unsigned long /* elapsed */ ) {}
- virtual void test_unit_skipped( test_unit const& tu, const_string ) { test_unit_skipped( tu ); }
- virtual void test_unit_skipped( test_unit const& ) {} ///< backward compatibility
-
- //! Called when a test unit indicates a fatal error.
- //!
- //! A fatal error happens when
- //! - a strong assertion (with @c REQUIRE) fails, which indicates that the test case cannot continue
- //! - an unexpected exception is caught by the Boost.Test framework
- virtual void test_unit_aborted( test_unit const& ) {}
-
- virtual void assertion_result( unit_test::assertion_result ar )
- {
- switch( ar ) {
- case AR_PASSED: assertion_result( true ); break;
- case AR_FAILED: assertion_result( false ); break;
- case AR_TRIGGERED: break;
- default: break;
- }
- }
-
- //! Called when an exception is intercepted
- //!
- //! In case an exception is intercepted, this call happens before the call
- //! to @ref test_unit_aborted in order to log
- //! additional data about the exception.
- virtual void exception_caught( execution_exception const& ) {}
-
- //! The priority indicates the order at which this observer is initialized
- //! and tore down in the UTF framework. The order is lowest to highest priority.
- virtual int priority() { return 0; }
-
-protected:
- //! Deprecated
- virtual void assertion_result( bool /* passed */ ) {}
-
- BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
-};
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER
-
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
deleted file mode 100644
index e8629802208..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tree/test_case_template.hpp
+++ /dev/null
@@ -1,192 +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/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
deleted file mode 100644
index 48033af8977..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/tree/test_unit.hpp
+++ /dev/null
@@ -1,293 +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_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.69.0/boost/test/unit_test_log.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_log.hpp
deleted file mode 100644
index d65a728747c..00000000000
--- a/src/third_party/boost-1.69.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/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.69.0/boost/test/unit_test_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_log_formatter.hpp
deleted file mode 100644
index 79b74e08493..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/unit_test_log_formatter.hpp
+++ /dev/null
@@ -1,322 +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 log formatter interface
-///
-/// You can define a class with implements this interface and use an instance of it
-/// as a Unit Test Framework log formatter
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
-#define BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/log_level.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-
-// STL
-#include <iosfwd>
-#include <string> // for std::string
-#include <iostream>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-/// Collection of log entry attributes
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL log_entry_data {
- log_entry_data()
- {
- m_file_name.reserve( 200 );
- }
-
- std::string m_file_name; ///< log entry file name
- std::size_t m_line_num; ///< log entry line number
- log_level m_level; ///< log entry level
-
- void clear()
- {
- m_file_name.erase();
- m_line_num = 0;
- m_level = log_nothing;
- }
-};
-
-// ************************************************************************** //
-/// Collection of log checkpoint attributes
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL log_checkpoint_data
-{
- const_string m_file_name; ///< log checkpoint file name
- std::size_t m_line_num; ///< log checkpoint file name
- std::string m_message; ///< log checkpoint message
-
- void clear()
- {
- m_file_name.clear();
- m_line_num = 0;
- m_message = std::string();
- }
-};
-
-// ************************************************************************** //
-/// @brief Abstract Unit Test Framework log formatter interface
-///
-/// During the test module execution Unit Test Framework can report messages about success
-/// or failure of assertions, which test suites are being run and more (specifically which
-/// messages are reported depends on log level threshold selected by the user).
-///
-/// All these messages constitute Unit Test Framework log. There are many ways (formats) to present
-/// these messages to the user.
-///
-/// Boost.Test comes with three formats:
-/// - Compiler-like log format: intended for human consumption/diagnostic
-/// - XML based log format: intended for processing by automated regression test systems.
-/// - JUNIT based log format: intended for processing by automated regression test systems.
-///
-/// If you want to produce some other format you need to implement class with specific interface and use
-/// method @c unit_test_log_t::set_formatter during a test module initialization to set an active formatter.
-/// The class unit_test_log_formatter defines this interface.
-///
-/// This interface requires you to format all possible messages being produced in the log.
-/// These includes error messages about failed assertions, messages about caught exceptions and
-/// information messages about test units being started/ended. All the methods in this interface takes
-/// a reference to standard stream as a first argument. This is where final messages needs to be directed
-/// to. Also you are given all the information necessary to produce a message.
-///
-/// @par Since Boost 1.62:
-/// - Each formatter may indicate the default output stream. This is convenient for instance for streams intended
-/// for automated processing that indicate a file. See @c get_default_stream_description for more details.
-/// - Each formatter may manage its own log level through the getter/setter @c get_log_level and @c set_log_level .
-///
-/// @see
-/// - boost::unit_test::test_observer for an indication of the calls of the test observer interface
-class BOOST_TEST_DECL unit_test_log_formatter {
-public:
- /// Types of log entries (messages written into a log)
- enum log_entry_types { BOOST_UTL_ET_INFO, ///< Information message from the framework
- BOOST_UTL_ET_MESSAGE, ///< Information message from the user
- BOOST_UTL_ET_WARNING, ///< Warning (non error) condition notification message
- BOOST_UTL_ET_ERROR, ///< Non fatal error notification message
- BOOST_UTL_ET_FATAL_ERROR ///< Fatal error notification message
- };
-
- //! Constructor
- unit_test_log_formatter()
- : m_log_level(log_all_errors)
- {}
-
- // Destructor
- virtual ~unit_test_log_formatter() {}
-
- // @name Test start/finish
-
- /// Invoked at the beginning of test module execution
- ///
- /// @param[in] os output stream to write a messages to
- /// @param[in] test_cases_amount total test case amount to be run
- /// @see log_finish
- virtual void log_start( std::ostream& os, counter_t test_cases_amount ) = 0;
-
- /// Invoked at the end of test module execution
- ///
- /// @param[in] os output stream to write a messages into
- /// @see log_start
- virtual void log_finish( std::ostream& os ) = 0;
-
- /// Invoked when Unit Test Framework build information is requested
- ///
- /// @param[in] os output stream to write a messages into
- virtual void log_build_info( std::ostream& os ) = 0;
- // @}
-
- // @name Test unit start/finish
-
- /// Invoked when test unit starts (either test suite or test case)
- ///
- /// @param[in] os output stream to write a messages into
- /// @param[in] tu test unit being started
- /// @see test_unit_finish
- virtual void test_unit_start( std::ostream& os, test_unit const& tu ) = 0;
-
- /// Invoked when test unit finishes
- ///
- /// @param[in] os output stream to write a messages into
- /// @param[in] tu test unit being finished
- /// @param[in] elapsed time in microseconds spend executing this test unit
- /// @see test_unit_start
- virtual void test_unit_finish( std::ostream& os, test_unit const& tu, unsigned long elapsed ) = 0;
-
- /// Invoked if test unit skipped for any reason
- ///
- /// @param[in] os output stream to write a messages into
- /// @param[in] tu skipped test unit
- /// @param[in] reason explanation why was it skipped
- virtual void test_unit_skipped( std::ostream& os, test_unit const& tu, const_string /* reason */)
- {
- test_unit_skipped( os, tu );
- }
-
- /// Deprecated version of this interface
- virtual void test_unit_skipped( std::ostream& /* os */, test_unit const& /* tu */) {}
-
- /// Invoked when a test unit is aborted
- virtual void test_unit_aborted( std::ostream& /* os */, test_unit const& /* tu */) {}
-
- // @}
-
- // @name Uncaught exception report
-
- /// Invoked when Unit Test Framework detects uncaught exception
- ///
- /// The framwork calls this function when an uncaught exception it detected.
- /// This call is followed by context information:
- /// - one call to @c entry_context_start,
- /// - as many calls to @c log_entry_context as there are context entries
- /// - one call to @c entry_context_finish
- ///
- /// The logging of the exception information is finilized by a call to @c log_exception_finish.
- ///
- /// @param[in] os output stream to write a messages into
- /// @param[in] lcd information about the last checkpoint before the exception was triggered
- /// @param[in] ex information about the caught exception
- /// @see log_exception_finish
- virtual void log_exception_start( std::ostream& os, log_checkpoint_data const& lcd, execution_exception const& ex ) = 0;
-
- /// Invoked when Unit Test Framework detects uncaught exception
- ///
- /// Call to this function finishes uncaught exception report.
- /// @param[in] os output stream to write a messages into
- /// @see log_exception_start
- virtual void log_exception_finish( std::ostream& os ) = 0;
- // @}
-
- // @name Regular log entry
-
- /// Invoked by Unit Test Framework to start new log entry
-
- /// Call to this function starts new log entry. It is followed by series of log_entry_value calls and finally call to log_entry_finish.
- /// A log entry may consist of one or more values being reported. Some of these values will be plain strings, while others can be complicated
- /// expressions in a form of "lazy" expression template lazy_ostream.
- /// @param[in] os output stream to write a messages into
- /// @param[in] led log entry attributes
- /// @param[in] let log entry type log_entry_finish
- /// @see log_entry_value, log_entry_finish
- ///
- /// @note call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the
- /// framework might log errors raised during global initialization/shutdown.
- virtual void log_entry_start( std::ostream& os, log_entry_data const& led, log_entry_types let ) = 0;
-
- /// Invoked by Unit Test Framework to report a log entry content
- ///
- /// This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
- /// @param[in] os output stream to write a messages into.
- /// @param[in] value log entry string value
- /// @see log_entry_start, log_entry_finish
- virtual void log_entry_value( std::ostream& os, const_string value ) = 0;
-
- /// Invoked by Unit Test Framework to report a log entry content
-
- /// This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as
- /// an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts
- /// the lazy expression into a string.
- /// @param[in] os output stream to write a messages into
- /// @param[in] value log entry "lazy" value
- /// @see log_entry_start, log_entry_finish
- virtual void log_entry_value( std::ostream& os, lazy_ostream const& value ); // there is a default impl
-
- /// Invoked by Unit Test Framework to finish a log entry report
-
- /// @param[in] os output stream to write a messages into
- /// @see log_entry_start, log_entry_start
- virtual void log_entry_finish( std::ostream& os ) = 0;
- // @}
-
- // @name Log entry context report
-
- /// Invoked by Unit Test Framework to start log entry context report
- //
- /// Unit Test Framework logs for failed assertions and uncaught exceptions context if one was defined by a test module.
- /// Context consists of multiple "scopes" identified by description messages assigned by the test module using
- /// BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
- /// @param[in] os output stream to write a messages into
- /// @param[in] l entry log_level, to be used to fine tune the message
- /// @see log_entry_context, entry_context_finish
- virtual void entry_context_start( std::ostream& os, log_level l ) = 0;
-
- /// Invoked by Unit Test Framework to report log entry context "scope" description
- //
- /// Each "scope" description is reported by separate call to log_entry_context.
- /// @param[in] os output stream to write a messages into
- /// @param[in] l entry log_level, to be used to fine tune the message
- /// @param[in] value context "scope" description
- /// @see log_entry_start, entry_context_finish
- virtual void log_entry_context( std::ostream& os, log_level l, const_string value ) = 0;
-
- /// Invoked by Unit Test Framework to finish log entry context report
- ///
- /// @param[in] os output stream to write a messages into
- /// @param[in] l entry log_level, to be used to fine tune the message
- /// @see log_entry_start, entry_context_context
- virtual void entry_context_finish( std::ostream& os, log_level l ) = 0;
- // @}
-
- // @name Log level management
-
- /// Sets the log level of the logger/formatter
- ///
- /// Some loggers need to manage the log level by their own. This
- /// member function let the implementation decide of that.
- /// @par Since Boost 1.62
- virtual void set_log_level(log_level new_log_level);
-
- /// Returns the log level of the logger/formatter
- /// @par Since Boost 1.62
- virtual log_level get_log_level() const;
- // @}
-
-
- // @name Stream management
-
- /// Returns a default stream for this logger.
- ///
- /// The returned string describes the stream as if it was passed from
- /// the command line @c "--log_sink" parameter. With that regards, @b stdout and @b stderr
- /// have special meaning indicating the standard output or error stream respectively.
- ///
- /// @par Since Boost 1.62
- virtual std::string get_default_stream_description() const
- {
- return "stdout";
- }
-
- // @}
-
-
-protected:
- log_level m_log_level;
-
-};
-
-} // namespace unit_test
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
-
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
deleted file mode 100644
index b056051cafa..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/unit_test_monitor.hpp
+++ /dev/null
@@ -1,61 +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/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.69.0/boost/test/unit_test_suite.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_suite.hpp
deleted file mode 100644
index 698362e5881..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/unit_test_suite.hpp
+++ /dev/null
@@ -1,405 +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_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.69.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
deleted file mode 100644
index cec0214b736..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring.hpp
+++ /dev/null
@@ -1,749 +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 : class basic_cstring wraps C string and provide std_string like
-// interface
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_BASIC_CSTRING_HPP
-#define BOOST_TEST_UTILS_BASIC_CSTRING_HPP
-
-// Boost.Test
-#include <boost/test/utils/basic_cstring/basic_cstring_fwd.hpp>
-#include <boost/test/utils/basic_cstring/bcs_char_traits.hpp>
-
-// Boost
-#include <boost/type_traits/remove_cv.hpp>
-
-// STL
-#include <string>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** basic_cstring ************** //
-// ************************************************************************** //
-
-template<typename CharT>
-class basic_cstring {
- typedef basic_cstring<CharT> self_type;
-public:
- // Subtypes
- typedef ut_detail::bcs_char_traits<CharT> traits_type;
- typedef typename traits_type::std_string std_string;
-
- typedef CharT value_type;
- typedef typename remove_cv<value_type>::type value_ret_type;
- typedef value_type* pointer;
- typedef value_type const* const_pointer;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
- typedef value_type const* const_iterator;
- typedef value_type* iterator;
-
- // !! should also present reverse_iterator, const_reverse_iterator
-
-#if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) && !defined(__DCC__)
- BOOST_STATIC_CONSTANT(size_type, npos = static_cast<size_type>(-1));
-#else
- // IBM/VisualAge version 6 is not able to handle enums larger than 4 bytes.
- // But size_type is 8 bytes in 64bit mode.
- static const size_type npos = -1 ;
-#endif
-
- static pointer null_str();
-
- // Constructors; default copy constructor is generated by compiler
- basic_cstring();
- basic_cstring( basic_cstring const & );
- basic_cstring( std_string const& s );
- basic_cstring( pointer s );
- template<typename LenType>
- basic_cstring( pointer s, LenType len ) : m_begin( s ), m_end( m_begin + len ) {}
- basic_cstring( pointer first, pointer last );
-
- // data access methods
- value_ret_type operator[]( size_type index ) const;
- value_ret_type at( size_type index ) const;
-
- // size operators
- size_type size() const;
- bool is_empty() const;
- void clear();
- void resize( size_type new_len );
-
- // !! only for STL container conformance use is_empty instead
- bool empty() const;
-
- // Trimming
- self_type& trim_right( size_type trim_size );
- self_type& trim_left( size_type trim_size );
- self_type& trim_right( iterator it );
- self_type& trim_left( iterator it );
-#if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(800))
- self_type& trim_left( self_type exclusions = self_type() ) ;
- self_type& trim_right( self_type exclusions = self_type() ) ;
- self_type& trim( self_type exclusions = self_type() ) ;
-#else
- // VA C++/XL C++ v6 and v8 has in this case a problem with the default arguments.
- self_type& trim_left( self_type exclusions );
- self_type& trim_right( self_type exclusions );
- self_type& trim( self_type exclusions );
- self_type& trim_left() { return trim_left( self_type() ); }
- self_type& trim_right() { return trim_right( self_type() ); }
- self_type& trim() { return trim( self_type() ); }
-#endif
-
- // Assignment operators
- basic_cstring& operator=( self_type const& s );
- basic_cstring& operator=( std_string const& s );
- basic_cstring& operator=( pointer s );
-
- template<typename CharT2>
- basic_cstring& assign( basic_cstring<CharT2> const& s )
- {
- return *this = basic_cstring<CharT>( s.begin(), s.end() );
- }
- template<typename PosType, typename LenType>
- basic_cstring& assign( self_type const& s, PosType pos, LenType len )
- {
- return *this = self_type( s.m_begin + pos, len );
- }
-
- basic_cstring& assign( std_string const& s );
- template<typename PosType, typename LenType>
- basic_cstring& assign( std_string const& s, PosType pos, LenType len )
- {
- return *this = self_type( s.c_str() + pos, len );
- }
- basic_cstring& assign( pointer s );
- template<typename LenType>
- basic_cstring& assign( pointer s, LenType len )
- {
- return *this = self_type( s, len );
- }
- basic_cstring& assign( pointer f, pointer l );
-
- // swapping
- void swap( self_type& s );
-
- // Iterators
- iterator begin();
- const_iterator begin() const;
- iterator end();
- const_iterator end() const;
-
- // !! should have rbegin, rend
-
- // substring search operation
- size_type find( basic_cstring ) const;
- size_type rfind( basic_cstring ) const;
- self_type substr( size_type beg_index, size_type end_index = npos ) const;
-
-private:
- static self_type default_trim_ex();
-
- // Data members
- iterator m_begin;
- iterator m_end;
-};
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::pointer
-basic_cstring<CharT>::null_str()
-{
- static CharT null = 0;
- return &null;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline
-basic_cstring<CharT>::basic_cstring()
-: m_begin( null_str() )
-, m_end( m_begin )
-{
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline
-basic_cstring<CharT>::basic_cstring(basic_cstring const & s)
-: m_begin( s.m_begin )
-, m_end( s.m_end )
-{
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline
-basic_cstring<CharT>::basic_cstring( std_string const& s )
-: m_begin( s.c_str() )
-, m_end( m_begin + s.size() )
-{
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline
-basic_cstring<CharT>::basic_cstring( pointer s )
-: m_begin( s ? s : null_str() )
-, m_end ( m_begin + (s ? traits_type::length( s ) : 0 ) )
-{
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline
-basic_cstring<CharT>::basic_cstring( pointer first, pointer last )
-: m_begin( first )
-, m_end( last )
-{
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::value_ret_type
-basic_cstring<CharT>::operator[]( size_type index ) const
-{
- return m_begin[index];
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::value_ret_type
-basic_cstring<CharT>::at( size_type index ) const
-{
- if( m_begin + index >= m_end )
- return static_cast<value_type>(0);
-
- return m_begin[index];
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::size_type
-basic_cstring<CharT>::size() const
-{
- return static_cast<size_type>(m_end - m_begin);
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-basic_cstring<CharT>::is_empty() const
-{
- return m_end == m_begin;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-basic_cstring<CharT>::empty() const
-{
- return is_empty();
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline void
-basic_cstring<CharT>::clear()
-{
- m_begin = m_end;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline void
-basic_cstring<CharT>::resize( size_type new_len )
-{
- if( m_begin + new_len < m_end )
- m_end = m_begin + new_len;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim_left( size_type trim_size )
-{
- m_begin += trim_size;
- if( m_end <= m_begin )
- clear();
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim_left( iterator it )
-{
- m_begin = it;
- if( m_end <= m_begin )
- clear();
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim_left( basic_cstring exclusions )
-{
- if( exclusions.is_empty() )
- exclusions = default_trim_ex();
-
- iterator it;
- for( it = begin(); it != end(); ++it ) {
- if( traits_type::find( exclusions.begin(), exclusions.size(), *it ) == reinterpret_cast<pointer>(0) )
- break;
- }
-
- return trim_left( it );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim_right( size_type trim_size )
-{
- m_end -= trim_size;
- if( m_end <= m_begin )
- clear();
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim_right( iterator it )
-{
- m_end = it;
- if( m_end <= m_begin )
- clear();
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim_right( basic_cstring exclusions )
-{
- if( exclusions.is_empty() )
- exclusions = default_trim_ex();
-
- iterator it;
-
- for( it = end()-1; it != begin()-1; --it ) {
- if( self_type::traits_type::find( exclusions.begin(), exclusions.size(), *it ) == reinterpret_cast<pointer>(0) )
- break;
- }
-
- return trim_right( it+1 );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::trim( basic_cstring exclusions )
-{
- trim_left( exclusions );
- trim_right( exclusions );
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::operator=( basic_cstring<CharT> const& s )
-{
- m_begin = s.m_begin;
- m_end = s.m_end;
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::operator=( std_string const& s )
-{
- return *this = self_type( s );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::operator=( pointer s )
-{
- return *this = self_type( s );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::assign( std_string const& s )
-{
- return *this = self_type( s );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::assign( pointer s )
-{
- return *this = self_type( s );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>&
-basic_cstring<CharT>::assign( pointer f, pointer l )
-{
- return *this = self_type( f, l );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline void
-basic_cstring<CharT>::swap( basic_cstring<CharT>& s )
-{
- // do not want to include alogrithm
- pointer tmp1 = m_begin;
- pointer tmp2 = m_end;
-
- m_begin = s.m_begin;
- m_end = s.m_end;
-
- s.m_begin = tmp1;
- s.m_end = tmp2;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::iterator
-basic_cstring<CharT>::begin()
-{
- return m_begin;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::const_iterator
-basic_cstring<CharT>::begin() const
-{
- return m_begin;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::iterator
-basic_cstring<CharT>::end()
-{
- return m_end;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::const_iterator
-basic_cstring<CharT>::end() const
-{
- return m_end;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::size_type
-basic_cstring<CharT>::find( basic_cstring<CharT> str ) const
-{
- if( str.is_empty() || str.size() > size() )
- return static_cast<size_type>(npos);
-
- const_iterator it = begin();
- const_iterator last = end() - str.size() + 1;
-
- while( it != last ) {
- if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
- break;
-
- ++it;
- }
-
- return it == last ? npos : static_cast<size_type>(it - begin());
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::size_type
-basic_cstring<CharT>::rfind( basic_cstring<CharT> str ) const
-{
- if( str.is_empty() || str.size() > size() )
- return static_cast<size_type>(npos);
-
- const_iterator it = end() - str.size();
- const_iterator last = begin()-1;
-
- while( it != last ) {
- if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
- break;
-
- --it;
- }
-
- return it == last ? static_cast<size_type>(npos) : static_cast<size_type>(it - begin());
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>
-basic_cstring<CharT>::substr( size_type beg_index, size_type end_index ) const
-{
- return beg_index > size()
- ? self_type()
- : end_index > size()
- ? self_type( m_begin + beg_index, m_end )
- : self_type( m_begin + beg_index, m_begin + end_index );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline basic_cstring<CharT>
-basic_cstring<CharT>::default_trim_ex()
-{
- static CharT ws[3] = { CharT(' '), CharT('\t'), CharT('\n') }; // !! wide case
-
- return self_type( ws, 3 );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** comparison operators ************** //
-// ************************************************************************** //
-
-template<typename CharT1,typename CharT2>
-inline bool
-operator==( basic_cstring<CharT1> const& s1, basic_cstring<CharT2> const& s2 )
-{
- typedef typename basic_cstring<CharT1>::traits_type traits_type;
- return s1.size() == s2.size() &&
- traits_type::compare( s1.begin(), s2.begin(), s1.size() ) == 0;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT1,typename CharT2>
-inline bool
-operator==( basic_cstring<CharT1> const& s1, CharT2* s2 )
-{
-#if !defined(__DMC__)
- return s1 == basic_cstring<CharT2>( s2 );
-#else
- return s1 == basic_cstring<CharT2 const>( s2 );
-#endif
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator==( basic_cstring<CharT> const& s1, typename basic_cstring<CharT>::std_string const& s2 )
-{
- return s1 == basic_cstring<CharT>( s2 );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT1,typename CharT2>
-inline bool
-operator==( CharT1* s2, basic_cstring<CharT2> const& s1 )
-{
- return s1 == s2;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator==( typename basic_cstring<CharT>::std_string const& s2, basic_cstring<CharT> const& s1 )
-{
- return s1 == s2;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator!=( basic_cstring<CharT> const& s1, CharT* s2 )
-{
- return !(s1 == s2);
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator!=( CharT* s2, basic_cstring<CharT> const& s1 )
-{
- return !(s1 == s2);
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator!=( basic_cstring<CharT> const& s1, basic_cstring<CharT> const& s2 )
-{
- return !(s1 == s2);
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator!=( basic_cstring<CharT> const& s1, typename basic_cstring<CharT>::std_string const& s2 )
-{
- return !(s1 == s2);
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT>
-inline bool
-operator!=( typename basic_cstring<CharT>::std_string const& s2, basic_cstring<CharT> const& s1 )
-{
- return !(s1 == s2);
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** first_char ************** //
-// ************************************************************************** //
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::value_ret_type
-first_char( basic_cstring<CharT> source )
-{
- typedef typename basic_cstring<CharT>::value_ret_type res_type;
-
- return source.is_empty() ? static_cast<res_type>(0) : *source.begin();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** last_char ************** //
-// ************************************************************************** //
-
-template<typename CharT>
-inline typename basic_cstring<CharT>::value_ret_type
-last_char( basic_cstring<CharT> source )
-{
- typedef typename basic_cstring<CharT>::value_ret_type res_type;
-
- return source.is_empty() ? static_cast<res_type>(0) : *(source.end()-1);
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** assign_op ************** //
-// ************************************************************************** //
-
-template<typename CharT1, typename CharT2>
-inline void
-assign_op( std::basic_string<CharT1>& target, basic_cstring<CharT2> src, int )
-{
- target.assign( src.begin(), src.size() );
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT1, typename CharT2>
-inline std::basic_string<CharT1>&
-operator+=( std::basic_string<CharT1>& target, basic_cstring<CharT2> const& str )
-{
- target.append( str.begin(), str.end() );
- return target;
-}
-
-//____________________________________________________________________________//
-
-template<typename CharT1, typename CharT2>
-inline std::basic_string<CharT1>
-operator+( std::basic_string<CharT1> const& lhs, basic_cstring<CharT2> const& rhs )
-{
- std::basic_string<CharT1> res( lhs );
-
- res.append( rhs.begin(), rhs.end() );
- return res;
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_BASIC_CSTRING_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index f0622263d19..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp
+++ /dev/null
@@ -1,40 +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 : basic_cstring class wrap C string and provide std_string like
-// interface
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_BASIC_CSTRING_FWD_HPP
-#define BOOST_TEST_UTILS_BASIC_CSTRING_FWD_HPP
-
-#include <boost/detail/workaround.hpp>
-
-namespace boost {
-
-namespace unit_test {
-
-template<typename CharT> class basic_cstring;
-typedef basic_cstring<char const> const_string;
-#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590041))
-typedef const_string literal_string;
-#else
-typedef const_string const literal_string;
-#endif
-
-typedef char const* const c_literal_string;
-
-} // namespace unit_test
-
-} // namespace boost
-
-#endif // BOOST_TEST_UTILS_BASIC_CSTRING_FWD_HPP
-
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp b/src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp
deleted file mode 100644
index 68462ae7193..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp
+++ /dev/null
@@ -1,316 +0,0 @@
-// (C) Copyright Eric Niebler 2004-2005
-// (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 : this is an abridged version of an excelent BOOST_FOREACH facility
-// presented by Eric Niebler. I am so fond of it so I can't wait till it
-// going to be accepted into Boost. Also I need version with less number of dependencies
-// and more portable. This version doesn't support rvalues and will reeveluate it's
-// parameters, but should be good enough for my purposes.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_FOREACH_HPP
-#define BOOST_TEST_UTILS_FOREACH_HPP
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-
-// Boost
-#include <boost/type.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/test/detail/workaround.hpp>
-
-#include <boost/type_traits/is_const.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace for_each {
-
-// ************************************************************************** //
-// ************** static_any ************** //
-// ************************************************************************** //
-
-struct static_any_base
-{
- operator bool() const { return false; }
-};
-
-//____________________________________________________________________________//
-
-template<typename Iter>
-struct static_any : static_any_base
-{
- static_any( Iter const& t ) : m_it( t ) {}
-
- mutable Iter m_it;
-};
-
-//____________________________________________________________________________//
-
-typedef static_any_base const& static_any_t;
-
-//____________________________________________________________________________//
-
-template<typename Iter>
-inline Iter&
-static_any_cast( static_any_t a, Iter* = 0 )
-{
- return static_cast<Iter&>( static_cast<static_any<Iter> const&>( a ).m_it );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** is_const ************** //
-// ************************************************************************** //
-
-template<typename C>
-inline is_const<C>
-is_const_coll( C& )
-{
- return is_const<C>();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** begin ************** //
-// ************************************************************************** //
-
-template<typename C>
-inline static_any<BOOST_DEDUCED_TYPENAME C::iterator>
-begin( C& t, mpl::false_ )
-{
- return static_any<BOOST_DEDUCED_TYPENAME C::iterator>( t.begin() );
-}
-
-//____________________________________________________________________________//
-
-template<typename C>
-inline static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>
-begin( C const& t, mpl::true_ )
-{
- return static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>( t.begin() );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** end ************** //
-// ************************************************************************** //
-
-template<typename C>
-inline static_any<BOOST_DEDUCED_TYPENAME C::iterator>
-end( C& t, mpl::false_ )
-{
- return static_any<BOOST_DEDUCED_TYPENAME C::iterator>( t.end() );
-}
-
-//____________________________________________________________________________//
-
-template<typename C>
-inline static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>
-end( C const& t, mpl::true_ )
-{
- return static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>( t.end() );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** done ************** //
-// ************************************************************************** //
-
-template<typename C>
-inline bool
-done( static_any_t cur, static_any_t end, C&, mpl::false_ )
-{
- return static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur ) ==
- static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( end );
-}
-
-//____________________________________________________________________________//
-
-template<typename C>
-inline bool
-done( static_any_t cur, static_any_t end, C const&, mpl::true_ )
-{
- return static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur ) ==
- static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( end );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** next ************** //
-// ************************************************************************** //
-
-template<typename C>
-inline void
-next( static_any_t cur, C&, mpl::false_ )
-{
- ++static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
-}
-
-//____________________________________________________________________________//
-
-template<typename C>
-inline void
-next( static_any_t cur, C const&, mpl::true_ )
-{
- ++static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** prev ************** //
-// ************************************************************************** //
-
-template<typename C>
-inline void
-prev( static_any_t cur, C&, mpl::false_ )
-{
- --static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
-}
-
-//____________________________________________________________________________//
-
-template<typename C>
-inline void
-prev( static_any_t cur, C const&, mpl::true_ )
-{
- --static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** deref ************** //
-// ************************************************************************** //
-
-template<class RefType,typename C>
-inline RefType
-deref( static_any_t cur, C&, ::boost::type<RefType>, mpl::false_ )
-{
- return *static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
-}
-
-//____________________________________________________________________________//
-
-template<class RefType,typename C>
-inline RefType
-deref( static_any_t cur, C const&, ::boost::type<RefType>, mpl::true_ )
-{
- return *static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** BOOST_TEST_FOREACH ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_FE_ANY ::boost::unit_test::for_each::static_any_t
-#define BOOST_TEST_FE_IS_CONST( COL ) ::boost::unit_test::for_each::is_const_coll( COL )
-
-#define BOOST_TEST_FE_BEG( COL ) \
- ::boost::unit_test::for_each::begin( \
- COL, \
- BOOST_TEST_FE_IS_CONST( COL ) ) \
-/**/
-
-#define BOOST_TEST_FE_END( COL ) \
- ::boost::unit_test::for_each::end( \
- COL, \
- BOOST_TEST_FE_IS_CONST( COL ) ) \
-/**/
-
-#define BOOST_TEST_FE_DONE( COL ) \
- ::boost::unit_test::for_each::done( \
- BOOST_TEST_FE_CUR_VAR, \
- BOOST_TEST_FE_END_VAR, \
- COL, \
- BOOST_TEST_FE_IS_CONST( COL ) ) \
-/**/
-
-#define BOOST_TEST_FE_NEXT( COL ) \
- ::boost::unit_test::for_each::next( \
- BOOST_TEST_FE_CUR_VAR, \
- COL, \
- BOOST_TEST_FE_IS_CONST( COL ) ) \
-/**/
-
-#define BOOST_TEST_FE_PREV( COL ) \
- ::boost::unit_test::for_each::prev( \
- BOOST_TEST_FE_CUR_VAR, \
- COL, \
- BOOST_TEST_FE_IS_CONST( COL ) ) \
-/**/
-
-#define BOOST_FOREACH_NOOP(COL) \
- ((void)&(COL))
-
-#define BOOST_TEST_FE_DEREF( COL, RefType ) \
- ::boost::unit_test::for_each::deref( \
- BOOST_TEST_FE_CUR_VAR, \
- COL, \
- ::boost::type<RefType >(), \
- BOOST_TEST_FE_IS_CONST( COL ) ) \
-/**/
-
-#if BOOST_WORKAROUND( BOOST_MSVC, == 1310 )
-#define BOOST_TEST_LINE_NUM
-#else
-#define BOOST_TEST_LINE_NUM __LINE__
-#endif
-
-#define BOOST_TEST_FE_CUR_VAR BOOST_JOIN( _fe_cur_, BOOST_TEST_LINE_NUM )
-#define BOOST_TEST_FE_END_VAR BOOST_JOIN( _fe_end_, BOOST_TEST_LINE_NUM )
-#define BOOST_TEST_FE_CON_VAR BOOST_JOIN( _fe_con_, BOOST_TEST_LINE_NUM )
-
-#define BOOST_TEST_FOREACH( RefType, var, COL ) \
-if( BOOST_TEST_FE_ANY BOOST_TEST_FE_CUR_VAR = BOOST_TEST_FE_BEG( COL ) ) {} else \
-if( BOOST_TEST_FE_ANY BOOST_TEST_FE_END_VAR = BOOST_TEST_FE_END( COL ) ) {} else \
-for( bool BOOST_TEST_FE_CON_VAR = true; \
- BOOST_TEST_FE_CON_VAR && !BOOST_TEST_FE_DONE( COL ); \
- BOOST_TEST_FE_CON_VAR ? BOOST_TEST_FE_NEXT( COL ) : BOOST_FOREACH_NOOP( COL )) \
- \
- if( (BOOST_TEST_FE_CON_VAR = false, false) ) {} else \
- for( RefType var = BOOST_TEST_FE_DEREF( COL, RefType ); \
- !BOOST_TEST_FE_CON_VAR; BOOST_TEST_FE_CON_VAR = true ) \
-/**/
-
-#define BOOST_TEST_REVERSE_FOREACH( RefType, var, COL ) \
-if( BOOST_TEST_FE_ANY BOOST_TEST_FE_CUR_VAR = BOOST_TEST_FE_END( COL ) ) {} else \
-if( BOOST_TEST_FE_ANY BOOST_TEST_FE_END_VAR = BOOST_TEST_FE_BEG( COL ) ) {} else \
-for( bool BOOST_TEST_FE_CON_VAR = true; \
- BOOST_TEST_FE_CON_VAR && !BOOST_TEST_FE_DONE( COL ); ) \
- \
- if( (BOOST_TEST_FE_CON_VAR = false, false) ) {} else \
- if( (BOOST_TEST_FE_PREV( COL ), false) ) {} else \
- for( RefType var = BOOST_TEST_FE_DEREF( COL, RefType ); \
- !BOOST_TEST_FE_CON_VAR; BOOST_TEST_FE_CON_VAR = true ) \
-/**/
-
-//____________________________________________________________________________//
-
-} // namespace for_each
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_FOREACH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp b/src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp
deleted file mode 100644
index 26bd8ed3856..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp
+++ /dev/null
@@ -1,128 +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.
-//
-// Description : contains definition for all test tools in test toolbox
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_LAZY_OSTREAM_HPP
-#define BOOST_TEST_UTILS_LAZY_OSTREAM_HPP
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-
-// STL
-#include <iosfwd>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** lazy_ostream ************** //
-// ************************************************************************** //
-
-namespace boost {
-namespace unit_test {
-
-class lazy_ostream {
-public:
- virtual ~lazy_ostream() {}
-
- static lazy_ostream& instance() { static lazy_ostream inst; return inst; }
-
- friend std::ostream& operator<<( std::ostream& ostr, lazy_ostream const& o ) { return o( ostr ); }
-
- // access method
- bool empty() const { return m_empty; }
-
- // actual printing interface; to be accessed only by this class and children
- virtual std::ostream& operator()( std::ostream& ostr ) const { return ostr; }
-protected:
- explicit lazy_ostream( bool p_empty = true ) : m_empty( p_empty ) {}
-
-private:
- // Data members
- bool m_empty;
-};
-
-//____________________________________________________________________________//
-
-template<typename PrevType, typename T, typename StorageT=T const&>
-class lazy_ostream_impl : public lazy_ostream {
-public:
- lazy_ostream_impl( PrevType const& prev, T const& value )
- : lazy_ostream( false )
- , m_prev( prev )
- , m_value( value )
- {
- }
-
- virtual std::ostream& operator()( std::ostream& ostr ) const
- {
- return m_prev(ostr) << m_value;
- }
-private:
- // Data members
- PrevType const& m_prev;
- StorageT m_value;
-};
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline lazy_ostream_impl<lazy_ostream,T>
-operator<<( lazy_ostream const& prev, T const& v )
-{
- return lazy_ostream_impl<lazy_ostream,T>( prev, v );
-}
-
-//____________________________________________________________________________//
-
-template<typename PrevPrevType, typename TPrev, typename T>
-inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,T>
-operator<<( lazy_ostream_impl<PrevPrevType,TPrev> const& prev, T const& v )
-{
- typedef lazy_ostream_impl<PrevPrevType,TPrev> PrevType;
- return lazy_ostream_impl<PrevType,T>( prev, v );
-}
-
-//____________________________________________________________________________//
-
-#if BOOST_TEST_USE_STD_LOCALE
-
-template<typename R,typename S>
-inline lazy_ostream_impl<lazy_ostream,R& (BOOST_TEST_CALL_DECL *)(S&),R& (BOOST_TEST_CALL_DECL *)(S&)>
-operator<<( lazy_ostream const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
-{
- typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
-
- return lazy_ostream_impl<lazy_ostream,ManipType,ManipType>( prev, man );
-}
-
-//____________________________________________________________________________//
-
-template<typename PrevPrevType, typename TPrev,typename R,typename S>
-inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,R& (BOOST_TEST_CALL_DECL *)(S&),R& (BOOST_TEST_CALL_DECL *)(S&)>
-operator<<( lazy_ostream_impl<PrevPrevType,TPrev> const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
-{
- typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
-
- return lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,ManipType,ManipType>( prev, man );
-}
-
-//____________________________________________________________________________//
-
-#endif
-
-#define BOOST_TEST_LAZY_MSG( M ) (::boost::unit_test::lazy_ostream::instance() << M)
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_LAZY_OSTREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp b/src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp
deleted file mode 100644
index b230692d803..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp
+++ /dev/null
@@ -1,63 +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 facilities for accessing type information at runtime
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RTTI_HPP
-#define BOOST_TEST_UTILS_RTTI_HPP
-
-// C Runtime
-#include <cstddef>
-
-namespace boost {
-namespace rtti {
-
-// ************************************************************************** //
-// ************** rtti::type_id ************** //
-// ************************************************************************** //
-
-typedef std::ptrdiff_t id_t;
-
-namespace rtti_detail {
-
-template<typename T>
-struct rttid_holder {
- static id_t id() { return reinterpret_cast<id_t>( &inst() ); }
-
-private:
- struct rttid {};
-
- static rttid const& inst() { static rttid s_inst; return s_inst; }
-};
-
-} // namespace rtti_detail
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline id_t
-type_id()
-{
- return rtti_detail::rttid_holder<T>::id();
-}
-
-//____________________________________________________________________________//
-
-#define BOOST_RTTI_SWITCH( type_id_ ) if( ::boost::rtti::id_t switch_by_id = type_id_ )
-#define BOOST_RTTI_CASE( type ) if( switch_by_id == ::boost::rtti::type_id<type>() )
-
-//____________________________________________________________________________//
-
-} // namespace rtti
-} // namespace boost
-
-#endif // BOOST_TEST_UTILS_RTTI_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
deleted file mode 100644
index bd3df7090c5..00000000000
--- a/src/third_party/boost-1.69.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 << "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.69.0/boost/test/utils/runtime/errors.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/errors.hpp
deleted file mode 100644
index 056a823e338..00000000000
--- a/src/third_party/boost-1.69.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 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.69.0/boost/test/utils/setcolor.hpp b/src/third_party/boost-1.69.0/boost/test/utils/setcolor.hpp
deleted file mode 100644
index 915c9962a39..00000000000
--- a/src/third_party/boost-1.69.0/boost/test/utils/setcolor.hpp
+++ /dev/null
@@ -1,318 +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( 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.69.0/boost/thread/detail/config.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/config.hpp
deleted file mode 100644
index 6e6b9af6a31..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/detail/config.hpp
+++ /dev/null
@@ -1,531 +0,0 @@
-// 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/thread.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/thread.hpp
deleted file mode 100644
index 46294102caf..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/detail/thread.hpp
+++ /dev/null
@@ -1,848 +0,0 @@
-#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/executors/executor.hpp b/src/third_party/boost-1.69.0/boost/thread/executors/executor.hpp
deleted file mode 100644
index 1c751dd094b..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/executors/executor.hpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// 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
deleted file mode 100644
index ca1a35f2d92..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/executors/executor_adaptor.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// 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
deleted file mode 100644
index 1353dd32778..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/executors/generic_executor_ref.hpp
+++ /dev/null
@@ -1,213 +0,0 @@
-// 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
deleted file mode 100644
index bdaf7651b92..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/executors/work.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// (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
deleted file mode 100644
index 55afca8feff..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/future.hpp
+++ /dev/null
@@ -1,5897 +0,0 @@
-// (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/wait_for_any.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_any.hpp
deleted file mode 100644
index b869a4318a8..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_any.hpp
+++ /dev/null
@@ -1,161 +0,0 @@
-// (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/pthread/condition_variable.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable.hpp
deleted file mode 100644
index c11383f01f9..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable.hpp
+++ /dev/null
@@ -1,502 +0,0 @@
-#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/thread_data.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/thread_data.hpp
deleted file mode 100644
index 46f111d9477..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/thread_data.hpp
+++ /dev/null
@@ -1,405 +0,0 @@
-#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/tss.hpp b/src/third_party/boost-1.69.0/boost/thread/tss.hpp
deleted file mode 100644
index d798bef558a..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/tss.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-#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/win32/shared_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/shared_mutex.hpp
deleted file mode 100644
index 76ee2579b3d..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/win32/shared_mutex.hpp
+++ /dev/null
@@ -1,849 +0,0 @@
-#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
deleted file mode 100644
index 2f28820290b..00000000000
--- a/src/third_party/boost-1.69.0/boost/thread/win32/thread_data.hpp
+++ /dev/null
@@ -1,299 +0,0 @@
-#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/timer.hpp b/src/third_party/boost-1.69.0/boost/timer.hpp
deleted file mode 100644
index 1e3571e4177..00000000000
--- a/src/third_party/boost-1.69.0/boost/timer.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// boost timer.hpp header file ---------------------------------------------//
-
-// Copyright Beman Dawes 1994-99. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/timer for documentation.
-
-// Revision History
-// 01 Apr 01 Modified to use new <boost/limits.hpp> header. (JMaddock)
-// 12 Jan 01 Change to inline implementation to allow use without library
-// builds. See docs for more rationale. (Beman Dawes)
-// 25 Sep 99 elapsed_max() and elapsed_min() added (John Maddock)
-// 16 Jul 99 Second beta
-// 6 Jul 99 Initial boost version
-
-#ifndef BOOST_TIMER_HPP
-#define BOOST_TIMER_HPP
-
-#include <boost/config.hpp>
-#include <ctime>
-#include <boost/limits.hpp>
-
-# ifdef BOOST_NO_STDC_NAMESPACE
- namespace std { using ::clock_t; using ::clock; }
-# endif
-
-
-namespace boost {
-
-// timer -------------------------------------------------------------------//
-
-// A timer object measures elapsed time.
-
-// It is recommended that implementations measure wall clock rather than CPU
-// time since the intended use is performance measurement on systems where
-// total elapsed time is more important than just process or CPU time.
-
-// Warnings: The maximum measurable elapsed time may well be only 596.5+ hours
-// due to implementation limitations. The accuracy of timings depends on the
-// accuracy of timing information provided by the underlying platform, and
-// this varies a great deal from platform to platform.
-
-class timer
-{
- public:
- timer() { _start_time = std::clock(); } // postcondition: elapsed()==0
-// timer( const timer& src ); // post: elapsed()==src.elapsed()
-// ~timer(){}
-// timer& operator=( const timer& src ); // post: elapsed()==src.elapsed()
- void restart() { _start_time = std::clock(); } // post: elapsed()==0
- double elapsed() const // return elapsed time in seconds
- { return double(std::clock() - _start_time) / CLOCKS_PER_SEC; }
-
- double elapsed_max() const // return estimated maximum value for elapsed()
- // Portability warning: elapsed_max() may return too high a value on systems
- // where std::clock_t overflows or resets at surprising values.
- {
- return (double((std::numeric_limits<std::clock_t>::max)())
- - double(_start_time)) / double(CLOCKS_PER_SEC);
- }
-
- double elapsed_min() const // return minimum value for elapsed()
- { return double(1)/double(CLOCKS_PER_SEC); }
-
- private:
- std::clock_t _start_time;
-}; // timer
-
-} // namespace boost
-
-#endif // BOOST_TIMER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/timer/config.hpp b/src/third_party/boost-1.69.0/boost/timer/config.hpp
deleted file mode 100644
index 0c2174c3064..00000000000
--- a/src/third_party/boost-1.69.0/boost/timer/config.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// boost/timer/config.hpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 2003, 2006, 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/timer for documentation.
-
-#ifndef BOOST_TIMER_CONFIG_HPP
-#define BOOST_TIMER_CONFIG_HPP
-
-#include <boost/config.hpp>
-
-#include <boost/system/api_config.hpp>
-
-// This header implements separate compilation features as described in
-// http://www.boost.org/more/separate_compilation.html
-
-// enable dynamic or static linking as requested --------------------------------------//
-
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TIMER_DYN_LINK)
-# if defined(BOOST_TIMER_SOURCE)
-# define BOOST_TIMER_DECL BOOST_SYMBOL_EXPORT
-# else
-# define BOOST_TIMER_DECL BOOST_SYMBOL_IMPORT
-# endif
-#else
-# define BOOST_TIMER_DECL
-#endif
-
-// enable automatic library variant selection ----------------------------------------//
-
-#if !defined(BOOST_TIMER_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TIMER_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_timer
-//
-// If we're importing code from a dll, then tell auto_link.hpp about it:
-//
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TIMER_DYN_LINK)
-# define BOOST_DYN_LINK
-#endif
-//
-// And include the header that does the work:
-//
-#include <boost/config/auto_link.hpp>
-
-// We also need to autolink to the Chrono library; even though
-// it's not used in the interface, and no Chrono header is included,
-// it's used in the implementation and is necessary in order to link
-
-#if !defined(BOOST_CHRONO_NO_LIB)
-
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
-# define BOOST_DYN_LINK
-#endif
-
-#define BOOST_LIB_NAME boost_chrono
-
-#include <boost/config/auto_link.hpp>
-
-#endif // !defined(BOOST_CHRONO_NO_LIB)
-
-// Plus, Chrono uses System, so we need to link that too
-
-#if !defined(BOOST_SYSTEM_NO_LIB)
-
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
-# define BOOST_DYN_LINK
-#endif
-
-#define BOOST_LIB_NAME boost_system
-
-#include <boost/config/auto_link.hpp>
-
-#endif // !defined(BOOST_SYSTEM_NO_LIB)
-
-#endif // auto-linking disabled
-
-#endif // BOOST_TIMER_CONFIG_HPP
-
diff --git a/src/third_party/boost-1.69.0/boost/type_index.hpp b/src/third_party/boost-1.69.0/boost/type_index.hpp
deleted file mode 100644
index 5311ac87956..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index.hpp
+++ /dev/null
@@ -1,265 +0,0 @@
-//
-// Copyright (c) Antony Polukhin, 2012-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_HPP
-#define BOOST_TYPE_INDEX_HPP
-
-/// \file boost/type_index.hpp
-/// \brief Includes minimal set of headers required to use the Boost.TypeIndex library.
-///
-/// By inclusion of this file most optimal type index classes will be included and used
-/// as a boost::typeindex::type_index and boost::typeindex::type_info.
-
-#include <boost/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
-# include BOOST_TYPE_INDEX_USER_TYPEINDEX
-# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
-# pragma detect_mismatch( "boost__type_index__abi", "user defined type_index class is used: " BOOST_STRINGIZE(BOOST_TYPE_INDEX_USER_TYPEINDEX))
-# endif
-#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
-# include <boost/type_index/stl_type_index.hpp>
-# if defined(BOOST_NO_RTTI) || defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)
-# include <boost/type_index/detail/stl_register_class.hpp>
-# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
-# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - typeid() is used only for templates")
-# endif
-# else
-# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
-# pragma detect_mismatch( "boost__type_index__abi", "RTTI is used")
-# endif
-# endif
-#else
-# include <boost/type_index/ctti_type_index.hpp>
-# include <boost/type_index/detail/ctti_register_class.hpp>
-# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
-# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - using CTTI")
-# endif
-#endif
-
-#ifndef BOOST_TYPE_INDEX_REGISTER_CLASS
-#define BOOST_TYPE_INDEX_REGISTER_CLASS
-#endif
-
-namespace boost { namespace typeindex {
-
-#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
-
-/// \def BOOST_TYPE_INDEX_FUNCTION_SIGNATURE
-/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is used by boost::typeindex::ctti_type_index class to
-/// deduce the name of a type. If your compiler is not recognized
-/// by the TypeIndex library and you wish to work with boost::typeindex::ctti_type_index, you may
-/// define this macro by yourself.
-///
-/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE must be defined to a compiler specific macro
-/// that outputs the \b whole function signature \b including \b template \b parameters.
-///
-/// If your compiler is not recognised and BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is not defined,
-/// then a compile-time error will arise at any attempt to use boost::typeindex::ctti_type_index classes.
-///
-/// See BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS and BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING
-/// for an information of how to tune the implementation to make a nice pretty_name() output.
-#define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE BOOST_CURRENT_FUNCTION
-
-/// \def BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING
-/// This is a helper macro for making correct pretty_names() with RTTI off.
-///
-/// BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING macro may be defined to
-/// '(begin_skip, end_skip, runtime_skip, runtime_skip_until)' with parameters for adding a
-/// support for compilers, that by default are not recognized by TypeIndex library.
-///
-/// \b Example:
-///
-/// Imagine the situation when
-/// \code boost::typeindex::ctti_type_index::type_id<int>().pretty_name() \endcode
-/// returns the following string:
-/// \code "static const char *boost::detail::ctti<int>::n() [T = int]" \endcode
-/// and \code boost::typeindex::ctti_type_index::type_id<short>().pretty_name() \endcode returns the following:
-/// \code "static const char *boost::detail::ctti<short>::n() [T = short]" \endcode
-///
-/// As we may see first 39 characters are "static const char *boost::detail::ctti<" and they do not depend on
-/// the type T. After first 39 characters we have a human readable type name which is duplicated at the end
-/// of a string. String always ends on ']', which consumes 1 character.
-///
-/// Now if we define `BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING` to
-/// `(39, 1, false, "")` we'll be getting \code "int>::n() [T = int" \endcode
-/// for `boost::typeindex::ctti_type_index::type_id<int>().pretty_name()` and \code "short>::n() [T = short" \endcode
-/// for `boost::typeindex::ctti_type_index::type_id<short>().pretty_name()`.
-///
-/// Now we need to take additional care of the characters that go before the last mention of our type. We'll
-/// do that by telling the macro that we need to cut off everything that goes before the "T = " including the "T = "
-/// itself:
-///
-/// \code (39, 1, true, "T = ") \endcode
-///
-/// In case of GCC or Clang command line we need to add the following line while compiling all the sources:
-///
-/// \code
-/// -DBOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING='(39, 1, true, "T = ")'
-/// \endcode
-/// \param begin_skip How many characters must be skipped at the beginning of the type holding string.
-/// Must be a compile time constant.
-/// \param end_skip How many characters must be skipped at the end of the type holding string.
-/// Must be a compile time constant.
-/// \param runtime_skip Do we need additional checks at runtime to cut off the more characters.
-/// Must be `true` or `false`.
-/// \param runtime_skip_until Skip all the characters before the following string (including the string itself).
-/// Must be a compile time array of characters.
-///
-/// See [RTTI emulation limitations](boost_typeindex/rtti_emulation_limitations.html) for more info.
-#define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0, 0, false, "")
-
-
- /// Depending on a compiler flags, optimal implementation of type_index will be used
- /// as a default boost::typeindex::type_index.
- ///
- /// Could be a boost::typeindex::stl_type_index, boost::typeindex::ctti_type_index or
- /// user defined type_index class.
- ///
- /// \b See boost::typeindex::type_index_facade for a full description of type_index functions.
- typedef platform_specific type_index;
-#elif defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
- // Nothing to do
-#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
- typedef boost::typeindex::stl_type_index type_index;
-#else
- typedef boost::typeindex::ctti_type_index type_index;
-#endif
-
-/// Depending on a compiler flags, optimal implementation of type_info will be used
-/// as a default boost::typeindex::type_info.
-///
-/// Could be a std::type_info, boost::typeindex::detail::ctti_data or
-/// some user defined class.
-///
-/// type_info \b is \b not copyable or default constructible. It is \b not assignable too!
-typedef type_index::type_info_t type_info;
-
-#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
-
-/// \def BOOST_TYPE_INDEX_USER_TYPEINDEX
-/// BOOST_TYPE_INDEX_USER_TYPEINDEX can be defined to the path to header file
-/// with user provided implementation of type_index.
-///
-/// See [Making a custom type_index](boost_typeindex/making_a_custom_type_index.html) section
-/// of documentation for usage example.
-#define BOOST_TYPE_INDEX_USER_TYPEINDEX <full/absolute/path/to/header/with/type_index.hpp>
-
-
-/// \def BOOST_TYPE_INDEX_REGISTER_CLASS
-/// BOOST_TYPE_INDEX_REGISTER_CLASS is used to help to emulate RTTI.
-/// Put this macro into the public section of polymorphic class to allow runtime type detection.
-///
-/// Depending on the typeid() availability this macro will expand to nothing or to virtual helper function
-/// `virtual const type_info& boost_type_info_type_id_runtime_() const noexcept`.
-///
-/// \b Example:
-/// \code
-/// class A {
-/// public:
-/// BOOST_TYPE_INDEX_REGISTER_CLASS
-/// virtual ~A(){}
-/// };
-///
-/// struct B: public A {
-/// BOOST_TYPE_INDEX_REGISTER_CLASS
-/// };
-///
-/// struct C: public B {
-/// BOOST_TYPE_INDEX_REGISTER_CLASS
-/// };
-///
-/// ...
-///
-/// C c1;
-/// A* pc1 = &c1;
-/// assert(boost::typeindex::type_id<C>() == boost::typeindex::type_id_runtime(*pc1));
-/// \endcode
-#define BOOST_TYPE_INDEX_REGISTER_CLASS nothing-or-some-virtual-functions
-
-/// \def BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
-/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY is a helper macro that must be defined if mixing
-/// RTTI on/off modules. See
-/// [Mixing sources with RTTI on and RTTI off](boost_typeindex/mixing_sources_with_rtti_on_and_.html)
-/// section of documentation for more info.
-#define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
-
-#endif // defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
-
-
-/// Function to get boost::typeindex::type_index for a type T.
-/// Removes const, volatile && and & modifiers from T.
-///
-/// \b Example:
-/// \code
-/// type_index ti = type_id<int&>();
-/// std::cout << ti.pretty_name(); // Outputs 'int'
-/// \endcode
-///
-/// \tparam T Type for which type_index must be created.
-/// \throw Nothing.
-/// \return boost::typeindex::type_index with information about the specified type T.
-template <class T>
-inline type_index type_id() BOOST_NOEXCEPT {
- return type_index::type_id<T>();
-}
-
-/// Function for constructing boost::typeindex::type_index instance for type T.
-/// Does not remove const, volatile, & and && modifiers from T.
-///
-/// If T has no const, volatile, & and && modifiers, then returns exactly
-/// the same result as in case of calling `type_id<T>()`.
-///
-/// \b Example:
-/// \code
-/// type_index ti = type_id_with_cvr<int&>();
-/// std::cout << ti.pretty_name(); // Outputs 'int&'
-/// \endcode
-///
-/// \tparam T Type for which type_index must be created.
-/// \throw Nothing.
-/// \return boost::typeindex::type_index with information about the specified type T.
-template <class T>
-inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
- return type_index::type_id_with_cvr<T>();
-}
-
-/// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index.
-///
-/// Returns runtime information about specified type.
-///
-/// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS.
-///
-/// \b Example:
-/// \code
-/// struct Base { virtual ~Base(){} };
-/// struct Derived: public Base {};
-/// ...
-/// Derived d;
-/// Base& b = d;
-/// type_index ti = type_id_runtime(b);
-/// std::cout << ti.pretty_name(); // Outputs 'Derived'
-/// \endcode
-///
-/// \param runtime_val Variable which runtime type must be returned.
-/// \throw Nothing.
-/// \return boost::typeindex::type_index with information about the specified variable.
-template <class T>
-inline type_index type_id_runtime(const T& runtime_val) BOOST_NOEXCEPT {
- return type_index::type_id_runtime(runtime_val);
-}
-
-}} // namespace boost::typeindex
-
-
-
-#endif // BOOST_TYPE_INDEX_HPP
-
diff --git a/src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp b/src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp
deleted file mode 100644
index a59b2d80a7f..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp
+++ /dev/null
@@ -1,213 +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_CTTI_TYPE_INDEX_HPP
-#define BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP
-
-/// \file ctti_type_index.hpp
-/// \brief Contains boost::typeindex::ctti_type_index class that is constexpr if C++14 constexpr is supported by compiler.
-///
-/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement
-/// for std::type_index.
-///
-/// It is used in situations when typeid() method is not available or
-/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined.
-
-#include <boost/type_index/type_index_facade.hpp>
-#include <boost/type_index/detail/compile_time_type_info.hpp>
-
-#include <cstring>
-#include <boost/container_hash/hash.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace typeindex {
-
-namespace detail {
-
-// That's the most trickiest part of the TypeIndex library:
-// 1) we do not want to give user ability to manually construct and compare `struct-that-represents-type`
-// 2) we need to distinguish between `struct-that-represents-type` and `const char*`
-// 3) we need a thread-safe way to have references to instances `struct-that-represents-type`
-// 4) we need a compile-time control to make sure that user does not copy or
-// default construct `struct-that-represents-type`
-//
-// Solution would be the following:
-
-/// \class ctti_data
-/// Standard-layout class with private constructors and assignment operators.
-///
-/// You can not work with this class directly. The purpose of this class is to hold type info
-/// \b when \b RTTI \b is \b off and allow ctti_type_index construction from itself.
-///
-/// \b Example:
-/// \code
-/// const detail::ctti_data& foo();
-/// ...
-/// type_index ti = type_index(foo());
-/// std::cout << ti.pretty_name();
-/// \endcode
-class ctti_data {
-#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
-public:
- ctti_data() = delete;
- ctti_data(const ctti_data&) = delete;
- ctti_data& operator=(const ctti_data&) = delete;
-#else
-private:
- ctti_data();
- ctti_data(const ctti_data&);
- ctti_data& operator=(const ctti_data&);
-#endif
-};
-
-} // namespace detail
-
-/// Helper method for getting detail::ctti_data of a template parameter T.
-template <class T>
-inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT {
- // Standard C++11, 5.2.10 Reinterpret cast:
- // An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue
- // v of type "pointer to T1" is converted to the type "pointer to cv T2", the result is static_cast<cv
- // T2*>(static_cast<cv void*>(v)) if both T1 and T2 are standard-layout types (3.9) and the alignment
- // requirements of T2 are no stricter than those of T1, or if either type is void. Converting a prvalue of type
- // "pointer to T1" to the type "pointer to T2" (where T1 and T2 are object types and where the alignment
- // requirements of T2 are no stricter than those of T1) and back to its original type yields the original pointer
- // value.
- //
- // Alignments are checked in `type_index_test_ctti_alignment.cpp` test.
- return *reinterpret_cast<const detail::ctti_data*>(boost::detail::ctti<T>::n());
-}
-
-/// \class ctti_type_index
-/// This class is a wrapper that pretends to work exactly like stl_type_index, but does
-/// not require RTTI support. \b For \b description \b of \b functions \b see type_index_facade.
-///
-/// This class on C++14 compatible compilers has following functions marked as constexpr:
-/// * default constructor
-/// * copy constructors and assignemnt operations
-/// * class methods: name(), before(const ctti_type_index& rhs), equal(const ctti_type_index& rhs)
-/// * static methods type_id<T>(), type_id_with_cvr<T>()
-/// * comparison operators
-///
-/// This class produces slightly longer type names, so consider using stl_type_index
-/// in situations when typeid() is working.
-class ctti_type_index: public type_index_facade<ctti_type_index, detail::ctti_data> {
- const char* data_;
-
- inline std::size_t get_raw_name_length() const BOOST_NOEXCEPT;
-
- BOOST_CXX14_CONSTEXPR inline explicit ctti_type_index(const char* data) BOOST_NOEXCEPT
- : data_(data)
- {}
-
-public:
- typedef detail::ctti_data type_info_t;
-
- BOOST_CXX14_CONSTEXPR inline ctti_type_index() BOOST_NOEXCEPT
- : data_(boost::detail::ctti<void>::n())
- {}
-
- inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT
- : data_(reinterpret_cast<const char*>(&data))
- {}
-
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
- BOOST_CXX14_CONSTEXPR inline const char* raw_name() const BOOST_NOEXCEPT;
- BOOST_CXX14_CONSTEXPR inline const char* name() const BOOST_NOEXCEPT;
- inline std::string pretty_name() const;
- inline std::size_t hash_code() const BOOST_NOEXCEPT;
-
- BOOST_CXX14_CONSTEXPR inline bool equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
- BOOST_CXX14_CONSTEXPR inline bool before(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
-
- template <class T>
- BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() BOOST_NOEXCEPT;
-
- template <class T>
- BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
-
- template <class T>
- inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT;
-};
-
-
-inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT {
- return *reinterpret_cast<const detail::ctti_data*>(data_);
-}
-
-
-BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
- const char* const left = raw_name();
- const char* const right = rhs.raw_name();
- return /*left == right ||*/ !boost::typeindex::detail::constexpr_strcmp(left, right);
-}
-
-BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
- const char* const left = raw_name();
- const char* const right = rhs.raw_name();
- return /*left != right &&*/ boost::typeindex::detail::constexpr_strcmp(left, right) < 0;
-}
-
-
-template <class T>
-BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_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_t;
- return ctti_type_index(boost::detail::ctti<no_cvr_t>::n());
-}
-
-
-
-template <class T>
-BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
- return ctti_type_index(boost::detail::ctti<T>::n());
-}
-
-
-template <class T>
-inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST_NOEXCEPT {
- return variable.boost_type_index_type_id_runtime_();
-}
-
-
-BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
- return data_;
-}
-
-
-BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::name() const BOOST_NOEXCEPT {
- return data_;
-}
-
-inline std::size_t ctti_type_index::get_raw_name_length() const BOOST_NOEXCEPT {
- return std::strlen(raw_name() + detail::ctti_skip_size_at_end);
-}
-
-
-inline std::string ctti_type_index::pretty_name() const {
- std::size_t len = get_raw_name_length();
- while (raw_name()[len - 1] == ' ') --len; // MSVC sometimes adds whitespaces
- return std::string(raw_name(), len);
-}
-
-
-inline std::size_t ctti_type_index::hash_code() const BOOST_NOEXCEPT {
- return boost::hash_range(raw_name(), raw_name() + get_raw_name_length());
-}
-
-
-}} // namespace boost::typeindex
-
-#endif // BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 7a55350b9e0..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index/detail/compile_time_type_info.hpp
+++ /dev/null
@@ -1,299 +0,0 @@
-//
-// Copyright (c) Antony Polukhin, 2012-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_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
-#define BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
-
-/// \file compile_time_type_info.hpp
-/// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index.
-/// Not intended for inclusion from user's code.
-
-#include <boost/config.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-/// @cond
-#define BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(begin_skip, end_skip, runtime_skip, runtime_skip_until) \
- namespace boost { namespace typeindex { namespace detail { \
- BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_begin = begin_skip; \
- BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_end = end_skip; \
- BOOST_STATIC_CONSTEXPR bool ctti_skip_more_at_runtime = runtime_skip; \
- BOOST_STATIC_CONSTEXPR char ctti_skip_until_runtime[] = runtime_skip_until; \
- }}} /* namespace boost::typeindex::detail */ \
- /**/
-/// @endcond
-
-
-#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
- /* Nothing to document. All the macro docs are moved to <boost/type_index.hpp> */
-#elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING)
-# include <boost/preprocessor/facilities/expand.hpp>
- BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING )
-#elif defined(_MSC_VER) && defined (BOOST_NO_CXX11_NOEXCEPT)
- // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, "")
-#elif defined(_MSC_VER) && !defined (BOOST_NO_CXX11_NOEXCEPT)
- // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void) noexcept") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 19, false, "")
-#elif defined(__clang__) && defined(__APPLE__)
- // Someone made __clang_major__ equal to LLVM version rather than compiler version
- // on APPLE platform.
- //
- // Using less efficient solution because there is no good way to detect real version of Clang.
- // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "???????????>::n() [T = int"
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
-#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ == 0))
- // sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1
- // note: checked on 3.0
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, "")
-#elif defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ > 0))
- // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int"
- // note: checked on 3.1, 3.4
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
-#elif defined(__EDG__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static cha boost::detail::ctti<T>::s() [with I = 40U, T = ") - 1, sizeof("]") - 1
- // note: checked on 4.14
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(58, 1, false, "")
-#elif defined(__EDG__) && defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static const char *boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
- // note: checked on 4.14
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
-#elif defined(__GNUC__) && (__GNUC__ < 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0u; T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(81, 1, false, "")
-#elif defined(__GNUC__) && (__GNUC__ >= 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0; T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(80, 1, false, "")
-#elif defined(__GNUC__) && defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static const char* boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
-#else
- // Deafult code for other platforms... Just skip nothing!
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(0, 0, false, "")
-#endif
-
-#undef BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS
-
-namespace boost { namespace typeindex { namespace detail {
- template <bool Condition>
- BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
- Condition,
- "TypeIndex library is misconfigured for your compiler. "
- "Please define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct values. See section "
- "'RTTI emulation limitations' of the documentation for more information."
- );
- }
-
- template <class T>
- BOOST_CXX14_CONSTEXPR inline void failed_to_get_function_name() BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
- sizeof(T) && false,
- "TypeIndex library could not detect your compiler. "
- "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
- "correct compiler macro for getting the whole function name. "
- "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that."
- );
- }
-
- template <unsigned int ArrayLength>
- BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::false_type) BOOST_NOEXCEPT {
- return begin;
- }
-
- template<class ForwardIterator1, class ForwardIterator2>
- BOOST_CXX14_CONSTEXPR inline ForwardIterator1 constexpr_search(
- ForwardIterator1 first1,
- ForwardIterator1 last1,
- ForwardIterator2 first2,
- ForwardIterator2 last2) BOOST_NOEXCEPT
- {
- if (first2 == last2) {
- return first1; // specified in C++11
- }
-
- while (first1 != last1) {
- ForwardIterator1 it1 = first1;
- ForwardIterator2 it2 = first2;
-
- while (*it1 == *it2) {
- ++it1;
- ++it2;
- if (it2 == last2) return first1;
- if (it1 == last1) return last1;
- }
-
- ++first1;
- }
-
- return last1;
- }
-
- BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) BOOST_NOEXCEPT {
- while (*v1 != '\0' && *v1 == *v2) {
- ++v1;
- ++v2;
- };
-
- return static_cast<int>(*v1) - *v2;
- }
-
- template <unsigned int ArrayLength>
- BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::true_type) BOOST_NOEXCEPT {
- const char* const it = constexpr_search(
- begin, begin + ArrayLength,
- ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1
- );
- return (it == begin + ArrayLength ? begin : it + sizeof(ctti_skip_until_runtime) - 1);
- }
-
- template <unsigned int ArrayLength>
- BOOST_CXX14_CONSTEXPR inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
- assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>();
- return skip_begining_runtime<ArrayLength - ctti_skip_size_at_begin>(
- begin + ctti_skip_size_at_begin,
- boost::integral_constant<bool, ctti_skip_more_at_runtime>()
- );
- }
-
-#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- template <unsigned int... I>
- struct index_seq {};
-
- template <typename Left, typename Right>
- struct make_index_sequence_join;
-
- template <unsigned int... Left, unsigned int... Right>
- struct make_index_sequence_join<index_seq<Left...>, index_seq<Right...> > {
- typedef index_seq<Left..., Right...> type;
- };
-
- template <unsigned int C, unsigned int D>
- struct make_index_seq_impl {
- typedef typename make_index_sequence_join<
- typename make_index_seq_impl<C, D / 2>::type,
- typename make_index_seq_impl<C + D / 2, (D + 1) / 2>::type
- >::type type;
- };
-
- template <unsigned int C>
- struct make_index_seq_impl<C, 0> {
- typedef index_seq<> type;
- };
-
- template <unsigned int C>
- struct make_index_seq_impl<C, 1> {
- typedef index_seq<C> type;
- };
-
- template <char... C>
- struct cstring {
- static constexpr unsigned int size_ = sizeof...(C);
- static constexpr char data_[size_] = { C... };
- };
-
- template <char... C>
- constexpr char cstring<C...>::data_[];
-#endif
-
-}}} // namespace boost::typeindex::detail
-
-namespace boost { namespace detail {
-
-/// Noncopyable type_info that does not require RTTI.
-/// CTTI == Compile Time Type Info.
-/// This name must be as short as possible, to avoid code bloat
-template <class T>
-struct ctti {
-
-#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- //helper functions
- template <unsigned int I>
- constexpr static char s() BOOST_NOEXCEPT { // step
- constexpr unsigned int offset =
- (I >= 10u ? 1u : 0u)
- + (I >= 100u ? 1u : 0u)
- + (I >= 1000u ? 1u : 0u)
- + (I >= 10000u ? 1u : 0u)
- + (I >= 100000u ? 1u : 0u)
- + (I >= 1000000u ? 1u : 0u)
- ;
-
- #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
- return BOOST_TYPE_INDEX_FUNCTION_SIGNATURE[I + offset];
- #elif defined(__FUNCSIG__)
- return __FUNCSIG__[I + offset];
- #else
- return __PRETTY_FUNCTION__[I + offset];
- #endif
- }
-
- template <unsigned int ...Indexes>
- constexpr static const char* impl(::boost::typeindex::detail::index_seq<Indexes...> ) BOOST_NOEXCEPT {
- return ::boost::typeindex::detail::cstring<s<Indexes>()...>::data_;
- }
-
- template <unsigned int D = 0> // `D` means `Dummy`
- constexpr static const char* n() BOOST_NOEXCEPT {
- #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
- constexpr unsigned int size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
- #elif defined(__FUNCSIG__)
- constexpr unsigned int size = sizeof(__FUNCSIG__);
- #elif defined(__PRETTY_FUNCTION__) \
- || defined(__GNUC__) \
- || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
- || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
- || (defined(__ICC) && (__ICC >= 600)) \
- || defined(__ghs__) \
- || defined(__DMC__)
- constexpr unsigned int size = sizeof(__PRETTY_FUNCTION__);
- #else
- boost::typeindex::detail::failed_to_get_function_name();
- #endif
-
- boost::typeindex::detail::assert_compile_time_legths<
- (size > boost::typeindex::detail::ctti_skip_size_at_begin + boost::typeindex::detail::ctti_skip_size_at_end + sizeof("const *") - 1)
- >();
- static_assert(!boost::typeindex::detail::ctti_skip_more_at_runtime, "Skipping for GCC in C++14 mode is unsupported");
-
- typedef typename boost::typeindex::detail::make_index_seq_impl<
- boost::typeindex::detail::ctti_skip_size_at_begin,
- size - sizeof("const *") + 1 - boost::typeindex::detail::ctti_skip_size_at_begin
- >::type idx_seq;
- return impl(idx_seq());
- }
-#else
- /// Returns raw name. Must be as short, as possible, to avoid code bloat
- BOOST_CXX14_CONSTEXPR static const char* n() BOOST_NOEXCEPT {
- #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
- return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
- #elif defined(__FUNCSIG__)
- return boost::typeindex::detail::skip_begining< sizeof(__FUNCSIG__) >(__FUNCSIG__);
- #elif defined(__PRETTY_FUNCTION__) \
- || defined(__GNUC__) \
- || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
- || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
- || (defined(__ICC) && (__ICC >= 600)) \
- || defined(__ghs__) \
- || defined(__DMC__)
- return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__);
- #else
- boost::typeindex::detail::failed_to_get_function_name();
- return "";
- #endif
- }
-#endif
-};
-
-}} // namespace boost::detail
-
-#endif // BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index a8cef2c4972..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index/detail/ctti_register_class.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// Copyright (c) Antony Polukhin, 2013-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_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
-#define BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
-
-/// \file ctti_register_class.hpp
-/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::ctti_type_index.
-/// Not intended for inclusion from user's code.
-
-#include <boost/type_index/ctti_type_index.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace typeindex { namespace detail {
-
-template <class T>
-inline const ctti_data& ctti_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
- return ctti_construct<T>();
-}
-
-}}} // namespace boost::typeindex::detail
-
-/// @cond
-#define BOOST_TYPE_INDEX_REGISTER_CLASS \
- virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
- return boost::typeindex::detail::ctti_construct_typeid_ref(this); \
- } \
-/**/
-/// @endcond
-
-#endif // BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
-
diff --git a/src/third_party/boost-1.69.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
deleted file mode 100644
index 95a26f7b0ee..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index/detail/stl_register_class.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// Copyright (c) Antony Polukhin, 2013-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_TYPE_INDEX_STL_REGISTER_CLASS_HPP
-#define BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP
-
-/// \file stl_register_class.hpp
-/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::stl_type_index.
-/// Not intended for inclusion from user's code.
-
-#include <boost/type_index/stl_type_index.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace typeindex { namespace detail {
-
-template <class T>
-inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
- return typeid(T);
-}
-
-}}} // namespace boost::typeindex::detail
-
-/// @cond
-#define BOOST_TYPE_INDEX_REGISTER_CLASS \
- virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
- return boost::typeindex::detail::stl_construct_typeid_ref(this); \
- } \
-/**/
-/// @endcond
-
-#endif // BOOST_TYPE_INDEX_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
deleted file mode 100644
index cef22ac4ced..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index/stl_type_index.hpp
+++ /dev/null
@@ -1,278 +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>
-
-#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.69.0/boost/type_index/type_index_facade.hpp b/src/third_party/boost-1.69.0/boost/type_index/type_index_facade.hpp
deleted file mode 100644
index e6dde8f3f98..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_index/type_index_facade.hpp
+++ /dev/null
@@ -1,297 +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_TYPE_INDEX_FACADE_HPP
-#define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
-
-#include <boost/config.hpp>
-#include <boost/container_hash/hash_fwd.hpp>
-#include <string>
-#include <cstring>
-
-#if !defined(BOOST_NO_IOSTREAM)
-#if !defined(BOOST_NO_IOSFWD)
-#include <iosfwd> // for std::basic_ostream
-#else
-#include <ostream>
-#endif
-#endif
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace typeindex {
-
-/// \class type_index_facade
-///
-/// This class takes care about the comparison operators, hash functions and
-/// ostream operators. Use this class as a public base class for defining new
-/// type_info-conforming classes.
-///
-/// \b Example:
-/// \code
-/// class stl_type_index: public type_index_facade<stl_type_index, std::type_info>
-/// {
-/// public:
-/// typedef std::type_info type_info_t;
-/// private:
-/// const type_info_t* data_;
-///
-/// public:
-/// stl_type_index(const type_info_t& data) noexcept
-/// : data_(&data)
-/// {}
-/// // ...
-/// };
-/// \endcode
-///
-/// \tparam Derived Class derived from type_index_facade.
-/// \tparam TypeInfo Class that will be used as a base type_info class.
-/// \note Take a look at the protected methods. They are \b not \b defined in type_index_facade.
-/// Protected member functions raw_name() \b must be defined in Derived class. All the other
-/// methods are mandatory.
-/// \see 'Making a custom type_index' section for more information about
-/// creating your own type_index using type_index_facade.
-template <class Derived, class TypeInfo>
-class type_index_facade {
-private:
- /// @cond
- BOOST_CXX14_CONSTEXPR const Derived & derived() const BOOST_NOEXCEPT {
- return *static_cast<Derived const*>(this);
- }
- /// @endcond
-public:
- typedef TypeInfo type_info_t;
-
- /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
- /// \return Name of a type. By default returns Derived::raw_name().
- inline const char* name() const BOOST_NOEXCEPT {
- return derived().raw_name();
- }
-
- /// \b Override: This function \b may be redefined in Derived class. Overrides may throw.
- /// \return Human readable type name. By default returns Derived::name().
- inline std::string pretty_name() const {
- return derived().name();
- }
-
- /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
- /// \return True if two types are equal. By default compares types by raw_name().
- inline bool equal(const Derived& rhs) const BOOST_NOEXCEPT {
- const char* const left = derived().raw_name();
- const char* const right = rhs.raw_name();
- return left == right || !std::strcmp(left, right);
- }
-
- /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
- /// \return True if rhs is greater than this. By default compares types by raw_name().
- inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
- const char* const left = derived().raw_name();
- const char* const right = rhs.raw_name();
- return left != right && std::strcmp(left, right) < 0;
- }
-
- /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
- /// \return Hash code of a type. By default hashes types by raw_name().
- /// \note Derived class header \b must include <boost/container_hash/hash.hpp>, \b unless this function is redefined in
- /// Derived class to not use boost::hash_range().
- inline std::size_t hash_code() const BOOST_NOEXCEPT {
- const char* const name_raw = derived().raw_name();
- return boost::hash_range(name_raw, name_raw + std::strlen(name_raw));
- }
-
-#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
-protected:
- /// \b Override: This function \b must be redefined in Derived class. Overrides \b must not throw.
- /// \return Pointer to unredable/raw type name.
- inline const char* raw_name() const BOOST_NOEXCEPT;
-
- /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
- /// \return Const reference to underlying low level type_info_t.
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
-
- /// This is a factory method that is used to create instances of Derived classes.
- /// boost::typeindex::type_id() will call this method, if Derived has same type as boost::typeindex::type_index.
- ///
- /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw.
- /// Overrides \b must remove const, volatile && and & modifiers from T.
- /// \tparam T Type for which type_index must be created.
- /// \return type_index for type T.
- template <class T>
- static Derived type_id() BOOST_NOEXCEPT;
-
- /// This is a factory method that is used to create instances of Derived classes.
- /// boost::typeindex::type_id_with_cvr() will call this method, if Derived has same type as boost::typeindex::type_index.
- ///
- /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw.
- /// Overrides \b must \b not remove const, volatile && and & modifiers from T.
- /// \tparam T Type for which type_index must be created.
- /// \return type_index for type T.
- template <class T>
- static Derived type_id_with_cvr() BOOST_NOEXCEPT;
-
- /// This is a factory method that is used to create instances of Derived classes.
- /// boost::typeindex::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeindex::type_index.
- ///
- /// \b Override: This function \b may be redefined and made public in Derived class.
- /// \param variable Variable which runtime type will be stored in type_index.
- /// \return type_index with runtime type of variable.
- template <class T>
- static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT;
-
-#endif
-
-};
-
-/// @cond
-template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return static_cast<Derived const&>(lhs).equal(static_cast<Derived const&>(rhs));
-}
-
-template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));
-}
-
-
-
-template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return rhs < lhs;
-}
-
-template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return !(lhs > rhs);
-}
-
-template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return !(lhs < rhs);
-}
-
-template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return !(lhs == rhs);
-}
-
-// ######################### COMPARISONS with Derived ############################ //
-template <class Derived, class TypeInfo>
-inline bool operator == (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return Derived(lhs) == rhs;
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator < (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return Derived(lhs) < rhs;
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator > (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return rhs < Derived(lhs);
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator <= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return !(Derived(lhs) > rhs);
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator >= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return !(Derived(lhs) < rhs);
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator != (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return !(Derived(lhs) == rhs);
-}
-
-
-template <class Derived, class TypeInfo>
-inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
- return lhs == Derived(rhs);
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
- return lhs < Derived(rhs);
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
- return Derived(rhs) < lhs;
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
- return !(lhs > Derived(rhs));
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
- return !(lhs < Derived(rhs));
-}
-
-template <class Derived, class TypeInfo>
-inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
- return !(lhs == Derived(rhs));
-}
-
-// ######################### COMPARISONS with Derived END ############################ //
-
-/// @endcond
-
-#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
-
-/// noexcept comparison operators for type_index_facade classes.
-bool operator ==, !=, <, ... (const type_index_facade& lhs, const type_index_facade& rhs) noexcept;
-
-/// noexcept comparison operators for type_index_facade and it's TypeInfo classes.
-bool operator ==, !=, <, ... (const type_index_facade& lhs, const TypeInfo& rhs) noexcept;
-
-/// noexcept comparison operators for type_index_facade's TypeInfo and type_index_facade classes.
-bool operator ==, !=, <, ... (const TypeInfo& lhs, const type_index_facade& rhs) noexcept;
-
-#endif
-
-#ifndef BOOST_NO_IOSTREAM
-#ifdef BOOST_NO_TEMPLATED_IOSTREAMS
-/// @cond
-/// Ostream operator that will output demangled name
-template <class Derived, class TypeInfo>
-inline std::ostream& operator<<(std::ostream& ostr, const type_index_facade<Derived, TypeInfo>& ind) {
- ostr << static_cast<Derived const&>(ind).pretty_name();
- return ostr;
-}
-/// @endcond
-#else
-/// Ostream operator that will output demangled name.
-template <class CharT, class TriatT, class Derived, class TypeInfo>
-inline std::basic_ostream<CharT, TriatT>& operator<<(
- std::basic_ostream<CharT, TriatT>& ostr,
- const type_index_facade<Derived, TypeInfo>& ind)
-{
- ostr << static_cast<Derived const&>(ind).pretty_name();
- return ostr;
-}
-#endif // BOOST_NO_TEMPLATED_IOSTREAMS
-#endif // BOOST_NO_IOSTREAM
-
-/// This free function is used by Boost's unordered containers.
-/// \note <boost/container_hash/hash.hpp> has to be included if this function is used.
-template <class Derived, class TypeInfo>
-inline std::size_t hash_value(const type_index_facade<Derived, TypeInfo>& lhs) BOOST_NOEXCEPT {
- return static_cast<Derived const&>(lhs).hash_code();
-}
-
-}} // namespace boost::typeindex
-
-#endif // 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
deleted file mode 100644
index a767e4192b5..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits.hpp
+++ /dev/null
@@ -1,155 +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/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.69.0/boost/type_traits/detail/config.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/config.hpp
deleted file mode 100644
index 7c6149e50ab..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/config.hpp
+++ /dev/null
@@ -1,92 +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
-
-//
-// 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.69.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
deleted file mode 100644
index ec6e52e73ba..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/has_binary_operator.hpp
+++ /dev/null
@@ -1,279 +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/config.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 C4018: '<' : signed/unsigned mismatch
-// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
-// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
-// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
-// warning C4804: '<' : unsafe use of type 'bool' in operation
-// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
-# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-# pragma warning ( disable : 6334)
-# endif
-#endif
-
-#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 U, class Ret, class = boost::void_t<>>
- struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {};
-
- template <class T, class U, class Ret>
- struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)<T, U, Ret, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>()), Ret>::value> {};
-
- template <class T, class U, class = boost::void_t<> >
- struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {};
-
- template <class T, class U>
- struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())>::value> {};
-
- template <class T, class U, class = boost::void_t<>>
- struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {};
-
- template <class T, class U>
- struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())> >
- : public boost::true_type {};
-
- }
-
- template <class T, class U = 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, U, Ret> {};
- template <class T, class U>
- struct BOOST_TT_TRAIT_NAME<T, U, void> : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) <T, U> {};
- template <class T, class U>
- struct BOOST_TT_TRAIT_NAME<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) <T, U> {};
-
-
-}
-
-#else
-
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_convertible.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>
-#include <boost/type_traits/detail/is_likely_lambda.hpp>
-
-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&, const any&);
-
-
-// 3. checks if the operator returns void or not
-// conditions: Lhs!=void and 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
-// (lhs 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 -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
-// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs 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 Lhs, 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((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
-};
-
-
-// 4. checks if the return type is Ret or Ret==dont_care
-// conditions: Lhs!=void and Rhs!=void
-
-struct dont_care { };
-
-template < typename Lhs, typename Rhs, typename Ret, bool Returns_void >
-struct operator_returns_Ret;
-
-template < typename Lhs, typename Rhs >
-struct operator_returns_Ret < Lhs, Rhs, dont_care, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Lhs, typename Rhs >
-struct operator_returns_Ret < Lhs, Rhs, dont_care, false > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Lhs, typename Rhs >
-struct operator_returns_Ret < Lhs, Rhs, void, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Lhs, typename Rhs >
-struct operator_returns_Ret < Lhs, Rhs, void, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Lhs, typename Rhs, typename Ret >
-struct operator_returns_Ret < Lhs, 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 Lhs, typename Rhs, typename Ret >
-struct operator_returns_Ret < Lhs, 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(make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
-};
-
-
-// 5. checks for operator existence
-// condition: Lhs!=void and 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 Lhs, 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(((make<Lhs>() 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(Lhs, Rhs) is forbidden by the
-// standard.
-// Forbidden_if is a bool that is:
-// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
-// (would yield compilation error if used)
-// - false otherwise
-template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if >
-struct trait_impl1;
-
-template < typename Lhs, typename Rhs, typename Ret >
-struct trait_impl1 < Lhs, Rhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Lhs, typename Rhs, typename Ret >
-struct trait_impl1 < Lhs, Rhs, Ret, false > {
- BOOST_STATIC_CONSTANT(bool,
- value = (operator_exists < Lhs, Rhs >::value && operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value));
-};
-
-// some specializations needs to be declared for the special void case
-template < typename Rhs, typename Ret >
-struct trait_impl1 < void, Rhs, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Lhs, typename Ret >
-struct trait_impl1 < Lhs, void, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Ret >
-struct trait_impl1 < void, void, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-// defines some typedef for convenience
-template < typename Lhs, typename Rhs, typename Ret >
-struct trait_impl {
- typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
- typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
- typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
- typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
- typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
- 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 < Lhs_noref, 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 Lhs, class Rhs=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, Rhs, Ret >::value)>{};
-
-} // namespace boost
-
-#endif
-
-#if defined(BOOST_MSVC)
-# pragma warning ( pop )
-#endif
-
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
deleted file mode 100644
index 18124167986..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/has_postfix_operator.hpp
+++ /dev/null
@@ -1,250 +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/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
deleted file mode 100644
index 31987d66d28..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/has_prefix_operator.hpp
+++ /dev/null
@@ -1,280 +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/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_11.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_11.hpp
deleted file mode 100644
index 30311307195..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_11.hpp
+++ /dev/null
@@ -1,501 +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_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_ptr_tester.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_tester.hpp
deleted file mode 100644
index 4fe88e81b2c..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_tester.hpp
+++ /dev/null
@@ -1,449 +0,0 @@
-
-// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
-// Aleksey Gurtovoy, 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.
-
-#if !defined(BOOST_PP_IS_ITERATING)
-
-///// header body
-
-#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
-#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
-
-#include <boost/type_traits/detail/yes_no_type.hpp>
-
-#if defined(BOOST_TT_PREPROCESSING_MODE)
-//
-// Hide include dependencies from analysers since they're
-// only require in maintenance mode:
-//
-#define PP1 <boost/preprocessor/iterate.hpp>
-#define PP2 <boost/preprocessor/enum_params.hpp>
-#define PP3 <boost/preprocessor/comma_if.hpp>
-#include PP1
-#include PP2
-#include PP3
-#undef PP1
-#undef PP2
-#undef PP3
-#endif
-
-namespace boost {
-namespace type_traits {
-
-// Note it is acceptable to use ellipsis here, since the argument will
-// always be a pointer type of some sort (JM 2005/06/04):
-no_type BOOST_TT_DECL is_function_ptr_tester(...);
-
-#if !defined(BOOST_TT_PREPROCESSING_MODE)
-// pre-processed code, don't edit, try GNU cpp with
-// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename
-
-template <class R >
-yes_type is_function_ptr_tester(R (*)());
-template <class R >
-yes_type is_function_ptr_tester(R (*)( ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R >
-yes_type is_function_ptr_tester(R (__stdcall*)());
-#ifndef _MANAGED
-template <class R >
-yes_type is_function_ptr_tester(R (__fastcall*)());
-#endif
-template <class R >
-yes_type is_function_ptr_tester(R (__cdecl*)());
-#endif
-template <class R , class T0 >
-yes_type is_function_ptr_tester(R (*)( T0));
-template <class R , class T0 >
-yes_type is_function_ptr_tester(R (*)( T0 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0));
-#ifndef _MANAGED
-template <class R , class T0 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0));
-#endif
-template <class R , class T0 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0));
-#endif
-template <class R , class T0 , class T1 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1));
-template <class R , class T0 , class T1 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1));
-#endif
-template <class R , class T0 , class T1 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1));
-#endif
-template <class R , class T0 , class T1 , class T2 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2));
-template <class R , class T0 , class T1 , class T2 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2));
-#endif
-template <class R , class T0 , class T1 , class T2 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3));
-template <class R , class T0 , class T1 , class T2 , class T3 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...));
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-#ifndef _MANAGED
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-#endif
-template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-#endif
-#else
-
-#define BOOST_PP_ITERATION_PARAMS_1 \
- (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp"))
-#include BOOST_PP_ITERATE()
-
-#endif // BOOST_TT_PREPROCESSING_MODE
-
-} // namespace type_traits
-} // namespace boost
-
-#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
-
-///// iteration
-
-#else
-#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1)
-#undef __stdcall
-#undef __fastcall
-#undef __cdecl
-
-template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
-template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...));
-@#endif
-@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-@#ifndef _MANAGED
-template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-@#endif
-template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-@#endif
-
-#undef BOOST_PP_COUNTER
-#endif // BOOST_PP_IS_ITERATING
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
deleted file mode 100644
index 39aa5281145..00000000000
--- a/src/third_party/boost-1.69.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/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.69.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
deleted file mode 100644
index c186db7bacf..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
+++ /dev/null
@@ -1,1800 +0,0 @@
-
-// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
-// Aleksey Gurtovoy, 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.
-
-#if !defined(BOOST_PP_IS_ITERATING)
-
-///// header body
-
-#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
-#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
-
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/detail/config.hpp>
-
-#if defined(BOOST_TT_PREPROCESSING_MODE)
-//
-// Maintentance mode, hide include dependencies
-// from dependency trackers:
-//
-#define PPI <boost/preprocessor/iterate.hpp>
-#include PPI
-#undef PPI
-#define PPI <boost/preprocessor/enum_params.hpp>
-#include PPI
-#undef PPI
-#define PPI <boost/preprocessor/comma_if.hpp>
-#include PPI
-#undef PPI
-#endif
-
-namespace boost {
-namespace type_traits {
-
-no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...);
-
-#if !defined(BOOST_TT_PREPROCESSING_MODE)
-// pre-processed code, don't edit, try GNU cpp with
-// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)());
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() volatile);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const volatile);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...));
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) volatile);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)());
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() volatile);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const volatile);
-
-#ifndef _MANAGED
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)());
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() volatile);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const volatile);
-
-#endif
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)());
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() volatile);
-
-template <class R, class T >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const volatile);
-
-#endif
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0));
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) volatile);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const volatile);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...));
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) volatile);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0));
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) volatile);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0));
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) volatile);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const volatile);
-
-#endif
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0));
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) volatile);
-
-template <class R, class T , class T0 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1));
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) volatile);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const volatile);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...));
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) volatile);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1));
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) volatile);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1));
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) volatile);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1));
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) volatile);
-
-template <class R, class T , class T0 , class T1 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2));
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2));
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2));
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2));
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile);
-
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile);
-
-#endif
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile);
-#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile);
-
-#ifndef _MANAGED
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile);
-
-#endif
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24));
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile);
-
-template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24 >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile);
-
-#endif
-
-#else
-
-#define BOOST_PP_ITERATION_PARAMS_1 \
- (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp"))
-#include BOOST_PP_ITERATE()
-
-#endif // BOOST_TT_PREPROCESSING_MODE
-
-} // namespace type_traits
-} // namespace boost
-
-#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
-
-///// iteration
-
-#else
-#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1)
-#undef __stdcall
-#undef __fastcall
-#undef __cdecl
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
-
-@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...));
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile);
-@#endif
-@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers:
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
-
-@#ifndef _MANAGED
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
-
-@#endif
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
-
-template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
-yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
-
-@#endif
-
-#undef BOOST_PP_COUNTER
-#endif // BOOST_PP_IS_ITERATING
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
deleted file mode 100644
index b77a4a57407..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp
+++ /dev/null
@@ -1,557 +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_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/has_minus.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_minus.hpp
deleted file mode 100644
index 3f6271a57ba..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_minus.hpp
+++ /dev/null
@@ -1,158 +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_MINUS_HPP_INCLUDED
-#define BOOST_TT_HAS_MINUS_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/detail/config.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 C4018: '<' : signed/unsigned mismatch
-// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
-// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
-// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
-// warning C4804: '<' : unsafe use of type 'bool' in operation
-// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
-# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-# pragma warning ( disable : 6334)
-# endif
-#endif
-
-#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 <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <utility>
-
-namespace boost
-{
-
- namespace binary_op_detail {
-
- struct dont_care;
-
- template <class T, class U, class Ret, class = boost::void_t<>>
- struct has_minus_ret_imp : public boost::false_type {};
-
- template <class T, class U, class Ret>
- struct has_minus_ret_imp<T, U, Ret, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>()), Ret>::value> {};
-
- template <class T, class U, class = boost::void_t<> >
- struct has_minus_void_imp : public boost::false_type {};
-
- template <class T, class U>
- struct has_minus_void_imp<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::value> {};
-
- template <class T, class U, class = boost::void_t<>>
- struct has_minus_dc_imp : public boost::false_type {};
-
- template <class T, class U>
- struct has_minus_dc_imp<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())> >
- : public boost::true_type {};
-
- template <class T, class U, class Ret>
- struct has_minus_ret_filter : public boost::binary_op_detail::has_minus_ret_imp <T, U, Ret> {};
- template <class T, class U>
- struct has_minus_ret_filter<T, U, void> : public boost::binary_op_detail::has_minus_void_imp <T, U> {};
- template <class T, class U>
- struct has_minus_ret_filter<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::has_minus_dc_imp <T, U> {};
-
- template <class T, class U, class Ret, bool b>
- struct has_minus_void_ptr_filter : public boost::binary_op_detail::has_minus_ret_filter <T, U, Ret> {};
- template <class T, class U, class Ret>
- struct has_minus_void_ptr_filter<T, U, Ret, true> : public boost::false_type {};
-
- }
-
- template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care>
- struct has_minus :
- public boost::binary_op_detail::has_minus_void_ptr_filter<
- T, U, Ret,
- boost::is_void<typename remove_pointer<typename remove_reference<T>::type>::type>::value
- || boost::is_void<typename remove_pointer<typename remove_reference<U>::type>::type>::value> {};
-
-
-}
-
-#else
-
-
-#define BOOST_TT_TRAIT_NAME has_minus
-#define BOOST_TT_TRAIT_OP -
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_fundamental< Rhs_nocv >::value && \
- (! ::boost::is_integral< Rhs_noref >::value )\
- ) || \
- /* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_void< Lhs_noptr >::value && \
- ( \
- ::boost::is_fundamental< Rhs_nocv >::value || \
- ::boost::is_pointer< Rhs_noref >::value\
- )\
- ) || \
- /* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_void< Rhs_noptr >::value && \
- (\
- ::boost::is_fundamental< Lhs_nocv >::value || \
- ::boost::is_pointer< Lhs_noref >::value\
- )\
- ) ||\
- /* Lhs=fundamental and Rhs=pointer */\
- (\
- ::boost::is_fundamental< Lhs_nocv >::value && \
- ::boost::is_pointer< Rhs_noref >::value\
- ) ||\
- /* two different pointers */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_pointer< Rhs_noref >::value && \
- (! ::boost::is_same< Lhs_nocv, Rhs_nocv >::value )\
- )\
- )
-
-#define BOOST_TT_FORBIDDEN_IF_NEW (boost::is_void<typename remove_pointer<typename boost::remove_reference<T>::type>::type>::value || boost::is_void<typename remove_pointer<typename boost::remove_reference<U>::type>::type>::value)
-
-#include <boost/type_traits/detail/has_binary_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
-
-#if defined(BOOST_MSVC)
-# pragma warning (pop)
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp
deleted file mode 100644
index 936ffedb472..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp
+++ /dev/null
@@ -1,163 +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_minus_assign_ASSIGN_HPP_INCLUDED
-#define BOOST_TT_has_minus_assign_ASSIGN_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/detail/config.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 C4018: '<' : signed/unsigned mismatch
-// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
-// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
-// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
-// warning C4804: '<' : unsafe use of type 'bool' in operation
-// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
-# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-# pragma warning ( disable : 6334)
-# endif
-#endif
-
-#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/is_pointer.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <utility>
-
-namespace boost
-{
-
- namespace binary_op_detail {
-
- struct dont_care;
-
- template <class T, class U, class Ret, class = boost::void_t<>>
- struct has_minus_assign_ret_imp : public boost::false_type {};
-
- template <class T, class U, class Ret>
- struct has_minus_assign_ret_imp<T, U, Ret, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>()), Ret>::value> {};
-
- template <class T, class U, class = boost::void_t<> >
- struct has_minus_assign_void_imp : public boost::false_type {};
-
- template <class T, class U>
- struct has_minus_assign_void_imp<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::value> {};
-
- template <class T, class U, class = boost::void_t<>>
- struct has_minus_assign_dc_imp : public boost::false_type {};
-
- template <class T, class U>
- struct has_minus_assign_dc_imp<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())> >
- : public boost::true_type {};
-
- template <class T, class U, class Ret>
- struct has_minus_assign_ret_filter : public boost::binary_op_detail::has_minus_assign_ret_imp <T, U, Ret> {};
- template <class T, class U>
- struct has_minus_assign_ret_filter<T, U, void> : public boost::binary_op_detail::has_minus_assign_void_imp <T, U> {};
- template <class T, class U>
- struct has_minus_assign_ret_filter<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::has_minus_assign_dc_imp <T, U> {};
-
- template <class T, class U, class Ret, bool b>
- struct has_minus_assign_void_ptr_filter : public boost::binary_op_detail::has_minus_assign_ret_filter <T, U, Ret> {};
- template <class T, class U, class Ret>
- struct has_minus_assign_void_ptr_filter<T, U, Ret, true> : public boost::false_type {};
-
- }
-
- template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care>
- struct has_minus_assign :
- public boost::binary_op_detail::has_minus_assign_void_ptr_filter<
- T, U, Ret,
- boost::is_void<typename remove_pointer<typename remove_reference<T>::type>::type>::value
- || boost::is_void<typename remove_pointer<typename remove_reference<U>::type>::type>::value
- || (boost::is_pointer<typename remove_reference<T>::type>::value && boost::is_pointer<typename remove_reference<U>::type>::value)> {};
-
-
-}
-
-#else
-
-#define BOOST_TT_TRAIT_NAME has_minus_assign
-#define BOOST_TT_TRAIT_OP -=
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_fundamental< Rhs_nocv >::value && \
- (! ::boost::is_integral< Rhs_noref >::value )\
- ) || \
- /* Lhs==void* and Rhs==fundamental */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_void< Lhs_noptr >::value && \
- ::boost::is_fundamental< Rhs_nocv >::value\
- ) || \
- /* Rhs==void* and Lhs==fundamental */\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_void< Rhs_noptr >::value && \
- ::boost::is_fundamental< Lhs_nocv >::value\
- ) || \
- /* Lhs=fundamental and Rhs=pointer */\
- (\
- ::boost::is_fundamental< Lhs_nocv >::value && \
- ::boost::is_pointer< Rhs_noref >::value\
- ) || \
- /* Lhs==pointer and Rhs==pointer */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_pointer< Rhs_noref >::value\
- ) || \
- /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
- (\
- (\
- ::boost::is_fundamental< Lhs_nocv >::value || \
- ::boost::is_pointer< Lhs_noref >::value\
- ) && \
- (\
- ::boost::is_fundamental< Rhs_nocv >::value || \
- ::boost::is_pointer< Rhs_noref >::value\
- ) && \
- ::boost::is_const< Lhs_noref >::value\
- )\
- )
-
-
-#include <boost/type_traits/detail/has_binary_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
-
-#if defined(BOOST_MSVC)
-# pragma warning (pop)
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp
deleted file mode 100644
index cf012e243ca..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp
+++ /dev/null
@@ -1,161 +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_PLUS_ASSIGN_HPP_INCLUDED
-#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/detail/config.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 C4018: '<' : signed/unsigned mismatch
-// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
-// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
-// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
-// warning C4804: '<' : unsafe use of type 'bool' in operation
-// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
-# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-# pragma warning ( disable : 6334)
-# endif
-#endif
-
-#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/is_same.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <utility>
-
-namespace boost
-{
-
- namespace binary_op_detail {
-
- struct dont_care;
-
- template <class T, class U, class Ret, class = boost::void_t<>>
- struct has_plus_assign_ret_imp : public boost::false_type {};
-
- template <class T, class U, class Ret>
- struct has_plus_assign_ret_imp<T, U, Ret, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>()), Ret>::value> {};
-
- template <class T, class U, class = boost::void_t<> >
- struct has_plus_assign_void_imp : public boost::false_type {};
-
- template <class T, class U>
- struct has_plus_assign_void_imp<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())> >
- : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::value> {};
-
- template <class T, class U, class = boost::void_t<>>
- struct has_plus_assign_dc_imp : public boost::false_type {};
-
- template <class T, class U>
- struct has_plus_assign_dc_imp<T, U, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())> >
- : public boost::true_type {};
-
- template <class T, class U, class Ret>
- struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_ret_imp <T, U, Ret> {};
- template <class T, class U>
- struct has_plus_assign_filter_ret<T, U, void> : public boost::binary_op_detail:: has_plus_assign_void_imp <T, U> {};
- template <class T, class U>
- struct has_plus_assign_filter_ret<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: has_plus_assign_dc_imp <T, U> {};
-
- template <class T, class U, class Ret, bool f>
- struct has_plus_assign_filter_impossible : public boost::binary_op_detail:: has_plus_assign_filter_ret <T, U, Ret> {};
- template <class T, class U, class Ret>
- struct has_plus_assign_filter_impossible<T, U, Ret, true> : public boost::false_type {};
-
- }
-
- template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care>
- struct has_plus_assign : public boost::binary_op_detail:: has_plus_assign_filter_impossible <T, U, Ret, boost::is_arithmetic<typename boost::remove_reference<T>::type>::value && boost::is_pointer<typename remove_reference<U>::type>::value && !boost::is_same<bool, typename boost::remove_cv<typename remove_reference<T>::type>::type>::value> {};
-
-}
-
-#else
-
-#define BOOST_TT_TRAIT_NAME has_plus_assign
-#define BOOST_TT_TRAIT_OP +=
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* Lhs==pointer and Rhs==pointer */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_pointer< Rhs_noref >::value\
- ) || \
- /* Lhs==void* and Rhs==fundamental */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_void< Lhs_noptr >::value && \
- ::boost::is_fundamental< Rhs_nocv >::value\
- ) || \
- /* Rhs==void* and Lhs==fundamental */\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_void< Rhs_noptr >::value && \
- ::boost::is_fundamental< Lhs_nocv >::value\
- ) || \
- /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_fundamental< Rhs_nocv >::value && \
- (! ::boost::is_integral< Rhs_noref >::value )\
- ) || \
- /* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_fundamental< Lhs_nocv >::value && \
- (! ::boost::is_same< Lhs_nocv, bool >::value )\
- ) || \
- /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
- (\
- (\
- ::boost::is_fundamental< Lhs_nocv >::value || \
- ::boost::is_pointer< Lhs_noref >::value\
- ) && \
- ( \
- ::boost::is_fundamental< Rhs_nocv >::value || \
- ::boost::is_pointer< Rhs_noref >::value\
- ) && \
- ::boost::is_const< Lhs_noref >::value\
- )\
- )
-
-
-#include <boost/type_traits/detail/has_binary_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
-
-#if defined(BOOST_MSVC)
-# pragma warning (pop)
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp
deleted file mode 100644
index cad04b3c9d5..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-
-// (C) Copyright John Maddock 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_COMPLETE_HPP_INCLUDED
-#define BOOST_TT_IS_COMPLETE_HPP_INCLUDED
-
-#include <boost/type_traits/declval.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/config/workaround.hpp>
-
-/*
- * CAUTION:
- * ~~~~~~~~
- *
- * THIS TRAIT EXISTS SOLELY TO GENERATE HARD ERRORS WHEN A ANOTHER TRAIT
- * WHICH REQUIRES COMPLETE TYPES AS ARGUMENTS IS PASSED AN INCOMPLETE TYPE
- *
- * DO NOT MAKE GENERAL USE OF THIS TRAIT, AS THE COMPLETENESS OF A TYPE
- * VARIES ACROSS TRANSLATION UNITS AS WELL AS WITHIN A SINGLE UNIT.
- *
-*/
-
-namespace boost {
-
-
-//
-// We will undef this if the trait isn't fully functional:
-//
-#define BOOST_TT_HAS_WORKING_IS_COMPLETE
-
-#if !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1900) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40600)
-
- namespace detail{
-
- template <unsigned N>
- struct ok_tag { double d; char c[N]; };
-
- template <class T>
- ok_tag<sizeof(T)> check_is_complete(int);
- template <class T>
- char check_is_complete(...);
- }
-
- template <class T> struct is_complete
- : public integral_constant<bool, ::boost::is_function<typename boost::remove_reference<T>::type>::value || (sizeof(detail::check_is_complete<T>(0)) != sizeof(char))> {};
-
-#elif !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
-
- namespace detail
- {
-
- template <class T>
- struct is_complete_imp
- {
- template <class U, class = decltype(sizeof(boost::declval< U >())) >
- static type_traits::yes_type check(U*);
-
- template <class U>
- static type_traits::no_type check(...);
-
- static const bool value = sizeof(check<T>(0)) == sizeof(type_traits::yes_type);
- };
-
-} // namespace detail
-
-
- template <class T>
- struct is_complete : boost::integral_constant<bool, ::boost::is_function<typename boost::remove_reference<T>::type>::value || ::boost::detail::is_complete_imp<T>::value>
- {};
- template <class T>
- struct is_complete<T&> : boost::is_complete<T> {};
-
-#else
-
- template <class T> struct is_complete
- : public boost::integral_constant<bool, true> {};
-
-#undef BOOST_TT_HAS_WORKING_IS_COMPLETE
-
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_COMPLETE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp
deleted file mode 100644
index da6259948b9..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-
-// (C) Copyright John Maddock 2015.
-// 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_CONSTRUCTIBLE_HPP_INCLUDED
-#define BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
-
-#include <boost/type_traits/integral_constant.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, < 40500)
-
-#include <boost/type_traits/is_destructible.hpp>
-#include <boost/type_traits/is_default_constructible.hpp>
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/declval.hpp>
-#include <boost/type_traits/is_complete.hpp>
-#include <boost/static_assert.hpp>
-
-#define BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING 1
-
-namespace boost{
-
- namespace detail{
-
- struct is_constructible_imp
- {
- template<typename T, typename ...TheArgs, typename = decltype(T(boost::declval<TheArgs>()...))>
- static boost::type_traits::yes_type test(int);
- template<typename, typename...>
- static boost::type_traits::no_type test(...);
-
- template<typename T, typename Arg, typename = decltype(::new T(boost::declval<Arg>()))>
- static boost::type_traits::yes_type test1(int);
- template<typename, typename>
- static boost::type_traits::no_type test1(...);
-
- template <typename T>
- static boost::type_traits::yes_type ref_test(T);
- template <typename T>
- static boost::type_traits::no_type ref_test(...);
- };
-
- }
-
- template <class T, class ...Args> struct is_constructible : public integral_constant<bool, sizeof(detail::is_constructible_imp::test<T, Args...>(0)) == sizeof(boost::type_traits::yes_type)>
- {
- BOOST_STATIC_ASSERT_MSG(::boost::is_complete<T>::value, "The target type must be complete in order to test for constructibility");
- };
- template <class T, class Arg> struct is_constructible<T, Arg> : public integral_constant<bool, is_destructible<T>::value && sizeof(detail::is_constructible_imp::test1<T, Arg>(0)) == sizeof(boost::type_traits::yes_type)>
- {
- BOOST_STATIC_ASSERT_MSG(::boost::is_complete<T>::value, "The target type must be complete in order to test for constructibility");
- };
- template <class Ref, class Arg> struct is_constructible<Ref&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
- template <class Ref, class Arg> struct is_constructible<Ref&&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
-
- template <> struct is_constructible<void> : public false_type{};
- template <> struct is_constructible<void const> : public false_type{};
- template <> struct is_constructible<void const volatile> : public false_type{};
- template <> struct is_constructible<void volatile> : public false_type{};
-
- template <class T> struct is_constructible<T> : public is_default_constructible<T>{};
-
-#else
-
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_default_constructible.hpp>
-
-namespace boost{
-
- // We don't know how to implement this:
- template <class T, class U = void> struct is_constructible : public is_convertible<U, T>{};
- template <class T> struct is_constructible<T, void> : public is_default_constructible<T>{};
- template <> struct is_constructible<void, void> : public false_type{};
- template <> struct is_constructible<void const, void> : public false_type{};
- template <> struct is_constructible<void const volatile, void> : public false_type{};
- template <> struct is_constructible<void volatile, void> : public false_type{};
- template <class Ref> struct is_constructible<Ref&, void> : public false_type{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template <class Ref> struct is_constructible<Ref&&, void> : public false_type{};
-#endif
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp
deleted file mode 100644
index 9a4a0a78b29..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-
-// (C) Copyright John Maddock 2015.
-// 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_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
-#define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
-
-#include <cstddef> // size_t
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/type_traits/is_complete.hpp>
-#include <boost/static_assert.hpp>
-
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
-#include <boost/type_traits/is_abstract.hpp>
-#endif
-#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ <= 5)) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1800))
-#include <utility> // std::pair
-#endif
-
-#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
-
-#include <boost/type_traits/detail/yes_no_type.hpp>
-
-namespace boost{
-
- namespace detail{
-
- struct is_default_constructible_imp
- {
- template<typename _Tp, typename = decltype(_Tp())>
- static boost::type_traits::yes_type test(int);
-
- template<typename>
- static boost::type_traits::no_type test(...);
- };
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
- template<class T, bool b>
- struct is_default_constructible_abstract_filter
- {
- static const bool value = sizeof(is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type);
- };
- template<class T>
- struct is_default_constructible_abstract_filter<T, true>
- {
- static const bool value = false;
- };
-#endif
- }
-
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
- template <class T> struct is_default_constructible : public integral_constant<bool, detail::is_default_constructible_abstract_filter<T, boost::is_abstract<T>::value>::value>
- {
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_default_constructible must be complete types");
- };
-#else
- template <class T> struct is_default_constructible : public integral_constant<bool, sizeof(detail::is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>
- {
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_default_constructible must be complete types");
- };
-#endif
- template <class T, std::size_t N> struct is_default_constructible<T[N]> : public is_default_constructible<T>{};
- template <class T> struct is_default_constructible<T[]> : public is_default_constructible<T>{};
- template <class T> struct is_default_constructible<T&> : public integral_constant<bool, false>{};
-#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ <= 5))|| (defined(BOOST_MSVC) && (BOOST_MSVC == 1800))
- template <class T, class U> struct is_default_constructible<std::pair<T,U> > : public integral_constant<bool, is_default_constructible<T>::value && is_default_constructible<U>::value>{};
-#endif
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <class T> struct is_default_constructible<T&&> : public integral_constant<bool, false>{};
-#endif
- template <> struct is_default_constructible<void> : public integral_constant<bool, false>{};
- template <> struct is_default_constructible<void const> : public integral_constant<bool, false>{};
- template <> struct is_default_constructible<void volatile> : public integral_constant<bool, false>{};
- template <> struct is_default_constructible<void const volatile> : public integral_constant<bool, false>{};
-
-#else
-
-#include <boost/type_traits/is_pod.hpp>
-
-namespace boost{
-
- // We don't know how to implement this, note we can not use has_trivial_constructor here
- // because the correct implementation of that trait requires this one:
- template <class T> struct is_default_constructible : public is_pod<T>{};
- template <> struct is_default_constructible<void> : public integral_constant<bool, false>{};
- template <> struct is_default_constructible<void const> : public integral_constant<bool, false>{};
- template <> struct is_default_constructible<void volatile> : public integral_constant<bool, false>{};
- template <> struct is_default_constructible<void const volatile> : public integral_constant<bool, false>{};
-
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp
deleted file mode 100644
index cc72fb7a9a5..00000000000
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-
-// (C) Copyright John Maddock 2015.
-// 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_DESTRUCTIBLE_HPP_INCLUDED
-#define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
-
-#include <cstddef> // size_t
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/type_traits/is_complete.hpp>
-#include <boost/static_assert.hpp>
-
-#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800)
-
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/declval.hpp>
-
-namespace boost{
-
- namespace detail{
-
- struct is_destructible_imp
- {
- template<typename T, typename = decltype(boost::declval<T&>().~T())>
- static boost::type_traits::yes_type test(int);
- template<typename>
- static boost::type_traits::no_type test(...);
- };
-
- }
-
- template <class T> struct is_destructible : public integral_constant<bool, sizeof(detail::is_destructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>
- {
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_destructible must be complete types");
- };
-
-#else
-
-#include <boost/type_traits/is_pod.hpp>
-#include <boost/type_traits/is_class.hpp>
-
-namespace boost{
-
- // We don't know how to implement this:
- template <class T> struct is_destructible : public integral_constant<bool, is_pod<T>::value || is_class<T>::value>
- {
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_destructible must be complete types");
- };
-#endif
-
- template <> struct is_destructible<void> : public false_type{};
- template <> struct is_destructible<void const> : public false_type{};
- template <> struct is_destructible<void volatile> : public false_type{};
- template <> struct is_destructible<void const volatile> : public false_type{};
- template <class T> struct is_destructible<T&> : public is_destructible<T>{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template <class T> struct is_destructible<T&&> : public is_destructible<T>{};
-#endif
- template <class T, std::size_t N> struct is_destructible<T[N]> : public is_destructible<T>{};
- template <class T> struct is_destructible<T[]> : public is_destructible<T>{};
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
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
deleted file mode 100644
index 60ffbc86dec..00000000000
--- a/src/third_party/boost-1.69.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);
- };
-
-} // 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.69.0/boost/version.hpp b/src/third_party/boost-1.69.0/boost/version.hpp
deleted file mode 100644
index c9afbd9860a..00000000000
--- a/src/third_party/boost-1.69.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 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.69.0/boost/winapi/handles.hpp b/src/third_party/boost-1.69.0/boost/winapi/handles.hpp
deleted file mode 100644
index 5f74d77096e..00000000000
--- a/src/third_party/boost-1.69.0/boost/winapi/handles.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2010 Vicente J. Botet Escriba
- * Copyright 2015 Andrey Semashev
- *
- * Distributed under the Boost Software License, Version 1.0.
- * See http://www.boost.org/LICENSE_1_0.txt
- */
-
-#ifndef BOOST_WINAPI_HANDLES_HPP_INCLUDED_
-#define BOOST_WINAPI_HANDLES_HPP_INCLUDED_
-
-#include <boost/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
-CloseHandle(boost::winapi::HANDLE_ handle);
-
-BOOST_SYMBOL_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
-DuplicateHandle(
- boost::winapi::HANDLE_ hSourceProcessHandle,
- boost::winapi::HANDLE_ hSourceHandle,
- boost::winapi::HANDLE_ hTargetProcessHandle,
- boost::winapi::HANDLE_* lpTargetHandle,
- boost::winapi::DWORD_ dwDesiredAccess,
- boost::winapi::BOOL_ bInheritHandle,
- boost::winapi::DWORD_ dwOptions);
-
-#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
-BOOST_SYMBOL_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
-CompareObjectHandles(
- boost::winapi::HANDLE_ hFirstObjectHandle,
- boost::winapi::HANDLE_ hSecondObjectHandle);
-#endif
-} // extern "C"
-#endif
-
-namespace boost {
-namespace winapi {
-
-using ::CloseHandle;
-using ::DuplicateHandle;
-
-#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
-using ::CompareObjectHandles;
-#endif
-
-// Note: MSVC-14.1 does not interpret INVALID_HANDLE_VALUE_ initializer as a constant expression
-#if defined( BOOST_USE_WINDOWS_H )
-BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_CLOSE_SOURCE_ = DUPLICATE_CLOSE_SOURCE;
-BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_SAME_ACCESS_ = DUPLICATE_SAME_ACCESS;
-const HANDLE_ INVALID_HANDLE_VALUE_ = INVALID_HANDLE_VALUE;
-#else
-BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_CLOSE_SOURCE_ = 1;
-BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_SAME_ACCESS_ = 2;
-const HANDLE_ INVALID_HANDLE_VALUE_ = (HANDLE_)(-1);
-#endif
-
-BOOST_CONSTEXPR_OR_CONST DWORD_ duplicate_close_source = DUPLICATE_CLOSE_SOURCE_;
-BOOST_CONSTEXPR_OR_CONST DWORD_ duplicate_same_access = DUPLICATE_SAME_ACCESS_;
-const HANDLE_ invalid_handle_value = INVALID_HANDLE_VALUE_;
-
-}
-}
-
-#endif // BOOST_WINAPI_HANDLES_HPP_INCLUDED_
diff --git a/src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp b/src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp
deleted file mode 100644
index 15f4fe404cf..00000000000
--- a/src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp
+++ /dev/null
@@ -1,106 +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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#define BOOST_CONTAINER_SOURCE
-#include <boost/container/pmr/memory_resource.hpp>
-
-#include <boost/core/no_exceptions_support.hpp>
-#include <boost/container/throw_exception.hpp>
-#include <boost/container/detail/dlmalloc.hpp> //For global lock
-
-#include <cstddef>
-#include <new>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-class new_delete_resource_imp
- : public memory_resource
-{
- public:
-
- virtual ~new_delete_resource_imp()
- {}
-
- virtual void* do_allocate(std::size_t bytes, std::size_t alignment)
- { (void)bytes; (void)alignment; return new char[bytes]; }
-
- virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
- { (void)bytes; (void)alignment; delete[]((char*)p); }
-
- virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
- { return &other == this; }
-} new_delete_resource_instance;
-
-struct null_memory_resource_imp
- : public memory_resource
-{
- public:
-
- virtual ~null_memory_resource_imp()
- {}
-
- virtual void* do_allocate(std::size_t bytes, std::size_t alignment)
- {
- (void)bytes; (void)alignment;
- throw_bad_alloc();
- return 0;
- }
-
- virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
- { (void)p; (void)bytes; (void)alignment; }
-
- virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
- { return &other == this; }
-} null_memory_resource_instance;
-
-BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT
-{
- return &new_delete_resource_instance;
-}
-
-BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT
-{
- return &null_memory_resource_instance;
-}
-
-static memory_resource *default_memory_resource = &new_delete_resource_instance;
-
-BOOST_CONTAINER_DECL memory_resource* set_default_resource(memory_resource* r) BOOST_NOEXCEPT
-{
- //TO-DO: synchronizes-with part using atomics
- if(dlmalloc_global_sync_lock()){
- memory_resource *previous = default_memory_resource;
- default_memory_resource = r ? r : new_delete_resource();
- dlmalloc_global_sync_unlock();
- return previous;
- }
- else{
- return new_delete_resource();
- }
-}
-
-BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT
-{
- //TO-DO: synchronizes-with part using atomics
- if(dlmalloc_global_sync_lock()){
- memory_resource *current = default_memory_resource;
- dlmalloc_global_sync_unlock();
- return current;
- }
- else{
- return new_delete_resource();
- }
-}
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp
deleted file mode 100644
index 165c6ea7b8f..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// codecvt_error_category implementation file ----------------------------------------//
-
-// 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 at http://www.boost.org/libs/filesystem
-
-//--------------------------------------------------------------------------------------//
-
-#include <boost/config/warning_disable.hpp>
-
-// 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/config.hpp>
-#include <boost/filesystem/path_traits.hpp>
-#include <boost/system/error_code.hpp>
-#include <locale>
-#include <vector>
-#include <cstdlib>
-#include <cassert>
-
-//--------------------------------------------------------------------------------------//
-
-namespace
-{
- class codecvt_error_cat : public boost::system::error_category
- {
- public:
- codecvt_error_cat(){}
- const char* name() const BOOST_SYSTEM_NOEXCEPT;
- std::string message(int ev) const;
- };
-
- const char* codecvt_error_cat::name() const BOOST_SYSTEM_NOEXCEPT
- {
- return "codecvt";
- }
-
- std::string codecvt_error_cat::message(int ev) const
- {
- std::string str;
- switch (ev)
- {
- case std::codecvt_base::ok:
- str = "ok";
- break;
- case std::codecvt_base::partial:
- str = "partial";
- break;
- case std::codecvt_base::error:
- str = "error";
- break;
- case std::codecvt_base::noconv:
- str = "noconv";
- break;
- default:
- str = "unknown error";
- }
- return str;
- }
-
-} // unnamed namespace
-
-namespace boost
-{
- namespace filesystem
- {
-
- BOOST_FILESYSTEM_DECL const boost::system::error_category& codecvt_error_category()
- {
- static const codecvt_error_cat codecvt_error_cat_const;
- return codecvt_error_cat_const;
- }
-
- } // namespace filesystem
-} // namespace boost
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
deleted file mode 100644
index 53dcdb70c96..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/operations.cpp
+++ /dev/null
@@ -1,2409 +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 = 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.69.0/libs/filesystem/src/path.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/path.cpp
deleted file mode 100644
index a4588654bad..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/path.cpp
+++ /dev/null
@@ -1,953 +0,0 @@
-// filesystem path.cpp ------------------------------------------------------------- //
-
-// Copyright Beman Dawes 2008
-
-// 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
-
-// Old standard library configurations, particularly MingGW, don't support wide strings.
-// Report this with an explicit error message.
-#include <boost/config.hpp>
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
-// 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 <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp> // for filesystem_error
-#include <boost/scoped_array.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/assert.hpp>
-#include <algorithm>
-#include <cstddef>
-#include <cstring>
-#include <cassert>
-
-#ifdef BOOST_WINDOWS_API
-# include "windows_file_codecvt.hpp"
-# include <windows.h>
-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
- || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
-# include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
-#endif
-
-#ifdef BOOST_FILESYSTEM_DEBUG
-# include <iostream>
-# include <iomanip>
-#endif
-
-namespace fs = boost::filesystem;
-
-using boost::filesystem::path;
-
-using std::string;
-using std::wstring;
-
-using boost::system::error_code;
-
-//--------------------------------------------------------------------------------------//
-// //
-// class path helpers //
-// //
-//--------------------------------------------------------------------------------------//
-
-namespace
-{
- //------------------------------------------------------------------------------------//
- // miscellaneous class path helpers //
- //------------------------------------------------------------------------------------//
-
- typedef path::value_type value_type;
- typedef path::string_type string_type;
- typedef string_type::size_type size_type;
-
-# ifdef BOOST_WINDOWS_API
-
- const wchar_t* const separators = L"/\\";
- const wchar_t* separator_string = L"/";
- const wchar_t* preferred_separator_string = L"\\";
- const wchar_t colon = L':';
- const wchar_t questionmark = L'?';
-
- inline bool is_letter(wchar_t c)
- {
- return (c >= L'a' && c <=L'z') || (c >= L'A' && c <=L'Z');
- }
-
-# else
-
- const char* const separators = "/";
- const char* separator_string = "/";
- const char* preferred_separator_string = "/";
-
-# endif
-
- bool is_root_separator(const string_type& str, size_type pos);
- // pos is position of the separator
-
- size_type filename_pos(const string_type& str,
- size_type end_pos); // end_pos is past-the-end position
- // Returns: 0 if str itself is filename (or empty)
-
- size_type root_directory_start(const string_type& path, size_type size);
- // Returns: npos if no root_directory found
-
- void first_element(
- const string_type& src,
- size_type& element_pos,
- size_type& element_size,
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) // VC++ 7.1
- size_type size = string_type::npos
-# else
- size_type size = -1
-# endif
- );
-
-} // unnamed namespace
-
-//--------------------------------------------------------------------------------------//
-// //
-// class path implementation //
-// //
-//--------------------------------------------------------------------------------------//
-
-namespace boost
-{
-namespace filesystem
-{
- path& path::operator/=(const path& p)
- {
- if (p.empty())
- return *this;
- if (this == &p) // self-append
- {
- path rhs(p);
- if (!detail::is_directory_separator(rhs.m_pathname[0]))
- m_append_separator_if_needed();
- m_pathname += rhs.m_pathname;
- }
- else
- {
- if (!detail::is_directory_separator(*p.m_pathname.begin()))
- m_append_separator_if_needed();
- m_pathname += p.m_pathname;
- }
- return *this;
- }
-
- path& path::operator/=(const value_type* ptr)
- {
- if (!*ptr)
- return *this;
- if (ptr >= m_pathname.data()
- && ptr < m_pathname.data() + m_pathname.size()) // overlapping source
- {
- path rhs(ptr);
- if (!detail::is_directory_separator(rhs.m_pathname[0]))
- m_append_separator_if_needed();
- m_pathname += rhs.m_pathname;
- }
- else
- {
- if (!detail::is_directory_separator(*ptr))
- m_append_separator_if_needed();
- m_pathname += ptr;
- }
- return *this;
- }
-
- int path::compare(const path& p) const BOOST_NOEXCEPT
- {
- return detail::lex_compare(begin(), end(), p.begin(), p.end());
- }
-
-# ifdef BOOST_WINDOWS_API
-
- const std::string path::generic_string() const
- {
- path tmp(*this);
- std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/');
- return tmp.string();
- }
-
- const std::string path::generic_string(const codecvt_type& cvt) const
- {
- path tmp(*this);
- std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/');
- return tmp.string(cvt);
- }
-
- const std::wstring path::generic_wstring() const
- {
- path tmp(*this);
- std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/');
- return tmp.wstring();
- }
-
-# endif // BOOST_WINDOWS_API
-
- // m_append_separator_if_needed ----------------------------------------------------//
-
- path::string_type::size_type path::m_append_separator_if_needed()
- {
- if (!m_pathname.empty() &&
-# ifdef BOOST_WINDOWS_API
- *(m_pathname.end()-1) != colon &&
-# endif
- !detail::is_directory_separator(*(m_pathname.end()-1)))
- {
- string_type::size_type tmp(m_pathname.size());
- m_pathname += preferred_separator;
- return tmp;
- }
- return 0;
- }
-
- // m_erase_redundant_separator -----------------------------------------------------//
-
- void path::m_erase_redundant_separator(string_type::size_type sep_pos)
- {
- if (sep_pos // a separator was added
- && sep_pos < m_pathname.size() // and something was appended
- && (m_pathname[sep_pos+1] == separator // and it was also separator
-# ifdef BOOST_WINDOWS_API
- || m_pathname[sep_pos+1] == preferred_separator // or preferred_separator
-# endif
-)) { m_pathname.erase(sep_pos, 1); } // erase the added separator
- }
-
- // modifiers -----------------------------------------------------------------------//
-
-# ifdef BOOST_WINDOWS_API
- path & path::make_preferred()
- {
- std::replace(m_pathname.begin(), m_pathname.end(), L'/', L'\\');
- return *this;
- }
-# endif
-
- path& path::remove_filename()
- {
- m_pathname.erase(m_parent_path_end());
- return *this;
- }
-
- path& path::remove_trailing_separator()
- {
- if (!m_pathname.empty()
- && detail::is_directory_separator(m_pathname[m_pathname.size() - 1]))
- m_pathname.erase(m_pathname.size() - 1);
- return *this;
- }
-
- path& path::replace_extension(const path& new_extension)
- {
- // erase existing extension, including the dot, if any
- m_pathname.erase(m_pathname.size()-extension().m_pathname.size());
-
- if (!new_extension.empty())
- {
- // append new_extension, adding the dot if necessary
- if (new_extension.m_pathname[0] != dot)
- m_pathname.push_back(dot);
- m_pathname.append(new_extension.m_pathname);
- }
-
- return *this;
- }
-
- // decomposition -------------------------------------------------------------------//
-
- path path::root_path() const
- {
- path temp(root_name());
- if (!root_directory().empty()) temp.m_pathname += root_directory().c_str();
- return temp;
- }
-
- path path::root_name() const
- {
- iterator itr(begin());
-
- return (itr.m_pos != m_pathname.size()
- && (
- (itr.m_element.m_pathname.size() > 1
- && detail::is_directory_separator(itr.m_element.m_pathname[0])
- && detail::is_directory_separator(itr.m_element.m_pathname[1])
- )
-# ifdef BOOST_WINDOWS_API
- || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon
-# endif
- ))
- ? itr.m_element
- : path();
- }
-
- path path::root_directory() const
- {
- size_type pos(root_directory_start(m_pathname, m_pathname.size()));
-
- return pos == string_type::npos
- ? path()
- : path(m_pathname.c_str() + pos, m_pathname.c_str() + pos + 1);
- }
-
- path path::relative_path() const
- {
- iterator itr(begin());
-
- for (; itr.m_pos != m_pathname.size()
- && (detail::is_directory_separator(itr.m_element.m_pathname[0])
-# ifdef BOOST_WINDOWS_API
- || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon
-# endif
- ); ++itr) {}
-
- return path(m_pathname.c_str() + itr.m_pos);
- }
-
- string_type::size_type path::m_parent_path_end() const
- {
- size_type end_pos(filename_pos(m_pathname, m_pathname.size()));
-
- bool filename_was_separator(m_pathname.size()
- && detail::is_directory_separator(m_pathname[end_pos]));
-
- // skip separators unless root directory
- size_type root_dir_pos(root_directory_start(m_pathname, end_pos));
- for (;
- end_pos > 0
- && (end_pos-1) != root_dir_pos
- && detail::is_directory_separator(m_pathname[end_pos-1])
- ;
- --end_pos) {}
-
- return (end_pos == 1 && root_dir_pos == 0 && filename_was_separator)
- ? string_type::npos
- : end_pos;
- }
-
- path path::parent_path() const
- {
- size_type end_pos(m_parent_path_end());
- return end_pos == string_type::npos
- ? path()
- : path(m_pathname.c_str(), m_pathname.c_str() + end_pos);
- }
-
- path path::filename() const
- {
- size_type pos(filename_pos(m_pathname, m_pathname.size()));
- return (m_pathname.size()
- && pos
- && detail::is_directory_separator(m_pathname[pos])
- && !is_root_separator(m_pathname, pos))
- ? detail::dot_path()
- : path(m_pathname.c_str() + pos);
- }
-
- path path::stem() const
- {
- path name(filename());
- if (name == detail::dot_path() || name == detail::dot_dot_path()) return name;
- size_type pos(name.m_pathname.rfind(dot));
- return pos == string_type::npos
- ? name
- : path(name.m_pathname.c_str(), name.m_pathname.c_str() + pos);
- }
-
- path path::extension() const
- {
- path name(filename());
- if (name == detail::dot_path() || name == detail::dot_dot_path()) return path();
- size_type pos(name.m_pathname.rfind(dot));
- return pos == string_type::npos
- ? path()
- : path(name.m_pathname.c_str() + pos);
- }
-
- // lexical operations --------------------------------------------------------------//
-
- namespace detail
- {
- // C++14 provide a mismatch algorithm with four iterator arguments(), but earlier
- // standard libraries didn't, so provide this needed functionality.
- inline
- std::pair<path::iterator, path::iterator> mismatch(path::iterator it1,
- path::iterator it1end, path::iterator it2, path::iterator it2end)
- {
- for (; it1 != it1end && it2 != it2end && *it1 == *it2;)
- {
- ++it1;
- ++it2;
- }
- return std::make_pair(it1, it2);
- }
- }
-
- path path::lexically_relative(const path& base) const
- {
- std::pair<path::iterator, path::iterator> mm
- = detail::mismatch(begin(), end(), base.begin(), base.end());
- if (mm.first == begin() && mm.second == base.begin())
- return path();
- if (mm.first == end() && mm.second == base.end())
- return detail::dot_path();
- path tmp;
- for (; mm.second != base.end(); ++mm.second)
- tmp /= detail::dot_dot_path();
- for (; mm.first != end(); ++mm.first)
- tmp /= *mm.first;
- return tmp;
- }
-
- // normal --------------------------------------------------------------------------//
-
- path path::lexically_normal() const
- {
- if (m_pathname.empty())
- return *this;
-
- path temp;
- iterator start(begin());
- iterator last(end());
- iterator stop(last--);
- for (iterator itr(start); itr != stop; ++itr)
- {
- // ignore "." except at start and last
- if (itr->native().size() == 1
- && (itr->native())[0] == dot
- && itr != start
- && itr != last) continue;
-
- // ignore a name and following ".."
- if (!temp.empty()
- && itr->native().size() == 2
- && (itr->native())[0] == dot
- && (itr->native())[1] == dot) // dot dot
- {
- string_type lf(temp.filename().native());
- if (lf.size() > 0
- && (lf.size() != 1
- || (lf[0] != dot
- && lf[0] != separator))
- && (lf.size() != 2
- || (lf[0] != dot
- && lf[1] != dot
-# ifdef BOOST_WINDOWS_API
- && lf[1] != colon
-# endif
- )
- )
- )
- {
- temp.remove_filename();
- //// if not root directory, must also remove "/" if any
- //if (temp.native().size() > 0
- // && temp.native()[temp.native().size()-1]
- // == separator)
- //{
- // string_type::size_type rds(
- // root_directory_start(temp.native(), temp.native().size()));
- // if (rds == string_type::npos
- // || rds != temp.native().size()-1)
- // {
- // temp.m_pathname.erase(temp.native().size()-1);
- // }
- //}
-
- iterator next(itr);
- if (temp.empty() && ++next != stop
- && next == last && *last == detail::dot_path())
- {
- temp /= detail::dot_path();
- }
- continue;
- }
- }
-
- temp /= *itr;
- };
-
- if (temp.empty())
- temp /= detail::dot_path();
- return temp;
- }
-
-} // namespace filesystem
-} // namespace boost
-
-//--------------------------------------------------------------------------------------//
-// //
-// class path helpers implementation //
-// //
-//--------------------------------------------------------------------------------------//
-
-namespace
-{
-
- // is_root_separator ---------------------------------------------------------------//
-
- bool is_root_separator(const string_type & str, size_type pos)
- // pos is position of the separator
- {
- BOOST_ASSERT_MSG(!str.empty() && fs::detail::is_directory_separator(str[pos]),
- "precondition violation");
-
- // subsequent logic expects pos to be for leftmost slash of a set
- while (pos > 0 && fs::detail::is_directory_separator(str[pos-1]))
- --pos;
-
- // "/" [...]
- if (pos == 0)
- return true;
-
-# ifdef BOOST_WINDOWS_API
- // "c:/" [...]
- if (pos == 2 && is_letter(str[0]) && str[1] == colon)
- return true;
-# endif
-
- // "//" name "/"
- if (pos < 3 || !fs::detail::is_directory_separator(str[0])
- || !fs::detail::is_directory_separator(str[1]))
- return false;
-
- return str.find_first_of(separators, 2) == pos;
- }
-
- // filename_pos --------------------------------------------------------------------//
-
- size_type filename_pos(const string_type & str,
- size_type end_pos) // end_pos is past-the-end position
- // return 0 if str itself is filename (or empty)
- {
- // case: "//"
- if (end_pos == 2
- && fs::detail::is_directory_separator(str[0])
- && fs::detail::is_directory_separator(str[1])) return 0;
-
- // case: ends in "/"
- if (end_pos && fs::detail::is_directory_separator(str[end_pos-1]))
- return end_pos-1;
-
- // set pos to start of last element
- size_type pos(str.find_last_of(separators, end_pos-1));
-
-# ifdef BOOST_WINDOWS_API
- if (pos == string_type::npos && end_pos > 1)
- pos = str.find_last_of(colon, end_pos-2);
-# endif
-
- return (pos == string_type::npos // path itself must be a filename (or empty)
- || (pos == 1 && fs::detail::is_directory_separator(str[0]))) // or net
- ? 0 // so filename is entire string
- : pos + 1; // or starts after delimiter
- }
-
- // root_directory_start ------------------------------------------------------------//
-
- size_type root_directory_start(const string_type & path, size_type size)
- // return npos if no root_directory found
- {
-
-# ifdef BOOST_WINDOWS_API
- // case "c:/"
- if (size > 2
- && path[1] == colon
- && fs::detail::is_directory_separator(path[2])) return 2;
-# endif
-
- // case "//"
- if (size == 2
- && fs::detail::is_directory_separator(path[0])
- && fs::detail::is_directory_separator(path[1])) return string_type::npos;
-
-# ifdef BOOST_WINDOWS_API
- // case "\\?\"
- if (size > 4
- && fs::detail::is_directory_separator(path[0])
- && fs::detail::is_directory_separator(path[1])
- && path[2] == questionmark
- && fs::detail::is_directory_separator(path[3]))
- {
- string_type::size_type pos(path.find_first_of(separators, 4));
- return pos < size ? pos : string_type::npos;
- }
-# endif
-
- // case "//net {/}"
- if (size > 3
- && fs::detail::is_directory_separator(path[0])
- && fs::detail::is_directory_separator(path[1])
- && !fs::detail::is_directory_separator(path[2]))
- {
- string_type::size_type pos(path.find_first_of(separators, 2));
- return pos < size ? pos : string_type::npos;
- }
-
- // case "/"
- if (size > 0 && fs::detail::is_directory_separator(path[0])) return 0;
-
- return string_type::npos;
- }
-
- // first_element --------------------------------------------------------------------//
- // sets pos and len of first element, excluding extra separators
- // if src.empty(), sets pos,len, to 0,0.
-
- void first_element(
- const string_type & src,
- size_type & element_pos,
- size_type & element_size,
- size_type size
-)
- {
- if (size == string_type::npos) size = src.size();
- element_pos = 0;
- element_size = 0;
- if (src.empty()) return;
-
- string_type::size_type cur(0);
-
- // deal with // [network]
- if (size >= 2 && fs::detail::is_directory_separator(src[0])
- && fs::detail::is_directory_separator(src[1])
- && (size == 2
- || !fs::detail::is_directory_separator(src[2])))
- {
- cur += 2;
- element_size += 2;
- }
-
- // leading (not non-network) separator
- else if (fs::detail::is_directory_separator(src[0]))
- {
- ++element_size;
- // bypass extra leading separators
- while (cur+1 < size
- && fs::detail::is_directory_separator(src[cur+1]))
- {
- ++cur;
- ++element_pos;
- }
- return;
- }
-
- // at this point, we have either a plain name, a network name,
- // or (on Windows only) a device name
-
- // find the end
- while (cur < size
-# ifdef BOOST_WINDOWS_API
- && src[cur] != colon
-# endif
- && !fs::detail::is_directory_separator(src[cur]))
- {
- ++cur;
- ++element_size;
- }
-
-# ifdef BOOST_WINDOWS_API
- if (cur == size) return;
- // include device delimiter
- if (src[cur] == colon)
- { ++element_size; }
-# endif
-
- return;
- }
-
-} // unnamed namespace
-
-
-namespace boost
-{
-namespace filesystem
-{
- namespace detail
- {
- BOOST_FILESYSTEM_DECL
- int lex_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2)
- {
- for (; first1 != last1 && first2 != last2;)
- {
- if (first1->native() < first2->native()) return -1;
- if (first2->native() < first1->native()) return 1;
- BOOST_ASSERT(first2->native() == first1->native());
- ++first1;
- ++first2;
- }
- if (first1 == last1 && first2 == last2)
- return 0;
- return first1 == last1 ? -1 : 1;
- }
-
- BOOST_FILESYSTEM_DECL
- const path& dot_path()
- {
-# ifdef BOOST_WINDOWS_API
- static const fs::path dot_pth(L".");
-# else
- static const fs::path dot_pth(".");
-# endif
- return dot_pth;
- }
-
- BOOST_FILESYSTEM_DECL
- const path& dot_dot_path()
- {
-# ifdef BOOST_WINDOWS_API
- static const fs::path dot_dot(L"..");
-# else
- static const fs::path dot_dot("..");
-# endif
- return dot_dot;
- }
- }
-
-//--------------------------------------------------------------------------------------//
-// //
-// class path::iterator implementation //
-// //
-//--------------------------------------------------------------------------------------//
-
- path::iterator path::begin() const
- {
- iterator itr;
- itr.m_path_ptr = this;
- size_type element_size;
- first_element(m_pathname, itr.m_pos, element_size);
- itr.m_element = m_pathname.substr(itr.m_pos, element_size);
- if (itr.m_element.m_pathname == preferred_separator_string)
- itr.m_element.m_pathname = separator_string; // needed for Windows, harmless on POSIX
- return itr;
- }
-
- path::iterator path::end() const
- {
- iterator itr;
- itr.m_path_ptr = this;
- itr.m_pos = m_pathname.size();
- return itr;
- }
-
- void path::m_path_iterator_increment(path::iterator & it)
- {
- BOOST_ASSERT_MSG(it.m_pos < it.m_path_ptr->m_pathname.size(),
- "path::basic_iterator increment past end()");
-
- // increment to position past current element; if current element is implicit dot,
- // this will cause it.m_pos to represent the end iterator
- it.m_pos += it.m_element.m_pathname.size();
-
- // if the end is reached, we are done
- if (it.m_pos == it.m_path_ptr->m_pathname.size())
- {
- it.m_element.clear(); // aids debugging, may release unneeded memory
- return;
- }
-
- // both POSIX and Windows treat paths that begin with exactly two separators specially
- bool was_net(it.m_element.m_pathname.size() > 2
- && detail::is_directory_separator(it.m_element.m_pathname[0])
- && detail::is_directory_separator(it.m_element.m_pathname[1])
- && !detail::is_directory_separator(it.m_element.m_pathname[2]));
-
- // process separator (Windows drive spec is only case not a separator)
- if (detail::is_directory_separator(it.m_path_ptr->m_pathname[it.m_pos]))
- {
- // detect root directory
- if (was_net
-# ifdef BOOST_WINDOWS_API
- // case "c:/"
- || it.m_element.m_pathname[it.m_element.m_pathname.size()-1] == colon
-# endif
- )
- {
- it.m_element.m_pathname = separator; // generic format; see docs
- return;
- }
-
- // skip separators until it.m_pos points to the start of the next element
- while (it.m_pos != it.m_path_ptr->m_pathname.size()
- && detail::is_directory_separator(it.m_path_ptr->m_pathname[it.m_pos]))
- { ++it.m_pos; }
-
- // detect trailing separator, and treat it as ".", per POSIX spec
- if (it.m_pos == it.m_path_ptr->m_pathname.size()
- && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1))
- {
- --it.m_pos;
- it.m_element = detail::dot_path();
- return;
- }
- }
-
- // get m_element
- size_type end_pos(it.m_path_ptr->m_pathname.find_first_of(separators, it.m_pos));
- if (end_pos == string_type::npos)
- end_pos = it.m_path_ptr->m_pathname.size();
- it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
- }
-
- void path::m_path_iterator_decrement(path::iterator & it)
- {
- BOOST_ASSERT_MSG(it.m_pos, "path::iterator decrement past begin()");
-
- size_type end_pos(it.m_pos);
-
- // if at end and there was a trailing non-root '/', return "."
- if (it.m_pos == it.m_path_ptr->m_pathname.size()
- && it.m_path_ptr->m_pathname.size() > 1
- && detail::is_directory_separator(it.m_path_ptr->m_pathname[it.m_pos-1])
- && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1)
- )
- {
- --it.m_pos;
- it.m_element = detail::dot_path();
- return;
- }
-
- size_type root_dir_pos(root_directory_start(it.m_path_ptr->m_pathname, end_pos));
-
- // skip separators unless root directory
- for (
- ;
- end_pos > 0
- && (end_pos-1) != root_dir_pos
- && detail::is_directory_separator(it.m_path_ptr->m_pathname[end_pos-1])
- ;
- --end_pos) {}
-
- it.m_pos = filename_pos(it.m_path_ptr->m_pathname, end_pos);
- it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
- if (it.m_element.m_pathname == preferred_separator_string) // needed for Windows, harmless on POSIX
- it.m_element.m_pathname = separator_string; // generic format; see docs
- }
-
-} // namespace filesystem
-} // namespace boost
-
-namespace
-{
-
- //------------------------------------------------------------------------------------//
- // locale helpers //
- //------------------------------------------------------------------------------------//
-
- // Prior versions of these locale and codecvt implementations tried to take advantage
- // of static initialization where possible, kept a local copy of the current codecvt
- // facet (to avoid codecvt() having to call use_facet()), and was not multi-threading
- // safe (again for efficiency).
- //
- // This was error prone, and required different implementation techniques depending
- // on the compiler and also whether static or dynamic linking was used. Furthermore,
- // users could not easily provide their multi-threading safe wrappers because the
- // path interface requires the implementation itself to call codecvt() to obtain the
- // default facet, and the initialization of the static within path_locale() could race.
- //
- // The code below is portable to all platforms, is much simpler, and hopefully will be
- // much more robust. Timing tests (on Windows, using a Visual C++ release build)
- // indicated the current code is roughly 9% slower than the previous code, and that
- // seems a small price to pay for better code that is easier to use.
-
- std::locale default_locale()
- {
-# if defined(BOOST_WINDOWS_API)
- std::locale global_loc = std::locale();
- return std::locale(global_loc, new windows_file_codecvt);
-# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
- || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
- // "All BSD system functions expect their string parameters to be in UTF-8 encoding
- // and nothing else." See
- // http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html
- //
- // "The kernel will reject any filename that is not a valid UTF-8 string, and it will
- // even be normalized (to Unicode NFD) before stored on disk, at least when using HFS.
- // The right way to deal with it would be to always convert the filename to UTF-8
- // before trying to open/create a file." See
- // http://lists.apple.com/archives/unix-porting/2007/Sep/msg00023.html
- //
- // "How a file name looks at the API level depends on the API. Current Carbon APIs
- // handle file names as an array of UTF-16 characters; POSIX ones handle them as an
- // array of UTF-8, which is why UTF-8 works well in Terminal. How it's stored on disk
- // depends on the disk format; HFS+ uses UTF-16, but that's not important in most
- // cases." See
- // http://lists.apple.com/archives/applescript-users/2002/Sep/msg00319.html
- //
- // Many thanks to Peter Dimov for digging out the above references!
-
- std::locale global_loc = std::locale();
- return std::locale(global_loc, new boost::filesystem::detail::utf8_codecvt_facet);
-# else // Other POSIX
- // ISO C calls std::locale("") "the locale-specific native environment", and this
- // locale is the default for many POSIX-based operating systems such as Linux.
- return std::locale("");
-# endif
- }
-
- std::locale& path_locale()
- // std::locale("") construction, needed on non-Apple POSIX systems, can throw
- // (if environmental variables LC_MESSAGES or LANG are wrong, for example), so
- // path_locale() provides lazy initialization via a local static to ensure that any
- // exceptions occur after main() starts and so can be caught. Furthermore,
- // path_locale() is only called if path::codecvt() or path::imbue() are themselves
- // actually called, ensuring that an exception will only be thrown if std::locale("")
- // is really needed.
- {
- // [locale] paragraph 6: Once a facet reference is obtained from a locale object by
- // calling use_facet<>, that reference remains usable, and the results from member
- // functions of it may be cached and re-used, as long as some locale object refers
- // to that facet.
- static std::locale loc(default_locale());
-#ifdef BOOST_FILESYSTEM_DEBUG
- std::cout << "***** path_locale() called" << std::endl;
-#endif
- return loc;
- }
-} // unnamed namespace
-
-//--------------------------------------------------------------------------------------//
-// path::codecvt() and path::imbue() implementation //
-//--------------------------------------------------------------------------------------//
-
-namespace boost
-{
-namespace filesystem
-{
- // See comments above
-
- const path::codecvt_type& path::codecvt()
- {
-#ifdef BOOST_FILESYSTEM_DEBUG
- std::cout << "***** path::codecvt() called" << std::endl;
-#endif
- BOOST_ASSERT_MSG(&path_locale(), "boost::filesystem::path locale initialization error");
-
- return std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t> >(path_locale());
- }
-
- std::locale path::imbue(const std::locale& loc)
- {
-#ifdef BOOST_FILESYSTEM_DEBUG
- std::cout << "***** path::imbue() called" << std::endl;
-#endif
- std::locale temp(path_locale());
- path_locale() = loc;
- return temp;
- }
-
-} // namespace filesystem
-} // namespace boost
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp
deleted file mode 100644
index 07b92c0f12e..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-// filesystem path_traits.cpp --------------------------------------------------------//
-
-// Copyright Beman Dawes 2008, 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 <boost/filesystem/path_traits.hpp>
-#include <boost/system/system_error.hpp>
-#include <boost/scoped_array.hpp>
-#include <locale> // for codecvt_base::result
-#include <cstring> // for strlen
-#include <cwchar> // for wcslen
-
-namespace pt = boost::filesystem::path_traits;
-namespace fs = boost::filesystem;
-namespace bs = boost::system;
-
-//--------------------------------------------------------------------------------------//
-// configuration //
-//--------------------------------------------------------------------------------------//
-
-#ifndef BOOST_FILESYSTEM_CODECVT_BUF_SIZE
-# define BOOST_FILESYSTEM_CODECVT_BUF_SIZE 256
-#endif
-
-namespace {
-
- const std::size_t default_codecvt_buf_size = BOOST_FILESYSTEM_CODECVT_BUF_SIZE;
-
-
-//--------------------------------------------------------------------------------------//
-// //
-// The public convert() functions do buffer management, and then forward to the //
-// convert_aux() functions for the actual call to the codecvt facet. //
-// //
-//--------------------------------------------------------------------------------------//
-
-//--------------------------------------------------------------------------------------//
-// convert_aux const char* to wstring //
-//--------------------------------------------------------------------------------------//
-
- void convert_aux(
- const char* from,
- const char* from_end,
- wchar_t* to, wchar_t* to_end,
- std::wstring & target,
- const pt::codecvt_type & cvt)
- {
- //std::cout << std::hex
- // << " from=" << std::size_t(from)
- // << " from_end=" << std::size_t(from_end)
- // << " to=" << std::size_t(to)
- // << " to_end=" << std::size_t(to_end)
- // << std::endl;
-
- std::mbstate_t state = std::mbstate_t(); // perhaps unneeded, but cuts bug reports
- const char* from_next;
- wchar_t* to_next;
-
- std::codecvt_base::result res;
-
- if ((res=cvt.in(state, from, from_end, from_next,
- to, to_end, to_next)) != std::codecvt_base::ok)
- {
- //std::cout << " result is " << static_cast<int>(res) << std::endl;
- BOOST_FILESYSTEM_THROW(bs::system_error(res, fs::codecvt_error_category(),
- "boost::filesystem::path codecvt to wstring"));
- }
- target.append(to, to_next);
- }
-
-//--------------------------------------------------------------------------------------//
-// convert_aux const wchar_t* to string //
-//--------------------------------------------------------------------------------------//
-
- void convert_aux(
- const wchar_t* from,
- const wchar_t* from_end,
- char* to, char* to_end,
- std::string & target,
- const pt::codecvt_type & cvt)
- {
- //std::cout << std::hex
- // << " from=" << std::size_t(from)
- // << " from_end=" << std::size_t(from_end)
- // << " to=" << std::size_t(to)
- // << " to_end=" << std::size_t(to_end)
- // << std::endl;
-
- std::mbstate_t state = std::mbstate_t(); // perhaps unneeded, but cuts bug reports
- const wchar_t* from_next;
- char* to_next;
-
- std::codecvt_base::result res;
-
- if ((res=cvt.out(state, from, from_end, from_next,
- to, to_end, to_next)) != std::codecvt_base::ok)
- {
- //std::cout << " result is " << static_cast<int>(res) << std::endl;
- BOOST_FILESYSTEM_THROW(bs::system_error(res, fs::codecvt_error_category(),
- "boost::filesystem::path codecvt to string"));
- }
- target.append(to, to_next);
- }
-
-} // unnamed namespace
-
-//--------------------------------------------------------------------------------------//
-// path_traits //
-//--------------------------------------------------------------------------------------//
-
-namespace boost { namespace filesystem { namespace path_traits {
-
-//--------------------------------------------------------------------------------------//
-// convert const char* to wstring //
-//--------------------------------------------------------------------------------------//
-
- BOOST_FILESYSTEM_DECL
- void convert(const char* from,
- const char* from_end, // 0 for null terminated MBCS
- std::wstring & to,
- const codecvt_type & cvt)
- {
- BOOST_ASSERT(from);
-
- if (!from_end) // null terminated
- {
- from_end = from + std::strlen(from);
- }
-
- if (from == from_end) return;
-
- std::size_t buf_size = (from_end - from) * 3; // perhaps too large, but that's OK
-
- // dynamically allocate a buffer only if source is unusually large
- if (buf_size > default_codecvt_buf_size)
- {
- boost::scoped_array< wchar_t > buf(new wchar_t [buf_size]);
- convert_aux(from, from_end, buf.get(), buf.get()+buf_size, to, cvt);
- }
- else
- {
- wchar_t buf[default_codecvt_buf_size];
- convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt);
- }
- }
-
-//--------------------------------------------------------------------------------------//
-// convert const wchar_t* to string //
-//--------------------------------------------------------------------------------------//
-
- BOOST_FILESYSTEM_DECL
- void convert(const wchar_t* from,
- const wchar_t* from_end, // 0 for null terminated MBCS
- std::string & to,
- const codecvt_type & cvt)
- {
- BOOST_ASSERT(from);
-
- if (!from_end) // null terminated
- {
- from_end = from + std::wcslen(from);
- }
-
- if (from == from_end) return;
-
- // The codecvt length functions may not be implemented, and I don't really
- // understand them either. Thus this code is just a guess; if it turns
- // out the buffer is too small then an error will be reported and the code
- // will have to be fixed.
- std::size_t buf_size = (from_end - from) * 4; // perhaps too large, but that's OK
- buf_size += 4; // encodings like shift-JIS need some prefix space
-
- // dynamically allocate a buffer only if source is unusually large
- if (buf_size > default_codecvt_buf_size)
- {
- boost::scoped_array< char > buf(new char [buf_size]);
- convert_aux(from, from_end, buf.get(), buf.get()+buf_size, to, cvt);
- }
- else
- {
- char buf[default_codecvt_buf_size];
- convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt);
- }
- }
-}}} // namespace boost::filesystem::path_traits
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp
deleted file mode 100644
index b1a1352d9a9..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// portability.cpp -------------------------------------------------------------------//
-
-// Copyright 2002-2005 Beman Dawes
-// 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 library home page at 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/config.hpp>
-#include <boost/filesystem/path.hpp>
-
-namespace fs = boost::filesystem;
-
-#include <cstring> // SGI MIPSpro compilers need this
-
-# ifdef BOOST_NO_STDC_NAMESPACE
- namespace std { using ::strerror; }
-# endif
-
-//--------------------------------------------------------------------------------------//
-
-namespace
-{
- const char invalid_chars[] =
- "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"
- "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"
- "<>:\"/\\|";
- // note that the terminating '\0' is part of the string - thus the size below
- // is sizeof(invalid_chars) rather than sizeof(invalid_chars)-1. I
- const std::string windows_invalid_chars(invalid_chars, sizeof(invalid_chars));
-
- const std::string valid_posix(
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-");
-
-} // unnamed namespace
-
-namespace boost
-{
- namespace filesystem
- {
-
- // name_check functions ----------------------------------------------//
-
-# ifdef BOOST_WINDOWS
- BOOST_FILESYSTEM_DECL bool native(const std::string & name)
- {
- return windows_name(name);
- }
-# else
- BOOST_FILESYSTEM_DECL bool native(const std::string & name)
- {
- return name.size() != 0
- && name[0] != ' '
- && name.find('/') == std::string::npos;
- }
-# endif
-
- BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name)
- {
- return name.size() != 0
- && name.find_first_not_of(valid_posix) == std::string::npos;
- }
-
- BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name)
- {
- return name.size() != 0
- && name[0] != ' '
- && name.find_first_of(windows_invalid_chars) == std::string::npos
- && *(name.end()-1) != ' '
- && (*(name.end()-1) != '.'
- || name.length() == 1 || name == "..");
- }
-
- BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name)
- {
- return
- name.size() != 0
- && (name == "."
- || name == ".."
- || (windows_name(name)
- && portable_posix_name(name)
- && name[0] != '.' && name[0] != '-'));
- }
-
- BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name)
- {
- return
- name == "."
- || name == ".."
- || (portable_name(name)
- && name.find('.') == std::string::npos);
- }
-
- BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name)
- {
- std::string::size_type pos;
- return
- portable_name(name)
- && name != "."
- && name != ".."
- && ((pos = name.find('.')) == std::string::npos
- || (name.find('.', pos+1) == std::string::npos
- && (pos + 5) > name.length()))
- ;
- }
-
- } // namespace filesystem
-} // namespace boost
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
deleted file mode 100644
index b097401f1d4..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/unique_path.cpp
+++ /dev/null
@@ -1,177 +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, 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.69.0/libs/filesystem/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/utf8_codecvt_facet.cpp
deleted file mode 100644
index 8a5af1e07c4..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/utf8_codecvt_facet.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright Vladimir Prus 2004.
-// Distributed under the 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 HP-UX, request that WCHAR_MAX and WCHAR_MIN be defined as macros,
-// not casts. See ticket 5048
-#define _INCLUDE_STDCSOURCE_199901
-
-#ifndef BOOST_SYSTEM_NO_DEPRECATED
-# define BOOST_SYSTEM_NO_DEPRECATED
-#endif
-
-#define BOOST_FILESYSTEM_SOURCE
-#include <boost/filesystem/config.hpp>
-
-#define BOOST_UTF8_BEGIN_NAMESPACE \
- namespace boost { namespace filesystem { namespace detail {
-
-#define BOOST_UTF8_END_NAMESPACE }}}
-#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL
-
-#include <boost/detail/utf8_codecvt_facet.ipp>
-
-#undef BOOST_UTF8_BEGIN_NAMESPACE
-#undef BOOST_UTF8_END_NAMESPACE
-#undef BOOST_UTF8_DECL
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
deleted file mode 100644
index 99059598363..00000000000
--- a/src/third_party/boost-1.69.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,
- 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.69.0/libs/filesystem/src/windows_file_codecvt.hpp b/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.hpp
deleted file mode 100644
index 2bd797f247c..00000000000
--- a/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// filesystem windows_file_codecvt.hpp -----------------------------------------------//
-
-// 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
-
-#ifndef BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
-#define BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
-
-#include <boost/filesystem/config.hpp>
-#include <locale>
-
- //------------------------------------------------------------------------------------//
- // //
- // class windows_file_codecvt //
- // //
- // Warning: partial implementation; even do_in and do_out only partially meet the //
- // standard library specifications as the "to" buffer must hold the entire result. //
- // //
- //------------------------------------------------------------------------------------//
-
- class BOOST_FILESYSTEM_DECL windows_file_codecvt
- : public std::codecvt< wchar_t, char, std::mbstate_t >
- {
- public:
- explicit windows_file_codecvt(std::size_t refs = 0)
- : std::codecvt<wchar_t, char, std::mbstate_t>(refs) {}
- protected:
-
- virtual bool do_always_noconv() const throw() { return false; }
-
- // seems safest to assume variable number of characters since we don't
- // actually know what codepage is active
- virtual int do_encoding() const throw() { return 0; }
-
- 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;
-
- virtual std::codecvt_base::result do_unshift(std::mbstate_t&,
- char* /*from*/, char* /*to*/, char* & /*next*/) const { return ok; }
-
- virtual int do_length(std::mbstate_t&,
- const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const { return 0; }
-
- virtual int do_max_length() const throw () { return 0; }
- };
-
-#endif // BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/regex.cpp b/src/third_party/boost-1.69.0/libs/regex/src/regex.cpp
deleted file mode 100644
index e9e9762748e..00000000000
--- a/src/third_party/boost-1.69.0/libs/regex/src/regex.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * Copyright (c) 1998-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.cpp
- * VERSION: see <boost/version.hpp>
- * DESCRIPTION: Misc boost::regbase member funnctions.
- */
-
-
-#define BOOST_REGEX_SOURCE
-
-#include <boost/config.hpp>
-#include <new>
-#include <boost/regex.hpp>
-#include <boost/throw_exception.hpp>
-
-#if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300)
-# include <malloc.h>
-#endif
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-#define WIN32_LEAN_AND_MEAN
-#ifndef NOMINMAX
-# define NOMINMAX
-#endif
-#define NOGDI
-#define NOUSER
-#include <windows.h>
-#endif
-
-#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_REGEX_V3)
-#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
-#include <new>
-#else
-#include <boost/regex/v4/mem_block_cache.hpp>
-#endif
-#endif
-
-#ifdef BOOST_INTEL
-#pragma warning(disable:383)
-#endif
-
-namespace boost{
-
-//
-// fix: these are declared out of line here to ensure
-// that dll builds contain the Virtual table for these
-// types - this ensures that exceptions can be thrown
-// from the dll and caught in an exe.
-regex_error::regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos)
- : std::runtime_error(s)
- , m_error_code(err)
- , m_position(pos)
-{
-}
-
-regex_error::regex_error(regex_constants::error_type err)
- : std::runtime_error(::boost::BOOST_REGEX_DETAIL_NS::get_default_error_string(err))
- , m_error_code(err)
- , m_position(0)
-{
-}
-
-regex_error::~regex_error() throw()
-{
-}
-
-void regex_error::raise()const
-{
-#ifndef BOOST_NO_EXCEPTIONS
- ::boost::throw_exception(*this);
-#endif
-}
-
-
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex)
-{
- ::boost::throw_exception(ex);
-}
-//
-// error checking API:
-//
-BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex::flag_type /*ef*/, match_flag_type mf)
-{
-#ifndef BOOST_REGEX_V3
- //
- // can't mix match_extra with POSIX matching rules:
- //
- if((mf & match_extra) && (mf & match_posix))
- {
- std::logic_error msg("Usage Error: Can't mix regular expression captures with POSIX matching rules");
- throw_exception(msg);
- }
-#endif
-}
-
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-
-static void execute_eror()
-{
- // we only get here after a stack overflow,
- // this has to be a separate proceedure because we
- // can't mix __try{}__except block with local objects
- // that have destructors:
- reset_stack_guard_page();
- std::runtime_error err("Out of stack space, while attempting to match a regular expression.");
- raise_runtime_error(err);
-}
-
-bool BOOST_REGEX_CALL abstract_protected_call::execute()const
-{
- __try{
- return this->call();
- }__except(EXCEPTION_STACK_OVERFLOW == GetExceptionCode())
- {
- execute_eror();
- }
- // We never really get here at all:
- return false;
-}
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page()
-{
-#if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300)
- _resetstkoflw();
-#else
- //
- // We need to locate the current page being used by the stack,
- // move to the page below it and then deallocate and protect
- // that page. Note that ideally we would protect only the lowest
- // stack page that has been allocated: in practice there
- // seems to be no easy way to locate this page, in any case as
- // long as the next page is protected, then Windows will figure
- // the rest out for us...
- //
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- MEMORY_BASIC_INFORMATION mi;
- DWORD previous_protection_status;
- //
- // this is an address in our stack space:
- //
- LPBYTE page = (LPBYTE)&page;
- //
- // Get the current memory page in use:
- //
- VirtualQuery(page, &mi, sizeof(mi));
- //
- // Go to the page one below this:
- //
- page = (LPBYTE)(mi.BaseAddress)-si.dwPageSize;
- //
- // Free and protect everything from the start of the
- // allocation range, to the end of the page below the
- // one in use:
- //
- if (!VirtualFree(mi.AllocationBase, (LPBYTE)page - (LPBYTE)mi.AllocationBase, MEM_DECOMMIT)
- || !VirtualProtect(page, si.dwPageSize, PAGE_GUARD | PAGE_READWRITE, &previous_protection_status))
- {
- throw std::bad_exception();
- }
-#endif
-}
-#endif
-
-#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_REGEX_V3)
-
-#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
-
-BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block()
-{
- return ::operator new(BOOST_REGEX_BLOCKSIZE);
-}
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
-{
- ::operator delete(p);
-}
-
-#else
-
-#if defined(BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE)
-mem_block_cache block_cache = { { {nullptr} } } ;
-#elif defined(BOOST_HAS_THREADS)
-mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
-#else
-mem_block_cache block_cache = { 0, 0, };
-#endif
-
-BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block()
-{
- return block_cache.get();
-}
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
-{
- block_cache.put(p);
-}
-
-#endif
-
-#endif
-
-} // namespace BOOST_REGEX_DETAIL_NS
-
-
-
-} // namespace boost
-
-#if defined(BOOST_RE_USE_VCL) && defined(BOOST_REGEX_DYN_LINK)
-
-int WINAPI DllEntryPoint(HINSTANCE , unsigned long , void*)
-{
- return 1;
-}
-#endif
-
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp b/src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp
deleted file mode 100644
index d02b01fc6cd..00000000000
--- a/src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp
+++ /dev/null
@@ -1,183 +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 static_mutex.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares static_mutex lock type.
- */
-
-#define BOOST_REGEX_SOURCE
-#include <boost/config.hpp>
-#include <boost/assert.hpp>
-
-#ifdef BOOST_HAS_THREADS
-
-#include <boost/regex/pending/static_mutex.hpp>
-
-#if defined(BOOST_HAS_WINTHREADS)
-#ifndef NOMINMAX
-# define NOMINMAX
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <boost/static_assert.hpp>
-#endif
-
-
-namespace boost{
-
-#if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER)
-
-scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk)
-: m_mutex(m), m_have_lock(false)
-{
- if(lk)
- lock();
-}
-
-scoped_static_mutex_lock::~scoped_static_mutex_lock()
-{
- if(m_have_lock)
- unlock();
-}
-
-void scoped_static_mutex_lock::lock()
-{
- if(0 == m_have_lock)
- {
- // Client code will throw if this fails:
- m_have_lock = (pthread_mutex_lock(&(m_mutex.m_mutex)) == 0);
- }
-}
-
-void scoped_static_mutex_lock::unlock()
-{
- if(m_have_lock)
- {
- // If this fails there's nothing we can do except assert,
- // exceptions are out of the question as this code is called
- // from the lock's destructor:
- BOOST_VERIFY(pthread_mutex_unlock(&(m_mutex.m_mutex)) == 0);
- m_have_lock = false;
- }
-}
-
-#elif defined(BOOST_HAS_WINTHREADS)
-
-BOOST_STATIC_ASSERT(sizeof(LONG) == sizeof(boost::int32_t));
-
-scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk)
-: m_mutex(m), m_have_lock(false)
-{
- if(lk)
- lock();
-}
-
-scoped_static_mutex_lock::~scoped_static_mutex_lock()
-{
- if(m_have_lock)
- unlock();
-}
-
-void scoped_static_mutex_lock::lock()
-{
- if(0 == m_have_lock)
- {
-#if !defined(InterlockedCompareExchangePointer)
- while(0 != InterlockedCompareExchange(reinterpret_cast<void**>((boost::uint_least16_t*)&(m_mutex.m_mutex)), (void*)1, 0))
-#else
- while(0 != InterlockedCompareExchange(reinterpret_cast<LONG*>(&(m_mutex.m_mutex)), 1, 0))
-#endif
- {
- Sleep(0);
- }
- m_have_lock = true;
- }
-}
-
-void scoped_static_mutex_lock::unlock()
-{
- if(m_have_lock)
- {
-#if !defined(InterlockedCompareExchangePointer)
- InterlockedExchange((LONG*)&(m_mutex.m_mutex), 0);
-#else
- InterlockedExchange(reinterpret_cast<LONG*>(&(m_mutex.m_mutex)), 0);
-#endif
- m_have_lock = false;
- }
-}
-
-#else
-//
-// Portable version of a static mutex based on Boost.Thread library:
-//
-#include <stdlib.h>
-#include <boost/assert.hpp>
-
-boost::recursive_mutex* static_mutex::m_pmutex = 0;
-boost::once_flag static_mutex::m_once = BOOST_ONCE_INIT;
-
-extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex()
-{
- delete static_mutex::m_pmutex;
- static_mutex::m_pmutex = 0;
-}
-
-void static_mutex::init()
-{
- m_pmutex = new boost::recursive_mutex();
- int r = atexit(boost_regex_free_static_mutex);
- BOOST_ASSERT(0 == r);
-}
-
-scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& , bool lk)
-: m_plock(0), m_have_lock(false)
-{
- if(lk)
- lock();
-}
-
-scoped_static_mutex_lock::~scoped_static_mutex_lock()
-{
- if(m_have_lock)
- unlock();
- delete m_plock;
-}
-
-void scoped_static_mutex_lock::lock()
-{
- if(0 == m_have_lock)
- {
- boost::call_once(static_mutex::m_once,&static_mutex::init);
- if(0 == m_plock)
- m_plock = new boost::unique_lock<boost::recursive_mutex>(*static_mutex::m_pmutex, boost::defer_lock);
- m_plock->lock();
- m_have_lock = true;
- }
-}
-
-void scoped_static_mutex_lock::unlock()
-{
- if(m_have_lock)
- {
- m_plock->unlock();
- m_have_lock = false;
- }
-}
-
-#endif
-
-}
-
-#endif // BOOST_HAS_THREADS
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp b/src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp
deleted file mode 100644
index 0f825702477..00000000000
--- a/src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp
+++ /dev/null
@@ -1,652 +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.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Implements w32_regex_traits<char> (and associated helper classes).
- */
-
-#define BOOST_REGEX_SOURCE
-#include <boost/regex/config.hpp>
-
-#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_NO_WIN32_LOCALE)
-#include <boost/regex/regex_traits.hpp>
-#include <boost/regex/pattern_except.hpp>
-
-#define WIN32_LEAN_AND_MEAN
-#ifndef NOMINMAX
-# define NOMINMAX
-#endif
-#define NOGDI
-#include <windows.h>
-
-#if defined(_MSC_VER) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
-#pragma comment(lib, "user32.lib")
-#endif
-
-#ifdef BOOST_NO_STDC_NAMESPACE
-namespace std{
- using ::memset;
-}
-#endif
-
-namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
-
-#ifdef BOOST_NO_ANSI_APIS
-UINT get_code_page_for_locale_id(lcid_type idx)
-{
- WCHAR code_page_string[7];
- if (::GetLocaleInfoW(idx, LOCALE_IDEFAULTANSICODEPAGE, code_page_string, 7) == 0)
- return 0;
-
- return static_cast<UINT>(_wtol(code_page_string));
-}
-#endif
-
-
-void w32_regex_traits_char_layer<char>::init()
-{
- // we need to start by initialising our syntax map so we know which
- // character is used for which purpose:
- std::memset(m_char_map, 0, sizeof(m_char_map));
- cat_type cat;
- std::string cat_name(w32_regex_traits<char>::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_syntax(i));
- for(string_type::size_type j = 0; j < mss.size(); ++j)
- {
- m_char_map[static_cast<unsigned char>(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)
- {
- m_char_map[static_cast<unsigned char>(*ptr)] = i;
- ++ptr;
- }
- }
- }
- //
- // finish off by calculating our escape types:
- //
- unsigned char i = 'A';
- do
- {
- if(m_char_map[i] == 0)
- {
- if(::boost::BOOST_REGEX_DETAIL_NS::w32_is(this->m_locale, 0x0002u, (char)i))
- m_char_map[i] = regex_constants::escape_type_class;
- else if(::boost::BOOST_REGEX_DETAIL_NS::w32_is(this->m_locale, 0x0001u, (char)i))
- m_char_map[i] = regex_constants::escape_type_not_class;
- }
- }while(0xFF != i++);
-
- //
- // fill in lower case map:
- //
- char char_map[1 << CHAR_BIT];
- for(int ii = 0; ii < (1 << CHAR_BIT); ++ii)
- char_map[ii] = static_cast<char>(ii);
-#ifndef BOOST_NO_ANSI_APIS
- int r = ::LCMapStringA(this->m_locale, LCMAP_LOWERCASE, char_map, 1 << CHAR_BIT, this->m_lower_map, 1 << CHAR_BIT);
- BOOST_ASSERT(r != 0);
-#else
- UINT code_page = get_code_page_for_locale_id(this->m_locale);
- BOOST_ASSERT(code_page != 0);
-
- WCHAR wide_char_map[1 << CHAR_BIT];
- int conv_r = ::MultiByteToWideChar(code_page, 0, char_map, 1 << CHAR_BIT, wide_char_map, 1 << CHAR_BIT);
- BOOST_ASSERT(conv_r != 0);
-
- WCHAR wide_lower_map[1 << CHAR_BIT];
- int r = ::LCMapStringW(this->m_locale, LCMAP_LOWERCASE, wide_char_map, 1 << CHAR_BIT, wide_lower_map, 1 << CHAR_BIT);
- BOOST_ASSERT(r != 0);
-
- conv_r = ::WideCharToMultiByte(code_page, 0, wide_lower_map, r, this->m_lower_map, 1 << CHAR_BIT, NULL, NULL);
- BOOST_ASSERT(conv_r != 0);
-#endif
- if(r < (1 << CHAR_BIT))
- {
- // if we have multibyte characters then not all may have been given
- // a lower case mapping:
- for(int jj = r; jj < (1 << CHAR_BIT); ++jj)
- this->m_lower_map[jj] = static_cast<char>(jj);
- }
-
-#ifndef BOOST_NO_ANSI_APIS
- r = ::GetStringTypeExA(this->m_locale, CT_CTYPE1, char_map, 1 << CHAR_BIT, this->m_type_map);
-#else
- r = ::GetStringTypeExW(this->m_locale, CT_CTYPE1, wide_char_map, 1 << CHAR_BIT, this->m_type_map);
-#endif
- BOOST_ASSERT(0 != r);
-}
-
-BOOST_REGEX_DECL lcid_type BOOST_REGEX_CALL w32_get_default_locale()
-{
- return ::GetUserDefaultLCID();
-}
-
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char c, lcid_type idx)
-{
-#ifndef BOOST_NO_ANSI_APIS
- WORD mask;
- if(::GetStringTypeExA(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
- return true;
- return false;
-#else
- UINT code_page = get_code_page_for_locale_id(idx);
- if (code_page == 0)
- return false;
-
- WCHAR wide_c;
- if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
- return false;
-
- WORD mask;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &wide_c, 1, &mask) && (mask & C1_LOWER))
- return true;
- return false;
-#endif
-}
-
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t c, lcid_type idx)
-{
- WORD mask;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
- return true;
- return false;
-}
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type idx)
-{
- WORD mask;
- wchar_t c = ca;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
- return true;
- return false;
-}
-#endif
-
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char c, lcid_type idx)
-{
-#ifndef BOOST_NO_ANSI_APIS
- WORD mask;
- if(::GetStringTypeExA(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
- return true;
- return false;
-#else
- UINT code_page = get_code_page_for_locale_id(idx);
- if (code_page == 0)
- return false;
-
- WCHAR wide_c;
- if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
- return false;
-
- WORD mask;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &wide_c, 1, &mask) && (mask & C1_UPPER))
- return true;
- return false;
-#endif
-}
-
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t c, lcid_type idx)
-{
- WORD mask;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
- return true;
- return false;
-}
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(unsigned short ca, lcid_type idx)
-{
- WORD mask;
- wchar_t c = ca;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
- return true;
- return false;
-}
-#endif
-
-void free_module(void* mod)
-{
- ::FreeLibrary(static_cast<HMODULE>(mod));
-}
-
-BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name)
-{
-#ifndef BOOST_NO_ANSI_APIS
- cat_type result(::LoadLibraryA(name.c_str()), &free_module);
- return result;
-#else
- LPWSTR wide_name = (LPWSTR)_alloca( (name.size() + 1) * sizeof(WCHAR) );
- if (::MultiByteToWideChar(CP_ACP, 0, name.c_str(), name.size(), wide_name, name.size() + 1) == 0)
- return cat_type();
-
- cat_type result(::LoadLibraryW(wide_name), &free_module);
- return result;
-#endif
-}
-
-BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::string& def)
-{
-#ifndef BOOST_NO_ANSI_APIS
- char buf[256];
- if(0 == ::LoadStringA(
- static_cast<HMODULE>(cat.get()),
- i,
- buf,
- 256
- ))
- {
- return def;
- }
-#else
- WCHAR wbuf[256];
- int r = ::LoadStringW(
- static_cast<HMODULE>(cat.get()),
- i,
- wbuf,
- 256
- );
- if (r == 0)
- return def;
-
-
- int buf_size = 1 + ::WideCharToMultiByte(CP_ACP, 0, wbuf, r, NULL, 0, NULL, NULL);
- LPSTR buf = (LPSTR)_alloca(buf_size);
- if (::WideCharToMultiByte(CP_ACP, 0, wbuf, r, buf, buf_size, NULL, NULL) == 0)
- return def; // failed conversion.
-#endif
- return std::string(buf);
-}
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::wstring& def)
-{
- wchar_t buf[256];
- if(0 == ::LoadStringW(
- static_cast<HMODULE>(cat.get()),
- i,
- buf,
- 256
- ))
- {
- return def;
- }
- return std::wstring(buf);
-}
-#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)
-{
- unsigned short buf[256];
- if(0 == ::LoadStringW(
- static_cast<HMODULE>(cat.get()),
- i,
- (LPWSTR)buf,
- 256
- ))
- {
- return def;
- }
- return std::basic_string<unsigned short>(buf);
-}
-#endif
-#endif
-BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type idx, const char* p1, const char* p2)
-{
-#ifndef BOOST_NO_ANSI_APIS
- int bytes = ::LCMapStringA(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- p1, // source string
- static_cast<int>(p2 - p1), // number of characters in source string
- 0, // destination buffer
- 0 // size of destination buffer
- );
- if(!bytes)
- return std::string(p1, p2);
- std::string result(++bytes, '\0');
- bytes = ::LCMapStringA(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- p1, // source string
- static_cast<int>(p2 - p1), // number of characters in source string
- &*result.begin(), // destination buffer
- bytes // size of destination buffer
- );
-#else
- UINT code_page = get_code_page_for_locale_id(idx);
- if(code_page == 0)
- return std::string(p1, p2);
-
- int src_len = static_cast<int>(p2 - p1);
- LPWSTR wide_p1 = (LPWSTR)_alloca( (src_len + 1) * 2 );
- if(::MultiByteToWideChar(code_page, 0, p1, src_len, wide_p1, src_len + 1) == 0)
- return std::string(p1, p2);
-
- int bytes = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- wide_p1, // source string
- src_len, // number of characters in source string
- 0, // destination buffer
- 0 // size of destination buffer
- );
- if(!bytes)
- return std::string(p1, p2);
- std::string result(++bytes, '\0');
- bytes = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- wide_p1, // source string
- src_len, // number of characters in source string
- (LPWSTR)&*result.begin(), // destination buffer
- bytes // size of destination buffer
- );
-#endif
- if(bytes > static_cast<int>(result.size()))
- return std::string(p1, p2);
- while(result.size() && result[result.size()-1] == '\0')
- {
- result.erase(result.size()-1);
- }
- return result;
-}
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type idx, const wchar_t* p1, const wchar_t* p2)
-{
- int bytes = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- p1, // source string
- static_cast<int>(p2 - p1), // number of characters in source string
- 0, // destination buffer
- 0 // size of destination buffer
- );
- if(!bytes)
- return std::wstring(p1, p2);
- std::string result(++bytes, '\0');
- bytes = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- p1, // source string
- static_cast<int>(p2 - p1), // number of characters in source string
- reinterpret_cast<wchar_t*>(&*result.begin()), // destination buffer *of bytes*
- bytes // size of destination buffer
- );
- if(bytes > static_cast<int>(result.size()))
- return std::wstring(p1, p2);
- while(result.size() && result[result.size()-1] == L'\0')
- {
- result.erase(result.size()-1);
- }
- std::wstring r2;
- for(std::string::size_type i = 0; i < result.size(); ++i)
- r2.append(1, static_cast<wchar_t>(static_cast<unsigned char>(result[i])));
- return r2;
-}
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_transform(lcid_type idx, const unsigned short* p1, const unsigned short* p2)
-{
- int bytes = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- (LPCWSTR)p1, // source string
- static_cast<int>(p2 - p1), // number of characters in source string
- 0, // destination buffer
- 0 // size of destination buffer
- );
- if(!bytes)
- return std::basic_string<unsigned short>(p1, p2);
- std::string result(++bytes, '\0');
- bytes = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_SORTKEY, // mapping transformation type
- (LPCWSTR)p1, // source string
- static_cast<int>(p2 - p1), // number of characters in source string
- reinterpret_cast<wchar_t*>(&*result.begin()), // destination buffer *of bytes*
- bytes // size of destination buffer
- );
- if(bytes > static_cast<int>(result.size()))
- return std::basic_string<unsigned short>(p1, p2);
- while(result.size() && result[result.size()-1] == L'\0')
- {
- result.erase(result.size()-1);
- }
- std::basic_string<unsigned short> r2;
- for(std::string::size_type i = 0; i < result.size(); ++i)
- r2.append(1, static_cast<unsigned short>(static_cast<unsigned char>(result[i])));
- return r2;
-}
-#endif
-#endif
-BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type idx)
-{
- char result[2];
-#ifndef BOOST_NO_ANSI_APIS
- int b = ::LCMapStringA(
- idx, // locale identifier
- LCMAP_LOWERCASE, // mapping transformation type
- &c, // source string
- 1, // number of characters in source string
- result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
-#else
- UINT code_page = get_code_page_for_locale_id(idx);
- if (code_page == 0)
- return c;
-
- WCHAR wide_c;
- if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
- return c;
-
- WCHAR wide_result;
- int b = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_LOWERCASE, // mapping transformation type
- &wide_c, // source string
- 1, // number of characters in source string
- &wide_result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
-
- if (::WideCharToMultiByte(code_page, 0, &wide_result, 1, result, 2, NULL, NULL) == 0)
- return c; // No single byte lower case equivalent available
-#endif
- return result[0];
-}
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type idx)
-{
- wchar_t result[2];
- int b = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_LOWERCASE, // mapping transformation type
- &c, // source string
- 1, // number of characters in source string
- result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
- return result[0];
-}
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_tolower(unsigned short c, lcid_type idx)
-{
- wchar_t result[2];
- int b = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_LOWERCASE, // mapping transformation type
- (wchar_t const*)&c, // source string
- 1, // number of characters in source string
- result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
- return result[0];
-}
-#endif
-#endif
-BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type idx)
-{
- char result[2];
-#ifndef BOOST_NO_ANSI_APIS
- int b = ::LCMapStringA(
- idx, // locale identifier
- LCMAP_UPPERCASE, // mapping transformation type
- &c, // source string
- 1, // number of characters in source string
- result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
-#else
- UINT code_page = get_code_page_for_locale_id(idx);
- if(code_page == 0)
- return c;
-
- WCHAR wide_c;
- if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
- return c;
-
- WCHAR wide_result;
- int b = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_UPPERCASE, // mapping transformation type
- &wide_c, // source string
- 1, // number of characters in source string
- &wide_result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
-
- if (::WideCharToMultiByte(code_page, 0, &wide_result, 1, result, 2, NULL, NULL) == 0)
- return c; // No single byte upper case equivalent available.
-#endif
- return result[0];
-}
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type idx)
-{
- wchar_t result[2];
- int b = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_UPPERCASE, // mapping transformation type
- &c, // source string
- 1, // number of characters in source string
- result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
- return result[0];
-}
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_toupper(unsigned short c, lcid_type idx)
-{
- wchar_t result[2];
- int b = ::LCMapStringW(
- idx, // locale identifier
- LCMAP_UPPERCASE, // mapping transformation type
- (wchar_t const*)&c, // source string
- 1, // number of characters in source string
- result, // destination buffer
- 1); // size of destination buffer
- if(b == 0)
- return c;
- return result[0];
-}
-#endif
-#endif
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, char c)
-{
- WORD mask;
-#ifndef BOOST_NO_ANSI_APIS
- if(::GetStringTypeExA(idx, CT_CTYPE1, &c, 1, &mask) && (mask & m & w32_regex_traits_implementation<char>::mask_base))
- return true;
-#else
- UINT code_page = get_code_page_for_locale_id(idx);
- if(code_page == 0)
- return false;
-
- WCHAR wide_c;
- if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
- return false;
-
- if(::GetStringTypeExW(idx, CT_CTYPE1, &wide_c, 1, &mask) && (mask & m & w32_regex_traits_implementation<char>::mask_base))
- return true;
-#endif
- if((m & w32_regex_traits_implementation<char>::mask_word) && (c == '_'))
- return true;
- return false;
-}
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, wchar_t c)
-{
- WORD mask;
- if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & m & w32_regex_traits_implementation<wchar_t>::mask_base))
- return true;
- if((m & w32_regex_traits_implementation<wchar_t>::mask_word) && (c == '_'))
- return true;
- if((m & w32_regex_traits_implementation<wchar_t>::mask_unicode) && (c > 0xff))
- return true;
- return false;
-}
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, unsigned short c)
-{
- WORD mask;
- if(::GetStringTypeExW(idx, CT_CTYPE1, (wchar_t const*)&c, 1, &mask) && (mask & m & w32_regex_traits_implementation<wchar_t>::mask_base))
- return true;
- if((m & w32_regex_traits_implementation<wchar_t>::mask_word) && (c == '_'))
- return true;
- if((m & w32_regex_traits_implementation<wchar_t>::mask_unicode) && (c > 0xff))
- return true;
- return false;
-}
-#endif
-#endif
-
-} // BOOST_REGEX_DETAIL_NS
-} // boost
-
-#endif
-
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
deleted file mode 100644
index 1b76570bbae..00000000000
--- a/src/third_party/boost-1.69.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
-// ::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/win32/thread.cpp b/src/third_party/boost-1.69.0/libs/thread/src/win32/thread.cpp
deleted file mode 100644
index 8aceb114b4e..00000000000
--- a/src/third_party/boost-1.69.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;
- 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/timer/src/cpu_timer.cpp b/src/third_party/boost-1.69.0/libs/timer/src/cpu_timer.cpp
deleted file mode 100644
index 0802e985609..00000000000
--- a/src/third_party/boost-1.69.0/libs/timer/src/cpu_timer.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-// boost cpu_timer.cpp ---------------------------------------------------------------//
-
-// Copyright Beman Dawes 1994-2006, 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/libs/timer for documentation.
-
-//--------------------------------------------------------------------------------------//
-
-// define BOOST_TIMER_SOURCE so that <boost/timer/config.hpp> knows
-// the library is being built (possibly exporting rather than importing code)
-#define BOOST_TIMER_SOURCE
-
-#include <boost/timer/timer.hpp>
-#include <boost/chrono/chrono.hpp>
-#include <boost/io/ios_state.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/cerrno.hpp>
-#include <cstring>
-#include <sstream>
-#include <cassert>
-
-# if defined(BOOST_WINDOWS_API)
-# include <windows.h>
-# elif defined(BOOST_POSIX_API)
-# include <unistd.h>
-# include <sys/times.h>
-# else
-# error unknown API
-# endif
-
-using boost::timer::nanosecond_type;
-using boost::timer::cpu_times;
-using boost::system::error_code;
-
-namespace
-{
-
- void show_time(const cpu_times& times,
- std::ostream& os, const std::string& fmt, short places)
- // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
- // be as low as 10, although will be 15 for many common platforms.
- {
- if (places > 9)
- places = 9;
- else if (places < 0)
- places = boost::timer::default_places;
-
- boost::io::ios_flags_saver ifs(os);
- boost::io::ios_precision_saver ips(os);
- os.setf(std::ios_base::fixed, std::ios_base::floatfield);
- os.precision(places);
-
- const double sec = 1000000000.0L;
- nanosecond_type total = times.system + times.user;
- double wall_sec = static_cast<double>(times.wall) / sec;
- double total_sec = static_cast<double>(total) / sec;
-
- for (const char* format = fmt.c_str(); *format; ++format)
- {
- if (*format != '%' || !*(format+1) || !std::strchr("wustp", *(format+1)))
- os << *format; // anything except % followed by a valid format character
- // gets sent to the output stream
- else
- {
- ++format;
- switch (*format)
- {
- case 'w':
- os << wall_sec;
- break;
- case 'u':
- os << static_cast<double>(times.user) / sec;
- break;
- case 's':
- os << static_cast<double>(times.system) / sec;
- break;
- case 't':
- os << total_sec;
- break;
- case 'p':
- os.precision(1);
- if (wall_sec > 0.001L && total_sec > 0.001L)
- os << (total_sec/wall_sec) * 100.0;
- else
- os << "n/a";
- os.precision(places);
- break;
- }
- }
- }
- }
-
-# if defined(BOOST_POSIX_API)
- boost::int_least64_t tick_factor() // multiplier to convert ticks
- // to nanoseconds; -1 if unknown
- {
- static boost::int_least64_t tick_factor = 0;
- if (!tick_factor)
- {
- if ((tick_factor = ::sysconf(_SC_CLK_TCK)) <= 0)
- tick_factor = -1;
- else
- {
- assert(tick_factor <= INT64_C(1000000000)); // logic doesn't handle large ticks
- tick_factor = INT64_C(1000000000) / tick_factor; // compute factor
- if (!tick_factor)
- tick_factor = -1;
- }
- }
- return tick_factor;
- }
-# endif
-
- void get_cpu_times(boost::timer::cpu_times& current)
- {
- boost::chrono::duration<boost::int64_t, boost::nano>
- x (boost::chrono::high_resolution_clock::now().time_since_epoch());
- current.wall = x.count();
-
-# if defined(BOOST_WINDOWS_API)
-
- FILETIME creation, exit;
- if (::GetProcessTimes(::GetCurrentProcess(), &creation, &exit,
- (LPFILETIME)&current.system, (LPFILETIME)&current.user))
- {
- current.user *= 100; // Windows uses 100 nanosecond ticks
- current.system *= 100;
- }
- else
- {
- current.system = current.user = boost::timer::nanosecond_type(-1);
- }
-# else
- tms tm;
- clock_t c = ::times(&tm);
- if (c == static_cast<clock_t>(-1)) // error
- {
- current.system = current.user = boost::timer::nanosecond_type(-1);
- }
- else
- {
- current.system = boost::timer::nanosecond_type(tm.tms_stime + tm.tms_cstime);
- current.user = boost::timer::nanosecond_type(tm.tms_utime + tm.tms_cutime);
- boost::int_least64_t factor;
- if ((factor = tick_factor()) != -1)
- {
- current.user *= factor;
- current.system *= factor;
- }
- else
- {
- current.user = current.system = boost::timer::nanosecond_type(-1);
- }
- }
-# endif
- }
-
- // CAUTION: must be identical to same constant in auto_timers_construction.cpp
- const std::string default_fmt(" %ws wall, %us user + %ss system = %ts CPU (%p%)\n");
-
-} // unnamed namespace
-
-namespace boost
-{
- namespace timer
- {
- // format ------------------------------------------------------------------------//
-
- BOOST_TIMER_DECL
- std::string format(const cpu_times& times, short places, const std::string& fmt)
- {
- std::stringstream ss;
- ss.exceptions(std::ios_base::badbit | std::ios_base::failbit);
- show_time(times, ss, fmt, places);
- return ss.str();
- }
-
- BOOST_TIMER_DECL
- std::string format(const cpu_times& times, short places)
- {
- return format(times, places, default_fmt);
- }
-
- // cpu_timer ---------------------------------------------------------------------//
-
- void cpu_timer::start() BOOST_NOEXCEPT
- {
- m_is_stopped = false;
- get_cpu_times(m_times);
- }
-
- void cpu_timer::stop() BOOST_NOEXCEPT
- {
- if (is_stopped())
- return;
- m_is_stopped = true;
-
- cpu_times current;
- get_cpu_times(current);
- m_times.wall = (current.wall - m_times.wall);
- m_times.user = (current.user - m_times.user);
- m_times.system = (current.system - m_times.system);
- }
-
- cpu_times cpu_timer::elapsed() const BOOST_NOEXCEPT
- {
- if (is_stopped())
- return m_times;
- cpu_times current;
- get_cpu_times(current);
- current.wall -= m_times.wall;
- current.user -= m_times.user;
- current.system -= m_times.system;
- return current;
- }
-
- void cpu_timer::resume() BOOST_NOEXCEPT
- {
- if (is_stopped())
- {
- cpu_times current (m_times);
- start();
- m_times.wall -= current.wall;
- m_times.user -= current.user;
- m_times.system -= current.system;
- }
- }
-
- // auto_cpu_timer ----------------------------------------------------------------//
-
- auto_cpu_timer::auto_cpu_timer(std::ostream& os, short places) // #5
- : m_places(places), m_os(&os), m_format(default_fmt)
- {
- start();
- }
-
- void auto_cpu_timer::report()
- {
- show_time(elapsed(), ostream(), format_string(), places());
- }
-
- auto_cpu_timer::~auto_cpu_timer()
- {
- if (!is_stopped())
- {
- stop(); // the sooner we stop(), the better
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- report();
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch (...) // eat any exceptions
- {
- }
-#endif
- }
- }
-
- } // namespace timer
-} // namespace boost
diff --git a/src/third_party/boost-1.69.0/SConscript b/src/third_party/boost-1.70.0/SConscript
index 0a5abb6dc4c..0a5abb6dc4c 100644
--- a/src/third_party/boost-1.69.0/SConscript
+++ b/src/third_party/boost-1.70.0/SConscript
diff --git a/src/third_party/boost-1.69.0/boost.css b/src/third_party/boost-1.70.0/boost.css
index 986c4050fa9..986c4050fa9 100644
--- a/src/third_party/boost-1.69.0/boost.css
+++ b/src/third_party/boost-1.70.0/boost.css
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/algorithm.hpp b/src/third_party/boost-1.70.0/boost/algorithm/algorithm.hpp
index 2bbee1d2d43..2bbee1d2d43 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/algorithm.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/algorithm/apply_permutation.hpp
index b9de0ded7bb..b9de0ded7bb 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/apply_permutation.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/apply_permutation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/clamp.hpp b/src/third_party/boost-1.70.0/boost/algorithm/clamp.hpp
index d027acdf269..d027acdf269 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/clamp.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/clamp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/all_of.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/all_of.hpp
index 527bbd50fae..527bbd50fae 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/all_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/all_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/any_of.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/any_of.hpp
index d9e2414139e..d9e2414139e 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/any_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/any_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_if.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/copy_if.hpp
index dc1fdeff3e7..dc1fdeff3e7 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/copy_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_n.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/copy_n.hpp
index e4bebd076d2..e4bebd076d2 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/copy_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/find_if_not.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/find_if_not.hpp
index 6f5799a339b..6f5799a339b 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/find_if_not.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/find_if_not.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/iota.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/iota.hpp
index 6efc4d8dc90..6efc4d8dc90 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/iota.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/iota.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_partitioned.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_partitioned.hpp
index fb2c5a17a5c..fb2c5a17a5c 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_partitioned.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_partitioned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_permutation.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_permutation.hpp
index 0098cd53fed..0098cd53fed 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_permutation.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_permutation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_sorted.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_sorted.hpp
index 27662116111..27662116111 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_sorted.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/is_sorted.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/none_of.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/none_of.hpp
index e537c267373..e537c267373 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/none_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/none_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/one_of.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/one_of.hpp
index 3b95180dcfb..3b95180dcfb 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/one_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/one_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_copy.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/partition_copy.hpp
index 635b1e7390e..635b1e7390e 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/partition_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_point.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/partition_point.hpp
index 2c2767ae5af..2c2767ae5af 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_point.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx11/partition_point.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx14/equal.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx14/equal.hpp
index 526aae99658..526aae99658 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx14/equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx14/equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx14/is_permutation.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx14/is_permutation.hpp
index 639446bf373..639446bf373 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx14/is_permutation.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx14/is_permutation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx14/mismatch.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx14/mismatch.hpp
index 46017190d4f..46017190d4f 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx14/mismatch.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx14/mismatch.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/exclusive_scan.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/exclusive_scan.hpp
index e4ec112d299..e4ec112d299 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/exclusive_scan.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/exclusive_scan.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/for_each_n.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/for_each_n.hpp
index 71f6cde3c12..71f6cde3c12 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/for_each_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/for_each_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/inclusive_scan.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/inclusive_scan.hpp
index 5c60c39d20a..5c60c39d20a 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/inclusive_scan.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/inclusive_scan.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/reduce.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/reduce.hpp
index 55424b6e5e1..55424b6e5e1 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/reduce.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/reduce.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp
index dd3c9c834ed..dd3c9c834ed 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp
index 1d1197656f3..1d1197656f3 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_reduce.hpp b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_reduce.hpp
index 8696384760d..8696384760d 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_reduce.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/cxx17/transform_reduce.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/find_backward.hpp b/src/third_party/boost-1.70.0/boost/algorithm/find_backward.hpp
index 66901a1471f..66901a1471f 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/find_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/find_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/find_not.hpp b/src/third_party/boost-1.70.0/boost/algorithm/find_not.hpp
index ef4df00b84b..ef4df00b84b 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/find_not.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/find_not.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/gather.hpp b/src/third_party/boost-1.70.0/boost/algorithm/gather.hpp
index 944bc94348d..944bc94348d 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/gather.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/gather.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/hex.hpp b/src/third_party/boost-1.70.0/boost/algorithm/hex.hpp
index b8335843a88..b8335843a88 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/hex.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/hex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/is_palindrome.hpp b/src/third_party/boost-1.70.0/boost/algorithm/is_palindrome.hpp
index 09881109a37..09881109a37 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/is_palindrome.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/is_palindrome.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/is_partitioned_until.hpp b/src/third_party/boost-1.70.0/boost/algorithm/is_partitioned_until.hpp
index 42683e1d8e5..42683e1d8e5 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/is_partitioned_until.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/is_partitioned_until.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/minmax.hpp b/src/third_party/boost-1.70.0/boost/algorithm/minmax.hpp
index 053a7d60ae0..053a7d60ae0 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/minmax.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/minmax.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/minmax_element.hpp b/src/third_party/boost-1.70.0/boost/algorithm/minmax_element.hpp
index 752f6cbdb16..752f6cbdb16 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/minmax_element.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/minmax_element.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore.hpp b/src/third_party/boost-1.70.0/boost/algorithm/searching/boyer_moore.hpp
index 192d4dec25b..192d4dec25b 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/searching/boyer_moore.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore_horspool.hpp b/src/third_party/boost-1.70.0/boost/algorithm/searching/boyer_moore_horspool.hpp
index aacb5cb833b..aacb5cb833b 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore_horspool.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/searching/boyer_moore_horspool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/bm_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/searching/detail/bm_traits.hpp
index 12143636be0..12143636be0 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/bm_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/searching/detail/bm_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/debugging.hpp b/src/third_party/boost-1.70.0/boost/algorithm/searching/detail/debugging.hpp
index 3996e0f503c..3996e0f503c 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/debugging.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/searching/detail/debugging.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/searching/knuth_morris_pratt.hpp b/src/third_party/boost-1.70.0/boost/algorithm/searching/knuth_morris_pratt.hpp
index 5b5b64a729a..5b5b64a729a 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/searching/knuth_morris_pratt.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/searching/knuth_morris_pratt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/sort_subrange.hpp b/src/third_party/boost-1.70.0/boost/algorithm/sort_subrange.hpp
index 7fb2cb55d01..7fb2cb55d01 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/sort_subrange.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/sort_subrange.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string.hpp
index 07715173964..07715173964 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/case_conv.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/case_conv.hpp
index 683340b8ec8..683340b8ec8 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/case_conv.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/case_conv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/classification.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/classification.hpp
index ca43602d472..ca43602d472 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/classification.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/classification.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/compare.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/compare.hpp
index 734303a9a99..734303a9a99 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/compare.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/compare.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/concept.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/concept.hpp
index 17e8349596b..17e8349596b 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/concept.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/concept.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/config.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/config.hpp
index 559750ac8aa..559750ac8aa 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/constants.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/constants.hpp
index 6ed70effcae..6ed70effcae 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/constants.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/constants.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/case_conv.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/case_conv.hpp
index 233912ca0f2..233912ca0f2 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/case_conv.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/case_conv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/classification.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/classification.hpp
index 704d9d20ff4..704d9d20ff4 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/classification.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/classification.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format.hpp
index b39875024cf..b39875024cf 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_all.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format_all.hpp
index 52930c83ad8..52930c83ad8 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_all.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format_all.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_store.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format_store.hpp
index b9f4a88d912..b9f4a88d912 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_store.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_format_store.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_iterator.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_iterator.hpp
index 4f90a98fc02..4f90a98fc02 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/find_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/finder.hpp
index a2a958212de..a2a958212de 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/finder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder_regex.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/finder_regex.hpp
index 9cb01cfaf13..9cb01cfaf13 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder_regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/finder_regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/formatter.hpp
index c071822f2ac..c071822f2ac 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter_regex.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/formatter_regex.hpp
index 5f26407bed8..5f26407bed8 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter_regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/formatter_regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/predicate.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/predicate.hpp
index 5acf3cc6633..5acf3cc6633 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/predicate.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/predicate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/replace_storage.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/replace_storage.hpp
index db35e4c53be..db35e4c53be 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/replace_storage.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/replace_storage.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/sequence.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/sequence.hpp
index dc47409115f..dc47409115f 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/trim.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/trim.hpp
index 1233e49d301..1233e49d301 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/trim.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/trim.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/util.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/util.hpp
index 7844b6723cc..7844b6723cc 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/detail/util.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/detail/util.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/erase.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/erase.hpp
index 68837909783..68837909783 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/erase.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/erase.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/find.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/find.hpp
index f2c2926b509..f2c2926b509 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/find.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/find.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/find_format.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/find_format.hpp
index 0e84a4ee68a..0e84a4ee68a 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/find_format.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/find_format.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/find_iterator.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/find_iterator.hpp
index 5a52d92e41b..5a52d92e41b 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/find_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/find_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/finder.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/finder.hpp
index 61f6e4155bc..61f6e4155bc 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/finder.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/finder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/formatter.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/formatter.hpp
index de8681bc3f5..de8681bc3f5 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/iter_find.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/iter_find.hpp
index 10424abc749..10424abc749 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/iter_find.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/iter_find.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/join.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/join.hpp
index b871eb44f69..b871eb44f69 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/join.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/join.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/predicate.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/predicate.hpp
index 0879829b5a4..0879829b5a4 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/predicate.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/predicate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/predicate_facade.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/predicate_facade.hpp
index a9753fc2ae6..a9753fc2ae6 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/predicate_facade.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/predicate_facade.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/regex.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/regex.hpp
index a6c7c60ae8d..a6c7c60ae8d 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/regex_find_format.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/regex_find_format.hpp
index 409afc2ba0c..409afc2ba0c 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/regex_find_format.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/regex_find_format.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/replace.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/replace.hpp
index 2adb031c59a..2adb031c59a 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/replace.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/replace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/sequence_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/sequence_traits.hpp
index be151f8d3d2..be151f8d3d2 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/sequence_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/sequence_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/split.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/split.hpp
index cae712c07fa..cae712c07fa 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/split.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/split.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/std/list_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/std/list_traits.hpp
index a3cf7bb18c5..a3cf7bb18c5 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/std/list_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/std/list_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/std/rope_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/std/rope_traits.hpp
index 637059a5504..637059a5504 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/std/rope_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/std/rope_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/std/slist_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/std/slist_traits.hpp
index c30b93c73ad..c30b93c73ad 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/std/slist_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/std/slist_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/std/string_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/std/string_traits.hpp
index c9408307d33..c9408307d33 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/std/string_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/std/string_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/std_containers_traits.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/std_containers_traits.hpp
index 3f02246fda5..3f02246fda5 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/std_containers_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/std_containers_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/trim.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/trim.hpp
index e740d57d933..e740d57d933 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/trim.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/trim.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/trim_all.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/trim_all.hpp
index a616f7f33ea..a616f7f33ea 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/trim_all.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/trim_all.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string/yes_no_type.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string/yes_no_type.hpp
index b76cc6c155c..b76cc6c155c 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string/yes_no_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string/yes_no_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/string_regex.hpp b/src/third_party/boost-1.70.0/boost/algorithm/string_regex.hpp
index 791aa18481c..791aa18481c 100644
--- a/src/third_party/boost-1.69.0/boost/algorithm/string_regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/algorithm/string_regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align.hpp b/src/third_party/boost-1.70.0/boost/align.hpp
index 45fe36bbcc3..45fe36bbcc3 100644
--- a/src/third_party/boost-1.69.0/boost/align.hpp
+++ b/src/third_party/boost-1.70.0/boost/align.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/align.hpp b/src/third_party/boost-1.70.0/boost/align/align.hpp
index ee4371091cb..ee4371091cb 100644
--- a/src/third_party/boost-1.69.0/boost/align/align.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/align.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/align_down.hpp b/src/third_party/boost-1.70.0/boost/align/align_down.hpp
index 355844f8aa2..355844f8aa2 100644
--- a/src/third_party/boost-1.69.0/boost/align/align_down.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/align_down.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/align_up.hpp b/src/third_party/boost-1.70.0/boost/align/align_up.hpp
index 6401ea848a6..6401ea848a6 100644
--- a/src/third_party/boost-1.69.0/boost/align/align_up.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/align_up.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_alloc.hpp b/src/third_party/boost-1.70.0/boost/align/aligned_alloc.hpp
index 42128f1b24a..42128f1b24a 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_alloc.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/align/aligned_allocator.hpp
index 4ec6b50c2f3..4ec6b50c2f3 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/aligned_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp b/src/third_party/boost-1.70.0/boost/align/aligned_allocator_adaptor.hpp
index 912651687a9..912651687a9 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/aligned_allocator_adaptor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor_forward.hpp b/src/third_party/boost-1.70.0/boost/align/aligned_allocator_adaptor_forward.hpp
index f762cd1c3ab..f762cd1c3ab 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/aligned_allocator_adaptor_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_forward.hpp b/src/third_party/boost-1.70.0/boost/align/aligned_allocator_forward.hpp
index 23add71aaac..23add71aaac 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/aligned_allocator_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_delete.hpp b/src/third_party/boost-1.70.0/boost/align/aligned_delete.hpp
index 385bd557af9..385bd557af9 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_delete.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/aligned_delete.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_delete_forward.hpp b/src/third_party/boost-1.70.0/boost/align/aligned_delete_forward.hpp
index d5b766d7f0a..d5b766d7f0a 100644
--- a/src/third_party/boost-1.69.0/boost/align/aligned_delete_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/aligned_delete_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/alignment_of.hpp b/src/third_party/boost-1.70.0/boost/align/alignment_of.hpp
index 488df0b9e0e..488df0b9e0e 100644
--- a/src/third_party/boost-1.69.0/boost/align/alignment_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/alignment_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/alignment_of_forward.hpp b/src/third_party/boost-1.70.0/boost/align/alignment_of_forward.hpp
index 31db15f23c6..31db15f23c6 100644
--- a/src/third_party/boost-1.69.0/boost/align/alignment_of_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/alignment_of_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/assume_aligned.hpp b/src/third_party/boost-1.70.0/boost/align/assume_aligned.hpp
index 22e5103654e..22e5103654e 100644
--- a/src/third_party/boost-1.69.0/boost/align/assume_aligned.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/assume_aligned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/addressof.hpp b/src/third_party/boost-1.70.0/boost/align/detail/addressof.hpp
index a314830bed7..a314830bed7 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/addressof.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/addressof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/align.hpp b/src/third_party/boost-1.70.0/boost/align/detail/align.hpp
index 905940ad77a..905940ad77a 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/align.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/align.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/align_cxx11.hpp b/src/third_party/boost-1.70.0/boost/align/detail/align_cxx11.hpp
index 637541ab408..637541ab408 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/align_cxx11.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/align_cxx11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/align_down.hpp b/src/third_party/boost-1.70.0/boost/align/detail/align_down.hpp
index de3c80d06d3..de3c80d06d3 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/align_down.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/align_down.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/align_up.hpp b/src/third_party/boost-1.70.0/boost/align/detail/align_up.hpp
index ac11f8964fb..ac11f8964fb 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/align_up.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/align/detail/aligned_alloc.hpp
index d27a5499090..d27a5499090 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_android.hpp b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_android.hpp
index 4119fbd9bce..4119fbd9bce 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_android.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_android.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_macos.hpp b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_macos.hpp
index 76366fa5c10..76366fa5c10 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_macos.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_macos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_msvc.hpp b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_msvc.hpp
index 45c57c99151..45c57c99151 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_msvc.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_msvc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_posix.hpp b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_posix.hpp
index 78fc842d205..78fc842d205 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_posix.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_posix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_sunos.hpp b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_sunos.hpp
index 0948b40e392..0948b40e392 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_sunos.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/aligned_alloc_sunos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of.hpp b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of.hpp
index b6fc3dcdcf7..b6fc3dcdcf7 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_clang.hpp b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_clang.hpp
index 95773e5ea31..95773e5ea31 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_clang.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_clang.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_codegear.hpp b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_codegear.hpp
index ea6f9042423..ea6f9042423 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_codegear.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_codegear.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_cxx11.hpp b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_cxx11.hpp
index 05c7429385c..05c7429385c 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_cxx11.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_cxx11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_gcc.hpp b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_gcc.hpp
index 66a63a50b12..66a63a50b12 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_gcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_gcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_msvc.hpp b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_msvc.hpp
index 440b840db45..440b840db45 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_msvc.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/alignment_of_msvc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned.hpp b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned.hpp
index d218d8c64ed..d218d8c64ed 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_clang.hpp b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_clang.hpp
index 4c7159fa28e..4c7159fa28e 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_clang.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_clang.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_gcc.hpp b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_gcc.hpp
index 117344447ae..117344447ae 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_gcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_gcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_intel.hpp b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_intel.hpp
index 6792ce005ce..6792ce005ce 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_intel.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_intel.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_msvc.hpp b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_msvc.hpp
index 75ac7e12429..75ac7e12429 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_msvc.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/assume_aligned_msvc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/element_type.hpp b/src/third_party/boost-1.70.0/boost/align/detail/element_type.hpp
index 5b2b732da0a..5b2b732da0a 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/element_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/element_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/integral_constant.hpp b/src/third_party/boost-1.70.0/boost/align/detail/integral_constant.hpp
index 860096783e9..860096783e9 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/integral_constant.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/integral_constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/is_aligned.hpp b/src/third_party/boost-1.70.0/boost/align/detail/is_aligned.hpp
index 61982c46856..61982c46856 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/is_aligned.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/is_aligned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/is_alignment.hpp b/src/third_party/boost-1.70.0/boost/align/detail/is_alignment.hpp
index 542fbe46942..542fbe46942 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/is_alignment.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/is_alignment.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/is_alignment_constant.hpp b/src/third_party/boost-1.70.0/boost/align/detail/is_alignment_constant.hpp
index 0ded62857ee..0ded62857ee 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/is_alignment_constant.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/is_alignment_constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/max_align.hpp b/src/third_party/boost-1.70.0/boost/align/detail/max_align.hpp
index 9c09fec9c96..9c09fec9c96 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/max_align.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/max_align.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/max_objects.hpp b/src/third_party/boost-1.70.0/boost/align/detail/max_objects.hpp
index 9fdd30e1187..9fdd30e1187 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/max_objects.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/max_objects.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/max_size.hpp b/src/third_party/boost-1.70.0/boost/align/detail/max_size.hpp
index 22cefdbec55..22cefdbec55 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/max_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/max_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/min_size.hpp b/src/third_party/boost-1.70.0/boost/align/detail/min_size.hpp
index 5b478fdaf06..5b478fdaf06 100644
--- a/src/third_party/boost-1.69.0/boost/align/detail/min_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/detail/min_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/is_aligned.hpp b/src/third_party/boost-1.70.0/boost/align/is_aligned.hpp
index c8266d0eae5..c8266d0eae5 100644
--- a/src/third_party/boost-1.69.0/boost/align/is_aligned.hpp
+++ b/src/third_party/boost-1.70.0/boost/align/is_aligned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/aligned_storage.hpp b/src/third_party/boost-1.70.0/boost/aligned_storage.hpp
index f400fa9e753..f400fa9e753 100644
--- a/src/third_party/boost-1.69.0/boost/aligned_storage.hpp
+++ b/src/third_party/boost-1.70.0/boost/aligned_storage.hpp
diff --git a/src/third_party/boost-1.70.0/boost/any.hpp b/src/third_party/boost-1.70.0/boost/any.hpp
new file mode 100644
index 00000000000..f161b3ff17d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/any.hpp
@@ -0,0 +1,338 @@
+// 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 - 2019
+
+#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.
+// Copyright Antony Polukhin, 2013-2019.
+//
+// Distributed under the 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.69.0/boost/archive/archive_exception.hpp b/src/third_party/boost-1.70.0/boost/archive/archive_exception.hpp
index fabcdb5fa71..fabcdb5fa71 100644
--- a/src/third_party/boost-1.69.0/boost/archive/archive_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/archive_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_archive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_archive.hpp
index 9283974ff10..9283974ff10 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_archive.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/basic_binary_iarchive.hpp
index c85ead86c62..c85ead86c62 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_binary_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_binary_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_binary_iprimitive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_binary_iprimitive.hpp
index 665d3e81e1f..665d3e81e1f 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_binary_iprimitive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_binary_iprimitive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_binary_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_binary_oarchive.hpp
index f05f2f86d55..f05f2f86d55 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_binary_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_binary_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_binary_oprimitive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_binary_oprimitive.hpp
index 6dc770c60e8..6dc770c60e8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_binary_oprimitive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_binary_oprimitive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_streambuf_locale_saver.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_streambuf_locale_saver.hpp
index 5cd4b36f081..5cd4b36f081 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_streambuf_locale_saver.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_streambuf_locale_saver.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_text_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_text_iarchive.hpp
index 48a646cc1f7..48a646cc1f7 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_text_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_text_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_text_iprimitive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_text_iprimitive.hpp
index bf936b55546..bf936b55546 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_text_iprimitive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_text_iprimitive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_text_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_text_oarchive.hpp
index 6f7f8fb167d..6f7f8fb167d 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_text_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_text_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_text_oprimitive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_text_oprimitive.hpp
index 45f09358ece..45f09358ece 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_text_oprimitive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_text_oprimitive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_xml_archive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_xml_archive.hpp
index bef368b973b..bef368b973b 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_xml_archive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_xml_archive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_xml_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_xml_iarchive.hpp
index e9f7482f744..e9f7482f744 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_xml_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_xml_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_xml_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/basic_xml_oarchive.hpp
index 107fca4ec65..107fca4ec65 100644
--- a/src/third_party/boost-1.69.0/boost/archive/basic_xml_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/basic_xml_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/binary_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/binary_iarchive.hpp
index 785ce7610b1..785ce7610b1 100644
--- a/src/third_party/boost-1.69.0/boost/archive/binary_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/binary_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/binary_iarchive_impl.hpp b/src/third_party/boost-1.70.0/boost/archive/binary_iarchive_impl.hpp
index b4747c98ece..b4747c98ece 100644
--- a/src/third_party/boost-1.69.0/boost/archive/binary_iarchive_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/binary_iarchive_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/binary_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/binary_oarchive.hpp
index e8313fd7c95..e8313fd7c95 100644
--- a/src/third_party/boost-1.69.0/boost/archive/binary_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/binary_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/binary_oarchive_impl.hpp b/src/third_party/boost-1.70.0/boost/archive/binary_oarchive_impl.hpp
index 6b4d018a564..6b4d018a564 100644
--- a/src/third_party/boost-1.69.0/boost/archive/binary_oarchive_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/binary_oarchive_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/binary_wiarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/binary_wiarchive.hpp
index 775d8f82726..775d8f82726 100644
--- a/src/third_party/boost-1.69.0/boost/archive/binary_wiarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/binary_wiarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/binary_woarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/binary_woarchive.hpp
index a8817d6f8b4..a8817d6f8b4 100644
--- a/src/third_party/boost-1.69.0/boost/archive/binary_woarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/binary_woarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/codecvt_null.hpp b/src/third_party/boost-1.70.0/boost/archive/codecvt_null.hpp
index 3b39c8edef1..3b39c8edef1 100644
--- a/src/third_party/boost-1.69.0/boost/archive/codecvt_null.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/codecvt_null.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/abi_prefix.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/abi_prefix.hpp
index debf79e9f0b..debf79e9f0b 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/abi_prefix.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/abi_prefix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/abi_suffix.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/abi_suffix.hpp
index 4e054d66214..4e054d66214 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/abi_suffix.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/abi_suffix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/archive_serializer_map.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/archive_serializer_map.hpp
index 5432bfc73e7..5432bfc73e7 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/archive_serializer_map.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/archive_serializer_map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_archive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/auto_link_archive.hpp
index 79b0e490d65..79b0e490d65 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_archive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/auto_link_archive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_warchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/auto_link_warchive.hpp
index 683d191c20d..683d191c20d 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_warchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/auto_link_warchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_iarchive.hpp
index 1f5a8bf63bf..1f5a8bf63bf 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_iserializer.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_iserializer.hpp
index 0d66674c349..0d66674c349 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_iserializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_iserializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_oarchive.hpp
index c379108d584..c379108d584 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_oserializer.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_oserializer.hpp
index 94247e90056..94247e90056 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_oserializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_oserializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_iserializer.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_pointer_iserializer.hpp
index 1fc4b14d6e9..1fc4b14d6e9 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_iserializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_pointer_iserializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_oserializer.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_pointer_oserializer.hpp
index 1a5d9549eab..1a5d9549eab 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_oserializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_pointer_oserializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_serializer.hpp
index f9c4203f862..f9c4203f862 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_serializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer_map.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/basic_serializer_map.hpp
index 79341803367..79341803367 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer_map.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/basic_serializer_map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/check.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/check.hpp
index 10034e7d101..10034e7d101 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/check.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/check.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/common_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/common_iarchive.hpp
index 4176a8a5ef1..4176a8a5ef1 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/common_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/common_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/common_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/common_oarchive.hpp
index f7428637e42..f7428637e42 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/common_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/common_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/decl.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/decl.hpp
index 4f731cded37..4f731cded37 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/decl.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/decl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/helper_collection.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/helper_collection.hpp
index edb4125e308..edb4125e308 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/helper_collection.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/helper_collection.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/interface_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/interface_iarchive.hpp
index 4a99e28b59f..4a99e28b59f 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/interface_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/interface_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/interface_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/interface_oarchive.hpp
index 359463ed9d8..359463ed9d8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/interface_oarchive.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/detail/iserializer.hpp
index 98cd6a17f2d..98cd6a17f2d 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/iserializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/iserializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/oserializer.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/oserializer.hpp
index 612e1f2cb16..612e1f2cb16 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/oserializer.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/detail/polymorphic_iarchive_route.hpp
index 105685ebbd8..105685ebbd8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_iarchive_route.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/polymorphic_iarchive_route.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/polymorphic_oarchive_route.hpp
index b23fd6bf39d..b23fd6bf39d 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/polymorphic_oarchive_route.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/register_archive.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/register_archive.hpp
index 5ffecc702ce..5ffecc702ce 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/register_archive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/register_archive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.70.0/boost/archive/detail/utf8_codecvt_facet.hpp
index 00b2b4193d3..00b2b4193d3 100644
--- a/src/third_party/boost-1.69.0/boost/archive/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/detail/utf8_codecvt_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/dinkumware.hpp b/src/third_party/boost-1.70.0/boost/archive/dinkumware.hpp
index 90ba6271cdd..90ba6271cdd 100644
--- a/src/third_party/boost-1.69.0/boost/archive/dinkumware.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/impl/archive_serializer_map.ipp
index 98e058ddeca..98e058ddeca 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/archive_serializer_map.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/archive_serializer_map.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iarchive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_iarchive.ipp
index d5619ab6cf3..d5619ab6cf3 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iarchive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_iarchive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iprimitive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_iprimitive.ipp
index e2d051080e7..e2d051080e7 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iprimitive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_iprimitive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oarchive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_oarchive.ipp
index d5a019d32bc..d5a019d32bc 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oarchive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_oarchive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oprimitive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_oprimitive.ipp
index 7b042173a48..7b042173a48 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oprimitive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_binary_oprimitive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iarchive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_iarchive.ipp
index 9ec8c6588c8..9ec8c6588c8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iarchive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_iarchive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iprimitive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_iprimitive.ipp
index 4e44728068d..4e44728068d 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iprimitive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_iprimitive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oarchive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_oarchive.ipp
index 44bc1401fd6..44bc1401fd6 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oarchive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_oarchive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oprimitive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_text_oprimitive.ipp
index 6030fd44c57..6030fd44c57 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oprimitive.ipp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/impl/basic_xml_grammar.hpp
index cc88d4fd829..cc88d4fd829 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_grammar.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_grammar.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_iarchive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_iarchive.ipp
index 625458b9eb5..625458b9eb5 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_iarchive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_iarchive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_oarchive.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_oarchive.ipp
index 3184413f382..3184413f382 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_oarchive.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/basic_xml_oarchive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/text_iarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/text_iarchive_impl.ipp
index ae4e2750ce8..ae4e2750ce8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/text_iarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/text_iarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/text_oarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/text_oarchive_impl.ipp
index 37d8664a98c..37d8664a98c 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/text_oarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/text_oarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/text_wiarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/text_wiarchive_impl.ipp
index e85625ac326..e85625ac326 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/text_wiarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/text_wiarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/text_woarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/text_woarchive_impl.ipp
index 2b6d427cd3a..2b6d427cd3a 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/text_woarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/text_woarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/xml_iarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/xml_iarchive_impl.ipp
index efc32e01632..efc32e01632 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/xml_iarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/xml_iarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/xml_oarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/xml_oarchive_impl.ipp
index 5ebd454e722..5ebd454e722 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/xml_oarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/xml_oarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/xml_wiarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/xml_wiarchive_impl.ipp
index f572b76220e..f572b76220e 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/xml_wiarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/xml_wiarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/xml_woarchive_impl.ipp b/src/third_party/boost-1.70.0/boost/archive/impl/xml_woarchive_impl.ipp
index 630898b86a0..630898b86a0 100644
--- a/src/third_party/boost-1.69.0/boost/archive/impl/xml_woarchive_impl.ipp
+++ b/src/third_party/boost-1.70.0/boost/archive/impl/xml_woarchive_impl.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/base64_from_binary.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/base64_from_binary.hpp
index ee849944397..ee849944397 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/base64_from_binary.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/base64_from_binary.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/binary_from_base64.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/binary_from_base64.hpp
index 89b8f889da3..89b8f889da3 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/binary_from_base64.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/binary_from_base64.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/dataflow_exception.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/dataflow_exception.hpp
index e3e18605b38..e3e18605b38 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/dataflow_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/dataflow_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/escape.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/escape.hpp
index 103b31e0fef..103b31e0fef 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/escape.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/escape.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/insert_linebreaks.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/insert_linebreaks.hpp
index 2504b030db1..2504b030db1 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/insert_linebreaks.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/insert_linebreaks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/istream_iterator.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/istream_iterator.hpp
index a187f605e69..a187f605e69 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/istream_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/istream_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/mb_from_wchar.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/mb_from_wchar.hpp
index eb30480cc03..eb30480cc03 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/mb_from_wchar.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/mb_from_wchar.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/ostream_iterator.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/ostream_iterator.hpp
index 49a9b99034b..49a9b99034b 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/ostream_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/ostream_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/remove_whitespace.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/remove_whitespace.hpp
index c3580ab258a..c3580ab258a 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/remove_whitespace.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/remove_whitespace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/transform_width.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/transform_width.hpp
index 09c050a9274..09c050a9274 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/transform_width.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/transform_width.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/unescape.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/unescape.hpp
index abf62406088..abf62406088 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/unescape.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/unescape.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/wchar_from_mb.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/wchar_from_mb.hpp
index 2af8f6401f2..2af8f6401f2 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/wchar_from_mb.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/wchar_from_mb.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/xml_escape.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/xml_escape.hpp
index c838a73b864..c838a73b864 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/xml_escape.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/iterators/xml_escape.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/iterators/xml_unescape.hpp b/src/third_party/boost-1.70.0/boost/archive/iterators/xml_unescape.hpp
index 9d3c3af9966..9d3c3af9966 100644
--- a/src/third_party/boost-1.69.0/boost/archive/iterators/xml_unescape.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/polymorphic_binary_iarchive.hpp
index 20559bd8fbb..20559bd8fbb 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_binary_oarchive.hpp
index 96febd7a58a..96febd7a58a 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/polymorphic_binary_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/polymorphic_iarchive.hpp
index d3c59a9f0f4..d3c59a9f0f4 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/polymorphic_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/polymorphic_oarchive.hpp
index edac4edb1e8..edac4edb1e8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_oarchive.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/archive/polymorphic_text_iarchive.hpp
index 3e59bfe6bdd..3e59bfe6bdd 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_text_oarchive.hpp
index 233d37c7b54..233d37c7b54 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_text_wiarchive.hpp
index 96afe0eba61..96afe0eba61 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_wiarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_text_woarchive.hpp
index fa0a3aec3c8..fa0a3aec3c8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_woarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_xml_iarchive.hpp
index 0b17b5516e9..0b17b5516e9 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_xml_oarchive.hpp
index a9fc82427e8..a9fc82427e8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_xml_wiarchive.hpp
index 688ff4d0c0c..688ff4d0c0c 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_wiarchive.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/archive/polymorphic_xml_woarchive.hpp
index 2606010d81c..2606010d81c 100644
--- a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_woarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/polymorphic_xml_woarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/text_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/text_iarchive.hpp
index d9d60adf0b8..d9d60adf0b8 100644
--- a/src/third_party/boost-1.69.0/boost/archive/text_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/text_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/text_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/text_oarchive.hpp
index e4c6d4666a3..e4c6d4666a3 100644
--- a/src/third_party/boost-1.69.0/boost/archive/text_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/text_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/text_wiarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/text_wiarchive.hpp
index 3adf068a51a..3adf068a51a 100644
--- a/src/third_party/boost-1.69.0/boost/archive/text_wiarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/text_wiarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/text_woarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/text_woarchive.hpp
index beba62f7058..beba62f7058 100644
--- a/src/third_party/boost-1.69.0/boost/archive/text_woarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/text_woarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/wcslen.hpp b/src/third_party/boost-1.70.0/boost/archive/wcslen.hpp
index 0b60004f095..0b60004f095 100644
--- a/src/third_party/boost-1.69.0/boost/archive/wcslen.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/wcslen.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/xml_archive_exception.hpp b/src/third_party/boost-1.70.0/boost/archive/xml_archive_exception.hpp
index 82c53ef5d3e..82c53ef5d3e 100644
--- a/src/third_party/boost-1.69.0/boost/archive/xml_archive_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/xml_archive_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/xml_iarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/xml_iarchive.hpp
index abd2f9fc4e3..abd2f9fc4e3 100644
--- a/src/third_party/boost-1.69.0/boost/archive/xml_iarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/xml_iarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/xml_oarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/xml_oarchive.hpp
index d0fa8b21f26..d0fa8b21f26 100644
--- a/src/third_party/boost-1.69.0/boost/archive/xml_oarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/xml_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/xml_wiarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/xml_wiarchive.hpp
index 2ca3e5595ec..2ca3e5595ec 100644
--- a/src/third_party/boost-1.69.0/boost/archive/xml_wiarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/xml_wiarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/xml_woarchive.hpp b/src/third_party/boost-1.70.0/boost/archive/xml_woarchive.hpp
index e6ac50de44b..e6ac50de44b 100644
--- a/src/third_party/boost-1.69.0/boost/archive/xml_woarchive.hpp
+++ b/src/third_party/boost-1.70.0/boost/archive/xml_woarchive.hpp
diff --git a/src/third_party/boost-1.70.0/boost/array.hpp b/src/third_party/boost-1.70.0/boost/array.hpp
new file mode 100644
index 00000000000..99dc2c6ded0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/array.hpp
@@ -0,0 +1,457 @@
+/* The following code declares class array,
+ * an STL container (as wrapper) for arrays of constant size.
+ *
+ * See
+ * http://www.boost.org/libs/array/
+ * for documentation.
+ *
+ * The original author site is at: http://www.josuttis.com/
+ *
+ * (C) Copyright Nicolai M. Josuttis 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)
+ *
+ * 9 Jan 2013 - (mtc) Added constexpr
+ * 14 Apr 2012 - (mtc) Added support for boost::hash
+ * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
+ * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
+ * See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
+ * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
+ * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
+ * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
+ * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
+ * 05 Aug 2001 - minor update (Nico Josuttis)
+ * 20 Jan 2001 - STLport fix (Beman Dawes)
+ * 29 Sep 2000 - Initial Revision (Nico Josuttis)
+ *
+ * Jan 29, 2004
+ */
+#ifndef BOOST_ARRAY_HPP
+#define BOOST_ARRAY_HPP
+
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(push)
+# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
+# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated
+# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required
+#endif
+
+#include <cstddef>
+#include <stdexcept>
+#include <boost/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/swap.hpp>
+
+// Handles broken standard libraries better than <iterator>
+#include <boost/detail/iterator.hpp>
+#include <boost/throw_exception.hpp>
+#include <algorithm>
+
+// FIXES for broken compilers
+#include <boost/config.hpp>
+
+
+namespace boost {
+
+ template<class T, std::size_t N>
+ class array {
+ public:
+ T elems[N]; // fixed-size array of elements of type T
+
+ public:
+ // type definitions
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ // iterator support
+ iterator begin() { return elems; }
+ const_iterator begin() const { return elems; }
+ const_iterator cbegin() const { return elems; }
+
+ iterator end() { return elems+N; }
+ const_iterator end() const { return elems+N; }
+ const_iterator cend() const { return elems+N; }
+
+ // reverse iterator support
+#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
+ typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
+ value_type, reference, iterator, difference_type> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+ value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
+#else
+ // workaround for broken reverse_iterator implementations
+ typedef std::reverse_iterator<iterator,T> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ const_reverse_iterator crbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+ const_reverse_iterator crend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ // operator[]
+ reference operator[](size_type i)
+ {
+ return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];
+ }
+
+ /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const
+ {
+ return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];
+ }
+
+ // at() with range check
+ reference at(size_type i) { return rangecheck(i), elems[i]; }
+ /*BOOST_CONSTEXPR*/ const_reference at(size_type i) const { return rangecheck(i), elems[i]; }
+
+ // front() and back()
+ reference front()
+ {
+ return elems[0];
+ }
+
+ BOOST_CONSTEXPR const_reference front() const
+ {
+ return elems[0];
+ }
+
+ reference back()
+ {
+ return elems[N-1];
+ }
+
+ BOOST_CONSTEXPR const_reference back() const
+ {
+ return elems[N-1];
+ }
+
+ // size is constant
+ static BOOST_CONSTEXPR size_type size() { return N; }
+ static BOOST_CONSTEXPR bool empty() { return false; }
+ static BOOST_CONSTEXPR size_type max_size() { return N; }
+ enum { static_size = N };
+
+ // swap (note: linear complexity)
+ void swap (array<T,N>& y) {
+ for (size_type i = 0; i < N; ++i)
+ boost::swap(elems[i],y.elems[i]);
+ }
+
+ // direct access to data (read-only)
+ const T* data() const { return elems; }
+ T* data() { return elems; }
+
+ // use array as C array (direct read/write access to data)
+ T* c_array() { return elems; }
+
+ // assignment with type conversion
+ template <typename T2>
+ array<T,N>& operator= (const array<T2,N>& rhs) {
+ std::copy(rhs.begin(),rhs.end(), begin());
+ return *this;
+ }
+
+ // assign one value to all elements
+ void assign (const T& value) { fill ( value ); } // A synonym for fill
+ void fill (const T& value)
+ {
+ std::fill_n(begin(),size(),value);
+ }
+
+ // check range (may be private because it is static)
+ static BOOST_CONSTEXPR bool rangecheck (size_type i) {
+ return i >= size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
+ }
+
+ };
+
+ template< class T >
+ class array< T, 0 > {
+
+ public:
+ // type definitions
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ // iterator support
+ iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); }
+ const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+ const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+
+ iterator end() { return begin(); }
+ const_iterator end() const { return begin(); }
+ const_iterator cend() const { return cbegin(); }
+
+ // reverse iterator support
+#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
+ typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
+ value_type, reference, iterator, difference_type> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+ value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
+#else
+ // workaround for broken reverse_iterator implementations
+ typedef std::reverse_iterator<iterator,T> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ const_reverse_iterator crbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+ const_reverse_iterator crend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ // operator[]
+ reference operator[](size_type /*i*/)
+ {
+ return failed_rangecheck();
+ }
+
+ /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const
+ {
+ return failed_rangecheck();
+ }
+
+ // at() with range check
+ reference at(size_type /*i*/) { return failed_rangecheck(); }
+ /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
+
+ // front() and back()
+ reference front()
+ {
+ return failed_rangecheck();
+ }
+
+ BOOST_CONSTEXPR const_reference front() const
+ {
+ return failed_rangecheck();
+ }
+
+ reference back()
+ {
+ return failed_rangecheck();
+ }
+
+ BOOST_CONSTEXPR const_reference back() const
+ {
+ return failed_rangecheck();
+ }
+
+ // size is constant
+ static BOOST_CONSTEXPR size_type size() { return 0; }
+ static BOOST_CONSTEXPR bool empty() { return true; }
+ static BOOST_CONSTEXPR size_type max_size() { return 0; }
+ enum { static_size = 0 };
+
+ void swap (array<T,0>& /*y*/) {
+ }
+
+ // direct access to data (read-only)
+ const T* data() const { return 0; }
+ T* data() { return 0; }
+
+ // use array as C array (direct read/write access to data)
+ T* c_array() { return 0; }
+
+ // assignment with type conversion
+ template <typename T2>
+ array<T,0>& operator= (const array<T2,0>& ) {
+ return *this;
+ }
+
+ // assign one value to all elements
+ void assign (const T& value) { fill ( value ); }
+ void fill (const T& ) {}
+
+ // check range (may be private because it is static)
+ static reference failed_rangecheck () {
+ std::out_of_range e("attempt to access element of an empty array");
+ boost::throw_exception(e);
+#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
+ //
+ // We need to return something here to keep
+ // some compilers happy: however we will never
+ // actually get here....
+ //
+ static T placeholder;
+ return placeholder;
+#endif
+ }
+ };
+
+ // comparisons
+ template<class T, std::size_t N>
+ bool operator== (const array<T,N>& x, const array<T,N>& y) {
+ return std::equal(x.begin(), x.end(), y.begin());
+ }
+ template<class T, std::size_t N>
+ bool operator< (const array<T,N>& x, const array<T,N>& y) {
+ return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+ }
+ template<class T, std::size_t N>
+ bool operator!= (const array<T,N>& x, const array<T,N>& y) {
+ return !(x==y);
+ }
+ template<class T, std::size_t N>
+ bool operator> (const array<T,N>& x, const array<T,N>& y) {
+ return y<x;
+ }
+ template<class T, std::size_t N>
+ bool operator<= (const array<T,N>& x, const array<T,N>& y) {
+ return !(y<x);
+ }
+ template<class T, std::size_t N>
+ bool operator>= (const array<T,N>& x, const array<T,N>& y) {
+ return !(x<y);
+ }
+
+ // global swap()
+ template<class T, std::size_t N>
+ inline void swap (array<T,N>& x, array<T,N>& y) {
+ x.swap(y);
+ }
+
+#if defined(__SUNPRO_CC)
+// Trac ticket #4757; the Sun Solaris compiler can't handle
+// syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
+//
+// We can't just use this for all compilers, because the
+// borland compilers can't handle this form.
+ namespace detail {
+ template <typename T, std::size_t N> struct c_array
+ {
+ typedef T type[N];
+ };
+ }
+
+ // Specific for boost::array: simply returns its elems data member.
+ template <typename T, std::size_t N>
+ typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg)
+ {
+ return arg.elems;
+ }
+
+ // Specific for boost::array: simply returns its elems data member.
+ template <typename T, std::size_t N>
+ typename detail::c_array<T,N>::type const& get_c_array(const boost::array<T,N>& arg)
+ {
+ return arg.elems;
+ }
+#else
+// Specific for boost::array: simply returns its elems data member.
+ template <typename T, std::size_t N>
+ T(&get_c_array(boost::array<T,N>& arg))[N]
+ {
+ return arg.elems;
+ }
+
+ // Const version.
+ template <typename T, std::size_t N>
+ const T(&get_c_array(const boost::array<T,N>& arg))[N]
+ {
+ return arg.elems;
+ }
+#endif
+
+#if 0
+ // Overload for std::array, assuming that std::array will have
+ // explicit conversion functions as discussed at the WG21 meeting
+ // in Summit, March 2009.
+ template <typename T, std::size_t N>
+ T(&get_c_array(std::array<T,N>& arg))[N]
+ {
+ return static_cast<T(&)[N]>(arg);
+ }
+
+ // Const version.
+ template <typename T, std::size_t N>
+ const T(&get_c_array(const std::array<T,N>& arg))[N]
+ {
+ return static_cast<T(&)[N]>(arg);
+ }
+#endif
+
+ template <class It> std::size_t hash_range(It, It);
+
+ template<class T, std::size_t N>
+ std::size_t hash_value(const array<T,N>& arr)
+ {
+ return boost::hash_range(arr.begin(), arr.end());
+ }
+
+ template <size_t Idx, typename T, size_t N>
+ T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" );
+ return arr[Idx];
+ }
+
+ template <size_t Idx, typename T, size_t N>
+ const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" );
+ return arr[Idx];
+ }
+
+} /* namespace boost */
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+// If we don't have std::array, I'm assuming that we don't have std::get
+namespace std {
+ template <size_t Idx, typename T, size_t N>
+ T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" );
+ return arr[Idx];
+ }
+
+ template <size_t Idx, typename T, size_t N>
+ const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" );
+ return arr[Idx];
+ }
+}
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(pop)
+#endif
+
+#endif /*BOOST_ARRAY_HPP*/
diff --git a/src/third_party/boost-1.70.0/boost/asio.hpp b/src/third_party/boost-1.70.0/boost/asio.hpp
new file mode 100644
index 00000000000..1ee7e12f217
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio.hpp
@@ -0,0 +1,146 @@
+//
+// asio.hpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+//
+// See www.boost.org/libs/asio for documentation.
+//
+
+#ifndef BOOST_ASIO_HPP
+#define BOOST_ASIO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/awaitable.hpp>
+#include <boost/asio/basic_datagram_socket.hpp>
+#include <boost/asio/basic_deadline_timer.hpp>
+#include <boost/asio/basic_io_object.hpp>
+#include <boost/asio/basic_raw_socket.hpp>
+#include <boost/asio/basic_seq_packet_socket.hpp>
+#include <boost/asio/basic_serial_port.hpp>
+#include <boost/asio/basic_signal_set.hpp>
+#include <boost/asio/basic_socket.hpp>
+#include <boost/asio/basic_socket_acceptor.hpp>
+#include <boost/asio/basic_socket_iostream.hpp>
+#include <boost/asio/basic_socket_streambuf.hpp>
+#include <boost/asio/basic_stream_socket.hpp>
+#include <boost/asio/basic_streambuf.hpp>
+#include <boost/asio/basic_waitable_timer.hpp>
+#include <boost/asio/bind_executor.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/buffered_read_stream_fwd.hpp>
+#include <boost/asio/buffered_read_stream.hpp>
+#include <boost/asio/buffered_stream_fwd.hpp>
+#include <boost/asio/buffered_stream.hpp>
+#include <boost/asio/buffered_write_stream_fwd.hpp>
+#include <boost/asio/buffered_write_stream.hpp>
+#include <boost/asio/buffers_iterator.hpp>
+#include <boost/asio/co_spawn.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/compose.hpp>
+#include <boost/asio/connect.hpp>
+#include <boost/asio/coroutine.hpp>
+#include <boost/asio/deadline_timer.hpp>
+#include <boost/asio/defer.hpp>
+#include <boost/asio/detached.hpp>
+#include <boost/asio/dispatch.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/executor_work_guard.hpp>
+#include <boost/asio/generic/basic_endpoint.hpp>
+#include <boost/asio/generic/datagram_protocol.hpp>
+#include <boost/asio/generic/raw_protocol.hpp>
+#include <boost/asio/generic/seq_packet_protocol.hpp>
+#include <boost/asio/generic/stream_protocol.hpp>
+#include <boost/asio/handler_alloc_hook.hpp>
+#include <boost/asio/handler_continuation_hook.hpp>
+#include <boost/asio/handler_invoke_hook.hpp>
+#include <boost/asio/high_resolution_timer.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/io_context_strand.hpp>
+#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_service_strand.hpp>
+#include <boost/asio/ip/address.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio/ip/address_v4_iterator.hpp>
+#include <boost/asio/ip/address_v4_range.hpp>
+#include <boost/asio/ip/address_v6.hpp>
+#include <boost/asio/ip/address_v6_iterator.hpp>
+#include <boost/asio/ip/address_v6_range.hpp>
+#include <boost/asio/ip/network_v4.hpp>
+#include <boost/asio/ip/network_v6.hpp>
+#include <boost/asio/ip/bad_address_cast.hpp>
+#include <boost/asio/ip/basic_endpoint.hpp>
+#include <boost/asio/ip/basic_resolver.hpp>
+#include <boost/asio/ip/basic_resolver_entry.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+#include <boost/asio/ip/host_name.hpp>
+#include <boost/asio/ip/icmp.hpp>
+#include <boost/asio/ip/multicast.hpp>
+#include <boost/asio/ip/resolver_base.hpp>
+#include <boost/asio/ip/resolver_query_base.hpp>
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/asio/ip/udp.hpp>
+#include <boost/asio/ip/unicast.hpp>
+#include <boost/asio/ip/v6_only.hpp>
+#include <boost/asio/is_executor.hpp>
+#include <boost/asio/is_read_buffered.hpp>
+#include <boost/asio/is_write_buffered.hpp>
+#include <boost/asio/local/basic_endpoint.hpp>
+#include <boost/asio/local/connect_pair.hpp>
+#include <boost/asio/local/datagram_protocol.hpp>
+#include <boost/asio/local/stream_protocol.hpp>
+#include <boost/asio/packaged_task.hpp>
+#include <boost/asio/placeholders.hpp>
+#include <boost/asio/posix/basic_descriptor.hpp>
+#include <boost/asio/posix/basic_stream_descriptor.hpp>
+#include <boost/asio/posix/descriptor.hpp>
+#include <boost/asio/posix/descriptor_base.hpp>
+#include <boost/asio/posix/stream_descriptor.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/read.hpp>
+#include <boost/asio/read_at.hpp>
+#include <boost/asio/read_until.hpp>
+#include <boost/asio/redirect_error.hpp>
+#include <boost/asio/serial_port.hpp>
+#include <boost/asio/serial_port_base.hpp>
+#include <boost/asio/signal_set.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/steady_timer.hpp>
+#include <boost/asio/strand.hpp>
+#include <boost/asio/streambuf.hpp>
+#include <boost/asio/system_context.hpp>
+#include <boost/asio/system_executor.hpp>
+#include <boost/asio/system_timer.hpp>
+#include <boost/asio/this_coro.hpp>
+#include <boost/asio/thread_pool.hpp>
+#include <boost/asio/time_traits.hpp>
+#include <boost/asio/use_awaitable.hpp>
+#include <boost/asio/use_future.hpp>
+#include <boost/asio/uses_executor.hpp>
+#include <boost/asio/version.hpp>
+#include <boost/asio/wait_traits.hpp>
+#include <boost/asio/windows/basic_object_handle.hpp>
+#include <boost/asio/windows/basic_overlapped_handle.hpp>
+#include <boost/asio/windows/basic_random_access_handle.hpp>
+#include <boost/asio/windows/basic_stream_handle.hpp>
+#include <boost/asio/windows/object_handle.hpp>
+#include <boost/asio/windows/overlapped_handle.hpp>
+#include <boost/asio/windows/overlapped_ptr.hpp>
+#include <boost/asio/windows/random_access_handle.hpp>
+#include <boost/asio/windows/stream_handle.hpp>
+#include <boost/asio/write.hpp>
+#include <boost/asio/write_at.hpp>
+
+#endif // BOOST_ASIO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/associated_allocator.hpp b/src/third_party/boost-1.70.0/boost/asio/associated_allocator.hpp
new file mode 100644
index 00000000000..c70852b534f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/associated_allocator.hpp
@@ -0,0 +1,133 @@
+//
+// associated_allocator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ASSOCIATED_ALLOCATOR_HPP
+#define BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <memory>
+#include <boost/asio/detail/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename>
+struct associated_allocator_check
+{
+ typedef void type;
+};
+
+template <typename T, typename E, typename = void>
+struct associated_allocator_impl
+{
+ typedef E type;
+
+ static type get(const T&, const E& e) BOOST_ASIO_NOEXCEPT
+ {
+ return e;
+ }
+};
+
+template <typename T, typename E>
+struct associated_allocator_impl<T, E,
+ typename associated_allocator_check<typename T::allocator_type>::type>
+{
+ typedef typename T::allocator_type type;
+
+ static type get(const T& t, const E&) BOOST_ASIO_NOEXCEPT
+ {
+ return t.get_allocator();
+ }
+};
+
+} // namespace detail
+
+/// Traits type used to obtain the allocator associated with an object.
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type. The template parameter @c
+ * Allocator shall be a type meeting the Allocator requirements.
+ *
+ * Specialisations shall meet the following requirements, where @c t is a const
+ * reference to an object of type @c T, and @c a is an object of type @c
+ * Allocator.
+ *
+ * @li Provide a nested typedef @c type that identifies a type meeting the
+ * Allocator requirements.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t) and with return type @c type.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t,a) and with return type @c type.
+ */
+template <typename T, typename Allocator = std::allocator<void> >
+struct associated_allocator
+{
+ /// If @c T has a nested type @c allocator_type, <tt>T::allocator_type</tt>.
+ /// Otherwise @c Allocator.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef see_below type;
+#else // defined(GENERATING_DOCUMENTATION)
+ typedef typename detail::associated_allocator_impl<T, Allocator>::type type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// If @c T has a nested type @c allocator_type, returns
+ /// <tt>t.get_allocator()</tt>. Otherwise returns @c a.
+ static type get(const T& t,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return detail::associated_allocator_impl<T, Allocator>::get(t, a);
+ }
+};
+
+/// Helper function to obtain an object's associated allocator.
+/**
+ * @returns <tt>associated_allocator<T>::get(t)</tt>
+ */
+template <typename T>
+inline typename associated_allocator<T>::type
+get_associated_allocator(const T& t) BOOST_ASIO_NOEXCEPT
+{
+ return associated_allocator<T>::get(t);
+}
+
+/// Helper function to obtain an object's associated allocator.
+/**
+ * @returns <tt>associated_allocator<T, Allocator>::get(t, a)</tt>
+ */
+template <typename T, typename Allocator>
+inline typename associated_allocator<T, Allocator>::type
+get_associated_allocator(const T& t, const Allocator& a) BOOST_ASIO_NOEXCEPT
+{
+ return associated_allocator<T, Allocator>::get(t, a);
+}
+
+#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
+
+template <typename T, typename Allocator = std::allocator<void> >
+using associated_allocator_t
+ = typename associated_allocator<T, Allocator>::type;
+
+#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/associated_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/associated_executor.hpp
new file mode 100644
index 00000000000..a44190b5fde
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/associated_executor.hpp
@@ -0,0 +1,151 @@
+//
+// associated_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ASSOCIATED_EXECUTOR_HPP
+#define BOOST_ASIO_ASSOCIATED_EXECUTOR_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/is_executor.hpp>
+#include <boost/asio/system_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename>
+struct associated_executor_check
+{
+ typedef void type;
+};
+
+template <typename T, typename E, typename = void>
+struct associated_executor_impl
+{
+ typedef E type;
+
+ static type get(const T&, const E& e) BOOST_ASIO_NOEXCEPT
+ {
+ return e;
+ }
+};
+
+template <typename T, typename E>
+struct associated_executor_impl<T, E,
+ typename associated_executor_check<typename T::executor_type>::type>
+{
+ typedef typename T::executor_type type;
+
+ static type get(const T& t, const E&) BOOST_ASIO_NOEXCEPT
+ {
+ return t.get_executor();
+ }
+};
+
+} // namespace detail
+
+/// Traits type used to obtain the executor associated with an object.
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type. The template parameter @c
+ * Executor shall be a type meeting the Executor requirements.
+ *
+ * Specialisations shall meet the following requirements, where @c t is a const
+ * reference to an object of type @c T, and @c e is an object of type @c
+ * Executor.
+ *
+ * @li Provide a nested typedef @c type that identifies a type meeting the
+ * Executor requirements.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t) and with return type @c type.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t,e) and with return type @c type.
+ */
+template <typename T, typename Executor = system_executor>
+struct associated_executor
+{
+ /// If @c T has a nested type @c executor_type, <tt>T::executor_type</tt>.
+ /// Otherwise @c Executor.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef see_below type;
+#else // defined(GENERATING_DOCUMENTATION)
+ typedef typename detail::associated_executor_impl<T, Executor>::type type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// If @c T has a nested type @c executor_type, returns
+ /// <tt>t.get_executor()</tt>. Otherwise returns @c ex.
+ static type get(const T& t,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return detail::associated_executor_impl<T, Executor>::get(t, ex);
+ }
+};
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_executor<T>::get(t)</tt>
+ */
+template <typename T>
+inline typename associated_executor<T>::type
+get_associated_executor(const T& t) BOOST_ASIO_NOEXCEPT
+{
+ return associated_executor<T>::get(t);
+}
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_executor<T, Executor>::get(t, ex)</tt>
+ */
+template <typename T, typename Executor>
+inline typename associated_executor<T, Executor>::type
+get_associated_executor(const T& t, const Executor& ex,
+ typename enable_if<is_executor<
+ Executor>::value>::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return associated_executor<T, Executor>::get(t, ex);
+}
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_executor<T, typename
+ * ExecutionContext::executor_type>::get(t, ctx.get_executor())</tt>
+ */
+template <typename T, typename ExecutionContext>
+inline typename associated_executor<T,
+ typename ExecutionContext::executor_type>::type
+get_associated_executor(const T& t, ExecutionContext& ctx,
+ typename enable_if<is_convertible<ExecutionContext&,
+ execution_context&>::value>::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return associated_executor<T,
+ typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
+}
+
+#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
+
+template <typename T, typename Executor = system_executor>
+using associated_executor_t = typename associated_executor<T, Executor>::type;
+
+#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_ASSOCIATED_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/async_result.hpp b/src/third_party/boost-1.70.0/boost/asio/async_result.hpp
new file mode 100644
index 00000000000..4f3bb1ec091
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/async_result.hpp
@@ -0,0 +1,358 @@
+//
+// async_result.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ASYNC_RESULT_HPP
+#define BOOST_ASIO_ASYNC_RESULT_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/variadic_templates.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// An interface for customising the behaviour of an initiating function.
+/**
+ * The async_result traits class is used for determining:
+ *
+ * @li the concrete completion handler type to be called at the end of the
+ * asynchronous operation;
+ *
+ * @li the initiating function return type; and
+ *
+ * @li how the return value of the initiating function is obtained.
+ *
+ * The trait allows the handler and return types to be determined at the point
+ * where the specific completion handler signature is known.
+ *
+ * This template may be specialised for user-defined completion token types.
+ * The primary template assumes that the CompletionToken is the completion
+ * handler.
+ */
+template <typename CompletionToken, typename Signature>
+class async_result
+{
+public:
+ /// The concrete completion handler type for the specific signature.
+ typedef CompletionToken completion_handler_type;
+
+ /// The return type of the initiating function.
+ typedef void return_type;
+
+ /// Construct an async result from a given handler.
+ /**
+ * When using a specalised async_result, the constructor has an opportunity
+ * to initialise some state associated with the completion handler, which is
+ * then returned from the initiating function.
+ */
+ explicit async_result(completion_handler_type& h)
+ {
+ (void)h;
+ }
+
+ /// Obtain the value to be returned from the initiating function.
+ return_type get()
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \
+ || defined(GENERATING_DOCUMENTATION)
+
+ /// Initiate the asynchronous operation that will produce the result, and
+ /// obtain the value to be returned from the initiating function.
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static return_type initiate(
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken) token,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
+ BOOST_ASIO_MOVE_CAST(RawCompletionToken)(token),
+ BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+ template <typename Initiation, typename RawCompletionToken>
+ static return_type initiate(
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken) token)
+ {
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
+ BOOST_ASIO_MOVE_CAST(RawCompletionToken)(token));
+ }
+
+#define BOOST_ASIO_PRIVATE_INITIATE_DEF(n) \
+ template <typename Initiation, typename RawCompletionToken, \
+ BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ static return_type initiate( \
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation, \
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken) token, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)( \
+ BOOST_ASIO_MOVE_CAST(RawCompletionToken)(token), \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_INITIATE_DEF)
+#undef BOOST_ASIO_PRIVATE_INITIATE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+private:
+ async_result(const async_result&) BOOST_ASIO_DELETED;
+ async_result& operator=(const async_result&) BOOST_ASIO_DELETED;
+};
+
+/// Helper template to deduce the handler type from a CompletionToken, capture
+/// a local copy of the handler, and then create an async_result for the
+/// handler.
+template <typename CompletionToken, typename Signature>
+struct async_completion
+{
+ /// The real handler type to be used for the asynchronous operation.
+ typedef typename boost::asio::async_result<
+ typename decay<CompletionToken>::type,
+ Signature>::completion_handler_type completion_handler_type;
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Constructor.
+ /**
+ * The constructor creates the concrete completion handler and makes the link
+ * between the handler and the asynchronous result.
+ */
+ explicit async_completion(CompletionToken& token)
+ : completion_handler(static_cast<typename conditional<
+ is_same<CompletionToken, completion_handler_type>::value,
+ completion_handler_type&, CompletionToken&&>::type>(token)),
+ result(completion_handler)
+ {
+ }
+#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ explicit async_completion(typename decay<CompletionToken>::type& token)
+ : completion_handler(token),
+ result(completion_handler)
+ {
+ }
+
+ explicit async_completion(const typename decay<CompletionToken>::type& token)
+ : completion_handler(token),
+ result(completion_handler)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// A copy of, or reference to, a real handler object.
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ typename conditional<
+ is_same<CompletionToken, completion_handler_type>::value,
+ completion_handler_type&, completion_handler_type>::type completion_handler;
+#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ completion_handler_type completion_handler;
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// The result of the asynchronous operation's initiating function.
+ async_result<typename decay<CompletionToken>::type, Signature> result;
+};
+
+namespace detail {
+
+template <typename CompletionToken, typename Signature>
+struct async_result_helper
+ : async_result<typename decay<CompletionToken>::type, Signature>
+{
+};
+
+struct async_result_memfns_base
+{
+ void initiate();
+};
+
+template <typename T>
+struct async_result_memfns_derived
+ : T, async_result_memfns_base
+{
+};
+
+template <typename T, T>
+struct async_result_memfns_check
+{
+};
+
+template <typename>
+char (&async_result_initiate_memfn_helper(...))[2];
+
+template <typename T>
+char async_result_initiate_memfn_helper(
+ async_result_memfns_check<
+ void (async_result_memfns_base::*)(),
+ &async_result_memfns_derived<T>::initiate>*);
+
+template <typename CompletionToken, typename Signature>
+struct async_result_has_initiate_memfn
+ : integral_constant<bool, sizeof(async_result_initiate_memfn_helper<
+ async_result<typename decay<CompletionToken>::type, Signature>
+ >(0)) != 1>
+{
+};
+
+} // namespace detail
+
+#if defined(GENERATING_DOCUMENTATION)
+# define BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) \
+ void_or_deduced
+#elif defined(_MSC_VER) && (_MSC_VER < 1500)
+# define BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) \
+ typename ::boost::asio::detail::async_result_helper< \
+ ct, sig>::return_type
+#define BOOST_ASIO_HANDLER_TYPE(ct, sig) \
+ typename ::boost::asio::detail::async_result_helper< \
+ ct, sig>::completion_handler_type
+#else
+# define BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) \
+ typename ::boost::asio::async_result< \
+ typename ::boost::asio::decay<ct>::type, sig>::return_type
+#define BOOST_ASIO_HANDLER_TYPE(ct, sig) \
+ typename ::boost::asio::async_result< \
+ typename ::boost::asio::decay<ct>::type, sig>::completion_handler_type
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename Signature,
+ typename Initiation, typename... Args>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)
+async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken),
+ BOOST_ASIO_MOVE_ARG(Args)... args);
+
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename CompletionToken, typename Signature,
+ typename Initiation, typename... Args>
+inline typename enable_if<
+ detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value,
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type
+async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+{
+ return async_result<typename decay<CompletionToken>::type,
+ Signature>::initiate(BOOST_ASIO_MOVE_CAST(Initiation)(initiation),
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(token),
+ BOOST_ASIO_MOVE_CAST(Args)(args)...);
+}
+
+template <typename CompletionToken, typename Signature,
+ typename Initiation, typename... Args>
+inline typename enable_if<
+ !detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value,
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type
+async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+{
+ async_completion<CompletionToken, Signature> completion(token);
+
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
+ BOOST_ASIO_MOVE_CAST(BOOST_ASIO_HANDLER_TYPE(CompletionToken,
+ Signature))(completion.completion_handler),
+ BOOST_ASIO_MOVE_CAST(Args)(args)...);
+
+ return completion.result.get();
+}
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename CompletionToken, typename Signature, typename Initiation>
+inline typename enable_if<
+ detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value,
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type
+async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
+{
+ return async_result<typename decay<CompletionToken>::type,
+ Signature>::initiate(BOOST_ASIO_MOVE_CAST(Initiation)(initiation),
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
+}
+
+template <typename CompletionToken, typename Signature, typename Initiation>
+inline typename enable_if<
+ !detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value,
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type
+async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
+{
+ async_completion<CompletionToken, Signature> completion(token);
+
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
+ BOOST_ASIO_MOVE_CAST(BOOST_ASIO_HANDLER_TYPE(CompletionToken,
+ Signature))(completion.completion_handler));
+
+ return completion.result.get();
+}
+
+#define BOOST_ASIO_PRIVATE_INITIATE_DEF(n) \
+ template <typename CompletionToken, typename Signature, \
+ typename Initiation, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline typename enable_if< \
+ detail::async_result_has_initiate_memfn< \
+ CompletionToken, Signature>::value, \
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type \
+ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, \
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ return async_result<typename decay<CompletionToken>::type, \
+ Signature>::initiate(BOOST_ASIO_MOVE_CAST(Initiation)(initiation), \
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(token), \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ \
+ template <typename CompletionToken, typename Signature, \
+ typename Initiation, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline typename enable_if< \
+ !detail::async_result_has_initiate_memfn< \
+ CompletionToken, Signature>::value, \
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type \
+ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, \
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ async_completion<CompletionToken, Signature> completion(token); \
+ \
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)( \
+ BOOST_ASIO_MOVE_CAST(BOOST_ASIO_HANDLER_TYPE(CompletionToken, \
+ Signature))(completion.completion_handler), \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ \
+ return completion.result.get(); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_INITIATE_DEF)
+#undef BOOST_ASIO_PRIVATE_INITIATE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_ASYNC_RESULT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/awaitable.hpp b/src/third_party/boost-1.70.0/boost/asio/awaitable.hpp
new file mode 100644
index 00000000000..83f8647cb1f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/awaitable.hpp
@@ -0,0 +1,125 @@
+//
+// awaitable.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_AWAITABLE_HPP
+#define BOOST_ASIO_AWAITABLE_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_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#include <experimental/coroutine>
+#include <boost/asio/executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+using std::experimental::coroutine_handle;
+using std::experimental::suspend_always;
+
+template <typename> class awaitable_thread;
+template <typename, typename> class awaitable_frame;
+
+} // namespace detail
+
+/// The return type of a coroutine or asynchronous operation.
+template <typename T, typename Executor = executor>
+class awaitable
+{
+public:
+ /// The type of the awaited value.
+ typedef T value_type;
+
+ /// The executor type that will be used for the coroutine.
+ typedef Executor executor_type;
+
+ /// Default constructor.
+ constexpr awaitable() noexcept
+ : frame_(nullptr)
+ {
+ }
+
+ /// Move constructor.
+ awaitable(awaitable&& other) noexcept
+ : frame_(std::exchange(other.frame_, nullptr))
+ {
+ }
+
+ /// Destructor
+ ~awaitable()
+ {
+ if (frame_)
+ frame_->destroy();
+ }
+
+ /// Checks if the awaitable refers to a future result.
+ bool valid() const noexcept
+ {
+ return !!frame_;
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+ // Support for co_await keyword.
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ // Support for co_await keyword.
+ template <class U>
+ void await_suspend(
+ detail::coroutine_handle<detail::awaitable_frame<U, Executor>> h)
+ {
+ frame_->push_frame(&h.promise());
+ }
+
+ // Support for co_await keyword.
+ T await_resume()
+ {
+ return frame_->get();
+ }
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+private:
+ template <typename> friend class detail::awaitable_thread;
+ template <typename, typename> friend class detail::awaitable_frame;
+
+ // Not copy constructible or copy assignable.
+ awaitable(const awaitable&) = delete;
+ awaitable& operator=(const awaitable&) = delete;
+
+ // Construct the awaitable from a coroutine's frame object.
+ explicit awaitable(detail::awaitable_frame<T, Executor>* a)
+ : frame_(a)
+ {
+ }
+
+ detail::awaitable_frame<T, Executor>* frame_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/awaitable.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_AWAITABLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_datagram_socket.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_datagram_socket.hpp
new file mode 100644
index 00000000000..b058f78c4c9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_datagram_socket.hpp
@@ -0,0 +1,1117 @@
+//
+// basic_datagram_socket.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_DATAGRAM_SOCKET_HPP
+#define BOOST_ASIO_BASIC_DATAGRAM_SOCKET_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/basic_socket.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_datagram_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+
+/// Provides datagram-oriented socket functionality.
+/**
+ * The basic_datagram_socket class template provides asynchronous and blocking
+ * datagram-oriented socket functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Protocol, typename Executor>
+class basic_datagram_socket
+ : public basic_socket<Protocol, Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_datagram_socket<Protocol, Executor1> other;
+ };
+
+ /// The native representation of a socket.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// Construct a basic_datagram_socket without opening it.
+ /**
+ * This constructor creates a datagram socket without opening it. The open()
+ * function must be called before data can be sent or received on the socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ */
+ explicit basic_datagram_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_datagram_socket without opening it.
+ /**
+ * This constructor creates a datagram socket without opening it. The open()
+ * function must be called before data can be sent or received on the socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_datagram_socket(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context)
+ {
+ }
+
+ /// Construct and open a basic_datagram_socket.
+ /**
+ * This constructor creates and opens a datagram socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_datagram_socket(const executor_type& ex, const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_datagram_socket.
+ /**
+ * This constructor creates and opens a datagram socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_datagram_socket(ExecutionContext& context,
+ const protocol_type& protocol,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol)
+ {
+ }
+
+ /// Construct a basic_datagram_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a datagram socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the datagram
+ * socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_datagram_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_datagram_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a datagram socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the datagram
+ * socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_datagram_socket(ExecutionContext& context,
+ const endpoint_type& endpoint,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
+ {
+ }
+
+ /// Construct a basic_datagram_socket on an existing native socket.
+ /**
+ * This constructor creates a datagram socket object to hold an existing
+ * native socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_datagram_socket(const executor_type& ex,
+ const protocol_type& protocol, const native_handle_type& native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_datagram_socket on an existing native socket.
+ /**
+ * This constructor creates a datagram socket object to hold an existing
+ * native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_datagram_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_datagram_socket from another.
+ /**
+ * This constructor moves a datagram socket from one object to another.
+ *
+ * @param other The other basic_datagram_socket 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_datagram_socket(const executor_type&)
+ * constructor.
+ */
+ basic_datagram_socket(basic_datagram_socket&& other)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_datagram_socket from another.
+ /**
+ * This assignment operator moves a datagram socket from one object to
+ * another.
+ *
+ * @param other The other basic_datagram_socket 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_datagram_socket(const executor_type&)
+ * constructor.
+ */
+ basic_datagram_socket& operator=(basic_datagram_socket&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_datagram_socket from a socket of another protocol
+ /// type.
+ /**
+ * This constructor moves a datagram socket from one object to another.
+ *
+ * @param other The other basic_datagram_socket 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_datagram_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ basic_datagram_socket(basic_datagram_socket<Protocol1, Executor1>&& other,
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_datagram_socket from a socket of another protocol
+ /// type.
+ /**
+ * This assignment operator moves a datagram socket from one object to
+ * another.
+ *
+ * @param other The other basic_datagram_socket 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_datagram_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_datagram_socket&
+ >::type operator=(basic_datagram_socket<Protocol1, Executor1>&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the socket.
+ /**
+ * This function destroys the socket, cancelling any outstanding asynchronous
+ * operations associated with the socket as if by calling @c cancel.
+ */
+ ~basic_datagram_socket()
+ {
+ }
+
+ /// Send some data on a connected socket.
+ /**
+ * This function is used to send data on the datagram socket. The function
+ * call will block until the data has been sent successfully or an error
+ * occurs.
+ *
+ * @param buffers One ore more data buffers to be sent on the socket.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The send operation can only be used with a connected socket. Use
+ * the send_to function to send data on an unconnected datagram socket.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code socket.send(boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on a connected socket.
+ /**
+ * This function is used to send data on the datagram socket. The function
+ * call will block until the data has been sent successfully or an error
+ * occurs.
+ *
+ * @param buffers One ore more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The send operation can only be used with a connected socket. Use
+ * the send_to function to send data on an unconnected datagram socket.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on a connected socket.
+ /**
+ * This function is used to send data on the datagram socket. The function
+ * call will block until the data has been sent successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @note The send operation can only be used with a connected socket. Use
+ * the send_to function to send data on an unconnected datagram socket.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous send on a connected socket.
+ /**
+ * This function is used to asynchronously send data on the datagram socket.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_send operation can only be used with a connected socket.
+ * Use the async_send_to function to send data on an unconnected datagram
+ * socket.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_send(boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous send on a connected socket.
+ /**
+ * This function is used to asynchronously send data on the datagram socket.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_send operation can only be used with a connected socket.
+ * Use the async_send_to function to send data on an unconnected datagram
+ * socket.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this, buffers, flags);
+ }
+
+ /// Send a datagram to the specified endpoint.
+ /**
+ * This function is used to send a datagram to the specified remote endpoint.
+ * The function call will block until the data has been sent successfully or
+ * an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::ip::udp::endpoint destination(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * socket.send_to(boost::asio::buffer(data, size), destination);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, 0, ec);
+ boost::asio::detail::throw_error(ec, "send_to");
+ return s;
+ }
+
+ /// Send a datagram to the specified endpoint.
+ /**
+ * This function is used to send a datagram to the specified remote endpoint.
+ * The function call will block until the data has been sent successfully or
+ * an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, flags, ec);
+ boost::asio::detail::throw_error(ec, "send_to");
+ return s;
+ }
+
+ /// Send a datagram to the specified endpoint.
+ /**
+ * This function is used to send a datagram to the specified remote endpoint.
+ * The function call will block until the data has been sent successfully or
+ * an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes sent.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().send_to(this->impl_.get_implementation(),
+ buffers, destination, flags, ec);
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send a datagram to the specified
+ * remote endpoint. The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ * 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 destination The remote endpoint to which the data will be sent.
+ * Copies will be made of the endpoint as required.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::ip::udp::endpoint destination(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * socket.async_send_to(
+ * boost::asio::buffer(data, size), destination, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send_to(), handler, this, buffers,
+ destination, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send a datagram to the specified
+ * remote endpoint. The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ * 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 flags Flags specifying how the send call is to be made.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ * Copies will be made of the endpoint as required.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send_to(), handler, this, buffers, destination, flags);
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the datagram socket. The function
+ * call will block until data has been received successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The receive operation can only be used with a connected socket. Use
+ * the receive_from function to receive data on an unconnected datagram
+ * socket.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code socket.receive(boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the datagram socket. The function
+ * call will block until data has been received successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The receive operation can only be used with a connected socket. Use
+ * the receive_from function to receive data on an unconnected datagram
+ * socket.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the datagram socket. The function
+ * call will block until data has been received successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes received.
+ *
+ * @note The receive operation can only be used with a connected socket. Use
+ * the receive_from function to receive data on an unconnected datagram
+ * socket.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous receive on a connected socket.
+ /**
+ * This function is used to asynchronously receive data from the datagram
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_receive operation can only be used with a connected socket.
+ * Use the async_receive_from function to receive data on an unconnected
+ * datagram socket.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.async_receive(boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous receive on a connected socket.
+ /**
+ * This function is used to asynchronously receive data from the datagram
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 flags Flags specifying how the receive call is to be made.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_receive operation can only be used with a connected socket.
+ * Use the async_receive_from function to receive data on an unconnected
+ * datagram socket.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this, buffers, flags);
+ }
+
+ /// Receive a datagram with the endpoint of the sender.
+ /**
+ * This function is used to receive a datagram. The function call will block
+ * until data has been received successfully or an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the datagram.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * boost::asio::ip::udp::endpoint sender_endpoint;
+ * socket.receive_from(
+ * boost::asio::buffer(data, size), sender_endpoint);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive_from");
+ return s;
+ }
+
+ /// Receive a datagram with the endpoint of the sender.
+ /**
+ * This function is used to receive a datagram. The function call will block
+ * until data has been received successfully or an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the datagram.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive_from");
+ return s;
+ }
+
+ /// Receive a datagram with the endpoint of the sender.
+ /**
+ * This function is used to receive a datagram. The function call will block
+ * until data has been received successfully or an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the datagram.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes received.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive a datagram. The function
+ * call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the datagram. Ownership of the sender_endpoint object
+ * is retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code socket.async_receive_from(
+ * boost::asio::buffer(data, size), sender_endpoint, handler); @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive_from(), handler, this, buffers,
+ &sender_endpoint, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive a datagram. The function
+ * call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the datagram. Ownership of the sender_endpoint object
+ * is retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive_from(), handler,
+ this, buffers, &sender_endpoint, flags);
+ }
+
+private:
+ struct initiate_async_send
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_datagram_socket* self, const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_send(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_send_to
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_datagram_socket* self, const ConstBufferSequence& buffers,
+ const endpoint_type& destination,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_send_to(
+ self->impl_.get_implementation(), buffers, destination, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_receive
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_datagram_socket* self, const MutableBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_receive(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_receive_from
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_datagram_socket* self, const MutableBufferSequence& buffers,
+ endpoint_type* sender_endpoint, socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_receive_from(
+ self->impl_.get_implementation(), buffers, *sender_endpoint, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_DATAGRAM_SOCKET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_deadline_timer.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_deadline_timer.hpp
new file mode 100644
index 00000000000..75f0fcd8bc7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_deadline_timer.hpp
@@ -0,0 +1,668 @@
+//
+// basic_deadline_timer.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_DEADLINE_TIMER_HPP
+#define BOOST_ASIO_BASIC_DEADLINE_TIMER_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_BOOST_DATE_TIME) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include <boost/asio/detail/deadline_timer_service.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/time_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Provides waitable timer functionality.
+/**
+ * The basic_deadline_timer class template provides the ability to perform a
+ * blocking or asynchronous wait for a timer to expire.
+ *
+ * A deadline timer is always in one of two states: "expired" or "not expired".
+ * If the wait() or async_wait() function is called on an expired timer, the
+ * wait operation will complete immediately.
+ *
+ * Most applications will use the boost::asio::deadline_timer typedef.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Examples
+ * Performing a blocking wait:
+ * @code
+ * // Construct a timer without setting an expiry time.
+ * boost::asio::deadline_timer timer(my_context);
+ *
+ * // Set an expiry time relative to now.
+ * timer.expires_from_now(boost::posix_time::seconds(5));
+ *
+ * // Wait for the timer to expire.
+ * timer.wait();
+ * @endcode
+ *
+ * @par
+ * Performing an asynchronous wait:
+ * @code
+ * void handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Timer expired.
+ * }
+ * }
+ *
+ * ...
+ *
+ * // Construct a timer with an absolute expiry time.
+ * boost::asio::deadline_timer timer(my_context,
+ * boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
+ *
+ * // Start an asynchronous wait.
+ * timer.async_wait(handler);
+ * @endcode
+ *
+ * @par Changing an active deadline_timer's expiry time
+ *
+ * Changing the expiry time of a timer while there are pending asynchronous
+ * waits causes those wait operations to be cancelled. To ensure that the action
+ * associated with the timer is performed only once, use something like this:
+ * used:
+ *
+ * @code
+ * void on_some_event()
+ * {
+ * if (my_timer.expires_from_now(seconds(5)) > 0)
+ * {
+ * // We managed to cancel the timer. Start new asynchronous wait.
+ * my_timer.async_wait(on_timeout);
+ * }
+ * else
+ * {
+ * // Too late, timer has already expired!
+ * }
+ * }
+ *
+ * void on_timeout(const boost::system::error_code& e)
+ * {
+ * if (e != boost::asio::error::operation_aborted)
+ * {
+ * // Timer was not cancelled, take necessary action.
+ * }
+ * }
+ * @endcode
+ *
+ * @li The boost::asio::basic_deadline_timer::expires_from_now() function
+ * cancels any pending asynchronous waits, and returns the number of
+ * asynchronous waits that were cancelled. If it returns 0 then you were too
+ * late and the wait handler has already been executed, or will soon be
+ * executed. If it returns 1 then the wait handler was successfully cancelled.
+ *
+ * @li If a wait handler is cancelled, the boost::system::error_code passed to
+ * it contains the value boost::asio::error::operation_aborted.
+ */
+template <typename Time,
+ typename TimeTraits = boost::asio::time_traits<Time>,
+ typename Executor = executor>
+class basic_deadline_timer
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The time traits type.
+ typedef TimeTraits traits_type;
+
+ /// The time type.
+ typedef typename traits_type::time_type time_type;
+
+ /// The duration type.
+ typedef typename traits_type::duration_type duration_type;
+
+ /// Constructor.
+ /**
+ * This constructor creates a timer without setting an expiry time. The
+ * expires_at() or expires_from_now() functions must be called to set an
+ * expiry time before the timer can be waited on.
+ *
+ * @param ex The I/O executor that the timer will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the timer.
+ */
+ explicit basic_deadline_timer(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Constructor.
+ /**
+ * This constructor creates a timer without setting an expiry time. The
+ * expires_at() or expires_from_now() functions must be called to set an
+ * expiry time before the timer can be waited on.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the timer will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the timer.
+ */
+ template <typename ExecutionContext>
+ explicit basic_deadline_timer(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Constructor to set a particular expiry time as an absolute time.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param ex The I/O executor that the timer will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, expressed
+ * as an absolute time.
+ */
+ basic_deadline_timer(const executor_type& ex, const time_type& expiry_time)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+ }
+
+ /// Constructor to set a particular expiry time as an absolute time.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the timer will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, expressed
+ * as an absolute time.
+ */
+ template <typename ExecutionContext>
+ basic_deadline_timer(ExecutionContext& context, const time_type& expiry_time,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+ }
+
+ /// Constructor to set a particular expiry time relative to now.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param ex The I/O executor that the timer will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, relative to
+ * now.
+ */
+ basic_deadline_timer(const executor_type& ex,
+ const duration_type& expiry_time)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
+ }
+
+ /// Constructor to set a particular expiry time relative to now.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the timer will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, relative to
+ * now.
+ */
+ template <typename ExecutionContext>
+ basic_deadline_timer(ExecutionContext& context,
+ const duration_type& expiry_time,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_deadline_timer from another.
+ /**
+ * This constructor moves a timer from one object to another.
+ *
+ * @param other The other basic_deadline_timer 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_deadline_timer(const executor_type&)
+ * constructor.
+ */
+ basic_deadline_timer(basic_deadline_timer&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_deadline_timer from another.
+ /**
+ * This assignment operator moves a timer from one object to another. Cancels
+ * any outstanding asynchronous operations associated with the target object.
+ *
+ * @param other The other basic_deadline_timer 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_deadline_timer(const executor_type&)
+ * constructor.
+ */
+ basic_deadline_timer& operator=(basic_deadline_timer&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the timer.
+ /**
+ * This function destroys the timer, cancelling any outstanding asynchronous
+ * wait operations associated with the timer as if by calling @c cancel.
+ */
+ ~basic_deadline_timer()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Cancel any asynchronous operations that are waiting on the timer.
+ /**
+ * This function forces the completion of any pending asynchronous wait
+ * operations against the timer. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when cancel() is called, then the
+ * handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel()
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ return s;
+ }
+
+ /// Cancel any asynchronous operations that are waiting on the timer.
+ /**
+ * This function forces the completion of any pending asynchronous wait
+ * operations against the timer. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @note If the timer has already expired when cancel() is called, then the
+ * handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel(boost::system::error_code& ec)
+ {
+ return impl_.get_service().cancel(impl_.get_implementation(), ec);
+ }
+
+ /// Cancels one asynchronous operation that is waiting on the timer.
+ /**
+ * This function forces the completion of one pending asynchronous wait
+ * operation against the timer. Handlers are cancelled in FIFO order. The
+ * handler for the cancelled operation will be invoked with the
+ * boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @return The number of asynchronous operations that were cancelled. That is,
+ * either 0 or 1.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when cancel_one() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel_one()
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().cancel_one(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel_one");
+ return s;
+ }
+
+ /// Cancels one asynchronous operation that is waiting on the timer.
+ /**
+ * This function forces the completion of one pending asynchronous wait
+ * operation against the timer. Handlers are cancelled in FIFO order. The
+ * handler for the cancelled operation will be invoked with the
+ * boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled. That is,
+ * either 0 or 1.
+ *
+ * @note If the timer has already expired when cancel_one() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel_one(boost::system::error_code& ec)
+ {
+ return impl_.get_service().cancel_one(impl_.get_implementation(), ec);
+ }
+
+ /// Get the timer's expiry time as an absolute time.
+ /**
+ * This function may be used to obtain the timer's current expiry time.
+ * Whether the timer has expired or not does not affect this value.
+ */
+ time_type expires_at() const
+ {
+ return impl_.get_service().expires_at(impl_.get_implementation());
+ }
+
+ /// Set the timer's expiry time as an absolute time.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when expires_at() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_at(const time_type& expiry_time)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+ return s;
+ }
+
+ /// Set the timer's expiry time as an absolute time.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @note If the timer has already expired when expires_at() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_at(const time_type& expiry_time,
+ boost::system::error_code& ec)
+ {
+ return impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
+ }
+
+ /// Get the timer's expiry time relative to now.
+ /**
+ * This function may be used to obtain the timer's current expiry time.
+ * Whether the timer has expired or not does not affect this value.
+ */
+ duration_type expires_from_now() const
+ {
+ return impl_.get_service().expires_from_now(impl_.get_implementation());
+ }
+
+ /// Set the timer's expiry time relative to now.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when expires_from_now() is called,
+ * then the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_from_now(const duration_type& expiry_time)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
+ return s;
+ }
+
+ /// Set the timer's expiry time relative to now.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @note If the timer has already expired when expires_from_now() is called,
+ * then the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_from_now(const duration_type& expiry_time,
+ boost::system::error_code& ec)
+ {
+ return impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ }
+
+ /// Perform a blocking wait on the timer.
+ /**
+ * This function is used to wait for the timer to expire. This function
+ * blocks and does not return until the timer has expired.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void wait()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().wait(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Perform a blocking wait on the timer.
+ /**
+ * This function is used to wait for the timer to expire. This function
+ * blocks and does not return until the timer has expired.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ void wait(boost::system::error_code& ec)
+ {
+ impl_.get_service().wait(impl_.get_implementation(), ec);
+ }
+
+ /// Start an asynchronous wait on the timer.
+ /**
+ * This function may be used to initiate an asynchronous wait against the
+ * timer. It always returns immediately.
+ *
+ * For each call to async_wait(), the supplied handler will be called exactly
+ * once. The handler will be called when:
+ *
+ * @li The timer has expired.
+ *
+ * @li The timer was cancelled, in which case the handler is passed the error
+ * code boost::asio::error::operation_aborted.
+ *
+ * @param handler The handler to be called when the timer expires. 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename WaitHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
+ void (boost::system::error_code))
+ async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ return async_initiate<WaitHandler, void (boost::system::error_code)>(
+ initiate_async_wait(), handler, this);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_deadline_timer(const basic_deadline_timer&) BOOST_ASIO_DELETED;
+ basic_deadline_timer& operator=(
+ const basic_deadline_timer&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_wait
+ {
+ template <typename WaitHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler,
+ basic_deadline_timer* self) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WaitHandler.
+ BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
+
+ detail::non_const_lvalue<WaitHandler> handler2(handler);
+ self->impl_.get_service().async_wait(
+ self->impl_.get_implementation(), handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+ detail::io_object_impl<
+ detail::deadline_timer_service<TimeTraits>, Executor> impl_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_BASIC_DEADLINE_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_io_object.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_io_object.hpp
new file mode 100644
index 00000000000..a9f44d1f042
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_io_object.hpp
@@ -0,0 +1,292 @@
+//
+// basic_io_object.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_IO_OBJECT_HPP
+#define BOOST_ASIO_BASIC_IO_OBJECT_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/io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+namespace detail
+{
+ // Type trait used to determine whether a service supports move.
+ template <typename IoObjectService>
+ class service_has_move
+ {
+ private:
+ typedef IoObjectService service_type;
+ typedef typename service_type::implementation_type implementation_type;
+
+ template <typename T, typename U>
+ static auto asio_service_has_move_eval(T* t, U* u)
+ -> decltype(t->move_construct(*u, *u), char());
+ static char (&asio_service_has_move_eval(...))[2];
+
+ public:
+ static const bool value =
+ sizeof(asio_service_has_move_eval(
+ static_cast<service_type*>(0),
+ static_cast<implementation_type*>(0))) == 1;
+ };
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+/// Base class for all I/O objects.
+/**
+ * @note All I/O objects are non-copyable. However, when using C++0x, certain
+ * I/O objects do support move construction and move assignment.
+ */
+#if !defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+template <typename IoObjectService>
+#else
+template <typename IoObjectService,
+ bool Movable = detail::service_has_move<IoObjectService>::value>
+#endif
+class basic_io_object
+{
+public:
+ /// The type of the service that will be used to provide I/O operations.
+ typedef IoObjectService service_type;
+
+ /// The underlying implementation type of I/O object.
+ typedef typename service_type::implementation_type implementation_type;
+
+#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 service_.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 service_.get_io_context();
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// The type of the executor associated with the object.
+ typedef boost::asio::io_context::executor_type executor_type;
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return service_.get_io_context().get_executor();
+ }
+
+protected:
+ /// Construct a basic_io_object.
+ /**
+ * Performs:
+ * @code get_service().construct(get_implementation()); @endcode
+ */
+ explicit basic_io_object(boost::asio::io_context& io_context)
+ : service_(boost::asio::use_service<IoObjectService>(io_context))
+ {
+ service_.construct(implementation_);
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_io_object.
+ /**
+ * Performs:
+ * @code get_service().move_construct(
+ * get_implementation(), other.get_implementation()); @endcode
+ *
+ * @note Available only for services that support movability,
+ */
+ basic_io_object(basic_io_object&& other);
+
+ /// Move-assign a basic_io_object.
+ /**
+ * Performs:
+ * @code get_service().move_assign(get_implementation(),
+ * other.get_service(), other.get_implementation()); @endcode
+ *
+ * @note Available only for services that support movability,
+ */
+ basic_io_object& operator=(basic_io_object&& other);
+
+ /// Perform a converting move-construction of a basic_io_object.
+ template <typename IoObjectService1>
+ basic_io_object(IoObjectService1& other_service,
+ typename IoObjectService1::implementation_type& other_implementation);
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * Performs:
+ * @code get_service().destroy(get_implementation()); @endcode
+ */
+ ~basic_io_object()
+ {
+ service_.destroy(implementation_);
+ }
+
+ /// Get the service associated with the I/O object.
+ service_type& get_service()
+ {
+ return service_;
+ }
+
+ /// Get the service associated with the I/O object.
+ const service_type& get_service() const
+ {
+ return service_;
+ }
+
+ /// Get the underlying implementation of the I/O object.
+ implementation_type& get_implementation()
+ {
+ return implementation_;
+ }
+
+ /// Get the underlying implementation of the I/O object.
+ const implementation_type& get_implementation() const
+ {
+ return implementation_;
+ }
+
+private:
+ basic_io_object(const basic_io_object&);
+ basic_io_object& operator=(const basic_io_object&);
+
+ // The service associated with the I/O object.
+ service_type& service_;
+
+ /// The underlying implementation of the I/O object.
+ implementation_type implementation_;
+};
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+// Specialisation for movable objects.
+template <typename IoObjectService>
+class basic_io_object<IoObjectService, true>
+{
+public:
+ typedef IoObjectService service_type;
+ typedef typename service_type::implementation_type implementation_type;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ boost::asio::io_context& get_io_context()
+ {
+ return service_->get_io_context();
+ }
+
+ boost::asio::io_context& get_io_service()
+ {
+ return service_->get_io_context();
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ typedef boost::asio::io_context::executor_type executor_type;
+
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return service_->get_io_context().get_executor();
+ }
+
+protected:
+ explicit basic_io_object(boost::asio::io_context& io_context)
+ : service_(&boost::asio::use_service<IoObjectService>(io_context))
+ {
+ service_->construct(implementation_);
+ }
+
+ basic_io_object(basic_io_object&& other)
+ : service_(&other.get_service())
+ {
+ service_->move_construct(implementation_, other.implementation_);
+ }
+
+ template <typename IoObjectService1>
+ basic_io_object(IoObjectService1& other_service,
+ typename IoObjectService1::implementation_type& other_implementation)
+ : service_(&boost::asio::use_service<IoObjectService>(
+ other_service.get_io_context()))
+ {
+ service_->converting_move_construct(implementation_,
+ other_service, other_implementation);
+ }
+
+ ~basic_io_object()
+ {
+ service_->destroy(implementation_);
+ }
+
+ basic_io_object& operator=(basic_io_object&& other)
+ {
+ service_->move_assign(implementation_,
+ *other.service_, other.implementation_);
+ service_ = other.service_;
+ return *this;
+ }
+
+ service_type& get_service()
+ {
+ return *service_;
+ }
+
+ const service_type& get_service() const
+ {
+ return *service_;
+ }
+
+ implementation_type& get_implementation()
+ {
+ return implementation_;
+ }
+
+ const implementation_type& get_implementation() const
+ {
+ return implementation_;
+ }
+
+private:
+ basic_io_object(const basic_io_object&);
+ void operator=(const basic_io_object&);
+
+ IoObjectService* service_;
+ implementation_type implementation_;
+};
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_IO_OBJECT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_raw_socket.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_raw_socket.hpp
new file mode 100644
index 00000000000..cc45d372b53
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_raw_socket.hpp
@@ -0,0 +1,1109 @@
+//
+// basic_raw_socket.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_RAW_SOCKET_HPP
+#define BOOST_ASIO_BASIC_RAW_SOCKET_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/basic_socket.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_RAW_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_RAW_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_raw_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_RAW_SOCKET_FWD_DECL)
+
+/// Provides raw-oriented socket functionality.
+/**
+ * The basic_raw_socket class template provides asynchronous and blocking
+ * raw-oriented socket functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Protocol, typename Executor>
+class basic_raw_socket
+ : public basic_socket<Protocol, Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_raw_socket<Protocol, Executor1> other;
+ };
+
+ /// The native representation of a socket.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// Construct a basic_raw_socket without opening it.
+ /**
+ * This constructor creates a raw socket without opening it. The open()
+ * function must be called before data can be sent or received on the socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ */
+ explicit basic_raw_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_raw_socket without opening it.
+ /**
+ * This constructor creates a raw socket without opening it. The open()
+ * function must be called before data can be sent or received on the socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_raw_socket(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context)
+ {
+ }
+
+ /// Construct and open a basic_raw_socket.
+ /**
+ * This constructor creates and opens a raw socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_raw_socket(const executor_type& ex, const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_raw_socket.
+ /**
+ * This constructor creates and opens a raw socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_raw_socket(ExecutionContext& context, const protocol_type& protocol,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol)
+ {
+ }
+
+ /// Construct a basic_raw_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a raw socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the raw
+ * socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_raw_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_raw_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a raw socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the raw
+ * socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_raw_socket(ExecutionContext& context, const endpoint_type& endpoint,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
+ {
+ }
+
+ /// Construct a basic_raw_socket on an existing native socket.
+ /**
+ * This constructor creates a raw socket object to hold an existing
+ * native socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_raw_socket(const executor_type& ex,
+ const protocol_type& protocol, const native_handle_type& native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_raw_socket on an existing native socket.
+ /**
+ * This constructor creates a raw socket object to hold an existing
+ * native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_raw_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_raw_socket from another.
+ /**
+ * This constructor moves a raw socket from one object to another.
+ *
+ * @param other The other basic_raw_socket 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_raw_socket(const executor_type&)
+ * constructor.
+ */
+ basic_raw_socket(basic_raw_socket&& other)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_raw_socket from another.
+ /**
+ * This assignment operator moves a raw socket from one object to another.
+ *
+ * @param other The other basic_raw_socket 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_raw_socket(const executor_type&)
+ * constructor.
+ */
+ basic_raw_socket& operator=(basic_raw_socket&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_raw_socket from a socket of another protocol
+ /// type.
+ /**
+ * This constructor moves a raw socket from one object to another.
+ *
+ * @param other The other basic_raw_socket 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_raw_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ basic_raw_socket(basic_raw_socket<Protocol1, Executor1>&& other,
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_raw_socket from a socket of another protocol type.
+ /**
+ * This assignment operator moves a raw socket from one object to another.
+ *
+ * @param other The other basic_raw_socket 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_raw_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_raw_socket&
+ >::type operator=(basic_raw_socket<Protocol1, Executor1>&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the socket.
+ /**
+ * This function destroys the socket, cancelling any outstanding asynchronous
+ * operations associated with the socket as if by calling @c cancel.
+ */
+ ~basic_raw_socket()
+ {
+ }
+
+ /// Send some data on a connected socket.
+ /**
+ * This function is used to send data on the raw socket. The function call
+ * will block until the data has been sent successfully or an error occurs.
+ *
+ * @param buffers One ore more data buffers to be sent on the socket.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The send operation can only be used with a connected socket. Use
+ * the send_to function to send data on an unconnected raw socket.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code socket.send(boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on a connected socket.
+ /**
+ * This function is used to send data on the raw socket. The function call
+ * will block until the data has been sent successfully or an error occurs.
+ *
+ * @param buffers One ore more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The send operation can only be used with a connected socket. Use
+ * the send_to function to send data on an unconnected raw socket.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on a connected socket.
+ /**
+ * This function is used to send data on the raw socket. The function call
+ * will block until the data has been sent successfully or an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @note The send operation can only be used with a connected socket. Use
+ * the send_to function to send data on an unconnected raw socket.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous send on a connected socket.
+ /**
+ * This function is used to send data on the raw socket. The function call
+ * will block until the data has been sent successfully or an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_send operation can only be used with a connected socket.
+ * Use the async_send_to function to send data on an unconnected raw
+ * socket.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_send(boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous send on a connected socket.
+ /**
+ * This function is used to send data on the raw socket. The function call
+ * will block until the data has been sent successfully or an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_send operation can only be used with a connected socket.
+ * Use the async_send_to function to send data on an unconnected raw
+ * socket.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this, buffers, flags);
+ }
+
+ /// Send raw data to the specified endpoint.
+ /**
+ * This function is used to send raw data to the specified remote endpoint.
+ * The function call will block until the data has been sent successfully or
+ * an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::ip::udp::endpoint destination(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * socket.send_to(boost::asio::buffer(data, size), destination);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, 0, ec);
+ boost::asio::detail::throw_error(ec, "send_to");
+ return s;
+ }
+
+ /// Send raw data to the specified endpoint.
+ /**
+ * This function is used to send raw data to the specified remote endpoint.
+ * The function call will block until the data has been sent successfully or
+ * an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, flags, ec);
+ boost::asio::detail::throw_error(ec, "send_to");
+ return s;
+ }
+
+ /// Send raw data to the specified endpoint.
+ /**
+ * This function is used to send raw data to the specified remote endpoint.
+ * The function call will block until the data has been sent successfully or
+ * an error occurs.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes sent.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().send_to(this->impl_.get_implementation(),
+ buffers, destination, flags, ec);
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send raw data to the specified
+ * remote endpoint. The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ * 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 destination The remote endpoint to which the data will be sent.
+ * Copies will be made of the endpoint as required.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::ip::udp::endpoint destination(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * socket.async_send_to(
+ * boost::asio::buffer(data, size), destination, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send_to(), handler, this, buffers,
+ destination, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send raw data to the specified
+ * remote endpoint. The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent to the remote endpoint.
+ * 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 flags Flags specifying how the send call is to be made.
+ *
+ * @param destination The remote endpoint to which the data will be sent.
+ * Copies will be made of the endpoint as required.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send_to(const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send_to(), handler, this, buffers, destination, flags);
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the raw socket. The function
+ * call will block until data has been received successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The receive operation can only be used with a connected socket. Use
+ * the receive_from function to receive data on an unconnected raw
+ * socket.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code socket.receive(boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the raw socket. The function
+ * call will block until data has been received successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The receive operation can only be used with a connected socket. Use
+ * the receive_from function to receive data on an unconnected raw
+ * socket.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the raw socket. The function
+ * call will block until data has been received successfully or an error
+ * occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes received.
+ *
+ * @note The receive operation can only be used with a connected socket. Use
+ * the receive_from function to receive data on an unconnected raw
+ * socket.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous receive on a connected socket.
+ /**
+ * This function is used to asynchronously receive data from the raw
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_receive operation can only be used with a connected socket.
+ * Use the async_receive_from function to receive data on an unconnected
+ * raw socket.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.async_receive(boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous receive on a connected socket.
+ /**
+ * This function is used to asynchronously receive data from the raw
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 flags Flags specifying how the receive call is to be made.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The async_receive operation can only be used with a connected socket.
+ * Use the async_receive_from function to receive data on an unconnected
+ * raw socket.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this, buffers, flags);
+ }
+
+ /// Receive raw data with the endpoint of the sender.
+ /**
+ * This function is used to receive raw data. The function call will block
+ * until data has been received successfully or an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the data.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * boost::asio::ip::udp::endpoint sender_endpoint;
+ * socket.receive_from(
+ * boost::asio::buffer(data, size), sender_endpoint);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive_from");
+ return s;
+ }
+
+ /// Receive raw data with the endpoint of the sender.
+ /**
+ * This function is used to receive raw data. The function call will block
+ * until data has been received successfully or an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the data.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive_from");
+ return s;
+ }
+
+ /// Receive raw data with the endpoint of the sender.
+ /**
+ * This function is used to receive raw data. The function call will block
+ * until data has been received successfully or an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the data.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes received.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive raw data. The function
+ * call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the data. Ownership of the sender_endpoint object
+ * is retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code socket.async_receive_from(
+ * boost::asio::buffer(data, size), 0, sender_endpoint, handler); @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive_from(), handler, this, buffers,
+ &sender_endpoint, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive raw data. The function
+ * call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 sender_endpoint An endpoint object that receives the endpoint of
+ * the remote sender of the data. Ownership of the sender_endpoint object
+ * is retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive_from(const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive_from(), handler,
+ this, buffers, &sender_endpoint, flags);
+ }
+
+private:
+ struct initiate_async_send
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_raw_socket* self, const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_send(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_send_to
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_raw_socket* self, const ConstBufferSequence& buffers,
+ const endpoint_type& destination,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_send_to(
+ self->impl_.get_implementation(), buffers, destination, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_receive
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_raw_socket* self, const MutableBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_receive(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_receive_from
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_raw_socket* self, const MutableBufferSequence& buffers,
+ endpoint_type* sender_endpoint, socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_receive_from(
+ self->impl_.get_implementation(), buffers, *sender_endpoint, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_RAW_SOCKET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_seq_packet_socket.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_seq_packet_socket.hpp
new file mode 100644
index 00000000000..7c3903ea599
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_seq_packet_socket.hpp
@@ -0,0 +1,714 @@
+//
+// basic_seq_packet_socket.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_SEQ_PACKET_SOCKET_HPP
+#define BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_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/basic_socket.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_seq_packet_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_FWD_DECL)
+
+/// Provides sequenced packet socket functionality.
+/**
+ * The basic_seq_packet_socket class template provides asynchronous and blocking
+ * sequenced packet socket functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Protocol, typename Executor>
+class basic_seq_packet_socket
+ : public basic_socket<Protocol, Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_seq_packet_socket<Protocol, Executor1> other;
+ };
+
+ /// The native representation of a socket.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// Construct a basic_seq_packet_socket without opening it.
+ /**
+ * This constructor creates a sequenced packet socket without opening it. The
+ * socket needs to be opened and then connected or accepted before data can
+ * be sent or received on it.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ */
+ explicit basic_seq_packet_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket without opening it.
+ /**
+ * This constructor creates a sequenced packet socket without opening it. The
+ * socket needs to be opened and then connected or accepted before data can
+ * be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_seq_packet_socket(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context)
+ {
+ }
+
+ /// Construct and open a basic_seq_packet_socket.
+ /**
+ * This constructor creates and opens a sequenced_packet socket. The socket
+ * needs to be connected or accepted before data can be sent or received on
+ * it.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_seq_packet_socket(const executor_type& ex,
+ const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_seq_packet_socket.
+ /**
+ * This constructor creates and opens a sequenced_packet socket. The socket
+ * needs to be connected or accepted before data can be sent or received on
+ * it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_seq_packet_socket(ExecutionContext& context,
+ const protocol_type& protocol,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket, opening it and binding it to the
+ /// given local endpoint.
+ /**
+ * This constructor creates a sequenced packet socket and automatically opens
+ * it bound to the specified endpoint on the local machine. The protocol used
+ * is the protocol associated with the given endpoint.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the sequenced
+ * packet socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_seq_packet_socket(const executor_type& ex,
+ const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket, opening it and binding it to the
+ /// given local endpoint.
+ /**
+ * This constructor creates a sequenced packet socket and automatically opens
+ * it bound to the specified endpoint on the local machine. The protocol used
+ * is the protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the sequenced
+ * packet socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_seq_packet_socket(ExecutionContext& context,
+ const endpoint_type& endpoint,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket on an existing native socket.
+ /**
+ * This constructor creates a sequenced packet socket object to hold an
+ * existing native socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_seq_packet_socket(const executor_type& ex,
+ const protocol_type& protocol, const native_handle_type& native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket on an existing native socket.
+ /**
+ * This constructor creates a sequenced packet socket object to hold an
+ * existing native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_seq_packet_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_seq_packet_socket from another.
+ /**
+ * This constructor moves a sequenced packet socket from one object to
+ * another.
+ *
+ * @param other The other basic_seq_packet_socket 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_seq_packet_socket(const executor_type&)
+ * constructor.
+ */
+ basic_seq_packet_socket(basic_seq_packet_socket&& other)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_seq_packet_socket from another.
+ /**
+ * This assignment operator moves a sequenced packet socket from one object to
+ * another.
+ *
+ * @param other The other basic_seq_packet_socket 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_seq_packet_socket(const executor_type&)
+ * constructor.
+ */
+ basic_seq_packet_socket& operator=(basic_seq_packet_socket&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_seq_packet_socket from a socket of another protocol
+ /// type.
+ /**
+ * This constructor moves a sequenced packet socket from one object to
+ * another.
+ *
+ * @param other The other basic_seq_packet_socket 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_seq_packet_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ basic_seq_packet_socket(basic_seq_packet_socket<Protocol1, Executor1>&& other,
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_seq_packet_socket from a socket of another protocol
+ /// type.
+ /**
+ * This assignment operator moves a sequenced packet socket from one object to
+ * another.
+ *
+ * @param other The other basic_seq_packet_socket 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_seq_packet_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_seq_packet_socket&
+ >::type operator=(basic_seq_packet_socket<Protocol1, Executor1>&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the socket.
+ /**
+ * This function destroys the socket, cancelling any outstanding asynchronous
+ * operations associated with the socket as if by calling @c cancel.
+ */
+ ~basic_seq_packet_socket()
+ {
+ }
+
+ /// Send some data on the socket.
+ /**
+ * This function is used to send data on the sequenced packet socket. The
+ * function call will block until the data has been sent successfully, or an
+ * until error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.send(boost::asio::buffer(data, size), 0);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on the socket.
+ /**
+ * This function is used to send data on the sequenced packet socket. The
+ * function call will block the data has been sent successfully, or an until
+ * error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes sent. Returns 0 if an error occurred.
+ *
+ * @note The send 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 send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send data on the sequenced packet
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_send(boost::asio::buffer(data, size), 0, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this, buffers, flags);
+ }
+
+ /// Receive some data on the socket.
+ /**
+ * This function is used to receive data on the sequenced packet socket. The
+ * function call will block until data has been received successfully, or
+ * until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param out_flags After the receive call completes, contains flags
+ * associated with the received data. For example, if the
+ * socket_base::message_end_of_record bit is set then the received data marks
+ * the end of a record.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.receive(boost::asio::buffer(data, size), out_flags);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags& out_flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive_with_flags(
+ this->impl_.get_implementation(), buffers, 0, out_flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on the socket.
+ /**
+ * This function is used to receive data on the sequenced packet socket. The
+ * function call will block until data has been received successfully, or
+ * until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param in_flags Flags specifying how the receive call is to be made.
+ *
+ * @param out_flags After the receive call completes, contains flags
+ * associated with the received data. For example, if the
+ * socket_base::message_end_of_record bit is set then the received data marks
+ * the end of a record.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The receive operation may not receive 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.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.receive(boost::asio::buffer(data, size), 0, out_flags);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive_with_flags(
+ this->impl_.get_implementation(), buffers, in_flags, out_flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the sequenced packet socket. The
+ * function call will block until data has been received successfully, or
+ * until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param in_flags Flags specifying how the receive call is to be made.
+ *
+ * @param out_flags After the receive call completes, contains flags
+ * associated with the received data. For example, if the
+ * socket_base::message_end_of_record bit is set then the received data marks
+ * the end of a record.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes received. Returns 0 if an error occurred.
+ *
+ * @note The receive operation may not receive 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 receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().receive_with_flags(
+ this->impl_.get_implementation(), buffers, in_flags, out_flags, ec);
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive data from the sequenced
+ * packet socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 out_flags Once the asynchronous operation completes, contains flags
+ * associated with the received data. For example, if the
+ * socket_base::message_end_of_record bit is set then the received data marks
+ * the end of a record. The caller must guarantee that the referenced
+ * variable remains valid until the handler is called.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.async_receive(boost::asio::buffer(data, size), out_flags, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags& out_flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive_with_flags(), handler, this,
+ buffers, socket_base::message_flags(0), &out_flags);
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive data from the sequenced
+ * data socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 in_flags Flags specifying how the receive call is to be made.
+ *
+ * @param out_flags Once the asynchronous operation completes, contains flags
+ * associated with the received data. For example, if the
+ * socket_base::message_end_of_record bit is set then the received data marks
+ * the end of a record. The caller must guarantee that the referenced
+ * variable remains valid until the handler is called.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.async_receive(
+ * boost::asio::buffer(data, size),
+ * 0, out_flags, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive_with_flags(), handler,
+ this, buffers, in_flags, &out_flags);
+ }
+
+private:
+ struct initiate_async_send
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_seq_packet_socket* self, const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_send(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_receive_with_flags
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_seq_packet_socket* self, const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags* out_flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_receive_with_flags(
+ self->impl_.get_implementation(), buffers, in_flags, *out_flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_SEQ_PACKET_SOCKET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_serial_port.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_serial_port.hpp
new file mode 100644
index 00000000000..88a195a46aa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_serial_port.hpp
@@ -0,0 +1,861 @@
+//
+// basic_serial_port.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_BASIC_SERIAL_PORT_HPP
+#define BOOST_ASIO_BASIC_SERIAL_PORT_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_SERIAL_PORT) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/serial_port_base.hpp>
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_serial_port_service.hpp>
+#else
+# include <boost/asio/detail/reactive_serial_port_service.hpp>
+#endif
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Provides serial port functionality.
+/**
+ * The basic_serial_port class provides a wrapper over serial port
+ * functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = executor>
+class basic_serial_port
+ : public serial_port_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a serial port.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+ typedef detail::win_iocp_serial_port_service::native_handle_type
+ native_handle_type;
+#else
+ typedef detail::reactive_serial_port_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A basic_basic_serial_port is always the lowest layer.
+ typedef basic_serial_port lowest_layer_type;
+
+ /// Construct a basic_serial_port without opening it.
+ /**
+ * This constructor creates a serial port without opening it.
+ *
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
+ */
+ explicit basic_serial_port(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct a basic_serial_port without opening it.
+ /**
+ * This constructor creates a serial port without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
+ */
+ template <typename ExecutionContext>
+ explicit basic_serial_port(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ basic_serial_port
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct and open a basic_serial_port.
+ /**
+ * This constructor creates and opens a serial port for the specified device
+ * name.
+ *
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
+ *
+ * @param device The platform-specific device name for this serial
+ * port.
+ */
+ basic_serial_port(const executor_type& ex, const char* device)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_serial_port.
+ /**
+ * This constructor creates and opens a serial port for the specified device
+ * name.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
+ *
+ * @param device The platform-specific device name for this serial
+ * port.
+ */
+ template <typename ExecutionContext>
+ basic_serial_port(ExecutionContext& context, const char* device,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_serial_port.
+ /**
+ * This constructor creates and opens a serial port for the specified device
+ * name.
+ *
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
+ *
+ * @param device The platform-specific device name for this serial
+ * port.
+ */
+ basic_serial_port(const executor_type& ex, const std::string& device)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_serial_port.
+ /**
+ * This constructor creates and opens a serial port for the specified device
+ * name.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
+ *
+ * @param device The platform-specific device name for this serial
+ * port.
+ */
+ template <typename ExecutionContext>
+ basic_serial_port(ExecutionContext& context, const std::string& device,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_serial_port on an existing native serial port.
+ /**
+ * This constructor creates a serial port object to hold an existing native
+ * serial port.
+ *
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
+ *
+ * @param native_serial_port A native serial port.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_serial_port(const executor_type& ex,
+ const native_handle_type& native_serial_port)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_serial_port, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_serial_port on an existing native serial port.
+ /**
+ * This constructor creates a serial port object to hold an existing native
+ * serial port.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
+ *
+ * @param native_serial_port A native serial port.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_serial_port(ExecutionContext& context,
+ const native_handle_type& native_serial_port,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_serial_port, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_serial_port from another.
+ /**
+ * This constructor moves a serial port from one object to another.
+ *
+ * @param other The other basic_serial_port 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_serial_port(const executor_type&)
+ * constructor.
+ */
+ basic_serial_port(basic_serial_port&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_serial_port from another.
+ /**
+ * This assignment operator moves a serial port from one object to another.
+ *
+ * @param other The other basic_serial_port 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_serial_port(const executor_type&)
+ * constructor.
+ */
+ basic_serial_port& operator=(basic_serial_port&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the serial port.
+ /**
+ * This function destroys the serial port, cancelling any outstanding
+ * asynchronous wait operations associated with the serial port as if by
+ * calling @c cancel.
+ */
+ ~basic_serial_port()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a basic_serial_port cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a basic_serial_port cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Open the serial port using the specified device name.
+ /**
+ * This function opens the serial port for the specified device name.
+ *
+ * @param device The platform-specific device name.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void open(const std::string& device)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the serial port using the specified device name.
+ /**
+ * This function opens the serial port using the given platform-specific
+ * device name.
+ *
+ * @param device The platform-specific device name.
+ *
+ * @param ec Set the indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID open(const std::string& device,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Assign an existing native serial port to the serial port.
+ /*
+ * This function opens the serial port to hold an existing native serial port.
+ *
+ * @param native_serial_port A native serial port.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_serial_port)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_serial_port, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native serial port to the serial port.
+ /*
+ * This function opens the serial port to hold an existing native serial port.
+ *
+ * @param native_serial_port A native serial port.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_serial_port, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the serial port is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the serial port.
+ /**
+ * This function is used to close the serial port. Any asynchronous read or
+ * write operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void close()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the serial port.
+ /**
+ * This function is used to close the serial port. Any asynchronous read or
+ * write operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the native serial port representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * serial port. This is intended to allow access to native serial port
+ * functionality that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the serial port.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the serial port.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Send a break sequence to the serial port.
+ /**
+ * This function causes a break sequence of platform-specific duration to be
+ * sent out the serial port.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void send_break()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().send_break(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "send_break");
+ }
+
+ /// Send a break sequence to the serial port.
+ /**
+ * This function causes a break sequence of platform-specific duration to be
+ * sent out the serial port.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID send_break(boost::system::error_code& ec)
+ {
+ impl_.get_service().send_break(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Set an option on the serial port.
+ /**
+ * This function is used to set an option on the serial port.
+ *
+ * @param option The option value to be set on the serial port.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa SettableSerialPortOption @n
+ * boost::asio::serial_port_base::baud_rate @n
+ * boost::asio::serial_port_base::flow_control @n
+ * boost::asio::serial_port_base::parity @n
+ * boost::asio::serial_port_base::stop_bits @n
+ * boost::asio::serial_port_base::character_size
+ */
+ template <typename SettableSerialPortOption>
+ void set_option(const SettableSerialPortOption& option)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
+ boost::asio::detail::throw_error(ec, "set_option");
+ }
+
+ /// Set an option on the serial port.
+ /**
+ * This function is used to set an option on the serial port.
+ *
+ * @param option The option value to be set on the serial port.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa SettableSerialPortOption @n
+ * boost::asio::serial_port_base::baud_rate @n
+ * boost::asio::serial_port_base::flow_control @n
+ * boost::asio::serial_port_base::parity @n
+ * boost::asio::serial_port_base::stop_bits @n
+ * boost::asio::serial_port_base::character_size
+ */
+ template <typename SettableSerialPortOption>
+ BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get an option from the serial port.
+ /**
+ * This function is used to get the current value of an option on the serial
+ * port.
+ *
+ * @param option The option value to be obtained from the serial port.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa GettableSerialPortOption @n
+ * boost::asio::serial_port_base::baud_rate @n
+ * boost::asio::serial_port_base::flow_control @n
+ * boost::asio::serial_port_base::parity @n
+ * boost::asio::serial_port_base::stop_bits @n
+ * boost::asio::serial_port_base::character_size
+ */
+ template <typename GettableSerialPortOption>
+ void get_option(GettableSerialPortOption& option)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
+ boost::asio::detail::throw_error(ec, "get_option");
+ }
+
+ /// Get an option from the serial port.
+ /**
+ * This function is used to get the current value of an option on the serial
+ * port.
+ *
+ * @param option The option value to be obtained from the serial port.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa GettableSerialPortOption @n
+ * boost::asio::serial_port_base::baud_rate @n
+ * boost::asio::serial_port_base::flow_control @n
+ * boost::asio::serial_port_base::parity @n
+ * boost::asio::serial_port_base::stop_bits @n
+ * boost::asio::serial_port_base::character_size
+ */
+ template <typename GettableSerialPortOption>
+ BOOST_ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Write some data to the serial port.
+ /**
+ * This function is used to write data to the serial port. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the serial port.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_serial_port.write_some(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.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the serial port.
+ /**
+ * This function is used to write data to the serial port. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the serial port.
+ *
+ * @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 impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the serial port.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be written to the serial port.
+ * 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The write 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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_serial_port.async_write_some(
+ * 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 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)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_write_some(), handler, this, buffers);
+ }
+
+ /// Read some data from the serial port.
+ /**
+ * This function is used to read data from the serial port. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_serial_port.read_some(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.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the serial port.
+ /**
+ * This function is used to read data from the serial port. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more 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 impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the serial port.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more buffers 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 read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The read 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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_serial_port.async_read_some(
+ * 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.
+ */
+ 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)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_read_some(), handler, this, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_serial_port(const basic_serial_port&) BOOST_ASIO_DELETED;
+ basic_serial_port& operator=(const basic_serial_port&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_write_some
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_serial_port* self, const ConstBufferSequence& buffers) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_write_some(
+ self->impl_.get_implementation(), buffers, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_read_some
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_serial_port* self, const MutableBufferSequence& buffers) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_read_some(
+ self->impl_.get_implementation(), buffers, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_serial_port_service, Executor> impl_;
+#else
+ detail::io_object_impl<detail::reactive_serial_port_service, Executor> impl_;
+#endif
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_BASIC_SERIAL_PORT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_signal_set.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_signal_set.hpp
new file mode 100644
index 00000000000..175b4f4832a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_signal_set.hpp
@@ -0,0 +1,543 @@
+//
+// basic_signal_set.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_SIGNAL_SET_HPP
+#define BOOST_ASIO_BASIC_SIGNAL_SET_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/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/signal_set_service.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Provides signal functionality.
+/**
+ * The basic_signal_set class provides the ability to perform an asynchronous
+ * wait for one or more signals to occur.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Example
+ * Performing an asynchronous wait:
+ * @code
+ * void handler(
+ * const boost::system::error_code& error,
+ * int signal_number)
+ * {
+ * if (!error)
+ * {
+ * // A signal occurred.
+ * }
+ * }
+ *
+ * ...
+ *
+ * // Construct a signal set registered for process termination.
+ * boost::asio::signal_set signals(my_context, SIGINT, SIGTERM);
+ *
+ * // Start an asynchronous wait for one of the signals to occur.
+ * signals.async_wait(handler);
+ * @endcode
+ *
+ * @par Queueing of signal notifications
+ *
+ * If a signal is registered with a signal_set, and the signal occurs when
+ * there are no waiting handlers, then the signal notification is queued. The
+ * next async_wait operation on that signal_set will dequeue the notification.
+ * If multiple notifications are queued, subsequent async_wait operations
+ * dequeue them one at a time. Signal notifications are dequeued in order of
+ * ascending signal number.
+ *
+ * If a signal number is removed from a signal_set (using the @c remove or @c
+ * erase member functions) then any queued notifications for that signal are
+ * discarded.
+ *
+ * @par Multiple registration of signals
+ *
+ * The same signal number may be registered with different signal_set objects.
+ * When the signal occurs, one handler is called for each signal_set object.
+ *
+ * Note that multiple registration only works for signals that are registered
+ * using Asio. The application must not also register a signal handler using
+ * functions such as @c signal() or @c sigaction().
+ *
+ * @par Signal masking on POSIX platforms
+ *
+ * POSIX allows signals to be blocked using functions such as @c sigprocmask()
+ * and @c pthread_sigmask(). For signals to be delivered, programs must ensure
+ * that any signals registered using signal_set objects are unblocked in at
+ * least one thread.
+ */
+template <typename Executor = executor>
+class basic_signal_set
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Construct a signal set without adding any signals.
+ /**
+ * This constructor creates a signal set without registering for any signals.
+ *
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
+ */
+ explicit basic_signal_set(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct a signal set without adding any signals.
+ /**
+ * This constructor creates a signal set without registering for any signals.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ */
+ template <typename ExecutionContext>
+ explicit basic_signal_set(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct a signal set and add one signal.
+ /**
+ * This constructor creates a signal set and registers for one signal.
+ *
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
+ *
+ * @param signal_number_1 The signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code boost::asio::signal_set signals(ex);
+ * signals.add(signal_number_1); @endcode
+ */
+ basic_signal_set(const executor_type& ex, int signal_number_1)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add one signal.
+ /**
+ * This constructor creates a signal set and registers for one signal.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ *
+ * @param signal_number_1 The signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code boost::asio::signal_set signals(context);
+ * signals.add(signal_number_1); @endcode
+ */
+ template <typename ExecutionContext>
+ basic_signal_set(ExecutionContext& context, int signal_number_1,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add two signals.
+ /**
+ * This constructor creates a signal set and registers for two signals.
+ *
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
+ *
+ * @param signal_number_1 The first signal number to be added.
+ *
+ * @param signal_number_2 The second signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code boost::asio::signal_set signals(ex);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2); @endcode
+ */
+ basic_signal_set(const executor_type& ex, int signal_number_1,
+ int signal_number_2)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add two signals.
+ /**
+ * This constructor creates a signal set and registers for two signals.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ *
+ * @param signal_number_1 The first signal number to be added.
+ *
+ * @param signal_number_2 The second signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code boost::asio::signal_set signals(context);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2); @endcode
+ */
+ template <typename ExecutionContext>
+ basic_signal_set(ExecutionContext& context, int signal_number_1,
+ int signal_number_2,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add three signals.
+ /**
+ * This constructor creates a signal set and registers for three signals.
+ *
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
+ *
+ * @param signal_number_1 The first signal number to be added.
+ *
+ * @param signal_number_2 The second signal number to be added.
+ *
+ * @param signal_number_3 The third signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code boost::asio::signal_set signals(ex);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2);
+ * signals.add(signal_number_3); @endcode
+ */
+ basic_signal_set(const executor_type& ex, int signal_number_1,
+ int signal_number_2, int signal_number_3)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_3, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add three signals.
+ /**
+ * This constructor creates a signal set and registers for three signals.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ *
+ * @param signal_number_1 The first signal number to be added.
+ *
+ * @param signal_number_2 The second signal number to be added.
+ *
+ * @param signal_number_3 The third signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code boost::asio::signal_set signals(context);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2);
+ * signals.add(signal_number_3); @endcode
+ */
+ template <typename ExecutionContext>
+ basic_signal_set(ExecutionContext& context, int signal_number_1,
+ int signal_number_2, int signal_number_3,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_3, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Destroys the signal set.
+ /**
+ * This function destroys the signal set, cancelling any outstanding
+ * asynchronous wait operations associated with the signal set as if by
+ * calling @c cancel.
+ */
+ ~basic_signal_set()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Add a signal to a signal_set.
+ /**
+ * This function adds the specified signal to the set. It has no effect if the
+ * signal is already in the set.
+ *
+ * @param signal_number The signal to be added to the set.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void add(int signal_number)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number, ec);
+ boost::asio::detail::throw_error(ec, "add");
+ }
+
+ /// Add a signal to a signal_set.
+ /**
+ * This function adds the specified signal to the set. It has no effect if the
+ * signal is already in the set.
+ *
+ * @param signal_number The signal to be added to the set.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID add(int signal_number,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().add(impl_.get_implementation(), signal_number, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Remove a signal from a signal_set.
+ /**
+ * This function removes the specified signal from the set. It has no effect
+ * if the signal is not in the set.
+ *
+ * @param signal_number The signal to be removed from the set.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Removes any notifications that have been queued for the specified
+ * signal number.
+ */
+ void remove(int signal_number)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().remove(impl_.get_implementation(), signal_number, ec);
+ boost::asio::detail::throw_error(ec, "remove");
+ }
+
+ /// Remove a signal from a signal_set.
+ /**
+ * This function removes the specified signal from the set. It has no effect
+ * if the signal is not in the set.
+ *
+ * @param signal_number The signal to be removed from the set.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Removes any notifications that have been queued for the specified
+ * signal number.
+ */
+ BOOST_ASIO_SYNC_OP_VOID remove(int signal_number,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().remove(impl_.get_implementation(), signal_number, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Remove all signals from a signal_set.
+ /**
+ * This function removes all signals from the set. It has no effect if the set
+ * is already empty.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Removes all queued notifications.
+ */
+ void clear()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().clear(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "clear");
+ }
+
+ /// Remove all signals from a signal_set.
+ /**
+ * This function removes all signals from the set. It has no effect if the set
+ * is already empty.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Removes all queued notifications.
+ */
+ BOOST_ASIO_SYNC_OP_VOID clear(boost::system::error_code& ec)
+ {
+ impl_.get_service().clear(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Cancel all operations associated with the signal set.
+ /**
+ * This function forces the completion of any pending asynchronous wait
+ * operations against the signal set. The handler for each cancelled
+ * operation will be invoked with the boost::asio::error::operation_aborted
+ * error code.
+ *
+ * Cancellation does not alter the set of registered signals.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If a registered signal occurred before cancel() is called, then the
+ * handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all operations associated with the signal set.
+ /**
+ * This function forces the completion of any pending asynchronous wait
+ * operations against the signal set. The handler for each cancelled
+ * operation will be invoked with the boost::asio::error::operation_aborted
+ * error code.
+ *
+ * Cancellation does not alter the set of registered signals.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note If a registered signal occurred before cancel() is called, then the
+ * handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Start an asynchronous operation to wait for a signal to be delivered.
+ /**
+ * This function may be used to initiate an asynchronous wait against the
+ * signal set. It always returns immediately.
+ *
+ * For each call to async_wait(), the supplied handler will be called exactly
+ * once. The handler will be called when:
+ *
+ * @li One of the registered signals in the signal set occurs; or
+ *
+ * @li The signal set was cancelled, in which case the handler is passed the
+ * error code boost::asio::error::operation_aborted.
+ *
+ * @param handler The handler to be called when the signal occurs. 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.
+ * int signal_number // Indicates which signal occurred.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename SignalHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(SignalHandler,
+ void (boost::system::error_code, int))
+ async_wait(BOOST_ASIO_MOVE_ARG(SignalHandler) handler)
+ {
+ return async_initiate<SignalHandler, void (boost::system::error_code, int)>(
+ initiate_async_wait(), handler, this);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_signal_set(const basic_signal_set&) BOOST_ASIO_DELETED;
+ basic_signal_set& operator=(const basic_signal_set&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_wait
+ {
+ template <typename SignalHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(SignalHandler) handler,
+ basic_signal_set* self) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a SignalHandler.
+ BOOST_ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
+
+ detail::non_const_lvalue<SignalHandler> handler2(handler);
+ self->impl_.get_service().async_wait(
+ self->impl_.get_implementation(), handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+ detail::io_object_impl<detail::signal_set_service, Executor> impl_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_BASIC_SIGNAL_SET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_socket.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_socket.hpp
new file mode 100644
index 00000000000..4f15f58a5cb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_socket.hpp
@@ -0,0 +1,1858 @@
+//
+// basic_socket.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_SOCKET_HPP
+#define BOOST_ASIO_BASIC_SOCKET_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/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/socket_base.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/null_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_socket_service.hpp>
+#else
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#endif
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_FWD_DECL)
+
+/// Provides socket functionality.
+/**
+ * The basic_socket class template provides functionality that is common to both
+ * stream-oriented and datagram-oriented sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Protocol, typename Executor>
+class basic_socket
+ : public socket_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_socket<Protocol, Executor1> other;
+ };
+
+ /// The native representation of a socket.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ typedef typename detail::null_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+ typedef typename detail::win_iocp_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#else
+ typedef typename detail::reactive_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#endif
+
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+ /// A basic_socket is always the lowest layer.
+ typedef basic_socket<Protocol, Executor> lowest_layer_type;
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+ /// Construct a basic_socket without opening it.
+ /**
+ * This constructor creates a socket without opening it.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ */
+ explicit basic_socket(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct a basic_socket without opening it.
+ /**
+ * This constructor creates a socket without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_socket(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct and open a basic_socket.
+ /**
+ * This constructor creates and opens a socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_socket(const executor_type& ex, const protocol_type& protocol)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_socket.
+ /**
+ * This constructor creates and opens a socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket(ExecutionContext& context, const protocol_type& protocol,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_socket, opening it and binding it to the given local
+ /// endpoint.
+ /**
+ * This constructor creates a socket and automatically opens it bound to the
+ * specified endpoint on the local machine. The protocol used is the protocol
+ * associated with the given endpoint.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket will
+ * be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ const protocol_type protocol = endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ boost::asio::detail::throw_error(ec, "bind");
+ }
+
+ /// Construct a basic_socket, opening it and binding it to the given local
+ /// endpoint.
+ /**
+ * This constructor creates a socket and automatically opens it bound to the
+ * specified endpoint on the local machine. The protocol used is the protocol
+ * associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket will
+ * be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket(ExecutionContext& context, const endpoint_type& endpoint,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ const protocol_type protocol = endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ boost::asio::detail::throw_error(ec, "bind");
+ }
+
+ /// Construct a basic_socket on an existing native socket.
+ /**
+ * This constructor creates a socket object to hold an existing native socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket A native socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_socket(const executor_type& ex, const protocol_type& protocol,
+ const native_handle_type& native_socket)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_socket, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_socket on an existing native socket.
+ /**
+ * This constructor creates a socket object to hold an existing native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket A native socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket(ExecutionContext& context, const protocol_type& protocol,
+ const native_handle_type& native_socket,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_socket, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_socket from another.
+ /**
+ * This constructor moves a socket from one object to another.
+ *
+ * @param other The other basic_socket 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_socket(const executor_type&) constructor.
+ */
+ basic_socket(basic_socket&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_socket from another.
+ /**
+ * This assignment operator moves a socket from one object to another.
+ *
+ * @param other The other basic_socket 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_socket(const executor_type&) constructor.
+ */
+ basic_socket& operator=(basic_socket&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All sockets have access to each other's implementations.
+ template <typename Protocol1, typename Executor1>
+ friend class basic_socket;
+
+ /// Move-construct a basic_socket from a socket of another protocol type.
+ /**
+ * This constructor moves a socket from one object to another.
+ *
+ * @param other The other basic_socket 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_socket(const executor_type&) constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ basic_socket(basic_socket<Protocol1, Executor1>&& other,
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ >::type* = 0)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_socket from a socket of another protocol type.
+ /**
+ * This assignment operator moves a socket from one object to another.
+ *
+ * @param other The other basic_socket 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_socket(const executor_type&) constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_socket&
+ >::type operator=(basic_socket<Protocol1, Executor1> && other)
+ {
+ basic_socket tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a basic_socket cannot contain any further layers, it simply
+ * returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a basic_socket cannot contain any further layers, it simply
+ * returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+ /// Open the socket using the specified protocol.
+ /**
+ * This function opens the socket so that it will use the specified protocol.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * socket.open(boost::asio::ip::tcp::v4());
+ * @endcode
+ */
+ void open(const protocol_type& protocol = protocol_type())
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the socket using the specified protocol.
+ /**
+ * This function opens the socket so that it will use the specified protocol.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::system::error_code ec;
+ * socket.open(boost::asio::ip::tcp::v4(), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Assign an existing native socket to the socket.
+ /*
+ * This function opens the socket to hold an existing native socket.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @param native_socket A native socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void assign(const protocol_type& protocol,
+ const native_handle_type& native_socket)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_socket, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native socket to the socket.
+ /*
+ * This function opens the socket to hold an existing native socket.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @param native_socket A native socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
+ const native_handle_type& native_socket, boost::system::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_socket, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the socket is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the socket.
+ /**
+ * This function is used to close the socket. Any asynchronous send, receive
+ * or connect operations will be cancelled immediately, and will complete
+ * with the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ *
+ * @note For portable behaviour with respect to graceful closure of a
+ * connected socket, call shutdown() before closing the socket.
+ */
+ void close()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the socket.
+ /**
+ * This function is used to close the socket. Any asynchronous send, receive
+ * or connect operations will be cancelled immediately, and will complete
+ * with the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * socket.close(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ *
+ * @note For portable behaviour with respect to graceful closure of a
+ * connected socket, call shutdown() before closing the socket.
+ */
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native socket.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the boost::asio::error::operation_aborted error. Ownership
+ * of the native socket is then transferred to the caller.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with boost::asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ boost::system::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native socket.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the boost::asio::error::operation_aborted error. Ownership
+ * of the native socket is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with boost::asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(boost::system::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native socket representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * socket. This is intended to allow access to native socket functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the socket.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls to cancel() will always fail with
+ * boost::asio::error::operation_not_supported when run on Windows XP, Windows
+ * Server 2003, and earlier versions of Windows, unless
+ * BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
+ * two issues that should be considered before enabling its use:
+ *
+ * @li It will only cancel asynchronous operations that were initiated in the
+ * current thread.
+ *
+ * @li It can appear to complete without error, but the request to cancel the
+ * unfinished operations may be silently ignored by the operating system.
+ * Whether it works or not seems to depend on the drivers that are installed.
+ *
+ * For portable cancellation, consider using one of the following
+ * alternatives:
+ *
+ * @li Disable asio's I/O completion port backend by defining
+ * BOOST_ASIO_DISABLE_IOCP.
+ *
+ * @li Use the close() function to simultaneously cancel the outstanding
+ * operations and close the socket.
+ *
+ * When running on Windows Vista, Windows Server 2008, and later, the
+ * CancelIoEx function is always used. This function does not have the
+ * problems described above.
+ */
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
+ && !defined(BOOST_ASIO_ENABLE_CANCELIO)
+ __declspec(deprecated("By default, this function always fails with "
+ "operation_not_supported when used on Windows XP, Windows Server 2003, "
+ "or earlier. Consult documentation for details."))
+#endif
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the socket.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls to cancel() will always fail with
+ * boost::asio::error::operation_not_supported when run on Windows XP, Windows
+ * Server 2003, and earlier versions of Windows, unless
+ * BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
+ * two issues that should be considered before enabling its use:
+ *
+ * @li It will only cancel asynchronous operations that were initiated in the
+ * current thread.
+ *
+ * @li It can appear to complete without error, but the request to cancel the
+ * unfinished operations may be silently ignored by the operating system.
+ * Whether it works or not seems to depend on the drivers that are installed.
+ *
+ * For portable cancellation, consider using one of the following
+ * alternatives:
+ *
+ * @li Disable asio's I/O completion port backend by defining
+ * BOOST_ASIO_DISABLE_IOCP.
+ *
+ * @li Use the close() function to simultaneously cancel the outstanding
+ * operations and close the socket.
+ *
+ * When running on Windows Vista, Windows Server 2008, and later, the
+ * CancelIoEx function is always used. This function does not have the
+ * problems described above.
+ */
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
+ && !defined(BOOST_ASIO_ENABLE_CANCELIO)
+ __declspec(deprecated("By default, this function always fails with "
+ "operation_not_supported when used on Windows XP, Windows Server 2003, "
+ "or earlier. Consult documentation for details."))
+#endif
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the socket is at the out-of-band data mark.
+ /**
+ * This function is used to check whether the socket input is currently
+ * positioned at the out-of-band data mark.
+ *
+ * @return A bool indicating whether the socket is at the out-of-band data
+ * mark.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ bool at_mark() const
+ {
+ boost::system::error_code ec;
+ bool b = impl_.get_service().at_mark(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "at_mark");
+ return b;
+ }
+
+ /// Determine whether the socket is at the out-of-band data mark.
+ /**
+ * This function is used to check whether the socket input is currently
+ * positioned at the out-of-band data mark.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return A bool indicating whether the socket is at the out-of-band data
+ * mark.
+ */
+ bool at_mark(boost::system::error_code& ec) const
+ {
+ return impl_.get_service().at_mark(impl_.get_implementation(), ec);
+ }
+
+ /// Determine the number of bytes available for reading.
+ /**
+ * This function is used to determine the number of bytes that may be read
+ * without blocking.
+ *
+ * @return The number of bytes that may be read without blocking, or 0 if an
+ * error occurs.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ std::size_t available() const
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().available(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "available");
+ return s;
+ }
+
+ /// Determine the number of bytes available for reading.
+ /**
+ * This function is used to determine the number of bytes that may be read
+ * without blocking.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of bytes that may be read without blocking, or 0 if an
+ * error occurs.
+ */
+ std::size_t available(boost::system::error_code& ec) const
+ {
+ return impl_.get_service().available(impl_.get_implementation(), ec);
+ }
+
+ /// Bind the socket to the given local endpoint.
+ /**
+ * This function binds the socket to the specified endpoint on the local
+ * machine.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket will
+ * be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * socket.open(boost::asio::ip::tcp::v4());
+ * socket.bind(boost::asio::ip::tcp::endpoint(
+ * boost::asio::ip::tcp::v4(), 12345));
+ * @endcode
+ */
+ void bind(const endpoint_type& endpoint)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ boost::asio::detail::throw_error(ec, "bind");
+ }
+
+ /// Bind the socket to the given local endpoint.
+ /**
+ * This function binds the socket to the specified endpoint on the local
+ * machine.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket will
+ * be bound.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * socket.open(boost::asio::ip::tcp::v4());
+ * boost::system::error_code ec;
+ * socket.bind(boost::asio::ip::tcp::endpoint(
+ * boost::asio::ip::tcp::v4(), 12345), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Connect the socket to the specified endpoint.
+ /**
+ * This function is used to connect a socket to the specified remote endpoint.
+ * The function call will block until the connection is successfully made or
+ * an error occurs.
+ *
+ * The socket is automatically opened if it is not already open. If the
+ * connect fails, and the socket was automatically opened, the socket is
+ * not returned to the closed state.
+ *
+ * @param peer_endpoint The remote endpoint to which the socket will be
+ * connected.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * socket.connect(endpoint);
+ * @endcode
+ */
+ void connect(const endpoint_type& peer_endpoint)
+ {
+ boost::system::error_code ec;
+ if (!is_open())
+ {
+ impl_.get_service().open(impl_.get_implementation(),
+ peer_endpoint.protocol(), ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ }
+ impl_.get_service().connect(impl_.get_implementation(), peer_endpoint, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ }
+
+ /// Connect the socket to the specified endpoint.
+ /**
+ * This function is used to connect a socket to the specified remote endpoint.
+ * The function call will block until the connection is successfully made or
+ * an error occurs.
+ *
+ * The socket is automatically opened if it is not already open. If the
+ * connect fails, and the socket was automatically opened, the socket is
+ * not returned to the closed state.
+ *
+ * @param peer_endpoint The remote endpoint to which the socket will be
+ * connected.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * boost::system::error_code ec;
+ * socket.connect(endpoint, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID connect(const endpoint_type& peer_endpoint,
+ boost::system::error_code& ec)
+ {
+ if (!is_open())
+ {
+ impl_.get_service().open(impl_.get_implementation(),
+ peer_endpoint.protocol(), ec);
+ if (ec)
+ {
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ impl_.get_service().connect(impl_.get_implementation(), peer_endpoint, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Start an asynchronous connect.
+ /**
+ * This function is used to asynchronously connect a socket to the specified
+ * remote endpoint. The function call always returns immediately.
+ *
+ * The socket is automatically opened if it is not already open. If the
+ * connect fails, and the socket was automatically opened, the socket is
+ * not returned to the closed state.
+ *
+ * @param peer_endpoint The remote endpoint to which the socket will be
+ * connected. Copies will be made of the endpoint object as required.
+ *
+ * @param handler The handler to be called when the connection 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
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void connect_handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Connect succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint(
+ * boost::asio::ip::address::from_string("1.2.3.4"), 12345);
+ * socket.async_connect(endpoint, connect_handler);
+ * @endcode
+ */
+ template <typename ConnectHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ConnectHandler,
+ void (boost::system::error_code))
+ async_connect(const endpoint_type& peer_endpoint,
+ BOOST_ASIO_MOVE_ARG(ConnectHandler) handler)
+ {
+ boost::system::error_code open_ec;
+ if (!is_open())
+ {
+ const protocol_type protocol = peer_endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, open_ec);
+ }
+
+ return async_initiate<ConnectHandler, void (boost::system::error_code)>(
+ initiate_async_connect(), handler, this, peer_endpoint, open_ec);
+ }
+
+ /// Set an option on the socket.
+ /**
+ * This function is used to set an option on the socket.
+ *
+ * @param option The new option value to be set on the socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa SettableSocketOption @n
+ * boost::asio::socket_base::broadcast @n
+ * boost::asio::socket_base::do_not_route @n
+ * boost::asio::socket_base::keep_alive @n
+ * boost::asio::socket_base::linger @n
+ * boost::asio::socket_base::receive_buffer_size @n
+ * boost::asio::socket_base::receive_low_watermark @n
+ * boost::asio::socket_base::reuse_address @n
+ * boost::asio::socket_base::send_buffer_size @n
+ * boost::asio::socket_base::send_low_watermark @n
+ * boost::asio::ip::multicast::join_group @n
+ * boost::asio::ip::multicast::leave_group @n
+ * boost::asio::ip::multicast::enable_loopback @n
+ * boost::asio::ip::multicast::outbound_interface @n
+ * boost::asio::ip::multicast::hops @n
+ * boost::asio::ip::tcp::no_delay
+ *
+ * @par Example
+ * Setting the IPPROTO_TCP/TCP_NODELAY option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::no_delay option(true);
+ * socket.set_option(option);
+ * @endcode
+ */
+ template <typename SettableSocketOption>
+ void set_option(const SettableSocketOption& option)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
+ boost::asio::detail::throw_error(ec, "set_option");
+ }
+
+ /// Set an option on the socket.
+ /**
+ * This function is used to set an option on the socket.
+ *
+ * @param option The new option value to be set on the socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa SettableSocketOption @n
+ * boost::asio::socket_base::broadcast @n
+ * boost::asio::socket_base::do_not_route @n
+ * boost::asio::socket_base::keep_alive @n
+ * boost::asio::socket_base::linger @n
+ * boost::asio::socket_base::receive_buffer_size @n
+ * boost::asio::socket_base::receive_low_watermark @n
+ * boost::asio::socket_base::reuse_address @n
+ * boost::asio::socket_base::send_buffer_size @n
+ * boost::asio::socket_base::send_low_watermark @n
+ * boost::asio::ip::multicast::join_group @n
+ * boost::asio::ip::multicast::leave_group @n
+ * boost::asio::ip::multicast::enable_loopback @n
+ * boost::asio::ip::multicast::outbound_interface @n
+ * boost::asio::ip::multicast::hops @n
+ * boost::asio::ip::tcp::no_delay
+ *
+ * @par Example
+ * Setting the IPPROTO_TCP/TCP_NODELAY option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::no_delay option(true);
+ * boost::system::error_code ec;
+ * socket.set_option(option, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename SettableSocketOption>
+ BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get an option from the socket.
+ /**
+ * This function is used to get the current value of an option on the socket.
+ *
+ * @param option The option value to be obtained from the socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa GettableSocketOption @n
+ * boost::asio::socket_base::broadcast @n
+ * boost::asio::socket_base::do_not_route @n
+ * boost::asio::socket_base::keep_alive @n
+ * boost::asio::socket_base::linger @n
+ * boost::asio::socket_base::receive_buffer_size @n
+ * boost::asio::socket_base::receive_low_watermark @n
+ * boost::asio::socket_base::reuse_address @n
+ * boost::asio::socket_base::send_buffer_size @n
+ * boost::asio::socket_base::send_low_watermark @n
+ * boost::asio::ip::multicast::join_group @n
+ * boost::asio::ip::multicast::leave_group @n
+ * boost::asio::ip::multicast::enable_loopback @n
+ * boost::asio::ip::multicast::outbound_interface @n
+ * boost::asio::ip::multicast::hops @n
+ * boost::asio::ip::tcp::no_delay
+ *
+ * @par Example
+ * Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket::keep_alive option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ */
+ template <typename GettableSocketOption>
+ void get_option(GettableSocketOption& option) const
+ {
+ boost::system::error_code ec;
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
+ boost::asio::detail::throw_error(ec, "get_option");
+ }
+
+ /// Get an option from the socket.
+ /**
+ * This function is used to get the current value of an option on the socket.
+ *
+ * @param option The option value to be obtained from the socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa GettableSocketOption @n
+ * boost::asio::socket_base::broadcast @n
+ * boost::asio::socket_base::do_not_route @n
+ * boost::asio::socket_base::keep_alive @n
+ * boost::asio::socket_base::linger @n
+ * boost::asio::socket_base::receive_buffer_size @n
+ * boost::asio::socket_base::receive_low_watermark @n
+ * boost::asio::socket_base::reuse_address @n
+ * boost::asio::socket_base::send_buffer_size @n
+ * boost::asio::socket_base::send_low_watermark @n
+ * boost::asio::ip::multicast::join_group @n
+ * boost::asio::ip::multicast::leave_group @n
+ * boost::asio::ip::multicast::enable_loopback @n
+ * boost::asio::ip::multicast::outbound_interface @n
+ * boost::asio::ip::multicast::hops @n
+ * boost::asio::ip::tcp::no_delay
+ *
+ * @par Example
+ * Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket::keep_alive option;
+ * boost::system::error_code ec;
+ * socket.get_option(option, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * bool is_set = option.value();
+ * @endcode
+ */
+ template <typename GettableSocketOption>
+ BOOST_ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
+ boost::system::error_code& ec) const
+ {
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Perform an IO control command on the socket.
+ /**
+ * This function is used to execute an IO control command on the socket.
+ *
+ * @param command The IO control command to be performed on the socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa IoControlCommand @n
+ * boost::asio::socket_base::bytes_readable @n
+ * boost::asio::socket_base::non_blocking_io
+ *
+ * @par Example
+ * Getting the number of bytes ready to read:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket::bytes_readable command;
+ * socket.io_control(command);
+ * std::size_t bytes_readable = command.get();
+ * @endcode
+ */
+ template <typename IoControlCommand>
+ void io_control(IoControlCommand& command)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
+ boost::asio::detail::throw_error(ec, "io_control");
+ }
+
+ /// Perform an IO control command on the socket.
+ /**
+ * This function is used to execute an IO control command on the socket.
+ *
+ * @param command The IO control command to be performed on the socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa IoControlCommand @n
+ * boost::asio::socket_base::bytes_readable @n
+ * boost::asio::socket_base::non_blocking_io
+ *
+ * @par Example
+ * Getting the number of bytes ready to read:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket::bytes_readable command;
+ * boost::system::error_code ec;
+ * socket.io_control(command, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * std::size_t bytes_readable = command.get();
+ * @endcode
+ */
+ template <typename IoControlCommand>
+ BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Gets the non-blocking mode of the socket.
+ /**
+ * @returns @c true if the socket's synchronous operations will fail with
+ * boost::asio::error::would_block if they are unable to perform the requested
+ * operation immediately. If @c false, synchronous operations will block
+ * until complete.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ bool non_blocking() const
+ {
+ return impl_.get_service().non_blocking(impl_.get_implementation());
+ }
+
+ /// Sets the non-blocking mode of the socket.
+ /**
+ * @param mode If @c true, the socket's synchronous operations will fail with
+ * boost::asio::error::would_block if they are unable to perform the requested
+ * operation immediately. If @c false, synchronous operations will block
+ * until complete.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ void non_blocking(bool mode)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
+ boost::asio::detail::throw_error(ec, "non_blocking");
+ }
+
+ /// Sets the non-blocking mode of the socket.
+ /**
+ * @param mode If @c true, the socket's synchronous operations will fail with
+ * boost::asio::error::would_block if they are unable to perform the requested
+ * operation immediately. If @c false, synchronous operations will block
+ * until complete.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ BOOST_ASIO_SYNC_OP_VOID non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Gets the non-blocking mode of the native socket implementation.
+ /**
+ * This function is used to retrieve the non-blocking mode of the underlying
+ * native socket. This mode has no effect on the behaviour of the socket
+ * object's synchronous operations.
+ *
+ * @returns @c true if the underlying socket is in non-blocking mode and
+ * direct system calls may fail with boost::asio::error::would_block (or the
+ * equivalent system error).
+ *
+ * @note The current non-blocking mode is cached by the socket object.
+ * Consequently, the return value may be incorrect if the non-blocking mode
+ * was set directly on the native socket.
+ *
+ * @par Example
+ * This function is intended to allow the encapsulation of arbitrary
+ * non-blocking system calls as asynchronous operations, in a way that is
+ * transparent to the user of the socket object. The following example
+ * illustrates how Linux's @c sendfile system call might be encapsulated:
+ * @code template <typename Handler>
+ * struct sendfile_op
+ * {
+ * tcp::socket& sock_;
+ * int fd_;
+ * Handler handler_;
+ * off_t offset_;
+ * std::size_t total_bytes_transferred_;
+ *
+ * // Function call operator meeting WriteHandler requirements.
+ * // Used as the handler for the async_write_some operation.
+ * void operator()(boost::system::error_code ec, std::size_t)
+ * {
+ * // Put the underlying socket into non-blocking mode.
+ * if (!ec)
+ * if (!sock_.native_non_blocking())
+ * sock_.native_non_blocking(true, ec);
+ *
+ * if (!ec)
+ * {
+ * for (;;)
+ * {
+ * // Try the system call.
+ * errno = 0;
+ * int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
+ * ec = boost::system::error_code(n < 0 ? errno : 0,
+ * boost::asio::error::get_system_category());
+ * total_bytes_transferred_ += ec ? 0 : n;
+ *
+ * // Retry operation immediately 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)
+ * {
+ * // We have to wait for the socket to become ready again.
+ * sock_.async_wait(tcp::socket::wait_write, *this);
+ * return;
+ * }
+ *
+ * if (ec || n == 0)
+ * {
+ * // An error occurred, or we have reached the end of the file.
+ * // Either way we must exit the loop so we can call the handler.
+ * break;
+ * }
+ *
+ * // Loop around to try calling sendfile again.
+ * }
+ * }
+ *
+ * // Pass result back to user's handler.
+ * handler_(ec, total_bytes_transferred_);
+ * }
+ * };
+ *
+ * template <typename Handler>
+ * void async_sendfile(tcp::socket& sock, int fd, Handler h)
+ * {
+ * sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
+ * sock.async_wait(tcp::socket::wait_write, op);
+ * } @endcode
+ */
+ bool native_non_blocking() const
+ {
+ return impl_.get_service().native_non_blocking(impl_.get_implementation());
+ }
+
+ /// Sets the non-blocking mode of the native socket implementation.
+ /**
+ * This function is used to modify the non-blocking mode of the underlying
+ * native socket. It has no effect on the behaviour of the socket object's
+ * synchronous operations.
+ *
+ * @param mode If @c true, the underlying socket is put into non-blocking
+ * mode and direct system calls may fail with boost::asio::error::would_block
+ * (or the equivalent system error).
+ *
+ * @throws boost::system::system_error Thrown on failure. If the @c mode is
+ * @c false, but the current value of @c non_blocking() is @c true, this
+ * function fails with boost::asio::error::invalid_argument, as the
+ * combination does not make sense.
+ *
+ * @par Example
+ * This function is intended to allow the encapsulation of arbitrary
+ * non-blocking system calls as asynchronous operations, in a way that is
+ * transparent to the user of the socket object. The following example
+ * illustrates how Linux's @c sendfile system call might be encapsulated:
+ * @code template <typename Handler>
+ * struct sendfile_op
+ * {
+ * tcp::socket& sock_;
+ * int fd_;
+ * Handler handler_;
+ * off_t offset_;
+ * std::size_t total_bytes_transferred_;
+ *
+ * // Function call operator meeting WriteHandler requirements.
+ * // Used as the handler for the async_write_some operation.
+ * void operator()(boost::system::error_code ec, std::size_t)
+ * {
+ * // Put the underlying socket into non-blocking mode.
+ * if (!ec)
+ * if (!sock_.native_non_blocking())
+ * sock_.native_non_blocking(true, ec);
+ *
+ * if (!ec)
+ * {
+ * for (;;)
+ * {
+ * // Try the system call.
+ * errno = 0;
+ * int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
+ * ec = boost::system::error_code(n < 0 ? errno : 0,
+ * boost::asio::error::get_system_category());
+ * total_bytes_transferred_ += ec ? 0 : n;
+ *
+ * // Retry operation immediately 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)
+ * {
+ * // We have to wait for the socket to become ready again.
+ * sock_.async_wait(tcp::socket::wait_write, *this);
+ * return;
+ * }
+ *
+ * if (ec || n == 0)
+ * {
+ * // An error occurred, or we have reached the end of the file.
+ * // Either way we must exit the loop so we can call the handler.
+ * break;
+ * }
+ *
+ * // Loop around to try calling sendfile again.
+ * }
+ * }
+ *
+ * // Pass result back to user's handler.
+ * handler_(ec, total_bytes_transferred_);
+ * }
+ * };
+ *
+ * template <typename Handler>
+ * void async_sendfile(tcp::socket& sock, int fd, Handler h)
+ * {
+ * sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
+ * sock.async_wait(tcp::socket::wait_write, op);
+ * } @endcode
+ */
+ void native_non_blocking(bool mode)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
+ boost::asio::detail::throw_error(ec, "native_non_blocking");
+ }
+
+ /// Sets the non-blocking mode of the native socket implementation.
+ /**
+ * This function is used to modify the non-blocking mode of the underlying
+ * native socket. It has no effect on the behaviour of the socket object's
+ * synchronous operations.
+ *
+ * @param mode If @c true, the underlying socket is put into non-blocking
+ * mode and direct system calls may fail with boost::asio::error::would_block
+ * (or the equivalent system error).
+ *
+ * @param ec Set to indicate what error occurred, if any. If the @c mode is
+ * @c false, but the current value of @c non_blocking() is @c true, this
+ * function fails with boost::asio::error::invalid_argument, as the
+ * combination does not make sense.
+ *
+ * @par Example
+ * This function is intended to allow the encapsulation of arbitrary
+ * non-blocking system calls as asynchronous operations, in a way that is
+ * transparent to the user of the socket object. The following example
+ * illustrates how Linux's @c sendfile system call might be encapsulated:
+ * @code template <typename Handler>
+ * struct sendfile_op
+ * {
+ * tcp::socket& sock_;
+ * int fd_;
+ * Handler handler_;
+ * off_t offset_;
+ * std::size_t total_bytes_transferred_;
+ *
+ * // Function call operator meeting WriteHandler requirements.
+ * // Used as the handler for the async_write_some operation.
+ * void operator()(boost::system::error_code ec, std::size_t)
+ * {
+ * // Put the underlying socket into non-blocking mode.
+ * if (!ec)
+ * if (!sock_.native_non_blocking())
+ * sock_.native_non_blocking(true, ec);
+ *
+ * if (!ec)
+ * {
+ * for (;;)
+ * {
+ * // Try the system call.
+ * errno = 0;
+ * int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
+ * ec = boost::system::error_code(n < 0 ? errno : 0,
+ * boost::asio::error::get_system_category());
+ * total_bytes_transferred_ += ec ? 0 : n;
+ *
+ * // Retry operation immediately 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)
+ * {
+ * // We have to wait for the socket to become ready again.
+ * sock_.async_wait(tcp::socket::wait_write, *this);
+ * return;
+ * }
+ *
+ * if (ec || n == 0)
+ * {
+ * // An error occurred, or we have reached the end of the file.
+ * // Either way we must exit the loop so we can call the handler.
+ * break;
+ * }
+ *
+ * // Loop around to try calling sendfile again.
+ * }
+ * }
+ *
+ * // Pass result back to user's handler.
+ * handler_(ec, total_bytes_transferred_);
+ * }
+ * };
+ *
+ * template <typename Handler>
+ * void async_sendfile(tcp::socket& sock, int fd, Handler h)
+ * {
+ * sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
+ * sock.async_wait(tcp::socket::wait_write, op);
+ * } @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the local endpoint of the socket.
+ /**
+ * This function is used to obtain the locally bound endpoint of the socket.
+ *
+ * @returns An object that represents the local endpoint of the socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
+ * @endcode
+ */
+ endpoint_type local_endpoint() const
+ {
+ boost::system::error_code ec;
+ endpoint_type ep = impl_.get_service().local_endpoint(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "local_endpoint");
+ return ep;
+ }
+
+ /// Get the local endpoint of the socket.
+ /**
+ * This function is used to obtain the locally bound endpoint of the socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns An object that represents the local endpoint of the socket.
+ * Returns a default-constructed endpoint object if an error occurred.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * boost::asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ endpoint_type local_endpoint(boost::system::error_code& ec) const
+ {
+ return impl_.get_service().local_endpoint(impl_.get_implementation(), ec);
+ }
+
+ /// Get the remote endpoint of the socket.
+ /**
+ * This function is used to obtain the remote endpoint of the socket.
+ *
+ * @returns An object that represents the remote endpoint of the socket.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
+ * @endcode
+ */
+ endpoint_type remote_endpoint() const
+ {
+ boost::system::error_code ec;
+ endpoint_type ep = impl_.get_service().remote_endpoint(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "remote_endpoint");
+ return ep;
+ }
+
+ /// Get the remote endpoint of the socket.
+ /**
+ * This function is used to obtain the remote endpoint of the socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns An object that represents the remote endpoint of the socket.
+ * Returns a default-constructed endpoint object if an error occurred.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * boost::asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ endpoint_type remote_endpoint(boost::system::error_code& ec) const
+ {
+ return impl_.get_service().remote_endpoint(impl_.get_implementation(), ec);
+ }
+
+ /// Disable sends or receives on the socket.
+ /**
+ * This function is used to disable send operations, receive operations, or
+ * both.
+ *
+ * @param what Determines what types of operation will no longer be allowed.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * Shutting down the send side of the socket:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
+ * @endcode
+ */
+ void shutdown(shutdown_type what)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().shutdown(impl_.get_implementation(), what, ec);
+ boost::asio::detail::throw_error(ec, "shutdown");
+ }
+
+ /// Disable sends or receives on the socket.
+ /**
+ * This function is used to disable send operations, receive operations, or
+ * both.
+ *
+ * @param what Determines what types of operation will no longer be allowed.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * Shutting down the send side of the socket:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID shutdown(shutdown_type what,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().shutdown(impl_.get_implementation(), what, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Wait for the socket to become ready to read, ready to write, or to have
+ /// pending error conditions.
+ /**
+ * This function is used to perform a blocking wait for a socket to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired socket state.
+ *
+ * @par Example
+ * Waiting for a socket to become readable.
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * socket.wait(boost::asio::ip::tcp::socket::wait_read);
+ * @endcode
+ */
+ void wait(wait_type w)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Wait for the socket to become ready to read, ready to write, or to have
+ /// pending error conditions.
+ /**
+ * This function is used to perform a blocking wait for a socket to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired socket state.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * Waiting for a socket to become readable.
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * socket.wait(boost::asio::ip::tcp::socket::wait_read, ec);
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
+ {
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Asynchronously wait for the socket to become ready to read, ready to
+ /// write, or to have pending error conditions.
+ /**
+ * This function is used to perform an asynchronous wait for a socket to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired socket state.
+ *
+ * @param handler The handler to be called when the wait 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
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void wait_handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Wait succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * socket.async_wait(boost::asio::ip::tcp::socket::wait_read, wait_handler);
+ * @endcode
+ */
+ template <typename WaitHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
+ void (boost::system::error_code))
+ async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ return async_initiate<WaitHandler, void (boost::system::error_code)>(
+ initiate_async_wait(), handler, this, w);
+ }
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the socket, cancelling any outstanding asynchronous
+ * operations associated with the socket as if by calling @c cancel.
+ */
+ ~basic_socket()
+ {
+ }
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ detail::io_object_impl<
+ detail::null_socket_service<Protocol>, Executor> impl_;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+ detail::io_object_impl<
+ detail::win_iocp_socket_service<Protocol>, Executor> impl_;
+#else
+ detail::io_object_impl<
+ detail::reactive_socket_service<Protocol>, Executor> impl_;
+#endif
+
+private:
+ // Disallow copying and assignment.
+ basic_socket(const basic_socket&) BOOST_ASIO_DELETED;
+ basic_socket& operator=(const basic_socket&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_connect
+ {
+ template <typename ConnectHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(ConnectHandler) handler,
+ basic_socket* self, const endpoint_type& peer_endpoint,
+ const boost::system::error_code& open_ec) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ConnectHandler.
+ BOOST_ASIO_CONNECT_HANDLER_CHECK(ConnectHandler, handler) type_check;
+
+ if (open_ec)
+ {
+ boost::asio::post(self->impl_.get_executor(),
+ boost::asio::detail::bind_handler(
+ BOOST_ASIO_MOVE_CAST(ConnectHandler)(handler), open_ec));
+ }
+ else
+ {
+ detail::non_const_lvalue<ConnectHandler> handler2(handler);
+ self->impl_.get_service().async_connect(
+ self->impl_.get_implementation(), peer_endpoint,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ }
+ };
+
+ struct initiate_async_wait
+ {
+ template <typename WaitHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler,
+ basic_socket* self, wait_type w) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WaitHandler.
+ BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
+
+ detail::non_const_lvalue<WaitHandler> handler2(handler);
+ self->impl_.get_service().async_wait(
+ self->impl_.get_implementation(), w, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_SOCKET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_socket_acceptor.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_socket_acceptor.hpp
new file mode 100644
index 00000000000..12613b82603
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_socket_acceptor.hpp
@@ -0,0 +1,2380 @@
+//
+// basic_socket_acceptor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_SOCKET_ACCEPTOR_HPP
+#define BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_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/basic_socket.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/socket_base.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/null_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_socket_service.hpp>
+#else
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#endif
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_socket_acceptor;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+
+/// Provides the ability to accept new connections.
+/**
+ * The basic_socket_acceptor class template is used for accepting new socket
+ * connections.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Example
+ * Opening a socket acceptor with the SO_REUSEADDR option enabled:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
+ * acceptor.open(endpoint.protocol());
+ * acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
+ * acceptor.bind(endpoint);
+ * acceptor.listen();
+ * @endcode
+ */
+template <typename Protocol, typename Executor>
+class basic_socket_acceptor
+ : public socket_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of an acceptor.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ typedef typename detail::null_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+ typedef typename detail::win_iocp_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#else
+ typedef typename detail::reactive_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#endif
+
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// Construct an acceptor without opening it.
+ /**
+ * This constructor creates an acceptor without opening it to listen for new
+ * connections. The open() function must be called before the acceptor can
+ * accept new socket connections.
+ *
+ * @param ex The I/O executor that the acceptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * acceptor.
+ */
+ explicit basic_socket_acceptor(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct an acceptor without opening it.
+ /**
+ * This constructor creates an acceptor without opening it to listen for new
+ * connections. The open() function must be called before the acceptor can
+ * accept new socket connections.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ */
+ template <typename ExecutionContext>
+ explicit basic_socket_acceptor(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct an open acceptor.
+ /**
+ * This constructor creates an acceptor and automatically opens it.
+ *
+ * @param ex The I/O executor that the acceptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * acceptor.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_socket_acceptor(const executor_type& ex, const protocol_type& protocol)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct an open acceptor.
+ /**
+ * This constructor creates an acceptor and automatically opens it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket_acceptor(ExecutionContext& context,
+ const protocol_type& protocol,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct an acceptor opened on the given endpoint.
+ /**
+ * This constructor creates an acceptor and automatically opens it to listen
+ * for new connections on the specified endpoint.
+ *
+ * @param ex The I/O executor that the acceptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * acceptor.
+ *
+ * @param endpoint An endpoint on the local machine on which the acceptor
+ * will listen for new connections.
+ *
+ * @param reuse_addr Whether the constructor should set the socket option
+ * socket_base::reuse_address.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This constructor is equivalent to the following code:
+ * @code
+ * basic_socket_acceptor<Protocol> acceptor(my_context);
+ * acceptor.open(endpoint.protocol());
+ * if (reuse_addr)
+ * acceptor.set_option(socket_base::reuse_address(true));
+ * acceptor.bind(endpoint);
+ * acceptor.listen();
+ * @endcode
+ */
+ basic_socket_acceptor(const executor_type& ex,
+ const endpoint_type& endpoint, bool reuse_addr = true)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ const protocol_type protocol = endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ if (reuse_addr)
+ {
+ impl_.get_service().set_option(impl_.get_implementation(),
+ socket_base::reuse_address(true), ec);
+ boost::asio::detail::throw_error(ec, "set_option");
+ }
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ boost::asio::detail::throw_error(ec, "bind");
+ impl_.get_service().listen(impl_.get_implementation(),
+ socket_base::max_listen_connections, ec);
+ boost::asio::detail::throw_error(ec, "listen");
+ }
+
+ /// Construct an acceptor opened on the given endpoint.
+ /**
+ * This constructor creates an acceptor and automatically opens it to listen
+ * for new connections on the specified endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ *
+ * @param endpoint An endpoint on the local machine on which the acceptor
+ * will listen for new connections.
+ *
+ * @param reuse_addr Whether the constructor should set the socket option
+ * socket_base::reuse_address.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This constructor is equivalent to the following code:
+ * @code
+ * basic_socket_acceptor<Protocol> acceptor(my_context);
+ * acceptor.open(endpoint.protocol());
+ * if (reuse_addr)
+ * acceptor.set_option(socket_base::reuse_address(true));
+ * acceptor.bind(endpoint);
+ * acceptor.listen();
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ basic_socket_acceptor(ExecutionContext& context,
+ const endpoint_type& endpoint, bool reuse_addr = true,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ const protocol_type protocol = endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ if (reuse_addr)
+ {
+ impl_.get_service().set_option(impl_.get_implementation(),
+ socket_base::reuse_address(true), ec);
+ boost::asio::detail::throw_error(ec, "set_option");
+ }
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ boost::asio::detail::throw_error(ec, "bind");
+ impl_.get_service().listen(impl_.get_implementation(),
+ socket_base::max_listen_connections, ec);
+ boost::asio::detail::throw_error(ec, "listen");
+ }
+
+ /// Construct a basic_socket_acceptor on an existing native acceptor.
+ /**
+ * This constructor creates an acceptor object to hold an existing native
+ * acceptor.
+ *
+ * @param ex The I/O executor that the acceptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * acceptor.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_acceptor A native acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_socket_acceptor(const executor_type& ex,
+ const protocol_type& protocol, const native_handle_type& native_acceptor)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_acceptor, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_socket_acceptor on an existing native acceptor.
+ /**
+ * This constructor creates an acceptor object to hold an existing native
+ * acceptor.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_acceptor A native acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket_acceptor(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_acceptor,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_acceptor, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_socket_acceptor from another.
+ /**
+ * This constructor moves an acceptor from one object to another.
+ *
+ * @param other The other basic_socket_acceptor 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_socket_acceptor(const executor_type&)
+ * constructor.
+ */
+ basic_socket_acceptor(basic_socket_acceptor&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_socket_acceptor from another.
+ /**
+ * This assignment operator moves an acceptor from one object to another.
+ *
+ * @param other The other basic_socket_acceptor 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_socket_acceptor(const executor_type&)
+ * constructor.
+ */
+ basic_socket_acceptor& operator=(basic_socket_acceptor&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All socket acceptors have access to each other's implementations.
+ template <typename Protocol1, typename Executor1>
+ friend class basic_socket_acceptor;
+
+ /// Move-construct a basic_socket_acceptor from an acceptor of another
+ /// protocol type.
+ /**
+ * This constructor moves an acceptor from one object to another.
+ *
+ * @param other The other basic_socket_acceptor 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_socket_acceptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ basic_socket_acceptor(basic_socket_acceptor<Protocol1, Executor1>&& other,
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ >::type* = 0)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_socket_acceptor from an acceptor of another protocol
+ /// type.
+ /**
+ * This assignment operator moves an acceptor from one object to another.
+ *
+ * @param other The other basic_socket_acceptor 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_socket_acceptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_socket_acceptor&
+ >::type operator=(basic_socket_acceptor<Protocol1, Executor1>&& other)
+ {
+ basic_socket_acceptor tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the acceptor.
+ /**
+ * This function destroys the acceptor, cancelling any outstanding
+ * asynchronous operations associated with the acceptor as if by calling
+ * @c cancel.
+ */
+ ~basic_socket_acceptor()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Open the acceptor using the specified protocol.
+ /**
+ * This function opens the socket acceptor so that it will use the specified
+ * protocol.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * acceptor.open(boost::asio::ip::tcp::v4());
+ * @endcode
+ */
+ void open(const protocol_type& protocol = protocol_type())
+ {
+ boost::system::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ boost::asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the acceptor using the specified protocol.
+ /**
+ * This function opens the socket acceptor so that it will use the specified
+ * protocol.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * boost::system::error_code ec;
+ * acceptor.open(boost::asio::ip::tcp::v4(), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Assigns an existing native acceptor to the acceptor.
+ /*
+ * This function opens the acceptor to hold an existing native acceptor.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @param native_acceptor A native acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void assign(const protocol_type& protocol,
+ const native_handle_type& native_acceptor)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_acceptor, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assigns an existing native acceptor to the acceptor.
+ /*
+ * This function opens the acceptor to hold an existing native acceptor.
+ *
+ * @param protocol An object specifying which protocol is to be used.
+ *
+ * @param native_acceptor A native acceptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
+ const native_handle_type& native_acceptor, boost::system::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_acceptor, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the acceptor is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Bind the acceptor to the given local endpoint.
+ /**
+ * This function binds the socket acceptor to the specified endpoint on the
+ * local machine.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket
+ * acceptor will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 12345);
+ * acceptor.open(endpoint.protocol());
+ * acceptor.bind(endpoint);
+ * @endcode
+ */
+ void bind(const endpoint_type& endpoint)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ boost::asio::detail::throw_error(ec, "bind");
+ }
+
+ /// Bind the acceptor to the given local endpoint.
+ /**
+ * This function binds the socket acceptor to the specified endpoint on the
+ * local machine.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket
+ * acceptor will be bound.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 12345);
+ * acceptor.open(endpoint.protocol());
+ * boost::system::error_code ec;
+ * acceptor.bind(endpoint, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Place the acceptor into the state where it will listen for new
+ /// connections.
+ /**
+ * This function puts the socket acceptor into the state where it may accept
+ * new connections.
+ *
+ * @param backlog The maximum length of the queue of pending connections.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void listen(int backlog = socket_base::max_listen_connections)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().listen(impl_.get_implementation(), backlog, ec);
+ boost::asio::detail::throw_error(ec, "listen");
+ }
+
+ /// Place the acceptor into the state where it will listen for new
+ /// connections.
+ /**
+ * This function puts the socket acceptor into the state where it may accept
+ * new connections.
+ *
+ * @param backlog The maximum length of the queue of pending connections.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * acceptor.listen(boost::asio::socket_base::max_listen_connections, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID listen(int backlog, boost::system::error_code& ec)
+ {
+ impl_.get_service().listen(impl_.get_implementation(), backlog, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Close the acceptor.
+ /**
+ * This function is used to close the acceptor. Any asynchronous accept
+ * operations will be cancelled immediately.
+ *
+ * A subsequent call to open() is required before the acceptor can again be
+ * used to again perform socket accept operations.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void close()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the acceptor.
+ /**
+ * This function is used to close the acceptor. Any asynchronous accept
+ * operations will be cancelled immediately.
+ *
+ * A subsequent call to open() is required before the acceptor can again be
+ * used to again perform socket accept operations.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * acceptor.close(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native acceptor.
+ /**
+ * This function causes all outstanding asynchronous accept operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error. Ownership of the
+ * native acceptor is then transferred to the caller.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with boost::asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ boost::system::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native acceptor.
+ /**
+ * This function causes all outstanding asynchronous accept operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error. Ownership of the
+ * native acceptor is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with boost::asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(boost::system::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native acceptor representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * acceptor. This is intended to allow access to native acceptor functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the acceptor.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the acceptor.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Set an option on the acceptor.
+ /**
+ * This function is used to set an option on the acceptor.
+ *
+ * @param option The new option value to be set on the acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa SettableSocketOption @n
+ * boost::asio::socket_base::reuse_address
+ * boost::asio::socket_base::enable_connection_aborted
+ *
+ * @par Example
+ * Setting the SOL_SOCKET/SO_REUSEADDR option:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::acceptor::reuse_address option(true);
+ * acceptor.set_option(option);
+ * @endcode
+ */
+ template <typename SettableSocketOption>
+ void set_option(const SettableSocketOption& option)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
+ boost::asio::detail::throw_error(ec, "set_option");
+ }
+
+ /// Set an option on the acceptor.
+ /**
+ * This function is used to set an option on the acceptor.
+ *
+ * @param option The new option value to be set on the acceptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa SettableSocketOption @n
+ * boost::asio::socket_base::reuse_address
+ * boost::asio::socket_base::enable_connection_aborted
+ *
+ * @par Example
+ * Setting the SOL_SOCKET/SO_REUSEADDR option:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::acceptor::reuse_address option(true);
+ * boost::system::error_code ec;
+ * acceptor.set_option(option, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename SettableSocketOption>
+ BOOST_ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get an option from the acceptor.
+ /**
+ * This function is used to get the current value of an option on the
+ * acceptor.
+ *
+ * @param option The option value to be obtained from the acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa GettableSocketOption @n
+ * boost::asio::socket_base::reuse_address
+ *
+ * @par Example
+ * Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::acceptor::reuse_address option;
+ * acceptor.get_option(option);
+ * bool is_set = option.get();
+ * @endcode
+ */
+ template <typename GettableSocketOption>
+ void get_option(GettableSocketOption& option) const
+ {
+ boost::system::error_code ec;
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
+ boost::asio::detail::throw_error(ec, "get_option");
+ }
+
+ /// Get an option from the acceptor.
+ /**
+ * This function is used to get the current value of an option on the
+ * acceptor.
+ *
+ * @param option The option value to be obtained from the acceptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa GettableSocketOption @n
+ * boost::asio::socket_base::reuse_address
+ *
+ * @par Example
+ * Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::acceptor::reuse_address option;
+ * boost::system::error_code ec;
+ * acceptor.get_option(option, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * bool is_set = option.get();
+ * @endcode
+ */
+ template <typename GettableSocketOption>
+ BOOST_ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
+ boost::system::error_code& ec) const
+ {
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Perform an IO control command on the acceptor.
+ /**
+ * This function is used to execute an IO control command on the acceptor.
+ *
+ * @param command The IO control command to be performed on the acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa IoControlCommand @n
+ * boost::asio::socket_base::non_blocking_io
+ *
+ * @par Example
+ * Getting the number of bytes ready to read:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::acceptor::non_blocking_io command(true);
+ * socket.io_control(command);
+ * @endcode
+ */
+ template <typename IoControlCommand>
+ void io_control(IoControlCommand& command)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
+ boost::asio::detail::throw_error(ec, "io_control");
+ }
+
+ /// Perform an IO control command on the acceptor.
+ /**
+ * This function is used to execute an IO control command on the acceptor.
+ *
+ * @param command The IO control command to be performed on the acceptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa IoControlCommand @n
+ * boost::asio::socket_base::non_blocking_io
+ *
+ * @par Example
+ * Getting the number of bytes ready to read:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::acceptor::non_blocking_io command(true);
+ * boost::system::error_code ec;
+ * socket.io_control(command, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename IoControlCommand>
+ BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Gets the non-blocking mode of the acceptor.
+ /**
+ * @returns @c true if the acceptor's synchronous operations will fail with
+ * boost::asio::error::would_block if they are unable to perform the requested
+ * operation immediately. If @c false, synchronous operations will block
+ * until complete.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ bool non_blocking() const
+ {
+ return impl_.get_service().non_blocking(impl_.get_implementation());
+ }
+
+ /// Sets the non-blocking mode of the acceptor.
+ /**
+ * @param mode If @c true, the acceptor's synchronous operations will fail
+ * with boost::asio::error::would_block if they are unable to perform the
+ * requested operation immediately. If @c false, synchronous operations will
+ * block until complete.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ void non_blocking(bool mode)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
+ boost::asio::detail::throw_error(ec, "non_blocking");
+ }
+
+ /// Sets the non-blocking mode of the acceptor.
+ /**
+ * @param mode If @c true, the acceptor's synchronous operations will fail
+ * with boost::asio::error::would_block if they are unable to perform the
+ * requested operation immediately. If @c false, synchronous operations will
+ * block until complete.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ BOOST_ASIO_SYNC_OP_VOID non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Gets the non-blocking mode of the native acceptor implementation.
+ /**
+ * This function is used to retrieve the non-blocking mode of the underlying
+ * native acceptor. This mode has no effect on the behaviour of the acceptor
+ * object's synchronous operations.
+ *
+ * @returns @c true if the underlying acceptor is in non-blocking mode and
+ * direct system calls may fail with boost::asio::error::would_block (or the
+ * equivalent system error).
+ *
+ * @note The current non-blocking mode is cached by the acceptor object.
+ * Consequently, the return value may be incorrect if the non-blocking mode
+ * was set directly on the native acceptor.
+ */
+ bool native_non_blocking() const
+ {
+ return impl_.get_service().native_non_blocking(impl_.get_implementation());
+ }
+
+ /// Sets the non-blocking mode of the native acceptor implementation.
+ /**
+ * This function is used to modify the non-blocking mode of the underlying
+ * native acceptor. It has no effect on the behaviour of the acceptor object's
+ * synchronous operations.
+ *
+ * @param mode If @c true, the underlying acceptor is put into non-blocking
+ * mode and direct system calls may fail with boost::asio::error::would_block
+ * (or the equivalent system error).
+ *
+ * @throws boost::system::system_error Thrown on failure. If the @c mode is
+ * @c false, but the current value of @c non_blocking() is @c true, this
+ * function fails with boost::asio::error::invalid_argument, as the
+ * combination does not make sense.
+ */
+ void native_non_blocking(bool mode)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
+ boost::asio::detail::throw_error(ec, "native_non_blocking");
+ }
+
+ /// Sets the non-blocking mode of the native acceptor implementation.
+ /**
+ * This function is used to modify the non-blocking mode of the underlying
+ * native acceptor. It has no effect on the behaviour of the acceptor object's
+ * synchronous operations.
+ *
+ * @param mode If @c true, the underlying acceptor is put into non-blocking
+ * mode and direct system calls may fail with boost::asio::error::would_block
+ * (or the equivalent system error).
+ *
+ * @param ec Set to indicate what error occurred, if any. If the @c mode is
+ * @c false, but the current value of @c non_blocking() is @c true, this
+ * function fails with boost::asio::error::invalid_argument, as the
+ * combination does not make sense.
+ */
+ BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the local endpoint of the acceptor.
+ /**
+ * This function is used to obtain the locally bound endpoint of the acceptor.
+ *
+ * @returns An object that represents the local endpoint of the acceptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
+ * @endcode
+ */
+ endpoint_type local_endpoint() const
+ {
+ boost::system::error_code ec;
+ endpoint_type ep = impl_.get_service().local_endpoint(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "local_endpoint");
+ return ep;
+ }
+
+ /// Get the local endpoint of the acceptor.
+ /**
+ * This function is used to obtain the locally bound endpoint of the acceptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns An object that represents the local endpoint of the acceptor.
+ * Returns a default-constructed endpoint object if an error occurred and the
+ * error handler did not throw an exception.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ endpoint_type local_endpoint(boost::system::error_code& ec) const
+ {
+ return impl_.get_service().local_endpoint(impl_.get_implementation(), ec);
+ }
+
+ /// Wait for the acceptor to become ready to read, ready to write, or to have
+ /// pending error conditions.
+ /**
+ * This function is used to perform a blocking wait for an acceptor to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired acceptor state.
+ *
+ * @par Example
+ * Waiting for an acceptor to become readable.
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * acceptor.wait(boost::asio::ip::tcp::acceptor::wait_read);
+ * @endcode
+ */
+ void wait(wait_type w)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Wait for the acceptor to become ready to read, ready to write, or to have
+ /// pending error conditions.
+ /**
+ * This function is used to perform a blocking wait for an acceptor to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired acceptor state.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * Waiting for an acceptor to become readable.
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * acceptor.wait(boost::asio::ip::tcp::acceptor::wait_read, ec);
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
+ {
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Asynchronously wait for the acceptor to become ready to read, ready to
+ /// write, or to have pending error conditions.
+ /**
+ * This function is used to perform an asynchronous wait for an acceptor to
+ * enter a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired acceptor state.
+ *
+ * @param handler The handler to be called when the wait 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
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void wait_handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Wait succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * acceptor.async_wait(
+ * boost::asio::ip::tcp::acceptor::wait_read,
+ * wait_handler);
+ * @endcode
+ */
+ template <typename WaitHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
+ void (boost::system::error_code))
+ async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ return async_initiate<WaitHandler, void (boost::system::error_code)>(
+ initiate_async_wait(), handler, this, w);
+ }
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer into the
+ * given socket. The function call will block until a new connection has been
+ * accepted successfully or an error occurs.
+ *
+ * @param peer The socket into which the new connection will be accepted.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * acceptor.accept(socket);
+ * @endcode
+ */
+ template <typename Protocol1, typename Executor1>
+ void accept(basic_socket<Protocol1, Executor1>& peer,
+ typename enable_if<
+ is_convertible<Protocol, Protocol1>::value
+ >::type* = 0)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, static_cast<endpoint_type*>(0), ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer into the
+ * given socket. The function call will block until a new connection has been
+ * accepted successfully or an error occurs.
+ *
+ * @param peer The socket into which the new connection will be accepted.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::system::error_code ec;
+ * acceptor.accept(socket, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename Protocol1, typename Executor1>
+ BOOST_ASIO_SYNC_OP_VOID accept(
+ basic_socket<Protocol1, Executor1>& peer, boost::system::error_code& ec,
+ typename enable_if<
+ is_convertible<Protocol, Protocol1>::value
+ >::type* = 0)
+ {
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, static_cast<endpoint_type*>(0), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection into a
+ * socket. The function call always returns immediately.
+ *
+ * @param peer The socket into which the new connection will be accepted.
+ * Ownership of the peer object is retained by the caller, which must
+ * guarantee that it is valid until the handler is called.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * acceptor.async_accept(socket, accept_handler);
+ * @endcode
+ */
+ template <typename Protocol1, typename Executor1, typename AcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
+ void (boost::system::error_code))
+ async_accept(basic_socket<Protocol1, Executor1>& peer,
+ BOOST_ASIO_MOVE_ARG(AcceptHandler) handler,
+ typename enable_if<
+ is_convertible<Protocol, Protocol1>::value
+ >::type* = 0)
+ {
+ return async_initiate<AcceptHandler, void (boost::system::error_code)>(
+ initiate_async_accept(), handler, this,
+ &peer, static_cast<endpoint_type*>(0));
+ }
+
+ /// Accept a new connection and obtain the endpoint of the peer
+ /**
+ * This function is used to accept a new connection from a peer into the
+ * given socket, and additionally provide the endpoint of the remote peer.
+ * The function call will block until a new connection has been accepted
+ * successfully or an error occurs.
+ *
+ * @param peer The socket into which the new connection will be accepted.
+ *
+ * @param peer_endpoint An endpoint object which will receive the endpoint of
+ * the remote peer.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * acceptor.accept(socket, endpoint);
+ * @endcode
+ */
+ template <typename Executor1>
+ void accept(basic_socket<protocol_type, Executor1>& peer,
+ endpoint_type& peer_endpoint)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ }
+
+ /// Accept a new connection and obtain the endpoint of the peer
+ /**
+ * This function is used to accept a new connection from a peer into the
+ * given socket, and additionally provide the endpoint of the remote peer.
+ * The function call will block until a new connection has been accepted
+ * successfully or an error occurs.
+ *
+ * @param peer The socket into which the new connection will be accepted.
+ *
+ * @param peer_endpoint An endpoint object which will receive the endpoint of
+ * the remote peer.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::system::error_code ec;
+ * acceptor.accept(socket, endpoint, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename Executor1>
+ BOOST_ASIO_SYNC_OP_VOID accept(basic_socket<protocol_type, Executor1>& peer,
+ endpoint_type& peer_endpoint, boost::system::error_code& ec)
+ {
+ impl_.get_service().accept(
+ impl_.get_implementation(), peer, &peer_endpoint, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection into a
+ * socket, and additionally obtain the endpoint of the remote peer. The
+ * function call always returns immediately.
+ *
+ * @param peer The socket into which the new connection will be accepted.
+ * Ownership of the peer object is retained by the caller, which must
+ * guarantee that it is valid until the handler is called.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written. Ownership of the peer_endpoint object is
+ * retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename Executor1, typename AcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(AcceptHandler,
+ void (boost::system::error_code))
+ async_accept(basic_socket<protocol_type, Executor1>& peer,
+ endpoint_type& peer_endpoint, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler)
+ {
+ return async_initiate<AcceptHandler, void (boost::system::error_code)>(
+ initiate_async_accept(), handler, this, &peer, &peer_endpoint);
+ }
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(acceptor.accept());
+ * @endcode
+ */
+ typename Protocol::socket accept()
+ {
+ boost::system::error_code ec;
+ typename Protocol::socket peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(acceptor.accept(ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ typename Protocol::socket accept(boost::system::error_code& ec)
+ {
+ typename Protocol::socket peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ return peer;
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. The
+ * function call always returns immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * typename Protocol::socket peer // On success, the newly accepted socket.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error,
+ * boost::asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * acceptor.async_accept(accept_handler);
+ * @endcode
+ */
+ template <typename MoveAcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
+ void (boost::system::error_code, typename Protocol::socket))
+ async_accept(BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
+ {
+ return async_initiate<MoveAcceptHandler,
+ void (boost::system::error_code, typename Protocol::socket)>(
+ initiate_async_move_accept(), handler, this,
+ impl_.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket*>(0));
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly
+ * accepted socket.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(acceptor.accept());
+ * @endcode
+ */
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const Executor1& ex,
+ typename enable_if<
+ is_executor<Executor1>::value
+ >::type* = 0)
+ {
+ boost::system::error_code ec;
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(acceptor.accept());
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ boost::system::error_code ec;
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly accepted
+ * socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(acceptor.accept(my_context2, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const Executor1& ex, boost::system::error_code& ec,
+ typename enable_if<
+ is_executor<Executor1>::value
+ >::type* = 0)
+ {
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::socket socket(acceptor.accept(my_context2, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context, boost::system::error_code& ec,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ return peer;
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. The
+ * function call always returns immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly accepted
+ * socket.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other peer // On success, the newly accepted socket.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error,
+ * boost::asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * acceptor.async_accept(my_context2, accept_handler);
+ * @endcode
+ */
+ template <typename Executor1, typename MoveAcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
+ void (boost::system::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other))
+ async_accept(const Executor1& ex,
+ BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler,
+ typename enable_if<
+ is_executor<Executor1>::value
+ >::type* = 0)
+ {
+ typedef typename Protocol::socket::template rebind_executor<
+ Executor1>::other other_socket_type;
+
+ return async_initiate<MoveAcceptHandler,
+ void (boost::system::error_code, other_socket_type)>(
+ initiate_async_move_accept(), handler, this,
+ ex, static_cast<endpoint_type*>(0),
+ static_cast<other_socket_type*>(0));
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. The
+ * function call always returns immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other peer
+ * // On success, the newly accepted socket.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error,
+ * boost::asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * acceptor.async_accept(my_context2, accept_handler);
+ * @endcode
+ */
+ template <typename ExecutionContext, typename MoveAcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
+ void (boost::system::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other))
+ async_accept(ExecutionContext& context,
+ BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ typedef typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other other_socket_type;
+
+ return async_initiate<MoveAcceptHandler,
+ void (boost::system::error_code, other_socket_type)>(
+ initiate_async_move_accept(), handler, this,
+ context.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<other_socket_type*>(0));
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::asio::ip::tcp::socket socket(acceptor.accept(endpoint));
+ * @endcode
+ */
+ typename Protocol::socket accept(endpoint_type& peer_endpoint)
+ {
+ boost::system::error_code ec;
+ typename Protocol::socket peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::asio::ip::tcp::socket socket(acceptor.accept(endpoint, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ typename Protocol::socket accept(
+ endpoint_type& peer_endpoint, boost::system::error_code& ec)
+ {
+ typename Protocol::socket peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ return peer;
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. The
+ * function call always returns immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written. Ownership of the peer_endpoint object is
+ * retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * typename Protocol::socket peer // On success, the newly accepted socket.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error,
+ * boost::asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * acceptor.async_accept(endpoint, accept_handler);
+ * @endcode
+ */
+ template <typename MoveAcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
+ void (boost::system::error_code, typename Protocol::socket))
+ async_accept(endpoint_type& peer_endpoint,
+ BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler)
+ {
+ return async_initiate<MoveAcceptHandler,
+ void (boost::system::error_code, typename Protocol::socket)>(
+ initiate_async_move_accept(), handler, this,
+ impl_.get_executor(), &peer_endpoint,
+ static_cast<typename Protocol::socket*>(0));
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly accepted
+ * socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::asio::ip::tcp::socket socket(
+ * acceptor.accept(my_context2, endpoint));
+ * @endcode
+ */
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const Executor1& ex, endpoint_type& peer_endpoint,
+ typename enable_if<
+ is_executor<Executor1>::value
+ >::type* = 0)
+ {
+ boost::system::error_code ec;
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::asio::ip::tcp::socket socket(
+ * acceptor.accept(my_context2, endpoint));
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context, endpoint_type& peer_endpoint,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ boost::system::error_code ec;
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ boost::asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly accepted
+ * socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::asio::ip::tcp::socket socket(
+ * acceptor.accept(my_context2, endpoint, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const executor_type& ex,
+ endpoint_type& peer_endpoint, boost::system::error_code& ec,
+ typename enable_if<
+ is_executor<Executor1>::value
+ >::type* = 0)
+ {
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * boost::asio::ip::tcp::socket socket(
+ * acceptor.accept(my_context2, endpoint, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context,
+ endpoint_type& peer_endpoint, boost::system::error_code& ec,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ return peer;
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. The
+ * function call always returns immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly accepted
+ * socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written. Ownership of the peer_endpoint object is
+ * retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other peer // On success, the newly accepted socket.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error,
+ * boost::asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * acceptor.async_accept(my_context2, endpoint, accept_handler);
+ * @endcode
+ */
+ template <typename Executor1, typename MoveAcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
+ void (boost::system::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other))
+ async_accept(const Executor1& ex, endpoint_type& peer_endpoint,
+ BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler,
+ typename enable_if<
+ is_executor<Executor1>::value
+ >::type* = 0)
+ {
+ typedef typename Protocol::socket::template rebind_executor<
+ Executor1>::other other_socket_type;
+
+ return async_initiate<MoveAcceptHandler,
+ void (boost::system::error_code, other_socket_type)>(
+ initiate_async_move_accept(), handler, this,
+ ex, &peer_endpoint,
+ static_cast<other_socket_type*>(0));
+ }
+
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. The
+ * function call always returns immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written. Ownership of the peer_endpoint object is
+ * retained by the caller, which must guarantee that it is valid until the
+ * handler is called.
+ *
+ * @param handler The handler to be called when the accept 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.
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other peer
+ * // On success, the newly accepted socket.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const boost::system::error_code& error,
+ * boost::asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::ip::tcp::endpoint endpoint;
+ * acceptor.async_accept(my_context2, endpoint, accept_handler);
+ * @endcode
+ */
+ template <typename ExecutionContext, typename MoveAcceptHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
+ void (boost::system::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other))
+ async_accept(ExecutionContext& context,
+ endpoint_type& peer_endpoint,
+ BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ typedef typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other other_socket_type;
+
+ return async_initiate<MoveAcceptHandler,
+ void (boost::system::error_code, other_socket_type)>(
+ initiate_async_move_accept(), handler, this,
+ context.get_executor(), &peer_endpoint,
+ static_cast<other_socket_type*>(0));
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+private:
+ // Disallow copying and assignment.
+ basic_socket_acceptor(const basic_socket_acceptor&) BOOST_ASIO_DELETED;
+ basic_socket_acceptor& operator=(
+ const basic_socket_acceptor&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_wait
+ {
+ template <typename WaitHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler,
+ basic_socket_acceptor* self, wait_type w) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WaitHandler.
+ BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
+
+ detail::non_const_lvalue<WaitHandler> handler2(handler);
+ self->impl_.get_service().async_wait(
+ self->impl_.get_implementation(), w, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_accept
+ {
+ template <typename AcceptHandler, typename Protocol1, typename Executor1>
+ void operator()(BOOST_ASIO_MOVE_ARG(AcceptHandler) handler,
+ basic_socket_acceptor* self, basic_socket<Protocol1, Executor1>* peer,
+ endpoint_type* peer_endpoint) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a AcceptHandler.
+ BOOST_ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
+
+ detail::non_const_lvalue<AcceptHandler> handler2(handler);
+ self->impl_.get_service().async_accept(
+ self->impl_.get_implementation(), *peer, peer_endpoint,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_move_accept
+ {
+ template <typename MoveAcceptHandler, typename Executor1, typename Socket>
+ void operator()(BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler,
+ basic_socket_acceptor* self, const Executor1& peer_ex,
+ endpoint_type* peer_endpoint, Socket*) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a MoveAcceptHandler.
+ BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK(
+ MoveAcceptHandler, handler, Socket) type_check;
+
+ detail::non_const_lvalue<MoveAcceptHandler> handler2(handler);
+ self->impl_.get_service().async_move_accept(
+ self->impl_.get_implementation(), peer_ex, peer_endpoint,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ detail::io_object_impl<
+ detail::null_socket_service<Protocol>, Executor> impl_;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+ detail::io_object_impl<
+ detail::win_iocp_socket_service<Protocol>, Executor> impl_;
+#else
+ detail::io_object_impl<
+ detail::reactive_socket_service<Protocol>, Executor> impl_;
+#endif
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_socket_iostream.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_socket_iostream.hpp
new file mode 100644
index 00000000000..b6d449d669e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_socket_iostream.hpp
@@ -0,0 +1,409 @@
+//
+// basic_socket_iostream.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_SOCKET_IOSTREAM_HPP
+#define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_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_NO_IOSTREAM)
+
+#include <istream>
+#include <ostream>
+#include <boost/asio/basic_socket_streambuf.hpp>
+
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+# include <boost/asio/detail/variadic_templates.hpp>
+
+// A macro that should expand to:
+// template <typename T1, ..., typename Tn>
+// explicit basic_socket_iostream(T1 x1, ..., Tn xn)
+// : std::basic_iostream<char>(
+// &this->detail::socket_iostream_base<
+// Protocol, Clock, WaitTraits>::streambuf_)
+// {
+// if (rdbuf()->connect(x1, ..., xn) == 0)
+// this->setstate(std::ios_base::failbit);
+// }
+// This macro should only persist within this file.
+
+# define BOOST_ASIO_PRIVATE_CTR_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ explicit basic_socket_iostream(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
+ : std::basic_iostream<char>( \
+ &this->detail::socket_iostream_base< \
+ Protocol, Clock, WaitTraits>::streambuf_) \
+ { \
+ this->setf(std::ios_base::unitbuf); \
+ if (rdbuf()->connect(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
+ this->setstate(std::ios_base::failbit); \
+ } \
+ /**/
+
+// A macro that should expand to:
+// template <typename T1, ..., typename Tn>
+// void connect(T1 x1, ..., Tn xn)
+// {
+// if (rdbuf()->connect(x1, ..., xn) == 0)
+// this->setstate(std::ios_base::failbit);
+// }
+// This macro should only persist within this file.
+
+# define BOOST_ASIO_PRIVATE_CONNECT_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void connect(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
+ { \
+ if (rdbuf()->connect(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
+ this->setstate(std::ios_base::failbit); \
+ } \
+ /**/
+
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// A separate base class is used to ensure that the streambuf is initialised
+// prior to the basic_socket_iostream's basic_iostream base class.
+template <typename Protocol, typename Clock, typename WaitTraits>
+class socket_iostream_base
+{
+protected:
+ socket_iostream_base()
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ socket_iostream_base(socket_iostream_base&& other)
+ : streambuf_(std::move(other.streambuf_))
+ {
+ }
+
+ socket_iostream_base(basic_stream_socket<Protocol> s)
+ : streambuf_(std::move(s))
+ {
+ }
+
+ socket_iostream_base& operator=(socket_iostream_base&& other)
+ {
+ streambuf_ = std::move(other.streambuf_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ basic_socket_streambuf<Protocol, Clock, WaitTraits> streambuf_;
+};
+
+} // namespace detail
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol,
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typename Clock = boost::posix_time::ptime,
+ typename WaitTraits = time_traits<Clock> >
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typename Clock = chrono::steady_clock,
+ typename WaitTraits = wait_traits<Clock> >
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+class basic_socket_iostream;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+
+/// Iostream interface for a socket.
+#if defined(GENERATING_DOCUMENTATION)
+template <typename Protocol,
+ typename Clock = chrono::steady_clock,
+ typename WaitTraits = wait_traits<Clock> >
+#else // defined(GENERATING_DOCUMENTATION)
+template <typename Protocol, typename Clock, typename WaitTraits>
+#endif // defined(GENERATING_DOCUMENTATION)
+class basic_socket_iostream
+ : private detail::socket_iostream_base<Protocol, Clock, WaitTraits>,
+ public std::basic_iostream<char>
+{
+private:
+ // These typedefs are intended keep this class's implementation independent
+ // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typedef WaitTraits traits_helper;
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+
+public:
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// The clock type.
+ typedef Clock clock_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// (Deprecated: Use time_point.) The time type.
+ typedef typename WaitTraits::time_type time_type;
+
+ /// The time type.
+ typedef typename WaitTraits::time_point time_point;
+
+ /// (Deprecated: Use duration.) The duration type.
+ typedef typename WaitTraits::duration_type duration_type;
+
+ /// The duration type.
+ typedef typename WaitTraits::duration duration;
+#else
+# if !defined(BOOST_ASIO_NO_DEPRECATED)
+ typedef typename traits_helper::time_type time_type;
+ typedef typename traits_helper::duration_type duration_type;
+# endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+ typedef typename traits_helper::time_type time_point;
+ typedef typename traits_helper::duration_type duration;
+#endif
+
+ /// Construct a basic_socket_iostream without establishing a connection.
+ basic_socket_iostream()
+ : std::basic_iostream<char>(
+ &this->detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>::streambuf_)
+ {
+ this->setf(std::ios_base::unitbuf);
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Construct a basic_socket_iostream from the supplied socket.
+ explicit basic_socket_iostream(basic_stream_socket<protocol_type> s)
+ : detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>(std::move(s)),
+ std::basic_iostream<char>(
+ &this->detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>::streambuf_)
+ {
+ this->setf(std::ios_base::unitbuf);
+ }
+
+#if defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE) \
+ || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_socket_iostream from another.
+ basic_socket_iostream(basic_socket_iostream&& other)
+ : detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>(std::move(other)),
+ std::basic_iostream<char>(std::move(other))
+ {
+ this->set_rdbuf(&this->detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>::streambuf_);
+ }
+
+ /// Move-assign a basic_socket_iostream from another.
+ basic_socket_iostream& operator=(basic_socket_iostream&& other)
+ {
+ std::basic_iostream<char>::operator=(std::move(other));
+ detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE)
+ // || defined(GENERATING_DOCUMENTATION)
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// Establish a connection to an endpoint corresponding to a resolver query.
+ /**
+ * This constructor automatically establishes a connection based on the
+ * supplied resolver query parameters. The arguments are used to construct
+ * a resolver query object.
+ */
+ template <typename T1, ..., typename TN>
+ explicit basic_socket_iostream(T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ explicit basic_socket_iostream(T... x)
+ : std::basic_iostream<char>(
+ &this->detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>::streambuf_)
+ {
+ this->setf(std::ios_base::unitbuf);
+ if (rdbuf()->connect(x...) == 0)
+ this->setstate(std::ios_base::failbit);
+ }
+#else
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CTR_DEF)
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// Establish a connection to an endpoint corresponding to a resolver query.
+ /**
+ * This function automatically establishes a connection based on the supplied
+ * resolver query parameters. The arguments are used to construct a resolver
+ * query object.
+ */
+ template <typename T1, ..., typename TN>
+ void connect(T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ void connect(T... x)
+ {
+ if (rdbuf()->connect(x...) == 0)
+ this->setstate(std::ios_base::failbit);
+ }
+#else
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CONNECT_DEF)
+#endif
+
+ /// Close the connection.
+ void close()
+ {
+ if (rdbuf()->close() == 0)
+ this->setstate(std::ios_base::failbit);
+ }
+
+ /// Return a pointer to the underlying streambuf.
+ basic_socket_streambuf<Protocol, Clock, WaitTraits>* rdbuf() const
+ {
+ return const_cast<basic_socket_streambuf<Protocol, Clock, WaitTraits>*>(
+ &this->detail::socket_iostream_base<
+ Protocol, Clock, WaitTraits>::streambuf_);
+ }
+
+ /// Get a reference to the underlying socket.
+ basic_socket<Protocol>& socket()
+ {
+ return rdbuf()->socket();
+ }
+
+ /// Get the last error associated with the stream.
+ /**
+ * @return An \c error_code corresponding to the last error from the stream.
+ *
+ * @par Example
+ * To print the error associated with a failure to establish a connection:
+ * @code tcp::iostream s("www.boost.org", "http");
+ * if (!s)
+ * {
+ * std::cout << "Error: " << s.error().message() << std::endl;
+ * } @endcode
+ */
+ const boost::system::error_code& error() const
+ {
+ return rdbuf()->error();
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use expiry().) Get the stream's expiry time as an absolute
+ /// time.
+ /**
+ * @return An absolute time value representing the stream's expiry time.
+ */
+ time_point expires_at() const
+ {
+ return rdbuf()->expires_at();
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Get the stream's expiry time as an absolute time.
+ /**
+ * @return An absolute time value representing the stream's expiry time.
+ */
+ time_point expiry() const
+ {
+ return rdbuf()->expiry();
+ }
+
+ /// Set the stream's expiry time as an absolute time.
+ /**
+ * This function sets the expiry time associated with the stream. Stream
+ * operations performed after this time (where the operations cannot be
+ * completed using the internal buffers) will fail with the error
+ * boost::asio::error::operation_aborted.
+ *
+ * @param expiry_time The expiry time to be used for the stream.
+ */
+ void expires_at(const time_point& expiry_time)
+ {
+ rdbuf()->expires_at(expiry_time);
+ }
+
+ /// Set the stream's expiry time relative to now.
+ /**
+ * This function sets the expiry time associated with the stream. Stream
+ * operations performed after this time (where the operations cannot be
+ * completed using the internal buffers) will fail with the error
+ * boost::asio::error::operation_aborted.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ */
+ void expires_after(const duration& expiry_time)
+ {
+ rdbuf()->expires_after(expiry_time);
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use expiry().) Get the stream's expiry time relative to now.
+ /**
+ * @return A relative time value representing the stream's expiry time.
+ */
+ duration expires_from_now() const
+ {
+ return rdbuf()->expires_from_now();
+ }
+
+ /// (Deprecated: Use expires_after().) Set the stream's expiry time relative
+ /// to now.
+ /**
+ * This function sets the expiry time associated with the stream. Stream
+ * operations performed after this time (where the operations cannot be
+ * completed using the internal buffers) will fail with the error
+ * boost::asio::error::operation_aborted.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ */
+ void expires_from_now(const duration& expiry_time)
+ {
+ rdbuf()->expires_from_now(expiry_time);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+private:
+ // Disallow copying and assignment.
+ basic_socket_iostream(const basic_socket_iostream&) BOOST_ASIO_DELETED;
+ basic_socket_iostream& operator=(
+ const basic_socket_iostream&) BOOST_ASIO_DELETED;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+# undef BOOST_ASIO_PRIVATE_CTR_DEF
+# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_BASIC_SOCKET_IOSTREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_socket_streambuf.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_socket_streambuf.hpp
new file mode 100644
index 00000000000..99106020e75
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_socket_streambuf.hpp
@@ -0,0 +1,689 @@
+//
+// basic_socket_streambuf.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_SOCKET_STREAMBUF_HPP
+#define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_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_NO_IOSTREAM)
+
+#include <streambuf>
+#include <vector>
+#include <boost/asio/basic_socket.hpp>
+#include <boost/asio/basic_stream_socket.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/io_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+# include <boost/asio/detail/deadline_timer_service.hpp>
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+# include <boost/asio/steady_timer.hpp>
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+# include <boost/asio/detail/variadic_templates.hpp>
+
+// A macro that should expand to:
+// template <typename T1, ..., typename Tn>
+// basic_socket_streambuf* connect(T1 x1, ..., Tn xn)
+// {
+// init_buffers();
+// typedef typename Protocol::resolver resolver_type;
+// resolver_type resolver(socket().get_executor());
+// connect_to_endpoints(
+// resolver.resolve(x1, ..., xn, ec_));
+// return !ec_ ? this : 0;
+// }
+// This macro should only persist within this file.
+
+# define BOOST_ASIO_PRIVATE_CONNECT_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ basic_socket_streambuf* connect(BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n)) \
+ { \
+ init_buffers(); \
+ typedef typename Protocol::resolver resolver_type; \
+ resolver_type resolver(socket().get_executor()); \
+ connect_to_endpoints( \
+ resolver.resolve(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n), ec_)); \
+ return !ec_ ? this : 0; \
+ } \
+ /**/
+
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// A separate base class is used to ensure that the io_context member is
+// initialised prior to the basic_socket_streambuf's basic_socket base class.
+class socket_streambuf_io_context
+{
+protected:
+ socket_streambuf_io_context(io_context* ctx)
+ : default_io_context_(ctx)
+ {
+ }
+
+ shared_ptr<io_context> default_io_context_;
+};
+
+// A separate base class is used to ensure that the dynamically allocated
+// buffers are constructed prior to the basic_socket_streambuf's basic_socket
+// base class. This makes moving the socket is the last potentially throwing
+// step in the streambuf's move constructor, giving the constructor a strong
+// exception safety guarantee.
+class socket_streambuf_buffers
+{
+protected:
+ socket_streambuf_buffers()
+ : get_buffer_(buffer_size),
+ put_buffer_(buffer_size)
+ {
+ }
+
+ enum { buffer_size = 512 };
+ std::vector<char> get_buffer_;
+ std::vector<char> put_buffer_;
+};
+
+} // namespace detail
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol,
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typename Clock = boost::posix_time::ptime,
+ typename WaitTraits = time_traits<Clock> >
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typename Clock = chrono::steady_clock,
+ typename WaitTraits = wait_traits<Clock> >
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+class basic_socket_streambuf;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+
+/// Iostream streambuf for a socket.
+#if defined(GENERATING_DOCUMENTATION)
+template <typename Protocol,
+ typename Clock = chrono::steady_clock,
+ typename WaitTraits = wait_traits<Clock> >
+#else // defined(GENERATING_DOCUMENTATION)
+template <typename Protocol, typename Clock, typename WaitTraits>
+#endif // defined(GENERATING_DOCUMENTATION)
+class basic_socket_streambuf
+ : public std::streambuf,
+ private detail::socket_streambuf_io_context,
+ private detail::socket_streambuf_buffers,
+#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+ private basic_socket<Protocol>
+#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+ public basic_socket<Protocol>
+#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+{
+private:
+ // These typedefs are intended keep this class's implementation independent
+ // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typedef WaitTraits traits_helper;
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+
+public:
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// The clock type.
+ typedef Clock clock_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// (Deprecated: Use time_point.) The time type.
+ typedef typename WaitTraits::time_type time_type;
+
+ /// The time type.
+ typedef typename WaitTraits::time_point time_point;
+
+ /// (Deprecated: Use duration.) The duration type.
+ typedef typename WaitTraits::duration_type duration_type;
+
+ /// The duration type.
+ typedef typename WaitTraits::duration duration;
+#else
+# if !defined(BOOST_ASIO_NO_DEPRECATED)
+ typedef typename traits_helper::time_type time_type;
+ typedef typename traits_helper::duration_type duration_type;
+# endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+ typedef typename traits_helper::time_type time_point;
+ typedef typename traits_helper::duration_type duration;
+#endif
+
+ /// Construct a basic_socket_streambuf without establishing a connection.
+ basic_socket_streambuf()
+ : detail::socket_streambuf_io_context(new io_context),
+ basic_socket<Protocol>(*default_io_context_),
+ expiry_time_(max_expiry_time())
+ {
+ init_buffers();
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Construct a basic_socket_streambuf from the supplied socket.
+ explicit basic_socket_streambuf(basic_stream_socket<protocol_type> s)
+ : detail::socket_streambuf_io_context(0),
+ basic_socket<Protocol>(std::move(s)),
+ expiry_time_(max_expiry_time())
+ {
+ init_buffers();
+ }
+
+ /// Move-construct a basic_socket_streambuf from another.
+ basic_socket_streambuf(basic_socket_streambuf&& other)
+ : detail::socket_streambuf_io_context(other),
+ basic_socket<Protocol>(std::move(other.socket())),
+ ec_(other.ec_),
+ expiry_time_(other.expiry_time_)
+ {
+ get_buffer_.swap(other.get_buffer_);
+ put_buffer_.swap(other.put_buffer_);
+ setg(other.eback(), other.gptr(), other.egptr());
+ setp(other.pptr(), other.epptr());
+ other.ec_ = boost::system::error_code();
+ other.expiry_time_ = max_expiry_time();
+ other.init_buffers();
+ }
+
+ /// Move-assign a basic_socket_streambuf from another.
+ basic_socket_streambuf& operator=(basic_socket_streambuf&& other)
+ {
+ this->close();
+ socket() = std::move(other.socket());
+ detail::socket_streambuf_io_context::operator=(other);
+ ec_ = other.ec_;
+ expiry_time_ = other.expiry_time_;
+ get_buffer_.swap(other.get_buffer_);
+ put_buffer_.swap(other.put_buffer_);
+ setg(other.eback(), other.gptr(), other.egptr());
+ setp(other.pptr(), other.epptr());
+ other.ec_ = boost::system::error_code();
+ other.expiry_time_ = max_expiry_time();
+ other.put_buffer_.resize(buffer_size);
+ other.init_buffers();
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destructor flushes buffered data.
+ virtual ~basic_socket_streambuf()
+ {
+ if (pptr() != pbase())
+ overflow(traits_type::eof());
+ }
+
+ /// Establish a connection.
+ /**
+ * This function establishes a connection to the specified endpoint.
+ *
+ * @return \c this if a connection was successfully established, a null
+ * pointer otherwise.
+ */
+ basic_socket_streambuf* connect(const endpoint_type& endpoint)
+ {
+ init_buffers();
+ ec_ = boost::system::error_code();
+ this->connect_to_endpoints(&endpoint, &endpoint + 1);
+ return !ec_ ? this : 0;
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// Establish a connection.
+ /**
+ * This function automatically establishes a connection based on the supplied
+ * resolver query parameters. The arguments are used to construct a resolver
+ * query object.
+ *
+ * @return \c this if a connection was successfully established, a null
+ * pointer otherwise.
+ */
+ template <typename T1, ..., typename TN>
+ basic_socket_streambuf* connect(T1 t1, ..., TN tn);
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename... T>
+ basic_socket_streambuf* connect(T... x)
+ {
+ init_buffers();
+ typedef typename Protocol::resolver resolver_type;
+ resolver_type resolver(socket().get_executor());
+ connect_to_endpoints(resolver.resolve(x..., ec_));
+ return !ec_ ? this : 0;
+ }
+#else
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CONNECT_DEF)
+#endif
+
+ /// Close the connection.
+ /**
+ * @return \c this if a connection was successfully established, a null
+ * pointer otherwise.
+ */
+ basic_socket_streambuf* close()
+ {
+ sync();
+ socket().close(ec_);
+ if (!ec_)
+ init_buffers();
+ return !ec_ ? this : 0;
+ }
+
+ /// Get a reference to the underlying socket.
+ basic_socket<Protocol>& socket()
+ {
+ return *this;
+ }
+
+ /// Get the last error associated with the stream buffer.
+ /**
+ * @return An \c error_code corresponding to the last error from the stream
+ * buffer.
+ */
+ const boost::system::error_code& error() const
+ {
+ return ec_;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use error().) Get the last error associated with the stream
+ /// buffer.
+ /**
+ * @return An \c error_code corresponding to the last error from the stream
+ * buffer.
+ */
+ const boost::system::error_code& puberror() const
+ {
+ return error();
+ }
+
+ /// (Deprecated: Use expiry().) Get the stream buffer's expiry time as an
+ /// absolute time.
+ /**
+ * @return An absolute time value representing the stream buffer's expiry
+ * time.
+ */
+ time_point expires_at() const
+ {
+ return expiry_time_;
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Get the stream buffer's expiry time as an absolute time.
+ /**
+ * @return An absolute time value representing the stream buffer's expiry
+ * time.
+ */
+ time_point expiry() const
+ {
+ return expiry_time_;
+ }
+
+ /// Set the stream buffer's expiry time as an absolute time.
+ /**
+ * This function sets the expiry time associated with the stream. Stream
+ * operations performed after this time (where the operations cannot be
+ * completed using the internal buffers) will fail with the error
+ * boost::asio::error::operation_aborted.
+ *
+ * @param expiry_time The expiry time to be used for the stream.
+ */
+ void expires_at(const time_point& expiry_time)
+ {
+ expiry_time_ = expiry_time;
+ }
+
+ /// Set the stream buffer's expiry time relative to now.
+ /**
+ * This function sets the expiry time associated with the stream. Stream
+ * operations performed after this time (where the operations cannot be
+ * completed using the internal buffers) will fail with the error
+ * boost::asio::error::operation_aborted.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ */
+ void expires_after(const duration& expiry_time)
+ {
+ expiry_time_ = traits_helper::add(traits_helper::now(), expiry_time);
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use expiry().) Get the stream buffer's expiry time relative
+ /// to now.
+ /**
+ * @return A relative time value representing the stream buffer's expiry time.
+ */
+ duration expires_from_now() const
+ {
+ return traits_helper::subtract(expires_at(), traits_helper::now());
+ }
+
+ /// (Deprecated: Use expires_after().) Set the stream buffer's expiry time
+ /// relative to now.
+ /**
+ * This function sets the expiry time associated with the stream. Stream
+ * operations performed after this time (where the operations cannot be
+ * completed using the internal buffers) will fail with the error
+ * boost::asio::error::operation_aborted.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ */
+ void expires_from_now(const duration& expiry_time)
+ {
+ expiry_time_ = traits_helper::add(traits_helper::now(), expiry_time);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+protected:
+ int_type underflow()
+ {
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ ec_ = boost::asio::error::operation_not_supported;
+ return traits_type::eof();
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ if (gptr() != egptr())
+ return traits_type::eof();
+
+ for (;;)
+ {
+ // Check if we are past the expiry time.
+ if (traits_helper::less_than(expiry_time_, traits_helper::now()))
+ {
+ ec_ = boost::asio::error::timed_out;
+ return traits_type::eof();
+ }
+
+ // Try to complete the operation without blocking.
+ if (!socket().native_non_blocking())
+ socket().native_non_blocking(true, ec_);
+ detail::buffer_sequence_adapter<mutable_buffer, mutable_buffer>
+ bufs(boost::asio::buffer(get_buffer_) + putback_max);
+ detail::signed_size_type bytes = detail::socket_ops::recv(
+ socket().native_handle(), bufs.buffers(), bufs.count(), 0, ec_);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ setg(&get_buffer_[0], &get_buffer_[0] + putback_max,
+ &get_buffer_[0] + putback_max + bytes);
+ return traits_type::to_int_type(*gptr());
+ }
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec_ = boost::asio::error::eof;
+ return traits_type::eof();
+ }
+
+ // Operation failed.
+ if (ec_ != boost::asio::error::would_block
+ && ec_ != boost::asio::error::try_again)
+ return traits_type::eof();
+
+ // Wait for socket to become ready.
+ if (detail::socket_ops::poll_read(
+ socket().native_handle(), 0, timeout(), ec_) < 0)
+ return traits_type::eof();
+ }
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ }
+
+ int_type overflow(int_type c)
+ {
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ ec_ = boost::asio::error::operation_not_supported;
+ return traits_type::eof();
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ char_type ch = traits_type::to_char_type(c);
+
+ // Determine what needs to be sent.
+ const_buffer output_buffer;
+ if (put_buffer_.empty())
+ {
+ if (traits_type::eq_int_type(c, traits_type::eof()))
+ return traits_type::not_eof(c); // Nothing to do.
+ output_buffer = boost::asio::buffer(&ch, sizeof(char_type));
+ }
+ else
+ {
+ output_buffer = boost::asio::buffer(pbase(),
+ (pptr() - pbase()) * sizeof(char_type));
+ }
+
+ while (output_buffer.size() > 0)
+ {
+ // Check if we are past the expiry time.
+ if (traits_helper::less_than(expiry_time_, traits_helper::now()))
+ {
+ ec_ = boost::asio::error::timed_out;
+ return traits_type::eof();
+ }
+
+ // Try to complete the operation without blocking.
+ if (!socket().native_non_blocking())
+ socket().native_non_blocking(true, ec_);
+ detail::buffer_sequence_adapter<
+ const_buffer, const_buffer> bufs(output_buffer);
+ detail::signed_size_type bytes = detail::socket_ops::send(
+ socket().native_handle(), bufs.buffers(), bufs.count(), 0, ec_);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ output_buffer += static_cast<std::size_t>(bytes);
+ continue;
+ }
+
+ // Operation failed.
+ if (ec_ != boost::asio::error::would_block
+ && ec_ != boost::asio::error::try_again)
+ return traits_type::eof();
+
+ // Wait for socket to become ready.
+ if (detail::socket_ops::poll_write(
+ socket().native_handle(), 0, timeout(), ec_) < 0)
+ return traits_type::eof();
+ }
+
+ if (!put_buffer_.empty())
+ {
+ setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
+
+ // If the new character is eof then our work here is done.
+ if (traits_type::eq_int_type(c, traits_type::eof()))
+ return traits_type::not_eof(c);
+
+ // Add the new character to the output buffer.
+ *pptr() = ch;
+ pbump(1);
+ }
+
+ return c;
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ }
+
+ int sync()
+ {
+ return overflow(traits_type::eof());
+ }
+
+ std::streambuf* setbuf(char_type* s, std::streamsize n)
+ {
+ if (pptr() == pbase() && s == 0 && n == 0)
+ {
+ put_buffer_.clear();
+ setp(0, 0);
+ sync();
+ return this;
+ }
+
+ return 0;
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_socket_streambuf(const basic_socket_streambuf&) BOOST_ASIO_DELETED;
+ basic_socket_streambuf& operator=(
+ const basic_socket_streambuf&) BOOST_ASIO_DELETED;
+
+ void init_buffers()
+ {
+ setg(&get_buffer_[0],
+ &get_buffer_[0] + putback_max,
+ &get_buffer_[0] + putback_max);
+
+ if (put_buffer_.empty())
+ setp(0, 0);
+ else
+ setp(&put_buffer_[0], &put_buffer_[0] + put_buffer_.size());
+ }
+
+ int timeout() const
+ {
+ int64_t msec = traits_helper::to_posix_duration(
+ traits_helper::subtract(expiry_time_,
+ traits_helper::now())).total_milliseconds();
+ if (msec > (std::numeric_limits<int>::max)())
+ msec = (std::numeric_limits<int>::max)();
+ else if (msec < 0)
+ msec = 0;
+ return static_cast<int>(msec);
+ }
+
+ template <typename EndpointSequence>
+ void connect_to_endpoints(const EndpointSequence& endpoints)
+ {
+ this->connect_to_endpoints(endpoints.begin(), endpoints.end());
+ }
+
+ template <typename EndpointIterator>
+ void connect_to_endpoints(EndpointIterator begin, EndpointIterator end)
+ {
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ ec_ = boost::asio::error::operation_not_supported;
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ if (ec_)
+ return;
+
+ ec_ = boost::asio::error::not_found;
+ for (EndpointIterator i = begin; i != end; ++i)
+ {
+ // Check if we are past the expiry time.
+ if (traits_helper::less_than(expiry_time_, traits_helper::now()))
+ {
+ ec_ = boost::asio::error::timed_out;
+ return;
+ }
+
+ // Close and reopen the socket.
+ typename Protocol::endpoint ep(*i);
+ socket().close(ec_);
+ socket().open(ep.protocol(), ec_);
+ if (ec_)
+ continue;
+
+ // Try to complete the operation without blocking.
+ if (!socket().native_non_blocking())
+ socket().native_non_blocking(true, ec_);
+ detail::socket_ops::connect(socket().native_handle(),
+ ep.data(), ep.size(), ec_);
+
+ // Check if operation succeeded.
+ if (!ec_)
+ return;
+
+ // Operation failed.
+ if (ec_ != boost::asio::error::in_progress
+ && ec_ != boost::asio::error::would_block)
+ continue;
+
+ // Wait for socket to become ready.
+ if (detail::socket_ops::poll_connect(
+ socket().native_handle(), timeout(), ec_) < 0)
+ continue;
+
+ // Get the error code from the connect operation.
+ int connect_error = 0;
+ size_t connect_error_len = sizeof(connect_error);
+ if (detail::socket_ops::getsockopt(socket().native_handle(), 0,
+ SOL_SOCKET, SO_ERROR, &connect_error, &connect_error_len, ec_)
+ == detail::socket_error_retval)
+ return;
+
+ // Check the result of the connect operation.
+ ec_ = boost::system::error_code(connect_error,
+ boost::asio::error::get_system_category());
+ if (!ec_)
+ return;
+ }
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ }
+
+ // Helper function to get the maximum expiry time.
+ static time_point max_expiry_time()
+ {
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ return boost::posix_time::pos_infin;
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ return (time_point::max)();
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+ }
+
+ enum { putback_max = 8 };
+ boost::system::error_code ec_;
+ time_point expiry_time_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+# undef BOOST_ASIO_PRIVATE_CONNECT_DEF
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_BASIC_SOCKET_STREAMBUF_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_stream_socket.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_stream_socket.hpp
new file mode 100644
index 00000000000..18d9daca50e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_stream_socket.hpp
@@ -0,0 +1,995 @@
+//
+// basic_stream_socket.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_STREAM_SOCKET_HPP
+#define BOOST_ASIO_BASIC_STREAM_SOCKET_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/basic_socket.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_stream_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+
+/// Provides stream-oriented socket functionality.
+/**
+ * The basic_stream_socket class template provides asynchronous and blocking
+ * stream-oriented socket functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Protocol, typename Executor>
+class basic_stream_socket
+ : public basic_socket<Protocol, Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_stream_socket<Protocol, Executor1> other;
+ };
+
+ /// The native representation of a socket.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// The protocol type.
+ typedef Protocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ /// Construct a basic_stream_socket without opening it.
+ /**
+ * This constructor creates a stream socket without opening it. The socket
+ * needs to be opened and then connected or accepted before data can be sent
+ * or received on it.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ */
+ explicit basic_stream_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_stream_socket without opening it.
+ /**
+ * This constructor creates a stream socket without opening it. The socket
+ * needs to be opened and then connected or accepted before data can be sent
+ * or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_socket(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context)
+ {
+ }
+
+ /// Construct and open a basic_stream_socket.
+ /**
+ * This constructor creates and opens a stream socket. The socket needs to be
+ * connected or accepted before data can be sent or received on it.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_stream_socket(const executor_type& ex, const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_stream_socket.
+ /**
+ * This constructor creates and opens a stream socket. The socket needs to be
+ * connected or accepted before data can be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_socket(ExecutionContext& context, const protocol_type& protocol,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol)
+ {
+ }
+
+ /// Construct a basic_stream_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a stream socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the stream
+ * socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_stream_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_stream_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a stream socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the stream
+ * socket will be bound.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_socket(ExecutionContext& context, const endpoint_type& endpoint,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
+ {
+ }
+
+ /// Construct a basic_stream_socket on an existing native socket.
+ /**
+ * This constructor creates a stream socket object to hold an existing native
+ * socket.
+ *
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_stream_socket(const executor_type& ex,
+ const protocol_type& protocol, const native_handle_type& native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_stream_socket on an existing native socket.
+ /**
+ * This constructor creates a stream socket object to hold an existing native
+ * socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_stream_socket from another.
+ /**
+ * This constructor moves a stream socket from one object to another.
+ *
+ * @param other The other basic_stream_socket 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_stream_socket(const executor_type&)
+ * constructor.
+ */
+ basic_stream_socket(basic_stream_socket&& other)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_socket from another.
+ /**
+ * This assignment operator moves a stream socket from one object to another.
+ *
+ * @param other The other basic_stream_socket 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_stream_socket(const executor_type&)
+ * constructor.
+ */
+ basic_stream_socket& operator=(basic_stream_socket&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_stream_socket from a socket of another protocol
+ /// type.
+ /**
+ * This constructor moves a stream socket from one object to another.
+ *
+ * @param other The other basic_stream_socket 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_stream_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ basic_stream_socket(basic_stream_socket<Protocol1, Executor1>&& other,
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ >::type* = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_socket from a socket of another protocol type.
+ /**
+ * This assignment operator moves a stream socket from one object to another.
+ *
+ * @param other The other basic_stream_socket 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_stream_socket(const executor_type&)
+ * constructor.
+ */
+ template <typename Protocol1, typename Executor1>
+ typename enable_if<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_stream_socket&
+ >::type operator=(basic_stream_socket<Protocol1, Executor1>&& other)
+ {
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the socket.
+ /**
+ * This function destroys the socket, cancelling any outstanding asynchronous
+ * operations associated with the socket as if by calling @c cancel.
+ */
+ ~basic_stream_socket()
+ {
+ }
+
+ /// Send some data on the socket.
+ /**
+ * This function is used to send data on the stream socket. The function
+ * call will block until one or more bytes of the data has been sent
+ * successfully, or an until error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The send 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.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.send(boost::asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on the socket.
+ /**
+ * This function is used to send data on the stream socket. The function
+ * call will block until one or more bytes of the data has been sent
+ * successfully, or an until error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @returns The number of bytes sent.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The send 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.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.send(boost::asio::buffer(data, size), 0);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "send");
+ return s;
+ }
+
+ /// Send some data on the socket.
+ /**
+ * This function is used to send data on the stream socket. The function
+ * call will block until one or more bytes of the data has been sent
+ * successfully, or an until error occurs.
+ *
+ * @param buffers One or more data buffers to be sent on the socket.
+ *
+ * @param flags Flags specifying how the send call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes sent. Returns 0 if an error occurred.
+ *
+ * @note The send 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 send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send data on the stream socket.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The send 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.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_send(boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous send.
+ /**
+ * This function is used to asynchronously send data on the stream socket.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be sent on the socket. 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 flags Flags specifying how the send call is to be made.
+ *
+ * @param handler The handler to be called when the send 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 sent.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The send 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.
+ *
+ * @par Example
+ * To send a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_send(boost::asio::buffer(data, size), 0, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on sending multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_send(const ConstBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this, buffers, flags);
+ }
+
+ /// Receive some data on the socket.
+ /**
+ * This function is used to receive data on the stream socket. The function
+ * call will block until one or more bytes of data has been received
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The receive operation may not receive 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.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.receive(boost::asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on the socket.
+ /**
+ * This function is used to receive data on the stream socket. The function
+ * call will block until one or more bytes of data has been received
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @returns The number of bytes received.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The receive operation may not receive 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.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.receive(boost::asio::buffer(data, size), 0);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ boost::asio::detail::throw_error(ec, "receive");
+ return s;
+ }
+
+ /// Receive some data on a connected socket.
+ /**
+ * This function is used to receive data on the stream socket. The function
+ * call will block until one or more bytes of data has been received
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ *
+ * @param flags Flags specifying how the receive call is to be made.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes received. Returns 0 if an error occurred.
+ *
+ * @note The receive operation may not receive 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 receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive data from the stream
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The receive operation may not receive 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 received before the asynchronous
+ * operation completes.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.async_receive(boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Start an asynchronous receive.
+ /**
+ * This function is used to asynchronously receive data from the stream
+ * socket. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be received.
+ * 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 flags Flags specifying how the receive call is to be made.
+ *
+ * @param handler The handler to be called when the receive 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 received.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The receive operation may not receive 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 received before the asynchronous
+ * operation completes.
+ *
+ * @par Example
+ * To receive into a single data buffer use the @ref buffer function as
+ * follows:
+ * @code
+ * socket.async_receive(boost::asio::buffer(data, size), 0, handler);
+ * @endcode
+ * See the @ref buffer documentation for information on receiving into
+ * multiple buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_receive(const MutableBufferSequence& buffers,
+ socket_base::message_flags flags,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this, buffers, flags);
+ }
+
+ /// Write some data to the socket.
+ /**
+ * This function is used to write data to the stream socket. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the socket.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.write_some(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.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the socket.
+ /**
+ * This function is used to write data to the stream socket. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the socket.
+ *
+ * @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 this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the stream socket.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be written to the socket.
+ * 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The write 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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_write_some(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 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)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_send(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+ /// Read some data from the socket.
+ /**
+ * This function is used to read data from the stream socket. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.read_some(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.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ boost::asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the socket.
+ /**
+ * This function is used to read data from the stream socket. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more 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 this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the stream socket.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more buffers 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 read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The read 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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * socket.async_read_some(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.
+ */
+ 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)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_receive(), handler, this,
+ buffers, socket_base::message_flags(0));
+ }
+
+private:
+ struct initiate_async_send
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_stream_socket* self, const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_send(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_receive
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_stream_socket* self, const MutableBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_receive(
+ self->impl_.get_implementation(), buffers, flags,
+ handler2.value, self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_STREAM_SOCKET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_streambuf.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_streambuf.hpp
new file mode 100644
index 00000000000..e2e9bf90718
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_streambuf.hpp
@@ -0,0 +1,454 @@
+//
+// basic_streambuf.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_STREAMBUF_HPP
+#define BOOST_ASIO_BASIC_STREAMBUF_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_NO_IOSTREAM)
+
+#include <algorithm>
+#include <cstring>
+#include <stdexcept>
+#include <streambuf>
+#include <vector>
+#include <boost/asio/basic_streambuf_fwd.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Automatically resizable buffer class based on std::streambuf.
+/**
+ * The @c basic_streambuf class is derived from @c std::streambuf to associate
+ * the streambuf's input and output sequences with one or more character
+ * arrays. These character arrays are internal to the @c basic_streambuf
+ * object, but direct access to the array elements is provided to permit them
+ * to be used efficiently with I/O operations. Characters written to the output
+ * sequence of a @c basic_streambuf object are appended to the input sequence
+ * of the same object.
+ *
+ * The @c basic_streambuf class's public interface is intended to permit the
+ * following implementation strategies:
+ *
+ * @li A single contiguous character array, which is reallocated as necessary
+ * to accommodate changes in the size of the character sequence. This is the
+ * implementation approach currently used in Asio.
+ *
+ * @li A sequence of one or more character arrays, where each array is of the
+ * same size. Additional character array objects are appended to the sequence
+ * to accommodate changes in the size of the character sequence.
+ *
+ * @li A sequence of one or more character arrays of varying sizes. Additional
+ * character array objects are appended to the sequence to accommodate changes
+ * in the size of the character sequence.
+ *
+ * The constructor for basic_streambuf accepts a @c size_t argument specifying
+ * the maximum of the sum of the sizes of the input sequence and output
+ * sequence. During the lifetime of the @c basic_streambuf object, the following
+ * invariant holds:
+ * @code size() <= max_size()@endcode
+ * Any member function that would, if successful, cause the invariant to be
+ * violated shall throw an exception of class @c std::length_error.
+ *
+ * The constructor for @c basic_streambuf takes an Allocator argument. A copy
+ * of this argument is used for any memory allocation performed, by the
+ * constructor and by all member functions, during the lifetime of each @c
+ * basic_streambuf object.
+ *
+ * @par Examples
+ * Writing directly from an streambuf to a socket:
+ * @code
+ * boost::asio::streambuf b;
+ * std::ostream os(&b);
+ * os << "Hello, World!\n";
+ *
+ * // try sending some data in input sequence
+ * size_t n = sock.send(b.data());
+ *
+ * b.consume(n); // sent data is removed from input sequence
+ * @endcode
+ *
+ * Reading from a socket directly into a streambuf:
+ * @code
+ * boost::asio::streambuf b;
+ *
+ * // reserve 512 bytes in output sequence
+ * boost::asio::streambuf::mutable_buffers_type bufs = b.prepare(512);
+ *
+ * size_t n = sock.receive(bufs);
+ *
+ * // received data is "committed" from output sequence to input sequence
+ * b.commit(n);
+ *
+ * std::istream is(&b);
+ * std::string s;
+ * is >> s;
+ * @endcode
+ */
+#if defined(GENERATING_DOCUMENTATION)
+template <typename Allocator = std::allocator<char> >
+#else
+template <typename Allocator>
+#endif
+class basic_streambuf
+ : public std::streambuf,
+ private noncopyable
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// The type used to represent the input sequence as a list of buffers.
+ typedef implementation_defined const_buffers_type;
+
+ /// The type used to represent the output sequence as a list of buffers.
+ typedef implementation_defined mutable_buffers_type;
+#else
+ typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
+ typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
+#endif
+
+ /// Construct a basic_streambuf object.
+ /**
+ * Constructs a streambuf with the specified maximum size. The initial size
+ * of the streambuf's input sequence is 0.
+ */
+ explicit basic_streambuf(
+ std::size_t maximum_size = (std::numeric_limits<std::size_t>::max)(),
+ const Allocator& allocator = Allocator())
+ : max_size_(maximum_size),
+ buffer_(allocator)
+ {
+ std::size_t pend = (std::min<std::size_t>)(max_size_, buffer_delta);
+ buffer_.resize((std::max<std::size_t>)(pend, 1));
+ setg(&buffer_[0], &buffer_[0], &buffer_[0]);
+ setp(&buffer_[0], &buffer_[0] + pend);
+ }
+
+ /// Get the size of the input sequence.
+ /**
+ * @returns The size of the input sequence. The value is equal to that
+ * calculated for @c s in the following code:
+ * @code
+ * size_t s = 0;
+ * const_buffers_type bufs = data();
+ * const_buffers_type::const_iterator i = bufs.begin();
+ * while (i != bufs.end())
+ * {
+ * const_buffer buf(*i++);
+ * s += buf.size();
+ * }
+ * @endcode
+ */
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return pptr() - gptr();
+ }
+
+ /// Get the maximum size of the basic_streambuf.
+ /**
+ * @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 basic_streambuf.
+ /**
+ * @returns The current total capacity of the streambuf, i.e. for both the
+ * input sequence and output sequence.
+ */
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return buffer_.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 all character arrays in the
+ * input sequence.
+ *
+ * @note The returned object is invalidated by any @c basic_streambuf member
+ * function that modifies the input sequence or output sequence.
+ */
+ const_buffers_type data() const BOOST_ASIO_NOEXCEPT
+ {
+ return boost::asio::buffer(boost::asio::const_buffer(gptr(),
+ (pptr() - gptr()) * sizeof(char_type)));
+ }
+
+ /// Get a list of buffers that represents the output sequence, with the given
+ /// size.
+ /**
+ * Ensures that the output sequence can accommodate @c n characters,
+ * reallocating character array objects as necessary.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing character array objects
+ * at the start of the output sequence such that the sum of the buffer sizes
+ * is @c n.
+ *
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ *
+ * @note The returned object is invalidated by any @c basic_streambuf member
+ * function that modifies the input sequence or output sequence.
+ */
+ mutable_buffers_type prepare(std::size_t n)
+ {
+ reserve(n);
+ return boost::asio::buffer(boost::asio::mutable_buffer(
+ pptr(), n * sizeof(char_type)));
+ }
+
+ /// Move characters from the output sequence to the input sequence.
+ /**
+ * Appends @c n characters from the start of the output sequence to the input
+ * sequence. The beginning of the output sequence is advanced by @c n
+ * characters.
+ *
+ * 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)
+ {
+ n = std::min<std::size_t>(n, epptr() - pptr());
+ pbump(static_cast<int>(n));
+ setg(eback(), gptr(), pptr());
+ }
+
+ /// 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)
+ {
+ if (egptr() < pptr())
+ setg(&buffer_[0], gptr(), pptr());
+ if (gptr() + n > pptr())
+ n = pptr() - gptr();
+ gbump(static_cast<int>(n));
+ }
+
+protected:
+ enum { buffer_delta = 128 };
+
+ /// Override std::streambuf behaviour.
+ /**
+ * Behaves according to the specification of @c std::streambuf::underflow().
+ */
+ int_type underflow()
+ {
+ if (gptr() < pptr())
+ {
+ setg(&buffer_[0], gptr(), pptr());
+ return traits_type::to_int_type(*gptr());
+ }
+ else
+ {
+ return traits_type::eof();
+ }
+ }
+
+ /// Override std::streambuf behaviour.
+ /**
+ * Behaves according to the specification of @c std::streambuf::overflow(),
+ * with the specialisation that @c std::length_error is thrown if appending
+ * the character to the input sequence would require the condition
+ * <tt>size() > max_size()</tt> to be true.
+ */
+ int_type overflow(int_type c)
+ {
+ if (!traits_type::eq_int_type(c, traits_type::eof()))
+ {
+ if (pptr() == epptr())
+ {
+ std::size_t buffer_size = pptr() - gptr();
+ if (buffer_size < max_size_ && max_size_ - buffer_size < buffer_delta)
+ {
+ reserve(max_size_ - buffer_size);
+ }
+ else
+ {
+ reserve(buffer_delta);
+ }
+ }
+
+ *pptr() = traits_type::to_char_type(c);
+ pbump(1);
+ return c;
+ }
+
+ return traits_type::not_eof(c);
+ }
+
+ void reserve(std::size_t n)
+ {
+ // Get current stream positions as offsets.
+ std::size_t gnext = gptr() - &buffer_[0];
+ std::size_t pnext = pptr() - &buffer_[0];
+ std::size_t pend = epptr() - &buffer_[0];
+
+ // Check if there is already enough space in the put area.
+ if (n <= pend - pnext)
+ {
+ return;
+ }
+
+ // Shift existing contents of get area to start of buffer.
+ if (gnext > 0)
+ {
+ pnext -= gnext;
+ std::memmove(&buffer_[0], &buffer_[0] + gnext, pnext);
+ }
+
+ // Ensure buffer is large enough to hold at least the specified size.
+ if (n > pend - pnext)
+ {
+ if (n <= max_size_ && pnext <= max_size_ - n)
+ {
+ pend = pnext + n;
+ buffer_.resize((std::max<std::size_t>)(pend, 1));
+ }
+ else
+ {
+ std::length_error ex("boost::asio::streambuf too long");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+ // Update stream positions.
+ setg(&buffer_[0], &buffer_[0], &buffer_[0] + pnext);
+ setp(&buffer_[0] + pnext, &buffer_[0] + pend);
+ }
+
+private:
+ std::size_t max_size_;
+ std::vector<char_type, Allocator> buffer_;
+
+ // Helper function to get the preferred size for reading data.
+ friend std::size_t read_size_helper(
+ basic_streambuf& sb, std::size_t max_size)
+ {
+ return std::min<std::size_t>(
+ std::max<std::size_t>(512, sb.buffer_.capacity() - sb.size()),
+ std::min<std::size_t>(max_size, sb.max_size() - sb.size()));
+ }
+};
+
+/// Adapts basic_streambuf to the dynamic buffer sequence type requirements.
+#if defined(GENERATING_DOCUMENTATION)
+template <typename Allocator = std::allocator<char> >
+#else
+template <typename Allocator>
+#endif
+class basic_streambuf_ref
+{
+public:
+ /// The type used to represent the input sequence as a list of buffers.
+ typedef typename basic_streambuf<Allocator>::const_buffers_type
+ const_buffers_type;
+
+ /// The type used to represent the output sequence as a list of buffers.
+ typedef typename basic_streambuf<Allocator>::mutable_buffers_type
+ mutable_buffers_type;
+
+ /// Construct a basic_streambuf_ref for the given basic_streambuf object.
+ explicit basic_streambuf_ref(basic_streambuf<Allocator>& sb)
+ : sb_(sb)
+ {
+ }
+
+ /// Copy construct a basic_streambuf_ref.
+ basic_streambuf_ref(const basic_streambuf_ref& other) BOOST_ASIO_NOEXCEPT
+ : sb_(other.sb_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move construct a basic_streambuf_ref.
+ basic_streambuf_ref(basic_streambuf_ref&& other) BOOST_ASIO_NOEXCEPT
+ : sb_(other.sb_)
+ {
+ }
+#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 sb_.size();
+ }
+
+ /// Get the maximum size of the dynamic buffer.
+ std::size_t max_size() const BOOST_ASIO_NOEXCEPT
+ {
+ return sb_.max_size();
+ }
+
+ /// Get the current capacity of the dynamic buffer.
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return sb_.capacity();
+ }
+
+ /// Get a list of buffers that represents the input sequence.
+ const_buffers_type data() const BOOST_ASIO_NOEXCEPT
+ {
+ return sb_.data();
+ }
+
+ /// Get a list of buffers that represents the output sequence, with the given
+ /// size.
+ mutable_buffers_type prepare(std::size_t n)
+ {
+ return sb_.prepare(n);
+ }
+
+ /// Move bytes from the output sequence to the input sequence.
+ void commit(std::size_t n)
+ {
+ return sb_.commit(n);
+ }
+
+ /// Remove characters from the input sequence.
+ void consume(std::size_t n)
+ {
+ return sb_.consume(n);
+ }
+
+private:
+ basic_streambuf<Allocator>& sb_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_BASIC_STREAMBUF_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_streambuf_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_streambuf_fwd.hpp
new file mode 100644
index 00000000000..68907ef282c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_streambuf_fwd.hpp
@@ -0,0 +1,38 @@
+//
+// basic_streambuf_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_STREAMBUF_FWD_HPP
+#define BOOST_ASIO_BASIC_STREAMBUF_FWD_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_NO_IOSTREAM)
+
+#include <memory>
+
+namespace boost {
+namespace asio {
+
+template <typename Allocator = std::allocator<char> >
+class basic_streambuf;
+
+template <typename Allocator = std::allocator<char> >
+class basic_streambuf_ref;
+
+} // namespace asio
+} // namespace boost
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_BASIC_STREAMBUF_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/basic_waitable_timer.hpp b/src/third_party/boost-1.70.0/boost/asio/basic_waitable_timer.hpp
new file mode 100644
index 00000000000..45373f7caff
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/basic_waitable_timer.hpp
@@ -0,0 +1,738 @@
+//
+// basic_waitable_timer.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASIC_WAITABLE_TIMER_HPP
+#define BOOST_ASIO_BASIC_WAITABLE_TIMER_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/detail/chrono_time_traits.hpp>
+#include <boost/asio/detail/deadline_timer_service.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/wait_traits.hpp>
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+#define BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Clock,
+ typename WaitTraits = boost::asio::wait_traits<Clock>,
+ typename Executor = executor>
+class basic_waitable_timer;
+
+#endif // !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+
+/// Provides waitable timer functionality.
+/**
+ * The basic_waitable_timer class template provides the ability to perform a
+ * blocking or asynchronous wait for a timer to expire.
+ *
+ * A waitable timer is always in one of two states: "expired" or "not expired".
+ * If the wait() or async_wait() function is called on an expired timer, the
+ * wait operation will complete immediately.
+ *
+ * Most applications will use one of the boost::asio::steady_timer,
+ * boost::asio::system_timer or boost::asio::high_resolution_timer typedefs.
+ *
+ * @note This waitable timer functionality is for use with the C++11 standard
+ * library's @c &lt;chrono&gt; facility, or with the Boost.Chrono library.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Examples
+ * Performing a blocking wait (C++11):
+ * @code
+ * // Construct a timer without setting an expiry time.
+ * boost::asio::steady_timer timer(my_context);
+ *
+ * // Set an expiry time relative to now.
+ * timer.expires_after(std::chrono::seconds(5));
+ *
+ * // Wait for the timer to expire.
+ * timer.wait();
+ * @endcode
+ *
+ * @par
+ * Performing an asynchronous wait (C++11):
+ * @code
+ * void handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Timer expired.
+ * }
+ * }
+ *
+ * ...
+ *
+ * // Construct a timer with an absolute expiry time.
+ * boost::asio::steady_timer timer(my_context,
+ * std::chrono::steady_clock::now() + std::chrono::seconds(60));
+ *
+ * // Start an asynchronous wait.
+ * timer.async_wait(handler);
+ * @endcode
+ *
+ * @par Changing an active waitable timer's expiry time
+ *
+ * Changing the expiry time of a timer while there are pending asynchronous
+ * waits causes those wait operations to be cancelled. To ensure that the action
+ * associated with the timer is performed only once, use something like this:
+ * used:
+ *
+ * @code
+ * void on_some_event()
+ * {
+ * if (my_timer.expires_after(seconds(5)) > 0)
+ * {
+ * // We managed to cancel the timer. Start new asynchronous wait.
+ * my_timer.async_wait(on_timeout);
+ * }
+ * else
+ * {
+ * // Too late, timer has already expired!
+ * }
+ * }
+ *
+ * void on_timeout(const boost::system::error_code& e)
+ * {
+ * if (e != boost::asio::error::operation_aborted)
+ * {
+ * // Timer was not cancelled, take necessary action.
+ * }
+ * }
+ * @endcode
+ *
+ * @li The boost::asio::basic_waitable_timer::expires_after() function
+ * cancels any pending asynchronous waits, and returns the number of
+ * asynchronous waits that were cancelled. If it returns 0 then you were too
+ * late and the wait handler has already been executed, or will soon be
+ * executed. If it returns 1 then the wait handler was successfully cancelled.
+ *
+ * @li If a wait handler is cancelled, the boost::system::error_code passed to
+ * it contains the value boost::asio::error::operation_aborted.
+ */
+template <typename Clock, typename WaitTraits, typename Executor>
+class basic_waitable_timer
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The clock type.
+ typedef Clock clock_type;
+
+ /// The duration type of the clock.
+ typedef typename clock_type::duration duration;
+
+ /// The time point type of the clock.
+ typedef typename clock_type::time_point time_point;
+
+ /// The wait traits type.
+ typedef WaitTraits traits_type;
+
+ /// Constructor.
+ /**
+ * This constructor creates a timer without setting an expiry time. The
+ * expires_at() or expires_after() functions must be called to set an expiry
+ * time before the timer can be waited on.
+ *
+ * @param ex The I/O executor that the timer will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the timer.
+ */
+ explicit basic_waitable_timer(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Constructor.
+ /**
+ * This constructor creates a timer without setting an expiry time. The
+ * expires_at() or expires_after() functions must be called to set an expiry
+ * time before the timer can be waited on.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the timer will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the timer.
+ */
+ template <typename ExecutionContext>
+ explicit basic_waitable_timer(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Constructor to set a particular expiry time as an absolute time.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param ex The I/O executor object that the timer will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, expressed
+ * as an absolute time.
+ */
+ basic_waitable_timer(const executor_type& ex, const time_point& expiry_time)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+ }
+
+ /// Constructor to set a particular expiry time as an absolute time.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the timer will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, expressed
+ * as an absolute time.
+ */
+ template <typename ExecutionContext>
+ explicit basic_waitable_timer(ExecutionContext& context,
+ const time_point& expiry_time,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+ }
+
+ /// Constructor to set a particular expiry time relative to now.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param ex The I/O executor that the timer will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, relative to
+ * now.
+ */
+ basic_waitable_timer(const executor_type& ex, const duration& expiry_time)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_after(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_after");
+ }
+
+ /// Constructor to set a particular expiry time relative to now.
+ /**
+ * This constructor creates a timer and sets the expiry time.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the timer will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the timer.
+ *
+ * @param expiry_time The expiry time to be used for the timer, relative to
+ * now.
+ */
+ template <typename ExecutionContext>
+ explicit basic_waitable_timer(ExecutionContext& context,
+ const duration& expiry_time,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().expires_after(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_after");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_waitable_timer from another.
+ /**
+ * This constructor moves a timer from one object to another.
+ *
+ * @param other The other basic_waitable_timer 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_waitable_timer(const executor_type&)
+ * constructor.
+ */
+ basic_waitable_timer(basic_waitable_timer&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_waitable_timer from another.
+ /**
+ * This assignment operator moves a timer from one object to another. Cancels
+ * any outstanding asynchronous operations associated with the target object.
+ *
+ * @param other The other basic_waitable_timer 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_waitable_timer(const executor_type&)
+ * constructor.
+ */
+ basic_waitable_timer& operator=(basic_waitable_timer&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the timer.
+ /**
+ * This function destroys the timer, cancelling any outstanding asynchronous
+ * wait operations associated with the timer as if by calling @c cancel.
+ */
+ ~basic_waitable_timer()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Cancel any asynchronous operations that are waiting on the timer.
+ /**
+ * This function forces the completion of any pending asynchronous wait
+ * operations against the timer. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when cancel() is called, then the
+ * handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel()
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ return s;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overload.) Cancel any asynchronous
+ /// operations that are waiting on the timer.
+ /**
+ * This function forces the completion of any pending asynchronous wait
+ * operations against the timer. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @note If the timer has already expired when cancel() is called, then the
+ * handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel(boost::system::error_code& ec)
+ {
+ return impl_.get_service().cancel(impl_.get_implementation(), ec);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Cancels one asynchronous operation that is waiting on the timer.
+ /**
+ * This function forces the completion of one pending asynchronous wait
+ * operation against the timer. Handlers are cancelled in FIFO order. The
+ * handler for the cancelled operation will be invoked with the
+ * boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @return The number of asynchronous operations that were cancelled. That is,
+ * either 0 or 1.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when cancel_one() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel_one()
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().cancel_one(
+ impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel_one");
+ return s;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overload.) Cancels one asynchronous
+ /// operation that is waiting on the timer.
+ /**
+ * This function forces the completion of one pending asynchronous wait
+ * operation against the timer. Handlers are cancelled in FIFO order. The
+ * handler for the cancelled operation will be invoked with the
+ * boost::asio::error::operation_aborted error code.
+ *
+ * Cancelling the timer does not change the expiry time.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled. That is,
+ * either 0 or 1.
+ *
+ * @note If the timer has already expired when cancel_one() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t cancel_one(boost::system::error_code& ec)
+ {
+ return impl_.get_service().cancel_one(impl_.get_implementation(), ec);
+ }
+
+ /// (Deprecated: Use expiry().) Get the timer's expiry time as an absolute
+ /// time.
+ /**
+ * This function may be used to obtain the timer's current expiry time.
+ * Whether the timer has expired or not does not affect this value.
+ */
+ time_point expires_at() const
+ {
+ return impl_.get_service().expires_at(impl_.get_implementation());
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Get the timer's expiry time as an absolute time.
+ /**
+ * This function may be used to obtain the timer's current expiry time.
+ * Whether the timer has expired or not does not affect this value.
+ */
+ time_point expiry() const
+ {
+ return impl_.get_service().expiry(impl_.get_implementation());
+ }
+
+ /// Set the timer's expiry time as an absolute time.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when expires_at() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_at(const time_point& expiry_time)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_at");
+ return s;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overload.) Set the timer's expiry time as
+ /// an absolute time.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @note If the timer has already expired when expires_at() is called, then
+ * the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_at(const time_point& expiry_time,
+ boost::system::error_code& ec)
+ {
+ return impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Set the timer's expiry time relative to now.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when expires_after() is called,
+ * then the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_after(const duration& expiry_time)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().expires_after(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_after");
+ return s;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use expiry().) Get the timer's expiry time relative to now.
+ /**
+ * This function may be used to obtain the timer's current expiry time.
+ * Whether the timer has expired or not does not affect this value.
+ */
+ duration expires_from_now() const
+ {
+ return impl_.get_service().expires_from_now(impl_.get_implementation());
+ }
+
+ /// (Deprecated: Use expires_after().) Set the timer's expiry time relative
+ /// to now.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note If the timer has already expired when expires_from_now() is called,
+ * then the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_from_now(const duration& expiry_time)
+ {
+ boost::system::error_code ec;
+ std::size_t s = impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ boost::asio::detail::throw_error(ec, "expires_from_now");
+ return s;
+ }
+
+ /// (Deprecated: Use expires_after().) Set the timer's expiry time relative
+ /// to now.
+ /**
+ * This function sets the expiry time. Any pending asynchronous wait
+ * operations will be cancelled. The handler for each cancelled operation will
+ * be invoked with the boost::asio::error::operation_aborted error code.
+ *
+ * @param expiry_time The expiry time to be used for the timer.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of asynchronous operations that were cancelled.
+ *
+ * @note If the timer has already expired when expires_from_now() is called,
+ * then the handlers for asynchronous wait operations will:
+ *
+ * @li have already been invoked; or
+ *
+ * @li have been queued for invocation in the near future.
+ *
+ * These handlers can no longer be cancelled, and therefore are passed an
+ * error code that indicates the successful completion of the wait operation.
+ */
+ std::size_t expires_from_now(const duration& expiry_time,
+ boost::system::error_code& ec)
+ {
+ return impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Perform a blocking wait on the timer.
+ /**
+ * This function is used to wait for the timer to expire. This function
+ * blocks and does not return until the timer has expired.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void wait()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().wait(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Perform a blocking wait on the timer.
+ /**
+ * This function is used to wait for the timer to expire. This function
+ * blocks and does not return until the timer has expired.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ void wait(boost::system::error_code& ec)
+ {
+ impl_.get_service().wait(impl_.get_implementation(), ec);
+ }
+
+ /// Start an asynchronous wait on the timer.
+ /**
+ * This function may be used to initiate an asynchronous wait against the
+ * timer. It always returns immediately.
+ *
+ * For each call to async_wait(), the supplied handler will be called exactly
+ * once. The handler will be called when:
+ *
+ * @li The timer has expired.
+ *
+ * @li The timer was cancelled, in which case the handler is passed the error
+ * code boost::asio::error::operation_aborted.
+ *
+ * @param handler The handler to be called when the timer expires. 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename WaitHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
+ void (boost::system::error_code))
+ async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ return async_initiate<WaitHandler, void (boost::system::error_code)>(
+ initiate_async_wait(), handler, this);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_waitable_timer(const basic_waitable_timer&) BOOST_ASIO_DELETED;
+ basic_waitable_timer& operator=(
+ const basic_waitable_timer&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_wait
+ {
+ template <typename WaitHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler,
+ basic_waitable_timer* self) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WaitHandler.
+ BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
+
+ detail::non_const_lvalue<WaitHandler> handler2(handler);
+ self->impl_.get_service().async_wait(
+ self->impl_.get_implementation(), handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+ detail::io_object_impl<
+ detail::deadline_timer_service<
+ detail::chrono_time_traits<Clock, WaitTraits> >,
+ executor_type > impl_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BASIC_WAITABLE_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/bind_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/bind_executor.hpp
new file mode 100644
index 00000000000..cd1498098c8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/bind_executor.hpp
@@ -0,0 +1,582 @@
+//
+// bind_executor.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BIND_EXECUTOR_HPP
+#define BOOST_ASIO_BIND_EXECUTOR_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/variadic_templates.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/is_executor.hpp>
+#include <boost/asio/uses_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct executor_binder_check
+{
+ typedef void type;
+};
+
+// Helper to automatically define nested typedef result_type.
+
+template <typename T, typename = void>
+struct executor_binder_result_type
+{
+protected:
+ typedef void result_type_or_void;
+};
+
+template <typename T>
+struct executor_binder_result_type<T,
+ typename executor_binder_check<typename T::result_type>::type>
+{
+ typedef typename T::result_type result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct executor_binder_result_type<R(*)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct executor_binder_result_type<R(&)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct executor_binder_result_type<R(*)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct executor_binder_result_type<R(&)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct executor_binder_result_type<R(*)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct executor_binder_result_type<R(&)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+// Helper to automatically define nested typedef argument_type.
+
+template <typename T, typename = void>
+struct executor_binder_argument_type {};
+
+template <typename T>
+struct executor_binder_argument_type<T,
+ typename executor_binder_check<typename T::argument_type>::type>
+{
+ typedef typename T::argument_type argument_type;
+};
+
+template <typename R, typename A1>
+struct executor_binder_argument_type<R(*)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+template <typename R, typename A1>
+struct executor_binder_argument_type<R(&)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+// Helper to automatically define nested typedefs first_argument_type and
+// second_argument_type.
+
+template <typename T, typename = void>
+struct executor_binder_argument_types {};
+
+template <typename T>
+struct executor_binder_argument_types<T,
+ typename executor_binder_check<typename T::first_argument_type>::type>
+{
+ typedef typename T::first_argument_type first_argument_type;
+ typedef typename T::second_argument_type second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct executor_binder_argument_type<R(*)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct executor_binder_argument_type<R(&)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+// Helper to:
+// - Apply the empty base optimisation to the executor.
+// - Perform uses_executor construction of the target type, if required.
+
+template <typename T, typename Executor, bool UsesExecutor>
+class executor_binder_base;
+
+template <typename T, typename Executor>
+class executor_binder_base<T, Executor, true>
+ : protected Executor
+{
+protected:
+ template <typename E, typename U>
+ executor_binder_base(BOOST_ASIO_MOVE_ARG(E) e, BOOST_ASIO_MOVE_ARG(U) u)
+ : executor_(BOOST_ASIO_MOVE_CAST(E)(e)),
+ target_(executor_arg_t(), executor_, BOOST_ASIO_MOVE_CAST(U)(u))
+ {
+ }
+
+ Executor executor_;
+ T target_;
+};
+
+template <typename T, typename Executor>
+class executor_binder_base<T, Executor, false>
+{
+protected:
+ template <typename E, typename U>
+ executor_binder_base(BOOST_ASIO_MOVE_ARG(E) e, BOOST_ASIO_MOVE_ARG(U) u)
+ : executor_(BOOST_ASIO_MOVE_CAST(E)(e)),
+ target_(BOOST_ASIO_MOVE_CAST(U)(u))
+ {
+ }
+
+ Executor executor_;
+ T target_;
+};
+
+// Helper to enable SFINAE on zero-argument operator() below.
+
+template <typename T, typename = void>
+struct executor_binder_result_of0
+{
+ typedef void type;
+};
+
+template <typename T>
+struct executor_binder_result_of0<T,
+ typename executor_binder_check<typename result_of<T()>::type>::type>
+{
+ typedef typename result_of<T()>::type type;
+};
+
+} // namespace detail
+
+/// A call wrapper type to bind an executor of type @c Executor to an object of
+/// type @c T.
+template <typename T, typename Executor>
+class executor_binder
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::executor_binder_result_type<T>,
+ public detail::executor_binder_argument_type<T>,
+ public detail::executor_binder_argument_types<T>,
+ private detail::executor_binder_base<
+ T, Executor, uses_executor<T, Executor>::value>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+public:
+ /// The type of the target object.
+ typedef T target_type;
+
+ /// The type of the associated executor.
+ typedef Executor executor_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The return type if a function.
+ /**
+ * The type of @c result_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to function type, @c result_type is a synonym for
+ * the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c result_type, then @c
+ * result_type is a synonym for @c T::result_type;
+ *
+ * @li otherwise @c result_type is not defined.
+ */
+ typedef see_below result_type;
+
+ /// The type of the function's argument.
+ /**
+ * The type of @c argument_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to a function type accepting a single argument,
+ * @c argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c argument_type, then @c
+ * argument_type is a synonym for @c T::argument_type;
+ *
+ * @li otherwise @c argument_type is not defined.
+ */
+ typedef see_below argument_type;
+
+ /// The type of the function's first argument.
+ /**
+ * The type of @c first_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * first_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c first_argument_type is a synonym for @c T::first_argument_type;
+ *
+ * @li otherwise @c first_argument_type is not defined.
+ */
+ typedef see_below first_argument_type;
+
+ /// The type of the function's second argument.
+ /**
+ * The type of @c second_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * second_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c second_argument_type is a synonym for @c T::second_argument_type;
+ *
+ * @li otherwise @c second_argument_type is not defined.
+ */
+ typedef see_below second_argument_type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct an executor wrapper for the specified object.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U>
+ executor_binder(executor_arg_t, const executor_type& e,
+ BOOST_ASIO_MOVE_ARG(U) u)
+ : base_type(e, BOOST_ASIO_MOVE_CAST(U)(u))
+ {
+ }
+
+ /// Copy constructor.
+ executor_binder(const executor_binder& other)
+ : base_type(other.get_executor(), other.get())
+ {
+ }
+
+ /// Construct a copy, but specify a different executor.
+ executor_binder(executor_arg_t, const executor_type& e,
+ const executor_binder& other)
+ : base_type(e, other.get())
+ {
+ }
+
+ /// Construct a copy of a different executor wrapper type.
+ /**
+ * This constructor is only valid if the @c Executor type is constructible
+ * from type @c OtherExecutor, and the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherExecutor>
+ executor_binder(const executor_binder<U, OtherExecutor>& other)
+ : base_type(other.get_executor(), other.get())
+ {
+ }
+
+ /// Construct a copy of a different executor wrapper type, but specify a
+ /// different executor.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherExecutor>
+ executor_binder(executor_arg_t, const executor_type& e,
+ const executor_binder<U, OtherExecutor>& other)
+ : base_type(e, other.get())
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Move constructor.
+ executor_binder(executor_binder&& other)
+ : base_type(BOOST_ASIO_MOVE_CAST(executor_type)(other.get_executor()),
+ BOOST_ASIO_MOVE_CAST(T)(other.get()))
+ {
+ }
+
+ /// Move construct the target object, but specify a different executor.
+ executor_binder(executor_arg_t, const executor_type& e,
+ executor_binder&& other)
+ : base_type(e, BOOST_ASIO_MOVE_CAST(T)(other.get()))
+ {
+ }
+
+ /// Move construct from a different executor wrapper type.
+ template <typename U, typename OtherExecutor>
+ executor_binder(executor_binder<U, OtherExecutor>&& other)
+ : base_type(BOOST_ASIO_MOVE_CAST(OtherExecutor)(other.get_executor()),
+ BOOST_ASIO_MOVE_CAST(U)(other.get()))
+ {
+ }
+
+ /// Move construct from a different executor wrapper type, but specify a
+ /// different executor.
+ template <typename U, typename OtherExecutor>
+ executor_binder(executor_arg_t, const executor_type& e,
+ executor_binder<U, OtherExecutor>&& other)
+ : base_type(e, BOOST_ASIO_MOVE_CAST(U)(other.get()))
+ {
+ }
+
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destructor.
+ ~executor_binder()
+ {
+ }
+
+ /// Obtain a reference to the target object.
+ target_type& get() BOOST_ASIO_NOEXCEPT
+ {
+ return this->target_;
+ }
+
+ /// Obtain a reference to the target object.
+ const target_type& get() const BOOST_ASIO_NOEXCEPT
+ {
+ return this->target_;
+ }
+
+ /// Obtain the associated executor.
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
+ {
+ return this->executor_;
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+
+ template <typename... Args> auto operator()(Args&& ...);
+ template <typename... Args> auto operator()(Args&& ...) const;
+
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ typename result_of<T(Args...)>::type operator()(
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ return this->target_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ typename result_of<T(Args...)>::type operator()(
+ BOOST_ASIO_MOVE_ARG(Args)... args) const
+ {
+ return this->target_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#elif defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
+
+ typename detail::executor_binder_result_of0<T>::type operator()()
+ {
+ return this->target_();
+ }
+
+ typename detail::executor_binder_result_of0<T>::type operator()() const
+ {
+ return this->target_();
+ }
+
+#define BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ typename result_of<T(BOOST_ASIO_VARIADIC_TARGS(n))>::type operator()( \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ typename result_of<T(BOOST_ASIO_VARIADIC_TARGS(n))>::type operator()( \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) const \
+ { \
+ return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
+#undef BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
+
+#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
+
+ typedef typename detail::executor_binder_result_type<T>::result_type_or_void
+ result_type_or_void;
+
+ result_type_or_void operator()()
+ {
+ return this->target_();
+ }
+
+ result_type_or_void operator()() const
+ {
+ return this->target_();
+ }
+
+#define BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ result_type_or_void operator()( \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ result_type_or_void operator()( \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) const \
+ { \
+ return this->target_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
+#undef BOOST_ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
+
+#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
+
+private:
+ typedef detail::executor_binder_base<T, Executor,
+ uses_executor<T, Executor>::value> base_type;
+};
+
+/// Associate an object of type @c T with an executor of type @c Executor.
+template <typename Executor, typename T>
+inline executor_binder<typename decay<T>::type, Executor>
+bind_executor(const Executor& ex, BOOST_ASIO_MOVE_ARG(T) t,
+ typename enable_if<is_executor<Executor>::value>::type* = 0)
+{
+ return executor_binder<typename decay<T>::type, Executor>(
+ executor_arg_t(), ex, BOOST_ASIO_MOVE_CAST(T)(t));
+}
+
+/// Associate an object of type @c T with an execution context's executor.
+template <typename ExecutionContext, typename T>
+inline executor_binder<typename decay<T>::type,
+ typename ExecutionContext::executor_type>
+bind_executor(ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(T) t,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type* = 0)
+{
+ return executor_binder<typename decay<T>::type,
+ typename ExecutionContext::executor_type>(
+ executor_arg_t(), ctx.get_executor(), BOOST_ASIO_MOVE_CAST(T)(t));
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename Executor>
+struct uses_executor<executor_binder<T, Executor>, Executor>
+ : true_type {};
+
+template <typename T, typename Executor, typename Signature>
+class async_result<executor_binder<T, Executor>, Signature>
+{
+public:
+ typedef executor_binder<
+ typename async_result<T, Signature>::completion_handler_type, Executor>
+ completion_handler_type;
+
+ typedef typename async_result<T, Signature>::return_type return_type;
+
+ explicit async_result(executor_binder<T, Executor>& b)
+ : target_(b.get())
+ {
+ }
+
+ return_type get()
+ {
+ return target_.get();
+ }
+
+private:
+ async_result(const async_result&) BOOST_ASIO_DELETED;
+ async_result& operator=(const async_result&) BOOST_ASIO_DELETED;
+
+ async_result<T, Signature> target_;
+};
+
+template <typename T, typename Executor, typename Allocator>
+struct associated_allocator<executor_binder<T, Executor>, Allocator>
+{
+ typedef typename associated_allocator<T, Allocator>::type type;
+
+ static type get(const executor_binder<T, Executor>& b,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<T, Allocator>::get(b.get(), a);
+ }
+};
+
+template <typename T, typename Executor, typename Executor1>
+struct associated_executor<executor_binder<T, Executor>, Executor1>
+{
+ typedef Executor type;
+
+ static type get(const executor_binder<T, Executor>& b,
+ const Executor1& = Executor1()) BOOST_ASIO_NOEXCEPT
+ {
+ return b.get_executor();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BIND_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffer.hpp b/src/third_party/boost-1.70.0/boost/asio/buffer.hpp
new file mode 100644
index 00000000000..6958b2e84af
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffer.hpp
@@ -0,0 +1,2498 @@
+//
+// buffer.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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/memory.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.
+template <typename MutableBuffer>
+inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b,
+ typename enable_if<
+ is_convertible<const MutableBuffer*, const mutable_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return static_cast<const mutable_buffer*>(detail::addressof(b));
+}
+
+/// Get an iterator to the first element in a buffer sequence.
+template <typename ConstBuffer>
+inline const const_buffer* buffer_sequence_begin(const ConstBuffer& b,
+ typename enable_if<
+ is_convertible<const ConstBuffer*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return static_cast<const const_buffer*>(detail::addressof(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,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT -> 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,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT -> 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,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return c.begin();
+}
+
+template <typename C>
+inline typename C::const_iterator buffer_sequence_begin(const C& c,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ 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.
+template <typename MutableBuffer>
+inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b,
+ typename enable_if<
+ is_convertible<const MutableBuffer*, const mutable_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return static_cast<const mutable_buffer*>(detail::addressof(b)) + 1;
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+template <typename ConstBuffer>
+inline const const_buffer* buffer_sequence_end(const ConstBuffer& b,
+ typename enable_if<
+ is_convertible<const ConstBuffer*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return static_cast<const const_buffer*>(detail::addressof(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,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT -> 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,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT -> 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,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ return c.end();
+}
+
+template <typename C>
+inline typename C::const_iterator buffer_sequence_end(const C& c,
+ typename enable_if<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ >::type* = 0) BOOST_ASIO_NOEXCEPT
+{
+ 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 a sequence of constant buffers that refers to
+ /// the underlying memory.
+ typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
+
+ /// The type used to represent a sequence of mutable buffers that refers to
+ /// the underlying memory.
+ 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.
+ * The object stores a reference to the string and the user is responsible
+ * for ensuring that the string object remains valid while the
+ * dynamic_string_buffer object, and copies of the object, are in use.
+ *
+ * @b DynamicBuffer_v1: Any existing data in the string is treated as the
+ * dynamic buffer's input sequence.
+ *
+ * @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),
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_((std::numeric_limits<std::size_t>::max)()),
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(maximum_size)
+ {
+ }
+
+ /// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
+ dynamic_string_buffer(const dynamic_string_buffer& other) BOOST_ASIO_NOEXCEPT
+ : string_(other.string_),
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_(other.size_),
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(other.max_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_),
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_(other.size_),
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(other.max_size_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// @b DynamicBuffer_v1: Get the size of the input sequence.
+ /// @b DynamicBuffer_v2: Get the current size of the underlying memory.
+ /**
+ * @returns @b DynamicBuffer_v1 The current size of the input sequence.
+ * @b DynamicBuffer_v2: The current size of the underlying string if less than
+ * max_size(). Otherwise returns max_size().
+ */
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ return size_;
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ return (std::min)(string_.size(), max_size());
+ }
+
+ /// Get the maximum size of the dynamic buffer.
+ /**
+ * @returns The allowed maximum size of the underlying memory.
+ */
+ std::size_t max_size() const BOOST_ASIO_NOEXCEPT
+ {
+ return max_size_;
+ }
+
+ /// Get the maximum size that the buffer may grow to without triggering
+ /// reallocation.
+ /**
+ * @returns The current capacity of the underlying string if less than
+ * max_size(). Otherwise returns max_size().
+ */
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return (std::min)(string_.capacity(), max_size());
+ }
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: 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
+ * the input sequence.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that resizes or erases the string.
+ */
+ const_buffers_type data() const BOOST_ASIO_NOEXCEPT
+ {
+ return const_buffers_type(boost::asio::buffer(string_, size_));
+ }
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing the basic_string memory.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that resizes or erases the string.
+ */
+ mutable_buffers_type data(std::size_t pos, std::size_t n) BOOST_ASIO_NOEXCEPT
+ {
+ return mutable_buffers_type(boost::asio::buffer(
+ boost::asio::buffer(string_, max_size_) + pos, n));
+ }
+
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that resizes or erases the string.
+ */
+ const_buffers_type data(std::size_t pos,
+ std::size_t n) const BOOST_ASIO_NOEXCEPT
+ {
+ return const_buffers_type(boost::asio::buffer(
+ boost::asio::buffer(string_, max_size_) + pos, n));
+ }
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: 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);
+ }
+
+ if (size_ == (std::numeric_limits<std::size_t>::max)())
+ size_ = string_.size(); // Enable v1 behaviour.
+
+ string_.resize(size_ + n);
+
+ return boost::asio::buffer(boost::asio::buffer(string_) + size_, n);
+ }
+
+ /// @b DynamicBuffer_v1: 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_);
+ }
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+ /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of
+ /// bytes.
+ /**
+ * Resizes the string to accommodate an additional @c n bytes at the end.
+ *
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ */
+ void grow(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);
+ }
+
+ /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number
+ /// of bytes.
+ /**
+ * Erases @c n bytes from the end of the string by resizing the basic_string
+ * object. If @c n is greater than the current size of the string, the string
+ * is emptied.
+ */
+ void shrink(std::size_t n)
+ {
+ string_.resize(n > size() ? 0 : size() - n);
+ }
+
+ /// @b DynamicBuffer_v1: Remove characters from the input sequence.
+ /// @b DynamicBuffer_v2: Consume the specified number of bytes from the
+ /// beginning of the underlying memory.
+ /**
+ * @b DynamicBuffer_v1: 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.
+ *
+ * @b DynamicBuffer_v2: Erases @c n bytes from the beginning of the string.
+ * If @c n is greater than the current size of the string, the string is
+ * emptied.
+ */
+ void consume(std::size_t n)
+ {
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ {
+ std::size_t consume_length = (std::min)(n, size_);
+ string_.erase(0, consume_length);
+ size_ -= consume_length;
+ return;
+ }
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ string_.erase(0, n);
+ }
+
+private:
+ std::basic_string<Elem, Traits, Allocator>& string_;
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ std::size_t size_;
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ 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 a sequence of constant buffers that refers to
+ /// the underlying memory.
+ typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
+
+ /// The type used to represent a sequence of mutable buffers that refers to
+ /// the underlying memory.
+ typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
+
+ /// Construct a dynamic buffer from a vector.
+ /**
+ * @param v The vector to be used as backing storage for the dynamic buffer.
+ * The object stores a reference to the vector and the user is responsible
+ * for ensuring that the vector object remains valid while the
+ * dynamic_vector_buffer object, and copies of the object, are in use.
+ *
+ * @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),
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_((std::numeric_limits<std::size_t>::max)()),
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(maximum_size)
+ {
+ }
+
+ /// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
+ dynamic_vector_buffer(const dynamic_vector_buffer& other) BOOST_ASIO_NOEXCEPT
+ : vector_(other.vector_),
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_(other.size_),
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(other.max_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_),
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_(other.size_),
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(other.max_size_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// @b DynamicBuffer_v1: Get the size of the input sequence.
+ /// @b DynamicBuffer_v2: Get the current size of the underlying memory.
+ /**
+ * @returns @b DynamicBuffer_v1 The current size of the input sequence.
+ * @b DynamicBuffer_v2: The current size of the underlying vector if less than
+ * max_size(). Otherwise returns max_size().
+ */
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ return size_;
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ return (std::min)(vector_.size(), max_size());
+ }
+
+ /// Get the maximum size of the dynamic buffer.
+ /**
+ * @returns @b DynamicBuffer_v1: The allowed maximum of the sum of the sizes
+ * of the input sequence and output sequence. @b DynamicBuffer_v2: The allowed
+ * maximum size of the underlying memory.
+ */
+ std::size_t max_size() const BOOST_ASIO_NOEXCEPT
+ {
+ return max_size_;
+ }
+
+ /// Get the maximum size that the buffer may grow to without triggering
+ /// reallocation.
+ /**
+ * @returns @b DynamicBuffer_v1: The current total capacity of the buffer,
+ * i.e. for both the input sequence and output sequence. @b DynamicBuffer_v2:
+ * The current capacity of the underlying vector if less than max_size().
+ * Otherwise returns max_size().
+ */
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return (std::min)(vector_.capacity(), max_size());
+ }
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: 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 vector memory in the
+ * input sequence.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c vector 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_));
+ }
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing the vector memory.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c vector member function that resizes or erases the vector.
+ */
+ mutable_buffers_type data(std::size_t pos, std::size_t n) BOOST_ASIO_NOEXCEPT
+ {
+ return mutable_buffers_type(boost::asio::buffer(
+ boost::asio::buffer(vector_, max_size_) + pos, n));
+ }
+
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c vector member function that resizes or erases the vector.
+ */
+ const_buffers_type data(std::size_t pos,
+ std::size_t n) const BOOST_ASIO_NOEXCEPT
+ {
+ return const_buffers_type(boost::asio::buffer(
+ boost::asio::buffer(vector_, max_size_) + pos, n));
+ }
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: 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
+ * vector object as necessary.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing vector 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 vector 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);
+ }
+
+ if (size_ == (std::numeric_limits<std::size_t>::max)())
+ size_ = vector_.size(); // Enable v1 behaviour.
+
+ vector_.resize(size_ + n);
+
+ return boost::asio::buffer(boost::asio::buffer(vector_) + size_, n);
+ }
+
+ /// @b DynamicBuffer_v1: 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_);
+ }
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+ /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of
+ /// bytes.
+ /**
+ * Resizes the vector to accommodate an additional @c n bytes at the end.
+ *
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ */
+ void grow(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);
+ }
+
+ /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number
+ /// of bytes.
+ /**
+ * Erases @c n bytes from the end of the vector by resizing the vector
+ * object. If @c n is greater than the current size of the vector, the vector
+ * is emptied.
+ */
+ void shrink(std::size_t n)
+ {
+ vector_.resize(n > size() ? 0 : size() - n);
+ }
+
+ /// @b DynamicBuffer_v1: Remove characters from the input sequence.
+ /// @b DynamicBuffer_v2: Consume the specified number of bytes from the
+ /// beginning of the underlying memory.
+ /**
+ * @b DynamicBuffer_v1: 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.
+ *
+ * @b DynamicBuffer_v2: Erases @c n bytes from the beginning of the vector.
+ * If @c n is greater than the current size of the vector, the vector is
+ * emptied.
+ */
+ void consume(std::size_t n)
+ {
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ {
+ std::size_t consume_length = (std::min)(n, size_);
+ vector_.erase(vector_.begin(), vector_.begin() + consume_length);
+ size_ -= consume_length;
+ return;
+ }
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ vector_.erase(vector_.begin(), vector_.begin() + (std::min)(size(), n));
+ }
+
+private:
+ std::vector<Elem, Allocator>& vector_;
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ std::size_t size_;
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ 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)
+{
+};
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+/// Trait to determine whether a type satisfies the DynamicBuffer_v1
+/// requirements.
+template <typename T>
+struct is_dynamic_buffer_v1
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : boost::asio::detail::is_dynamic_buffer_v1<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Trait to determine whether a type satisfies the DynamicBuffer_v2
+/// requirements.
+template <typename T>
+struct is_dynamic_buffer_v2
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : boost::asio::detail::is_dynamic_buffer_v2<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
+/**
+ * If @c BOOST_ASIO_NO_DYNAMIC_BUFFER_V1 is not defined, determines whether the
+ * type satisfies the DynamicBuffer_v1 requirements. Otherwise, if @c
+ * BOOST_ASIO_NO_DYNAMIC_BUFFER_V1 is defined, determines whether the type
+ * satisfies the DynamicBuffer_v1 requirements.
+ */
+template <typename T>
+struct is_dynamic_buffer
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#elif defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ : boost::asio::is_dynamic_buffer_v2<T>
+#else // defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+ : boost::asio::is_dynamic_buffer_v1<T>
+#endif // defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+{
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BUFFER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffered_read_stream.hpp b/src/third_party/boost-1.70.0/boost/asio/buffered_read_stream.hpp
new file mode 100644
index 00000000000..cd1e0626a5e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffered_read_stream.hpp
@@ -0,0 +1,242 @@
+//
+// buffered_read_stream.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_READ_STREAM_HPP
+#define BOOST_ASIO_BUFFERED_READ_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 <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/buffered_read_stream_fwd.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_resize_guard.hpp>
+#include <boost/asio/detail/buffered_stream_storage.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Adds buffering to the read-related operations of a stream.
+/**
+ * The buffered_read_stream class template can be used to add buffering to the
+ * synchronous and asynchronous read operations of a stream.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Stream>
+class buffered_read_stream
+ : private noncopyable
+{
+public:
+ /// 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(GENERATING_DOCUMENTATION)
+ /// The default buffer size.
+ static const std::size_t default_buffer_size = implementation_defined;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size = 1024);
+#endif
+
+ /// Construct, passing the specified argument to initialise the next layer.
+ template <typename Arg>
+ explicit buffered_read_stream(Arg& a)
+ : next_layer_(a),
+ storage_(default_buffer_size)
+ {
+ }
+
+ /// Construct, passing the specified argument to initialise the next layer.
+ template <typename Arg>
+ buffered_read_stream(Arg& a, std::size_t buffer_size)
+ : next_layer_(a),
+ storage_(buffer_size)
+ {
+ }
+
+ /// Get a reference to the next layer.
+ next_layer_type& next_layer()
+ {
+ return next_layer_;
+ }
+
+ /// Get a reference to the lowest layer.
+ lowest_layer_type& lowest_layer()
+ {
+ return next_layer_.lowest_layer();
+ }
+
+ /// Get a const reference to the lowest layer.
+ const lowest_layer_type& lowest_layer() const
+ {
+ return next_layer_.lowest_layer();
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+ /// Close the stream.
+ void close()
+ {
+ next_layer_.close();
+ }
+
+ /// Close the stream.
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ next_layer_.close(ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Write the given data to the stream. Returns the number of bytes written.
+ /// Throws an exception on failure.
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ return next_layer_.write_some(buffers);
+ }
+
+ /// Write the given data to the stream. Returns the number of bytes written,
+ /// or 0 if an error occurred.
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return next_layer_.write_some(buffers, ec);
+ }
+
+ /// Start an asynchronous write. The data being written must be valid for the
+ /// lifetime of the asynchronous operation.
+ 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)
+ {
+ return next_layer_.async_write_some(buffers,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+ }
+
+ /// Fill the buffer with some data. Returns the number of bytes placed in the
+ /// buffer as a result of the operation. Throws an exception on failure.
+ std::size_t fill();
+
+ /// Fill the buffer with some data. Returns the number of bytes placed in the
+ /// buffer as a result of the operation, or 0 if an error occurred.
+ std::size_t fill(boost::system::error_code& ec);
+
+ /// Start an asynchronous fill.
+ template <typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_fill(BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+ /// Read some data from the stream. Returns the number of bytes read. Throws
+ /// an exception on failure.
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers);
+
+ /// Read some data from the stream. Returns the number of bytes read or 0 if
+ /// an error occurred.
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec);
+
+ /// Start an asynchronous read. The buffer into which the data will be read
+ /// must be valid for the lifetime of the asynchronous operation.
+ 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);
+
+ /// Peek at the incoming data on the stream. Returns the number of bytes read.
+ /// Throws an exception on failure.
+ template <typename MutableBufferSequence>
+ std::size_t peek(const MutableBufferSequence& buffers);
+
+ /// Peek at the incoming data on the stream. Returns the number of bytes read,
+ /// or 0 if an error occurred.
+ template <typename MutableBufferSequence>
+ std::size_t peek(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec);
+
+ /// Determine the amount of data that may be read without blocking.
+ std::size_t in_avail()
+ {
+ return storage_.size();
+ }
+
+ /// Determine the amount of data that may be read without blocking.
+ std::size_t in_avail(boost::system::error_code& ec)
+ {
+ ec = boost::system::error_code();
+ return storage_.size();
+ }
+
+private:
+ /// Copy data out of the internal buffer to the specified target buffer.
+ /// Returns the number of bytes copied.
+ template <typename MutableBufferSequence>
+ std::size_t copy(const MutableBufferSequence& buffers)
+ {
+ std::size_t bytes_copied = boost::asio::buffer_copy(
+ buffers, storage_.data(), storage_.size());
+ storage_.consume(bytes_copied);
+ return bytes_copied;
+ }
+
+ /// Copy data from the internal buffer to the specified target buffer, without
+ /// removing the data from the internal buffer. Returns the number of bytes
+ /// copied.
+ template <typename MutableBufferSequence>
+ std::size_t peek_copy(const MutableBufferSequence& buffers)
+ {
+ return boost::asio::buffer_copy(buffers, storage_.data(), storage_.size());
+ }
+
+ /// The next layer.
+ Stream next_layer_;
+
+ // The data in the buffer.
+ detail::buffered_stream_storage storage_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/buffered_read_stream.hpp>
+
+#endif // BOOST_ASIO_BUFFERED_READ_STREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffered_read_stream_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/buffered_read_stream_fwd.hpp
new file mode 100644
index 00000000000..f250c92f349
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffered_read_stream_fwd.hpp
@@ -0,0 +1,27 @@
+//
+// buffered_read_stream_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_READ_STREAM_FWD_HPP
+#define BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+namespace boost {
+namespace asio {
+
+template <typename Stream>
+class buffered_read_stream;
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_BUFFERED_READ_STREAM_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffered_stream.hpp b/src/third_party/boost-1.70.0/boost/asio/buffered_stream.hpp
new file mode 100644
index 00000000000..d28abf10b6d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffered_stream.hpp
@@ -0,0 +1,263 @@
+//
+// buffered_stream.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_STREAM_HPP
+#define BOOST_ASIO_BUFFERED_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 <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/buffered_read_stream.hpp>
+#include <boost/asio/buffered_write_stream.hpp>
+#include <boost/asio/buffered_stream_fwd.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Adds buffering to the read- and write-related operations of a stream.
+/**
+ * The buffered_stream class template can be used to add buffering to the
+ * synchronous and asynchronous read and write operations of a stream.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Stream>
+class buffered_stream
+ : private noncopyable
+{
+public:
+ /// 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;
+
+ /// Construct, passing the specified argument to initialise the next layer.
+ template <typename Arg>
+ explicit buffered_stream(Arg& a)
+ : inner_stream_impl_(a),
+ stream_impl_(inner_stream_impl_)
+ {
+ }
+
+ /// Construct, passing the specified argument to initialise the next layer.
+ template <typename Arg>
+ explicit buffered_stream(Arg& a, std::size_t read_buffer_size,
+ std::size_t write_buffer_size)
+ : inner_stream_impl_(a, write_buffer_size),
+ stream_impl_(inner_stream_impl_, read_buffer_size)
+ {
+ }
+
+ /// Get a reference to the next layer.
+ next_layer_type& next_layer()
+ {
+ return stream_impl_.next_layer().next_layer();
+ }
+
+ /// Get a reference to the lowest layer.
+ lowest_layer_type& lowest_layer()
+ {
+ return stream_impl_.lowest_layer();
+ }
+
+ /// Get a const reference to the lowest layer.
+ const lowest_layer_type& lowest_layer() const
+ {
+ return stream_impl_.lowest_layer();
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return stream_impl_.lowest_layer().get_executor();
+ }
+
+ /// Close the stream.
+ void close()
+ {
+ stream_impl_.close();
+ }
+
+ /// Close the stream.
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ stream_impl_.close(ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Flush all data from the buffer to the next layer. Returns the number of
+ /// bytes written to the next layer on the last write operation. Throws an
+ /// exception on failure.
+ std::size_t flush()
+ {
+ return stream_impl_.next_layer().flush();
+ }
+
+ /// Flush all data from the buffer to the next layer. Returns the number of
+ /// bytes written to the next layer on the last write operation, or 0 if an
+ /// error occurred.
+ std::size_t flush(boost::system::error_code& ec)
+ {
+ return stream_impl_.next_layer().flush(ec);
+ }
+
+ /// Start an asynchronous flush.
+ template <typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ return stream_impl_.next_layer().async_flush(
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+ }
+
+ /// Write the given data to the stream. Returns the number of bytes written.
+ /// Throws an exception on failure.
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ return stream_impl_.write_some(buffers);
+ }
+
+ /// Write the given data to the stream. Returns the number of bytes written,
+ /// or 0 if an error occurred.
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return stream_impl_.write_some(buffers, ec);
+ }
+
+ /// Start an asynchronous write. The data being written must be valid for the
+ /// lifetime of the asynchronous operation.
+ 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)
+ {
+ return stream_impl_.async_write_some(buffers,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+ }
+
+ /// Fill the buffer with some data. Returns the number of bytes placed in the
+ /// buffer as a result of the operation. Throws an exception on failure.
+ std::size_t fill()
+ {
+ return stream_impl_.fill();
+ }
+
+ /// Fill the buffer with some data. Returns the number of bytes placed in the
+ /// buffer as a result of the operation, or 0 if an error occurred.
+ std::size_t fill(boost::system::error_code& ec)
+ {
+ return stream_impl_.fill(ec);
+ }
+
+ /// Start an asynchronous fill.
+ template <typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_fill(BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ return stream_impl_.async_fill(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+ }
+
+ /// Read some data from the stream. Returns the number of bytes read. Throws
+ /// an exception on failure.
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ return stream_impl_.read_some(buffers);
+ }
+
+ /// Read some data from the stream. Returns the number of bytes read or 0 if
+ /// an error occurred.
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return stream_impl_.read_some(buffers, ec);
+ }
+
+ /// Start an asynchronous read. The buffer into which the data will be read
+ /// must be valid for the lifetime of the asynchronous operation.
+ 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)
+ {
+ return stream_impl_.async_read_some(buffers,
+ BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+ }
+
+ /// Peek at the incoming data on the stream. Returns the number of bytes read.
+ /// Throws an exception on failure.
+ template <typename MutableBufferSequence>
+ std::size_t peek(const MutableBufferSequence& buffers)
+ {
+ return stream_impl_.peek(buffers);
+ }
+
+ /// Peek at the incoming data on the stream. Returns the number of bytes read,
+ /// or 0 if an error occurred.
+ template <typename MutableBufferSequence>
+ std::size_t peek(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return stream_impl_.peek(buffers, ec);
+ }
+
+ /// Determine the amount of data that may be read without blocking.
+ std::size_t in_avail()
+ {
+ return stream_impl_.in_avail();
+ }
+
+ /// Determine the amount of data that may be read without blocking.
+ std::size_t in_avail(boost::system::error_code& ec)
+ {
+ return stream_impl_.in_avail(ec);
+ }
+
+private:
+ // The buffered write stream.
+ typedef buffered_write_stream<Stream> write_stream_type;
+ write_stream_type inner_stream_impl_;
+
+ // The buffered read stream.
+ typedef buffered_read_stream<write_stream_type&> read_stream_type;
+ read_stream_type stream_impl_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BUFFERED_STREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffered_stream_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/buffered_stream_fwd.hpp
new file mode 100644
index 00000000000..ceeac165f50
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffered_stream_fwd.hpp
@@ -0,0 +1,27 @@
+//
+// buffered_stream_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_STREAM_FWD_HPP
+#define BOOST_ASIO_BUFFERED_STREAM_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+namespace boost {
+namespace asio {
+
+template <typename Stream>
+class buffered_stream;
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_BUFFERED_STREAM_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffered_write_stream.hpp b/src/third_party/boost-1.70.0/boost/asio/buffered_write_stream.hpp
new file mode 100644
index 00000000000..aab02b51768
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffered_write_stream.hpp
@@ -0,0 +1,234 @@
+//
+// buffered_write_stream.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_WRITE_STREAM_HPP
+#define BOOST_ASIO_BUFFERED_WRITE_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 <cstddef>
+#include <boost/asio/buffered_write_stream_fwd.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffered_stream_storage.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/write.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Adds buffering to the write-related operations of a stream.
+/**
+ * The buffered_write_stream class template can be used to add buffering to the
+ * synchronous and asynchronous write operations of a stream.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Stream>
+class buffered_write_stream
+ : private noncopyable
+{
+public:
+ /// 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(GENERATING_DOCUMENTATION)
+ /// The default buffer size.
+ static const std::size_t default_buffer_size = implementation_defined;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size = 1024);
+#endif
+
+ /// Construct, passing the specified argument to initialise the next layer.
+ template <typename Arg>
+ explicit buffered_write_stream(Arg& a)
+ : next_layer_(a),
+ storage_(default_buffer_size)
+ {
+ }
+
+ /// Construct, passing the specified argument to initialise the next layer.
+ template <typename Arg>
+ buffered_write_stream(Arg& a, std::size_t buffer_size)
+ : next_layer_(a),
+ storage_(buffer_size)
+ {
+ }
+
+ /// Get a reference to the next layer.
+ next_layer_type& next_layer()
+ {
+ return next_layer_;
+ }
+
+ /// Get a reference to the lowest layer.
+ lowest_layer_type& lowest_layer()
+ {
+ return next_layer_.lowest_layer();
+ }
+
+ /// Get a const reference to the lowest layer.
+ const lowest_layer_type& lowest_layer() const
+ {
+ return next_layer_.lowest_layer();
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+ /// Close the stream.
+ void close()
+ {
+ next_layer_.close();
+ }
+
+ /// Close the stream.
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ next_layer_.close(ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Flush all data from the buffer to the next layer. Returns the number of
+ /// bytes written to the next layer on the last write operation. Throws an
+ /// exception on failure.
+ std::size_t flush();
+
+ /// Flush all data from the buffer to the next layer. Returns the number of
+ /// bytes written to the next layer on the last write operation, or 0 if an
+ /// error occurred.
+ std::size_t flush(boost::system::error_code& ec);
+
+ /// Start an asynchronous flush.
+ template <typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+ /// Write the given data to the stream. Returns the number of bytes written.
+ /// Throws an exception on failure.
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers);
+
+ /// Write the given data to the stream. Returns the number of bytes written,
+ /// or 0 if an error occurred and the error handler did not throw.
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ boost::system::error_code& ec);
+
+ /// Start an asynchronous write. The data being written must be valid for the
+ /// lifetime of the asynchronous operation.
+ 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);
+
+ /// Read some data from the stream. Returns the number of bytes read. Throws
+ /// an exception on failure.
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ return next_layer_.read_some(buffers);
+ }
+
+ /// Read some data from the stream. Returns the number of bytes read or 0 if
+ /// an error occurred.
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return next_layer_.read_some(buffers, ec);
+ }
+
+ /// Start an asynchronous read. The buffer into which the data will be read
+ /// must be valid for the lifetime of the asynchronous operation.
+ 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)
+ {
+ return next_layer_.async_read_some(buffers,
+ BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+ }
+
+ /// Peek at the incoming data on the stream. Returns the number of bytes read.
+ /// Throws an exception on failure.
+ template <typename MutableBufferSequence>
+ std::size_t peek(const MutableBufferSequence& buffers)
+ {
+ return next_layer_.peek(buffers);
+ }
+
+ /// Peek at the incoming data on the stream. Returns the number of bytes read,
+ /// or 0 if an error occurred.
+ template <typename MutableBufferSequence>
+ std::size_t peek(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return next_layer_.peek(buffers, ec);
+ }
+
+ /// Determine the amount of data that may be read without blocking.
+ std::size_t in_avail()
+ {
+ return next_layer_.in_avail();
+ }
+
+ /// Determine the amount of data that may be read without blocking.
+ std::size_t in_avail(boost::system::error_code& ec)
+ {
+ return next_layer_.in_avail(ec);
+ }
+
+private:
+ /// Copy data into the internal buffer from the specified source buffer.
+ /// Returns the number of bytes copied.
+ template <typename ConstBufferSequence>
+ std::size_t copy(const ConstBufferSequence& buffers);
+
+ /// The next layer.
+ Stream next_layer_;
+
+ // The data in the buffer.
+ detail::buffered_stream_storage storage_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/buffered_write_stream.hpp>
+
+#endif // BOOST_ASIO_BUFFERED_WRITE_STREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffered_write_stream_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/buffered_write_stream_fwd.hpp
new file mode 100644
index 00000000000..eec5bc2804b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffered_write_stream_fwd.hpp
@@ -0,0 +1,27 @@
+//
+// buffered_write_stream_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_WRITE_STREAM_FWD_HPP
+#define BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+namespace boost {
+namespace asio {
+
+template <typename Stream>
+class buffered_write_stream;
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_BUFFERED_WRITE_STREAM_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/buffers_iterator.hpp b/src/third_party/boost-1.70.0/boost/asio/buffers_iterator.hpp
new file mode 100644
index 00000000000..316c144130d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/buffers_iterator.hpp
@@ -0,0 +1,523 @@
+//
+// buffers_iterator.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERS_ITERATOR_HPP
+#define BOOST_ASIO_BUFFERS_ITERATOR_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 <iterator>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ template <bool IsMutable>
+ struct buffers_iterator_types_helper;
+
+ template <>
+ struct buffers_iterator_types_helper<false>
+ {
+ typedef const_buffer buffer_type;
+ template <typename ByteType>
+ struct byte_type
+ {
+ typedef typename add_const<ByteType>::type type;
+ };
+ };
+
+ template <>
+ struct buffers_iterator_types_helper<true>
+ {
+ typedef mutable_buffer buffer_type;
+ template <typename ByteType>
+ struct byte_type
+ {
+ typedef ByteType type;
+ };
+ };
+
+ template <typename BufferSequence, typename ByteType>
+ struct buffers_iterator_types
+ {
+ enum
+ {
+ is_mutable = is_convertible<
+ typename BufferSequence::value_type,
+ mutable_buffer>::value
+ };
+ typedef buffers_iterator_types_helper<is_mutable> helper;
+ typedef typename helper::buffer_type buffer_type;
+ typedef typename helper::template byte_type<ByteType>::type byte_type;
+ typedef typename BufferSequence::const_iterator const_iterator;
+ };
+
+ template <typename ByteType>
+ struct buffers_iterator_types<mutable_buffer, ByteType>
+ {
+ typedef mutable_buffer buffer_type;
+ typedef ByteType byte_type;
+ typedef const mutable_buffer* const_iterator;
+ };
+
+ template <typename ByteType>
+ struct buffers_iterator_types<const_buffer, ByteType>
+ {
+ typedef const_buffer buffer_type;
+ typedef typename add_const<ByteType>::type byte_type;
+ typedef const const_buffer* const_iterator;
+ };
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ template <typename ByteType>
+ struct buffers_iterator_types<mutable_buffers_1, ByteType>
+ {
+ typedef mutable_buffer buffer_type;
+ typedef ByteType byte_type;
+ typedef const mutable_buffer* const_iterator;
+ };
+
+ template <typename ByteType>
+ struct buffers_iterator_types<const_buffers_1, ByteType>
+ {
+ typedef const_buffer buffer_type;
+ typedef typename add_const<ByteType>::type byte_type;
+ typedef const const_buffer* const_iterator;
+ };
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+}
+
+/// A random access iterator over the bytes in a buffer sequence.
+template <typename BufferSequence, typename ByteType = char>
+class buffers_iterator
+{
+private:
+ typedef typename detail::buffers_iterator_types<
+ BufferSequence, ByteType>::buffer_type buffer_type;
+
+ typedef typename detail::buffers_iterator_types<BufferSequence,
+ ByteType>::const_iterator buffer_sequence_iterator_type;
+
+public:
+ /// The type used for the distance between two iterators.
+ typedef std::ptrdiff_t difference_type;
+
+ /// The type of the value pointed to by the iterator.
+ typedef ByteType value_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The type of the result of applying operator->() to the iterator.
+ /**
+ * If the buffer sequence stores buffer objects that are convertible to
+ * mutable_buffer, this is a pointer to a non-const ByteType. Otherwise, a
+ * pointer to a const ByteType.
+ */
+ typedef const_or_non_const_ByteType* pointer;
+#else // defined(GENERATING_DOCUMENTATION)
+ typedef typename detail::buffers_iterator_types<
+ BufferSequence, ByteType>::byte_type* pointer;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The type of the result of applying operator*() to the iterator.
+ /**
+ * If the buffer sequence stores buffer objects that are convertible to
+ * mutable_buffer, this is a reference to a non-const ByteType. Otherwise, a
+ * reference to a const ByteType.
+ */
+ typedef const_or_non_const_ByteType& reference;
+#else // defined(GENERATING_DOCUMENTATION)
+ typedef typename detail::buffers_iterator_types<
+ BufferSequence, ByteType>::byte_type& reference;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// The iterator category.
+ typedef std::random_access_iterator_tag iterator_category;
+
+ /// Default constructor. Creates an iterator in an undefined state.
+ buffers_iterator()
+ : current_buffer_(),
+ current_buffer_position_(0),
+ begin_(),
+ current_(),
+ end_(),
+ position_(0)
+ {
+ }
+
+ /// Construct an iterator representing the beginning of the buffers' data.
+ static buffers_iterator begin(const BufferSequence& buffers)
+#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
+ __attribute__ ((__noinline__))
+#endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
+ {
+ buffers_iterator new_iter;
+ new_iter.begin_ = boost::asio::buffer_sequence_begin(buffers);
+ new_iter.current_ = boost::asio::buffer_sequence_begin(buffers);
+ new_iter.end_ = boost::asio::buffer_sequence_end(buffers);
+ while (new_iter.current_ != new_iter.end_)
+ {
+ new_iter.current_buffer_ = *new_iter.current_;
+ if (new_iter.current_buffer_.size() > 0)
+ break;
+ ++new_iter.current_;
+ }
+ return new_iter;
+ }
+
+ /// Construct an iterator representing the end of the buffers' data.
+ static buffers_iterator end(const BufferSequence& buffers)
+#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
+ __attribute__ ((__noinline__))
+#endif // defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
+ {
+ buffers_iterator new_iter;
+ new_iter.begin_ = boost::asio::buffer_sequence_begin(buffers);
+ new_iter.current_ = boost::asio::buffer_sequence_begin(buffers);
+ new_iter.end_ = boost::asio::buffer_sequence_end(buffers);
+ while (new_iter.current_ != new_iter.end_)
+ {
+ buffer_type buffer = *new_iter.current_;
+ new_iter.position_ += buffer.size();
+ ++new_iter.current_;
+ }
+ return new_iter;
+ }
+
+ /// Dereference an iterator.
+ reference operator*() const
+ {
+ return dereference();
+ }
+
+ /// Dereference an iterator.
+ pointer operator->() const
+ {
+ return &dereference();
+ }
+
+ /// Access an individual element.
+ reference operator[](std::ptrdiff_t difference) const
+ {
+ buffers_iterator tmp(*this);
+ tmp.advance(difference);
+ return *tmp;
+ }
+
+ /// Increment operator (prefix).
+ buffers_iterator& operator++()
+ {
+ increment();
+ return *this;
+ }
+
+ /// Increment operator (postfix).
+ buffers_iterator operator++(int)
+ {
+ buffers_iterator tmp(*this);
+ ++*this;
+ return tmp;
+ }
+
+ /// Decrement operator (prefix).
+ buffers_iterator& operator--()
+ {
+ decrement();
+ return *this;
+ }
+
+ /// Decrement operator (postfix).
+ buffers_iterator operator--(int)
+ {
+ buffers_iterator tmp(*this);
+ --*this;
+ return tmp;
+ }
+
+ /// Addition operator.
+ buffers_iterator& operator+=(std::ptrdiff_t difference)
+ {
+ advance(difference);
+ return *this;
+ }
+
+ /// Subtraction operator.
+ buffers_iterator& operator-=(std::ptrdiff_t difference)
+ {
+ advance(-difference);
+ return *this;
+ }
+
+ /// Addition operator.
+ friend buffers_iterator operator+(const buffers_iterator& iter,
+ std::ptrdiff_t difference)
+ {
+ buffers_iterator tmp(iter);
+ tmp.advance(difference);
+ return tmp;
+ }
+
+ /// Addition operator.
+ friend buffers_iterator operator+(std::ptrdiff_t difference,
+ const buffers_iterator& iter)
+ {
+ buffers_iterator tmp(iter);
+ tmp.advance(difference);
+ return tmp;
+ }
+
+ /// Subtraction operator.
+ friend buffers_iterator operator-(const buffers_iterator& iter,
+ std::ptrdiff_t difference)
+ {
+ buffers_iterator tmp(iter);
+ tmp.advance(-difference);
+ return tmp;
+ }
+
+ /// Subtraction operator.
+ friend std::ptrdiff_t operator-(const buffers_iterator& a,
+ const buffers_iterator& b)
+ {
+ return b.distance_to(a);
+ }
+
+ /// Test two iterators for equality.
+ friend bool operator==(const buffers_iterator& a, const buffers_iterator& b)
+ {
+ return a.equal(b);
+ }
+
+ /// Test two iterators for inequality.
+ friend bool operator!=(const buffers_iterator& a, const buffers_iterator& b)
+ {
+ return !a.equal(b);
+ }
+
+ /// Compare two iterators.
+ friend bool operator<(const buffers_iterator& a, const buffers_iterator& b)
+ {
+ return a.distance_to(b) > 0;
+ }
+
+ /// Compare two iterators.
+ friend bool operator<=(const buffers_iterator& a, const buffers_iterator& b)
+ {
+ return !(b < a);
+ }
+
+ /// Compare two iterators.
+ friend bool operator>(const buffers_iterator& a, const buffers_iterator& b)
+ {
+ return b < a;
+ }
+
+ /// Compare two iterators.
+ friend bool operator>=(const buffers_iterator& a, const buffers_iterator& b)
+ {
+ return !(a < b);
+ }
+
+private:
+ // Dereference the iterator.
+ reference dereference() const
+ {
+ return static_cast<pointer>(
+ current_buffer_.data())[current_buffer_position_];
+ }
+
+ // Compare two iterators for equality.
+ bool equal(const buffers_iterator& other) const
+ {
+ return position_ == other.position_;
+ }
+
+ // Increment the iterator.
+ void increment()
+ {
+ BOOST_ASIO_ASSERT(current_ != end_ && "iterator out of bounds");
+ ++position_;
+
+ // Check if the increment can be satisfied by the current buffer.
+ ++current_buffer_position_;
+ if (current_buffer_position_ != current_buffer_.size())
+ return;
+
+ // Find the next non-empty buffer.
+ ++current_;
+ current_buffer_position_ = 0;
+ while (current_ != end_)
+ {
+ current_buffer_ = *current_;
+ if (current_buffer_.size() > 0)
+ return;
+ ++current_;
+ }
+ }
+
+ // Decrement the iterator.
+ void decrement()
+ {
+ BOOST_ASIO_ASSERT(position_ > 0 && "iterator out of bounds");
+ --position_;
+
+ // Check if the decrement can be satisfied by the current buffer.
+ if (current_buffer_position_ != 0)
+ {
+ --current_buffer_position_;
+ return;
+ }
+
+ // Find the previous non-empty buffer.
+ buffer_sequence_iterator_type iter = current_;
+ while (iter != begin_)
+ {
+ --iter;
+ buffer_type buffer = *iter;
+ std::size_t buffer_size = buffer.size();
+ if (buffer_size > 0)
+ {
+ current_ = iter;
+ current_buffer_ = buffer;
+ current_buffer_position_ = buffer_size - 1;
+ return;
+ }
+ }
+ }
+
+ // Advance the iterator by the specified distance.
+ void advance(std::ptrdiff_t n)
+ {
+ if (n > 0)
+ {
+ BOOST_ASIO_ASSERT(current_ != end_ && "iterator out of bounds");
+ for (;;)
+ {
+ std::ptrdiff_t current_buffer_balance
+ = current_buffer_.size() - current_buffer_position_;
+
+ // Check if the advance can be satisfied by the current buffer.
+ if (current_buffer_balance > n)
+ {
+ position_ += n;
+ current_buffer_position_ += n;
+ return;
+ }
+
+ // Update position.
+ n -= current_buffer_balance;
+ position_ += current_buffer_balance;
+
+ // Move to next buffer. If it is empty then it will be skipped on the
+ // next iteration of this loop.
+ if (++current_ == end_)
+ {
+ BOOST_ASIO_ASSERT(n == 0 && "iterator out of bounds");
+ current_buffer_ = buffer_type();
+ current_buffer_position_ = 0;
+ return;
+ }
+ current_buffer_ = *current_;
+ current_buffer_position_ = 0;
+ }
+ }
+ else if (n < 0)
+ {
+ std::size_t abs_n = -n;
+ BOOST_ASIO_ASSERT(position_ >= abs_n && "iterator out of bounds");
+ for (;;)
+ {
+ // Check if the advance can be satisfied by the current buffer.
+ if (current_buffer_position_ >= abs_n)
+ {
+ position_ -= abs_n;
+ current_buffer_position_ -= abs_n;
+ return;
+ }
+
+ // Update position.
+ abs_n -= current_buffer_position_;
+ position_ -= current_buffer_position_;
+
+ // Check if we've reached the beginning of the buffers.
+ if (current_ == begin_)
+ {
+ BOOST_ASIO_ASSERT(abs_n == 0 && "iterator out of bounds");
+ current_buffer_position_ = 0;
+ return;
+ }
+
+ // Find the previous non-empty buffer.
+ buffer_sequence_iterator_type iter = current_;
+ while (iter != begin_)
+ {
+ --iter;
+ buffer_type buffer = *iter;
+ std::size_t buffer_size = buffer.size();
+ if (buffer_size > 0)
+ {
+ current_ = iter;
+ current_buffer_ = buffer;
+ current_buffer_position_ = buffer_size;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Determine the distance between two iterators.
+ std::ptrdiff_t distance_to(const buffers_iterator& other) const
+ {
+ return other.position_ - position_;
+ }
+
+ buffer_type current_buffer_;
+ std::size_t current_buffer_position_;
+ buffer_sequence_iterator_type begin_;
+ buffer_sequence_iterator_type current_;
+ buffer_sequence_iterator_type end_;
+ std::size_t position_;
+};
+
+/// Construct an iterator representing the beginning of the buffers' data.
+template <typename BufferSequence>
+inline buffers_iterator<BufferSequence> buffers_begin(
+ const BufferSequence& buffers)
+{
+ return buffers_iterator<BufferSequence>::begin(buffers);
+}
+
+/// Construct an iterator representing the end of the buffers' data.
+template <typename BufferSequence>
+inline buffers_iterator<BufferSequence> buffers_end(
+ const BufferSequence& buffers)
+{
+ return buffers_iterator<BufferSequence>::end(buffers);
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BUFFERS_ITERATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/co_spawn.hpp b/src/third_party/boost-1.70.0/boost/asio/co_spawn.hpp
new file mode 100644
index 00000000000..67d17e21b50
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/co_spawn.hpp
@@ -0,0 +1,90 @@
+//
+// co_spawn.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CO_SPAWN_HPP
+#define BOOST_ASIO_CO_SPAWN_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_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/awaitable.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/is_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct awaitable_signature;
+
+template <typename T, typename Executor>
+struct awaitable_signature<awaitable<T, Executor>>
+{
+ typedef void type(std::exception_ptr, T);
+};
+
+template <typename Executor>
+struct awaitable_signature<awaitable<void, Executor>>
+{
+ typedef void type(std::exception_ptr);
+};
+
+} // namespace detail
+
+/// Spawn a new thread of execution.
+/**
+ * The entry point function object @c f must have the signature:
+ *
+ * @code awaitable<void, E> f(); @endcode
+ *
+ * where @c E is convertible from @c Executor.
+ */
+template <typename Executor, typename F, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+co_spawn(const Executor& ex, F&& f, CompletionToken&& token,
+ typename enable_if<
+ is_executor<Executor>::value
+ >::type* = 0);
+
+/// Spawn a new thread of execution.
+/**
+ * The entry point function object @c f must have the signature:
+ *
+ * @code awaitable<void, E> f(); @endcode
+ *
+ * where @c E is convertible from @c ExecutionContext::executor_type.
+ */
+template <typename ExecutionContext, typename F, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0);
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/co_spawn.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_CO_SPAWN_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/completion_condition.hpp b/src/third_party/boost-1.70.0/boost/asio/completion_condition.hpp
new file mode 100644
index 00000000000..4d0337b3fb5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/completion_condition.hpp
@@ -0,0 +1,220 @@
+//
+// completion_condition.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_COMPLETION_CONDITION_HPP
+#define BOOST_ASIO_COMPLETION_CONDITION_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/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail {
+
+// The default maximum number of bytes to transfer in a single operation.
+enum default_max_transfer_size_t { default_max_transfer_size = 65536 };
+
+// Adapt result of old-style completion conditions (which had a bool result
+// where true indicated that the operation was complete).
+inline std::size_t adapt_completion_condition_result(bool result)
+{
+ return result ? 0 : default_max_transfer_size;
+}
+
+// Adapt result of current completion conditions (which have a size_t result
+// where 0 means the operation is complete, and otherwise the result is the
+// maximum number of bytes to transfer on the next underlying operation).
+inline std::size_t adapt_completion_condition_result(std::size_t result)
+{
+ return result;
+}
+
+class transfer_all_t
+{
+public:
+ typedef std::size_t result_type;
+
+ template <typename Error>
+ std::size_t operator()(const Error& err, std::size_t)
+ {
+ return !!err ? 0 : default_max_transfer_size;
+ }
+};
+
+class transfer_at_least_t
+{
+public:
+ typedef std::size_t result_type;
+
+ explicit transfer_at_least_t(std::size_t minimum)
+ : minimum_(minimum)
+ {
+ }
+
+ template <typename Error>
+ std::size_t operator()(const Error& err, std::size_t bytes_transferred)
+ {
+ return (!!err || bytes_transferred >= minimum_)
+ ? 0 : default_max_transfer_size;
+ }
+
+private:
+ std::size_t minimum_;
+};
+
+class transfer_exactly_t
+{
+public:
+ typedef std::size_t result_type;
+
+ explicit transfer_exactly_t(std::size_t size)
+ : size_(size)
+ {
+ }
+
+ template <typename Error>
+ std::size_t operator()(const Error& err, std::size_t bytes_transferred)
+ {
+ return (!!err || bytes_transferred >= size_) ? 0 :
+ (size_ - bytes_transferred < default_max_transfer_size
+ ? size_ - bytes_transferred : std::size_t(default_max_transfer_size));
+ }
+
+private:
+ std::size_t size_;
+};
+
+} // namespace detail
+
+/**
+ * @defgroup completion_condition Completion Condition Function Objects
+ *
+ * Function objects used for determining when a read or write operation should
+ * complete.
+ */
+/*@{*/
+
+/// Return a completion condition function object that indicates that a read or
+/// write operation should continue until all of the data has been transferred,
+/// or until an error occurs.
+/**
+ * This function is used to create an object, of unspecified type, that meets
+ * CompletionCondition requirements.
+ *
+ * @par Example
+ * Reading until a buffer is full:
+ * @code
+ * boost::array<char, 128> buf;
+ * boost::system::error_code ec;
+ * std::size_t n = boost::asio::read(
+ * sock, boost::asio::buffer(buf),
+ * boost::asio::transfer_all(), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * // n == 128
+ * }
+ * @endcode
+ */
+#if defined(GENERATING_DOCUMENTATION)
+unspecified transfer_all();
+#else
+inline detail::transfer_all_t transfer_all()
+{
+ return detail::transfer_all_t();
+}
+#endif
+
+/// Return a completion condition function object that indicates that a read or
+/// write operation should continue until a minimum number of bytes has been
+/// transferred, or until an error occurs.
+/**
+ * This function is used to create an object, of unspecified type, that meets
+ * CompletionCondition requirements.
+ *
+ * @par Example
+ * Reading until a buffer is full or contains at least 64 bytes:
+ * @code
+ * boost::array<char, 128> buf;
+ * boost::system::error_code ec;
+ * std::size_t n = boost::asio::read(
+ * sock, boost::asio::buffer(buf),
+ * boost::asio::transfer_at_least(64), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * // n >= 64 && n <= 128
+ * }
+ * @endcode
+ */
+#if defined(GENERATING_DOCUMENTATION)
+unspecified transfer_at_least(std::size_t minimum);
+#else
+inline detail::transfer_at_least_t transfer_at_least(std::size_t minimum)
+{
+ return detail::transfer_at_least_t(minimum);
+}
+#endif
+
+/// Return a completion condition function object that indicates that a read or
+/// write operation should continue until an exact number of bytes has been
+/// transferred, or until an error occurs.
+/**
+ * This function is used to create an object, of unspecified type, that meets
+ * CompletionCondition requirements.
+ *
+ * @par Example
+ * Reading until a buffer is full or contains exactly 64 bytes:
+ * @code
+ * boost::array<char, 128> buf;
+ * boost::system::error_code ec;
+ * std::size_t n = boost::asio::read(
+ * sock, boost::asio::buffer(buf),
+ * boost::asio::transfer_exactly(64), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * // n == 64
+ * }
+ * @endcode
+ */
+#if defined(GENERATING_DOCUMENTATION)
+unspecified transfer_exactly(std::size_t size);
+#else
+inline detail::transfer_exactly_t transfer_exactly(std::size_t size)
+{
+ return detail::transfer_exactly_t(size);
+}
+#endif
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_COMPLETION_CONDITION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/compose.hpp b/src/third_party/boost-1.70.0/boost/asio/compose.hpp
new file mode 100644
index 00000000000..b38e4faecb6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/compose.hpp
@@ -0,0 +1,138 @@
+//
+// compose.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_COMPOSE_HPP
+#define BOOST_ASIO_COMPOSE_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Launch an asynchronous operation with a stateful implementation.
+/**
+ * The async_compose function simplifies the implementation of composed
+ * asynchronous operations automatically wrapping a stateful function object
+ * with a conforming intermediate completion handler.
+ *
+ * @param implementation A function object that contains the implementation of
+ * the composed asynchronous operation. The first argument to the function
+ * object is a non-const reference to the enclosing intermediate completion
+ * handler. The remaining arguments are any arguments that originate from the
+ * completion handlers of any asynchronous operations performed by the
+ * implementation.
+
+ * @param token The completion token.
+ *
+ * @param io_objects_or_executors Zero or more I/O objects or I/O executors for
+ * which outstanding work must be maintained.
+ *
+ * @par Example:
+ *
+ * @code struct async_echo_implementation
+ * {
+ * tcp::socket& socket_;
+ * boost::asio::mutable_buffer buffer_;
+ * enum { starting, reading, writing } state_;
+ *
+ * template <typename Self>
+ * void operator()(Self& self,
+ * boost::system::error_code error = {},
+ * std::size_t n = 0)
+ * {
+ * switch (state_)
+ * {
+ * case starting:
+ * state_ = reading;
+ * socket_.async_read_some(
+ * buffer_, std::move(self));
+ * break;
+ * case reading:
+ * if (error)
+ * {
+ * self.complete(error, 0);
+ * }
+ * else
+ * {
+ * state_ = writing;
+ * boost::asio::async_write(socket_, buffer_,
+ * boost::asio::transfer_exactly(n),
+ * std::move(self));
+ * }
+ * break;
+ * case writing:
+ * self.complete(error, n);
+ * break;
+ * }
+ * }
+ * };
+ *
+ * template <typename CompletionToken>
+ * auto async_echo(tcp::socket& socket,
+ * boost::asio::mutable_buffer buffer,
+ * CompletionToken&& token) ->
+ * typename boost::asio::async_result<
+ * typename std::decay<CompletionToken>::type,
+ * void(boost::system::error_code, std::size_t)>::return_type
+ * {
+ * return boost::asio::async_compose<CompletionToken,
+ * void(boost::system::error_code, std::size_t)>(
+ * async_echo_implementation{socket, buffer,
+ * async_echo_implementation::starting},
+ * token, socket);
+ * } @endcode
+ */
+template <typename CompletionToken, typename Signature,
+ typename Implementation, typename... IoObjectsOrExecutors>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)
+async_compose(BOOST_ASIO_MOVE_ARG(Implementation) implementation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
+ BOOST_ASIO_MOVE_ARG(IoObjectsOrExecutors)... io_objects_or_executors);
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename Signature, typename Implementation>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)
+async_compose(BOOST_ASIO_MOVE_ARG(Implementation) implementation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token);
+
+#define BOOST_ASIO_PRIVATE_ASYNC_COMPOSE_DEF(n) \
+ template <typename CompletionToken, typename Signature, \
+ typename Implementation, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature) \
+ async_compose(BOOST_ASIO_MOVE_ARG(Implementation) implementation, \
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n));
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_COMPOSE_DEF)
+#undef BOOST_ASIO_PRIVATE_ASYNC_COMPOSE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/compose.hpp>
+
+#endif // BOOST_ASIO_COMPOSE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/connect.hpp b/src/third_party/boost-1.70.0/boost/asio/connect.hpp
new file mode 100644
index 00000000000..a500392d3cf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/connect.hpp
@@ -0,0 +1,1057 @@
+//
+// connect.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_context);
+ * boost::asio::connect(s, r.resolve(q)); @endcode
+ */
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_context);
+ * boost::system::error_code ec;
+ * boost::asio::connect(s, r.resolve(q), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * } @endcode
+ */
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& 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, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& 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, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(my_context);
+ * boost::asio::connect(s, e.begin(), e.end()); @endcode
+ */
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(my_context);
+ * boost::system::error_code ec;
+ * boost::asio::connect(s, e.begin(), e.end(), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * } @endcode
+ */
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_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, typename Executor,
+ typename EndpointSequence, typename ConnectCondition>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_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, typename Executor,
+ typename EndpointSequence, typename ConnectCondition>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& 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, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& 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, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(my_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, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& 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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(my_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, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code tcp::resolver r(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_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, typename Executor,
+ typename EndpointSequence, typename RangeConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint))
+async_connect(basic_socket<Protocol, Executor>& 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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, typename Executor,
+ typename Iterator, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code std::vector<tcp::endpoint> endpoints = ...;
+ * tcp::socket s(my_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, typename Executor,
+ typename Iterator, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_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, typename Executor, 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, Executor>& 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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(my_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(my_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, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& 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.70.0/boost/asio/coroutine.hpp b/src/third_party/boost-1.70.0/boost/asio/coroutine.hpp
new file mode 100644
index 00000000000..c519295310e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/coroutine.hpp
@@ -0,0 +1,330 @@
+//
+// coroutine.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_COROUTINE_HPP
+#define BOOST_ASIO_COROUTINE_HPP
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class coroutine_ref;
+
+} // namespace detail
+
+/// Provides support for implementing stackless coroutines.
+/**
+ * The @c coroutine class may be used to implement stackless coroutines. The
+ * class itself is used to store the current state of the coroutine.
+ *
+ * Coroutines are copy-constructible and assignable, and the space overhead is
+ * a single int. They can be used as a base class:
+ *
+ * @code class session : coroutine
+ * {
+ * ...
+ * }; @endcode
+ *
+ * or as a data member:
+ *
+ * @code class session
+ * {
+ * ...
+ * coroutine coro_;
+ * }; @endcode
+ *
+ * or even bound in as a function argument using lambdas or @c bind(). The
+ * important thing is that as the application maintains a copy of the object
+ * for as long as the coroutine must be kept alive.
+ *
+ * @par Pseudo-keywords
+ *
+ * A coroutine is used in conjunction with certain "pseudo-keywords", which
+ * are implemented as macros. These macros are defined by a header file:
+ *
+ * @code #include <boost/asio/yield.hpp>@endcode
+ *
+ * and may conversely be undefined as follows:
+ *
+ * @code #include <boost/asio/unyield.hpp>@endcode
+ *
+ * <b>reenter</b>
+ *
+ * The @c reenter macro is used to define the body of a coroutine. It takes a
+ * single argument: a pointer or reference to a coroutine object. For example,
+ * if the base class is a coroutine object you may write:
+ *
+ * @code reenter (this)
+ * {
+ * ... coroutine body ...
+ * } @endcode
+ *
+ * and if a data member or other variable you can write:
+ *
+ * @code reenter (coro_)
+ * {
+ * ... coroutine body ...
+ * } @endcode
+ *
+ * When @c reenter is executed at runtime, control jumps to the location of the
+ * last @c yield or @c fork.
+ *
+ * The coroutine body may also be a single statement, such as:
+ *
+ * @code reenter (this) for (;;)
+ * {
+ * ...
+ * } @endcode
+ *
+ * @b Limitation: The @c reenter macro is implemented using a switch. This
+ * means that you must take care when using local variables within the
+ * coroutine body. The local variable is not allowed in a position where
+ * reentering the coroutine could bypass the variable definition.
+ *
+ * <b>yield <em>statement</em></b>
+ *
+ * This form of the @c yield keyword is often used with asynchronous operations:
+ *
+ * @code yield socket_->async_read_some(buffer(*buffer_), *this); @endcode
+ *
+ * This divides into four logical steps:
+ *
+ * @li @c yield saves the current state of the coroutine.
+ * @li The statement initiates the asynchronous operation.
+ * @li The resume point is defined immediately following the statement.
+ * @li Control is transferred to the end of the coroutine body.
+ *
+ * When the asynchronous operation completes, the function object is invoked
+ * and @c reenter causes control to transfer to the resume point. It is
+ * important to remember to carry the coroutine state forward with the
+ * asynchronous operation. In the above snippet, the current class is a
+ * function object object with a coroutine object as base class or data member.
+ *
+ * The statement may also be a compound statement, and this permits us to
+ * define local variables with limited scope:
+ *
+ * @code yield
+ * {
+ * mutable_buffers_1 b = buffer(*buffer_);
+ * socket_->async_read_some(b, *this);
+ * } @endcode
+ *
+ * <b>yield return <em>expression</em> ;</b>
+ *
+ * This form of @c yield is often used in generators or coroutine-based parsers.
+ * For example, the function object:
+ *
+ * @code struct interleave : coroutine
+ * {
+ * istream& is1;
+ * istream& is2;
+ * char operator()(char c)
+ * {
+ * reenter (this) for (;;)
+ * {
+ * yield return is1.get();
+ * yield return is2.get();
+ * }
+ * }
+ * }; @endcode
+ *
+ * defines a trivial coroutine that interleaves the characters from two input
+ * streams.
+ *
+ * This type of @c yield divides into three logical steps:
+ *
+ * @li @c yield saves the current state of the coroutine.
+ * @li The resume point is defined immediately following the semicolon.
+ * @li The value of the expression is returned from the function.
+ *
+ * <b>yield ;</b>
+ *
+ * This form of @c yield is equivalent to the following steps:
+ *
+ * @li @c yield saves the current state of the coroutine.
+ * @li The resume point is defined immediately following the semicolon.
+ * @li Control is transferred to the end of the coroutine body.
+ *
+ * This form might be applied when coroutines are used for cooperative
+ * threading and scheduling is explicitly managed. For example:
+ *
+ * @code struct task : coroutine
+ * {
+ * ...
+ * void operator()()
+ * {
+ * reenter (this)
+ * {
+ * while (... not finished ...)
+ * {
+ * ... do something ...
+ * yield;
+ * ... do some more ...
+ * yield;
+ * }
+ * }
+ * }
+ * ...
+ * };
+ * ...
+ * task t1, t2;
+ * for (;;)
+ * {
+ * t1();
+ * t2();
+ * } @endcode
+ *
+ * <b>yield break ;</b>
+ *
+ * The final form of @c yield is used to explicitly terminate the coroutine.
+ * This form is comprised of two steps:
+ *
+ * @li @c yield sets the coroutine state to indicate termination.
+ * @li Control is transferred to the end of the coroutine body.
+ *
+ * Once terminated, calls to is_complete() return true and the coroutine cannot
+ * be reentered.
+ *
+ * Note that a coroutine may also be implicitly terminated if the coroutine
+ * body is exited without a yield, e.g. by return, throw or by running to the
+ * end of the body.
+ *
+ * <b>fork <em>statement</em></b>
+ *
+ * The @c fork pseudo-keyword is used when "forking" a coroutine, i.e. splitting
+ * it into two (or more) copies. One use of @c fork is in a server, where a new
+ * coroutine is created to handle each client connection:
+ *
+ * @code reenter (this)
+ * {
+ * do
+ * {
+ * socket_.reset(new tcp::socket(my_context_));
+ * yield acceptor->async_accept(*socket_, *this);
+ * fork server(*this)();
+ * } while (is_parent());
+ * ... client-specific handling follows ...
+ * } @endcode
+ *
+ * The logical steps involved in a @c fork are:
+ *
+ * @li @c fork saves the current state of the coroutine.
+ * @li The statement creates a copy of the coroutine and either executes it
+ * immediately or schedules it for later execution.
+ * @li The resume point is defined immediately following the semicolon.
+ * @li For the "parent", control immediately continues from the next line.
+ *
+ * The functions is_parent() and is_child() can be used to differentiate
+ * between parent and child. You would use these functions to alter subsequent
+ * control flow.
+ *
+ * Note that @c fork doesn't do the actual forking by itself. It is the
+ * application's responsibility to create a clone of the coroutine and call it.
+ * The clone can be called immediately, as above, or scheduled for delayed
+ * execution using something like boost::asio::post().
+ *
+ * @par Alternate macro names
+ *
+ * If preferred, an application can use macro names that follow a more typical
+ * naming convention, rather than the pseudo-keywords. These are:
+ *
+ * @li @c BOOST_ASIO_CORO_REENTER instead of @c reenter
+ * @li @c BOOST_ASIO_CORO_YIELD instead of @c yield
+ * @li @c BOOST_ASIO_CORO_FORK instead of @c fork
+ */
+class coroutine
+{
+public:
+ /// Constructs a coroutine in its initial state.
+ coroutine() : value_(0) {}
+
+ /// Returns true if the coroutine is the child of a fork.
+ bool is_child() const { return value_ < 0; }
+
+ /// Returns true if the coroutine is the parent of a fork.
+ bool is_parent() const { return !is_child(); }
+
+ /// Returns true if the coroutine has reached its terminal state.
+ bool is_complete() const { return value_ == -1; }
+
+private:
+ friend class detail::coroutine_ref;
+ int value_;
+};
+
+
+namespace detail {
+
+class coroutine_ref
+{
+public:
+ coroutine_ref(coroutine& c) : value_(c.value_), modified_(false) {}
+ coroutine_ref(coroutine* c) : value_(c->value_), modified_(false) {}
+ ~coroutine_ref() { if (!modified_) value_ = -1; }
+ operator int() const { return value_; }
+ int& operator=(int v) { modified_ = true; return value_ = v; }
+private:
+ void operator=(const coroutine_ref&);
+ int& value_;
+ bool modified_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#define BOOST_ASIO_CORO_REENTER(c) \
+ switch (::boost::asio::detail::coroutine_ref _coro_value = c) \
+ case -1: if (_coro_value) \
+ { \
+ goto terminate_coroutine; \
+ terminate_coroutine: \
+ _coro_value = -1; \
+ goto bail_out_of_coroutine; \
+ bail_out_of_coroutine: \
+ break; \
+ } \
+ else /* fall-through */ case 0:
+
+#define BOOST_ASIO_CORO_YIELD_IMPL(n) \
+ for (_coro_value = (n);;) \
+ if (_coro_value == 0) \
+ { \
+ case (n): ; \
+ break; \
+ } \
+ else \
+ switch (_coro_value ? 0 : 1) \
+ for (;;) \
+ /* fall-through */ case -1: if (_coro_value) \
+ goto terminate_coroutine; \
+ else for (;;) \
+ /* fall-through */ case 1: if (_coro_value) \
+ goto bail_out_of_coroutine; \
+ else /* fall-through */ case 0:
+
+#define BOOST_ASIO_CORO_FORK_IMPL(n) \
+ for (_coro_value = -(n);; _coro_value = (n)) \
+ if (_coro_value == (n)) \
+ { \
+ case -(n): ; \
+ break; \
+ } \
+ else
+
+#if defined(_MSC_VER)
+# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(__COUNTER__ + 1)
+# define BOOST_ASIO_CORO_FORK BOOST_ASIO_CORO_FORK_IMPL(__COUNTER__ + 1)
+#else // defined(_MSC_VER)
+# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(__LINE__)
+# define BOOST_ASIO_CORO_FORK BOOST_ASIO_CORO_FORK_IMPL(__LINE__)
+#endif // defined(_MSC_VER)
+
+#endif // BOOST_ASIO_COROUTINE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/deadline_timer.hpp b/src/third_party/boost-1.70.0/boost/asio/deadline_timer.hpp
new file mode 100644
index 00000000000..1c061fc9541
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/deadline_timer.hpp
@@ -0,0 +1,40 @@
+//
+// deadline_timer.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DEADLINE_TIMER_HPP
+#define BOOST_ASIO_DEADLINE_TIMER_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_BOOST_DATE_TIME) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/socket_types.hpp> // Must come before posix_time.
+#include <boost/asio/basic_deadline_timer.hpp>
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for the typical usage of timer. Uses a UTC clock.
+typedef basic_deadline_timer<boost::posix_time::ptime> deadline_timer;
+
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_DEADLINE_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/defer.hpp b/src/third_party/boost-1.70.0/boost/asio/defer.hpp
new file mode 100644
index 00000000000..319063a7188
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/defer.hpp
@@ -0,0 +1,119 @@
+//
+// defer.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DEFER_HPP
+#define BOOST_ASIO_DEFER_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/type_traits.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/is_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Submits a completion token or function object for execution.
+/**
+ * This function submits an object for execution using the object's associated
+ * executor. The function object is queued for execution, and is never called
+ * from the current thread prior to returning from <tt>defer()</tt>.
+ *
+ * The use of @c defer(), rather than @ref post(), indicates the caller's
+ * preference that the executor defer the queueing of the function object. This
+ * may allow the executor to optimise queueing for cases when the function
+ * object represents a continuation of the current call context.
+ *
+ * This function has the following effects:
+ *
+ * @li Constructs a function object handler of type @c Handler, initialized
+ * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ *
+ * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
+ * initializing the object as <tt>result(handler)</tt>.
+ *
+ * @li Obtains the handler's associated executor object @c ex by performing
+ * <tt>get_associated_executor(handler)</tt>.
+ *
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * <tt>get_associated_allocator(handler)</tt>.
+ *
+ * @li Performs <tt>ex.defer(std::move(handler), alloc)</tt>.
+ *
+ * @li Returns <tt>result.get()</tt>.
+ */
+template <typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) token);
+
+/// Submits a completion token or function object for execution.
+/**
+ * This function submits an object for execution using the specified executor.
+ * The function object is queued for execution, and is never called from the
+ * current thread prior to returning from <tt>defer()</tt>.
+ *
+ * The use of @c defer(), rather than @ref post(), indicates the caller's
+ * preference that the executor defer the queueing of the function object. This
+ * may allow the executor to optimise queueing for cases when the function
+ * object represents a continuation of the current call context.
+ *
+ * This function has the following effects:
+ *
+ * @li Constructs a function object handler of type @c Handler, initialized
+ * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ *
+ * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
+ * initializing the object as <tt>result(handler)</tt>.
+ *
+ * @li Obtains the handler's associated executor object @c ex1 by performing
+ * <tt>get_associated_executor(handler)</tt>.
+ *
+ * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
+ *
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * <tt>get_associated_allocator(handler)</tt>.
+ *
+ * @li Constructs a function object @c f with a function call operator that
+ * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
+ * <tt>w.reset()</tt>.
+ *
+ * @li Performs <tt>Executor(ex).defer(std::move(f), alloc)</tt>.
+ *
+ * @li Returns <tt>result.get()</tt>.
+ */
+template <typename Executor, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
+ const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_executor<Executor>::value>::type* = 0);
+
+/// Submits a completion token or function object for execution.
+/**
+ * @returns <tt>defer(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
+ */
+template <typename ExecutionContext, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
+ ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type* = 0);
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/defer.hpp>
+
+#endif // BOOST_ASIO_DEFER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detached.hpp b/src/third_party/boost-1.70.0/boost/asio/detached.hpp
new file mode 100644
index 00000000000..54b6bd20631
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detached.hpp
@@ -0,0 +1,64 @@
+//
+// detached.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETACHED_HPP
+#define BOOST_ASIO_DETACHED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <memory>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Class used to specify that an asynchronous operation is detached.
+/**
+
+ * The detached_t class is used to indicate that an asynchronous operation is
+ * detached. That is, there is no completion handler waiting for the
+ * operation's result. A detached_t object may be passed as a handler to an
+ * asynchronous operation, typically using the special value
+ * @c boost::asio::detached. For example:
+
+ * @code my_socket.async_send(my_buffer, boost::asio::detached);
+ * @endcode
+ */
+class detached_t
+{
+public:
+ /// Constructor.
+ BOOST_ASIO_CONSTEXPR detached_t()
+ {
+ }
+};
+
+/// A special value, similar to std::nothrow.
+/**
+ * See the documentation for boost::asio::detached_t for a usage example.
+ */
+#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
+constexpr detached_t detached;
+#elif defined(BOOST_ASIO_MSVC)
+__declspec(selectany) detached_t detached;
+#endif
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/detached.hpp>
+
+#endif // BOOST_ASIO_DETACHED_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/array.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/array.hpp
new file mode 100644
index 00000000000..6779e484b96
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/array.hpp
@@ -0,0 +1,40 @@
+//
+// detail/array.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ARRAY_HPP
+#define BOOST_ASIO_DETAIL_ARRAY_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_ARRAY)
+# include <array>
+#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
+# include <boost/array.hpp>
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+using std::array;
+#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
+using boost::array;
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_ARRAY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/array_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/array_fwd.hpp
new file mode 100644
index 00000000000..25a0c614968
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/array_fwd.hpp
@@ -0,0 +1,34 @@
+//
+// detail/array_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ARRAY_FWD_HPP
+#define BOOST_ASIO_DETAIL_ARRAY_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+namespace boost {
+
+template<class T, std::size_t N>
+class array;
+
+} // namespace boost
+
+// Standard library components can't be forward declared, so we'll have to
+// include the array header. Fortunately, it's fairly lightweight and doesn't
+// add significantly to the compile time.
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+# include <array>
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+#endif // BOOST_ASIO_DETAIL_ARRAY_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/assert.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/assert.hpp
new file mode 100644
index 00000000000..927dfce76f3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/assert.hpp
@@ -0,0 +1,32 @@
+//
+// detail/assert.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ASSERT_HPP
+#define BOOST_ASIO_DETAIL_ASSERT_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_BOOST_ASSERT)
+# include <boost/assert.hpp>
+#else // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+# include <cassert>
+#endif // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+
+#if defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+# define BOOST_ASIO_ASSERT(expr) BOOST_ASSERT(expr)
+#else // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+# define BOOST_ASIO_ASSERT(expr) assert(expr)
+#endif // defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+
+#endif // BOOST_ASIO_DETAIL_ASSERT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/atomic_count.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/atomic_count.hpp
new file mode 100644
index 00000000000..ba945a9e0f3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/atomic_count.hpp
@@ -0,0 +1,47 @@
+//
+// detail/atomic_count.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ATOMIC_COUNT_HPP
+#define BOOST_ASIO_DETAIL_ATOMIC_COUNT_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_THREADS)
+// Nothing to include.
+#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
+# include <atomic>
+#else // defined(BOOST_ASIO_HAS_STD_ATOMIC)
+# include <boost/detail/atomic_count.hpp>
+#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC)
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS)
+typedef long atomic_count;
+inline void increment(atomic_count& a, long b) { a += b; }
+#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
+typedef std::atomic<long> atomic_count;
+inline void increment(atomic_count& a, long b) { a += b; }
+#else // defined(BOOST_ASIO_HAS_STD_ATOMIC)
+typedef boost::detail::atomic_count atomic_count;
+inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; }
+#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_ATOMIC_COUNT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/base_from_completion_cond.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/base_from_completion_cond.hpp
new file mode 100644
index 00000000000..7904eadc910
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/base_from_completion_cond.hpp
@@ -0,0 +1,71 @@
+//
+// detail/base_from_completion_cond.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASE_FROM_COMPLETION_COND_HPP
+#define BOOST_ASIO_DETAIL_BASE_FROM_COMPLETION_COND_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/completion_condition.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename CompletionCondition>
+class base_from_completion_cond
+{
+protected:
+ explicit base_from_completion_cond(CompletionCondition& completion_condition)
+ : completion_condition_(
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition))
+ {
+ }
+
+ std::size_t check_for_completion(
+ const boost::system::error_code& ec,
+ std::size_t total_transferred)
+ {
+ return detail::adapt_completion_condition_result(
+ completion_condition_(ec, total_transferred));
+ }
+
+private:
+ CompletionCondition completion_condition_;
+};
+
+template <>
+class base_from_completion_cond<transfer_all_t>
+{
+protected:
+ explicit base_from_completion_cond(transfer_all_t)
+ {
+ }
+
+ static std::size_t check_for_completion(
+ const boost::system::error_code& ec,
+ std::size_t total_transferred)
+ {
+ return transfer_all_t()(ec, total_transferred);
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_BASE_FROM_COMPLETION_COND_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/bind_handler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/bind_handler.hpp
new file mode 100644
index 00000000000..ddeb58fadc9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/bind_handler.hpp
@@ -0,0 +1,818 @@
+//
+// detail/bind_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BIND_HANDLER_HPP
+#define BOOST_ASIO_DETAIL_BIND_HANDLER_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/associated_allocator.hpp>
+#include <boost/asio/associated_executor.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/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename Arg1>
+class binder1
+{
+public:
+ template <typename T>
+ binder1(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1)
+ : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
+ arg1_(arg1)
+ {
+ }
+
+ binder1(Handler& handler, const Arg1& arg1)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(arg1)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ binder1(const binder1& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_)
+ {
+ }
+
+ binder1(binder1&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ handler_(static_cast<const Arg1&>(arg1_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+};
+
+template <typename Handler, typename Arg1>
+inline void* asio_handler_allocate(std::size_t size,
+ binder1<Handler, Arg1>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ binder1<Handler, Arg1>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1>
+inline bool asio_handler_is_continuation(
+ binder1<Handler, Arg1>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1>
+inline void asio_handler_invoke(Function& function,
+ binder1<Handler, Arg1>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1>
+inline void asio_handler_invoke(const Function& function,
+ binder1<Handler, Arg1>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1>
+inline binder1<typename decay<Handler>::type, Arg1> bind_handler(
+ BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1)
+{
+ return binder1<typename decay<Handler>::type, Arg1>(0,
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+class binder2
+{
+public:
+ template <typename T>
+ binder2(int, BOOST_ASIO_MOVE_ARG(T) handler,
+ const Arg1& arg1, const Arg2& arg2)
+ : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
+ arg1_(arg1),
+ arg2_(arg2)
+ {
+ }
+
+ binder2(Handler& handler, const Arg1& arg1, const Arg2& arg2)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(arg1),
+ arg2_(arg2)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ binder2(const binder2& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_)
+ {
+ }
+
+ binder2(binder2&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
+ arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ handler_(static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+};
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline void* asio_handler_allocate(std::size_t size,
+ binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline bool asio_handler_is_continuation(
+ binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1, typename Arg2>
+inline void asio_handler_invoke(Function& function,
+ binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1, typename Arg2>
+inline void asio_handler_invoke(const Function& function,
+ binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline binder2<typename decay<Handler>::type, Arg1, Arg2> bind_handler(
+ BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2)
+{
+ return binder2<typename decay<Handler>::type, Arg1, Arg2>(0,
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2);
+}
+
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+class binder3
+{
+public:
+ template <typename T>
+ binder3(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3)
+ : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3)
+ {
+ }
+
+ binder3(Handler& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ binder3(const binder3& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_),
+ arg3_(other.arg3_)
+ {
+ }
+
+ binder3(binder3&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
+ arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_)),
+ arg3_(BOOST_ASIO_MOVE_CAST(Arg3)(other.arg3_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ handler_(static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_, arg3_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+ Arg3 arg3_;
+};
+
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+inline void* asio_handler_allocate(std::size_t size,
+ binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+inline bool asio_handler_is_continuation(
+ binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler,
+ typename Arg1, typename Arg2, typename Arg3>
+inline void asio_handler_invoke(Function& function,
+ binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Handler,
+ typename Arg1, typename Arg2, typename Arg3>
+inline void asio_handler_invoke(const Function& function,
+ binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+inline binder3<typename decay<Handler>::type, Arg1, Arg2, Arg3> bind_handler(
+ BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3)
+{
+ return binder3<typename decay<Handler>::type, Arg1, Arg2, Arg3>(0,
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3);
+}
+
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+class binder4
+{
+public:
+ template <typename T>
+ binder4(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
+ : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4)
+ {
+ }
+
+ binder4(Handler& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ binder4(const binder4& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_),
+ arg3_(other.arg3_),
+ arg4_(other.arg4_)
+ {
+ }
+
+ binder4(binder4&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
+ arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_)),
+ arg3_(BOOST_ASIO_MOVE_CAST(Arg3)(other.arg3_)),
+ arg4_(BOOST_ASIO_MOVE_CAST(Arg4)(other.arg4_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ handler_(static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_),
+ static_cast<const Arg4&>(arg4_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_, arg3_, arg4_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+ Arg3 arg3_;
+ Arg4 arg4_;
+};
+
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline void* asio_handler_allocate(std::size_t size,
+ binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline bool asio_handler_is_continuation(
+ binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline void asio_handler_invoke(Function& function,
+ binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline void asio_handler_invoke(const Function& function,
+ binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>
+bind_handler(BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
+{
+ return binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>(0,
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4);
+}
+
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+class binder5
+{
+public:
+ template <typename T>
+ binder5(int, BOOST_ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
+ : handler_(BOOST_ASIO_MOVE_CAST(T)(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4),
+ arg5_(arg5)
+ {
+ }
+
+ binder5(Handler& handler, const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4),
+ arg5_(arg5)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ binder5(const binder5& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_),
+ arg3_(other.arg3_),
+ arg4_(other.arg4_),
+ arg5_(other.arg5_)
+ {
+ }
+
+ binder5(binder5&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
+ arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_)),
+ arg3_(BOOST_ASIO_MOVE_CAST(Arg3)(other.arg3_)),
+ arg4_(BOOST_ASIO_MOVE_CAST(Arg4)(other.arg4_)),
+ arg5_(BOOST_ASIO_MOVE_CAST(Arg5)(other.arg5_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ handler_(static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_),
+ static_cast<const Arg4&>(arg4_), static_cast<const Arg5&>(arg5_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_, arg3_, arg4_, arg5_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+ Arg3 arg3_;
+ Arg4 arg4_;
+ Arg5 arg5_;
+};
+
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+inline void* asio_handler_allocate(std::size_t size,
+ binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+inline bool asio_handler_is_continuation(
+ binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+inline void asio_handler_invoke(Function& function,
+ binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+inline void asio_handler_invoke(const Function& function,
+ binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+inline binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>
+bind_handler(BOOST_ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
+{
+ return binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4, arg5);
+}
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+
+template <typename Handler, typename Arg1>
+class move_binder1
+{
+public:
+ move_binder1(int, BOOST_ASIO_MOVE_ARG(Handler) handler,
+ BOOST_ASIO_MOVE_ARG(Arg1) arg1)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(arg1))
+ {
+ }
+
+ move_binder1(move_binder1&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_))
+ {
+ }
+
+ void operator()()
+ {
+ handler_(BOOST_ASIO_MOVE_CAST(Arg1)(arg1_));
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+};
+
+template <typename Handler, typename Arg1>
+inline void* asio_handler_allocate(std::size_t size,
+ move_binder1<Handler, Arg1>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ move_binder1<Handler, Arg1>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1>
+inline bool asio_handler_is_continuation(
+ move_binder1<Handler, Arg1>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1>
+inline void asio_handler_invoke(BOOST_ASIO_MOVE_ARG(Function) function,
+ move_binder1<Handler, Arg1>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ BOOST_ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+class move_binder2
+{
+public:
+ move_binder2(int, BOOST_ASIO_MOVE_ARG(Handler) handler,
+ const Arg1& arg1, BOOST_ASIO_MOVE_ARG(Arg2) arg2)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ arg1_(arg1),
+ arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(arg2))
+ {
+ }
+
+ move_binder2(move_binder2&& other)
+ : handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ arg1_(BOOST_ASIO_MOVE_CAST(Arg1)(other.arg1_)),
+ arg2_(BOOST_ASIO_MOVE_CAST(Arg2)(other.arg2_))
+ {
+ }
+
+ void operator()()
+ {
+ handler_(static_cast<const Arg1&>(arg1_),
+ BOOST_ASIO_MOVE_CAST(Arg2)(arg2_));
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+};
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline void* asio_handler_allocate(std::size_t size,
+ move_binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ move_binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler, typename Arg1, typename Arg2>
+inline bool asio_handler_is_continuation(
+ move_binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler, typename Arg1, typename Arg2>
+inline void asio_handler_invoke(BOOST_ASIO_MOVE_ARG(Function) function,
+ move_binder2<Handler, Arg1, Arg2>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ BOOST_ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
+}
+
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+} // namespace detail
+
+template <typename Handler, typename Arg1, typename Allocator>
+struct associated_allocator<detail::binder1<Handler, Arg1>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(const detail::binder1<Handler, Arg1>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Handler, typename Arg1, typename Arg2, typename Allocator>
+struct associated_allocator<detail::binder2<Handler, Arg1, Arg2>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(const detail::binder2<Handler, Arg1, Arg2>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Handler, typename Arg1, typename Executor>
+struct associated_executor<detail::binder1<Handler, Arg1>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(const detail::binder1<Handler, Arg1>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+template <typename Handler, typename Arg1, typename Arg2, typename Executor>
+struct associated_executor<detail::binder2<Handler, Arg1, Arg2>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(const detail::binder2<Handler, Arg1, Arg2>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+
+template <typename Handler, typename Arg1, typename Allocator>
+struct associated_allocator<detail::move_binder1<Handler, Arg1>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(const detail::move_binder1<Handler, Arg1>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Handler, typename Arg1, typename Arg2, typename Allocator>
+struct associated_allocator<
+ detail::move_binder2<Handler, Arg1, Arg2>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Handler, typename Arg1, typename Executor>
+struct associated_executor<detail::move_binder1<Handler, Arg1>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(const detail::move_binder1<Handler, Arg1>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+template <typename Handler, typename Arg1, typename Arg2, typename Executor>
+struct associated_executor<detail::move_binder2<Handler, Arg1, Arg2>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_BIND_HANDLER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/buffer_resize_guard.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/buffer_resize_guard.hpp
new file mode 100644
index 00000000000..198e9c7dc07
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/buffer_resize_guard.hpp
@@ -0,0 +1,68 @@
+//
+// detail/buffer_resize_guard.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFER_RESIZE_GUARD_HPP
+#define BOOST_ASIO_DETAIL_BUFFER_RESIZE_GUARD_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/limits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper class to manage buffer resizing in an exception safe way.
+template <typename Buffer>
+class buffer_resize_guard
+{
+public:
+ // Constructor.
+ buffer_resize_guard(Buffer& buffer)
+ : buffer_(buffer),
+ old_size_(buffer.size())
+ {
+ }
+
+ // Destructor rolls back the buffer resize unless commit was called.
+ ~buffer_resize_guard()
+ {
+ if (old_size_ != (std::numeric_limits<size_t>::max)())
+ {
+ buffer_.resize(old_size_);
+ }
+ }
+
+ // Commit the resize transaction.
+ void commit()
+ {
+ old_size_ = (std::numeric_limits<size_t>::max)();
+ }
+
+private:
+ // The buffer being managed.
+ Buffer& buffer_;
+
+ // The size of the buffer at the time the guard was constructed.
+ size_t old_size_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/buffer_sequence_adapter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/buffer_sequence_adapter.hpp
new file mode 100644
index 00000000000..f33d3426ac3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/buffer_sequence_adapter.hpp
@@ -0,0 +1,546 @@
+//
+// detail/buffer_sequence_adapter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFER_SEQUENCE_ADAPTER_HPP
+#define BOOST_ASIO_DETAIL_BUFFER_SEQUENCE_ADAPTER_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/buffer.hpp>
+#include <boost/asio/detail/array_fwd.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class buffer_sequence_adapter_base
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+public:
+ // The maximum number of buffers to support in a single operation.
+ enum { max_buffers = 1 };
+
+protected:
+ typedef Windows::Storage::Streams::IBuffer^ native_buffer_type;
+
+ BOOST_ASIO_DECL static void init_native_buffer(
+ native_buffer_type& buf,
+ const boost::asio::mutable_buffer& buffer);
+
+ BOOST_ASIO_DECL static void init_native_buffer(
+ native_buffer_type& buf,
+ const boost::asio::const_buffer& buffer);
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+public:
+ // The maximum number of buffers to support in a single operation.
+ enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
+
+protected:
+ typedef WSABUF native_buffer_type;
+
+ static void init_native_buffer(WSABUF& buf,
+ const boost::asio::mutable_buffer& buffer)
+ {
+ buf.buf = static_cast<char*>(buffer.data());
+ buf.len = static_cast<ULONG>(buffer.size());
+ }
+
+ static void init_native_buffer(WSABUF& buf,
+ const boost::asio::const_buffer& buffer)
+ {
+ buf.buf = const_cast<char*>(static_cast<const char*>(buffer.data()));
+ buf.len = static_cast<ULONG>(buffer.size());
+ }
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+public:
+ // The maximum number of buffers to support in a single operation.
+ enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
+
+protected:
+ typedef iovec native_buffer_type;
+
+ static void init_iov_base(void*& base, void* addr)
+ {
+ base = addr;
+ }
+
+ template <typename T>
+ static void init_iov_base(T& base, void* addr)
+ {
+ base = static_cast<T>(addr);
+ }
+
+ static void init_native_buffer(iovec& iov,
+ const boost::asio::mutable_buffer& buffer)
+ {
+ init_iov_base(iov.iov_base, buffer.data());
+ iov.iov_len = buffer.size();
+ }
+
+ static void init_native_buffer(iovec& iov,
+ const boost::asio::const_buffer& buffer)
+ {
+ init_iov_base(iov.iov_base, const_cast<void*>(buffer.data()));
+ iov.iov_len = buffer.size();
+ }
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+};
+
+// Helper class to translate buffers into the native buffer representation.
+template <typename Buffer, typename Buffers>
+class buffer_sequence_adapter
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(const Buffers& buffer_sequence)
+ : count_(0), total_buffer_size_(0)
+ {
+ buffer_sequence_adapter::init(
+ boost::asio::buffer_sequence_begin(buffer_sequence),
+ boost::asio::buffer_sequence_end(buffer_sequence));
+ }
+
+ native_buffer_type* buffers()
+ {
+ return buffers_;
+ }
+
+ std::size_t count() const
+ {
+ return count_;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const Buffers& buffer_sequence)
+ {
+ return buffer_sequence_adapter::all_empty(
+ boost::asio::buffer_sequence_begin(buffer_sequence),
+ boost::asio::buffer_sequence_end(buffer_sequence));
+ }
+
+ static void validate(const Buffers& buffer_sequence)
+ {
+ buffer_sequence_adapter::validate(
+ boost::asio::buffer_sequence_begin(buffer_sequence),
+ boost::asio::buffer_sequence_end(buffer_sequence));
+ }
+
+ static Buffer first(const Buffers& buffer_sequence)
+ {
+ return buffer_sequence_adapter::first(
+ boost::asio::buffer_sequence_begin(buffer_sequence),
+ boost::asio::buffer_sequence_end(buffer_sequence));
+ }
+
+private:
+ template <typename Iterator>
+ void init(Iterator begin, Iterator end)
+ {
+ Iterator iter = begin;
+ for (; iter != end && count_ < max_buffers; ++iter, ++count_)
+ {
+ Buffer buffer(*iter);
+ init_native_buffer(buffers_[count_], buffer);
+ total_buffer_size_ += buffer.size();
+ }
+ }
+
+ template <typename Iterator>
+ static bool all_empty(Iterator begin, Iterator end)
+ {
+ Iterator iter = begin;
+ std::size_t i = 0;
+ for (; iter != end && i < max_buffers; ++iter, ++i)
+ if (Buffer(*iter).size() > 0)
+ return false;
+ return true;
+ }
+
+ template <typename Iterator>
+ static void validate(Iterator begin, Iterator end)
+ {
+ Iterator iter = begin;
+ for (; iter != end; ++iter)
+ {
+ Buffer buffer(*iter);
+ buffer.data();
+ }
+ }
+
+ template <typename Iterator>
+ static Buffer first(Iterator begin, Iterator end)
+ {
+ Iterator iter = begin;
+ for (; iter != end; ++iter)
+ {
+ Buffer buffer(*iter);
+ if (buffer.size() != 0)
+ return buffer;
+ }
+ return Buffer();
+ }
+
+ native_buffer_type buffers_[max_buffers];
+ std::size_t count_;
+ std::size_t total_buffer_size_;
+};
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, boost::asio::mutable_buffer>
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(
+ const boost::asio::mutable_buffer& buffer_sequence)
+ {
+ init_native_buffer(buffer_, Buffer(buffer_sequence));
+ total_buffer_size_ = buffer_sequence.size();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const boost::asio::mutable_buffer& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(const boost::asio::mutable_buffer& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(const boost::asio::mutable_buffer& buffer_sequence)
+ {
+ return Buffer(buffer_sequence);
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+};
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, boost::asio::const_buffer>
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(
+ const boost::asio::const_buffer& buffer_sequence)
+ {
+ init_native_buffer(buffer_, Buffer(buffer_sequence));
+ total_buffer_size_ = buffer_sequence.size();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const boost::asio::const_buffer& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(const boost::asio::const_buffer& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(const boost::asio::const_buffer& buffer_sequence)
+ {
+ return Buffer(buffer_sequence);
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+};
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, boost::asio::mutable_buffers_1>
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(
+ const boost::asio::mutable_buffers_1& buffer_sequence)
+ {
+ init_native_buffer(buffer_, Buffer(buffer_sequence));
+ total_buffer_size_ = buffer_sequence.size();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const boost::asio::mutable_buffers_1& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(const boost::asio::mutable_buffers_1& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(const boost::asio::mutable_buffers_1& buffer_sequence)
+ {
+ return Buffer(buffer_sequence);
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+};
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, boost::asio::const_buffers_1>
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(
+ const boost::asio::const_buffers_1& buffer_sequence)
+ {
+ init_native_buffer(buffer_, Buffer(buffer_sequence));
+ total_buffer_size_ = buffer_sequence.size();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const boost::asio::const_buffers_1& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(const boost::asio::const_buffers_1& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(const boost::asio::const_buffers_1& buffer_sequence)
+ {
+ return Buffer(buffer_sequence);
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+};
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Buffer, typename Elem>
+class buffer_sequence_adapter<Buffer, boost::array<Elem, 2> >
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(
+ const boost::array<Elem, 2>& buffer_sequence)
+ {
+ init_native_buffer(buffers_[0], Buffer(buffer_sequence[0]));
+ init_native_buffer(buffers_[1], Buffer(buffer_sequence[1]));
+ total_buffer_size_ = buffer_sequence[0].size() + buffer_sequence[1].size();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return buffers_;
+ }
+
+ std::size_t count() const
+ {
+ return 2;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const boost::array<Elem, 2>& buffer_sequence)
+ {
+ return buffer_sequence[0].size() == 0 && buffer_sequence[1].size() == 0;
+ }
+
+ static void validate(const boost::array<Elem, 2>& buffer_sequence)
+ {
+ buffer_sequence[0].data();
+ buffer_sequence[1].data();
+ }
+
+ static Buffer first(const boost::array<Elem, 2>& buffer_sequence)
+ {
+ return Buffer(buffer_sequence[0].size() != 0
+ ? buffer_sequence[0] : buffer_sequence[1]);
+ }
+
+private:
+ native_buffer_type buffers_[2];
+ std::size_t total_buffer_size_;
+};
+
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+template <typename Buffer, typename Elem>
+class buffer_sequence_adapter<Buffer, std::array<Elem, 2> >
+ : buffer_sequence_adapter_base
+{
+public:
+ explicit buffer_sequence_adapter(
+ const std::array<Elem, 2>& buffer_sequence)
+ {
+ init_native_buffer(buffers_[0], Buffer(buffer_sequence[0]));
+ init_native_buffer(buffers_[1], Buffer(buffer_sequence[1]));
+ total_buffer_size_ = buffer_sequence[0].size() + buffer_sequence[1].size();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return buffers_;
+ }
+
+ std::size_t count() const
+ {
+ return 2;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(const std::array<Elem, 2>& buffer_sequence)
+ {
+ return buffer_sequence[0].size() == 0 && buffer_sequence[1].size() == 0;
+ }
+
+ static void validate(const std::array<Elem, 2>& buffer_sequence)
+ {
+ buffer_sequence[0].data();
+ buffer_sequence[1].data();
+ }
+
+ static Buffer first(const std::array<Elem, 2>& buffer_sequence)
+ {
+ return Buffer(buffer_sequence[0].size() != 0
+ ? buffer_sequence[0] : buffer_sequence[1]);
+ }
+
+private:
+ native_buffer_type buffers_[2];
+ std::size_t total_buffer_size_;
+};
+
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/buffer_sequence_adapter.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_BUFFER_SEQUENCE_ADAPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/buffered_stream_storage.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/buffered_stream_storage.hpp
new file mode 100644
index 00000000000..2e060ce5f2a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/buffered_stream_storage.hpp
@@ -0,0 +1,128 @@
+//
+// detail/buffered_stream_storage.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_STREAM_STORAGE_HPP
+#define BOOST_ASIO_DETAIL_BUFFERED_STREAM_STORAGE_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/buffer.hpp>
+#include <boost/asio/detail/assert.hpp>
+#include <cstddef>
+#include <cstring>
+#include <vector>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class buffered_stream_storage
+{
+public:
+ // The type of the bytes stored in the buffer.
+ typedef unsigned char byte_type;
+
+ // The type used for offsets into the buffer.
+ typedef std::size_t size_type;
+
+ // Constructor.
+ explicit buffered_stream_storage(std::size_t buffer_capacity)
+ : begin_offset_(0),
+ end_offset_(0),
+ buffer_(buffer_capacity)
+ {
+ }
+
+ /// Clear the buffer.
+ void clear()
+ {
+ begin_offset_ = 0;
+ end_offset_ = 0;
+ }
+
+ // Return a pointer to the beginning of the unread data.
+ mutable_buffer data()
+ {
+ return boost::asio::buffer(buffer_) + begin_offset_;
+ }
+
+ // Return a pointer to the beginning of the unread data.
+ const_buffer data() const
+ {
+ return boost::asio::buffer(buffer_) + begin_offset_;
+ }
+
+ // Is there no unread data in the buffer.
+ bool empty() const
+ {
+ return begin_offset_ == end_offset_;
+ }
+
+ // Return the amount of unread data the is in the buffer.
+ size_type size() const
+ {
+ return end_offset_ - begin_offset_;
+ }
+
+ // Resize the buffer to the specified length.
+ void resize(size_type length)
+ {
+ BOOST_ASIO_ASSERT(length <= capacity());
+ if (begin_offset_ + length <= capacity())
+ {
+ end_offset_ = begin_offset_ + length;
+ }
+ else
+ {
+ using namespace std; // For memmove.
+ memmove(&buffer_[0], &buffer_[0] + begin_offset_, size());
+ end_offset_ = length;
+ begin_offset_ = 0;
+ }
+ }
+
+ // Return the maximum size for data in the buffer.
+ size_type capacity() const
+ {
+ return buffer_.size();
+ }
+
+ // Consume multiple bytes from the beginning of the buffer.
+ void consume(size_type count)
+ {
+ BOOST_ASIO_ASSERT(begin_offset_ + count <= end_offset_);
+ begin_offset_ += count;
+ if (empty())
+ clear();
+ }
+
+private:
+ // The offset to the beginning of the unread data.
+ size_type begin_offset_;
+
+ // The offset to the end of the unread data.
+ size_type end_offset_;
+
+ // The data in the buffer.
+ std::vector<byte_type> buffer_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_BUFFERED_STREAM_STORAGE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/call_stack.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/call_stack.hpp
new file mode 100644
index 00000000000..eb63e547294
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/call_stack.hpp
@@ -0,0 +1,127 @@
+//
+// detail/call_stack.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CALL_STACK_HPP
+#define BOOST_ASIO_DETAIL_CALL_STACK_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/tss_ptr.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper class to determine whether or not the current thread is inside an
+// invocation of io_context::run() for a specified io_context object.
+template <typename Key, typename Value = unsigned char>
+class call_stack
+{
+public:
+ // Context class automatically pushes the key/value pair on to the stack.
+ class context
+ : private noncopyable
+ {
+ public:
+ // Push the key on to the stack.
+ explicit context(Key* k)
+ : key_(k),
+ next_(call_stack<Key, Value>::top_)
+ {
+ value_ = reinterpret_cast<unsigned char*>(this);
+ call_stack<Key, Value>::top_ = this;
+ }
+
+ // Push the key/value pair on to the stack.
+ context(Key* k, Value& v)
+ : key_(k),
+ value_(&v),
+ next_(call_stack<Key, Value>::top_)
+ {
+ call_stack<Key, Value>::top_ = this;
+ }
+
+ // Pop the key/value pair from the stack.
+ ~context()
+ {
+ call_stack<Key, Value>::top_ = next_;
+ }
+
+ // Find the next context with the same key.
+ Value* next_by_key() const
+ {
+ context* elem = next_;
+ while (elem)
+ {
+ if (elem->key_ == key_)
+ return elem->value_;
+ elem = elem->next_;
+ }
+ return 0;
+ }
+
+ private:
+ friend class call_stack<Key, Value>;
+
+ // The key associated with the context.
+ Key* key_;
+
+ // The value associated with the context.
+ Value* value_;
+
+ // The next element in the stack.
+ context* next_;
+ };
+
+ friend class context;
+
+ // Determine whether the specified owner is on the stack. Returns address of
+ // key if present, 0 otherwise.
+ static Value* contains(Key* k)
+ {
+ context* elem = top_;
+ while (elem)
+ {
+ if (elem->key_ == k)
+ return elem->value_;
+ elem = elem->next_;
+ }
+ return 0;
+ }
+
+ // Obtain the value at the top of the stack.
+ static Value* top()
+ {
+ context* elem = top_;
+ return elem ? elem->value_ : 0;
+ }
+
+private:
+ // The top of the stack of calls for the current thread.
+ static tss_ptr<context> top_;
+};
+
+template <typename Key, typename Value>
+tss_ptr<typename call_stack<Key, Value>::context>
+call_stack<Key, Value>::top_;
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_CALL_STACK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/chrono.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/chrono.hpp
new file mode 100644
index 00000000000..d5a55ff4e10
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/chrono.hpp
@@ -0,0 +1,68 @@
+//
+// detail/chrono.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CHRONO_HPP
+#define BOOST_ASIO_DETAIL_CHRONO_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_CHRONO)
+# include <chrono>
+#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+# include <boost/chrono/system_clocks.hpp>
+#endif // defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+
+namespace boost {
+namespace asio {
+namespace chrono {
+
+#if defined(BOOST_ASIO_HAS_STD_CHRONO)
+using std::chrono::duration;
+using std::chrono::time_point;
+using std::chrono::duration_cast;
+using std::chrono::nanoseconds;
+using std::chrono::microseconds;
+using std::chrono::milliseconds;
+using std::chrono::seconds;
+using std::chrono::minutes;
+using std::chrono::hours;
+using std::chrono::time_point_cast;
+#if defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
+typedef std::chrono::monotonic_clock steady_clock;
+#else // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
+using std::chrono::steady_clock;
+#endif // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
+using std::chrono::system_clock;
+using std::chrono::high_resolution_clock;
+#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+using boost::chrono::duration;
+using boost::chrono::time_point;
+using boost::chrono::duration_cast;
+using boost::chrono::nanoseconds;
+using boost::chrono::microseconds;
+using boost::chrono::milliseconds;
+using boost::chrono::seconds;
+using boost::chrono::minutes;
+using boost::chrono::hours;
+using boost::chrono::time_point_cast;
+using boost::chrono::system_clock;
+using boost::chrono::steady_clock;
+using boost::chrono::high_resolution_clock;
+#endif // defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+
+} // namespace chrono
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_CHRONO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/chrono_time_traits.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/chrono_time_traits.hpp
new file mode 100644
index 00000000000..85e3b8b4298
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/chrono_time_traits.hpp
@@ -0,0 +1,192 @@
+//
+// detail/chrono_time_traits.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CHRONO_TIME_TRAITS_HPP
+#define BOOST_ASIO_DETAIL_CHRONO_TIME_TRAITS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/cstdint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper template to compute the greatest common divisor.
+template <int64_t v1, int64_t v2>
+struct gcd { enum { value = gcd<v2, v1 % v2>::value }; };
+
+template <int64_t v1>
+struct gcd<v1, 0> { enum { value = v1 }; };
+
+// Adapts std::chrono clocks for use with a deadline timer.
+template <typename Clock, typename WaitTraits>
+struct chrono_time_traits
+{
+ // The clock type.
+ typedef Clock clock_type;
+
+ // The duration type of the clock.
+ typedef typename clock_type::duration duration_type;
+
+ // The time point type of the clock.
+ typedef typename clock_type::time_point time_type;
+
+ // The period of the clock.
+ typedef typename duration_type::period period_type;
+
+ // Get the current time.
+ static time_type now()
+ {
+ return clock_type::now();
+ }
+
+ // Add a duration to a time.
+ static time_type add(const time_type& t, const duration_type& d)
+ {
+ const time_type epoch;
+ if (t >= epoch)
+ {
+ if ((time_type::max)() - t < d)
+ return (time_type::max)();
+ }
+ else // t < epoch
+ {
+ if (-(t - (time_type::min)()) > d)
+ return (time_type::min)();
+ }
+
+ return t + d;
+ }
+
+ // Subtract one time from another.
+ static duration_type subtract(const time_type& t1, const time_type& t2)
+ {
+ const time_type epoch;
+ if (t1 >= epoch)
+ {
+ if (t2 >= epoch)
+ {
+ return t1 - t2;
+ }
+ else if (t2 == (time_type::min)())
+ {
+ return (duration_type::max)();
+ }
+ else if ((time_type::max)() - t1 < epoch - t2)
+ {
+ return (duration_type::max)();
+ }
+ else
+ {
+ return t1 - t2;
+ }
+ }
+ else // t1 < epoch
+ {
+ if (t2 < epoch)
+ {
+ return t1 - t2;
+ }
+ else if (t1 == (time_type::min)())
+ {
+ return (duration_type::min)();
+ }
+ else if ((time_type::max)() - t2 < epoch - t1)
+ {
+ return (duration_type::min)();
+ }
+ else
+ {
+ return -(t2 - t1);
+ }
+ }
+ }
+
+ // Test whether one time is less than another.
+ static bool less_than(const time_type& t1, const time_type& t2)
+ {
+ return t1 < t2;
+ }
+
+ // Implement just enough of the posix_time::time_duration interface to supply
+ // what the timer_queue requires.
+ class posix_time_duration
+ {
+ public:
+ explicit posix_time_duration(const duration_type& d)
+ : d_(d)
+ {
+ }
+
+ int64_t ticks() const
+ {
+ return d_.count();
+ }
+
+ int64_t total_seconds() const
+ {
+ return duration_cast<1, 1>();
+ }
+
+ int64_t total_milliseconds() const
+ {
+ return duration_cast<1, 1000>();
+ }
+
+ int64_t total_microseconds() const
+ {
+ return duration_cast<1, 1000000>();
+ }
+
+ private:
+ template <int64_t Num, int64_t Den>
+ int64_t duration_cast() const
+ {
+ const int64_t num1 = period_type::num / gcd<period_type::num, Num>::value;
+ const int64_t num2 = Num / gcd<period_type::num, Num>::value;
+
+ const int64_t den1 = period_type::den / gcd<period_type::den, Den>::value;
+ const int64_t den2 = Den / gcd<period_type::den, Den>::value;
+
+ const int64_t num = num1 * den2;
+ const int64_t den = num2 * den1;
+
+ if (num == 1 && den == 1)
+ return ticks();
+ else if (num != 1 && den == 1)
+ return ticks() * num;
+ else if (num == 1 && period_type::den != 1)
+ return ticks() / den;
+ else
+ return ticks() * num / den;
+ }
+
+ duration_type d_;
+ };
+
+ // Convert to POSIX duration type.
+ static posix_time_duration to_posix_duration(const duration_type& d)
+ {
+ return posix_time_duration(WaitTraits::to_wait_duration(d));
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_CHRONO_TIME_TRAITS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/completion_handler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/completion_handler.hpp
new file mode 100644
index 00000000000..3cd136974e1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/completion_handler.hpp
@@ -0,0 +1,85 @@
+//
+// detail/completion_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_COMPLETION_HANDLER_HPP
+#define BOOST_ASIO_DETAIL_COMPLETION_HANDLER_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/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_work.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler>
+class completion_handler : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(completion_handler);
+
+ completion_handler(Handler& h)
+ : operation(&completion_handler::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(h))
+ {
+ handler_work<Handler>::start(handler_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ completion_handler* h(static_cast<completion_handler*>(base));
+ ptr p = { boost::asio::detail::addressof(h->handler_), h, h };
+ handler_work<Handler> w(h->handler_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*h));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ Handler handler(BOOST_ASIO_MOVE_CAST(Handler)(h->handler_));
+ p.h = boost::asio::detail::addressof(handler);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN(());
+ w.complete(handler, handler);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_COMPLETION_HANDLER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/concurrency_hint.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/concurrency_hint.hpp
new file mode 100644
index 00000000000..99deb78644a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/concurrency_hint.hpp
@@ -0,0 +1,94 @@
+//
+// detail/concurrency_hint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CONCURRENCY_HINT_HPP
+#define BOOST_ASIO_DETAIL_CONCURRENCY_HINT_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>
+
+// The concurrency hint ID and mask are used to identify when a "well-known"
+// concurrency hint value has been passed to the io_context.
+#define BOOST_ASIO_CONCURRENCY_HINT_ID 0xA5100000u
+#define BOOST_ASIO_CONCURRENCY_HINT_ID_MASK 0xFFFF0000u
+
+// If set, this bit indicates that the scheduler should perform locking.
+#define BOOST_ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER 0x1u
+
+// If set, this bit indicates that the reactor should perform locking when
+// managing descriptor registrations.
+#define BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION 0x2u
+
+// If set, this bit indicates that the reactor should perform locking for I/O.
+#define BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_IO 0x4u
+
+// Helper macro to determine if we have a special concurrency hint.
+#define BOOST_ASIO_CONCURRENCY_HINT_IS_SPECIAL(hint) \
+ ((static_cast<unsigned>(hint) \
+ & BOOST_ASIO_CONCURRENCY_HINT_ID_MASK) \
+ == BOOST_ASIO_CONCURRENCY_HINT_ID)
+
+// Helper macro to determine if locking is enabled for a given facility.
+#define BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(facility, hint) \
+ (((static_cast<unsigned>(hint) \
+ & (BOOST_ASIO_CONCURRENCY_HINT_ID_MASK \
+ | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_ ## facility)) \
+ ^ BOOST_ASIO_CONCURRENCY_HINT_ID) != 0)
+
+// This special concurrency hint disables locking in both the scheduler and
+// reactor I/O. This hint has the following restrictions:
+//
+// - Care must be taken to ensure that all operations on the io_context and any
+// of its associated I/O objects (such as sockets and timers) occur in only
+// one thread at a time.
+//
+// - Asynchronous resolve operations fail with operation_not_supported.
+//
+// - If a signal_set is used with the io_context, signal_set objects cannot be
+// used with any other io_context in the program.
+#define BOOST_ASIO_CONCURRENCY_HINT_UNSAFE \
+ static_cast<int>(BOOST_ASIO_CONCURRENCY_HINT_ID)
+
+// This special concurrency hint disables locking in the reactor I/O. This hint
+// has the following restrictions:
+//
+// - Care must be taken to ensure that run functions on the io_context, and all
+// operations on the io_context's associated I/O objects (such as sockets and
+// timers), occur in only one thread at a time.
+#define BOOST_ASIO_CONCURRENCY_HINT_UNSAFE_IO \
+ static_cast<int>(BOOST_ASIO_CONCURRENCY_HINT_ID \
+ | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
+ | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION)
+
+// The special concurrency hint provides full thread safety.
+#define BOOST_ASIO_CONCURRENCY_HINT_SAFE \
+ static_cast<int>(BOOST_ASIO_CONCURRENCY_HINT_ID \
+ | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
+ | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION \
+ | BOOST_ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_IO)
+
+// This #define may be overridden at compile time to specify a program-wide
+// default concurrency hint, used by the zero-argument io_context constructor.
+#if !defined(BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)
+# define BOOST_ASIO_CONCURRENCY_HINT_DEFAULT -1
+#endif // !defined(BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)
+
+// This #define may be overridden at compile time to specify a program-wide
+// concurrency hint, used by the one-argument io_context constructor when
+// passed a value of 1.
+#if !defined(BOOST_ASIO_CONCURRENCY_HINT_1)
+# define BOOST_ASIO_CONCURRENCY_HINT_1 1
+#endif // !defined(BOOST_ASIO_CONCURRENCY_HINT_DEFAULT)
+
+#endif // BOOST_ASIO_DETAIL_CONCURRENCY_HINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_event.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_event.hpp
new file mode 100644
index 00000000000..2d5a45c02e4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_event.hpp
@@ -0,0 +1,114 @@
+//
+// detail/conditionally_enabled_event.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CONDITIONALLY_ENABLED_EVENT_HPP
+#define BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_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/conditionally_enabled_mutex.hpp>
+#include <boost/asio/detail/event.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/null_event.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Mutex adapter used to conditionally enable or disable locking.
+class conditionally_enabled_event
+ : private noncopyable
+{
+public:
+ // Constructor.
+ conditionally_enabled_event()
+ {
+ }
+
+ // Destructor.
+ ~conditionally_enabled_event()
+ {
+ }
+
+ // Signal the event. (Retained for backward compatibility.)
+ void signal(conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.signal(lock);
+ }
+
+ // Signal all waiters.
+ void signal_all(conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.signal_all(lock);
+ }
+
+ // Unlock the mutex and signal one waiter.
+ void unlock_and_signal_one(
+ conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.unlock_and_signal_one(lock);
+ }
+
+ // If there's a waiter, unlock the mutex and signal it.
+ bool maybe_unlock_and_signal_one(
+ conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ return event_.maybe_unlock_and_signal_one(lock);
+ else
+ return false;
+ }
+
+ // Reset the event.
+ void clear(conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.clear(lock);
+ }
+
+ // Wait for the event to become signalled.
+ void wait(conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.wait(lock);
+ else
+ null_event().wait(lock);
+ }
+
+ // Timed wait for the event to become signalled.
+ bool wait_for_usec(
+ conditionally_enabled_mutex::scoped_lock& lock, long usec)
+ {
+ if (lock.mutex_.enabled_)
+ return event_.wait_for_usec(lock, usec);
+ else
+ return null_event().wait_for_usec(lock, usec);
+ }
+
+private:
+ boost::asio::detail::event event_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_EVENT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_mutex.hpp
new file mode 100644
index 00000000000..5d105e98146
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/conditionally_enabled_mutex.hpp
@@ -0,0 +1,151 @@
+//
+// detail/conditionally_enabled_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CONDITIONALLY_ENABLED_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_MUTEX_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/mutex.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Mutex adapter used to conditionally enable or disable locking.
+class conditionally_enabled_mutex
+ : private noncopyable
+{
+public:
+ // Helper class to lock and unlock a mutex automatically.
+ class scoped_lock
+ : private noncopyable
+ {
+ public:
+ // Tag type used to distinguish constructors.
+ enum adopt_lock_t { adopt_lock };
+
+ // Constructor adopts a lock that is already held.
+ scoped_lock(conditionally_enabled_mutex& m, adopt_lock_t)
+ : mutex_(m),
+ locked_(m.enabled_)
+ {
+ }
+
+ // Constructor acquires the lock.
+ explicit scoped_lock(conditionally_enabled_mutex& m)
+ : mutex_(m)
+ {
+ if (m.enabled_)
+ {
+ mutex_.mutex_.lock();
+ locked_ = true;
+ }
+ else
+ locked_ = false;
+ }
+
+ // Destructor releases the lock.
+ ~scoped_lock()
+ {
+ if (locked_)
+ mutex_.mutex_.unlock();
+ }
+
+ // Explicitly acquire the lock.
+ void lock()
+ {
+ if (mutex_.enabled_ && !locked_)
+ {
+ mutex_.mutex_.lock();
+ locked_ = true;
+ }
+ }
+
+ // Explicitly release the lock.
+ void unlock()
+ {
+ if (locked_)
+ {
+ mutex_.unlock();
+ locked_ = false;
+ }
+ }
+
+ // Test whether the lock is held.
+ bool locked() const
+ {
+ return locked_;
+ }
+
+ // Get the underlying mutex.
+ boost::asio::detail::mutex& mutex()
+ {
+ return mutex_.mutex_;
+ }
+
+ private:
+ friend class conditionally_enabled_event;
+ conditionally_enabled_mutex& mutex_;
+ bool locked_;
+ };
+
+ // Constructor.
+ explicit conditionally_enabled_mutex(bool enabled)
+ : enabled_(enabled)
+ {
+ }
+
+ // Destructor.
+ ~conditionally_enabled_mutex()
+ {
+ }
+
+ // Determine whether locking is enabled.
+ bool enabled() const
+ {
+ return enabled_;
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ if (enabled_)
+ mutex_.lock();
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ if (enabled_)
+ mutex_.unlock();
+ }
+
+private:
+ friend class scoped_lock;
+ friend class conditionally_enabled_event;
+ boost::asio::detail::mutex mutex_;
+ const bool enabled_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_CONDITIONALLY_ENABLED_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/config.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/config.hpp
new file mode 100644
index 00000000000..8fef292b007
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/config.hpp
@@ -0,0 +1,1438 @@
+//
+// detail/config.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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,
+// * BOOST_ASIO_NONDEDUCED_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_NONDEDUCED_MOVE_ARG(type) type&
+# 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_NONDEDUCED_MOVE_ARG(type) const type&
+# 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 >= 1800)
+# define BOOST_ASIO_HAS_DECLTYPE 1
+# endif // (_MSC_VER >= 1800)
+# 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>)
+# elif defined(__apple_build_version__) && defined(_LIBCPP_VERSION)
+# if (__clang_major__ >= 10)
+# if __has_include(<atomic>)
+# define BOOST_ASIO_HAS_STD_ATOMIC 1
+# endif // __has_include(<atomic>)
+# endif // (__clang_major__ >= 10)
+# endif /// defined(__apple_build_version__) && defined(_LIBCPP_VERSION)
+# 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=0x0601 to the compiler command line; or\n"\
+ "- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.\n"\
+ "Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).")
+# else // defined(_MSC_VER) || defined(__BORLANDC__)
+# warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
+# warning For example, add -D_WIN32_WINNT=0x0601 to the compiler command line.
+# warning Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
+# endif // defined(_MSC_VER) || defined(__BORLANDC__)
+# define _WIN32_WINNT 0x0601
+# 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__) \
+ || defined(__HAIKU__)
+# 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 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.70.0/boost/asio/detail/consuming_buffers.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/consuming_buffers.hpp
new file mode 100644
index 00000000000..f8226a4e8d7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/consuming_buffers.hpp
@@ -0,0 +1,416 @@
+//
+// detail/consuming_buffers.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CONSUMING_BUFFERS_HPP
+#define BOOST_ASIO_DETAIL_CONSUMING_BUFFERS_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/buffer.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/limits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper template to determine the maximum number of prepared buffers.
+template <typename Buffers>
+struct prepared_buffers_max
+{
+ enum { value = buffer_sequence_adapter_base::max_buffers };
+};
+
+template <typename Elem, std::size_t N>
+struct prepared_buffers_max<boost::array<Elem, N> >
+{
+ enum { value = N };
+};
+
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+template <typename Elem, std::size_t N>
+struct prepared_buffers_max<std::array<Elem, N> >
+{
+ enum { value = N };
+};
+
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+// A buffer sequence used to represent a subsequence of the buffers.
+template <typename Buffer, std::size_t MaxBuffers>
+struct prepared_buffers
+{
+ typedef Buffer value_type;
+ typedef const Buffer* const_iterator;
+
+ enum { max_buffers = MaxBuffers < 16 ? MaxBuffers : 16 };
+
+ prepared_buffers() : count(0) {}
+ const_iterator begin() const { return elems; }
+ const_iterator end() const { return elems + count; }
+
+ Buffer elems[max_buffers];
+ std::size_t count;
+};
+
+// A proxy for a sub-range in a list of buffers.
+template <typename Buffer, typename Buffers, typename Buffer_Iterator>
+class consuming_buffers
+{
+public:
+ typedef prepared_buffers<Buffer, prepared_buffers_max<Buffers>::value>
+ prepared_buffers_type;
+
+ // Construct to represent the entire list of buffers.
+ explicit consuming_buffers(const Buffers& buffers)
+ : buffers_(buffers),
+ total_consumed_(0),
+ next_elem_(0),
+ next_elem_offset_(0)
+ {
+ using boost::asio::buffer_size;
+ total_size_ = buffer_size(buffers);
+ }
+
+ // Determine if we are at the end of the buffers.
+ bool empty() const
+ {
+ return total_consumed_ >= total_size_;
+ }
+
+ // Get the buffer for a single transfer, with a size.
+ prepared_buffers_type prepare(std::size_t max_size)
+ {
+ prepared_buffers_type result;
+
+ Buffer_Iterator next = boost::asio::buffer_sequence_begin(buffers_);
+ Buffer_Iterator end = boost::asio::buffer_sequence_end(buffers_);
+
+ std::advance(next, next_elem_);
+ std::size_t elem_offset = next_elem_offset_;
+ while (next != end && max_size > 0 && (result.count) < result.max_buffers)
+ {
+ Buffer next_buf = Buffer(*next) + elem_offset;
+ result.elems[result.count] = boost::asio::buffer(next_buf, max_size);
+ max_size -= result.elems[result.count].size();
+ elem_offset = 0;
+ if (result.elems[result.count].size() > 0)
+ ++result.count;
+ ++next;
+ }
+
+ return result;
+ }
+
+ // Consume the specified number of bytes from the buffers.
+ void consume(std::size_t size)
+ {
+ total_consumed_ += size;
+
+ Buffer_Iterator next = boost::asio::buffer_sequence_begin(buffers_);
+ Buffer_Iterator end = boost::asio::buffer_sequence_end(buffers_);
+
+ std::advance(next, next_elem_);
+ while (next != end && size > 0)
+ {
+ Buffer next_buf = Buffer(*next) + next_elem_offset_;
+ if (size < next_buf.size())
+ {
+ next_elem_offset_ += size;
+ size = 0;
+ }
+ else
+ {
+ size -= next_buf.size();
+ next_elem_offset_ = 0;
+ ++next_elem_;
+ ++next;
+ }
+ }
+ }
+
+ // Get the total number of bytes consumed from the buffers.
+ std::size_t total_consumed() const
+ {
+ return total_consumed_;
+ }
+
+private:
+ Buffers buffers_;
+ std::size_t total_size_;
+ std::size_t total_consumed_;
+ std::size_t next_elem_;
+ std::size_t next_elem_offset_;
+};
+
+// Base class of all consuming_buffers specialisations for single buffers.
+template <typename Buffer>
+class consuming_single_buffer
+{
+public:
+ // Construct to represent the entire list of buffers.
+ template <typename Buffer1>
+ explicit consuming_single_buffer(const Buffer1& buffer)
+ : buffer_(buffer),
+ total_consumed_(0)
+ {
+ }
+
+ // Determine if we are at the end of the buffers.
+ bool empty() const
+ {
+ return total_consumed_ >= buffer_.size();
+ }
+
+ // Get the buffer for a single transfer, with a size.
+ Buffer prepare(std::size_t max_size)
+ {
+ return boost::asio::buffer(buffer_ + total_consumed_, max_size);
+ }
+
+ // Consume the specified number of bytes from the buffers.
+ void consume(std::size_t size)
+ {
+ total_consumed_ += size;
+ }
+
+ // Get the total number of bytes consumed from the buffers.
+ std::size_t total_consumed() const
+ {
+ return total_consumed_;
+ }
+
+private:
+ Buffer buffer_;
+ std::size_t total_consumed_;
+};
+
+template <>
+class consuming_buffers<mutable_buffer, mutable_buffer, const mutable_buffer*>
+ : public consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>
+{
+public:
+ explicit consuming_buffers(const mutable_buffer& buffer)
+ : consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer, mutable_buffer, const mutable_buffer*>
+ : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
+{
+public:
+ explicit consuming_buffers(const mutable_buffer& buffer)
+ : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer, const_buffer, const const_buffer*>
+ : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
+{
+public:
+ explicit consuming_buffers(const const_buffer& buffer)
+ : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
+ {
+ }
+};
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <>
+class consuming_buffers<mutable_buffer,
+ mutable_buffers_1, const mutable_buffer*>
+ : public consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>
+{
+public:
+ explicit consuming_buffers(const mutable_buffers_1& buffer)
+ : consuming_single_buffer<BOOST_ASIO_MUTABLE_BUFFER>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer, mutable_buffers_1, const mutable_buffer*>
+ : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
+{
+public:
+ explicit consuming_buffers(const mutable_buffers_1& buffer)
+ : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer, const_buffers_1, const const_buffer*>
+ : public consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>
+{
+public:
+ explicit consuming_buffers(const const_buffers_1& buffer)
+ : consuming_single_buffer<BOOST_ASIO_CONST_BUFFER>(buffer)
+ {
+ }
+};
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Buffer, typename Elem>
+class consuming_buffers<Buffer, boost::array<Elem, 2>,
+ typename boost::array<Elem, 2>::const_iterator>
+{
+public:
+ // Construct to represent the entire list of buffers.
+ explicit consuming_buffers(const boost::array<Elem, 2>& buffers)
+ : buffers_(buffers),
+ total_consumed_(0)
+ {
+ }
+
+ // Determine if we are at the end of the buffers.
+ bool empty() const
+ {
+ return total_consumed_ >=
+ Buffer(buffers_[0]).size() + Buffer(buffers_[1]).size();
+ }
+
+ // Get the buffer for a single transfer, with a size.
+ boost::array<Buffer, 2> prepare(std::size_t max_size)
+ {
+ boost::array<Buffer, 2> result = {{
+ Buffer(buffers_[0]), Buffer(buffers_[1]) }};
+ std::size_t buffer0_size = result[0].size();
+ result[0] = boost::asio::buffer(result[0] + total_consumed_, max_size);
+ result[1] = boost::asio::buffer(
+ result[1] + (total_consumed_ < buffer0_size
+ ? 0 : total_consumed_ - buffer0_size),
+ max_size - result[0].size());
+ return result;
+ }
+
+ // Consume the specified number of bytes from the buffers.
+ void consume(std::size_t size)
+ {
+ total_consumed_ += size;
+ }
+
+ // Get the total number of bytes consumed from the buffers.
+ std::size_t total_consumed() const
+ {
+ return total_consumed_;
+ }
+
+private:
+ boost::array<Elem, 2> buffers_;
+ std::size_t total_consumed_;
+};
+
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+template <typename Buffer, typename Elem>
+class consuming_buffers<Buffer, std::array<Elem, 2>,
+ typename std::array<Elem, 2>::const_iterator>
+{
+public:
+ // Construct to represent the entire list of buffers.
+ explicit consuming_buffers(const std::array<Elem, 2>& buffers)
+ : buffers_(buffers),
+ total_consumed_(0)
+ {
+ }
+
+ // Determine if we are at the end of the buffers.
+ bool empty() const
+ {
+ return total_consumed_ >=
+ Buffer(buffers_[0]).size() + Buffer(buffers_[1]).size();
+ }
+
+ // Get the buffer for a single transfer, with a size.
+ std::array<Buffer, 2> prepare(std::size_t max_size)
+ {
+ std::array<Buffer, 2> result = {{
+ Buffer(buffers_[0]), Buffer(buffers_[1]) }};
+ std::size_t buffer0_size = result[0].size();
+ result[0] = boost::asio::buffer(result[0] + total_consumed_, max_size);
+ result[1] = boost::asio::buffer(
+ result[1] + (total_consumed_ < buffer0_size
+ ? 0 : total_consumed_ - buffer0_size),
+ max_size - result[0].size());
+ return result;
+ }
+
+ // Consume the specified number of bytes from the buffers.
+ void consume(std::size_t size)
+ {
+ total_consumed_ += size;
+ }
+
+ // Get the total number of bytes consumed from the buffers.
+ std::size_t total_consumed() const
+ {
+ return total_consumed_;
+ }
+
+private:
+ std::array<Elem, 2> buffers_;
+ std::size_t total_consumed_;
+};
+
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+// Specialisation for null_buffers to ensure that the null_buffers type is
+// always passed through to the underlying read or write operation.
+template <typename Buffer>
+class consuming_buffers<Buffer, null_buffers, const mutable_buffer*>
+ : public boost::asio::null_buffers
+{
+public:
+ consuming_buffers(const null_buffers&)
+ {
+ // No-op.
+ }
+
+ bool empty()
+ {
+ return false;
+ }
+
+ null_buffers prepare(std::size_t)
+ {
+ return null_buffers();
+ }
+
+ void consume(std::size_t)
+ {
+ // No-op.
+ }
+
+ std::size_t total_consumed() const
+ {
+ return 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_CONSUMING_BUFFERS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/cstddef.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/cstddef.hpp
new file mode 100644
index 00000000000..b77d9aab7fc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/cstddef.hpp
@@ -0,0 +1,33 @@
+//
+// detail/cstddef.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CSTDDEF_HPP
+#define BOOST_ASIO_DETAIL_CSTDDEF_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>
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_NULLPTR)
+using std::nullptr_t;
+#else // defined(BOOST_ASIO_HAS_NULLPTR)
+struct nullptr_t {};
+#endif // defined(BOOST_ASIO_HAS_NULLPTR)
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_CSTDDEF_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/cstdint.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/cstdint.hpp
new file mode 100644
index 00000000000..b916f78a74d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/cstdint.hpp
@@ -0,0 +1,62 @@
+//
+// detail/cstdint.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CSTDINT_HPP
+#define BOOST_ASIO_DETAIL_CSTDINT_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_CSTDINT)
+# include <cstdint>
+#else // defined(BOOST_ASIO_HAS_CSTDINT)
+# include <boost/cstdint.hpp>
+#endif // defined(BOOST_ASIO_HAS_CSTDINT)
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_CSTDINT)
+using std::int16_t;
+using std::int_least16_t;
+using std::uint16_t;
+using std::uint_least16_t;
+using std::int32_t;
+using std::int_least32_t;
+using std::uint32_t;
+using std::uint_least32_t;
+using std::int64_t;
+using std::int_least64_t;
+using std::uint64_t;
+using std::uint_least64_t;
+using std::uintmax_t;
+#else // defined(BOOST_ASIO_HAS_CSTDINT)
+using boost::int16_t;
+using boost::int_least16_t;
+using boost::uint16_t;
+using boost::uint_least16_t;
+using boost::int32_t;
+using boost::int_least32_t;
+using boost::uint32_t;
+using boost::uint_least32_t;
+using boost::int64_t;
+using boost::int_least64_t;
+using boost::uint64_t;
+using boost::uint_least64_t;
+using boost::uintmax_t;
+#endif // defined(BOOST_ASIO_HAS_CSTDINT)
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_CSTDINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/date_time_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/date_time_fwd.hpp
new file mode 100644
index 00000000000..c917be4ffb7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/date_time_fwd.hpp
@@ -0,0 +1,34 @@
+//
+// detail/date_time_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DATE_TIME_FWD_HPP
+#define BOOST_ASIO_DETAIL_DATE_TIME_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+namespace boost {
+namespace date_time {
+
+template<class T, class TimeSystem>
+class base_time;
+
+} // namespace date_time
+namespace posix_time {
+
+class ptime;
+
+} // namespace posix_time
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_DATE_TIME_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/deadline_timer_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/deadline_timer_service.hpp
new file mode 100644
index 00000000000..8732990a0f1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/deadline_timer_service.hpp
@@ -0,0 +1,282 @@
+//
+// detail/deadline_timer_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DEADLINE_TIMER_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_DEADLINE_TIMER_SERVICE_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/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/timer_queue.hpp>
+#include <boost/asio/detail/timer_queue_ptime.hpp>
+#include <boost/asio/detail/timer_scheduler.hpp>
+#include <boost/asio/detail/wait_handler.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <chrono>
+# include <thread>
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+class deadline_timer_service
+ : public execution_context_service_base<deadline_timer_service<Time_Traits> >
+{
+public:
+ // The time type.
+ typedef typename Time_Traits::time_type time_type;
+
+ // The duration type.
+ typedef typename Time_Traits::duration_type duration_type;
+
+ // The implementation type of the timer. This type is dependent on the
+ // underlying implementation of the timer service.
+ struct implementation_type
+ : private boost::asio::detail::noncopyable
+ {
+ time_type expiry;
+ bool might_have_pending_waits;
+ typename timer_queue<Time_Traits>::per_timer_data timer_data;
+ };
+
+ // Constructor.
+ deadline_timer_service(execution_context& context)
+ : execution_context_service_base<
+ deadline_timer_service<Time_Traits> >(context),
+ scheduler_(boost::asio::use_service<timer_scheduler>(context))
+ {
+ scheduler_.init_task();
+ scheduler_.add_timer_queue(timer_queue_);
+ }
+
+ // Destructor.
+ ~deadline_timer_service()
+ {
+ scheduler_.remove_timer_queue(timer_queue_);
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ }
+
+ // Construct a new timer implementation.
+ void construct(implementation_type& impl)
+ {
+ impl.expiry = time_type();
+ impl.might_have_pending_waits = false;
+ }
+
+ // Destroy a timer implementation.
+ void destroy(implementation_type& impl)
+ {
+ boost::system::error_code ec;
+ cancel(impl, ec);
+ }
+
+ // Move-construct a new serial port implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ scheduler_.move_timer(timer_queue_, impl.timer_data, other_impl.timer_data);
+
+ impl.expiry = other_impl.expiry;
+ other_impl.expiry = time_type();
+
+ impl.might_have_pending_waits = other_impl.might_have_pending_waits;
+ other_impl.might_have_pending_waits = false;
+ }
+
+ // Move-assign from another serial port implementation.
+ void move_assign(implementation_type& impl,
+ deadline_timer_service& other_service,
+ implementation_type& other_impl)
+ {
+ if (this != &other_service)
+ if (impl.might_have_pending_waits)
+ scheduler_.cancel_timer(timer_queue_, impl.timer_data);
+
+ other_service.scheduler_.move_timer(other_service.timer_queue_,
+ impl.timer_data, other_impl.timer_data);
+
+ impl.expiry = other_impl.expiry;
+ other_impl.expiry = time_type();
+
+ impl.might_have_pending_waits = other_impl.might_have_pending_waits;
+ other_impl.might_have_pending_waits = false;
+ }
+
+ // Cancel any asynchronous wait operations associated with the timer.
+ std::size_t cancel(implementation_type& impl, boost::system::error_code& ec)
+ {
+ if (!impl.might_have_pending_waits)
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
+ "deadline_timer", &impl, 0, "cancel"));
+
+ std::size_t count = scheduler_.cancel_timer(timer_queue_, impl.timer_data);
+ impl.might_have_pending_waits = false;
+ ec = boost::system::error_code();
+ return count;
+ }
+
+ // Cancels one asynchronous wait operation associated with the timer.
+ std::size_t cancel_one(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ if (!impl.might_have_pending_waits)
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
+ "deadline_timer", &impl, 0, "cancel_one"));
+
+ std::size_t count = scheduler_.cancel_timer(
+ timer_queue_, impl.timer_data, 1);
+ if (count == 0)
+ impl.might_have_pending_waits = false;
+ ec = boost::system::error_code();
+ return count;
+ }
+
+ // Get the expiry time for the timer as an absolute time.
+ time_type expiry(const implementation_type& impl) const
+ {
+ return impl.expiry;
+ }
+
+ // Get the expiry time for the timer as an absolute time.
+ time_type expires_at(const implementation_type& impl) const
+ {
+ return impl.expiry;
+ }
+
+ // Get the expiry time for the timer relative to now.
+ duration_type expires_from_now(const implementation_type& impl) const
+ {
+ return Time_Traits::subtract(this->expiry(impl), Time_Traits::now());
+ }
+
+ // Set the expiry time for the timer as an absolute time.
+ std::size_t expires_at(implementation_type& impl,
+ const time_type& expiry_time, boost::system::error_code& ec)
+ {
+ std::size_t count = cancel(impl, ec);
+ impl.expiry = expiry_time;
+ ec = boost::system::error_code();
+ return count;
+ }
+
+ // Set the expiry time for the timer relative to now.
+ std::size_t expires_after(implementation_type& impl,
+ const duration_type& expiry_time, boost::system::error_code& ec)
+ {
+ return expires_at(impl,
+ Time_Traits::add(Time_Traits::now(), expiry_time), ec);
+ }
+
+ // Set the expiry time for the timer relative to now.
+ std::size_t expires_from_now(implementation_type& impl,
+ const duration_type& expiry_time, boost::system::error_code& ec)
+ {
+ return expires_at(impl,
+ Time_Traits::add(Time_Traits::now(), expiry_time), ec);
+ }
+
+ // Perform a blocking wait on the timer.
+ void wait(implementation_type& impl, boost::system::error_code& ec)
+ {
+ time_type now = Time_Traits::now();
+ ec = boost::system::error_code();
+ while (Time_Traits::less_than(now, impl.expiry) && !ec)
+ {
+ this->do_wait(Time_Traits::to_posix_duration(
+ Time_Traits::subtract(impl.expiry, now)), ec);
+ now = Time_Traits::now();
+ }
+ }
+
+ // Start an asynchronous wait on the timer.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef wait_handler<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ impl.might_have_pending_waits = true;
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "deadline_timer", &impl, 0, "async_wait"));
+
+ scheduler_.schedule_timer(timer_queue_, impl.expiry, impl.timer_data, p.p);
+ p.v = p.p = 0;
+ }
+
+private:
+ // Helper function to wait given a duration type. The duration type should
+ // either be of type boost::posix_time::time_duration, or implement the
+ // required subset of its interface.
+ template <typename Duration>
+ void do_wait(const Duration& timeout, boost::system::error_code& ec)
+ {
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ std::this_thread::sleep_for(
+ std::chrono::seconds(timeout.total_seconds())
+ + std::chrono::microseconds(timeout.total_microseconds()));
+ ec = boost::system::error_code();
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ ::timeval tv;
+ tv.tv_sec = timeout.total_seconds();
+ tv.tv_usec = timeout.total_microseconds() % 1000000;
+ socket_ops::select(0, 0, 0, 0, &tv, ec);
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ }
+
+ // The queue of timers.
+ timer_queue<Time_Traits> timer_queue_;
+
+ // The object that schedules and executes timers. Usually a reactor.
+ timer_scheduler& scheduler_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_DEADLINE_TIMER_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/dependent_type.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/dependent_type.hpp
new file mode 100644
index 00000000000..53aef3fb5f4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/dependent_type.hpp
@@ -0,0 +1,38 @@
+//
+// detail/dependent_type.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DEPENDENT_TYPE_HPP
+#define BOOST_ASIO_DETAIL_DEPENDENT_TYPE_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename DependsOn, typename T>
+struct dependent_type
+{
+ typedef T type;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_DEPENDENT_TYPE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_ops.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_ops.hpp
new file mode 100644
index 00000000000..bfb0824ffbe
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_ops.hpp
@@ -0,0 +1,123 @@
+//
+// detail/descriptor_ops.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DESCRIPTOR_OPS_HPP
+#define BOOST_ASIO_DETAIL_DESCRIPTOR_OPS_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_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+
+#include <cstddef>
+#include <boost/asio/error.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace descriptor_ops {
+
+// Descriptor state bits.
+enum
+{
+ // The user wants a non-blocking descriptor.
+ user_set_non_blocking = 1,
+
+ // The descriptor has been set non-blocking.
+ internal_non_blocking = 2,
+
+ // Helper "state" used to determine whether the descriptor is non-blocking.
+ non_blocking = user_set_non_blocking | internal_non_blocking,
+
+ // The descriptor may have been dup()-ed.
+ possible_dup = 4
+};
+
+typedef unsigned char state_type;
+
+template <typename ReturnType>
+inline ReturnType error_wrapper(ReturnType return_value,
+ boost::system::error_code& ec)
+{
+ ec = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+ return return_value;
+}
+
+BOOST_ASIO_DECL int open(const char* path, int flags,
+ boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int close(int d, state_type& state,
+ boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool set_user_non_blocking(int d,
+ state_type& state, bool value, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool set_internal_non_blocking(int d,
+ state_type& state, bool value, boost::system::error_code& ec);
+
+typedef iovec buf;
+
+BOOST_ASIO_DECL std::size_t sync_read(int d, state_type state, buf* bufs,
+ std::size_t count, bool all_empty, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool non_blocking_read(int d, buf* bufs, std::size_t count,
+ boost::system::error_code& ec, std::size_t& bytes_transferred);
+
+BOOST_ASIO_DECL std::size_t sync_write(int d, state_type state,
+ const buf* bufs, std::size_t count, bool all_empty,
+ boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool non_blocking_write(int d,
+ const buf* bufs, std::size_t count,
+ boost::system::error_code& ec, std::size_t& bytes_transferred);
+
+BOOST_ASIO_DECL int ioctl(int d, state_type& state, long cmd,
+ ioctl_arg_type* arg, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int fcntl(int d, int cmd, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int fcntl(int d, int cmd,
+ long arg, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_read(int d,
+ state_type state, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_write(int d,
+ state_type state, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_error(int d,
+ state_type state, boost::system::error_code& ec);
+
+} // namespace descriptor_ops
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/descriptor_ops.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_DESCRIPTOR_OPS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_read_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_read_op.hpp
new file mode 100644
index 00000000000..3ced62bb266
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_read_op.hpp
@@ -0,0 +1,132 @@
+//
+// detail/descriptor_read_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DESCRIPTOR_READ_OP_HPP
+#define BOOST_ASIO_DETAIL_DESCRIPTOR_READ_OP_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_WINDOWS) && !defined(__CYGWIN__)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/descriptor_ops.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_work.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class descriptor_read_op_base : public reactor_op
+{
+public:
+ descriptor_read_op_base(int descriptor,
+ const MutableBufferSequence& buffers, func_type complete_func)
+ : reactor_op(&descriptor_read_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ buffers_(buffers)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ descriptor_read_op_base* o(static_cast<descriptor_read_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(o->buffers_);
+
+ status result = descriptor_ops::non_blocking_read(o->descriptor_,
+ bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
+ ? done : not_done;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_read",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ int descriptor_;
+ MutableBufferSequence buffers_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class descriptor_read_op
+ : public descriptor_read_op_base<MutableBufferSequence>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(descriptor_read_op);
+
+ descriptor_read_op(int descriptor, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : descriptor_read_op_base<MutableBufferSequence>(
+ descriptor, buffers, &descriptor_read_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ descriptor_read_op* o(static_cast<descriptor_read_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_DESCRIPTOR_READ_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_write_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_write_op.hpp
new file mode 100644
index 00000000000..d1eea527897
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/descriptor_write_op.hpp
@@ -0,0 +1,132 @@
+//
+// detail/descriptor_write_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DESCRIPTOR_WRITE_OP_HPP
+#define BOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_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_WINDOWS) && !defined(__CYGWIN__)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/descriptor_ops.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_work.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class descriptor_write_op_base : public reactor_op
+{
+public:
+ descriptor_write_op_base(int descriptor,
+ const ConstBufferSequence& buffers, func_type complete_func)
+ : reactor_op(&descriptor_write_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ buffers_(buffers)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ descriptor_write_op_base* o(static_cast<descriptor_write_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(o->buffers_);
+
+ status result = descriptor_ops::non_blocking_write(o->descriptor_,
+ bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
+ ? done : not_done;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_write",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ int descriptor_;
+ ConstBufferSequence buffers_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class descriptor_write_op
+ : public descriptor_write_op_base<ConstBufferSequence>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(descriptor_write_op);
+
+ descriptor_write_op(int descriptor, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : descriptor_write_op_base<ConstBufferSequence>(
+ descriptor, buffers, &descriptor_write_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/dev_poll_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/dev_poll_reactor.hpp
new file mode 100644
index 00000000000..63a0c3058fb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/dev_poll_reactor.hpp
@@ -0,0 +1,220 @@
+//
+// detail/dev_poll_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DEV_POLL_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_DEV_POLL_REACTOR_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_DEV_POLL)
+
+#include <cstddef>
+#include <vector>
+#include <sys/devpoll.h>
+#include <boost/asio/detail/hash_map.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/reactor_op_queue.hpp>
+#include <boost/asio/detail/select_interrupter.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/timer_queue_set.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class dev_poll_reactor
+ : public execution_context_service_base<dev_poll_reactor>
+{
+public:
+ enum op_types { read_op = 0, write_op = 1,
+ connect_op = 1, except_op = 2, max_ops = 3 };
+
+ // Per-descriptor data.
+ struct per_descriptor_data
+ {
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL dev_poll_reactor(boost::asio::execution_context& ctx);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~dev_poll_reactor();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Recreate internal descriptors following a fork.
+ BOOST_ASIO_DECL void notify_fork(
+ boost::asio::execution_context::fork_event fork_ev);
+
+ // Initialise the task.
+ BOOST_ASIO_DECL void init_task();
+
+ // Register a socket with the reactor. Returns 0 on success, system error
+ // code on failure.
+ BOOST_ASIO_DECL int register_descriptor(socket_type, per_descriptor_data&);
+
+ // Register a descriptor with an associated single operation. Returns 0 on
+ // success, system error code on failure.
+ BOOST_ASIO_DECL int register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op);
+
+ // Move descriptor registration from one descriptor_data object to another.
+ BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
+ per_descriptor_data& target_descriptor_data,
+ per_descriptor_data& source_descriptor_data);
+
+ // Post a reactor operation for immediate completion.
+ void post_immediate_completion(reactor_op* op, bool is_continuation)
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data&, reactor_op* op,
+ bool is_continuation, bool allow_speculative);
+
+ // Cancel all operations associated with the given descriptor. The
+ // handlers associated with the descriptor will be invoked with the
+ // operation_aborted error.
+ BOOST_ASIO_DECL void cancel_ops(socket_type descriptor, per_descriptor_data&);
+
+ // Cancel any operations that are running against the descriptor and remove
+ // its registration from the reactor. The reactor resources associated with
+ // the descriptor must be released by calling cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
+ per_descriptor_data&, bool closing);
+
+ // Remove the descriptor's registration from the reactor. The reactor
+ // resources associated with the descriptor must be released by calling
+ // cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_internal_descriptor(
+ socket_type descriptor, per_descriptor_data&);
+
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ BOOST_ASIO_DECL void cleanup_descriptor_data(per_descriptor_data&);
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source);
+
+ // Run /dev/poll once until interrupted or events are ready to be dispatched.
+ BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
+
+ // Interrupt the select loop.
+ BOOST_ASIO_DECL void interrupt();
+
+private:
+ // Create the /dev/poll file descriptor. Throws an exception if the descriptor
+ // cannot be created.
+ BOOST_ASIO_DECL static int do_dev_poll_create();
+
+ // Helper function to add a new timer queue.
+ BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Get the timeout value for the /dev/poll DP_POLL operation. The timeout
+ // value is returned as a number of milliseconds. A return value of -1
+ // indicates that the poll should block indefinitely.
+ BOOST_ASIO_DECL int get_timeout(int msec);
+
+ // Cancel all operations associated with the given descriptor. The do_cancel
+ // function of the handler objects will be invoked. This function does not
+ // acquire the dev_poll_reactor's mutex.
+ BOOST_ASIO_DECL void cancel_ops_unlocked(socket_type descriptor,
+ const boost::system::error_code& ec);
+
+ // Add a pending event entry for the given descriptor.
+ BOOST_ASIO_DECL ::pollfd& add_pending_event_change(int descriptor);
+
+ // The scheduler implementation used to post completions.
+ scheduler& scheduler_;
+
+ // Mutex to protect access to internal data.
+ boost::asio::detail::mutex mutex_;
+
+ // The /dev/poll file descriptor.
+ int dev_poll_fd_;
+
+ // Vector of /dev/poll events waiting to be written to the descriptor.
+ std::vector< ::pollfd> pending_event_changes_;
+
+ // Hash map to associate a descriptor with a pending event change index.
+ hash_map<int, std::size_t> pending_event_change_index_;
+
+ // The interrupter is used to break a blocking DP_POLL operation.
+ select_interrupter interrupter_;
+
+ // The queues of read, write and except operations.
+ reactor_op_queue<socket_type> op_queue_[max_ops];
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/dev_poll_reactor.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/dev_poll_reactor.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_DEV_POLL)
+
+#endif // BOOST_ASIO_DETAIL_DEV_POLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/epoll_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/epoll_reactor.hpp
new file mode 100644
index 00000000000..c3619788532
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/epoll_reactor.hpp
@@ -0,0 +1,268 @@
+//
+// detail/epoll_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EPOLL_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_EPOLL_REACTOR_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_EPOLL)
+
+#include <boost/asio/detail/atomic_count.hpp>
+#include <boost/asio/detail/conditionally_enabled_mutex.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/object_pool.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/select_interrupter.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/timer_queue_set.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+# include <sys/timerfd.h>
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class epoll_reactor
+ : public execution_context_service_base<epoll_reactor>
+{
+private:
+ // The mutex type used by this reactor.
+ typedef conditionally_enabled_mutex mutex;
+
+public:
+ enum op_types { read_op = 0, write_op = 1,
+ connect_op = 1, except_op = 2, max_ops = 3 };
+
+ // Per-descriptor queues.
+ class descriptor_state : operation
+ {
+ friend class epoll_reactor;
+ friend class object_pool_access;
+
+ descriptor_state* next_;
+ descriptor_state* prev_;
+
+ mutex mutex_;
+ epoll_reactor* reactor_;
+ int descriptor_;
+ uint32_t registered_events_;
+ op_queue<reactor_op> op_queue_[max_ops];
+ bool try_speculative_[max_ops];
+ bool shutdown_;
+
+ BOOST_ASIO_DECL descriptor_state(bool locking);
+ void set_ready_events(uint32_t events) { task_result_ = events; }
+ void add_ready_events(uint32_t events) { task_result_ |= events; }
+ BOOST_ASIO_DECL operation* perform_io(uint32_t events);
+ BOOST_ASIO_DECL static void do_complete(
+ void* owner, operation* base,
+ const boost::system::error_code& ec, std::size_t bytes_transferred);
+ };
+
+ // Per-descriptor data.
+ typedef descriptor_state* per_descriptor_data;
+
+ // Constructor.
+ BOOST_ASIO_DECL epoll_reactor(boost::asio::execution_context& ctx);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~epoll_reactor();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Recreate internal descriptors following a fork.
+ BOOST_ASIO_DECL void notify_fork(
+ boost::asio::execution_context::fork_event fork_ev);
+
+ // Initialise the task.
+ BOOST_ASIO_DECL void init_task();
+
+ // Register a socket with the reactor. Returns 0 on success, system error
+ // code on failure.
+ BOOST_ASIO_DECL int register_descriptor(socket_type descriptor,
+ per_descriptor_data& descriptor_data);
+
+ // Register a descriptor with an associated single operation. Returns 0 on
+ // success, system error code on failure.
+ BOOST_ASIO_DECL int register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op);
+
+ // Move descriptor registration from one descriptor_data object to another.
+ BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
+ per_descriptor_data& target_descriptor_data,
+ per_descriptor_data& source_descriptor_data);
+
+ // Post a reactor operation for immediate completion.
+ void post_immediate_completion(reactor_op* op, bool is_continuation)
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative);
+
+ // Cancel all operations associated with the given descriptor. The
+ // handlers associated with the descriptor will be invoked with the
+ // operation_aborted error.
+ BOOST_ASIO_DECL void cancel_ops(socket_type descriptor,
+ per_descriptor_data& descriptor_data);
+
+ // Cancel any operations that are running against the descriptor and remove
+ // its registration from the reactor. The reactor resources associated with
+ // the descriptor must be released by calling cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
+ per_descriptor_data& descriptor_data, bool closing);
+
+ // Remove the descriptor's registration from the reactor. The reactor
+ // resources associated with the descriptor must be released by calling
+ // cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_internal_descriptor(
+ socket_type descriptor, per_descriptor_data& descriptor_data);
+
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ BOOST_ASIO_DECL void cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data);
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source);
+
+ // Run epoll once until interrupted or events are ready to be dispatched.
+ BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
+
+ // Interrupt the select loop.
+ BOOST_ASIO_DECL void interrupt();
+
+private:
+ // The hint to pass to epoll_create to size its data structures.
+ enum { epoll_size = 20000 };
+
+ // Create the epoll file descriptor. Throws an exception if the descriptor
+ // cannot be created.
+ BOOST_ASIO_DECL static int do_epoll_create();
+
+ // Create the timerfd file descriptor. Does not throw.
+ BOOST_ASIO_DECL static int do_timerfd_create();
+
+ // Allocate a new descriptor state object.
+ BOOST_ASIO_DECL descriptor_state* allocate_descriptor_state();
+
+ // Free an existing descriptor state object.
+ BOOST_ASIO_DECL void free_descriptor_state(descriptor_state* s);
+
+ // Helper function to add a new timer queue.
+ BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Called to recalculate and update the timeout.
+ BOOST_ASIO_DECL void update_timeout();
+
+ // Get the timeout value for the epoll_wait call. The timeout value is
+ // returned as a number of milliseconds. A return value of -1 indicates
+ // that epoll_wait should block indefinitely.
+ BOOST_ASIO_DECL int get_timeout(int msec);
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ // Get the timeout value for the timer descriptor. The return value is the
+ // flag argument to be used when calling timerfd_settime.
+ BOOST_ASIO_DECL int get_timeout(itimerspec& ts);
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+ // The scheduler implementation used to post completions.
+ scheduler& scheduler_;
+
+ // Mutex to protect access to internal data.
+ mutex mutex_;
+
+ // The interrupter is used to break a blocking epoll_wait call.
+ select_interrupter interrupter_;
+
+ // The epoll file descriptor.
+ int epoll_fd_;
+
+ // The timer file descriptor.
+ int timer_fd_;
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+
+ // Mutex to protect access to the registered descriptors.
+ mutex registered_descriptors_mutex_;
+
+ // Keep track of all registered descriptors.
+ object_pool<descriptor_state> registered_descriptors_;
+
+ // Helper class to do post-perform_io cleanup.
+ struct perform_io_cleanup_on_block_exit;
+ friend struct perform_io_cleanup_on_block_exit;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/epoll_reactor.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/epoll_reactor.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_EPOLL)
+
+#endif // BOOST_ASIO_DETAIL_EPOLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/event.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/event.hpp
new file mode 100644
index 00000000000..b55a2040596
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/event.hpp
@@ -0,0 +1,50 @@
+//
+// detail/event.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EVENT_HPP
+#define BOOST_ASIO_DETAIL_EVENT_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_THREADS)
+# include <boost/asio/detail/null_event.hpp>
+#elif defined(BOOST_ASIO_WINDOWS)
+# include <boost/asio/detail/win_event.hpp>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_event.hpp>
+#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+# include <boost/asio/detail/std_event.hpp>
+#else
+# error Only Windows, POSIX and std::condition_variable are supported!
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS)
+typedef null_event event;
+#elif defined(BOOST_ASIO_WINDOWS)
+typedef win_event event;
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+typedef posix_event event;
+#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+typedef std_event event;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_EVENT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/eventfd_select_interrupter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/eventfd_select_interrupter.hpp
new file mode 100644
index 00000000000..0bcbcb96db3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/eventfd_select_interrupter.hpp
@@ -0,0 +1,85 @@
+//
+// detail/eventfd_select_interrupter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail 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_EVENTFD_SELECT_INTERRUPTER_HPP
+#define BOOST_ASIO_DETAIL_EVENTFD_SELECT_INTERRUPTER_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_EVENTFD)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class eventfd_select_interrupter
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL eventfd_select_interrupter();
+
+ // Destructor.
+ BOOST_ASIO_DECL ~eventfd_select_interrupter();
+
+ // Recreate the interrupter's descriptors. Used after a fork.
+ BOOST_ASIO_DECL void recreate();
+
+ // Interrupt the select call.
+ BOOST_ASIO_DECL void interrupt();
+
+ // Reset the select interrupt. Returns true if the call was interrupted.
+ BOOST_ASIO_DECL bool reset();
+
+ // Get the read descriptor to be passed to select.
+ int read_descriptor() const
+ {
+ return read_descriptor_;
+ }
+
+private:
+ // Open the descriptors. Throws on error.
+ BOOST_ASIO_DECL void open_descriptors();
+
+ // Close the descriptors.
+ BOOST_ASIO_DECL void close_descriptors();
+
+ // The read end of a connection used to interrupt the select call. This file
+ // descriptor is passed to select such that when it is time to stop, a single
+ // 64bit value will be written on the other end of the connection and this
+ // descriptor will become readable.
+ int read_descriptor_;
+
+ // The write end of a connection used to interrupt the select call. A single
+ // 64bit non-zero value may be written to this to wake up the select which is
+ // waiting for the other end to become readable. This descriptor will only
+ // differ from the read descriptor when a pipe is used.
+ int write_descriptor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/eventfd_select_interrupter.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_EVENTFD)
+
+#endif // BOOST_ASIO_DETAIL_EVENTFD_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/executor_function.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/executor_function.hpp
new file mode 100644
index 00000000000..2b8fb40a128
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/executor_function.hpp
@@ -0,0 +1,106 @@
+//
+// detail/executor_function.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_FUNCTION_HPP
+#define BOOST_ASIO_DETAIL_EXECUTOR_FUNCTION_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/handler_alloc_helpers.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class executor_function_base
+{
+public:
+ void complete()
+ {
+ func_(this, true);
+ }
+
+ void destroy()
+ {
+ func_(this, false);
+ }
+
+protected:
+ typedef void (*func_type)(executor_function_base*, bool);
+
+ executor_function_base(func_type func)
+ : func_(func)
+ {
+ }
+
+ // Prevents deletion through this type.
+ ~executor_function_base()
+ {
+ }
+
+private:
+ func_type func_;
+};
+
+template <typename Function, typename Alloc>
+class executor_function : public executor_function_base
+{
+public:
+ BOOST_ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR(
+ thread_info_base::executor_function_tag, executor_function);
+
+ template <typename F>
+ executor_function(BOOST_ASIO_MOVE_ARG(F) f, const Alloc& allocator)
+ : executor_function_base(&executor_function::do_complete),
+ function_(BOOST_ASIO_MOVE_CAST(F)(f)),
+ allocator_(allocator)
+ {
+ }
+
+ static void do_complete(executor_function_base* base, bool call)
+ {
+ // Take ownership of the function object.
+ executor_function* o(static_cast<executor_function*>(base));
+ Alloc allocator(o->allocator_);
+ ptr p = { detail::addressof(allocator), o, o };
+
+ // Make a copy of the function so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the function may be the true owner of the memory
+ // associated with the function. Consequently, a local copy of the function
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Function function(BOOST_ASIO_MOVE_CAST(Function)(o->function_));
+ p.reset();
+
+ // Make the upcall if required.
+ if (call)
+ {
+ function();
+ }
+ }
+
+private:
+ Function function_;
+ Alloc allocator_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_EXECUTOR_FUNCTION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/executor_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/executor_op.hpp
new file mode 100644
index 00000000000..b2581201f36
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/executor_op.hpp
@@ -0,0 +1,86 @@
+//
+// detail/executor_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_OP_HPP
+#define BOOST_ASIO_DETAIL_EXECUTOR_OP_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/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/scheduler_operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename Alloc,
+ typename Operation = scheduler_operation>
+class executor_op : public Operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(executor_op);
+
+ template <typename H>
+ executor_op(BOOST_ASIO_MOVE_ARG(H) h, const Alloc& allocator)
+ : Operation(&executor_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(H)(h)),
+ allocator_(allocator)
+ {
+ }
+
+ static void do_complete(void* owner, Operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ executor_op* o(static_cast<executor_op*>(base));
+ Alloc allocator(o->allocator_);
+ ptr p = { detail::addressof(allocator), o, o };
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ Handler handler(BOOST_ASIO_MOVE_CAST(Handler)(o->handler_));
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN(());
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ Alloc allocator_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_EXECUTOR_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/fd_set_adapter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/fd_set_adapter.hpp
new file mode 100644
index 00000000000..d502910a6f7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/fd_set_adapter.hpp
@@ -0,0 +1,41 @@
+//
+// detail/fd_set_adapter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_FD_SET_ADAPTER_HPP
+#define BOOST_ASIO_DETAIL_FD_SET_ADAPTER_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/posix_fd_set_adapter.hpp>
+#include <boost/asio/detail/win_fd_set_adapter.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+typedef win_fd_set_adapter fd_set_adapter;
+#else
+typedef posix_fd_set_adapter fd_set_adapter;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_FD_SET_ADAPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/fenced_block.hpp
new file mode 100644
index 00000000000..479db6daa79
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/fenced_block.hpp
@@ -0,0 +1,82 @@
+//
+// detail/fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_FENCED_BLOCK_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_THREADS) \
+ || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK)
+# include <boost/asio/detail/null_fenced_block.hpp>
+#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
+# include <boost/asio/detail/std_fenced_block.hpp>
+#elif defined(__MACH__) && defined(__APPLE__)
+# include <boost/asio/detail/macos_fenced_block.hpp>
+#elif defined(__sun)
+# include <boost/asio/detail/solaris_fenced_block.hpp>
+#elif defined(__GNUC__) && defined(__arm__) \
+ && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
+# include <boost/asio/detail/gcc_arm_fenced_block.hpp>
+#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+# include <boost/asio/detail/gcc_hppa_fenced_block.hpp>
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+# include <boost/asio/detail/gcc_x86_fenced_block.hpp>
+#elif defined(__GNUC__) \
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+# include <boost/asio/detail/gcc_sync_fenced_block.hpp>
+#elif defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
+# include <boost/asio/detail/win_fenced_block.hpp>
+#else
+# include <boost/asio/detail/null_fenced_block.hpp>
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS) \
+ || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK)
+typedef null_fenced_block fenced_block;
+#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)
+typedef std_fenced_block fenced_block;
+#elif defined(__MACH__) && defined(__APPLE__)
+typedef macos_fenced_block fenced_block;
+#elif defined(__sun)
+typedef solaris_fenced_block fenced_block;
+#elif defined(__GNUC__) && defined(__arm__) \
+ && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
+typedef gcc_arm_fenced_block fenced_block;
+#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+typedef gcc_hppa_fenced_block fenced_block;
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+typedef gcc_x86_fenced_block fenced_block;
+#elif defined(__GNUC__) \
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+typedef gcc_sync_fenced_block fenced_block;
+#elif defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
+typedef win_fenced_block fenced_block;
+#else
+typedef null_fenced_block fenced_block;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/functional.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/functional.hpp
new file mode 100644
index 00000000000..73f06ece213
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/functional.hpp
@@ -0,0 +1,40 @@
+//
+// detail/functional.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_FUNCTIONAL_HPP
+#define BOOST_ASIO_DETAIL_FUNCTIONAL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#include <functional>
+
+#if !defined(BOOST_ASIO_HAS_STD_FUNCTION)
+# include <boost/function.hpp>
+#endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION)
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_STD_FUNCTION)
+using std::function;
+#else // defined(BOOST_ASIO_HAS_STD_FUNCTION)
+using boost::function;
+#endif // defined(BOOST_ASIO_HAS_STD_FUNCTION)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_FUNCTIONAL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/future.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/future.hpp
new file mode 100644
index 00000000000..67a0c1bde3c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/future.hpp
@@ -0,0 +1,33 @@
+//
+// detail/future.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/detail/gcc_arm_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_arm_fenced_block.hpp
new file mode 100644
index 00000000000..4051657ed77
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_arm_fenced_block.hpp
@@ -0,0 +1,93 @@
+//
+// detail/gcc_arm_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GCC_ARM_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_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(__GNUC__) && defined(__arm__)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class gcc_arm_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit gcc_arm_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit gcc_arm_fenced_block(full_t)
+ {
+ barrier();
+ }
+
+ // Destructor.
+ ~gcc_arm_fenced_block()
+ {
+ barrier();
+ }
+
+private:
+ static void barrier()
+ {
+#if defined(__ARM_ARCH_4__) \
+ || defined(__ARM_ARCH_4T__) \
+ || defined(__ARM_ARCH_5__) \
+ || defined(__ARM_ARCH_5E__) \
+ || defined(__ARM_ARCH_5T__) \
+ || defined(__ARM_ARCH_5TE__) \
+ || defined(__ARM_ARCH_5TEJ__) \
+ || defined(__ARM_ARCH_6__) \
+ || defined(__ARM_ARCH_6J__) \
+ || defined(__ARM_ARCH_6K__) \
+ || defined(__ARM_ARCH_6Z__) \
+ || defined(__ARM_ARCH_6ZK__) \
+ || defined(__ARM_ARCH_6T2__)
+# if defined(__thumb__)
+ // This is just a placeholder and almost certainly not sufficient.
+ __asm__ __volatile__ ("" : : : "memory");
+# else // defined(__thumb__)
+ int a = 0, b = 0;
+ __asm__ __volatile__ ("swp %0, %1, [%2]"
+ : "=&r"(a) : "r"(1), "r"(&b) : "memory", "cc");
+# endif // defined(__thumb__)
+#else
+ // ARMv7 and later.
+ __asm__ __volatile__ ("dmb" : : : "memory");
+#endif
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__GNUC__) && defined(__arm__)
+
+#endif // BOOST_ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/gcc_hppa_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_hppa_fenced_block.hpp
new file mode 100644
index 00000000000..a3061c03017
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_hppa_fenced_block.hpp
@@ -0,0 +1,70 @@
+//
+// detail/gcc_hppa_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GCC_HPPA_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_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(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class gcc_hppa_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit gcc_hppa_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit gcc_hppa_fenced_block(full_t)
+ {
+ barrier();
+ }
+
+ // Destructor.
+ ~gcc_hppa_fenced_block()
+ {
+ barrier();
+ }
+
+private:
+ static void barrier()
+ {
+ // This is just a placeholder and almost certainly not sufficient.
+ __asm__ __volatile__ ("" : : : "memory");
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+
+#endif // BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/gcc_sync_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_sync_fenced_block.hpp
new file mode 100644
index 00000000000..a167c52f754
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_sync_fenced_block.hpp
@@ -0,0 +1,67 @@
+//
+// detail/gcc_sync_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GCC_SYNC_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_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(__GNUC__) \
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class gcc_sync_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_or_full_t { half, full };
+
+ // Constructor.
+ explicit gcc_sync_fenced_block(half_or_full_t)
+ : value_(0)
+ {
+ __sync_lock_test_and_set(&value_, 1);
+ }
+
+ // Destructor.
+ ~gcc_sync_fenced_block()
+ {
+ __sync_lock_release(&value_);
+ }
+
+private:
+ int value_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__GNUC__)
+ // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
+ // && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+
+#endif // BOOST_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/gcc_x86_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_x86_fenced_block.hpp
new file mode 100644
index 00000000000..5d5e4eef4ab
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/gcc_x86_fenced_block.hpp
@@ -0,0 +1,101 @@
+//
+// detail/gcc_x86_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GCC_X86_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_GCC_X86_FENCED_BLOCK_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(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class gcc_x86_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit gcc_x86_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit gcc_x86_fenced_block(full_t)
+ {
+ lbarrier();
+ }
+
+ // Destructor.
+ ~gcc_x86_fenced_block()
+ {
+ sbarrier();
+ }
+
+private:
+ static int barrier()
+ {
+ int r = 0, m = 1;
+ __asm__ __volatile__ (
+ "xchgl %0, %1" :
+ "=r"(r), "=m"(m) :
+ "0"(1), "m"(m) :
+ "memory", "cc");
+ return r;
+ }
+
+ static void lbarrier()
+ {
+#if defined(__SSE2__)
+# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ __builtin_ia32_lfence();
+# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ __asm__ __volatile__ ("lfence" ::: "memory");
+# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
+#else // defined(__SSE2__)
+ barrier();
+#endif // defined(__SSE2__)
+ }
+
+ static void sbarrier()
+ {
+#if defined(__SSE2__)
+# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ __builtin_ia32_sfence();
+# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ __asm__ __volatile__ ("sfence" ::: "memory");
+# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
+#else // defined(__SSE2__)
+ barrier();
+#endif // defined(__SSE2__)
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+
+#endif // BOOST_ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/global.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/global.hpp
new file mode 100644
index 00000000000..383ceb8cd8c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/global.hpp
@@ -0,0 +1,54 @@
+//
+// detail/global.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GLOBAL_HPP
+#define BOOST_ASIO_DETAIL_GLOBAL_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_THREADS)
+# include <boost/asio/detail/null_global.hpp>
+#elif defined(BOOST_ASIO_WINDOWS)
+# include <boost/asio/detail/win_global.hpp>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_global.hpp>
+#elif defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
+# include <boost/asio/detail/std_global.hpp>
+#else
+# error Only Windows, POSIX and std::call_once are supported!
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+inline T& global()
+{
+#if !defined(BOOST_ASIO_HAS_THREADS)
+ return null_global<T>();
+#elif defined(BOOST_ASIO_WINDOWS)
+ return win_global<T>();
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+ return posix_global<T>();
+#elif defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
+ return std_global<T>();
+#endif
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_GLOBAL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/handler_alloc_helpers.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/handler_alloc_helpers.hpp
new file mode 100644
index 00000000000..85b825dd02b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/handler_alloc_helpers.hpp
@@ -0,0 +1,244 @@
+//
+// detail/handler_alloc_helpers.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_ALLOC_HELPERS_HPP
+#define BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_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/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/handler_alloc_hook.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+// Calls to asio_handler_allocate and asio_handler_deallocate must be made from
+// a namespace that does not contain any overloads of these functions. The
+// boost_asio_handler_alloc_helpers namespace is defined here for that purpose.
+namespace boost_asio_handler_alloc_helpers {
+
+template <typename Handler>
+inline void* allocate(std::size_t s, Handler& h)
+{
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+ return ::operator new(s);
+#else
+ using boost::asio::asio_handler_allocate;
+ return asio_handler_allocate(s, boost::asio::detail::addressof(h));
+#endif
+}
+
+template <typename Handler>
+inline void deallocate(void* p, std::size_t s, Handler& h)
+{
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+ ::operator delete(p);
+#else
+ using boost::asio::asio_handler_deallocate;
+ asio_handler_deallocate(p, s, boost::asio::detail::addressof(h));
+#endif
+}
+
+} // namespace boost_asio_handler_alloc_helpers
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename T>
+class hook_allocator
+{
+public:
+ typedef T value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef hook_allocator<Handler, U> other;
+ };
+
+ explicit hook_allocator(Handler& h)
+ : handler_(h)
+ {
+ }
+
+ template <typename U>
+ hook_allocator(const hook_allocator<Handler, U>& a)
+ : handler_(a.handler_)
+ {
+ }
+
+ T* allocate(std::size_t n)
+ {
+ return static_cast<T*>(
+ boost_asio_handler_alloc_helpers::allocate(sizeof(T) * n, handler_));
+ }
+
+ void deallocate(T* p, std::size_t n)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(p, sizeof(T) * n, handler_);
+ }
+
+//private:
+ Handler& handler_;
+};
+
+template <typename Handler>
+class hook_allocator<Handler, void>
+{
+public:
+ typedef void value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef hook_allocator<Handler, U> other;
+ };
+
+ explicit hook_allocator(Handler& h)
+ : handler_(h)
+ {
+ }
+
+ template <typename U>
+ hook_allocator(const hook_allocator<Handler, U>& a)
+ : handler_(a.handler_)
+ {
+ }
+
+//private:
+ Handler& handler_;
+};
+
+template <typename Handler, typename Allocator>
+struct get_hook_allocator
+{
+ typedef Allocator type;
+
+ static type get(Handler&, const Allocator& a)
+ {
+ return a;
+ }
+};
+
+template <typename Handler, typename T>
+struct get_hook_allocator<Handler, std::allocator<T> >
+{
+ typedef hook_allocator<Handler, T> type;
+
+ static type get(Handler& handler, const std::allocator<T>&)
+ {
+ return type(handler);
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#define BOOST_ASIO_DEFINE_HANDLER_PTR(op) \
+ struct ptr \
+ { \
+ Handler* h; \
+ op* v; \
+ op* p; \
+ ~ptr() \
+ { \
+ reset(); \
+ } \
+ static op* allocate(Handler& handler) \
+ { \
+ typedef typename ::boost::asio::associated_allocator< \
+ Handler>::type associated_allocator_type; \
+ typedef typename ::boost::asio::detail::get_hook_allocator< \
+ Handler, associated_allocator_type>::type hook_allocator_type; \
+ BOOST_ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
+ ::boost::asio::detail::get_hook_allocator< \
+ Handler, associated_allocator_type>::get( \
+ handler, ::boost::asio::get_associated_allocator(handler))); \
+ return a.allocate(1); \
+ } \
+ void reset() \
+ { \
+ if (p) \
+ { \
+ p->~op(); \
+ p = 0; \
+ } \
+ if (v) \
+ { \
+ typedef typename ::boost::asio::associated_allocator< \
+ Handler>::type associated_allocator_type; \
+ typedef typename ::boost::asio::detail::get_hook_allocator< \
+ Handler, associated_allocator_type>::type hook_allocator_type; \
+ BOOST_ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
+ ::boost::asio::detail::get_hook_allocator< \
+ Handler, associated_allocator_type>::get( \
+ *h, ::boost::asio::get_associated_allocator(*h))); \
+ a.deallocate(static_cast<op*>(v), 1); \
+ v = 0; \
+ } \
+ } \
+ } \
+ /**/
+
+#define BOOST_ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR(purpose, op) \
+ struct ptr \
+ { \
+ const Alloc* a; \
+ void* v; \
+ op* p; \
+ ~ptr() \
+ { \
+ reset(); \
+ } \
+ static op* allocate(const Alloc& a) \
+ { \
+ typedef typename ::boost::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::type recycling_allocator_type; \
+ BOOST_ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
+ ::boost::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::get(a)); \
+ return a1.allocate(1); \
+ } \
+ void reset() \
+ { \
+ if (p) \
+ { \
+ p->~op(); \
+ p = 0; \
+ } \
+ if (v) \
+ { \
+ typedef typename ::boost::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::type recycling_allocator_type; \
+ BOOST_ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
+ ::boost::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::get(*a)); \
+ a1.deallocate(static_cast<op*>(v), 1); \
+ v = 0; \
+ } \
+ } \
+ } \
+ /**/
+
+#define BOOST_ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(op) \
+ BOOST_ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR( \
+ ::boost::asio::detail::thread_info_base::default_tag, op ) \
+ /**/
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_HANDLER_ALLOC_HELPERS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/handler_cont_helpers.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/handler_cont_helpers.hpp
new file mode 100644
index 00000000000..204097e0327
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/handler_cont_helpers.hpp
@@ -0,0 +1,45 @@
+//
+// detail/handler_cont_helpers.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_CONT_HELPERS_HPP
+#define BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_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/memory.hpp>
+#include <boost/asio/handler_continuation_hook.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+// Calls to asio_handler_is_continuation must be made from a namespace that
+// does not contain overloads of this function. This namespace is defined here
+// for that purpose.
+namespace boost_asio_handler_cont_helpers {
+
+template <typename Context>
+inline bool is_continuation(Context& context)
+{
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+ return false;
+#else
+ using boost::asio::asio_handler_is_continuation;
+ return asio_handler_is_continuation(
+ boost::asio::detail::addressof(context));
+#endif
+}
+
+} // namespace boost_asio_handler_cont_helpers
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/handler_invoke_helpers.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/handler_invoke_helpers.hpp
new file mode 100644
index 00000000000..e453b02cf46
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/handler_invoke_helpers.hpp
@@ -0,0 +1,57 @@
+//
+// detail/handler_invoke_helpers.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_INVOKE_HELPERS_HPP
+#define BOOST_ASIO_DETAIL_HANDLER_INVOKE_HELPERS_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/memory.hpp>
+#include <boost/asio/handler_invoke_hook.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+// Calls to asio_handler_invoke must be made from a namespace that does not
+// contain overloads of this function. The boost_asio_handler_invoke_helpers
+// namespace is defined here for that purpose.
+namespace boost_asio_handler_invoke_helpers {
+
+template <typename Function, typename Context>
+inline void invoke(Function& function, Context& context)
+{
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+ Function tmp(function);
+ tmp();
+#else
+ using boost::asio::asio_handler_invoke;
+ asio_handler_invoke(function, boost::asio::detail::addressof(context));
+#endif
+}
+
+template <typename Function, typename Context>
+inline void invoke(const Function& function, Context& context)
+{
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+ Function tmp(function);
+ tmp();
+#else
+ using boost::asio::asio_handler_invoke;
+ asio_handler_invoke(function, boost::asio::detail::addressof(context));
+#endif
+}
+
+} // namespace boost_asio_handler_invoke_helpers
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/handler_tracking.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/handler_tracking.hpp
new file mode 100644
index 00000000000..35eff023e2a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/handler_tracking.hpp
@@ -0,0 +1,242 @@
+//
+// detail/handler_tracking.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_TRACKING_HPP
+#define BOOST_ASIO_DETAIL_HANDLER_TRACKING_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+namespace boost {
+namespace asio {
+
+class execution_context;
+
+} // namespace asio
+} // namespace boost
+
+#if defined(BOOST_ASIO_CUSTOM_HANDLER_TRACKING)
+# include BOOST_ASIO_CUSTOM_HANDLER_TRACKING
+#elif defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+# include <boost/system/error_code.hpp>
+# include <boost/asio/detail/cstdint.hpp>
+# include <boost/asio/detail/static_mutex.hpp>
+# include <boost/asio/detail/tss_ptr.hpp>
+#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_CUSTOM_HANDLER_TRACKING)
+
+// The user-specified header must define the following macros:
+// - BOOST_ASIO_INHERIT_TRACKED_HANDLER
+// - BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER
+// - BOOST_ASIO_HANDLER_TRACKING_INIT
+// - BOOST_ASIO_HANDLER_CREATION(args)
+// - BOOST_ASIO_HANDLER_COMPLETION(args)
+// - BOOST_ASIO_HANDLER_INVOCATION_BEGIN(args)
+// - BOOST_ASIO_HANDLER_INVOCATION_END
+// - BOOST_ASIO_HANDLER_OPERATION(args)
+// - BOOST_ASIO_HANDLER_REACTOR_REGISTRATION(args)
+// - BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION(args)
+// - BOOST_ASIO_HANDLER_REACTOR_READ_EVENT
+// - BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT
+// - BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT
+// - BOOST_ASIO_HANDLER_REACTOR_EVENTS(args)
+// - BOOST_ASIO_HANDLER_REACTOR_OPERATION(args)
+
+# if !defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+# define BOOST_ASIO_ENABLE_HANDLER_TRACKING 1
+# endif /// !defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+#elif defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+class handler_tracking
+{
+public:
+ class completion;
+
+ // Base class for objects containing tracked handlers.
+ class tracked_handler
+ {
+ private:
+ // Only the handler_tracking class will have access to the id.
+ friend class handler_tracking;
+ friend class completion;
+ uint64_t id_;
+
+ protected:
+ // Constructor initialises with no id.
+ tracked_handler() : id_(0) {}
+
+ // Prevent deletion through this type.
+ ~tracked_handler() {}
+ };
+
+ // Initialise the tracking system.
+ BOOST_ASIO_DECL static void init();
+
+ // Record the creation of a tracked handler.
+ BOOST_ASIO_DECL static void creation(
+ execution_context& context, tracked_handler& h,
+ const char* object_type, void* object,
+ uintmax_t native_handle, const char* op_name);
+
+ class completion
+ {
+ public:
+ // Constructor records that handler is to be invoked with no arguments.
+ BOOST_ASIO_DECL explicit completion(const tracked_handler& h);
+
+ // Destructor records only when an exception is thrown from the handler, or
+ // if the memory is being freed without the handler having been invoked.
+ BOOST_ASIO_DECL ~completion();
+
+ // Records that handler is to be invoked with no arguments.
+ BOOST_ASIO_DECL void invocation_begin();
+
+ // Records that handler is to be invoked with one arguments.
+ BOOST_ASIO_DECL void invocation_begin(const boost::system::error_code& ec);
+
+ // Constructor records that handler is to be invoked with two arguments.
+ BOOST_ASIO_DECL void invocation_begin(
+ const boost::system::error_code& ec, std::size_t bytes_transferred);
+
+ // Constructor records that handler is to be invoked with two arguments.
+ BOOST_ASIO_DECL void invocation_begin(
+ const boost::system::error_code& ec, int signal_number);
+
+ // Constructor records that handler is to be invoked with two arguments.
+ BOOST_ASIO_DECL void invocation_begin(
+ const boost::system::error_code& ec, const char* arg);
+
+ // Record that handler invocation has ended.
+ BOOST_ASIO_DECL void invocation_end();
+
+ private:
+ friend class handler_tracking;
+ uint64_t id_;
+ bool invoked_;
+ completion* next_;
+ };
+
+ // Record an operation that is not directly associated with a handler.
+ BOOST_ASIO_DECL static void operation(execution_context& context,
+ const char* object_type, void* object,
+ uintmax_t native_handle, const char* op_name);
+
+ // Record that a descriptor has been registered with the reactor.
+ BOOST_ASIO_DECL static void reactor_registration(execution_context& context,
+ uintmax_t native_handle, uintmax_t registration);
+
+ // Record that a descriptor has been deregistered from the reactor.
+ BOOST_ASIO_DECL static void reactor_deregistration(execution_context& context,
+ uintmax_t native_handle, uintmax_t registration);
+
+ // Record a reactor-based operation that is associated with a handler.
+ BOOST_ASIO_DECL static void reactor_events(execution_context& context,
+ uintmax_t registration, unsigned events);
+
+ // Record a reactor-based operation that is associated with a handler.
+ BOOST_ASIO_DECL static void reactor_operation(
+ const tracked_handler& h, const char* op_name,
+ const boost::system::error_code& ec);
+
+ // Record a reactor-based operation that is associated with a handler.
+ BOOST_ASIO_DECL static void reactor_operation(
+ const tracked_handler& h, const char* op_name,
+ const boost::system::error_code& ec, std::size_t bytes_transferred);
+
+ // Write a line of output.
+ BOOST_ASIO_DECL static void write_line(const char* format, ...);
+
+private:
+ struct tracking_state;
+ BOOST_ASIO_DECL static tracking_state* get_state();
+};
+
+# define BOOST_ASIO_INHERIT_TRACKED_HANDLER \
+ : public boost::asio::detail::handler_tracking::tracked_handler
+
+# define BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER \
+ , public boost::asio::detail::handler_tracking::tracked_handler
+
+# define BOOST_ASIO_HANDLER_TRACKING_INIT \
+ boost::asio::detail::handler_tracking::init()
+
+# define BOOST_ASIO_HANDLER_CREATION(args) \
+ boost::asio::detail::handler_tracking::creation args
+
+# define BOOST_ASIO_HANDLER_COMPLETION(args) \
+ boost::asio::detail::handler_tracking::completion tracked_completion args
+
+# define BOOST_ASIO_HANDLER_INVOCATION_BEGIN(args) \
+ tracked_completion.invocation_begin args
+
+# define BOOST_ASIO_HANDLER_INVOCATION_END \
+ tracked_completion.invocation_end()
+
+# define BOOST_ASIO_HANDLER_OPERATION(args) \
+ boost::asio::detail::handler_tracking::operation args
+
+# define BOOST_ASIO_HANDLER_REACTOR_REGISTRATION(args) \
+ boost::asio::detail::handler_tracking::reactor_registration args
+
+# define BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION(args) \
+ boost::asio::detail::handler_tracking::reactor_deregistration args
+
+# define BOOST_ASIO_HANDLER_REACTOR_READ_EVENT 1
+# define BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT 2
+# define BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT 4
+
+# define BOOST_ASIO_HANDLER_REACTOR_EVENTS(args) \
+ boost::asio::detail::handler_tracking::reactor_events args
+
+# define BOOST_ASIO_HANDLER_REACTOR_OPERATION(args) \
+ boost::asio::detail::handler_tracking::reactor_operation args
+
+#else // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+# define BOOST_ASIO_INHERIT_TRACKED_HANDLER
+# define BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER
+# define BOOST_ASIO_HANDLER_TRACKING_INIT (void)0
+# define BOOST_ASIO_HANDLER_CREATION(args) (void)0
+# define BOOST_ASIO_HANDLER_COMPLETION(args) (void)0
+# define BOOST_ASIO_HANDLER_INVOCATION_BEGIN(args) (void)0
+# define BOOST_ASIO_HANDLER_INVOCATION_END (void)0
+# define BOOST_ASIO_HANDLER_OPERATION(args) (void)0
+# define BOOST_ASIO_HANDLER_REACTOR_REGISTRATION(args) (void)0
+# define BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION(args) (void)0
+# define BOOST_ASIO_HANDLER_REACTOR_READ_EVENT 0
+# define BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT 0
+# define BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT 0
+# define BOOST_ASIO_HANDLER_REACTOR_EVENTS(args) (void)0
+# define BOOST_ASIO_HANDLER_REACTOR_OPERATION(args) (void)0
+
+#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/handler_tracking.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_HANDLER_TRACKING_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/handler_type_requirements.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/handler_type_requirements.hpp
new file mode 100644
index 00000000000..cf57d67652a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/handler_type_requirements.hpp
@@ -0,0 +1,558 @@
+//
+// detail/handler_type_requirements.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_TYPE_REQUIREMENTS_HPP
+#define BOOST_ASIO_DETAIL_HANDLER_TYPE_REQUIREMENTS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+// Older versions of gcc have difficulty compiling the sizeof expressions where
+// we test the handler type requirements. We'll disable checking of handler type
+// requirements for those compilers, but otherwise enable it by default.
+#if !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
+# if !defined(__GNUC__) || (__GNUC__ >= 4)
+# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS 1
+# endif // !defined(__GNUC__) || (__GNUC__ >= 4)
+#endif // !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
+
+// With C++0x we can use a combination of enhanced SFINAE and static_assert to
+// generate better template error messages. As this technique is not yet widely
+// portable, we'll only enable it for tested compilers.
+#if !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT 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 >= 1600)
+# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT 1
+# endif // (_MSC_VER >= 1600)
+# endif // defined(BOOST_ASIO_MSVC)
+# if defined(__clang__)
+# if __has_feature(__cxx_static_assert__)
+# define BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT 1
+# endif // __has_feature(cxx_static_assert)
+# endif // defined(__clang__)
+#endif // !defined(BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
+
+#if defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
+# include <boost/asio/async_result.hpp>
+#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
+
+# if defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
+
+template <typename Handler>
+auto zero_arg_copyable_handler_test(Handler h, void*)
+ -> decltype(
+ sizeof(Handler(static_cast<const Handler&>(h))),
+ ((h)()),
+ char(0));
+
+template <typename Handler>
+char (&zero_arg_copyable_handler_test(Handler, ...))[2];
+
+template <typename Handler, typename Arg1>
+auto one_arg_handler_test(Handler h, Arg1* a1)
+ -> decltype(
+ sizeof(Handler(BOOST_ASIO_MOVE_CAST(Handler)(h))),
+ ((h)(*a1)),
+ char(0));
+
+template <typename Handler>
+char (&one_arg_handler_test(Handler h, ...))[2];
+
+template <typename Handler, typename Arg1, typename Arg2>
+auto two_arg_handler_test(Handler h, Arg1* a1, Arg2* a2)
+ -> decltype(
+ sizeof(Handler(BOOST_ASIO_MOVE_CAST(Handler)(h))),
+ ((h)(*a1, *a2)),
+ char(0));
+
+template <typename Handler>
+char (&two_arg_handler_test(Handler, ...))[2];
+
+template <typename Handler, typename Arg1, typename Arg2>
+auto two_arg_move_handler_test(Handler h, Arg1* a1, Arg2* a2)
+ -> decltype(
+ sizeof(Handler(BOOST_ASIO_MOVE_CAST(Handler)(h))),
+ ((h)(*a1, BOOST_ASIO_MOVE_CAST(Arg2)(*a2))),
+ char(0));
+
+template <typename Handler>
+char (&two_arg_move_handler_test(Handler, ...))[2];
+
+# define BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT(expr, msg) \
+ static_assert(expr, msg);
+
+# else // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
+
+# define BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT(expr, msg)
+
+# endif // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS_ASSERT)
+
+template <typename T> T& lvref();
+template <typename T> T& lvref(T);
+template <typename T> const T& clvref();
+template <typename T> const T& clvref(T);
+#if defined(BOOST_ASIO_HAS_MOVE)
+template <typename T> T rvref();
+template <typename T> T rvref(T);
+#else // defined(BOOST_ASIO_HAS_MOVE)
+template <typename T> const T& rvref();
+template <typename T> const T& rvref(T);
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+template <typename T> char argbyv(T);
+
+template <int>
+struct handler_type_requirements
+{
+};
+
+#define BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void()) asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::zero_arg_copyable_handler_test( \
+ boost::asio::detail::clvref< \
+ asio_true_handler_type>(), 0)) == 1, \
+ "CompletionHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::clvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()(), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_READ_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, std::size_t)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const std::size_t*>(0))) == 1, \
+ "ReadHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const std::size_t>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_WRITE_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, std::size_t)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const std::size_t*>(0))) == 1, \
+ "WriteHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const std::size_t>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_ACCEPT_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::one_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0))) == 1, \
+ "AcceptHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK( \
+ handler_type, handler, socket_type) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, socket_type)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_move_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<socket_type*>(0))) == 1, \
+ "MoveAcceptHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::rvref<socket_type>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_CONNECT_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::one_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0))) == 1, \
+ "ConnectHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK( \
+ handler_type, handler, endpoint_type) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, endpoint_type)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const endpoint_type*>(0))) == 1, \
+ "RangeConnectHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const endpoint_type>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK( \
+ handler_type, handler, iter_type) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, iter_type)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const iter_type*>(0))) == 1, \
+ "IteratorConnectHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const iter_type>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_RESOLVE_HANDLER_CHECK( \
+ handler_type, handler, range_type) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, range_type)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const range_type*>(0))) == 1, \
+ "ResolveHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const range_type>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_WAIT_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::one_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0))) == 1, \
+ "WaitHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_SIGNAL_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, int)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const int*>(0))) == 1, \
+ "SignalHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const int>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_HANDSHAKE_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::one_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0))) == 1, \
+ "HandshakeHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code, std::size_t)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::two_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0), \
+ static_cast<const std::size_t*>(0))) == 1, \
+ "BufferedHandshakeHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>(), \
+ boost::asio::detail::lvref<const std::size_t>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_SHUTDOWN_HANDLER_CHECK( \
+ handler_type, handler) \
+ \
+ typedef BOOST_ASIO_HANDLER_TYPE(handler_type, \
+ void(boost::system::error_code)) \
+ asio_true_handler_type; \
+ \
+ BOOST_ASIO_HANDLER_TYPE_REQUIREMENTS_ASSERT( \
+ sizeof(boost::asio::detail::one_arg_handler_test( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>(), \
+ static_cast<const boost::system::error_code*>(0))) == 1, \
+ "ShutdownHandler type requirements not met") \
+ \
+ typedef boost::asio::detail::handler_type_requirements< \
+ sizeof( \
+ boost::asio::detail::argbyv( \
+ boost::asio::detail::rvref< \
+ asio_true_handler_type>())) + \
+ sizeof( \
+ boost::asio::detail::lvref< \
+ asio_true_handler_type>()( \
+ boost::asio::detail::lvref<const boost::system::error_code>()), \
+ char(0))> BOOST_ASIO_UNUSED_TYPEDEF
+
+#else // !defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
+
+#define BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_READ_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_WRITE_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_ACCEPT_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_MOVE_ACCEPT_HANDLER_CHECK( \
+ handler_type, handler, socket_type) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_CONNECT_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK( \
+ handler_type, handler, iter_type) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK( \
+ handler_type, handler, iter_type) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_RESOLVE_HANDLER_CHECK( \
+ handler_type, handler, iter_type) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_WAIT_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_SIGNAL_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_HANDSHAKE_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#define BOOST_ASIO_SHUTDOWN_HANDLER_CHECK( \
+ handler_type, handler) \
+ typedef int BOOST_ASIO_UNUSED_TYPEDEF
+
+#endif // !defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_HANDLER_TYPE_REQUIREMENTS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/handler_work.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/handler_work.hpp
new file mode 100644
index 00000000000..06da376178d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/handler_work.hpp
@@ -0,0 +1,115 @@
+//
+// detail/handler_work.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_WORK_HPP
+#define BOOST_ASIO_DETAIL_HANDLER_WORK_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/associated_executor.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// A helper class template to allow completion handlers to be dispatched
+// through either the new executors framework or the old invocaton hook. The
+// primary template uses the new executors framework.
+template <typename Handler,
+ typename IoExecutor = system_executor, typename HandlerExecutor
+ = typename associated_executor<Handler, IoExecutor>::type>
+class handler_work
+{
+public:
+ explicit handler_work(Handler& handler) BOOST_ASIO_NOEXCEPT
+ : io_executor_(),
+ executor_(boost::asio::get_associated_executor(handler, io_executor_))
+ {
+ }
+
+ handler_work(Handler& handler, const IoExecutor& io_ex) BOOST_ASIO_NOEXCEPT
+ : io_executor_(io_ex),
+ executor_(boost::asio::get_associated_executor(handler, io_executor_))
+ {
+ }
+
+ static void start(Handler& handler) BOOST_ASIO_NOEXCEPT
+ {
+ HandlerExecutor ex(boost::asio::get_associated_executor(handler));
+ ex.on_work_started();
+ }
+
+ static void start(Handler& handler,
+ const IoExecutor& io_ex) BOOST_ASIO_NOEXCEPT
+ {
+ HandlerExecutor ex(boost::asio::get_associated_executor(handler, io_ex));
+ ex.on_work_started();
+ io_ex.on_work_started();
+ }
+
+ ~handler_work()
+ {
+ io_executor_.on_work_finished();
+ executor_.on_work_finished();
+ }
+
+ template <typename Function>
+ void complete(Function& function, Handler& handler)
+ {
+ executor_.dispatch(BOOST_ASIO_MOVE_CAST(Function)(function),
+ boost::asio::get_associated_allocator(handler));
+ }
+
+private:
+ // Disallow copying and assignment.
+ handler_work(const handler_work&);
+ handler_work& operator=(const handler_work&);
+
+ IoExecutor io_executor_;
+ HandlerExecutor executor_;
+};
+
+// This specialisation dispatches a handler through the old invocation hook.
+// The specialisation is not strictly required for correctness, as the
+// system_executor will dispatch through the hook anyway. However, by doing
+// this we avoid an extra copy of the handler.
+template <typename Handler>
+class handler_work<Handler, system_executor, system_executor>
+{
+public:
+ explicit handler_work(Handler&) BOOST_ASIO_NOEXCEPT {}
+ static void start(Handler&) BOOST_ASIO_NOEXCEPT {}
+ ~handler_work() {}
+
+ template <typename Function>
+ void complete(Function& function, Handler& handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(function, handler);
+ }
+
+private:
+ // Disallow copying and assignment.
+ handler_work(const handler_work&);
+ handler_work& operator=(const handler_work&);
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_HANDLER_WORK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/hash_map.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/hash_map.hpp
new file mode 100644
index 00000000000..ac80abdc79c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/hash_map.hpp
@@ -0,0 +1,333 @@
+//
+// detail/hash_map.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HASH_MAP_HPP
+#define BOOST_ASIO_DETAIL_HASH_MAP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <list>
+#include <utility>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# include <boost/asio/detail/socket_types.hpp>
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+inline std::size_t calculate_hash_value(int i)
+{
+ return static_cast<std::size_t>(i);
+}
+
+inline std::size_t calculate_hash_value(void* p)
+{
+ return reinterpret_cast<std::size_t>(p)
+ + (reinterpret_cast<std::size_t>(p) >> 3);
+}
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+inline std::size_t calculate_hash_value(SOCKET s)
+{
+ return static_cast<std::size_t>(s);
+}
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+// Note: assumes K and V are POD types.
+template <typename K, typename V>
+class hash_map
+ : private noncopyable
+{
+public:
+ // The type of a value in the map.
+ typedef std::pair<K, V> value_type;
+
+ // The type of a non-const iterator over the hash map.
+ typedef typename std::list<value_type>::iterator iterator;
+
+ // The type of a const iterator over the hash map.
+ typedef typename std::list<value_type>::const_iterator const_iterator;
+
+ // Constructor.
+ hash_map()
+ : size_(0),
+ buckets_(0),
+ num_buckets_(0)
+ {
+ }
+
+ // Destructor.
+ ~hash_map()
+ {
+ delete[] buckets_;
+ }
+
+ // Get an iterator for the beginning of the map.
+ iterator begin()
+ {
+ return values_.begin();
+ }
+
+ // Get an iterator for the beginning of the map.
+ const_iterator begin() const
+ {
+ return values_.begin();
+ }
+
+ // Get an iterator for the end of the map.
+ iterator end()
+ {
+ return values_.end();
+ }
+
+ // Get an iterator for the end of the map.
+ const_iterator end() const
+ {
+ return values_.end();
+ }
+
+ // Check whether the map is empty.
+ bool empty() const
+ {
+ return values_.empty();
+ }
+
+ // Find an entry in the map.
+ iterator find(const K& k)
+ {
+ if (num_buckets_)
+ {
+ size_t bucket = calculate_hash_value(k) % num_buckets_;
+ iterator it = buckets_[bucket].first;
+ if (it == values_.end())
+ return values_.end();
+ iterator end_it = buckets_[bucket].last;
+ ++end_it;
+ while (it != end_it)
+ {
+ if (it->first == k)
+ return it;
+ ++it;
+ }
+ }
+ return values_.end();
+ }
+
+ // Find an entry in the map.
+ const_iterator find(const K& k) const
+ {
+ if (num_buckets_)
+ {
+ size_t bucket = calculate_hash_value(k) % num_buckets_;
+ const_iterator it = buckets_[bucket].first;
+ if (it == values_.end())
+ return it;
+ const_iterator end_it = buckets_[bucket].last;
+ ++end_it;
+ while (it != end_it)
+ {
+ if (it->first == k)
+ return it;
+ ++it;
+ }
+ }
+ return values_.end();
+ }
+
+ // Insert a new entry into the map.
+ std::pair<iterator, bool> insert(const value_type& v)
+ {
+ if (size_ + 1 >= num_buckets_)
+ rehash(hash_size(size_ + 1));
+ size_t bucket = calculate_hash_value(v.first) % num_buckets_;
+ iterator it = buckets_[bucket].first;
+ if (it == values_.end())
+ {
+ buckets_[bucket].first = buckets_[bucket].last =
+ values_insert(values_.end(), v);
+ ++size_;
+ return std::pair<iterator, bool>(buckets_[bucket].last, true);
+ }
+ iterator end_it = buckets_[bucket].last;
+ ++end_it;
+ while (it != end_it)
+ {
+ if (it->first == v.first)
+ return std::pair<iterator, bool>(it, false);
+ ++it;
+ }
+ buckets_[bucket].last = values_insert(end_it, v);
+ ++size_;
+ return std::pair<iterator, bool>(buckets_[bucket].last, true);
+ }
+
+ // Erase an entry from the map.
+ void erase(iterator it)
+ {
+ BOOST_ASIO_ASSERT(it != values_.end());
+ BOOST_ASIO_ASSERT(num_buckets_ != 0);
+
+ size_t bucket = calculate_hash_value(it->first) % num_buckets_;
+ bool is_first = (it == buckets_[bucket].first);
+ bool is_last = (it == buckets_[bucket].last);
+ if (is_first && is_last)
+ buckets_[bucket].first = buckets_[bucket].last = values_.end();
+ else if (is_first)
+ ++buckets_[bucket].first;
+ else if (is_last)
+ --buckets_[bucket].last;
+
+ values_erase(it);
+ --size_;
+ }
+
+ // Erase a key from the map.
+ void erase(const K& k)
+ {
+ iterator it = find(k);
+ if (it != values_.end())
+ erase(it);
+ }
+
+ // Remove all entries from the map.
+ void clear()
+ {
+ // Clear the values.
+ values_.clear();
+ size_ = 0;
+
+ // Initialise all buckets to empty.
+ iterator end_it = values_.end();
+ for (size_t i = 0; i < num_buckets_; ++i)
+ buckets_[i].first = buckets_[i].last = end_it;
+ }
+
+private:
+ // Calculate the hash size for the specified number of elements.
+ static std::size_t hash_size(std::size_t num_elems)
+ {
+ static std::size_t sizes[] =
+ {
+#if defined(BOOST_ASIO_HASH_MAP_BUCKETS)
+ BOOST_ASIO_HASH_MAP_BUCKETS
+#else // BOOST_ASIO_HASH_MAP_BUCKETS
+ 3, 13, 23, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593,
+ 49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469,
+ 12582917, 25165843
+#endif // BOOST_ASIO_HASH_MAP_BUCKETS
+ };
+ const std::size_t nth_size = sizeof(sizes) / sizeof(std::size_t) - 1;
+ for (std::size_t i = 0; i < nth_size; ++i)
+ if (num_elems < sizes[i])
+ return sizes[i];
+ return sizes[nth_size];
+ }
+
+ // Re-initialise the hash from the values already contained in the list.
+ void rehash(std::size_t num_buckets)
+ {
+ if (num_buckets == num_buckets_)
+ return;
+ BOOST_ASIO_ASSERT(num_buckets != 0);
+
+ iterator end_iter = values_.end();
+
+ // Update number of buckets and initialise all buckets to empty.
+ bucket_type* tmp = new bucket_type[num_buckets];
+ delete[] buckets_;
+ buckets_ = tmp;
+ num_buckets_ = num_buckets;
+ for (std::size_t i = 0; i < num_buckets_; ++i)
+ buckets_[i].first = buckets_[i].last = end_iter;
+
+ // Put all values back into the hash.
+ iterator iter = values_.begin();
+ while (iter != end_iter)
+ {
+ std::size_t bucket = calculate_hash_value(iter->first) % num_buckets_;
+ if (buckets_[bucket].last == end_iter)
+ {
+ buckets_[bucket].first = buckets_[bucket].last = iter++;
+ }
+ else if (++buckets_[bucket].last == iter)
+ {
+ ++iter;
+ }
+ else
+ {
+ values_.splice(buckets_[bucket].last, values_, iter++);
+ --buckets_[bucket].last;
+ }
+ }
+ }
+
+ // Insert an element into the values list by splicing from the spares list,
+ // if a spare is available, and otherwise by inserting a new element.
+ iterator values_insert(iterator it, const value_type& v)
+ {
+ if (spares_.empty())
+ {
+ return values_.insert(it, v);
+ }
+ else
+ {
+ spares_.front() = v;
+ values_.splice(it, spares_, spares_.begin());
+ return --it;
+ }
+ }
+
+ // Erase an element from the values list by splicing it to the spares list.
+ void values_erase(iterator it)
+ {
+ *it = value_type();
+ spares_.splice(spares_.begin(), values_, it);
+ }
+
+ // The number of elements in the hash.
+ std::size_t size_;
+
+ // The list of all values in the hash map.
+ std::list<value_type> values_;
+
+ // The list of spare nodes waiting to be recycled. Assumes that POD types only
+ // are stored in the hash map.
+ std::list<value_type> spares_;
+
+ // The type for a bucket in the hash table.
+ struct bucket_type
+ {
+ iterator first;
+ iterator last;
+ };
+
+ // The buckets in the hash.
+ bucket_type* buckets_;
+
+ // The number of buckets in the hash.
+ std::size_t num_buckets_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_HASH_MAP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp
new file mode 100644
index 00000000000..b3fb59ccc71
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp
@@ -0,0 +1,120 @@
+//
+// detail/impl/buffer_sequence_adapter.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_BUFFER_SEQUENCE_ADAPTER_IPP
+#define BOOST_ASIO_DETAIL_IMPL_BUFFER_SEQUENCE_ADAPTER_IPP
+
+#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_WINDOWS_RUNTIME)
+
+#include <robuffer.h>
+#include <windows.storage.streams.h>
+#include <wrl/implements.h>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class winrt_buffer_impl :
+ public Microsoft::WRL::RuntimeClass<
+ Microsoft::WRL::RuntimeClassFlags<
+ Microsoft::WRL::RuntimeClassType::WinRtClassicComMix>,
+ ABI::Windows::Storage::Streams::IBuffer,
+ Windows::Storage::Streams::IBufferByteAccess>
+{
+public:
+ explicit winrt_buffer_impl(const boost::asio::const_buffer& b)
+ {
+ bytes_ = const_cast<byte*>(static_cast<const byte*>(b.data()));
+ length_ = b.size();
+ capacity_ = b.size();
+ }
+
+ explicit winrt_buffer_impl(const boost::asio::mutable_buffer& b)
+ {
+ bytes_ = static_cast<byte*>(b.data());
+ length_ = 0;
+ capacity_ = b.size();
+ }
+
+ ~winrt_buffer_impl()
+ {
+ }
+
+ STDMETHODIMP Buffer(byte** value)
+ {
+ *value = bytes_;
+ return S_OK;
+ }
+
+ STDMETHODIMP get_Capacity(UINT32* value)
+ {
+ *value = capacity_;
+ return S_OK;
+ }
+
+ STDMETHODIMP get_Length(UINT32 *value)
+ {
+ *value = length_;
+ return S_OK;
+ }
+
+ STDMETHODIMP put_Length(UINT32 value)
+ {
+ if (value > capacity_)
+ return E_INVALIDARG;
+ length_ = value;
+ return S_OK;
+ }
+
+private:
+ byte* bytes_;
+ UINT32 length_;
+ UINT32 capacity_;
+};
+
+void buffer_sequence_adapter_base::init_native_buffer(
+ buffer_sequence_adapter_base::native_buffer_type& buf,
+ const boost::asio::mutable_buffer& buffer)
+{
+ std::memset(&buf, 0, sizeof(native_buffer_type));
+ Microsoft::WRL::ComPtr<IInspectable> insp
+ = Microsoft::WRL::Make<winrt_buffer_impl>(buffer);
+ buf = reinterpret_cast<Windows::Storage::Streams::IBuffer^>(insp.Get());
+}
+
+void buffer_sequence_adapter_base::init_native_buffer(
+ buffer_sequence_adapter_base::native_buffer_type& buf,
+ const boost::asio::const_buffer& buffer)
+{
+ std::memset(&buf, 0, sizeof(native_buffer_type));
+ Microsoft::WRL::ComPtr<IInspectable> insp
+ = Microsoft::WRL::Make<winrt_buffer_impl>(buffer);
+ Platform::Object^ buf_obj = reinterpret_cast<Platform::Object^>(insp.Get());
+ buf = reinterpret_cast<Windows::Storage::Streams::IBuffer^>(insp.Get());
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_BUFFER_SEQUENCE_ADAPTER_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/descriptor_ops.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/descriptor_ops.ipp
new file mode 100644
index 00000000000..1a26e6db69a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/descriptor_ops.ipp
@@ -0,0 +1,476 @@
+//
+// detail/impl/descriptor_ops.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_DESCRIPTOR_OPS_IPP
+#define BOOST_ASIO_DETAIL_IMPL_DESCRIPTOR_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 <cerrno>
+#include <boost/asio/detail/descriptor_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace descriptor_ops {
+
+int open(const char* path, int flags, boost::system::error_code& ec)
+{
+ errno = 0;
+ int result = error_wrapper(::open(path, flags), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int close(int d, state_type& state, boost::system::error_code& ec)
+{
+ int result = 0;
+ if (d != -1)
+ {
+ errno = 0;
+ result = error_wrapper(::close(d), ec);
+
+ 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(__SYMBIAN32__)
+ int flags = ::fcntl(d, F_GETFL, 0);
+ if (flags >= 0)
+ ::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
+#else // defined(__SYMBIAN32__)
+ ioctl_arg_type arg = 0;
+ ::ioctl(d, FIONBIO, &arg);
+#endif // defined(__SYMBIAN32__)
+ state &= ~non_blocking;
+
+ errno = 0;
+ result = error_wrapper(::close(d), ec);
+ }
+ }
+
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+bool set_user_non_blocking(int d, state_type& state,
+ bool value, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return false;
+ }
+
+ errno = 0;
+#if defined(__SYMBIAN32__)
+ int result = error_wrapper(::fcntl(d, F_GETFL, 0), ec);
+ if (result >= 0)
+ {
+ errno = 0;
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = error_wrapper(::fcntl(d, F_SETFL, flag), ec);
+ }
+#else // defined(__SYMBIAN32__)
+ ioctl_arg_type arg = (value ? 1 : 0);
+ int result = error_wrapper(::ioctl(d, FIONBIO, &arg), ec);
+#endif // defined(__SYMBIAN32__)
+
+ 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(int d, state_type& state,
+ bool value, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ 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;
+ }
+
+ errno = 0;
+#if defined(__SYMBIAN32__)
+ int result = error_wrapper(::fcntl(d, F_GETFL, 0), ec);
+ if (result >= 0)
+ {
+ errno = 0;
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = error_wrapper(::fcntl(d, F_SETFL, flag), ec);
+ }
+#else // defined(__SYMBIAN32__)
+ ioctl_arg_type arg = (value ? 1 : 0);
+ int result = error_wrapper(::ioctl(d, FIONBIO, &arg), ec);
+#endif // defined(__SYMBIAN32__)
+
+ if (result >= 0)
+ {
+ ec = boost::system::error_code();
+ if (value)
+ state |= internal_non_blocking;
+ else
+ state &= ~internal_non_blocking;
+ return true;
+ }
+
+ return false;
+}
+
+std::size_t sync_read(int d, state_type state, buf* bufs,
+ std::size_t count, bool all_empty, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (all_empty)
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ errno = 0;
+ signed_size_type bytes = error_wrapper(::readv(
+ d, bufs, static_cast<int>(count)), ec);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if (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 descriptor to become ready.
+ if (descriptor_ops::poll_read(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+bool non_blocking_read(int d, buf* bufs, std::size_t count,
+ boost::system::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ errno = 0;
+ signed_size_type bytes = error_wrapper(::readv(
+ d, bufs, static_cast<int>(count)), ec);
+
+ // Check for end of stream.
+ if (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;
+ }
+}
+
+std::size_t sync_write(int d, state_type state, const buf* bufs,
+ std::size_t count, bool all_empty, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a stream is a no-op.
+ if (all_empty)
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ errno = 0;
+ signed_size_type bytes = error_wrapper(::writev(
+ d, bufs, static_cast<int>(count)), 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 descriptor to become ready.
+ if (descriptor_ops::poll_write(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+bool non_blocking_write(int d, const buf* bufs, std::size_t count,
+ boost::system::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ errno = 0;
+ signed_size_type bytes = error_wrapper(::writev(
+ d, bufs, static_cast<int>(count)), 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;
+ }
+}
+
+int ioctl(int d, state_type& state, long cmd,
+ ioctl_arg_type* arg, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return -1;
+ }
+
+ errno = 0;
+ int result = error_wrapper(::ioctl(d, cmd, arg), ec);
+
+ 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 descriptor is
+ // already in the correct state. This ensures that the underlying
+ // descriptor 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<long>(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 fcntl(int d, int cmd, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return -1;
+ }
+
+ errno = 0;
+ int result = error_wrapper(::fcntl(d, cmd), ec);
+ if (result != -1)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int fcntl(int d, int cmd, long arg, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return -1;
+ }
+
+ errno = 0;
+ int result = error_wrapper(::fcntl(d, cmd, arg), ec);
+ if (result != -1)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int poll_read(int d, state_type state, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return -1;
+ }
+
+ pollfd fds;
+ fds.fd = d;
+ fds.events = POLLIN;
+ fds.revents = 0;
+ int timeout = (state & user_set_non_blocking) ? 0 : -1;
+ errno = 0;
+ int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ 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(int d, state_type state, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return -1;
+ }
+
+ pollfd fds;
+ fds.fd = d;
+ fds.events = POLLOUT;
+ fds.revents = 0;
+ int timeout = (state & user_set_non_blocking) ? 0 : -1;
+ errno = 0;
+ int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ 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(int d, state_type state, boost::system::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return -1;
+ }
+
+ pollfd fds;
+ fds.fd = d;
+ fds.events = POLLPRI | POLLERR | POLLHUP;
+ fds.revents = 0;
+ int timeout = (state & user_set_non_blocking) ? 0 : -1;
+ errno = 0;
+ int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ 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;
+}
+
+} // namespace descriptor_ops
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_DESCRIPTOR_OPS_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.hpp
new file mode 100644
index 00000000000..87dd20ab4bd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.hpp
@@ -0,0 +1,93 @@
+//
+// detail/impl/dev_poll_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_DEV_POLL_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_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_DEV_POLL)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+void dev_poll_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void dev_poll_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void dev_poll_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ interrupter_.interrupt();
+}
+
+template <typename Time_Traits>
+std::size_t dev_poll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void dev_poll_reactor::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(target, ops);
+ queue.move_timer(target, source);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_DEV_POLL)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.ipp
new file mode 100644
index 00000000000..807741dc4d0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/dev_poll_reactor.ipp
@@ -0,0 +1,448 @@
+//
+// detail/impl/dev_poll_reactor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_DEV_POLL_REACTOR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_IPP
+
+#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_DEV_POLL)
+
+#include <boost/asio/detail/dev_poll_reactor.hpp>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+dev_poll_reactor::dev_poll_reactor(boost::asio::execution_context& ctx)
+ : boost::asio::detail::execution_context_service_base<dev_poll_reactor>(ctx),
+ scheduler_(use_service<scheduler>(ctx)),
+ mutex_(),
+ dev_poll_fd_(do_dev_poll_create()),
+ interrupter_(),
+ shutdown_(false)
+{
+ // Add the interrupter's descriptor to /dev/poll.
+ ::pollfd ev = { 0, 0, 0 };
+ ev.fd = interrupter_.read_descriptor();
+ ev.events = POLLIN | POLLERR;
+ ev.revents = 0;
+ ::write(dev_poll_fd_, &ev, sizeof(ev));
+}
+
+dev_poll_reactor::~dev_poll_reactor()
+{
+ shutdown();
+ ::close(dev_poll_fd_);
+}
+
+void dev_poll_reactor::shutdown()
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ lock.unlock();
+
+ op_queue<operation> ops;
+
+ for (int i = 0; i < max_ops; ++i)
+ op_queue_[i].get_all_operations(ops);
+
+ timer_queues_.get_all_timers(ops);
+
+ scheduler_.abandon_operations(ops);
+}
+
+void dev_poll_reactor::notify_fork(
+ boost::asio::execution_context::fork_event fork_ev)
+{
+ if (fork_ev == boost::asio::execution_context::fork_child)
+ {
+ detail::mutex::scoped_lock lock(mutex_);
+
+ if (dev_poll_fd_ != -1)
+ ::close(dev_poll_fd_);
+ dev_poll_fd_ = -1;
+ dev_poll_fd_ = do_dev_poll_create();
+
+ interrupter_.recreate();
+
+ // Add the interrupter's descriptor to /dev/poll.
+ ::pollfd ev = { 0, 0, 0 };
+ ev.fd = interrupter_.read_descriptor();
+ ev.events = POLLIN | POLLERR;
+ ev.revents = 0;
+ ::write(dev_poll_fd_, &ev, sizeof(ev));
+
+ // Re-register all descriptors with /dev/poll. The changes will be written
+ // to the /dev/poll descriptor the next time the reactor is run.
+ for (int i = 0; i < max_ops; ++i)
+ {
+ reactor_op_queue<socket_type>::iterator iter = op_queue_[i].begin();
+ reactor_op_queue<socket_type>::iterator end = op_queue_[i].end();
+ for (; iter != end; ++iter)
+ {
+ ::pollfd& pending_ev = add_pending_event_change(iter->first);
+ pending_ev.events |= POLLERR | POLLHUP;
+ switch (i)
+ {
+ case read_op: pending_ev.events |= POLLIN; break;
+ case write_op: pending_ev.events |= POLLOUT; break;
+ case except_op: pending_ev.events |= POLLPRI; break;
+ default: break;
+ }
+ }
+ }
+ interrupter_.interrupt();
+ }
+}
+
+void dev_poll_reactor::init_task()
+{
+ scheduler_.init_task();
+}
+
+int dev_poll_reactor::register_descriptor(socket_type, per_descriptor_data&)
+{
+ return 0;
+}
+
+int dev_poll_reactor::register_internal_descriptor(int op_type,
+ socket_type descriptor, per_descriptor_data&, reactor_op* op)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ op_queue_[op_type].enqueue_operation(descriptor, op);
+ ::pollfd& ev = add_pending_event_change(descriptor);
+ ev.events = POLLERR | POLLHUP;
+ switch (op_type)
+ {
+ case read_op: ev.events |= POLLIN; break;
+ case write_op: ev.events |= POLLOUT; break;
+ case except_op: ev.events |= POLLPRI; break;
+ default: break;
+ }
+ interrupter_.interrupt();
+
+ return 0;
+}
+
+void dev_poll_reactor::move_descriptor(socket_type,
+ dev_poll_reactor::per_descriptor_data&,
+ dev_poll_reactor::per_descriptor_data&)
+{
+}
+
+void dev_poll_reactor::start_op(int op_type, socket_type descriptor,
+ dev_poll_reactor::per_descriptor_data&, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (allow_speculative)
+ {
+ if (op_type != read_op || !op_queue_[except_op].has_operation(descriptor))
+ {
+ if (!op_queue_[op_type].has_operation(descriptor))
+ {
+ if (op->perform())
+ {
+ lock.unlock();
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+ }
+ }
+ }
+
+ bool first = op_queue_[op_type].enqueue_operation(descriptor, op);
+ scheduler_.work_started();
+ if (first)
+ {
+ ::pollfd& ev = add_pending_event_change(descriptor);
+ ev.events = POLLERR | POLLHUP;
+ if (op_type == read_op
+ || op_queue_[read_op].has_operation(descriptor))
+ ev.events |= POLLIN;
+ if (op_type == write_op
+ || op_queue_[write_op].has_operation(descriptor))
+ ev.events |= POLLOUT;
+ if (op_type == except_op
+ || op_queue_[except_op].has_operation(descriptor))
+ ev.events |= POLLPRI;
+ interrupter_.interrupt();
+ }
+}
+
+void dev_poll_reactor::cancel_ops(socket_type descriptor,
+ dev_poll_reactor::per_descriptor_data&)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
+}
+
+void dev_poll_reactor::deregister_descriptor(socket_type descriptor,
+ dev_poll_reactor::per_descriptor_data&, bool)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ // Remove the descriptor from /dev/poll.
+ ::pollfd& ev = add_pending_event_change(descriptor);
+ ev.events = POLLREMOVE;
+ interrupter_.interrupt();
+
+ // Cancel any outstanding operations associated with the descriptor.
+ cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
+}
+
+void dev_poll_reactor::deregister_internal_descriptor(
+ socket_type descriptor, dev_poll_reactor::per_descriptor_data&)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ // Remove the descriptor from /dev/poll. Since this function is only called
+ // during a fork, we can apply the change immediately.
+ ::pollfd ev = { 0, 0, 0 };
+ ev.fd = descriptor;
+ ev.events = POLLREMOVE;
+ ev.revents = 0;
+ ::write(dev_poll_fd_, &ev, sizeof(ev));
+
+ // Destroy all operations associated with the descriptor.
+ op_queue<operation> ops;
+ boost::system::error_code ec;
+ for (int i = 0; i < max_ops; ++i)
+ op_queue_[i].cancel_operations(descriptor, ops, ec);
+}
+
+void dev_poll_reactor::cleanup_descriptor_data(
+ dev_poll_reactor::per_descriptor_data&)
+{
+}
+
+void dev_poll_reactor::run(long usec, op_queue<operation>& ops)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ // We can return immediately if there's no work to do and the reactor is
+ // not supposed to block.
+ if (usec == 0 && op_queue_[read_op].empty() && op_queue_[write_op].empty()
+ && op_queue_[except_op].empty() && timer_queues_.all_empty())
+ return;
+
+ // Write the pending event registration changes to the /dev/poll descriptor.
+ std::size_t events_size = sizeof(::pollfd) * pending_event_changes_.size();
+ if (events_size > 0)
+ {
+ errno = 0;
+ int result = ::write(dev_poll_fd_,
+ &pending_event_changes_[0], events_size);
+ if (result != static_cast<int>(events_size))
+ {
+ boost::system::error_code ec = boost::system::error_code(
+ errno, boost::asio::error::get_system_category());
+ for (std::size_t i = 0; i < pending_event_changes_.size(); ++i)
+ {
+ int descriptor = pending_event_changes_[i].fd;
+ for (int j = 0; j < max_ops; ++j)
+ op_queue_[j].cancel_operations(descriptor, ops, ec);
+ }
+ }
+ pending_event_changes_.clear();
+ pending_event_change_index_.clear();
+ }
+
+ // Calculate timeout.
+ int timeout;
+ if (usec == 0)
+ timeout = 0;
+ else
+ {
+ timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1);
+ timeout = get_timeout(timeout);
+ }
+ lock.unlock();
+
+ // Block on the /dev/poll descriptor.
+ ::pollfd events[128] = { { 0, 0, 0 } };
+ ::dvpoll dp = { 0, 0, 0 };
+ dp.dp_fds = events;
+ dp.dp_nfds = 128;
+ dp.dp_timeout = timeout;
+ int num_events = ::ioctl(dev_poll_fd_, DP_POLL, &dp);
+
+ lock.lock();
+
+ // Dispatch the waiting events.
+ for (int i = 0; i < num_events; ++i)
+ {
+ int descriptor = events[i].fd;
+ if (descriptor == interrupter_.read_descriptor())
+ {
+ interrupter_.reset();
+ }
+ else
+ {
+ bool more_reads = false;
+ bool more_writes = false;
+ bool more_except = false;
+
+ // Exception operations must be processed first to ensure that any
+ // out-of-band data is read before normal data.
+ if (events[i].events & (POLLPRI | POLLERR | POLLHUP))
+ more_except =
+ op_queue_[except_op].perform_operations(descriptor, ops);
+ else
+ more_except = op_queue_[except_op].has_operation(descriptor);
+
+ if (events[i].events & (POLLIN | POLLERR | POLLHUP))
+ more_reads = op_queue_[read_op].perform_operations(descriptor, ops);
+ else
+ more_reads = op_queue_[read_op].has_operation(descriptor);
+
+ if (events[i].events & (POLLOUT | POLLERR | POLLHUP))
+ more_writes = op_queue_[write_op].perform_operations(descriptor, ops);
+ else
+ more_writes = op_queue_[write_op].has_operation(descriptor);
+
+ if ((events[i].events & (POLLERR | POLLHUP)) != 0
+ && !more_except && !more_reads && !more_writes)
+ {
+ // If we have an event and no operations associated with the
+ // descriptor then we need to delete the descriptor from /dev/poll.
+ // The poll operation can produce POLLHUP or POLLERR events when there
+ // is no operation pending, so if we do not remove the descriptor we
+ // can end up in a tight polling loop.
+ ::pollfd ev = { 0, 0, 0 };
+ ev.fd = descriptor;
+ ev.events = POLLREMOVE;
+ ev.revents = 0;
+ ::write(dev_poll_fd_, &ev, sizeof(ev));
+ }
+ else
+ {
+ ::pollfd ev = { 0, 0, 0 };
+ ev.fd = descriptor;
+ ev.events = POLLERR | POLLHUP;
+ if (more_reads)
+ ev.events |= POLLIN;
+ if (more_writes)
+ ev.events |= POLLOUT;
+ if (more_except)
+ ev.events |= POLLPRI;
+ ev.revents = 0;
+ int result = ::write(dev_poll_fd_, &ev, sizeof(ev));
+ if (result != sizeof(ev))
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ for (int j = 0; j < max_ops; ++j)
+ op_queue_[j].cancel_operations(descriptor, ops, ec);
+ }
+ }
+ }
+ }
+ timer_queues_.get_ready_timers(ops);
+}
+
+void dev_poll_reactor::interrupt()
+{
+ interrupter_.interrupt();
+}
+
+int dev_poll_reactor::do_dev_poll_create()
+{
+ int fd = ::open("/dev/poll", O_RDWR);
+ if (fd == -1)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "/dev/poll");
+ }
+ return fd;
+}
+
+void dev_poll_reactor::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void dev_poll_reactor::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+int dev_poll_reactor::get_timeout(int msec)
+{
+ // By default we will wait no longer than 5 minutes. This will ensure that
+ // any changes to the system clock are detected after no longer than this.
+ const int max_msec = 5 * 60 * 1000;
+ return timer_queues_.wait_duration_msec(
+ (msec < 0 || max_msec < msec) ? max_msec : msec);
+}
+
+void dev_poll_reactor::cancel_ops_unlocked(socket_type descriptor,
+ const boost::system::error_code& ec)
+{
+ bool need_interrupt = false;
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ need_interrupt = op_queue_[i].cancel_operations(
+ descriptor, ops, ec) || need_interrupt;
+ scheduler_.post_deferred_completions(ops);
+ if (need_interrupt)
+ interrupter_.interrupt();
+}
+
+::pollfd& dev_poll_reactor::add_pending_event_change(int descriptor)
+{
+ hash_map<int, std::size_t>::iterator iter
+ = pending_event_change_index_.find(descriptor);
+ if (iter == pending_event_change_index_.end())
+ {
+ std::size_t index = pending_event_changes_.size();
+ pending_event_changes_.reserve(pending_event_changes_.size() + 1);
+ pending_event_change_index_.insert(std::make_pair(descriptor, index));
+ pending_event_changes_.push_back(::pollfd());
+ pending_event_changes_[index].fd = descriptor;
+ pending_event_changes_[index].revents = 0;
+ return pending_event_changes_[index];
+ }
+ else
+ {
+ return pending_event_changes_[iter->second];
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_DEV_POLL)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_DEV_POLL_REACTOR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.hpp
new file mode 100644
index 00000000000..15968a30b33
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.hpp
@@ -0,0 +1,91 @@
+//
+// detail/impl/epoll_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_EPOLL_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if defined(BOOST_ASIO_HAS_EPOLL)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+void epoll_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void epoll_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void epoll_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ update_timeout();
+}
+
+template <typename Time_Traits>
+std::size_t epoll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void epoll_reactor::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(target, ops);
+ queue.move_timer(target, source);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_EPOLL)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.ipp
new file mode 100644
index 00000000000..b1e1b39d054
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/epoll_reactor.ipp
@@ -0,0 +1,789 @@
+//
+// detail/impl/epoll_reactor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_EPOLL_REACTOR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
+
+#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_EPOLL)
+
+#include <cstddef>
+#include <sys/epoll.h>
+#include <boost/asio/detail/epoll_reactor.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+# include <sys/timerfd.h>
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+epoll_reactor::epoll_reactor(boost::asio::execution_context& ctx)
+ : execution_context_service_base<epoll_reactor>(ctx),
+ scheduler_(use_service<scheduler>(ctx)),
+ mutex_(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
+ interrupter_(),
+ epoll_fd_(do_epoll_create()),
+ timer_fd_(do_timerfd_create()),
+ shutdown_(false),
+ registered_descriptors_mutex_(mutex_.enabled())
+{
+ // Add the interrupter's descriptor to epoll.
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLET;
+ ev.data.ptr = &interrupter_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev);
+ interrupter_.interrupt();
+
+ // Add the timer descriptor to epoll.
+ if (timer_fd_ != -1)
+ {
+ ev.events = EPOLLIN | EPOLLERR;
+ ev.data.ptr = &timer_fd_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev);
+ }
+}
+
+epoll_reactor::~epoll_reactor()
+{
+ if (epoll_fd_ != -1)
+ close(epoll_fd_);
+ if (timer_fd_ != -1)
+ close(timer_fd_);
+}
+
+void epoll_reactor::shutdown()
+{
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ lock.unlock();
+
+ op_queue<operation> ops;
+
+ while (descriptor_state* state = registered_descriptors_.first())
+ {
+ for (int i = 0; i < max_ops; ++i)
+ ops.push(state->op_queue_[i]);
+ state->shutdown_ = true;
+ registered_descriptors_.free(state);
+ }
+
+ timer_queues_.get_all_timers(ops);
+
+ scheduler_.abandon_operations(ops);
+}
+
+void epoll_reactor::notify_fork(
+ boost::asio::execution_context::fork_event fork_ev)
+{
+ if (fork_ev == boost::asio::execution_context::fork_child)
+ {
+ if (epoll_fd_ != -1)
+ ::close(epoll_fd_);
+ epoll_fd_ = -1;
+ epoll_fd_ = do_epoll_create();
+
+ if (timer_fd_ != -1)
+ ::close(timer_fd_);
+ timer_fd_ = -1;
+ timer_fd_ = do_timerfd_create();
+
+ interrupter_.recreate();
+
+ // Add the interrupter's descriptor to epoll.
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLET;
+ ev.data.ptr = &interrupter_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev);
+ interrupter_.interrupt();
+
+ // Add the timer descriptor to epoll.
+ if (timer_fd_ != -1)
+ {
+ ev.events = EPOLLIN | EPOLLERR;
+ ev.data.ptr = &timer_fd_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev);
+ }
+
+ update_timeout();
+
+ // Re-register all descriptors with epoll.
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ for (descriptor_state* state = registered_descriptors_.first();
+ state != 0; state = state->next_)
+ {
+ ev.events = state->registered_events_;
+ ev.data.ptr = state;
+ int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, state->descriptor_, &ev);
+ if (result != 0)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "epoll re-registration");
+ }
+ }
+ }
+}
+
+void epoll_reactor::init_task()
+{
+ scheduler_.init_task();
+}
+
+int epoll_reactor::register_descriptor(socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data)
+{
+ descriptor_data = allocate_descriptor_state();
+
+ BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ {
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ descriptor_data->reactor_ = this;
+ descriptor_data->descriptor_ = descriptor;
+ descriptor_data->shutdown_ = false;
+ for (int i = 0; i < max_ops; ++i)
+ descriptor_data->try_speculative_[i] = true;
+ }
+
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET;
+ descriptor_data->registered_events_ = ev.events;
+ ev.data.ptr = descriptor_data;
+ int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
+ if (result != 0)
+ {
+ if (errno == EPERM)
+ {
+ // This file descriptor type is not supported by epoll. However, if it is
+ // a regular file then operations on it will not block. We will allow
+ // this descriptor to be used and fail later if an operation on it would
+ // otherwise require a trip through the reactor.
+ descriptor_data->registered_events_ = 0;
+ return 0;
+ }
+ return errno;
+ }
+
+ return 0;
+}
+
+int epoll_reactor::register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op)
+{
+ descriptor_data = allocate_descriptor_state();
+
+ BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ {
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ descriptor_data->reactor_ = this;
+ descriptor_data->descriptor_ = descriptor;
+ descriptor_data->shutdown_ = false;
+ descriptor_data->op_queue_[op_type].push(op);
+ for (int i = 0; i < max_ops; ++i)
+ descriptor_data->try_speculative_[i] = true;
+ }
+
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET;
+ descriptor_data->registered_events_ = ev.events;
+ ev.data.ptr = descriptor_data;
+ int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
+ if (result != 0)
+ return errno;
+
+ return 0;
+}
+
+void epoll_reactor::move_descriptor(socket_type,
+ epoll_reactor::per_descriptor_data& target_descriptor_data,
+ epoll_reactor::per_descriptor_data& source_descriptor_data)
+{
+ target_descriptor_data = source_descriptor_data;
+ source_descriptor_data = 0;
+}
+
+void epoll_reactor::start_op(int op_type, socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+{
+ if (!descriptor_data)
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (descriptor_data->shutdown_)
+ {
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (descriptor_data->op_queue_[op_type].empty())
+ {
+ if (allow_speculative
+ && (op_type != read_op
+ || descriptor_data->op_queue_[except_op].empty()))
+ {
+ if (descriptor_data->try_speculative_[op_type])
+ {
+ if (reactor_op::status status = op->perform())
+ {
+ if (status == reactor_op::done_and_exhausted)
+ if (descriptor_data->registered_events_ != 0)
+ descriptor_data->try_speculative_[op_type] = false;
+ descriptor_lock.unlock();
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+ }
+
+ if (descriptor_data->registered_events_ == 0)
+ {
+ op->ec_ = boost::asio::error::operation_not_supported;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (op_type == write_op)
+ {
+ if ((descriptor_data->registered_events_ & EPOLLOUT) == 0)
+ {
+ epoll_event ev = { 0, { 0 } };
+ ev.events = descriptor_data->registered_events_ | EPOLLOUT;
+ ev.data.ptr = descriptor_data;
+ if (epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev) == 0)
+ {
+ descriptor_data->registered_events_ |= ev.events;
+ }
+ else
+ {
+ op->ec_ = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+ }
+ }
+ }
+ else if (descriptor_data->registered_events_ == 0)
+ {
+ op->ec_ = boost::asio::error::operation_not_supported;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+ else
+ {
+ if (op_type == write_op)
+ {
+ descriptor_data->registered_events_ |= EPOLLOUT;
+ }
+
+ epoll_event ev = { 0, { 0 } };
+ ev.events = descriptor_data->registered_events_;
+ ev.data.ptr = descriptor_data;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
+ }
+ }
+
+ descriptor_data->op_queue_[op_type].push(op);
+ scheduler_.work_started();
+}
+
+void epoll_reactor::cancel_ops(socket_type,
+ epoll_reactor::per_descriptor_data& descriptor_data)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[i].front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ descriptor_data->op_queue_[i].pop();
+ ops.push(op);
+ }
+ }
+
+ descriptor_lock.unlock();
+
+ scheduler_.post_deferred_completions(ops);
+}
+
+void epoll_reactor::deregister_descriptor(socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data, bool closing)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (!descriptor_data->shutdown_)
+ {
+ if (closing)
+ {
+ // The descriptor will be automatically removed from the epoll set when
+ // it is closed.
+ }
+ else if (descriptor_data->registered_events_ != 0)
+ {
+ epoll_event ev = { 0, { 0 } };
+ epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
+ }
+
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[i].front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ descriptor_data->op_queue_[i].pop();
+ ops.push(op);
+ }
+ }
+
+ descriptor_data->descriptor_ = -1;
+ descriptor_data->shutdown_ = true;
+
+ descriptor_lock.unlock();
+
+ BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ scheduler_.post_deferred_completions(ops);
+
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
+ }
+}
+
+void epoll_reactor::deregister_internal_descriptor(socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (!descriptor_data->shutdown_)
+ {
+ epoll_event ev = { 0, { 0 } };
+ epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
+
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ ops.push(descriptor_data->op_queue_[i]);
+
+ descriptor_data->descriptor_ = -1;
+ descriptor_data->shutdown_ = true;
+
+ descriptor_lock.unlock();
+
+ BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
+ }
+}
+
+void epoll_reactor::cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data)
+{
+ if (descriptor_data)
+ {
+ free_descriptor_state(descriptor_data);
+ descriptor_data = 0;
+ }
+}
+
+void epoll_reactor::run(long usec, op_queue<operation>& ops)
+{
+ // This code relies on the fact that the scheduler queues the reactor task
+ // behind all descriptor operations generated by this function. This means,
+ // that by the time we reach this point, any previously returned descriptor
+ // operations have already been dequeued. Therefore it is now safe for us to
+ // reuse and return them for the scheduler to queue again.
+
+ // Calculate timeout. Check the timer queues only if timerfd is not in use.
+ int timeout;
+ if (usec == 0)
+ timeout = 0;
+ else
+ {
+ timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1);
+ if (timer_fd_ == -1)
+ {
+ mutex::scoped_lock lock(mutex_);
+ timeout = get_timeout(timeout);
+ }
+ }
+
+ // Block on the epoll descriptor.
+ epoll_event events[128];
+ int num_events = epoll_wait(epoll_fd_, events, 128, timeout);
+
+#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+ // Trace the waiting events.
+ for (int i = 0; i < num_events; ++i)
+ {
+ void* ptr = events[i].data.ptr;
+ if (ptr == &interrupter_)
+ {
+ // Ignore.
+ }
+# if defined(BOOST_ASIO_HAS_TIMERFD)
+ else if (ptr == &timer_fd_)
+ {
+ // Ignore.
+ }
+# endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ else
+ {
+ unsigned event_mask = 0;
+ if ((events[i].events & EPOLLIN) != 0)
+ event_mask |= BOOST_ASIO_HANDLER_REACTOR_READ_EVENT;
+ if ((events[i].events & EPOLLOUT))
+ event_mask |= BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT;
+ if ((events[i].events & (EPOLLERR | EPOLLHUP)) != 0)
+ event_mask |= BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT;
+ BOOST_ASIO_HANDLER_REACTOR_EVENTS((context(),
+ reinterpret_cast<uintmax_t>(ptr), event_mask));
+ }
+ }
+#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ bool check_timers = (timer_fd_ == -1);
+#else // defined(BOOST_ASIO_HAS_TIMERFD)
+ bool check_timers = true;
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+ // Dispatch the waiting events.
+ for (int i = 0; i < num_events; ++i)
+ {
+ void* ptr = events[i].data.ptr;
+ if (ptr == &interrupter_)
+ {
+ // No need to reset the interrupter since we're leaving the descriptor
+ // in a ready-to-read state and relying on edge-triggered notifications
+ // to make it so that we only get woken up when the descriptor's epoll
+ // registration is updated.
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ if (timer_fd_ == -1)
+ check_timers = true;
+#else // defined(BOOST_ASIO_HAS_TIMERFD)
+ check_timers = true;
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ }
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ else if (ptr == &timer_fd_)
+ {
+ check_timers = true;
+ }
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ else
+ {
+ // The descriptor operation doesn't count as work in and of itself, so we
+ // don't call work_started() here. This still allows the scheduler to
+ // stop if the only remaining operations are descriptor operations.
+ descriptor_state* descriptor_data = static_cast<descriptor_state*>(ptr);
+ if (!ops.is_enqueued(descriptor_data))
+ {
+ descriptor_data->set_ready_events(events[i].events);
+ ops.push(descriptor_data);
+ }
+ else
+ {
+ descriptor_data->add_ready_events(events[i].events);
+ }
+ }
+ }
+
+ if (check_timers)
+ {
+ mutex::scoped_lock common_lock(mutex_);
+ timer_queues_.get_ready_timers(ops);
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ if (timer_fd_ != -1)
+ {
+ itimerspec new_timeout;
+ itimerspec old_timeout;
+ int flags = get_timeout(new_timeout);
+ timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout);
+ }
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ }
+}
+
+void epoll_reactor::interrupt()
+{
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLET;
+ ev.data.ptr = &interrupter_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, interrupter_.read_descriptor(), &ev);
+}
+
+int epoll_reactor::do_epoll_create()
+{
+#if defined(EPOLL_CLOEXEC)
+ int fd = epoll_create1(EPOLL_CLOEXEC);
+#else // defined(EPOLL_CLOEXEC)
+ int fd = -1;
+ errno = EINVAL;
+#endif // defined(EPOLL_CLOEXEC)
+
+ if (fd == -1 && (errno == EINVAL || errno == ENOSYS))
+ {
+ fd = epoll_create(epoll_size);
+ if (fd != -1)
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+ }
+
+ if (fd == -1)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "epoll");
+ }
+
+ return fd;
+}
+
+int epoll_reactor::do_timerfd_create()
+{
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+# if defined(TFD_CLOEXEC)
+ int fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
+# else // defined(TFD_CLOEXEC)
+ int fd = -1;
+ errno = EINVAL;
+# endif // defined(TFD_CLOEXEC)
+
+ if (fd == -1 && errno == EINVAL)
+ {
+ fd = timerfd_create(CLOCK_MONOTONIC, 0);
+ if (fd != -1)
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+ }
+
+ return fd;
+#else // defined(BOOST_ASIO_HAS_TIMERFD)
+ return -1;
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+}
+
+epoll_reactor::descriptor_state* epoll_reactor::allocate_descriptor_state()
+{
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ return registered_descriptors_.alloc(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, scheduler_.concurrency_hint()));
+}
+
+void epoll_reactor::free_descriptor_state(epoll_reactor::descriptor_state* s)
+{
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ registered_descriptors_.free(s);
+}
+
+void epoll_reactor::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void epoll_reactor::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+void epoll_reactor::update_timeout()
+{
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ if (timer_fd_ != -1)
+ {
+ itimerspec new_timeout;
+ itimerspec old_timeout;
+ int flags = get_timeout(new_timeout);
+ timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout);
+ return;
+ }
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ interrupt();
+}
+
+int epoll_reactor::get_timeout(int msec)
+{
+ // By default we will wait no longer than 5 minutes. This will ensure that
+ // any changes to the system clock are detected after no longer than this.
+ const int max_msec = 5 * 60 * 1000;
+ return timer_queues_.wait_duration_msec(
+ (msec < 0 || max_msec < msec) ? max_msec : msec);
+}
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+int epoll_reactor::get_timeout(itimerspec& ts)
+{
+ ts.it_interval.tv_sec = 0;
+ ts.it_interval.tv_nsec = 0;
+
+ long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
+ ts.it_value.tv_sec = usec / 1000000;
+ ts.it_value.tv_nsec = usec ? (usec % 1000000) * 1000 : 1;
+
+ return usec ? 0 : TFD_TIMER_ABSTIME;
+}
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+struct epoll_reactor::perform_io_cleanup_on_block_exit
+{
+ explicit perform_io_cleanup_on_block_exit(epoll_reactor* r)
+ : reactor_(r), first_op_(0)
+ {
+ }
+
+ ~perform_io_cleanup_on_block_exit()
+ {
+ if (first_op_)
+ {
+ // Post the remaining completed operations for invocation.
+ if (!ops_.empty())
+ reactor_->scheduler_.post_deferred_completions(ops_);
+
+ // A user-initiated operation has completed, but there's no need to
+ // explicitly call work_finished() here. Instead, we'll take advantage of
+ // the fact that the scheduler will call work_finished() once we return.
+ }
+ else
+ {
+ // No user-initiated operations have completed, so we need to compensate
+ // for the work_finished() call that the scheduler will make once this
+ // operation returns.
+ reactor_->scheduler_.compensating_work_started();
+ }
+ }
+
+ epoll_reactor* reactor_;
+ op_queue<operation> ops_;
+ operation* first_op_;
+};
+
+epoll_reactor::descriptor_state::descriptor_state(bool locking)
+ : operation(&epoll_reactor::descriptor_state::do_complete),
+ mutex_(locking)
+{
+}
+
+operation* epoll_reactor::descriptor_state::perform_io(uint32_t events)
+{
+ mutex_.lock();
+ perform_io_cleanup_on_block_exit io_cleanup(reactor_);
+ mutex::scoped_lock descriptor_lock(mutex_, mutex::scoped_lock::adopt_lock);
+
+ // Exception operations must be processed first to ensure that any
+ // out-of-band data is read before normal data.
+ static const int flag[max_ops] = { EPOLLIN, EPOLLOUT, EPOLLPRI };
+ for (int j = max_ops - 1; j >= 0; --j)
+ {
+ if (events & (flag[j] | EPOLLERR | EPOLLHUP))
+ {
+ try_speculative_[j] = true;
+ while (reactor_op* op = op_queue_[j].front())
+ {
+ if (reactor_op::status status = op->perform())
+ {
+ op_queue_[j].pop();
+ io_cleanup.ops_.push(op);
+ if (status == reactor_op::done_and_exhausted)
+ {
+ try_speculative_[j] = false;
+ break;
+ }
+ }
+ else
+ break;
+ }
+ }
+ }
+
+ // The first operation will be returned for completion now. The others will
+ // be posted for later by the io_cleanup object's destructor.
+ io_cleanup.first_op_ = io_cleanup.ops_.front();
+ io_cleanup.ops_.pop();
+ return io_cleanup.first_op_;
+}
+
+void epoll_reactor::descriptor_state::do_complete(
+ void* owner, operation* base,
+ const boost::system::error_code& ec, std::size_t bytes_transferred)
+{
+ if (owner)
+ {
+ descriptor_state* descriptor_data = static_cast<descriptor_state*>(base);
+ uint32_t events = static_cast<uint32_t>(bytes_transferred);
+ if (operation* op = descriptor_data->perform_io(events))
+ {
+ op->complete(owner, ec, 0);
+ }
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_EPOLL)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp
new file mode 100644
index 00000000000..38d4b2a61d2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp
@@ -0,0 +1,167 @@
+//
+// detail/impl/eventfd_select_interrupter.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail 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_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP
+#define BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP
+
+#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_EVENTFD)
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+# include <asm/unistd.h>
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+# include <sys/eventfd.h>
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/detail/eventfd_select_interrupter.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+eventfd_select_interrupter::eventfd_select_interrupter()
+{
+ open_descriptors();
+}
+
+void eventfd_select_interrupter::open_descriptors()
+{
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+ write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+ if (read_descriptor_ != -1)
+ {
+ ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ write_descriptor_ = read_descriptor_ =
+ ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+# else // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ errno = EINVAL;
+ write_descriptor_ = read_descriptor_ = -1;
+# endif // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ if (read_descriptor_ == -1 && errno == EINVAL)
+ {
+ write_descriptor_ = read_descriptor_ = ::eventfd(0, 0);
+ if (read_descriptor_ != -1)
+ {
+ ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+ }
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+
+ if (read_descriptor_ == -1)
+ {
+ int pipe_fds[2];
+ if (pipe(pipe_fds) == 0)
+ {
+ read_descriptor_ = pipe_fds[0];
+ ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ write_descriptor_ = pipe_fds[1];
+ ::fcntl(write_descriptor_, F_SETFL, O_NONBLOCK);
+ ::fcntl(write_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+ else
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "eventfd_select_interrupter");
+ }
+ }
+}
+
+eventfd_select_interrupter::~eventfd_select_interrupter()
+{
+ close_descriptors();
+}
+
+void eventfd_select_interrupter::close_descriptors()
+{
+ if (write_descriptor_ != -1 && write_descriptor_ != read_descriptor_)
+ ::close(write_descriptor_);
+ if (read_descriptor_ != -1)
+ ::close(read_descriptor_);
+}
+
+void eventfd_select_interrupter::recreate()
+{
+ close_descriptors();
+
+ write_descriptor_ = -1;
+ read_descriptor_ = -1;
+
+ open_descriptors();
+}
+
+void eventfd_select_interrupter::interrupt()
+{
+ uint64_t counter(1UL);
+ int result = ::write(write_descriptor_, &counter, sizeof(uint64_t));
+ (void)result;
+}
+
+bool eventfd_select_interrupter::reset()
+{
+ if (write_descriptor_ == read_descriptor_)
+ {
+ for (;;)
+ {
+ // Only perform one read. The kernel maintains an atomic counter.
+ uint64_t counter(0);
+ errno = 0;
+ int bytes_read = ::read(read_descriptor_, &counter, sizeof(uint64_t));
+ if (bytes_read < 0 && errno == EINTR)
+ continue;
+ bool was_interrupted = (bytes_read > 0);
+ return was_interrupted;
+ }
+ }
+ else
+ {
+ for (;;)
+ {
+ // Clear all data from the pipe.
+ char data[1024];
+ int bytes_read = ::read(read_descriptor_, data, sizeof(data));
+ if (bytes_read < 0 && errno == EINTR)
+ continue;
+ bool was_interrupted = (bytes_read > 0);
+ while (bytes_read == sizeof(data))
+ bytes_read = ::read(read_descriptor_, data, sizeof(data));
+ return was_interrupted;
+ }
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_EVENTFD)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/handler_tracking.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/handler_tracking.ipp
new file mode 100644
index 00000000000..c873a50987c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/handler_tracking.ipp
@@ -0,0 +1,360 @@
+//
+// detail/impl/handler_tracking.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_HANDLER_TRACKING_IPP
+#define BOOST_ASIO_DETAIL_IMPL_HANDLER_TRACKING_IPP
+
+#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_CUSTOM_HANDLER_TRACKING)
+
+// The handler tracking implementation is provided by the user-specified header.
+
+#elif defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+#include <cstdarg>
+#include <cstdio>
+#include <boost/asio/detail/handler_tracking.hpp>
+
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+# include <boost/asio/time_traits.hpp>
+#elif defined(BOOST_ASIO_HAS_CHRONO)
+# include <boost/asio/detail/chrono.hpp>
+# include <boost/asio/detail/chrono_time_traits.hpp>
+# include <boost/asio/wait_traits.hpp>
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/socket_types.hpp>
+#elif !defined(BOOST_ASIO_WINDOWS)
+# include <unistd.h>
+#endif // !defined(BOOST_ASIO_WINDOWS)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct handler_tracking_timestamp
+{
+ uint64_t seconds;
+ uint64_t microseconds;
+
+ handler_tracking_timestamp()
+ {
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ boost::posix_time::ptime epoch(boost::gregorian::date(1970, 1, 1));
+ boost::posix_time::time_duration now =
+ boost::posix_time::microsec_clock::universal_time() - epoch;
+#elif defined(BOOST_ASIO_HAS_CHRONO)
+ typedef chrono_time_traits<chrono::system_clock,
+ boost::asio::wait_traits<chrono::system_clock> > traits_helper;
+ traits_helper::posix_time_duration now(
+ chrono::system_clock::now().time_since_epoch());
+#endif
+ seconds = static_cast<uint64_t>(now.total_seconds());
+ microseconds = static_cast<uint64_t>(now.total_microseconds() % 1000000);
+ }
+};
+
+struct handler_tracking::tracking_state
+{
+ static_mutex mutex_;
+ uint64_t next_id_;
+ tss_ptr<completion>* current_completion_;
+};
+
+handler_tracking::tracking_state* handler_tracking::get_state()
+{
+ static tracking_state state = { BOOST_ASIO_STATIC_MUTEX_INIT, 1, 0 };
+ return &state;
+}
+
+void handler_tracking::init()
+{
+ static tracking_state* state = get_state();
+
+ state->mutex_.init();
+
+ static_mutex::scoped_lock lock(state->mutex_);
+ if (state->current_completion_ == 0)
+ state->current_completion_ = new tss_ptr<completion>;
+}
+
+void handler_tracking::creation(execution_context&,
+ handler_tracking::tracked_handler& h,
+ const char* object_type, void* object,
+ uintmax_t /*native_handle*/, const char* op_name)
+{
+ static tracking_state* state = get_state();
+
+ static_mutex::scoped_lock lock(state->mutex_);
+ h.id_ = state->next_id_++;
+ lock.unlock();
+
+ handler_tracking_timestamp timestamp;
+
+ uint64_t current_id = 0;
+ if (completion* current_completion = *state->current_completion_)
+ current_id = current_completion->id_;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|%I64u*%I64u|%.20s@%p.%.50s\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|%llu*%llu|%.20s@%p.%.50s\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ current_id, h.id_, object_type, object, op_name);
+}
+
+handler_tracking::completion::completion(
+ const handler_tracking::tracked_handler& h)
+ : id_(h.id_),
+ invoked_(false),
+ next_(*get_state()->current_completion_)
+{
+ *get_state()->current_completion_ = this;
+}
+
+handler_tracking::completion::~completion()
+{
+ if (id_)
+ {
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|%c%I64u|\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|%c%llu|\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ invoked_ ? '!' : '~', id_);
+ }
+
+ *get_state()->current_completion_ = next_;
+}
+
+void handler_tracking::completion::invocation_begin()
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|>%I64u|\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|>%llu|\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds, id_);
+
+ invoked_ = true;
+}
+
+void handler_tracking::completion::invocation_begin(
+ const boost::system::error_code& ec)
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|>%llu|ec=%.20s:%d\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ id_, ec.category().name(), ec.value());
+
+ invoked_ = true;
+}
+
+void handler_tracking::completion::invocation_begin(
+ const boost::system::error_code& ec, std::size_t bytes_transferred)
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d,bytes_transferred=%I64u\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|>%llu|ec=%.20s:%d,bytes_transferred=%llu\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ id_, ec.category().name(), ec.value(),
+ static_cast<uint64_t>(bytes_transferred));
+
+ invoked_ = true;
+}
+
+void handler_tracking::completion::invocation_begin(
+ const boost::system::error_code& ec, int signal_number)
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d,signal_number=%d\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|>%llu|ec=%.20s:%d,signal_number=%d\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ id_, ec.category().name(), ec.value(), signal_number);
+
+ invoked_ = true;
+}
+
+void handler_tracking::completion::invocation_begin(
+ const boost::system::error_code& ec, const char* arg)
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|>%I64u|ec=%.20s:%d,%.50s\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|>%llu|ec=%.20s:%d,%.50s\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ id_, ec.category().name(), ec.value(), arg);
+
+ invoked_ = true;
+}
+
+void handler_tracking::completion::invocation_end()
+{
+ if (id_)
+ {
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|<%I64u|\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|<%llu|\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds, id_);
+
+ id_ = 0;
+ }
+}
+
+void handler_tracking::operation(execution_context&,
+ const char* object_type, void* object,
+ uintmax_t /*native_handle*/, const char* op_name)
+{
+ static tracking_state* state = get_state();
+
+ handler_tracking_timestamp timestamp;
+
+ unsigned long long current_id = 0;
+ if (completion* current_completion = *state->current_completion_)
+ current_id = current_completion->id_;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|%I64u|%.20s@%p.%.50s\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|%llu|%.20s@%p.%.50s\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ current_id, object_type, object, op_name);
+}
+
+void handler_tracking::reactor_registration(execution_context& /*context*/,
+ uintmax_t /*native_handle*/, uintmax_t /*registration*/)
+{
+}
+
+void handler_tracking::reactor_deregistration(execution_context& /*context*/,
+ uintmax_t /*native_handle*/, uintmax_t /*registration*/)
+{
+}
+
+void handler_tracking::reactor_events(execution_context& /*context*/,
+ uintmax_t /*native_handle*/, unsigned /*events*/)
+{
+}
+
+void handler_tracking::reactor_operation(
+ const tracked_handler& h, const char* op_name,
+ const boost::system::error_code& ec)
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|.%I64u|%s,ec=%.20s:%d\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|.%llu|%s,ec=%.20s:%d\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ h.id_, op_name, ec.category().name(), ec.value());
+}
+
+void handler_tracking::reactor_operation(
+ const tracked_handler& h, const char* op_name,
+ const boost::system::error_code& ec, std::size_t bytes_transferred)
+{
+ handler_tracking_timestamp timestamp;
+
+ write_line(
+#if defined(BOOST_ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|.%I64u|%s,ec=%.20s:%d,bytes_transferred=%I64u\n",
+#else // defined(BOOST_ASIO_WINDOWS)
+ "@asio|%llu.%06llu|.%llu|%s,ec=%.20s:%d,bytes_transferred=%llu\n",
+#endif // defined(BOOST_ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ h.id_, op_name, ec.category().name(), ec.value(),
+ static_cast<uint64_t>(bytes_transferred));
+}
+
+void handler_tracking::write_line(const char* format, ...)
+{
+ using namespace std; // For sprintf (or equivalent).
+
+ va_list args;
+ va_start(args, format);
+
+ char line[256] = "";
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ int length = vsprintf_s(line, sizeof(line), format, args);
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ int length = vsprintf(line, format, args);
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+
+ va_end(args);
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ wchar_t wline[256] = L"";
+ mbstowcs_s(0, wline, sizeof(wline) / sizeof(wchar_t), line, length);
+ ::OutputDebugStringW(wline);
+#elif defined(BOOST_ASIO_WINDOWS)
+ HANDLE stderr_handle = ::GetStdHandle(STD_ERROR_HANDLE);
+ DWORD bytes_written = 0;
+ ::WriteFile(stderr_handle, line, length, &bytes_written, 0);
+#else // defined(BOOST_ASIO_WINDOWS)
+ ::write(STDERR_FILENO, line, length);
+#endif // defined(BOOST_ASIO_WINDOWS)
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_HANDLER_TRACKING_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.hpp
new file mode 100644
index 00000000000..f4dd174fdc4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.hpp
@@ -0,0 +1,95 @@
+//
+// detail/impl/kqueue_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005 Stefan Arentz (stefan at soze 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_IMPL_KQUEUE_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_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_KQUEUE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+void kqueue_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+// Remove a timer queue from the reactor.
+template <typename Time_Traits>
+void kqueue_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void kqueue_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ interrupt();
+}
+
+template <typename Time_Traits>
+std::size_t kqueue_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void kqueue_reactor::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(target, ops);
+ queue.move_timer(target, source);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_KQUEUE)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.ipp
new file mode 100644
index 00000000000..02475aaa364
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/kqueue_reactor.ipp
@@ -0,0 +1,568 @@
+//
+// detail/impl/kqueue_reactor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005 Stefan Arentz (stefan at soze 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_IMPL_KQUEUE_REACTOR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_IPP
+
+#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_KQUEUE)
+
+#include <boost/asio/detail/kqueue_reactor.hpp>
+#include <boost/asio/detail/scheduler.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+#if defined(__NetBSD__)
+# define BOOST_ASIO_KQUEUE_EV_SET(ev, ident, filt, flags, fflags, data, udata) \
+ EV_SET(ev, ident, filt, flags, fflags, data, \
+ reinterpret_cast<intptr_t>(static_cast<void*>(udata)))
+#else
+# define BOOST_ASIO_KQUEUE_EV_SET(ev, ident, filt, flags, fflags, data, udata) \
+ EV_SET(ev, ident, filt, flags, fflags, data, udata)
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+kqueue_reactor::kqueue_reactor(boost::asio::execution_context& ctx)
+ : execution_context_service_base<kqueue_reactor>(ctx),
+ scheduler_(use_service<scheduler>(ctx)),
+ mutex_(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
+ kqueue_fd_(do_kqueue_create()),
+ interrupter_(),
+ shutdown_(false),
+ registered_descriptors_mutex_(mutex_.enabled())
+{
+ struct kevent events[1];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], interrupter_.read_descriptor(),
+ EVFILT_READ, EV_ADD, 0, 0, &interrupter_);
+ if (::kevent(kqueue_fd_, events, 1, 0, 0, 0) == -1)
+ {
+ boost::system::error_code error(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(error);
+ }
+}
+
+kqueue_reactor::~kqueue_reactor()
+{
+ close(kqueue_fd_);
+}
+
+void kqueue_reactor::shutdown()
+{
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ lock.unlock();
+
+ op_queue<operation> ops;
+
+ while (descriptor_state* state = registered_descriptors_.first())
+ {
+ for (int i = 0; i < max_ops; ++i)
+ ops.push(state->op_queue_[i]);
+ state->shutdown_ = true;
+ registered_descriptors_.free(state);
+ }
+
+ timer_queues_.get_all_timers(ops);
+
+ scheduler_.abandon_operations(ops);
+}
+
+void kqueue_reactor::notify_fork(
+ boost::asio::execution_context::fork_event fork_ev)
+{
+ if (fork_ev == boost::asio::execution_context::fork_child)
+ {
+ // The kqueue descriptor is automatically closed in the child.
+ kqueue_fd_ = -1;
+ kqueue_fd_ = do_kqueue_create();
+
+ interrupter_.recreate();
+
+ struct kevent events[2];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], interrupter_.read_descriptor(),
+ EVFILT_READ, EV_ADD, 0, 0, &interrupter_);
+ if (::kevent(kqueue_fd_, events, 1, 0, 0, 0) == -1)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "kqueue interrupter registration");
+ }
+
+ // Re-register all descriptors with kqueue.
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ for (descriptor_state* state = registered_descriptors_.first();
+ state != 0; state = state->next_)
+ {
+ if (state->num_kevents_ > 0)
+ {
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], state->descriptor_,
+ EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, state);
+ BOOST_ASIO_KQUEUE_EV_SET(&events[1], state->descriptor_,
+ EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, state);
+ if (::kevent(kqueue_fd_, events, state->num_kevents_, 0, 0, 0) == -1)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "kqueue re-registration");
+ }
+ }
+ }
+ }
+}
+
+void kqueue_reactor::init_task()
+{
+ scheduler_.init_task();
+}
+
+int kqueue_reactor::register_descriptor(socket_type descriptor,
+ kqueue_reactor::per_descriptor_data& descriptor_data)
+{
+ descriptor_data = allocate_descriptor_state();
+
+ BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ mutex::scoped_lock lock(descriptor_data->mutex_);
+
+ descriptor_data->descriptor_ = descriptor;
+ descriptor_data->num_kevents_ = 0;
+ descriptor_data->shutdown_ = false;
+
+ return 0;
+}
+
+int kqueue_reactor::register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ kqueue_reactor::per_descriptor_data& descriptor_data, reactor_op* op)
+{
+ descriptor_data = allocate_descriptor_state();
+
+ BOOST_ASIO_HANDLER_REACTOR_REGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ mutex::scoped_lock lock(descriptor_data->mutex_);
+
+ descriptor_data->descriptor_ = descriptor;
+ descriptor_data->num_kevents_ = 1;
+ descriptor_data->shutdown_ = false;
+ descriptor_data->op_queue_[op_type].push(op);
+
+ struct kevent events[1];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor, EVFILT_READ,
+ EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
+ if (::kevent(kqueue_fd_, events, 1, 0, 0, 0) == -1)
+ return errno;
+
+ return 0;
+}
+
+void kqueue_reactor::move_descriptor(socket_type,
+ kqueue_reactor::per_descriptor_data& target_descriptor_data,
+ kqueue_reactor::per_descriptor_data& source_descriptor_data)
+{
+ target_descriptor_data = source_descriptor_data;
+ source_descriptor_data = 0;
+}
+
+void kqueue_reactor::start_op(int op_type, socket_type descriptor,
+ kqueue_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+{
+ if (!descriptor_data)
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (descriptor_data->shutdown_)
+ {
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (descriptor_data->op_queue_[op_type].empty())
+ {
+ static const int num_kevents[max_ops] = { 1, 2, 1 };
+
+ if (allow_speculative
+ && (op_type != read_op
+ || descriptor_data->op_queue_[except_op].empty()))
+ {
+ if (op->perform())
+ {
+ descriptor_lock.unlock();
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (descriptor_data->num_kevents_ < num_kevents[op_type])
+ {
+ struct kevent events[2];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor, EVFILT_READ,
+ EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
+ BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor, EVFILT_WRITE,
+ EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
+ if (::kevent(kqueue_fd_, events, num_kevents[op_type], 0, 0, 0) != -1)
+ {
+ descriptor_data->num_kevents_ = num_kevents[op_type];
+ }
+ else
+ {
+ op->ec_ = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+ }
+ }
+ else
+ {
+ if (descriptor_data->num_kevents_ < num_kevents[op_type])
+ descriptor_data->num_kevents_ = num_kevents[op_type];
+
+ struct kevent events[2];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor, EVFILT_READ,
+ EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
+ BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor, EVFILT_WRITE,
+ EV_ADD | EV_CLEAR, 0, 0, descriptor_data);
+ ::kevent(kqueue_fd_, events, descriptor_data->num_kevents_, 0, 0, 0);
+ }
+ }
+
+ descriptor_data->op_queue_[op_type].push(op);
+ scheduler_.work_started();
+}
+
+void kqueue_reactor::cancel_ops(socket_type,
+ kqueue_reactor::per_descriptor_data& descriptor_data)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[i].front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ descriptor_data->op_queue_[i].pop();
+ ops.push(op);
+ }
+ }
+
+ descriptor_lock.unlock();
+
+ scheduler_.post_deferred_completions(ops);
+}
+
+void kqueue_reactor::deregister_descriptor(socket_type descriptor,
+ kqueue_reactor::per_descriptor_data& descriptor_data, bool closing)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (!descriptor_data->shutdown_)
+ {
+ if (closing)
+ {
+ // The descriptor will be automatically removed from the kqueue when it
+ // is closed.
+ }
+ else
+ {
+ struct kevent events[2];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor,
+ EVFILT_READ, EV_DELETE, 0, 0, 0);
+ BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor,
+ EVFILT_WRITE, EV_DELETE, 0, 0, 0);
+ ::kevent(kqueue_fd_, events, descriptor_data->num_kevents_, 0, 0, 0);
+ }
+
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[i].front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ descriptor_data->op_queue_[i].pop();
+ ops.push(op);
+ }
+ }
+
+ descriptor_data->descriptor_ = -1;
+ descriptor_data->shutdown_ = true;
+
+ descriptor_lock.unlock();
+
+ BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ scheduler_.post_deferred_completions(ops);
+
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
+ }
+}
+
+void kqueue_reactor::deregister_internal_descriptor(socket_type descriptor,
+ kqueue_reactor::per_descriptor_data& descriptor_data)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (!descriptor_data->shutdown_)
+ {
+ struct kevent events[2];
+ BOOST_ASIO_KQUEUE_EV_SET(&events[0], descriptor,
+ EVFILT_READ, EV_DELETE, 0, 0, 0);
+ BOOST_ASIO_KQUEUE_EV_SET(&events[1], descriptor,
+ EVFILT_WRITE, EV_DELETE, 0, 0, 0);
+ ::kevent(kqueue_fd_, events, descriptor_data->num_kevents_, 0, 0, 0);
+
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ ops.push(descriptor_data->op_queue_[i]);
+
+ descriptor_data->descriptor_ = -1;
+ descriptor_data->shutdown_ = true;
+
+ descriptor_lock.unlock();
+
+ BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
+ context(), static_cast<uintmax_t>(descriptor),
+ reinterpret_cast<uintmax_t>(descriptor_data)));
+
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
+ }
+}
+
+void kqueue_reactor::cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data)
+{
+ if (descriptor_data)
+ {
+ free_descriptor_state(descriptor_data);
+ descriptor_data = 0;
+ }
+}
+
+void kqueue_reactor::run(long usec, op_queue<operation>& ops)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ // Determine how long to block while waiting for events.
+ timespec timeout_buf = { 0, 0 };
+ timespec* timeout = usec ? get_timeout(usec, timeout_buf) : &timeout_buf;
+
+ lock.unlock();
+
+ // Block on the kqueue descriptor.
+ struct kevent events[128];
+ int num_events = kevent(kqueue_fd_, 0, 0, events, 128, timeout);
+
+#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+ // Trace the waiting events.
+ for (int i = 0; i < num_events; ++i)
+ {
+ void* ptr = reinterpret_cast<void*>(events[i].udata);
+ if (ptr != &interrupter_)
+ {
+ unsigned event_mask = 0;
+ switch (events[i].filter)
+ {
+ case EVFILT_READ:
+ event_mask |= BOOST_ASIO_HANDLER_REACTOR_READ_EVENT;
+ break;
+ case EVFILT_WRITE:
+ event_mask |= BOOST_ASIO_HANDLER_REACTOR_WRITE_EVENT;
+ break;
+ }
+ if ((events[i].flags & (EV_ERROR | EV_OOBAND)) != 0)
+ event_mask |= BOOST_ASIO_HANDLER_REACTOR_ERROR_EVENT;
+ BOOST_ASIO_HANDLER_REACTOR_EVENTS((context(),
+ reinterpret_cast<uintmax_t>(ptr), event_mask));
+ }
+ }
+#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
+
+ // Dispatch the waiting events.
+ for (int i = 0; i < num_events; ++i)
+ {
+ void* ptr = reinterpret_cast<void*>(events[i].udata);
+ if (ptr == &interrupter_)
+ {
+ interrupter_.reset();
+ }
+ else
+ {
+ descriptor_state* descriptor_data = static_cast<descriptor_state*>(ptr);
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (events[i].filter == EVFILT_WRITE
+ && descriptor_data->num_kevents_ == 2
+ && descriptor_data->op_queue_[write_op].empty())
+ {
+ // Some descriptor types, like serial ports, don't seem to support
+ // EV_CLEAR with EVFILT_WRITE. Since we have no pending write
+ // operations we'll remove the EVFILT_WRITE registration here so that
+ // we don't end up in a tight spin.
+ struct kevent delete_events[1];
+ BOOST_ASIO_KQUEUE_EV_SET(&delete_events[0],
+ descriptor_data->descriptor_, EVFILT_WRITE, EV_DELETE, 0, 0, 0);
+ ::kevent(kqueue_fd_, delete_events, 1, 0, 0, 0);
+ descriptor_data->num_kevents_ = 1;
+ }
+
+ // Exception operations must be processed first to ensure that any
+ // out-of-band data is read before normal data.
+#if defined(__NetBSD__)
+ static const unsigned int filter[max_ops] =
+#else
+ static const int filter[max_ops] =
+#endif
+ { EVFILT_READ, EVFILT_WRITE, EVFILT_READ };
+ for (int j = max_ops - 1; j >= 0; --j)
+ {
+ if (events[i].filter == filter[j])
+ {
+ if (j != except_op || events[i].flags & EV_OOBAND)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[j].front())
+ {
+ if (events[i].flags & EV_ERROR)
+ {
+ op->ec_ = boost::system::error_code(
+ static_cast<int>(events[i].data),
+ boost::asio::error::get_system_category());
+ descriptor_data->op_queue_[j].pop();
+ ops.push(op);
+ }
+ if (op->perform())
+ {
+ descriptor_data->op_queue_[j].pop();
+ ops.push(op);
+ }
+ else
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ lock.lock();
+ timer_queues_.get_ready_timers(ops);
+}
+
+void kqueue_reactor::interrupt()
+{
+ interrupter_.interrupt();
+}
+
+int kqueue_reactor::do_kqueue_create()
+{
+ int fd = ::kqueue();
+ if (fd == -1)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "kqueue");
+ }
+ return fd;
+}
+
+kqueue_reactor::descriptor_state* kqueue_reactor::allocate_descriptor_state()
+{
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ return registered_descriptors_.alloc(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, scheduler_.concurrency_hint()));
+}
+
+void kqueue_reactor::free_descriptor_state(kqueue_reactor::descriptor_state* s)
+{
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ registered_descriptors_.free(s);
+}
+
+void kqueue_reactor::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void kqueue_reactor::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+timespec* kqueue_reactor::get_timeout(long usec, timespec& ts)
+{
+ // By default we will wait no longer than 5 minutes. This will ensure that
+ // any changes to the system clock are detected after no longer than this.
+ const long max_usec = 5 * 60 * 1000 * 1000;
+ usec = timer_queues_.wait_duration_usec(
+ (usec < 0 || max_usec < usec) ? max_usec : usec);
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = (usec % 1000000) * 1000;
+ return &ts;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#undef BOOST_ASIO_KQUEUE_EV_SET
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_KQUEUE)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_KQUEUE_REACTOR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/null_event.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/null_event.ipp
new file mode 100644
index 00000000000..b7568413fbf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/null_event.ipp
@@ -0,0 +1,76 @@
+//
+// detail/impl/null_event.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_NULL_EVENT_IPP
+#define BOOST_ASIO_DETAIL_IMPL_NULL_EVENT_IPP
+
+#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_WINDOWS_RUNTIME)
+# include <thread>
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# include <boost/asio/detail/socket_types.hpp>
+#else
+# include <unistd.h>
+# if defined(__hpux)
+# include <sys/time.h>
+# endif
+# if !defined(__hpux) || defined(__SELECT)
+# include <sys/select.h>
+# endif
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+void null_event::do_wait()
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ std::this_thread::sleep_until((std::chrono::steady_clock::time_point::max)());
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ::Sleep(INFINITE);
+#else
+ ::pause();
+#endif
+}
+
+void null_event::do_wait_for_usec(long usec)
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ std::this_thread::sleep_for(std::chrono::microseconds(usec));
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ::Sleep(usec / 1000);
+#elif defined(__hpux) && defined(__SELECT)
+ timespec ts;
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = (usec % 1000000) * 1000;
+ ::pselect(0, 0, 0, 0, &ts, 0);
+#else
+ timeval tv;
+ tv.tv_sec = usec / 1000000;
+ tv.tv_usec = usec % 1000000;
+ ::select(0, 0, 0, 0, &tv);
+#endif
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_NULL_EVENT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/pipe_select_interrupter.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/pipe_select_interrupter.ipp
new file mode 100644
index 00000000000..f7bb7851b2f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/pipe_select_interrupter.ipp
@@ -0,0 +1,126 @@
+//
+// detail/impl/pipe_select_interrupter.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_PIPE_SELECT_INTERRUPTER_IPP
+#define BOOST_ASIO_DETAIL_IMPL_PIPE_SELECT_INTERRUPTER_IPP
+
+#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_WINDOWS_RUNTIME)
+#if !defined(BOOST_ASIO_WINDOWS)
+#if !defined(__CYGWIN__)
+#if !defined(__SYMBIAN32__)
+#if !defined(BOOST_ASIO_HAS_EVENTFD)
+
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <boost/asio/detail/pipe_select_interrupter.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+pipe_select_interrupter::pipe_select_interrupter()
+{
+ open_descriptors();
+}
+
+void pipe_select_interrupter::open_descriptors()
+{
+ int pipe_fds[2];
+ if (pipe(pipe_fds) == 0)
+ {
+ read_descriptor_ = pipe_fds[0];
+ ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+ write_descriptor_ = pipe_fds[1];
+ ::fcntl(write_descriptor_, F_SETFL, O_NONBLOCK);
+
+#if defined(FD_CLOEXEC)
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ ::fcntl(write_descriptor_, F_SETFD, FD_CLOEXEC);
+#endif // defined(FD_CLOEXEC)
+ }
+ else
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "pipe_select_interrupter");
+ }
+}
+
+pipe_select_interrupter::~pipe_select_interrupter()
+{
+ close_descriptors();
+}
+
+void pipe_select_interrupter::close_descriptors()
+{
+ if (read_descriptor_ != -1)
+ ::close(read_descriptor_);
+ if (write_descriptor_ != -1)
+ ::close(write_descriptor_);
+}
+
+void pipe_select_interrupter::recreate()
+{
+ close_descriptors();
+
+ write_descriptor_ = -1;
+ read_descriptor_ = -1;
+
+ open_descriptors();
+}
+
+void pipe_select_interrupter::interrupt()
+{
+ char byte = 0;
+ signed_size_type result = ::write(write_descriptor_, &byte, 1);
+ (void)result;
+}
+
+bool pipe_select_interrupter::reset()
+{
+ for (;;)
+ {
+ char data[1024];
+ signed_size_type bytes_read = ::read(read_descriptor_, data, sizeof(data));
+ if (bytes_read < 0 && errno == EINTR)
+ continue;
+ bool was_interrupted = (bytes_read > 0);
+ while (bytes_read == sizeof(data))
+ bytes_read = ::read(read_descriptor_, data, sizeof(data));
+ return was_interrupted;
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_EVENTFD)
+#endif // !defined(__SYMBIAN32__)
+#endif // !defined(__CYGWIN__)
+#endif // !defined(BOOST_ASIO_WINDOWS)
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_PIPE_SELECT_INTERRUPTER_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_event.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_event.ipp
new file mode 100644
index 00000000000..1c6d885a63c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_event.ipp
@@ -0,0 +1,61 @@
+//
+// detail/impl/posix_event.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_POSIX_EVENT_IPP
+#define BOOST_ASIO_DETAIL_IMPL_POSIX_EVENT_IPP
+
+#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_PTHREADS)
+
+#include <boost/asio/detail/posix_event.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+posix_event::posix_event()
+ : state_(0)
+{
+#if (defined(__MACH__) && defined(__APPLE__)) \
+ || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
+ int error = ::pthread_cond_init(&cond_, 0);
+#else // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
+ ::pthread_condattr_t attr;
+ ::pthread_condattr_init(&attr);
+ int error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+ if (error == 0)
+ error = ::pthread_cond_init(&cond_, &attr);
+#endif // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
+
+ boost::system::error_code ec(error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "event");
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_EVENT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_mutex.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_mutex.ipp
new file mode 100644
index 00000000000..fc86d43815b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_mutex.ipp
@@ -0,0 +1,48 @@
+//
+// detail/impl/posix_mutex.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_POSIX_MUTEX_IPP
+#define BOOST_ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP
+
+#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_PTHREADS)
+
+#include <boost/asio/detail/posix_mutex.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+posix_mutex::posix_mutex()
+{
+ int error = ::pthread_mutex_init(&mutex_, 0);
+ boost::system::error_code ec(error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "mutex");
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_thread.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_thread.ipp
new file mode 100644
index 00000000000..d01922c6258
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_thread.ipp
@@ -0,0 +1,86 @@
+//
+// detail/impl/posix_thread.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_POSIX_THREAD_IPP
+#define BOOST_ASIO_DETAIL_IMPL_POSIX_THREAD_IPP
+
+#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_PTHREADS)
+
+#include <boost/asio/detail/posix_thread.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+posix_thread::~posix_thread()
+{
+ if (!joined_)
+ ::pthread_detach(thread_);
+}
+
+void posix_thread::join()
+{
+ if (!joined_)
+ {
+ ::pthread_join(thread_, 0);
+ joined_ = true;
+ }
+}
+
+std::size_t posix_thread::hardware_concurrency()
+{
+#if defined(_SC_NPROCESSORS_ONLN)
+ long result = sysconf(_SC_NPROCESSORS_ONLN);
+ if (result > 0)
+ return result;
+#endif // defined(_SC_NPROCESSORS_ONLN)
+ return 0;
+}
+
+void posix_thread::start_thread(func_base* arg)
+{
+ int error = ::pthread_create(&thread_, 0,
+ boost_asio_detail_posix_thread_function, arg);
+ if (error != 0)
+ {
+ delete arg;
+ boost::system::error_code ec(error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "thread");
+ }
+}
+
+void* boost_asio_detail_posix_thread_function(void* arg)
+{
+ posix_thread::auto_func_base_ptr func = {
+ static_cast<posix_thread::func_base*>(arg) };
+ func.ptr->run();
+ return 0;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_THREAD_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_tss_ptr.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_tss_ptr.ipp
new file mode 100644
index 00000000000..623dc679c5f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/posix_tss_ptr.ipp
@@ -0,0 +1,48 @@
+//
+// detail/impl/posix_tss_ptr.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_POSIX_TSS_PTR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP
+
+#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_PTHREADS)
+
+#include <boost/asio/detail/posix_tss_ptr.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+void posix_tss_ptr_create(pthread_key_t& key)
+{
+ int error = ::pthread_key_create(&key, 0);
+ boost::system::error_code ec(error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "tss");
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_descriptor_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_descriptor_service.ipp
new file mode 100644
index 00000000000..0611a953db9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_descriptor_service.ipp
@@ -0,0 +1,224 @@
+//
+// detail/impl/reactive_descriptor_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
+
+#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_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/reactive_descriptor_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+reactive_descriptor_service::reactive_descriptor_service(
+ execution_context& context)
+ : execution_context_service_base<reactive_descriptor_service>(context),
+ reactor_(boost::asio::use_service<reactor>(context))
+{
+ reactor_.init_task();
+}
+
+void reactive_descriptor_service::shutdown()
+{
+}
+
+void reactive_descriptor_service::construct(
+ reactive_descriptor_service::implementation_type& impl)
+{
+ impl.descriptor_ = -1;
+ impl.state_ = 0;
+}
+
+void reactive_descriptor_service::move_construct(
+ reactive_descriptor_service::implementation_type& impl,
+ reactive_descriptor_service::implementation_type& other_impl)
+{
+ impl.descriptor_ = other_impl.descriptor_;
+ other_impl.descriptor_ = -1;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ reactor_.move_descriptor(impl.descriptor_,
+ impl.reactor_data_, other_impl.reactor_data_);
+}
+
+void reactive_descriptor_service::move_assign(
+ reactive_descriptor_service::implementation_type& impl,
+ reactive_descriptor_service& other_service,
+ reactive_descriptor_service::implementation_type& other_impl)
+{
+ destroy(impl);
+
+ impl.descriptor_ = other_impl.descriptor_;
+ other_impl.descriptor_ = -1;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ other_service.reactor_.move_descriptor(impl.descriptor_,
+ impl.reactor_data_, other_impl.reactor_data_);
+}
+
+void reactive_descriptor_service::destroy(
+ reactive_descriptor_service::implementation_type& impl)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "descriptor", &impl, impl.descriptor_, "close"));
+
+ reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
+ (impl.state_ & descriptor_ops::possible_dup) == 0);
+
+ boost::system::error_code ignored_ec;
+ descriptor_ops::close(impl.descriptor_, impl.state_, ignored_ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
+}
+
+boost::system::error_code reactive_descriptor_service::assign(
+ reactive_descriptor_service::implementation_type& impl,
+ const native_handle_type& native_descriptor, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ if (int err = reactor_.register_descriptor(
+ native_descriptor, impl.reactor_data_))
+ {
+ ec = boost::system::error_code(err,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ impl.descriptor_ = native_descriptor;
+ impl.state_ = descriptor_ops::possible_dup;
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code reactive_descriptor_service::close(
+ reactive_descriptor_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "descriptor", &impl, impl.descriptor_, "close"));
+
+ reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
+ (impl.state_ & descriptor_ops::possible_dup) == 0);
+
+ descriptor_ops::close(impl.descriptor_, impl.state_, ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+
+ // The descriptor is closed by the OS even if close() returns an error.
+ //
+ // (Actually, POSIX says the state of the descriptor is unspecified. On
+ // Linux the descriptor is apparently closed anyway; e.g. see
+ // http://lkml.org/lkml/2005/9/10/129
+ // We'll just have to assume that other OSes follow the same behaviour.)
+ construct(impl);
+
+ return ec;
+}
+
+reactive_descriptor_service::native_handle_type
+reactive_descriptor_service::release(
+ reactive_descriptor_service::implementation_type& impl)
+{
+ native_handle_type descriptor = impl.descriptor_;
+
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "descriptor", &impl, impl.descriptor_, "release"));
+
+ reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_, false);
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ construct(impl);
+ }
+
+ return descriptor;
+}
+
+boost::system::error_code reactive_descriptor_service::cancel(
+ reactive_descriptor_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return ec;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "descriptor", &impl, impl.descriptor_, "cancel"));
+
+ reactor_.cancel_ops(impl.descriptor_, impl.reactor_data_);
+ ec = boost::system::error_code();
+ return ec;
+}
+
+void reactive_descriptor_service::start_op(
+ reactive_descriptor_service::implementation_type& impl,
+ int op_type, reactor_op* op, bool is_continuation,
+ bool is_non_blocking, bool noop)
+{
+ if (!noop)
+ {
+ if ((impl.state_ & descriptor_ops::non_blocking) ||
+ descriptor_ops::set_internal_non_blocking(
+ impl.descriptor_, impl.state_, true, op->ec_))
+ {
+ reactor_.start_op(op_type, impl.descriptor_,
+ impl.reactor_data_, op, is_continuation, is_non_blocking);
+ return;
+ }
+ }
+
+ reactor_.post_immediate_completion(op, is_continuation);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_serial_port_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_serial_port_service.ipp
new file mode 100644
index 00000000000..62546604b47
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_serial_port_service.ipp
@@ -0,0 +1,154 @@
+//
+// detail/impl/reactive_serial_port_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
+
+#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_SERIAL_PORT)
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#include <cstring>
+#include <boost/asio/detail/reactive_serial_port_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+reactive_serial_port_service::reactive_serial_port_service(
+ execution_context& context)
+ : execution_context_service_base<reactive_serial_port_service>(context),
+ descriptor_service_(context)
+{
+}
+
+void reactive_serial_port_service::shutdown()
+{
+ descriptor_service_.shutdown();
+}
+
+boost::system::error_code reactive_serial_port_service::open(
+ reactive_serial_port_service::implementation_type& impl,
+ const std::string& device, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ descriptor_ops::state_type state = 0;
+ int fd = descriptor_ops::open(device.c_str(),
+ O_RDWR | O_NONBLOCK | O_NOCTTY, ec);
+ if (fd < 0)
+ return ec;
+
+ int s = descriptor_ops::fcntl(fd, F_GETFL, ec);
+ if (s >= 0)
+ s = descriptor_ops::fcntl(fd, F_SETFL, s | O_NONBLOCK, ec);
+ if (s < 0)
+ {
+ boost::system::error_code ignored_ec;
+ descriptor_ops::close(fd, state, ignored_ec);
+ return ec;
+ }
+
+ // Set up default serial port options.
+ termios ios;
+ errno = 0;
+ s = descriptor_ops::error_wrapper(::tcgetattr(fd, &ios), ec);
+ if (s >= 0)
+ {
+#if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
+ ::cfmakeraw(&ios);
+#else
+ ios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK
+ | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
+ ios.c_oflag &= ~OPOST;
+ ios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+ ios.c_cflag &= ~(CSIZE | PARENB);
+ ios.c_cflag |= CS8;
+#endif
+ ios.c_iflag |= IGNPAR;
+ ios.c_cflag |= CREAD | CLOCAL;
+ errno = 0;
+ s = descriptor_ops::error_wrapper(::tcsetattr(fd, TCSANOW, &ios), ec);
+ }
+ if (s < 0)
+ {
+ boost::system::error_code ignored_ec;
+ descriptor_ops::close(fd, state, ignored_ec);
+ return ec;
+ }
+
+ // We're done. Take ownership of the serial port descriptor.
+ if (descriptor_service_.assign(impl, fd, ec))
+ {
+ boost::system::error_code ignored_ec;
+ descriptor_ops::close(fd, state, ignored_ec);
+ }
+
+ return ec;
+}
+
+boost::system::error_code reactive_serial_port_service::do_set_option(
+ reactive_serial_port_service::implementation_type& impl,
+ reactive_serial_port_service::store_function_type store,
+ const void* option, boost::system::error_code& ec)
+{
+ termios ios;
+ errno = 0;
+ descriptor_ops::error_wrapper(::tcgetattr(
+ descriptor_service_.native_handle(impl), &ios), ec);
+ if (ec)
+ return ec;
+
+ if (store(option, ios, ec))
+ return ec;
+
+ errno = 0;
+ descriptor_ops::error_wrapper(::tcsetattr(
+ descriptor_service_.native_handle(impl), TCSANOW, &ios), ec);
+ return ec;
+}
+
+boost::system::error_code reactive_serial_port_service::do_get_option(
+ const reactive_serial_port_service::implementation_type& impl,
+ reactive_serial_port_service::load_function_type load,
+ void* option, boost::system::error_code& ec) const
+{
+ termios ios;
+ errno = 0;
+ descriptor_ops::error_wrapper(::tcgetattr(
+ descriptor_service_.native_handle(impl), &ios), ec);
+ if (ec)
+ return ec;
+
+ return load(option, ios, ec);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_socket_service_base.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_socket_service_base.ipp
new file mode 100644
index 00000000000..5ae4b64a6d2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/reactive_socket_service_base.ipp
@@ -0,0 +1,301 @@
+//
+// detail/reactive_socket_service_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
+
+#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_IOCP) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/reactive_socket_service_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+reactive_socket_service_base::reactive_socket_service_base(
+ execution_context& context)
+ : reactor_(use_service<reactor>(context))
+{
+ reactor_.init_task();
+}
+
+void reactive_socket_service_base::base_shutdown()
+{
+}
+
+void reactive_socket_service_base::construct(
+ reactive_socket_service_base::base_implementation_type& impl)
+{
+ impl.socket_ = invalid_socket;
+ impl.state_ = 0;
+}
+
+void reactive_socket_service_base::base_move_construct(
+ reactive_socket_service_base::base_implementation_type& impl,
+ reactive_socket_service_base::base_implementation_type& other_impl)
+{
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ reactor_.move_descriptor(impl.socket_,
+ impl.reactor_data_, other_impl.reactor_data_);
+}
+
+void reactive_socket_service_base::base_move_assign(
+ reactive_socket_service_base::base_implementation_type& impl,
+ reactive_socket_service_base& other_service,
+ reactive_socket_service_base::base_implementation_type& other_impl)
+{
+ destroy(impl);
+
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ other_service.reactor_.move_descriptor(impl.socket_,
+ impl.reactor_data_, other_impl.reactor_data_);
+}
+
+void reactive_socket_service_base::destroy(
+ reactive_socket_service_base::base_implementation_type& impl)
+{
+ if (impl.socket_ != invalid_socket)
+ {
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
+ (impl.state_ & socket_ops::possible_dup) == 0);
+
+ boost::system::error_code ignored_ec;
+ socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
+}
+
+boost::system::error_code reactive_socket_service_base::close(
+ reactive_socket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
+ (impl.state_ & socket_ops::possible_dup) == 0);
+
+ socket_ops::close(impl.socket_, impl.state_, false, ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+
+ // The descriptor is closed by the OS even if close() returns an error.
+ //
+ // (Actually, POSIX says the state of the descriptor is unspecified. On
+ // Linux the descriptor is apparently closed anyway; e.g. see
+ // http://lkml.org/lkml/2005/9/10/129
+ // We'll just have to assume that other OSes follow the same behaviour. The
+ // known exception is when Windows's closesocket() function fails with
+ // WSAEWOULDBLOCK, but this case is handled inside socket_ops::close().
+ construct(impl);
+
+ return ec;
+}
+
+socket_type reactive_socket_service_base::release(
+ reactive_socket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return invalid_socket;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "socket", &impl, impl.socket_, "release"));
+
+ reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_, false);
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ socket_type sock = impl.socket_;
+ construct(impl);
+ ec = boost::system::error_code();
+ return sock;
+}
+
+boost::system::error_code reactive_socket_service_base::cancel(
+ reactive_socket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return ec;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((reactor_.context(),
+ "socket", &impl, impl.socket_, "cancel"));
+
+ reactor_.cancel_ops(impl.socket_, impl.reactor_data_);
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code reactive_socket_service_base::do_open(
+ reactive_socket_service_base::base_implementation_type& impl,
+ int af, int type, int protocol, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ socket_holder sock(socket_ops::socket(af, type, protocol, ec));
+ if (sock.get() == invalid_socket)
+ return ec;
+
+ if (int err = reactor_.register_descriptor(sock.get(), impl.reactor_data_))
+ {
+ ec = boost::system::error_code(err,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ impl.socket_ = sock.release();
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code reactive_socket_service_base::do_assign(
+ reactive_socket_service_base::base_implementation_type& impl, int type,
+ const reactive_socket_service_base::native_handle_type& native_socket,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ if (int err = reactor_.register_descriptor(
+ native_socket, impl.reactor_data_))
+ {
+ ec = boost::system::error_code(err,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ impl.socket_ = native_socket;
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ impl.state_ |= socket_ops::possible_dup;
+ ec = boost::system::error_code();
+ return ec;
+}
+
+void reactive_socket_service_base::start_op(
+ reactive_socket_service_base::base_implementation_type& impl,
+ int op_type, reactor_op* op, bool is_continuation,
+ bool is_non_blocking, bool noop)
+{
+ if (!noop)
+ {
+ if ((impl.state_ & socket_ops::non_blocking)
+ || socket_ops::set_internal_non_blocking(
+ impl.socket_, impl.state_, true, op->ec_))
+ {
+ reactor_.start_op(op_type, impl.socket_,
+ impl.reactor_data_, op, is_continuation, is_non_blocking);
+ return;
+ }
+ }
+
+ reactor_.post_immediate_completion(op, is_continuation);
+}
+
+void reactive_socket_service_base::start_accept_op(
+ reactive_socket_service_base::base_implementation_type& impl,
+ reactor_op* op, bool is_continuation, bool peer_is_open)
+{
+ if (!peer_is_open)
+ start_op(impl, reactor::read_op, op, is_continuation, true, false);
+ else
+ {
+ op->ec_ = boost::asio::error::already_open;
+ reactor_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+void reactive_socket_service_base::start_connect_op(
+ reactive_socket_service_base::base_implementation_type& impl,
+ reactor_op* op, bool is_continuation,
+ const socket_addr_type* addr, size_t addrlen)
+{
+ if ((impl.state_ & socket_ops::non_blocking)
+ || socket_ops::set_internal_non_blocking(
+ impl.socket_, impl.state_, true, op->ec_))
+ {
+ if (socket_ops::connect(impl.socket_, addr, addrlen, op->ec_) != 0)
+ {
+ if (op->ec_ == boost::asio::error::in_progress
+ || op->ec_ == boost::asio::error::would_block)
+ {
+ op->ec_ = boost::system::error_code();
+ reactor_.start_op(reactor::connect_op, impl.socket_,
+ impl.reactor_data_, op, is_continuation, false);
+ return;
+ }
+ }
+ }
+
+ reactor_.post_immediate_completion(op, is_continuation);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_IOCP)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/resolver_service_base.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/resolver_service_base.ipp
new file mode 100644
index 00000000000..64b92a89ac4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/resolver_service_base.ipp
@@ -0,0 +1,162 @@
+//
+// detail/impl/resolver_service_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_RESOLVER_SERVICE_BASE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_RESOLVER_SERVICE_BASE_IPP
+
+#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/resolver_service_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class resolver_service_base::work_scheduler_runner
+{
+public:
+ work_scheduler_runner(scheduler_impl& work_scheduler)
+ : work_scheduler_(work_scheduler)
+ {
+ }
+
+ void operator()()
+ {
+ boost::system::error_code ec;
+ work_scheduler_.run(ec);
+ }
+
+private:
+ scheduler_impl& work_scheduler_;
+};
+
+resolver_service_base::resolver_service_base(execution_context& context)
+ : scheduler_(boost::asio::use_service<scheduler_impl>(context)),
+ work_scheduler_(new scheduler_impl(context, -1, false)),
+ work_thread_(0)
+{
+ work_scheduler_->work_started();
+}
+
+resolver_service_base::~resolver_service_base()
+{
+ base_shutdown();
+}
+
+void resolver_service_base::base_shutdown()
+{
+ if (work_scheduler_.get())
+ {
+ work_scheduler_->work_finished();
+ work_scheduler_->stop();
+ if (work_thread_.get())
+ {
+ work_thread_->join();
+ work_thread_.reset();
+ }
+ work_scheduler_.reset();
+ }
+}
+
+void resolver_service_base::base_notify_fork(
+ execution_context::fork_event fork_ev)
+{
+ if (work_thread_.get())
+ {
+ if (fork_ev == execution_context::fork_prepare)
+ {
+ work_scheduler_->stop();
+ work_thread_->join();
+ work_thread_.reset();
+ }
+ else
+ {
+ work_scheduler_->restart();
+ work_thread_.reset(new boost::asio::detail::thread(
+ work_scheduler_runner(*work_scheduler_)));
+ }
+ }
+}
+
+void resolver_service_base::construct(
+ resolver_service_base::implementation_type& impl)
+{
+ impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
+}
+
+void resolver_service_base::destroy(
+ resolver_service_base::implementation_type& impl)
+{
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
+ "resolver", &impl, 0, "cancel"));
+
+ impl.reset();
+}
+
+void resolver_service_base::move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+{
+ impl = BOOST_ASIO_MOVE_CAST(implementation_type)(other_impl);
+}
+
+void resolver_service_base::move_assign(implementation_type& impl,
+ resolver_service_base&, implementation_type& other_impl)
+{
+ destroy(impl);
+ impl = BOOST_ASIO_MOVE_CAST(implementation_type)(other_impl);
+}
+
+void resolver_service_base::cancel(
+ resolver_service_base::implementation_type& impl)
+{
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
+ "resolver", &impl, 0, "cancel"));
+
+ impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
+}
+
+void resolver_service_base::start_resolve_op(resolve_op* op)
+{
+ if (BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
+ scheduler_.concurrency_hint()))
+ {
+ start_work_thread();
+ scheduler_.work_started();
+ work_scheduler_->post_immediate_completion(op, false);
+ }
+ else
+ {
+ op->ec_ = boost::asio::error::operation_not_supported;
+ scheduler_.post_immediate_completion(op, false);
+ }
+}
+
+void resolver_service_base::start_work_thread()
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (!work_thread_.get())
+ {
+ work_thread_.reset(new boost::asio::detail::thread(
+ work_scheduler_runner(*work_scheduler_)));
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_RESOLVER_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/scheduler.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/scheduler.ipp
new file mode 100644
index 00000000000..4ef5c866888
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/scheduler.ipp
@@ -0,0 +1,619 @@
+//
+// detail/impl/scheduler.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SCHEDULER_IPP
+#define BOOST_ASIO_DETAIL_IMPL_SCHEDULER_IPP
+
+#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/concurrency_hint.hpp>
+#include <boost/asio/detail/event.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/reactor.hpp>
+#include <boost/asio/detail/scheduler.hpp>
+#include <boost/asio/detail/scheduler_thread_info.hpp>
+#include <boost/asio/detail/signal_blocker.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class scheduler::thread_function
+{
+public:
+ explicit thread_function(scheduler* s)
+ : this_(s)
+ {
+ }
+
+ void operator()()
+ {
+ boost::system::error_code ec;
+ this_->run(ec);
+ }
+
+private:
+ scheduler* this_;
+};
+
+struct scheduler::task_cleanup
+{
+ ~task_cleanup()
+ {
+ if (this_thread_->private_outstanding_work > 0)
+ {
+ boost::asio::detail::increment(
+ scheduler_->outstanding_work_,
+ this_thread_->private_outstanding_work);
+ }
+ this_thread_->private_outstanding_work = 0;
+
+ // Enqueue the completed operations and reinsert the task at the end of
+ // the operation queue.
+ lock_->lock();
+ scheduler_->task_interrupted_ = true;
+ scheduler_->op_queue_.push(this_thread_->private_op_queue);
+ scheduler_->op_queue_.push(&scheduler_->task_operation_);
+ }
+
+ scheduler* scheduler_;
+ mutex::scoped_lock* lock_;
+ thread_info* this_thread_;
+};
+
+struct scheduler::work_cleanup
+{
+ ~work_cleanup()
+ {
+ if (this_thread_->private_outstanding_work > 1)
+ {
+ boost::asio::detail::increment(
+ scheduler_->outstanding_work_,
+ this_thread_->private_outstanding_work - 1);
+ }
+ else if (this_thread_->private_outstanding_work < 1)
+ {
+ scheduler_->work_finished();
+ }
+ this_thread_->private_outstanding_work = 0;
+
+#if defined(BOOST_ASIO_HAS_THREADS)
+ if (!this_thread_->private_op_queue.empty())
+ {
+ lock_->lock();
+ scheduler_->op_queue_.push(this_thread_->private_op_queue);
+ }
+#endif // defined(BOOST_ASIO_HAS_THREADS)
+ }
+
+ scheduler* scheduler_;
+ mutex::scoped_lock* lock_;
+ thread_info* this_thread_;
+};
+
+scheduler::scheduler(boost::asio::execution_context& ctx,
+ int concurrency_hint, bool own_thread)
+ : boost::asio::detail::execution_context_service_base<scheduler>(ctx),
+ one_thread_(concurrency_hint == 1
+ || !BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ SCHEDULER, concurrency_hint)
+ || !BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, concurrency_hint)),
+ mutex_(BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ SCHEDULER, concurrency_hint)),
+ task_(0),
+ task_interrupted_(true),
+ outstanding_work_(0),
+ stopped_(false),
+ shutdown_(false),
+ concurrency_hint_(concurrency_hint),
+ thread_(0)
+{
+ BOOST_ASIO_HANDLER_TRACKING_INIT;
+
+ if (own_thread)
+ {
+ ++outstanding_work_;
+ boost::asio::detail::signal_blocker sb;
+ thread_ = new boost::asio::detail::thread(thread_function(this));
+ }
+}
+
+scheduler::~scheduler()
+{
+ if (thread_)
+ {
+ thread_->join();
+ delete thread_;
+ }
+}
+
+void scheduler::shutdown()
+{
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ if (thread_)
+ stop_all_threads(lock);
+ lock.unlock();
+
+ // Join thread to ensure task operation is returned to queue.
+ if (thread_)
+ {
+ thread_->join();
+ delete thread_;
+ thread_ = 0;
+ }
+
+ // Destroy handler objects.
+ while (!op_queue_.empty())
+ {
+ operation* o = op_queue_.front();
+ op_queue_.pop();
+ if (o != &task_operation_)
+ o->destroy();
+ }
+
+ // Reset to initial state.
+ task_ = 0;
+}
+
+void scheduler::init_task()
+{
+ mutex::scoped_lock lock(mutex_);
+ if (!shutdown_ && !task_)
+ {
+ task_ = &use_service<reactor>(this->context());
+ op_queue_.push(&task_operation_);
+ wake_one_thread_and_unlock(lock);
+ }
+}
+
+std::size_t scheduler::run(boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ if (outstanding_work_ == 0)
+ {
+ stop();
+ return 0;
+ }
+
+ thread_info this_thread;
+ this_thread.private_outstanding_work = 0;
+ thread_call_stack::context ctx(this, this_thread);
+
+ mutex::scoped_lock lock(mutex_);
+
+ std::size_t n = 0;
+ for (; do_run_one(lock, this_thread, ec); lock.lock())
+ if (n != (std::numeric_limits<std::size_t>::max)())
+ ++n;
+ return n;
+}
+
+std::size_t scheduler::run_one(boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ if (outstanding_work_ == 0)
+ {
+ stop();
+ return 0;
+ }
+
+ thread_info this_thread;
+ this_thread.private_outstanding_work = 0;
+ thread_call_stack::context ctx(this, this_thread);
+
+ mutex::scoped_lock lock(mutex_);
+
+ return do_run_one(lock, this_thread, ec);
+}
+
+std::size_t scheduler::wait_one(long usec, boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ if (outstanding_work_ == 0)
+ {
+ stop();
+ return 0;
+ }
+
+ thread_info this_thread;
+ this_thread.private_outstanding_work = 0;
+ thread_call_stack::context ctx(this, this_thread);
+
+ mutex::scoped_lock lock(mutex_);
+
+ return do_wait_one(lock, this_thread, usec, ec);
+}
+
+std::size_t scheduler::poll(boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ if (outstanding_work_ == 0)
+ {
+ stop();
+ return 0;
+ }
+
+ thread_info this_thread;
+ this_thread.private_outstanding_work = 0;
+ thread_call_stack::context ctx(this, this_thread);
+
+ mutex::scoped_lock lock(mutex_);
+
+#if defined(BOOST_ASIO_HAS_THREADS)
+ // We want to support nested calls to poll() and poll_one(), so any handlers
+ // that are already on a thread-private queue need to be put on to the main
+ // queue now.
+ if (one_thread_)
+ if (thread_info* outer_info = static_cast<thread_info*>(ctx.next_by_key()))
+ op_queue_.push(outer_info->private_op_queue);
+#endif // defined(BOOST_ASIO_HAS_THREADS)
+
+ std::size_t n = 0;
+ for (; do_poll_one(lock, this_thread, ec); lock.lock())
+ if (n != (std::numeric_limits<std::size_t>::max)())
+ ++n;
+ return n;
+}
+
+std::size_t scheduler::poll_one(boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ if (outstanding_work_ == 0)
+ {
+ stop();
+ return 0;
+ }
+
+ thread_info this_thread;
+ this_thread.private_outstanding_work = 0;
+ thread_call_stack::context ctx(this, this_thread);
+
+ mutex::scoped_lock lock(mutex_);
+
+#if defined(BOOST_ASIO_HAS_THREADS)
+ // We want to support nested calls to poll() and poll_one(), so any handlers
+ // that are already on a thread-private queue need to be put on to the main
+ // queue now.
+ if (one_thread_)
+ if (thread_info* outer_info = static_cast<thread_info*>(ctx.next_by_key()))
+ op_queue_.push(outer_info->private_op_queue);
+#endif // defined(BOOST_ASIO_HAS_THREADS)
+
+ return do_poll_one(lock, this_thread, ec);
+}
+
+void scheduler::stop()
+{
+ mutex::scoped_lock lock(mutex_);
+ stop_all_threads(lock);
+}
+
+bool scheduler::stopped() const
+{
+ mutex::scoped_lock lock(mutex_);
+ return stopped_;
+}
+
+void scheduler::restart()
+{
+ mutex::scoped_lock lock(mutex_);
+ stopped_ = false;
+}
+
+void scheduler::compensating_work_started()
+{
+ thread_info_base* this_thread = thread_call_stack::contains(this);
+ ++static_cast<thread_info*>(this_thread)->private_outstanding_work;
+}
+
+void scheduler::post_immediate_completion(
+ scheduler::operation* op, bool is_continuation)
+{
+#if defined(BOOST_ASIO_HAS_THREADS)
+ if (one_thread_ || is_continuation)
+ {
+ if (thread_info_base* this_thread = thread_call_stack::contains(this))
+ {
+ ++static_cast<thread_info*>(this_thread)->private_outstanding_work;
+ static_cast<thread_info*>(this_thread)->private_op_queue.push(op);
+ return;
+ }
+ }
+#else // defined(BOOST_ASIO_HAS_THREADS)
+ (void)is_continuation;
+#endif // defined(BOOST_ASIO_HAS_THREADS)
+
+ work_started();
+ mutex::scoped_lock lock(mutex_);
+ op_queue_.push(op);
+ wake_one_thread_and_unlock(lock);
+}
+
+void scheduler::post_deferred_completion(scheduler::operation* op)
+{
+#if defined(BOOST_ASIO_HAS_THREADS)
+ if (one_thread_)
+ {
+ if (thread_info_base* this_thread = thread_call_stack::contains(this))
+ {
+ static_cast<thread_info*>(this_thread)->private_op_queue.push(op);
+ return;
+ }
+ }
+#endif // defined(BOOST_ASIO_HAS_THREADS)
+
+ mutex::scoped_lock lock(mutex_);
+ op_queue_.push(op);
+ wake_one_thread_and_unlock(lock);
+}
+
+void scheduler::post_deferred_completions(
+ op_queue<scheduler::operation>& ops)
+{
+ if (!ops.empty())
+ {
+#if defined(BOOST_ASIO_HAS_THREADS)
+ if (one_thread_)
+ {
+ if (thread_info_base* this_thread = thread_call_stack::contains(this))
+ {
+ static_cast<thread_info*>(this_thread)->private_op_queue.push(ops);
+ return;
+ }
+ }
+#endif // defined(BOOST_ASIO_HAS_THREADS)
+
+ mutex::scoped_lock lock(mutex_);
+ op_queue_.push(ops);
+ wake_one_thread_and_unlock(lock);
+ }
+}
+
+void scheduler::do_dispatch(
+ scheduler::operation* op)
+{
+ work_started();
+ mutex::scoped_lock lock(mutex_);
+ op_queue_.push(op);
+ wake_one_thread_and_unlock(lock);
+}
+
+void scheduler::abandon_operations(
+ op_queue<scheduler::operation>& ops)
+{
+ op_queue<scheduler::operation> ops2;
+ ops2.push(ops);
+}
+
+std::size_t scheduler::do_run_one(mutex::scoped_lock& lock,
+ scheduler::thread_info& this_thread,
+ const boost::system::error_code& ec)
+{
+ while (!stopped_)
+ {
+ if (!op_queue_.empty())
+ {
+ // Prepare to execute first handler from queue.
+ operation* o = op_queue_.front();
+ op_queue_.pop();
+ bool more_handlers = (!op_queue_.empty());
+
+ if (o == &task_operation_)
+ {
+ task_interrupted_ = more_handlers;
+
+ if (more_handlers && !one_thread_)
+ wakeup_event_.unlock_and_signal_one(lock);
+ else
+ lock.unlock();
+
+ task_cleanup on_exit = { this, &lock, &this_thread };
+ (void)on_exit;
+
+ // Run the task. May throw an exception. Only block if the operation
+ // queue is empty and we're not polling, otherwise we want to return
+ // as soon as possible.
+ task_->run(more_handlers ? 0 : -1, this_thread.private_op_queue);
+ }
+ else
+ {
+ std::size_t task_result = o->task_result_;
+
+ if (more_handlers && !one_thread_)
+ wake_one_thread_and_unlock(lock);
+ else
+ lock.unlock();
+
+ // Ensure the count of outstanding work is decremented on block exit.
+ work_cleanup on_exit = { this, &lock, &this_thread };
+ (void)on_exit;
+
+ // Complete the operation. May throw an exception. Deletes the object.
+ o->complete(this, ec, task_result);
+
+ return 1;
+ }
+ }
+ else
+ {
+ wakeup_event_.clear(lock);
+ wakeup_event_.wait(lock);
+ }
+ }
+
+ return 0;
+}
+
+std::size_t scheduler::do_wait_one(mutex::scoped_lock& lock,
+ scheduler::thread_info& this_thread, long usec,
+ const boost::system::error_code& ec)
+{
+ if (stopped_)
+ return 0;
+
+ operation* o = op_queue_.front();
+ if (o == 0)
+ {
+ wakeup_event_.clear(lock);
+ wakeup_event_.wait_for_usec(lock, usec);
+ usec = 0; // Wait at most once.
+ o = op_queue_.front();
+ }
+
+ if (o == &task_operation_)
+ {
+ op_queue_.pop();
+ bool more_handlers = (!op_queue_.empty());
+
+ task_interrupted_ = more_handlers;
+
+ if (more_handlers && !one_thread_)
+ wakeup_event_.unlock_and_signal_one(lock);
+ else
+ lock.unlock();
+
+ {
+ task_cleanup on_exit = { this, &lock, &this_thread };
+ (void)on_exit;
+
+ // Run the task. May throw an exception. Only block if the operation
+ // queue is empty and we're not polling, otherwise we want to return
+ // as soon as possible.
+ task_->run(more_handlers ? 0 : usec, this_thread.private_op_queue);
+ }
+
+ o = op_queue_.front();
+ if (o == &task_operation_)
+ {
+ if (!one_thread_)
+ wakeup_event_.maybe_unlock_and_signal_one(lock);
+ return 0;
+ }
+ }
+
+ if (o == 0)
+ return 0;
+
+ op_queue_.pop();
+ bool more_handlers = (!op_queue_.empty());
+
+ std::size_t task_result = o->task_result_;
+
+ if (more_handlers && !one_thread_)
+ wake_one_thread_and_unlock(lock);
+ else
+ lock.unlock();
+
+ // Ensure the count of outstanding work is decremented on block exit.
+ work_cleanup on_exit = { this, &lock, &this_thread };
+ (void)on_exit;
+
+ // Complete the operation. May throw an exception. Deletes the object.
+ o->complete(this, ec, task_result);
+
+ return 1;
+}
+
+std::size_t scheduler::do_poll_one(mutex::scoped_lock& lock,
+ scheduler::thread_info& this_thread,
+ const boost::system::error_code& ec)
+{
+ if (stopped_)
+ return 0;
+
+ operation* o = op_queue_.front();
+ if (o == &task_operation_)
+ {
+ op_queue_.pop();
+ lock.unlock();
+
+ {
+ task_cleanup c = { this, &lock, &this_thread };
+ (void)c;
+
+ // Run the task. May throw an exception. Only block if the operation
+ // queue is empty and we're not polling, otherwise we want to return
+ // as soon as possible.
+ task_->run(0, this_thread.private_op_queue);
+ }
+
+ o = op_queue_.front();
+ if (o == &task_operation_)
+ {
+ wakeup_event_.maybe_unlock_and_signal_one(lock);
+ return 0;
+ }
+ }
+
+ if (o == 0)
+ return 0;
+
+ op_queue_.pop();
+ bool more_handlers = (!op_queue_.empty());
+
+ std::size_t task_result = o->task_result_;
+
+ if (more_handlers && !one_thread_)
+ wake_one_thread_and_unlock(lock);
+ else
+ lock.unlock();
+
+ // Ensure the count of outstanding work is decremented on block exit.
+ work_cleanup on_exit = { this, &lock, &this_thread };
+ (void)on_exit;
+
+ // Complete the operation. May throw an exception. Deletes the object.
+ o->complete(this, ec, task_result);
+
+ return 1;
+}
+
+void scheduler::stop_all_threads(
+ mutex::scoped_lock& lock)
+{
+ stopped_ = true;
+ wakeup_event_.signal_all(lock);
+
+ if (!task_interrupted_ && task_)
+ {
+ task_interrupted_ = true;
+ task_->interrupt();
+ }
+}
+
+void scheduler::wake_one_thread_and_unlock(
+ mutex::scoped_lock& lock)
+{
+ if (!wakeup_event_.maybe_unlock_and_signal_one(lock))
+ {
+ if (!task_interrupted_ && task_)
+ {
+ task_interrupted_ = true;
+ task_->interrupt();
+ }
+ lock.unlock();
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SCHEDULER_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.hpp
new file mode 100644
index 00000000000..c741492c6a1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.hpp
@@ -0,0 +1,102 @@
+//
+// detail/impl/select_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SELECT_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_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_IOCP) \
+ || (!defined(BOOST_ASIO_HAS_DEV_POLL) \
+ && !defined(BOOST_ASIO_HAS_EPOLL) \
+ && !defined(BOOST_ASIO_HAS_KQUEUE) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+void select_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+// Remove a timer queue from the reactor.
+template <typename Time_Traits>
+void select_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void select_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ interrupter_.interrupt();
+}
+
+template <typename Time_Traits>
+std::size_t select_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void select_reactor::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(target, ops);
+ queue.move_timer(target, source);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+ // || (!defined(BOOST_ASIO_HAS_DEV_POLL)
+ // && !defined(BOOST_ASIO_HAS_EPOLL)
+ // && !defined(BOOST_ASIO_HAS_KQUEUE)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.ipp
new file mode 100644
index 00000000000..34d3d9f0319
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/select_reactor.ipp
@@ -0,0 +1,335 @@
+//
+// detail/impl/select_reactor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SELECT_REACTOR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_IPP
+
+#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_IOCP) \
+ || (!defined(BOOST_ASIO_HAS_DEV_POLL) \
+ && !defined(BOOST_ASIO_HAS_EPOLL) \
+ && !defined(BOOST_ASIO_HAS_KQUEUE) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
+
+#include <boost/asio/detail/fd_set_adapter.hpp>
+#include <boost/asio/detail/select_reactor.hpp>
+#include <boost/asio/detail/signal_blocker.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+class select_reactor::thread_function
+{
+public:
+ explicit thread_function(select_reactor* r)
+ : this_(r)
+ {
+ }
+
+ void operator()()
+ {
+ this_->run_thread();
+ }
+
+private:
+ select_reactor* this_;
+};
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+select_reactor::select_reactor(boost::asio::execution_context& ctx)
+ : execution_context_service_base<select_reactor>(ctx),
+ scheduler_(use_service<scheduler_type>(ctx)),
+ mutex_(),
+ interrupter_(),
+#if defined(BOOST_ASIO_HAS_IOCP)
+ stop_thread_(false),
+ thread_(0),
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+ shutdown_(false)
+{
+#if defined(BOOST_ASIO_HAS_IOCP)
+ boost::asio::detail::signal_blocker sb;
+ thread_ = new boost::asio::detail::thread(thread_function(this));
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+}
+
+select_reactor::~select_reactor()
+{
+ shutdown();
+}
+
+void select_reactor::shutdown()
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+#if defined(BOOST_ASIO_HAS_IOCP)
+ stop_thread_ = true;
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+ lock.unlock();
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+ if (thread_)
+ {
+ interrupter_.interrupt();
+ thread_->join();
+ delete thread_;
+ thread_ = 0;
+ }
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+ op_queue<operation> ops;
+
+ for (int i = 0; i < max_ops; ++i)
+ op_queue_[i].get_all_operations(ops);
+
+ timer_queues_.get_all_timers(ops);
+
+ scheduler_.abandon_operations(ops);
+}
+
+void select_reactor::notify_fork(
+ boost::asio::execution_context::fork_event fork_ev)
+{
+ if (fork_ev == boost::asio::execution_context::fork_child)
+ interrupter_.recreate();
+}
+
+void select_reactor::init_task()
+{
+ scheduler_.init_task();
+}
+
+int select_reactor::register_descriptor(socket_type,
+ select_reactor::per_descriptor_data&)
+{
+ return 0;
+}
+
+int select_reactor::register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ select_reactor::per_descriptor_data&, reactor_op* op)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ op_queue_[op_type].enqueue_operation(descriptor, op);
+ interrupter_.interrupt();
+
+ return 0;
+}
+
+void select_reactor::move_descriptor(socket_type,
+ select_reactor::per_descriptor_data&,
+ select_reactor::per_descriptor_data&)
+{
+}
+
+void select_reactor::start_op(int op_type, socket_type descriptor,
+ select_reactor::per_descriptor_data&, reactor_op* op,
+ bool is_continuation, bool)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ bool first = op_queue_[op_type].enqueue_operation(descriptor, op);
+ scheduler_.work_started();
+ if (first)
+ interrupter_.interrupt();
+}
+
+void select_reactor::cancel_ops(socket_type descriptor,
+ select_reactor::per_descriptor_data&)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
+}
+
+void select_reactor::deregister_descriptor(socket_type descriptor,
+ select_reactor::per_descriptor_data&, bool)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ cancel_ops_unlocked(descriptor, boost::asio::error::operation_aborted);
+}
+
+void select_reactor::deregister_internal_descriptor(
+ socket_type descriptor, select_reactor::per_descriptor_data&)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ op_queue_[i].cancel_operations(descriptor, ops);
+}
+
+void select_reactor::cleanup_descriptor_data(
+ select_reactor::per_descriptor_data&)
+{
+}
+
+void select_reactor::run(long usec, op_queue<operation>& ops)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+ // Check if the thread is supposed to stop.
+ if (stop_thread_)
+ return;
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+ // Set up the descriptor sets.
+ for (int i = 0; i < max_select_ops; ++i)
+ fd_sets_[i].reset();
+ fd_sets_[read_op].set(interrupter_.read_descriptor());
+ socket_type max_fd = 0;
+ bool have_work_to_do = !timer_queues_.all_empty();
+ for (int i = 0; i < max_select_ops; ++i)
+ {
+ have_work_to_do = have_work_to_do || !op_queue_[i].empty();
+ fd_sets_[i].set(op_queue_[i], ops);
+ if (fd_sets_[i].max_descriptor() > max_fd)
+ max_fd = fd_sets_[i].max_descriptor();
+ }
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Connection operations on Windows use both except and write fd_sets.
+ have_work_to_do = have_work_to_do || !op_queue_[connect_op].empty();
+ fd_sets_[write_op].set(op_queue_[connect_op], ops);
+ if (fd_sets_[write_op].max_descriptor() > max_fd)
+ max_fd = fd_sets_[write_op].max_descriptor();
+ fd_sets_[except_op].set(op_queue_[connect_op], ops);
+ if (fd_sets_[except_op].max_descriptor() > max_fd)
+ max_fd = fd_sets_[except_op].max_descriptor();
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+ // We can return immediately if there's no work to do and the reactor is
+ // not supposed to block.
+ if (!usec && !have_work_to_do)
+ return;
+
+ // Determine how long to block while waiting for events.
+ timeval tv_buf = { 0, 0 };
+ timeval* tv = usec ? get_timeout(usec, tv_buf) : &tv_buf;
+
+ lock.unlock();
+
+ // Block on the select call until descriptors become ready.
+ boost::system::error_code ec;
+ int retval = socket_ops::select(static_cast<int>(max_fd + 1),
+ fd_sets_[read_op], fd_sets_[write_op], fd_sets_[except_op], tv, ec);
+
+ // Reset the interrupter.
+ if (retval > 0 && fd_sets_[read_op].is_set(interrupter_.read_descriptor()))
+ {
+ interrupter_.reset();
+ --retval;
+ }
+
+ lock.lock();
+
+ // Dispatch all ready operations.
+ if (retval > 0)
+ {
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Connection operations on Windows use both except and write fd_sets.
+ fd_sets_[except_op].perform(op_queue_[connect_op], ops);
+ fd_sets_[write_op].perform(op_queue_[connect_op], ops);
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+ // Exception operations must be processed first to ensure that any
+ // out-of-band data is read before normal data.
+ for (int i = max_select_ops - 1; i >= 0; --i)
+ fd_sets_[i].perform(op_queue_[i], ops);
+ }
+ timer_queues_.get_ready_timers(ops);
+}
+
+void select_reactor::interrupt()
+{
+ interrupter_.interrupt();
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+void select_reactor::run_thread()
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ while (!stop_thread_)
+ {
+ lock.unlock();
+ op_queue<operation> ops;
+ run(true, ops);
+ scheduler_.post_deferred_completions(ops);
+ lock.lock();
+ }
+}
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+void select_reactor::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void select_reactor::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+timeval* select_reactor::get_timeout(long usec, timeval& tv)
+{
+ // By default we will wait no longer than 5 minutes. This will ensure that
+ // any changes to the system clock are detected after no longer than this.
+ const long max_usec = 5 * 60 * 1000 * 1000;
+ usec = timer_queues_.wait_duration_usec(
+ (usec < 0 || max_usec < usec) ? max_usec : usec);
+ tv.tv_sec = usec / 1000000;
+ tv.tv_usec = usec % 1000000;
+ return &tv;
+}
+
+void select_reactor::cancel_ops_unlocked(socket_type descriptor,
+ const boost::system::error_code& ec)
+{
+ bool need_interrupt = false;
+ op_queue<operation> ops;
+ for (int i = 0; i < max_ops; ++i)
+ need_interrupt = op_queue_[i].cancel_operations(
+ descriptor, ops, ec) || need_interrupt;
+ scheduler_.post_deferred_completions(ops);
+ if (need_interrupt)
+ interrupter_.interrupt();
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+ // || (!defined(BOOST_ASIO_HAS_DEV_POLL)
+ // && !defined(BOOST_ASIO_HAS_EPOLL)
+ // && !defined(BOOST_ASIO_HAS_KQUEUE))
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.hpp
new file mode 100644
index 00000000000..e18473c8c8b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.hpp
@@ -0,0 +1,96 @@
+//
+// detail/impl/service_registry.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SERVICE_REGISTRY_HPP
+#define BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Service>
+Service& service_registry::use_service()
+{
+ execution_context::service::key key;
+ init_key<Service>(key, 0);
+ factory_type factory = &service_registry::create<Service, execution_context>;
+ return *static_cast<Service*>(do_use_service(key, factory, &owner_));
+}
+
+template <typename Service>
+Service& service_registry::use_service(io_context& owner)
+{
+ execution_context::service::key key;
+ init_key<Service>(key, 0);
+ factory_type factory = &service_registry::create<Service, io_context>;
+ return *static_cast<Service*>(do_use_service(key, factory, &owner));
+}
+
+template <typename Service>
+void service_registry::add_service(Service* new_service)
+{
+ execution_context::service::key key;
+ init_key<Service>(key, 0);
+ return do_add_service(key, new_service);
+}
+
+template <typename Service>
+bool service_registry::has_service() const
+{
+ execution_context::service::key key;
+ init_key<Service>(key, 0);
+ return do_has_service(key);
+}
+
+template <typename Service>
+inline void service_registry::init_key(
+ execution_context::service::key& key, ...)
+{
+ init_key_from_id(key, Service::id);
+}
+
+#if !defined(BOOST_ASIO_NO_TYPEID)
+template <typename Service>
+void service_registry::init_key(execution_context::service::key& key,
+ typename enable_if<
+ is_base_of<typename Service::key_type, Service>::value>::type*)
+{
+ key.type_info_ = &typeid(typeid_wrapper<Service>);
+ key.id_ = 0;
+}
+
+template <typename Service>
+void service_registry::init_key_from_id(execution_context::service::key& key,
+ const service_id<Service>& /*id*/)
+{
+ key.type_info_ = &typeid(typeid_wrapper<Service>);
+ key.id_ = 0;
+}
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+
+template <typename Service, typename Owner>
+execution_context::service* service_registry::create(void* owner)
+{
+ return new Service(*static_cast<Owner*>(owner));
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.ipp
new file mode 100644
index 00000000000..da920fbc50d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/service_registry.ipp
@@ -0,0 +1,199 @@
+//
+// detail/impl/service_registry.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SERVICE_REGISTRY_IPP
+#define BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <vector>
+#include <boost/asio/detail/service_registry.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+service_registry::service_registry(execution_context& owner)
+ : owner_(owner),
+ first_service_(0)
+{
+}
+
+service_registry::~service_registry()
+{
+}
+
+void service_registry::shutdown_services()
+{
+ execution_context::service* service = first_service_;
+ while (service)
+ {
+ service->shutdown();
+ service = service->next_;
+ }
+}
+
+void service_registry::destroy_services()
+{
+ while (first_service_)
+ {
+ execution_context::service* next_service = first_service_->next_;
+ destroy(first_service_);
+ first_service_ = next_service;
+ }
+}
+
+void service_registry::notify_fork(execution_context::fork_event fork_ev)
+{
+ // Make a copy of all of the services while holding the lock. We don't want
+ // to hold the lock while calling into each service, as it may try to call
+ // back into this class.
+ std::vector<execution_context::service*> services;
+ {
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ execution_context::service* service = first_service_;
+ while (service)
+ {
+ services.push_back(service);
+ service = service->next_;
+ }
+ }
+
+ // If processing the fork_prepare event, we want to go in reverse order of
+ // service registration, which happens to be the existing order of the
+ // services in the vector. For the other events we want to go in the other
+ // direction.
+ std::size_t num_services = services.size();
+ if (fork_ev == execution_context::fork_prepare)
+ for (std::size_t i = 0; i < num_services; ++i)
+ services[i]->notify_fork(fork_ev);
+ else
+ for (std::size_t i = num_services; i > 0; --i)
+ services[i - 1]->notify_fork(fork_ev);
+}
+
+void service_registry::init_key_from_id(execution_context::service::key& key,
+ const execution_context::id& id)
+{
+ key.type_info_ = 0;
+ key.id_ = &id;
+}
+
+bool service_registry::keys_match(
+ const execution_context::service::key& key1,
+ const execution_context::service::key& key2)
+{
+ if (key1.id_ && key2.id_)
+ if (key1.id_ == key2.id_)
+ return true;
+ if (key1.type_info_ && key2.type_info_)
+ if (*key1.type_info_ == *key2.type_info_)
+ return true;
+ return false;
+}
+
+void service_registry::destroy(execution_context::service* service)
+{
+ delete service;
+}
+
+execution_context::service* service_registry::do_use_service(
+ const execution_context::service::key& key,
+ factory_type factory, void* owner)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ // First see if there is an existing service object with the given key.
+ execution_context::service* service = first_service_;
+ while (service)
+ {
+ if (keys_match(service->key_, key))
+ return service;
+ service = service->next_;
+ }
+
+ // Create a new service object. The service registry's mutex is not locked
+ // at this time to allow for nested calls into this function from the new
+ // service's constructor.
+ lock.unlock();
+ auto_service_ptr new_service = { factory(owner) };
+ new_service.ptr_->key_ = key;
+ lock.lock();
+
+ // Check that nobody else created another service object of the same type
+ // while the lock was released.
+ service = first_service_;
+ while (service)
+ {
+ if (keys_match(service->key_, key))
+ return service;
+ service = service->next_;
+ }
+
+ // Service was successfully initialised, pass ownership to registry.
+ new_service.ptr_->next_ = first_service_;
+ first_service_ = new_service.ptr_;
+ new_service.ptr_ = 0;
+ return first_service_;
+}
+
+void service_registry::do_add_service(
+ const execution_context::service::key& key,
+ execution_context::service* new_service)
+{
+ if (&owner_ != &new_service->context())
+ boost::asio::detail::throw_exception(invalid_service_owner());
+
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ // Check if there is an existing service object with the given key.
+ execution_context::service* service = first_service_;
+ while (service)
+ {
+ if (keys_match(service->key_, key))
+ boost::asio::detail::throw_exception(service_already_exists());
+ service = service->next_;
+ }
+
+ // Take ownership of the service object.
+ new_service->key_ = key;
+ new_service->next_ = first_service_;
+ first_service_ = new_service;
+}
+
+bool service_registry::do_has_service(
+ const execution_context::service::key& key) const
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ execution_context::service* service = first_service_;
+ while (service)
+ {
+ if (keys_match(service->key_, key))
+ return true;
+ service = service->next_;
+ }
+
+ return false;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SERVICE_REGISTRY_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/signal_set_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/signal_set_service.ipp
new file mode 100644
index 00000000000..5e23702bb05
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/signal_set_service.ipp
@@ -0,0 +1,669 @@
+//
+// detail/impl/signal_set_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SIGNAL_SET_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_SIGNAL_SET_SERVICE_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 <stdexcept>
+#include <boost/asio/detail/reactor.hpp>
+#include <boost/asio/detail/signal_blocker.hpp>
+#include <boost/asio/detail/signal_set_service.hpp>
+#include <boost/asio/detail/static_mutex.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct signal_state
+{
+ // Mutex used for protecting global state.
+ static_mutex mutex_;
+
+ // The read end of the pipe used for signal notifications.
+ int read_descriptor_;
+
+ // The write end of the pipe used for signal notifications.
+ int write_descriptor_;
+
+ // Whether the signal state has been prepared for a fork.
+ bool fork_prepared_;
+
+ // The head of a linked list of all signal_set_service instances.
+ class signal_set_service* service_list_;
+
+ // A count of the number of objects that are registered for each signal.
+ std::size_t registration_count_[max_signal_number];
+};
+
+signal_state* get_signal_state()
+{
+ static signal_state state = {
+ BOOST_ASIO_STATIC_MUTEX_INIT, -1, -1, false, 0, { 0 } };
+ return &state;
+}
+
+void boost_asio_signal_handler(int signal_number)
+{
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ || defined(__CYGWIN__)
+ signal_set_service::deliver_signal(signal_number);
+#else // defined(BOOST_ASIO_WINDOWS)
+ // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // || defined(__CYGWIN__)
+ int saved_errno = errno;
+ signal_state* state = get_signal_state();
+ signed_size_type result = ::write(state->write_descriptor_,
+ &signal_number, sizeof(signal_number));
+ (void)result;
+ errno = saved_errno;
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // || defined(__CYGWIN__)
+
+#if defined(BOOST_ASIO_HAS_SIGNAL) && !defined(BOOST_ASIO_HAS_SIGACTION)
+ ::signal(signal_number, boost_asio_signal_handler);
+#endif // defined(BOOST_ASIO_HAS_SIGNAL) && !defined(BOOST_ASIO_HAS_SIGACTION)
+}
+
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+class signal_set_service::pipe_read_op : public reactor_op
+{
+public:
+ pipe_read_op()
+ : reactor_op(&pipe_read_op::do_perform, pipe_read_op::do_complete)
+ {
+ }
+
+ static status do_perform(reactor_op*)
+ {
+ signal_state* state = get_signal_state();
+
+ int fd = state->read_descriptor_;
+ int signal_number = 0;
+ while (::read(fd, &signal_number, sizeof(int)) == sizeof(int))
+ if (signal_number >= 0 && signal_number < max_signal_number)
+ signal_set_service::deliver_signal(signal_number);
+
+ return not_done;
+ }
+
+ static void do_complete(void* /*owner*/, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ pipe_read_op* o(static_cast<pipe_read_op*>(base));
+ delete o;
+ }
+};
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+signal_set_service::signal_set_service(execution_context& context)
+ : execution_context_service_base<signal_set_service>(context),
+ scheduler_(boost::asio::use_service<scheduler_impl>(context)),
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ reactor_(boost::asio::use_service<reactor>(context)),
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+ next_(0),
+ prev_(0)
+{
+ get_signal_state()->mutex_.init();
+
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ reactor_.init_task();
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+ for (int i = 0; i < max_signal_number; ++i)
+ registrations_[i] = 0;
+
+ add_service(this);
+}
+
+signal_set_service::~signal_set_service()
+{
+ remove_service(this);
+}
+
+void signal_set_service::shutdown()
+{
+ remove_service(this);
+
+ op_queue<operation> ops;
+
+ for (int i = 0; i < max_signal_number; ++i)
+ {
+ registration* reg = registrations_[i];
+ while (reg)
+ {
+ ops.push(*reg->queue_);
+ reg = reg->next_in_table_;
+ }
+ }
+
+ scheduler_.abandon_operations(ops);
+}
+
+void signal_set_service::notify_fork(execution_context::fork_event fork_ev)
+{
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ switch (fork_ev)
+ {
+ case execution_context::fork_prepare:
+ {
+ int read_descriptor = state->read_descriptor_;
+ state->fork_prepared_ = true;
+ lock.unlock();
+ reactor_.deregister_internal_descriptor(read_descriptor, reactor_data_);
+ reactor_.cleanup_descriptor_data(reactor_data_);
+ }
+ break;
+ case execution_context::fork_parent:
+ if (state->fork_prepared_)
+ {
+ int read_descriptor = state->read_descriptor_;
+ state->fork_prepared_ = false;
+ lock.unlock();
+ reactor_.register_internal_descriptor(reactor::read_op,
+ read_descriptor, reactor_data_, new pipe_read_op);
+ }
+ break;
+ case execution_context::fork_child:
+ if (state->fork_prepared_)
+ {
+ boost::asio::detail::signal_blocker blocker;
+ close_descriptors();
+ open_descriptors();
+ int read_descriptor = state->read_descriptor_;
+ state->fork_prepared_ = false;
+ lock.unlock();
+ reactor_.register_internal_descriptor(reactor::read_op,
+ read_descriptor, reactor_data_, new pipe_read_op);
+ }
+ break;
+ default:
+ break;
+ }
+#else // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+ (void)fork_ev;
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+}
+
+void signal_set_service::construct(
+ signal_set_service::implementation_type& impl)
+{
+ impl.signals_ = 0;
+}
+
+void signal_set_service::destroy(
+ signal_set_service::implementation_type& impl)
+{
+ boost::system::error_code ignored_ec;
+ clear(impl, ignored_ec);
+ cancel(impl, ignored_ec);
+}
+
+boost::system::error_code signal_set_service::add(
+ signal_set_service::implementation_type& impl,
+ int signal_number, boost::system::error_code& ec)
+{
+ // Check that the signal number is valid.
+ if (signal_number < 0 || signal_number >= max_signal_number)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return ec;
+ }
+
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ // Find the appropriate place to insert the registration.
+ registration** insertion_point = &impl.signals_;
+ registration* next = impl.signals_;
+ while (next && next->signal_number_ < signal_number)
+ {
+ insertion_point = &next->next_in_set_;
+ next = next->next_in_set_;
+ }
+
+ // Only do something if the signal is not already registered.
+ if (next == 0 || next->signal_number_ != signal_number)
+ {
+ registration* new_registration = new registration;
+
+#if defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
+ // Register for the signal if we're the first.
+ if (state->registration_count_[signal_number] == 0)
+ {
+# if defined(BOOST_ASIO_HAS_SIGACTION)
+ using namespace std; // For memset.
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = boost_asio_signal_handler;
+ sigfillset(&sa.sa_mask);
+ if (::sigaction(signal_number, &sa, 0) == -1)
+# else // defined(BOOST_ASIO_HAS_SIGACTION)
+ if (::signal(signal_number, boost_asio_signal_handler) == SIG_ERR)
+# endif // defined(BOOST_ASIO_HAS_SIGACTION)
+ {
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::asio::error::invalid_argument;
+# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ delete new_registration;
+ return ec;
+ }
+ }
+#endif // defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
+
+ // Record the new registration in the set.
+ new_registration->signal_number_ = signal_number;
+ new_registration->queue_ = &impl.queue_;
+ new_registration->next_in_set_ = next;
+ *insertion_point = new_registration;
+
+ // Insert registration into the registration table.
+ new_registration->next_in_table_ = registrations_[signal_number];
+ if (registrations_[signal_number])
+ registrations_[signal_number]->prev_in_table_ = new_registration;
+ registrations_[signal_number] = new_registration;
+
+ ++state->registration_count_[signal_number];
+ }
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code signal_set_service::remove(
+ signal_set_service::implementation_type& impl,
+ int signal_number, boost::system::error_code& ec)
+{
+ // Check that the signal number is valid.
+ if (signal_number < 0 || signal_number >= max_signal_number)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return ec;
+ }
+
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ // Find the signal number in the list of registrations.
+ registration** deletion_point = &impl.signals_;
+ registration* reg = impl.signals_;
+ while (reg && reg->signal_number_ < signal_number)
+ {
+ deletion_point = &reg->next_in_set_;
+ reg = reg->next_in_set_;
+ }
+
+ if (reg != 0 && reg->signal_number_ == signal_number)
+ {
+#if defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
+ // Set signal handler back to the default if we're the last.
+ if (state->registration_count_[signal_number] == 1)
+ {
+# if defined(BOOST_ASIO_HAS_SIGACTION)
+ using namespace std; // For memset.
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = SIG_DFL;
+ if (::sigaction(signal_number, &sa, 0) == -1)
+# else // defined(BOOST_ASIO_HAS_SIGACTION)
+ if (::signal(signal_number, SIG_DFL) == SIG_ERR)
+# endif // defined(BOOST_ASIO_HAS_SIGACTION)
+ {
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::asio::error::invalid_argument;
+# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ return ec;
+ }
+ }
+#endif // defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
+
+ // Remove the registration from the set.
+ *deletion_point = reg->next_in_set_;
+
+ // Remove the registration from the registration table.
+ if (registrations_[signal_number] == reg)
+ registrations_[signal_number] = reg->next_in_table_;
+ if (reg->prev_in_table_)
+ reg->prev_in_table_->next_in_table_ = reg->next_in_table_;
+ if (reg->next_in_table_)
+ reg->next_in_table_->prev_in_table_ = reg->prev_in_table_;
+
+ --state->registration_count_[signal_number];
+
+ delete reg;
+ }
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code signal_set_service::clear(
+ signal_set_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ while (registration* reg = impl.signals_)
+ {
+#if defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
+ // Set signal handler back to the default if we're the last.
+ if (state->registration_count_[reg->signal_number_] == 1)
+ {
+# if defined(BOOST_ASIO_HAS_SIGACTION)
+ using namespace std; // For memset.
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = SIG_DFL;
+ if (::sigaction(reg->signal_number_, &sa, 0) == -1)
+# else // defined(BOOST_ASIO_HAS_SIGACTION)
+ if (::signal(reg->signal_number_, SIG_DFL) == SIG_ERR)
+# endif // defined(BOOST_ASIO_HAS_SIGACTION)
+ {
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::asio::error::invalid_argument;
+# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ return ec;
+ }
+ }
+#endif // defined(BOOST_ASIO_HAS_SIGNAL) || defined(BOOST_ASIO_HAS_SIGACTION)
+
+ // Remove the registration from the registration table.
+ if (registrations_[reg->signal_number_] == reg)
+ registrations_[reg->signal_number_] = reg->next_in_table_;
+ if (reg->prev_in_table_)
+ reg->prev_in_table_->next_in_table_ = reg->next_in_table_;
+ if (reg->next_in_table_)
+ reg->next_in_table_->prev_in_table_ = reg->prev_in_table_;
+
+ --state->registration_count_[reg->signal_number_];
+
+ impl.signals_ = reg->next_in_set_;
+ delete reg;
+ }
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code signal_set_service::cancel(
+ signal_set_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(),
+ "signal_set", &impl, 0, "cancel"));
+
+ op_queue<operation> ops;
+ {
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ while (signal_op* op = impl.queue_.front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ impl.queue_.pop();
+ ops.push(op);
+ }
+ }
+
+ scheduler_.post_deferred_completions(ops);
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+void signal_set_service::deliver_signal(int signal_number)
+{
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ signal_set_service* service = state->service_list_;
+ while (service)
+ {
+ op_queue<operation> ops;
+
+ registration* reg = service->registrations_[signal_number];
+ while (reg)
+ {
+ if (reg->queue_->empty())
+ {
+ ++reg->undelivered_;
+ }
+ else
+ {
+ while (signal_op* op = reg->queue_->front())
+ {
+ op->signal_number_ = signal_number;
+ reg->queue_->pop();
+ ops.push(op);
+ }
+ }
+
+ reg = reg->next_in_table_;
+ }
+
+ service->scheduler_.post_deferred_completions(ops);
+
+ service = service->next_;
+ }
+}
+
+void signal_set_service::add_service(signal_set_service* service)
+{
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+ // If this is the first service to be created, open a new pipe.
+ if (state->service_list_ == 0)
+ open_descriptors();
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+ // If a scheduler_ object is thread-unsafe then it must be the only
+ // scheduler used to create signal_set objects.
+ if (state->service_list_ != 0)
+ {
+ if (!BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
+ service->scheduler_.concurrency_hint())
+ || !BOOST_ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
+ state->service_list_->scheduler_.concurrency_hint()))
+ {
+ std::logic_error ex(
+ "Thread-unsafe execution context objects require "
+ "exclusive access to signal handling.");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+ // Insert service into linked list of all services.
+ service->next_ = state->service_list_;
+ service->prev_ = 0;
+ if (state->service_list_)
+ state->service_list_->prev_ = service;
+ state->service_list_ = service;
+
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ // Register for pipe readiness notifications.
+ int read_descriptor = state->read_descriptor_;
+ lock.unlock();
+ service->reactor_.register_internal_descriptor(reactor::read_op,
+ read_descriptor, service->reactor_data_, new pipe_read_op);
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+}
+
+void signal_set_service::remove_service(signal_set_service* service)
+{
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ if (service->next_ || service->prev_ || state->service_list_ == service)
+ {
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ // Disable the pipe readiness notifications.
+ int read_descriptor = state->read_descriptor_;
+ lock.unlock();
+ service->reactor_.deregister_internal_descriptor(
+ read_descriptor, service->reactor_data_);
+ service->reactor_.cleanup_descriptor_data(service->reactor_data_);
+ lock.lock();
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+ // Remove service from linked list of all services.
+ if (state->service_list_ == service)
+ state->service_list_ = service->next_;
+ if (service->prev_)
+ service->prev_->next_ = service->next_;
+ if (service->next_)
+ service->next_->prev_= service->prev_;
+ service->next_ = 0;
+ service->prev_ = 0;
+
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+ // If this is the last service to be removed, close the pipe.
+ if (state->service_list_ == 0)
+ close_descriptors();
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+ }
+}
+
+void signal_set_service::open_descriptors()
+{
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ signal_state* state = get_signal_state();
+
+ int pipe_fds[2];
+ if (::pipe(pipe_fds) == 0)
+ {
+ state->read_descriptor_ = pipe_fds[0];
+ ::fcntl(state->read_descriptor_, F_SETFL, O_NONBLOCK);
+
+ state->write_descriptor_ = pipe_fds[1];
+ ::fcntl(state->write_descriptor_, F_SETFL, O_NONBLOCK);
+
+#if defined(FD_CLOEXEC)
+ ::fcntl(state->read_descriptor_, F_SETFD, FD_CLOEXEC);
+ ::fcntl(state->write_descriptor_, F_SETFD, FD_CLOEXEC);
+#endif // defined(FD_CLOEXEC)
+ }
+ else
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "signal_set_service pipe");
+ }
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+}
+
+void signal_set_service::close_descriptors()
+{
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ signal_state* state = get_signal_state();
+
+ if (state->read_descriptor_ != -1)
+ ::close(state->read_descriptor_);
+ state->read_descriptor_ = -1;
+
+ if (state->write_descriptor_ != -1)
+ ::close(state->write_descriptor_);
+ state->write_descriptor_ = -1;
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+}
+
+void signal_set_service::start_wait_op(
+ signal_set_service::implementation_type& impl, signal_op* op)
+{
+ scheduler_.work_started();
+
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ registration* reg = impl.signals_;
+ while (reg)
+ {
+ if (reg->undelivered_ > 0)
+ {
+ --reg->undelivered_;
+ op->signal_number_ = reg->signal_number_;
+ scheduler_.post_deferred_completion(op);
+ return;
+ }
+
+ reg = reg->next_in_set_;
+ }
+
+ impl.queue_.push(op);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SIGNAL_SET_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_ops.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_ops.ipp
new file mode 100644
index 00000000000..7d7c31fe033
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_ops.ipp
@@ -0,0 +1,3574 @@
+//
+// detail/impl/socket_ops.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+ result = 0;
+ 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)
+ result = 0;
+ 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__) || defined(__QNX__)
+ // 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.70.0/boost/asio/detail/impl/socket_select_interrupter.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_select_interrupter.ipp
new file mode 100644
index 00000000000..e09c5fbeb0e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/socket_select_interrupter.ipp
@@ -0,0 +1,178 @@
+//
+// detail/impl/socket_select_interrupter.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_SOCKET_SELECT_INTERRUPTER_IPP
+#define BOOST_ASIO_DETAIL_IMPL_SOCKET_SELECT_INTERRUPTER_IPP
+
+#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_WINDOWS_RUNTIME)
+
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+
+#include <cstdlib>
+#include <boost/asio/detail/socket_holder.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_select_interrupter.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+socket_select_interrupter::socket_select_interrupter()
+{
+ open_descriptors();
+}
+
+void socket_select_interrupter::open_descriptors()
+{
+ boost::system::error_code ec;
+ socket_holder acceptor(socket_ops::socket(
+ AF_INET, SOCK_STREAM, IPPROTO_TCP, ec));
+ if (acceptor.get() == invalid_socket)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ int opt = 1;
+ socket_ops::state_type acceptor_state = 0;
+ socket_ops::setsockopt(acceptor.get(), acceptor_state,
+ SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt), ec);
+
+ using namespace std; // For memset.
+ sockaddr_in4_type addr;
+ std::size_t addr_len = sizeof(addr);
+ memset(&addr, 0, sizeof(addr));
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
+ addr.sin_port = 0;
+ if (socket_ops::bind(acceptor.get(), (const socket_addr_type*)&addr,
+ addr_len, ec) == socket_error_retval)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ if (socket_ops::getsockname(acceptor.get(), (socket_addr_type*)&addr,
+ &addr_len, ec) == socket_error_retval)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ // Some broken firewalls on Windows will intermittently cause getsockname to
+ // return 0.0.0.0 when the socket is actually bound to 127.0.0.1. We
+ // explicitly specify the target address here to work around this problem.
+ if (addr.sin_addr.s_addr == socket_ops::host_to_network_long(INADDR_ANY))
+ addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
+
+ if (socket_ops::listen(acceptor.get(),
+ SOMAXCONN, ec) == socket_error_retval)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ socket_holder client(socket_ops::socket(
+ AF_INET, SOCK_STREAM, IPPROTO_TCP, ec));
+ if (client.get() == invalid_socket)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ if (socket_ops::connect(client.get(), (const socket_addr_type*)&addr,
+ addr_len, ec) == socket_error_retval)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ socket_holder server(socket_ops::accept(acceptor.get(), 0, 0, ec));
+ if (server.get() == invalid_socket)
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ ioctl_arg_type non_blocking = 1;
+ socket_ops::state_type client_state = 0;
+ if (socket_ops::ioctl(client.get(), client_state,
+ FIONBIO, &non_blocking, ec))
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ opt = 1;
+ socket_ops::setsockopt(client.get(), client_state,
+ IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt), ec);
+
+ non_blocking = 1;
+ socket_ops::state_type server_state = 0;
+ if (socket_ops::ioctl(server.get(), server_state,
+ FIONBIO, &non_blocking, ec))
+ boost::asio::detail::throw_error(ec, "socket_select_interrupter");
+
+ opt = 1;
+ socket_ops::setsockopt(server.get(), server_state,
+ IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt), ec);
+
+ read_descriptor_ = server.release();
+ write_descriptor_ = client.release();
+}
+
+socket_select_interrupter::~socket_select_interrupter()
+{
+ close_descriptors();
+}
+
+void socket_select_interrupter::close_descriptors()
+{
+ boost::system::error_code ec;
+ socket_ops::state_type state = socket_ops::internal_non_blocking;
+ if (read_descriptor_ != invalid_socket)
+ socket_ops::close(read_descriptor_, state, true, ec);
+ if (write_descriptor_ != invalid_socket)
+ socket_ops::close(write_descriptor_, state, true, ec);
+}
+
+void socket_select_interrupter::recreate()
+{
+ close_descriptors();
+
+ write_descriptor_ = invalid_socket;
+ read_descriptor_ = invalid_socket;
+
+ open_descriptors();
+}
+
+void socket_select_interrupter::interrupt()
+{
+ char byte = 0;
+ socket_ops::buf b;
+ socket_ops::init_buf(b, &byte, 1);
+ boost::system::error_code ec;
+ socket_ops::send(write_descriptor_, &b, 1, 0, ec);
+}
+
+bool socket_select_interrupter::reset()
+{
+ char data[1024];
+ socket_ops::buf b;
+ socket_ops::init_buf(b, data, sizeof(data));
+ boost::system::error_code ec;
+ int bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
+ bool was_interrupted = (bytes_read > 0);
+ while (bytes_read == sizeof(data))
+ bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
+ return was_interrupted;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_SOCKET_SELECT_INTERRUPTER_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.hpp
new file mode 100644
index 00000000000..67eb8361dd4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.hpp
@@ -0,0 +1,181 @@
+//
+// detail/impl/strand_executor_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_STRAND_EXECUTOR_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/call_stack.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/executor_work_guard.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Executor>
+class strand_executor_service::invoker
+{
+public:
+ invoker(const implementation_type& impl, Executor& ex)
+ : impl_(impl),
+ work_(ex)
+ {
+ }
+
+ invoker(const invoker& other)
+ : impl_(other.impl_),
+ work_(other.work_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ invoker(invoker&& other)
+ : impl_(BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_)),
+ work_(BOOST_ASIO_MOVE_CAST(executor_work_guard<Executor>)(other.work_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ struct on_invoker_exit
+ {
+ invoker* this_;
+
+ ~on_invoker_exit()
+ {
+ this_->impl_->mutex_->lock();
+ this_->impl_->ready_queue_.push(this_->impl_->waiting_queue_);
+ bool more_handlers = this_->impl_->locked_ =
+ !this_->impl_->ready_queue_.empty();
+ this_->impl_->mutex_->unlock();
+
+ if (more_handlers)
+ {
+ Executor ex(this_->work_.get_executor());
+ recycling_allocator<void> allocator;
+ ex.post(BOOST_ASIO_MOVE_CAST(invoker)(*this_), allocator);
+ }
+ }
+ };
+
+ void operator()()
+ {
+ // Indicate that this strand is executing on the current thread.
+ call_stack<strand_impl>::context ctx(impl_.get());
+
+ // Ensure the next handler, if any, is scheduled on block exit.
+ on_invoker_exit on_exit = { this };
+ (void)on_exit;
+
+ // Run all ready handlers. No lock is required since the ready queue is
+ // accessed only within the strand.
+ boost::system::error_code ec;
+ while (scheduler_operation* o = impl_->ready_queue_.front())
+ {
+ impl_->ready_queue_.pop();
+ o->complete(impl_.get(), ec, 0);
+ }
+ }
+
+private:
+ implementation_type impl_;
+ executor_work_guard<Executor> work_;
+};
+
+template <typename Executor, typename Function, typename Allocator>
+void strand_executor_service::dispatch(const implementation_type& impl,
+ Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a)
+{
+ typedef typename decay<Function>::type function_type;
+
+ // If we are already in the strand then the function can run immediately.
+ if (call_stack<strand_impl>::contains(impl.get()))
+ {
+ // Make a local, non-const copy of the function.
+ function_type tmp(BOOST_ASIO_MOVE_CAST(Function)(function));
+
+ fenced_block b(fenced_block::full);
+ boost_asio_handler_invoke_helpers::invoke(tmp, tmp);
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the function.
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(function), a);
+
+ BOOST_ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
+ "strand_executor", impl.get(), 0, "dispatch"));
+
+ // Add the function to the strand and schedule the strand if required.
+ bool first = enqueue(impl, p.p);
+ p.v = p.p = 0;
+ if (first)
+ ex.dispatch(invoker<Executor>(impl, ex), a);
+}
+
+// Request invocation of the given function and return immediately.
+template <typename Executor, typename Function, typename Allocator>
+void strand_executor_service::post(const implementation_type& impl,
+ Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a)
+{
+ typedef typename decay<Function>::type function_type;
+
+ // Allocate and construct an operation to wrap the function.
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(function), a);
+
+ BOOST_ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
+ "strand_executor", impl.get(), 0, "post"));
+
+ // Add the function to the strand and schedule the strand if required.
+ bool first = enqueue(impl, p.p);
+ p.v = p.p = 0;
+ if (first)
+ ex.post(invoker<Executor>(impl, ex), a);
+}
+
+// Request invocation of the given function and return immediately.
+template <typename Executor, typename Function, typename Allocator>
+void strand_executor_service::defer(const implementation_type& impl,
+ Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a)
+{
+ typedef typename decay<Function>::type function_type;
+
+ // Allocate and construct an operation to wrap the function.
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(function), a);
+
+ BOOST_ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
+ "strand_executor", impl.get(), 0, "defer"));
+
+ // Add the function to the strand and schedule the strand if required.
+ bool first = enqueue(impl, p.p);
+ p.v = p.p = 0;
+ if (first)
+ ex.defer(invoker<Executor>(impl, ex), a);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.ipp
new file mode 100644
index 00000000000..60681ea2f26
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_executor_service.ipp
@@ -0,0 +1,136 @@
+//
+// detail/impl/strand_executor_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_STRAND_EXECUTOR_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_IPP
+
+#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/strand_executor_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+strand_executor_service::strand_executor_service(execution_context& ctx)
+ : execution_context_service_base<strand_executor_service>(ctx),
+ mutex_(),
+ salt_(0),
+ impl_list_(0)
+{
+}
+
+void strand_executor_service::shutdown()
+{
+ op_queue<scheduler_operation> ops;
+
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ strand_impl* impl = impl_list_;
+ while (impl)
+ {
+ impl->mutex_->lock();
+ impl->shutdown_ = true;
+ ops.push(impl->waiting_queue_);
+ ops.push(impl->ready_queue_);
+ impl->mutex_->unlock();
+ impl = impl->next_;
+ }
+}
+
+strand_executor_service::implementation_type
+strand_executor_service::create_implementation()
+{
+ implementation_type new_impl(new strand_impl);
+ new_impl->locked_ = false;
+ new_impl->shutdown_ = false;
+
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ // Select a mutex from the pool of shared mutexes.
+ std::size_t salt = salt_++;
+ std::size_t mutex_index = reinterpret_cast<std::size_t>(new_impl.get());
+ mutex_index += (reinterpret_cast<std::size_t>(new_impl.get()) >> 3);
+ mutex_index ^= salt + 0x9e3779b9 + (mutex_index << 6) + (mutex_index >> 2);
+ mutex_index = mutex_index % num_mutexes;
+ if (!mutexes_[mutex_index].get())
+ mutexes_[mutex_index].reset(new mutex);
+ new_impl->mutex_ = mutexes_[mutex_index].get();
+
+ // Insert implementation into linked list of all implementations.
+ new_impl->next_ = impl_list_;
+ new_impl->prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = new_impl.get();
+ impl_list_ = new_impl.get();
+ new_impl->service_ = this;
+
+ return new_impl;
+}
+
+strand_executor_service::strand_impl::~strand_impl()
+{
+ boost::asio::detail::mutex::scoped_lock lock(service_->mutex_);
+
+ // Remove implementation from linked list of all implementations.
+ if (service_->impl_list_ == this)
+ service_->impl_list_ = next_;
+ if (prev_)
+ prev_->next_ = next_;
+ if (next_)
+ next_->prev_= prev_;
+}
+
+bool strand_executor_service::enqueue(const implementation_type& impl,
+ scheduler_operation* op)
+{
+ impl->mutex_->lock();
+ if (impl->shutdown_)
+ {
+ impl->mutex_->unlock();
+ op->destroy();
+ return false;
+ }
+ else if (impl->locked_)
+ {
+ // Some other function already holds the strand lock. Enqueue for later.
+ impl->waiting_queue_.push(op);
+ impl->mutex_->unlock();
+ return false;
+ }
+ else
+ {
+ // The function is acquiring the strand lock and so is responsible for
+ // scheduling the strand.
+ impl->locked_ = true;
+ impl->mutex_->unlock();
+ impl->ready_queue_.push(op);
+ return true;
+ }
+}
+
+bool strand_executor_service::running_in_this_thread(
+ const implementation_type& impl)
+{
+ return !!call_stack<strand_impl>::contains(impl.get());
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_EXECUTOR_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.hpp
new file mode 100644
index 00000000000..7e82876ea22
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.hpp
@@ -0,0 +1,120 @@
+//
+// detail/impl/strand_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_STRAND_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/call_stack.hpp>
+#include <boost/asio/detail/completion_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+inline strand_service::strand_impl::strand_impl()
+ : operation(&strand_service::do_complete),
+ locked_(false)
+{
+}
+
+struct strand_service::on_dispatch_exit
+{
+ io_context_impl* io_context_;
+ strand_impl* impl_;
+
+ ~on_dispatch_exit()
+ {
+ impl_->mutex_.lock();
+ impl_->ready_queue_.push(impl_->waiting_queue_);
+ bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty();
+ impl_->mutex_.unlock();
+
+ if (more_handlers)
+ io_context_->post_immediate_completion(impl_, false);
+ }
+};
+
+template <typename Handler>
+void strand_service::dispatch(strand_service::implementation_type& impl,
+ Handler& handler)
+{
+ // If we are already in the strand then the handler can run immediately.
+ if (call_stack<strand_impl>::contains(impl))
+ {
+ fenced_block b(fenced_block::full);
+ boost_asio_handler_invoke_helpers::invoke(handler, handler);
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef completion_handler<Handler> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler);
+
+ BOOST_ASIO_HANDLER_CREATION((this->context(),
+ *p.p, "strand", impl, 0, "dispatch"));
+
+ bool dispatch_immediately = do_dispatch(impl, p.p);
+ operation* o = p.p;
+ p.v = p.p = 0;
+
+ if (dispatch_immediately)
+ {
+ // Indicate that this strand is executing on the current thread.
+ call_stack<strand_impl>::context ctx(impl);
+
+ // Ensure the next handler, if any, is scheduled on block exit.
+ on_dispatch_exit on_exit = { &io_context_, impl };
+ (void)on_exit;
+
+ completion_handler<Handler>::do_complete(
+ &io_context_, o, boost::system::error_code(), 0);
+ }
+}
+
+// Request the io_context to invoke the given handler and return immediately.
+template <typename Handler>
+void strand_service::post(strand_service::implementation_type& impl,
+ Handler& handler)
+{
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef completion_handler<Handler> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler);
+
+ BOOST_ASIO_HANDLER_CREATION((this->context(),
+ *p.p, "strand", impl, 0, "post"));
+
+ do_post(impl, p.p, is_continuation);
+ p.v = p.p = 0;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.ipp
new file mode 100644
index 00000000000..340f310bf62
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/strand_service.ipp
@@ -0,0 +1,179 @@
+//
+// detail/impl/strand_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_STRAND_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_IPP
+
+#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/call_stack.hpp>
+#include <boost/asio/detail/strand_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct strand_service::on_do_complete_exit
+{
+ io_context_impl* owner_;
+ strand_impl* impl_;
+
+ ~on_do_complete_exit()
+ {
+ impl_->mutex_.lock();
+ impl_->ready_queue_.push(impl_->waiting_queue_);
+ bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty();
+ impl_->mutex_.unlock();
+
+ if (more_handlers)
+ owner_->post_immediate_completion(impl_, true);
+ }
+};
+
+strand_service::strand_service(boost::asio::io_context& io_context)
+ : boost::asio::detail::service_base<strand_service>(io_context),
+ io_context_(boost::asio::use_service<io_context_impl>(io_context)),
+ mutex_(),
+ salt_(0)
+{
+}
+
+void strand_service::shutdown()
+{
+ op_queue<operation> ops;
+
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ for (std::size_t i = 0; i < num_implementations; ++i)
+ {
+ if (strand_impl* impl = implementations_[i].get())
+ {
+ ops.push(impl->waiting_queue_);
+ ops.push(impl->ready_queue_);
+ }
+ }
+}
+
+void strand_service::construct(strand_service::implementation_type& impl)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ std::size_t salt = salt_++;
+#if defined(BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
+ std::size_t index = salt;
+#else // defined(BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
+ std::size_t index = reinterpret_cast<std::size_t>(&impl);
+ index += (reinterpret_cast<std::size_t>(&impl) >> 3);
+ index ^= salt + 0x9e3779b9 + (index << 6) + (index >> 2);
+#endif // defined(BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
+ index = index % num_implementations;
+
+ if (!implementations_[index].get())
+ implementations_[index].reset(new strand_impl);
+ impl = implementations_[index].get();
+}
+
+bool strand_service::running_in_this_thread(
+ const implementation_type& impl) const
+{
+ return call_stack<strand_impl>::contains(impl) != 0;
+}
+
+bool strand_service::do_dispatch(implementation_type& impl, operation* op)
+{
+ // If we are running inside the io_context, and no other handler already
+ // holds the strand lock, then the handler can run immediately.
+ bool can_dispatch = io_context_.can_dispatch();
+ impl->mutex_.lock();
+ if (can_dispatch && !impl->locked_)
+ {
+ // Immediate invocation is allowed.
+ impl->locked_ = true;
+ impl->mutex_.unlock();
+ return true;
+ }
+
+ if (impl->locked_)
+ {
+ // Some other handler already holds the strand lock. Enqueue for later.
+ impl->waiting_queue_.push(op);
+ impl->mutex_.unlock();
+ }
+ else
+ {
+ // The handler is acquiring the strand lock and so is responsible for
+ // scheduling the strand.
+ impl->locked_ = true;
+ impl->mutex_.unlock();
+ impl->ready_queue_.push(op);
+ io_context_.post_immediate_completion(impl, false);
+ }
+
+ return false;
+}
+
+void strand_service::do_post(implementation_type& impl,
+ operation* op, bool is_continuation)
+{
+ impl->mutex_.lock();
+ if (impl->locked_)
+ {
+ // Some other handler already holds the strand lock. Enqueue for later.
+ impl->waiting_queue_.push(op);
+ impl->mutex_.unlock();
+ }
+ else
+ {
+ // The handler is acquiring the strand lock and so is responsible for
+ // scheduling the strand.
+ impl->locked_ = true;
+ impl->mutex_.unlock();
+ impl->ready_queue_.push(op);
+ io_context_.post_immediate_completion(impl, is_continuation);
+ }
+}
+
+void strand_service::do_complete(void* owner, operation* base,
+ const boost::system::error_code& ec, std::size_t /*bytes_transferred*/)
+{
+ if (owner)
+ {
+ strand_impl* impl = static_cast<strand_impl*>(base);
+
+ // Indicate that this strand is executing on the current thread.
+ call_stack<strand_impl>::context ctx(impl);
+
+ // Ensure the next handler, if any, is scheduled on block exit.
+ on_do_complete_exit on_exit;
+ on_exit.owner_ = static_cast<io_context_impl*>(owner);
+ on_exit.impl_ = impl;
+
+ // Run all ready handlers. No lock is required since the ready queue is
+ // accessed only within the strand.
+ while (operation* o = impl->ready_queue_.front())
+ {
+ impl->ready_queue_.pop();
+ o->complete(owner, ec, 0);
+ }
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/throw_error.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/throw_error.ipp
new file mode 100644
index 00000000000..9483bd0f594
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/throw_error.ipp
@@ -0,0 +1,47 @@
+//
+// detail/impl/throw_error.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_THROW_ERROR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP
+
+#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/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/system/system_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+void do_throw_error(const boost::system::error_code& err)
+{
+ boost::system::system_error e(err);
+ boost::asio::detail::throw_exception(e);
+}
+
+void do_throw_error(const boost::system::error_code& err, const char* location)
+{
+ boost::system::system_error e(err, location);
+ boost::asio::detail::throw_exception(e);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_ptime.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_ptime.ipp
new file mode 100644
index 00000000000..2566c9c2ca5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_ptime.ipp
@@ -0,0 +1,93 @@
+//
+// detail/impl/timer_queue_ptime.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_TIMER_QUEUE_PTIME_IPP
+#define BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
+
+#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_BOOST_DATE_TIME)
+
+#include <boost/asio/detail/timer_queue_ptime.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+timer_queue<time_traits<boost::posix_time::ptime> >::timer_queue()
+{
+}
+
+timer_queue<time_traits<boost::posix_time::ptime> >::~timer_queue()
+{
+}
+
+bool timer_queue<time_traits<boost::posix_time::ptime> >::enqueue_timer(
+ const time_type& time, per_timer_data& timer, wait_op* op)
+{
+ return impl_.enqueue_timer(time, timer, op);
+}
+
+bool timer_queue<time_traits<boost::posix_time::ptime> >::empty() const
+{
+ return impl_.empty();
+}
+
+long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_msec(
+ long max_duration) const
+{
+ return impl_.wait_duration_msec(max_duration);
+}
+
+long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_usec(
+ long max_duration) const
+{
+ return impl_.wait_duration_usec(max_duration);
+}
+
+void timer_queue<time_traits<boost::posix_time::ptime> >::get_ready_timers(
+ op_queue<operation>& ops)
+{
+ impl_.get_ready_timers(ops);
+}
+
+void timer_queue<time_traits<boost::posix_time::ptime> >::get_all_timers(
+ op_queue<operation>& ops)
+{
+ impl_.get_all_timers(ops);
+}
+
+std::size_t timer_queue<time_traits<boost::posix_time::ptime> >::cancel_timer(
+ per_timer_data& timer, op_queue<operation>& ops, std::size_t max_cancelled)
+{
+ return impl_.cancel_timer(timer, ops, max_cancelled);
+}
+
+void timer_queue<time_traits<boost::posix_time::ptime> >::move_timer(
+ per_timer_data& target, per_timer_data& source)
+{
+ impl_.move_timer(target, source);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_PTIME_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_set.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_set.ipp
new file mode 100644
index 00000000000..b738142f287
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/timer_queue_set.ipp
@@ -0,0 +1,103 @@
+//
+// detail/impl/timer_queue_set.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_TIMER_QUEUE_SET_IPP
+#define BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP
+
+#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/timer_queue_set.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+timer_queue_set::timer_queue_set()
+ : first_(0)
+{
+}
+
+void timer_queue_set::insert(timer_queue_base* q)
+{
+ q->next_ = first_;
+ first_ = q;
+}
+
+void timer_queue_set::erase(timer_queue_base* q)
+{
+ if (first_)
+ {
+ if (q == first_)
+ {
+ first_ = q->next_;
+ q->next_ = 0;
+ return;
+ }
+
+ for (timer_queue_base* p = first_; p->next_; p = p->next_)
+ {
+ if (p->next_ == q)
+ {
+ p->next_ = q->next_;
+ q->next_ = 0;
+ return;
+ }
+ }
+ }
+}
+
+bool timer_queue_set::all_empty() const
+{
+ for (timer_queue_base* p = first_; p; p = p->next_)
+ if (!p->empty())
+ return false;
+ return true;
+}
+
+long timer_queue_set::wait_duration_msec(long max_duration) const
+{
+ long min_duration = max_duration;
+ for (timer_queue_base* p = first_; p; p = p->next_)
+ min_duration = p->wait_duration_msec(min_duration);
+ return min_duration;
+}
+
+long timer_queue_set::wait_duration_usec(long max_duration) const
+{
+ long min_duration = max_duration;
+ for (timer_queue_base* p = first_; p; p = p->next_)
+ min_duration = p->wait_duration_usec(min_duration);
+ return min_duration;
+}
+
+void timer_queue_set::get_ready_timers(op_queue<operation>& ops)
+{
+ for (timer_queue_base* p = first_; p; p = p->next_)
+ p->get_ready_timers(ops);
+}
+
+void timer_queue_set::get_all_timers(op_queue<operation>& ops)
+{
+ for (timer_queue_base* p = first_; p; p = p->next_)
+ p->get_all_timers(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IMPL_TIMER_QUEUE_SET_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_event.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_event.ipp
new file mode 100644
index 00000000000..c6e1e3582f4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_event.ipp
@@ -0,0 +1,78 @@
+//
+// detail/win_event.ipp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_EVENT_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_EVENT_IPP
+
+#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_WINDOWS)
+
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_event.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+win_event::win_event()
+ : state_(0)
+{
+#if defined(BOOST_ASIO_WINDOWS_APP)
+ events_[0] = ::CreateEventExW(0, 0,
+ CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
+#else // defined(BOOST_ASIO_WINDOWS_APP)
+ events_[0] = ::CreateEventW(0, true, false, 0);
+#endif // defined(BOOST_ASIO_WINDOWS_APP)
+ if (!events_[0])
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "event");
+ }
+
+#if defined(BOOST_ASIO_WINDOWS_APP)
+ events_[1] = ::CreateEventExW(0, 0, 0, EVENT_ALL_ACCESS);
+#else // defined(BOOST_ASIO_WINDOWS_APP)
+ events_[1] = ::CreateEventW(0, false, false, 0);
+#endif // defined(BOOST_ASIO_WINDOWS_APP)
+ if (!events_[1])
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(events_[0]);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "event");
+ }
+}
+
+win_event::~win_event()
+{
+ ::CloseHandle(events_[0]);
+ ::CloseHandle(events_[1]);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_EVENT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_handle_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_handle_service.ipp
new file mode 100644
index 00000000000..1256c358acc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_handle_service.ipp
@@ -0,0 +1,526 @@
+//
+// detail/impl/win_iocp_handle_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_WIN_IOCP_HANDLE_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_HANDLE_SERVICE_IPP
+
+#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_IOCP)
+
+#include <boost/asio/detail/win_iocp_handle_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_iocp_handle_service::overlapped_wrapper
+ : public OVERLAPPED
+{
+public:
+ explicit overlapped_wrapper(boost::system::error_code& ec)
+ {
+ Internal = 0;
+ InternalHigh = 0;
+ Offset = 0;
+ OffsetHigh = 0;
+
+ // Create a non-signalled manual-reset event, for GetOverlappedResult.
+ hEvent = ::CreateEventW(0, TRUE, FALSE, 0);
+ if (hEvent)
+ {
+ // As documented in GetQueuedCompletionStatus, setting the low order
+ // bit of this event prevents our synchronous writes from being treated
+ // as completion port events.
+ DWORD_PTR tmp = reinterpret_cast<DWORD_PTR>(hEvent);
+ hEvent = reinterpret_cast<HANDLE>(tmp | 1);
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ }
+
+ ~overlapped_wrapper()
+ {
+ if (hEvent)
+ {
+ ::CloseHandle(hEvent);
+ }
+ }
+};
+
+win_iocp_handle_service::win_iocp_handle_service(execution_context& context)
+ : execution_context_service_base<win_iocp_handle_service>(context),
+ iocp_service_(boost::asio::use_service<win_iocp_io_context>(context)),
+ mutex_(),
+ impl_list_(0)
+{
+}
+
+void win_iocp_handle_service::shutdown()
+{
+ // Close all implementations, causing all operations to complete.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ implementation_type* impl = impl_list_;
+ while (impl)
+ {
+ close_for_destruction(*impl);
+ impl = impl->next_;
+ }
+}
+
+void win_iocp_handle_service::construct(
+ win_iocp_handle_service::implementation_type& impl)
+{
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ impl.safe_cancellation_thread_id_ = 0;
+
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+void win_iocp_handle_service::move_construct(
+ win_iocp_handle_service::implementation_type& impl,
+ win_iocp_handle_service::implementation_type& other_impl)
+{
+ impl.handle_ = other_impl.handle_;
+ other_impl.handle_ = INVALID_HANDLE_VALUE;
+
+ impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
+ other_impl.safe_cancellation_thread_id_ = 0;
+
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+void win_iocp_handle_service::move_assign(
+ win_iocp_handle_service::implementation_type& impl,
+ win_iocp_handle_service& other_service,
+ win_iocp_handle_service::implementation_type& other_impl)
+{
+ close_for_destruction(impl);
+
+ if (this != &other_service)
+ {
+ // Remove implementation from linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+ }
+
+ impl.handle_ = other_impl.handle_;
+ other_impl.handle_ = INVALID_HANDLE_VALUE;
+
+ impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
+ other_impl.safe_cancellation_thread_id_ = 0;
+
+ if (this != &other_service)
+ {
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(other_service.mutex_);
+ impl.next_ = other_service.impl_list_;
+ impl.prev_ = 0;
+ if (other_service.impl_list_)
+ other_service.impl_list_->prev_ = &impl;
+ other_service.impl_list_ = &impl;
+ }
+}
+
+void win_iocp_handle_service::destroy(
+ win_iocp_handle_service::implementation_type& impl)
+{
+ close_for_destruction(impl);
+
+ // Remove implementation from linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+}
+
+boost::system::error_code win_iocp_handle_service::assign(
+ win_iocp_handle_service::implementation_type& impl,
+ const native_handle_type& handle, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ if (iocp_service_.register_handle(handle, ec))
+ return ec;
+
+ impl.handle_ = handle;
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code win_iocp_handle_service::close(
+ win_iocp_handle_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(), "handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.handle_), "close"));
+
+ if (!::CloseHandle(impl.handle_))
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ impl.safe_cancellation_thread_id_ = 0;
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+
+ return ec;
+}
+
+boost::system::error_code win_iocp_handle_service::cancel(
+ win_iocp_handle_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return ec;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(), "handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.handle_), "cancel"));
+
+ if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
+ ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
+ {
+ // The version of Windows supports cancellation from any thread.
+ typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
+ cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
+ if (!cancel_io_ex(impl.handle_, 0))
+ {
+ DWORD last_error = ::GetLastError();
+ if (last_error == ERROR_NOT_FOUND)
+ {
+ // ERROR_NOT_FOUND means that there were no operations to be
+ // cancelled. We swallow this error to match the behaviour on other
+ // platforms.
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+ }
+ else if (impl.safe_cancellation_thread_id_ == 0)
+ {
+ // No operations have been started, so there's nothing to cancel.
+ ec = boost::system::error_code();
+ }
+ else if (impl.safe_cancellation_thread_id_ == ::GetCurrentThreadId())
+ {
+ // Asynchronous operations have been started from the current thread only,
+ // so it is safe to try to cancel them using CancelIo.
+ if (!::CancelIo(impl.handle_))
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+ }
+ else
+ {
+ // Asynchronous operations have been started from more than one thread,
+ // so cancellation is not safe.
+ ec = boost::asio::error::operation_not_supported;
+ }
+
+ return ec;
+}
+
+size_t win_iocp_handle_service::do_write(
+ win_iocp_handle_service::implementation_type& impl, uint64_t offset,
+ const boost::asio::const_buffer& buffer, boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a handle is a no-op.
+ if (buffer.size() == 0)
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ overlapped_wrapper overlapped(ec);
+ if (ec)
+ {
+ return 0;
+ }
+
+ // Write the data.
+ overlapped.Offset = offset & 0xFFFFFFFF;
+ overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
+ BOOL ok = ::WriteFile(impl.handle_, buffer.data(),
+ static_cast<DWORD>(buffer.size()), 0, &overlapped);
+ if (!ok)
+ {
+ DWORD last_error = ::GetLastError();
+ if (last_error != ERROR_IO_PENDING)
+ {
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return 0;
+ }
+ }
+
+ // Wait for the operation to complete.
+ DWORD bytes_transferred = 0;
+ ok = ::GetOverlappedResult(impl.handle_,
+ &overlapped, &bytes_transferred, TRUE);
+ if (!ok)
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return 0;
+ }
+
+ ec = boost::system::error_code();
+ return bytes_transferred;
+}
+
+void win_iocp_handle_service::start_write_op(
+ win_iocp_handle_service::implementation_type& impl, uint64_t offset,
+ const boost::asio::const_buffer& buffer, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (!is_open(impl))
+ {
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ }
+ else if (buffer.size() == 0)
+ {
+ // A request to write 0 bytes on a handle is a no-op.
+ iocp_service_.on_completion(op);
+ }
+ else
+ {
+ DWORD bytes_transferred = 0;
+ op->Offset = offset & 0xFFFFFFFF;
+ op->OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
+ BOOL ok = ::WriteFile(impl.handle_, buffer.data(),
+ static_cast<DWORD>(buffer.size()),
+ &bytes_transferred, op);
+ DWORD last_error = ::GetLastError();
+ if (!ok && last_error != ERROR_IO_PENDING
+ && last_error != ERROR_MORE_DATA)
+ {
+ iocp_service_.on_completion(op, last_error, bytes_transferred);
+ }
+ else
+ {
+ iocp_service_.on_pending(op);
+ }
+ }
+}
+
+size_t win_iocp_handle_service::do_read(
+ win_iocp_handle_service::implementation_type& impl, uint64_t offset,
+ const boost::asio::mutable_buffer& buffer, boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream handle is a no-op.
+ if (buffer.size() == 0)
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ overlapped_wrapper overlapped(ec);
+ if (ec)
+ {
+ return 0;
+ }
+
+ // Read some data.
+ overlapped.Offset = offset & 0xFFFFFFFF;
+ overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
+ BOOL ok = ::ReadFile(impl.handle_, buffer.data(),
+ static_cast<DWORD>(buffer.size()), 0, &overlapped);
+ if (!ok)
+ {
+ DWORD last_error = ::GetLastError();
+ if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
+ {
+ if (last_error == ERROR_HANDLE_EOF)
+ {
+ ec = boost::asio::error::eof;
+ }
+ else
+ {
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ return 0;
+ }
+ }
+
+ // Wait for the operation to complete.
+ DWORD bytes_transferred = 0;
+ ok = ::GetOverlappedResult(impl.handle_,
+ &overlapped, &bytes_transferred, TRUE);
+ if (!ok)
+ {
+ DWORD last_error = ::GetLastError();
+ if (last_error == ERROR_HANDLE_EOF)
+ {
+ ec = boost::asio::error::eof;
+ }
+ else
+ {
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ return (last_error == ERROR_MORE_DATA) ? bytes_transferred : 0;
+ }
+
+ ec = boost::system::error_code();
+ return bytes_transferred;
+}
+
+void win_iocp_handle_service::start_read_op(
+ win_iocp_handle_service::implementation_type& impl, uint64_t offset,
+ const boost::asio::mutable_buffer& buffer, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (!is_open(impl))
+ {
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ }
+ else if (buffer.size() == 0)
+ {
+ // A request to read 0 bytes on a handle is a no-op.
+ iocp_service_.on_completion(op);
+ }
+ else
+ {
+ DWORD bytes_transferred = 0;
+ op->Offset = offset & 0xFFFFFFFF;
+ op->OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
+ BOOL ok = ::ReadFile(impl.handle_, buffer.data(),
+ static_cast<DWORD>(buffer.size()),
+ &bytes_transferred, op);
+ DWORD last_error = ::GetLastError();
+ if (!ok && last_error != ERROR_IO_PENDING
+ && last_error != ERROR_MORE_DATA)
+ {
+ iocp_service_.on_completion(op, last_error, bytes_transferred);
+ }
+ else
+ {
+ iocp_service_.on_pending(op);
+ }
+ }
+}
+
+void win_iocp_handle_service::update_cancellation_thread_id(
+ win_iocp_handle_service::implementation_type& impl)
+{
+ if (impl.safe_cancellation_thread_id_ == 0)
+ impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId();
+ else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId())
+ impl.safe_cancellation_thread_id_ = ~DWORD(0);
+}
+
+void win_iocp_handle_service::close_for_destruction(implementation_type& impl)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(), "handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.handle_), "close"));
+
+ ::CloseHandle(impl.handle_);
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ impl.safe_cancellation_thread_id_ = 0;
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_HANDLE_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.hpp
new file mode 100644
index 00000000000..830a07dcd9c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.hpp
@@ -0,0 +1,105 @@
+//
+// detail/impl/win_iocp_io_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_IOCP_IO_CONTEXT_HPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_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_IOCP)
+
+#include <boost/asio/detail/completion_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+void win_iocp_io_context::add_timer_queue(
+ timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void win_iocp_io_context::remove_timer_queue(
+ timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void win_iocp_io_context::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ // If the service has been shut down we silently discard the timer.
+ if (::InterlockedExchangeAdd(&shutdown_, 0) != 0)
+ {
+ post_immediate_completion(op, false);
+ return;
+ }
+
+ mutex::scoped_lock lock(dispatch_mutex_);
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ work_started();
+ if (earliest)
+ update_timeout();
+}
+
+template <typename Time_Traits>
+std::size_t win_iocp_io_context::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ // If the service has been shut down we silently ignore the cancellation.
+ if (::InterlockedExchangeAdd(&shutdown_, 0) != 0)
+ return 0;
+
+ mutex::scoped_lock lock(dispatch_mutex_);
+ op_queue<win_iocp_operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void win_iocp_io_context::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& to,
+ typename timer_queue<Time_Traits>::per_timer_data& from)
+{
+ boost::asio::detail::mutex::scoped_lock lock(dispatch_mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(to, ops);
+ queue.move_timer(to, from);
+ lock.unlock();
+ post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.ipp
new file mode 100644
index 00000000000..5bdc5409724
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_io_context.ipp
@@ -0,0 +1,595 @@
+//
+// detail/impl/win_iocp_io_context.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_IOCP_IO_CONTEXT_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_IPP
+
+#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_IOCP)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/thread.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_iocp_io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct win_iocp_io_context::thread_function
+{
+ explicit thread_function(win_iocp_io_context* s)
+ : this_(s)
+ {
+ }
+
+ void operator()()
+ {
+ boost::system::error_code ec;
+ this_->run(ec);
+ }
+
+ win_iocp_io_context* this_;
+};
+
+struct win_iocp_io_context::work_finished_on_block_exit
+{
+ ~work_finished_on_block_exit()
+ {
+ io_context_->work_finished();
+ }
+
+ win_iocp_io_context* io_context_;
+};
+
+struct win_iocp_io_context::timer_thread_function
+{
+ void operator()()
+ {
+ while (::InterlockedExchangeAdd(&io_context_->shutdown_, 0) == 0)
+ {
+ if (::WaitForSingleObject(io_context_->waitable_timer_.handle,
+ INFINITE) == WAIT_OBJECT_0)
+ {
+ ::InterlockedExchange(&io_context_->dispatch_required_, 1);
+ ::PostQueuedCompletionStatus(io_context_->iocp_.handle,
+ 0, wake_for_dispatch, 0);
+ }
+ }
+ }
+
+ win_iocp_io_context* io_context_;
+};
+
+win_iocp_io_context::win_iocp_io_context(
+ boost::asio::execution_context& ctx, int concurrency_hint, bool own_thread)
+ : execution_context_service_base<win_iocp_io_context>(ctx),
+ iocp_(),
+ outstanding_work_(0),
+ stopped_(0),
+ stop_event_posted_(0),
+ shutdown_(0),
+ gqcs_timeout_(get_gqcs_timeout()),
+ dispatch_required_(0),
+ concurrency_hint_(concurrency_hint)
+{
+ BOOST_ASIO_HANDLER_TRACKING_INIT;
+
+ iocp_.handle = ::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0,
+ static_cast<DWORD>(concurrency_hint >= 0 ? concurrency_hint : DWORD(~0)));
+ if (!iocp_.handle)
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "iocp");
+ }
+
+ if (own_thread)
+ {
+ ::InterlockedIncrement(&outstanding_work_);
+ thread_.reset(new boost::asio::detail::thread(thread_function(this)));
+ }
+}
+
+win_iocp_io_context::~win_iocp_io_context()
+{
+ if (thread_.get())
+ {
+ thread_->join();
+ thread_.reset();
+ }
+}
+
+void win_iocp_io_context::shutdown()
+{
+ ::InterlockedExchange(&shutdown_, 1);
+
+ if (timer_thread_.get())
+ {
+ LARGE_INTEGER timeout;
+ timeout.QuadPart = 1;
+ ::SetWaitableTimer(waitable_timer_.handle, &timeout, 1, 0, 0, FALSE);
+ }
+
+ if (thread_.get())
+ {
+ thread_->join();
+ thread_.reset();
+ ::InterlockedDecrement(&outstanding_work_);
+ }
+
+ while (::InterlockedExchangeAdd(&outstanding_work_, 0) > 0)
+ {
+ op_queue<win_iocp_operation> ops;
+ timer_queues_.get_all_timers(ops);
+ ops.push(completed_ops_);
+ if (!ops.empty())
+ {
+ while (win_iocp_operation* op = ops.front())
+ {
+ ops.pop();
+ ::InterlockedDecrement(&outstanding_work_);
+ op->destroy();
+ }
+ }
+ else
+ {
+ DWORD bytes_transferred = 0;
+ dword_ptr_t completion_key = 0;
+ LPOVERLAPPED overlapped = 0;
+ ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
+ &completion_key, &overlapped, gqcs_timeout_);
+ if (overlapped)
+ {
+ ::InterlockedDecrement(&outstanding_work_);
+ static_cast<win_iocp_operation*>(overlapped)->destroy();
+ }
+ }
+ }
+
+ if (timer_thread_.get())
+ timer_thread_->join();
+}
+
+boost::system::error_code win_iocp_io_context::register_handle(
+ HANDLE handle, boost::system::error_code& ec)
+{
+ if (::CreateIoCompletionPort(handle, iocp_.handle, 0, 0) == 0)
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+ return ec;
+}
+
+size_t win_iocp_io_context::run(boost::system::error_code& ec)
+{
+ if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
+ {
+ stop();
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ win_iocp_thread_info this_thread;
+ thread_call_stack::context ctx(this, this_thread);
+
+ size_t n = 0;
+ while (do_one(INFINITE, ec))
+ if (n != (std::numeric_limits<size_t>::max)())
+ ++n;
+ return n;
+}
+
+size_t win_iocp_io_context::run_one(boost::system::error_code& ec)
+{
+ if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
+ {
+ stop();
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ win_iocp_thread_info this_thread;
+ thread_call_stack::context ctx(this, this_thread);
+
+ return do_one(INFINITE, ec);
+}
+
+size_t win_iocp_io_context::wait_one(long usec, boost::system::error_code& ec)
+{
+ if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
+ {
+ stop();
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ win_iocp_thread_info this_thread;
+ thread_call_stack::context ctx(this, this_thread);
+
+ return do_one(usec < 0 ? INFINITE : ((usec - 1) / 1000 + 1), ec);
+}
+
+size_t win_iocp_io_context::poll(boost::system::error_code& ec)
+{
+ if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
+ {
+ stop();
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ win_iocp_thread_info this_thread;
+ thread_call_stack::context ctx(this, this_thread);
+
+ size_t n = 0;
+ while (do_one(0, ec))
+ if (n != (std::numeric_limits<size_t>::max)())
+ ++n;
+ return n;
+}
+
+size_t win_iocp_io_context::poll_one(boost::system::error_code& ec)
+{
+ if (::InterlockedExchangeAdd(&outstanding_work_, 0) == 0)
+ {
+ stop();
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ win_iocp_thread_info this_thread;
+ thread_call_stack::context ctx(this, this_thread);
+
+ return do_one(0, ec);
+}
+
+void win_iocp_io_context::stop()
+{
+ if (::InterlockedExchange(&stopped_, 1) == 0)
+ {
+ if (::InterlockedExchange(&stop_event_posted_, 1) == 0)
+ {
+ if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "pqcs");
+ }
+ }
+ }
+}
+
+void win_iocp_io_context::post_deferred_completion(win_iocp_operation* op)
+{
+ // Flag the operation as ready.
+ op->ready_ = 1;
+
+ // Enqueue the operation on the I/O completion port.
+ if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
+ {
+ // Out of resources. Put on completed queue instead.
+ mutex::scoped_lock lock(dispatch_mutex_);
+ completed_ops_.push(op);
+ ::InterlockedExchange(&dispatch_required_, 1);
+ }
+}
+
+void win_iocp_io_context::post_deferred_completions(
+ op_queue<win_iocp_operation>& ops)
+{
+ while (win_iocp_operation* op = ops.front())
+ {
+ ops.pop();
+
+ // Flag the operation as ready.
+ op->ready_ = 1;
+
+ // Enqueue the operation on the I/O completion port.
+ if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
+ {
+ // Out of resources. Put on completed queue instead.
+ mutex::scoped_lock lock(dispatch_mutex_);
+ completed_ops_.push(op);
+ completed_ops_.push(ops);
+ ::InterlockedExchange(&dispatch_required_, 1);
+ }
+ }
+}
+
+void win_iocp_io_context::abandon_operations(
+ op_queue<win_iocp_operation>& ops)
+{
+ while (win_iocp_operation* op = ops.front())
+ {
+ ops.pop();
+ ::InterlockedDecrement(&outstanding_work_);
+ op->destroy();
+ }
+}
+
+void win_iocp_io_context::on_pending(win_iocp_operation* op)
+{
+ if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
+ {
+ // Enqueue the operation on the I/O completion port.
+ if (!::PostQueuedCompletionStatus(iocp_.handle,
+ 0, overlapped_contains_result, op))
+ {
+ // Out of resources. Put on completed queue instead.
+ mutex::scoped_lock lock(dispatch_mutex_);
+ completed_ops_.push(op);
+ ::InterlockedExchange(&dispatch_required_, 1);
+ }
+ }
+}
+
+void win_iocp_io_context::on_completion(win_iocp_operation* op,
+ DWORD last_error, DWORD bytes_transferred)
+{
+ // Flag that the operation is ready for invocation.
+ op->ready_ = 1;
+
+ // Store results in the OVERLAPPED structure.
+ op->Internal = reinterpret_cast<ulong_ptr_t>(
+ &boost::asio::error::get_system_category());
+ op->Offset = last_error;
+ op->OffsetHigh = bytes_transferred;
+
+ // Enqueue the operation on the I/O completion port.
+ if (!::PostQueuedCompletionStatus(iocp_.handle,
+ 0, overlapped_contains_result, op))
+ {
+ // Out of resources. Put on completed queue instead.
+ mutex::scoped_lock lock(dispatch_mutex_);
+ completed_ops_.push(op);
+ ::InterlockedExchange(&dispatch_required_, 1);
+ }
+}
+
+void win_iocp_io_context::on_completion(win_iocp_operation* op,
+ const boost::system::error_code& ec, DWORD bytes_transferred)
+{
+ // Flag that the operation is ready for invocation.
+ op->ready_ = 1;
+
+ // Store results in the OVERLAPPED structure.
+ op->Internal = reinterpret_cast<ulong_ptr_t>(&ec.category());
+ op->Offset = ec.value();
+ op->OffsetHigh = bytes_transferred;
+
+ // Enqueue the operation on the I/O completion port.
+ if (!::PostQueuedCompletionStatus(iocp_.handle,
+ 0, overlapped_contains_result, op))
+ {
+ // Out of resources. Put on completed queue instead.
+ mutex::scoped_lock lock(dispatch_mutex_);
+ completed_ops_.push(op);
+ ::InterlockedExchange(&dispatch_required_, 1);
+ }
+}
+
+size_t win_iocp_io_context::do_one(DWORD msec, boost::system::error_code& ec)
+{
+ for (;;)
+ {
+ // Try to acquire responsibility for dispatching timers and completed ops.
+ if (::InterlockedCompareExchange(&dispatch_required_, 0, 1) == 1)
+ {
+ mutex::scoped_lock lock(dispatch_mutex_);
+
+ // Dispatch pending timers and operations.
+ op_queue<win_iocp_operation> ops;
+ ops.push(completed_ops_);
+ timer_queues_.get_ready_timers(ops);
+ post_deferred_completions(ops);
+ update_timeout();
+ }
+
+ // Get the next operation from the queue.
+ DWORD bytes_transferred = 0;
+ dword_ptr_t completion_key = 0;
+ LPOVERLAPPED overlapped = 0;
+ ::SetLastError(0);
+ BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle,
+ &bytes_transferred, &completion_key, &overlapped,
+ msec < gqcs_timeout_ ? msec : gqcs_timeout_);
+ DWORD last_error = ::GetLastError();
+
+ if (overlapped)
+ {
+ win_iocp_operation* op = static_cast<win_iocp_operation*>(overlapped);
+ boost::system::error_code result_ec(last_error,
+ boost::asio::error::get_system_category());
+
+ // We may have been passed the last_error and bytes_transferred in the
+ // OVERLAPPED structure itself.
+ if (completion_key == overlapped_contains_result)
+ {
+ result_ec = boost::system::error_code(static_cast<int>(op->Offset),
+ *reinterpret_cast<boost::system::error_category*>(op->Internal));
+ bytes_transferred = op->OffsetHigh;
+ }
+
+ // Otherwise ensure any result has been saved into the OVERLAPPED
+ // structure.
+ else
+ {
+ op->Internal = reinterpret_cast<ulong_ptr_t>(&result_ec.category());
+ op->Offset = result_ec.value();
+ op->OffsetHigh = bytes_transferred;
+ }
+
+ // Dispatch the operation only if ready. The operation may not be ready
+ // if the initiating function (e.g. a call to WSARecv) has not yet
+ // returned. This is because the initiating function still wants access
+ // to the operation's OVERLAPPED structure.
+ if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
+ {
+ // Ensure the count of outstanding work is decremented on block exit.
+ work_finished_on_block_exit on_exit = { this };
+ (void)on_exit;
+
+ op->complete(this, result_ec, bytes_transferred);
+ ec = boost::system::error_code();
+ return 1;
+ }
+ }
+ else if (!ok)
+ {
+ if (last_error != WAIT_TIMEOUT)
+ {
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return 0;
+ }
+
+ // If we're waiting indefinitely we need to keep going until we get a
+ // real handler.
+ if (msec == INFINITE)
+ continue;
+
+ ec = boost::system::error_code();
+ return 0;
+ }
+ else if (completion_key == wake_for_dispatch)
+ {
+ // We have been woken up to try to acquire responsibility for dispatching
+ // timers and completed operations.
+ }
+ else
+ {
+ // Indicate that there is no longer an in-flight stop event.
+ ::InterlockedExchange(&stop_event_posted_, 0);
+
+ // The stopped_ flag is always checked to ensure that any leftover
+ // stop events from a previous run invocation are ignored.
+ if (::InterlockedExchangeAdd(&stopped_, 0) != 0)
+ {
+ // Wake up next thread that is blocked on GetQueuedCompletionStatus.
+ if (::InterlockedExchange(&stop_event_posted_, 1) == 0)
+ {
+ if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, 0))
+ {
+ last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return 0;
+ }
+ }
+
+ ec = boost::system::error_code();
+ return 0;
+ }
+ }
+ }
+}
+
+DWORD win_iocp_io_context::get_gqcs_timeout()
+{
+ OSVERSIONINFOEX osvi;
+ ZeroMemory(&osvi, sizeof(osvi));
+ osvi.dwOSVersionInfoSize = sizeof(osvi);
+ osvi.dwMajorVersion = 6ul;
+
+ const uint64_t condition_mask = ::VerSetConditionMask(
+ 0, VER_MAJORVERSION, VER_GREATER_EQUAL);
+
+ if (!!::VerifyVersionInfo(&osvi, VER_MAJORVERSION, condition_mask))
+ return INFINITE;
+
+ return default_gqcs_timeout;
+}
+
+void win_iocp_io_context::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(dispatch_mutex_);
+
+ timer_queues_.insert(&queue);
+
+ if (!waitable_timer_.handle)
+ {
+ waitable_timer_.handle = ::CreateWaitableTimer(0, FALSE, 0);
+ if (waitable_timer_.handle == 0)
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "timer");
+ }
+
+ LARGE_INTEGER timeout;
+ timeout.QuadPart = -max_timeout_usec;
+ timeout.QuadPart *= 10;
+ ::SetWaitableTimer(waitable_timer_.handle,
+ &timeout, max_timeout_msec, 0, 0, FALSE);
+ }
+
+ if (!timer_thread_.get())
+ {
+ timer_thread_function thread_function = { this };
+ timer_thread_.reset(new thread(thread_function, 65536));
+ }
+}
+
+void win_iocp_io_context::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(dispatch_mutex_);
+
+ timer_queues_.erase(&queue);
+}
+
+void win_iocp_io_context::update_timeout()
+{
+ if (timer_thread_.get())
+ {
+ // There's no point updating the waitable timer if the new timeout period
+ // exceeds the maximum timeout. In that case, we might as well wait for the
+ // existing period of the timer to expire.
+ long timeout_usec = timer_queues_.wait_duration_usec(max_timeout_usec);
+ if (timeout_usec < max_timeout_usec)
+ {
+ LARGE_INTEGER timeout;
+ timeout.QuadPart = -timeout_usec;
+ timeout.QuadPart *= 10;
+ ::SetWaitableTimer(waitable_timer_.handle,
+ &timeout, max_timeout_msec, 0, 0, FALSE);
+ }
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_IO_CONTEXT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
new file mode 100644
index 00000000000..4e30b0f678c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
@@ -0,0 +1,183 @@
+//
+// detail/impl/win_iocp_serial_port_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_WIN_IOCP_SERIAL_PORT_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SERIAL_PORT_SERVICE_IPP
+
+#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_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#include <cstring>
+#include <boost/asio/detail/win_iocp_serial_port_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+win_iocp_serial_port_service::win_iocp_serial_port_service(
+ execution_context& context)
+ : execution_context_service_base<win_iocp_serial_port_service>(context),
+ handle_service_(context)
+{
+}
+
+void win_iocp_serial_port_service::shutdown()
+{
+}
+
+boost::system::error_code win_iocp_serial_port_service::open(
+ win_iocp_serial_port_service::implementation_type& impl,
+ const std::string& device, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ // For convenience, add a leading \\.\ sequence if not already present.
+ std::string name = (device[0] == '\\') ? device : "\\\\.\\" + device;
+
+ // Open a handle to the serial port.
+ ::HANDLE handle = ::CreateFileA(name.c_str(),
+ GENERIC_READ | GENERIC_WRITE, 0, 0,
+ OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
+ if (handle == INVALID_HANDLE_VALUE)
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ // Determine the initial serial port parameters.
+ using namespace std; // For memset.
+ ::DCB dcb;
+ memset(&dcb, 0, sizeof(DCB));
+ dcb.DCBlength = sizeof(DCB);
+ if (!::GetCommState(handle, &dcb))
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ // Set some default serial port parameters. This implementation does not
+ // support changing these, so they might as well be in a known state.
+ dcb.fBinary = TRUE; // Win32 only supports binary mode.
+ dcb.fDsrSensitivity = FALSE;
+ dcb.fNull = FALSE; // Do not ignore NULL characters.
+ dcb.fAbortOnError = FALSE; // Ignore serial framing errors.
+ if (!::SetCommState(handle, &dcb))
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ // Set up timeouts so that the serial port will behave similarly to a
+ // network socket. Reads wait for at least one byte, then return with
+ // whatever they have. Writes return once everything is out the door.
+ ::COMMTIMEOUTS timeouts;
+ timeouts.ReadIntervalTimeout = 1;
+ timeouts.ReadTotalTimeoutMultiplier = 0;
+ timeouts.ReadTotalTimeoutConstant = 0;
+ timeouts.WriteTotalTimeoutMultiplier = 0;
+ timeouts.WriteTotalTimeoutConstant = 0;
+ if (!::SetCommTimeouts(handle, &timeouts))
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ // We're done. Take ownership of the serial port handle.
+ if (handle_service_.assign(impl, handle, ec))
+ ::CloseHandle(handle);
+ return ec;
+}
+
+boost::system::error_code win_iocp_serial_port_service::do_set_option(
+ win_iocp_serial_port_service::implementation_type& impl,
+ win_iocp_serial_port_service::store_function_type store,
+ const void* option, boost::system::error_code& ec)
+{
+ using namespace std; // For memcpy.
+
+ ::DCB dcb;
+ memset(&dcb, 0, sizeof(DCB));
+ dcb.DCBlength = sizeof(DCB);
+ if (!::GetCommState(handle_service_.native_handle(impl), &dcb))
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ if (store(option, dcb, ec))
+ return ec;
+
+ if (!::SetCommState(handle_service_.native_handle(impl), &dcb))
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code win_iocp_serial_port_service::do_get_option(
+ const win_iocp_serial_port_service::implementation_type& impl,
+ win_iocp_serial_port_service::load_function_type load,
+ void* option, boost::system::error_code& ec) const
+{
+ using namespace std; // For memset.
+
+ ::DCB dcb;
+ memset(&dcb, 0, sizeof(DCB));
+ dcb.DCBlength = sizeof(DCB);
+ if (!::GetCommState(handle_service_.native_handle(impl), &dcb))
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ return ec;
+ }
+
+ return load(option, dcb, ec);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SERIAL_PORT_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
new file mode 100644
index 00000000000..f95c74ff585
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
@@ -0,0 +1,801 @@
+//
+// detail/impl/win_iocp_socket_service_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_IOCP_SOCKET_SERVICE_BASE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SOCKET_SERVICE_BASE_IPP
+
+#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_IOCP)
+
+#include <boost/asio/detail/win_iocp_socket_service_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+win_iocp_socket_service_base::win_iocp_socket_service_base(
+ execution_context& context)
+ : context_(context),
+ iocp_service_(use_service<win_iocp_io_context>(context)),
+ reactor_(0),
+ connect_ex_(0),
+ nt_set_info_(0),
+ mutex_(),
+ impl_list_(0)
+{
+}
+
+void win_iocp_socket_service_base::base_shutdown()
+{
+ // Close all implementations, causing all operations to complete.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ base_implementation_type* impl = impl_list_;
+ while (impl)
+ {
+ close_for_destruction(*impl);
+ impl = impl->next_;
+ }
+}
+
+void win_iocp_socket_service_base::construct(
+ win_iocp_socket_service_base::base_implementation_type& impl)
+{
+ impl.socket_ = invalid_socket;
+ impl.state_ = 0;
+ impl.cancel_token_.reset();
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ impl.safe_cancellation_thread_id_ = 0;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+void win_iocp_socket_service_base::base_move_construct(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ win_iocp_socket_service_base::base_implementation_type& other_impl)
+{
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.cancel_token_ = other_impl.cancel_token_;
+ other_impl.cancel_token_.reset();
+
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
+ other_impl.safe_cancellation_thread_id_ = 0;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+void win_iocp_socket_service_base::base_move_assign(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ win_iocp_socket_service_base& other_service,
+ win_iocp_socket_service_base::base_implementation_type& other_impl)
+{
+ close_for_destruction(impl);
+
+ if (this != &other_service)
+ {
+ // Remove implementation from linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+ }
+
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.cancel_token_ = other_impl.cancel_token_;
+ other_impl.cancel_token_.reset();
+
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ impl.safe_cancellation_thread_id_ = other_impl.safe_cancellation_thread_id_;
+ other_impl.safe_cancellation_thread_id_ = 0;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ if (this != &other_service)
+ {
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(other_service.mutex_);
+ impl.next_ = other_service.impl_list_;
+ impl.prev_ = 0;
+ if (other_service.impl_list_)
+ other_service.impl_list_->prev_ = &impl;
+ other_service.impl_list_ = &impl;
+ }
+}
+
+void win_iocp_socket_service_base::destroy(
+ win_iocp_socket_service_base::base_implementation_type& impl)
+{
+ close_for_destruction(impl);
+
+ // Remove implementation from linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+}
+
+boost::system::error_code win_iocp_socket_service_base::close(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ // Check if the reactor was created, in which case we need to close the
+ // socket on the reactor as well to cancel any operations that might be
+ // running there.
+ select_reactor* r = static_cast<select_reactor*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (r)
+ r->deregister_descriptor(impl.socket_, impl.reactor_data_, true);
+
+ socket_ops::close(impl.socket_, impl.state_, false, ec);
+
+ if (r)
+ r->cleanup_descriptor_data(impl.reactor_data_);
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+
+ impl.socket_ = invalid_socket;
+ impl.state_ = 0;
+ impl.cancel_token_.reset();
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ impl.safe_cancellation_thread_id_ = 0;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ return ec;
+}
+
+socket_type win_iocp_socket_service_base::release(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ return invalid_socket;
+
+ cancel(impl, ec);
+ if (ec)
+ return invalid_socket;
+
+ nt_set_info_fn fn = get_nt_set_info();
+ if (fn == 0)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return invalid_socket;
+ }
+
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(impl.socket_);
+ ULONG_PTR iosb[2] = { 0, 0 };
+ void* info[2] = { 0, 0 };
+ if (fn(sock_as_handle, iosb, &info, sizeof(info),
+ 61 /* FileReplaceCompletionInformation */))
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return invalid_socket;
+ }
+
+ socket_type tmp = impl.socket_;
+ impl.socket_ = invalid_socket;
+ return tmp;
+}
+
+boost::system::error_code win_iocp_socket_service_base::cancel(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return ec;
+ }
+
+ BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(),
+ "socket", &impl, impl.socket_, "cancel"));
+
+ if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
+ ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
+ {
+ // The version of Windows supports cancellation from any thread.
+ typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
+ cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
+ socket_type sock = impl.socket_;
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock);
+ if (!cancel_io_ex(sock_as_handle, 0))
+ {
+ DWORD last_error = ::GetLastError();
+ if (last_error == ERROR_NOT_FOUND)
+ {
+ // ERROR_NOT_FOUND means that there were no operations to be
+ // cancelled. We swallow this error to match the behaviour on other
+ // platforms.
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+ }
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ else if (impl.safe_cancellation_thread_id_ == 0)
+ {
+ // No operations have been started, so there's nothing to cancel.
+ ec = boost::system::error_code();
+ }
+ else if (impl.safe_cancellation_thread_id_ == ::GetCurrentThreadId())
+ {
+ // Asynchronous operations have been started from the current thread only,
+ // so it is safe to try to cancel them using CancelIo.
+ socket_type sock = impl.socket_;
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock);
+ if (!::CancelIo(sock_as_handle))
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+ }
+ else
+ {
+ // Asynchronous operations have been started from more than one thread,
+ // so cancellation is not safe.
+ ec = boost::asio::error::operation_not_supported;
+ }
+#else // defined(BOOST_ASIO_ENABLE_CANCELIO)
+ else
+ {
+ // Cancellation is not supported as CancelIo may not be used.
+ ec = boost::asio::error::operation_not_supported;
+ }
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ // Cancel any operations started via the reactor.
+ if (!ec)
+ {
+ select_reactor* r = static_cast<select_reactor*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (r)
+ r->cancel_ops(impl.socket_, impl.reactor_data_);
+ }
+
+ return ec;
+}
+
+boost::system::error_code win_iocp_socket_service_base::do_open(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ int family, int type, int protocol, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ socket_holder sock(socket_ops::socket(family, type, protocol, ec));
+ if (sock.get() == invalid_socket)
+ return ec;
+
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock.get());
+ if (iocp_service_.register_handle(sock_as_handle, ec))
+ return ec;
+
+ impl.socket_ = sock.release();
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ impl.cancel_token_.reset(static_cast<void*>(0), socket_ops::noop_deleter());
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code win_iocp_socket_service_base::do_assign(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ int type, socket_type native_socket, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(native_socket);
+ if (iocp_service_.register_handle(sock_as_handle, ec))
+ return ec;
+
+ impl.socket_ = native_socket;
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ impl.cancel_token_.reset(static_cast<void*>(0), socket_ops::noop_deleter());
+ ec = boost::system::error_code();
+ return ec;
+}
+
+void win_iocp_socket_service_base::start_send_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count,
+ socket_base::message_flags flags, bool noop, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (noop)
+ iocp_service_.on_completion(op);
+ else if (!is_open(impl))
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ else
+ {
+ DWORD bytes_transferred = 0;
+ int result = ::WSASend(impl.socket_, buffers,
+ static_cast<DWORD>(buffer_count), &bytes_transferred, flags, op, 0);
+ DWORD last_error = ::WSAGetLastError();
+ if (last_error == ERROR_PORT_UNREACHABLE)
+ last_error = WSAECONNREFUSED;
+ if (result != 0 && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error, bytes_transferred);
+ else
+ iocp_service_.on_pending(op);
+ }
+}
+
+void win_iocp_socket_service_base::start_send_to_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count,
+ const socket_addr_type* addr, int addrlen,
+ socket_base::message_flags flags, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (!is_open(impl))
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ else
+ {
+ DWORD bytes_transferred = 0;
+ int result = ::WSASendTo(impl.socket_, buffers,
+ static_cast<DWORD>(buffer_count),
+ &bytes_transferred, flags, addr, addrlen, op, 0);
+ DWORD last_error = ::WSAGetLastError();
+ if (last_error == ERROR_PORT_UNREACHABLE)
+ last_error = WSAECONNREFUSED;
+ if (result != 0 && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error, bytes_transferred);
+ else
+ iocp_service_.on_pending(op);
+ }
+}
+
+void win_iocp_socket_service_base::start_receive_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count,
+ socket_base::message_flags flags, bool noop, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (noop)
+ iocp_service_.on_completion(op);
+ else if (!is_open(impl))
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ else
+ {
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int result = ::WSARecv(impl.socket_, buffers,
+ static_cast<DWORD>(buffer_count),
+ &bytes_transferred, &recv_flags, op, 0);
+ DWORD last_error = ::WSAGetLastError();
+ if (last_error == ERROR_NETNAME_DELETED)
+ last_error = WSAECONNRESET;
+ else if (last_error == ERROR_PORT_UNREACHABLE)
+ last_error = WSAECONNREFUSED;
+ if (result != 0 && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error, bytes_transferred);
+ else
+ iocp_service_.on_pending(op);
+ }
+}
+
+void win_iocp_socket_service_base::start_null_buffers_receive_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ socket_base::message_flags flags, reactor_op* op)
+{
+ if ((impl.state_ & socket_ops::stream_oriented) != 0)
+ {
+ // For stream sockets on Windows, we may issue a 0-byte overlapped
+ // WSARecv to wait until there is data available on the socket.
+ ::WSABUF buf = { 0, 0 };
+ start_receive_op(impl, &buf, 1, flags, false, op);
+ }
+ else
+ {
+ start_reactor_op(impl,
+ (flags & socket_base::message_out_of_band)
+ ? select_reactor::except_op : select_reactor::read_op,
+ op);
+ }
+}
+
+void win_iocp_socket_service_base::start_receive_from_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
+ socket_base::message_flags flags, int* addrlen, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (!is_open(impl))
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ else
+ {
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int result = ::WSARecvFrom(impl.socket_, buffers,
+ static_cast<DWORD>(buffer_count),
+ &bytes_transferred, &recv_flags, addr, addrlen, op, 0);
+ DWORD last_error = ::WSAGetLastError();
+ if (last_error == ERROR_PORT_UNREACHABLE)
+ last_error = WSAECONNREFUSED;
+ if (result != 0 && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error, bytes_transferred);
+ else
+ iocp_service_.on_pending(op);
+ }
+}
+
+void win_iocp_socket_service_base::start_accept_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ bool peer_is_open, socket_holder& new_socket, int family, int type,
+ int protocol, void* output_buffer, DWORD address_length, operation* op)
+{
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ if (!is_open(impl))
+ iocp_service_.on_completion(op, boost::asio::error::bad_descriptor);
+ else if (peer_is_open)
+ iocp_service_.on_completion(op, boost::asio::error::already_open);
+ else
+ {
+ boost::system::error_code ec;
+ new_socket.reset(socket_ops::socket(family, type, protocol, ec));
+ if (new_socket.get() == invalid_socket)
+ iocp_service_.on_completion(op, ec);
+ else
+ {
+ DWORD bytes_read = 0;
+ BOOL result = ::AcceptEx(impl.socket_, new_socket.get(), output_buffer,
+ 0, address_length, address_length, &bytes_read, op);
+ DWORD last_error = ::WSAGetLastError();
+ if (!result && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error);
+ else
+ iocp_service_.on_pending(op);
+ }
+ }
+}
+
+void win_iocp_socket_service_base::restart_accept_op(
+ socket_type s, socket_holder& new_socket, int family, int type,
+ int protocol, void* output_buffer, DWORD address_length, operation* op)
+{
+ new_socket.reset();
+ iocp_service_.work_started();
+
+ boost::system::error_code ec;
+ new_socket.reset(socket_ops::socket(family, type, protocol, ec));
+ if (new_socket.get() == invalid_socket)
+ iocp_service_.on_completion(op, ec);
+ else
+ {
+ DWORD bytes_read = 0;
+ BOOL result = ::AcceptEx(s, new_socket.get(), output_buffer,
+ 0, address_length, address_length, &bytes_read, op);
+ DWORD last_error = ::WSAGetLastError();
+ if (!result && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error);
+ else
+ iocp_service_.on_pending(op);
+ }
+}
+
+void win_iocp_socket_service_base::start_reactor_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ int op_type, reactor_op* op)
+{
+ select_reactor& r = get_reactor();
+ update_cancellation_thread_id(impl);
+
+ if (is_open(impl))
+ {
+ r.start_op(op_type, impl.socket_, impl.reactor_data_, op, false, false);
+ return;
+ }
+ else
+ op->ec_ = boost::asio::error::bad_descriptor;
+
+ iocp_service_.post_immediate_completion(op, false);
+}
+
+void win_iocp_socket_service_base::start_connect_op(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ int family, int type, const socket_addr_type* addr,
+ std::size_t addrlen, win_iocp_socket_connect_op_base* op)
+{
+ // If ConnectEx is available, use that.
+ if (family == BOOST_ASIO_OS_DEF(AF_INET)
+ || family == BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ if (connect_ex_fn connect_ex = get_connect_ex(impl, type))
+ {
+ union address_union
+ {
+ socket_addr_type base;
+ sockaddr_in4_type v4;
+ sockaddr_in6_type v6;
+ } a;
+
+ using namespace std; // For memset.
+ memset(&a, 0, sizeof(a));
+ a.base.sa_family = family;
+
+ socket_ops::bind(impl.socket_, &a.base,
+ family == BOOST_ASIO_OS_DEF(AF_INET)
+ ? sizeof(a.v4) : sizeof(a.v6), op->ec_);
+ if (op->ec_ && op->ec_ != boost::asio::error::invalid_argument)
+ {
+ iocp_service_.post_immediate_completion(op, false);
+ return;
+ }
+
+ op->connect_ex_ = true;
+ update_cancellation_thread_id(impl);
+ iocp_service_.work_started();
+
+ BOOL result = connect_ex(impl.socket_,
+ addr, static_cast<int>(addrlen), 0, 0, 0, op);
+ DWORD last_error = ::WSAGetLastError();
+ if (!result && last_error != WSA_IO_PENDING)
+ iocp_service_.on_completion(op, last_error);
+ else
+ iocp_service_.on_pending(op);
+ return;
+ }
+ }
+
+ // Otherwise, fall back to a reactor-based implementation.
+ select_reactor& r = get_reactor();
+ update_cancellation_thread_id(impl);
+
+ if ((impl.state_ & socket_ops::non_blocking) != 0
+ || socket_ops::set_internal_non_blocking(
+ impl.socket_, impl.state_, true, op->ec_))
+ {
+ if (socket_ops::connect(impl.socket_, addr, addrlen, op->ec_) != 0)
+ {
+ if (op->ec_ == boost::asio::error::in_progress
+ || op->ec_ == boost::asio::error::would_block)
+ {
+ op->ec_ = boost::system::error_code();
+ r.start_op(select_reactor::connect_op, impl.socket_,
+ impl.reactor_data_, op, false, false);
+ return;
+ }
+ }
+ }
+
+ r.post_immediate_completion(op, false);
+}
+
+void win_iocp_socket_service_base::close_for_destruction(
+ win_iocp_socket_service_base::base_implementation_type& impl)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((iocp_service_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ // Check if the reactor was created, in which case we need to close the
+ // socket on the reactor as well to cancel any operations that might be
+ // running there.
+ select_reactor* r = static_cast<select_reactor*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (r)
+ r->deregister_descriptor(impl.socket_, impl.reactor_data_, true);
+
+ boost::system::error_code ignored_ec;
+ socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
+
+ if (r)
+ r->cleanup_descriptor_data(impl.reactor_data_);
+ }
+
+ impl.socket_ = invalid_socket;
+ impl.state_ = 0;
+ impl.cancel_token_.reset();
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ impl.safe_cancellation_thread_id_ = 0;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+}
+
+void win_iocp_socket_service_base::update_cancellation_thread_id(
+ win_iocp_socket_service_base::base_implementation_type& impl)
+{
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ if (impl.safe_cancellation_thread_id_ == 0)
+ impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId();
+ else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId())
+ impl.safe_cancellation_thread_id_ = ~DWORD(0);
+#else // defined(BOOST_ASIO_ENABLE_CANCELIO)
+ (void)impl;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+}
+
+select_reactor& win_iocp_socket_service_base::get_reactor()
+{
+ select_reactor* r = static_cast<select_reactor*>(
+ interlocked_compare_exchange_pointer(
+ reinterpret_cast<void**>(&reactor_), 0, 0));
+ if (!r)
+ {
+ r = &(use_service<select_reactor>(context_));
+ interlocked_exchange_pointer(reinterpret_cast<void**>(&reactor_), r);
+ }
+ return *r;
+}
+
+win_iocp_socket_service_base::connect_ex_fn
+win_iocp_socket_service_base::get_connect_ex(
+ win_iocp_socket_service_base::base_implementation_type& impl, int type)
+{
+#if defined(BOOST_ASIO_DISABLE_CONNECTEX)
+ (void)impl;
+ (void)type;
+ return 0;
+#else // defined(BOOST_ASIO_DISABLE_CONNECTEX)
+ if (type != BOOST_ASIO_OS_DEF(SOCK_STREAM)
+ && type != BOOST_ASIO_OS_DEF(SOCK_SEQPACKET))
+ return 0;
+
+ void* ptr = interlocked_compare_exchange_pointer(&connect_ex_, 0, 0);
+ if (!ptr)
+ {
+ GUID guid = { 0x25a207b9, 0xddf3, 0x4660,
+ { 0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e } };
+
+ DWORD bytes = 0;
+ if (::WSAIoctl(impl.socket_, SIO_GET_EXTENSION_FUNCTION_POINTER,
+ &guid, sizeof(guid), &ptr, sizeof(ptr), &bytes, 0, 0) != 0)
+ {
+ // Set connect_ex_ to a special value to indicate that ConnectEx is
+ // unavailable. That way we won't bother trying to look it up again.
+ ptr = this;
+ }
+
+ interlocked_exchange_pointer(&connect_ex_, ptr);
+ }
+
+ return reinterpret_cast<connect_ex_fn>(ptr == this ? 0 : ptr);
+#endif // defined(BOOST_ASIO_DISABLE_CONNECTEX)
+}
+
+win_iocp_socket_service_base::nt_set_info_fn
+win_iocp_socket_service_base::get_nt_set_info()
+{
+ void* ptr = interlocked_compare_exchange_pointer(&nt_set_info_, 0, 0);
+ if (!ptr)
+ {
+ if (HMODULE h = ::GetModuleHandleA("NTDLL.DLL"))
+ ptr = reinterpret_cast<void*>(GetProcAddress(h, "NtSetInformationFile"));
+
+ // On failure, set nt_set_info_ to a special value to indicate that the
+ // NtSetInformationFile function is unavailable. That way we won't bother
+ // trying to look it up again.
+ interlocked_exchange_pointer(&nt_set_info_, ptr ? ptr : this);
+ }
+
+ return reinterpret_cast<nt_set_info_fn>(ptr == this ? 0 : ptr);
+}
+
+void* win_iocp_socket_service_base::interlocked_compare_exchange_pointer(
+ void** dest, void* exch, void* cmp)
+{
+#if defined(_M_IX86)
+ return reinterpret_cast<void*>(InterlockedCompareExchange(
+ reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(exch),
+ reinterpret_cast<LONG>(cmp)));
+#else
+ return InterlockedCompareExchangePointer(dest, exch, cmp);
+#endif
+}
+
+void* win_iocp_socket_service_base::interlocked_exchange_pointer(
+ void** dest, void* val)
+{
+#if defined(_M_IX86)
+ return reinterpret_cast<void*>(InterlockedExchange(
+ reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(val)));
+#else
+ return InterlockedExchangePointer(dest, val);
+#endif
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_IOCP_SOCKET_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_mutex.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_mutex.ipp
new file mode 100644
index 00000000000..809d40f1595
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_mutex.ipp
@@ -0,0 +1,86 @@
+//
+// detail/impl/win_mutex.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_MUTEX_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_MUTEX_IPP
+
+#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_WINDOWS)
+
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_mutex.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+win_mutex::win_mutex()
+{
+ int error = do_init();
+ boost::system::error_code ec(error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "mutex");
+}
+
+int win_mutex::do_init()
+{
+#if defined(__MINGW32__)
+ // Not sure if MinGW supports structured exception handling, so for now
+ // we'll just call the Windows API and hope.
+# if defined(UNDER_CE)
+ ::InitializeCriticalSection(&crit_section_);
+# elif defined(BOOST_ASIO_WINDOWS_APP)
+ if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
+ return ::GetLastError();
+# else
+ if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
+ return ::GetLastError();
+# endif
+ return 0;
+#else
+ __try
+ {
+# if defined(UNDER_CE)
+ ::InitializeCriticalSection(&crit_section_);
+# elif defined(BOOST_ASIO_WINDOWS_APP)
+ if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
+ return ::GetLastError();
+# else
+ if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
+ return ::GetLastError();
+# endif
+ }
+ __except(GetExceptionCode() == STATUS_NO_MEMORY
+ ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
+ {
+ return ERROR_OUTOFMEMORY;
+ }
+
+ return 0;
+#endif
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_MUTEX_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_object_handle_service.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_object_handle_service.ipp
new file mode 100644
index 00000000000..f356a006134
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_object_handle_service.ipp
@@ -0,0 +1,450 @@
+//
+// detail/impl/win_object_handle_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// Distributed under the 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_IMPL_WIN_OBJECT_HANDLE_SERVICE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_OBJECT_HANDLE_SERVICE_IPP
+
+#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_WINDOWS_OBJECT_HANDLE)
+
+#include <boost/asio/detail/win_object_handle_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+win_object_handle_service::win_object_handle_service(execution_context& context)
+ : execution_context_service_base<win_object_handle_service>(context),
+ scheduler_(boost::asio::use_service<scheduler_impl>(context)),
+ mutex_(),
+ impl_list_(0),
+ shutdown_(false)
+{
+}
+
+void win_object_handle_service::shutdown()
+{
+ mutex::scoped_lock lock(mutex_);
+
+ // Setting this flag to true prevents new objects from being registered, and
+ // new asynchronous wait operations from being started. We only need to worry
+ // about cleaning up the operations that are currently in progress.
+ shutdown_ = true;
+
+ op_queue<operation> ops;
+ for (implementation_type* impl = impl_list_; impl; impl = impl->next_)
+ ops.push(impl->op_queue_);
+
+ lock.unlock();
+
+ scheduler_.abandon_operations(ops);
+}
+
+void win_object_handle_service::construct(
+ win_object_handle_service::implementation_type& impl)
+{
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ impl.wait_handle_ = INVALID_HANDLE_VALUE;
+ impl.owner_ = this;
+
+ // Insert implementation into linked list of all implementations.
+ mutex::scoped_lock lock(mutex_);
+ if (!shutdown_)
+ {
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+ }
+}
+
+void win_object_handle_service::move_construct(
+ win_object_handle_service::implementation_type& impl,
+ win_object_handle_service::implementation_type& other_impl)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ // Insert implementation into linked list of all implementations.
+ if (!shutdown_)
+ {
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+ }
+
+ impl.handle_ = other_impl.handle_;
+ other_impl.handle_ = INVALID_HANDLE_VALUE;
+ impl.wait_handle_ = other_impl.wait_handle_;
+ other_impl.wait_handle_ = INVALID_HANDLE_VALUE;
+ impl.op_queue_.push(other_impl.op_queue_);
+ impl.owner_ = this;
+
+ // We must not hold the lock while calling UnregisterWaitEx. This is because
+ // the registered callback function might be invoked while we are waiting for
+ // UnregisterWaitEx to complete.
+ lock.unlock();
+
+ if (impl.wait_handle_ != INVALID_HANDLE_VALUE)
+ ::UnregisterWaitEx(impl.wait_handle_, INVALID_HANDLE_VALUE);
+
+ if (!impl.op_queue_.empty())
+ register_wait_callback(impl, lock);
+}
+
+void win_object_handle_service::move_assign(
+ win_object_handle_service::implementation_type& impl,
+ win_object_handle_service& other_service,
+ win_object_handle_service::implementation_type& other_impl)
+{
+ boost::system::error_code ignored_ec;
+ close(impl, ignored_ec);
+
+ mutex::scoped_lock lock(mutex_);
+
+ if (this != &other_service)
+ {
+ // Remove implementation from linked list of all implementations.
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+ }
+
+ impl.handle_ = other_impl.handle_;
+ other_impl.handle_ = INVALID_HANDLE_VALUE;
+ impl.wait_handle_ = other_impl.wait_handle_;
+ other_impl.wait_handle_ = INVALID_HANDLE_VALUE;
+ impl.op_queue_.push(other_impl.op_queue_);
+ impl.owner_ = this;
+
+ if (this != &other_service)
+ {
+ // Insert implementation into linked list of all implementations.
+ impl.next_ = other_service.impl_list_;
+ impl.prev_ = 0;
+ if (other_service.impl_list_)
+ other_service.impl_list_->prev_ = &impl;
+ other_service.impl_list_ = &impl;
+ }
+
+ // We must not hold the lock while calling UnregisterWaitEx. This is because
+ // the registered callback function might be invoked while we are waiting for
+ // UnregisterWaitEx to complete.
+ lock.unlock();
+
+ if (impl.wait_handle_ != INVALID_HANDLE_VALUE)
+ ::UnregisterWaitEx(impl.wait_handle_, INVALID_HANDLE_VALUE);
+
+ if (!impl.op_queue_.empty())
+ register_wait_callback(impl, lock);
+}
+
+void win_object_handle_service::destroy(
+ win_object_handle_service::implementation_type& impl)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ // Remove implementation from linked list of all implementations.
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
+
+ HANDLE wait_handle = impl.wait_handle_;
+ impl.wait_handle_ = INVALID_HANDLE_VALUE;
+
+ op_queue<operation> ops;
+ while (wait_op* op = impl.op_queue_.front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ impl.op_queue_.pop();
+ ops.push(op);
+ }
+
+ // We must not hold the lock while calling UnregisterWaitEx. This is
+ // because the registered callback function might be invoked while we are
+ // waiting for UnregisterWaitEx to complete.
+ lock.unlock();
+
+ if (wait_handle != INVALID_HANDLE_VALUE)
+ ::UnregisterWaitEx(wait_handle, INVALID_HANDLE_VALUE);
+
+ ::CloseHandle(impl.handle_);
+ impl.handle_ = INVALID_HANDLE_VALUE;
+
+ scheduler_.post_deferred_completions(ops);
+ }
+}
+
+boost::system::error_code win_object_handle_service::assign(
+ win_object_handle_service::implementation_type& impl,
+ const native_handle_type& handle, boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ impl.handle_ = handle;
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code win_object_handle_service::close(
+ win_object_handle_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
+
+ mutex::scoped_lock lock(mutex_);
+
+ HANDLE wait_handle = impl.wait_handle_;
+ impl.wait_handle_ = INVALID_HANDLE_VALUE;
+
+ op_queue<operation> completed_ops;
+ while (wait_op* op = impl.op_queue_.front())
+ {
+ impl.op_queue_.pop();
+ op->ec_ = boost::asio::error::operation_aborted;
+ completed_ops.push(op);
+ }
+
+ // We must not hold the lock while calling UnregisterWaitEx. This is
+ // because the registered callback function might be invoked while we are
+ // waiting for UnregisterWaitEx to complete.
+ lock.unlock();
+
+ if (wait_handle != INVALID_HANDLE_VALUE)
+ ::UnregisterWaitEx(wait_handle, INVALID_HANDLE_VALUE);
+
+ if (::CloseHandle(impl.handle_))
+ {
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ }
+
+ scheduler_.post_deferred_completions(completed_ops);
+ }
+ else
+ {
+ ec = boost::system::error_code();
+ }
+
+ return ec;
+}
+
+boost::system::error_code win_object_handle_service::cancel(
+ win_object_handle_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "cancel"));
+
+ mutex::scoped_lock lock(mutex_);
+
+ HANDLE wait_handle = impl.wait_handle_;
+ impl.wait_handle_ = INVALID_HANDLE_VALUE;
+
+ op_queue<operation> completed_ops;
+ while (wait_op* op = impl.op_queue_.front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ impl.op_queue_.pop();
+ completed_ops.push(op);
+ }
+
+ // We must not hold the lock while calling UnregisterWaitEx. This is
+ // because the registered callback function might be invoked while we are
+ // waiting for UnregisterWaitEx to complete.
+ lock.unlock();
+
+ if (wait_handle != INVALID_HANDLE_VALUE)
+ ::UnregisterWaitEx(wait_handle, INVALID_HANDLE_VALUE);
+
+ ec = boost::system::error_code();
+
+ scheduler_.post_deferred_completions(completed_ops);
+ }
+ else
+ {
+ ec = boost::asio::error::bad_descriptor;
+ }
+
+ return ec;
+}
+
+void win_object_handle_service::wait(
+ win_object_handle_service::implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ switch (::WaitForSingleObject(impl.handle_, INFINITE))
+ {
+ case WAIT_FAILED:
+ {
+ DWORD last_error = ::GetLastError();
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::get_system_category());
+ break;
+ }
+ case WAIT_OBJECT_0:
+ case WAIT_ABANDONED:
+ default:
+ ec = boost::system::error_code();
+ break;
+ }
+}
+
+void win_object_handle_service::start_wait_op(
+ win_object_handle_service::implementation_type& impl, wait_op* op)
+{
+ scheduler_.work_started();
+
+ if (is_open(impl))
+ {
+ mutex::scoped_lock lock(mutex_);
+
+ if (!shutdown_)
+ {
+ impl.op_queue_.push(op);
+
+ // Only the first operation to be queued gets to register a wait callback.
+ // Subsequent operations have to wait for the first to finish.
+ if (impl.op_queue_.front() == op)
+ register_wait_callback(impl, lock);
+ }
+ else
+ {
+ lock.unlock();
+ scheduler_.post_deferred_completion(op);
+ }
+ }
+ else
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ scheduler_.post_deferred_completion(op);
+ }
+}
+
+void win_object_handle_service::register_wait_callback(
+ win_object_handle_service::implementation_type& impl,
+ mutex::scoped_lock& lock)
+{
+ lock.lock();
+
+ if (!RegisterWaitForSingleObject(&impl.wait_handle_,
+ impl.handle_, &win_object_handle_service::wait_callback,
+ &impl, INFINITE, WT_EXECUTEONLYONCE))
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+
+ op_queue<operation> completed_ops;
+ while (wait_op* op = impl.op_queue_.front())
+ {
+ op->ec_ = ec;
+ impl.op_queue_.pop();
+ completed_ops.push(op);
+ }
+
+ lock.unlock();
+ scheduler_.post_deferred_completions(completed_ops);
+ }
+}
+
+void win_object_handle_service::wait_callback(PVOID param, BOOLEAN)
+{
+ implementation_type* impl = static_cast<implementation_type*>(param);
+ mutex::scoped_lock lock(impl->owner_->mutex_);
+
+ if (impl->wait_handle_ != INVALID_HANDLE_VALUE)
+ {
+ ::UnregisterWaitEx(impl->wait_handle_, NULL);
+ impl->wait_handle_ = INVALID_HANDLE_VALUE;
+ }
+
+ if (wait_op* op = impl->op_queue_.front())
+ {
+ op_queue<operation> completed_ops;
+
+ op->ec_ = boost::system::error_code();
+ impl->op_queue_.pop();
+ completed_ops.push(op);
+
+ if (!impl->op_queue_.empty())
+ {
+ if (!RegisterWaitForSingleObject(&impl->wait_handle_,
+ impl->handle_, &win_object_handle_service::wait_callback,
+ param, INFINITE, WT_EXECUTEONLYONCE))
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+
+ while ((op = impl->op_queue_.front()) != 0)
+ {
+ op->ec_ = ec;
+ impl->op_queue_.pop();
+ completed_ops.push(op);
+ }
+ }
+ }
+
+ scheduler_impl& sched = impl->owner_->scheduler_;
+ lock.unlock();
+ sched.post_deferred_completions(completed_ops);
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_OBJECT_HANDLE_SERVICE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_static_mutex.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_static_mutex.ipp
new file mode 100644
index 00000000000..ae53dbe1052
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_static_mutex.ipp
@@ -0,0 +1,138 @@
+//
+// detail/impl/win_static_mutex.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_STATIC_MUTEX_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_STATIC_MUTEX_IPP
+
+#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_WINDOWS)
+
+#include <cstdio>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_static_mutex.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+void win_static_mutex::init()
+{
+ int error = do_init();
+ boost::system::error_code ec(error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "static_mutex");
+}
+
+int win_static_mutex::do_init()
+{
+ using namespace std; // For sprintf.
+ wchar_t mutex_name[128];
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ swprintf_s(
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ _snwprintf(
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ mutex_name, 128, L"asio-58CCDC44-6264-4842-90C2-F3C545CB8AA7-%u-%p",
+ static_cast<unsigned int>(::GetCurrentProcessId()), this);
+
+#if defined(BOOST_ASIO_WINDOWS_APP)
+ HANDLE mutex = ::CreateMutexExW(0, mutex_name, CREATE_MUTEX_INITIAL_OWNER, 0);
+#else // defined(BOOST_ASIO_WINDOWS_APP)
+ HANDLE mutex = ::CreateMutexW(0, TRUE, mutex_name);
+#endif // defined(BOOST_ASIO_WINDOWS_APP)
+ DWORD last_error = ::GetLastError();
+ if (mutex == 0)
+ return ::GetLastError();
+
+ if (last_error == ERROR_ALREADY_EXISTS)
+ {
+#if defined(BOOST_ASIO_WINDOWS_APP)
+ ::WaitForSingleObjectEx(mutex, INFINITE, false);
+#else // defined(BOOST_ASIO_WINDOWS_APP)
+ ::WaitForSingleObject(mutex, INFINITE);
+#endif // defined(BOOST_ASIO_WINDOWS_APP)
+ }
+
+ if (initialised_)
+ {
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return 0;
+ }
+
+#if defined(__MINGW32__)
+ // Not sure if MinGW supports structured exception handling, so for now
+ // we'll just call the Windows API and hope.
+# if defined(UNDER_CE)
+ ::InitializeCriticalSection(&crit_section_);
+# else
+ if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
+ {
+ last_error = ::GetLastError();
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return last_error;
+ }
+# endif
+#else
+ __try
+ {
+# if defined(UNDER_CE)
+ ::InitializeCriticalSection(&crit_section_);
+# elif defined(BOOST_ASIO_WINDOWS_APP)
+ if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
+ {
+ last_error = ::GetLastError();
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return last_error;
+ }
+# else
+ if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
+ {
+ last_error = ::GetLastError();
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return last_error;
+ }
+# endif
+ }
+ __except(GetExceptionCode() == STATUS_NO_MEMORY
+ ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
+ {
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return ERROR_OUTOFMEMORY;
+ }
+#endif
+
+ initialised_ = true;
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return 0;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_STATIC_MUTEX_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_thread.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_thread.ipp
new file mode 100644
index 00000000000..13faa0753ea
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_thread.ipp
@@ -0,0 +1,152 @@
+//
+// detail/impl/win_thread.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_THREAD_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP
+
+#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_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_APP) \
+ && !defined(UNDER_CE)
+
+#include <process.h>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_thread.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+win_thread::~win_thread()
+{
+ ::CloseHandle(thread_);
+
+ // The exit_event_ handle is deliberately allowed to leak here since it
+ // is an error for the owner of an internal thread not to join() it.
+}
+
+void win_thread::join()
+{
+ HANDLE handles[2] = { exit_event_, thread_ };
+ ::WaitForMultipleObjects(2, handles, FALSE, INFINITE);
+ ::CloseHandle(exit_event_);
+ if (terminate_threads())
+ {
+ ::TerminateThread(thread_, 0);
+ }
+ else
+ {
+ ::QueueUserAPC(apc_function, thread_, 0);
+ ::WaitForSingleObject(thread_, INFINITE);
+ }
+}
+
+std::size_t win_thread::hardware_concurrency()
+{
+ SYSTEM_INFO system_info;
+ ::GetSystemInfo(&system_info);
+ return system_info.dwNumberOfProcessors;
+}
+
+void win_thread::start_thread(func_base* arg, unsigned int stack_size)
+{
+ ::HANDLE entry_event = 0;
+ arg->entry_event_ = entry_event = ::CreateEventW(0, true, false, 0);
+ if (!entry_event)
+ {
+ DWORD last_error = ::GetLastError();
+ delete arg;
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "thread.entry_event");
+ }
+
+ arg->exit_event_ = exit_event_ = ::CreateEventW(0, true, false, 0);
+ if (!exit_event_)
+ {
+ DWORD last_error = ::GetLastError();
+ delete arg;
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "thread.exit_event");
+ }
+
+ unsigned int thread_id = 0;
+ thread_ = reinterpret_cast<HANDLE>(::_beginthreadex(0,
+ stack_size, win_thread_function, arg, 0, &thread_id));
+ if (!thread_)
+ {
+ DWORD last_error = ::GetLastError();
+ delete arg;
+ if (entry_event)
+ ::CloseHandle(entry_event);
+ if (exit_event_)
+ ::CloseHandle(exit_event_);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "thread");
+ }
+
+ if (entry_event)
+ {
+ ::WaitForSingleObject(entry_event, INFINITE);
+ ::CloseHandle(entry_event);
+ }
+}
+
+unsigned int __stdcall win_thread_function(void* arg)
+{
+ win_thread::auto_func_base_ptr func = {
+ static_cast<win_thread::func_base*>(arg) };
+
+ ::SetEvent(func.ptr->entry_event_);
+
+ func.ptr->run();
+
+ // Signal that the thread has finished its work, but rather than returning go
+ // to sleep to put the thread into a well known state. If the thread is being
+ // joined during global object destruction then it may be killed using
+ // TerminateThread (to avoid a deadlock in DllMain). Otherwise, the SleepEx
+ // call will be interrupted using QueueUserAPC and the thread will shut down
+ // cleanly.
+ HANDLE exit_event = func.ptr->exit_event_;
+ delete func.ptr;
+ func.ptr = 0;
+ ::SetEvent(exit_event);
+ ::SleepEx(INFINITE, TRUE);
+
+ return 0;
+}
+
+#if defined(WINVER) && (WINVER < 0x0500)
+void __stdcall apc_function(ULONG) {}
+#else
+void __stdcall apc_function(ULONG_PTR) {}
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_APP)
+ // && !defined(UNDER_CE)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_tss_ptr.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_tss_ptr.ipp
new file mode 100644
index 00000000000..8c6c5c60d76
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/win_tss_ptr.ipp
@@ -0,0 +1,59 @@
+//
+// detail/impl/win_tss_ptr.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WIN_TSS_PTR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP
+
+#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_WINDOWS)
+
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_tss_ptr.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+DWORD win_tss_ptr_create()
+{
+#if defined(UNDER_CE)
+ const DWORD out_of_indexes = 0xFFFFFFFF;
+#else
+ const DWORD out_of_indexes = TLS_OUT_OF_INDEXES;
+#endif
+
+ DWORD tss_key = ::TlsAlloc();
+ if (tss_key == out_of_indexes)
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "tss");
+ }
+ return tss_key;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
new file mode 100644
index 00000000000..17282810910
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
@@ -0,0 +1,631 @@
+//
+// detail/impl/winrt_ssocket_service_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WINRT_SSOCKET_SERVICE_BASE_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WINRT_SSOCKET_SERVICE_BASE_IPP
+
+#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_WINDOWS_RUNTIME)
+
+#include <cstring>
+#include <boost/asio/detail/winrt_ssocket_service_base.hpp>
+#include <boost/asio/detail/winrt_async_op.hpp>
+#include <boost/asio/detail/winrt_utils.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+winrt_ssocket_service_base::winrt_ssocket_service_base(
+ execution_context& context)
+ : scheduler_(use_service<scheduler_impl>(context)),
+ async_manager_(use_service<winrt_async_manager>(context)),
+ mutex_(),
+ impl_list_(0)
+{
+}
+
+void winrt_ssocket_service_base::base_shutdown()
+{
+ // Close all implementations, causing all operations to complete.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ base_implementation_type* impl = impl_list_;
+ while (impl)
+ {
+ boost::system::error_code ignored_ec;
+ close(*impl, ignored_ec);
+ impl = impl->next_;
+ }
+}
+
+void winrt_ssocket_service_base::construct(
+ winrt_ssocket_service_base::base_implementation_type& impl)
+{
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+void winrt_ssocket_service_base::base_move_construct(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ winrt_ssocket_service_base::base_implementation_type& other_impl)
+{
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = nullptr;
+
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+void winrt_ssocket_service_base::base_move_assign(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ winrt_ssocket_service_base& other_service,
+ winrt_ssocket_service_base::base_implementation_type& other_impl)
+{
+ boost::system::error_code ignored_ec;
+ close(impl, ignored_ec);
+
+ if (this != &other_service)
+ {
+ // Remove implementation from linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+ }
+
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = nullptr;
+
+ if (this != &other_service)
+ {
+ // Insert implementation into linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(other_service.mutex_);
+ impl.next_ = other_service.impl_list_;
+ impl.prev_ = 0;
+ if (other_service.impl_list_)
+ other_service.impl_list_->prev_ = &impl;
+ other_service.impl_list_ = &impl;
+ }
+}
+
+void winrt_ssocket_service_base::destroy(
+ winrt_ssocket_service_base::base_implementation_type& impl)
+{
+ boost::system::error_code ignored_ec;
+ close(impl, ignored_ec);
+
+ // Remove implementation from linked list of all implementations.
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+}
+
+boost::system::error_code winrt_ssocket_service_base::close(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (impl.socket_)
+ {
+ delete impl.socket_;
+ impl.socket_ = nullptr;
+ }
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+winrt_ssocket_service_base::native_handle_type
+winrt_ssocket_service_base::release(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ return nullptr;
+
+ cancel(impl, ec);
+ if (ec)
+ return nullptr;
+
+ native_handle_type tmp = impl.socket_;
+ impl.socket_ = nullptr;
+ return tmp;
+}
+
+std::size_t winrt_ssocket_service_base::do_get_endpoint(
+ const base_implementation_type& impl, bool local,
+ void* addr, std::size_t addr_len, boost::system::error_code& ec) const
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return addr_len;
+ }
+
+ try
+ {
+ std::string addr_string = winrt_utils::string(local
+ ? impl.socket_->Information->LocalAddress->CanonicalName
+ : impl.socket_->Information->RemoteAddress->CanonicalName);
+ unsigned short port = winrt_utils::integer(local
+ ? impl.socket_->Information->LocalPort
+ : impl.socket_->Information->RemotePort);
+ unsigned long scope = 0;
+
+ switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ if (addr_len < sizeof(sockaddr_in4_type))
+ {
+ ec = boost::asio::error::invalid_argument;
+ return addr_len;
+ }
+ else
+ {
+ socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET), addr_string.c_str(),
+ &reinterpret_cast<sockaddr_in4_type*>(addr)->sin_addr, &scope, ec);
+ reinterpret_cast<sockaddr_in4_type*>(addr)->sin_port
+ = socket_ops::host_to_network_short(port);
+ ec = boost::system::error_code();
+ return sizeof(sockaddr_in4_type);
+ }
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ if (addr_len < sizeof(sockaddr_in6_type))
+ {
+ ec = boost::asio::error::invalid_argument;
+ return addr_len;
+ }
+ else
+ {
+ socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET6), addr_string.c_str(),
+ &reinterpret_cast<sockaddr_in6_type*>(addr)->sin6_addr, &scope, ec);
+ reinterpret_cast<sockaddr_in6_type*>(addr)->sin6_port
+ = socket_ops::host_to_network_short(port);
+ ec = boost::system::error_code();
+ return sizeof(sockaddr_in6_type);
+ }
+ default:
+ ec = boost::asio::error::address_family_not_supported;
+ return addr_len;
+ }
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ return addr_len;
+ }
+}
+
+boost::system::error_code winrt_ssocket_service_base::do_set_option(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ int level, int optname, const void* optval,
+ std::size_t optlen, boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return ec;
+ }
+
+ try
+ {
+ if (level == BOOST_ASIO_OS_DEF(SOL_SOCKET)
+ && optname == BOOST_ASIO_OS_DEF(SO_KEEPALIVE))
+ {
+ if (optlen == sizeof(int))
+ {
+ int value = 0;
+ std::memcpy(&value, optval, optlen);
+ impl.socket_->Control->KeepAlive = !!value;
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ }
+ else if (level == BOOST_ASIO_OS_DEF(IPPROTO_TCP)
+ && optname == BOOST_ASIO_OS_DEF(TCP_NODELAY))
+ {
+ if (optlen == sizeof(int))
+ {
+ int value = 0;
+ std::memcpy(&value, optval, optlen);
+ impl.socket_->Control->NoDelay = !!value;
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ }
+
+ return ec;
+}
+
+void winrt_ssocket_service_base::do_get_option(
+ const winrt_ssocket_service_base::base_implementation_type& impl,
+ int level, int optname, void* optval,
+ std::size_t* optlen, boost::system::error_code& ec) const
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return;
+ }
+
+ try
+ {
+ if (level == BOOST_ASIO_OS_DEF(SOL_SOCKET)
+ && optname == BOOST_ASIO_OS_DEF(SO_KEEPALIVE))
+ {
+ if (*optlen >= sizeof(int))
+ {
+ int value = impl.socket_->Control->KeepAlive ? 1 : 0;
+ std::memcpy(optval, &value, sizeof(int));
+ *optlen = sizeof(int);
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ }
+ else if (level == BOOST_ASIO_OS_DEF(IPPROTO_TCP)
+ && optname == BOOST_ASIO_OS_DEF(TCP_NODELAY))
+ {
+ if (*optlen >= sizeof(int))
+ {
+ int value = impl.socket_->Control->NoDelay ? 1 : 0;
+ std::memcpy(optval, &value, sizeof(int));
+ *optlen = sizeof(int);
+ ec = boost::system::error_code();
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ }
+}
+
+boost::system::error_code winrt_ssocket_service_base::do_connect(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ const void* addr, boost::system::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return ec;
+ }
+
+ char addr_string[max_addr_v6_str_len];
+ unsigned short port;
+ switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET),
+ &reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_addr,
+ addr_string, sizeof(addr_string), 0, ec);
+ port = socket_ops::network_to_host_short(
+ reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_port);
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET6),
+ &reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_addr,
+ addr_string, sizeof(addr_string), 0, ec);
+ port = socket_ops::network_to_host_short(
+ reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_port);
+ break;
+ default:
+ ec = boost::asio::error::address_family_not_supported;
+ return ec;
+ }
+
+ if (!ec) try
+ {
+ async_manager_.sync(impl.socket_->ConnectAsync(
+ ref new Windows::Networking::HostName(
+ winrt_utils::string(addr_string)),
+ winrt_utils::string(port)), ec);
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ }
+
+ return ec;
+}
+
+void winrt_ssocket_service_base::start_connect_op(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ const void* addr, winrt_async_op<void>* op, bool is_continuation)
+{
+ if (!is_open(impl))
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ char addr_string[max_addr_v6_str_len];
+ unsigned short port = 0;
+ switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET),
+ &reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_addr,
+ addr_string, sizeof(addr_string), 0, op->ec_);
+ port = socket_ops::network_to_host_short(
+ reinterpret_cast<const sockaddr_in4_type*>(addr)->sin_port);
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ socket_ops::inet_ntop(BOOST_ASIO_OS_DEF(AF_INET6),
+ &reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_addr,
+ addr_string, sizeof(addr_string), 0, op->ec_);
+ port = socket_ops::network_to_host_short(
+ reinterpret_cast<const sockaddr_in6_type*>(addr)->sin6_port);
+ break;
+ default:
+ op->ec_ = boost::asio::error::address_family_not_supported;
+ break;
+ }
+
+ if (op->ec_)
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ try
+ {
+ async_manager_.async(impl.socket_->ConnectAsync(
+ ref new Windows::Networking::HostName(
+ winrt_utils::string(addr_string)),
+ winrt_utils::string(port)), op);
+ }
+ catch (Platform::Exception^ e)
+ {
+ op->ec_ = boost::system::error_code(
+ e->HResult, boost::system::system_category());
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+std::size_t winrt_ssocket_service_base::do_send(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ const boost::asio::const_buffer& data,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+{
+ if (flags)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ try
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ boost::asio::const_buffer> bufs(boost::asio::buffer(data));
+
+ if (bufs.all_empty())
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ return async_manager_.sync(
+ impl.socket_->OutputStream->WriteAsync(bufs.buffers()[0]), ec);
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ return 0;
+ }
+}
+
+void winrt_ssocket_service_base::start_send_op(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ const boost::asio::const_buffer& data, socket_base::message_flags flags,
+ winrt_async_op<unsigned int>* op, bool is_continuation)
+{
+ if (flags)
+ {
+ op->ec_ = boost::asio::error::operation_not_supported;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (!is_open(impl))
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ try
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ boost::asio::const_buffer> bufs(boost::asio::buffer(data));
+
+ if (bufs.all_empty())
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ async_manager_.async(
+ impl.socket_->OutputStream->WriteAsync(bufs.buffers()[0]), op);
+ }
+ catch (Platform::Exception^ e)
+ {
+ op->ec_ = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+std::size_t winrt_ssocket_service_base::do_receive(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ const boost::asio::mutable_buffer& data,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+{
+ if (flags)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ if (!is_open(impl))
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ try
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ boost::asio::mutable_buffer> bufs(boost::asio::buffer(data));
+
+ if (bufs.all_empty())
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ async_manager_.sync(
+ impl.socket_->InputStream->ReadAsync(
+ bufs.buffers()[0], bufs.buffers()[0]->Capacity,
+ Windows::Storage::Streams::InputStreamOptions::Partial), ec);
+
+ std::size_t bytes_transferred = bufs.buffers()[0]->Length;
+ if (bytes_transferred == 0 && !ec)
+ {
+ ec = boost::asio::error::eof;
+ }
+
+ return bytes_transferred;
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ return 0;
+ }
+}
+
+void winrt_ssocket_service_base::start_receive_op(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ const boost::asio::mutable_buffer& data, socket_base::message_flags flags,
+ winrt_async_op<Windows::Storage::Streams::IBuffer^>* op,
+ bool is_continuation)
+{
+ if (flags)
+ {
+ op->ec_ = boost::asio::error::operation_not_supported;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (!is_open(impl))
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ try
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ boost::asio::mutable_buffer> bufs(boost::asio::buffer(data));
+
+ if (bufs.all_empty())
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ async_manager_.async(
+ impl.socket_->InputStream->ReadAsync(
+ bufs.buffers()[0], bufs.buffers()[0]->Capacity,
+ Windows::Storage::Streams::InputStreamOptions::Partial), op);
+ }
+ catch (Platform::Exception^ e)
+ {
+ op->ec_ = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WINRT_SSOCKET_SERVICE_BASE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp
new file mode 100644
index 00000000000..89ac7a123ca
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp
@@ -0,0 +1,94 @@
+//
+// detail/impl/winrt_timer_scheduler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WINRT_TIMER_SCHEDULER_HPP
+#define BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+void winrt_timer_scheduler::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+// Remove a timer queue from the reactor.
+template <typename Time_Traits>
+void winrt_timer_scheduler::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void winrt_timer_scheduler::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ event_.signal(lock);
+}
+
+template <typename Time_Traits>
+std::size_t winrt_timer_scheduler::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void winrt_timer_scheduler::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& to,
+ typename timer_queue<Time_Traits>::per_timer_data& from)
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(to, ops);
+ queue.move_timer(to, from);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp
new file mode 100644
index 00000000000..48cb29c42ee
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp
@@ -0,0 +1,123 @@
+//
+// detail/impl/winrt_timer_scheduler.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WINRT_TIMER_SCHEDULER_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_IPP
+
+#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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/winrt_timer_scheduler.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+winrt_timer_scheduler::winrt_timer_scheduler(execution_context& context)
+ : execution_context_service_base<winrt_timer_scheduler>(context),
+ scheduler_(use_service<scheduler_impl>(context)),
+ mutex_(),
+ event_(),
+ timer_queues_(),
+ thread_(0),
+ stop_thread_(false),
+ shutdown_(false)
+{
+ thread_ = new boost::asio::detail::thread(
+ bind_handler(&winrt_timer_scheduler::call_run_thread, this));
+}
+
+winrt_timer_scheduler::~winrt_timer_scheduler()
+{
+ shutdown();
+}
+
+void winrt_timer_scheduler::shutdown()
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ stop_thread_ = true;
+ event_.signal(lock);
+ lock.unlock();
+
+ if (thread_)
+ {
+ thread_->join();
+ delete thread_;
+ thread_ = 0;
+ }
+
+ op_queue<operation> ops;
+ timer_queues_.get_all_timers(ops);
+ scheduler_.abandon_operations(ops);
+}
+
+void winrt_timer_scheduler::notify_fork(execution_context::fork_event)
+{
+}
+
+void winrt_timer_scheduler::init_task()
+{
+}
+
+void winrt_timer_scheduler::run_thread()
+{
+ boost::asio::detail::mutex::scoped_lock lock(mutex_);
+ while (!stop_thread_)
+ {
+ const long max_wait_duration = 5 * 60 * 1000000;
+ long wait_duration = timer_queues_.wait_duration_usec(max_wait_duration);
+ event_.wait_for_usec(lock, wait_duration);
+ event_.clear(lock);
+ op_queue<operation> ops;
+ timer_queues_.get_ready_timers(ops);
+ if (!ops.empty())
+ {
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ lock.lock();
+ }
+ }
+}
+
+void winrt_timer_scheduler::call_run_thread(winrt_timer_scheduler* scheduler)
+{
+ scheduler->run_thread();
+}
+
+void winrt_timer_scheduler::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void winrt_timer_scheduler::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WINRT_TIMER_SCHEDULER_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/impl/winsock_init.ipp b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winsock_init.ipp
new file mode 100644
index 00000000000..85b50df5d0f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/impl/winsock_init.ipp
@@ -0,0 +1,84 @@
+//
+// detail/impl/winsock_init.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_WINSOCK_INIT_IPP
+#define BOOST_ASIO_DETAIL_IMPL_WINSOCK_INIT_IPP
+
+#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_WINDOWS) || defined(__CYGWIN__)
+
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/winsock_init.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+void winsock_init_base::startup(data& d,
+ unsigned char major, unsigned char minor)
+{
+ if (::InterlockedIncrement(&d.init_count_) == 1)
+ {
+ WSADATA wsa_data;
+ long result = ::WSAStartup(MAKEWORD(major, minor), &wsa_data);
+ ::InterlockedExchange(&d.result_, result);
+ }
+}
+
+void winsock_init_base::manual_startup(data& d)
+{
+ if (::InterlockedIncrement(&d.init_count_) == 1)
+ {
+ ::InterlockedExchange(&d.result_, 0);
+ }
+}
+
+void winsock_init_base::cleanup(data& d)
+{
+ if (::InterlockedDecrement(&d.init_count_) == 0)
+ {
+ ::WSACleanup();
+ }
+}
+
+void winsock_init_base::manual_cleanup(data& d)
+{
+ ::InterlockedDecrement(&d.init_count_);
+}
+
+void winsock_init_base::throw_on_error(data& d)
+{
+ long result = ::InterlockedExchangeAdd(&d.result_, 0);
+ if (result != 0)
+ {
+ boost::system::error_code ec(result,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "winsock");
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_WINSOCK_INIT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/io_control.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/io_control.hpp
new file mode 100644
index 00000000000..4f091dba08e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/io_control.hpp
@@ -0,0 +1,86 @@
+//
+// detail/io_control.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_CONTROL_HPP
+#define BOOST_ASIO_DETAIL_IO_CONTROL_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/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace io_control {
+
+// I/O control command for getting number of bytes available.
+class bytes_readable
+{
+public:
+ // Default constructor.
+ bytes_readable()
+ : value_(0)
+ {
+ }
+
+ // Construct with a specific command value.
+ bytes_readable(std::size_t value)
+ : value_(static_cast<detail::ioctl_arg_type>(value))
+ {
+ }
+
+ // Get the name of the IO control command.
+ int name() const
+ {
+ return static_cast<int>(BOOST_ASIO_OS_DEF(FIONREAD));
+ }
+
+ // Set the value of the I/O control command.
+ void set(std::size_t value)
+ {
+ value_ = static_cast<detail::ioctl_arg_type>(value);
+ }
+
+ // Get the current value of the I/O control command.
+ std::size_t get() const
+ {
+ return static_cast<std::size_t>(value_);
+ }
+
+ // Get the address of the command data.
+ detail::ioctl_arg_type* data()
+ {
+ return &value_;
+ }
+
+ // Get the address of the command data.
+ const detail::ioctl_arg_type* data() const
+ {
+ return &value_;
+ }
+
+private:
+ detail::ioctl_arg_type value_;
+};
+
+} // namespace io_control
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IO_CONTROL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/io_object_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/io_object_executor.hpp
new file mode 100644
index 00000000000..70b026b476a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/io_object_executor.hpp
@@ -0,0 +1,162 @@
+//
+// io_object_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_OBJECT_EXECUTOR_HPP
+#define BOOST_ASIO_DETAIL_IO_OBJECT_EXECUTOR_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/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Wrap the (potentially polymorphic) executor so that we can bypass it when
+// dispatching on a target executor that has a native I/O implementation.
+template <typename Executor>
+class io_object_executor
+{
+public:
+ io_object_executor(const Executor& ex,
+ bool native_implementation) BOOST_ASIO_NOEXCEPT
+ : executor_(ex),
+ has_native_impl_(native_implementation)
+ {
+ }
+
+ io_object_executor(const io_object_executor& other) BOOST_ASIO_NOEXCEPT
+ : executor_(other.executor_),
+ has_native_impl_(other.has_native_impl_)
+ {
+ }
+
+ template <typename Executor1>
+ io_object_executor(
+ const io_object_executor<Executor1>& other) BOOST_ASIO_NOEXCEPT
+ : executor_(other.inner_executor()),
+ has_native_impl_(other.has_native_implementation())
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ io_object_executor(io_object_executor&& other) BOOST_ASIO_NOEXCEPT
+ : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)),
+ has_native_impl_(other.has_native_impl_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ const Executor& inner_executor() const BOOST_ASIO_NOEXCEPT
+ {
+ return executor_;
+ }
+
+ bool has_native_implementation() const BOOST_ASIO_NOEXCEPT
+ {
+ return has_native_impl_;
+ }
+
+ execution_context& context() const BOOST_ASIO_NOEXCEPT
+ {
+ return executor_.context();
+ }
+
+ void on_work_started() const BOOST_ASIO_NOEXCEPT
+ {
+ if (is_same<Executor, io_context::executor_type>::value
+ || has_native_impl_)
+ {
+ // When using a native implementation, work is already counted by the
+ // execution context.
+ }
+ else
+ {
+ executor_.on_work_started();
+ }
+ }
+
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT
+ {
+ if (is_same<Executor, io_context::executor_type>::value
+ || has_native_impl_)
+ {
+ // When using a native implementation, work is already counted by the
+ // execution context.
+ }
+ else
+ {
+ executor_.on_work_finished();
+ }
+ }
+
+ template <typename F, typename A>
+ void dispatch(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
+ {
+ if (is_same<Executor, io_context::executor_type>::value
+ || has_native_impl_)
+ {
+ // When using a native implementation, I/O completion handlers are
+ // already dispatched according to the execution context's executor's
+ // rules. We can call the function directly.
+ typename decay<F>::type function(BOOST_ASIO_MOVE_CAST(F)(f));
+ boost_asio_handler_invoke_helpers::invoke(function, function);
+ }
+ else
+ {
+ executor_.dispatch(BOOST_ASIO_MOVE_CAST(F)(f), a);
+ }
+ }
+
+ template <typename F, typename A>
+ void post(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
+ {
+ executor_.post(BOOST_ASIO_MOVE_CAST(F)(f), a);
+ }
+
+ template <typename F, typename A>
+ void defer(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
+ {
+ executor_.defer(BOOST_ASIO_MOVE_CAST(F)(f), a);
+ }
+
+ friend bool operator==(const io_object_executor& a,
+ const io_object_executor& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.executor_ == b.executor_
+ && a.has_native_impl_ == b.has_native_impl_;
+ }
+
+ friend bool operator!=(const io_object_executor& a,
+ const io_object_executor& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.executor_ != b.executor_
+ || a.has_native_impl_ != b.has_native_impl_;
+ }
+
+private:
+ Executor executor_;
+ const bool has_native_impl_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IO_OBJECT_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/io_object_impl.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/io_object_impl.hpp
new file mode 100644
index 00000000000..be1a5e2ac29
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/io_object_impl.hpp
@@ -0,0 +1,195 @@
+//
+// io_object_impl.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_OBJECT_IMPL_HPP
+#define BOOST_ASIO_DETAIL_IO_OBJECT_IMPL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <new>
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/io_object_executor.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class executor;
+
+namespace detail {
+
+inline bool is_native_io_executor(const io_context::executor_type&)
+{
+ return true;
+}
+
+template <typename Executor>
+inline bool is_native_io_executor(const Executor&,
+ typename enable_if<!is_same<Executor, executor>::value>::type* = 0)
+{
+ return false;
+}
+
+template <typename Executor>
+inline bool is_native_io_executor(const Executor& ex,
+ typename enable_if<is_same<Executor, executor>::value>::type* = 0)
+{
+#if !defined (BOOST_ASIO_NO_TYPEID)
+ return ex.target_type() == typeid(io_context::executor_type);
+#else // !defined (BOOST_ASIO_NO_TYPEID)
+ return false;
+#endif // !defined (BOOST_ASIO_NO_TYPEID)
+}
+
+template <typename IoObjectService,
+ typename Executor = io_context::executor_type>
+class io_object_impl
+{
+public:
+ // The type of the service that will be used to provide I/O operations.
+ typedef IoObjectService service_type;
+
+ // The underlying implementation type of I/O object.
+ typedef typename service_type::implementation_type implementation_type;
+
+ // The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ // The type of executor to be used when implementing asynchronous operations.
+ typedef io_object_executor<Executor> implementation_executor_type;
+
+ // Construct an I/O object using an executor.
+ explicit io_object_impl(const executor_type& ex)
+ : service_(&boost::asio::use_service<IoObjectService>(ex.context())),
+ implementation_executor_(ex, (is_native_io_executor)(ex))
+ {
+ service_->construct(implementation_);
+ }
+
+ // Construct an I/O object using an execution context.
+ template <typename ExecutionContext>
+ explicit io_object_impl(ExecutionContext& context,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type* = 0)
+ : service_(&boost::asio::use_service<IoObjectService>(context)),
+ implementation_executor_(context.get_executor(),
+ is_same<ExecutionContext, io_context>::value)
+ {
+ service_->construct(implementation_);
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ // Move-construct an I/O object.
+ io_object_impl(io_object_impl&& other)
+ : service_(&other.get_service()),
+ implementation_executor_(other.get_implementation_executor())
+ {
+ service_->move_construct(implementation_, other.implementation_);
+ }
+
+ // Perform a converting move-construction of an I/O object.
+ template <typename IoObjectService1, typename Executor1>
+ io_object_impl(io_object_impl<IoObjectService1, Executor1>&& other)
+ : service_(&boost::asio::use_service<IoObjectService>(
+ other.get_implementation_executor().context())),
+ implementation_executor_(other.get_implementation_executor())
+ {
+ service_->converting_move_construct(implementation_,
+ other.get_service(), other.get_implementation());
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ // Destructor.
+ ~io_object_impl()
+ {
+ service_->destroy(implementation_);
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ // Move-assign an I/O object.
+ io_object_impl& operator=(io_object_impl&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(implementation_,
+ *other.service_, other.implementation_);
+ implementation_executor_.~implementation_executor_type();
+ new (&implementation_executor_) implementation_executor_type(
+ std::move(other.implementation_executor_));
+ service_ = other.service_;
+ }
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ // Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return implementation_executor_.inner_executor();
+ }
+
+ // Get the executor to be used when implementing asynchronous operations.
+ const implementation_executor_type& get_implementation_executor()
+ BOOST_ASIO_NOEXCEPT
+ {
+ return implementation_executor_;
+ }
+
+ // Get the service associated with the I/O object.
+ service_type& get_service()
+ {
+ return *service_;
+ }
+
+ // Get the service associated with the I/O object.
+ const service_type& get_service() const
+ {
+ return *service_;
+ }
+
+ // Get the underlying implementation of the I/O object.
+ implementation_type& get_implementation()
+ {
+ return implementation_;
+ }
+
+ // Get the underlying implementation of the I/O object.
+ const implementation_type& get_implementation() const
+ {
+ return implementation_;
+ }
+
+private:
+ // Disallow copying and copy assignment.
+ io_object_impl(const io_object_impl&);
+ io_object_impl& operator=(const io_object_impl&);
+
+ // The service associated with the I/O object.
+ service_type* service_;
+
+ // The underlying implementation of the I/O object.
+ implementation_type implementation_;
+
+ // The associated executor.
+ implementation_executor_type implementation_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IO_OBJECT_IMPL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/is_buffer_sequence.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/is_buffer_sequence.hpp
new file mode 100644
index 00000000000..89b8df762df
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/is_buffer_sequence.hpp
@@ -0,0 +1,308 @@
+//
+// detail/is_buffer_sequence.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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();
+ void grow();
+ void shrink();
+};
+
+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>
+char (&grow_memfn_helper(...))[2];
+
+template <typename T>
+char grow_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::grow>*);
+
+template <typename>
+char (&shrink_memfn_helper(...))[2];
+
+template <typename T>
+char shrink_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::shrink>*);
+
+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_v1
+ : 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_v1
+ : conditional<is_class<T>::value,
+ is_dynamic_buffer_class_v1<T>,
+ false_type>::type
+{
+};
+
+template <typename T>
+struct is_dynamic_buffer_class_v2
+ : 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(grow_memfn_helper<T>(0)) != 1 &&
+ sizeof(shrink_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_v2
+ : conditional<is_class<T>::value,
+ is_dynamic_buffer_class_v2<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.70.0/boost/asio/detail/is_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/is_executor.hpp
new file mode 100644
index 00000000000..ffcbb973f1d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/is_executor.hpp
@@ -0,0 +1,128 @@
+//
+// detail/is_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_HPP
+#define BOOST_ASIO_DETAIL_IS_EXECUTOR_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 {
+namespace detail {
+
+struct executor_memfns_base
+{
+ void context();
+ void on_work_started();
+ void on_work_finished();
+ void dispatch();
+ void post();
+ void defer();
+};
+
+template <typename T>
+struct executor_memfns_derived
+ : T, executor_memfns_base
+{
+};
+
+template <typename T, T>
+struct executor_memfns_check
+{
+};
+
+template <typename>
+char (&context_memfn_helper(...))[2];
+
+template <typename T>
+char context_memfn_helper(
+ executor_memfns_check<
+ void (executor_memfns_base::*)(),
+ &executor_memfns_derived<T>::context>*);
+
+template <typename>
+char (&on_work_started_memfn_helper(...))[2];
+
+template <typename T>
+char on_work_started_memfn_helper(
+ executor_memfns_check<
+ void (executor_memfns_base::*)(),
+ &executor_memfns_derived<T>::on_work_started>*);
+
+template <typename>
+char (&on_work_finished_memfn_helper(...))[2];
+
+template <typename T>
+char on_work_finished_memfn_helper(
+ executor_memfns_check<
+ void (executor_memfns_base::*)(),
+ &executor_memfns_derived<T>::on_work_finished>*);
+
+template <typename>
+char (&dispatch_memfn_helper(...))[2];
+
+template <typename T>
+char dispatch_memfn_helper(
+ executor_memfns_check<
+ void (executor_memfns_base::*)(),
+ &executor_memfns_derived<T>::dispatch>*);
+
+template <typename>
+char (&post_memfn_helper(...))[2];
+
+template <typename T>
+char post_memfn_helper(
+ executor_memfns_check<
+ void (executor_memfns_base::*)(),
+ &executor_memfns_derived<T>::post>*);
+
+template <typename>
+char (&defer_memfn_helper(...))[2];
+
+template <typename T>
+char defer_memfn_helper(
+ executor_memfns_check<
+ void (executor_memfns_base::*)(),
+ &executor_memfns_derived<T>::defer>*);
+
+template <typename T>
+struct is_executor_class
+ : integral_constant<bool,
+ sizeof(context_memfn_helper<T>(0)) != 1 &&
+ sizeof(on_work_started_memfn_helper<T>(0)) != 1 &&
+ sizeof(on_work_finished_memfn_helper<T>(0)) != 1 &&
+ sizeof(dispatch_memfn_helper<T>(0)) != 1 &&
+ sizeof(post_memfn_helper<T>(0)) != 1 &&
+ sizeof(defer_memfn_helper<T>(0)) != 1>
+{
+};
+
+template <typename T>
+struct is_executor
+ : conditional<is_class<T>::value,
+ is_executor_class<T>,
+ false_type>::type
+{
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IS_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/keyword_tss_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/keyword_tss_ptr.hpp
new file mode 100644
index 00000000000..b8770040a94
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/keyword_tss_ptr.hpp
@@ -0,0 +1,72 @@
+//
+// detail/keyword_tss_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_KEYWORD_TSS_PTR_HPP
+#define BOOST_ASIO_DETAIL_KEYWORD_TSS_PTR_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_THREAD_KEYWORD_EXTENSION)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+class keyword_tss_ptr
+ : private noncopyable
+{
+public:
+ // Constructor.
+ keyword_tss_ptr()
+ {
+ }
+
+ // Destructor.
+ ~keyword_tss_ptr()
+ {
+ }
+
+ // Get the value.
+ operator T*() const
+ {
+ return value_;
+ }
+
+ // Set the value.
+ void operator=(T* value)
+ {
+ value_ = value;
+ }
+
+private:
+ static BOOST_ASIO_THREAD_KEYWORD T* value_;
+};
+
+template <typename T>
+BOOST_ASIO_THREAD_KEYWORD T* keyword_tss_ptr<T>::value_;
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
+
+#endif // BOOST_ASIO_DETAIL_KEYWORD_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/kqueue_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/kqueue_reactor.hpp
new file mode 100644
index 00000000000..a5de8fa9014
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/kqueue_reactor.hpp
@@ -0,0 +1,244 @@
+//
+// detail/kqueue_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005 Stefan Arentz (stefan at soze 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_KQUEUE_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_KQUEUE_REACTOR_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_KQUEUE)
+
+#include <cstddef>
+#include <sys/types.h>
+#include <sys/event.h>
+#include <sys/time.h>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/object_pool.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/select_interrupter.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/timer_queue_set.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+
+// Older versions of Mac OS X may not define EV_OOBAND.
+#if !defined(EV_OOBAND)
+# define EV_OOBAND EV_FLAG1
+#endif // !defined(EV_OOBAND)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class scheduler;
+
+class kqueue_reactor
+ : public execution_context_service_base<kqueue_reactor>
+{
+private:
+ // The mutex type used by this reactor.
+ typedef conditionally_enabled_mutex mutex;
+
+public:
+ enum op_types { read_op = 0, write_op = 1,
+ connect_op = 1, except_op = 2, max_ops = 3 };
+
+ // Per-descriptor queues.
+ struct descriptor_state
+ {
+ descriptor_state(bool locking) : mutex_(locking) {}
+
+ friend class kqueue_reactor;
+ friend class object_pool_access;
+
+ descriptor_state* next_;
+ descriptor_state* prev_;
+
+ mutex mutex_;
+ int descriptor_;
+ int num_kevents_; // 1 == read only, 2 == read and write
+ op_queue<reactor_op> op_queue_[max_ops];
+ bool shutdown_;
+ };
+
+ // Per-descriptor data.
+ typedef descriptor_state* per_descriptor_data;
+
+ // Constructor.
+ BOOST_ASIO_DECL kqueue_reactor(boost::asio::execution_context& ctx);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~kqueue_reactor();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Recreate internal descriptors following a fork.
+ BOOST_ASIO_DECL void notify_fork(
+ boost::asio::execution_context::fork_event fork_ev);
+
+ // Initialise the task.
+ BOOST_ASIO_DECL void init_task();
+
+ // Register a socket with the reactor. Returns 0 on success, system error
+ // code on failure.
+ BOOST_ASIO_DECL int register_descriptor(socket_type descriptor,
+ per_descriptor_data& descriptor_data);
+
+ // Register a descriptor with an associated single operation. Returns 0 on
+ // success, system error code on failure.
+ BOOST_ASIO_DECL int register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op);
+
+ // Move descriptor registration from one descriptor_data object to another.
+ BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
+ per_descriptor_data& target_descriptor_data,
+ per_descriptor_data& source_descriptor_data);
+
+ // Post a reactor operation for immediate completion.
+ void post_immediate_completion(reactor_op* op, bool is_continuation)
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative);
+
+ // Cancel all operations associated with the given descriptor. The
+ // handlers associated with the descriptor will be invoked with the
+ // operation_aborted error.
+ BOOST_ASIO_DECL void cancel_ops(socket_type descriptor,
+ per_descriptor_data& descriptor_data);
+
+ // Cancel any operations that are running against the descriptor and remove
+ // its registration from the reactor. The reactor resources associated with
+ // the descriptor must be released by calling cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
+ per_descriptor_data& descriptor_data, bool closing);
+
+ // Remove the descriptor's registration from the reactor. The reactor
+ // resources associated with the descriptor must be released by calling
+ // cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_internal_descriptor(
+ socket_type descriptor, per_descriptor_data& descriptor_data);
+
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ BOOST_ASIO_DECL void cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data);
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source);
+
+ // Run the kqueue loop.
+ BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
+
+ // Interrupt the kqueue loop.
+ BOOST_ASIO_DECL void interrupt();
+
+private:
+ // Create the kqueue file descriptor. Throws an exception if the descriptor
+ // cannot be created.
+ BOOST_ASIO_DECL static int do_kqueue_create();
+
+ // Allocate a new descriptor state object.
+ BOOST_ASIO_DECL descriptor_state* allocate_descriptor_state();
+
+ // Free an existing descriptor state object.
+ BOOST_ASIO_DECL void free_descriptor_state(descriptor_state* s);
+
+ // Helper function to add a new timer queue.
+ BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Get the timeout value for the kevent call.
+ BOOST_ASIO_DECL timespec* get_timeout(long usec, timespec& ts);
+
+ // The scheduler used to post completions.
+ scheduler& scheduler_;
+
+ // Mutex to protect access to internal data.
+ mutex mutex_;
+
+ // The kqueue file descriptor.
+ int kqueue_fd_;
+
+ // The interrupter is used to break a blocking kevent call.
+ select_interrupter interrupter_;
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+
+ // Mutex to protect access to the registered descriptors.
+ mutex registered_descriptors_mutex_;
+
+ // Keep track of all registered descriptors.
+ object_pool<descriptor_state> registered_descriptors_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/kqueue_reactor.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/kqueue_reactor.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_KQUEUE)
+
+#endif // BOOST_ASIO_DETAIL_KQUEUE_REACTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/limits.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/limits.hpp
index 036c5999b8d..036c5999b8d 100644
--- a/src/third_party/boost-1.69.0/boost/asio/detail/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/limits.hpp
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/local_free_on_block_exit.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/local_free_on_block_exit.hpp
new file mode 100644
index 00000000000..bcf65bed148
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/local_free_on_block_exit.hpp
@@ -0,0 +1,61 @@
+//
+// detail/local_free_on_block_exit.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_LOCAL_FREE_ON_BLOCK_EXIT_HPP
+#define BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_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_WINDOWS) || defined(__CYGWIN__)
+#if !defined(BOOST_ASIO_WINDOWS_APP)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class local_free_on_block_exit
+ : private noncopyable
+{
+public:
+ // Constructor blocks all signals for the calling thread.
+ explicit local_free_on_block_exit(void* p)
+ : p_(p)
+ {
+ }
+
+ // Destructor restores the previous signal mask.
+ ~local_free_on_block_exit()
+ {
+ ::LocalFree(p_);
+ }
+
+private:
+ void* p_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS_APP)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/macos_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/macos_fenced_block.hpp
new file mode 100644
index 00000000000..639fc65a63f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/macos_fenced_block.hpp
@@ -0,0 +1,64 @@
+//
+// detail/macos_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_MACOS_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_MACOS_FENCED_BLOCK_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(__MACH__) && defined(__APPLE__)
+
+#include <libkern/OSAtomic.h>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class macos_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit macos_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit macos_fenced_block(full_t)
+ {
+ OSMemoryBarrier();
+ }
+
+ // Destructor.
+ ~macos_fenced_block()
+ {
+ OSMemoryBarrier();
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__MACH__) && defined(__APPLE__)
+
+#endif // BOOST_ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/memory.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/memory.hpp
new file mode 100644
index 00000000000..a18b4d9accf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/memory.hpp
@@ -0,0 +1,72 @@
+//
+// detail/memory.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_MEMORY_HPP
+#define BOOST_ASIO_DETAIL_MEMORY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <memory>
+
+#if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+# include <boost/shared_ptr.hpp>
+# include <boost/weak_ptr.hpp>
+#endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+
+#if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+# include <boost/utility/addressof.hpp>
+#endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+using std::shared_ptr;
+using std::weak_ptr;
+#else // defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+using boost::shared_ptr;
+using boost::weak_ptr;
+#endif // defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+
+#if defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+using std::addressof;
+#else // defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+using boost::addressof;
+#endif // defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+
+} // namespace detail
+
+#if defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
+using std::allocator_arg_t;
+# define BOOST_ASIO_USES_ALLOCATOR(t) \
+ namespace std { \
+ template <typename Allocator> \
+ struct uses_allocator<t, Allocator> : true_type {}; \
+ } \
+ /**/
+# define BOOST_ASIO_REBIND_ALLOC(alloc, t) \
+ typename std::allocator_traits<alloc>::template rebind_alloc<t>
+ /**/
+#else // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
+struct allocator_arg_t {};
+# define BOOST_ASIO_USES_ALLOCATOR(t)
+# define BOOST_ASIO_REBIND_ALLOC(alloc, t) \
+ typename alloc::template rebind<t>::other
+ /**/
+#endif // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_MEMORY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/mutex.hpp
new file mode 100644
index 00000000000..e5e75263b55
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/mutex.hpp
@@ -0,0 +1,50 @@
+//
+// detail/mutex.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_MUTEX_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_THREADS)
+# include <boost/asio/detail/null_mutex.hpp>
+#elif defined(BOOST_ASIO_WINDOWS)
+# include <boost/asio/detail/win_mutex.hpp>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_mutex.hpp>
+#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+# include <boost/asio/detail/std_mutex.hpp>
+#else
+# error Only Windows, POSIX and std::mutex are supported!
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS)
+typedef null_mutex mutex;
+#elif defined(BOOST_ASIO_WINDOWS)
+typedef win_mutex mutex;
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+typedef posix_mutex mutex;
+#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+typedef std_mutex mutex;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/non_const_lvalue.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/non_const_lvalue.hpp
new file mode 100644
index 00000000000..28e2a52bbe7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/non_const_lvalue.hpp
@@ -0,0 +1,56 @@
+//
+// detail/non_const_lvalue.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NON_CONST_LVALUE_HPP
+#define BOOST_ASIO_DETAIL_NON_CONST_LVALUE_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 {
+namespace detail {
+
+template <typename T>
+struct non_const_lvalue
+{
+#if defined(BOOST_ASIO_HAS_MOVE)
+ explicit non_const_lvalue(T& t)
+ : value(static_cast<typename conditional<
+ is_same<T, typename decay<T>::type>::value,
+ typename decay<T>::type&, T&&>::type>(t))
+ {
+ }
+
+ typename conditional<is_same<T, typename decay<T>::type>::value,
+ typename decay<T>::type&, typename decay<T>::type>::type value;
+#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ explicit non_const_lvalue(const typename decay<T>::type& t)
+ : value(t)
+ {
+ }
+
+ typename decay<T>::type value;
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_NON_CONST_LVALUE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/noncopyable.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/noncopyable.hpp
new file mode 100644
index 00000000000..77cc71cb4d6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/noncopyable.hpp
@@ -0,0 +1,45 @@
+//
+// detail/noncopyable.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NONCOPYABLE_HPP
+#define BOOST_ASIO_DETAIL_NONCOPYABLE_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class noncopyable
+{
+protected:
+ noncopyable() {}
+ ~noncopyable() {}
+private:
+ noncopyable(const noncopyable&);
+ const noncopyable& operator=(const noncopyable&);
+};
+
+} // namespace detail
+
+using boost::asio::detail::noncopyable;
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_NONCOPYABLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_event.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_event.hpp
new file mode 100644
index 00000000000..8ffc17c86c3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_event.hpp
@@ -0,0 +1,102 @@
+//
+// detail/null_event.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_EVENT_HPP
+#define BOOST_ASIO_DETAIL_NULL_EVENT_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class null_event
+ : private noncopyable
+{
+public:
+ // Constructor.
+ null_event()
+ {
+ }
+
+ // Destructor.
+ ~null_event()
+ {
+ }
+
+ // Signal the event. (Retained for backward compatibility.)
+ template <typename Lock>
+ void signal(Lock&)
+ {
+ }
+
+ // Signal all waiters.
+ template <typename Lock>
+ void signal_all(Lock&)
+ {
+ }
+
+ // Unlock the mutex and signal one waiter.
+ template <typename Lock>
+ void unlock_and_signal_one(Lock&)
+ {
+ }
+
+ // If there's a waiter, unlock the mutex and signal it.
+ template <typename Lock>
+ bool maybe_unlock_and_signal_one(Lock&)
+ {
+ return false;
+ }
+
+ // Reset the event.
+ template <typename Lock>
+ void clear(Lock&)
+ {
+ }
+
+ // Wait for the event to become signalled.
+ template <typename Lock>
+ void wait(Lock&)
+ {
+ do_wait();
+ }
+
+ // Timed wait for the event to become signalled.
+ template <typename Lock>
+ bool wait_for_usec(Lock&, long usec)
+ {
+ do_wait_for_usec(usec);
+ return true;
+ }
+
+private:
+ BOOST_ASIO_DECL static void do_wait();
+ BOOST_ASIO_DECL static void do_wait_for_usec(long usec);
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/null_event.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_NULL_EVENT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_fenced_block.hpp
new file mode 100644
index 00000000000..8fadff69060
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_fenced_block.hpp
@@ -0,0 +1,49 @@
+//
+// detail/null_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_NULL_FENCED_BLOCK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class null_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_or_full_t { half, full };
+
+ // Constructor.
+ explicit null_fenced_block(half_or_full_t)
+ {
+ }
+
+ // Destructor.
+ ~null_fenced_block()
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_NULL_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_global.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_global.hpp
new file mode 100644
index 00000000000..12303c295bf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_global.hpp
@@ -0,0 +1,61 @@
+//
+// detail/null_global.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_GLOBAL_HPP
+#define BOOST_ASIO_DETAIL_NULL_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct null_global_impl
+{
+ null_global_impl()
+ : ptr_(0)
+ {
+ }
+
+ // Destructor automatically cleans up the global.
+ ~null_global_impl()
+ {
+ delete ptr_;
+ }
+
+ static null_global_impl instance_;
+ T* ptr_;
+};
+
+template <typename T>
+null_global_impl<T> null_global_impl<T>::instance_;
+
+template <typename T>
+T& null_global()
+{
+ if (null_global_impl<T>::instance_.ptr_ == 0)
+ null_global_impl<T>::instance_.ptr_ = new T;
+ return *null_global_impl<T>::instance_.ptr_;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_NULL_GLOBAL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_mutex.hpp
new file mode 100644
index 00000000000..7373675a034
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_mutex.hpp
@@ -0,0 +1,66 @@
+//
+// detail/null_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_NULL_MUTEX_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_THREADS)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class null_mutex
+ : private noncopyable
+{
+public:
+ typedef boost::asio::detail::scoped_lock<null_mutex> scoped_lock;
+
+ // Constructor.
+ null_mutex()
+ {
+ }
+
+ // Destructor.
+ ~null_mutex()
+ {
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
+
+#endif // BOOST_ASIO_DETAIL_NULL_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_reactor.hpp
new file mode 100644
index 00000000000..4552e1cd891
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_reactor.hpp
@@ -0,0 +1,70 @@
+//
+// detail/null_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_NULL_REACTOR_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_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/scheduler_operation.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class null_reactor
+ : public execution_context_service_base<null_reactor>
+{
+public:
+ // Constructor.
+ null_reactor(boost::asio::execution_context& ctx)
+ : execution_context_service_base<null_reactor>(ctx)
+ {
+ }
+
+ // Destructor.
+ ~null_reactor()
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ }
+
+ // No-op because should never be called.
+ void run(long /*usec*/, op_queue<scheduler_operation>& /*ops*/)
+ {
+ }
+
+ // No-op.
+ void interrupt()
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_NULL_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_signal_blocker.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_signal_blocker.hpp
new file mode 100644
index 00000000000..74f5b75a54d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_signal_blocker.hpp
@@ -0,0 +1,71 @@
+//
+// detail/null_signal_blocker.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_SIGNAL_BLOCKER_HPP
+#define BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_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_THREADS) \
+ || defined(BOOST_ASIO_WINDOWS) \
+ || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class null_signal_blocker
+ : private noncopyable
+{
+public:
+ // Constructor blocks all signals for the calling thread.
+ null_signal_blocker()
+ {
+ }
+
+ // Destructor restores the previous signal mask.
+ ~null_signal_blocker()
+ {
+ }
+
+ // Block all signals for the calling thread.
+ void block()
+ {
+ }
+
+ // Restore the previous signal mask.
+ void unblock()
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
+ // || defined(BOOST_ASIO_WINDOWS)
+ // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+
+#endif // BOOST_ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_socket_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_socket_service.hpp
new file mode 100644
index 00000000000..552d9933081
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_socket_service.hpp
@@ -0,0 +1,521 @@
+//
+// detail/null_socket_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_SOCKET_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_NULL_SOCKET_SERVICE_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class null_socket_service :
+ public execution_context_service_base<null_socket_service<Protocol> >
+{
+public:
+ // The protocol type.
+ typedef Protocol protocol_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The native type of a socket.
+ typedef int native_handle_type;
+
+ // The implementation type of the socket.
+ struct implementation_type
+ {
+ };
+
+ // Constructor.
+ null_socket_service(execution_context& context)
+ : execution_context_service_base<null_socket_service<Protocol> >(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ }
+
+ // Construct a new socket implementation.
+ void construct(implementation_type&)
+ {
+ }
+
+ // Move-construct a new socket implementation.
+ void move_construct(implementation_type&, implementation_type&)
+ {
+ }
+
+ // Move-assign from another socket implementation.
+ void move_assign(implementation_type&,
+ null_socket_service&, implementation_type&)
+ {
+ }
+
+ // Move-construct a new socket implementation from another protocol type.
+ template <typename Protocol1>
+ void converting_move_construct(implementation_type&,
+ null_socket_service<Protocol1>&,
+ typename null_socket_service<Protocol1>::implementation_type&)
+ {
+ }
+
+ // Destroy a socket implementation.
+ void destroy(implementation_type&)
+ {
+ }
+
+ // Open a new socket implementation.
+ boost::system::error_code open(implementation_type&,
+ const protocol_type&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Assign a native socket to a socket implementation.
+ boost::system::error_code assign(implementation_type&, const protocol_type&,
+ const native_handle_type&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Determine whether the socket is open.
+ bool is_open(const implementation_type&) const
+ {
+ return false;
+ }
+
+ // Destroy a socket implementation.
+ boost::system::error_code close(implementation_type&,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Release ownership of the socket.
+ native_handle_type release(implementation_type&,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Get the native socket representation.
+ native_handle_type native_handle(implementation_type&)
+ {
+ return 0;
+ }
+
+ // Cancel all operations associated with the socket.
+ boost::system::error_code cancel(implementation_type&,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Determine whether the socket is at the out-of-band data mark.
+ bool at_mark(const implementation_type&,
+ boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return false;
+ }
+
+ // Determine the number of bytes available for reading.
+ std::size_t available(const implementation_type&,
+ boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Place the socket into the state where it will listen for new connections.
+ boost::system::error_code listen(implementation_type&,
+ int, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Perform an IO control command on the socket.
+ template <typename IO_Control_Command>
+ boost::system::error_code io_control(implementation_type&,
+ IO_Control_Command&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the socket.
+ bool non_blocking(const implementation_type&) const
+ {
+ return false;
+ }
+
+ // Sets the non-blocking mode of the socket.
+ boost::system::error_code non_blocking(implementation_type&,
+ bool, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native socket implementation.
+ bool native_non_blocking(const implementation_type&) const
+ {
+ return false;
+ }
+
+ // Sets the non-blocking mode of the native socket implementation.
+ boost::system::error_code native_non_blocking(implementation_type&,
+ bool, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Disable sends or receives on the socket.
+ boost::system::error_code shutdown(implementation_type&,
+ socket_base::shutdown_type, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Bind the socket to the specified local endpoint.
+ boost::system::error_code bind(implementation_type&,
+ const endpoint_type&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code set_option(implementation_type&,
+ const Option&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code get_option(const implementation_type&,
+ Option&, boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Get the local endpoint.
+ endpoint_type local_endpoint(const implementation_type&,
+ boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return endpoint_type();
+ }
+
+ // Get the remote endpoint.
+ endpoint_type remote_endpoint(const implementation_type&,
+ boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return endpoint_type();
+ }
+
+ // Send the given data to the peer.
+ template <typename ConstBufferSequence>
+ std::size_t send(implementation_type&, const ConstBufferSequence&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Wait until data can be sent without blocking.
+ std::size_t send(implementation_type&, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send(implementation_type&, const ConstBufferSequence&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send(implementation_type&, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Receive some data from the peer. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ std::size_t receive(implementation_type&, const MutableBufferSequence&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Wait until data can be received without blocking.
+ std::size_t receive(implementation_type&, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive(implementation_type&, const MutableBufferSequence&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive(implementation_type&, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Receive some data with associated flags. Returns the number of bytes
+ // received.
+ template <typename MutableBufferSequence>
+ std::size_t receive_with_flags(implementation_type&,
+ const MutableBufferSequence&, socket_base::message_flags,
+ socket_base::message_flags&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Wait until data can be received without blocking.
+ std::size_t receive_with_flags(implementation_type&,
+ const null_buffers&, socket_base::message_flags,
+ socket_base::message_flags&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_with_flags(implementation_type&,
+ const MutableBufferSequence&, socket_base::message_flags,
+ socket_base::message_flags&, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_with_flags(implementation_type&, const null_buffers&,
+ socket_base::message_flags, socket_base::message_flags&,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Send a datagram to the specified endpoint. Returns the number of bytes
+ // sent.
+ template <typename ConstBufferSequence>
+ std::size_t send_to(implementation_type&, const ConstBufferSequence&,
+ const endpoint_type&, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Wait until data can be sent without blocking.
+ std::size_t send_to(implementation_type&, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type&, const ConstBufferSequence&,
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type&, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Receive a datagram with the endpoint of the sender. Returns the number of
+ // bytes received.
+ template <typename MutableBufferSequence>
+ std::size_t receive_from(implementation_type&, const MutableBufferSequence&,
+ endpoint_type&, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Wait until data can be received without blocking.
+ std::size_t receive_from(implementation_type&, const null_buffers&,
+ endpoint_type&, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received and
+ // the sender_endpoint object must both be valid for the lifetime of the
+ // asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type&, const MutableBufferSequence&,
+ endpoint_type&, socket_base::message_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type&, const null_buffers&,
+ endpoint_type&, socket_base::message_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
+ }
+
+ // Accept a new connection.
+ template <typename Socket>
+ boost::system::error_code accept(implementation_type&,
+ Socket&, endpoint_type*, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Start an asynchronous accept. The peer and peer_endpoint objects
+ // must be valid until the accept's handler is invoked.
+ template <typename Socket, typename Handler, typename IoExecutor>
+ void async_accept(implementation_type&, Socket&, endpoint_type*,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ boost::asio::post(io_ex, detail::bind_handler(handler, ec));
+ }
+
+ // Connect the socket to the specified endpoint.
+ boost::system::error_code connect(implementation_type&,
+ const endpoint_type&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Start an asynchronous connect.
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type&, const endpoint_type&,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ boost::asio::post(io_ex, detail::bind_handler(handler, ec));
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_NULL_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_static_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_static_mutex.hpp
new file mode 100644
index 00000000000..f8f9ab4e046
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_static_mutex.hpp
@@ -0,0 +1,62 @@
+//
+// detail/null_static_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_STATIC_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_NULL_STATIC_MUTEX_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_THREADS)
+
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct null_static_mutex
+{
+ typedef boost::asio::detail::scoped_lock<null_static_mutex> scoped_lock;
+
+ // Initialise the mutex.
+ void init()
+ {
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ }
+
+ int unused_;
+};
+
+#define BOOST_ASIO_NULL_STATIC_MUTEX_INIT { 0 }
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
+
+#endif // BOOST_ASIO_DETAIL_NULL_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_thread.hpp
new file mode 100644
index 00000000000..bd1360c09f0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_thread.hpp
@@ -0,0 +1,69 @@
+//
+// detail/null_thread.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_THREAD_HPP
+#define BOOST_ASIO_DETAIL_NULL_THREAD_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_THREADS)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class null_thread
+ : private noncopyable
+{
+public:
+ // Constructor.
+ template <typename Function>
+ null_thread(Function, unsigned int = 0)
+ {
+ boost::asio::detail::throw_error(
+ boost::asio::error::operation_not_supported, "thread");
+ }
+
+ // Destructor.
+ ~null_thread()
+ {
+ }
+
+ // Wait for the thread to exit.
+ void join()
+ {
+ }
+
+ // Get number of CPUs.
+ static std::size_t hardware_concurrency()
+ {
+ return 1;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
+
+#endif // BOOST_ASIO_DETAIL_NULL_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/null_tss_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/null_tss_ptr.hpp
new file mode 100644
index 00000000000..eacf4ff4a8a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/null_tss_ptr.hpp
@@ -0,0 +1,70 @@
+//
+// detail/null_tss_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_NULL_TSS_PTR_HPP
+#define BOOST_ASIO_DETAIL_NULL_TSS_PTR_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_THREADS)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+class null_tss_ptr
+ : private noncopyable
+{
+public:
+ // Constructor.
+ null_tss_ptr()
+ : value_(0)
+ {
+ }
+
+ // Destructor.
+ ~null_tss_ptr()
+ {
+ }
+
+ // Get the value.
+ operator T*() const
+ {
+ return value_;
+ }
+
+ // Set the value.
+ void operator=(T* value)
+ {
+ value_ = value;
+ }
+
+private:
+ T* value_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
+
+#endif // BOOST_ASIO_DETAIL_NULL_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/object_pool.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/object_pool.hpp
new file mode 100644
index 00000000000..0eadf7ab97b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/object_pool.hpp
@@ -0,0 +1,173 @@
+//
+// detail/object_pool.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_OBJECT_POOL_HPP
+#define BOOST_ASIO_DETAIL_OBJECT_POOL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Object>
+class object_pool;
+
+class object_pool_access
+{
+public:
+ template <typename Object>
+ static Object* create()
+ {
+ return new Object;
+ }
+
+ template <typename Object, typename Arg>
+ static Object* create(Arg arg)
+ {
+ return new Object(arg);
+ }
+
+ template <typename Object>
+ static void destroy(Object* o)
+ {
+ delete o;
+ }
+
+ template <typename Object>
+ static Object*& next(Object* o)
+ {
+ return o->next_;
+ }
+
+ template <typename Object>
+ static Object*& prev(Object* o)
+ {
+ return o->prev_;
+ }
+};
+
+template <typename Object>
+class object_pool
+ : private noncopyable
+{
+public:
+ // Constructor.
+ object_pool()
+ : live_list_(0),
+ free_list_(0)
+ {
+ }
+
+ // Destructor destroys all objects.
+ ~object_pool()
+ {
+ destroy_list(live_list_);
+ destroy_list(free_list_);
+ }
+
+ // Get the object at the start of the live list.
+ Object* first()
+ {
+ return live_list_;
+ }
+
+ // Allocate a new object.
+ Object* alloc()
+ {
+ Object* o = free_list_;
+ if (o)
+ free_list_ = object_pool_access::next(free_list_);
+ else
+ o = object_pool_access::create<Object>();
+
+ object_pool_access::next(o) = live_list_;
+ object_pool_access::prev(o) = 0;
+ if (live_list_)
+ object_pool_access::prev(live_list_) = o;
+ live_list_ = o;
+
+ return o;
+ }
+
+ // Allocate a new object with an argument.
+ template <typename Arg>
+ Object* alloc(Arg arg)
+ {
+ Object* o = free_list_;
+ if (o)
+ free_list_ = object_pool_access::next(free_list_);
+ else
+ o = object_pool_access::create<Object>(arg);
+
+ object_pool_access::next(o) = live_list_;
+ object_pool_access::prev(o) = 0;
+ if (live_list_)
+ object_pool_access::prev(live_list_) = o;
+ live_list_ = o;
+
+ return o;
+ }
+
+ // Free an object. Moves it to the free list. No destructors are run.
+ void free(Object* o)
+ {
+ if (live_list_ == o)
+ live_list_ = object_pool_access::next(o);
+
+ if (object_pool_access::prev(o))
+ {
+ object_pool_access::next(object_pool_access::prev(o))
+ = object_pool_access::next(o);
+ }
+
+ if (object_pool_access::next(o))
+ {
+ object_pool_access::prev(object_pool_access::next(o))
+ = object_pool_access::prev(o);
+ }
+
+ object_pool_access::next(o) = free_list_;
+ object_pool_access::prev(o) = 0;
+ free_list_ = o;
+ }
+
+private:
+ // Helper function to destroy all elements in a list.
+ void destroy_list(Object* list)
+ {
+ while (list)
+ {
+ Object* o = list;
+ list = object_pool_access::next(o);
+ object_pool_access::destroy(o);
+ }
+ }
+
+ // The list of live objects.
+ Object* live_list_;
+
+ // The free list.
+ Object* free_list_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_OBJECT_POOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/old_win_sdk_compat.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/old_win_sdk_compat.hpp
new file mode 100644
index 00000000000..f5cb9d74b92
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/old_win_sdk_compat.hpp
@@ -0,0 +1,216 @@
+//
+// detail/old_win_sdk_compat.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_OLD_WIN_SDK_COMPAT_HPP
+#define BOOST_ASIO_DETAIL_OLD_WIN_SDK_COMPAT_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_WINDOWS) || defined(__CYGWIN__)
+
+// Guess whether we are building against on old Platform SDK.
+#if !defined(IN6ADDR_ANY_INIT)
+#define BOOST_ASIO_HAS_OLD_WIN_SDK 1
+#endif // !defined(IN6ADDR_ANY_INIT)
+
+#if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
+
+// Emulation of types that are missing from old Platform SDKs.
+//
+// N.B. this emulation is also used if building for a Windows 2000 target with
+// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support
+// in that case.
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+enum
+{
+ sockaddr_storage_maxsize = 128, // Maximum size.
+ sockaddr_storage_alignsize = (sizeof(__int64)), // Desired alignment.
+ sockaddr_storage_pad1size = (sockaddr_storage_alignsize - sizeof(short)),
+ sockaddr_storage_pad2size = (sockaddr_storage_maxsize -
+ (sizeof(short) + sockaddr_storage_pad1size + sockaddr_storage_alignsize))
+};
+
+struct sockaddr_storage_emulation
+{
+ short ss_family;
+ char __ss_pad1[sockaddr_storage_pad1size];
+ __int64 __ss_align;
+ char __ss_pad2[sockaddr_storage_pad2size];
+};
+
+struct in6_addr_emulation
+{
+ union
+ {
+ u_char Byte[16];
+ u_short Word[8];
+ } u;
+};
+
+#if !defined(s6_addr)
+# define _S6_un u
+# define _S6_u8 Byte
+# define s6_addr _S6_un._S6_u8
+#endif // !defined(s6_addr)
+
+struct sockaddr_in6_emulation
+{
+ short sin6_family;
+ u_short sin6_port;
+ u_long sin6_flowinfo;
+ in6_addr_emulation sin6_addr;
+ u_long sin6_scope_id;
+};
+
+struct ipv6_mreq_emulation
+{
+ in6_addr_emulation ipv6mr_multiaddr;
+ unsigned int ipv6mr_interface;
+};
+
+struct addrinfo_emulation
+{
+ int ai_flags;
+ int ai_family;
+ int ai_socktype;
+ int ai_protocol;
+ size_t ai_addrlen;
+ char* ai_canonname;
+ sockaddr* ai_addr;
+ addrinfo_emulation* ai_next;
+};
+
+#if !defined(AI_PASSIVE)
+# define AI_PASSIVE 0x1
+#endif
+
+#if !defined(AI_CANONNAME)
+# define AI_CANONNAME 0x2
+#endif
+
+#if !defined(AI_NUMERICHOST)
+# define AI_NUMERICHOST 0x4
+#endif
+
+#if !defined(EAI_AGAIN)
+# define EAI_AGAIN WSATRY_AGAIN
+#endif
+
+#if !defined(EAI_BADFLAGS)
+# define EAI_BADFLAGS WSAEINVAL
+#endif
+
+#if !defined(EAI_FAIL)
+# define EAI_FAIL WSANO_RECOVERY
+#endif
+
+#if !defined(EAI_FAMILY)
+# define EAI_FAMILY WSAEAFNOSUPPORT
+#endif
+
+#if !defined(EAI_MEMORY)
+# define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
+#endif
+
+#if !defined(EAI_NODATA)
+# define EAI_NODATA WSANO_DATA
+#endif
+
+#if !defined(EAI_NONAME)
+# define EAI_NONAME WSAHOST_NOT_FOUND
+#endif
+
+#if !defined(EAI_SERVICE)
+# define EAI_SERVICE WSATYPE_NOT_FOUND
+#endif
+
+#if !defined(EAI_SOCKTYPE)
+# define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
+#endif
+
+#if !defined(NI_NOFQDN)
+# define NI_NOFQDN 0x01
+#endif
+
+#if !defined(NI_NUMERICHOST)
+# define NI_NUMERICHOST 0x02
+#endif
+
+#if !defined(NI_NAMEREQD)
+# define NI_NAMEREQD 0x04
+#endif
+
+#if !defined(NI_NUMERICSERV)
+# define NI_NUMERICSERV 0x08
+#endif
+
+#if !defined(NI_DGRAM)
+# define NI_DGRAM 0x10
+#endif
+
+#if !defined(IPPROTO_IPV6)
+# define IPPROTO_IPV6 41
+#endif
+
+#if !defined(IPV6_UNICAST_HOPS)
+# define IPV6_UNICAST_HOPS 4
+#endif
+
+#if !defined(IPV6_MULTICAST_IF)
+# define IPV6_MULTICAST_IF 9
+#endif
+
+#if !defined(IPV6_MULTICAST_HOPS)
+# define IPV6_MULTICAST_HOPS 10
+#endif
+
+#if !defined(IPV6_MULTICAST_LOOP)
+# define IPV6_MULTICAST_LOOP 11
+#endif
+
+#if !defined(IPV6_JOIN_GROUP)
+# define IPV6_JOIN_GROUP 12
+#endif
+
+#if !defined(IPV6_LEAVE_GROUP)
+# define IPV6_LEAVE_GROUP 13
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
+
+// Even newer Platform SDKs that support IPv6 may not define IPV6_V6ONLY.
+#if !defined(IPV6_V6ONLY)
+# define IPV6_V6ONLY 27
+#endif
+
+// Some SDKs (e.g. Windows CE) don't define IPPROTO_ICMPV6.
+#if !defined(IPPROTO_ICMPV6)
+# define IPPROTO_ICMPV6 58
+#endif
+
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_OLD_WIN_SDK_COMPAT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/op_queue.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/op_queue.hpp
new file mode 100644
index 00000000000..b2cd608cb04
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/op_queue.hpp
@@ -0,0 +1,164 @@
+//
+// detail/op_queue.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_OP_QUEUE_HPP
+#define BOOST_ASIO_DETAIL_OP_QUEUE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Operation>
+class op_queue;
+
+class op_queue_access
+{
+public:
+ template <typename Operation>
+ static Operation* next(Operation* o)
+ {
+ return static_cast<Operation*>(o->next_);
+ }
+
+ template <typename Operation1, typename Operation2>
+ static void next(Operation1*& o1, Operation2* o2)
+ {
+ o1->next_ = o2;
+ }
+
+ template <typename Operation>
+ static void destroy(Operation* o)
+ {
+ o->destroy();
+ }
+
+ template <typename Operation>
+ static Operation*& front(op_queue<Operation>& q)
+ {
+ return q.front_;
+ }
+
+ template <typename Operation>
+ static Operation*& back(op_queue<Operation>& q)
+ {
+ return q.back_;
+ }
+};
+
+template <typename Operation>
+class op_queue
+ : private noncopyable
+{
+public:
+ // Constructor.
+ op_queue()
+ : front_(0),
+ back_(0)
+ {
+ }
+
+ // Destructor destroys all operations.
+ ~op_queue()
+ {
+ while (Operation* op = front_)
+ {
+ pop();
+ op_queue_access::destroy(op);
+ }
+ }
+
+ // Get the operation at the front of the queue.
+ Operation* front()
+ {
+ return front_;
+ }
+
+ // Pop an operation from the front of the queue.
+ void pop()
+ {
+ if (front_)
+ {
+ Operation* tmp = front_;
+ front_ = op_queue_access::next(front_);
+ if (front_ == 0)
+ back_ = 0;
+ op_queue_access::next(tmp, static_cast<Operation*>(0));
+ }
+ }
+
+ // Push an operation on to the back of the queue.
+ void push(Operation* h)
+ {
+ op_queue_access::next(h, static_cast<Operation*>(0));
+ if (back_)
+ {
+ op_queue_access::next(back_, h);
+ back_ = h;
+ }
+ else
+ {
+ front_ = back_ = h;
+ }
+ }
+
+ // Push all operations from another queue on to the back of the queue. The
+ // source queue may contain operations of a derived type.
+ template <typename OtherOperation>
+ void push(op_queue<OtherOperation>& q)
+ {
+ if (Operation* other_front = op_queue_access::front(q))
+ {
+ if (back_)
+ op_queue_access::next(back_, other_front);
+ else
+ front_ = other_front;
+ back_ = op_queue_access::back(q);
+ op_queue_access::front(q) = 0;
+ op_queue_access::back(q) = 0;
+ }
+ }
+
+ // Whether the queue is empty.
+ bool empty() const
+ {
+ return front_ == 0;
+ }
+
+ // Test whether an operation is already enqueued.
+ bool is_enqueued(Operation* o) const
+ {
+ return op_queue_access::next(o) != 0 || back_ == o;
+ }
+
+private:
+ friend class op_queue_access;
+
+ // The front of the queue.
+ Operation* front_;
+
+ // The back of the queue.
+ Operation* back_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_OP_QUEUE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/operation.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/operation.hpp
new file mode 100644
index 00000000000..4baed817f4c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/operation.hpp
@@ -0,0 +1,40 @@
+//
+// detail/operation.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_OPERATION_HPP
+#define BOOST_ASIO_DETAIL_OPERATION_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_IOCP)
+# include <boost/asio/detail/win_iocp_operation.hpp>
+#else
+# include <boost/asio/detail/scheduler_operation.hpp>
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+typedef win_iocp_operation operation;
+#else
+typedef scheduler_operation operation;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_OPERATION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/pipe_select_interrupter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/pipe_select_interrupter.hpp
new file mode 100644
index 00000000000..01a467a4156
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/pipe_select_interrupter.hpp
@@ -0,0 +1,91 @@
+//
+// detail/pipe_select_interrupter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_PIPE_SELECT_INTERRUPTER_HPP
+#define BOOST_ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_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_WINDOWS)
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+#if !defined(__CYGWIN__)
+#if !defined(__SYMBIAN32__)
+#if !defined(BOOST_ASIO_HAS_EVENTFD)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class pipe_select_interrupter
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL pipe_select_interrupter();
+
+ // Destructor.
+ BOOST_ASIO_DECL ~pipe_select_interrupter();
+
+ // Recreate the interrupter's descriptors. Used after a fork.
+ BOOST_ASIO_DECL void recreate();
+
+ // Interrupt the select call.
+ BOOST_ASIO_DECL void interrupt();
+
+ // Reset the select interrupt. Returns true if the call was interrupted.
+ BOOST_ASIO_DECL bool reset();
+
+ // Get the read descriptor to be passed to select.
+ int read_descriptor() const
+ {
+ return read_descriptor_;
+ }
+
+private:
+ // Open the descriptors. Throws on error.
+ BOOST_ASIO_DECL void open_descriptors();
+
+ // Close the descriptors.
+ BOOST_ASIO_DECL void close_descriptors();
+
+ // The read end of a connection used to interrupt the select call. This file
+ // descriptor is passed to select such that when it is time to stop, a single
+ // byte will be written on the other end of the connection and this
+ // descriptor will become readable.
+ int read_descriptor_;
+
+ // The write end of a connection used to interrupt the select call. A single
+ // byte may be written to this to wake up the select which is waiting for the
+ // other end to become readable.
+ int write_descriptor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/pipe_select_interrupter.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // !defined(BOOST_ASIO_HAS_EVENTFD)
+#endif // !defined(__SYMBIAN32__)
+#endif // !defined(__CYGWIN__)
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+#endif // !defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/pop_options.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/pop_options.hpp
new file mode 100644
index 00000000000..3346b96fa4c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/pop_options.hpp
@@ -0,0 +1,141 @@
+//
+// detail/pop_options.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+//
+
+// No header guard
+
+#if defined(__COMO__)
+
+// Comeau C++
+
+#elif defined(__DMC__)
+
+// Digital Mars C++
+
+#elif defined(__INTEL_COMPILER) || defined(__ICL) \
+ || defined(__ICC) || defined(__ECC)
+
+// Intel C++
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# if !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility pop
+# endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+
+#elif defined(__clang__)
+
+// Clang
+
+# if defined(__OBJC__)
+# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
+# if defined(BOOST_ASIO_OBJC_WORKAROUND)
+# undef Protocol
+# undef id
+# undef BOOST_ASIO_OBJC_WORKAROUND
+# endif
+# endif
+# endif
+
+# if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+# if !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility pop
+# endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+
+#elif defined(__GNUC__)
+
+// GNU C++
+
+# if defined(__MINGW32__) || defined(__CYGWIN__)
+# pragma pack (pop)
+# endif
+
+# if defined(__OBJC__)
+# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
+# if defined(BOOST_ASIO_OBJC_WORKAROUND)
+# undef Protocol
+# undef id
+# undef BOOST_ASIO_OBJC_WORKAROUND
+# endif
+# endif
+# endif
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# if !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility pop
+# endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+
+# if (__GNUC__ >= 7)
+# pragma GCC diagnostic pop
+# endif // (__GNUC__ >= 7)
+
+#elif defined(__KCC)
+
+// Kai C++
+
+#elif defined(__sgi)
+
+// SGI MIPSpro C++
+
+#elif defined(__DECCXX)
+
+// Compaq Tru64 Unix cxx
+
+#elif defined(__ghs)
+
+// Greenhills C++
+
+#elif defined(__BORLANDC__)
+
+// Borland C++
+
+# pragma option pop
+# pragma nopushoptwarn
+# pragma nopackwarning
+
+#elif defined(__MWERKS__)
+
+// Metrowerks CodeWarrior
+
+#elif defined(__SUNPRO_CC)
+
+// Sun Workshop Compiler C++
+
+#elif defined(__HP_aCC)
+
+// HP aCC
+
+#elif defined(__MRC__) || defined(__SC__)
+
+// MPW MrCpp or SCpp
+
+#elif defined(__IBMCPP__)
+
+// IBM Visual Age
+
+#elif defined(_MSC_VER)
+
+// Microsoft Visual C++
+//
+// Must remain the last #elif since some other vendors (Metrowerks, for example)
+// also #define _MSC_VER
+
+# pragma warning (pop)
+# pragma pack (pop)
+
+# if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
+# if defined(BOOST_ASIO_CLR_WORKAROUND)
+# undef generic
+# undef BOOST_ASIO_CLR_WORKAROUND
+# endif
+# endif
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_event.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_event.hpp
new file mode 100644
index 00000000000..98a796c9df7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_event.hpp
@@ -0,0 +1,164 @@
+//
+// detail/posix_event.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_EVENT_HPP
+#define BOOST_ASIO_DETAIL_POSIX_EVENT_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_PTHREADS)
+
+#include <pthread.h>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class posix_event
+ : private noncopyable
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL posix_event();
+
+ // Destructor.
+ ~posix_event()
+ {
+ ::pthread_cond_destroy(&cond_);
+ }
+
+ // Signal the event. (Retained for backward compatibility.)
+ template <typename Lock>
+ void signal(Lock& lock)
+ {
+ this->signal_all(lock);
+ }
+
+ // Signal all waiters.
+ template <typename Lock>
+ void signal_all(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ (void)lock;
+ state_ |= 1;
+ ::pthread_cond_broadcast(&cond_); // Ignore EINVAL.
+ }
+
+ // Unlock the mutex and signal one waiter.
+ template <typename Lock>
+ void unlock_and_signal_one(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ lock.unlock();
+ if (have_waiters)
+ ::pthread_cond_signal(&cond_); // Ignore EINVAL.
+ }
+
+ // If there's a waiter, unlock the mutex and signal it.
+ template <typename Lock>
+ bool maybe_unlock_and_signal_one(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ if (state_ > 1)
+ {
+ lock.unlock();
+ ::pthread_cond_signal(&cond_); // Ignore EINVAL.
+ return true;
+ }
+ return false;
+ }
+
+ // Reset the event.
+ template <typename Lock>
+ void clear(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ (void)lock;
+ state_ &= ~std::size_t(1);
+ }
+
+ // Wait for the event to become signalled.
+ template <typename Lock>
+ void wait(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ while ((state_ & 1) == 0)
+ {
+ state_ += 2;
+ ::pthread_cond_wait(&cond_, &lock.mutex().mutex_); // Ignore EINVAL.
+ state_ -= 2;
+ }
+ }
+
+ // Timed wait for the event to become signalled.
+ template <typename Lock>
+ bool wait_for_usec(Lock& lock, long usec)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ if ((state_ & 1) == 0)
+ {
+ state_ += 2;
+ timespec ts;
+#if (defined(__MACH__) && defined(__APPLE__)) \
+ || (defined(__ANDROID__) && (__ANDROID_API__ < 21) \
+ && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = (usec % 1000000) * 1000;
+ ::pthread_cond_timedwait_relative_np(
+ &cond_, &lock.mutex().mutex_, &ts); // Ignore EINVAL.
+#else // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)
+ // && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
+ if (::clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
+ {
+ ts.tv_sec += usec / 1000000;
+ ts.tv_nsec += (usec % 1000000) * 1000;
+ ts.tv_sec += ts.tv_nsec / 1000000000;
+ ts.tv_nsec = ts.tv_nsec % 1000000000;
+ ::pthread_cond_timedwait(&cond_,
+ &lock.mutex().mutex_, &ts); // Ignore EINVAL.
+ }
+#endif // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)
+ // && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
+ state_ -= 2;
+ }
+ return (state_ & 1) != 0;
+ }
+
+private:
+ ::pthread_cond_t cond_;
+ std::size_t state_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/posix_event.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_EVENT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_fd_set_adapter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_fd_set_adapter.hpp
new file mode 100644
index 00000000000..17faa564a89
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_fd_set_adapter.hpp
@@ -0,0 +1,120 @@
+//
+// detail/posix_fd_set_adapter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_FD_SET_ADAPTER_HPP
+#define BOOST_ASIO_DETAIL_POSIX_FD_SET_ADAPTER_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_WINDOWS) \
+ && !defined(__CYGWIN__) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#include <cstring>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/reactor_op_queue.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Adapts the FD_SET type to meet the Descriptor_Set concept's requirements.
+class posix_fd_set_adapter : noncopyable
+{
+public:
+ posix_fd_set_adapter()
+ : max_descriptor_(invalid_socket)
+ {
+ using namespace std; // Needed for memset on Solaris.
+ FD_ZERO(&fd_set_);
+ }
+
+ void reset()
+ {
+ using namespace std; // Needed for memset on Solaris.
+ FD_ZERO(&fd_set_);
+ }
+
+ bool set(socket_type descriptor)
+ {
+ if (descriptor < (socket_type)FD_SETSIZE)
+ {
+ if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_)
+ max_descriptor_ = descriptor;
+ FD_SET(descriptor, &fd_set_);
+ return true;
+ }
+ return false;
+ }
+
+ void set(reactor_op_queue<socket_type>& operations, op_queue<operation>& ops)
+ {
+ reactor_op_queue<socket_type>::iterator i = operations.begin();
+ while (i != operations.end())
+ {
+ reactor_op_queue<socket_type>::iterator op_iter = i++;
+ if (!set(op_iter->first))
+ {
+ boost::system::error_code ec(error::fd_set_failure);
+ operations.cancel_operations(op_iter, ops, ec);
+ }
+ }
+ }
+
+ bool is_set(socket_type descriptor) const
+ {
+ return FD_ISSET(descriptor, &fd_set_) != 0;
+ }
+
+ operator fd_set*()
+ {
+ return &fd_set_;
+ }
+
+ socket_type max_descriptor() const
+ {
+ return max_descriptor_;
+ }
+
+ void perform(reactor_op_queue<socket_type>& operations,
+ op_queue<operation>& ops) const
+ {
+ reactor_op_queue<socket_type>::iterator i = operations.begin();
+ while (i != operations.end())
+ {
+ reactor_op_queue<socket_type>::iterator op_iter = i++;
+ if (is_set(op_iter->first))
+ operations.perform_operations(op_iter, ops);
+ }
+ }
+
+private:
+ mutable fd_set fd_set_;
+ socket_type max_descriptor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(__CYGWIN__)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_FD_SET_ADAPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_global.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_global.hpp
new file mode 100644
index 00000000000..357fe150cbb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_global.hpp
@@ -0,0 +1,82 @@
+//
+// detail/posix_global.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_GLOBAL_HPP
+#define BOOST_ASIO_DETAIL_POSIX_GLOBAL_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_PTHREADS)
+
+#include <exception>
+#include <pthread.h>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct posix_global_impl
+{
+ // Helper function to perform initialisation.
+ static void do_init()
+ {
+ instance_.static_ptr_ = instance_.ptr_ = new T;
+ }
+
+ // Destructor automatically cleans up the global.
+ ~posix_global_impl()
+ {
+ delete static_ptr_;
+ }
+
+ static ::pthread_once_t init_once_;
+ static T* static_ptr_;
+ static posix_global_impl instance_;
+ T* ptr_;
+};
+
+template <typename T>
+::pthread_once_t posix_global_impl<T>::init_once_ = PTHREAD_ONCE_INIT;
+
+template <typename T>
+T* posix_global_impl<T>::static_ptr_ = 0;
+
+template <typename T>
+posix_global_impl<T> posix_global_impl<T>::instance_;
+
+template <typename T>
+T& posix_global()
+{
+ int result = ::pthread_once(
+ &posix_global_impl<T>::init_once_,
+ &posix_global_impl<T>::do_init);
+
+ if (result != 0)
+ std::terminate();
+
+ return *posix_global_impl<T>::instance_.ptr_;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_GLOBAL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_mutex.hpp
new file mode 100644
index 00000000000..1418ab5759c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_mutex.hpp
@@ -0,0 +1,78 @@
+//
+// detail/posix_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_POSIX_MUTEX_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_PTHREADS)
+
+#include <pthread.h>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class posix_event;
+
+class posix_mutex
+ : private noncopyable
+{
+public:
+ typedef boost::asio::detail::scoped_lock<posix_mutex> scoped_lock;
+
+ // Constructor.
+ BOOST_ASIO_DECL posix_mutex();
+
+ // Destructor.
+ ~posix_mutex()
+ {
+ ::pthread_mutex_destroy(&mutex_); // Ignore EBUSY.
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL.
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL.
+ }
+
+private:
+ friend class posix_event;
+ ::pthread_mutex_t mutex_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/posix_mutex.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_signal_blocker.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_signal_blocker.hpp
new file mode 100644
index 00000000000..729da819f6d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_signal_blocker.hpp
@@ -0,0 +1,87 @@
+//
+// detail/posix_signal_blocker.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_SIGNAL_BLOCKER_HPP
+#define BOOST_ASIO_DETAIL_POSIX_SIGNAL_BLOCKER_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_PTHREADS)
+
+#include <csignal>
+#include <pthread.h>
+#include <signal.h>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class posix_signal_blocker
+ : private noncopyable
+{
+public:
+ // Constructor blocks all signals for the calling thread.
+ posix_signal_blocker()
+ : blocked_(false)
+ {
+ sigset_t new_mask;
+ sigfillset(&new_mask);
+ blocked_ = (pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask_) == 0);
+ }
+
+ // Destructor restores the previous signal mask.
+ ~posix_signal_blocker()
+ {
+ if (blocked_)
+ pthread_sigmask(SIG_SETMASK, &old_mask_, 0);
+ }
+
+ // Block all signals for the calling thread.
+ void block()
+ {
+ if (!blocked_)
+ {
+ sigset_t new_mask;
+ sigfillset(&new_mask);
+ blocked_ = (pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask_) == 0);
+ }
+ }
+
+ // Restore the previous signal mask.
+ void unblock()
+ {
+ if (blocked_)
+ blocked_ = (pthread_sigmask(SIG_SETMASK, &old_mask_, 0) != 0);
+ }
+
+private:
+ // Have signals been blocked.
+ bool blocked_;
+
+ // The previous signal mask.
+ sigset_t old_mask_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_SIGNAL_BLOCKER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_static_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_static_mutex.hpp
new file mode 100644
index 00000000000..331868f0d4e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_static_mutex.hpp
@@ -0,0 +1,66 @@
+//
+// detail/posix_static_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_STATIC_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_POSIX_STATIC_MUTEX_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_PTHREADS)
+
+#include <pthread.h>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct posix_static_mutex
+{
+ typedef boost::asio::detail::scoped_lock<posix_static_mutex> scoped_lock;
+
+ // Initialise the mutex.
+ void init()
+ {
+ // Nothing to do.
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL.
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL.
+ }
+
+ ::pthread_mutex_t mutex_;
+};
+
+#define BOOST_ASIO_POSIX_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER }
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_thread.hpp
new file mode 100644
index 00000000000..b9cd59424f1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_thread.hpp
@@ -0,0 +1,111 @@
+//
+// detail/posix_thread.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_THREAD_HPP
+#define BOOST_ASIO_DETAIL_POSIX_THREAD_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_PTHREADS)
+
+#include <cstddef>
+#include <pthread.h>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+extern "C"
+{
+ BOOST_ASIO_DECL void* boost_asio_detail_posix_thread_function(void* arg);
+}
+
+class posix_thread
+ : private noncopyable
+{
+public:
+ // Constructor.
+ template <typename Function>
+ posix_thread(Function f, unsigned int = 0)
+ : joined_(false)
+ {
+ start_thread(new func<Function>(f));
+ }
+
+ // Destructor.
+ BOOST_ASIO_DECL ~posix_thread();
+
+ // Wait for the thread to exit.
+ BOOST_ASIO_DECL void join();
+
+ // Get number of CPUs.
+ BOOST_ASIO_DECL static std::size_t hardware_concurrency();
+
+private:
+ friend void* boost_asio_detail_posix_thread_function(void* arg);
+
+ class func_base
+ {
+ public:
+ virtual ~func_base() {}
+ virtual void run() = 0;
+ };
+
+ struct auto_func_base_ptr
+ {
+ func_base* ptr;
+ ~auto_func_base_ptr() { delete ptr; }
+ };
+
+ template <typename Function>
+ class func
+ : public func_base
+ {
+ public:
+ func(Function f)
+ : f_(f)
+ {
+ }
+
+ virtual void run()
+ {
+ f_();
+ }
+
+ private:
+ Function f_;
+ };
+
+ BOOST_ASIO_DECL void start_thread(func_base* arg);
+
+ ::pthread_t thread_;
+ bool joined_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/posix_thread.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/posix_tss_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/posix_tss_ptr.hpp
new file mode 100644
index 00000000000..126c148d3b5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/posix_tss_ptr.hpp
@@ -0,0 +1,81 @@
+//
+// detail/posix_tss_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_TSS_PTR_HPP
+#define BOOST_ASIO_DETAIL_POSIX_TSS_PTR_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_PTHREADS)
+
+#include <pthread.h>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper function to create thread-specific storage.
+BOOST_ASIO_DECL void posix_tss_ptr_create(pthread_key_t& key);
+
+template <typename T>
+class posix_tss_ptr
+ : private noncopyable
+{
+public:
+ // Constructor.
+ posix_tss_ptr()
+ {
+ posix_tss_ptr_create(tss_key_);
+ }
+
+ // Destructor.
+ ~posix_tss_ptr()
+ {
+ ::pthread_key_delete(tss_key_);
+ }
+
+ // Get the value.
+ operator T*() const
+ {
+ return static_cast<T*>(::pthread_getspecific(tss_key_));
+ }
+
+ // Set the value.
+ void operator=(T* value)
+ {
+ ::pthread_setspecific(tss_key_, value);
+ }
+
+private:
+ // Thread-specific storage to allow unlocked access to determine whether a
+ // thread is a member of the pool.
+ pthread_key_t tss_key_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/posix_tss_ptr.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+
+#endif // BOOST_ASIO_DETAIL_POSIX_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/push_options.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/push_options.hpp
new file mode 100644
index 00000000000..679ac273c20
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/push_options.hpp
@@ -0,0 +1,181 @@
+//
+// detail/push_options.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+//
+
+// No header guard
+
+#if defined(__COMO__)
+
+// Comeau C++
+
+#elif defined(__DMC__)
+
+// Digital Mars C++
+
+#elif defined(__INTEL_COMPILER) || defined(__ICL) \
+ || defined(__ICC) || defined(__ECC)
+
+// Intel C++
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# if !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility push (default)
+# endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+
+#elif defined(__clang__)
+
+// Clang
+
+# if defined(__OBJC__)
+# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
+# if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
+# if !defined(Protocol) && !defined(id)
+# define Protocol cpp_Protocol
+# define id cpp_id
+# define BOOST_ASIO_OBJC_WORKAROUND
+# endif
+# endif
+# endif
+# endif
+
+# if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+# if !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility push (default)
+# endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+
+#elif defined(__GNUC__)
+
+// GNU C++
+
+# if defined(__MINGW32__) || defined(__CYGWIN__)
+# pragma pack (push, 8)
+# endif
+
+# if defined(__OBJC__)
+# if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
+# if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
+# if !defined(Protocol) && !defined(id)
+# define Protocol cpp_Protocol
+# define id cpp_id
+# define BOOST_ASIO_OBJC_WORKAROUND
+# endif
+# endif
+# endif
+# endif
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# if !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility push (default)
+# endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
+# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+
+# if (__GNUC__ >= 7)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+# endif // (__GNUC__ >= 7)
+
+#elif defined(__KCC)
+
+// Kai C++
+
+#elif defined(__sgi)
+
+// SGI MIPSpro C++
+
+#elif defined(__DECCXX)
+
+// Compaq Tru64 Unix cxx
+
+#elif defined(__ghs)
+
+// Greenhills C++
+
+#elif defined(__BORLANDC__)
+
+// Borland C++
+
+# pragma option push -a8 -b -Ve- -Vx- -w-inl -vi-
+# pragma nopushoptwarn
+# pragma nopackwarning
+# if !defined(__MT__)
+# error Multithreaded RTL must be selected.
+# endif // !defined(__MT__)
+
+#elif defined(__MWERKS__)
+
+// Metrowerks CodeWarrior
+
+#elif defined(__SUNPRO_CC)
+
+// Sun Workshop Compiler C++
+
+#elif defined(__HP_aCC)
+
+// HP aCC
+
+#elif defined(__MRC__) || defined(__SC__)
+
+// MPW MrCpp or SCpp
+
+#elif defined(__IBMCPP__)
+
+// IBM Visual Age
+
+#elif defined(_MSC_VER)
+
+// Microsoft Visual C++
+//
+// Must remain the last #elif since some other vendors (Metrowerks, for example)
+// also #define _MSC_VER
+
+# pragma warning (disable:4103)
+# pragma warning (push)
+# pragma warning (disable:4127)
+# pragma warning (disable:4180)
+# pragma warning (disable:4244)
+# pragma warning (disable:4355)
+# pragma warning (disable:4510)
+# pragma warning (disable:4512)
+# pragma warning (disable:4610)
+# pragma warning (disable:4675)
+# if (_MSC_VER < 1600)
+// Visual Studio 2008 generates spurious warnings about unused parameters.
+# pragma warning (disable:4100)
+# endif // (_MSC_VER < 1600)
+# if defined(_M_IX86) && defined(_Wp64)
+// The /Wp64 option is broken. If you want to check 64 bit portability, use a
+// 64 bit compiler!
+# pragma warning (disable:4311)
+# pragma warning (disable:4312)
+# endif // defined(_M_IX86) && defined(_Wp64)
+# pragma pack (push, 8)
+// Note that if the /Og optimisation flag is enabled with MSVC6, the compiler
+// has a tendency to incorrectly optimise away some calls to member template
+// functions, even though those functions contain code that should not be
+// optimised away! Therefore we will always disable this optimisation option
+// for the MSVC6 compiler.
+# if (_MSC_VER < 1300)
+# pragma optimize ("g", off)
+# endif
+# if !defined(_MT)
+# error Multithreaded RTL must be selected.
+# endif // !defined(_MT)
+
+# if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
+# if !defined(BOOST_ASIO_DISABLE_CLR_WORKAROUND)
+# if !defined(generic)
+# define generic cpp_generic
+# define BOOST_ASIO_CLR_WORKAROUND
+# endif
+# endif
+# endif
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_descriptor_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_descriptor_service.hpp
new file mode 100644
index 00000000000..beed44a0ab5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_descriptor_service.hpp
@@ -0,0 +1,393 @@
+//
+// detail/reactive_descriptor_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_DESCRIPTOR_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_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_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/descriptor_ops.hpp>
+#include <boost/asio/detail/descriptor_read_op.hpp>
+#include <boost/asio/detail/descriptor_write_op.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/reactive_null_buffers_op.hpp>
+#include <boost/asio/detail/reactive_wait_op.hpp>
+#include <boost/asio/detail/reactor.hpp>
+#include <boost/asio/posix/descriptor_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class reactive_descriptor_service :
+ public execution_context_service_base<reactive_descriptor_service>
+{
+public:
+ // The native type of a descriptor.
+ typedef int native_handle_type;
+
+ // The implementation type of the descriptor.
+ class implementation_type
+ : private boost::asio::detail::noncopyable
+ {
+ public:
+ // Default constructor.
+ implementation_type()
+ : descriptor_(-1),
+ state_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class reactive_descriptor_service;
+
+ // The native descriptor representation.
+ int descriptor_;
+
+ // The current state of the descriptor.
+ descriptor_ops::state_type state_;
+
+ // Per-descriptor data used by the reactor.
+ reactor::per_descriptor_data reactor_data_;
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL reactive_descriptor_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Construct a new descriptor implementation.
+ BOOST_ASIO_DECL void construct(implementation_type& impl);
+
+ // Move-construct a new descriptor implementation.
+ BOOST_ASIO_DECL void move_construct(implementation_type& impl,
+ implementation_type& other_impl);
+
+ // Move-assign from another descriptor implementation.
+ BOOST_ASIO_DECL void move_assign(implementation_type& impl,
+ reactive_descriptor_service& other_service,
+ implementation_type& other_impl);
+
+ // Destroy a descriptor implementation.
+ BOOST_ASIO_DECL void destroy(implementation_type& impl);
+
+ // Assign a native descriptor to a descriptor implementation.
+ BOOST_ASIO_DECL boost::system::error_code assign(implementation_type& impl,
+ const native_handle_type& native_descriptor,
+ boost::system::error_code& ec);
+
+ // Determine whether the descriptor is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return impl.descriptor_ != -1;
+ }
+
+ // Destroy a descriptor implementation.
+ BOOST_ASIO_DECL boost::system::error_code close(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Get the native descriptor representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return impl.descriptor_;
+ }
+
+ // Release ownership of the native descriptor representation.
+ BOOST_ASIO_DECL native_handle_type release(implementation_type& impl);
+
+ // Cancel all operations associated with the descriptor.
+ BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Perform an IO control command on the descriptor.
+ template <typename IO_Control_Command>
+ boost::system::error_code io_control(implementation_type& impl,
+ IO_Control_Command& command, boost::system::error_code& ec)
+ {
+ descriptor_ops::ioctl(impl.descriptor_, impl.state_,
+ command.name(), static_cast<ioctl_arg_type*>(command.data()), ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the descriptor.
+ bool non_blocking(const implementation_type& impl) const
+ {
+ return (impl.state_ & descriptor_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the descriptor.
+ boost::system::error_code non_blocking(implementation_type& impl,
+ bool mode, boost::system::error_code& ec)
+ {
+ descriptor_ops::set_user_non_blocking(
+ impl.descriptor_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native descriptor implementation.
+ bool native_non_blocking(const implementation_type& impl) const
+ {
+ return (impl.state_ & descriptor_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native descriptor implementation.
+ boost::system::error_code native_non_blocking(implementation_type& impl,
+ bool mode, boost::system::error_code& ec)
+ {
+ descriptor_ops::set_internal_non_blocking(
+ impl.descriptor_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Wait for the descriptor to become ready to read, ready to write, or to have
+ // pending error conditions.
+ boost::system::error_code wait(implementation_type& impl,
+ posix::descriptor_base::wait_type w, boost::system::error_code& ec)
+ {
+ switch (w)
+ {
+ case posix::descriptor_base::wait_read:
+ descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
+ break;
+ case posix::descriptor_base::wait_write:
+ descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
+ break;
+ case posix::descriptor_base::wait_error:
+ descriptor_ops::poll_error(impl.descriptor_, impl.state_, ec);
+ break;
+ default:
+ ec = boost::asio::error::invalid_argument;
+ break;
+ }
+
+ return ec;
+ }
+
+ // Asynchronously wait for the descriptor to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ posix::descriptor_base::wait_type w,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
+ &impl, impl.descriptor_, "async_wait"));
+
+ int op_type;
+ switch (w)
+ {
+ case posix::descriptor_base::wait_read:
+ op_type = reactor::read_op;
+ break;
+ case posix::descriptor_base::wait_write:
+ op_type = reactor::write_op;
+ break;
+ case posix::descriptor_base::wait_error:
+ op_type = reactor::except_op;
+ break;
+ default:
+ p.p->ec_ = boost::asio::error::invalid_argument;
+ reactor_.post_immediate_completion(p.p, is_continuation);
+ p.v = p.p = 0;
+ return;
+ }
+
+ start_op(impl, op_type, p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Write some data to the descriptor.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ return descriptor_ops::sync_write(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ // Wait until data can be written without blocking.
+ size_t write_some(implementation_type& impl,
+ const null_buffers&, boost::system::error_code& ec)
+ {
+ // Wait for descriptor to become ready.
+ descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous write. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef descriptor_write_op<ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.descriptor_, buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
+ &impl, impl.descriptor_, "async_write_some"));
+
+ start_op(impl, reactor::write_op, p.p, is_continuation, true,
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be written without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
+ &impl, impl.descriptor_, "async_write_some(null_buffers)"));
+
+ start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Read some data from the stream. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return descriptor_ops::sync_read(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ // Wait until data can be read without blocking.
+ size_t read_some(implementation_type& impl,
+ const null_buffers&, boost::system::error_code& ec)
+ {
+ // Wait for descriptor to become ready.
+ descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef descriptor_read_op<MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.descriptor_, buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
+ &impl, impl.descriptor_, "async_read_some"));
+
+ start_op(impl, reactor::read_op, p.p, is_continuation, true,
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be read without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
+ &impl, impl.descriptor_, "async_read_some(null_buffers)"));
+
+ start_op(impl, reactor::read_op, p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+private:
+ // Start the asynchronous operation.
+ BOOST_ASIO_DECL void start_op(implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
+
+ // The selector that performs event demultiplexing for the service.
+ reactor& reactor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/reactive_descriptor_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_null_buffers_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_null_buffers_op.hpp
new file mode 100644
index 00000000000..fb25be335fa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_null_buffers_op.hpp
@@ -0,0 +1,94 @@
+//
+// detail/reactive_null_buffers_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_NULL_BUFFERS_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_NULL_BUFFERS_OP_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/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class reactive_null_buffers_op : public reactor_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_null_buffers_op);
+
+ reactive_null_buffers_op(Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(&reactive_null_buffers_op::do_perform,
+ &reactive_null_buffers_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static status do_perform(reactor_op*)
+ {
+ return done;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_null_buffers_op* o(static_cast<reactive_null_buffers_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_NULL_BUFFERS_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_serial_port_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_serial_port_service.hpp
new file mode 100644
index 00000000000..ae752d06da9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_serial_port_service.hpp
@@ -0,0 +1,240 @@
+//
+// detail/reactive_serial_port_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_REACTIVE_SERIAL_PORT_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_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_SERIAL_PORT)
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#include <string>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/serial_port_base.hpp>
+#include <boost/asio/detail/descriptor_ops.hpp>
+#include <boost/asio/detail/reactive_descriptor_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Extend reactive_descriptor_service to provide serial port support.
+class reactive_serial_port_service :
+ public execution_context_service_base<reactive_serial_port_service>
+{
+public:
+ // The native type of a serial port.
+ typedef reactive_descriptor_service::native_handle_type native_handle_type;
+
+ // The implementation type of the serial port.
+ typedef reactive_descriptor_service::implementation_type implementation_type;
+
+ BOOST_ASIO_DECL reactive_serial_port_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Construct a new serial port implementation.
+ void construct(implementation_type& impl)
+ {
+ descriptor_service_.construct(impl);
+ }
+
+ // Move-construct a new serial port implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ descriptor_service_.move_construct(impl, other_impl);
+ }
+
+ // Move-assign from another serial port implementation.
+ void move_assign(implementation_type& impl,
+ reactive_serial_port_service& other_service,
+ implementation_type& other_impl)
+ {
+ descriptor_service_.move_assign(impl,
+ other_service.descriptor_service_, other_impl);
+ }
+
+ // Destroy a serial port implementation.
+ void destroy(implementation_type& impl)
+ {
+ descriptor_service_.destroy(impl);
+ }
+
+ // Open the serial port using the specified device name.
+ BOOST_ASIO_DECL boost::system::error_code open(implementation_type& impl,
+ const std::string& device, boost::system::error_code& ec);
+
+ // Assign a native descriptor to a serial port implementation.
+ boost::system::error_code assign(implementation_type& impl,
+ const native_handle_type& native_descriptor,
+ boost::system::error_code& ec)
+ {
+ return descriptor_service_.assign(impl, native_descriptor, ec);
+ }
+
+ // Determine whether the serial port is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return descriptor_service_.is_open(impl);
+ }
+
+ // Destroy a serial port implementation.
+ boost::system::error_code close(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ return descriptor_service_.close(impl, ec);
+ }
+
+ // Get the native serial port representation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return descriptor_service_.native_handle(impl);
+ }
+
+ // Cancel all operations associated with the serial port.
+ boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ return descriptor_service_.cancel(impl, ec);
+ }
+
+ // Set an option on the serial port.
+ template <typename SettableSerialPortOption>
+ boost::system::error_code set_option(implementation_type& impl,
+ const SettableSerialPortOption& option, boost::system::error_code& ec)
+ {
+ return do_set_option(impl,
+ &reactive_serial_port_service::store_option<SettableSerialPortOption>,
+ &option, ec);
+ }
+
+ // Get an option from the serial port.
+ template <typename GettableSerialPortOption>
+ boost::system::error_code get_option(const implementation_type& impl,
+ GettableSerialPortOption& option, boost::system::error_code& ec) const
+ {
+ return do_get_option(impl,
+ &reactive_serial_port_service::load_option<GettableSerialPortOption>,
+ &option, ec);
+ }
+
+ // Send a break sequence to the serial port.
+ boost::system::error_code send_break(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ errno = 0;
+ descriptor_ops::error_wrapper(::tcsendbreak(
+ descriptor_service_.native_handle(impl), 0), ec);
+ return ec;
+ }
+
+ // Write the given data. Returns the number of bytes sent.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return descriptor_service_.write_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_write_some(impl, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return descriptor_service_.read_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being received must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_read_some(impl, buffers, handler, io_ex);
+ }
+
+private:
+ // Function pointer type for storing a serial port option.
+ typedef boost::system::error_code (*store_function_type)(
+ const void*, termios&, boost::system::error_code&);
+
+ // Helper function template to store a serial port option.
+ template <typename SettableSerialPortOption>
+ static boost::system::error_code store_option(const void* option,
+ termios& storage, boost::system::error_code& ec)
+ {
+ static_cast<const SettableSerialPortOption*>(option)->store(storage, ec);
+ return ec;
+ }
+
+ // Helper function to set a serial port option.
+ BOOST_ASIO_DECL boost::system::error_code do_set_option(
+ implementation_type& impl, store_function_type store,
+ const void* option, boost::system::error_code& ec);
+
+ // Function pointer type for loading a serial port option.
+ typedef boost::system::error_code (*load_function_type)(
+ void*, const termios&, boost::system::error_code&);
+
+ // Helper function template to load a serial port option.
+ template <typename GettableSerialPortOption>
+ static boost::system::error_code load_option(void* option,
+ const termios& storage, boost::system::error_code& ec)
+ {
+ static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
+ return ec;
+ }
+
+ // Helper function to get a serial port option.
+ BOOST_ASIO_DECL boost::system::error_code do_get_option(
+ const implementation_type& impl, load_function_type load,
+ void* option, boost::system::error_code& ec) const;
+
+ // The implementation used for initiating asynchronous operations.
+ reactive_descriptor_service descriptor_service_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_accept_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_accept_op.hpp
new file mode 100644
index 00000000000..972e01618ce
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_accept_op.hpp
@@ -0,0 +1,232 @@
+//
+// detail/reactive_socket_accept_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_ACCEPT_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_ACCEPT_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_holder.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Socket, typename Protocol>
+class reactive_socket_accept_op_base : public reactor_op
+{
+public:
+ reactive_socket_accept_op_base(socket_type socket,
+ socket_ops::state_type state, Socket& peer, const Protocol& protocol,
+ typename Protocol::endpoint* peer_endpoint, func_type complete_func)
+ : reactor_op(&reactive_socket_accept_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ peer_(peer),
+ protocol_(protocol),
+ peer_endpoint_(peer_endpoint),
+ addrlen_(peer_endpoint ? peer_endpoint->capacity() : 0)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_accept_op_base* o(
+ static_cast<reactive_socket_accept_op_base*>(base));
+
+ socket_type new_socket = invalid_socket;
+ status result = socket_ops::non_blocking_accept(o->socket_,
+ o->state_, o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
+ o->peer_endpoint_ ? &o->addrlen_ : 0, o->ec_, new_socket)
+ ? done : not_done;
+ o->new_socket_.reset(new_socket);
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_accept", o->ec_));
+
+ return result;
+ }
+
+ void do_assign()
+ {
+ if (new_socket_.get() != invalid_socket)
+ {
+ if (peer_endpoint_)
+ peer_endpoint_->resize(addrlen_);
+ peer_.assign(protocol_, new_socket_.get(), ec_);
+ if (!ec_)
+ new_socket_.release();
+ }
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ socket_holder new_socket_;
+ Socket& peer_;
+ Protocol protocol_;
+ typename Protocol::endpoint* peer_endpoint_;
+ std::size_t addrlen_;
+};
+
+template <typename Socket, typename Protocol,
+ typename Handler, typename IoExecutor>
+class reactive_socket_accept_op :
+ public reactive_socket_accept_op_base<Socket, Protocol>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_accept_op);
+
+ reactive_socket_accept_op(socket_type socket,
+ socket_ops::state_type state, Socket& peer, const Protocol& protocol,
+ typename Protocol::endpoint* peer_endpoint, Handler& handler,
+ const IoExecutor& io_ex)
+ : reactive_socket_accept_op_base<Socket, Protocol>(socket, state, peer,
+ protocol, peer_endpoint, &reactive_socket_accept_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_accept_op* o(static_cast<reactive_socket_accept_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ // On success, assign new connection to peer socket object.
+ if (owner)
+ o->do_assign();
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+
+template <typename Protocol, typename PeerIoExecutor,
+ typename Handler, typename IoExecutor>
+class reactive_socket_move_accept_op :
+ private Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ public reactive_socket_accept_op_base<
+ typename Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ Protocol>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_move_accept_op);
+
+ reactive_socket_move_accept_op(const PeerIoExecutor& peer_io_ex,
+ socket_type socket, socket_ops::state_type state,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ : peer_socket_type(peer_io_ex),
+ reactive_socket_accept_op_base<peer_socket_type, Protocol>(
+ socket, state, *this, protocol, peer_endpoint,
+ &reactive_socket_move_accept_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_move_accept_op* o(
+ static_cast<reactive_socket_move_accept_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ // On success, assign new connection to peer socket object.
+ if (owner)
+ o->do_assign();
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::move_binder2<Handler,
+ boost::system::error_code, peer_socket_type>
+ handler(0, BOOST_ASIO_MOVE_CAST(Handler)(o->handler_), o->ec_,
+ BOOST_ASIO_MOVE_CAST(peer_socket_type)(*o));
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ typedef typename Protocol::socket::template
+ rebind_executor<PeerIoExecutor>::other peer_socket_type;
+
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_ACCEPT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_connect_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_connect_op.hpp
new file mode 100644
index 00000000000..e8701da312a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_connect_op.hpp
@@ -0,0 +1,118 @@
+//
+// detail/reactive_socket_connect_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_CONNECT_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class reactive_socket_connect_op_base : public reactor_op
+{
+public:
+ reactive_socket_connect_op_base(socket_type socket, func_type complete_func)
+ : reactor_op(&reactive_socket_connect_op_base::do_perform, complete_func),
+ socket_(socket)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_connect_op_base* o(
+ static_cast<reactive_socket_connect_op_base*>(base));
+
+ status result = socket_ops::non_blocking_connect(
+ o->socket_, o->ec_) ? done : not_done;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_connect", o->ec_));
+
+ return result;
+ }
+
+private:
+ socket_type socket_;
+};
+
+template <typename Handler, typename IoExecutor>
+class reactive_socket_connect_op : public reactive_socket_connect_op_base
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_connect_op);
+
+ reactive_socket_connect_op(socket_type socket,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_connect_op_base(socket,
+ &reactive_socket_connect_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_connect_op* o
+ (static_cast<reactive_socket_connect_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recv_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recv_op.hpp
new file mode 100644
index 00000000000..1d6889dcce9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recv_op.hpp
@@ -0,0 +1,139 @@
+//
+// detail/reactive_socket_recv_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_RECV_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECV_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class reactive_socket_recv_op_base : public reactor_op
+{
+public:
+ reactive_socket_recv_op_base(socket_type socket,
+ socket_ops::state_type state, const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, func_type complete_func)
+ : reactor_op(&reactive_socket_recv_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ flags_(flags)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_recv_op_base* o(
+ static_cast<reactive_socket_recv_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(o->buffers_);
+
+ status result = socket_ops::non_blocking_recv(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+
+ if (result == done)
+ if ((o->state_ & socket_ops::stream_oriented) != 0)
+ if (o->bytes_transferred_ == 0)
+ result = done_and_exhausted;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recv",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags flags_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class reactive_socket_recv_op :
+ public reactive_socket_recv_op_base<MutableBufferSequence>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_recv_op);
+
+ reactive_socket_recv_op(socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_recv_op_base<MutableBufferSequence>(socket, state,
+ buffers, flags, &reactive_socket_recv_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_recv_op* o(static_cast<reactive_socket_recv_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECV_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp
new file mode 100644
index 00000000000..09aceba82f8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp
@@ -0,0 +1,144 @@
+//
+// detail/reactive_socket_recvfrom_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_RECVFROM_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVFROM_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Endpoint>
+class reactive_socket_recvfrom_op_base : public reactor_op
+{
+public:
+ reactive_socket_recvfrom_op_base(socket_type socket, int protocol_type,
+ const MutableBufferSequence& buffers, Endpoint& endpoint,
+ socket_base::message_flags flags, func_type complete_func)
+ : reactor_op(&reactive_socket_recvfrom_op_base::do_perform, complete_func),
+ socket_(socket),
+ protocol_type_(protocol_type),
+ buffers_(buffers),
+ sender_endpoint_(endpoint),
+ flags_(flags)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_recvfrom_op_base* o(
+ static_cast<reactive_socket_recvfrom_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(o->buffers_);
+
+ std::size_t addr_len = o->sender_endpoint_.capacity();
+ status result = socket_ops::non_blocking_recvfrom(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+
+ if (result && !o->ec_)
+ o->sender_endpoint_.resize(addr_len);
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recvfrom",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ socket_type socket_;
+ int protocol_type_;
+ MutableBufferSequence buffers_;
+ Endpoint& sender_endpoint_;
+ socket_base::message_flags flags_;
+};
+
+template <typename MutableBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class reactive_socket_recvfrom_op :
+ public reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvfrom_op);
+
+ reactive_socket_recvfrom_op(socket_type socket, int protocol_type,
+ const MutableBufferSequence& buffers, Endpoint& endpoint,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ : reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>(
+ socket, protocol_type, buffers, endpoint, flags,
+ &reactive_socket_recvfrom_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_recvfrom_op* o(
+ static_cast<reactive_socket_recvfrom_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVFROM_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp
new file mode 100644
index 00000000000..bb65a19cf45
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp
@@ -0,0 +1,137 @@
+//
+// detail/reactive_socket_recvmsg_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_RECVMSG_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVMSG_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/socket_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class reactive_socket_recvmsg_op_base : public reactor_op
+{
+public:
+ reactive_socket_recvmsg_op_base(socket_type socket,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, func_type complete_func)
+ : reactor_op(&reactive_socket_recvmsg_op_base::do_perform, complete_func),
+ socket_(socket),
+ buffers_(buffers),
+ in_flags_(in_flags),
+ out_flags_(out_flags)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_recvmsg_op_base* o(
+ static_cast<reactive_socket_recvmsg_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(o->buffers_);
+
+ status result = socket_ops::non_blocking_recvmsg(o->socket_,
+ bufs.buffers(), bufs.count(),
+ o->in_flags_, o->out_flags_,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recvmsg",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ socket_type socket_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags in_flags_;
+ socket_base::message_flags& out_flags_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class reactive_socket_recvmsg_op :
+ public reactive_socket_recvmsg_op_base<MutableBufferSequence>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvmsg_op);
+
+ reactive_socket_recvmsg_op(socket_type socket,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ : reactive_socket_recvmsg_op_base<MutableBufferSequence>(socket, buffers,
+ in_flags, out_flags, &reactive_socket_recvmsg_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_recvmsg_op* o(
+ static_cast<reactive_socket_recvmsg_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_RECVMSG_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_send_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_send_op.hpp
new file mode 100644
index 00000000000..6be6081cc9d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_send_op.hpp
@@ -0,0 +1,138 @@
+//
+// detail/reactive_socket_send_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_SEND_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SEND_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class reactive_socket_send_op_base : public reactor_op
+{
+public:
+ reactive_socket_send_op_base(socket_type socket,
+ socket_ops::state_type state, const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, func_type complete_func)
+ : reactor_op(&reactive_socket_send_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ flags_(flags)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_send_op_base* o(
+ static_cast<reactive_socket_send_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(o->buffers_);
+
+ status result = socket_ops::non_blocking_send(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+
+ if (result == done)
+ if ((o->state_ & socket_ops::stream_oriented) != 0)
+ if (o->bytes_transferred_ < bufs.total_size())
+ result = done_and_exhausted;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_send",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ socket_base::message_flags flags_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class reactive_socket_send_op :
+ public reactive_socket_send_op_base<ConstBufferSequence>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_send_op);
+
+ reactive_socket_send_op(socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_send_op_base<ConstBufferSequence>(socket,
+ state, buffers, flags, &reactive_socket_send_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_send_op* o(static_cast<reactive_socket_send_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SEND_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_sendto_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_sendto_op.hpp
new file mode 100644
index 00000000000..3429a7585ec
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_sendto_op.hpp
@@ -0,0 +1,136 @@
+//
+// detail/reactive_socket_sendto_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_SENDTO_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SENDTO_OP_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/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence, typename Endpoint>
+class reactive_socket_sendto_op_base : public reactor_op
+{
+public:
+ reactive_socket_sendto_op_base(socket_type socket,
+ const ConstBufferSequence& buffers, const Endpoint& endpoint,
+ socket_base::message_flags flags, func_type complete_func)
+ : reactor_op(&reactive_socket_sendto_op_base::do_perform, complete_func),
+ socket_(socket),
+ buffers_(buffers),
+ destination_(endpoint),
+ flags_(flags)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ reactive_socket_sendto_op_base* o(
+ static_cast<reactive_socket_sendto_op_base*>(base));
+
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(o->buffers_);
+
+ status result = socket_ops::non_blocking_sendto(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ o->destination_.data(), o->destination_.size(),
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+
+ BOOST_ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_sendto",
+ o->ec_, o->bytes_transferred_));
+
+ return result;
+ }
+
+private:
+ socket_type socket_;
+ ConstBufferSequence buffers_;
+ Endpoint destination_;
+ socket_base::message_flags flags_;
+};
+
+template <typename ConstBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class reactive_socket_sendto_op :
+ public reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_socket_sendto_op);
+
+ reactive_socket_sendto_op(socket_type socket,
+ const ConstBufferSequence& buffers, const Endpoint& endpoint,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ : reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>(socket,
+ buffers, endpoint, flags, &reactive_socket_sendto_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_socket_sendto_op* o(static_cast<reactive_socket_sendto_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SENDTO_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service.hpp
new file mode 100644
index 00000000000..fb3a0e4660c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service.hpp
@@ -0,0 +1,507 @@
+//
+// detail/reactive_socket_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_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_IOCP)
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/reactive_null_buffers_op.hpp>
+#include <boost/asio/detail/reactive_socket_accept_op.hpp>
+#include <boost/asio/detail/reactive_socket_connect_op.hpp>
+#include <boost/asio/detail/reactive_socket_recvfrom_op.hpp>
+#include <boost/asio/detail/reactive_socket_sendto_op.hpp>
+#include <boost/asio/detail/reactive_socket_service_base.hpp>
+#include <boost/asio/detail/reactor.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_holder.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class reactive_socket_service :
+ public execution_context_service_base<reactive_socket_service<Protocol> >,
+ public reactive_socket_service_base
+{
+public:
+ // The protocol type.
+ typedef Protocol protocol_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The native type of a socket.
+ typedef socket_type native_handle_type;
+
+ // The implementation type of the socket.
+ struct implementation_type :
+ reactive_socket_service_base::base_implementation_type
+ {
+ // Default constructor.
+ implementation_type()
+ : protocol_(endpoint_type().protocol())
+ {
+ }
+
+ // The protocol associated with the socket.
+ protocol_type protocol_;
+ };
+
+ // Constructor.
+ reactive_socket_service(execution_context& context)
+ : execution_context_service_base<
+ reactive_socket_service<Protocol> >(context),
+ reactive_socket_service_base(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ this->base_shutdown();
+ }
+
+ // Move-construct a new socket implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-assign from another socket implementation.
+ void move_assign(implementation_type& impl,
+ reactive_socket_service_base& other_service,
+ implementation_type& other_impl)
+ {
+ this->base_move_assign(impl, other_service, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-construct a new socket implementation from another protocol type.
+ template <typename Protocol1>
+ void converting_move_construct(implementation_type& impl,
+ reactive_socket_service<Protocol1>&,
+ typename reactive_socket_service<
+ Protocol1>::implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = protocol_type(other_impl.protocol_);
+ other_impl.protocol_ = typename Protocol1::endpoint().protocol();
+ }
+
+ // Open a new socket implementation.
+ boost::system::error_code open(implementation_type& impl,
+ const protocol_type& protocol, boost::system::error_code& ec)
+ {
+ if (!do_open(impl, protocol.family(),
+ protocol.type(), protocol.protocol(), ec))
+ impl.protocol_ = protocol;
+ return ec;
+ }
+
+ // Assign a native socket to a socket implementation.
+ boost::system::error_code assign(implementation_type& impl,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ boost::system::error_code& ec)
+ {
+ if (!do_assign(impl, protocol.type(), native_socket, ec))
+ impl.protocol_ = protocol;
+ return ec;
+ }
+
+ // Get the native socket representation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Bind the socket to the specified local endpoint.
+ boost::system::error_code bind(implementation_type& impl,
+ const endpoint_type& endpoint, boost::system::error_code& ec)
+ {
+ socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code set_option(implementation_type& impl,
+ const Option& option, boost::system::error_code& ec)
+ {
+ socket_ops::setsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), option.size(impl.protocol_), ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code get_option(const implementation_type& impl,
+ Option& option, boost::system::error_code& ec) const
+ {
+ std::size_t size = option.size(impl.protocol_);
+ socket_ops::getsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), &size, ec);
+ if (!ec)
+ option.resize(impl.protocol_, size);
+ return ec;
+ }
+
+ // Get the local endpoint.
+ endpoint_type local_endpoint(const implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ return endpoint_type();
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Get the remote endpoint.
+ endpoint_type remote_endpoint(const implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getpeername(impl.socket_,
+ endpoint.data(), &addr_len, false, ec))
+ return endpoint_type();
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Disable sends or receives on the socket.
+ boost::system::error_code shutdown(base_implementation_type& impl,
+ socket_base::shutdown_type what, boost::system::error_code& ec)
+ {
+ socket_ops::shutdown(impl.socket_, what, ec);
+ return ec;
+ }
+
+ // Send a datagram to the specified endpoint. Returns the number of bytes
+ // sent.
+ template <typename ConstBufferSequence>
+ size_t send_to(implementation_type& impl, const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_sendto(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags,
+ destination.data(), destination.size(), ec);
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_sendto_op<ConstBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, buffers,
+ destination, flags, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_send_to"));
+
+ start_op(impl, reactor::write_op, p.p, is_continuation, true, false);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_send_to(null_buffers)"));
+
+ start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive a datagram with the endpoint of the sender. Returns the number of
+ // bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ std::size_t addr_len = sender_endpoint.capacity();
+ std::size_t bytes_recvd = socket_ops::sync_recvfrom(
+ impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
+ flags, sender_endpoint.data(), &addr_len, ec);
+
+ if (!ec)
+ sender_endpoint.resize(addr_len);
+
+ return bytes_recvd;
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received and
+ // the sender_endpoint object must both be valid for the lifetime of the
+ // asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_recvfrom_op<MutableBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ int protocol = impl.protocol_.type();
+ p.p = new (p.v) op(impl.socket_, protocol, buffers,
+ sender_endpoint, flags, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_from"));
+
+ start_op(impl,
+ (flags & socket_base::message_out_of_band)
+ ? reactor::except_op : reactor::read_op,
+ p.p, is_continuation, true, false);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_from(null_buffers)"));
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ start_op(impl,
+ (flags & socket_base::message_out_of_band)
+ ? reactor::except_op : reactor::read_op,
+ p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Accept a new connection.
+ template <typename Socket>
+ boost::system::error_code accept(implementation_type& impl,
+ Socket& peer, endpoint_type* peer_endpoint, boost::system::error_code& ec)
+ {
+ // We cannot accept a socket that is already open.
+ if (peer.is_open())
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
+ socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
+ impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
+ peer_endpoint ? &addr_len : 0, ec));
+
+ // On success, assign new connection to peer socket object.
+ if (new_socket.get() != invalid_socket)
+ {
+ if (peer_endpoint)
+ peer_endpoint->resize(addr_len);
+ peer.assign(impl.protocol_, new_socket.get(), ec);
+ if (!ec)
+ new_socket.release();
+ }
+
+ return ec;
+ }
+
+ // Start an asynchronous accept. The peer and peer_endpoint objects must be
+ // valid until the accept's handler is invoked.
+ template <typename Socket, typename Handler, typename IoExecutor>
+ void async_accept(implementation_type& impl, Socket& peer,
+ endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_accept_op<Socket, Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, impl.state_, peer,
+ impl.protocol_, peer_endpoint, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, p.p, is_continuation, peer.is_open());
+ p.v = p.p = 0;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ // Start an asynchronous accept. The peer_endpoint object must be valid until
+ // the accept's handler is invoked.
+ template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
+ void async_move_accept(implementation_type& impl,
+ const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_move_accept_op<Protocol,
+ PeerIoExecutor, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(peer_io_ex, impl.socket_, impl.state_,
+ impl.protocol_, peer_endpoint, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ // Connect the socket to the specified endpoint.
+ boost::system::error_code connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint, boost::system::error_code& ec)
+ {
+ socket_ops::sync_connect(impl.socket_,
+ peer_endpoint.data(), peer_endpoint.size(), ec);
+ return ec;
+ }
+
+ // Start an asynchronous connect.
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_connect_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_connect"));
+
+ start_connect_op(impl, p.p, is_continuation,
+ peer_endpoint.data(), peer_endpoint.size());
+ p.v = p.p = 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service_base.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service_base.hpp
new file mode 100644
index 00000000000..26fb828b010
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_socket_service_base.hpp
@@ -0,0 +1,520 @@
+//
+// detail/reactive_socket_service_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_SOCKET_SERVICE_BASE_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_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_IOCP) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactive_null_buffers_op.hpp>
+#include <boost/asio/detail/reactive_socket_recv_op.hpp>
+#include <boost/asio/detail/reactive_socket_recvmsg_op.hpp>
+#include <boost/asio/detail/reactive_socket_send_op.hpp>
+#include <boost/asio/detail/reactive_wait_op.hpp>
+#include <boost/asio/detail/reactor.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_holder.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class reactive_socket_service_base
+{
+public:
+ // The native type of a socket.
+ typedef socket_type native_handle_type;
+
+ // The implementation type of the socket.
+ struct base_implementation_type
+ {
+ // The native socket representation.
+ socket_type socket_;
+
+ // The current state of the socket.
+ socket_ops::state_type state_;
+
+ // Per-descriptor data used by the reactor.
+ reactor::per_descriptor_data reactor_data_;
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL reactive_socket_service_base(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void base_shutdown();
+
+ // Construct a new socket implementation.
+ BOOST_ASIO_DECL void construct(base_implementation_type& impl);
+
+ // Move-construct a new socket implementation.
+ BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
+ base_implementation_type& other_impl);
+
+ // Move-assign from another socket implementation.
+ BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
+ reactive_socket_service_base& other_service,
+ base_implementation_type& other_impl);
+
+ // Destroy a socket implementation.
+ BOOST_ASIO_DECL void destroy(base_implementation_type& impl);
+
+ // Determine whether the socket is open.
+ bool is_open(const base_implementation_type& impl) const
+ {
+ return impl.socket_ != invalid_socket;
+ }
+
+ // Destroy a socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code close(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Release ownership of the socket.
+ BOOST_ASIO_DECL socket_type release(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Get the native socket representation.
+ native_handle_type native_handle(base_implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Cancel all operations associated with the socket.
+ BOOST_ASIO_DECL boost::system::error_code cancel(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Determine whether the socket is at the out-of-band data mark.
+ bool at_mark(const base_implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ return socket_ops::sockatmark(impl.socket_, ec);
+ }
+
+ // Determine the number of bytes available for reading.
+ std::size_t available(const base_implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ return socket_ops::available(impl.socket_, ec);
+ }
+
+ // Place the socket into the state where it will listen for new connections.
+ boost::system::error_code listen(base_implementation_type& impl,
+ int backlog, boost::system::error_code& ec)
+ {
+ socket_ops::listen(impl.socket_, backlog, ec);
+ return ec;
+ }
+
+ // Perform an IO control command on the socket.
+ template <typename IO_Control_Command>
+ boost::system::error_code io_control(base_implementation_type& impl,
+ IO_Control_Command& command, boost::system::error_code& ec)
+ {
+ socket_ops::ioctl(impl.socket_, impl.state_, command.name(),
+ static_cast<ioctl_arg_type*>(command.data()), ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the socket.
+ bool non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the socket.
+ boost::system::error_code non_blocking(base_implementation_type& impl,
+ bool mode, boost::system::error_code& ec)
+ {
+ socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native socket implementation.
+ bool native_non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native socket implementation.
+ boost::system::error_code native_non_blocking(base_implementation_type& impl,
+ bool mode, boost::system::error_code& ec)
+ {
+ socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Wait for the socket to become ready to read, ready to write, or to have
+ // pending error conditions.
+ boost::system::error_code wait(base_implementation_type& impl,
+ socket_base::wait_type w, boost::system::error_code& ec)
+ {
+ switch (w)
+ {
+ case socket_base::wait_read:
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_write:
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_error:
+ socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
+ break;
+ default:
+ ec = boost::asio::error::invalid_argument;
+ break;
+ }
+
+ return ec;
+ }
+
+ // Asynchronously wait for the socket to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(base_implementation_type& impl,
+ socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_wait"));
+
+ int op_type;
+ switch (w)
+ {
+ case socket_base::wait_read:
+ op_type = reactor::read_op;
+ break;
+ case socket_base::wait_write:
+ op_type = reactor::write_op;
+ break;
+ case socket_base::wait_error:
+ op_type = reactor::except_op;
+ break;
+ default:
+ p.p->ec_ = boost::asio::error::invalid_argument;
+ reactor_.post_immediate_completion(p.p, is_continuation);
+ p.v = p.p = 0;
+ return;
+ }
+
+ start_op(impl, op_type, p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Send the given data to the peer.
+ template <typename ConstBufferSequence>
+ size_t send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_send(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, impl.state_,
+ buffers, flags, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_send"));
+
+ start_op(impl, reactor::write_op, p.p, is_continuation, true,
+ ((impl.state_ & socket_ops::stream_oriented)
+ && buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers)));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_send(null_buffers)"));
+
+ start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data from the peer. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_recv(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_recv_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, impl.state_,
+ buffers, flags, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive"));
+
+ start_op(impl,
+ (flags & socket_base::message_out_of_band)
+ ? reactor::except_op : reactor::read_op,
+ p.p, is_continuation,
+ (flags & socket_base::message_out_of_band) == 0,
+ ((impl.state_ & socket_ops::stream_oriented)
+ && buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers)));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive(null_buffers)"));
+
+ start_op(impl,
+ (flags & socket_base::message_out_of_band)
+ ? reactor::except_op : reactor::read_op,
+ p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data with associated flags. Returns the number of bytes
+ // received.
+ template <typename MutableBufferSequence>
+ size_t receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_recvmsg(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), in_flags, out_flags, ec);
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags,
+ socket_base::message_flags& out_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_socket_recvmsg_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, buffers,
+ in_flags, out_flags, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_with_flags"));
+
+ start_op(impl,
+ (in_flags & socket_base::message_out_of_band)
+ ? reactor::except_op : reactor::read_op,
+ p.p, is_continuation,
+ (in_flags & socket_base::message_out_of_band) == 0, false);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ start_op(impl,
+ (in_flags & socket_base::message_out_of_band)
+ ? reactor::except_op : reactor::read_op,
+ p.p, is_continuation, false, false);
+ p.v = p.p = 0;
+ }
+
+protected:
+ // Open a new socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code do_open(
+ base_implementation_type& impl, int af,
+ int type, int protocol, boost::system::error_code& ec);
+
+ // Assign a native socket to a socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code do_assign(
+ base_implementation_type& impl, int type,
+ const native_handle_type& native_socket, boost::system::error_code& ec);
+
+ // Start the asynchronous read or write operation.
+ BOOST_ASIO_DECL void start_op(base_implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
+
+ // Start the asynchronous accept operation.
+ BOOST_ASIO_DECL void start_accept_op(base_implementation_type& impl,
+ reactor_op* op, bool is_continuation, bool peer_is_open);
+
+ // Start the asynchronous connect operation.
+ BOOST_ASIO_DECL void start_connect_op(base_implementation_type& impl,
+ reactor_op* op, bool is_continuation,
+ const socket_addr_type* addr, size_t addrlen);
+
+ // The selector that performs event demultiplexing for the service.
+ reactor& reactor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // !defined(BOOST_ASIO_HAS_IOCP)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactive_wait_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_wait_op.hpp
new file mode 100644
index 00000000000..021059dcd5f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactive_wait_op.hpp
@@ -0,0 +1,94 @@
+//
+// detail/reactive_wait_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTIVE_WAIT_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTIVE_WAIT_OP_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/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class reactive_wait_op : public reactor_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_wait_op);
+
+ reactive_wait_op(Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(&reactive_wait_op::do_perform,
+ &reactive_wait_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static status do_perform(reactor_op*)
+ {
+ return done;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ reactive_wait_op* o(static_cast<reactive_wait_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTIVE_WAIT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactor.hpp
new file mode 100644
index 00000000000..bfe999bed32
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactor.hpp
@@ -0,0 +1,32 @@
+//
+// detail/reactor.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_REACTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/reactor_fwd.hpp>
+
+#if defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/null_reactor.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+#endif
+
+#endif // BOOST_ASIO_DETAIL_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactor_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactor_fwd.hpp
new file mode 100644
index 00000000000..2ea1eec99ec
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactor_fwd.hpp
@@ -0,0 +1,42 @@
+//
+// detail/reactor_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTOR_FWD_HPP
+#define BOOST_ASIO_DETAIL_REACTOR_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_IOCP) || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+typedef class null_reactor reactor;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+typedef class select_reactor reactor;
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+typedef class epoll_reactor reactor;
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+typedef class kqueue_reactor reactor;
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+typedef class dev_poll_reactor reactor;
+#else
+typedef class select_reactor reactor;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_REACTOR_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactor_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactor_op.hpp
new file mode 100644
index 00000000000..4c399a50366
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactor_op.hpp
@@ -0,0 +1,67 @@
+//
+// detail/reactor_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTOR_OP_HPP
+#define BOOST_ASIO_DETAIL_REACTOR_OP_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/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class reactor_op
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ boost::system::error_code ec_;
+
+ // The number of bytes transferred, to be passed to the completion handler.
+ std::size_t bytes_transferred_;
+
+ // Status returned by perform function. May be used to decide whether it is
+ // worth performing more operations on the descriptor immediately.
+ enum status { not_done, done, done_and_exhausted };
+
+ // Perform the operation. Returns true if it is finished.
+ status perform()
+ {
+ return perform_func_(this);
+ }
+
+protected:
+ typedef status (*perform_func_type)(reactor_op*);
+
+ reactor_op(perform_func_type perform_func, func_type complete_func)
+ : operation(complete_func),
+ bytes_transferred_(0),
+ perform_func_(perform_func)
+ {
+ }
+
+private:
+ perform_func_type perform_func_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTOR_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/reactor_op_queue.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/reactor_op_queue.hpp
new file mode 100644
index 00000000000..dd28b6dc98a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/reactor_op_queue.hpp
@@ -0,0 +1,170 @@
+//
+// detail/reactor_op_queue.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REACTOR_OP_QUEUE_HPP
+#define BOOST_ASIO_DETAIL_REACTOR_OP_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 <boost/asio/detail/hash_map.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Descriptor>
+class reactor_op_queue
+ : private noncopyable
+{
+public:
+ typedef Descriptor key_type;
+
+ struct mapped_type : op_queue<reactor_op>
+ {
+ mapped_type() {}
+ mapped_type(const mapped_type&) {}
+ void operator=(const mapped_type&) {}
+ };
+
+ typedef typename hash_map<key_type, mapped_type>::value_type value_type;
+ typedef typename hash_map<key_type, mapped_type>::iterator iterator;
+
+ // Constructor.
+ reactor_op_queue()
+ : operations_()
+ {
+ }
+
+ // Obtain iterators to all registered descriptors.
+ iterator begin() { return operations_.begin(); }
+ iterator end() { return operations_.end(); }
+
+ // Add a new operation to the queue. Returns true if this is the only
+ // operation for the given descriptor, in which case the reactor's event
+ // demultiplexing function call may need to be interrupted and restarted.
+ bool enqueue_operation(Descriptor descriptor, reactor_op* op)
+ {
+ std::pair<iterator, bool> entry =
+ operations_.insert(value_type(descriptor, mapped_type()));
+ entry.first->second.push(op);
+ return entry.second;
+ }
+
+ // Cancel all operations associated with the descriptor identified by the
+ // supplied iterator. Any operations pending for the descriptor will be
+ // cancelled. Returns true if any operations were cancelled, in which case
+ // the reactor's event demultiplexing function may need to be interrupted and
+ // restarted.
+ bool cancel_operations(iterator i, op_queue<operation>& ops,
+ const boost::system::error_code& ec =
+ boost::asio::error::operation_aborted)
+ {
+ if (i != operations_.end())
+ {
+ while (reactor_op* op = i->second.front())
+ {
+ op->ec_ = ec;
+ i->second.pop();
+ ops.push(op);
+ }
+ operations_.erase(i);
+ return true;
+ }
+
+ return false;
+ }
+
+ // Cancel all operations associated with the descriptor. Any operations
+ // pending for the descriptor will be cancelled. Returns true if any
+ // operations were cancelled, in which case the reactor's event
+ // demultiplexing function may need to be interrupted and restarted.
+ bool cancel_operations(Descriptor descriptor, op_queue<operation>& ops,
+ const boost::system::error_code& ec =
+ boost::asio::error::operation_aborted)
+ {
+ return this->cancel_operations(operations_.find(descriptor), ops, ec);
+ }
+
+ // Whether there are no operations in the queue.
+ bool empty() const
+ {
+ return operations_.empty();
+ }
+
+ // Determine whether there are any operations associated with the descriptor.
+ bool has_operation(Descriptor descriptor) const
+ {
+ return operations_.find(descriptor) != operations_.end();
+ }
+
+ // Perform the operations corresponding to the descriptor identified by the
+ // supplied iterator. Returns true if there are still unfinished operations
+ // queued for the descriptor.
+ bool perform_operations(iterator i, op_queue<operation>& ops)
+ {
+ if (i != operations_.end())
+ {
+ while (reactor_op* op = i->second.front())
+ {
+ if (op->perform())
+ {
+ i->second.pop();
+ ops.push(op);
+ }
+ else
+ {
+ return true;
+ }
+ }
+ operations_.erase(i);
+ }
+ return false;
+ }
+
+ // Perform the operations corresponding to the descriptor. Returns true if
+ // there are still unfinished operations queued for the descriptor.
+ bool perform_operations(Descriptor descriptor, op_queue<operation>& ops)
+ {
+ return this->perform_operations(operations_.find(descriptor), ops);
+ }
+
+ // Get all operations owned by the queue.
+ void get_all_operations(op_queue<operation>& ops)
+ {
+ iterator i = operations_.begin();
+ while (i != operations_.end())
+ {
+ iterator op_iter = i++;
+ ops.push(op_iter->second);
+ operations_.erase(op_iter);
+ }
+ }
+
+private:
+ // The operations that are currently executing asynchronously.
+ hash_map<key_type, mapped_type> operations_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_REACTOR_OP_QUEUE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/recycling_allocator.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/recycling_allocator.hpp
new file mode 100644
index 00000000000..74003bfdd67
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/recycling_allocator.hpp
@@ -0,0 +1,108 @@
+//
+// detail/recycling_allocator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RECYCLING_ALLOCATOR_HPP
+#define BOOST_ASIO_DETAIL_RECYCLING_ALLOCATOR_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/memory.hpp>
+#include <boost/asio/detail/thread_context.hpp>
+#include <boost/asio/detail/thread_info_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T, typename Purpose = thread_info_base::default_tag>
+class recycling_allocator
+{
+public:
+ typedef T value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef recycling_allocator<U, Purpose> other;
+ };
+
+ recycling_allocator()
+ {
+ }
+
+ template <typename U>
+ recycling_allocator(const recycling_allocator<U, Purpose>&)
+ {
+ }
+
+ T* allocate(std::size_t n)
+ {
+ typedef thread_context::thread_call_stack call_stack;
+ void* p = thread_info_base::allocate(Purpose(),
+ call_stack::top(), sizeof(T) * n);
+ return static_cast<T*>(p);
+ }
+
+ void deallocate(T* p, std::size_t n)
+ {
+ typedef thread_context::thread_call_stack call_stack;
+ thread_info_base::deallocate(Purpose(),
+ call_stack::top(), p, sizeof(T) * n);
+ }
+};
+
+template <typename Purpose>
+class recycling_allocator<void, Purpose>
+{
+public:
+ typedef void value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef recycling_allocator<U, Purpose> other;
+ };
+
+ recycling_allocator()
+ {
+ }
+
+ template <typename U>
+ recycling_allocator(const recycling_allocator<U, Purpose>&)
+ {
+ }
+};
+
+template <typename Allocator, typename Purpose>
+struct get_recycling_allocator
+{
+ typedef Allocator type;
+ static type get(const Allocator& a) { return a; }
+};
+
+template <typename T, typename Purpose>
+struct get_recycling_allocator<std::allocator<T>, Purpose>
+{
+ typedef recycling_allocator<T, Purpose> type;
+ static type get(const std::allocator<T>&) { return type(); }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_RECYCLING_ALLOCATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/regex_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/regex_fwd.hpp
new file mode 100644
index 00000000000..a2dd26dff4b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/regex_fwd.hpp
@@ -0,0 +1,35 @@
+//
+// detail/regex_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REGEX_FWD_HPP
+#define BOOST_ASIO_DETAIL_REGEX_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+#include <boost/regex_fwd.hpp>
+#include <boost/regex/v4/match_flags.hpp>
+
+namespace boost {
+
+template <class BidiIterator>
+struct sub_match;
+
+template <class BidiIterator, class Allocator>
+class match_results;
+
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+#endif // BOOST_ASIO_DETAIL_REGEX_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/resolve_endpoint_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/resolve_endpoint_op.hpp
new file mode 100644
index 00000000000..72df8d94ac3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/resolve_endpoint_op.hpp
@@ -0,0 +1,138 @@
+//
+// detail/resolve_endpoint_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVER_ENDPOINT_OP_HPP
+#define BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_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/error.hpp>
+#include <boost/asio/ip/basic_resolver_results.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/resolve_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol, typename Handler, typename IoExecutor>
+class resolve_endpoint_op : public resolve_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(resolve_endpoint_op);
+
+ typedef typename Protocol::endpoint endpoint_type;
+ typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+
+ resolve_endpoint_op(socket_ops::weak_cancel_token_type cancel_token,
+ const endpoint_type& endpoint, scheduler_impl& sched,
+ Handler& handler, const IoExecutor& io_ex)
+ : resolve_op(&resolve_endpoint_op::do_complete),
+ cancel_token_(cancel_token),
+ endpoint_(endpoint),
+ scheduler_(sched),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the operation object.
+ resolve_endpoint_op* o(static_cast<resolve_endpoint_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ if (owner && owner != &o->scheduler_)
+ {
+ // The operation is being run on the worker io_context. Time to perform
+ // the resolver operation.
+
+ // Perform the blocking endpoint resolution operation.
+ char host_name[NI_MAXHOST];
+ char service_name[NI_MAXSERV];
+ socket_ops::background_getnameinfo(o->cancel_token_, o->endpoint_.data(),
+ o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
+ o->endpoint_.protocol().type(), o->ec_);
+ o->results_ = results_type::create(o->endpoint_, host_name, service_name);
+
+ // Pass operation back to main io_context for completion.
+ o->scheduler_.post_deferred_completion(o);
+ p.v = p.p = 0;
+ }
+ else
+ {
+ // The operation has been returned to the main io_context. The completion
+ // handler is ready to be delivered.
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated
+ // before the upcall is made. Even if we're not about to make an upcall,
+ // a sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, results_type>
+ handler(o->handler_, o->ec_, o->results_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+ }
+
+private:
+ socket_ops::weak_cancel_token_type cancel_token_;
+ endpoint_type endpoint_;
+ scheduler_impl& scheduler_;
+ Handler handler_;
+ IoExecutor io_executor_;
+ results_type results_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_RESOLVER_ENDPOINT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/resolve_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/resolve_op.hpp
new file mode 100644
index 00000000000..2be7b196ec8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/resolve_op.hpp
@@ -0,0 +1,47 @@
+//
+// detail/resolve_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVE_OP_HPP
+#define BOOST_ASIO_DETAIL_RESOLVE_OP_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/error.hpp>
+#include <boost/asio/detail/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class resolve_op : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ boost::system::error_code ec_;
+
+protected:
+ resolve_op(func_type complete_func)
+ : operation(complete_func)
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_RESOLVE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/resolve_query_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/resolve_query_op.hpp
new file mode 100644
index 00000000000..11d59896717
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/resolve_query_op.hpp
@@ -0,0 +1,150 @@
+//
+// detail/resolve_query_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVE_QUERY_OP_HPP
+#define BOOST_ASIO_DETAIL_RESOLVE_QUERY_OP_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/error.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+#include <boost/asio/ip/basic_resolver_results.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/resolve_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol, typename Handler, typename IoExecutor>
+class resolve_query_op : public resolve_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(resolve_query_op);
+
+ typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
+ typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+
+ resolve_query_op(socket_ops::weak_cancel_token_type cancel_token,
+ const query_type& query, scheduler_impl& sched,
+ Handler& handler, const IoExecutor& io_ex)
+ : resolve_op(&resolve_query_op::do_complete),
+ cancel_token_(cancel_token),
+ query_(query),
+ scheduler_(sched),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex),
+ addrinfo_(0)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ ~resolve_query_op()
+ {
+ if (addrinfo_)
+ socket_ops::freeaddrinfo(addrinfo_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the operation object.
+ resolve_query_op* o(static_cast<resolve_query_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+
+ if (owner && owner != &o->scheduler_)
+ {
+ // The operation is being run on the worker io_context. Time to perform
+ // the resolver operation.
+
+ // Perform the blocking host resolution operation.
+ socket_ops::background_getaddrinfo(o->cancel_token_,
+ o->query_.host_name().c_str(), o->query_.service_name().c_str(),
+ o->query_.hints(), &o->addrinfo_, o->ec_);
+
+ // Pass operation back to main io_context for completion.
+ o->scheduler_.post_deferred_completion(o);
+ p.v = p.p = 0;
+ }
+ else
+ {
+ // The operation has been returned to the main io_context. The completion
+ // handler is ready to be delivered.
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated
+ // before the upcall is made. Even if we're not about to make an upcall,
+ // a sub-object of the handler may be the true owner of the memory
+ // associated with the handler. Consequently, a local copy of the handler
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, results_type>
+ handler(o->handler_, o->ec_, results_type());
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ if (o->addrinfo_)
+ {
+ handler.arg2_ = results_type::create(o->addrinfo_,
+ o->query_.host_name(), o->query_.service_name());
+ }
+ p.reset();
+
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+ }
+
+private:
+ socket_ops::weak_cancel_token_type cancel_token_;
+ query_type query_;
+ scheduler_impl& scheduler_;
+ Handler handler_;
+ IoExecutor io_executor_;
+ boost::asio::detail::addrinfo_type* addrinfo_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_RESOLVE_QUERY_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/resolver_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/resolver_service.hpp
new file mode 100644
index 00000000000..744b75ca466
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/resolver_service.hpp
@@ -0,0 +1,147 @@
+//
+// detail/resolver_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVER_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_RESOLVER_SERVICE_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/ip/basic_resolver_query.hpp>
+#include <boost/asio/ip/basic_resolver_results.hpp>
+#include <boost/asio/detail/concurrency_hint.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/resolve_endpoint_op.hpp>
+#include <boost/asio/detail/resolve_query_op.hpp>
+#include <boost/asio/detail/resolver_service_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class resolver_service :
+ public execution_context_service_base<resolver_service<Protocol> >,
+ public resolver_service_base
+{
+public:
+ // The implementation type of the resolver. A cancellation token is used to
+ // indicate to the background thread that the operation has been cancelled.
+ typedef socket_ops::shared_cancel_token_type implementation_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The query type.
+ typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
+
+ // The results type.
+ typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
+
+ // Constructor.
+ resolver_service(execution_context& context)
+ : execution_context_service_base<resolver_service<Protocol> >(context),
+ resolver_service_base(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ this->base_shutdown();
+ }
+
+ // Perform any fork-related housekeeping.
+ void notify_fork(execution_context::fork_event fork_ev)
+ {
+ this->base_notify_fork(fork_ev);
+ }
+
+ // Resolve a query to a list of entries.
+ results_type resolve(implementation_type&, const query_type& query,
+ boost::system::error_code& ec)
+ {
+ boost::asio::detail::addrinfo_type* address_info = 0;
+
+ socket_ops::getaddrinfo(query.host_name().c_str(),
+ query.service_name().c_str(), query.hints(), &address_info, ec);
+ auto_addrinfo auto_address_info(address_info);
+
+ return ec ? results_type() : results_type::create(
+ address_info, query.host_name(), query.service_name());
+ }
+
+ // Asynchronously resolve a query to a list of entries.
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type& impl, const query_type& query,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef resolve_query_op<Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl, query, scheduler_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "resolver", &impl, 0, "async_resolve"));
+
+ start_resolve_op(p.p);
+ p.v = p.p = 0;
+ }
+
+ // Resolve an endpoint to a list of entries.
+ results_type resolve(implementation_type&,
+ const endpoint_type& endpoint, boost::system::error_code& ec)
+ {
+ char host_name[NI_MAXHOST];
+ char service_name[NI_MAXSERV];
+ socket_ops::sync_getnameinfo(endpoint.data(), endpoint.size(),
+ host_name, NI_MAXHOST, service_name, NI_MAXSERV,
+ endpoint.protocol().type(), ec);
+
+ return ec ? results_type() : results_type::create(
+ endpoint, host_name, service_name);
+ }
+
+ // Asynchronously resolve an endpoint to a list of entries.
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type& impl, const endpoint_type& endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef resolve_endpoint_op<Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl, endpoint, scheduler_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "resolver", &impl, 0, "async_resolve"));
+
+ start_resolve_op(p.p);
+ p.v = p.p = 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_RESOLVER_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/resolver_service_base.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/resolver_service_base.hpp
new file mode 100644
index 00000000000..8e1ff5bea82
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/resolver_service_base.hpp
@@ -0,0 +1,145 @@
+//
+// detail/resolver_service_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVER_SERVICE_BASE_HPP
+#define BOOST_ASIO_DETAIL_RESOLVER_SERVICE_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/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/resolve_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/detail/thread.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class resolver_service_base
+{
+public:
+ // The implementation type of the resolver. A cancellation token is used to
+ // indicate to the background thread that the operation has been cancelled.
+ typedef socket_ops::shared_cancel_token_type implementation_type;
+
+ // Constructor.
+ BOOST_ASIO_DECL resolver_service_base(execution_context& context);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~resolver_service_base();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void base_shutdown();
+
+ // Perform any fork-related housekeeping.
+ BOOST_ASIO_DECL void base_notify_fork(
+ execution_context::fork_event fork_ev);
+
+ // Construct a new resolver implementation.
+ BOOST_ASIO_DECL void construct(implementation_type& impl);
+
+ // Destroy a resolver implementation.
+ BOOST_ASIO_DECL void destroy(implementation_type&);
+
+ // Move-construct a new resolver implementation.
+ BOOST_ASIO_DECL void move_construct(implementation_type& impl,
+ implementation_type& other_impl);
+
+ // Move-assign from another resolver implementation.
+ BOOST_ASIO_DECL void move_assign(implementation_type& impl,
+ resolver_service_base& other_service,
+ implementation_type& other_impl);
+
+ // Cancel pending asynchronous operations.
+ BOOST_ASIO_DECL void cancel(implementation_type& impl);
+
+protected:
+ // Helper function to start an asynchronous resolve operation.
+ BOOST_ASIO_DECL void start_resolve_op(resolve_op* op);
+
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // Helper class to perform exception-safe cleanup of addrinfo objects.
+ class auto_addrinfo
+ : private boost::asio::detail::noncopyable
+ {
+ public:
+ explicit auto_addrinfo(boost::asio::detail::addrinfo_type* ai)
+ : ai_(ai)
+ {
+ }
+
+ ~auto_addrinfo()
+ {
+ if (ai_)
+ socket_ops::freeaddrinfo(ai_);
+ }
+
+ operator boost::asio::detail::addrinfo_type*()
+ {
+ return ai_;
+ }
+
+ private:
+ boost::asio::detail::addrinfo_type* ai_;
+ };
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+ // Helper class to run the work scheduler in a thread.
+ class work_scheduler_runner;
+
+ // Start the work scheduler if it's not already running.
+ BOOST_ASIO_DECL void start_work_thread();
+
+ // The scheduler implementation used to post completions.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+private:
+ // Mutex to protect access to internal data.
+ boost::asio::detail::mutex mutex_;
+
+ // Private scheduler used for performing asynchronous host resolution.
+ boost::asio::detail::scoped_ptr<scheduler_impl> work_scheduler_;
+
+ // Thread used for running the work io_context's run loop.
+ boost::asio::detail::scoped_ptr<boost::asio::detail::thread> work_thread_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/resolver_service_base.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_RESOLVER_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/scheduler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/scheduler.hpp
new file mode 100644
index 00000000000..e3861818d44
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/scheduler.hpp
@@ -0,0 +1,226 @@
+//
+// detail/scheduler.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCHEDULER_HPP
+#define BOOST_ASIO_DETAIL_SCHEDULER_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/system/error_code.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/atomic_count.hpp>
+#include <boost/asio/detail/conditionally_enabled_event.hpp>
+#include <boost/asio/detail/conditionally_enabled_mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/reactor_fwd.hpp>
+#include <boost/asio/detail/scheduler_operation.hpp>
+#include <boost/asio/detail/thread.hpp>
+#include <boost/asio/detail/thread_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct scheduler_thread_info;
+
+class scheduler
+ : public execution_context_service_base<scheduler>,
+ public thread_context
+{
+public:
+ typedef scheduler_operation operation;
+
+ // Constructor. Specifies the number of concurrent threads that are likely to
+ // run the scheduler. If set to 1 certain optimisation are performed.
+ BOOST_ASIO_DECL scheduler(boost::asio::execution_context& ctx,
+ int concurrency_hint = 0, bool own_thread = true);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~scheduler();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Initialise the task, if required.
+ BOOST_ASIO_DECL void init_task();
+
+ // Run the event loop until interrupted or no more work.
+ BOOST_ASIO_DECL std::size_t run(boost::system::error_code& ec);
+
+ // Run until interrupted or one operation is performed.
+ BOOST_ASIO_DECL std::size_t run_one(boost::system::error_code& ec);
+
+ // Run until timeout, interrupted, or one operation is performed.
+ BOOST_ASIO_DECL std::size_t wait_one(
+ long usec, boost::system::error_code& ec);
+
+ // Poll for operations without blocking.
+ BOOST_ASIO_DECL std::size_t poll(boost::system::error_code& ec);
+
+ // Poll for one operation without blocking.
+ BOOST_ASIO_DECL std::size_t poll_one(boost::system::error_code& ec);
+
+ // Interrupt the event processing loop.
+ BOOST_ASIO_DECL void stop();
+
+ // Determine whether the scheduler is stopped.
+ BOOST_ASIO_DECL bool stopped() const;
+
+ // Restart in preparation for a subsequent run invocation.
+ BOOST_ASIO_DECL void restart();
+
+ // Notify that some work has started.
+ void work_started()
+ {
+ ++outstanding_work_;
+ }
+
+ // Used to compensate for a forthcoming work_finished call. Must be called
+ // from within a scheduler-owned thread.
+ BOOST_ASIO_DECL void compensating_work_started();
+
+ // Notify that some work has finished.
+ void work_finished()
+ {
+ if (--outstanding_work_ == 0)
+ stop();
+ }
+
+ // Return whether a handler can be dispatched immediately.
+ bool can_dispatch()
+ {
+ return thread_call_stack::contains(this) != 0;
+ }
+
+ // Request invocation of the given operation and return immediately. Assumes
+ // that work_started() has not yet been called for the operation.
+ BOOST_ASIO_DECL void post_immediate_completion(
+ operation* op, bool is_continuation);
+
+ // Request invocation of the given operation and return immediately. Assumes
+ // that work_started() was previously called for the operation.
+ BOOST_ASIO_DECL void post_deferred_completion(operation* op);
+
+ // Request invocation of the given operations and return immediately. Assumes
+ // that work_started() was previously called for each operation.
+ BOOST_ASIO_DECL void post_deferred_completions(op_queue<operation>& ops);
+
+ // Enqueue the given operation following a failed attempt to dispatch the
+ // operation for immediate invocation.
+ BOOST_ASIO_DECL void do_dispatch(operation* op);
+
+ // Process unfinished operations as part of a shutdownoperation. Assumes that
+ // work_started() was previously called for the operations.
+ BOOST_ASIO_DECL void abandon_operations(op_queue<operation>& ops);
+
+ // Get the concurrency hint that was used to initialise the scheduler.
+ int concurrency_hint() const
+ {
+ return concurrency_hint_;
+ }
+
+private:
+ // The mutex type used by this scheduler.
+ typedef conditionally_enabled_mutex mutex;
+
+ // The event type used by this scheduler.
+ typedef conditionally_enabled_event event;
+
+ // Structure containing thread-specific data.
+ typedef scheduler_thread_info thread_info;
+
+ // Run at most one operation. May block.
+ BOOST_ASIO_DECL std::size_t do_run_one(mutex::scoped_lock& lock,
+ thread_info& this_thread, const boost::system::error_code& ec);
+
+ // Run at most one operation with a timeout. May block.
+ BOOST_ASIO_DECL std::size_t do_wait_one(mutex::scoped_lock& lock,
+ thread_info& this_thread, long usec, const boost::system::error_code& ec);
+
+ // Poll for at most one operation.
+ BOOST_ASIO_DECL std::size_t do_poll_one(mutex::scoped_lock& lock,
+ thread_info& this_thread, const boost::system::error_code& ec);
+
+ // Stop the task and all idle threads.
+ BOOST_ASIO_DECL void stop_all_threads(mutex::scoped_lock& lock);
+
+ // Wake a single idle thread, or the task, and always unlock the mutex.
+ BOOST_ASIO_DECL void wake_one_thread_and_unlock(
+ mutex::scoped_lock& lock);
+
+ // Helper class to run the scheduler in its own thread.
+ class thread_function;
+ friend class thread_function;
+
+ // Helper class to perform task-related operations on block exit.
+ struct task_cleanup;
+ friend struct task_cleanup;
+
+ // Helper class to call work-related operations on block exit.
+ struct work_cleanup;
+ friend struct work_cleanup;
+
+ // Whether to optimise for single-threaded use cases.
+ const bool one_thread_;
+
+ // Mutex to protect access to internal data.
+ mutable mutex mutex_;
+
+ // Event to wake up blocked threads.
+ event wakeup_event_;
+
+ // The task to be run by this service.
+ reactor* task_;
+
+ // Operation object to represent the position of the task in the queue.
+ struct task_operation : operation
+ {
+ task_operation() : operation(0) {}
+ } task_operation_;
+
+ // Whether the task has been interrupted.
+ bool task_interrupted_;
+
+ // The count of unfinished work.
+ atomic_count outstanding_work_;
+
+ // The queue of handlers that are ready to be delivered.
+ op_queue<operation> op_queue_;
+
+ // Flag to indicate that the dispatcher has been stopped.
+ bool stopped_;
+
+ // Flag to indicate that the dispatcher has been shut down.
+ bool shutdown_;
+
+ // The concurrency hint used to initialise the scheduler.
+ const int concurrency_hint_;
+
+ // The thread that is running the scheduler.
+ boost::asio::detail::thread* thread_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/scheduler.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/scheduler_operation.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/scheduler_operation.hpp
new file mode 100644
index 00000000000..df6237f48c8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/scheduler_operation.hpp
@@ -0,0 +1,80 @@
+//
+// detail/scheduler_operation.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCHEDULER_OPERATION_HPP
+#define BOOST_ASIO_DETAIL_SCHEDULER_OPERATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/system/error_code.hpp>
+#include <boost/asio/detail/handler_tracking.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class scheduler;
+
+// Base class for all operations. A function pointer is used instead of virtual
+// functions to avoid the associated overhead.
+class scheduler_operation BOOST_ASIO_INHERIT_TRACKED_HANDLER
+{
+public:
+ typedef scheduler_operation operation_type;
+
+ void complete(void* owner, const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ func_(owner, this, ec, bytes_transferred);
+ }
+
+ void destroy()
+ {
+ func_(0, this, boost::system::error_code(), 0);
+ }
+
+protected:
+ typedef void (*func_type)(void*,
+ scheduler_operation*,
+ const boost::system::error_code&, std::size_t);
+
+ scheduler_operation(func_type func)
+ : next_(0),
+ func_(func),
+ task_result_(0)
+ {
+ }
+
+ // Prevents deletion through this type.
+ ~scheduler_operation()
+ {
+ }
+
+private:
+ friend class op_queue_access;
+ scheduler_operation* next_;
+ func_type func_;
+protected:
+ friend class scheduler;
+ unsigned int task_result_; // Passed into bytes transferred.
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SCHEDULER_OPERATION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/scheduler_thread_info.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/scheduler_thread_info.hpp
new file mode 100644
index 00000000000..f9b556ab8ff
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/scheduler_thread_info.hpp
@@ -0,0 +1,42 @@
+//
+// detail/scheduler_thread_info.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCHEDULER_THREAD_INFO_HPP
+#define BOOST_ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/thread_info_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class scheduler;
+class scheduler_operation;
+
+struct scheduler_thread_info : public thread_info_base
+{
+ op_queue<scheduler_operation> private_op_queue;
+ long private_outstanding_work;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/scoped_lock.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/scoped_lock.hpp
new file mode 100644
index 00000000000..74239297edd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/scoped_lock.hpp
@@ -0,0 +1,103 @@
+//
+// detail/scoped_lock.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCOPED_LOCK_HPP
+#define BOOST_ASIO_DETAIL_SCOPED_LOCK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper class to lock and unlock a mutex automatically.
+template <typename Mutex>
+class scoped_lock
+ : private noncopyable
+{
+public:
+ // Tag type used to distinguish constructors.
+ enum adopt_lock_t { adopt_lock };
+
+ // Constructor adopts a lock that is already held.
+ scoped_lock(Mutex& m, adopt_lock_t)
+ : mutex_(m),
+ locked_(true)
+ {
+ }
+
+ // Constructor acquires the lock.
+ explicit scoped_lock(Mutex& m)
+ : mutex_(m)
+ {
+ mutex_.lock();
+ locked_ = true;
+ }
+
+ // Destructor releases the lock.
+ ~scoped_lock()
+ {
+ if (locked_)
+ mutex_.unlock();
+ }
+
+ // Explicitly acquire the lock.
+ void lock()
+ {
+ if (!locked_)
+ {
+ mutex_.lock();
+ locked_ = true;
+ }
+ }
+
+ // Explicitly release the lock.
+ void unlock()
+ {
+ if (locked_)
+ {
+ mutex_.unlock();
+ locked_ = false;
+ }
+ }
+
+ // Test whether the lock is held.
+ bool locked() const
+ {
+ return locked_;
+ }
+
+ // Get the underlying mutex.
+ Mutex& mutex()
+ {
+ return mutex_;
+ }
+
+private:
+ // The underlying mutex.
+ Mutex& mutex_;
+
+ // Whether the mutex is currently locked or unlocked.
+ bool locked_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SCOPED_LOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/scoped_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/scoped_ptr.hpp
new file mode 100644
index 00000000000..707be722f3d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/scoped_ptr.hpp
@@ -0,0 +1,89 @@
+//
+// detail/scoped_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCOPED_PTR_HPP
+#define BOOST_ASIO_DETAIL_SCOPED_PTR_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+class scoped_ptr
+{
+public:
+ // Constructor.
+ explicit scoped_ptr(T* p = 0)
+ : p_(p)
+ {
+ }
+
+ // Destructor.
+ ~scoped_ptr()
+ {
+ delete p_;
+ }
+
+ // Access.
+ T* get()
+ {
+ return p_;
+ }
+
+ // Access.
+ T* operator->()
+ {
+ return p_;
+ }
+
+ // Dereference.
+ T& operator*()
+ {
+ return *p_;
+ }
+
+ // Reset pointer.
+ void reset(T* p = 0)
+ {
+ delete p_;
+ p_ = p;
+ }
+
+ // Release ownership of the pointer.
+ T* release()
+ {
+ T* tmp = p_;
+ p_ = 0;
+ return tmp;
+ }
+
+private:
+ // Disallow copying and assignment.
+ scoped_ptr(const scoped_ptr&);
+ scoped_ptr& operator=(const scoped_ptr&);
+
+ T* p_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SCOPED_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/select_interrupter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/select_interrupter.hpp
new file mode 100644
index 00000000000..0c2dd91216b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/select_interrupter.hpp
@@ -0,0 +1,48 @@
+//
+// detail/select_interrupter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SELECT_INTERRUPTER_HPP
+#define BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_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_WINDOWS_RUNTIME)
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
+# include <boost/asio/detail/socket_select_interrupter.hpp>
+#elif defined(BOOST_ASIO_HAS_EVENTFD)
+# include <boost/asio/detail/eventfd_select_interrupter.hpp>
+#else
+# include <boost/asio/detail/pipe_select_interrupter.hpp>
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
+typedef socket_select_interrupter select_interrupter;
+#elif defined(BOOST_ASIO_HAS_EVENTFD)
+typedef eventfd_select_interrupter select_interrupter;
+#else
+typedef pipe_select_interrupter select_interrupter;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/select_reactor.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/select_reactor.hpp
new file mode 100644
index 00000000000..435ce0463fb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/select_reactor.hpp
@@ -0,0 +1,240 @@
+//
+// detail/select_reactor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SELECT_REACTOR_HPP
+#define BOOST_ASIO_DETAIL_SELECT_REACTOR_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_IOCP) \
+ || (!defined(BOOST_ASIO_HAS_DEV_POLL) \
+ && !defined(BOOST_ASIO_HAS_EPOLL) \
+ && !defined(BOOST_ASIO_HAS_KQUEUE) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
+
+#include <cstddef>
+#include <boost/asio/detail/fd_set_adapter.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/reactor_op_queue.hpp>
+#include <boost/asio/detail/select_interrupter.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/timer_queue_set.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/thread.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class select_reactor
+ : public execution_context_service_base<select_reactor>
+{
+public:
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ enum op_types { read_op = 0, write_op = 1, except_op = 2,
+ max_select_ops = 3, connect_op = 3, max_ops = 4 };
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ enum op_types { read_op = 0, write_op = 1, except_op = 2,
+ max_select_ops = 3, connect_op = 1, max_ops = 3 };
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+ // Per-descriptor data.
+ struct per_descriptor_data
+ {
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL select_reactor(boost::asio::execution_context& ctx);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~select_reactor();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Recreate internal descriptors following a fork.
+ BOOST_ASIO_DECL void notify_fork(
+ boost::asio::execution_context::fork_event fork_ev);
+
+ // Initialise the task, but only if the reactor is not in its own thread.
+ BOOST_ASIO_DECL void init_task();
+
+ // Register a socket with the reactor. Returns 0 on success, system error
+ // code on failure.
+ BOOST_ASIO_DECL int register_descriptor(socket_type, per_descriptor_data&);
+
+ // Register a descriptor with an associated single operation. Returns 0 on
+ // success, system error code on failure.
+ BOOST_ASIO_DECL int register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op);
+
+ // Post a reactor operation for immediate completion.
+ void post_immediate_completion(reactor_op* op, bool is_continuation)
+ {
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data&, reactor_op* op, bool is_continuation, bool);
+
+ // Cancel all operations associated with the given descriptor. The
+ // handlers associated with the descriptor will be invoked with the
+ // operation_aborted error.
+ BOOST_ASIO_DECL void cancel_ops(socket_type descriptor, per_descriptor_data&);
+
+ // Cancel any operations that are running against the descriptor and remove
+ // its registration from the reactor. The reactor resources associated with
+ // the descriptor must be released by calling cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_descriptor(socket_type descriptor,
+ per_descriptor_data&, bool closing);
+
+ // Remove the descriptor's registration from the reactor. The reactor
+ // resources associated with the descriptor must be released by calling
+ // cleanup_descriptor_data.
+ BOOST_ASIO_DECL void deregister_internal_descriptor(
+ socket_type descriptor, per_descriptor_data&);
+
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ BOOST_ASIO_DECL void cleanup_descriptor_data(per_descriptor_data&);
+
+ // Move descriptor registration from one descriptor_data object to another.
+ BOOST_ASIO_DECL void move_descriptor(socket_type descriptor,
+ per_descriptor_data& target_descriptor_data,
+ per_descriptor_data& source_descriptor_data);
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source);
+
+ // Run select once until interrupted or events are ready to be dispatched.
+ BOOST_ASIO_DECL void run(long usec, op_queue<operation>& ops);
+
+ // Interrupt the select loop.
+ BOOST_ASIO_DECL void interrupt();
+
+private:
+#if defined(BOOST_ASIO_HAS_IOCP)
+ // Run the select loop in the thread.
+ BOOST_ASIO_DECL void run_thread();
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+ // Helper function to add a new timer queue.
+ BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Get the timeout value for the select call.
+ BOOST_ASIO_DECL timeval* get_timeout(long usec, timeval& tv);
+
+ // Cancel all operations associated with the given descriptor. This function
+ // does not acquire the select_reactor's mutex.
+ BOOST_ASIO_DECL void cancel_ops_unlocked(socket_type descriptor,
+ const boost::system::error_code& ec);
+
+ // The scheduler implementation used to post completions.
+# if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_type;
+# else // defined(BOOST_ASIO_HAS_IOCP)
+ typedef class scheduler scheduler_type;
+# endif // defined(BOOST_ASIO_HAS_IOCP)
+ scheduler_type& scheduler_;
+
+ // Mutex to protect access to internal data.
+ boost::asio::detail::mutex mutex_;
+
+ // The interrupter is used to break a blocking select call.
+ select_interrupter interrupter_;
+
+ // The queues of read, write and except operations.
+ reactor_op_queue<socket_type> op_queue_[max_ops];
+
+ // The file descriptor sets to be passed to the select system call.
+ fd_set_adapter fd_sets_[max_select_ops];
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+ // Helper class to run the reactor loop in a thread.
+ class thread_function;
+ friend class thread_function;
+
+ // Does the reactor loop thread need to stop.
+ bool stop_thread_;
+
+ // The thread that is running the reactor loop.
+ boost::asio::detail::thread* thread_;
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/select_reactor.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/select_reactor.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+ // || (!defined(BOOST_ASIO_HAS_DEV_POLL)
+ // && !defined(BOOST_ASIO_HAS_EPOLL)
+ // && !defined(BOOST_ASIO_HAS_KQUEUE)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
+
+#endif // BOOST_ASIO_DETAIL_SELECT_REACTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/service_registry.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/service_registry.hpp
new file mode 100644
index 00000000000..35140efef10
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/service_registry.hpp
@@ -0,0 +1,166 @@
+//
+// detail/service_registry.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SERVICE_REGISTRY_HPP
+#define BOOST_ASIO_DETAIL_SERVICE_REGISTRY_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/mutex.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class io_context;
+
+namespace detail {
+
+template <typename T>
+class typeid_wrapper {};
+
+class service_registry
+ : private noncopyable
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL service_registry(execution_context& owner);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~service_registry();
+
+ // Shutdown all services.
+ BOOST_ASIO_DECL void shutdown_services();
+
+ // Destroy all services.
+ BOOST_ASIO_DECL void destroy_services();
+
+ // Notify all services of a fork event.
+ BOOST_ASIO_DECL void notify_fork(execution_context::fork_event fork_ev);
+
+ // Get the service object corresponding to the specified service type. Will
+ // create a new service object automatically if no such object already
+ // exists. Ownership of the service object is not transferred to the caller.
+ template <typename Service>
+ Service& use_service();
+
+ // Get the service object corresponding to the specified service type. Will
+ // create a new service object automatically if no such object already
+ // exists. Ownership of the service object is not transferred to the caller.
+ // This overload is used for backwards compatibility with services that
+ // inherit from io_context::service.
+ template <typename Service>
+ Service& use_service(io_context& owner);
+
+ // Add a service object. Throws on error, in which case ownership of the
+ // object is retained by the caller.
+ template <typename Service>
+ void add_service(Service* new_service);
+
+ // Check whether a service object of the specified type already exists.
+ template <typename Service>
+ bool has_service() const;
+
+private:
+ // Initalise a service's key when the key_type typedef is not available.
+ template <typename Service>
+ static void init_key(execution_context::service::key& key, ...);
+
+#if !defined(BOOST_ASIO_NO_TYPEID)
+ // Initalise a service's key when the key_type typedef is available.
+ template <typename Service>
+ static void init_key(execution_context::service::key& key,
+ typename enable_if<
+ is_base_of<typename Service::key_type, Service>::value>::type*);
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+
+ // Initialise a service's key based on its id.
+ BOOST_ASIO_DECL static void init_key_from_id(
+ execution_context::service::key& key,
+ const execution_context::id& id);
+
+#if !defined(BOOST_ASIO_NO_TYPEID)
+ // Initialise a service's key based on its id.
+ template <typename Service>
+ static void init_key_from_id(execution_context::service::key& key,
+ const service_id<Service>& /*id*/);
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+
+ // Check if a service matches the given id.
+ BOOST_ASIO_DECL static bool keys_match(
+ const execution_context::service::key& key1,
+ const execution_context::service::key& key2);
+
+ // The type of a factory function used for creating a service instance.
+ typedef execution_context::service*(*factory_type)(void*);
+
+ // Factory function for creating a service instance.
+ template <typename Service, typename Owner>
+ static execution_context::service* create(void* owner);
+
+ // Destroy a service instance.
+ BOOST_ASIO_DECL static void destroy(execution_context::service* service);
+
+ // Helper class to manage service pointers.
+ struct auto_service_ptr;
+ friend struct auto_service_ptr;
+ struct auto_service_ptr
+ {
+ execution_context::service* ptr_;
+ ~auto_service_ptr() { destroy(ptr_); }
+ };
+
+ // Get the service object corresponding to the specified service key. Will
+ // create a new service object automatically if no such object already
+ // exists. Ownership of the service object is not transferred to the caller.
+ BOOST_ASIO_DECL execution_context::service* do_use_service(
+ const execution_context::service::key& key,
+ factory_type factory, void* owner);
+
+ // Add a service object. Throws on error, in which case ownership of the
+ // object is retained by the caller.
+ BOOST_ASIO_DECL void do_add_service(
+ const execution_context::service::key& key,
+ execution_context::service* new_service);
+
+ // Check whether a service object with the specified key already exists.
+ BOOST_ASIO_DECL bool do_has_service(
+ const execution_context::service::key& key) const;
+
+ // Mutex to protect access to internal data.
+ mutable boost::asio::detail::mutex mutex_;
+
+ // The owner of this service registry and the services it contains.
+ execution_context& owner_;
+
+ // The first service in the list of contained services.
+ execution_context::service* first_service_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/service_registry.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/service_registry.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_SERVICE_REGISTRY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/signal_blocker.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/signal_blocker.hpp
new file mode 100644
index 00000000000..9f5b6f5225d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/signal_blocker.hpp
@@ -0,0 +1,46 @@
+//
+// detail/signal_blocker.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SIGNAL_BLOCKER_HPP
+#define BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_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_THREADS) || defined(BOOST_ASIO_WINDOWS) \
+ || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ || defined(__CYGWIN__) || defined(__SYMBIAN32__)
+# include <boost/asio/detail/null_signal_blocker.hpp>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_signal_blocker.hpp>
+#else
+# error Only Windows and POSIX are supported!
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
+ || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ || defined(__CYGWIN__) || defined(__SYMBIAN32__)
+typedef null_signal_blocker signal_blocker;
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+typedef posix_signal_blocker signal_blocker;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/signal_handler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/signal_handler.hpp
new file mode 100644
index 00000000000..3796c3b63a7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/signal_handler.hpp
@@ -0,0 +1,90 @@
+//
+// detail/signal_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SIGNAL_HANDLER_HPP
+#define BOOST_ASIO_DETAIL_SIGNAL_HANDLER_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/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/handler_work.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/signal_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class signal_handler : public signal_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(signal_handler);
+
+ signal_handler(Handler& h, const IoExecutor& io_ex)
+ : signal_op(&signal_handler::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(h)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ signal_handler* h(static_cast<signal_handler*>(base));
+ ptr p = { boost::asio::detail::addressof(h->handler_), h, h };
+ handler_work<Handler, IoExecutor> w(h->handler_, h->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*h));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, int>
+ handler(h->handler_, h->ec_, h->signal_number_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SIGNAL_HANDLER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/signal_init.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/signal_init.hpp
new file mode 100644
index 00000000000..9fb87e59870
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/signal_init.hpp
@@ -0,0 +1,49 @@
+//
+// detail/signal_init.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SIGNAL_INIT_HPP
+#define BOOST_ASIO_DETAIL_SIGNAL_INIT_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_WINDOWS) && !defined(__CYGWIN__)
+
+#include <csignal>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <int Signal = SIGPIPE>
+class signal_init
+{
+public:
+ // Constructor.
+ signal_init()
+ {
+ std::signal(Signal, SIG_IGN);
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_SIGNAL_INIT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/signal_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/signal_op.hpp
new file mode 100644
index 00000000000..d7719f4cfd2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/signal_op.hpp
@@ -0,0 +1,51 @@
+//
+// detail/signal_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SIGNAL_OP_HPP
+#define BOOST_ASIO_DETAIL_SIGNAL_OP_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/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class signal_op
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ boost::system::error_code ec_;
+
+ // The signal number to be passed to the completion handler.
+ int signal_number_;
+
+protected:
+ signal_op(func_type func)
+ : operation(func),
+ signal_number_(0)
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SIGNAL_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/signal_set_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/signal_set_service.hpp
new file mode 100644
index 00000000000..baaf856349d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/signal_set_service.hpp
@@ -0,0 +1,231 @@
+//
+// detail/signal_set_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SIGNAL_SET_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_SIGNAL_SET_SERVICE_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 <signal.h>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/signal_handler.hpp>
+#include <boost/asio/detail/signal_op.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+# include <boost/asio/detail/reactor.hpp>
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(NSIG) && (NSIG > 0)
+enum { max_signal_number = NSIG };
+#else
+enum { max_signal_number = 128 };
+#endif
+
+extern BOOST_ASIO_DECL struct signal_state* get_signal_state();
+
+extern "C" BOOST_ASIO_DECL void boost_asio_signal_handler(int signal_number);
+
+class signal_set_service :
+ public execution_context_service_base<signal_set_service>
+{
+public:
+ // Type used for tracking an individual signal registration.
+ class registration
+ {
+ public:
+ // Default constructor.
+ registration()
+ : signal_number_(0),
+ queue_(0),
+ undelivered_(0),
+ next_in_table_(0),
+ prev_in_table_(0),
+ next_in_set_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class signal_set_service;
+
+ // The signal number that is registered.
+ int signal_number_;
+
+ // The waiting signal handlers.
+ op_queue<signal_op>* queue_;
+
+ // The number of undelivered signals.
+ std::size_t undelivered_;
+
+ // Pointers to adjacent registrations in the registrations_ table.
+ registration* next_in_table_;
+ registration* prev_in_table_;
+
+ // Link to next registration in the signal set.
+ registration* next_in_set_;
+ };
+
+ // The implementation type of the signal_set.
+ class implementation_type
+ {
+ public:
+ // Default constructor.
+ implementation_type()
+ : signals_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class signal_set_service;
+
+ // The pending signal handlers.
+ op_queue<signal_op> queue_;
+
+ // Linked list of registered signals.
+ registration* signals_;
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL signal_set_service(execution_context& context);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~signal_set_service();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Perform fork-related housekeeping.
+ BOOST_ASIO_DECL void notify_fork(
+ boost::asio::execution_context::fork_event fork_ev);
+
+ // Construct a new signal_set implementation.
+ BOOST_ASIO_DECL void construct(implementation_type& impl);
+
+ // Destroy a signal_set implementation.
+ BOOST_ASIO_DECL void destroy(implementation_type& impl);
+
+ // Add a signal to a signal_set.
+ BOOST_ASIO_DECL boost::system::error_code add(implementation_type& impl,
+ int signal_number, boost::system::error_code& ec);
+
+ // Remove a signal to a signal_set.
+ BOOST_ASIO_DECL boost::system::error_code remove(implementation_type& impl,
+ int signal_number, boost::system::error_code& ec);
+
+ // Remove all signals from a signal_set.
+ BOOST_ASIO_DECL boost::system::error_code clear(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Cancel all operations associated with the signal set.
+ BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Start an asynchronous operation to wait for a signal to be delivered.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef signal_handler<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "signal_set", &impl, 0, "async_wait"));
+
+ start_wait_op(impl, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Deliver notification that a particular signal occurred.
+ BOOST_ASIO_DECL static void deliver_signal(int signal_number);
+
+private:
+ // Helper function to add a service to the global signal state.
+ BOOST_ASIO_DECL static void add_service(signal_set_service* service);
+
+ // Helper function to remove a service from the global signal state.
+ BOOST_ASIO_DECL static void remove_service(signal_set_service* service);
+
+ // Helper function to create the pipe descriptors.
+ BOOST_ASIO_DECL static void open_descriptors();
+
+ // Helper function to close the pipe descriptors.
+ BOOST_ASIO_DECL static void close_descriptors();
+
+ // Helper function to start a wait operation.
+ BOOST_ASIO_DECL void start_wait_op(implementation_type& impl, signal_op* op);
+
+ // The scheduler used for dispatching handlers.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+#if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+ // The type used for registering for pipe reactor notifications.
+ class pipe_read_op;
+
+ // The reactor used for waiting for pipe readiness.
+ reactor& reactor_;
+
+ // The per-descriptor reactor data used for the pipe.
+ reactor::per_descriptor_data reactor_data_;
+#endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+
+ // A mapping from signal number to the registered signal sets.
+ registration* registrations_[max_signal_number];
+
+ // Pointers to adjacent services in linked list.
+ signal_set_service* next_;
+ signal_set_service* prev_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/signal_set_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_SIGNAL_SET_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/socket_holder.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/socket_holder.hpp
new file mode 100644
index 00000000000..c96e98297c5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/socket_holder.hpp
@@ -0,0 +1,100 @@
+//
+// detail/socket_holder.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HOLDER_HPP
+#define BOOST_ASIO_DETAIL_SOCKET_HOLDER_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/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Implement the resource acquisition is initialisation idiom for sockets.
+class socket_holder
+ : private noncopyable
+{
+public:
+ // Construct as an uninitialised socket.
+ socket_holder()
+ : socket_(invalid_socket)
+ {
+ }
+
+ // Construct to take ownership of the specified socket.
+ explicit socket_holder(socket_type s)
+ : socket_(s)
+ {
+ }
+
+ // Destructor.
+ ~socket_holder()
+ {
+ if (socket_ != invalid_socket)
+ {
+ boost::system::error_code ec;
+ socket_ops::state_type state = 0;
+ socket_ops::close(socket_, state, true, ec);
+ }
+ }
+
+ // Get the underlying socket.
+ socket_type get() const
+ {
+ return socket_;
+ }
+
+ // Reset to an uninitialised socket.
+ void reset()
+ {
+ if (socket_ != invalid_socket)
+ {
+ boost::system::error_code ec;
+ socket_ops::state_type state = 0;
+ socket_ops::close(socket_, state, true, ec);
+ socket_ = invalid_socket;
+ }
+ }
+
+ // Reset to take ownership of the specified socket.
+ void reset(socket_type s)
+ {
+ reset();
+ socket_ = s;
+ }
+
+ // Release ownership of the socket.
+ socket_type release()
+ {
+ socket_type tmp = socket_;
+ socket_ = invalid_socket;
+ return tmp;
+ }
+
+private:
+ // The underlying socket.
+ socket_type socket_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SOCKET_HOLDER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/socket_ops.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/socket_ops.hpp
new file mode 100644
index 00000000000..506a06d7760
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/socket_ops.hpp
@@ -0,0 +1,339 @@
+//
+// detail/socket_ops.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HPP
+#define BOOST_ASIO_DETAIL_SOCKET_OPS_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/system/error_code.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace socket_ops {
+
+// Socket state bits.
+enum
+{
+ // The user wants a non-blocking socket.
+ user_set_non_blocking = 1,
+
+ // The socket has been set non-blocking.
+ internal_non_blocking = 2,
+
+ // Helper "state" used to determine whether the socket is non-blocking.
+ non_blocking = user_set_non_blocking | internal_non_blocking,
+
+ // User wants connection_aborted errors, which are disabled by default.
+ enable_connection_aborted = 4,
+
+ // The user set the linger option. Needs to be checked when closing.
+ user_set_linger = 8,
+
+ // The socket is stream-oriented.
+ stream_oriented = 16,
+
+ // The socket is datagram-oriented.
+ datagram_oriented = 32,
+
+ // The socket may have been dup()-ed.
+ possible_dup = 64
+};
+
+typedef unsigned char state_type;
+
+struct noop_deleter { void operator()(void*) {} };
+typedef shared_ptr<void> shared_cancel_token_type;
+typedef weak_ptr<void> weak_cancel_token_type;
+
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+BOOST_ASIO_DECL socket_type accept(socket_type s, socket_addr_type* addr,
+ std::size_t* addrlen, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL socket_type sync_accept(socket_type s,
+ state_type state, socket_addr_type* addr,
+ std::size_t* addrlen, boost::system::error_code& ec);
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL int bind(socket_type s, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int close(socket_type s, state_type& state,
+ bool destruction, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool set_user_non_blocking(socket_type s,
+ state_type& state, bool value, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool set_internal_non_blocking(socket_type s,
+ state_type& state, bool value, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int shutdown(socket_type s,
+ int what, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int connect(socket_type s, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL void sync_connect(socket_type s, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec);
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL void complete_iocp_connect(socket_type s,
+ boost::system::error_code& ec);
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL bool non_blocking_connect(socket_type s,
+ boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int socketpair(int af, int type, int protocol,
+ socket_type sv[2], boost::system::error_code& ec);
+
+BOOST_ASIO_DECL bool sockatmark(socket_type s, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL size_t available(socket_type s, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int listen(socket_type s,
+ int backlog, boost::system::error_code& ec);
+
+#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__)
+
+BOOST_ASIO_DECL void init_buf(buf& b, void* data, size_t size);
+
+BOOST_ASIO_DECL void init_buf(buf& b, const void* data, size_t size);
+
+BOOST_ASIO_DECL signed_size_type recv(socket_type s, buf* bufs,
+ size_t count, int flags, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL void complete_iocp_recvfrom(
+ const weak_cancel_token_type& cancel_token,
+ boost::system::error_code& ec);
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL signed_size_type recvmsg(socket_type s, buf* bufs,
+ size_t count, int in_flags, int& out_flags,
+ boost::system::error_code& ec);
+
+BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL void complete_iocp_recvmsg(
+ const weak_cancel_token_type& cancel_token,
+ boost::system::error_code& ec);
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL signed_size_type send(socket_type s, const buf* bufs,
+ size_t count, int flags, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL 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 defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL void complete_iocp_send(
+ const weak_cancel_token_type& cancel_token,
+ boost::system::error_code& ec);
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL bool non_blocking_send(socket_type s,
+ const buf* bufs, size_t count, int flags,
+ boost::system::error_code& ec, size_t& bytes_transferred);
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+BOOST_ASIO_DECL 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 !defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL 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);
+
+#endif // !defined(BOOST_ASIO_HAS_IOCP)
+
+BOOST_ASIO_DECL socket_type socket(int af, int type, int protocol,
+ boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int setsockopt(socket_type s, state_type& state,
+ int level, int optname, const void* optval,
+ std::size_t optlen, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int getsockopt(socket_type s, state_type state,
+ int level, int optname, void* optval,
+ size_t* optlen, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int getpeername(socket_type s, socket_addr_type* addr,
+ std::size_t* addrlen, bool cached, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int getsockname(socket_type s, socket_addr_type* addr,
+ std::size_t* addrlen, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int ioctl(socket_type s, state_type& state,
+ int cmd, ioctl_arg_type* arg, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int select(int nfds, fd_set* readfds, fd_set* writefds,
+ fd_set* exceptfds, timeval* timeout, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_read(socket_type s,
+ state_type state, int msec, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_write(socket_type s,
+ state_type state, int msec, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_error(socket_type s,
+ state_type state, int msec, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int poll_connect(socket_type s,
+ int msec, boost::system::error_code& ec);
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+BOOST_ASIO_DECL const char* inet_ntop(int af, const void* src, char* dest,
+ size_t length, unsigned long scope_id, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int inet_pton(int af, const char* src, void* dest,
+ unsigned long* scope_id, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL int gethostname(char* name,
+ int namelen, boost::system::error_code& ec);
+
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+BOOST_ASIO_DECL boost::system::error_code getaddrinfo(const char* host,
+ const char* service, const addrinfo_type& hints,
+ addrinfo_type** result, boost::system::error_code& ec);
+
+BOOST_ASIO_DECL 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);
+
+BOOST_ASIO_DECL void freeaddrinfo(addrinfo_type* ai);
+
+BOOST_ASIO_DECL 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);
+
+BOOST_ASIO_DECL 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);
+
+BOOST_ASIO_DECL 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);
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+BOOST_ASIO_DECL u_long_type network_to_host_long(u_long_type value);
+
+BOOST_ASIO_DECL u_long_type host_to_network_long(u_long_type value);
+
+BOOST_ASIO_DECL u_short_type network_to_host_short(u_short_type value);
+
+BOOST_ASIO_DECL u_short_type host_to_network_short(u_short_type value);
+
+} // namespace socket_ops
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/socket_ops.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_SOCKET_OPS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/socket_option.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/socket_option.hpp
new file mode 100644
index 00000000000..8a77b1229b7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/socket_option.hpp
@@ -0,0 +1,318 @@
+//
+// detail/socket_option.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_OPTION_HPP
+#define BOOST_ASIO_DETAIL_SOCKET_OPTION_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 <stdexcept>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace socket_option {
+
+// Helper template for implementing boolean-based options.
+template <int Level, int Name>
+class boolean
+{
+public:
+ // Default constructor.
+ boolean()
+ : value_(0)
+ {
+ }
+
+ // Construct with a specific option value.
+ explicit boolean(bool v)
+ : value_(v ? 1 : 0)
+ {
+ }
+
+ // Set the current value of the boolean.
+ boolean& operator=(bool v)
+ {
+ value_ = v ? 1 : 0;
+ return *this;
+ }
+
+ // Get the current value of the boolean.
+ bool value() const
+ {
+ return !!value_;
+ }
+
+ // Convert to bool.
+ operator bool() const
+ {
+ return !!value_;
+ }
+
+ // Test for false.
+ bool operator!() const
+ {
+ return !value_;
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol&) const
+ {
+ return Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol&) const
+ {
+ return Name;
+ }
+
+ // Get the address of the boolean data.
+ template <typename Protocol>
+ int* data(const Protocol&)
+ {
+ return &value_;
+ }
+
+ // Get the address of the boolean data.
+ template <typename Protocol>
+ const int* data(const Protocol&) const
+ {
+ return &value_;
+ }
+
+ // Get the size of the boolean data.
+ template <typename Protocol>
+ std::size_t size(const Protocol&) const
+ {
+ return sizeof(value_);
+ }
+
+ // Set the size of the boolean data.
+ template <typename Protocol>
+ void resize(const Protocol&, std::size_t s)
+ {
+ // On some platforms (e.g. Windows Vista), the getsockopt function will
+ // return the size of a boolean socket option as one byte, even though a
+ // four byte integer was passed in.
+ switch (s)
+ {
+ case sizeof(char):
+ value_ = *reinterpret_cast<char*>(&value_) ? 1 : 0;
+ break;
+ case sizeof(value_):
+ break;
+ default:
+ {
+ std::length_error ex("boolean socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+ }
+
+private:
+ int value_;
+};
+
+// Helper template for implementing integer options.
+template <int Level, int Name>
+class integer
+{
+public:
+ // Default constructor.
+ integer()
+ : value_(0)
+ {
+ }
+
+ // Construct with a specific option value.
+ explicit integer(int v)
+ : value_(v)
+ {
+ }
+
+ // Set the value of the int option.
+ integer& operator=(int v)
+ {
+ value_ = v;
+ return *this;
+ }
+
+ // Get the current value of the int option.
+ int value() const
+ {
+ return value_;
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol&) const
+ {
+ return Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol&) const
+ {
+ return Name;
+ }
+
+ // Get the address of the int data.
+ template <typename Protocol>
+ int* data(const Protocol&)
+ {
+ return &value_;
+ }
+
+ // Get the address of the int data.
+ template <typename Protocol>
+ const int* data(const Protocol&) const
+ {
+ return &value_;
+ }
+
+ // Get the size of the int data.
+ template <typename Protocol>
+ std::size_t size(const Protocol&) const
+ {
+ return sizeof(value_);
+ }
+
+ // Set the size of the int data.
+ template <typename Protocol>
+ void resize(const Protocol&, std::size_t s)
+ {
+ if (s != sizeof(value_))
+ {
+ std::length_error ex("integer socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+private:
+ int value_;
+};
+
+// Helper template for implementing linger options.
+template <int Level, int Name>
+class linger
+{
+public:
+ // Default constructor.
+ linger()
+ {
+ value_.l_onoff = 0;
+ value_.l_linger = 0;
+ }
+
+ // Construct with specific option values.
+ linger(bool e, int t)
+ {
+ enabled(e);
+ timeout BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION(t);
+ }
+
+ // Set the value for whether linger is enabled.
+ void enabled(bool value)
+ {
+ value_.l_onoff = value ? 1 : 0;
+ }
+
+ // Get the value for whether linger is enabled.
+ bool enabled() const
+ {
+ return value_.l_onoff != 0;
+ }
+
+ // Set the value for the linger timeout.
+ void timeout BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION(int value)
+ {
+#if defined(WIN32)
+ value_.l_linger = static_cast<u_short>(value);
+#else
+ value_.l_linger = value;
+#endif
+ }
+
+ // Get the value for the linger timeout.
+ int timeout BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION() const
+ {
+ return static_cast<int>(value_.l_linger);
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol&) const
+ {
+ return Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol&) const
+ {
+ return Name;
+ }
+
+ // Get the address of the linger data.
+ template <typename Protocol>
+ detail::linger_type* data(const Protocol&)
+ {
+ return &value_;
+ }
+
+ // Get the address of the linger data.
+ template <typename Protocol>
+ const detail::linger_type* data(const Protocol&) const
+ {
+ return &value_;
+ }
+
+ // Get the size of the linger data.
+ template <typename Protocol>
+ std::size_t size(const Protocol&) const
+ {
+ return sizeof(value_);
+ }
+
+ // Set the size of the int data.
+ template <typename Protocol>
+ void resize(const Protocol&, std::size_t s)
+ {
+ if (s != sizeof(value_))
+ {
+ std::length_error ex("linger socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+private:
+ detail::linger_type value_;
+};
+
+} // namespace socket_option
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SOCKET_OPTION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/socket_select_interrupter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/socket_select_interrupter.hpp
new file mode 100644
index 00000000000..fc812701d7c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/socket_select_interrupter.hpp
@@ -0,0 +1,93 @@
+//
+// detail/socket_select_interrupter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SELECT_INTERRUPTER_HPP
+#define BOOST_ASIO_DETAIL_SOCKET_SELECT_INTERRUPTER_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_WINDOWS_RUNTIME)
+
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class socket_select_interrupter
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL socket_select_interrupter();
+
+ // Destructor.
+ BOOST_ASIO_DECL ~socket_select_interrupter();
+
+ // Recreate the interrupter's descriptors. Used after a fork.
+ BOOST_ASIO_DECL void recreate();
+
+ // Interrupt the select call.
+ BOOST_ASIO_DECL void interrupt();
+
+ // Reset the select interrupt. Returns true if the call was interrupted.
+ BOOST_ASIO_DECL bool reset();
+
+ // Get the read descriptor to be passed to select.
+ socket_type read_descriptor() const
+ {
+ return read_descriptor_;
+ }
+
+private:
+ // Open the descriptors. Throws on error.
+ BOOST_ASIO_DECL void open_descriptors();
+
+ // Close the descriptors.
+ BOOST_ASIO_DECL void close_descriptors();
+
+ // The read end of a connection used to interrupt the select call. This file
+ // descriptor is passed to select such that when it is time to stop, a single
+ // byte will be written on the other end of the connection and this
+ // descriptor will become readable.
+ socket_type read_descriptor_;
+
+ // The write end of a connection used to interrupt the select call. A single
+ // byte may be written to this to wake up the select which is waiting for the
+ // other end to become readable.
+ socket_type write_descriptor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/socket_select_interrupter.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_SOCKET_SELECT_INTERRUPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/socket_types.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/socket_types.hpp
new file mode 100644
index 00000000000..867caa58453
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/socket_types.hpp
@@ -0,0 +1,418 @@
+//
+// detail/socket_types.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TYPES_HPP
+#define BOOST_ASIO_DETAIL_SOCKET_TYPES_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_WINDOWS_RUNTIME)
+// Empty.
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
+# error WinSock.h has already been included
+# endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
+# if defined(__BORLANDC__)
+# include <stdlib.h> // Needed for __errno
+# if !defined(_WSPIAPI_H_)
+# define _WSPIAPI_H_
+# define BOOST_ASIO_WSPIAPI_H_DEFINED
+# endif // !defined(_WSPIAPI_H_)
+# endif // defined(__BORLANDC__)
+# include <winsock2.h>
+# include <ws2tcpip.h>
+# if defined(WINAPI_FAMILY)
+# if ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
+# include <windows.h>
+# endif // ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
+# endif // defined(WINAPI_FAMILY)
+# if !defined(BOOST_ASIO_WINDOWS_APP)
+# include <mswsock.h>
+# endif // !defined(BOOST_ASIO_WINDOWS_APP)
+# if defined(BOOST_ASIO_WSPIAPI_H_DEFINED)
+# undef _WSPIAPI_H_
+# undef BOOST_ASIO_WSPIAPI_H_DEFINED
+# endif // defined(BOOST_ASIO_WSPIAPI_H_DEFINED)
+# if !defined(BOOST_ASIO_NO_DEFAULT_LINKED_LIBS)
+# if defined(UNDER_CE)
+# pragma comment(lib, "ws2.lib")
+# elif defined(_MSC_VER) || defined(__BORLANDC__)
+# pragma comment(lib, "ws2_32.lib")
+# if !defined(BOOST_ASIO_WINDOWS_APP)
+# pragma comment(lib, "mswsock.lib")
+# endif // !defined(BOOST_ASIO_WINDOWS_APP)
+# endif // defined(_MSC_VER) || defined(__BORLANDC__)
+# endif // !defined(BOOST_ASIO_NO_DEFAULT_LINKED_LIBS)
+# include <boost/asio/detail/old_win_sdk_compat.hpp>
+#else
+# include <sys/ioctl.h>
+# if (defined(__MACH__) && defined(__APPLE__)) \
+ || defined(__FreeBSD__) || defined(__NetBSD__) \
+ || defined(__OpenBSD__) || defined(__linux__) \
+ || defined(__EMSCRIPTEN__)
+# include <poll.h>
+# elif !defined(__SYMBIAN32__)
+# include <sys/poll.h>
+# endif
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# if defined(__hpux)
+# include <sys/time.h>
+# endif
+# if !defined(__hpux) || defined(__SELECT)
+# include <sys/select.h>
+# endif
+# include <sys/socket.h>
+# include <sys/uio.h>
+# include <sys/un.h>
+# include <netinet/in.h>
+# if !defined(__SYMBIAN32__)
+# include <netinet/tcp.h>
+# endif
+# include <arpa/inet.h>
+# include <netdb.h>
+# include <net/if.h>
+# include <limits.h>
+# if defined(__sun)
+# include <sys/filio.h>
+# include <sys/sockio.h>
+# endif
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+const int max_addr_v4_str_len = 256;
+const int max_addr_v6_str_len = 256;
+typedef unsigned __int32 u_long_type;
+typedef unsigned __int16 u_short_type;
+struct in4_addr_type { u_long_type s_addr; };
+struct in4_mreq_type { in4_addr_type imr_multiaddr, imr_interface; };
+struct in6_addr_type { unsigned char s6_addr[16]; };
+struct in6_mreq_type { in6_addr_type ipv6mr_multiaddr;
+ unsigned long ipv6mr_interface; };
+struct socket_addr_type { int sa_family; };
+struct sockaddr_in4_type { int sin_family;
+ in4_addr_type sin_addr; u_short_type sin_port; };
+struct sockaddr_in6_type { int sin6_family;
+ in6_addr_type sin6_addr; u_short_type sin6_port;
+ u_long_type sin6_flowinfo; u_long_type sin6_scope_id; };
+struct sockaddr_storage_type { int ss_family;
+ unsigned char ss_bytes[128 - sizeof(int)]; };
+struct addrinfo_type { int ai_flags;
+ int ai_family, ai_socktype, ai_protocol;
+ int ai_addrlen; const void* ai_addr;
+ const char* ai_canonname; addrinfo_type* ai_next; };
+struct linger_type { u_short_type l_onoff, l_linger; };
+typedef u_long_type ioctl_arg_type;
+typedef int signed_size_type;
+# define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c
+# define BOOST_ASIO_OS_DEF_AF_UNSPEC 0
+# define BOOST_ASIO_OS_DEF_AF_INET 2
+# define BOOST_ASIO_OS_DEF_AF_INET6 23
+# define BOOST_ASIO_OS_DEF_SOCK_STREAM 1
+# define BOOST_ASIO_OS_DEF_SOCK_DGRAM 2
+# define BOOST_ASIO_OS_DEF_SOCK_RAW 3
+# define BOOST_ASIO_OS_DEF_SOCK_SEQPACKET 5
+# define BOOST_ASIO_OS_DEF_IPPROTO_IP 0
+# define BOOST_ASIO_OS_DEF_IPPROTO_IPV6 41
+# define BOOST_ASIO_OS_DEF_IPPROTO_TCP 6
+# define BOOST_ASIO_OS_DEF_IPPROTO_UDP 17
+# define BOOST_ASIO_OS_DEF_IPPROTO_ICMP 1
+# define BOOST_ASIO_OS_DEF_IPPROTO_ICMPV6 58
+# define BOOST_ASIO_OS_DEF_FIONBIO 1
+# define BOOST_ASIO_OS_DEF_FIONREAD 2
+# define BOOST_ASIO_OS_DEF_INADDR_ANY 0
+# define BOOST_ASIO_OS_DEF_MSG_OOB 0x1
+# define BOOST_ASIO_OS_DEF_MSG_PEEK 0x2
+# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE 0x4
+# define BOOST_ASIO_OS_DEF_MSG_EOR 0 // Not supported.
+# define BOOST_ASIO_OS_DEF_SHUT_RD 0x0
+# define BOOST_ASIO_OS_DEF_SHUT_WR 0x1
+# define BOOST_ASIO_OS_DEF_SHUT_RDWR 0x2
+# define BOOST_ASIO_OS_DEF_SOMAXCONN 0x7fffffff
+# define BOOST_ASIO_OS_DEF_SOL_SOCKET 0xffff
+# define BOOST_ASIO_OS_DEF_SO_BROADCAST 0x20
+# define BOOST_ASIO_OS_DEF_SO_DEBUG 0x1
+# define BOOST_ASIO_OS_DEF_SO_DONTROUTE 0x10
+# define BOOST_ASIO_OS_DEF_SO_KEEPALIVE 0x8
+# define BOOST_ASIO_OS_DEF_SO_LINGER 0x80
+# define BOOST_ASIO_OS_DEF_SO_OOBINLINE 0x100
+# define BOOST_ASIO_OS_DEF_SO_SNDBUF 0x1001
+# define BOOST_ASIO_OS_DEF_SO_RCVBUF 0x1002
+# define BOOST_ASIO_OS_DEF_SO_SNDLOWAT 0x1003
+# define BOOST_ASIO_OS_DEF_SO_RCVLOWAT 0x1004
+# define BOOST_ASIO_OS_DEF_SO_REUSEADDR 0x4
+# define BOOST_ASIO_OS_DEF_TCP_NODELAY 0x1
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_IF 2
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_TTL 3
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_LOOP 4
+# define BOOST_ASIO_OS_DEF_IP_ADD_MEMBERSHIP 5
+# define BOOST_ASIO_OS_DEF_IP_DROP_MEMBERSHIP 6
+# define BOOST_ASIO_OS_DEF_IP_TTL 7
+# define BOOST_ASIO_OS_DEF_IPV6_UNICAST_HOPS 4
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_IF 9
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_HOPS 10
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_LOOP 11
+# define BOOST_ASIO_OS_DEF_IPV6_JOIN_GROUP 12
+# define BOOST_ASIO_OS_DEF_IPV6_LEAVE_GROUP 13
+# define BOOST_ASIO_OS_DEF_AI_CANONNAME 0x2
+# define BOOST_ASIO_OS_DEF_AI_PASSIVE 0x1
+# define BOOST_ASIO_OS_DEF_AI_NUMERICHOST 0x4
+# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV 0x8
+# define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0x800
+# define BOOST_ASIO_OS_DEF_AI_ALL 0x100
+# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0x400
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+typedef SOCKET socket_type;
+const SOCKET invalid_socket = INVALID_SOCKET;
+const int socket_error_retval = SOCKET_ERROR;
+const int max_addr_v4_str_len = 256;
+const int max_addr_v6_str_len = 256;
+typedef sockaddr socket_addr_type;
+typedef in_addr in4_addr_type;
+typedef ip_mreq in4_mreq_type;
+typedef sockaddr_in sockaddr_in4_type;
+# if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
+typedef in6_addr_emulation in6_addr_type;
+typedef ipv6_mreq_emulation in6_mreq_type;
+typedef sockaddr_in6_emulation sockaddr_in6_type;
+typedef sockaddr_storage_emulation sockaddr_storage_type;
+typedef addrinfo_emulation addrinfo_type;
+# else
+typedef in6_addr in6_addr_type;
+typedef ipv6_mreq in6_mreq_type;
+typedef sockaddr_in6 sockaddr_in6_type;
+typedef sockaddr_storage sockaddr_storage_type;
+typedef addrinfo addrinfo_type;
+# endif
+typedef ::linger linger_type;
+typedef unsigned long ioctl_arg_type;
+typedef u_long u_long_type;
+typedef u_short u_short_type;
+typedef int signed_size_type;
+# define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c
+# define BOOST_ASIO_OS_DEF_AF_UNSPEC AF_UNSPEC
+# define BOOST_ASIO_OS_DEF_AF_INET AF_INET
+# define BOOST_ASIO_OS_DEF_AF_INET6 AF_INET6
+# define BOOST_ASIO_OS_DEF_SOCK_STREAM SOCK_STREAM
+# define BOOST_ASIO_OS_DEF_SOCK_DGRAM SOCK_DGRAM
+# define BOOST_ASIO_OS_DEF_SOCK_RAW SOCK_RAW
+# define BOOST_ASIO_OS_DEF_SOCK_SEQPACKET SOCK_SEQPACKET
+# define BOOST_ASIO_OS_DEF_IPPROTO_IP IPPROTO_IP
+# define BOOST_ASIO_OS_DEF_IPPROTO_IPV6 IPPROTO_IPV6
+# define BOOST_ASIO_OS_DEF_IPPROTO_TCP IPPROTO_TCP
+# define BOOST_ASIO_OS_DEF_IPPROTO_UDP IPPROTO_UDP
+# define BOOST_ASIO_OS_DEF_IPPROTO_ICMP IPPROTO_ICMP
+# define BOOST_ASIO_OS_DEF_IPPROTO_ICMPV6 IPPROTO_ICMPV6
+# define BOOST_ASIO_OS_DEF_FIONBIO FIONBIO
+# define BOOST_ASIO_OS_DEF_FIONREAD FIONREAD
+# define BOOST_ASIO_OS_DEF_INADDR_ANY INADDR_ANY
+# define BOOST_ASIO_OS_DEF_MSG_OOB MSG_OOB
+# define BOOST_ASIO_OS_DEF_MSG_PEEK MSG_PEEK
+# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE MSG_DONTROUTE
+# define BOOST_ASIO_OS_DEF_MSG_EOR 0 // Not supported on Windows.
+# define BOOST_ASIO_OS_DEF_SHUT_RD SD_RECEIVE
+# define BOOST_ASIO_OS_DEF_SHUT_WR SD_SEND
+# define BOOST_ASIO_OS_DEF_SHUT_RDWR SD_BOTH
+# define BOOST_ASIO_OS_DEF_SOMAXCONN SOMAXCONN
+# define BOOST_ASIO_OS_DEF_SOL_SOCKET SOL_SOCKET
+# define BOOST_ASIO_OS_DEF_SO_BROADCAST SO_BROADCAST
+# define BOOST_ASIO_OS_DEF_SO_DEBUG SO_DEBUG
+# define BOOST_ASIO_OS_DEF_SO_DONTROUTE SO_DONTROUTE
+# define BOOST_ASIO_OS_DEF_SO_KEEPALIVE SO_KEEPALIVE
+# define BOOST_ASIO_OS_DEF_SO_LINGER SO_LINGER
+# define BOOST_ASIO_OS_DEF_SO_OOBINLINE SO_OOBINLINE
+# define BOOST_ASIO_OS_DEF_SO_SNDBUF SO_SNDBUF
+# define BOOST_ASIO_OS_DEF_SO_RCVBUF SO_RCVBUF
+# define BOOST_ASIO_OS_DEF_SO_SNDLOWAT SO_SNDLOWAT
+# define BOOST_ASIO_OS_DEF_SO_RCVLOWAT SO_RCVLOWAT
+# define BOOST_ASIO_OS_DEF_SO_REUSEADDR SO_REUSEADDR
+# define BOOST_ASIO_OS_DEF_TCP_NODELAY TCP_NODELAY
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_IF IP_MULTICAST_IF
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_TTL IP_MULTICAST_TTL
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_LOOP IP_MULTICAST_LOOP
+# define BOOST_ASIO_OS_DEF_IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP
+# define BOOST_ASIO_OS_DEF_IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP
+# define BOOST_ASIO_OS_DEF_IP_TTL IP_TTL
+# define BOOST_ASIO_OS_DEF_IPV6_UNICAST_HOPS IPV6_UNICAST_HOPS
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_IF IPV6_MULTICAST_IF
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_HOPS IPV6_MULTICAST_HOPS
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_LOOP IPV6_MULTICAST_LOOP
+# define BOOST_ASIO_OS_DEF_IPV6_JOIN_GROUP IPV6_JOIN_GROUP
+# define BOOST_ASIO_OS_DEF_IPV6_LEAVE_GROUP IPV6_LEAVE_GROUP
+# define BOOST_ASIO_OS_DEF_AI_CANONNAME AI_CANONNAME
+# define BOOST_ASIO_OS_DEF_AI_PASSIVE AI_PASSIVE
+# define BOOST_ASIO_OS_DEF_AI_NUMERICHOST AI_NUMERICHOST
+# if defined(AI_NUMERICSERV)
+# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV AI_NUMERICSERV
+# else
+# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV 0
+# endif
+# if defined(AI_V4MAPPED)
+# define BOOST_ASIO_OS_DEF_AI_V4MAPPED AI_V4MAPPED
+# else
+# define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0
+# endif
+# if defined(AI_ALL)
+# define BOOST_ASIO_OS_DEF_AI_ALL AI_ALL
+# else
+# define BOOST_ASIO_OS_DEF_AI_ALL 0
+# endif
+# if defined(AI_ADDRCONFIG)
+# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG AI_ADDRCONFIG
+# else
+# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0
+# endif
+# if defined (_WIN32_WINNT)
+const int max_iov_len = 64;
+# else
+const int max_iov_len = 16;
+# endif
+#else
+typedef int socket_type;
+const int invalid_socket = -1;
+const int socket_error_retval = -1;
+const int max_addr_v4_str_len = INET_ADDRSTRLEN;
+#if defined(INET6_ADDRSTRLEN)
+const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE;
+#else // defined(INET6_ADDRSTRLEN)
+const int max_addr_v6_str_len = 256;
+#endif // defined(INET6_ADDRSTRLEN)
+typedef sockaddr socket_addr_type;
+typedef in_addr in4_addr_type;
+# if defined(__hpux)
+// HP-UX doesn't provide ip_mreq when _XOPEN_SOURCE_EXTENDED is defined.
+struct in4_mreq_type
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_interface;
+};
+# else
+typedef ip_mreq in4_mreq_type;
+# endif
+typedef sockaddr_in sockaddr_in4_type;
+typedef in6_addr in6_addr_type;
+typedef ipv6_mreq in6_mreq_type;
+typedef sockaddr_in6 sockaddr_in6_type;
+typedef sockaddr_storage sockaddr_storage_type;
+typedef sockaddr_un sockaddr_un_type;
+typedef addrinfo addrinfo_type;
+typedef ::linger linger_type;
+typedef int ioctl_arg_type;
+typedef uint32_t u_long_type;
+typedef uint16_t u_short_type;
+#if defined(BOOST_ASIO_HAS_SSIZE_T)
+typedef ssize_t signed_size_type;
+#else // defined(BOOST_ASIO_HAS_SSIZE_T)
+typedef int signed_size_type;
+#endif // defined(BOOST_ASIO_HAS_SSIZE_T)
+# define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c
+# define BOOST_ASIO_OS_DEF_AF_UNSPEC AF_UNSPEC
+# define BOOST_ASIO_OS_DEF_AF_INET AF_INET
+# define BOOST_ASIO_OS_DEF_AF_INET6 AF_INET6
+# define BOOST_ASIO_OS_DEF_SOCK_STREAM SOCK_STREAM
+# define BOOST_ASIO_OS_DEF_SOCK_DGRAM SOCK_DGRAM
+# define BOOST_ASIO_OS_DEF_SOCK_RAW SOCK_RAW
+# define BOOST_ASIO_OS_DEF_SOCK_SEQPACKET SOCK_SEQPACKET
+# define BOOST_ASIO_OS_DEF_IPPROTO_IP IPPROTO_IP
+# define BOOST_ASIO_OS_DEF_IPPROTO_IPV6 IPPROTO_IPV6
+# define BOOST_ASIO_OS_DEF_IPPROTO_TCP IPPROTO_TCP
+# define BOOST_ASIO_OS_DEF_IPPROTO_UDP IPPROTO_UDP
+# define BOOST_ASIO_OS_DEF_IPPROTO_ICMP IPPROTO_ICMP
+# define BOOST_ASIO_OS_DEF_IPPROTO_ICMPV6 IPPROTO_ICMPV6
+# define BOOST_ASIO_OS_DEF_FIONBIO FIONBIO
+# define BOOST_ASIO_OS_DEF_FIONREAD FIONREAD
+# define BOOST_ASIO_OS_DEF_INADDR_ANY INADDR_ANY
+# define BOOST_ASIO_OS_DEF_MSG_OOB MSG_OOB
+# define BOOST_ASIO_OS_DEF_MSG_PEEK MSG_PEEK
+# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE MSG_DONTROUTE
+# define BOOST_ASIO_OS_DEF_MSG_EOR MSG_EOR
+# define BOOST_ASIO_OS_DEF_SHUT_RD SHUT_RD
+# define BOOST_ASIO_OS_DEF_SHUT_WR SHUT_WR
+# define BOOST_ASIO_OS_DEF_SHUT_RDWR SHUT_RDWR
+# define BOOST_ASIO_OS_DEF_SOMAXCONN SOMAXCONN
+# define BOOST_ASIO_OS_DEF_SOL_SOCKET SOL_SOCKET
+# define BOOST_ASIO_OS_DEF_SO_BROADCAST SO_BROADCAST
+# define BOOST_ASIO_OS_DEF_SO_DEBUG SO_DEBUG
+# define BOOST_ASIO_OS_DEF_SO_DONTROUTE SO_DONTROUTE
+# define BOOST_ASIO_OS_DEF_SO_KEEPALIVE SO_KEEPALIVE
+# define BOOST_ASIO_OS_DEF_SO_LINGER SO_LINGER
+# define BOOST_ASIO_OS_DEF_SO_OOBINLINE SO_OOBINLINE
+# define BOOST_ASIO_OS_DEF_SO_SNDBUF SO_SNDBUF
+# define BOOST_ASIO_OS_DEF_SO_RCVBUF SO_RCVBUF
+# define BOOST_ASIO_OS_DEF_SO_SNDLOWAT SO_SNDLOWAT
+# define BOOST_ASIO_OS_DEF_SO_RCVLOWAT SO_RCVLOWAT
+# define BOOST_ASIO_OS_DEF_SO_REUSEADDR SO_REUSEADDR
+# define BOOST_ASIO_OS_DEF_TCP_NODELAY TCP_NODELAY
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_IF IP_MULTICAST_IF
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_TTL IP_MULTICAST_TTL
+# define BOOST_ASIO_OS_DEF_IP_MULTICAST_LOOP IP_MULTICAST_LOOP
+# define BOOST_ASIO_OS_DEF_IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP
+# define BOOST_ASIO_OS_DEF_IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP
+# define BOOST_ASIO_OS_DEF_IP_TTL IP_TTL
+# define BOOST_ASIO_OS_DEF_IPV6_UNICAST_HOPS IPV6_UNICAST_HOPS
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_IF IPV6_MULTICAST_IF
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_HOPS IPV6_MULTICAST_HOPS
+# define BOOST_ASIO_OS_DEF_IPV6_MULTICAST_LOOP IPV6_MULTICAST_LOOP
+# define BOOST_ASIO_OS_DEF_IPV6_JOIN_GROUP IPV6_JOIN_GROUP
+# define BOOST_ASIO_OS_DEF_IPV6_LEAVE_GROUP IPV6_LEAVE_GROUP
+# define BOOST_ASIO_OS_DEF_AI_CANONNAME AI_CANONNAME
+# define BOOST_ASIO_OS_DEF_AI_PASSIVE AI_PASSIVE
+# define BOOST_ASIO_OS_DEF_AI_NUMERICHOST AI_NUMERICHOST
+# if defined(AI_NUMERICSERV)
+# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV AI_NUMERICSERV
+# else
+# define BOOST_ASIO_OS_DEF_AI_NUMERICSERV 0
+# endif
+// Note: QNX Neutrino 6.3 defines AI_V4MAPPED, AI_ALL and AI_ADDRCONFIG but
+// does not implement them. Therefore they are specifically excluded here.
+# if defined(AI_V4MAPPED) && !defined(__QNXNTO__)
+# define BOOST_ASIO_OS_DEF_AI_V4MAPPED AI_V4MAPPED
+# else
+# define BOOST_ASIO_OS_DEF_AI_V4MAPPED 0
+# endif
+# if defined(AI_ALL) && !defined(__QNXNTO__)
+# define BOOST_ASIO_OS_DEF_AI_ALL AI_ALL
+# else
+# define BOOST_ASIO_OS_DEF_AI_ALL 0
+# endif
+# if defined(AI_ADDRCONFIG) && !defined(__QNXNTO__)
+# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG AI_ADDRCONFIG
+# else
+# define BOOST_ASIO_OS_DEF_AI_ADDRCONFIG 0
+# endif
+# if defined(IOV_MAX)
+const int max_iov_len = IOV_MAX;
+# else
+// POSIX platforms are not required to define IOV_MAX.
+const int max_iov_len = 16;
+# endif
+#endif
+const int custom_socket_option_level = 0xA5100000;
+const int enable_connection_aborted_option = 1;
+const int always_fail_option = 2;
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SOCKET_TYPES_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/solaris_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/solaris_fenced_block.hpp
new file mode 100644
index 00000000000..aa7fca33032
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/solaris_fenced_block.hpp
@@ -0,0 +1,64 @@
+//
+// detail/solaris_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SOLARIS_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_SOLARIS_FENCED_BLOCK_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(__sun)
+
+#include <atomic.h>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class solaris_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit solaris_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit solaris_fenced_block(full_t)
+ {
+ membar_consumer();
+ }
+
+ // Destructor.
+ ~solaris_fenced_block()
+ {
+ membar_producer();
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__sun)
+
+#endif // BOOST_ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/static_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/static_mutex.hpp
new file mode 100644
index 00000000000..b6194e400d5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/static_mutex.hpp
@@ -0,0 +1,54 @@
+//
+// detail/static_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STATIC_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_STATIC_MUTEX_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_THREADS)
+# include <boost/asio/detail/null_static_mutex.hpp>
+#elif defined(BOOST_ASIO_WINDOWS)
+# include <boost/asio/detail/win_static_mutex.hpp>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_static_mutex.hpp>
+#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+# include <boost/asio/detail/std_static_mutex.hpp>
+#else
+# error Only Windows and POSIX are supported!
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS)
+typedef null_static_mutex static_mutex;
+# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_NULL_STATIC_MUTEX_INIT
+#elif defined(BOOST_ASIO_WINDOWS)
+typedef win_static_mutex static_mutex;
+# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_WIN_STATIC_MUTEX_INIT
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+typedef posix_static_mutex static_mutex;
+# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_POSIX_STATIC_MUTEX_INIT
+#elif defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+typedef std_static_mutex static_mutex;
+# define BOOST_ASIO_STATIC_MUTEX_INIT BOOST_ASIO_STD_STATIC_MUTEX_INIT
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/std_event.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/std_event.hpp
new file mode 100644
index 00000000000..9532ec9f951
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/std_event.hpp
@@ -0,0 +1,178 @@
+//
+// detail/std_event.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STD_EVENT_HPP
+#define BOOST_ASIO_DETAIL_STD_EVENT_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_MUTEX_AND_CONDVAR)
+
+#include <chrono>
+#include <condition_variable>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class std_event
+ : private noncopyable
+{
+public:
+ // Constructor.
+ std_event()
+ : state_(0)
+ {
+ }
+
+ // Destructor.
+ ~std_event()
+ {
+ }
+
+ // Signal the event. (Retained for backward compatibility.)
+ template <typename Lock>
+ void signal(Lock& lock)
+ {
+ this->signal_all(lock);
+ }
+
+ // Signal all waiters.
+ template <typename Lock>
+ void signal_all(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ (void)lock;
+ state_ |= 1;
+ cond_.notify_all();
+ }
+
+ // Unlock the mutex and signal one waiter.
+ template <typename Lock>
+ void unlock_and_signal_one(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ lock.unlock();
+ if (have_waiters)
+ cond_.notify_one();
+ }
+
+ // If there's a waiter, unlock the mutex and signal it.
+ template <typename Lock>
+ bool maybe_unlock_and_signal_one(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ if (state_ > 1)
+ {
+ lock.unlock();
+ cond_.notify_one();
+ return true;
+ }
+ return false;
+ }
+
+ // Reset the event.
+ template <typename Lock>
+ void clear(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ (void)lock;
+ state_ &= ~std::size_t(1);
+ }
+
+ // Wait for the event to become signalled.
+ template <typename Lock>
+ void wait(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ unique_lock_adapter u_lock(lock);
+ while ((state_ & 1) == 0)
+ {
+ waiter w(state_);
+ cond_.wait(u_lock.unique_lock_);
+ }
+ }
+
+ // Timed wait for the event to become signalled.
+ template <typename Lock>
+ bool wait_for_usec(Lock& lock, long usec)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ unique_lock_adapter u_lock(lock);
+ if ((state_ & 1) == 0)
+ {
+ waiter w(state_);
+ cond_.wait_for(u_lock.unique_lock_, std::chrono::microseconds(usec));
+ }
+ return (state_ & 1) != 0;
+ }
+
+private:
+ // Helper class to temporarily adapt a scoped_lock into a unique_lock so that
+ // it can be passed to std::condition_variable::wait().
+ struct unique_lock_adapter
+ {
+ template <typename Lock>
+ explicit unique_lock_adapter(Lock& lock)
+ : unique_lock_(lock.mutex().mutex_, std::adopt_lock)
+ {
+ }
+
+ ~unique_lock_adapter()
+ {
+ unique_lock_.release();
+ }
+
+ std::unique_lock<std::mutex> unique_lock_;
+ };
+
+ // Helper to increment and decrement the state to track outstanding waiters.
+ class waiter
+ {
+ public:
+ explicit waiter(std::size_t& state)
+ : state_(state)
+ {
+ state_ += 2;
+ }
+
+ ~waiter()
+ {
+ state_ -= 2;
+ }
+
+ private:
+ std::size_t& state_;
+ };
+
+ std::condition_variable cond_;
+ std::size_t state_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+
+#endif // BOOST_ASIO_DETAIL_STD_EVENT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/std_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/std_fenced_block.hpp
new file mode 100644
index 00000000000..2d877520792
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/std_fenced_block.hpp
@@ -0,0 +1,64 @@
+//
+// detail/std_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STD_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_STD_FENCED_BLOCK_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_ATOMIC)
+
+#include <atomic>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class std_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit std_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit std_fenced_block(full_t)
+ {
+ std::atomic_thread_fence(std::memory_order_acquire);
+ }
+
+ // Destructor.
+ ~std_fenced_block()
+ {
+ std::atomic_thread_fence(std::memory_order_release);
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC)
+
+#endif // BOOST_ASIO_DETAIL_STD_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/std_global.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/std_global.hpp
new file mode 100644
index 00000000000..1c19afe13c9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/std_global.hpp
@@ -0,0 +1,72 @@
+//
+// detail/std_global.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STD_GLOBAL_HPP
+#define BOOST_ASIO_DETAIL_STD_GLOBAL_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_CALL_ONCE)
+
+#include <exception>
+#include <mutex>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct std_global_impl
+{
+ // Helper function to perform initialisation.
+ static void do_init()
+ {
+ instance_.ptr_ = new T;
+ }
+
+ // Destructor automatically cleans up the global.
+ ~std_global_impl()
+ {
+ delete ptr_;
+ }
+
+ static std::once_flag init_once_;
+ static std_global_impl instance_;
+ T* ptr_;
+};
+
+template <typename T>
+std::once_flag std_global_impl<T>::init_once_;
+
+template <typename T>
+std_global_impl<T> std_global_impl<T>::instance_;
+
+template <typename T>
+T& std_global()
+{
+ std::call_once(std_global_impl<T>::init_once_, &std_global_impl<T>::do_init);
+ return *std_global_impl<T>::instance_.ptr_;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
+
+#endif // BOOST_ASIO_DETAIL_STD_GLOBAL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/std_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/std_mutex.hpp
new file mode 100644
index 00000000000..7bd17cb00fd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/std_mutex.hpp
@@ -0,0 +1,75 @@
+//
+// detail/std_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STD_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_STD_MUTEX_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_MUTEX_AND_CONDVAR)
+
+#include <mutex>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class std_event;
+
+class std_mutex
+ : private noncopyable
+{
+public:
+ typedef boost::asio::detail::scoped_lock<std_mutex> scoped_lock;
+
+ // Constructor.
+ std_mutex()
+ {
+ }
+
+ // Destructor.
+ ~std_mutex()
+ {
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ mutex_.lock();
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ mutex_.unlock();
+ }
+
+private:
+ friend class std_event;
+ std::mutex mutex_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+
+#endif // BOOST_ASIO_DETAIL_STD_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/std_static_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/std_static_mutex.hpp
new file mode 100644
index 00000000000..9b0581ee590
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/std_static_mutex.hpp
@@ -0,0 +1,83 @@
+//
+// detail/std_static_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STD_STATIC_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_STD_STATIC_MUTEX_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_MUTEX_AND_CONDVAR)
+
+#include <mutex>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class std_event;
+
+class std_static_mutex
+ : private noncopyable
+{
+public:
+ typedef boost::asio::detail::scoped_lock<std_static_mutex> scoped_lock;
+
+ // Constructor.
+ std_static_mutex(int)
+ {
+ }
+
+ // Destructor.
+ ~std_static_mutex()
+ {
+ }
+
+ // Initialise the mutex.
+ void init()
+ {
+ // Nothing to do.
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ mutex_.lock();
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ mutex_.unlock();
+ }
+
+private:
+ friend class std_event;
+ std::mutex mutex_;
+};
+
+#define BOOST_ASIO_STD_STATIC_MUTEX_INIT 0
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+
+#endif // BOOST_ASIO_DETAIL_STD_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/std_thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/std_thread.hpp
new file mode 100644
index 00000000000..314a06cae5c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/std_thread.hpp
@@ -0,0 +1,73 @@
+//
+// detail/std_thread.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STD_THREAD_HPP
+#define BOOST_ASIO_DETAIL_STD_THREAD_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_THREAD)
+
+#include <thread>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class std_thread
+ : private noncopyable
+{
+public:
+ // Constructor.
+ template <typename Function>
+ std_thread(Function f, unsigned int = 0)
+ : thread_(f)
+ {
+ }
+
+ // Destructor.
+ ~std_thread()
+ {
+ join();
+ }
+
+ // Wait for the thread to exit.
+ void join()
+ {
+ if (thread_.joinable())
+ thread_.join();
+ }
+
+ // Get number of CPUs.
+ static std::size_t hardware_concurrency()
+ {
+ return std::thread::hardware_concurrency();
+ }
+
+private:
+ std::thread thread_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_THREAD)
+
+#endif // BOOST_ASIO_DETAIL_STD_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/strand_executor_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/strand_executor_service.hpp
new file mode 100644
index 00000000000..4fc9327ecda
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/strand_executor_service.hpp
@@ -0,0 +1,144 @@
+//
+// detail/strand_executor_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STRAND_EXECUTOR_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_STRAND_EXECUTOR_SERVICE_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/atomic_count.hpp>
+#include <boost/asio/detail/executor_op.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/scheduler_operation.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Default service implementation for a strand.
+class strand_executor_service
+ : public execution_context_service_base<strand_executor_service>
+{
+public:
+ // The underlying implementation of a strand.
+ class strand_impl
+ {
+ public:
+ BOOST_ASIO_DECL ~strand_impl();
+
+ private:
+ friend class strand_executor_service;
+
+ // Mutex to protect access to internal data.
+ mutex* mutex_;
+
+ // Indicates whether the strand is currently "locked" by a handler. This
+ // means that there is a handler upcall in progress, or that the strand
+ // itself has been scheduled in order to invoke some pending handlers.
+ bool locked_;
+
+ // Indicates that the strand has been shut down and will accept no further
+ // handlers.
+ bool shutdown_;
+
+ // The handlers that are waiting on the strand but should not be run until
+ // after the next time the strand is scheduled. This queue must only be
+ // modified while the mutex is locked.
+ op_queue<scheduler_operation> waiting_queue_;
+
+ // The handlers that are ready to be run. Logically speaking, these are the
+ // handlers that hold the strand's lock. The ready queue is only modified
+ // from within the strand and so may be accessed without locking the mutex.
+ op_queue<scheduler_operation> ready_queue_;
+
+ // Pointers to adjacent handle implementations in linked list.
+ strand_impl* next_;
+ strand_impl* prev_;
+
+ // The strand service in where the implementation is held.
+ strand_executor_service* service_;
+ };
+
+ typedef shared_ptr<strand_impl> implementation_type;
+
+ // Construct a new strand service for the specified context.
+ BOOST_ASIO_DECL explicit strand_executor_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Create a new strand_executor implementation.
+ BOOST_ASIO_DECL implementation_type create_implementation();
+
+ // Request invocation of the given function.
+ template <typename Executor, typename Function, typename Allocator>
+ static void dispatch(const implementation_type& impl, Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a);
+
+ // Request invocation of the given function and return immediately.
+ template <typename Executor, typename Function, typename Allocator>
+ static void post(const implementation_type& impl, Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a);
+
+ // Request invocation of the given function and return immediately.
+ template <typename Executor, typename Function, typename Allocator>
+ static void defer(const implementation_type& impl, Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function, const Allocator& a);
+
+ // Determine whether the strand is running in the current thread.
+ BOOST_ASIO_DECL static bool running_in_this_thread(
+ const implementation_type& impl);
+
+private:
+ friend class strand_impl;
+ template <typename Executor> class invoker;
+
+ // Adds a function to the strand. Returns true if it acquires the lock.
+ BOOST_ASIO_DECL static bool enqueue(const implementation_type& impl,
+ scheduler_operation* op);
+
+ // Mutex to protect access to the service-wide state.
+ mutex mutex_;
+
+ // Number of mutexes shared between all strand objects.
+ enum { num_mutexes = 193 };
+
+ // Pool of mutexes.
+ scoped_ptr<mutex> mutexes_[num_mutexes];
+
+ // Extra value used when hashing to prevent recycled memory locations from
+ // getting the same mutex.
+ std::size_t salt_;
+
+ // The head of a linked list of all implementations.
+ strand_impl* impl_list_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/strand_executor_service.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/strand_executor_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_STRAND_EXECUTOR_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/strand_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/strand_service.hpp
new file mode 100644
index 00000000000..14271c4e4ec
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/strand_service.hpp
@@ -0,0 +1,144 @@
+//
+// detail/strand_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STRAND_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_STRAND_SERVICE_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/io_context.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Default service implementation for a strand.
+class strand_service
+ : public boost::asio::detail::service_base<strand_service>
+{
+private:
+ // Helper class to re-post the strand on exit.
+ struct on_do_complete_exit;
+
+ // Helper class to re-post the strand on exit.
+ struct on_dispatch_exit;
+
+public:
+
+ // The underlying implementation of a strand.
+ class strand_impl
+ : public operation
+ {
+ public:
+ strand_impl();
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class strand_service;
+ friend struct on_do_complete_exit;
+ friend struct on_dispatch_exit;
+
+ // Mutex to protect access to internal data.
+ boost::asio::detail::mutex mutex_;
+
+ // Indicates whether the strand is currently "locked" by a handler. This
+ // means that there is a handler upcall in progress, or that the strand
+ // itself has been scheduled in order to invoke some pending handlers.
+ bool locked_;
+
+ // The handlers that are waiting on the strand but should not be run until
+ // after the next time the strand is scheduled. This queue must only be
+ // modified while the mutex is locked.
+ op_queue<operation> waiting_queue_;
+
+ // The handlers that are ready to be run. Logically speaking, these are the
+ // handlers that hold the strand's lock. The ready queue is only modified
+ // from within the strand and so may be accessed without locking the mutex.
+ op_queue<operation> ready_queue_;
+ };
+
+ typedef strand_impl* implementation_type;
+
+ // Construct a new strand service for the specified io_context.
+ BOOST_ASIO_DECL explicit strand_service(boost::asio::io_context& io_context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Construct a new strand implementation.
+ BOOST_ASIO_DECL void construct(implementation_type& impl);
+
+ // Request the io_context to invoke the given handler.
+ template <typename Handler>
+ void dispatch(implementation_type& impl, Handler& handler);
+
+ // Request the io_context to invoke the given handler and return immediately.
+ template <typename Handler>
+ void post(implementation_type& impl, Handler& handler);
+
+ // Determine whether the strand is running in the current thread.
+ BOOST_ASIO_DECL bool running_in_this_thread(
+ const implementation_type& impl) const;
+
+private:
+ // Helper function to dispatch a handler. Returns true if the handler should
+ // be dispatched immediately.
+ BOOST_ASIO_DECL bool do_dispatch(implementation_type& impl, operation* op);
+
+ // Helper fiunction to post a handler.
+ BOOST_ASIO_DECL void do_post(implementation_type& impl,
+ operation* op, bool is_continuation);
+
+ BOOST_ASIO_DECL static void do_complete(void* owner,
+ operation* base, const boost::system::error_code& ec,
+ std::size_t bytes_transferred);
+
+ // The io_context implementation used to post completions.
+ io_context_impl& io_context_;
+
+ // Mutex to protect access to the array of implementations.
+ boost::asio::detail::mutex mutex_;
+
+ // Number of implementations shared between all strand objects.
+#if defined(BOOST_ASIO_STRAND_IMPLEMENTATIONS)
+ enum { num_implementations = BOOST_ASIO_STRAND_IMPLEMENTATIONS };
+#else // defined(BOOST_ASIO_STRAND_IMPLEMENTATIONS)
+ enum { num_implementations = 193 };
+#endif // defined(BOOST_ASIO_STRAND_IMPLEMENTATIONS)
+
+ // Pool of implementations.
+ scoped_ptr<strand_impl> implementations_[num_implementations];
+
+ // Extra value used when hashing to prevent recycled memory locations from
+ // getting the same strand implementation.
+ std::size_t salt_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/strand_service.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/strand_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_STRAND_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/string_view.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/string_view.hpp
new file mode 100644
index 00000000000..07080c1e7cc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/string_view.hpp
@@ -0,0 +1,49 @@
+//
+// detail/string_view.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STRING_VIEW_HPP
+#define BOOST_ASIO_DETAIL_STRING_VIEW_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_STRING_VIEW)
+
+#if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
+# include <string_view>
+#elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# include <experimental/string_view>
+#else // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# error BOOST_ASIO_HAS_STRING_VIEW is set but no string_view is available
+#endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
+using std::basic_string_view;
+using std::string_view;
+#elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+using std::experimental::basic_string_view;
+using std::experimental::string_view;
+#endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+
+} // namespace asio
+} // namespace boost
+
+# define BOOST_ASIO_STRING_VIEW_PARAM boost::asio::string_view
+#else // defined(BOOST_ASIO_HAS_STRING_VIEW)
+# define BOOST_ASIO_STRING_VIEW_PARAM const std::string&
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+#endif // BOOST_ASIO_DETAIL_STRING_VIEW_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/thread.hpp
new file mode 100644
index 00000000000..a888d52dd25
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/thread.hpp
@@ -0,0 +1,62 @@
+//
+// detail/thread.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_HPP
+#define BOOST_ASIO_DETAIL_THREAD_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_THREADS)
+# include <boost/asio/detail/null_thread.hpp>
+#elif defined(BOOST_ASIO_WINDOWS)
+# if defined(UNDER_CE)
+# include <boost/asio/detail/wince_thread.hpp>
+# elif defined(BOOST_ASIO_WINDOWS_APP)
+# include <boost/asio/detail/winapp_thread.hpp>
+# else
+# include <boost/asio/detail/win_thread.hpp>
+# endif
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_thread.hpp>
+#elif defined(BOOST_ASIO_HAS_STD_THREAD)
+# include <boost/asio/detail/std_thread.hpp>
+#else
+# error Only Windows, POSIX and std::thread are supported!
+#endif
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if !defined(BOOST_ASIO_HAS_THREADS)
+typedef null_thread thread;
+#elif defined(BOOST_ASIO_WINDOWS)
+# if defined(UNDER_CE)
+typedef wince_thread thread;
+# elif defined(BOOST_ASIO_WINDOWS_APP)
+typedef winapp_thread thread;
+# else
+typedef win_thread thread;
+# endif
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+typedef posix_thread thread;
+#elif defined(BOOST_ASIO_HAS_STD_THREAD)
+typedef std_thread thread;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/thread_context.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/thread_context.hpp
new file mode 100644
index 00000000000..2005a0d76b4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/thread_context.hpp
@@ -0,0 +1,44 @@
+//
+// detail/thread_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_CONTEXT_HPP
+#define BOOST_ASIO_DETAIL_THREAD_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <climits>
+#include <cstddef>
+#include <boost/asio/detail/call_stack.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class thread_info_base;
+
+// Base class for things that manage threads (scheduler, win_iocp_io_context).
+class thread_context
+{
+public:
+ // Per-thread call stack to track the state of each thread in the context.
+ typedef call_stack<thread_context, thread_info_base> thread_call_stack;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_THREAD_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/thread_group.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/thread_group.hpp
new file mode 100644
index 00000000000..c6a4a997733
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/thread_group.hpp
@@ -0,0 +1,97 @@
+//
+// detail/thread_group.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_GROUP_HPP
+#define BOOST_ASIO_DETAIL_THREAD_GROUP_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/scoped_ptr.hpp>
+#include <boost/asio/detail/thread.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class thread_group
+{
+public:
+ // Constructor initialises an empty thread group.
+ thread_group()
+ : first_(0)
+ {
+ }
+
+ // Destructor joins any remaining threads in the group.
+ ~thread_group()
+ {
+ join();
+ }
+
+ // Create a new thread in the group.
+ template <typename Function>
+ void create_thread(Function f)
+ {
+ first_ = new item(f, first_);
+ }
+
+ // Create new threads in the group.
+ template <typename Function>
+ void create_threads(Function f, std::size_t num_threads)
+ {
+ for (std::size_t i = 0; i < num_threads; ++i)
+ create_thread(f);
+ }
+
+ // Wait for all threads in the group to exit.
+ void join()
+ {
+ while (first_)
+ {
+ first_->thread_.join();
+ item* tmp = first_;
+ first_ = first_->next_;
+ delete tmp;
+ }
+ }
+
+ // Test whether the group is empty.
+ bool empty() const
+ {
+ return first_ == 0;
+ }
+
+private:
+ // Structure used to track a single thread in the group.
+ struct item
+ {
+ template <typename Function>
+ explicit item(Function f, item* next)
+ : thread_(f),
+ next_(next)
+ {
+ }
+
+ boost::asio::detail::thread thread_;
+ item* next_;
+ };
+
+ // The first thread in the group.
+ item* first_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_THREAD_GROUP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/thread_info_base.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/thread_info_base.hpp
new file mode 100644
index 00000000000..6b7a20c5edc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/thread_info_base.hpp
@@ -0,0 +1,128 @@
+//
+// detail/thread_info_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_INFO_BASE_HPP
+#define BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <climits>
+#include <cstddef>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class thread_info_base
+ : private noncopyable
+{
+public:
+ struct default_tag
+ {
+ enum { mem_index = 0 };
+ };
+
+ struct awaitable_frame_tag
+ {
+ enum { mem_index = 1 };
+ };
+
+ struct executor_function_tag
+ {
+ enum { mem_index = 2 };
+ };
+
+ thread_info_base()
+ {
+ for (int i = 0; i < max_mem_index; ++i)
+ reusable_memory_[i] = 0;
+ }
+
+ ~thread_info_base()
+ {
+ for (int i = 0; i < max_mem_index; ++i)
+ if (reusable_memory_[i])
+ ::operator delete(reusable_memory_[i]);
+ }
+
+ static void* allocate(thread_info_base* this_thread, std::size_t size)
+ {
+ return allocate(default_tag(), this_thread, size);
+ }
+
+ static void deallocate(thread_info_base* this_thread,
+ void* pointer, std::size_t size)
+ {
+ deallocate(default_tag(), this_thread, pointer, size);
+ }
+
+ template <typename Purpose>
+ static void* allocate(Purpose, thread_info_base* this_thread,
+ std::size_t size)
+ {
+ std::size_t chunks = (size + chunk_size - 1) / chunk_size;
+
+ if (this_thread && this_thread->reusable_memory_[Purpose::mem_index])
+ {
+ void* const pointer = this_thread->reusable_memory_[Purpose::mem_index];
+ this_thread->reusable_memory_[Purpose::mem_index] = 0;
+
+ unsigned char* const mem = static_cast<unsigned char*>(pointer);
+ if (static_cast<std::size_t>(mem[0]) >= chunks)
+ {
+ mem[size] = mem[0];
+ return pointer;
+ }
+
+ ::operator delete(pointer);
+ }
+
+ void* const pointer = ::operator new(chunks * chunk_size + 1);
+ unsigned char* const mem = static_cast<unsigned char*>(pointer);
+ mem[size] = (chunks <= UCHAR_MAX) ? static_cast<unsigned char>(chunks) : 0;
+ return pointer;
+ }
+
+ template <typename Purpose>
+ static void deallocate(Purpose, thread_info_base* this_thread,
+ void* pointer, std::size_t size)
+ {
+ if (size <= chunk_size * UCHAR_MAX)
+ {
+ if (this_thread && this_thread->reusable_memory_[Purpose::mem_index] == 0)
+ {
+ unsigned char* const mem = static_cast<unsigned char*>(pointer);
+ mem[0] = mem[size];
+ this_thread->reusable_memory_[Purpose::mem_index] = pointer;
+ return;
+ }
+ }
+
+ ::operator delete(pointer);
+ }
+
+private:
+ enum { chunk_size = 4 };
+ enum { max_mem_index = 3 };
+ void* reusable_memory_[max_mem_index];
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/throw_error.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/throw_error.hpp
new file mode 100644
index 00000000000..d31c8598768
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/throw_error.hpp
@@ -0,0 +1,55 @@
+//
+// detail/throw_error.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THROW_ERROR_HPP
+#define BOOST_ASIO_DETAIL_THROW_ERROR_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/system/error_code.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+BOOST_ASIO_DECL void do_throw_error(const boost::system::error_code& err);
+
+BOOST_ASIO_DECL void do_throw_error(const boost::system::error_code& err,
+ const char* location);
+
+inline void throw_error(const boost::system::error_code& err)
+{
+ if (err)
+ do_throw_error(err);
+}
+
+inline void throw_error(const boost::system::error_code& err,
+ const char* location)
+{
+ if (err)
+ do_throw_error(err, location);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/throw_error.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_THROW_ERROR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/throw_exception.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/throw_exception.hpp
new file mode 100644
index 00000000000..6190419f55d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/throw_exception.hpp
@@ -0,0 +1,53 @@
+//
+// detail/throw_exception.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THROW_EXCEPTION_HPP
+#define BOOST_ASIO_DETAIL_THROW_EXCEPTION_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_BOOST_THROW_EXCEPTION)
+# include <boost/throw_exception.hpp>
+#endif // defined(BOOST_ASIO_BOOST_THROW_EXCEPTION)
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
+using boost::throw_exception;
+#else // defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
+
+// Declare the throw_exception function for all targets.
+template <typename Exception>
+void throw_exception(const Exception& e);
+
+// Only define the throw_exception function when exceptions are enabled.
+// Otherwise, it is up to the application to provide a definition of this
+// function.
+# if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+template <typename Exception>
+void throw_exception(const Exception& e)
+{
+ throw e;
+}
+# endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_THROW_EXCEPTION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue.hpp
new file mode 100644
index 00000000000..9ce6995b733
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue.hpp
@@ -0,0 +1,362 @@
+//
+// detail/timer_queue.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/detail/timer_queue_base.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_base.hpp
new file mode 100644
index 00000000000..c95a2a520c7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_base.hpp
@@ -0,0 +1,70 @@
+//
+// detail/timer_queue_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASE_HPP
+#define BOOST_ASIO_DETAIL_TIMER_QUEUE_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/detail/noncopyable.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class timer_queue_base
+ : private noncopyable
+{
+public:
+ // Constructor.
+ timer_queue_base() : next_(0) {}
+
+ // Destructor.
+ virtual ~timer_queue_base() {}
+
+ // Whether there are no timers in the queue.
+ virtual bool empty() const = 0;
+
+ // Get the time to wait until the next timer.
+ virtual long wait_duration_msec(long max_duration) const = 0;
+
+ // Get the time to wait until the next timer.
+ virtual long wait_duration_usec(long max_duration) const = 0;
+
+ // Dequeue all ready timers.
+ virtual void get_ready_timers(op_queue<operation>& ops) = 0;
+
+ // Dequeue all timers.
+ virtual void get_all_timers(op_queue<operation>& ops) = 0;
+
+private:
+ friend class timer_queue_set;
+
+ // Next timer queue in the set.
+ timer_queue_base* next_;
+};
+
+template <typename Time_Traits>
+class timer_queue;
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_ptime.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_ptime.hpp
new file mode 100644
index 00000000000..d803befb9f9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_ptime.hpp
@@ -0,0 +1,101 @@
+//
+// detail/timer_queue_ptime.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_PTIME_HPP
+#define BOOST_ASIO_DETAIL_TIMER_QUEUE_PTIME_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_BOOST_DATE_TIME)
+
+#include <boost/asio/time_traits.hpp>
+#include <boost/asio/detail/timer_queue.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct forwarding_posix_time_traits : time_traits<boost::posix_time::ptime> {};
+
+// Template specialisation for the commonly used instantation.
+template <>
+class timer_queue<time_traits<boost::posix_time::ptime> >
+ : public timer_queue_base
+{
+public:
+ // The time type.
+ typedef boost::posix_time::ptime time_type;
+
+ // The duration type.
+ typedef boost::posix_time::time_duration duration_type;
+
+ // Per-timer data.
+ typedef timer_queue<forwarding_posix_time_traits>::per_timer_data
+ per_timer_data;
+
+ // Constructor.
+ BOOST_ASIO_DECL timer_queue();
+
+ // Destructor.
+ BOOST_ASIO_DECL virtual ~timer_queue();
+
+ // 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.
+ BOOST_ASIO_DECL bool enqueue_timer(const time_type& time,
+ per_timer_data& timer, wait_op* op);
+
+ // Whether there are no timers in the queue.
+ BOOST_ASIO_DECL virtual bool empty() const;
+
+ // Get the time for the timer that is earliest in the queue.
+ BOOST_ASIO_DECL virtual long wait_duration_msec(long max_duration) const;
+
+ // Get the time for the timer that is earliest in the queue.
+ BOOST_ASIO_DECL virtual long wait_duration_usec(long max_duration) const;
+
+ // Dequeue all timers not later than the current time.
+ BOOST_ASIO_DECL virtual void get_ready_timers(op_queue<operation>& ops);
+
+ // Dequeue all timers.
+ BOOST_ASIO_DECL virtual void get_all_timers(op_queue<operation>& ops);
+
+ // Cancel and dequeue operations for the given timer.
+ BOOST_ASIO_DECL 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)());
+
+ // Move operations from one timer to another, empty timer.
+ BOOST_ASIO_DECL void move_timer(per_timer_data& target,
+ per_timer_data& source);
+
+private:
+ timer_queue<forwarding_posix_time_traits> impl_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/timer_queue_ptime.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_PTIME_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_set.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_set.hpp
new file mode 100644
index 00000000000..9b25e208922
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/timer_queue_set.hpp
@@ -0,0 +1,68 @@
+//
+// detail/timer_queue_set.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SET_HPP
+#define BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_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/timer_queue_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class timer_queue_set
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL timer_queue_set();
+
+ // Add a timer queue to the set.
+ BOOST_ASIO_DECL void insert(timer_queue_base* q);
+
+ // Remove a timer queue from the set.
+ BOOST_ASIO_DECL void erase(timer_queue_base* q);
+
+ // Determine whether all queues are empty.
+ BOOST_ASIO_DECL bool all_empty() const;
+
+ // Get the wait duration in milliseconds.
+ BOOST_ASIO_DECL long wait_duration_msec(long max_duration) const;
+
+ // Get the wait duration in microseconds.
+ BOOST_ASIO_DECL long wait_duration_usec(long max_duration) const;
+
+ // Dequeue all ready timers.
+ BOOST_ASIO_DECL void get_ready_timers(op_queue<operation>& ops);
+
+ // Dequeue all timers.
+ BOOST_ASIO_DECL void get_all_timers(op_queue<operation>& ops);
+
+private:
+ timer_queue_base* first_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/timer_queue_set.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_SET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler.hpp
new file mode 100644
index 00000000000..9d68a602c4e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler.hpp
@@ -0,0 +1,35 @@
+//
+// detail/timer_scheduler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCHEDULER_HPP
+#define BOOST_ASIO_DETAIL_TIMER_SCHEDULER_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/timer_scheduler_fwd.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/winrt_timer_scheduler.hpp>
+#elif defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+#endif
+
+#endif // BOOST_ASIO_DETAIL_TIMER_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler_fwd.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler_fwd.hpp
new file mode 100644
index 00000000000..0675edf83af
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/timer_scheduler_fwd.hpp
@@ -0,0 +1,42 @@
+//
+// detail/timer_scheduler_fwd.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SCHEDULER_FWD_HPP
+#define BOOST_ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+typedef class winrt_timer_scheduler timer_scheduler;
+#elif defined(BOOST_ASIO_HAS_IOCP)
+typedef class win_iocp_io_context timer_scheduler;
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+typedef class epoll_reactor timer_scheduler;
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+typedef class kqueue_reactor timer_scheduler;
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+typedef class dev_poll_reactor timer_scheduler;
+#else
+typedef class select_reactor timer_scheduler;
+#endif
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/tss_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/tss_ptr.hpp
new file mode 100644
index 00000000000..a7c87d2103a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/tss_ptr.hpp
@@ -0,0 +1,71 @@
+//
+// detail/tss_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TSS_PTR_HPP
+#define BOOST_ASIO_DETAIL_TSS_PTR_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_THREADS)
+# include <boost/asio/detail/null_tss_ptr.hpp>
+#elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
+# include <boost/asio/detail/keyword_tss_ptr.hpp>
+#elif defined(BOOST_ASIO_WINDOWS)
+# include <boost/asio/detail/win_tss_ptr.hpp>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+# include <boost/asio/detail/posix_tss_ptr.hpp>
+#else
+# error Only Windows and POSIX are supported!
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+class tss_ptr
+#if !defined(BOOST_ASIO_HAS_THREADS)
+ : public null_tss_ptr<T>
+#elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
+ : public keyword_tss_ptr<T>
+#elif defined(BOOST_ASIO_WINDOWS)
+ : public win_tss_ptr<T>
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+ : public posix_tss_ptr<T>
+#endif
+{
+public:
+ void operator=(T* value)
+ {
+#if !defined(BOOST_ASIO_HAS_THREADS)
+ null_tss_ptr<T>::operator=(value);
+#elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
+ keyword_tss_ptr<T>::operator=(value);
+#elif defined(BOOST_ASIO_WINDOWS)
+ win_tss_ptr<T>::operator=(value);
+#elif defined(BOOST_ASIO_HAS_PTHREADS)
+ posix_tss_ptr<T>::operator=(value);
+#endif
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/type_traits.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/type_traits.hpp
new file mode 100644
index 00000000000..c53a7e745c6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/type_traits.hpp
@@ -0,0 +1,88 @@
+//
+// detail/type_traits.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TYPE_TRAITS_HPP
+#define BOOST_ASIO_DETAIL_TYPE_TRAITS_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_TYPE_TRAITS)
+# include <type_traits>
+#else // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
+# include <boost/type_traits/add_const.hpp>
+# include <boost/type_traits/conditional.hpp>
+# include <boost/type_traits/decay.hpp>
+# include <boost/type_traits/integral_constant.hpp>
+# include <boost/type_traits/is_base_of.hpp>
+# include <boost/type_traits/is_class.hpp>
+# include <boost/type_traits/is_const.hpp>
+# include <boost/type_traits/is_convertible.hpp>
+# include <boost/type_traits/is_function.hpp>
+# include <boost/type_traits/is_same.hpp>
+# include <boost/type_traits/remove_pointer.hpp>
+# include <boost/type_traits/remove_reference.hpp>
+# include <boost/utility/enable_if.hpp>
+# include <boost/utility/result_of.hpp>
+#endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
+using std::add_const;
+using std::conditional;
+using std::decay;
+using std::enable_if;
+using std::false_type;
+using std::integral_constant;
+using std::is_base_of;
+using std::is_class;
+using std::is_const;
+using std::is_convertible;
+using std::is_function;
+using std::is_same;
+using std::remove_pointer;
+using std::remove_reference;
+#if defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
+template <typename> struct result_of;
+template <typename F, typename... Args>
+struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
+#else // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
+using std::result_of;
+#endif // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
+using std::true_type;
+#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
+using boost::add_const;
+template <bool Condition, typename Type = void>
+struct enable_if : boost::enable_if_c<Condition, Type> {};
+using boost::conditional;
+using boost::decay;
+using boost::false_type;
+using boost::integral_constant;
+using boost::is_base_of;
+using boost::is_class;
+using boost::is_const;
+using boost::is_convertible;
+using boost::is_function;
+using boost::is_same;
+using boost::remove_pointer;
+using boost::remove_reference;
+using boost::result_of;
+using boost::true_type;
+#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/variadic_templates.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/variadic_templates.hpp
new file mode 100644
index 00000000000..f552b4b0260
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/variadic_templates.hpp
@@ -0,0 +1,133 @@
+//
+// detail/variadic_templates.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_VARIADIC_TEMPLATES_HPP
+#define BOOST_ASIO_DETAIL_VARIADIC_TEMPLATES_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_VARIADIC_TEMPLATES)
+
+# define BOOST_ASIO_VARIADIC_TPARAMS(n) BOOST_ASIO_VARIADIC_TPARAMS_##n
+
+# define BOOST_ASIO_VARIADIC_TPARAMS_1 \
+ typename T1
+# define BOOST_ASIO_VARIADIC_TPARAMS_2 \
+ typename T1, typename T2
+# define BOOST_ASIO_VARIADIC_TPARAMS_3 \
+ typename T1, typename T2, typename T3
+# define BOOST_ASIO_VARIADIC_TPARAMS_4 \
+ typename T1, typename T2, typename T3, typename T4
+# define BOOST_ASIO_VARIADIC_TPARAMS_5 \
+ typename T1, typename T2, typename T3, typename T4, typename T5
+
+# define BOOST_ASIO_VARIADIC_TARGS(n) BOOST_ASIO_VARIADIC_TARGS_##n
+
+# define BOOST_ASIO_VARIADIC_TARGS_1 T1
+# define BOOST_ASIO_VARIADIC_TARGS_2 T1, T2
+# define BOOST_ASIO_VARIADIC_TARGS_3 T1, T2, T3
+# define BOOST_ASIO_VARIADIC_TARGS_4 T1, T2, T3, T4
+# define BOOST_ASIO_VARIADIC_TARGS_5 T1, T2, T3, T4, T5
+
+# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS(n) \
+ BOOST_ASIO_VARIADIC_BYVAL_PARAMS_##n
+
+# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_1 T1 x1
+# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_2 T1 x1, T2 x2
+# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_3 T1 x1, T2 x2, T3 x3
+# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_4 T1 x1, T2 x2, T3 x3, T4 x4
+# define BOOST_ASIO_VARIADIC_BYVAL_PARAMS_5 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5
+
+# define BOOST_ASIO_VARIADIC_BYVAL_ARGS(n) \
+ BOOST_ASIO_VARIADIC_BYVAL_ARGS_##n
+
+# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_1 x1
+# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_2 x1, x2
+# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_3 x1, x2, x3
+# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_4 x1, x2, x3, x4
+# define BOOST_ASIO_VARIADIC_BYVAL_ARGS_5 x1, x2, x3, x4, x5
+
+# define BOOST_ASIO_VARIADIC_CONSTREF_PARAMS(n) \
+ BOOST_ASIO_VARIADIC_CONSTREF_PARAMS_##n
+
+# define BOOST_ASIO_VARIADIC_CONSTREF_PARAMS_1 \
+ const T1& x1
+# define BOOST_ASIO_VARIADIC_CONSTREF_PARAMS_2 \
+ const T1& x1, const T2& x2
+# define BOOST_ASIO_VARIADIC_CONSTREF_PARAMS_3 \
+ const T1& x1, const T2& x2, const T3& x3
+# define BOOST_ASIO_VARIADIC_CONSTREF_PARAMS_4 \
+ const T1& x1, const T2& x2, const T3& x3, const T4& x4
+# define BOOST_ASIO_VARIADIC_CONSTREF_PARAMS_5 \
+ const T1& x1, const T2& x2, const T3& x3, const T4& x4, const T5& x5
+
+# define BOOST_ASIO_VARIADIC_MOVE_PARAMS(n) \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS_##n
+
+# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_1 \
+ BOOST_ASIO_MOVE_ARG(T1) x1
+# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_2 \
+ BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2
+# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_3 \
+ BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2, \
+ BOOST_ASIO_MOVE_ARG(T3) x3
+# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_4 \
+ BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2, \
+ BOOST_ASIO_MOVE_ARG(T3) x3, BOOST_ASIO_MOVE_ARG(T4) x4
+# define BOOST_ASIO_VARIADIC_MOVE_PARAMS_5 \
+ BOOST_ASIO_MOVE_ARG(T1) x1, BOOST_ASIO_MOVE_ARG(T2) x2, \
+ BOOST_ASIO_MOVE_ARG(T3) x3, BOOST_ASIO_MOVE_ARG(T4) x4, \
+ BOOST_ASIO_MOVE_ARG(T5) x5
+
+# define BOOST_ASIO_VARIADIC_MOVE_ARGS(n) \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS_##n
+
+# define BOOST_ASIO_VARIADIC_MOVE_ARGS_1 \
+ BOOST_ASIO_MOVE_CAST(T1)(x1)
+# define BOOST_ASIO_VARIADIC_MOVE_ARGS_2 \
+ BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2)
+# define BOOST_ASIO_VARIADIC_MOVE_ARGS_3 \
+ BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2), \
+ BOOST_ASIO_MOVE_CAST(T3)(x3)
+# define BOOST_ASIO_VARIADIC_MOVE_ARGS_4 \
+ BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2), \
+ BOOST_ASIO_MOVE_CAST(T3)(x3), BOOST_ASIO_MOVE_CAST(T4)(x4)
+# define BOOST_ASIO_VARIADIC_MOVE_ARGS_5 \
+ BOOST_ASIO_MOVE_CAST(T1)(x1), BOOST_ASIO_MOVE_CAST(T2)(x2), \
+ BOOST_ASIO_MOVE_CAST(T3)(x3), BOOST_ASIO_MOVE_CAST(T4)(x4), \
+ BOOST_ASIO_MOVE_CAST(T5)(x5)
+
+# define BOOST_ASIO_VARIADIC_DECAY(n) \
+ BOOST_ASIO_VARIADIC_DECAY_##n
+
+# define BOOST_ASIO_VARIADIC_DECAY_1 \
+ typename decay<T1>::type
+# define BOOST_ASIO_VARIADIC_DECAY_2 \
+ typename decay<T1>::type, typename decay<T2>::type
+# define BOOST_ASIO_VARIADIC_DECAY_3 \
+ typename decay<T1>::type, typename decay<T2>::type, \
+ typename decay<T3>::type
+# define BOOST_ASIO_VARIADIC_DECAY_4 \
+ typename decay<T1>::type, typename decay<T2>::type, \
+ typename decay<T3>::type, typename decay<T4>::type
+# define BOOST_ASIO_VARIADIC_DECAY_5 \
+ typename decay<T1>::type, typename decay<T2>::type, \
+ typename decay<T3>::type, typename decay<T4>::type, \
+ typename decay<T5>::type
+
+# define BOOST_ASIO_VARIADIC_GENERATE(m) m(1) m(2) m(3) m(4) m(5)
+
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#endif // BOOST_ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/wait_handler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/wait_handler.hpp
new file mode 100644
index 00000000000..b94773467ed
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/wait_handler.hpp
@@ -0,0 +1,89 @@
+//
+// detail/wait_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WAIT_HANDLER_HPP
+#define BOOST_ASIO_DETAIL_WAIT_HANDLER_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/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/handler_work.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class wait_handler : public wait_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(wait_handler);
+
+ wait_handler(Handler& h, const IoExecutor& ex)
+ : wait_op(&wait_handler::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(h)),
+ io_executor_(ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ wait_handler* h(static_cast<wait_handler*>(base));
+ ptr p = { boost::asio::detail::addressof(h->handler_), h, h };
+ handler_work<Handler, IoExecutor> w(h->handler_, h->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*h));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(h->handler_, h->ec_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WAIT_HANDLER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/wait_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/wait_op.hpp
new file mode 100644
index 00000000000..a6b88f6e355
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/wait_op.hpp
@@ -0,0 +1,47 @@
+//
+// detail/wait_op.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WAIT_OP_HPP
+#define BOOST_ASIO_DETAIL_WAIT_OP_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/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class wait_op
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ boost::system::error_code ec_;
+
+protected:
+ wait_op(func_type func)
+ : operation(func)
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WAIT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_event.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_event.hpp
new file mode 100644
index 00000000000..08de010af41
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_event.hpp
@@ -0,0 +1,153 @@
+//
+// detail/win_event.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EVENT_HPP
+#define BOOST_ASIO_DETAIL_WIN_EVENT_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_WINDOWS)
+
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_event
+ : private noncopyable
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL win_event();
+
+ // Destructor.
+ BOOST_ASIO_DECL ~win_event();
+
+ // Signal the event. (Retained for backward compatibility.)
+ template <typename Lock>
+ void signal(Lock& lock)
+ {
+ this->signal_all(lock);
+ }
+
+ // Signal all waiters.
+ template <typename Lock>
+ void signal_all(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ (void)lock;
+ state_ |= 1;
+ ::SetEvent(events_[0]);
+ }
+
+ // Unlock the mutex and signal one waiter.
+ template <typename Lock>
+ void unlock_and_signal_one(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ lock.unlock();
+ if (have_waiters)
+ ::SetEvent(events_[1]);
+ }
+
+ // If there's a waiter, unlock the mutex and signal it.
+ template <typename Lock>
+ bool maybe_unlock_and_signal_one(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ if (state_ > 1)
+ {
+ lock.unlock();
+ ::SetEvent(events_[1]);
+ return true;
+ }
+ return false;
+ }
+
+ // Reset the event.
+ template <typename Lock>
+ void clear(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ (void)lock;
+ ::ResetEvent(events_[0]);
+ state_ &= ~std::size_t(1);
+ }
+
+ // Wait for the event to become signalled.
+ template <typename Lock>
+ void wait(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ while ((state_ & 1) == 0)
+ {
+ state_ += 2;
+ lock.unlock();
+#if defined(BOOST_ASIO_WINDOWS_APP)
+ ::WaitForMultipleObjectsEx(2, events_, false, INFINITE, false);
+#else // defined(BOOST_ASIO_WINDOWS_APP)
+ ::WaitForMultipleObjects(2, events_, false, INFINITE);
+#endif // defined(BOOST_ASIO_WINDOWS_APP)
+ lock.lock();
+ state_ -= 2;
+ }
+ }
+
+ // Timed wait for the event to become signalled.
+ template <typename Lock>
+ bool wait_for_usec(Lock& lock, long usec)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ if ((state_ & 1) == 0)
+ {
+ state_ += 2;
+ lock.unlock();
+ DWORD msec = usec > 0 ? (usec < 1000 ? 1 : usec / 1000) : 0;
+#if defined(BOOST_ASIO_WINDOWS_APP)
+ ::WaitForMultipleObjectsEx(2, events_, false, msec, false);
+#else // defined(BOOST_ASIO_WINDOWS_APP)
+ ::WaitForMultipleObjects(2, events_, false, msec);
+#endif // defined(BOOST_ASIO_WINDOWS_APP)
+ lock.lock();
+ state_ -= 2;
+ }
+ return (state_ & 1) != 0;
+ }
+
+private:
+ HANDLE events_[2];
+ std::size_t state_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_event.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_WIN_EVENT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_fd_set_adapter.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_fd_set_adapter.hpp
new file mode 100644
index 00000000000..3f66d4af335
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_fd_set_adapter.hpp
@@ -0,0 +1,151 @@
+//
+// detail/win_fd_set_adapter.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_FD_SET_ADAPTER_HPP
+#define BOOST_ASIO_DETAIL_WIN_FD_SET_ADAPTER_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_WINDOWS) || defined(__CYGWIN__)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/reactor_op_queue.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Adapts the FD_SET type to meet the Descriptor_Set concept's requirements.
+class win_fd_set_adapter : noncopyable
+{
+public:
+ enum { default_fd_set_size = 1024 };
+
+ win_fd_set_adapter()
+ : capacity_(default_fd_set_size),
+ max_descriptor_(invalid_socket)
+ {
+ fd_set_ = static_cast<win_fd_set*>(::operator new(
+ sizeof(win_fd_set) - sizeof(SOCKET)
+ + sizeof(SOCKET) * (capacity_)));
+ fd_set_->fd_count = 0;
+ }
+
+ ~win_fd_set_adapter()
+ {
+ ::operator delete(fd_set_);
+ }
+
+ void reset()
+ {
+ fd_set_->fd_count = 0;
+ max_descriptor_ = invalid_socket;
+ }
+
+ bool set(socket_type descriptor)
+ {
+ for (u_int i = 0; i < fd_set_->fd_count; ++i)
+ if (fd_set_->fd_array[i] == descriptor)
+ return true;
+
+ reserve(fd_set_->fd_count + 1);
+ fd_set_->fd_array[fd_set_->fd_count++] = descriptor;
+ return true;
+ }
+
+ void set(reactor_op_queue<socket_type>& operations, op_queue<operation>&)
+ {
+ reactor_op_queue<socket_type>::iterator i = operations.begin();
+ while (i != operations.end())
+ {
+ reactor_op_queue<socket_type>::iterator op_iter = i++;
+ reserve(fd_set_->fd_count + 1);
+ fd_set_->fd_array[fd_set_->fd_count++] = op_iter->first;
+ }
+ }
+
+ bool is_set(socket_type descriptor) const
+ {
+ return !!__WSAFDIsSet(descriptor,
+ const_cast<fd_set*>(reinterpret_cast<const fd_set*>(fd_set_)));
+ }
+
+ operator fd_set*()
+ {
+ return reinterpret_cast<fd_set*>(fd_set_);
+ }
+
+ socket_type max_descriptor() const
+ {
+ return max_descriptor_;
+ }
+
+ void perform(reactor_op_queue<socket_type>& operations,
+ op_queue<operation>& ops) const
+ {
+ for (u_int i = 0; i < fd_set_->fd_count; ++i)
+ operations.perform_operations(fd_set_->fd_array[i], ops);
+ }
+
+private:
+ // This structure is defined to be compatible with the Windows API fd_set
+ // structure, but without being dependent on the value of FD_SETSIZE. We use
+ // the "struct hack" to allow the number of descriptors to be varied at
+ // runtime.
+ struct win_fd_set
+ {
+ u_int fd_count;
+ SOCKET fd_array[1];
+ };
+
+ // Increase the fd_set_ capacity to at least the specified number of elements.
+ void reserve(u_int n)
+ {
+ if (n <= capacity_)
+ return;
+
+ u_int new_capacity = capacity_ + capacity_ / 2;
+ if (new_capacity < n)
+ new_capacity = n;
+
+ win_fd_set* new_fd_set = static_cast<win_fd_set*>(::operator new(
+ sizeof(win_fd_set) - sizeof(SOCKET)
+ + sizeof(SOCKET) * (new_capacity)));
+
+ new_fd_set->fd_count = fd_set_->fd_count;
+ for (u_int i = 0; i < fd_set_->fd_count; ++i)
+ new_fd_set->fd_array[i] = fd_set_->fd_array[i];
+
+ ::operator delete(fd_set_);
+ fd_set_ = new_fd_set;
+ capacity_ = new_capacity;
+ }
+
+ win_fd_set* fd_set_;
+ u_int capacity_;
+ socket_type max_descriptor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_WIN_FD_SET_ADAPTER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_fenced_block.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_fenced_block.hpp
new file mode 100644
index 00000000000..42aee2d774a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_fenced_block.hpp
@@ -0,0 +1,92 @@
+//
+// detail/win_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_WIN_FENCED_BLOCK_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_WINDOWS) && !defined(UNDER_CE)
+
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_fenced_block
+ : private noncopyable
+{
+public:
+ enum half_t { half };
+ enum full_t { full };
+
+ // Constructor for a half fenced block.
+ explicit win_fenced_block(half_t)
+ {
+ }
+
+ // Constructor for a full fenced block.
+ explicit win_fenced_block(full_t)
+ {
+#if defined(__BORLANDC__)
+ LONG barrier = 0;
+ ::InterlockedExchange(&barrier, 1);
+#elif defined(BOOST_ASIO_MSVC) \
+ && ((BOOST_ASIO_MSVC < 1400) || !defined(MemoryBarrier))
+# if defined(_M_IX86)
+# pragma warning(push)
+# pragma warning(disable:4793)
+ LONG barrier;
+ __asm { xchg barrier, eax }
+# pragma warning(pop)
+# endif // defined(_M_IX86)
+#else
+ MemoryBarrier();
+#endif
+ }
+
+ // Destructor.
+ ~win_fenced_block()
+ {
+#if defined(__BORLANDC__)
+ LONG barrier = 0;
+ ::InterlockedExchange(&barrier, 1);
+#elif defined(BOOST_ASIO_MSVC) \
+ && ((BOOST_ASIO_MSVC < 1400) || !defined(MemoryBarrier))
+# if defined(_M_IX86)
+# pragma warning(push)
+# pragma warning(disable:4793)
+ LONG barrier;
+ __asm { xchg barrier, eax }
+# pragma warning(pop)
+# endif // defined(_M_IX86)
+#else
+ MemoryBarrier();
+#endif
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
+
+#endif // BOOST_ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_global.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_global.hpp
new file mode 100644
index 00000000000..1165579baa8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_global.hpp
@@ -0,0 +1,73 @@
+//
+// detail/win_global.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_;
+ 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>
+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>::instance_.ptr_ == 0)
+ win_global_impl<T>::instance_.ptr_ = new T;
+ win_global_impl<T>::tss_ptr_ = win_global_impl<T>::instance_.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.70.0/boost/asio/detail/win_iocp_handle_read_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_read_op.hpp
new file mode 100644
index 00000000000..04675ab9a4d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_read_op.hpp
@@ -0,0 +1,115 @@
+//
+// detail/win_iocp_handle_read_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_HANDLE_READ_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_READ_OP_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_IOCP)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class win_iocp_handle_read_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_read_op);
+
+ win_iocp_handle_read_op(const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : operation(&win_iocp_handle_read_op::do_complete),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_handle_read_op* o(static_cast<win_iocp_handle_read_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ if (owner)
+ {
+ // Check whether buffers are still valid.
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_HANDLE_EOF)
+ ec = boost::asio::error::eof;
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ MutableBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_READ_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_service.hpp
new file mode 100644
index 00000000000..92aa8e88cac
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_service.hpp
@@ -0,0 +1,337 @@
+//
+// detail/win_iocp_handle_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_HANDLE_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_SERVICE_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_IOCP)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/win_iocp_handle_read_op.hpp>
+#include <boost/asio/detail/win_iocp_handle_write_op.hpp>
+#include <boost/asio/detail/win_iocp_io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_iocp_handle_service :
+ public execution_context_service_base<win_iocp_handle_service>
+{
+public:
+ // The native type of a stream handle.
+ typedef HANDLE native_handle_type;
+
+ // The implementation type of the stream handle.
+ class implementation_type
+ {
+ public:
+ // Default constructor.
+ implementation_type()
+ : handle_(INVALID_HANDLE_VALUE),
+ safe_cancellation_thread_id_(0),
+ next_(0),
+ prev_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class win_iocp_handle_service;
+
+ // The native stream handle representation.
+ native_handle_type handle_;
+
+ // The ID of the thread from which it is safe to cancel asynchronous
+ // operations. 0 means no asynchronous operations have been started yet.
+ // ~0 means asynchronous operations have been started from more than one
+ // thread, and cancellation is not supported for the handle.
+ DWORD safe_cancellation_thread_id_;
+
+ // Pointers to adjacent handle implementations in linked list.
+ implementation_type* next_;
+ implementation_type* prev_;
+ };
+
+ BOOST_ASIO_DECL win_iocp_handle_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Construct a new handle implementation.
+ BOOST_ASIO_DECL void construct(implementation_type& impl);
+
+ // Move-construct a new handle implementation.
+ BOOST_ASIO_DECL void move_construct(implementation_type& impl,
+ implementation_type& other_impl);
+
+ // Move-assign from another handle implementation.
+ BOOST_ASIO_DECL void move_assign(implementation_type& impl,
+ win_iocp_handle_service& other_service,
+ implementation_type& other_impl);
+
+ // Destroy a handle implementation.
+ BOOST_ASIO_DECL void destroy(implementation_type& impl);
+
+ // Assign a native handle to a handle implementation.
+ BOOST_ASIO_DECL boost::system::error_code assign(implementation_type& impl,
+ const native_handle_type& handle, boost::system::error_code& ec);
+
+ // Determine whether the handle is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return impl.handle_ != INVALID_HANDLE_VALUE;
+ }
+
+ // Destroy a handle implementation.
+ BOOST_ASIO_DECL boost::system::error_code close(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Get the native handle representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return impl.handle_;
+ }
+
+ // Cancel all operations associated with the handle.
+ BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Write the given data. Returns the number of bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return write_some_at(impl, 0, buffers, ec);
+ }
+
+ // Write the given data at the specified offset. Returns the number of bytes
+ // written.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ boost::asio::const_buffer buffer =
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::first(buffers);
+
+ return do_write(impl, offset, buffer, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_handle_write_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
+ reinterpret_cast<uintmax_t>(impl.handle_), "async_write_some"));
+
+ start_write_op(impl, 0,
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::first(buffers), p.p);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous write at a specified offset. The data being written
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_handle_write_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
+ reinterpret_cast<uintmax_t>(impl.handle_), "async_write_some_at"));
+
+ start_write_op(impl, offset,
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::first(buffers), p.p);
+ p.v = p.p = 0;
+ }
+
+ // Read some data. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return read_some_at(impl, 0, buffers, ec);
+ }
+
+ // Read some data at a specified offset. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ boost::asio::mutable_buffer buffer =
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::first(buffers);
+
+ return do_read(impl, offset, buffer, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being received must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_handle_read_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
+ reinterpret_cast<uintmax_t>(impl.handle_), "async_read_some"));
+
+ start_read_op(impl, 0,
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::first(buffers), p.p);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous read at a specified offset. The buffer for the data
+ // being received must be valid for the lifetime of the asynchronous
+ // operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_handle_read_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
+ reinterpret_cast<uintmax_t>(impl.handle_), "async_read_some_at"));
+
+ start_read_op(impl, offset,
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::first(buffers), p.p);
+ p.v = p.p = 0;
+ }
+
+private:
+ // Prevent the use of the null_buffers type with this service.
+ size_t write_some(implementation_type& impl,
+ const null_buffers& buffers, boost::system::error_code& ec);
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const null_buffers& buffers, boost::system::error_code& ec);
+ template <typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const null_buffers& buffers, Handler& handler,
+ const IoExecutor& io_ex);
+ template <typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl, uint64_t offset,
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex);
+ size_t read_some(implementation_type& impl,
+ const null_buffers& buffers, boost::system::error_code& ec);
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const null_buffers& buffers, boost::system::error_code& ec);
+ template <typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const null_buffers& buffers, Handler& handler,
+ const IoExecutor& io_ex);
+ template <typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl, uint64_t offset,
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex);
+
+ // Helper class for waiting for synchronous operations to complete.
+ class overlapped_wrapper;
+
+ // Helper function to perform a synchronous write operation.
+ BOOST_ASIO_DECL size_t do_write(implementation_type& impl,
+ uint64_t offset, const boost::asio::const_buffer& buffer,
+ boost::system::error_code& ec);
+
+ // Helper function to start a write operation.
+ BOOST_ASIO_DECL void start_write_op(implementation_type& impl,
+ uint64_t offset, const boost::asio::const_buffer& buffer,
+ operation* op);
+
+ // Helper function to perform a synchronous write operation.
+ BOOST_ASIO_DECL size_t do_read(implementation_type& impl,
+ uint64_t offset, const boost::asio::mutable_buffer& buffer,
+ boost::system::error_code& ec);
+
+ // Helper function to start a read operation.
+ BOOST_ASIO_DECL void start_read_op(implementation_type& impl,
+ uint64_t offset, const boost::asio::mutable_buffer& buffer,
+ operation* op);
+
+ // Update the ID of the thread from which cancellation is safe.
+ BOOST_ASIO_DECL void update_cancellation_thread_id(implementation_type& impl);
+
+ // Helper function to close a handle when the associated object is being
+ // destroyed.
+ BOOST_ASIO_DECL void close_for_destruction(implementation_type& impl);
+
+ // The IOCP service used for running asynchronous operations and dispatching
+ // handlers.
+ win_iocp_io_context& iocp_service_;
+
+ // Mutex to protect access to the linked list of implementations.
+ mutex mutex_;
+
+ // The head of a linked list of all implementations.
+ implementation_type* impl_list_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_iocp_handle_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_write_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_write_op.hpp
new file mode 100644
index 00000000000..7e81eb843b4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_handle_write_op.hpp
@@ -0,0 +1,108 @@
+//
+// detail/win_iocp_handle_write_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_HANDLE_WRITE_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_WRITE_OP_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_IOCP)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class win_iocp_handle_write_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_write_op);
+
+ win_iocp_handle_write_op(const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : operation(&win_iocp_handle_write_op::do_complete),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& ec, std::size_t bytes_transferred)
+ {
+ // Take ownership of the operation object.
+ win_iocp_handle_write_op* o(static_cast<win_iocp_handle_write_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ if (owner)
+ {
+ // Check whether buffers are still valid.
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ ConstBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_WRITE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_io_context.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_io_context.hpp
new file mode 100644
index 00000000000..d551b9b27fe
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_io_context.hpp
@@ -0,0 +1,340 @@
+//
+// detail/win_iocp_io_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_IO_CONTEXT_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_IO_CONTEXT_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_IOCP)
+
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/thread.hpp>
+#include <boost/asio/detail/thread_context.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/timer_queue_set.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/detail/win_iocp_operation.hpp>
+#include <boost/asio/detail/win_iocp_thread_info.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class wait_op;
+
+class win_iocp_io_context
+ : public execution_context_service_base<win_iocp_io_context>,
+ public thread_context
+{
+public:
+ // Constructor. Specifies a concurrency hint that is passed through to the
+ // underlying I/O completion port.
+ BOOST_ASIO_DECL win_iocp_io_context(boost::asio::execution_context& ctx,
+ int concurrency_hint = -1, bool own_thread = true);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~win_iocp_io_context();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Initialise the task. Nothing to do here.
+ void init_task()
+ {
+ }
+
+ // Register a handle with the IO completion port.
+ BOOST_ASIO_DECL boost::system::error_code register_handle(
+ HANDLE handle, boost::system::error_code& ec);
+
+ // Run the event loop until stopped or no more work.
+ BOOST_ASIO_DECL size_t run(boost::system::error_code& ec);
+
+ // Run until stopped or one operation is performed.
+ BOOST_ASIO_DECL size_t run_one(boost::system::error_code& ec);
+
+ // Run until timeout, interrupted, or one operation is performed.
+ BOOST_ASIO_DECL size_t wait_one(long usec, boost::system::error_code& ec);
+
+ // Poll for operations without blocking.
+ BOOST_ASIO_DECL size_t poll(boost::system::error_code& ec);
+
+ // Poll for one operation without blocking.
+ BOOST_ASIO_DECL size_t poll_one(boost::system::error_code& ec);
+
+ // Stop the event processing loop.
+ BOOST_ASIO_DECL void stop();
+
+ // Determine whether the io_context is stopped.
+ bool stopped() const
+ {
+ return ::InterlockedExchangeAdd(&stopped_, 0) != 0;
+ }
+
+ // Restart in preparation for a subsequent run invocation.
+ void restart()
+ {
+ ::InterlockedExchange(&stopped_, 0);
+ }
+
+ // Notify that some work has started.
+ void work_started()
+ {
+ ::InterlockedIncrement(&outstanding_work_);
+ }
+
+ // Notify that some work has finished.
+ void work_finished()
+ {
+ if (::InterlockedDecrement(&outstanding_work_) == 0)
+ stop();
+ }
+
+ // Return whether a handler can be dispatched immediately.
+ bool can_dispatch()
+ {
+ return thread_call_stack::contains(this) != 0;
+ }
+
+ // Request invocation of the given operation and return immediately. Assumes
+ // that work_started() has not yet been called for the operation.
+ void post_immediate_completion(win_iocp_operation* op, bool)
+ {
+ work_started();
+ post_deferred_completion(op);
+ }
+
+ // Request invocation of the given operation and return immediately. Assumes
+ // that work_started() was previously called for the operation.
+ BOOST_ASIO_DECL void post_deferred_completion(win_iocp_operation* op);
+
+ // Request invocation of the given operation and return immediately. Assumes
+ // that work_started() was previously called for the operations.
+ BOOST_ASIO_DECL void post_deferred_completions(
+ op_queue<win_iocp_operation>& ops);
+
+ // Request invocation of the given operation using the thread-private queue
+ // and return immediately. Assumes that work_started() has not yet been
+ // called for the operation.
+ void post_private_immediate_completion(win_iocp_operation* op)
+ {
+ post_immediate_completion(op, false);
+ }
+
+ // Request invocation of the given operation using the thread-private queue
+ // and return immediately. Assumes that work_started() was previously called
+ // for the operation.
+ void post_private_deferred_completion(win_iocp_operation* op)
+ {
+ post_deferred_completion(op);
+ }
+
+ // Enqueue the given operation following a failed attempt to dispatch the
+ // operation for immediate invocation.
+ void do_dispatch(operation* op)
+ {
+ post_immediate_completion(op, false);
+ }
+
+ // Process unfinished operations as part of a shutdown operation. Assumes
+ // that work_started() was previously called for the operations.
+ BOOST_ASIO_DECL void abandon_operations(op_queue<operation>& ops);
+
+ // Called after starting an overlapped I/O operation that did not complete
+ // immediately. The caller must have already called work_started() prior to
+ // starting the operation.
+ BOOST_ASIO_DECL void on_pending(win_iocp_operation* op);
+
+ // Called after starting an overlapped I/O operation that completed
+ // immediately. The caller must have already called work_started() prior to
+ // starting the operation.
+ BOOST_ASIO_DECL void on_completion(win_iocp_operation* op,
+ DWORD last_error = 0, DWORD bytes_transferred = 0);
+
+ // Called after starting an overlapped I/O operation that completed
+ // immediately. The caller must have already called work_started() prior to
+ // starting the operation.
+ BOOST_ASIO_DECL void on_completion(win_iocp_operation* op,
+ const boost::system::error_code& ec, DWORD bytes_transferred = 0);
+
+ // Add a new timer queue to the service.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Remove a timer queue from the service.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer associated with the given token. Returns the number of
+ // handlers that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& to,
+ typename timer_queue<Time_Traits>::per_timer_data& from);
+
+ // Get the concurrency hint that was used to initialise the io_context.
+ int concurrency_hint() const
+ {
+ return concurrency_hint_;
+ }
+
+private:
+#if defined(WINVER) && (WINVER < 0x0500)
+ typedef DWORD dword_ptr_t;
+ typedef ULONG ulong_ptr_t;
+#else // defined(WINVER) && (WINVER < 0x0500)
+ typedef DWORD_PTR dword_ptr_t;
+ typedef ULONG_PTR ulong_ptr_t;
+#endif // defined(WINVER) && (WINVER < 0x0500)
+
+ // Dequeues at most one operation from the I/O completion port, and then
+ // executes it. Returns the number of operations that were dequeued (i.e.
+ // either 0 or 1).
+ BOOST_ASIO_DECL size_t do_one(DWORD msec, boost::system::error_code& ec);
+
+ // Helper to calculate the GetQueuedCompletionStatus timeout.
+ BOOST_ASIO_DECL static DWORD get_gqcs_timeout();
+
+ // Helper function to add a new timer queue.
+ BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Called to recalculate and update the timeout.
+ BOOST_ASIO_DECL void update_timeout();
+
+ // Helper class to call work_finished() on block exit.
+ struct work_finished_on_block_exit;
+
+ // Helper class for managing a HANDLE.
+ struct auto_handle
+ {
+ HANDLE handle;
+ auto_handle() : handle(0) {}
+ ~auto_handle() { if (handle) ::CloseHandle(handle); }
+ };
+
+ // The IO completion port used for queueing operations.
+ auto_handle iocp_;
+
+ // The count of unfinished work.
+ long outstanding_work_;
+
+ // Flag to indicate whether the event loop has been stopped.
+ mutable long stopped_;
+
+ // Flag to indicate whether there is an in-flight stop event. Every event
+ // posted using PostQueuedCompletionStatus consumes non-paged pool, so to
+ // avoid exhausting this resouce we limit the number of outstanding events.
+ long stop_event_posted_;
+
+ // Flag to indicate whether the service has been shut down.
+ long shutdown_;
+
+ enum
+ {
+ // Timeout to use with GetQueuedCompletionStatus on older versions of
+ // Windows. Some versions of windows have a "bug" where a call to
+ // GetQueuedCompletionStatus can appear stuck even though there are events
+ // waiting on the queue. Using a timeout helps to work around the issue.
+ default_gqcs_timeout = 500,
+
+ // Maximum waitable timer timeout, in milliseconds.
+ max_timeout_msec = 5 * 60 * 1000,
+
+ // Maximum waitable timer timeout, in microseconds.
+ max_timeout_usec = max_timeout_msec * 1000,
+
+ // Completion key value used to wake up a thread to dispatch timers or
+ // completed operations.
+ wake_for_dispatch = 1,
+
+ // Completion key value to indicate that an operation has posted with the
+ // original last_error and bytes_transferred values stored in the fields of
+ // the OVERLAPPED structure.
+ overlapped_contains_result = 2
+ };
+
+ // Timeout to use with GetQueuedCompletionStatus.
+ const DWORD gqcs_timeout_;
+
+ // Helper class to run the scheduler in its own thread.
+ struct thread_function;
+ friend struct thread_function;
+
+ // Function object for processing timeouts in a background thread.
+ struct timer_thread_function;
+ friend struct timer_thread_function;
+
+ // Background thread used for processing timeouts.
+ scoped_ptr<thread> timer_thread_;
+
+ // A waitable timer object used for waiting for timeouts.
+ auto_handle waitable_timer_;
+
+ // Non-zero if timers or completed operations need to be dispatched.
+ long dispatch_required_;
+
+ // Mutex for protecting access to the timer queues and completed operations.
+ mutex dispatch_mutex_;
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // The operations that are ready to dispatch.
+ op_queue<win_iocp_operation> completed_ops_;
+
+ // The concurrency hint used to initialise the io_context.
+ const int concurrency_hint_;
+
+ // The thread that is running the io_context.
+ scoped_ptr<thread> thread_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/win_iocp_io_context.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_iocp_io_context.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_null_buffers_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_null_buffers_op.hpp
new file mode 100644
index 00000000000..c32163987fa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_null_buffers_op.hpp
@@ -0,0 +1,125 @@
+//
+// detail/win_iocp_null_buffers_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_NULL_BUFFERS_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_NULL_BUFFERS_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class win_iocp_null_buffers_op : public reactor_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_null_buffers_op);
+
+ win_iocp_null_buffers_op(socket_ops::weak_cancel_token_type cancel_token,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(&win_iocp_null_buffers_op::do_perform,
+ &win_iocp_null_buffers_op::do_complete),
+ cancel_token_(cancel_token),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static status do_perform(reactor_op*)
+ {
+ return done;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_null_buffers_op* o(static_cast<win_iocp_null_buffers_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // The reactor may have stored a result in the operation object.
+ if (o->ec_)
+ ec = o->ec_;
+
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ {
+ if (o->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;
+ }
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ socket_ops::weak_cancel_token_type cancel_token_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_NULL_BUFFERS_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_operation.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_operation.hpp
new file mode 100644
index 00000000000..5cad6e338c6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_operation.hpp
@@ -0,0 +1,98 @@
+//
+// detail/win_iocp_operation.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_OPERATION_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_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_IOCP)
+
+#include <boost/asio/detail/handler_tracking.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/system/error_code.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_iocp_io_context;
+
+// Base class for all operations. A function pointer is used instead of virtual
+// functions to avoid the associated overhead.
+class win_iocp_operation
+ : public OVERLAPPED
+ BOOST_ASIO_ALSO_INHERIT_TRACKED_HANDLER
+{
+public:
+ typedef win_iocp_operation operation_type;
+
+ void complete(void* owner, const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ func_(owner, this, ec, bytes_transferred);
+ }
+
+ void destroy()
+ {
+ func_(0, this, boost::system::error_code(), 0);
+ }
+
+protected:
+ typedef void (*func_type)(
+ void*, win_iocp_operation*,
+ const boost::system::error_code&, std::size_t);
+
+ win_iocp_operation(func_type func)
+ : next_(0),
+ func_(func)
+ {
+ reset();
+ }
+
+ // Prevents deletion through this type.
+ ~win_iocp_operation()
+ {
+ }
+
+ void reset()
+ {
+ Internal = 0;
+ InternalHigh = 0;
+ Offset = 0;
+ OffsetHigh = 0;
+ hEvent = 0;
+ ready_ = 0;
+ }
+
+private:
+ friend class op_queue_access;
+ friend class win_iocp_io_context;
+ win_iocp_operation* next_;
+ func_type func_;
+ long ready_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_op.hpp
new file mode 100644
index 00000000000..c36e764a110
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_op.hpp
@@ -0,0 +1,94 @@
+//
+// detail/win_iocp_overlapped_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_OVERLAPPED_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_OP_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_IOCP)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class win_iocp_overlapped_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_overlapped_op);
+
+ win_iocp_overlapped_op(Handler& handler, const IoExecutor& io_ex)
+ : operation(&win_iocp_overlapped_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& ec, std::size_t bytes_transferred)
+ {
+ // Take ownership of the operation object.
+ win_iocp_overlapped_op* o(static_cast<win_iocp_overlapped_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp
new file mode 100644
index 00000000000..d1ed1cb1a0e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp
@@ -0,0 +1,161 @@
+//
+// detail/win_iocp_overlapped_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_OVERLAPPED_PTR_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_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_IOCP)
+
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/io_object_executor.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/win_iocp_overlapped_op.hpp>
+#include <boost/asio/detail/win_iocp_io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Wraps a handler to create an OVERLAPPED object for use with overlapped I/O.
+class win_iocp_overlapped_ptr
+ : private noncopyable
+{
+public:
+ // Construct an empty win_iocp_overlapped_ptr.
+ win_iocp_overlapped_ptr()
+ : ptr_(0),
+ iocp_service_(0)
+ {
+ }
+
+ // Construct an win_iocp_overlapped_ptr to contain the specified handler.
+ template <typename Executor, typename Handler>
+ explicit win_iocp_overlapped_ptr(const Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Handler) handler)
+ : ptr_(0),
+ iocp_service_(0)
+ {
+ this->reset(ex, BOOST_ASIO_MOVE_CAST(Handler)(handler));
+ }
+
+ // Destructor automatically frees the OVERLAPPED object unless released.
+ ~win_iocp_overlapped_ptr()
+ {
+ reset();
+ }
+
+ // Reset to empty.
+ void reset()
+ {
+ if (ptr_)
+ {
+ ptr_->destroy();
+ ptr_ = 0;
+ iocp_service_->work_finished();
+ iocp_service_ = 0;
+ }
+ }
+
+ // Reset to contain the specified handler, freeing any current OVERLAPPED
+ // object.
+ template <typename Executor, typename Handler>
+ void reset(const Executor& ex, Handler handler)
+ {
+ const bool native = is_same<Executor, io_context::executor_type>::value;
+ win_iocp_io_context* iocp_service = this->get_iocp_service(ex);
+
+ typedef win_iocp_overlapped_op<Handler, io_object_executor<Executor> > op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_object_executor<Executor>(ex, native));
+
+ BOOST_ASIO_HANDLER_CREATION((ex.context(), *p.p,
+ "iocp_service", iocp_service, 0, "overlapped"));
+
+ iocp_service->work_started();
+ reset();
+ ptr_ = p.p;
+ p.v = p.p = 0;
+ iocp_service_ = iocp_service;
+ }
+
+ // Get the contained OVERLAPPED object.
+ OVERLAPPED* get()
+ {
+ return ptr_;
+ }
+
+ // Get the contained OVERLAPPED object.
+ const OVERLAPPED* get() const
+ {
+ return ptr_;
+ }
+
+ // Release ownership of the OVERLAPPED object.
+ OVERLAPPED* release()
+ {
+ if (ptr_)
+ iocp_service_->on_pending(ptr_);
+
+ OVERLAPPED* tmp = ptr_;
+ ptr_ = 0;
+ iocp_service_ = 0;
+ return tmp;
+ }
+
+ // Post completion notification for overlapped operation. Releases ownership.
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ if (ptr_)
+ {
+ iocp_service_->on_completion(ptr_, ec,
+ static_cast<DWORD>(bytes_transferred));
+ ptr_ = 0;
+ iocp_service_ = 0;
+ }
+ }
+
+private:
+ template <typename Executor>
+ static win_iocp_io_context* get_iocp_service(const Executor& ex)
+ {
+ return &use_service<win_iocp_io_context>(ex.context());
+ }
+
+ static win_iocp_io_context* get_iocp_service(
+ const io_context::executor_type& ex)
+ {
+ return &ex.context().impl_;
+ }
+
+ win_iocp_operation* ptr_;
+ win_iocp_io_context* iocp_service_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_serial_port_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_serial_port_service.hpp
new file mode 100644
index 00000000000..6f05d92fc15
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_serial_port_service.hpp
@@ -0,0 +1,234 @@
+//
+// detail/win_iocp_serial_port_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IOCP_SERIAL_PORT_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SERIAL_PORT_SERVICE_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_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#include <string>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/win_iocp_handle_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Extend win_iocp_handle_service to provide serial port support.
+class win_iocp_serial_port_service :
+ public execution_context_service_base<win_iocp_serial_port_service>
+{
+public:
+ // The native type of a serial port.
+ typedef win_iocp_handle_service::native_handle_type native_handle_type;
+
+ // The implementation type of the serial port.
+ typedef win_iocp_handle_service::implementation_type implementation_type;
+
+ // Constructor.
+ BOOST_ASIO_DECL win_iocp_serial_port_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Construct a new serial port implementation.
+ void construct(implementation_type& impl)
+ {
+ handle_service_.construct(impl);
+ }
+
+ // Move-construct a new serial port implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ handle_service_.move_construct(impl, other_impl);
+ }
+
+ // Move-assign from another serial port implementation.
+ void move_assign(implementation_type& impl,
+ win_iocp_serial_port_service& other_service,
+ implementation_type& other_impl)
+ {
+ handle_service_.move_assign(impl,
+ other_service.handle_service_, other_impl);
+ }
+
+ // Destroy a serial port implementation.
+ void destroy(implementation_type& impl)
+ {
+ handle_service_.destroy(impl);
+ }
+
+ // Open the serial port using the specified device name.
+ BOOST_ASIO_DECL boost::system::error_code open(implementation_type& impl,
+ const std::string& device, boost::system::error_code& ec);
+
+ // Assign a native handle to a serial port implementation.
+ boost::system::error_code assign(implementation_type& impl,
+ const native_handle_type& handle, boost::system::error_code& ec)
+ {
+ return handle_service_.assign(impl, handle, ec);
+ }
+
+ // Determine whether the serial port is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return handle_service_.is_open(impl);
+ }
+
+ // Destroy a serial port implementation.
+ boost::system::error_code close(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ return handle_service_.close(impl, ec);
+ }
+
+ // Get the native serial port representation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return handle_service_.native_handle(impl);
+ }
+
+ // Cancel all operations associated with the handle.
+ boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ return handle_service_.cancel(impl, ec);
+ }
+
+ // Set an option on the serial port.
+ template <typename SettableSerialPortOption>
+ boost::system::error_code set_option(implementation_type& impl,
+ const SettableSerialPortOption& option, boost::system::error_code& ec)
+ {
+ return do_set_option(impl,
+ &win_iocp_serial_port_service::store_option<SettableSerialPortOption>,
+ &option, ec);
+ }
+
+ // Get an option from the serial port.
+ template <typename GettableSerialPortOption>
+ boost::system::error_code get_option(const implementation_type& impl,
+ GettableSerialPortOption& option, boost::system::error_code& ec) const
+ {
+ return do_get_option(impl,
+ &win_iocp_serial_port_service::load_option<GettableSerialPortOption>,
+ &option, ec);
+ }
+
+ // Send a break sequence to the serial port.
+ boost::system::error_code send_break(implementation_type&,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Write the given data. Returns the number of bytes sent.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return handle_service_.write_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ handle_service_.async_write_some(impl, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return handle_service_.read_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being received must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ handle_service_.async_read_some(impl, buffers, handler, io_ex);
+ }
+
+private:
+ // Function pointer type for storing a serial port option.
+ typedef boost::system::error_code (*store_function_type)(
+ const void*, ::DCB&, boost::system::error_code&);
+
+ // Helper function template to store a serial port option.
+ template <typename SettableSerialPortOption>
+ static boost::system::error_code store_option(const void* option,
+ ::DCB& storage, boost::system::error_code& ec)
+ {
+ static_cast<const SettableSerialPortOption*>(option)->store(storage, ec);
+ return ec;
+ }
+
+ // Helper function to set a serial port option.
+ BOOST_ASIO_DECL boost::system::error_code do_set_option(
+ implementation_type& impl, store_function_type store,
+ const void* option, boost::system::error_code& ec);
+
+ // Function pointer type for loading a serial port option.
+ typedef boost::system::error_code (*load_function_type)(
+ void*, const ::DCB&, boost::system::error_code&);
+
+ // Helper function template to load a serial port option.
+ template <typename GettableSerialPortOption>
+ static boost::system::error_code load_option(void* option,
+ const ::DCB& storage, boost::system::error_code& ec)
+ {
+ static_cast<GettableSerialPortOption*>(option)->load(storage, ec);
+ return ec;
+ }
+
+ // Helper function to get a serial port option.
+ BOOST_ASIO_DECL boost::system::error_code do_get_option(
+ const implementation_type& impl, load_function_type load,
+ void* option, boost::system::error_code& ec) const;
+
+ // The implementation used for initiating asynchronous operations.
+ win_iocp_handle_service handle_service_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_iocp_serial_port_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_IOCP) && defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SERIAL_PORT_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_accept_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_accept_op.hpp
new file mode 100644
index 00000000000..75dadc27c1d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_accept_op.hpp
@@ -0,0 +1,308 @@
+//
+// detail/win_iocp_socket_accept_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_ACCEPT_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_ACCEPT_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/win_iocp_socket_service_base.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Socket, typename Protocol,
+ typename Handler, typename IoExecutor>
+class win_iocp_socket_accept_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_accept_op);
+
+ win_iocp_socket_accept_op(win_iocp_socket_service_base& socket_service,
+ socket_type socket, Socket& peer, const Protocol& protocol,
+ typename Protocol::endpoint* peer_endpoint,
+ bool enable_connection_aborted, Handler& handler, const IoExecutor& io_ex)
+ : operation(&win_iocp_socket_accept_op::do_complete),
+ socket_service_(socket_service),
+ socket_(socket),
+ peer_(peer),
+ protocol_(protocol),
+ peer_endpoint_(peer_endpoint),
+ enable_connection_aborted_(enable_connection_aborted),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ socket_holder& new_socket()
+ {
+ return new_socket_;
+ }
+
+ void* output_buffer()
+ {
+ return output_buffer_;
+ }
+
+ DWORD address_length()
+ {
+ return sizeof(sockaddr_storage_type) + 16;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t /*bytes_transferred*/)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_accept_op* o(static_cast<win_iocp_socket_accept_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ if (owner)
+ {
+ typename Protocol::endpoint peer_endpoint;
+ std::size_t addr_len = peer_endpoint.capacity();
+ socket_ops::complete_iocp_accept(o->socket_,
+ o->output_buffer(), o->address_length(),
+ peer_endpoint.data(), &addr_len,
+ o->new_socket_.get(), ec);
+
+ // Restart the accept operation if we got the connection_aborted error
+ // and the enable_connection_aborted socket option is not set.
+ if (ec == boost::asio::error::connection_aborted
+ && !o->enable_connection_aborted_)
+ {
+ o->reset();
+ o->socket_service_.restart_accept_op(o->socket_,
+ o->new_socket_, o->protocol_.family(),
+ o->protocol_.type(), o->protocol_.protocol(),
+ o->output_buffer(), o->address_length(), o);
+ p.v = p.p = 0;
+ return;
+ }
+
+ // If the socket was successfully accepted, transfer ownership of the
+ // socket to the peer object.
+ if (!ec)
+ {
+ o->peer_.assign(o->protocol_,
+ typename Socket::native_handle_type(
+ o->new_socket_.get(), peer_endpoint), ec);
+ if (!ec)
+ o->new_socket_.release();
+ }
+
+ // Pass endpoint back to caller.
+ if (o->peer_endpoint_)
+ *o->peer_endpoint_ = peer_endpoint;
+ }
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, ec);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ win_iocp_socket_service_base& socket_service_;
+ socket_type socket_;
+ socket_holder new_socket_;
+ Socket& peer_;
+ Protocol protocol_;
+ typename Protocol::endpoint* peer_endpoint_;
+ unsigned char output_buffer_[(sizeof(sockaddr_storage_type) + 16) * 2];
+ bool enable_connection_aborted_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+
+template <typename Protocol, typename PeerIoExecutor,
+ typename Handler, typename IoExecutor>
+class win_iocp_socket_move_accept_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_move_accept_op);
+
+ win_iocp_socket_move_accept_op(
+ win_iocp_socket_service_base& socket_service, socket_type socket,
+ const Protocol& protocol, const PeerIoExecutor& peer_io_ex,
+ typename Protocol::endpoint* peer_endpoint,
+ bool enable_connection_aborted, Handler& handler, const IoExecutor& io_ex)
+ : operation(&win_iocp_socket_move_accept_op::do_complete),
+ socket_service_(socket_service),
+ socket_(socket),
+ peer_(peer_io_ex),
+ protocol_(protocol),
+ peer_endpoint_(peer_endpoint),
+ enable_connection_aborted_(enable_connection_aborted),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ socket_holder& new_socket()
+ {
+ return new_socket_;
+ }
+
+ void* output_buffer()
+ {
+ return output_buffer_;
+ }
+
+ DWORD address_length()
+ {
+ return sizeof(sockaddr_storage_type) + 16;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t /*bytes_transferred*/)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_move_accept_op* o(
+ static_cast<win_iocp_socket_move_accept_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ if (owner)
+ {
+ typename Protocol::endpoint peer_endpoint;
+ std::size_t addr_len = peer_endpoint.capacity();
+ socket_ops::complete_iocp_accept(o->socket_,
+ o->output_buffer(), o->address_length(),
+ peer_endpoint.data(), &addr_len,
+ o->new_socket_.get(), ec);
+
+ // Restart the accept operation if we got the connection_aborted error
+ // and the enable_connection_aborted socket option is not set.
+ if (ec == boost::asio::error::connection_aborted
+ && !o->enable_connection_aborted_)
+ {
+ o->reset();
+ o->socket_service_.restart_accept_op(o->socket_,
+ o->new_socket_, o->protocol_.family(),
+ o->protocol_.type(), o->protocol_.protocol(),
+ o->output_buffer(), o->address_length(), o);
+ p.v = p.p = 0;
+ return;
+ }
+
+ // If the socket was successfully accepted, transfer ownership of the
+ // socket to the peer object.
+ if (!ec)
+ {
+ o->peer_.assign(o->protocol_,
+ typename Protocol::socket::native_handle_type(
+ o->new_socket_.get(), peer_endpoint), ec);
+ if (!ec)
+ o->new_socket_.release();
+ }
+
+ // Pass endpoint back to caller.
+ if (o->peer_endpoint_)
+ *o->peer_endpoint_ = peer_endpoint;
+ }
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::move_binder2<Handler,
+ boost::system::error_code, peer_socket_type>
+ handler(0, BOOST_ASIO_MOVE_CAST(Handler)(o->handler_), ec,
+ BOOST_ASIO_MOVE_CAST(peer_socket_type)(o->peer_));
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ typedef typename Protocol::socket::template
+ rebind_executor<PeerIoExecutor>::other peer_socket_type;
+
+ win_iocp_socket_service_base& socket_service_;
+ socket_type socket_;
+ socket_holder new_socket_;
+ peer_socket_type peer_;
+ Protocol protocol_;
+ typename Protocol::endpoint* peer_endpoint_;
+ unsigned char output_buffer_[(sizeof(sockaddr_storage_type) + 16) * 2];
+ bool enable_connection_aborted_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_ACCEPT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_connect_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_connect_op.hpp
new file mode 100644
index 00000000000..0041a059ab9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_connect_op.hpp
@@ -0,0 +1,132 @@
+//
+// detail/win_iocp_socket_connect_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_CONNECT_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_CONNECT_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_iocp_socket_connect_op_base : public reactor_op
+{
+public:
+ win_iocp_socket_connect_op_base(socket_type socket, func_type complete_func)
+ : reactor_op(&win_iocp_socket_connect_op_base::do_perform, complete_func),
+ socket_(socket),
+ connect_ex_(false)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ win_iocp_socket_connect_op_base* o(
+ static_cast<win_iocp_socket_connect_op_base*>(base));
+
+ return socket_ops::non_blocking_connect(
+ o->socket_, o->ec_) ? done : not_done;
+ }
+
+ socket_type socket_;
+ bool connect_ex_;
+};
+
+template <typename Handler, typename IoExecutor>
+class win_iocp_socket_connect_op : public win_iocp_socket_connect_op_base
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_connect_op);
+
+ win_iocp_socket_connect_op(socket_type socket,
+ Handler& handler, const IoExecutor& io_ex)
+ : win_iocp_socket_connect_op_base(socket,
+ &win_iocp_socket_connect_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t /*bytes_transferred*/)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_connect_op* o(
+ static_cast<win_iocp_socket_connect_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ if (owner)
+ {
+ if (o->connect_ex_)
+ socket_ops::complete_iocp_connect(o->socket_, ec);
+ else
+ ec = o->ec_;
+ }
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, ec);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_CONNECT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recv_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recv_op.hpp
new file mode 100644
index 00000000000..daa3ca24ec6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recv_op.hpp
@@ -0,0 +1,122 @@
+//
+// detail/win_iocp_socket_recv_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_RECV_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECV_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class win_iocp_socket_recv_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_recv_op);
+
+ win_iocp_socket_recv_op(socket_ops::state_type state,
+ socket_ops::weak_cancel_token_type cancel_token,
+ const MutableBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : operation(&win_iocp_socket_recv_op::do_complete),
+ state_(state),
+ cancel_token_(cancel_token),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_recv_op* o(static_cast<win_iocp_socket_recv_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ // Check whether buffers are still valid.
+ if (owner)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ socket_ops::complete_iocp_recv(o->state_, o->cancel_token_,
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(o->buffers_),
+ ec, bytes_transferred);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ socket_ops::state_type state_;
+ socket_ops::weak_cancel_token_type cancel_token_;
+ MutableBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECV_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
new file mode 100644
index 00000000000..bfd469a3d0c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
@@ -0,0 +1,131 @@
+//
+// detail/win_iocp_socket_recvfrom_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_RECVFROM_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class win_iocp_socket_recvfrom_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_recvfrom_op);
+
+ win_iocp_socket_recvfrom_op(Endpoint& endpoint,
+ socket_ops::weak_cancel_token_type cancel_token,
+ const MutableBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : operation(&win_iocp_socket_recvfrom_op::do_complete),
+ endpoint_(endpoint),
+ endpoint_size_(static_cast<int>(endpoint.capacity())),
+ cancel_token_(cancel_token),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ int& endpoint_size()
+ {
+ return endpoint_size_;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_recvfrom_op* o(
+ static_cast<win_iocp_socket_recvfrom_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ // Check whether buffers are still valid.
+ if (owner)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ socket_ops::complete_iocp_recvfrom(o->cancel_token_, ec);
+
+ // Record the size of the endpoint returned by the operation.
+ o->endpoint_.resize(o->endpoint_size_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Endpoint& endpoint_;
+ int endpoint_size_;
+ socket_ops::weak_cancel_token_type cancel_token_;
+ MutableBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
new file mode 100644
index 00000000000..73127dca802
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
@@ -0,0 +1,123 @@
+//
+// detail/win_iocp_socket_recvmsg_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_RECVMSG_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVMSG_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/socket_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class win_iocp_socket_recvmsg_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_recvmsg_op);
+
+ win_iocp_socket_recvmsg_op(
+ socket_ops::weak_cancel_token_type cancel_token,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags& out_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : operation(&win_iocp_socket_recvmsg_op::do_complete),
+ cancel_token_(cancel_token),
+ buffers_(buffers),
+ out_flags_(out_flags),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_recvmsg_op* o(
+ static_cast<win_iocp_socket_recvmsg_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ // Check whether buffers are still valid.
+ if (owner)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ socket_ops::complete_iocp_recvmsg(o->cancel_token_, ec);
+ o->out_flags_ = 0;
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ socket_ops::weak_cancel_token_type cancel_token_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags& out_flags_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_RECVMSG_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_send_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_send_op.hpp
new file mode 100644
index 00000000000..5f1fc4ad8e6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_send_op.hpp
@@ -0,0 +1,116 @@
+//
+// detail/win_iocp_socket_send_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_SEND_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SEND_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class win_iocp_socket_send_op : public operation
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_send_op);
+
+ win_iocp_socket_send_op(socket_ops::weak_cancel_token_type cancel_token,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : operation(&win_iocp_socket_send_op::do_complete),
+ cancel_token_(cancel_token),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_socket_send_op* o(static_cast<win_iocp_socket_send_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ // Check whether buffers are still valid.
+ if (owner)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ socket_ops::complete_iocp_send(o->cancel_token_, ec);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, ec, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ socket_ops::weak_cancel_token_type cancel_token_;
+ ConstBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SEND_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service.hpp
new file mode 100644
index 00000000000..df2292a55e1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service.hpp
@@ -0,0 +1,583 @@
+//
+// detail/win_iocp_socket_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_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_IOCP)
+
+#include <cstring>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/select_reactor.hpp>
+#include <boost/asio/detail/socket_holder.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/win_iocp_io_context.hpp>
+#include <boost/asio/detail/win_iocp_null_buffers_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_accept_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_connect_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_recvfrom_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_send_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_service_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class win_iocp_socket_service :
+ public execution_context_service_base<win_iocp_socket_service<Protocol> >,
+ public win_iocp_socket_service_base
+{
+public:
+ // The protocol type.
+ typedef Protocol protocol_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The native type of a socket.
+ class native_handle_type
+ {
+ public:
+ native_handle_type(socket_type s)
+ : socket_(s),
+ have_remote_endpoint_(false)
+ {
+ }
+
+ native_handle_type(socket_type s, const endpoint_type& ep)
+ : socket_(s),
+ have_remote_endpoint_(true),
+ remote_endpoint_(ep)
+ {
+ }
+
+ void operator=(socket_type s)
+ {
+ socket_ = s;
+ have_remote_endpoint_ = false;
+ remote_endpoint_ = endpoint_type();
+ }
+
+ operator socket_type() const
+ {
+ return socket_;
+ }
+
+ bool have_remote_endpoint() const
+ {
+ return have_remote_endpoint_;
+ }
+
+ endpoint_type remote_endpoint() const
+ {
+ return remote_endpoint_;
+ }
+
+ private:
+ socket_type socket_;
+ bool have_remote_endpoint_;
+ endpoint_type remote_endpoint_;
+ };
+
+ // The implementation type of the socket.
+ struct implementation_type :
+ win_iocp_socket_service_base::base_implementation_type
+ {
+ // Default constructor.
+ implementation_type()
+ : protocol_(endpoint_type().protocol()),
+ have_remote_endpoint_(false),
+ remote_endpoint_()
+ {
+ }
+
+ // The protocol associated with the socket.
+ protocol_type protocol_;
+
+ // Whether we have a cached remote endpoint.
+ bool have_remote_endpoint_;
+
+ // A cached remote endpoint.
+ endpoint_type remote_endpoint_;
+ };
+
+ // Constructor.
+ win_iocp_socket_service(execution_context& context)
+ : execution_context_service_base<
+ win_iocp_socket_service<Protocol> >(context),
+ win_iocp_socket_service_base(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ this->base_shutdown();
+ }
+
+ // Move-construct a new socket implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+
+ impl.have_remote_endpoint_ = other_impl.have_remote_endpoint_;
+ other_impl.have_remote_endpoint_ = false;
+
+ impl.remote_endpoint_ = other_impl.remote_endpoint_;
+ other_impl.remote_endpoint_ = endpoint_type();
+ }
+
+ // Move-assign from another socket implementation.
+ void move_assign(implementation_type& impl,
+ win_iocp_socket_service_base& other_service,
+ implementation_type& other_impl)
+ {
+ this->base_move_assign(impl, other_service, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+
+ impl.have_remote_endpoint_ = other_impl.have_remote_endpoint_;
+ other_impl.have_remote_endpoint_ = false;
+
+ impl.remote_endpoint_ = other_impl.remote_endpoint_;
+ other_impl.remote_endpoint_ = endpoint_type();
+ }
+
+ // Move-construct a new socket implementation from another protocol type.
+ template <typename Protocol1>
+ void converting_move_construct(implementation_type& impl,
+ win_iocp_socket_service<Protocol1>&,
+ typename win_iocp_socket_service<
+ Protocol1>::implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = protocol_type(other_impl.protocol_);
+ other_impl.protocol_ = typename Protocol1::endpoint().protocol();
+
+ impl.have_remote_endpoint_ = other_impl.have_remote_endpoint_;
+ other_impl.have_remote_endpoint_ = false;
+
+ impl.remote_endpoint_ = other_impl.remote_endpoint_;
+ other_impl.remote_endpoint_ = typename Protocol1::endpoint();
+ }
+
+ // Open a new socket implementation.
+ boost::system::error_code open(implementation_type& impl,
+ const protocol_type& protocol, boost::system::error_code& ec)
+ {
+ if (!do_open(impl, protocol.family(),
+ protocol.type(), protocol.protocol(), ec))
+ {
+ impl.protocol_ = protocol;
+ impl.have_remote_endpoint_ = false;
+ impl.remote_endpoint_ = endpoint_type();
+ }
+ return ec;
+ }
+
+ // Assign a native socket to a socket implementation.
+ boost::system::error_code assign(implementation_type& impl,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ boost::system::error_code& ec)
+ {
+ if (!do_assign(impl, protocol.type(), native_socket, ec))
+ {
+ impl.protocol_ = protocol;
+ impl.have_remote_endpoint_ = native_socket.have_remote_endpoint();
+ impl.remote_endpoint_ = native_socket.remote_endpoint();
+ }
+ return ec;
+ }
+
+ // Get the native socket representation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ if (impl.have_remote_endpoint_)
+ return native_handle_type(impl.socket_, impl.remote_endpoint_);
+ return native_handle_type(impl.socket_);
+ }
+
+ // Bind the socket to the specified local endpoint.
+ boost::system::error_code bind(implementation_type& impl,
+ const endpoint_type& endpoint, boost::system::error_code& ec)
+ {
+ socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code set_option(implementation_type& impl,
+ const Option& option, boost::system::error_code& ec)
+ {
+ socket_ops::setsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), option.size(impl.protocol_), ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code get_option(const implementation_type& impl,
+ Option& option, boost::system::error_code& ec) const
+ {
+ std::size_t size = option.size(impl.protocol_);
+ socket_ops::getsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), &size, ec);
+ if (!ec)
+ option.resize(impl.protocol_, size);
+ return ec;
+ }
+
+ // Get the local endpoint.
+ endpoint_type local_endpoint(const implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ return endpoint_type();
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Get the remote endpoint.
+ endpoint_type remote_endpoint(const implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ endpoint_type endpoint = impl.remote_endpoint_;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getpeername(impl.socket_, endpoint.data(),
+ &addr_len, impl.have_remote_endpoint_, ec))
+ return endpoint_type();
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Disable sends or receives on the socket.
+ boost::system::error_code shutdown(base_implementation_type& impl,
+ socket_base::shutdown_type what, boost::system::error_code& ec)
+ {
+ socket_ops::shutdown(impl.socket_, what, ec);
+ return ec;
+ }
+
+ // Send a datagram to the specified endpoint. Returns the number of bytes
+ // sent.
+ template <typename ConstBufferSequence>
+ size_t send_to(implementation_type& impl, const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_sendto(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags,
+ destination.data(), destination.size(), ec);
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl,
+ const ConstBufferSequence& buffers, const endpoint_type& destination,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_send_to"));
+
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ start_send_to_op(impl, bufs.buffers(), bufs.count(),
+ destination.data(), static_cast<int>(destination.size()),
+ flags, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_send_to(null_buffers)"));
+
+ start_reactor_op(impl, select_reactor::write_op, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Receive a datagram with the endpoint of the sender. Returns the number of
+ // bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ std::size_t addr_len = sender_endpoint.capacity();
+ std::size_t bytes_recvd = socket_ops::sync_recvfrom(
+ impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
+ flags, sender_endpoint.data(), &addr_len, ec);
+
+ if (!ec)
+ sender_endpoint.resize(addr_len);
+
+ return bytes_recvd;
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_from(implementation_type& impl,
+ const null_buffers&, endpoint_type& sender_endpoint,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received and
+ // the sender_endpoint object must both be valid for the lifetime of the
+ // asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers, endpoint_type& sender_endp,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_recvfrom_op<MutableBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(sender_endp, impl.cancel_token_,
+ buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_receive_from"));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ start_receive_from_op(impl, bufs.buffers(), bufs.count(),
+ sender_endp.data(), flags, &p.p->endpoint_size(), p.p);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_receive_from(null_buffers)"));
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ start_null_buffers_receive_op(impl, flags, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Accept a new connection.
+ template <typename Socket>
+ boost::system::error_code accept(implementation_type& impl, Socket& peer,
+ endpoint_type* peer_endpoint, boost::system::error_code& ec)
+ {
+ // We cannot accept a socket that is already open.
+ if (peer.is_open())
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
+ socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
+ impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
+ peer_endpoint ? &addr_len : 0, ec));
+
+ // On success, assign new connection to peer socket object.
+ if (new_socket.get() != invalid_socket)
+ {
+ if (peer_endpoint)
+ peer_endpoint->resize(addr_len);
+ peer.assign(impl.protocol_, new_socket.get(), ec);
+ if (!ec)
+ new_socket.release();
+ }
+
+ return ec;
+ }
+
+ // Start an asynchronous accept. The peer and peer_endpoint objects
+ // must be valid until the accept's handler is invoked.
+ template <typename Socket, typename Handler, typename IoExecutor>
+ void async_accept(implementation_type& impl, Socket& peer,
+ endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_accept_op<Socket,
+ protocol_type, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ bool enable_connection_aborted =
+ (impl.state_ & socket_ops::enable_connection_aborted) != 0;
+ p.p = new (p.v) op(*this, impl.socket_, peer, impl.protocol_,
+ peer_endpoint, enable_connection_aborted, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, peer.is_open(), p.p->new_socket(),
+ impl.protocol_.family(), impl.protocol_.type(),
+ impl.protocol_.protocol(), p.p->output_buffer(),
+ p.p->address_length(), p.p);
+ p.v = p.p = 0;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ // Start an asynchronous accept. The peer and peer_endpoint objects
+ // must be valid until the accept's handler is invoked.
+ template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
+ void async_move_accept(implementation_type& impl,
+ const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_move_accept_op<
+ protocol_type, PeerIoExecutor, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ bool enable_connection_aborted =
+ (impl.state_ & socket_ops::enable_connection_aborted) != 0;
+ p.p = new (p.v) op(*this, impl.socket_, impl.protocol_,
+ peer_io_ex, peer_endpoint, enable_connection_aborted,
+ handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, false, p.p->new_socket(),
+ impl.protocol_.family(), impl.protocol_.type(),
+ impl.protocol_.protocol(), p.p->output_buffer(),
+ p.p->address_length(), p.p);
+ p.v = p.p = 0;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ // Connect the socket to the specified endpoint.
+ boost::system::error_code connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint, boost::system::error_code& ec)
+ {
+ socket_ops::sync_connect(impl.socket_,
+ peer_endpoint.data(), peer_endpoint.size(), ec);
+ return ec;
+ }
+
+ // Start an asynchronous connect.
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_connect_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.socket_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_connect"));
+
+ start_connect_op(impl, impl.protocol_.family(), impl.protocol_.type(),
+ peer_endpoint.data(), static_cast<int>(peer_endpoint.size()), p.p);
+ p.v = p.p = 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service_base.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service_base.hpp
new file mode 100644
index 00000000000..7a7c900be42
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_socket_service_base.hpp
@@ -0,0 +1,602 @@
+//
+// detail/win_iocp_socket_service_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_SOCKET_SERVICE_BASE_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_BASE_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_IOCP)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/operation.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/select_reactor.hpp>
+#include <boost/asio/detail/socket_holder.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/win_iocp_io_context.hpp>
+#include <boost/asio/detail/win_iocp_null_buffers_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_connect_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_send_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_recv_op.hpp>
+#include <boost/asio/detail/win_iocp_socket_recvmsg_op.hpp>
+#include <boost/asio/detail/win_iocp_wait_op.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_iocp_socket_service_base
+{
+public:
+ // The implementation type of the socket.
+ struct base_implementation_type
+ {
+ // The native socket representation.
+ socket_type socket_;
+
+ // The current state of the socket.
+ socket_ops::state_type state_;
+
+ // We use a shared pointer as a cancellation token here to work around the
+ // broken Windows support for cancellation. MSDN says that when you call
+ // closesocket any outstanding WSARecv or WSASend operations will complete
+ // with the error ERROR_OPERATION_ABORTED. In practice they complete with
+ // ERROR_NETNAME_DELETED, which means you can't tell the difference between
+ // a local cancellation and the socket being hard-closed by the peer.
+ socket_ops::shared_cancel_token_type cancel_token_;
+
+ // Per-descriptor data used by the reactor.
+ select_reactor::per_descriptor_data reactor_data_;
+
+#if defined(BOOST_ASIO_ENABLE_CANCELIO)
+ // The ID of the thread from which it is safe to cancel asynchronous
+ // operations. 0 means no asynchronous operations have been started yet.
+ // ~0 means asynchronous operations have been started from more than one
+ // thread, and cancellation is not supported for the socket.
+ DWORD safe_cancellation_thread_id_;
+#endif // defined(BOOST_ASIO_ENABLE_CANCELIO)
+
+ // Pointers to adjacent socket implementations in linked list.
+ base_implementation_type* next_;
+ base_implementation_type* prev_;
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL win_iocp_socket_service_base(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void base_shutdown();
+
+ // Construct a new socket implementation.
+ BOOST_ASIO_DECL void construct(base_implementation_type& impl);
+
+ // Move-construct a new socket implementation.
+ BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
+ base_implementation_type& other_impl);
+
+ // Move-assign from another socket implementation.
+ BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
+ win_iocp_socket_service_base& other_service,
+ base_implementation_type& other_impl);
+
+ // Destroy a socket implementation.
+ BOOST_ASIO_DECL void destroy(base_implementation_type& impl);
+
+ // Determine whether the socket is open.
+ bool is_open(const base_implementation_type& impl) const
+ {
+ return impl.socket_ != invalid_socket;
+ }
+
+ // Destroy a socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code close(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Release ownership of the socket.
+ BOOST_ASIO_DECL socket_type release(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Cancel all operations associated with the socket.
+ BOOST_ASIO_DECL boost::system::error_code cancel(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Determine whether the socket is at the out-of-band data mark.
+ bool at_mark(const base_implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ return socket_ops::sockatmark(impl.socket_, ec);
+ }
+
+ // Determine the number of bytes available for reading.
+ std::size_t available(const base_implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ return socket_ops::available(impl.socket_, ec);
+ }
+
+ // Place the socket into the state where it will listen for new connections.
+ boost::system::error_code listen(base_implementation_type& impl,
+ int backlog, boost::system::error_code& ec)
+ {
+ socket_ops::listen(impl.socket_, backlog, ec);
+ return ec;
+ }
+
+ // Perform an IO control command on the socket.
+ template <typename IO_Control_Command>
+ boost::system::error_code io_control(base_implementation_type& impl,
+ IO_Control_Command& command, boost::system::error_code& ec)
+ {
+ socket_ops::ioctl(impl.socket_, impl.state_, command.name(),
+ static_cast<ioctl_arg_type*>(command.data()), ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the socket.
+ bool non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the socket.
+ boost::system::error_code non_blocking(base_implementation_type& impl,
+ bool mode, boost::system::error_code& ec)
+ {
+ socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native socket implementation.
+ bool native_non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native socket implementation.
+ boost::system::error_code native_non_blocking(base_implementation_type& impl,
+ bool mode, boost::system::error_code& ec)
+ {
+ socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Wait for the socket to become ready to read, ready to write, or to have
+ // pending error conditions.
+ boost::system::error_code wait(base_implementation_type& impl,
+ socket_base::wait_type w, boost::system::error_code& ec)
+ {
+ switch (w)
+ {
+ case socket_base::wait_read:
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_write:
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_error:
+ socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
+ break;
+ default:
+ ec = boost::asio::error::invalid_argument;
+ break;
+ }
+
+ return ec;
+ }
+
+ // Asynchronously wait for the socket to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(base_implementation_type& impl,
+ socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_wait"));
+
+ switch (w)
+ {
+ case socket_base::wait_read:
+ start_null_buffers_receive_op(impl, 0, p.p);
+ break;
+ case socket_base::wait_write:
+ start_reactor_op(impl, select_reactor::write_op, p.p);
+ break;
+ case socket_base::wait_error:
+ start_reactor_op(impl, select_reactor::except_op, p.p);
+ break;
+ default:
+ p.p->ec_ = boost::asio::error::invalid_argument;
+ iocp_service_.post_immediate_completion(p.p, is_continuation);
+ break;
+ }
+
+ p.v = p.p = 0;
+ }
+
+ // Send the given data to the peer. Returns the number of bytes sent.
+ template <typename ConstBufferSequence>
+ size_t send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_send(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_send"));
+
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence> bufs(buffers);
+
+ start_send_op(impl, bufs.buffers(), bufs.count(), flags,
+ (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(),
+ p.p);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_send(null_buffers)"));
+
+ start_reactor_op(impl, select_reactor::write_op, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data from the peer. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_recv(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_recv_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.state_, impl.cancel_token_,
+ buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_receive"));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ start_receive_op(impl, bufs.buffers(), bufs.count(), flags,
+ (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(),
+ p.p);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_receive(null_buffers)"));
+
+ start_null_buffers_receive_op(impl, flags, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data with associated flags. Returns the number of bytes
+ // received.
+ template <typename MutableBufferSequence>
+ size_t receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, boost::system::error_code& ec)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_recvmsg(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), in_flags, out_flags, ec);
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags,
+ socket_base::message_flags& out_flags, boost::system::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_socket_recvmsg_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_,
+ buffers, out_flags, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_receive_with_flags"));
+
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ start_receive_op(impl, bufs.buffers(), bufs.count(), in_flags, false, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((context_, *p.p, "socket",
+ &impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
+
+ // Reset out_flags since it can be given no sensible value at this time.
+ out_flags = 0;
+
+ start_null_buffers_receive_op(impl, in_flags, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Helper function to restart an asynchronous accept operation.
+ BOOST_ASIO_DECL void restart_accept_op(socket_type s,
+ socket_holder& new_socket, int family, int type, int protocol,
+ void* output_buffer, DWORD address_length, operation* op);
+
+protected:
+ // Open a new socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code do_open(
+ base_implementation_type& impl, int family, int type,
+ int protocol, boost::system::error_code& ec);
+
+ // Assign a native socket to a socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code do_assign(
+ base_implementation_type& impl, int type,
+ socket_type native_socket, boost::system::error_code& ec);
+
+ // Helper function to start an asynchronous send operation.
+ BOOST_ASIO_DECL void start_send_op(base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count,
+ socket_base::message_flags flags, bool noop, operation* op);
+
+ // Helper function to start an asynchronous send_to operation.
+ BOOST_ASIO_DECL void start_send_to_op(base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count,
+ const socket_addr_type* addr, int addrlen,
+ socket_base::message_flags flags, operation* op);
+
+ // Helper function to start an asynchronous receive operation.
+ BOOST_ASIO_DECL void start_receive_op(base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count,
+ socket_base::message_flags flags, bool noop, operation* op);
+
+ // Helper function to start an asynchronous null_buffers receive operation.
+ BOOST_ASIO_DECL void start_null_buffers_receive_op(
+ base_implementation_type& impl,
+ socket_base::message_flags flags, reactor_op* op);
+
+ // Helper function to start an asynchronous receive_from operation.
+ BOOST_ASIO_DECL void start_receive_from_op(base_implementation_type& impl,
+ WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
+ socket_base::message_flags flags, int* addrlen, operation* op);
+
+ // Helper function to start an asynchronous accept operation.
+ BOOST_ASIO_DECL void start_accept_op(base_implementation_type& impl,
+ bool peer_is_open, socket_holder& new_socket, int family, int type,
+ int protocol, void* output_buffer, DWORD address_length, operation* op);
+
+ // Start an asynchronous read or write operation using the reactor.
+ BOOST_ASIO_DECL void start_reactor_op(base_implementation_type& impl,
+ int op_type, reactor_op* op);
+
+ // Start the asynchronous connect operation using the reactor.
+ BOOST_ASIO_DECL void start_connect_op(base_implementation_type& impl,
+ int family, int type, const socket_addr_type* remote_addr,
+ std::size_t remote_addrlen, win_iocp_socket_connect_op_base* op);
+
+ // Helper function to close a socket when the associated object is being
+ // destroyed.
+ BOOST_ASIO_DECL void close_for_destruction(base_implementation_type& impl);
+
+ // Update the ID of the thread from which cancellation is safe.
+ BOOST_ASIO_DECL void update_cancellation_thread_id(
+ base_implementation_type& impl);
+
+ // Helper function to get the reactor. If no reactor has been created yet, a
+ // new one is obtained from the execution context and a pointer to it is
+ // cached in this service.
+ BOOST_ASIO_DECL select_reactor& get_reactor();
+
+ // The type of a ConnectEx function pointer, as old SDKs may not provide it.
+ typedef BOOL (PASCAL *connect_ex_fn)(SOCKET,
+ const socket_addr_type*, int, void*, DWORD, DWORD*, OVERLAPPED*);
+
+ // Helper function to get the ConnectEx pointer. If no ConnectEx pointer has
+ // been obtained yet, one is obtained using WSAIoctl and the pointer is
+ // cached. Returns a null pointer if ConnectEx is not available.
+ BOOST_ASIO_DECL connect_ex_fn get_connect_ex(
+ base_implementation_type& impl, int type);
+
+ // The type of a NtSetInformationFile function pointer.
+ typedef LONG (NTAPI *nt_set_info_fn)(HANDLE, ULONG_PTR*, void*, ULONG, ULONG);
+
+ // Helper function to get the NtSetInformationFile function pointer. If no
+ // NtSetInformationFile pointer has been obtained yet, one is obtained using
+ // GetProcAddress and the pointer is cached. Returns a null pointer if
+ // NtSetInformationFile is not available.
+ BOOST_ASIO_DECL nt_set_info_fn get_nt_set_info();
+
+ // Helper function to emulate InterlockedCompareExchangePointer functionality
+ // for:
+ // - very old Platform SDKs; and
+ // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
+ BOOST_ASIO_DECL void* interlocked_compare_exchange_pointer(
+ void** dest, void* exch, void* cmp);
+
+ // Helper function to emulate InterlockedExchangePointer functionality for:
+ // - very old Platform SDKs; and
+ // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
+ BOOST_ASIO_DECL void* interlocked_exchange_pointer(void** dest, void* val);
+
+ // The execution context used to obtain the reactor, if required.
+ execution_context& context_;
+
+ // The IOCP service used for running asynchronous operations and dispatching
+ // handlers.
+ win_iocp_io_context& iocp_service_;
+
+ // The reactor used for performing connect operations. This object is created
+ // only if needed.
+ select_reactor* reactor_;
+
+ // Pointer to ConnectEx implementation.
+ void* connect_ex_;
+
+ // Pointer to NtSetInformationFile implementation.
+ void* nt_set_info_;
+
+ // Mutex to protect access to the linked list of implementations.
+ boost::asio::detail::mutex mutex_;
+
+ // The head of a linked list of all implementations.
+ base_implementation_type* impl_list_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_iocp_socket_service_base.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_SOCKET_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_thread_info.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_thread_info.hpp
new file mode 100644
index 00000000000..c6819825c0c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_thread_info.hpp
@@ -0,0 +1,36 @@
+//
+// detail/win_iocp_thread_info.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_THREAD_INFO_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/thread_info_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct win_iocp_thread_info : public thread_info_base
+{
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_wait_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_wait_op.hpp
new file mode 100644
index 00000000000..1f0929f99b4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_iocp_wait_op.hpp
@@ -0,0 +1,125 @@
+//
+// detail/win_iocp_wait_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IOCP_WAIT_OP_HPP
+#define BOOST_ASIO_DETAIL_WIN_IOCP_WAIT_OP_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_IOCP)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/reactor_op.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class win_iocp_wait_op : public reactor_op
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_wait_op);
+
+ win_iocp_wait_op(socket_ops::weak_cancel_token_type cancel_token,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(&win_iocp_wait_op::do_perform,
+ &win_iocp_wait_op::do_complete),
+ cancel_token_(cancel_token),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static status do_perform(reactor_op*)
+ {
+ return done;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code& result_ec,
+ std::size_t /*bytes_transferred*/)
+ {
+ boost::system::error_code ec(result_ec);
+
+ // Take ownership of the operation object.
+ win_iocp_wait_op* o(static_cast<win_iocp_wait_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // The reactor may have stored a result in the operation object.
+ if (o->ec_)
+ ec = o->ec_;
+
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ {
+ if (o->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;
+ }
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, ec);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ socket_ops::weak_cancel_token_type cancel_token_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#endif // BOOST_ASIO_DETAIL_WIN_IOCP_WAIT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_mutex.hpp
new file mode 100644
index 00000000000..7509131c4b7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_mutex.hpp
@@ -0,0 +1,80 @@
+//
+// detail/win_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_WIN_MUTEX_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_WINDOWS)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_lock.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_mutex
+ : private noncopyable
+{
+public:
+ typedef boost::asio::detail::scoped_lock<win_mutex> scoped_lock;
+
+ // Constructor.
+ BOOST_ASIO_DECL win_mutex();
+
+ // Destructor.
+ ~win_mutex()
+ {
+ ::DeleteCriticalSection(&crit_section_);
+ }
+
+ // Lock the mutex.
+ void lock()
+ {
+ ::EnterCriticalSection(&crit_section_);
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ ::LeaveCriticalSection(&crit_section_);
+ }
+
+private:
+ // Initialisation must be performed in a separate function to the constructor
+ // since the compiler does not support the use of structured exceptions and
+ // C++ exceptions in the same function.
+ BOOST_ASIO_DECL int do_init();
+
+ ::CRITICAL_SECTION crit_section_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_mutex.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_WIN_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_object_handle_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_object_handle_service.hpp
new file mode 100644
index 00000000000..42032224a83
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_object_handle_service.hpp
@@ -0,0 +1,197 @@
+//
+// detail/win_object_handle_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// Distributed under the 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_OBJECT_HANDLE_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_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_WINDOWS_OBJECT_HANDLE)
+
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/wait_handler.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class win_object_handle_service :
+ public execution_context_service_base<win_object_handle_service>
+{
+public:
+ // The native type of an object handle.
+ typedef HANDLE native_handle_type;
+
+ // The implementation type of the object handle.
+ class implementation_type
+ {
+ public:
+ // Default constructor.
+ implementation_type()
+ : handle_(INVALID_HANDLE_VALUE),
+ wait_handle_(INVALID_HANDLE_VALUE),
+ owner_(0),
+ next_(0),
+ prev_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class win_object_handle_service;
+
+ // The native object handle representation. May be accessed or modified
+ // without locking the mutex.
+ native_handle_type handle_;
+
+ // The handle used to unregister the wait operation. The mutex must be
+ // locked when accessing or modifying this member.
+ HANDLE wait_handle_;
+
+ // The operations waiting on the object handle. If there is a registered
+ // wait then the mutex must be locked when accessing or modifying this
+ // member
+ op_queue<wait_op> op_queue_;
+
+ // The service instance that owns the object handle implementation.
+ win_object_handle_service* owner_;
+
+ // Pointers to adjacent handle implementations in linked list. The mutex
+ // must be locked when accessing or modifying these members.
+ implementation_type* next_;
+ implementation_type* prev_;
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL win_object_handle_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Construct a new handle implementation.
+ BOOST_ASIO_DECL void construct(implementation_type& impl);
+
+ // Move-construct a new handle implementation.
+ BOOST_ASIO_DECL void move_construct(implementation_type& impl,
+ implementation_type& other_impl);
+
+ // Move-assign from another handle implementation.
+ BOOST_ASIO_DECL void move_assign(implementation_type& impl,
+ win_object_handle_service& other_service,
+ implementation_type& other_impl);
+
+ // Destroy a handle implementation.
+ BOOST_ASIO_DECL void destroy(implementation_type& impl);
+
+ // Assign a native handle to a handle implementation.
+ BOOST_ASIO_DECL boost::system::error_code assign(implementation_type& impl,
+ const native_handle_type& handle, boost::system::error_code& ec);
+
+ // Determine whether the handle is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return impl.handle_ != INVALID_HANDLE_VALUE && impl.handle_ != 0;
+ }
+
+ // Destroy a handle implementation.
+ BOOST_ASIO_DECL boost::system::error_code close(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Get the native handle representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return impl.handle_;
+ }
+
+ // Cancel all operations associated with the handle.
+ BOOST_ASIO_DECL boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ // Perform a synchronous wait for the object to enter a signalled state.
+ BOOST_ASIO_DECL void wait(implementation_type& impl,
+ boost::system::error_code& ec);
+
+ /// Start an asynchronous wait.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef wait_handler<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(), *p.p, "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "async_wait"));
+
+ start_wait_op(impl, p.p);
+ p.v = p.p = 0;
+ }
+
+private:
+ // Helper function to start an asynchronous wait operation.
+ BOOST_ASIO_DECL void start_wait_op(implementation_type& impl, wait_op* op);
+
+ // Helper function to register a wait operation.
+ BOOST_ASIO_DECL void register_wait_callback(
+ implementation_type& impl, mutex::scoped_lock& lock);
+
+ // Callback function invoked when the registered wait completes.
+ static BOOST_ASIO_DECL VOID CALLBACK wait_callback(
+ PVOID param, BOOLEAN timeout);
+
+ // The scheduler used to post completions.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+ // Mutex to protect access to internal state.
+ mutex mutex_;
+
+ // The head of a linked list of all implementations.
+ implementation_type* impl_list_;
+
+ // Flag to indicate that the dispatcher has been shut down.
+ bool shutdown_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_object_handle_service.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+
+#endif // BOOST_ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_static_mutex.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_static_mutex.hpp
new file mode 100644
index 00000000000..c310d314dbd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_static_mutex.hpp
@@ -0,0 +1,76 @@
+//
+// detail/win_static_mutex.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STATIC_MUTEX_HPP
+#define BOOST_ASIO_DETAIL_WIN_STATIC_MUTEX_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_WINDOWS)
+
+#include <boost/asio/detail/scoped_lock.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct win_static_mutex
+{
+ typedef boost::asio::detail::scoped_lock<win_static_mutex> scoped_lock;
+
+ // Initialise the mutex.
+ BOOST_ASIO_DECL void init();
+
+ // Initialisation must be performed in a separate function to the "public"
+ // init() function since the compiler does not support the use of structured
+ // exceptions and C++ exceptions in the same function.
+ BOOST_ASIO_DECL int do_init();
+
+ // Lock the mutex.
+ void lock()
+ {
+ ::EnterCriticalSection(&crit_section_);
+ }
+
+ // Unlock the mutex.
+ void unlock()
+ {
+ ::LeaveCriticalSection(&crit_section_);
+ }
+
+ bool initialised_;
+ ::CRITICAL_SECTION crit_section_;
+};
+
+#if defined(UNDER_CE)
+# define BOOST_ASIO_WIN_STATIC_MUTEX_INIT { false, { 0, 0, 0, 0, 0 } }
+#else // defined(UNDER_CE)
+# define BOOST_ASIO_WIN_STATIC_MUTEX_INIT { false, { 0, 0, 0, 0, 0, 0 } }
+#endif // defined(UNDER_CE)
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_static_mutex.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_WIN_STATIC_MUTEX_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_thread.hpp
new file mode 100644
index 00000000000..ef867448a92
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_thread.hpp
@@ -0,0 +1,149 @@
+//
+// detail/win_thread.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_HPP
+#define BOOST_ASIO_DETAIL_WIN_THREAD_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_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_APP) \
+ && !defined(UNDER_CE)
+
+#include <cstddef>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+BOOST_ASIO_DECL unsigned int __stdcall win_thread_function(void* arg);
+
+#if defined(WINVER) && (WINVER < 0x0500)
+BOOST_ASIO_DECL void __stdcall apc_function(ULONG data);
+#else
+BOOST_ASIO_DECL void __stdcall apc_function(ULONG_PTR data);
+#endif
+
+template <typename T>
+class win_thread_base
+{
+public:
+ static bool terminate_threads()
+ {
+ return ::InterlockedExchangeAdd(&terminate_threads_, 0) != 0;
+ }
+
+ static void set_terminate_threads(bool b)
+ {
+ ::InterlockedExchange(&terminate_threads_, b ? 1 : 0);
+ }
+
+private:
+ static long terminate_threads_;
+};
+
+template <typename T>
+long win_thread_base<T>::terminate_threads_ = 0;
+
+class win_thread
+ : private noncopyable,
+ public win_thread_base<win_thread>
+{
+public:
+ // Constructor.
+ template <typename Function>
+ win_thread(Function f, unsigned int stack_size = 0)
+ : thread_(0),
+ exit_event_(0)
+ {
+ start_thread(new func<Function>(f), stack_size);
+ }
+
+ // Destructor.
+ BOOST_ASIO_DECL ~win_thread();
+
+ // Wait for the thread to exit.
+ BOOST_ASIO_DECL void join();
+
+ // Get number of CPUs.
+ BOOST_ASIO_DECL static std::size_t hardware_concurrency();
+
+private:
+ friend BOOST_ASIO_DECL unsigned int __stdcall win_thread_function(void* arg);
+
+#if defined(WINVER) && (WINVER < 0x0500)
+ friend BOOST_ASIO_DECL void __stdcall apc_function(ULONG);
+#else
+ friend BOOST_ASIO_DECL void __stdcall apc_function(ULONG_PTR);
+#endif
+
+ class func_base
+ {
+ public:
+ virtual ~func_base() {}
+ virtual void run() = 0;
+ ::HANDLE entry_event_;
+ ::HANDLE exit_event_;
+ };
+
+ struct auto_func_base_ptr
+ {
+ func_base* ptr;
+ ~auto_func_base_ptr() { delete ptr; }
+ };
+
+ template <typename Function>
+ class func
+ : public func_base
+ {
+ public:
+ func(Function f)
+ : f_(f)
+ {
+ }
+
+ virtual void run()
+ {
+ f_();
+ }
+
+ private:
+ Function f_;
+ };
+
+ BOOST_ASIO_DECL void start_thread(func_base* arg, unsigned int stack_size);
+
+ ::HANDLE thread_;
+ ::HANDLE exit_event_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_thread.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_APP)
+ // && !defined(UNDER_CE)
+
+#endif // BOOST_ASIO_DETAIL_WIN_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/win_tss_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/win_tss_ptr.hpp
new file mode 100644
index 00000000000..102b41a583a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/win_tss_ptr.hpp
@@ -0,0 +1,81 @@
+//
+// detail/win_tss_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TSS_PTR_HPP
+#define BOOST_ASIO_DETAIL_WIN_TSS_PTR_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_WINDOWS)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Helper function to create thread-specific storage.
+BOOST_ASIO_DECL DWORD win_tss_ptr_create();
+
+template <typename T>
+class win_tss_ptr
+ : private noncopyable
+{
+public:
+ // Constructor.
+ win_tss_ptr()
+ : tss_key_(win_tss_ptr_create())
+ {
+ }
+
+ // Destructor.
+ ~win_tss_ptr()
+ {
+ ::TlsFree(tss_key_);
+ }
+
+ // Get the value.
+ operator T*() const
+ {
+ return static_cast<T*>(::TlsGetValue(tss_key_));
+ }
+
+ // Set the value.
+ void operator=(T* value)
+ {
+ ::TlsSetValue(tss_key_, value);
+ }
+
+private:
+ // Thread-specific storage to allow unlocked access to determine whether a
+ // thread is a member of the pool.
+ DWORD tss_key_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/win_tss_ptr.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS)
+
+#endif // BOOST_ASIO_DETAIL_WIN_TSS_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winapp_thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winapp_thread.hpp
new file mode 100644
index 00000000000..b92c7f5a674
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winapp_thread.hpp
@@ -0,0 +1,126 @@
+//
+// detail/winapp_thread.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINAPP_THREAD_HPP
+#define BOOST_ASIO_DETAIL_WINAPP_THREAD_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_WINDOWS) && defined(BOOST_ASIO_WINDOWS_APP)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+DWORD WINAPI winapp_thread_function(LPVOID arg);
+
+class winapp_thread
+ : private noncopyable
+{
+public:
+ // Constructor.
+ template <typename Function>
+ winapp_thread(Function f, unsigned int = 0)
+ {
+ scoped_ptr<func_base> arg(new func<Function>(f));
+ DWORD thread_id = 0;
+ thread_ = ::CreateThread(0, 0, winapp_thread_function,
+ arg.get(), 0, &thread_id);
+ if (!thread_)
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "thread");
+ }
+ arg.release();
+ }
+
+ // Destructor.
+ ~winapp_thread()
+ {
+ ::CloseHandle(thread_);
+ }
+
+ // Wait for the thread to exit.
+ void join()
+ {
+ ::WaitForSingleObjectEx(thread_, INFINITE, false);
+ }
+
+ // Get number of CPUs.
+ static std::size_t hardware_concurrency()
+ {
+ SYSTEM_INFO system_info;
+ ::GetNativeSystemInfo(&system_info);
+ return system_info.dwNumberOfProcessors;
+ }
+
+private:
+ friend DWORD WINAPI winapp_thread_function(LPVOID arg);
+
+ class func_base
+ {
+ public:
+ virtual ~func_base() {}
+ virtual void run() = 0;
+ };
+
+ template <typename Function>
+ class func
+ : public func_base
+ {
+ public:
+ func(Function f)
+ : f_(f)
+ {
+ }
+
+ virtual void run()
+ {
+ f_();
+ }
+
+ private:
+ Function f_;
+ };
+
+ ::HANDLE thread_;
+};
+
+inline DWORD WINAPI winapp_thread_function(LPVOID arg)
+{
+ scoped_ptr<winapp_thread::func_base> func(
+ static_cast<winapp_thread::func_base*>(arg));
+ func->run();
+ return 0;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS) && defined(BOOST_ASIO_WINDOWS_APP)
+
+#endif // BOOST_ASIO_DETAIL_WINAPP_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/wince_thread.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/wince_thread.hpp
new file mode 100644
index 00000000000..492a37c03f4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/wince_thread.hpp
@@ -0,0 +1,126 @@
+//
+// detail/wince_thread.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINCE_THREAD_HPP
+#define BOOST_ASIO_DETAIL_WINCE_THREAD_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_WINDOWS) && defined(UNDER_CE)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+DWORD WINAPI wince_thread_function(LPVOID arg);
+
+class wince_thread
+ : private noncopyable
+{
+public:
+ // Constructor.
+ template <typename Function>
+ wince_thread(Function f, unsigned int = 0)
+ {
+ scoped_ptr<func_base> arg(new func<Function>(f));
+ DWORD thread_id = 0;
+ thread_ = ::CreateThread(0, 0, wince_thread_function,
+ arg.get(), 0, &thread_id);
+ if (!thread_)
+ {
+ DWORD last_error = ::GetLastError();
+ boost::system::error_code ec(last_error,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "thread");
+ }
+ arg.release();
+ }
+
+ // Destructor.
+ ~wince_thread()
+ {
+ ::CloseHandle(thread_);
+ }
+
+ // Wait for the thread to exit.
+ void join()
+ {
+ ::WaitForSingleObject(thread_, INFINITE);
+ }
+
+ // Get number of CPUs.
+ static std::size_t hardware_concurrency()
+ {
+ SYSTEM_INFO system_info;
+ ::GetSystemInfo(&system_info);
+ return system_info.dwNumberOfProcessors;
+ }
+
+private:
+ friend DWORD WINAPI wince_thread_function(LPVOID arg);
+
+ class func_base
+ {
+ public:
+ virtual ~func_base() {}
+ virtual void run() = 0;
+ };
+
+ template <typename Function>
+ class func
+ : public func_base
+ {
+ public:
+ func(Function f)
+ : f_(f)
+ {
+ }
+
+ virtual void run()
+ {
+ f_();
+ }
+
+ private:
+ Function f_;
+ };
+
+ ::HANDLE thread_;
+};
+
+inline DWORD WINAPI wince_thread_function(LPVOID arg)
+{
+ scoped_ptr<wince_thread::func_base> func(
+ static_cast<wince_thread::func_base*>(arg));
+ func->run();
+ return 0;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE)
+
+#endif // BOOST_ASIO_DETAIL_WINCE_THREAD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_manager.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_manager.hpp
new file mode 100644
index 00000000000..e9dc6cb2577
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_manager.hpp
@@ -0,0 +1,307 @@
+//
+// detail/winrt_async_manager.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_ASYNC_MANAGER_HPP
+#define BOOST_ASIO_DETAIL_WINRT_ASYNC_MANAGER_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_WINDOWS_RUNTIME)
+
+#include <future>
+#include <boost/asio/detail/atomic_count.hpp>
+#include <boost/asio/detail/winrt_async_op.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class winrt_async_manager
+ : public execution_context_service_base<winrt_async_manager>
+{
+public:
+ // Constructor.
+ winrt_async_manager(execution_context& context)
+ : execution_context_service_base<winrt_async_manager>(context),
+ scheduler_(use_service<scheduler_impl>(context)),
+ outstanding_ops_(1)
+ {
+ }
+
+ // Destructor.
+ ~winrt_async_manager()
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ if (--outstanding_ops_ > 0)
+ {
+ // Block until last operation is complete.
+ std::future<void> f = promise_.get_future();
+ f.wait();
+ }
+ }
+
+ void sync(Windows::Foundation::IAsyncAction^ action,
+ boost::system::error_code& ec)
+ {
+ using namespace Windows::Foundation;
+ using Windows::Foundation::AsyncStatus;
+
+ auto promise = std::make_shared<std::promise<boost::system::error_code>>();
+ auto future = promise->get_future();
+
+ action->Completed = ref new AsyncActionCompletedHandler(
+ [promise](IAsyncAction^ action, AsyncStatus status)
+ {
+ switch (status)
+ {
+ case AsyncStatus::Canceled:
+ promise->set_value(boost::asio::error::operation_aborted);
+ break;
+ case AsyncStatus::Error:
+ case AsyncStatus::Completed:
+ default:
+ boost::system::error_code ec(
+ action->ErrorCode.Value,
+ boost::system::system_category());
+ promise->set_value(ec);
+ break;
+ }
+ });
+
+ ec = future.get();
+ }
+
+ template <typename TResult>
+ TResult sync(Windows::Foundation::IAsyncOperation<TResult>^ operation,
+ boost::system::error_code& ec)
+ {
+ using namespace Windows::Foundation;
+ using Windows::Foundation::AsyncStatus;
+
+ auto promise = std::make_shared<std::promise<boost::system::error_code>>();
+ auto future = promise->get_future();
+
+ operation->Completed = ref new AsyncOperationCompletedHandler<TResult>(
+ [promise](IAsyncOperation<TResult>^ operation, AsyncStatus status)
+ {
+ switch (status)
+ {
+ case AsyncStatus::Canceled:
+ promise->set_value(boost::asio::error::operation_aborted);
+ break;
+ case AsyncStatus::Error:
+ case AsyncStatus::Completed:
+ default:
+ boost::system::error_code ec(
+ operation->ErrorCode.Value,
+ boost::system::system_category());
+ promise->set_value(ec);
+ break;
+ }
+ });
+
+ ec = future.get();
+ return operation->GetResults();
+ }
+
+ template <typename TResult, typename TProgress>
+ TResult sync(
+ Windows::Foundation::IAsyncOperationWithProgress<
+ TResult, TProgress>^ operation,
+ boost::system::error_code& ec)
+ {
+ using namespace Windows::Foundation;
+ using Windows::Foundation::AsyncStatus;
+
+ auto promise = std::make_shared<std::promise<boost::system::error_code>>();
+ auto future = promise->get_future();
+
+ operation->Completed
+ = ref new AsyncOperationWithProgressCompletedHandler<TResult, TProgress>(
+ [promise](IAsyncOperationWithProgress<TResult, TProgress>^ operation,
+ AsyncStatus status)
+ {
+ switch (status)
+ {
+ case AsyncStatus::Canceled:
+ promise->set_value(boost::asio::error::operation_aborted);
+ break;
+ case AsyncStatus::Started:
+ break;
+ case AsyncStatus::Error:
+ case AsyncStatus::Completed:
+ default:
+ boost::system::error_code ec(
+ operation->ErrorCode.Value,
+ boost::system::system_category());
+ promise->set_value(ec);
+ break;
+ }
+ });
+
+ ec = future.get();
+ return operation->GetResults();
+ }
+
+ void async(Windows::Foundation::IAsyncAction^ action,
+ winrt_async_op<void>* handler)
+ {
+ using namespace Windows::Foundation;
+ using Windows::Foundation::AsyncStatus;
+
+ auto on_completed = ref new AsyncActionCompletedHandler(
+ [this, handler](IAsyncAction^ action, AsyncStatus status)
+ {
+ switch (status)
+ {
+ case AsyncStatus::Canceled:
+ handler->ec_ = boost::asio::error::operation_aborted;
+ break;
+ case AsyncStatus::Started:
+ return;
+ case AsyncStatus::Completed:
+ case AsyncStatus::Error:
+ default:
+ handler->ec_ = boost::system::error_code(
+ action->ErrorCode.Value,
+ boost::system::system_category());
+ break;
+ }
+ scheduler_.post_deferred_completion(handler);
+ if (--outstanding_ops_ == 0)
+ promise_.set_value();
+ });
+
+ scheduler_.work_started();
+ ++outstanding_ops_;
+ action->Completed = on_completed;
+ }
+
+ template <typename TResult>
+ void async(Windows::Foundation::IAsyncOperation<TResult>^ operation,
+ winrt_async_op<TResult>* handler)
+ {
+ using namespace Windows::Foundation;
+ using Windows::Foundation::AsyncStatus;
+
+ auto on_completed = ref new AsyncOperationCompletedHandler<TResult>(
+ [this, handler](IAsyncOperation<TResult>^ operation, AsyncStatus status)
+ {
+ switch (status)
+ {
+ case AsyncStatus::Canceled:
+ handler->ec_ = boost::asio::error::operation_aborted;
+ break;
+ case AsyncStatus::Started:
+ return;
+ case AsyncStatus::Completed:
+ handler->result_ = operation->GetResults();
+ // Fall through.
+ case AsyncStatus::Error:
+ default:
+ handler->ec_ = boost::system::error_code(
+ operation->ErrorCode.Value,
+ boost::system::system_category());
+ break;
+ }
+ scheduler_.post_deferred_completion(handler);
+ if (--outstanding_ops_ == 0)
+ promise_.set_value();
+ });
+
+ scheduler_.work_started();
+ ++outstanding_ops_;
+ operation->Completed = on_completed;
+ }
+
+ template <typename TResult, typename TProgress>
+ void async(
+ Windows::Foundation::IAsyncOperationWithProgress<
+ TResult, TProgress>^ operation,
+ winrt_async_op<TResult>* handler)
+ {
+ using namespace Windows::Foundation;
+ using Windows::Foundation::AsyncStatus;
+
+ auto on_completed
+ = ref new AsyncOperationWithProgressCompletedHandler<TResult, TProgress>(
+ [this, handler](IAsyncOperationWithProgress<
+ TResult, TProgress>^ operation, AsyncStatus status)
+ {
+ switch (status)
+ {
+ case AsyncStatus::Canceled:
+ handler->ec_ = boost::asio::error::operation_aborted;
+ break;
+ case AsyncStatus::Started:
+ return;
+ case AsyncStatus::Completed:
+ handler->result_ = operation->GetResults();
+ // Fall through.
+ case AsyncStatus::Error:
+ default:
+ handler->ec_ = boost::system::error_code(
+ operation->ErrorCode.Value,
+ boost::system::system_category());
+ break;
+ }
+ scheduler_.post_deferred_completion(handler);
+ if (--outstanding_ops_ == 0)
+ promise_.set_value();
+ });
+
+ scheduler_.work_started();
+ ++outstanding_ops_;
+ operation->Completed = on_completed;
+ }
+
+private:
+ // The scheduler implementation used to post completed handlers.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+ // Count of outstanding operations.
+ atomic_count outstanding_ops_;
+
+ // Used to keep wait for outstanding operations to complete.
+ std::promise<void> promise_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_ASYNC_MANAGER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_op.hpp
new file mode 100644
index 00000000000..251dd878e40
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_async_op.hpp
@@ -0,0 +1,67 @@
+//
+// detail/winrt_async_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_ASYNC_OP_HPP
+#define BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_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/operation.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename TResult>
+class winrt_async_op
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ boost::system::error_code ec_;
+
+ // The result of the operation, to be passed to the completion handler.
+ TResult result_;
+
+protected:
+ winrt_async_op(func_type complete_func)
+ : operation(complete_func),
+ result_()
+ {
+ }
+};
+
+template <>
+class winrt_async_op<void>
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ boost::system::error_code ec_;
+
+protected:
+ winrt_async_op(func_type complete_func)
+ : operation(complete_func)
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolve_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolve_op.hpp
new file mode 100644
index 00000000000..f7faa2993a5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolve_op.hpp
@@ -0,0 +1,123 @@
+//
+// detail/winrt_resolve_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_RESOLVE_OP_HPP
+#define BOOST_ASIO_DETAIL_WINRT_RESOLVE_OP_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/winrt_async_op.hpp>
+#include <boost/asio/ip/basic_resolver_results.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol, typename Handler, typename IoExecutor>
+class winrt_resolve_op :
+ public winrt_async_op<
+ Windows::Foundation::Collections::IVectorView<
+ Windows::Networking::EndpointPair^>^>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_resolve_op);
+
+ typedef typename Protocol::endpoint endpoint_type;
+ typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
+ typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
+
+ winrt_resolve_op(const query_type& query,
+ Handler& handler, const IoExecutor& io_ex)
+ : winrt_async_op<
+ Windows::Foundation::Collections::IVectorView<
+ Windows::Networking::EndpointPair^>^>(
+ &winrt_resolve_op::do_complete),
+ query_(query),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code&, std::size_t)
+ {
+ // Take ownership of the operation object.
+ winrt_resolve_op* o(static_cast<winrt_resolve_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ results_type results = results_type();
+ if (!o->ec_)
+ {
+ try
+ {
+ results = results_type::create(o->result_, o->query_.hints(),
+ o->query_.host_name(), o->query_.service_name());
+ }
+ catch (Platform::Exception^ e)
+ {
+ o->ec_ = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ }
+ }
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, results_type>
+ handler(o->handler_, o->ec_, results);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ query_type query_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_RESOLVE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolver_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolver_service.hpp
new file mode 100644
index 00000000000..054b6abfbc9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_resolver_service.hpp
@@ -0,0 +1,214 @@
+//
+// detail/winrt_resolver_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_RESOLVER_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_WINRT_RESOLVER_SERVICE_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/ip/basic_resolver_query.hpp>
+#include <boost/asio/ip/basic_resolver_results.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/winrt_async_manager.hpp>
+#include <boost/asio/detail/winrt_resolve_op.hpp>
+#include <boost/asio/detail/winrt_utils.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class winrt_resolver_service :
+ public execution_context_service_base<winrt_resolver_service<Protocol> >
+{
+public:
+ // The implementation type of the resolver. A cancellation token is used to
+ // indicate to the asynchronous operation that the operation has been
+ // cancelled.
+ typedef socket_ops::shared_cancel_token_type implementation_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The query type.
+ typedef boost::asio::ip::basic_resolver_query<Protocol> query_type;
+
+ // The results type.
+ typedef boost::asio::ip::basic_resolver_results<Protocol> results_type;
+
+ // Constructor.
+ winrt_resolver_service(execution_context& context)
+ : execution_context_service_base<
+ winrt_resolver_service<Protocol> >(context),
+ scheduler_(use_service<scheduler_impl>(context)),
+ async_manager_(use_service<winrt_async_manager>(context))
+ {
+ }
+
+ // Destructor.
+ ~winrt_resolver_service()
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ }
+
+ // Perform any fork-related housekeeping.
+ void notify_fork(execution_context::fork_event)
+ {
+ }
+
+ // Construct a new resolver implementation.
+ void construct(implementation_type&)
+ {
+ }
+
+ // Move-construct a new resolver implementation.
+ void move_construct(implementation_type&,
+ implementation_type&)
+ {
+ }
+
+ // Move-assign from another resolver implementation.
+ void move_assign(implementation_type&,
+ winrt_resolver_service&, implementation_type&)
+ {
+ }
+
+ // Destroy a resolver implementation.
+ void destroy(implementation_type&)
+ {
+ }
+
+ // Cancel pending asynchronous operations.
+ void cancel(implementation_type&)
+ {
+ }
+
+ // Resolve a query to a list of entries.
+ results_type resolve(implementation_type&,
+ const query_type& query, boost::system::error_code& ec)
+ {
+ try
+ {
+ using namespace Windows::Networking::Sockets;
+ auto endpoint_pairs = async_manager_.sync(
+ DatagramSocket::GetEndpointPairsAsync(
+ winrt_utils::host_name(query.host_name()),
+ winrt_utils::string(query.service_name())), ec);
+
+ if (ec)
+ return results_type();
+
+ return results_type::create(
+ endpoint_pairs, query.hints(),
+ query.host_name(), query.service_name());
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ return results_type();
+ }
+ }
+
+ // Asynchronously resolve a query to a list of entries.
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type& impl, const query_type& query,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef winrt_resolve_op<Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(query, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "resolver", &impl, 0, "async_resolve"));
+ (void)impl;
+
+ try
+ {
+ using namespace Windows::Networking::Sockets;
+ async_manager_.async(DatagramSocket::GetEndpointPairsAsync(
+ winrt_utils::host_name(query.host_name()),
+ winrt_utils::string(query.service_name())), p.p);
+ p.v = p.p = 0;
+ }
+ catch (Platform::Exception^ e)
+ {
+ p.p->ec_ = boost::system::error_code(
+ e->HResult, boost::system::system_category());
+ scheduler_.post_immediate_completion(p.p, is_continuation);
+ p.v = p.p = 0;
+ }
+ }
+
+ // Resolve an endpoint to a list of entries.
+ results_type resolve(implementation_type&,
+ const endpoint_type&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return results_type();
+ }
+
+ // Asynchronously resolve an endpoint to a list of entries.
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type&, const endpoint_type&,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const results_type results;
+ boost::asio::post(io_ex, detail::bind_handler(handler, ec, results));
+ }
+
+private:
+ // The scheduler implementation used for delivering completions.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+ winrt_async_manager& async_manager_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_RESOLVER_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_connect_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_connect_op.hpp
new file mode 100644
index 00000000000..291c8860866
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_connect_op.hpp
@@ -0,0 +1,96 @@
+//
+// detail/winrt_socket_connect_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_SOCKET_CONNECT_OP_HPP
+#define BOOST_ASIO_DETAIL_WINRT_SOCKET_CONNECT_OP_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/winrt_async_op.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class winrt_socket_connect_op :
+ public winrt_async_op<void>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_connect_op);
+
+ winrt_socket_connect_op(Handler& handler, const IoExecutor& io_ex)
+ : winrt_async_op<void>(&winrt_socket_connect_op::do_complete),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code&, std::size_t)
+ {
+ // Take ownership of the operation object.
+ winrt_socket_connect_op* o(static_cast<winrt_socket_connect_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, boost::system::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_SOCKET_CONNECT_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_recv_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_recv_op.hpp
new file mode 100644
index 00000000000..34a5a755bf5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_recv_op.hpp
@@ -0,0 +1,117 @@
+//
+// detail/winrt_socket_recv_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_SOCKET_RECV_OP_HPP
+#define BOOST_ASIO_DETAIL_WINRT_SOCKET_RECV_OP_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/winrt_async_op.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class winrt_socket_recv_op :
+ public winrt_async_op<Windows::Storage::Streams::IBuffer^>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_recv_op);
+
+ winrt_socket_recv_op(const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : winrt_async_op<Windows::Storage::Streams::IBuffer^>(
+ &winrt_socket_recv_op::do_complete),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code&, std::size_t)
+ {
+ // Take ownership of the operation object.
+ winrt_socket_recv_op* o(static_cast<winrt_socket_recv_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ // Check whether buffers are still valid.
+ if (owner)
+ {
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ std::size_t bytes_transferred = o->result_ ? o->result_->Length : 0;
+ if (bytes_transferred == 0 && !o->ec_ &&
+ !buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(o->buffers_))
+ {
+ o->ec_ = boost::asio::error::eof;
+ }
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, bytes_transferred);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ MutableBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_SOCKET_RECV_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_send_op.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_send_op.hpp
new file mode 100644
index 00000000000..cbf42110f81
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_socket_send_op.hpp
@@ -0,0 +1,108 @@
+//
+// detail/winrt_socket_send_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_SOCKET_SEND_OP_HPP
+#define BOOST_ASIO_DETAIL_WINRT_SOCKET_SEND_OP_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/winrt_async_op.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class winrt_socket_send_op :
+ public winrt_async_op<unsigned int>
+{
+public:
+ BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_send_op);
+
+ winrt_socket_send_op(const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : winrt_async_op<unsigned int>(&winrt_socket_send_op::do_complete),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ io_executor_(io_ex)
+ {
+ handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const boost::system::error_code&, std::size_t)
+ {
+ // Take ownership of the operation object.
+ winrt_socket_send_op* o(static_cast<winrt_socket_send_op*>(base));
+ ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
+ handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
+
+ BOOST_ASIO_HANDLER_COMPLETION((*o));
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ // Check whether buffers are still valid.
+ if (owner)
+ {
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::validate(o->buffers_);
+ }
+#endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, boost::system::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->result_);
+ p.h = boost::asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ BOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ BOOST_ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ ConstBufferSequence buffers_;
+ Handler handler_;
+ IoExecutor io_executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_SOCKET_SEND_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service.hpp
new file mode 100644
index 00000000000..af2c7186993
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service.hpp
@@ -0,0 +1,244 @@
+//
+// detail/winrt_ssocket_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_SSOCKET_SERVICE_HPP
+#define BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/winrt_socket_connect_op.hpp>
+#include <boost/asio/detail/winrt_ssocket_service_base.hpp>
+#include <boost/asio/detail/winrt_utils.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class winrt_ssocket_service :
+ public execution_context_service_base<winrt_ssocket_service<Protocol> >,
+ public winrt_ssocket_service_base
+{
+public:
+ // The protocol type.
+ typedef Protocol protocol_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The native type of a socket.
+ typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
+
+ // The implementation type of the socket.
+ struct implementation_type : base_implementation_type
+ {
+ // Default constructor.
+ implementation_type()
+ : base_implementation_type(),
+ protocol_(endpoint_type().protocol())
+ {
+ }
+
+ // The protocol associated with the socket.
+ protocol_type protocol_;
+ };
+
+ // Constructor.
+ winrt_ssocket_service(execution_context& context)
+ : execution_context_service_base<winrt_ssocket_service<Protocol> >(context),
+ winrt_ssocket_service_base(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ this->base_shutdown();
+ }
+
+ // Move-construct a new socket implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-assign from another socket implementation.
+ void move_assign(implementation_type& impl,
+ winrt_ssocket_service& other_service,
+ implementation_type& other_impl)
+ {
+ this->base_move_assign(impl, other_service, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-construct a new socket implementation from another protocol type.
+ template <typename Protocol1>
+ void converting_move_construct(implementation_type& impl,
+ winrt_ssocket_service<Protocol1>&,
+ typename winrt_ssocket_service<
+ Protocol1>::implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = protocol_type(other_impl.protocol_);
+ other_impl.protocol_ = typename Protocol1::endpoint().protocol();
+ }
+
+ // Open a new socket implementation.
+ boost::system::error_code open(implementation_type& impl,
+ const protocol_type& protocol, boost::system::error_code& ec)
+ {
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ try
+ {
+ impl.socket_ = ref new Windows::Networking::Sockets::StreamSocket;
+ impl.protocol_ = protocol;
+ ec = boost::system::error_code();
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ }
+
+ return ec;
+ }
+
+ // Assign a native socket to a socket implementation.
+ boost::system::error_code assign(implementation_type& impl,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ boost::system::error_code& ec)
+ {
+ if (is_open(impl))
+ {
+ ec = boost::asio::error::already_open;
+ return ec;
+ }
+
+ impl.socket_ = native_socket;
+ impl.protocol_ = protocol;
+ ec = boost::system::error_code();
+
+ return ec;
+ }
+
+ // Bind the socket to the specified local endpoint.
+ boost::system::error_code bind(implementation_type&,
+ const endpoint_type&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Get the local endpoint.
+ endpoint_type local_endpoint(const implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ endpoint.resize(do_get_endpoint(impl, true,
+ endpoint.data(), endpoint.size(), ec));
+ return endpoint;
+ }
+
+ // Get the remote endpoint.
+ endpoint_type remote_endpoint(const implementation_type& impl,
+ boost::system::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ endpoint.resize(do_get_endpoint(impl, false,
+ endpoint.data(), endpoint.size(), ec));
+ return endpoint;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ boost::system::error_code set_option(implementation_type& impl,
+ const Option& option, boost::system::error_code& ec)
+ {
+ return do_set_option(impl, option.level(impl.protocol_),
+ option.name(impl.protocol_), option.data(impl.protocol_),
+ option.size(impl.protocol_), ec);
+ }
+
+ // Get a socket option.
+ template <typename Option>
+ boost::system::error_code get_option(const implementation_type& impl,
+ Option& option, boost::system::error_code& ec) const
+ {
+ std::size_t size = option.size(impl.protocol_);
+ do_get_option(impl, option.level(impl.protocol_),
+ option.name(impl.protocol_),
+ option.data(impl.protocol_), &size, ec);
+ if (!ec)
+ option.resize(impl.protocol_, size);
+ return ec;
+ }
+
+ // Connect the socket to the specified endpoint.
+ boost::system::error_code connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint, boost::system::error_code& ec)
+ {
+ return do_connect(impl, peer_endpoint.data(), ec);
+ }
+
+ // Start an asynchronous connect.
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef winrt_socket_connect_op<Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "socket", &impl, 0, "async_connect"));
+
+ start_connect_op(impl, peer_endpoint.data(), p.p, is_continuation);
+ p.v = p.p = 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service_base.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service_base.hpp
new file mode 100644
index 00000000000..cb7b6c07f7c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_ssocket_service_base.hpp
@@ -0,0 +1,372 @@
+//
+// detail/winrt_ssocket_service_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_SSOCKET_SERVICE_BASE_HPP
+#define BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_BASE_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_WINDOWS_RUNTIME)
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/winrt_async_manager.hpp>
+#include <boost/asio/detail/winrt_socket_recv_op.hpp>
+#include <boost/asio/detail/winrt_socket_send_op.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class winrt_ssocket_service_base
+{
+public:
+ // The native type of a socket.
+ typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
+
+ // The implementation type of the socket.
+ struct base_implementation_type
+ {
+ // Default constructor.
+ base_implementation_type()
+ : socket_(nullptr),
+ next_(0),
+ prev_(0)
+ {
+ }
+
+ // The underlying native socket.
+ native_handle_type socket_;
+
+ // Pointers to adjacent socket implementations in linked list.
+ base_implementation_type* next_;
+ base_implementation_type* prev_;
+ };
+
+ // Constructor.
+ BOOST_ASIO_DECL winrt_ssocket_service_base(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void base_shutdown();
+
+ // Construct a new socket implementation.
+ BOOST_ASIO_DECL void construct(base_implementation_type&);
+
+ // Move-construct a new socket implementation.
+ BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
+ base_implementation_type& other_impl);
+
+ // Move-assign from another socket implementation.
+ BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
+ winrt_ssocket_service_base& other_service,
+ base_implementation_type& other_impl);
+
+ // Destroy a socket implementation.
+ BOOST_ASIO_DECL void destroy(base_implementation_type& impl);
+
+ // Determine whether the socket is open.
+ bool is_open(const base_implementation_type& impl) const
+ {
+ return impl.socket_ != nullptr;
+ }
+
+ // Destroy a socket implementation.
+ BOOST_ASIO_DECL boost::system::error_code close(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Release ownership of the socket.
+ BOOST_ASIO_DECL native_handle_type release(
+ base_implementation_type& impl, boost::system::error_code& ec);
+
+ // Get the native socket representation.
+ native_handle_type native_handle(base_implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Cancel all operations associated with the socket.
+ boost::system::error_code cancel(base_implementation_type&,
+ boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Determine whether the socket is at the out-of-band data mark.
+ bool at_mark(const base_implementation_type&,
+ boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return false;
+ }
+
+ // Determine the number of bytes available for reading.
+ std::size_t available(const base_implementation_type&,
+ boost::system::error_code& ec) const
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Perform an IO control command on the socket.
+ template <typename IO_Control_Command>
+ boost::system::error_code io_control(base_implementation_type&,
+ IO_Control_Command&, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the socket.
+ bool non_blocking(const base_implementation_type&) const
+ {
+ return false;
+ }
+
+ // Sets the non-blocking mode of the socket.
+ boost::system::error_code non_blocking(base_implementation_type&,
+ bool, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native socket implementation.
+ bool native_non_blocking(const base_implementation_type&) const
+ {
+ return false;
+ }
+
+ // Sets the non-blocking mode of the native socket implementation.
+ boost::system::error_code native_non_blocking(base_implementation_type&,
+ bool, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Disable sends or receives on the socket.
+ boost::system::error_code shutdown(base_implementation_type&,
+ socket_base::shutdown_type, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return ec;
+ }
+
+ // Send the given data to the peer.
+ template <typename ConstBufferSequence>
+ std::size_t send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return do_send(impl,
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::first(buffers), flags, ec);
+ }
+
+ // Wait until data can be sent without blocking.
+ std::size_t send(base_implementation_type&, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef winrt_socket_send_op<ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "socket", &impl, 0, "async_send"));
+
+ start_send_op(impl,
+ buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::first(buffers),
+ flags, p.p, is_continuation);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type&, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex,
+ detail::bind_handler(handler, ec, bytes_transferred));
+ }
+
+ // Receive some data from the peer. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ std::size_t receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, boost::system::error_code& ec)
+ {
+ return do_receive(impl,
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::first(buffers), flags, ec);
+ }
+
+ // Wait until data can be received without blocking.
+ std::size_t receive(base_implementation_type&, const null_buffers&,
+ socket_base::message_flags, boost::system::error_code& ec)
+ {
+ ec = boost::asio::error::operation_not_supported;
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef winrt_socket_recv_op<MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { boost::asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(buffers, handler, io_ex);
+
+ BOOST_ASIO_HANDLER_CREATION((scheduler_.context(),
+ *p.p, "socket", &impl, 0, "async_receive"));
+
+ start_receive_op(impl,
+ buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::first(buffers),
+ flags, p.p, is_continuation);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type&, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ boost::system::error_code ec = boost::asio::error::operation_not_supported;
+ const std::size_t bytes_transferred = 0;
+ boost::asio::post(io_ex,
+ detail::bind_handler(handler, ec, bytes_transferred));
+ }
+
+protected:
+ // Helper function to obtain endpoints associated with the connection.
+ BOOST_ASIO_DECL std::size_t do_get_endpoint(
+ const base_implementation_type& impl, bool local,
+ void* addr, std::size_t addr_len, boost::system::error_code& ec) const;
+
+ // Helper function to set a socket option.
+ BOOST_ASIO_DECL boost::system::error_code do_set_option(
+ base_implementation_type& impl,
+ int level, int optname, const void* optval,
+ std::size_t optlen, boost::system::error_code& ec);
+
+ // Helper function to get a socket option.
+ BOOST_ASIO_DECL void do_get_option(
+ const base_implementation_type& impl,
+ int level, int optname, void* optval,
+ std::size_t* optlen, boost::system::error_code& ec) const;
+
+ // Helper function to perform a synchronous connect.
+ BOOST_ASIO_DECL boost::system::error_code do_connect(
+ base_implementation_type& impl,
+ const void* addr, boost::system::error_code& ec);
+
+ // Helper function to start an asynchronous connect.
+ BOOST_ASIO_DECL void start_connect_op(
+ base_implementation_type& impl, const void* addr,
+ winrt_async_op<void>* op, bool is_continuation);
+
+ // Helper function to perform a synchronous send.
+ BOOST_ASIO_DECL std::size_t do_send(
+ base_implementation_type& impl, const boost::asio::const_buffer& data,
+ socket_base::message_flags flags, boost::system::error_code& ec);
+
+ // Helper function to start an asynchronous send.
+ BOOST_ASIO_DECL void start_send_op(base_implementation_type& impl,
+ const boost::asio::const_buffer& data, socket_base::message_flags flags,
+ winrt_async_op<unsigned int>* op, bool is_continuation);
+
+ // Helper function to perform a synchronous receive.
+ BOOST_ASIO_DECL std::size_t do_receive(
+ base_implementation_type& impl, const boost::asio::mutable_buffer& data,
+ socket_base::message_flags flags, boost::system::error_code& ec);
+
+ // Helper function to start an asynchronous receive.
+ BOOST_ASIO_DECL void start_receive_op(base_implementation_type& impl,
+ const boost::asio::mutable_buffer& data, socket_base::message_flags flags,
+ winrt_async_op<Windows::Storage::Streams::IBuffer^>* op,
+ bool is_continuation);
+
+ // The scheduler implementation used for delivering completions.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+ // The manager that keeps track of outstanding operations.
+ winrt_async_manager& async_manager_;
+
+ // Mutex to protect access to the linked list of implementations.
+ boost::asio::detail::mutex mutex_;
+
+ // The head of a linked list of all implementations.
+ base_implementation_type* impl_list_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/winrt_ssocket_service_base.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_timer_scheduler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_timer_scheduler.hpp
new file mode 100644
index 00000000000..d48ed2cb6a3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_timer_scheduler.hpp
@@ -0,0 +1,149 @@
+//
+// detail/winrt_timer_scheduler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_TIMER_SCHEDULER_HPP
+#define BOOST_ASIO_DETAIL_WINRT_TIMER_SCHEDULER_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_WINDOWS_RUNTIME)
+
+#include <cstddef>
+#include <boost/asio/detail/event.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/thread.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/timer_queue_set.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else // defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/scheduler.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/thread.hpp>
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class winrt_timer_scheduler
+ : public execution_context_service_base<winrt_timer_scheduler>
+{
+public:
+ // Constructor.
+ BOOST_ASIO_DECL winrt_timer_scheduler(execution_context& context);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~winrt_timer_scheduler();
+
+ // Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL void shutdown();
+
+ // Recreate internal descriptors following a fork.
+ BOOST_ASIO_DECL void notify_fork(execution_context::fork_event fork_ev);
+
+ // Initialise the task. No effect as this class uses its own thread.
+ BOOST_ASIO_DECL void init_task();
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& to,
+ typename timer_queue<Time_Traits>::per_timer_data& from);
+
+private:
+ // Run the select loop in the thread.
+ BOOST_ASIO_DECL void run_thread();
+
+ // Entry point for the select loop thread.
+ BOOST_ASIO_DECL static void call_run_thread(winrt_timer_scheduler* reactor);
+
+ // Helper function to add a new timer queue.
+ BOOST_ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ BOOST_ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // The scheduler implementation used to post completions.
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
+ // Mutex used to protect internal variables.
+ boost::asio::detail::mutex mutex_;
+
+ // Event used to wake up background thread.
+ boost::asio::detail::event event_;
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // The background thread that is waiting for timers to expire.
+ boost::asio::detail::thread* thread_;
+
+ // Does the background thread need to stop.
+ bool stop_thread_;
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/detail/impl/winrt_timer_scheduler.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/winrt_timer_scheduler.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_TIMER_SCHEDULER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winrt_utils.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_utils.hpp
new file mode 100644
index 00000000000..bc765aeb667
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winrt_utils.hpp
@@ -0,0 +1,108 @@
+//
+// detail/winrt_utils.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINRT_UTILS_HPP
+#define BOOST_ASIO_DETAIL_WINRT_UTILS_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_WINDOWS_RUNTIME)
+
+#include <codecvt>
+#include <cstdlib>
+#include <future>
+#include <locale>
+#include <robuffer.h>
+#include <windows.storage.streams.h>
+#include <wrl/implements.h>
+#include <boost/asio/buffer.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace winrt_utils {
+
+inline Platform::String^ string(const char* from)
+{
+ std::wstring tmp(from, from + std::strlen(from));
+ return ref new Platform::String(tmp.c_str());
+}
+
+inline Platform::String^ string(const std::string& from)
+{
+ std::wstring tmp(from.begin(), from.end());
+ return ref new Platform::String(tmp.c_str());
+}
+
+inline std::string string(Platform::String^ from)
+{
+ std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
+ return converter.to_bytes(from->Data());
+}
+
+inline Platform::String^ string(unsigned short from)
+{
+ return string(std::to_string(from));
+}
+
+template <typename T>
+inline Platform::String^ string(const T& from)
+{
+ return string(from.to_string());
+}
+
+inline int integer(Platform::String^ from)
+{
+ return _wtoi(from->Data());
+}
+
+template <typename T>
+inline Windows::Networking::HostName^ host_name(const T& from)
+{
+ return ref new Windows::Networking::HostName((string)(from));
+}
+
+template <typename ConstBufferSequence>
+inline Windows::Storage::Streams::IBuffer^ buffer_dup(
+ const ConstBufferSequence& buffers)
+{
+ using Microsoft::WRL::ComPtr;
+ using boost::asio::buffer_size;
+ std::size_t size = buffer_size(buffers);
+ auto b = ref new Windows::Storage::Streams::Buffer(size);
+ ComPtr<IInspectable> insp = reinterpret_cast<IInspectable*>(b);
+ ComPtr<Windows::Storage::Streams::IBufferByteAccess> bacc;
+ insp.As(&bacc);
+ byte* bytes = nullptr;
+ bacc->Buffer(&bytes);
+ boost::asio::buffer_copy(boost::asio::buffer(bytes, size), buffers);
+ b->Length = size;
+ return b;
+}
+
+} // namespace winrt_utils
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#endif // BOOST_ASIO_DETAIL_WINRT_UTILS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/winsock_init.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/winsock_init.hpp
new file mode 100644
index 00000000000..dfda0108395
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/winsock_init.hpp
@@ -0,0 +1,130 @@
+//
+// detail/winsock_init.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINSOCK_INIT_HPP
+#define BOOST_ASIO_DETAIL_WINSOCK_INIT_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_WINDOWS) || defined(__CYGWIN__)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class winsock_init_base
+{
+protected:
+ // Structure to track result of initialisation and number of uses. POD is used
+ // to ensure that the values are zero-initialised prior to any code being run.
+ struct data
+ {
+ long init_count_;
+ long result_;
+ };
+
+ BOOST_ASIO_DECL static void startup(data& d,
+ unsigned char major, unsigned char minor);
+
+ BOOST_ASIO_DECL static void manual_startup(data& d);
+
+ BOOST_ASIO_DECL static void cleanup(data& d);
+
+ BOOST_ASIO_DECL static void manual_cleanup(data& d);
+
+ BOOST_ASIO_DECL static void throw_on_error(data& d);
+};
+
+template <int Major = 2, int Minor = 0>
+class winsock_init : private winsock_init_base
+{
+public:
+ winsock_init(bool allow_throw = true)
+ {
+ startup(data_, Major, Minor);
+ if (allow_throw)
+ throw_on_error(data_);
+ }
+
+ winsock_init(const winsock_init&)
+ {
+ startup(data_, Major, Minor);
+ throw_on_error(data_);
+ }
+
+ ~winsock_init()
+ {
+ cleanup(data_);
+ }
+
+ // This class may be used to indicate that user code will manage Winsock
+ // initialisation and cleanup. This may be required in the case of a DLL, for
+ // example, where it is not safe to initialise Winsock from global object
+ // constructors.
+ //
+ // To prevent asio from initialising Winsock, the object must be constructed
+ // before any Asio's own global objects. With MSVC, this may be accomplished
+ // by adding the following code to the DLL:
+ //
+ // #pragma warning(push)
+ // #pragma warning(disable:4073)
+ // #pragma init_seg(lib)
+ // boost::asio::detail::winsock_init<>::manual manual_winsock_init;
+ // #pragma warning(pop)
+ class manual
+ {
+ public:
+ manual()
+ {
+ manual_startup(data_);
+ }
+
+ manual(const manual&)
+ {
+ manual_startup(data_);
+ }
+
+ ~manual()
+ {
+ manual_cleanup(data_);
+ }
+ };
+
+private:
+ friend class manual;
+ static data data_;
+};
+
+template <int Major, int Minor>
+winsock_init_base::data winsock_init<Major, Minor>::data_;
+
+// Static variable to ensure that winsock is initialised before main, and
+// therefore before any other threads can get started.
+static const winsock_init<>& winsock_init_instance = winsock_init<>(false);
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/winsock_init.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#endif // BOOST_ASIO_DETAIL_WINSOCK_INIT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/work_dispatcher.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/work_dispatcher.hpp
new file mode 100644
index 00000000000..9a92c45e022
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/work_dispatcher.hpp
@@ -0,0 +1,75 @@
+//
+// detail/work_dispatcher.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WORK_DISPATCHER_HPP
+#define BOOST_ASIO_DETAIL_WORK_DISPATCHER_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/associated_executor.hpp>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/executor_work_guard.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Handler>
+class work_dispatcher
+{
+public:
+ template <typename CompletionHandler>
+ explicit work_dispatcher(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
+ : work_((get_associated_executor)(handler)),
+ handler_(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ work_dispatcher(const work_dispatcher& other)
+ : work_(other.work_),
+ handler_(other.handler_)
+ {
+ }
+
+ work_dispatcher(work_dispatcher&& other)
+ : work_(BOOST_ASIO_MOVE_CAST(executor_work_guard<
+ typename associated_executor<Handler>::type>)(other.work_)),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ typename associated_allocator<Handler>::type alloc(
+ (get_associated_allocator)(handler_));
+ work_.get_executor().dispatch(
+ BOOST_ASIO_MOVE_CAST(Handler)(handler_), alloc);
+ work_.reset();
+ }
+
+private:
+ executor_work_guard<typename associated_executor<Handler>::type> work_;
+ Handler handler_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WORK_DISPATCHER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/detail/wrapped_handler.hpp b/src/third_party/boost-1.70.0/boost/asio/detail/wrapped_handler.hpp
new file mode 100644
index 00000000000..8496168975f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/detail/wrapped_handler.hpp
@@ -0,0 +1,293 @@
+//
+// detail/wrapped_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WRAPPED_HANDLER_HPP
+#define BOOST_ASIO_DETAIL_WRAPPED_HANDLER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct is_continuation_delegated
+{
+ template <typename Dispatcher, typename Handler>
+ bool operator()(Dispatcher&, Handler& handler) const
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(handler);
+ }
+};
+
+struct is_continuation_if_running
+{
+ template <typename Dispatcher, typename Handler>
+ bool operator()(Dispatcher& dispatcher, Handler&) const
+ {
+ return dispatcher.running_in_this_thread();
+ }
+};
+
+template <typename Dispatcher, typename Handler,
+ typename IsContinuation = is_continuation_delegated>
+class wrapped_handler
+{
+public:
+ typedef void result_type;
+
+ wrapped_handler(Dispatcher dispatcher, Handler& handler)
+ : dispatcher_(dispatcher),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ wrapped_handler(const wrapped_handler& other)
+ : dispatcher_(other.dispatcher_),
+ handler_(other.handler_)
+ {
+ }
+
+ wrapped_handler(wrapped_handler&& other)
+ : dispatcher_(other.dispatcher_),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ dispatcher_.dispatch(BOOST_ASIO_MOVE_CAST(Handler)(handler_));
+ }
+
+ void operator()() const
+ {
+ dispatcher_.dispatch(handler_);
+ }
+
+ template <typename Arg1>
+ void operator()(const Arg1& arg1)
+ {
+ dispatcher_.dispatch(detail::bind_handler(handler_, arg1));
+ }
+
+ template <typename Arg1>
+ void operator()(const Arg1& arg1) const
+ {
+ dispatcher_.dispatch(detail::bind_handler(handler_, arg1));
+ }
+
+ template <typename Arg1, typename Arg2>
+ void operator()(const Arg1& arg1, const Arg2& arg2)
+ {
+ dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2));
+ }
+
+ template <typename Arg1, typename Arg2>
+ void operator()(const Arg1& arg1, const Arg2& arg2) const
+ {
+ dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3>
+ void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3)
+ {
+ dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2, arg3));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3>
+ void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3) const
+ {
+ dispatcher_.dispatch(detail::bind_handler(handler_, arg1, arg2, arg3));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+ void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
+ const Arg4& arg4)
+ {
+ dispatcher_.dispatch(
+ detail::bind_handler(handler_, arg1, arg2, arg3, arg4));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+ void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
+ const Arg4& arg4) const
+ {
+ dispatcher_.dispatch(
+ detail::bind_handler(handler_, arg1, arg2, arg3, arg4));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3, typename Arg4,
+ typename Arg5>
+ void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
+ const Arg4& arg4, const Arg5& arg5)
+ {
+ dispatcher_.dispatch(
+ detail::bind_handler(handler_, arg1, arg2, arg3, arg4, arg5));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3, typename Arg4,
+ typename Arg5>
+ void operator()(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3,
+ const Arg4& arg4, const Arg5& arg5) const
+ {
+ dispatcher_.dispatch(
+ detail::bind_handler(handler_, arg1, arg2, arg3, arg4, arg5));
+ }
+
+//private:
+ Dispatcher dispatcher_;
+ Handler handler_;
+};
+
+template <typename Handler, typename Context>
+class rewrapped_handler
+{
+public:
+ explicit rewrapped_handler(Handler& handler, const Context& context)
+ : context_(context),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
+ {
+ }
+
+ explicit rewrapped_handler(const Handler& handler, const Context& context)
+ : context_(context),
+ handler_(handler)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ rewrapped_handler(const rewrapped_handler& other)
+ : context_(other.context_),
+ handler_(other.handler_)
+ {
+ }
+
+ rewrapped_handler(rewrapped_handler&& other)
+ : context_(BOOST_ASIO_MOVE_CAST(Context)(other.context_)),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()()
+ {
+ handler_();
+ }
+
+ void operator()() const
+ {
+ handler_();
+ }
+
+//private:
+ Context context_;
+ Handler handler_;
+};
+
+template <typename Dispatcher, typename Handler, typename IsContinuation>
+inline void* asio_handler_allocate(std::size_t size,
+ wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Dispatcher, typename Handler, typename IsContinuation>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Dispatcher, typename Handler, typename IsContinuation>
+inline bool asio_handler_is_continuation(
+ wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
+{
+ return IsContinuation()(this_handler->dispatcher_, this_handler->handler_);
+}
+
+template <typename Function, typename Dispatcher,
+ typename Handler, typename IsContinuation>
+inline void asio_handler_invoke(Function& function,
+ wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
+{
+ this_handler->dispatcher_.dispatch(
+ rewrapped_handler<Function, Handler>(
+ function, this_handler->handler_));
+}
+
+template <typename Function, typename Dispatcher,
+ typename Handler, typename IsContinuation>
+inline void asio_handler_invoke(const Function& function,
+ wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
+{
+ this_handler->dispatcher_.dispatch(
+ rewrapped_handler<Function, Handler>(
+ function, this_handler->handler_));
+}
+
+template <typename Handler, typename Context>
+inline void* asio_handler_allocate(std::size_t size,
+ rewrapped_handler<Handler, Context>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->context_);
+}
+
+template <typename Handler, typename Context>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ rewrapped_handler<Handler, Context>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->context_);
+}
+
+template <typename Dispatcher, typename Context>
+inline bool asio_handler_is_continuation(
+ rewrapped_handler<Dispatcher, Context>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->context_);
+}
+
+template <typename Function, typename Handler, typename Context>
+inline void asio_handler_invoke(Function& function,
+ rewrapped_handler<Handler, Context>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->context_);
+}
+
+template <typename Function, typename Handler, typename Context>
+inline void asio_handler_invoke(const Function& function,
+ rewrapped_handler<Handler, Context>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->context_);
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WRAPPED_HANDLER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/dispatch.hpp b/src/third_party/boost-1.70.0/boost/asio/dispatch.hpp
new file mode 100644
index 00000000000..578608c0c39
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/dispatch.hpp
@@ -0,0 +1,110 @@
+//
+// dispatch.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DISPATCH_HPP
+#define BOOST_ASIO_DISPATCH_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/type_traits.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/is_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Submits a completion token or function object for execution.
+/**
+ * This function submits an object for execution using the object's associated
+ * executor. The function object may be called from the current thread prior to
+ * returning from <tt>dispatch()</tt>. Otherwise, it is queued for execution.
+ *
+ * This function has the following effects:
+ *
+ * @li Constructs a function object handler of type @c Handler, initialized
+ * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ *
+ * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
+ * initializing the object as <tt>result(handler)</tt>.
+ *
+ * @li Obtains the handler's associated executor object @c ex by performing
+ * <tt>get_associated_executor(handler)</tt>.
+ *
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * <tt>get_associated_allocator(handler)</tt>.
+ *
+ * @li Performs <tt>ex.dispatch(std::move(handler), alloc)</tt>.
+ *
+ * @li Returns <tt>result.get()</tt>.
+ */
+template <typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) token);
+
+/// Submits a completion token or function object for execution.
+/**
+ * This function submits an object for execution using the specified executor.
+ * The function object may be called from the current thread prior to returning
+ * from <tt>dispatch()</tt>. Otherwise, it is queued for execution.
+ *
+ * This function has the following effects:
+ *
+ * @li Constructs a function object handler of type @c Handler, initialized
+ * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ *
+ * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
+ * initializing the object as <tt>result(handler)</tt>.
+ *
+ * @li Obtains the handler's associated executor object @c ex1 by performing
+ * <tt>get_associated_executor(handler)</tt>.
+ *
+ * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
+ *
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * <tt>get_associated_allocator(handler)</tt>.
+ *
+ * @li Constructs a function object @c f with a function call operator that
+ * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
+ * <tt>w.reset()</tt>.
+ *
+ * @li Performs <tt>Executor(ex).dispatch(std::move(f), alloc)</tt>.
+ *
+ * @li Returns <tt>result.get()</tt>.
+ */
+template <typename Executor, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
+ const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_executor<Executor>::value>::type* = 0);
+
+/// Submits a completion token or function object for execution.
+/**
+ * @returns <tt>dispatch(ctx.get_executor(),
+ * forward<CompletionToken>(token))</tt>.
+ */
+template <typename ExecutionContext, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
+ ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type* = 0);
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/dispatch.hpp>
+
+#endif // BOOST_ASIO_DISPATCH_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/error.hpp b/src/third_party/boost-1.70.0/boost/asio/error.hpp
new file mode 100644
index 00000000000..448d9aeb840
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/error.hpp
@@ -0,0 +1,361 @@
+//
+// error.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ERROR_HPP
+#define BOOST_ASIO_ERROR_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/cerrno.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/system/system_error.hpp>
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <winerror.h>
+#else
+# include <cerrno>
+# include <netdb.h>
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+/// INTERNAL ONLY.
+# define BOOST_ASIO_NATIVE_ERROR(e) implementation_defined
+/// INTERNAL ONLY.
+# define BOOST_ASIO_SOCKET_ERROR(e) implementation_defined
+/// INTERNAL ONLY.
+# define BOOST_ASIO_NETDB_ERROR(e) implementation_defined
+/// INTERNAL ONLY.
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) implementation_defined
+/// INTERNAL ONLY.
+# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) implementation_defined
+#elif defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# define BOOST_ASIO_NATIVE_ERROR(e) __HRESULT_FROM_WIN32(e)
+# define BOOST_ASIO_SOCKET_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
+# define BOOST_ASIO_NETDB_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
+# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# define BOOST_ASIO_NATIVE_ERROR(e) e
+# define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e
+# define BOOST_ASIO_NETDB_ERROR(e) WSA ## e
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) WSA ## e
+# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
+#else
+# define BOOST_ASIO_NATIVE_ERROR(e) e
+# define BOOST_ASIO_SOCKET_ERROR(e) e
+# define BOOST_ASIO_NETDB_ERROR(e) e
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) e
+# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_posix
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace error {
+
+enum basic_errors
+{
+ /// Permission denied.
+ access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES),
+
+ /// Address family not supported by protocol.
+ address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(EAFNOSUPPORT),
+
+ /// Address already in use.
+ address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE),
+
+ /// Transport endpoint is already connected.
+ already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN),
+
+ /// Operation already in progress.
+ already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY),
+
+ /// Broken pipe.
+ broken_pipe = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_BROKEN_PIPE),
+ BOOST_ASIO_NATIVE_ERROR(EPIPE)),
+
+ /// A connection has been aborted.
+ connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED),
+
+ /// Connection refused.
+ connection_refused = BOOST_ASIO_SOCKET_ERROR(ECONNREFUSED),
+
+ /// Connection reset by peer.
+ connection_reset = BOOST_ASIO_SOCKET_ERROR(ECONNRESET),
+
+ /// Bad file descriptor.
+ bad_descriptor = BOOST_ASIO_SOCKET_ERROR(EBADF),
+
+ /// Bad address.
+ fault = BOOST_ASIO_SOCKET_ERROR(EFAULT),
+
+ /// No route to host.
+ host_unreachable = BOOST_ASIO_SOCKET_ERROR(EHOSTUNREACH),
+
+ /// Operation now in progress.
+ in_progress = BOOST_ASIO_SOCKET_ERROR(EINPROGRESS),
+
+ /// Interrupted system call.
+ interrupted = BOOST_ASIO_SOCKET_ERROR(EINTR),
+
+ /// Invalid argument.
+ invalid_argument = BOOST_ASIO_SOCKET_ERROR(EINVAL),
+
+ /// Message too long.
+ message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE),
+
+ /// The name was too long.
+ name_too_long = BOOST_ASIO_SOCKET_ERROR(ENAMETOOLONG),
+
+ /// Network is down.
+ network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN),
+
+ /// Network dropped connection on reset.
+ network_reset = BOOST_ASIO_SOCKET_ERROR(ENETRESET),
+
+ /// Network is unreachable.
+ network_unreachable = BOOST_ASIO_SOCKET_ERROR(ENETUNREACH),
+
+ /// Too many open files.
+ no_descriptors = BOOST_ASIO_SOCKET_ERROR(EMFILE),
+
+ /// No buffer space available.
+ no_buffer_space = BOOST_ASIO_SOCKET_ERROR(ENOBUFS),
+
+ /// Cannot allocate memory.
+ no_memory = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_OUTOFMEMORY),
+ BOOST_ASIO_NATIVE_ERROR(ENOMEM)),
+
+ /// Operation not permitted.
+ no_permission = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_ACCESS_DENIED),
+ BOOST_ASIO_NATIVE_ERROR(EPERM)),
+
+ /// Protocol not available.
+ no_protocol_option = BOOST_ASIO_SOCKET_ERROR(ENOPROTOOPT),
+
+ /// No such device.
+ no_such_device = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_BAD_UNIT),
+ BOOST_ASIO_NATIVE_ERROR(ENODEV)),
+
+ /// Transport endpoint is not connected.
+ not_connected = BOOST_ASIO_SOCKET_ERROR(ENOTCONN),
+
+ /// Socket operation on non-socket.
+ not_socket = BOOST_ASIO_SOCKET_ERROR(ENOTSOCK),
+
+ /// Operation cancelled.
+ operation_aborted = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED),
+ BOOST_ASIO_NATIVE_ERROR(ECANCELED)),
+
+ /// Operation not supported.
+ operation_not_supported = BOOST_ASIO_SOCKET_ERROR(EOPNOTSUPP),
+
+ /// Cannot send after transport endpoint shutdown.
+ shut_down = BOOST_ASIO_SOCKET_ERROR(ESHUTDOWN),
+
+ /// Connection timed out.
+ timed_out = BOOST_ASIO_SOCKET_ERROR(ETIMEDOUT),
+
+ /// Resource temporarily unavailable.
+ try_again = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_RETRY),
+ BOOST_ASIO_NATIVE_ERROR(EAGAIN)),
+
+ /// The socket is marked non-blocking and the requested operation would block.
+ would_block = BOOST_ASIO_SOCKET_ERROR(EWOULDBLOCK)
+};
+
+enum netdb_errors
+{
+ /// Host not found (authoritative).
+ host_not_found = BOOST_ASIO_NETDB_ERROR(HOST_NOT_FOUND),
+
+ /// Host not found (non-authoritative).
+ host_not_found_try_again = BOOST_ASIO_NETDB_ERROR(TRY_AGAIN),
+
+ /// The query is valid but does not have associated address data.
+ no_data = BOOST_ASIO_NETDB_ERROR(NO_DATA),
+
+ /// A non-recoverable error occurred.
+ no_recovery = BOOST_ASIO_NETDB_ERROR(NO_RECOVERY)
+};
+
+enum addrinfo_errors
+{
+ /// The service is not supported for the given socket type.
+ service_not_found = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND),
+ BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE)),
+
+ /// The socket type is not supported.
+ socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT),
+ BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE))
+};
+
+enum misc_errors
+{
+ /// Already open.
+ already_open = 1,
+
+ /// End of file or stream.
+ eof,
+
+ /// Element not found.
+ not_found,
+
+ /// The descriptor cannot fit into the select system call's fd_set.
+ fd_set_failure
+};
+
+inline const boost::system::error_category& get_system_category()
+{
+ return boost::system::system_category();
+}
+
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+extern BOOST_ASIO_DECL
+const boost::system::error_category& get_netdb_category();
+
+extern BOOST_ASIO_DECL
+const boost::system::error_category& get_addrinfo_category();
+
+#else // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+inline const boost::system::error_category& get_netdb_category()
+{
+ return get_system_category();
+}
+
+inline const boost::system::error_category& get_addrinfo_category()
+{
+ return get_system_category();
+}
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+extern BOOST_ASIO_DECL
+const boost::system::error_category& get_misc_category();
+
+static const boost::system::error_category&
+ system_category BOOST_ASIO_UNUSED_VARIABLE
+ = boost::asio::error::get_system_category();
+static const boost::system::error_category&
+ netdb_category BOOST_ASIO_UNUSED_VARIABLE
+ = boost::asio::error::get_netdb_category();
+static const boost::system::error_category&
+ addrinfo_category BOOST_ASIO_UNUSED_VARIABLE
+ = boost::asio::error::get_addrinfo_category();
+static const boost::system::error_category&
+ misc_category BOOST_ASIO_UNUSED_VARIABLE
+ = boost::asio::error::get_misc_category();
+
+} // namespace error
+} // namespace asio
+} // namespace boost
+
+namespace boost {
+namespace system {
+
+template<> struct is_error_code_enum<boost::asio::error::basic_errors>
+{
+ static const bool value = true;
+};
+
+template<> struct is_error_code_enum<boost::asio::error::netdb_errors>
+{
+ static const bool value = true;
+};
+
+template<> struct is_error_code_enum<boost::asio::error::addrinfo_errors>
+{
+ static const bool value = true;
+};
+
+template<> struct is_error_code_enum<boost::asio::error::misc_errors>
+{
+ static const bool value = true;
+};
+
+} // namespace system
+} // namespace boost
+
+namespace boost {
+namespace asio {
+namespace error {
+
+inline boost::system::error_code make_error_code(basic_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_system_category());
+}
+
+inline boost::system::error_code make_error_code(netdb_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_netdb_category());
+}
+
+inline boost::system::error_code make_error_code(addrinfo_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_addrinfo_category());
+}
+
+inline boost::system::error_code make_error_code(misc_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_misc_category());
+}
+
+} // namespace error
+namespace stream_errc {
+ // Simulates the proposed stream_errc scoped enum.
+ using error::eof;
+ using error::not_found;
+} // namespace stream_errc
+namespace socket_errc {
+ // Simulates the proposed socket_errc scoped enum.
+ using error::already_open;
+ using error::not_found;
+} // namespace socket_errc
+namespace resolver_errc {
+ // Simulates the proposed resolver_errc scoped enum.
+ using error::host_not_found;
+ const error::netdb_errors try_again = error::host_not_found_try_again;
+ using error::service_not_found;
+} // namespace resolver_errc
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#undef BOOST_ASIO_NATIVE_ERROR
+#undef BOOST_ASIO_SOCKET_ERROR
+#undef BOOST_ASIO_NETDB_ERROR
+#undef BOOST_ASIO_GETADDRINFO_ERROR
+#undef BOOST_ASIO_WIN_OR_POSIX
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/error.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_ERROR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/execution_context.hpp b/src/third_party/boost-1.70.0/boost/asio/execution_context.hpp
new file mode 100644
index 00000000000..f89fb4cdeb7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/execution_context.hpp
@@ -0,0 +1,414 @@
+//
+// execution_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTION_CONTEXT_HPP
+#define BOOST_ASIO_EXECUTION_CONTEXT_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 <stdexcept>
+#include <typeinfo>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/variadic_templates.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class execution_context;
+class io_context;
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Service> Service& use_service(execution_context&);
+template <typename Service> Service& use_service(io_context&);
+template <typename Service> void add_service(execution_context&, Service*);
+template <typename Service> bool has_service(execution_context&);
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+namespace detail { class service_registry; }
+
+/// A context for function object execution.
+/**
+ * An execution context represents a place where function objects will be
+ * executed. An @c io_context is an example of an execution context.
+ *
+ * @par The execution_context class and services
+ *
+ * Class execution_context implements an extensible, type-safe, polymorphic set
+ * of services, indexed by service type.
+ *
+ * Services exist to manage the resources that are shared across an execution
+ * context. For example, timers may be implemented in terms of a single timer
+ * queue, and this queue would be stored in a service.
+ *
+ * Access to the services of an execution_context is via three function
+ * templates, use_service(), add_service() and has_service().
+ *
+ * In a call to @c use_service<Service>(), the type argument chooses a service,
+ * making available all members of the named type. If @c Service is not present
+ * in an execution_context, an object of type @c Service is created and added
+ * to the execution_context. A C++ program can check if an execution_context
+ * implements a particular service with the function template @c
+ * has_service<Service>().
+ *
+ * Service objects may be explicitly added to an execution_context using the
+ * function template @c add_service<Service>(). If the @c Service is already
+ * present, the service_already_exists exception is thrown. If the owner of the
+ * service is not the same object as the execution_context parameter, the
+ * invalid_service_owner exception is thrown.
+ *
+ * Once a service reference is obtained from an execution_context object by
+ * calling use_service(), that reference remains usable as long as the owning
+ * execution_context object exists.
+ *
+ * All service implementations have execution_context::service as a public base
+ * class. Custom services may be implemented by deriving from this class and
+ * then added to an execution_context using the facilities described above.
+ *
+ * @par The execution_context as a base class
+ *
+ * Class execution_context may be used only as a base class for concrete
+ * execution context types. The @c io_context is an example of such a derived
+ * type.
+ *
+ * On destruction, a class that is derived from execution_context must perform
+ * <tt>execution_context::shutdown()</tt> followed by
+ * <tt>execution_context::destroy()</tt>.
+ *
+ * This destruction sequence permits programs to simplify their resource
+ * management by using @c shared_ptr<>. Where an object's lifetime is tied to
+ * the lifetime of a connection (or some other sequence of asynchronous
+ * operations), a @c shared_ptr to the object would be bound into the handlers
+ * for all asynchronous operations associated with it. This works as follows:
+ *
+ * @li When a single connection ends, all associated asynchronous operations
+ * complete. The corresponding handler objects are destroyed, and all @c
+ * shared_ptr references to the objects are destroyed.
+ *
+ * @li To shut down the whole program, the io_context function stop() is called
+ * to terminate any run() calls as soon as possible. The io_context destructor
+ * calls @c shutdown() and @c destroy() to destroy all pending handlers,
+ * causing all @c shared_ptr references to all connection objects to be
+ * destroyed.
+ */
+class execution_context
+ : private noncopyable
+{
+public:
+ class id;
+ class service;
+
+public:
+ /// Constructor.
+ BOOST_ASIO_DECL execution_context();
+
+ /// Destructor.
+ BOOST_ASIO_DECL ~execution_context();
+
+protected:
+ /// Shuts down all services in the context.
+ /**
+ * This function is implemented as follows:
+ *
+ * @li For each service object @c svc in the execution_context set, in
+ * reverse order of the beginning of service object lifetime, performs @c
+ * svc->shutdown().
+ */
+ BOOST_ASIO_DECL void shutdown();
+
+ /// Destroys all services in the context.
+ /**
+ * This function is implemented as follows:
+ *
+ * @li For each service object @c svc in the execution_context set, in
+ * reverse order * of the beginning of service object lifetime, performs
+ * <tt>delete static_cast<execution_context::service*>(svc)</tt>.
+ */
+ BOOST_ASIO_DECL void destroy();
+
+public:
+ /// Fork-related event notifications.
+ enum fork_event
+ {
+ /// Notify the context that the process is about to fork.
+ fork_prepare,
+
+ /// Notify the context that the process has forked and is the parent.
+ fork_parent,
+
+ /// Notify the context that the process has forked and is the child.
+ fork_child
+ };
+
+ /// Notify the execution_context of a fork-related event.
+ /**
+ * This function is used to inform the execution_context that the process is
+ * about to fork, or has just forked. This allows the execution_context, and
+ * the services it contains, to perform any necessary housekeeping to ensure
+ * correct operation following a fork.
+ *
+ * This function must not be called while any other execution_context
+ * function, or any function associated with the execution_context's derived
+ * class, is being called in another thread. It is, however, safe to call
+ * this function from within a completion handler, provided no other thread
+ * is accessing the execution_context or its derived class.
+ *
+ * @param event A fork-related event.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the notification
+ * fails the execution_context object should no longer be used and should be
+ * destroyed.
+ *
+ * @par Example
+ * The following code illustrates how to incorporate the notify_fork()
+ * function:
+ * @code my_execution_context.notify_fork(execution_context::fork_prepare);
+ * if (fork() == 0)
+ * {
+ * // This is the child process.
+ * my_execution_context.notify_fork(execution_context::fork_child);
+ * }
+ * else
+ * {
+ * // This is the parent process.
+ * my_execution_context.notify_fork(execution_context::fork_parent);
+ * } @endcode
+ *
+ * @note For each service object @c svc in the execution_context set,
+ * performs <tt>svc->notify_fork();</tt>. When processing the fork_prepare
+ * event, services are visited in reverse order of the beginning of service
+ * object lifetime. Otherwise, services are visited in order of the beginning
+ * of service object lifetime.
+ */
+ BOOST_ASIO_DECL void notify_fork(fork_event event);
+
+ /// Obtain the service object corresponding to the given type.
+ /**
+ * This function is used to locate a service object that corresponds to the
+ * given service type. If there is no existing implementation of the service,
+ * then the execution_context will create a new instance of the service.
+ *
+ * @param e The execution_context object that owns the service.
+ *
+ * @return The service interface implementing the specified service type.
+ * Ownership of the service interface is not transferred to the caller.
+ */
+ template <typename Service>
+ friend Service& use_service(execution_context& e);
+
+ /// Obtain the service object corresponding to the given type.
+ /**
+ * This function is used to locate a service object that corresponds to the
+ * given service type. If there is no existing implementation of the service,
+ * then the io_context will create a new instance of the service.
+ *
+ * @param ioc The io_context object that owns the service.
+ *
+ * @return The service interface implementing the specified service type.
+ * Ownership of the service interface is not transferred to the caller.
+ *
+ * @note This overload is preserved for backwards compatibility with services
+ * that inherit from io_context::service.
+ */
+ template <typename Service>
+ friend Service& use_service(io_context& ioc);
+
+#if defined(GENERATING_DOCUMENTATION)
+
+ /// Creates a service object and adds it to the execution_context.
+ /**
+ * This function is used to add a service to the execution_context.
+ *
+ * @param e The execution_context object that owns the service.
+ *
+ * @param args Zero or more arguments to be passed to the service
+ * constructor.
+ *
+ * @throws boost::asio::service_already_exists Thrown if a service of the
+ * given type is already present in the execution_context.
+ */
+ template <typename Service, typename... Args>
+ friend Service& make_service(execution_context& e, Args&&... args);
+
+#elif defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Service, typename... Args>
+ friend Service& make_service(execution_context& e,
+ BOOST_ASIO_MOVE_ARG(Args)... args);
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Service>
+ friend Service& make_service(execution_context& e);
+
+#define BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
+ template <typename Service, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ friend Service& make_service(execution_context& e, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)); \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF)
+#undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ /// (Deprecated: Use make_service().) Add a service object to the
+ /// execution_context.
+ /**
+ * This function is used to add a service to the execution_context.
+ *
+ * @param e The execution_context object that owns the service.
+ *
+ * @param svc The service object. On success, ownership of the service object
+ * is transferred to the execution_context. When the execution_context object
+ * is destroyed, it will destroy the service object by performing: @code
+ * delete static_cast<execution_context::service*>(svc) @endcode
+ *
+ * @throws boost::asio::service_already_exists Thrown if a service of the
+ * given type is already present in the execution_context.
+ *
+ * @throws boost::asio::invalid_service_owner Thrown if the service's owning
+ * execution_context is not the execution_context object specified by the
+ * @c e parameter.
+ */
+ template <typename Service>
+ friend void add_service(execution_context& e, Service* svc);
+
+ /// Determine if an execution_context contains a specified service type.
+ /**
+ * This function is used to determine whether the execution_context contains a
+ * service object corresponding to the given service type.
+ *
+ * @param e The execution_context object that owns the service.
+ *
+ * @return A boolean indicating whether the execution_context contains the
+ * service.
+ */
+ template <typename Service>
+ friend bool has_service(execution_context& e);
+
+private:
+ // The service registry.
+ boost::asio::detail::service_registry* service_registry_;
+};
+
+/// Class used to uniquely identify a service.
+class execution_context::id
+ : private noncopyable
+{
+public:
+ /// Constructor.
+ id() {}
+};
+
+/// Base class for all io_context services.
+class execution_context::service
+ : private noncopyable
+{
+public:
+ /// Get the context object that owns the service.
+ execution_context& context();
+
+protected:
+ /// Constructor.
+ /**
+ * @param owner The execution_context object that owns the service.
+ */
+ BOOST_ASIO_DECL service(execution_context& owner);
+
+ /// Destructor.
+ BOOST_ASIO_DECL virtual ~service();
+
+private:
+ /// Destroy all user-defined handler objects owned by the service.
+ virtual void shutdown() = 0;
+
+ /// Handle notification of a fork-related event to perform any necessary
+ /// housekeeping.
+ /**
+ * This function is not a pure virtual so that services only have to
+ * implement it if necessary. The default implementation does nothing.
+ */
+ BOOST_ASIO_DECL virtual void notify_fork(
+ execution_context::fork_event event);
+
+ friend class boost::asio::detail::service_registry;
+ struct key
+ {
+ key() : type_info_(0), id_(0) {}
+ const std::type_info* type_info_;
+ const execution_context::id* id_;
+ } key_;
+
+ execution_context& owner_;
+ service* next_;
+};
+
+/// Exception thrown when trying to add a duplicate service to an
+/// execution_context.
+class service_already_exists
+ : public std::logic_error
+{
+public:
+ BOOST_ASIO_DECL service_already_exists();
+};
+
+/// Exception thrown when trying to add a service object to an
+/// execution_context where the service has a different owner.
+class invalid_service_owner
+ : public std::logic_error
+{
+public:
+ BOOST_ASIO_DECL invalid_service_owner();
+};
+
+namespace detail {
+
+// Special derived service id type to keep classes header-file only.
+template <typename Type>
+class service_id
+ : public execution_context::id
+{
+};
+
+// Special service base class to keep classes header-file only.
+template <typename Type>
+class execution_context_service_base
+ : public execution_context::service
+{
+public:
+ static service_id<Type> id;
+
+ // Constructor.
+ execution_context_service_base(execution_context& e)
+ : execution_context::service(e)
+ {
+ }
+};
+
+template <typename Type>
+service_id<Type> execution_context_service_base<Type>::id;
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/execution_context.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/execution_context.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_EXECUTION_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/executor.hpp b/src/third_party/boost-1.70.0/boost/asio/executor.hpp
new file mode 100644
index 00000000000..7c6a353f0e5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/executor.hpp
@@ -0,0 +1,343 @@
+//
+// executor.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_HPP
+#define BOOST_ASIO_EXECUTOR_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/cstddef.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Exception thrown when trying to access an empty polymorphic executor.
+class bad_executor
+ : public std::exception
+{
+public:
+ /// Constructor.
+ BOOST_ASIO_DECL bad_executor() BOOST_ASIO_NOEXCEPT;
+
+ /// Obtain message associated with exception.
+ BOOST_ASIO_DECL virtual const char* what() const
+ BOOST_ASIO_NOEXCEPT_OR_NOTHROW;
+};
+
+/// Polymorphic wrapper for executors.
+class executor
+{
+public:
+ /// Default constructor.
+ executor() BOOST_ASIO_NOEXCEPT
+ : impl_(0)
+ {
+ }
+
+ /// Construct from nullptr.
+ executor(nullptr_t) BOOST_ASIO_NOEXCEPT
+ : impl_(0)
+ {
+ }
+
+ /// Copy constructor.
+ executor(const executor& other) BOOST_ASIO_NOEXCEPT
+ : impl_(other.clone())
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move constructor.
+ executor(executor&& other) BOOST_ASIO_NOEXCEPT
+ : impl_(other.impl_)
+ {
+ other.impl_ = 0;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a polymorphic wrapper for the specified executor.
+ template <typename Executor>
+ executor(Executor e);
+
+ /// Allocator-aware constructor to create a polymorphic wrapper for the
+ /// specified executor.
+ template <typename Executor, typename Allocator>
+ executor(allocator_arg_t, const Allocator& a, Executor e);
+
+ /// Destructor.
+ ~executor()
+ {
+ destroy();
+ }
+
+ /// Assignment operator.
+ executor& operator=(const executor& other) BOOST_ASIO_NOEXCEPT
+ {
+ destroy();
+ impl_ = other.clone();
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ // Move assignment operator.
+ executor& operator=(executor&& other) BOOST_ASIO_NOEXCEPT
+ {
+ destroy();
+ impl_ = other.impl_;
+ other.impl_ = 0;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator for nullptr_t.
+ executor& operator=(nullptr_t) BOOST_ASIO_NOEXCEPT
+ {
+ destroy();
+ impl_ = 0;
+ return *this;
+ }
+
+ /// Assignment operator to create a polymorphic wrapper for the specified
+ /// executor.
+ template <typename Executor>
+ executor& operator=(BOOST_ASIO_MOVE_ARG(Executor) e) BOOST_ASIO_NOEXCEPT
+ {
+ executor tmp(BOOST_ASIO_MOVE_CAST(Executor)(e));
+ destroy();
+ impl_ = tmp.impl_;
+ tmp.impl_ = 0;
+ return *this;
+ }
+
+ /// Obtain the underlying execution context.
+ execution_context& context() const BOOST_ASIO_NOEXCEPT
+ {
+ return get_impl()->context();
+ }
+
+ /// Inform the executor that it has some outstanding work to do.
+ void on_work_started() const BOOST_ASIO_NOEXCEPT
+ {
+ get_impl()->on_work_started();
+ }
+
+ /// Inform the executor that some work is no longer outstanding.
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT
+ {
+ get_impl()->on_work_finished();
+ }
+
+ /// Request the executor to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object is executed according to the rules of the
+ * target executor object.
+ *
+ * @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 executor to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object is executed according to the rules of the
+ * target executor object.
+ *
+ * @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 executor to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object is executed according to the rules of the
+ * target executor object.
+ *
+ * @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;
+
+ struct unspecified_bool_type_t {};
+ typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
+ static void unspecified_bool_true(unspecified_bool_type_t) {}
+
+ /// Operator to test if the executor contains a valid target.
+ operator unspecified_bool_type() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_ ? &executor::unspecified_bool_true : 0;
+ }
+
+ /// Obtain type information for the target executor object.
+ /**
+ * @returns If @c *this has a target type of type @c T, <tt>typeid(T)</tt>;
+ * otherwise, <tt>typeid(void)</tt>.
+ */
+#if !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
+ const std::type_info& target_type() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_ ? impl_->target_type() : typeid(void);
+ }
+#else // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
+ const void* target_type() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_ ? impl_->target_type() : 0;
+ }
+#endif // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
+
+ /// Obtain a pointer to the target executor object.
+ /**
+ * @returns If <tt>target_type() == typeid(T)</tt>, a pointer to the stored
+ * executor target; otherwise, a null pointer.
+ */
+ template <typename Executor>
+ Executor* target() BOOST_ASIO_NOEXCEPT;
+
+ /// Obtain a pointer to the target executor object.
+ /**
+ * @returns If <tt>target_type() == typeid(T)</tt>, a pointer to the stored
+ * executor target; otherwise, a null pointer.
+ */
+ template <typename Executor>
+ const Executor* target() const BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two executors for equality.
+ friend bool operator==(const executor& a,
+ const executor& b) BOOST_ASIO_NOEXCEPT
+ {
+ if (a.impl_ == b.impl_)
+ return true;
+ if (!a.impl_ || !b.impl_)
+ return false;
+ return a.impl_->equals(b.impl_);
+ }
+
+ /// Compare two executors for inequality.
+ friend bool operator!=(const executor& a,
+ const executor& b) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a == b);
+ }
+
+private:
+#if !defined(GENERATING_DOCUMENTATION)
+ class function;
+ template <typename, typename> class impl;
+
+#if !defined(BOOST_ASIO_NO_TYPEID)
+ typedef const std::type_info& type_id_result_type;
+#else // !defined(BOOST_ASIO_NO_TYPEID)
+ typedef const void* type_id_result_type;
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+
+ template <typename T>
+ static type_id_result_type type_id()
+ {
+#if !defined(BOOST_ASIO_NO_TYPEID)
+ return typeid(T);
+#else // !defined(BOOST_ASIO_NO_TYPEID)
+ static int unique_id;
+ return &unique_id;
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+ }
+
+ // Base class for all polymorphic executor implementations.
+ class impl_base
+ {
+ public:
+ virtual impl_base* clone() const BOOST_ASIO_NOEXCEPT = 0;
+ virtual void destroy() BOOST_ASIO_NOEXCEPT = 0;
+ virtual execution_context& context() BOOST_ASIO_NOEXCEPT = 0;
+ virtual void on_work_started() BOOST_ASIO_NOEXCEPT = 0;
+ virtual void on_work_finished() BOOST_ASIO_NOEXCEPT = 0;
+ virtual void dispatch(BOOST_ASIO_MOVE_ARG(function)) = 0;
+ virtual void post(BOOST_ASIO_MOVE_ARG(function)) = 0;
+ virtual void defer(BOOST_ASIO_MOVE_ARG(function)) = 0;
+ virtual type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT = 0;
+ virtual void* target() BOOST_ASIO_NOEXCEPT = 0;
+ virtual const void* target() const BOOST_ASIO_NOEXCEPT = 0;
+ virtual bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT = 0;
+
+ protected:
+ impl_base(bool fast_dispatch) : fast_dispatch_(fast_dispatch) {}
+ virtual ~impl_base() {}
+
+ private:
+ friend class executor;
+ const bool fast_dispatch_;
+ };
+
+ // Helper function to check and return the implementation pointer.
+ impl_base* get_impl() const
+ {
+ if (!impl_)
+ {
+ bad_executor ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ return impl_;
+ }
+
+ // Helper function to clone another implementation.
+ impl_base* clone() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_ ? impl_->clone() : 0;
+ }
+
+ // Helper function to destroy an implementation.
+ void destroy() BOOST_ASIO_NOEXCEPT
+ {
+ if (impl_)
+ impl_->destroy();
+ }
+
+ impl_base* impl_;
+#endif // !defined(GENERATING_DOCUMENTATION)
+};
+
+} // namespace asio
+} // namespace boost
+
+BOOST_ASIO_USES_ALLOCATOR(boost::asio::executor)
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/executor.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/executor.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/executor_work_guard.hpp b/src/third_party/boost-1.70.0/boost/asio/executor_work_guard.hpp
new file mode 100644
index 00000000000..546f7ef9cf9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/executor_work_guard.hpp
@@ -0,0 +1,172 @@
+//
+// executor_work_guard.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_WORK_GUARD_HPP
+#define BOOST_ASIO_EXECUTOR_WORK_GUARD_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/associated_executor.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/is_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// An object of type @c executor_work_guard controls ownership of executor work
+/// within a scope.
+template <typename Executor>
+class executor_work_guard
+{
+public:
+ /// The underlying executor type.
+ typedef Executor executor_type;
+
+ /// Constructs a @c executor_work_guard object for the specified executor.
+ /**
+ * Stores a copy of @c e and calls <tt>on_work_started()</tt> on it.
+ */
+ explicit executor_work_guard(const executor_type& e) BOOST_ASIO_NOEXCEPT
+ : executor_(e),
+ owns_(true)
+ {
+ executor_.on_work_started();
+ }
+
+ /// Copy constructor.
+ executor_work_guard(const executor_work_guard& other) BOOST_ASIO_NOEXCEPT
+ : executor_(other.executor_),
+ owns_(other.owns_)
+ {
+ if (owns_)
+ executor_.on_work_started();
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move constructor.
+ executor_work_guard(executor_work_guard&& other) BOOST_ASIO_NOEXCEPT
+ : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)),
+ owns_(other.owns_)
+ {
+ other.owns_ = false;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destructor.
+ /**
+ * Unless the object has already been reset, or is in a moved-from state,
+ * calls <tt>on_work_finished()</tt> on the stored executor.
+ */
+ ~executor_work_guard()
+ {
+ if (owns_)
+ executor_.on_work_finished();
+ }
+
+ /// Obtain the associated executor.
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
+ {
+ return executor_;
+ }
+
+ /// Whether the executor_work_guard object owns some outstanding work.
+ bool owns_work() const BOOST_ASIO_NOEXCEPT
+ {
+ return owns_;
+ }
+
+ /// Indicate that the work is no longer outstanding.
+ /*
+ * Unless the object has already been reset, or is in a moved-from state,
+ * calls <tt>on_work_finished()</tt> on the stored executor.
+ */
+ void reset() BOOST_ASIO_NOEXCEPT
+ {
+ if (owns_)
+ {
+ executor_.on_work_finished();
+ owns_ = false;
+ }
+ }
+
+private:
+ // Disallow assignment.
+ executor_work_guard& operator=(const executor_work_guard&);
+
+ executor_type executor_;
+ bool owns_;
+};
+
+/// Create an @ref executor_work_guard object.
+template <typename Executor>
+inline executor_work_guard<Executor> make_work_guard(const Executor& ex,
+ typename enable_if<is_executor<Executor>::value>::type* = 0)
+{
+ return executor_work_guard<Executor>(ex);
+}
+
+/// Create an @ref executor_work_guard object.
+template <typename ExecutionContext>
+inline executor_work_guard<typename ExecutionContext::executor_type>
+make_work_guard(ExecutionContext& ctx,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value>::type* = 0)
+{
+ return executor_work_guard<typename ExecutionContext::executor_type>(
+ ctx.get_executor());
+}
+
+/// Create an @ref executor_work_guard object.
+template <typename T>
+inline executor_work_guard<typename associated_executor<T>::type>
+make_work_guard(const T& t,
+ typename enable_if<!is_executor<T>::value &&
+ !is_convertible<T&, execution_context&>::value>::type* = 0)
+{
+ return executor_work_guard<typename associated_executor<T>::type>(
+ associated_executor<T>::get(t));
+}
+
+/// Create an @ref executor_work_guard object.
+template <typename T, typename Executor>
+inline executor_work_guard<typename associated_executor<T, Executor>::type>
+make_work_guard(const T& t, const Executor& ex,
+ typename enable_if<is_executor<Executor>::value>::type* = 0)
+{
+ return executor_work_guard<typename associated_executor<T, Executor>::type>(
+ associated_executor<T, Executor>::get(t, ex));
+}
+
+/// Create an @ref executor_work_guard object.
+template <typename T, typename ExecutionContext>
+inline executor_work_guard<typename associated_executor<T,
+ typename ExecutionContext::executor_type>::type>
+make_work_guard(const T& t, ExecutionContext& ctx,
+ typename enable_if<!is_executor<T>::value &&
+ !is_convertible<T&, execution_context&>::value &&
+ is_convertible<ExecutionContext&, execution_context&>::value>::type* = 0)
+{
+ return executor_work_guard<typename associated_executor<T,
+ typename ExecutionContext::executor_type>::type>(
+ associated_executor<T, typename ExecutionContext::executor_type>::get(
+ t, ctx.get_executor()));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_EXECUTOR_WORK_GUARD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/basic_endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/generic/basic_endpoint.hpp
new file mode 100644
index 00000000000..048a960aa2b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/basic_endpoint.hpp
@@ -0,0 +1,195 @@
+//
+// generic/basic_endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_BASIC_ENDPOINT_HPP
+#define BOOST_ASIO_GENERIC_BASIC_ENDPOINT_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/generic/detail/endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+
+/// Describes an endpoint for any socket type.
+/**
+ * The boost::asio::generic::basic_endpoint class template describes an endpoint
+ * that may be associated with any socket type.
+ *
+ * @note The socket types sockaddr type must be able to fit into a
+ * @c sockaddr_storage structure.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * Endpoint.
+ */
+template <typename Protocol>
+class basic_endpoint
+{
+public:
+ /// The protocol type associated with the endpoint.
+ typedef Protocol protocol_type;
+
+ /// The type of the endpoint structure. This type is dependent on the
+ /// underlying implementation of the socket layer.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined data_type;
+#else
+ typedef boost::asio::detail::socket_addr_type data_type;
+#endif
+
+ /// Default constructor.
+ basic_endpoint()
+ {
+ }
+
+ /// Construct an endpoint from the specified socket address.
+ basic_endpoint(const void* socket_address,
+ std::size_t socket_address_size, int socket_protocol = 0)
+ : impl_(socket_address, socket_address_size, socket_protocol)
+ {
+ }
+
+ /// Construct an endpoint from the specific endpoint type.
+ template <typename Endpoint>
+ basic_endpoint(const Endpoint& endpoint)
+ : impl_(endpoint.data(), endpoint.size(), endpoint.protocol().protocol())
+ {
+ }
+
+ /// Copy constructor.
+ basic_endpoint(const basic_endpoint& other)
+ : impl_(other.impl_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ basic_endpoint(basic_endpoint&& other)
+ : impl_(other.impl_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another endpoint.
+ basic_endpoint& operator=(const basic_endpoint& other)
+ {
+ impl_ = other.impl_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another endpoint.
+ basic_endpoint& operator=(basic_endpoint&& other)
+ {
+ impl_ = other.impl_;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// The protocol associated with the endpoint.
+ protocol_type protocol() const
+ {
+ return protocol_type(impl_.family(), impl_.protocol());
+ }
+
+ /// Get the underlying endpoint in the native type.
+ data_type* data()
+ {
+ return impl_.data();
+ }
+
+ /// Get the underlying endpoint in the native type.
+ const data_type* data() const
+ {
+ return impl_.data();
+ }
+
+ /// Get the underlying size of the endpoint in the native type.
+ std::size_t size() const
+ {
+ return impl_.size();
+ }
+
+ /// Set the underlying size of the endpoint in the native type.
+ void resize(std::size_t new_size)
+ {
+ impl_.resize(new_size);
+ }
+
+ /// Get the capacity of the endpoint in the native type.
+ std::size_t capacity() const
+ {
+ return impl_.capacity();
+ }
+
+ /// Compare two endpoints for equality.
+ friend bool operator==(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return e1.impl_ == e2.impl_;
+ }
+
+ /// Compare two endpoints for inequality.
+ friend bool operator!=(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return !(e1.impl_ == e2.impl_);
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator<(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return e1.impl_ < e2.impl_;
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator>(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return e2.impl_ < e1.impl_;
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator<=(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return !(e2 < e1);
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator>=(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return !(e1 < e2);
+ }
+
+private:
+ // The underlying generic endpoint.
+ boost::asio::generic::detail::endpoint impl_;
+};
+
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_GENERIC_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/datagram_protocol.hpp b/src/third_party/boost-1.70.0/boost/asio/generic/datagram_protocol.hpp
new file mode 100644
index 00000000000..51e95b5f3a9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/datagram_protocol.hpp
@@ -0,0 +1,125 @@
+//
+// generic/datagram_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_DATAGRAM_PROTOCOL_HPP
+#define BOOST_ASIO_GENERIC_DATAGRAM_PROTOCOL_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/basic_datagram_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/generic/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+
+/// Encapsulates the flags needed for a generic datagram-oriented socket.
+/**
+ * The boost::asio::generic::datagram_protocol class contains flags necessary
+ * for datagram-oriented sockets of any address family and protocol.
+ *
+ * @par Examples
+ * Constructing using a native address family and socket protocol:
+ * @code datagram_protocol p(AF_INET, IPPROTO_UDP); @endcode
+ * Constructing from a specific protocol type:
+ * @code datagram_protocol p(boost::asio::ip::udp::v4()); @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class datagram_protocol
+{
+public:
+ /// Construct a protocol object for a specific address family and protocol.
+ datagram_protocol(int address_family, int socket_protocol)
+ : family_(address_family),
+ protocol_(socket_protocol)
+ {
+ }
+
+ /// Construct a generic protocol object from a specific protocol.
+ /**
+ * @throws @c bad_cast Thrown if the source protocol is not datagram-oriented.
+ */
+ template <typename Protocol>
+ datagram_protocol(const Protocol& source_protocol)
+ : family_(source_protocol.family()),
+ protocol_(source_protocol.protocol())
+ {
+ if (source_protocol.type() != type())
+ {
+ std::bad_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_DGRAM);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return protocol_;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const datagram_protocol& p1,
+ const datagram_protocol& p2)
+ {
+ return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const datagram_protocol& p1,
+ const datagram_protocol& p2)
+ {
+ return !(p1 == p2);
+ }
+
+ /// The type of an endpoint.
+ typedef basic_endpoint<datagram_protocol> endpoint;
+
+ /// The generic socket type.
+ typedef basic_datagram_socket<datagram_protocol> socket;
+
+private:
+ int family_;
+ int protocol_;
+};
+
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_GENERIC_DATAGRAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/detail/endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/generic/detail/endpoint.hpp
new file mode 100644
index 00000000000..84d320e940e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/detail/endpoint.hpp
@@ -0,0 +1,135 @@
+//
+// generic/detail/endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_DETAIL_ENDPOINT_HPP
+#define BOOST_ASIO_GENERIC_DETAIL_ENDPOINT_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/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+namespace detail {
+
+// Helper class for implementing a generic socket endpoint.
+class endpoint
+{
+public:
+ // Default constructor.
+ BOOST_ASIO_DECL endpoint();
+
+ // Construct an endpoint from the specified raw bytes.
+ BOOST_ASIO_DECL endpoint(const void* sock_addr,
+ std::size_t sock_addr_size, int sock_protocol);
+
+ // Copy constructor.
+ endpoint(const endpoint& other)
+ : data_(other.data_),
+ size_(other.size_),
+ protocol_(other.protocol_)
+ {
+ }
+
+ // Assign from another endpoint.
+ endpoint& operator=(const endpoint& other)
+ {
+ data_ = other.data_;
+ size_ = other.size_;
+ protocol_ = other.protocol_;
+ return *this;
+ }
+
+ // Get the address family associated with the endpoint.
+ int family() const
+ {
+ return data_.base.sa_family;
+ }
+
+ // Get the socket protocol associated with the endpoint.
+ int protocol() const
+ {
+ return protocol_;
+ }
+
+ // Get the underlying endpoint in the native type.
+ boost::asio::detail::socket_addr_type* data()
+ {
+ return &data_.base;
+ }
+
+ // Get the underlying endpoint in the native type.
+ const boost::asio::detail::socket_addr_type* data() const
+ {
+ return &data_.base;
+ }
+
+ // Get the underlying size of the endpoint in the native type.
+ std::size_t size() const
+ {
+ return size_;
+ }
+
+ // Set the underlying size of the endpoint in the native type.
+ BOOST_ASIO_DECL void resize(std::size_t size);
+
+ // Get the capacity of the endpoint in the native type.
+ std::size_t capacity() const
+ {
+ return sizeof(boost::asio::detail::sockaddr_storage_type);
+ }
+
+ // Compare two endpoints for equality.
+ BOOST_ASIO_DECL friend bool operator==(
+ const endpoint& e1, const endpoint& e2);
+
+ // Compare endpoints for ordering.
+ BOOST_ASIO_DECL friend bool operator<(
+ const endpoint& e1, const endpoint& e2);
+
+private:
+ // The underlying socket address.
+ union data_union
+ {
+ boost::asio::detail::socket_addr_type base;
+ boost::asio::detail::sockaddr_storage_type generic;
+ } data_;
+
+ // The length of the socket address stored in the endpoint.
+ std::size_t size_;
+
+ // The socket protocol associated with the endpoint.
+ int protocol_;
+
+ // Initialise with a specified memory.
+ BOOST_ASIO_DECL void init(const void* sock_addr,
+ std::size_t sock_addr_size, int sock_protocol);
+};
+
+} // namespace detail
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/generic/detail/impl/endpoint.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_GENERIC_DETAIL_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/detail/impl/endpoint.ipp b/src/third_party/boost-1.70.0/boost/asio/generic/detail/impl/endpoint.ipp
new file mode 100644
index 00000000000..aee0377a558
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/detail/impl/endpoint.ipp
@@ -0,0 +1,112 @@
+//
+// generic/detail/impl/endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_DETAIL_IMPL_ENDPOINT_IPP
+#define BOOST_ASIO_GENERIC_DETAIL_IMPL_ENDPOINT_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 <typeinfo>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/generic/detail/endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+namespace detail {
+
+endpoint::endpoint()
+{
+ init(0, 0, 0);
+}
+
+endpoint::endpoint(const void* sock_addr,
+ std::size_t sock_addr_size, int sock_protocol)
+{
+ init(sock_addr, sock_addr_size, sock_protocol);
+}
+
+void endpoint::resize(std::size_t new_size)
+{
+ if (new_size > sizeof(boost::asio::detail::sockaddr_storage_type))
+ {
+ boost::system::error_code ec(boost::asio::error::invalid_argument);
+ boost::asio::detail::throw_error(ec);
+ }
+ else
+ {
+ size_ = new_size;
+ protocol_ = 0;
+ }
+}
+
+bool operator==(const endpoint& e1, const endpoint& e2)
+{
+ using namespace std; // For memcmp.
+ return e1.size() == e2.size() && memcmp(e1.data(), e2.data(), e1.size()) == 0;
+}
+
+bool operator<(const endpoint& e1, const endpoint& e2)
+{
+ if (e1.protocol() < e2.protocol())
+ return true;
+
+ if (e1.protocol() > e2.protocol())
+ return false;
+
+ using namespace std; // For memcmp.
+ std::size_t compare_size = e1.size() < e2.size() ? e1.size() : e2.size();
+ int compare_result = memcmp(e1.data(), e2.data(), compare_size);
+
+ if (compare_result < 0)
+ return true;
+
+ if (compare_result > 0)
+ return false;
+
+ return e1.size() < e2.size();
+}
+
+void endpoint::init(const void* sock_addr,
+ std::size_t sock_addr_size, int sock_protocol)
+{
+ if (sock_addr_size > sizeof(boost::asio::detail::sockaddr_storage_type))
+ {
+ boost::system::error_code ec(boost::asio::error::invalid_argument);
+ boost::asio::detail::throw_error(ec);
+ }
+
+ using namespace std; // For memset and memcpy.
+ memset(&data_.generic, 0, sizeof(boost::asio::detail::sockaddr_storage_type));
+ if (sock_addr_size > 0)
+ memcpy(&data_.generic, sock_addr, sock_addr_size);
+
+ size_ = sock_addr_size;
+ protocol_ = sock_protocol;
+}
+
+} // namespace detail
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_GENERIC_DETAIL_IMPL_ENDPOINT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/raw_protocol.hpp b/src/third_party/boost-1.70.0/boost/asio/generic/raw_protocol.hpp
new file mode 100644
index 00000000000..ae28faf689c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/raw_protocol.hpp
@@ -0,0 +1,123 @@
+//
+// generic/raw_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_RAW_PROTOCOL_HPP
+#define BOOST_ASIO_GENERIC_RAW_PROTOCOL_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/basic_raw_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/generic/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+
+/// Encapsulates the flags needed for a generic raw socket.
+/**
+ * The boost::asio::generic::raw_protocol class contains flags necessary for
+ * raw sockets of any address family and protocol.
+ *
+ * @par Examples
+ * Constructing using a native address family and socket protocol:
+ * @code raw_protocol p(AF_INET, IPPROTO_ICMP); @endcode
+ * Constructing from a specific protocol type:
+ * @code raw_protocol p(boost::asio::ip::icmp::v4()); @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class raw_protocol
+{
+public:
+ /// Construct a protocol object for a specific address family and protocol.
+ raw_protocol(int address_family, int socket_protocol)
+ : family_(address_family),
+ protocol_(socket_protocol)
+ {
+ }
+
+ /// Construct a generic protocol object from a specific protocol.
+ /**
+ * @throws @c bad_cast Thrown if the source protocol is not raw-oriented.
+ */
+ template <typename Protocol>
+ raw_protocol(const Protocol& source_protocol)
+ : family_(source_protocol.family()),
+ protocol_(source_protocol.protocol())
+ {
+ if (source_protocol.type() != type())
+ {
+ std::bad_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_RAW);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return protocol_;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const raw_protocol& p1, const raw_protocol& p2)
+ {
+ return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const raw_protocol& p1, const raw_protocol& p2)
+ {
+ return !(p1 == p2);
+ }
+
+ /// The type of an endpoint.
+ typedef basic_endpoint<raw_protocol> endpoint;
+
+ /// The generic socket type.
+ typedef basic_raw_socket<raw_protocol> socket;
+
+private:
+ int family_;
+ int protocol_;
+};
+
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_GENERIC_RAW_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/seq_packet_protocol.hpp b/src/third_party/boost-1.70.0/boost/asio/generic/seq_packet_protocol.hpp
new file mode 100644
index 00000000000..d9b719f993a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/seq_packet_protocol.hpp
@@ -0,0 +1,124 @@
+//
+// generic/seq_packet_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_SEQ_PACKET_PROTOCOL_HPP
+#define BOOST_ASIO_GENERIC_SEQ_PACKET_PROTOCOL_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/basic_seq_packet_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/generic/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+
+/// Encapsulates the flags needed for a generic sequenced packet socket.
+/**
+ * The boost::asio::generic::seq_packet_protocol class contains flags necessary
+ * for seq_packet-oriented sockets of any address family and protocol.
+ *
+ * @par Examples
+ * Constructing using a native address family and socket protocol:
+ * @code seq_packet_protocol p(AF_INET, IPPROTO_SCTP); @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class seq_packet_protocol
+{
+public:
+ /// Construct a protocol object for a specific address family and protocol.
+ seq_packet_protocol(int address_family, int socket_protocol)
+ : family_(address_family),
+ protocol_(socket_protocol)
+ {
+ }
+
+ /// Construct a generic protocol object from a specific protocol.
+ /**
+ * @throws @c bad_cast Thrown if the source protocol is not based around
+ * sequenced packets.
+ */
+ template <typename Protocol>
+ seq_packet_protocol(const Protocol& source_protocol)
+ : family_(source_protocol.family()),
+ protocol_(source_protocol.protocol())
+ {
+ if (source_protocol.type() != type())
+ {
+ std::bad_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_SEQPACKET);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return protocol_;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const seq_packet_protocol& p1,
+ const seq_packet_protocol& p2)
+ {
+ return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const seq_packet_protocol& p1,
+ const seq_packet_protocol& p2)
+ {
+ return !(p1 == p2);
+ }
+
+ /// The type of an endpoint.
+ typedef basic_endpoint<seq_packet_protocol> endpoint;
+
+ /// The generic socket type.
+ typedef basic_seq_packet_socket<seq_packet_protocol> socket;
+
+private:
+ int family_;
+ int protocol_;
+};
+
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_GENERIC_SEQ_PACKET_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/generic/stream_protocol.hpp b/src/third_party/boost-1.70.0/boost/asio/generic/stream_protocol.hpp
new file mode 100644
index 00000000000..ca5fbb21a1c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/generic/stream_protocol.hpp
@@ -0,0 +1,129 @@
+//
+// generic/stream_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_GENERIC_STREAM_PROTOCOL_HPP
+#define BOOST_ASIO_GENERIC_STREAM_PROTOCOL_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/basic_socket_iostream.hpp>
+#include <boost/asio/basic_stream_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/generic/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace generic {
+
+/// Encapsulates the flags needed for a generic stream-oriented socket.
+/**
+ * The boost::asio::generic::stream_protocol class contains flags necessary for
+ * stream-oriented sockets of any address family and protocol.
+ *
+ * @par Examples
+ * Constructing using a native address family and socket protocol:
+ * @code stream_protocol p(AF_INET, IPPROTO_TCP); @endcode
+ * Constructing from a specific protocol type:
+ * @code stream_protocol p(boost::asio::ip::tcp::v4()); @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class stream_protocol
+{
+public:
+ /// Construct a protocol object for a specific address family and protocol.
+ stream_protocol(int address_family, int socket_protocol)
+ : family_(address_family),
+ protocol_(socket_protocol)
+ {
+ }
+
+ /// Construct a generic protocol object from a specific protocol.
+ /**
+ * @throws @c bad_cast Thrown if the source protocol is not stream-oriented.
+ */
+ template <typename Protocol>
+ stream_protocol(const Protocol& source_protocol)
+ : family_(source_protocol.family()),
+ protocol_(source_protocol.protocol())
+ {
+ if (source_protocol.type() != type())
+ {
+ std::bad_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_STREAM);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return protocol_;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const stream_protocol& p1, const stream_protocol& p2)
+ {
+ return p1.family_ == p2.family_ && p1.protocol_ == p2.protocol_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const stream_protocol& p1, const stream_protocol& p2)
+ {
+ return !(p1 == p2);
+ }
+
+ /// The type of an endpoint.
+ typedef basic_endpoint<stream_protocol> endpoint;
+
+ /// The generic socket type.
+ typedef basic_stream_socket<stream_protocol> socket;
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+ /// The generic socket iostream type.
+ typedef basic_socket_iostream<stream_protocol> iostream;
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+private:
+ int family_;
+ int protocol_;
+};
+
+} // namespace generic
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_GENERIC_STREAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/handler_alloc_hook.hpp b/src/third_party/boost-1.70.0/boost/asio/handler_alloc_hook.hpp
new file mode 100644
index 00000000000..595e36bb0dc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/handler_alloc_hook.hpp
@@ -0,0 +1,83 @@
+//
+// handler_alloc_hook.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_ALLOC_HOOK_HPP
+#define BOOST_ASIO_HANDLER_ALLOC_HOOK_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/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Default allocation function for handlers.
+/**
+ * Asynchronous operations may need to allocate temporary objects. Since
+ * asynchronous operations have a handler function object, these temporary
+ * objects can be said to be associated with the handler.
+ *
+ * Implement asio_handler_allocate and asio_handler_deallocate for your own
+ * handlers to provide custom allocation for these temporary objects.
+ *
+ * The default implementation of these allocation hooks uses <tt>::operator
+ * new</tt> and <tt>::operator delete</tt>.
+ *
+ * @note All temporary objects associated with a handler will be deallocated
+ * before the upcall to the handler is performed. This allows the same memory to
+ * be reused for a subsequent asynchronous operation initiated by the handler.
+ *
+ * @par Example
+ * @code
+ * class my_handler;
+ *
+ * void* asio_handler_allocate(std::size_t size, my_handler* context)
+ * {
+ * return ::operator new(size);
+ * }
+ *
+ * void asio_handler_deallocate(void* pointer, std::size_t size,
+ * my_handler* context)
+ * {
+ * ::operator delete(pointer);
+ * }
+ * @endcode
+ */
+BOOST_ASIO_DECL void* asio_handler_allocate(
+ std::size_t size, ...);
+
+/// Default deallocation function for handlers.
+/**
+ * Implement asio_handler_allocate and asio_handler_deallocate for your own
+ * handlers to provide custom allocation for the associated temporary objects.
+ *
+ * The default implementation of these allocation hooks uses <tt>::operator
+ * new</tt> and <tt>::operator delete</tt>.
+ *
+ * @sa asio_handler_allocate.
+ */
+BOOST_ASIO_DECL void asio_handler_deallocate(
+ void* pointer, std::size_t size, ...);
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/handler_alloc_hook.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_HANDLER_ALLOC_HOOK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/handler_continuation_hook.hpp b/src/third_party/boost-1.70.0/boost/asio/handler_continuation_hook.hpp
new file mode 100644
index 00000000000..05645cfddf2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/handler_continuation_hook.hpp
@@ -0,0 +1,56 @@
+//
+// handler_continuation_hook.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_CONTINUATION_HOOK_HPP
+#define BOOST_ASIO_HANDLER_CONTINUATION_HOOK_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Default continuation function for handlers.
+/**
+ * Asynchronous operations may represent a continuation of the asynchronous
+ * control flow associated with the current handler. The implementation can use
+ * this knowledge to optimise scheduling of the handler.
+ *
+ * Implement asio_handler_is_continuation for your own handlers to indicate
+ * when a handler represents a continuation.
+ *
+ * The default implementation of the continuation hook returns <tt>false</tt>.
+ *
+ * @par Example
+ * @code
+ * class my_handler;
+ *
+ * bool asio_handler_is_continuation(my_handler* context)
+ * {
+ * return true;
+ * }
+ * @endcode
+ */
+inline bool asio_handler_is_continuation(...)
+{
+ return false;
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/handler_invoke_hook.hpp b/src/third_party/boost-1.70.0/boost/asio/handler_invoke_hook.hpp
new file mode 100644
index 00000000000..7d3f0fd4087
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/handler_invoke_hook.hpp
@@ -0,0 +1,87 @@
+//
+// handler_invoke_hook.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_INVOKE_HOOK_HPP
+#define BOOST_ASIO_HANDLER_INVOKE_HOOK_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/** @defgroup asio_handler_invoke boost::asio::asio_handler_invoke
+ *
+ * @brief Default invoke function for handlers.
+ *
+ * Completion handlers for asynchronous operations are invoked by the
+ * io_context associated with the corresponding object (e.g. a socket or
+ * deadline_timer). Certain guarantees are made on when the handler may be
+ * invoked, in particular that a handler can only be invoked from a thread that
+ * is currently calling @c run() on the corresponding io_context object.
+ * Handlers may subsequently be invoked through other objects (such as
+ * io_context::strand objects) that provide additional guarantees.
+ *
+ * When asynchronous operations are composed from other asynchronous
+ * operations, all intermediate handlers should be invoked using the same
+ * method as the final handler. This is required to ensure that user-defined
+ * objects are not accessed in a way that may violate the guarantees. This
+ * hooking function ensures that the invoked method used for the final handler
+ * is accessible at each intermediate step.
+ *
+ * Implement asio_handler_invoke for your own handlers to specify a custom
+ * invocation strategy.
+ *
+ * This default implementation invokes the function object like so:
+ * @code function(); @endcode
+ * If necessary, the default implementation makes a copy of the function object
+ * so that the non-const operator() can be used.
+ *
+ * @par Example
+ * @code
+ * class my_handler;
+ *
+ * template <typename Function>
+ * void asio_handler_invoke(Function function, my_handler* context)
+ * {
+ * context->strand_.dispatch(function);
+ * }
+ * @endcode
+ */
+/*@{*/
+
+/// Default handler invocation hook used for non-const function objects.
+template <typename Function>
+inline void asio_handler_invoke(Function& function, ...)
+{
+ function();
+}
+
+/// Default handler invocation hook used for const function objects.
+template <typename Function>
+inline void asio_handler_invoke(const Function& function, ...)
+{
+ Function tmp(function);
+ tmp();
+}
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_HANDLER_INVOKE_HOOK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/high_resolution_timer.hpp b/src/third_party/boost-1.70.0/boost/asio/high_resolution_timer.hpp
new file mode 100644
index 00000000000..60504054011
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/high_resolution_timer.hpp
@@ -0,0 +1,46 @@
+//
+// high_resolution_timer.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HIGH_RESOLUTION_TIMER_HPP
+#define BOOST_ASIO_HIGH_RESOLUTION_TIMER_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_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_waitable_timer.hpp>
+#include <boost/asio/detail/chrono.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for a timer based on the high resolution clock.
+/**
+ * This typedef uses the C++11 @c &lt;chrono&gt; standard library facility, if
+ * available. Otherwise, it may use the Boost.Chrono library. To explicitly
+ * utilise Boost.Chrono, use the basic_waitable_timer template directly:
+ * @code
+ * typedef basic_waitable_timer<boost::chrono::high_resolution_clock> timer;
+ * @endcode
+ */
+typedef basic_waitable_timer<
+ chrono::high_resolution_clock>
+ high_resolution_timer;
+
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_HIGH_RESOLUTION_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/awaitable.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/awaitable.hpp
new file mode 100644
index 00000000000..b8cf5373a14
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/awaitable.hpp
@@ -0,0 +1,424 @@
+//
+// impl/awaitable.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_AWAITABLE_HPP
+#define BOOST_ASIO_IMPL_AWAITABLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <exception>
+#include <new>
+#include <tuple>
+#include <utility>
+#include <boost/asio/detail/thread_context.hpp>
+#include <boost/asio/detail/thread_info_base.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/system/system_error.hpp>
+#include <boost/asio/this_coro.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// An awaitable_thread represents a thread-of-execution that is composed of one
+// or more "stack frames", with each frame represented by an awaitable_frame.
+// All execution occurs in the context of the awaitable_thread's executor. An
+// awaitable_thread continues to "pump" the stack frames by repeatedly resuming
+// the top stack frame until the stack is empty, or until ownership of the
+// stack is transferred to another awaitable_thread object.
+//
+// +------------------------------------+
+// | top_of_stack_ |
+// | V
+// +--------------+---+ +-----------------+
+// | | | |
+// | awaitable_thread |<---------------------------+ awaitable_frame |
+// | | attached_thread_ | |
+// +--------------+---+ (Set only when +---+-------------+
+// | frames are being |
+// | actively pumped | caller_
+// | by a thread, and |
+// | then only for V
+// | the top frame.) +-----------------+
+// | | |
+// | | awaitable_frame |
+// | | |
+// | +---+-------------+
+// | |
+// | | caller_
+// | :
+// | :
+// | |
+// | V
+// | +-----------------+
+// | bottom_of_stack_ | |
+// +------------------------------->| awaitable_frame |
+// | |
+// +-----------------+
+
+template <typename Executor>
+class awaitable_frame_base
+{
+public:
+#if !defined(BOOST_ASIO_DISABLE_AWAITABLE_FRAME_RECYCLING)
+ void* operator new(std::size_t size)
+ {
+ return boost::asio::detail::thread_info_base::allocate(
+ boost::asio::detail::thread_info_base::awaitable_frame_tag(),
+ boost::asio::detail::thread_context::thread_call_stack::top(),
+ size);
+ }
+
+ void operator delete(void* pointer, std::size_t size)
+ {
+ boost::asio::detail::thread_info_base::deallocate(
+ boost::asio::detail::thread_info_base::awaitable_frame_tag(),
+ boost::asio::detail::thread_context::thread_call_stack::top(),
+ pointer, size);
+ }
+#endif // !defined(BOOST_ASIO_DISABLE_AWAITABLE_FRAME_RECYCLING)
+
+ // The frame starts in a suspended state until the awaitable_thread object
+ // pumps the stack.
+ auto initial_suspend() noexcept
+ {
+ return suspend_always();
+ }
+
+ // On final suspension the frame is popped from the top of the stack.
+ auto final_suspend() noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ this_->pop_frame();
+ }
+
+ void await_resume() const noexcept
+ {
+ }
+ };
+
+ return result{this};
+ }
+
+ void set_except(std::exception_ptr e) noexcept
+ {
+ pending_exception_ = e;
+ }
+
+ void set_error(const boost::system::error_code& ec)
+ {
+ this->set_except(std::make_exception_ptr(boost::system::system_error(ec)));
+ }
+
+ void unhandled_exception()
+ {
+ set_except(std::current_exception());
+ }
+
+ void rethrow_exception()
+ {
+ if (pending_exception_)
+ {
+ std::exception_ptr ex = std::exchange(pending_exception_, nullptr);
+ std::rethrow_exception(ex);
+ }
+ }
+
+ template <typename T>
+ auto await_transform(awaitable<T, Executor> a) const
+ {
+ return a;
+ }
+
+ // This await transformation obtains the associated executor of the thread of
+ // execution.
+ auto await_transform(this_coro::executor_t) noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume() const noexcept
+ {
+ return this_->attached_thread_->get_executor();
+ }
+ };
+
+ return result{this};
+ }
+
+ // This await transformation is used to run an async operation's initiation
+ // function object after the coroutine has been suspended. This ensures that
+ // immediate resumption of the coroutine in another thread does not cause a
+ // race condition.
+ template <typename Function>
+ auto await_transform(Function f,
+ typename enable_if<
+ is_convertible<
+ typename result_of<Function(awaitable_frame_base*)>::type,
+ awaitable_thread<Executor>*
+ >::value
+ >::type* = 0)
+ {
+ struct result
+ {
+ Function function_;
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ function_(this_);
+ }
+
+ void await_resume() const noexcept
+ {
+ }
+ };
+
+ return result{std::move(f), this};
+ }
+
+ void attach_thread(awaitable_thread<Executor>* handler) noexcept
+ {
+ attached_thread_ = handler;
+ }
+
+ awaitable_thread<Executor>* detach_thread() noexcept
+ {
+ return std::exchange(attached_thread_, nullptr);
+ }
+
+ void push_frame(awaitable_frame_base<Executor>* caller) noexcept
+ {
+ caller_ = caller;
+ attached_thread_ = caller_->attached_thread_;
+ attached_thread_->top_of_stack_ = this;
+ caller_->attached_thread_ = nullptr;
+ }
+
+ void pop_frame() noexcept
+ {
+ if (caller_)
+ caller_->attached_thread_ = attached_thread_;
+ attached_thread_->top_of_stack_ = caller_;
+ attached_thread_ = nullptr;
+ caller_ = nullptr;
+ }
+
+ void resume()
+ {
+ coro_.resume();
+ }
+
+ void destroy()
+ {
+ coro_.destroy();
+ }
+
+protected:
+ coroutine_handle<void> coro_ = nullptr;
+ awaitable_thread<Executor>* attached_thread_ = nullptr;
+ awaitable_frame_base<Executor>* caller_ = nullptr;
+ std::exception_ptr pending_exception_ = nullptr;
+};
+
+template <typename T, typename Executor>
+class awaitable_frame
+ : public awaitable_frame_base<Executor>
+{
+public:
+ awaitable_frame() noexcept
+ {
+ }
+
+ awaitable_frame(awaitable_frame&& other) noexcept
+ : awaitable_frame_base<Executor>(std::move(other))
+ {
+ }
+
+ ~awaitable_frame()
+ {
+ if (has_result_)
+ static_cast<T*>(static_cast<void*>(result_))->~T();
+ }
+
+ awaitable<T, Executor> get_return_object() noexcept
+ {
+ this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
+ return awaitable<T, Executor>(this);
+ };
+
+ template <typename U>
+ void return_value(U&& u)
+ {
+ new (&result_) T(std::forward<U>(u));
+ has_result_ = true;
+ }
+
+ template <typename... Us>
+ void return_values(Us&&... us)
+ {
+ this->return_value(std::forward_as_tuple(std::forward<Us>(us)...));
+ }
+
+ T get()
+ {
+ this->caller_ = nullptr;
+ this->rethrow_exception();
+ return std::move(*static_cast<T*>(static_cast<void*>(result_)));
+ }
+
+private:
+ alignas(T) unsigned char result_[sizeof(T)];
+ bool has_result_ = false;
+};
+
+template <typename Executor>
+class awaitable_frame<void, Executor>
+ : public awaitable_frame_base<Executor>
+{
+public:
+ awaitable<void, Executor> get_return_object()
+ {
+ this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
+ return awaitable<void, Executor>(this);
+ };
+
+ void return_void()
+ {
+ }
+
+ void get()
+ {
+ this->caller_ = nullptr;
+ this->rethrow_exception();
+ }
+};
+
+template <typename Executor>
+class awaitable_thread
+{
+public:
+ typedef Executor executor_type;
+
+ // Construct from the entry point of a new thread of execution.
+ awaitable_thread(awaitable<void, Executor> p, const Executor& ex)
+ : bottom_of_stack_(std::move(p)),
+ top_of_stack_(bottom_of_stack_.frame_),
+ executor_(ex)
+ {
+ }
+
+ // Transfer ownership from another awaitable_thread.
+ awaitable_thread(awaitable_thread&& other) noexcept
+ : bottom_of_stack_(std::move(other.bottom_of_stack_)),
+ top_of_stack_(std::exchange(other.top_of_stack_, nullptr)),
+ executor_(std::move(other.executor_))
+ {
+ }
+
+ // Clean up with a last ditch effort to ensure the thread is unwound within
+ // the context of the executor.
+ ~awaitable_thread()
+ {
+ if (bottom_of_stack_.valid())
+ {
+ // Coroutine "stack unwinding" must be performed through the executor.
+ (post)(executor_,
+ [a = std::move(bottom_of_stack_)]() mutable
+ {
+ awaitable<void, Executor>(std::move(a));
+ });
+ }
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ // Launch a new thread of execution.
+ void launch()
+ {
+ top_of_stack_->attach_thread(this);
+ pump();
+ }
+
+protected:
+ template <typename> friend class awaitable_frame_base;
+
+ // Repeatedly resume the top stack frame until the stack is empty or until it
+ // has been transferred to another resumable_thread object.
+ void pump()
+ {
+ do top_of_stack_->resume(); while (top_of_stack_);
+ if (bottom_of_stack_.valid())
+ {
+ awaitable<void, Executor> a(std::move(bottom_of_stack_));
+ a.frame_->rethrow_exception();
+ }
+ }
+
+ awaitable<void, Executor> bottom_of_stack_;
+ awaitable_frame_base<Executor>* top_of_stack_;
+ executor_type executor_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace std { namespace experimental {
+
+template <typename T, typename Executor, typename... Args>
+struct coroutine_traits<boost::asio::awaitable<T, Executor>, Args...>
+{
+ typedef boost::asio::detail::awaitable_frame<T, Executor> promise_type;
+};
+
+}} // namespace std::experimental
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_AWAITABLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/buffered_read_stream.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/buffered_read_stream.hpp
new file mode 100644
index 00000000000..6a51d8ee567
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/buffered_read_stream.hpp
@@ -0,0 +1,450 @@
+//
+// impl/buffered_read_stream.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_READ_STREAM_HPP
+#define BOOST_ASIO_IMPL_BUFFERED_READ_STREAM_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.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/non_const_lvalue.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+template <typename Stream>
+std::size_t buffered_read_stream<Stream>::fill()
+{
+ detail::buffer_resize_guard<detail::buffered_stream_storage>
+ resize_guard(storage_);
+ std::size_t previous_size = storage_.size();
+ storage_.resize(storage_.capacity());
+ storage_.resize(previous_size + next_layer_.read_some(buffer(
+ storage_.data() + previous_size,
+ storage_.size() - previous_size)));
+ resize_guard.commit();
+ return storage_.size() - previous_size;
+}
+
+template <typename Stream>
+std::size_t buffered_read_stream<Stream>::fill(boost::system::error_code& ec)
+{
+ detail::buffer_resize_guard<detail::buffered_stream_storage>
+ resize_guard(storage_);
+ std::size_t previous_size = storage_.size();
+ storage_.resize(storage_.capacity());
+ storage_.resize(previous_size + next_layer_.read_some(buffer(
+ storage_.data() + previous_size,
+ storage_.size() - previous_size),
+ ec));
+ resize_guard.commit();
+ return storage_.size() - previous_size;
+}
+
+namespace detail
+{
+ template <typename ReadHandler>
+ class buffered_fill_handler
+ {
+ public:
+ buffered_fill_handler(detail::buffered_stream_storage& storage,
+ std::size_t previous_size, ReadHandler& handler)
+ : storage_(storage),
+ previous_size_(previous_size),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ buffered_fill_handler(const buffered_fill_handler& other)
+ : storage_(other.storage_),
+ previous_size_(other.previous_size_),
+ handler_(other.handler_)
+ {
+ }
+
+ buffered_fill_handler(buffered_fill_handler&& other)
+ : storage_(other.storage_),
+ previous_size_(other.previous_size_),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ const std::size_t bytes_transferred)
+ {
+ storage_.resize(previous_size_ + bytes_transferred);
+ handler_(ec, bytes_transferred);
+ }
+
+ //private:
+ detail::buffered_stream_storage& storage_;
+ std::size_t previous_size_;
+ ReadHandler handler_;
+ };
+
+ template <typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ buffered_fill_handler<ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ buffered_fill_handler<ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ buffered_fill_handler<ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ buffered_fill_handler<ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ buffered_fill_handler<ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_buffered_fill
+ {
+ template <typename ReadHandler, typename Stream>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ buffered_stream_storage* storage, Stream* next_layer) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ std::size_t previous_size = storage->size();
+ storage->resize(storage->capacity());
+ next_layer->async_read_some(
+ buffer(
+ storage->data() + previous_size,
+ storage->size() - previous_size),
+ buffered_fill_handler<typename decay<ReadHandler>::type>(
+ *storage, previous_size, handler2.value));
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::buffered_fill_handler<ReadHandler>, Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(const detail::buffered_fill_handler<ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::buffered_fill_handler<ReadHandler>, Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(const detail::buffered_fill_handler<ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename Stream>
+template <typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+buffered_read_stream<Stream>::async_fill(
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_buffered_fill(), handler, &storage_, &next_layer_);
+}
+
+template <typename Stream>
+template <typename MutableBufferSequence>
+std::size_t buffered_read_stream<Stream>::read_some(
+ const MutableBufferSequence& buffers)
+{
+ using boost::asio::buffer_size;
+ if (buffer_size(buffers) == 0)
+ return 0;
+
+ if (storage_.empty())
+ this->fill();
+
+ return this->copy(buffers);
+}
+
+template <typename Stream>
+template <typename MutableBufferSequence>
+std::size_t buffered_read_stream<Stream>::read_some(
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+
+ using boost::asio::buffer_size;
+ if (buffer_size(buffers) == 0)
+ return 0;
+
+ if (storage_.empty() && !this->fill(ec))
+ return 0;
+
+ return this->copy(buffers);
+}
+
+namespace detail
+{
+ template <typename MutableBufferSequence, typename ReadHandler>
+ class buffered_read_some_handler
+ {
+ public:
+ buffered_read_some_handler(detail::buffered_stream_storage& storage,
+ const MutableBufferSequence& buffers, ReadHandler& handler)
+ : storage_(storage),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ buffered_read_some_handler(const buffered_read_some_handler& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(other.handler_)
+ {
+ }
+
+ buffered_read_some_handler(buffered_read_some_handler&& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ 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)
+ {
+ if (ec || storage_.empty())
+ {
+ const std::size_t length = 0;
+ handler_(ec, length);
+ }
+ else
+ {
+ const std::size_t bytes_copied = boost::asio::buffer_copy(
+ buffers_, storage_.data(), storage_.size());
+ storage_.consume(bytes_copied);
+ handler_(ec, bytes_copied);
+ }
+ }
+
+ //private:
+ detail::buffered_stream_storage& storage_;
+ MutableBufferSequence buffers_;
+ ReadHandler handler_;
+ };
+
+ template <typename MutableBufferSequence, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename MutableBufferSequence, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename MutableBufferSequence, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename MutableBufferSequence,
+ typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename MutableBufferSequence,
+ typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_buffered_read_some
+ {
+ template <typename ReadHandler, typename Stream,
+ typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ buffered_stream_storage* storage, Stream* next_layer,
+ const MutableBufferSequence& buffers) const
+ {
+ // 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;
+
+ using boost::asio::buffer_size;
+ non_const_lvalue<ReadHandler> handler2(handler);
+ if (buffer_size(buffers) == 0 || !storage->empty())
+ {
+ next_layer->async_read_some(BOOST_ASIO_MUTABLE_BUFFER(0, 0),
+ buffered_read_some_handler<MutableBufferSequence,
+ typename decay<ReadHandler>::type>(
+ *storage, buffers, handler2.value));
+ }
+ else
+ {
+ initiate_async_buffered_fill()(
+ buffered_read_some_handler<MutableBufferSequence,
+ typename decay<ReadHandler>::type>(
+ *storage, buffers, handler2.value),
+ storage, next_layer);
+ }
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename MutableBufferSequence,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::buffered_read_some_handler<MutableBufferSequence, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename MutableBufferSequence,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::buffered_read_some_handler<MutableBufferSequence, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename Stream>
+template <typename MutableBufferSequence, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+buffered_read_stream<Stream>::async_read_some(
+ const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_buffered_read_some(),
+ handler, &storage_, &next_layer_, buffers);
+}
+
+template <typename Stream>
+template <typename MutableBufferSequence>
+std::size_t buffered_read_stream<Stream>::peek(
+ const MutableBufferSequence& buffers)
+{
+ if (storage_.empty())
+ this->fill();
+ return this->peek_copy(buffers);
+}
+
+template <typename Stream>
+template <typename MutableBufferSequence>
+std::size_t buffered_read_stream<Stream>::peek(
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ if (storage_.empty() && !this->fill(ec))
+ return 0;
+ return this->peek_copy(buffers);
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_BUFFERED_READ_STREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/buffered_write_stream.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/buffered_write_stream.hpp
new file mode 100644
index 00000000000..05d4406347c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/buffered_write_stream.hpp
@@ -0,0 +1,432 @@
+//
+// impl/buffered_write_stream.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BUFFERED_WRITE_STREAM_HPP
+#define BOOST_ASIO_IMPL_BUFFERED_WRITE_STREAM_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.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/non_const_lvalue.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+template <typename Stream>
+std::size_t buffered_write_stream<Stream>::flush()
+{
+ std::size_t bytes_written = write(next_layer_,
+ buffer(storage_.data(), storage_.size()));
+ storage_.consume(bytes_written);
+ return bytes_written;
+}
+
+template <typename Stream>
+std::size_t buffered_write_stream<Stream>::flush(boost::system::error_code& ec)
+{
+ std::size_t bytes_written = write(next_layer_,
+ buffer(storage_.data(), storage_.size()),
+ transfer_all(), ec);
+ storage_.consume(bytes_written);
+ return bytes_written;
+}
+
+namespace detail
+{
+ template <typename WriteHandler>
+ class buffered_flush_handler
+ {
+ public:
+ buffered_flush_handler(detail::buffered_stream_storage& storage,
+ WriteHandler& handler)
+ : storage_(storage),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ buffered_flush_handler(const buffered_flush_handler& other)
+ : storage_(other.storage_),
+ handler_(other.handler_)
+ {
+ }
+
+ buffered_flush_handler(buffered_flush_handler&& other)
+ : storage_(other.storage_),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ const std::size_t bytes_written)
+ {
+ storage_.consume(bytes_written);
+ handler_(ec, bytes_written);
+ }
+
+ //private:
+ detail::buffered_stream_storage& storage_;
+ WriteHandler handler_;
+ };
+
+ template <typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ buffered_flush_handler<WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ buffered_flush_handler<WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ buffered_flush_handler<WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ buffered_flush_handler<WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ buffered_flush_handler<WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_buffered_flush
+ {
+ template <typename WriteHandler, typename Stream>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ buffered_stream_storage* storage, Stream* next_layer) const
+ {
+ // 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;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ async_write(*next_layer, buffer(storage->data(), storage->size()),
+ buffered_flush_handler<typename decay<WriteHandler>::type>(
+ *storage, handler2.value));
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename WriteHandler, typename Allocator>
+struct associated_allocator<
+ detail::buffered_flush_handler<WriteHandler>, Allocator>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator>::type type;
+
+ static type get(const detail::buffered_flush_handler<WriteHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename WriteHandler, typename Executor>
+struct associated_executor<
+ detail::buffered_flush_handler<WriteHandler>, Executor>
+{
+ typedef typename associated_executor<WriteHandler, Executor>::type type;
+
+ static type get(const detail::buffered_flush_handler<WriteHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename Stream>
+template <typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+buffered_write_stream<Stream>::async_flush(
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_buffered_flush(),
+ handler, &storage_, &next_layer_);
+}
+
+template <typename Stream>
+template <typename ConstBufferSequence>
+std::size_t buffered_write_stream<Stream>::write_some(
+ const ConstBufferSequence& buffers)
+{
+ using boost::asio::buffer_size;
+ if (buffer_size(buffers) == 0)
+ return 0;
+
+ if (storage_.size() == storage_.capacity())
+ this->flush();
+
+ return this->copy(buffers);
+}
+
+template <typename Stream>
+template <typename ConstBufferSequence>
+std::size_t buffered_write_stream<Stream>::write_some(
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+
+ using boost::asio::buffer_size;
+ if (buffer_size(buffers) == 0)
+ return 0;
+
+ if (storage_.size() == storage_.capacity() && !flush(ec))
+ return 0;
+
+ return this->copy(buffers);
+}
+
+namespace detail
+{
+ template <typename ConstBufferSequence, typename WriteHandler>
+ class buffered_write_some_handler
+ {
+ public:
+ buffered_write_some_handler(detail::buffered_stream_storage& storage,
+ const ConstBufferSequence& buffers, WriteHandler& handler)
+ : storage_(storage),
+ buffers_(buffers),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ buffered_write_some_handler(const buffered_write_some_handler& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(other.handler_)
+ {
+ }
+
+ buffered_write_some_handler(buffered_write_some_handler&& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec, std::size_t)
+ {
+ if (ec)
+ {
+ const std::size_t length = 0;
+ handler_(ec, length);
+ }
+ else
+ {
+ using boost::asio::buffer_size;
+ std::size_t orig_size = storage_.size();
+ std::size_t space_avail = storage_.capacity() - orig_size;
+ std::size_t bytes_avail = buffer_size(buffers_);
+ std::size_t length = bytes_avail < space_avail
+ ? bytes_avail : space_avail;
+ storage_.resize(orig_size + length);
+ const std::size_t bytes_copied = boost::asio::buffer_copy(
+ storage_.data() + orig_size, buffers_, length);
+ handler_(ec, bytes_copied);
+ }
+ }
+
+ //private:
+ detail::buffered_stream_storage& storage_;
+ ConstBufferSequence buffers_;
+ WriteHandler handler_;
+ };
+
+ template <typename ConstBufferSequence, typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename ConstBufferSequence, typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename ConstBufferSequence, typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename ConstBufferSequence,
+ typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename ConstBufferSequence,
+ typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_buffered_write_some
+ {
+ template <typename WriteHandler, typename Stream,
+ typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ buffered_stream_storage* storage, Stream* next_layer,
+ const ConstBufferSequence& buffers) const
+ {
+ // 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;
+
+ using boost::asio::buffer_size;
+ non_const_lvalue<WriteHandler> handler2(handler);
+ if (buffer_size(buffers) == 0 || storage->size() < storage->capacity())
+ {
+ next_layer->async_write_some(BOOST_ASIO_CONST_BUFFER(0, 0),
+ buffered_write_some_handler<ConstBufferSequence,
+ typename decay<WriteHandler>::type>(
+ *storage, buffers, handler2.value));
+ }
+ else
+ {
+ initiate_async_buffered_flush()(
+ buffered_write_some_handler<ConstBufferSequence,
+ typename decay<WriteHandler>::type>(
+ *storage, buffers, handler2.value),
+ storage, next_layer);
+ }
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename ConstBufferSequence,
+ typename WriteHandler, typename Allocator>
+struct associated_allocator<
+ detail::buffered_write_some_handler<ConstBufferSequence, WriteHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator>::type type;
+
+ static type get(
+ const detail::buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename ConstBufferSequence,
+ typename WriteHandler, typename Executor>
+struct associated_executor<
+ detail::buffered_write_some_handler<ConstBufferSequence, WriteHandler>,
+ Executor>
+{
+ typedef typename associated_executor<WriteHandler, Executor>::type type;
+
+ static type get(
+ const detail::buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename Stream>
+template <typename ConstBufferSequence, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+buffered_write_stream<Stream>::async_write_some(
+ const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_buffered_write_some(),
+ handler, &storage_, &next_layer_, buffers);
+}
+
+template <typename Stream>
+template <typename ConstBufferSequence>
+std::size_t buffered_write_stream<Stream>::copy(
+ const ConstBufferSequence& buffers)
+{
+ using boost::asio::buffer_size;
+ std::size_t orig_size = storage_.size();
+ std::size_t space_avail = storage_.capacity() - orig_size;
+ std::size_t bytes_avail = buffer_size(buffers);
+ std::size_t length = bytes_avail < space_avail ? bytes_avail : space_avail;
+ storage_.resize(orig_size + length);
+ return boost::asio::buffer_copy(
+ storage_.data() + orig_size, buffers, length);
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_BUFFERED_WRITE_STREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/co_spawn.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/co_spawn.hpp
new file mode 100644
index 00000000000..19770cd8651
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/co_spawn.hpp
@@ -0,0 +1,140 @@
+//
+// impl/co_spawn.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CO_SPAWN_HPP
+#define BOOST_ASIO_IMPL_CO_SPAWN_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/awaitable.hpp>
+#include <boost/asio/dispatch.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/use_awaitable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T, typename Executor, typename F, typename Handler>
+awaitable<void, Executor> co_spawn_entry_point(
+ awaitable<T, Executor>*, Executor ex, F f, Handler handler)
+{
+ auto spawn_work = make_work_guard(ex);
+ auto handler_work = make_work_guard(handler, ex);
+
+ (void) co_await (post)(spawn_work.get_executor(),
+ use_awaitable_t<Executor>{});
+
+ bool done = false;
+ try
+ {
+ T t = co_await f();
+
+ done = true;
+
+ (dispatch)(handler_work.get_executor(),
+ [handler = std::move(handler), t = std::move(t)]() mutable
+ {
+ handler(std::exception_ptr(), std::move(t));
+ });
+ }
+ catch (...)
+ {
+ if (done)
+ throw;
+
+ (dispatch)(handler_work.get_executor(),
+ [handler = std::move(handler), e = std::current_exception()]() mutable
+ {
+ handler(e, T());
+ });
+ }
+}
+
+template <typename Executor, typename F, typename Handler>
+awaitable<void, Executor> co_spawn_entry_point(
+ awaitable<void, Executor>*, Executor ex, F f, Handler handler)
+{
+ auto spawn_work = make_work_guard(ex);
+ auto handler_work = make_work_guard(handler, ex);
+
+ (void) co_await (post)(spawn_work.get_executor(),
+ use_awaitable_t<Executor>{});
+
+ std::exception_ptr e = nullptr;
+ try
+ {
+ co_await f();
+ }
+ catch (...)
+ {
+ e = std::current_exception();
+ }
+
+ (dispatch)(handler_work.get_executor(),
+ [handler = std::move(handler), e]() mutable
+ {
+ handler(e);
+ });
+}
+
+struct initiate_co_spawn
+{
+ template <typename Handler, typename Executor, typename F>
+ void operator()(Handler&& handler, const Executor& ex, F&& f) const
+ {
+ typedef typename result_of<F()>::type awaitable_type;
+ typedef typename awaitable_type::executor_type executor_type;
+
+ executor_type ex2(ex);
+ auto a = (co_spawn_entry_point)(static_cast<awaitable_type*>(nullptr),
+ ex2, std::forward<F>(f), std::forward<Handler>(handler));
+ awaitable_handler<executor_type, void>(std::move(a), ex2).launch();
+ }
+};
+
+} // namespace detail
+
+template <typename Executor, typename F, typename CompletionToken>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+co_spawn(const Executor& ex, F&& f, CompletionToken&& token,
+ typename enable_if<
+ is_executor<Executor>::value
+ >::type*)
+{
+ return async_initiate<CompletionToken,
+ typename detail::awaitable_signature<typename result_of<F()>::type>>(
+ detail::initiate_co_spawn(), token, ex, std::forward<F>(f));
+}
+
+template <typename ExecutionContext, typename F, typename CompletionToken>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type*)
+{
+ return (co_spawn)(ctx.get_executor(), std::forward<F>(f),
+ std::forward<CompletionToken>(token));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_CO_SPAWN_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/compose.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/compose.hpp
new file mode 100644
index 00000000000..76fe54d0661
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/compose.hpp
@@ -0,0 +1,421 @@
+//
+// impl/compose.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_COMPOSE_HPP
+#define BOOST_ASIO_IMPL_COMPOSE_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/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_cont_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/detail/variadic_templates.hpp>
+#include <boost/asio/executor_work_guard.hpp>
+#include <boost/asio/is_executor.hpp>
+#include <boost/asio/system_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ template <typename>
+ struct composed_work;
+
+ template <>
+ struct composed_work<void()>
+ {
+ composed_work() BOOST_ASIO_NOEXCEPT
+ : head_(system_executor())
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ }
+
+ typedef system_executor head_type;
+ executor_work_guard<system_executor> head_;
+ };
+
+ inline composed_work<void()> make_composed_work()
+ {
+ return composed_work<void()>();
+ }
+
+ template <typename Head>
+ struct composed_work<void(Head)>
+ {
+ explicit composed_work(const Head& ex) BOOST_ASIO_NOEXCEPT
+ : head_(ex)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ }
+
+ typedef Head head_type;
+ executor_work_guard<Head> head_;
+ };
+
+ template <typename Head>
+ inline composed_work<void(Head)> make_composed_work(const Head& head)
+ {
+ return composed_work<void(Head)>(head);
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Head, typename... Tail>
+ struct composed_work<void(Head, Tail...)>
+ {
+ explicit composed_work(const Head& head,
+ const Tail&... tail) BOOST_ASIO_NOEXCEPT
+ : head_(head),
+ tail_(tail...)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ tail_.reset();
+ }
+
+ typedef Head head_type;
+ executor_work_guard<Head> head_;
+ composed_work<void(Tail...)> tail_;
+ };
+
+ template <typename Head, typename... Tail>
+ inline composed_work<void(Head, Tail...)>
+ make_composed_work(const Head& head, const Tail&... tail)
+ {
+ return composed_work<void(Head, Tail...)>(head, tail...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define BOOST_ASIO_PRIVATE_COMPOSED_WORK_DEF(n) \
+ template <typename Head, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ struct composed_work<void(Head, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ { \
+ explicit composed_work(const Head& head, \
+ BOOST_ASIO_VARIADIC_CONSTREF_PARAMS(n)) BOOST_ASIO_NOEXCEPT \
+ : head_(head), \
+ tail_(BOOST_ASIO_VARIADIC_BYVAL_ARGS(n)) \
+ { \
+ } \
+ \
+ void reset() \
+ { \
+ head_.reset(); \
+ tail_.reset(); \
+ } \
+ \
+ typedef Head head_type; \
+ executor_work_guard<Head> head_; \
+ composed_work<void(BOOST_ASIO_VARIADIC_TARGS(n))> tail_; \
+ }; \
+ \
+ template <typename Head, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline composed_work<void(Head, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ make_composed_work(const Head& head, BOOST_ASIO_VARIADIC_CONSTREF_PARAMS(n)) \
+ { \
+ return composed_work< \
+ void(Head, BOOST_ASIO_VARIADIC_TARGS(n))>( \
+ head, BOOST_ASIO_VARIADIC_BYVAL_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_COMPOSED_WORK_DEF)
+#undef BOOST_ASIO_PRIVATE_COMPOSED_WORK_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename Impl, typename Work, typename Handler, typename Signature>
+ class composed_op;
+
+ template <typename Impl, typename Work, typename Handler,
+ typename R, typename... Args>
+ class composed_op<Impl, Work, Handler, R(Args...)>
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename Impl, typename Work, typename Handler, typename Signature>
+ class composed_op
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ {
+ public:
+ composed_op(BOOST_ASIO_MOVE_ARG(Impl) impl,
+ BOOST_ASIO_MOVE_ARG(Work) work,
+ BOOST_ASIO_MOVE_ARG(Handler) handler)
+ : impl_(BOOST_ASIO_MOVE_CAST(Impl)(impl)),
+ work_(BOOST_ASIO_MOVE_CAST(Work)(work)),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ invocations_(0)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ composed_op(composed_op&& other)
+ : impl_(BOOST_ASIO_MOVE_CAST(Impl)(other.impl_)),
+ work_(BOOST_ASIO_MOVE_CAST(Work)(other.work_)),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_)),
+ invocations_(other.invocations_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ typedef typename associated_executor<Handler,
+ typename Work::head_type>::type executor_type;
+
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
+ {
+ return (get_associated_executor)(handler_, work_.head_.get_executor());
+ }
+
+ typedef typename associated_allocator<Handler,
+ std::allocator<void> >::type allocator_type;
+
+ allocator_type get_allocator() const BOOST_ASIO_NOEXCEPT
+ {
+ return (get_associated_allocator)(handler_, std::allocator<void>());
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template<typename... T>
+ void operator()(BOOST_ASIO_MOVE_ARG(T)... t)
+ {
+ if (invocations_ < ~unsigned(0))
+ ++invocations_;
+ impl_(*this, BOOST_ASIO_MOVE_CAST(T)(t)...);
+ }
+
+ void complete(Args... args)
+ {
+ this->work_.reset();
+ this->handler_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ void operator()()
+ {
+ if (invocations_ < ~unsigned(0))
+ ++invocations_;
+ impl_(*this);
+ }
+
+ void complete()
+ {
+ this->work_.reset();
+ this->handler_();
+ }
+
+#define BOOST_ASIO_PRIVATE_COMPOSED_OP_DEF(n) \
+ template<BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ if (invocations_ < ~unsigned(0)) \
+ ++invocations_; \
+ impl_(*this, BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ \
+ template<BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void complete(BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ this->work_.reset(); \
+ this->handler_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_COMPOSED_OP_DEF)
+#undef BOOST_ASIO_PRIVATE_COMPOSED_OP_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ //private:
+ Impl impl_;
+ Work work_;
+ Handler handler_;
+ unsigned invocations_;
+ };
+
+ template <typename Impl, typename Work, typename Handler, typename Signature>
+ inline void* asio_handler_allocate(std::size_t size,
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename Impl, typename Work, typename Handler, typename Signature>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename Impl, typename Work, typename Handler, typename Signature>
+ inline bool asio_handler_is_continuation(
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+ {
+ return this_handler->invocations_ > 1 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename Impl,
+ typename Work, typename Handler, typename Signature>
+ inline void asio_handler_invoke(Function& function,
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename Impl,
+ typename Work, typename Handler, typename Signature>
+ inline void asio_handler_invoke(const Function& function,
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Signature>
+ struct initiate_composed_op
+ {
+ template <typename Handler, typename Impl, typename Work>
+ void operator()(BOOST_ASIO_MOVE_ARG(Handler) handler,
+ BOOST_ASIO_MOVE_ARG(Impl) impl,
+ BOOST_ASIO_MOVE_ARG(Work) work) const
+ {
+ composed_op<typename decay<Impl>::type, typename decay<Work>::type,
+ typename decay<Handler>::type, Signature>(
+ BOOST_ASIO_MOVE_CAST(Impl)(impl), BOOST_ASIO_MOVE_CAST(Work)(work),
+ BOOST_ASIO_MOVE_CAST(Handler)(handler))();
+ }
+ };
+
+ template <typename IoObject>
+ inline typename IoObject::executor_type
+ get_composed_io_executor(IoObject& io_object)
+ {
+ return io_object.get_executor();
+ }
+
+ template <typename Executor>
+ inline const Executor& get_composed_io_executor(const Executor& ex,
+ typename enable_if<is_executor<Executor>::value>::type* = 0)
+ {
+ return ex;
+ }
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename CompletionToken, typename Signature,
+ typename Implementation, typename... IoObjectsOrExecutors>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)
+async_compose(BOOST_ASIO_MOVE_ARG(Implementation) implementation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
+ BOOST_ASIO_MOVE_ARG(IoObjectsOrExecutors)... io_objects_or_executors)
+{
+ return async_initiate<CompletionToken, Signature>(
+ detail::initiate_composed_op<Signature>(), token,
+ BOOST_ASIO_MOVE_CAST(Implementation)(implementation),
+ detail::make_composed_work(
+ detail::get_composed_io_executor(
+ BOOST_ASIO_MOVE_CAST(IoObjectsOrExecutors)(
+ io_objects_or_executors))...));
+}
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename CompletionToken, typename Signature, typename Implementation>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)
+async_compose(BOOST_ASIO_MOVE_ARG(Implementation) implementation,
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
+{
+ return async_initiate<CompletionToken, Signature>(
+ detail::initiate_composed_op<Signature>(), token,
+ BOOST_ASIO_MOVE_CAST(Implementation)(implementation),
+ detail::make_composed_work());
+}
+
+# define BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR(n) \
+ BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_##n
+
+# define BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_1 \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T1)(x1))
+# define BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_2 \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T1)(x1)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T2)(x2))
+# define BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_3 \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T1)(x1)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T2)(x2)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T3)(x3))
+# define BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_4 \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T1)(x1)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T2)(x2)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T3)(x3)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T4)(x4))
+# define BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_5 \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T1)(x1)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T2)(x2)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T3)(x3)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T4)(x4)), \
+ detail::get_composed_io_executor(BOOST_ASIO_MOVE_CAST(T5)(x5))
+
+#define BOOST_ASIO_PRIVATE_ASYNC_COMPOSE_DEF(n) \
+ template <typename CompletionToken, typename Signature, \
+ typename Implementation, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature) \
+ async_compose(BOOST_ASIO_MOVE_ARG(Implementation) implementation, \
+ BOOST_ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ return async_initiate<CompletionToken, Signature>( \
+ detail::initiate_composed_op<Signature>(), token, \
+ BOOST_ASIO_MOVE_CAST(Implementation)(implementation), \
+ detail::make_composed_work( \
+ BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR(n))); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_COMPOSE_DEF)
+#undef BOOST_ASIO_PRIVATE_ASYNC_COMPOSE_DEF
+
+#undef BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR
+#undef BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_1
+#undef BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_2
+#undef BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_3
+#undef BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_4
+#undef BOOST_ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_5
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_COMPOSE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/connect.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/connect.hpp
new file mode 100644
index 00000000000..51e5e6cb169
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/connect.hpp
@@ -0,0 +1,830 @@
+//
+// impl/connect.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_CONNECT_HPP
+#define BOOST_ASIO_IMPL_CONNECT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <algorithm>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.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/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/post.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ struct default_connect_condition
+ {
+ template <typename Endpoint>
+ bool operator()(const boost::system::error_code&, const Endpoint&)
+ {
+ return true;
+ }
+ };
+
+ template <typename Protocol, typename Iterator>
+ inline typename Protocol::endpoint deref_connect_result(
+ Iterator iter, boost::system::error_code& ec)
+ {
+ return ec ? typename Protocol::endpoint() : *iter;
+ }
+
+ template <typename T, typename Iterator>
+ struct legacy_connect_condition_helper : T
+ {
+ typedef char (*fallback_func_type)(...);
+ operator fallback_func_type() const;
+ };
+
+ template <typename R, typename Arg1, typename Arg2, typename Iterator>
+ struct legacy_connect_condition_helper<R (*)(Arg1, Arg2), Iterator>
+ {
+ R operator()(Arg1, Arg2) const;
+ char operator()(...) const;
+ };
+
+ template <typename T, typename Iterator>
+ struct is_legacy_connect_condition
+ {
+ static char asio_connect_condition_check(char);
+ static char (&asio_connect_condition_check(Iterator))[2];
+
+ static const bool value =
+ sizeof(asio_connect_condition_check(
+ (*static_cast<legacy_connect_condition_helper<T, Iterator>*>(0))(
+ *static_cast<const boost::system::error_code*>(0),
+ *static_cast<const Iterator*>(0)))) != 1;
+ };
+
+ template <typename ConnectCondition, typename Iterator>
+ inline Iterator call_connect_condition(ConnectCondition& connect_condition,
+ const boost::system::error_code& ec, Iterator next, Iterator end,
+ typename enable_if<is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>::type* = 0)
+ {
+ if (next != end)
+ return connect_condition(ec, next);
+ return end;
+ }
+
+ template <typename ConnectCondition, typename Iterator>
+ inline Iterator call_connect_condition(ConnectCondition& connect_condition,
+ const boost::system::error_code& ec, Iterator next, Iterator end,
+ typename enable_if<!is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>::type* = 0)
+ {
+ for (;next != end; ++next)
+ if (connect_condition(ec, *next))
+ return next;
+ return end;
+ }
+}
+
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type*)
+{
+ boost::system::error_code ec;
+ typename Protocol::endpoint result = connect(s, endpoints, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ return result;
+}
+
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, boost::system::error_code& ec,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type*)
+{
+ return detail::deref_connect_result<Protocol>(
+ connect(s, endpoints.begin(), endpoints.end(),
+ detail::default_connect_condition(), ec), ec);
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+{
+ boost::system::error_code ec;
+ Iterator result = connect(s, begin, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ return result;
+}
+
+template <typename Protocol, typename Executor, typename Iterator>
+inline Iterator connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, boost::system::error_code& ec,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+{
+ return connect(s, begin, Iterator(), detail::default_connect_condition(), ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end)
+{
+ boost::system::error_code ec;
+ Iterator result = connect(s, begin, end, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ return result;
+}
+
+template <typename Protocol, typename Executor, typename Iterator>
+inline Iterator connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end, boost::system::error_code& ec)
+{
+ return connect(s, begin, end, detail::default_connect_condition(), ec);
+}
+
+template <typename Protocol, typename Executor,
+ typename EndpointSequence, typename ConnectCondition>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type*)
+{
+ boost::system::error_code ec;
+ typename Protocol::endpoint result = connect(
+ s, endpoints, connect_condition, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ return result;
+}
+
+template <typename Protocol, typename Executor,
+ typename EndpointSequence, typename ConnectCondition>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ boost::system::error_code& ec,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type*)
+{
+ return detail::deref_connect_result<Protocol>(
+ connect(s, endpoints.begin(), endpoints.end(),
+ connect_condition, ec), ec);
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, ConnectCondition connect_condition,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+{
+ boost::system::error_code ec;
+ Iterator result = connect(s, begin, connect_condition, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ return result;
+}
+
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition>
+inline Iterator connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, ConnectCondition connect_condition,
+ boost::system::error_code& ec,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+{
+ return connect(s, begin, Iterator(), connect_condition, ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ Iterator end, ConnectCondition connect_condition)
+{
+ boost::system::error_code ec;
+ Iterator result = connect(s, begin, end, connect_condition, ec);
+ boost::asio::detail::throw_error(ec, "connect");
+ return result;
+}
+
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ Iterator end, ConnectCondition connect_condition,
+ boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+
+ for (Iterator iter = begin; iter != end; ++iter)
+ {
+ iter = (detail::call_connect_condition(connect_condition, ec, iter, end));
+ if (iter != end)
+ {
+ s.close(ec);
+ s.connect(*iter, ec);
+ if (!ec)
+ return iter;
+ }
+ else
+ break;
+ }
+
+ if (!ec)
+ ec = boost::asio::error::not_found;
+
+ return end;
+}
+
+namespace detail
+{
+ // Enable the empty base class optimisation for the connect condition.
+ template <typename ConnectCondition>
+ class base_from_connect_condition
+ {
+ protected:
+ explicit base_from_connect_condition(
+ const ConnectCondition& connect_condition)
+ : connect_condition_(connect_condition)
+ {
+ }
+
+ template <typename Iterator>
+ void check_condition(const boost::system::error_code& ec,
+ Iterator& iter, Iterator& end)
+ {
+ iter = detail::call_connect_condition(connect_condition_, ec, iter, end);
+ }
+
+ private:
+ ConnectCondition connect_condition_;
+ };
+
+ // The default_connect_condition implementation is essentially a no-op. This
+ // template specialisation lets us eliminate all costs associated with it.
+ template <>
+ class base_from_connect_condition<default_connect_condition>
+ {
+ protected:
+ explicit base_from_connect_condition(const default_connect_condition&)
+ {
+ }
+
+ template <typename Iterator>
+ void check_condition(const boost::system::error_code&, Iterator&, Iterator&)
+ {
+ }
+ };
+
+ template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+ class range_connect_op : base_from_connect_condition<ConnectCondition>
+ {
+ public:
+ range_connect_op(basic_socket<Protocol, Executor>& sock,
+ const EndpointSequence& endpoints,
+ const ConnectCondition& connect_condition,
+ RangeConnectHandler& handler)
+ : base_from_connect_condition<ConnectCondition>(connect_condition),
+ socket_(sock),
+ endpoints_(endpoints),
+ index_(0),
+ start_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(RangeConnectHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ range_connect_op(const range_connect_op& other)
+ : base_from_connect_condition<ConnectCondition>(other),
+ socket_(other.socket_),
+ endpoints_(other.endpoints_),
+ index_(other.index_),
+ start_(other.start_),
+ handler_(other.handler_)
+ {
+ }
+
+ range_connect_op(range_connect_op&& other)
+ : base_from_connect_condition<ConnectCondition>(other),
+ socket_(other.socket_),
+ endpoints_(other.endpoints_),
+ index_(other.index_),
+ start_(other.start_),
+ handler_(BOOST_ASIO_MOVE_CAST(RangeConnectHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(boost::system::error_code ec, int start = 0)
+ {
+ this->process(ec, start,
+ const_cast<const EndpointSequence&>(endpoints_).begin(),
+ const_cast<const EndpointSequence&>(endpoints_).end());
+ }
+
+ //private:
+ template <typename Iterator>
+ void process(boost::system::error_code ec,
+ int start, Iterator begin, Iterator end)
+ {
+ Iterator iter = begin;
+ std::advance(iter, index_);
+
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ this->check_condition(ec, iter, end);
+ index_ = std::distance(begin, iter);
+
+ if (iter != end)
+ {
+ socket_.close(ec);
+ socket_.async_connect(*iter,
+ BOOST_ASIO_MOVE_CAST(range_connect_op)(*this));
+ return;
+ }
+
+ if (start)
+ {
+ ec = boost::asio::error::not_found;
+ boost::asio::post(socket_.get_executor(),
+ detail::bind_handler(
+ BOOST_ASIO_MOVE_CAST(range_connect_op)(*this), ec));
+ return;
+ }
+
+ default:
+
+ if (iter == end)
+ break;
+
+ if (!socket_.is_open())
+ {
+ ec = boost::asio::error::operation_aborted;
+ break;
+ }
+
+ if (!ec)
+ break;
+
+ ++iter;
+ ++index_;
+ }
+
+ handler_(static_cast<const boost::system::error_code&>(ec),
+ static_cast<const typename Protocol::endpoint&>(
+ ec || iter == end ? typename Protocol::endpoint() : *iter));
+ }
+ }
+
+ basic_socket<Protocol, Executor>& socket_;
+ EndpointSequence endpoints_;
+ std::size_t index_;
+ int start_;
+ RangeConnectHandler handler_;
+ };
+
+ template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+ inline bool asio_handler_is_continuation(
+ range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename Executor, typename Protocol,
+ typename EndpointSequence, typename ConnectCondition,
+ typename RangeConnectHandler>
+ inline void asio_handler_invoke(Function& function,
+ range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename Executor, typename Protocol,
+ typename EndpointSequence, typename ConnectCondition,
+ typename RangeConnectHandler>
+ inline void asio_handler_invoke(const Function& function,
+ range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_range_connect
+ {
+ template <typename RangeConnectHandler, typename Protocol,
+ typename Executor, typename EndpointSequence, typename ConnectCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
+ basic_socket<Protocol, Executor>* s, const EndpointSequence& endpoints,
+ const ConnectCondition& connect_condition) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for an
+ // RangeConnectHandler.
+ BOOST_ASIO_RANGE_CONNECT_HANDLER_CHECK(RangeConnectHandler,
+ handler, typename Protocol::endpoint) type_check;
+
+ non_const_lvalue<RangeConnectHandler> handler2(handler);
+ range_connect_op<Protocol, Executor, EndpointSequence, ConnectCondition,
+ typename decay<RangeConnectHandler>::type>(*s, endpoints,
+ connect_condition, handler2.value)(boost::system::error_code(), 1);
+ }
+ };
+
+ template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+ class iterator_connect_op : base_from_connect_condition<ConnectCondition>
+ {
+ public:
+ iterator_connect_op(basic_socket<Protocol, Executor>& sock,
+ const Iterator& begin, const Iterator& end,
+ const ConnectCondition& connect_condition,
+ IteratorConnectHandler& handler)
+ : base_from_connect_condition<ConnectCondition>(connect_condition),
+ socket_(sock),
+ iter_(begin),
+ end_(end),
+ start_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(IteratorConnectHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ iterator_connect_op(const iterator_connect_op& other)
+ : base_from_connect_condition<ConnectCondition>(other),
+ socket_(other.socket_),
+ iter_(other.iter_),
+ end_(other.end_),
+ start_(other.start_),
+ handler_(other.handler_)
+ {
+ }
+
+ iterator_connect_op(iterator_connect_op&& other)
+ : base_from_connect_condition<ConnectCondition>(other),
+ socket_(other.socket_),
+ iter_(other.iter_),
+ end_(other.end_),
+ start_(other.start_),
+ handler_(BOOST_ASIO_MOVE_CAST(IteratorConnectHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(boost::system::error_code ec, int start = 0)
+ {
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ this->check_condition(ec, iter_, end_);
+
+ if (iter_ != end_)
+ {
+ socket_.close(ec);
+ socket_.async_connect(*iter_,
+ BOOST_ASIO_MOVE_CAST(iterator_connect_op)(*this));
+ return;
+ }
+
+ if (start)
+ {
+ ec = boost::asio::error::not_found;
+ boost::asio::post(socket_.get_executor(),
+ detail::bind_handler(
+ BOOST_ASIO_MOVE_CAST(iterator_connect_op)(*this), ec));
+ return;
+ }
+
+ default:
+
+ if (iter_ == end_)
+ break;
+
+ if (!socket_.is_open())
+ {
+ ec = boost::asio::error::operation_aborted;
+ break;
+ }
+
+ if (!ec)
+ break;
+
+ ++iter_;
+ }
+
+ handler_(static_cast<const boost::system::error_code&>(ec),
+ static_cast<const Iterator&>(iter_));
+ }
+ }
+
+ //private:
+ basic_socket<Protocol, Executor>& socket_;
+ Iterator iter_;
+ Iterator end_;
+ int start_;
+ IteratorConnectHandler handler_;
+ };
+
+ template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+ inline bool asio_handler_is_continuation(
+ iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename Executor, typename Protocol,
+ typename Iterator, typename ConnectCondition,
+ typename IteratorConnectHandler>
+ inline void asio_handler_invoke(Function& function,
+ iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename Executor, typename Protocol,
+ typename Iterator, typename ConnectCondition,
+ typename IteratorConnectHandler>
+ inline void asio_handler_invoke(const Function& function,
+ iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_iterator_connect
+ {
+ template <typename IteratorConnectHandler, typename Protocol,
+ typename Executor, typename Iterator, typename ConnectCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
+ basic_socket<Protocol, Executor>* s, Iterator begin,
+ Iterator end, const ConnectCondition& connect_condition) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for an
+ // IteratorConnectHandler.
+ BOOST_ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
+ IteratorConnectHandler, handler, Iterator) type_check;
+
+ non_const_lvalue<IteratorConnectHandler> handler2(handler);
+ iterator_connect_op<Protocol, Executor, Iterator, ConnectCondition,
+ typename decay<IteratorConnectHandler>::type>(*s, begin, end,
+ connect_condition, handler2.value)(boost::system::error_code(), 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler, typename Allocator>
+struct associated_allocator<
+ detail::range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>, Allocator>
+{
+ typedef typename associated_allocator<
+ RangeConnectHandler, Allocator>::type type;
+
+ static type get(
+ const detail::range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<RangeConnectHandler,
+ Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler, typename Executor1>
+struct associated_executor<
+ detail::range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>, Executor1>
+{
+ typedef typename associated_executor<
+ RangeConnectHandler, Executor1>::type type;
+
+ static type get(
+ const detail::range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>& h,
+ const Executor1& ex = Executor1()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<RangeConnectHandler,
+ Executor1>::get(h.handler_, ex);
+ }
+};
+
+template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler,
+ typename Allocator>
+struct associated_allocator<
+ detail::iterator_connect_op<Protocol, Executor,
+ Iterator, ConnectCondition, IteratorConnectHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<
+ IteratorConnectHandler, Allocator>::type type;
+
+ static type get(
+ const detail::iterator_connect_op<Protocol, Executor,
+ Iterator, ConnectCondition, IteratorConnectHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<IteratorConnectHandler,
+ Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler,
+ typename Executor1>
+struct associated_executor<
+ detail::iterator_connect_op<Protocol, Executor,
+ Iterator, ConnectCondition, IteratorConnectHandler>,
+ Executor1>
+{
+ typedef typename associated_executor<
+ IteratorConnectHandler, Executor1>::type type;
+
+ static type get(
+ const detail::iterator_connect_op<Protocol, Executor,
+ Iterator, ConnectCondition, IteratorConnectHandler>& h,
+ const Executor1& ex = Executor1()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<IteratorConnectHandler,
+ Executor1>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename Protocol, typename Executor,
+ typename EndpointSequence, typename RangeConnectHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint))
+async_connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints,
+ BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type*)
+{
+ return async_initiate<RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint)>(
+ detail::initiate_async_range_connect(), handler,
+ &s, endpoints, detail::default_connect_condition());
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+template <typename Protocol, typename Executor,
+ typename Iterator, typename IteratorConnectHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+{
+ return async_initiate<IteratorConnectHandler,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect(), handler,
+ &s, begin, Iterator(), detail::default_connect_condition());
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Protocol, typename Executor,
+ typename Iterator, typename IteratorConnectHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler)
+{
+ return async_initiate<IteratorConnectHandler,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect(), handler,
+ &s, begin, end, detail::default_connect_condition());
+}
+
+template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint))
+async_connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type*)
+{
+ return async_initiate<RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint)>(
+ detail::initiate_async_range_connect(),
+ handler, &s, endpoints, connect_condition);
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ ConnectCondition connect_condition,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+{
+ return async_initiate<IteratorConnectHandler,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect(),
+ handler, &s, begin, Iterator(), connect_condition);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ Iterator end, ConnectCondition connect_condition,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler)
+{
+ return async_initiate<IteratorConnectHandler,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect(),
+ handler, &s, begin, end, connect_condition);
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_CONNECT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/defer.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/defer.hpp
new file mode 100644
index 00000000000..856a33c788b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/defer.hpp
@@ -0,0 +1,93 @@
+//
+// impl/defer.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DEFER_HPP
+#define BOOST_ASIO_IMPL_DEFER_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/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/detail/work_dispatcher.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct initiate_defer
+{
+ template <typename CompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler) const
+ {
+ typedef typename decay<CompletionHandler>::type DecayedHandler;
+
+ typename associated_executor<DecayedHandler>::type ex(
+ (get_associated_executor)(handler));
+
+ typename associated_allocator<DecayedHandler>::type alloc(
+ (get_associated_allocator)(handler));
+
+ ex.defer(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler), alloc);
+ }
+
+ template <typename CompletionHandler, typename Executor>
+ void operator()(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler,
+ BOOST_ASIO_MOVE_ARG(Executor) ex) const
+ {
+ typedef typename decay<CompletionHandler>::type DecayedHandler;
+
+ typename associated_allocator<DecayedHandler>::type alloc(
+ (get_associated_allocator)(handler));
+
+ ex.defer(detail::work_dispatcher<DecayedHandler>(
+ BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
+ }
+};
+
+} // namespace detail
+
+template <typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) token)
+{
+ return async_initiate<CompletionToken, void()>(
+ detail::initiate_defer(), token);
+}
+
+template <typename Executor, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
+ const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_executor<Executor>::value>::type*)
+{
+ return async_initiate<CompletionToken, void()>(
+ detail::initiate_defer(), token, ex);
+}
+
+template <typename ExecutionContext, typename CompletionToken>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
+ ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type*)
+{
+ return (defer)(ctx.get_executor(),
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_DEFER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/detached.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/detached.hpp
new file mode 100644
index 00000000000..ae2c882fba2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/detached.hpp
@@ -0,0 +1,132 @@
+//
+// impl/detached.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETACHED_HPP
+#define BOOST_ASIO_IMPL_DETACHED_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/variadic_templates.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+ // Class to adapt a detached_t as a completion handler.
+ class detached_handler
+ {
+ public:
+ typedef void result_type;
+
+ detached_handler(detached_t)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename... Args>
+ void operator()(Args...)
+ {
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ void operator()()
+ {
+ }
+
+#define BOOST_ASIO_PRIVATE_DETACHED_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(BOOST_ASIO_VARIADIC_TARGS(n)) \
+ { \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_DETACHED_DEF)
+#undef BOOST_ASIO_PRIVATE_DETACHED_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ };
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Signature>
+struct async_result<detached_t, Signature>
+{
+ typedef boost::asio::detail::detached_handler completion_handler_type;
+
+ typedef void return_type;
+
+ explicit async_result(completion_handler_type&)
+ {
+ }
+
+ void get()
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static return_type initiate(
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken),
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
+ detail::detached_handler(detached_t()),
+ BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Initiation, typename RawCompletionToken>
+ static return_type initiate(
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken))
+ {
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
+ detail::detached_handler(detached_t()));
+ }
+
+#define BOOST_ASIO_PRIVATE_INITIATE_DEF(n) \
+ template <typename Initiation, typename RawCompletionToken, \
+ BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ static return_type initiate( \
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation, \
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken), \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation)( \
+ detail::detached_handler(detached_t()), \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_INITIATE_DEF)
+#undef BOOST_ASIO_PRIVATE_INITIATE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_DETACHED_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/dispatch.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/dispatch.hpp
new file mode 100644
index 00000000000..bcba2ee4016
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/dispatch.hpp
@@ -0,0 +1,93 @@
+//
+// impl/dispatch.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DISPATCH_HPP
+#define BOOST_ASIO_IMPL_DISPATCH_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/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/detail/work_dispatcher.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct initiate_dispatch
+{
+ template <typename CompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler) const
+ {
+ typedef typename decay<CompletionHandler>::type DecayedHandler;
+
+ typename associated_executor<DecayedHandler>::type ex(
+ (get_associated_executor)(handler));
+
+ typename associated_allocator<DecayedHandler>::type alloc(
+ (get_associated_allocator)(handler));
+
+ ex.dispatch(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler), alloc);
+ }
+
+ template <typename CompletionHandler, typename Executor>
+ void operator()(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler,
+ BOOST_ASIO_MOVE_ARG(Executor) ex) const
+ {
+ typedef typename decay<CompletionHandler>::type DecayedHandler;
+
+ typename associated_allocator<DecayedHandler>::type alloc(
+ (get_associated_allocator)(handler));
+
+ ex.dispatch(detail::work_dispatcher<DecayedHandler>(
+ BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
+ }
+};
+
+} // namespace detail
+
+template <typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) token)
+{
+ return async_initiate<CompletionToken, void()>(
+ detail::initiate_dispatch(), token);
+}
+
+template <typename Executor, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
+ const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_executor<Executor>::value>::type*)
+{
+ return async_initiate<CompletionToken, void()>(
+ detail::initiate_dispatch(), token, ex);
+}
+
+template <typename ExecutionContext, typename CompletionToken>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
+ ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type*)
+{
+ return (dispatch)(ctx.get_executor(),
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_DISPATCH_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/error.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/error.ipp
new file mode 100644
index 00000000000..0dcb1257c76
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/error.ipp
@@ -0,0 +1,130 @@
+//
+// impl/error.ipp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ERROR_IPP
+#define BOOST_ASIO_IMPL_ERROR_IPP
+
+#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/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace error {
+
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+namespace detail {
+
+class netdb_category : public boost::system::error_category
+{
+public:
+ const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+ {
+ return "asio.netdb";
+ }
+
+ std::string message(int value) const
+ {
+ if (value == error::host_not_found)
+ return "Host not found (authoritative)";
+ if (value == error::host_not_found_try_again)
+ return "Host not found (non-authoritative), try again later";
+ if (value == error::no_data)
+ return "The query is valid, but it does not have associated data";
+ if (value == error::no_recovery)
+ return "A non-recoverable error occurred during database lookup";
+ return "asio.netdb error";
+ }
+};
+
+} // namespace detail
+
+const boost::system::error_category& get_netdb_category()
+{
+ static detail::netdb_category instance;
+ return instance;
+}
+
+namespace detail {
+
+class addrinfo_category : public boost::system::error_category
+{
+public:
+ const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+ {
+ return "asio.addrinfo";
+ }
+
+ std::string message(int value) const
+ {
+ if (value == error::service_not_found)
+ return "Service not found";
+ if (value == error::socket_type_not_supported)
+ return "Socket type not supported";
+ return "asio.addrinfo error";
+ }
+};
+
+} // namespace detail
+
+const boost::system::error_category& get_addrinfo_category()
+{
+ static detail::addrinfo_category instance;
+ return instance;
+}
+
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+namespace detail {
+
+class misc_category : public boost::system::error_category
+{
+public:
+ const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+ {
+ return "asio.misc";
+ }
+
+ std::string message(int value) const
+ {
+ if (value == error::already_open)
+ return "Already open";
+ if (value == error::eof)
+ return "End of file";
+ if (value == error::not_found)
+ return "Element not found";
+ if (value == error::fd_set_failure)
+ return "The descriptor does not fit into the select call's fd_set";
+ return "asio.misc error";
+ }
+};
+
+} // namespace detail
+
+const boost::system::error_category& get_misc_category()
+{
+ static detail::misc_category instance;
+ return instance;
+}
+
+} // namespace error
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_ERROR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/execution_context.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/execution_context.hpp
new file mode 100644
index 00000000000..a1617f8c9c4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/execution_context.hpp
@@ -0,0 +1,111 @@
+//
+// impl/execution_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTION_CONTEXT_HPP
+#define BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/detail/service_registry.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Service>
+inline Service& use_service(execution_context& e)
+{
+ // Check that Service meets the necessary type requirements.
+ (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
+
+ return e.service_registry_->template use_service<Service>();
+}
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Service, typename... Args>
+Service& make_service(execution_context& e, BOOST_ASIO_MOVE_ARG(Args)... args)
+{
+ detail::scoped_ptr<Service> svc(
+ new Service(e, BOOST_ASIO_MOVE_CAST(Args)(args)...));
+ e.service_registry_->template add_service<Service>(svc.get());
+ Service& result = *svc;
+ svc.release();
+ return result;
+}
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Service>
+Service& make_service(execution_context& e)
+{
+ detail::scoped_ptr<Service> svc(new Service(e));
+ e.service_registry_->template add_service<Service>(svc.get());
+ Service& result = *svc;
+ svc.release();
+ return result;
+}
+
+#define BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
+ template <typename Service, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ Service& make_service(execution_context& e, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ detail::scoped_ptr<Service> svc( \
+ new Service(e, BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
+ e.service_registry_->template add_service<Service>(svc.get()); \
+ Service& result = *svc; \
+ svc.release(); \
+ return result; \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF)
+#undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Service>
+inline void add_service(execution_context& e, Service* svc)
+{
+ // Check that Service meets the necessary type requirements.
+ (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
+
+ e.service_registry_->template add_service<Service>(svc);
+}
+
+template <typename Service>
+inline bool has_service(execution_context& e)
+{
+ // Check that Service meets the necessary type requirements.
+ (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
+
+ return e.service_registry_->template has_service<Service>();
+}
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+inline execution_context& execution_context::service::context()
+{
+ return owner_;
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/execution_context.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/execution_context.ipp
new file mode 100644
index 00000000000..30e7bb926fd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/execution_context.ipp
@@ -0,0 +1,84 @@
+//
+// impl/execution_context.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTION_CONTEXT_IPP
+#define BOOST_ASIO_IMPL_EXECUTION_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 <boost/asio/execution_context.hpp>
+#include <boost/asio/detail/service_registry.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+execution_context::execution_context()
+ : service_registry_(new boost::asio::detail::service_registry(*this))
+{
+}
+
+execution_context::~execution_context()
+{
+ shutdown();
+ destroy();
+ delete service_registry_;
+}
+
+void execution_context::shutdown()
+{
+ service_registry_->shutdown_services();
+}
+
+void execution_context::destroy()
+{
+ service_registry_->destroy_services();
+}
+
+void execution_context::notify_fork(
+ boost::asio::execution_context::fork_event event)
+{
+ service_registry_->notify_fork(event);
+}
+
+execution_context::service::service(execution_context& owner)
+ : owner_(owner),
+ next_(0)
+{
+}
+
+execution_context::service::~service()
+{
+}
+
+void execution_context::service::notify_fork(execution_context::fork_event)
+{
+}
+
+service_already_exists::service_already_exists()
+ : std::logic_error("Service already exists.")
+{
+}
+
+invalid_service_owner::invalid_service_owner()
+ : std::logic_error("Invalid service owner.")
+{
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_EXECUTION_CONTEXT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/executor.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/executor.hpp
new file mode 100644
index 00000000000..b1c6cd748f1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/executor.hpp
@@ -0,0 +1,389 @@
+//
+// impl/executor.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_HPP
+#define BOOST_ASIO_IMPL_EXECUTOR_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/atomic_count.hpp>
+#include <boost/asio/detail/executor_function.hpp>
+#include <boost/asio/detail/global.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/system_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+
+// Lightweight, move-only function object wrapper.
+class executor::function
+{
+public:
+ template <typename F, typename Alloc>
+ explicit function(F f, const Alloc& a)
+ {
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_function<F, Alloc> func_type;
+ typename func_type::ptr p = {
+ detail::addressof(a), func_type::ptr::allocate(a), 0 };
+ func_ = new (p.v) func_type(BOOST_ASIO_MOVE_CAST(F)(f), a);
+ p.v = 0;
+ }
+
+ function(function&& other) BOOST_ASIO_NOEXCEPT
+ : func_(other.func_)
+ {
+ other.func_ = 0;
+ }
+
+ ~function()
+ {
+ if (func_)
+ func_->destroy();
+ }
+
+ void operator()()
+ {
+ if (func_)
+ {
+ detail::executor_function_base* func = func_;
+ func_ = 0;
+ func->complete();
+ }
+ }
+
+private:
+ detail::executor_function_base* func_;
+};
+
+#else // defined(BOOST_ASIO_HAS_MOVE)
+
+// Not so lightweight, copyable function object wrapper.
+class executor::function
+{
+public:
+ template <typename F, typename Alloc>
+ explicit function(const F& f, const Alloc&)
+ : impl_(new impl<F>(f))
+ {
+ }
+
+ void operator()()
+ {
+ impl_->invoke_(impl_.get());
+ }
+
+private:
+ // Base class for polymorphic function implementations.
+ struct impl_base
+ {
+ void (*invoke_)(impl_base*);
+ };
+
+ // Polymorphic function implementation.
+ template <typename F>
+ struct impl : impl_base
+ {
+ impl(const F& f)
+ : function_(f)
+ {
+ invoke_ = &function::invoke<F>;
+ }
+
+ F function_;
+ };
+
+ // Helper to invoke a function.
+ template <typename F>
+ static void invoke(impl_base* i)
+ {
+ static_cast<impl<F>*>(i)->function_();
+ }
+
+ detail::shared_ptr<impl_base> impl_;
+};
+
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+// Default polymorphic allocator implementation.
+template <typename Executor, typename Allocator>
+class executor::impl
+ : public executor::impl_base
+{
+public:
+ typedef BOOST_ASIO_REBIND_ALLOC(Allocator, impl) allocator_type;
+
+ static impl_base* create(const Executor& e, Allocator a = Allocator())
+ {
+ raw_mem mem(a);
+ impl* p = new (mem.ptr_) impl(e, a);
+ mem.ptr_ = 0;
+ return p;
+ }
+
+ impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
+ : impl_base(false),
+ ref_count_(1),
+ executor_(e),
+ allocator_(a)
+ {
+ }
+
+ impl_base* clone() const BOOST_ASIO_NOEXCEPT
+ {
+ ++ref_count_;
+ return const_cast<impl_base*>(static_cast<const impl_base*>(this));
+ }
+
+ void destroy() BOOST_ASIO_NOEXCEPT
+ {
+ if (--ref_count_ == 0)
+ {
+ allocator_type alloc(allocator_);
+ impl* p = this;
+ p->~impl();
+ alloc.deallocate(p, 1);
+ }
+ }
+
+ void on_work_started() BOOST_ASIO_NOEXCEPT
+ {
+ executor_.on_work_started();
+ }
+
+ void on_work_finished() BOOST_ASIO_NOEXCEPT
+ {
+ executor_.on_work_finished();
+ }
+
+ execution_context& context() BOOST_ASIO_NOEXCEPT
+ {
+ return executor_.context();
+ }
+
+ void dispatch(BOOST_ASIO_MOVE_ARG(function) f)
+ {
+ executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
+ }
+
+ void post(BOOST_ASIO_MOVE_ARG(function) f)
+ {
+ executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
+ }
+
+ void defer(BOOST_ASIO_MOVE_ARG(function) f)
+ {
+ executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
+ }
+
+ type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT
+ {
+ return type_id<Executor>();
+ }
+
+ void* target() BOOST_ASIO_NOEXCEPT
+ {
+ return &executor_;
+ }
+
+ const void* target() const BOOST_ASIO_NOEXCEPT
+ {
+ return &executor_;
+ }
+
+ bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT
+ {
+ if (this == e)
+ return true;
+ if (target_type() != e->target_type())
+ return false;
+ return executor_ == *static_cast<const Executor*>(e->target());
+ }
+
+private:
+ mutable detail::atomic_count ref_count_;
+ Executor executor_;
+ Allocator allocator_;
+
+ struct raw_mem
+ {
+ allocator_type allocator_;
+ impl* ptr_;
+
+ explicit raw_mem(const Allocator& a)
+ : allocator_(a),
+ ptr_(allocator_.allocate(1))
+ {
+ }
+
+ ~raw_mem()
+ {
+ if (ptr_)
+ allocator_.deallocate(ptr_, 1);
+ }
+
+ private:
+ // Disallow copying and assignment.
+ raw_mem(const raw_mem&);
+ raw_mem operator=(const raw_mem&);
+ };
+};
+
+// Polymorphic allocator specialisation for system_executor.
+template <typename Allocator>
+class executor::impl<system_executor, Allocator>
+ : public executor::impl_base
+{
+public:
+ static impl_base* create(const system_executor&,
+ const Allocator& = Allocator())
+ {
+ return &detail::global<impl<system_executor, std::allocator<void> > >();
+ }
+
+ impl()
+ : impl_base(true)
+ {
+ }
+
+ impl_base* clone() const BOOST_ASIO_NOEXCEPT
+ {
+ return const_cast<impl_base*>(static_cast<const impl_base*>(this));
+ }
+
+ void destroy() BOOST_ASIO_NOEXCEPT
+ {
+ }
+
+ void on_work_started() BOOST_ASIO_NOEXCEPT
+ {
+ executor_.on_work_started();
+ }
+
+ void on_work_finished() BOOST_ASIO_NOEXCEPT
+ {
+ executor_.on_work_finished();
+ }
+
+ execution_context& context() BOOST_ASIO_NOEXCEPT
+ {
+ return executor_.context();
+ }
+
+ void dispatch(BOOST_ASIO_MOVE_ARG(function) f)
+ {
+ executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
+ }
+
+ void post(BOOST_ASIO_MOVE_ARG(function) f)
+ {
+ executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
+ }
+
+ void defer(BOOST_ASIO_MOVE_ARG(function) f)
+ {
+ executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
+ }
+
+ type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT
+ {
+ return type_id<system_executor>();
+ }
+
+ void* target() BOOST_ASIO_NOEXCEPT
+ {
+ return &executor_;
+ }
+
+ const void* target() const BOOST_ASIO_NOEXCEPT
+ {
+ return &executor_;
+ }
+
+ bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT
+ {
+ return this == e;
+ }
+
+private:
+ system_executor executor_;
+ Allocator allocator_;
+};
+
+template <typename Executor>
+executor::executor(Executor e)
+ : impl_(impl<Executor, std::allocator<void> >::create(e))
+{
+}
+
+template <typename Executor, typename Allocator>
+executor::executor(allocator_arg_t, const Allocator& a, Executor e)
+ : impl_(impl<Executor, Allocator>::create(e, a))
+{
+}
+
+template <typename Function, typename Allocator>
+void executor::dispatch(BOOST_ASIO_MOVE_ARG(Function) f,
+ const Allocator& a) const
+{
+ impl_base* i = get_impl();
+ if (i->fast_dispatch_)
+ system_executor().dispatch(BOOST_ASIO_MOVE_CAST(Function)(f), a);
+ else
+ i->dispatch(function(BOOST_ASIO_MOVE_CAST(Function)(f), a));
+}
+
+template <typename Function, typename Allocator>
+void executor::post(BOOST_ASIO_MOVE_ARG(Function) f,
+ const Allocator& a) const
+{
+ get_impl()->post(function(BOOST_ASIO_MOVE_CAST(Function)(f), a));
+}
+
+template <typename Function, typename Allocator>
+void executor::defer(BOOST_ASIO_MOVE_ARG(Function) f,
+ const Allocator& a) const
+{
+ get_impl()->defer(function(BOOST_ASIO_MOVE_CAST(Function)(f), a));
+}
+
+template <typename Executor>
+Executor* executor::target() BOOST_ASIO_NOEXCEPT
+{
+ return impl_ && impl_->target_type() == type_id<Executor>()
+ ? static_cast<Executor*>(impl_->target()) : 0;
+}
+
+template <typename Executor>
+const Executor* executor::target() const BOOST_ASIO_NOEXCEPT
+{
+ return impl_ && impl_->target_type() == type_id<Executor>()
+ ? static_cast<Executor*>(impl_->target()) : 0;
+}
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/executor.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/executor.ipp
new file mode 100644
index 00000000000..289265d706b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/executor.ipp
@@ -0,0 +1,40 @@
+//
+// impl/executor.ipp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_EXECUTOR_IPP
+#define BOOST_ASIO_IMPL_EXECUTOR_IPP
+
+#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/executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+bad_executor::bad_executor() BOOST_ASIO_NOEXCEPT
+{
+}
+
+const char* bad_executor::what() const BOOST_ASIO_NOEXCEPT_OR_NOTHROW
+{
+ return "bad executor";
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_EXECUTOR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/handler_alloc_hook.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/handler_alloc_hook.ipp
new file mode 100644
index 00000000000..a580f71ffa8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/handler_alloc_hook.ipp
@@ -0,0 +1,54 @@
+//
+// impl/handler_alloc_hook.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HANDLER_ALLOC_HOOK_IPP
+#define BOOST_ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
+
+#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/thread_context.hpp>
+#include <boost/asio/detail/thread_info_base.hpp>
+#include <boost/asio/handler_alloc_hook.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+void* asio_handler_allocate(std::size_t size, ...)
+{
+#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return detail::thread_info_base::allocate(
+ detail::thread_context::thread_call_stack::top(), size);
+#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return ::operator new(size);
+#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+}
+
+void asio_handler_deallocate(void* pointer, std::size_t size, ...)
+{
+#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ detail::thread_info_base::deallocate(
+ detail::thread_context::thread_call_stack::top(), pointer, size);
+#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ (void)size;
+ ::operator delete(pointer);
+#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/io_context.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/io_context.hpp
new file mode 100644
index 00000000000..2cf8c4bc8df
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/io_context.hpp
@@ -0,0 +1,357 @@
+//
+// impl/io_context.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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/non_const_lvalue.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>
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+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
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#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();
+}
+
+struct io_context::initiate_dispatch
+{
+ template <typename LegacyCompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ io_context* self) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+ if (self->impl_.can_dispatch())
+ {
+ detail::fenced_block b(detail::fenced_block::full);
+ boost_asio_handler_invoke_helpers::invoke(
+ handler2.value, handler2.value);
+ }
+ else
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef detail::completion_handler<
+ typename decay<LegacyCompletionHandler>::type> op;
+ typename op::ptr p = { detail::addressof(handler2.value),
+ op::ptr::allocate(handler2.value), 0 };
+ p.p = new (p.v) op(handler2.value);
+
+ BOOST_ASIO_HANDLER_CREATION((*self, *p.p,
+ "io_context", self, 0, "dispatch"));
+
+ self->impl_.do_dispatch(p.p);
+ p.v = p.p = 0;
+ }
+ }
+};
+
+template <typename LegacyCompletionHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+io_context::dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+{
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_dispatch(), handler, this);
+}
+
+struct io_context::initiate_post
+{
+ template <typename LegacyCompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ io_context* self) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(handler2.value);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef detail::completion_handler<
+ typename decay<LegacyCompletionHandler>::type> op;
+ typename op::ptr p = { detail::addressof(handler2.value),
+ op::ptr::allocate(handler2.value), 0 };
+ p.p = new (p.v) op(handler2.value);
+
+ BOOST_ASIO_HANDLER_CREATION((*self, *p.p,
+ "io_context", self, 0, "post"));
+
+ self->impl_.post_immediate_completion(p.p, is_continuation);
+ p.v = p.p = 0;
+ }
+};
+
+template <typename LegacyCompletionHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+io_context::post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+{
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_post(), handler, this);
+}
+
+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());
+}
+#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());
+}
+
+} // 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.70.0/boost/asio/impl/io_context.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/io_context.ipp
new file mode 100644
index 00000000000..5de07181d46
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/io_context.ipp
@@ -0,0 +1,177 @@
+//
+// impl/io_context.ipp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IPP
+#define BOOST_ASIO_IMPL_IO_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 <boost/asio/io_context.hpp>
+#include <boost/asio/detail/concurrency_hint.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/scoped_ptr.hpp>
+#include <boost/asio/detail/service_registry.hpp>
+#include <boost/asio/detail/throw_error.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 {
+
+io_context::io_context()
+ : impl_(add_impl(new impl_type(*this,
+ BOOST_ASIO_CONCURRENCY_HINT_DEFAULT, false)))
+{
+}
+
+io_context::io_context(int concurrency_hint)
+ : impl_(add_impl(new impl_type(*this, concurrency_hint == 1
+ ? BOOST_ASIO_CONCURRENCY_HINT_1 : concurrency_hint, false)))
+{
+}
+
+io_context::impl_type& io_context::add_impl(io_context::impl_type* impl)
+{
+ boost::asio::detail::scoped_ptr<impl_type> scoped_impl(impl);
+ boost::asio::add_service<impl_type>(*this, scoped_impl.get());
+ return *scoped_impl.release();
+}
+
+io_context::~io_context()
+{
+}
+
+io_context::count_type io_context::run()
+{
+ boost::system::error_code ec;
+ count_type s = impl_.run(ec);
+ boost::asio::detail::throw_error(ec);
+ return s;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+io_context::count_type io_context::run(boost::system::error_code& ec)
+{
+ return impl_.run(ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+io_context::count_type io_context::run_one()
+{
+ boost::system::error_code ec;
+ count_type s = impl_.run_one(ec);
+ boost::asio::detail::throw_error(ec);
+ return s;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+io_context::count_type io_context::run_one(boost::system::error_code& ec)
+{
+ return impl_.run_one(ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+io_context::count_type io_context::poll()
+{
+ boost::system::error_code ec;
+ count_type s = impl_.poll(ec);
+ boost::asio::detail::throw_error(ec);
+ return s;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+io_context::count_type io_context::poll(boost::system::error_code& ec)
+{
+ return impl_.poll(ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+io_context::count_type io_context::poll_one()
+{
+ boost::system::error_code ec;
+ count_type s = impl_.poll_one(ec);
+ boost::asio::detail::throw_error(ec);
+ return s;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+io_context::count_type io_context::poll_one(boost::system::error_code& ec)
+{
+ return impl_.poll_one(ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+void io_context::stop()
+{
+ impl_.stop();
+}
+
+bool io_context::stopped() const
+{
+ return impl_.stopped();
+}
+
+void io_context::restart()
+{
+ impl_.restart();
+}
+
+io_context::service::service(boost::asio::io_context& owner)
+ : execution_context::service(owner)
+{
+}
+
+io_context::service::~service()
+{
+}
+
+void io_context::service::shutdown()
+{
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ shutdown_service();
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+void io_context::service::shutdown_service()
+{
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+void io_context::service::notify_fork(io_context::fork_event ev)
+{
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ fork_service(ev);
+#else // !defined(BOOST_ASIO_NO_DEPRECATED)
+ (void)ev;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+void io_context::service::fork_service(io_context::fork_event)
+{
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_IO_CONTEXT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/post.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/post.hpp
new file mode 100644
index 00000000000..ac0831e5329
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/post.hpp
@@ -0,0 +1,93 @@
+//
+// impl/post.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POST_HPP
+#define BOOST_ASIO_IMPL_POST_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/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/detail/work_dispatcher.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+struct initiate_post
+{
+ template <typename CompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler) const
+ {
+ typedef typename decay<CompletionHandler>::type DecayedHandler;
+
+ typename associated_executor<DecayedHandler>::type ex(
+ (get_associated_executor)(handler));
+
+ typename associated_allocator<DecayedHandler>::type alloc(
+ (get_associated_allocator)(handler));
+
+ ex.post(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler), alloc);
+ }
+
+ template <typename CompletionHandler, typename Executor>
+ void operator()(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler,
+ BOOST_ASIO_MOVE_ARG(Executor) ex) const
+ {
+ typedef typename decay<CompletionHandler>::type DecayedHandler;
+
+ typename associated_allocator<DecayedHandler>::type alloc(
+ (get_associated_allocator)(handler));
+
+ ex.post(detail::work_dispatcher<DecayedHandler>(
+ BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
+ }
+};
+
+} // namespace detail
+
+template <typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) token)
+{
+ return async_initiate<CompletionToken, void()>(
+ detail::initiate_post(), token);
+}
+
+template <typename Executor, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
+ const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_executor<Executor>::value>::type*)
+{
+ return async_initiate<CompletionToken, void()>(
+ detail::initiate_post(), token, ex);
+}
+
+template <typename ExecutionContext, typename CompletionToken>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
+ ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type*)
+{
+ return (post)(ctx.get_executor(),
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(token));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_POST_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/read.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/read.hpp
new file mode 100644
index 00000000000..6eabf0f6169
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/read.hpp
@@ -0,0 +1,1081 @@
+//
+// impl/read.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HPP
+#define BOOST_ASIO_IMPL_READ_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <algorithm>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/detail/array_fwd.hpp>
+#include <boost/asio/detail/base_from_completion_cond.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/consuming_buffers.hpp>
+#include <boost/asio/detail/dependent_type.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/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ template <typename SyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition>
+ std::size_t read_buffer_sequence(SyncReadStream& s,
+ const MutableBufferSequence& buffers, const MutableBufferIterator&,
+ CompletionCondition completion_condition, boost::system::error_code& ec)
+ {
+ ec = boost::system::error_code();
+ boost::asio::detail::consuming_buffers<mutable_buffer,
+ MutableBufferSequence, MutableBufferIterator> tmp(buffers);
+ while (!tmp.empty())
+ {
+ if (std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, tmp.total_consumed())))
+ tmp.consume(s.read_some(tmp.prepare(max_size), ec));
+ else
+ break;
+ }
+ return tmp.total_consumed();;
+ }
+} // namespace detail
+
+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*)
+{
+ return detail::read_buffer_sequence(s, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+}
+
+template <typename SyncReadStream, typename MutableBufferSequence>
+inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename MutableBufferSequence>
+inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type*)
+{
+ return read(s, buffers, transfer_all(), ec);
+}
+
+template <typename SyncReadStream, typename MutableBufferSequence,
+ typename CompletionCondition>
+inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read(s, buffers,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ typename decay<DynamicBuffer_v1>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+
+ ec = boost::system::error_code();
+ std::size_t total_transferred = 0;
+ std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ std::size_t bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(max_size, b.max_size() - b.size()));
+ while (bytes_available > 0)
+ {
+ std::size_t bytes_transferred = s.read_some(b.prepare(bytes_available), ec);
+ b.commit(bytes_transferred);
+ total_transferred += bytes_transferred;
+ max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(max_size, b.max_size() - b.size()));
+ }
+ return total_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
+inline std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
+inline std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ transfer_all(), ec);
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition>
+inline std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename SyncReadStream, typename Allocator,
+ typename CompletionCondition>
+inline std::size_t read(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec)
+{
+ return read(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+}
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b)
+{
+ return read(s, basic_streambuf_ref<Allocator>(b));
+}
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec)
+{
+ return read(s, basic_streambuf_ref<Allocator>(b), ec);
+}
+
+template <typename SyncReadStream, typename Allocator,
+ typename CompletionCondition>
+inline std::size_t read(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition)
+{
+ return read(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ ec = boost::system::error_code();
+ std::size_t total_transferred = 0;
+ std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ std::size_t bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(max_size, b.max_size() - b.size()));
+ while (bytes_available > 0)
+ {
+ std::size_t pos = b.size();
+ b.grow(bytes_available);
+ std::size_t bytes_transferred = s.read_some(
+ b.data(pos, bytes_available), ec);
+ b.shrink(bytes_available - bytes_transferred);
+ total_transferred += bytes_transferred;
+ max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(max_size, b.max_size() - b.size()));
+ }
+ return total_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ transfer_all(), ec);
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler>
+ class read_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ read_op(AsyncReadStream& stream, const MutableBufferSequence& buffers,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ stream_(stream),
+ buffers_(buffers),
+ start_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_op(const read_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_op(read_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ start_(other.start_),
+ 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)
+ {
+ std::size_t max_size;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ do
+ {
+ stream_.async_read_some(buffers_.prepare(max_size),
+ BOOST_ASIO_MOVE_CAST(read_op)(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ if ((!ec && bytes_transferred == 0) || buffers_.empty())
+ break;
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ } while (max_size > 0);
+
+ handler_(ec, buffers_.total_consumed());
+ }
+ }
+
+ //private:
+ typedef boost::asio::detail::consuming_buffers<mutable_buffer,
+ MutableBufferSequence, MutableBufferIterator> buffers_type;
+
+ AsyncReadStream& stream_;
+ buffers_type buffers_;
+ int start_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, 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 MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler>
+ inline void start_read_buffer_sequence_op(AsyncReadStream& stream,
+ const MutableBufferSequence& buffers, const MutableBufferIterator&,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ {
+ detail::read_op<AsyncReadStream, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>(
+ stream, buffers, completion_condition, handler)(
+ boost::system::error_code(), 0, 1);
+ }
+
+ struct initiate_async_read_buffer_sequence
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename MutableBufferSequence, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_read_buffer_sequence_op(*s, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_op<AsyncReadStream, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_op<AsyncReadStream, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_op<AsyncReadStream, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_op<AsyncReadStream, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, 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 MutableBufferSequence,
+ typename CompletionCondition, typename ReadHandler>
+inline 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*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_buffer_sequence(), handler, &s, buffers,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename ReadHandler>
+inline 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*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_buffer_sequence(),
+ handler, &s, buffers, transfer_all());
+}
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler>
+ class read_dynbuf_v1_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ template <typename BufferSequence>
+ read_dynbuf_v1_op(AsyncReadStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ start_(0),
+ total_transferred_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_dynbuf_v1_op(const read_dynbuf_v1_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_dynbuf_v1_op(read_dynbuf_v1_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ 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)
+ {
+ std::size_t max_size, bytes_available;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(max_size,
+ buffers_.max_size() - buffers_.size()));
+ for (;;)
+ {
+ stream_.async_read_some(buffers_.prepare(bytes_available),
+ BOOST_ASIO_MOVE_CAST(read_dynbuf_v1_op)(*this));
+ return; default:
+ total_transferred_ += bytes_transferred;
+ buffers_.commit(bytes_transferred);
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(max_size,
+ buffers_.max_size() - buffers_.size()));
+ if ((!ec && bytes_transferred == 0) || bytes_available == 0)
+ break;
+ }
+
+ handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v1 buffers_;
+ int start_;
+ std::size_t total_transferred_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, 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_v1, typename CompletionCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_dynbuf_v1
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ read_dynbuf_v1_op<AsyncReadStream, typename decay<DynamicBuffer_v1>::type,
+ CompletionCondition, typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ completion_cond2.value, handler2.value)(
+ boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_dynbuf_v1_op<AsyncReadStream,
+ DynamicBuffer_v1, CompletionCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_dynbuf_v1_op<AsyncReadStream,
+ DynamicBuffer_v1, CompletionCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_dynbuf_v1_op<AsyncReadStream,
+ DynamicBuffer_v1, CompletionCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_dynbuf_v1_op<AsyncReadStream,
+ DynamicBuffer_v1, CompletionCondition, 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_v1, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_read(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ transfer_all(), BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::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;
+
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1(), handler, &s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#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(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_read(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+template <typename AsyncReadStream, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+inline 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)
+{
+ return async_read(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition),
+ BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+ class read_dynbuf_v2_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ template <typename BufferSequence>
+ read_dynbuf_v2_op(AsyncReadStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ start_(0),
+ total_transferred_(0),
+ bytes_available_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_dynbuf_v2_op(const read_dynbuf_v2_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ bytes_available_(other.bytes_available_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_dynbuf_v2_op(read_dynbuf_v2_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ bytes_available_(other.bytes_available_),
+ 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)
+ {
+ std::size_t max_size, pos;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(max_size,
+ buffers_.max_size() - buffers_.size()));
+ for (;;)
+ {
+ pos = buffers_.size();
+ buffers_.grow(bytes_available_);
+ stream_.async_read_some(buffers_.data(pos, bytes_available_),
+ BOOST_ASIO_MOVE_CAST(read_dynbuf_v2_op)(*this));
+ return; default:
+ total_transferred_ += bytes_transferred;
+ buffers_.shrink(bytes_available_ - bytes_transferred);
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(max_size,
+ buffers_.max_size() - buffers_.size()));
+ if ((!ec && bytes_transferred == 0) || bytes_available_ == 0)
+ break;
+ }
+
+ handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ int start_;
+ std::size_t total_transferred_;
+ std::size_t bytes_available_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, 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_v2, typename CompletionCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_dynbuf_v2
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ read_dynbuf_v2_op<AsyncReadStream, typename decay<DynamicBuffer_v2>::type,
+ CompletionCondition, typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ completion_cond2.value, handler2.value)(
+ boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_dynbuf_v2_op<AsyncReadStream,
+ DynamicBuffer_v2, CompletionCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_dynbuf_v2_op<AsyncReadStream,
+ DynamicBuffer_v2, CompletionCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_dynbuf_v2_op<AsyncReadStream,
+ DynamicBuffer_v2, CompletionCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_dynbuf_v2_op<AsyncReadStream,
+ DynamicBuffer_v2, CompletionCondition, 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_v2, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_read(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ transfer_all(), BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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;
+
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v2(), handler, &s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_READ_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/read_at.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/read_at.hpp
new file mode 100644
index 00000000000..8152ef99a42
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/read_at.hpp
@@ -0,0 +1,657 @@
+//
+// impl/read_at.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_AT_HPP
+#define BOOST_ASIO_IMPL_READ_AT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <algorithm>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/detail/array_fwd.hpp>
+#include <boost/asio/detail/base_from_completion_cond.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/consuming_buffers.hpp>
+#include <boost/asio/detail/dependent_type.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/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition>
+ std::size_t read_at_buffer_sequence(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ const MutableBufferIterator&, CompletionCondition completion_condition,
+ boost::system::error_code& ec)
+ {
+ ec = boost::system::error_code();
+ boost::asio::detail::consuming_buffers<mutable_buffer,
+ MutableBufferSequence, MutableBufferIterator> tmp(buffers);
+ while (!tmp.empty())
+ {
+ if (std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, tmp.total_consumed())))
+ {
+ tmp.consume(d.read_some_at(offset + tmp.total_consumed(),
+ tmp.prepare(max_size), ec));
+ }
+ else
+ break;
+ }
+ return tmp.total_consumed();;
+ }
+} // namespace detail
+
+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)
+{
+ return detail::read_at_buffer_sequence(d, offset, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+}
+
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
+inline std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_at(
+ d, offset, buffers, transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "read_at");
+ return bytes_transferred;
+}
+
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
+inline std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ boost::system::error_code& ec)
+{
+ return read_at(d, offset, buffers, transfer_all(), ec);
+}
+
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename CompletionCondition>
+inline std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_at(d, offset, buffers,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "read_at");
+ return bytes_transferred;
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename SyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec)
+{
+ ec = boost::system::error_code();
+ std::size_t total_transferred = 0;
+ std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ std::size_t bytes_available = read_size_helper(b, max_size);
+ while (bytes_available > 0)
+ {
+ std::size_t bytes_transferred = d.read_some_at(
+ offset + total_transferred, b.prepare(bytes_available), ec);
+ b.commit(bytes_transferred);
+ total_transferred += bytes_transferred;
+ max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ bytes_available = read_size_helper(b, max_size);
+ }
+ return total_transferred;
+}
+
+template <typename SyncRandomAccessReadDevice, typename Allocator>
+inline std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_at(
+ d, offset, b, transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "read_at");
+ return bytes_transferred;
+}
+
+template <typename SyncRandomAccessReadDevice, typename Allocator>
+inline std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec)
+{
+ return read_at(d, offset, b, transfer_all(), ec);
+}
+
+template <typename SyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition>
+inline std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_at(d, offset, b,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "read_at");
+ return bytes_transferred;
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+namespace detail
+{
+ template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ class read_at_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ read_at_op(AsyncRandomAccessReadDevice& device,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ device_(device),
+ offset_(offset),
+ buffers_(buffers),
+ start_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_at_op(const read_at_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ device_(other.device_),
+ offset_(other.offset_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_at_op(read_at_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ device_(other.device_),
+ offset_(other.offset_),
+ buffers_(BOOST_ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ start_(other.start_),
+ 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)
+ {
+ std::size_t max_size;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ do
+ {
+ device_.async_read_some_at(
+ offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
+ BOOST_ASIO_MOVE_CAST(read_at_op)(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ if ((!ec && bytes_transferred == 0) || buffers_.empty())
+ break;
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ } while (max_size > 0);
+
+ handler_(ec, buffers_.total_consumed());
+ }
+ }
+
+ //private:
+ typedef boost::asio::detail::consuming_buffers<mutable_buffer,
+ MutableBufferSequence, MutableBufferIterator> buffers_type;
+
+ AsyncRandomAccessReadDevice& device_;
+ uint64_t offset_;
+ buffers_type buffers_;
+ int start_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void start_read_at_buffer_sequence_op(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ const MutableBufferIterator&, CompletionCondition& completion_condition,
+ ReadHandler& handler)
+ {
+ detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>(
+ d, offset, buffers, completion_condition, handler)(
+ boost::system::error_code(), 0, 1);
+ }
+
+ struct initiate_async_read_at_buffer_sequence
+ {
+ template <typename ReadHandler, typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncRandomAccessReadDevice* d, uint64_t offset,
+ const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_read_at_buffer_sequence_op(*d, offset, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_at_op<AsyncRandomAccessReadDevice,
+ MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename MutableBufferIterator,
+ typename CompletionCondition, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_at_op<AsyncRandomAccessReadDevice,
+ MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename CompletionCondition, typename ReadHandler>
+inline 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)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at_buffer_sequence(), handler, &d, offset,
+ buffers, BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename ReadHandler>
+inline 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)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at_buffer_sequence(),
+ handler, &d, offset, buffers, transfer_all());
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+namespace detail
+{
+ template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+ class read_at_streambuf_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ read_at_streambuf_op(AsyncRandomAccessReadDevice& device,
+ uint64_t offset, basic_streambuf<Allocator>& streambuf,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ device_(device),
+ offset_(offset),
+ streambuf_(streambuf),
+ start_(0),
+ total_transferred_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_at_streambuf_op(const read_at_streambuf_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ device_(other.device_),
+ offset_(other.offset_),
+ streambuf_(other.streambuf_),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_at_streambuf_op(read_at_streambuf_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ device_(other.device_),
+ offset_(other.offset_),
+ streambuf_(other.streambuf_),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ 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)
+ {
+ std::size_t max_size, bytes_available;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available = read_size_helper(streambuf_, max_size);
+ for (;;)
+ {
+ device_.async_read_some_at(offset_ + total_transferred_,
+ streambuf_.prepare(bytes_available),
+ BOOST_ASIO_MOVE_CAST(read_at_streambuf_op)(*this));
+ return; default:
+ total_transferred_ += bytes_transferred;
+ streambuf_.commit(bytes_transferred);
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available = read_size_helper(streambuf_, max_size);
+ if ((!ec && bytes_transferred == 0) || bytes_available == 0)
+ break;
+ }
+
+ handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+ }
+ }
+
+ //private:
+ AsyncRandomAccessReadDevice& device_;
+ uint64_t offset_;
+ boost::asio::basic_streambuf<Allocator>& streambuf_;
+ int start_;
+ std::size_t total_transferred_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncRandomAccessReadDevice,
+ typename Allocator, typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncRandomAccessReadDevice,
+ typename Allocator, typename CompletionCondition, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_at_streambuf
+ {
+ template <typename ReadHandler, typename AsyncRandomAccessReadDevice,
+ typename Allocator, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncRandomAccessReadDevice* d, uint64_t offset,
+ basic_streambuf<Allocator>* b,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
+ CompletionCondition, typename decay<ReadHandler>::type>(
+ *d, offset, *b, completion_cond2.value, handler2.value)(
+ boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler, typename Allocator1>
+struct associated_allocator<
+ detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
+ Allocator, CompletionCondition, ReadHandler>,
+ Allocator1>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator1>::type type;
+
+ static type get(
+ const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
+ Allocator, CompletionCondition, ReadHandler>& h,
+ const Allocator1& a = Allocator1()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator1>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncRandomAccessReadDevice, typename Executor,
+ typename CompletionCondition, typename ReadHandler, typename Executor1>
+struct associated_executor<
+ detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
+ Executor, CompletionCondition, ReadHandler>,
+ Executor1>
+{
+ typedef typename associated_executor<ReadHandler, Executor1>::type type;
+
+ static type get(
+ const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
+ Executor, CompletionCondition, ReadHandler>& h,
+ const Executor1& ex = Executor1()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor1>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at_streambuf(), handler, &d, offset,
+ &b, BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at_streambuf(),
+ handler, &d, offset, &b, transfer_all());
+}
+
+#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_AT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/read_until.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/read_until.hpp
new file mode 100644
index 00000000000..63b86f8f2ea
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/read_until.hpp
@@ -0,0 +1,3006 @@
+//
+// impl/read_until.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+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
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ char delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ typename decay<DynamicBuffer_v1>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v1::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_v1>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ typename decay<DynamicBuffer_v1>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v1::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_v1>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ const boost::regex& expr,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), expr, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ const boost::regex& expr, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ typename decay<DynamicBuffer_v1>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v1::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_v1, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ MatchCondition match_condition,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ match_condition, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream,
+ typename DynamicBuffer_v1, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ typename decay<DynamicBuffer_v1>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v1::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, char delim,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ char delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ 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()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ 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()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, const boost::regex& expr,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), expr, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::regex& expr, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ 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()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, MatchCondition match_condition,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ match_condition, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ 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()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ class read_until_delim_op_v1
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_op_v1(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_v1(const read_until_delim_op_v1& 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_v1(read_until_delim_op_v1&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(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_v1::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 op_v1eration to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_delim_op_v1)(*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_v1 buffers_;
+ char delim_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_delim_v1
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v1>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ char delim) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_op_v1<AsyncReadStream,
+ typename decay<DynamicBuffer_v1>::type,
+ typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1, 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_v1) buffers,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v1(), handler,
+ &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim);
+}
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ class read_until_delim_string_op_v1
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_string_op_v1(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_v1(const read_until_delim_string_op_v1& 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_v1(read_until_delim_string_op_v1&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(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_v1::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 op_v1eration to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_delim_string_op_v1)(*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_v1 buffers_;
+ std::string delim_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_delim_string_v1
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v1>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ const std::string& delim) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_string_op_v1<AsyncReadStream,
+ typename decay<DynamicBuffer_v1>::type,
+ typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1, 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_v1) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v1(),
+ handler, &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ static_cast<std::string>(delim));
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler>
+ class read_until_expr_op_v1
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_expr_op_v1(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_v1(const read_until_expr_op_v1& 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_v1(read_until_expr_op_v1&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(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_v1::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 op_v1eration to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_expr_op_v1)(*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_v1 buffers_;
+ RegEx expr_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1, typename RegEx, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename RegEx, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_expr_v1
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename RegEx>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ const RegEx& expr) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_expr_op_v1<AsyncReadStream,
+ typename decay<DynamicBuffer_v1>::type,
+ RegEx, typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ expr, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1, 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_v1) buffers,
+ const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v1(), handler,
+ &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), expr);
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler>
+ class read_until_match_op_v1
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_match_op_v1(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_v1(const read_until_match_op_v1& 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_v1(read_until_match_op_v1&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(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_v1::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 op_v1eration to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_match_op_v1)(*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_v1 buffers_;
+ MatchCondition match_condition_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
+ 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_v1, typename MatchCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename MatchCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_match_v1
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename MatchCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ MatchCondition match_condition) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_match_op_v1<AsyncReadStream,
+ typename decay<DynamicBuffer_v1>::type,
+ MatchCondition, typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ match_condition, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, 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_v1,
+ 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_v1) buffers,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v1(), handler,
+ &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), match_condition);
+}
+
+#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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ class read_until_delim_op_v2
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_op_v2(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),
+ bytes_to_read_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_delim_op_v2(const read_until_delim_op_v2& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_delim_op_v2(read_until_delim_op_v2&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ 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 pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ 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 op_v2eration to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ BOOST_ASIO_MOVE_CAST(read_until_delim_op_v2)(*this));
+ return; default:
+ buffers_.shrink(bytes_to_read_ - 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_v2 buffers_;
+ char delim_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_delim_v2
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v2>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ char delim) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_op_v2<AsyncReadStream,
+ typename decay<DynamicBuffer_v2>::type,
+ typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v2(), handler,
+ &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim);
+}
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ class read_until_delim_string_op_v2
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_string_op_v2(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),
+ bytes_to_read_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_delim_string_op_v2(const read_until_delim_string_op_v2& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_delim_string_op_v2(read_until_delim_string_op_v2&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ delim_(BOOST_ASIO_MOVE_CAST(std::string)(other.delim_)),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ 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 pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ 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 op_v2eration to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ BOOST_ASIO_MOVE_CAST(read_until_delim_string_op_v2)(*this));
+ return; default:
+ buffers_.shrink(bytes_to_read_ - 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_v2 buffers_;
+ std::string delim_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_delim_string_v2
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v2>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ const std::string& delim) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_string_op_v2<AsyncReadStream,
+ typename decay<DynamicBuffer_v2>::type,
+ typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ delim, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v2(),
+ handler, &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ static_cast<std::string>(delim));
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler>
+ class read_until_expr_op_v2
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_expr_op_v2(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),
+ bytes_to_read_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_expr_op_v2(const read_until_expr_op_v2& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ expr_(other.expr_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_expr_op_v2(read_until_expr_op_v2&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ expr_(other.expr_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ 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 pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ 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 op_v2eration to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ BOOST_ASIO_MOVE_CAST(read_until_expr_op_v2)(*this));
+ return; default:
+ buffers_.shrink(bytes_to_read_ - 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_v2 buffers_;
+ RegEx expr_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2, typename RegEx, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename RegEx, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_expr_v2
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename RegEx>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ const RegEx& expr) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_expr_op_v2<AsyncReadStream,
+ typename decay<DynamicBuffer_v2>::type,
+ RegEx, typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ expr, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::regex& expr, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v2(), handler,
+ &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), expr);
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler>
+ class read_until_match_op_v2
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_match_op_v2(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),
+ bytes_to_read_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_match_op_v2(const read_until_match_op_v2& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ match_condition_(other.match_condition_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_match_op_v2(read_until_match_op_v2&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ match_condition_(other.match_condition_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ 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 pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ 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 op_v2eration to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ BOOST_ASIO_MOVE_CAST(read_until_match_op_v2)(*this));
+ return; default:
+ buffers_.shrink(bytes_to_read_ - 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_v2 buffers_;
+ MatchCondition match_condition_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
+ 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_v2, typename MatchCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_read_until_match_v2
+ {
+ template <typename ReadHandler, typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ AsyncReadStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ MatchCondition match_condition) const
+ {
+ // 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;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_match_op_v2<AsyncReadStream,
+ typename decay<DynamicBuffer_v2>::type,
+ MatchCondition, typename decay<ReadHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ match_condition, handler2.value)(boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, 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_v2,
+ typename MatchCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v2(), handler,
+ &s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), match_condition);
+}
+
+#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.70.0/boost/asio/impl/redirect_error.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/redirect_error.hpp
new file mode 100644
index 00000000000..eb0d82998ae
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/redirect_error.hpp
@@ -0,0 +1,374 @@
+
+// impl/redirect_error.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REDIRECT_ERROR_HPP
+#define BOOST_ASIO_IMPL_REDIRECT_ERROR_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/associated_executor.hpp>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/async_result.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/type_traits.hpp>
+#include <boost/asio/detail/variadic_templates.hpp>
+#include <boost/system/system_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+// Class to adapt a redirect_error_t as a completion handler.
+template <typename Handler>
+class redirect_error_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename CompletionToken>
+ redirect_error_handler(redirect_error_t<CompletionToken> e)
+ : ec_(e.ec_),
+ handler_(BOOST_ASIO_MOVE_CAST(CompletionToken)(e.token_))
+ {
+ }
+
+ template <typename RedirectedHandler>
+ redirect_error_handler(boost::system::error_code& ec,
+ BOOST_ASIO_MOVE_ARG(RedirectedHandler) h)
+ : ec_(ec),
+ handler_(BOOST_ASIO_MOVE_CAST(RedirectedHandler)(h))
+ {
+ }
+
+ void operator()()
+ {
+ handler_();
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Arg, typename... Args>
+ typename enable_if<
+ !is_same<typename decay<Arg>::type, boost::system::error_code>::value
+ >::type
+ operator()(BOOST_ASIO_MOVE_ARG(Arg) arg, BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg),
+ BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+ template <typename... Args>
+ void operator()(const boost::system::error_code& ec,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ ec_ = ec;
+ handler_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Arg>
+ typename enable_if<
+ !is_same<typename decay<Arg>::type, boost::system::error_code>::value
+ >::type
+ operator()(BOOST_ASIO_MOVE_ARG(Arg) arg)
+ {
+ handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg));
+ }
+
+ void operator()(const boost::system::error_code& ec)
+ {
+ ec_ = ec;
+ handler_();
+ }
+
+#define BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
+ template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ typename enable_if< \
+ !is_same<typename decay<Arg>::type, boost::system::error_code>::value \
+ >::type \
+ operator()(BOOST_ASIO_MOVE_ARG(Arg) arg, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg), \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(const boost::system::error_code& ec, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ ec_ = ec; \
+ handler_(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF)
+#undef BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+//private:
+ boost::system::error_code& ec_;
+ Handler handler_;
+};
+
+template <typename Handler>
+inline void* asio_handler_allocate(std::size_t size,
+ redirect_error_handler<Handler>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Handler>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ redirect_error_handler<Handler>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ redirect_error_handler<Handler>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Function, typename Handler>
+inline void asio_handler_invoke(Function& function,
+ redirect_error_handler<Handler>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Handler>
+inline void asio_handler_invoke(const Function& function,
+ redirect_error_handler<Handler>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Signature>
+struct redirect_error_signature
+{
+ typedef Signature type;
+};
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(boost::system::error_code, Args...)>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(const boost::system::error_code&, Args...)>
+{
+ typedef R type(Args...);
+};
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename R>
+struct redirect_error_signature<R(boost::system::error_code)>
+{
+ typedef R type();
+};
+
+template <typename R>
+struct redirect_error_signature<R(const boost::system::error_code&)>
+{
+ typedef R type();
+};
+
+#define BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
+ template <typename R, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ struct redirect_error_signature< \
+ R(boost::system::error_code, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ { \
+ typedef R type(BOOST_ASIO_VARIADIC_TARGS(n)); \
+ }; \
+ \
+ template <typename R, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ struct redirect_error_signature< \
+ R(const boost::system::error_code&, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ { \
+ typedef R type(BOOST_ASIO_VARIADIC_TARGS(n)); \
+ }; \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF)
+#undef BOOST_ASIO_PRIVATE_REDIRECT_ERROR_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename Signature>
+struct async_result<redirect_error_t<CompletionToken>, Signature>
+{
+ typedef typename async_result<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>
+ ::return_type return_type;
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ template <typename Init>
+ init_wrapper(boost::system::error_code& ec, BOOST_ASIO_MOVE_ARG(Init) init)
+ : ec_(ec),
+ initiation_(BOOST_ASIO_MOVE_CAST(Init)(init))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Handler, typename... Args>
+ void operator()(
+ BOOST_ASIO_MOVE_ARG(Handler) handler,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation_)(
+ detail::redirect_error_handler<
+ typename decay<Handler>::type>(
+ ec_, BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+ BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Handler>
+ void operator()(
+ BOOST_ASIO_MOVE_ARG(Handler) handler)
+ {
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation_)(
+ detail::redirect_error_handler<
+ typename decay<Handler>::type>(
+ ec_, BOOST_ASIO_MOVE_CAST(Handler)(handler)));
+ }
+
+#define BOOST_ASIO_PRIVATE_INIT_WRAPPER_DEF(n) \
+ template <typename Handler, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()( \
+ BOOST_ASIO_MOVE_ARG(Handler) handler, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ BOOST_ASIO_MOVE_CAST(Initiation)(initiation_)( \
+ detail::redirect_error_handler< \
+ typename decay<Handler>::type>( \
+ ec_, BOOST_ASIO_MOVE_CAST(Handler)(handler)), \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_INIT_WRAPPER_DEF)
+#undef BOOST_ASIO_PRIVATE_INIT_WRAPPER_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ boost::system::error_code& ec_;
+ Initiation initiation_;
+ };
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static return_type initiate(
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken) token,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ return async_initiate<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>(
+ init_wrapper<typename decay<Initiation>::type>(
+ token.ec_, BOOST_ASIO_MOVE_CAST(Initiation)(initiation)),
+ token.token_, BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename Initiation, typename RawCompletionToken>
+ static return_type initiate(
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation,
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken) token)
+ {
+ return async_initiate<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>(
+ init_wrapper<typename decay<Initiation>::type>(
+ token.ec_, BOOST_ASIO_MOVE_CAST(Initiation)(initiation)),
+ token.token_);
+ }
+
+#define BOOST_ASIO_PRIVATE_INITIATE_DEF(n) \
+ template <typename Initiation, typename RawCompletionToken, \
+ BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ static return_type initiate( \
+ BOOST_ASIO_MOVE_ARG(Initiation) initiation, \
+ BOOST_ASIO_MOVE_ARG(RawCompletionToken) token, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ return async_initiate<CompletionToken, \
+ typename detail::redirect_error_signature<Signature>::type>( \
+ init_wrapper<typename decay<Initiation>::type>( \
+ token.ec_, BOOST_ASIO_MOVE_CAST(Initiation)(initiation)), \
+ token.token_, BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_INITIATE_DEF)
+#undef BOOST_ASIO_PRIVATE_INITIATE_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+template <typename Handler, typename Executor>
+struct associated_executor<detail::redirect_error_handler<Handler>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(
+ const detail::redirect_error_handler<Handler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+template <typename Handler, typename Allocator>
+struct associated_allocator<detail::redirect_error_handler<Handler>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(
+ const detail::redirect_error_handler<Handler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_REDIRECT_ERROR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.hpp
new file mode 100644
index 00000000000..c456e308002
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.hpp
@@ -0,0 +1,61 @@
+//
+// impl/serial_port_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_BASE_HPP
+#define BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+inline serial_port_base::baud_rate::baud_rate(unsigned int rate)
+ : value_(rate)
+{
+}
+
+inline unsigned int serial_port_base::baud_rate::value() const
+{
+ return value_;
+}
+
+inline serial_port_base::flow_control::type
+serial_port_base::flow_control::value() const
+{
+ return value_;
+}
+
+inline serial_port_base::parity::type serial_port_base::parity::value() const
+{
+ return value_;
+}
+
+inline serial_port_base::stop_bits::type
+serial_port_base::stop_bits::value() const
+{
+ return value_;
+}
+
+inline unsigned int serial_port_base::character_size::value() const
+{
+ return value_;
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_SERIAL_PORT_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.ipp
new file mode 100644
index 00000000000..c7ff51876a2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/serial_port_base.ipp
@@ -0,0 +1,556 @@
+//
+// impl/serial_port_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_BASE_IPP
+#define BOOST_ASIO_IMPL_SERIAL_PORT_BASE_IPP
+
+#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_SERIAL_PORT)
+
+#include <stdexcept>
+#include <boost/asio/error.hpp>
+#include <boost/asio/serial_port_base.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+
+#if defined(GENERATING_DOCUMENTATION)
+# define BOOST_ASIO_OPTION_STORAGE implementation_defined
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# define BOOST_ASIO_OPTION_STORAGE DCB
+#else
+# define BOOST_ASIO_OPTION_STORAGE termios
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::baud_rate::store(
+ BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ storage.BaudRate = value_;
+#else
+ speed_t baud;
+ switch (value_)
+ {
+ // Do POSIX-specified rates first.
+ case 0: baud = B0; break;
+ case 50: baud = B50; break;
+ case 75: baud = B75; break;
+ case 110: baud = B110; break;
+ case 134: baud = B134; break;
+ case 150: baud = B150; break;
+ case 200: baud = B200; break;
+ case 300: baud = B300; break;
+ case 600: baud = B600; break;
+ case 1200: baud = B1200; break;
+ case 1800: baud = B1800; break;
+ case 2400: baud = B2400; break;
+ case 4800: baud = B4800; break;
+ case 9600: baud = B9600; break;
+ case 19200: baud = B19200; break;
+ case 38400: baud = B38400; break;
+ // And now the extended ones conditionally.
+# ifdef B7200
+ case 7200: baud = B7200; break;
+# endif
+# ifdef B14400
+ case 14400: baud = B14400; break;
+# endif
+# ifdef B57600
+ case 57600: baud = B57600; break;
+# endif
+# ifdef B115200
+ case 115200: baud = B115200; break;
+# endif
+# ifdef B230400
+ case 230400: baud = B230400; break;
+# endif
+# ifdef B460800
+ case 460800: baud = B460800; break;
+# endif
+# ifdef B500000
+ case 500000: baud = B500000; break;
+# endif
+# ifdef B576000
+ case 576000: baud = B576000; break;
+# endif
+# ifdef B921600
+ case 921600: baud = B921600; break;
+# endif
+# ifdef B1000000
+ case 1000000: baud = B1000000; break;
+# endif
+# ifdef B1152000
+ case 1152000: baud = B1152000; break;
+# endif
+# ifdef B2000000
+ case 2000000: baud = B2000000; break;
+# endif
+# ifdef B3000000
+ case 3000000: baud = B3000000; break;
+# endif
+# ifdef B3500000
+ case 3500000: baud = B3500000; break;
+# endif
+# ifdef B4000000
+ case 4000000: baud = B4000000; break;
+# endif
+ default:
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
+ ::cfsetspeed(&storage, baud);
+# else
+ ::cfsetispeed(&storage, baud);
+ ::cfsetospeed(&storage, baud);
+# endif
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::baud_rate::load(
+ const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ value_ = storage.BaudRate;
+#else
+ speed_t baud = ::cfgetospeed(&storage);
+ switch (baud)
+ {
+ // First do those specified by POSIX.
+ case B0: value_ = 0; break;
+ case B50: value_ = 50; break;
+ case B75: value_ = 75; break;
+ case B110: value_ = 110; break;
+ case B134: value_ = 134; break;
+ case B150: value_ = 150; break;
+ case B200: value_ = 200; break;
+ case B300: value_ = 300; break;
+ case B600: value_ = 600; break;
+ case B1200: value_ = 1200; break;
+ case B1800: value_ = 1800; break;
+ case B2400: value_ = 2400; break;
+ case B4800: value_ = 4800; break;
+ case B9600: value_ = 9600; break;
+ case B19200: value_ = 19200; break;
+ case B38400: value_ = 38400; break;
+ // Now conditionally handle a bunch of extended rates.
+# ifdef B7200
+ case B7200: value_ = 7200; break;
+# endif
+# ifdef B14400
+ case B14400: value_ = 14400; break;
+# endif
+# ifdef B57600
+ case B57600: value_ = 57600; break;
+# endif
+# ifdef B115200
+ case B115200: value_ = 115200; break;
+# endif
+# ifdef B230400
+ case B230400: value_ = 230400; break;
+# endif
+# ifdef B460800
+ case B460800: value_ = 460800; break;
+# endif
+# ifdef B500000
+ case B500000: value_ = 500000; break;
+# endif
+# ifdef B576000
+ case B576000: value_ = 576000; break;
+# endif
+# ifdef B921600
+ case B921600: value_ = 921600; break;
+# endif
+# ifdef B1000000
+ case B1000000: value_ = 1000000; break;
+# endif
+# ifdef B1152000
+ case B1152000: value_ = 1152000; break;
+# endif
+# ifdef B2000000
+ case B2000000: value_ = 2000000; break;
+# endif
+# ifdef B3000000
+ case B3000000: value_ = 3000000; break;
+# endif
+# ifdef B3500000
+ case B3500000: value_ = 3500000; break;
+# endif
+# ifdef B4000000
+ case B4000000: value_ = 4000000; break;
+# endif
+ default:
+ value_ = 0;
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+serial_port_base::flow_control::flow_control(
+ serial_port_base::flow_control::type t)
+ : value_(t)
+{
+ if (t != none && t != software && t != hardware)
+ {
+ std::out_of_range ex("invalid flow_control value");
+ boost::asio::detail::throw_exception(ex);
+ }
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::flow_control::store(
+ BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ storage.fOutxCtsFlow = FALSE;
+ storage.fOutxDsrFlow = FALSE;
+ storage.fTXContinueOnXoff = TRUE;
+ storage.fDtrControl = DTR_CONTROL_ENABLE;
+ storage.fDsrSensitivity = FALSE;
+ storage.fOutX = FALSE;
+ storage.fInX = FALSE;
+ storage.fRtsControl = RTS_CONTROL_ENABLE;
+ switch (value_)
+ {
+ case none:
+ break;
+ case software:
+ storage.fOutX = TRUE;
+ storage.fInX = TRUE;
+ break;
+ case hardware:
+ storage.fOutxCtsFlow = TRUE;
+ storage.fRtsControl = RTS_CONTROL_HANDSHAKE;
+ break;
+ default:
+ break;
+ }
+#else
+ switch (value_)
+ {
+ case none:
+ storage.c_iflag &= ~(IXOFF | IXON);
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
+ storage.c_cflag &= ~CRTSCTS;
+# elif defined(__QNXNTO__)
+ storage.c_cflag &= ~(IHFLOW | OHFLOW);
+# endif
+ break;
+ case software:
+ storage.c_iflag |= IXOFF | IXON;
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
+ storage.c_cflag &= ~CRTSCTS;
+# elif defined(__QNXNTO__)
+ storage.c_cflag &= ~(IHFLOW | OHFLOW);
+# endif
+ break;
+ case hardware:
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
+ storage.c_iflag &= ~(IXOFF | IXON);
+ storage.c_cflag |= CRTSCTS;
+ break;
+# elif defined(__QNXNTO__)
+ storage.c_iflag &= ~(IXOFF | IXON);
+ storage.c_cflag |= (IHFLOW | OHFLOW);
+ break;
+# else
+ ec = boost::asio::error::operation_not_supported;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+# endif
+ default:
+ break;
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::flow_control::load(
+ const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ if (storage.fOutX && storage.fInX)
+ {
+ value_ = software;
+ }
+ else if (storage.fOutxCtsFlow && storage.fRtsControl == RTS_CONTROL_HANDSHAKE)
+ {
+ value_ = hardware;
+ }
+ else
+ {
+ value_ = none;
+ }
+#else
+ if (storage.c_iflag & (IXOFF | IXON))
+ {
+ value_ = software;
+ }
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
+ else if (storage.c_cflag & CRTSCTS)
+ {
+ value_ = hardware;
+ }
+# elif defined(__QNXNTO__)
+ else if (storage.c_cflag & IHFLOW && storage.c_cflag & OHFLOW)
+ {
+ value_ = hardware;
+ }
+# endif
+ else
+ {
+ value_ = none;
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+serial_port_base::parity::parity(serial_port_base::parity::type t)
+ : value_(t)
+{
+ if (t != none && t != odd && t != even)
+ {
+ std::out_of_range ex("invalid parity value");
+ boost::asio::detail::throw_exception(ex);
+ }
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::parity::store(
+ BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ switch (value_)
+ {
+ case none:
+ storage.fParity = FALSE;
+ storage.Parity = NOPARITY;
+ break;
+ case odd:
+ storage.fParity = TRUE;
+ storage.Parity = ODDPARITY;
+ break;
+ case even:
+ storage.fParity = TRUE;
+ storage.Parity = EVENPARITY;
+ break;
+ default:
+ break;
+ }
+#else
+ switch (value_)
+ {
+ case none:
+ storage.c_iflag |= IGNPAR;
+ storage.c_cflag &= ~(PARENB | PARODD);
+ break;
+ case even:
+ storage.c_iflag &= ~(IGNPAR | PARMRK);
+ storage.c_iflag |= INPCK;
+ storage.c_cflag |= PARENB;
+ storage.c_cflag &= ~PARODD;
+ break;
+ case odd:
+ storage.c_iflag &= ~(IGNPAR | PARMRK);
+ storage.c_iflag |= INPCK;
+ storage.c_cflag |= (PARENB | PARODD);
+ break;
+ default:
+ break;
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::parity::load(
+ const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ if (storage.Parity == EVENPARITY)
+ {
+ value_ = even;
+ }
+ else if (storage.Parity == ODDPARITY)
+ {
+ value_ = odd;
+ }
+ else
+ {
+ value_ = none;
+ }
+#else
+ if (storage.c_cflag & PARENB)
+ {
+ if (storage.c_cflag & PARODD)
+ {
+ value_ = odd;
+ }
+ else
+ {
+ value_ = even;
+ }
+ }
+ else
+ {
+ value_ = none;
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+serial_port_base::stop_bits::stop_bits(
+ serial_port_base::stop_bits::type t)
+ : value_(t)
+{
+ if (t != one && t != onepointfive && t != two)
+ {
+ std::out_of_range ex("invalid stop_bits value");
+ boost::asio::detail::throw_exception(ex);
+ }
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::stop_bits::store(
+ BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ switch (value_)
+ {
+ case one:
+ storage.StopBits = ONESTOPBIT;
+ break;
+ case onepointfive:
+ storage.StopBits = ONE5STOPBITS;
+ break;
+ case two:
+ storage.StopBits = TWOSTOPBITS;
+ break;
+ default:
+ break;
+ }
+#else
+ switch (value_)
+ {
+ case one:
+ storage.c_cflag &= ~CSTOPB;
+ break;
+ case two:
+ storage.c_cflag |= CSTOPB;
+ break;
+ default:
+ ec = boost::asio::error::operation_not_supported;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::stop_bits::load(
+ const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ if (storage.StopBits == ONESTOPBIT)
+ {
+ value_ = one;
+ }
+ else if (storage.StopBits == ONE5STOPBITS)
+ {
+ value_ = onepointfive;
+ }
+ else if (storage.StopBits == TWOSTOPBITS)
+ {
+ value_ = two;
+ }
+ else
+ {
+ value_ = one;
+ }
+#else
+ value_ = (storage.c_cflag & CSTOPB) ? two : one;
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+serial_port_base::character_size::character_size(unsigned int t)
+ : value_(t)
+{
+ if (t < 5 || t > 8)
+ {
+ std::out_of_range ex("invalid character_size value");
+ boost::asio::detail::throw_exception(ex);
+ }
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::character_size::store(
+ BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec) const
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ storage.ByteSize = value_;
+#else
+ storage.c_cflag &= ~CSIZE;
+ switch (value_)
+ {
+ case 5: storage.c_cflag |= CS5; break;
+ case 6: storage.c_cflag |= CS6; break;
+ case 7: storage.c_cflag |= CS7; break;
+ case 8: storage.c_cflag |= CS8; break;
+ default: break;
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID serial_port_base::character_size::load(
+ const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ value_ = storage.ByteSize;
+#else
+ if ((storage.c_cflag & CSIZE) == CS5) { value_ = 5; }
+ else if ((storage.c_cflag & CSIZE) == CS6) { value_ = 6; }
+ else if ((storage.c_cflag & CSIZE) == CS7) { value_ = 7; }
+ else if ((storage.c_cflag & CSIZE) == CS8) { value_ = 8; }
+ else
+ {
+ // Hmmm, use 8 for now.
+ value_ = 8;
+ }
+#endif
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#undef BOOST_ASIO_OPTION_STORAGE
+
+#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+#endif // BOOST_ASIO_IMPL_SERIAL_PORT_BASE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/spawn.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/spawn.hpp
new file mode 100644
index 00000000000..cf4ce5622f5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/spawn.hpp
@@ -0,0 +1,492 @@
+//
+// impl/spawn.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SPAWN_HPP
+#define BOOST_ASIO_IMPL_SPAWN_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/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/bind_executor.hpp>
+#include <boost/asio/detail/atomic_count.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/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/system/system_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+ template <typename Handler, typename T>
+ class coro_handler
+ {
+ public:
+ coro_handler(basic_yield_context<Handler> ctx)
+ : coro_(ctx.coro_.lock()),
+ ca_(ctx.ca_),
+ handler_(ctx.handler_),
+ ready_(0),
+ ec_(ctx.ec_),
+ value_(0)
+ {
+ }
+
+ void operator()(T value)
+ {
+ *ec_ = boost::system::error_code();
+ *value_ = BOOST_ASIO_MOVE_CAST(T)(value);
+ if (--*ready_ == 0)
+ (*coro_)();
+ }
+
+ void operator()(boost::system::error_code ec, T value)
+ {
+ *ec_ = ec;
+ *value_ = BOOST_ASIO_MOVE_CAST(T)(value);
+ if (--*ready_ == 0)
+ (*coro_)();
+ }
+
+ //private:
+ shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
+ typename basic_yield_context<Handler>::caller_type& ca_;
+ Handler handler_;
+ atomic_count* ready_;
+ boost::system::error_code* ec_;
+ T* value_;
+ };
+
+ template <typename Handler>
+ class coro_handler<Handler, void>
+ {
+ public:
+ coro_handler(basic_yield_context<Handler> ctx)
+ : coro_(ctx.coro_.lock()),
+ ca_(ctx.ca_),
+ handler_(ctx.handler_),
+ ready_(0),
+ ec_(ctx.ec_)
+ {
+ }
+
+ void operator()()
+ {
+ *ec_ = boost::system::error_code();
+ if (--*ready_ == 0)
+ (*coro_)();
+ }
+
+ void operator()(boost::system::error_code ec)
+ {
+ *ec_ = ec;
+ if (--*ready_ == 0)
+ (*coro_)();
+ }
+
+ //private:
+ shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
+ typename basic_yield_context<Handler>::caller_type& ca_;
+ Handler handler_;
+ atomic_count* ready_;
+ boost::system::error_code* ec_;
+ };
+
+ template <typename Handler, typename T>
+ inline void* asio_handler_allocate(std::size_t size,
+ coro_handler<Handler, T>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename Handler, typename T>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ coro_handler<Handler, T>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename Handler, typename T>
+ inline bool asio_handler_is_continuation(coro_handler<Handler, T>*)
+ {
+ return true;
+ }
+
+ template <typename Function, typename Handler, typename T>
+ inline void asio_handler_invoke(Function& function,
+ coro_handler<Handler, T>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename Handler, typename T>
+ inline void asio_handler_invoke(const Function& function,
+ coro_handler<Handler, T>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Handler, typename T>
+ class coro_async_result
+ {
+ public:
+ typedef coro_handler<Handler, T> completion_handler_type;
+ typedef T return_type;
+
+ explicit coro_async_result(completion_handler_type& h)
+ : handler_(h),
+ ca_(h.ca_),
+ ready_(2)
+ {
+ h.ready_ = &ready_;
+ out_ec_ = h.ec_;
+ if (!out_ec_) h.ec_ = &ec_;
+ h.value_ = &value_;
+ }
+
+ return_type get()
+ {
+ // Must not hold shared_ptr to coro while suspended.
+ handler_.coro_.reset();
+
+ if (--ready_ != 0)
+ ca_();
+ if (!out_ec_ && ec_) throw boost::system::system_error(ec_);
+ return BOOST_ASIO_MOVE_CAST(return_type)(value_);
+ }
+
+ private:
+ completion_handler_type& handler_;
+ typename basic_yield_context<Handler>::caller_type& ca_;
+ atomic_count ready_;
+ boost::system::error_code* out_ec_;
+ boost::system::error_code ec_;
+ return_type value_;
+ };
+
+ template <typename Handler>
+ class coro_async_result<Handler, void>
+ {
+ public:
+ typedef coro_handler<Handler, void> completion_handler_type;
+ typedef void return_type;
+
+ explicit coro_async_result(completion_handler_type& h)
+ : handler_(h),
+ ca_(h.ca_),
+ ready_(2)
+ {
+ h.ready_ = &ready_;
+ out_ec_ = h.ec_;
+ if (!out_ec_) h.ec_ = &ec_;
+ }
+
+ void get()
+ {
+ // Must not hold shared_ptr to coro while suspended.
+ handler_.coro_.reset();
+
+ if (--ready_ != 0)
+ ca_();
+ if (!out_ec_ && ec_) throw boost::system::system_error(ec_);
+ }
+
+ private:
+ completion_handler_type& handler_;
+ typename basic_yield_context<Handler>::caller_type& ca_;
+ atomic_count ready_;
+ boost::system::error_code* out_ec_;
+ boost::system::error_code ec_;
+ };
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Handler, typename ReturnType>
+class async_result<basic_yield_context<Handler>, ReturnType()>
+ : public detail::coro_async_result<Handler, void>
+{
+public:
+ explicit async_result(
+ typename detail::coro_async_result<Handler,
+ void>::completion_handler_type& h)
+ : detail::coro_async_result<Handler, void>(h)
+ {
+ }
+};
+
+template <typename Handler, typename ReturnType, typename Arg1>
+class async_result<basic_yield_context<Handler>, ReturnType(Arg1)>
+ : public detail::coro_async_result<Handler, typename decay<Arg1>::type>
+{
+public:
+ explicit async_result(
+ typename detail::coro_async_result<Handler,
+ typename decay<Arg1>::type>::completion_handler_type& h)
+ : detail::coro_async_result<Handler, typename decay<Arg1>::type>(h)
+ {
+ }
+};
+
+template <typename Handler, typename ReturnType>
+class async_result<basic_yield_context<Handler>,
+ ReturnType(boost::system::error_code)>
+ : public detail::coro_async_result<Handler, void>
+{
+public:
+ explicit async_result(
+ typename detail::coro_async_result<Handler,
+ void>::completion_handler_type& h)
+ : detail::coro_async_result<Handler, void>(h)
+ {
+ }
+};
+
+template <typename Handler, typename ReturnType, typename Arg2>
+class async_result<basic_yield_context<Handler>,
+ ReturnType(boost::system::error_code, Arg2)>
+ : public detail::coro_async_result<Handler, typename decay<Arg2>::type>
+{
+public:
+ explicit async_result(
+ typename detail::coro_async_result<Handler,
+ typename decay<Arg2>::type>::completion_handler_type& h)
+ : detail::coro_async_result<Handler, typename decay<Arg2>::type>(h)
+ {
+ }
+};
+
+template <typename Handler, typename T, typename Allocator>
+struct associated_allocator<detail::coro_handler<Handler, T>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(const detail::coro_handler<Handler, T>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Handler, typename T, typename Executor>
+struct associated_executor<detail::coro_handler<Handler, T>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(const detail::coro_handler<Handler, T>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+namespace detail {
+
+ template <typename Handler, typename Function>
+ struct spawn_data : private noncopyable
+ {
+ template <typename Hand, typename Func>
+ spawn_data(BOOST_ASIO_MOVE_ARG(Hand) handler,
+ bool call_handler, BOOST_ASIO_MOVE_ARG(Func) function)
+ : handler_(BOOST_ASIO_MOVE_CAST(Hand)(handler)),
+ call_handler_(call_handler),
+ function_(BOOST_ASIO_MOVE_CAST(Func)(function))
+ {
+ }
+
+ weak_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
+ Handler handler_;
+ bool call_handler_;
+ Function function_;
+ };
+
+ template <typename Handler, typename Function>
+ struct coro_entry_point
+ {
+ void operator()(typename basic_yield_context<Handler>::caller_type& ca)
+ {
+ shared_ptr<spawn_data<Handler, Function> > data(data_);
+#if !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
+ ca(); // Yield until coroutine pointer has been initialised.
+#endif // !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
+ const basic_yield_context<Handler> yield(
+ data->coro_, ca, data->handler_);
+
+ (data->function_)(yield);
+ if (data->call_handler_)
+ (data->handler_)();
+ }
+
+ shared_ptr<spawn_data<Handler, Function> > data_;
+ };
+
+ template <typename Handler, typename Function>
+ struct spawn_helper
+ {
+ void operator()()
+ {
+ typedef typename basic_yield_context<Handler>::callee_type callee_type;
+ coro_entry_point<Handler, Function> entry_point = { data_ };
+ shared_ptr<callee_type> coro(new callee_type(entry_point, attributes_));
+ data_->coro_ = coro;
+ (*coro)();
+ }
+
+ shared_ptr<spawn_data<Handler, Function> > data_;
+ boost::coroutines::attributes attributes_;
+ };
+
+ template <typename Function, typename Handler, typename Function1>
+ inline void asio_handler_invoke(Function& function,
+ spawn_helper<Handler, Function1>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->data_->handler_);
+ }
+
+ template <typename Function, typename Handler, typename Function1>
+ inline void asio_handler_invoke(const Function& function,
+ spawn_helper<Handler, Function1>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->data_->handler_);
+ }
+
+ inline void default_spawn_handler() {}
+
+} // namespace detail
+
+template <typename Function>
+inline void spawn(BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes)
+{
+ typedef typename decay<Function>::type function_type;
+
+ typename associated_executor<function_type>::type ex(
+ (get_associated_executor)(function));
+
+ boost::asio::spawn(ex, BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
+}
+
+template <typename Handler, typename Function>
+void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes,
+ typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
+ !is_convertible<Handler&, execution_context&>::value>::type*)
+{
+ typedef typename decay<Handler>::type handler_type;
+ typedef typename decay<Function>::type function_type;
+
+ typename associated_executor<handler_type>::type ex(
+ (get_associated_executor)(handler));
+
+ typename associated_allocator<handler_type>::type a(
+ (get_associated_allocator)(handler));
+
+ detail::spawn_helper<handler_type, function_type> helper;
+ helper.data_.reset(
+ new detail::spawn_data<handler_type, function_type>(
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), true,
+ BOOST_ASIO_MOVE_CAST(Function)(function)));
+ helper.attributes_ = attributes;
+
+ ex.dispatch(helper, a);
+}
+
+template <typename Handler, typename Function>
+void spawn(basic_yield_context<Handler> ctx,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes)
+{
+ typedef typename decay<Function>::type function_type;
+
+ Handler handler(ctx.handler_); // Explicit copy that might be moved from.
+
+ typename associated_executor<Handler>::type ex(
+ (get_associated_executor)(handler));
+
+ typename associated_allocator<Handler>::type a(
+ (get_associated_allocator)(handler));
+
+ detail::spawn_helper<Handler, function_type> helper;
+ helper.data_.reset(
+ new detail::spawn_data<Handler, function_type>(
+ BOOST_ASIO_MOVE_CAST(Handler)(handler), false,
+ BOOST_ASIO_MOVE_CAST(Function)(function)));
+ helper.attributes_ = attributes;
+
+ ex.dispatch(helper, a);
+}
+
+template <typename Function, typename Executor>
+inline void spawn(const Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes,
+ typename enable_if<is_executor<Executor>::value>::type*)
+{
+ boost::asio::spawn(boost::asio::strand<Executor>(ex),
+ BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
+}
+
+template <typename Function, typename Executor>
+inline void spawn(const strand<Executor>& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes)
+{
+ boost::asio::spawn(boost::asio::bind_executor(
+ ex, &detail::default_spawn_handler),
+ BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
+}
+
+template <typename Function>
+inline void spawn(const boost::asio::io_context::strand& s,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes)
+{
+ boost::asio::spawn(boost::asio::bind_executor(
+ s, &detail::default_spawn_handler),
+ BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
+}
+
+template <typename Function, typename ExecutionContext>
+inline void spawn(ExecutionContext& ctx,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type*)
+{
+ boost::asio::spawn(ctx.get_executor(),
+ BOOST_ASIO_MOVE_CAST(Function)(function), attributes);
+}
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_SPAWN_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/src.cpp b/src/third_party/boost-1.70.0/boost/asio/impl/src.cpp
new file mode 100644
index 00000000000..8f43dbf0ca0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/src.cpp
@@ -0,0 +1,25 @@
+//
+// impl/src.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+//
+
+#if defined(_MSC_VER) \
+ || defined(__BORLANDC__) \
+ || defined(__DMC__)
+# pragma message ( \
+ "This file is deprecated. " \
+ "Please #include <boost/asio/impl/src.hpp> instead.")
+#elif defined(__GNUC__) \
+ || defined(__HP_aCC) \
+ || defined(__SUNPRO_CC) \
+ || defined(__IBMCPP__)
+# warning "This file is deprecated."
+# warning "Please #include <boost/asio/impl/src.hpp> instead."
+#endif
+
+#include <boost/asio/impl/src.hpp>
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/src.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/src.hpp
new file mode 100644
index 00000000000..7f155ad25cb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/src.hpp
@@ -0,0 +1,81 @@
+//
+// impl/src.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SRC_HPP
+#define BOOST_ASIO_IMPL_SRC_HPP
+
+#define BOOST_ASIO_SOURCE
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
+#endif
+
+#include <boost/asio/impl/error.ipp>
+#include <boost/asio/impl/execution_context.ipp>
+#include <boost/asio/impl/executor.ipp>
+#include <boost/asio/impl/handler_alloc_hook.ipp>
+#include <boost/asio/impl/io_context.ipp>
+#include <boost/asio/impl/serial_port_base.ipp>
+#include <boost/asio/impl/system_context.ipp>
+#include <boost/asio/impl/thread_pool.ipp>
+#include <boost/asio/detail/impl/buffer_sequence_adapter.ipp>
+#include <boost/asio/detail/impl/descriptor_ops.ipp>
+#include <boost/asio/detail/impl/dev_poll_reactor.ipp>
+#include <boost/asio/detail/impl/epoll_reactor.ipp>
+#include <boost/asio/detail/impl/eventfd_select_interrupter.ipp>
+#include <boost/asio/detail/impl/handler_tracking.ipp>
+#include <boost/asio/detail/impl/kqueue_reactor.ipp>
+#include <boost/asio/detail/impl/null_event.ipp>
+#include <boost/asio/detail/impl/pipe_select_interrupter.ipp>
+#include <boost/asio/detail/impl/posix_event.ipp>
+#include <boost/asio/detail/impl/posix_mutex.ipp>
+#include <boost/asio/detail/impl/posix_thread.ipp>
+#include <boost/asio/detail/impl/posix_tss_ptr.ipp>
+#include <boost/asio/detail/impl/reactive_descriptor_service.ipp>
+#include <boost/asio/detail/impl/reactive_serial_port_service.ipp>
+#include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
+#include <boost/asio/detail/impl/resolver_service_base.ipp>
+#include <boost/asio/detail/impl/scheduler.ipp>
+#include <boost/asio/detail/impl/select_reactor.ipp>
+#include <boost/asio/detail/impl/service_registry.ipp>
+#include <boost/asio/detail/impl/signal_set_service.ipp>
+#include <boost/asio/detail/impl/socket_ops.ipp>
+#include <boost/asio/detail/impl/socket_select_interrupter.ipp>
+#include <boost/asio/detail/impl/strand_executor_service.ipp>
+#include <boost/asio/detail/impl/strand_service.ipp>
+#include <boost/asio/detail/impl/throw_error.ipp>
+#include <boost/asio/detail/impl/timer_queue_ptime.ipp>
+#include <boost/asio/detail/impl/timer_queue_set.ipp>
+#include <boost/asio/detail/impl/win_iocp_handle_service.ipp>
+#include <boost/asio/detail/impl/win_iocp_io_context.ipp>
+#include <boost/asio/detail/impl/win_iocp_serial_port_service.ipp>
+#include <boost/asio/detail/impl/win_iocp_socket_service_base.ipp>
+#include <boost/asio/detail/impl/win_event.ipp>
+#include <boost/asio/detail/impl/win_mutex.ipp>
+#include <boost/asio/detail/impl/win_object_handle_service.ipp>
+#include <boost/asio/detail/impl/win_static_mutex.ipp>
+#include <boost/asio/detail/impl/win_thread.ipp>
+#include <boost/asio/detail/impl/win_tss_ptr.ipp>
+#include <boost/asio/detail/impl/winrt_ssocket_service_base.ipp>
+#include <boost/asio/detail/impl/winrt_timer_scheduler.ipp>
+#include <boost/asio/detail/impl/winsock_init.ipp>
+#include <boost/asio/generic/detail/impl/endpoint.ipp>
+#include <boost/asio/ip/impl/address.ipp>
+#include <boost/asio/ip/impl/address_v4.ipp>
+#include <boost/asio/ip/impl/address_v6.ipp>
+#include <boost/asio/ip/impl/host_name.ipp>
+#include <boost/asio/ip/impl/network_v4.ipp>
+#include <boost/asio/ip/impl/network_v6.ipp>
+#include <boost/asio/ip/detail/impl/endpoint.ipp>
+#include <boost/asio/local/detail/impl/endpoint.ipp>
+
+#endif // BOOST_ASIO_IMPL_SRC_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/system_context.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/system_context.hpp
new file mode 100644
index 00000000000..2a6b61f312d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/system_context.hpp
@@ -0,0 +1,36 @@
+//
+// impl/system_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SYSTEM_CONTEXT_HPP
+#define BOOST_ASIO_IMPL_SYSTEM_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/system_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+inline system_context::executor_type
+system_context::get_executor() BOOST_ASIO_NOEXCEPT
+{
+ return system_executor();
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_SYSTEM_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/system_context.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/system_context.ipp
new file mode 100644
index 00000000000..0ec6fad171c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/system_context.ipp
@@ -0,0 +1,82 @@
+//
+// impl/system_context.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SYSTEM_CONTEXT_IPP
+#define BOOST_ASIO_IMPL_SYSTEM_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 <boost/asio/system_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+struct system_context::thread_function
+{
+ detail::scheduler* scheduler_;
+
+ void operator()()
+ {
+ boost::system::error_code ec;
+ scheduler_->run(ec);
+ }
+};
+
+system_context::system_context()
+ : scheduler_(add_scheduler(new detail::scheduler(*this, 0, false)))
+{
+ scheduler_.work_started();
+
+ thread_function f = { &scheduler_ };
+ std::size_t num_threads = detail::thread::hardware_concurrency() * 2;
+ threads_.create_threads(f, num_threads ? num_threads : 2);
+}
+
+system_context::~system_context()
+{
+ scheduler_.work_finished();
+ scheduler_.stop();
+ threads_.join();
+}
+
+void system_context::stop()
+{
+ scheduler_.stop();
+}
+
+bool system_context::stopped() const BOOST_ASIO_NOEXCEPT
+{
+ return scheduler_.stopped();
+}
+
+void system_context::join()
+{
+ scheduler_.work_finished();
+ threads_.join();
+}
+
+detail::scheduler& system_context::add_scheduler(detail::scheduler* s)
+{
+ detail::scoped_ptr<detail::scheduler> scoped_impl(s);
+ boost::asio::add_service<detail::scheduler>(*this, scoped_impl.get());
+ return *scoped_impl.release();
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_SYSTEM_CONTEXT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/system_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/system_executor.hpp
new file mode 100644
index 00000000000..25c51a65600
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/system_executor.hpp
@@ -0,0 +1,87 @@
+//
+// impl/system_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SYSTEM_EXECUTOR_HPP
+#define BOOST_ASIO_IMPL_SYSTEM_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/executor_op.hpp>
+#include <boost/asio/detail/global.hpp>
+#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/system_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+inline system_context& system_executor::context() const BOOST_ASIO_NOEXCEPT
+{
+ return detail::global<system_context>();
+}
+
+template <typename Function, typename Allocator>
+void system_executor::dispatch(
+ BOOST_ASIO_MOVE_ARG(Function) f, const Allocator&) const
+{
+ typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
+ boost_asio_handler_invoke_helpers::invoke(tmp, tmp);
+}
+
+template <typename Function, typename Allocator>
+void system_executor::post(
+ BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+{
+ typedef typename decay<Function>::type function_type;
+
+ system_context& ctx = detail::global<system_context>();
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<function_type, Allocator> 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((ctx, *p.p,
+ "system_executor", &this->context(), 0, "post"));
+
+ ctx.scheduler_.post_immediate_completion(p.p, false);
+ p.v = p.p = 0;
+}
+
+template <typename Function, typename Allocator>
+void system_executor::defer(
+ BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+{
+ typedef typename decay<Function>::type function_type;
+
+ system_context& ctx = detail::global<system_context>();
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<function_type, Allocator> 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((ctx, *p.p,
+ "system_executor", &this->context(), 0, "defer"));
+
+ ctx.scheduler_.post_immediate_completion(p.p, true);
+ p.v = p.p = 0;
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_SYSTEM_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.hpp
new file mode 100644
index 00000000000..31d8b37ee0f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.hpp
@@ -0,0 +1,129 @@
+//
+// impl/thread_pool.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_POOL_HPP
+#define BOOST_ASIO_IMPL_THREAD_POOL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/executor_op.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+inline thread_pool::executor_type
+thread_pool::get_executor() BOOST_ASIO_NOEXCEPT
+{
+ return executor_type(*this);
+}
+
+inline thread_pool&
+thread_pool::executor_type::context() const BOOST_ASIO_NOEXCEPT
+{
+ return pool_;
+}
+
+inline void
+thread_pool::executor_type::on_work_started() const BOOST_ASIO_NOEXCEPT
+{
+ pool_.scheduler_.work_started();
+}
+
+inline void thread_pool::executor_type::on_work_finished()
+const BOOST_ASIO_NOEXCEPT
+{
+ pool_.scheduler_.work_finished();
+}
+
+template <typename Function, typename Allocator>
+void thread_pool::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 (pool_.scheduler_.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> 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((pool_, *p.p,
+ "thread_pool", &this->context(), 0, "dispatch"));
+
+ pool_.scheduler_.post_immediate_completion(p.p, false);
+ p.v = p.p = 0;
+}
+
+template <typename Function, typename Allocator>
+void thread_pool::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> 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((pool_, *p.p,
+ "thread_pool", &this->context(), 0, "post"));
+
+ pool_.scheduler_.post_immediate_completion(p.p, false);
+ p.v = p.p = 0;
+}
+
+template <typename Function, typename Allocator>
+void thread_pool::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> 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((pool_, *p.p,
+ "thread_pool", &this->context(), 0, "defer"));
+
+ pool_.scheduler_.post_immediate_completion(p.p, true);
+ p.v = p.p = 0;
+}
+
+inline bool
+thread_pool::executor_type::running_in_this_thread() const BOOST_ASIO_NOEXCEPT
+{
+ return pool_.scheduler_.can_dispatch();
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_THREAD_POOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.ipp b/src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.ipp
new file mode 100644
index 00000000000..d59b6ef15f1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/thread_pool.ipp
@@ -0,0 +1,89 @@
+//
+// impl/thread_pool.ipp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THREAD_POOL_IPP
+#define BOOST_ASIO_IMPL_THREAD_POOL_IPP
+
+#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/thread_pool.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+struct thread_pool::thread_function
+{
+ detail::scheduler* scheduler_;
+
+ void operator()()
+ {
+ boost::system::error_code ec;
+ scheduler_->run(ec);
+ }
+};
+
+thread_pool::thread_pool()
+ : scheduler_(add_scheduler(new detail::scheduler(*this, 0, false)))
+{
+ scheduler_.work_started();
+
+ thread_function f = { &scheduler_ };
+ std::size_t num_threads = detail::thread::hardware_concurrency() * 2;
+ threads_.create_threads(f, num_threads ? num_threads : 2);
+}
+
+thread_pool::thread_pool(std::size_t num_threads)
+ : scheduler_(add_scheduler(new detail::scheduler(
+ *this, num_threads == 1 ? 1 : 0, false)))
+{
+ scheduler_.work_started();
+
+ thread_function f = { &scheduler_ };
+ threads_.create_threads(f, num_threads);
+}
+
+thread_pool::~thread_pool()
+{
+ stop();
+ join();
+}
+
+void thread_pool::stop()
+{
+ scheduler_.stop();
+}
+
+void thread_pool::join()
+{
+ if (!threads_.empty())
+ {
+ scheduler_.work_finished();
+ threads_.join();
+ }
+}
+
+detail::scheduler& thread_pool::add_scheduler(detail::scheduler* s)
+{
+ detail::scoped_ptr<detail::scheduler> scoped_impl(s);
+ boost::asio::add_service<detail::scheduler>(*this, scoped_impl.get());
+ return *scoped_impl.release();
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_THREAD_POOL_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/use_awaitable.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/use_awaitable.hpp
new file mode 100644
index 00000000000..0d7ad0a42bd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/use_awaitable.hpp
@@ -0,0 +1,278 @@
+//
+// impl/use_awaitable.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_AWAITABLE_HPP
+#define BOOST_ASIO_IMPL_USE_AWAITABLE_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Executor, typename T>
+class awaitable_handler_base
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef void result_type;
+ typedef awaitable<T, Executor> awaitable_type;
+
+ // Construct from the entry point of a new thread of execution.
+ awaitable_handler_base(awaitable<void, Executor> a, const Executor& ex)
+ : awaitable_thread<Executor>(std::move(a), ex)
+ {
+ }
+
+ // Transfer ownership from another awaitable_thread.
+ explicit awaitable_handler_base(awaitable_thread<Executor>* h)
+ : awaitable_thread<Executor>(std::move(*h))
+ {
+ }
+
+protected:
+ awaitable_frame<T, Executor>* frame() noexcept
+ {
+ return static_cast<awaitable_frame<T, Executor>*>(this->top_of_stack_);
+ }
+};
+
+template <typename, typename...>
+class awaitable_handler;
+
+template <typename Executor>
+class awaitable_handler<Executor, void>
+ : public awaitable_handler_base<Executor, void>
+{
+public:
+ using awaitable_handler_base<Executor, void>::awaitable_handler_base;
+
+ void operator()()
+ {
+ this->frame()->attach_thread(this);
+ this->frame()->return_void();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor>
+class awaitable_handler<Executor, boost::system::error_code>
+ : public awaitable_handler_base<Executor, void>
+{
+public:
+ using awaitable_handler_base<Executor, void>::awaitable_handler_base;
+
+ void operator()(const boost::system::error_code& ec)
+ {
+ this->frame()->attach_thread(this);
+ if (ec)
+ this->frame()->set_error(ec);
+ else
+ this->frame()->return_void();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor>
+class awaitable_handler<Executor, std::exception_ptr>
+ : public awaitable_handler_base<Executor, void>
+{
+public:
+ using awaitable_handler_base<Executor, void>::awaitable_handler_base;
+
+ void operator()(std::exception_ptr ex)
+ {
+ this->frame()->attach_thread(this);
+ if (ex)
+ this->frame()->set_except(ex);
+ else
+ this->frame()->return_void();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename T>
+class awaitable_handler<Executor, T>
+ : public awaitable_handler_base<Executor, T>
+{
+public:
+ using awaitable_handler_base<Executor, T>::awaitable_handler_base;
+
+ template <typename Arg>
+ void operator()(Arg&& arg)
+ {
+ this->frame()->attach_thread(this);
+ this->frame()->return_value(std::forward<Arg>(arg));
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename T>
+class awaitable_handler<Executor, boost::system::error_code, T>
+ : public awaitable_handler_base<Executor, T>
+{
+public:
+ using awaitable_handler_base<Executor, T>::awaitable_handler_base;
+
+ template <typename Arg>
+ void operator()(const boost::system::error_code& ec, Arg&& arg)
+ {
+ this->frame()->attach_thread(this);
+ if (ec)
+ this->frame()->set_error(ec);
+ else
+ this->frame()->return_value(std::forward<Arg>(arg));
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename T>
+class awaitable_handler<Executor, std::exception_ptr, T>
+ : public awaitable_handler_base<Executor, T>
+{
+public:
+ using awaitable_handler_base<Executor, T>::awaitable_handler_base;
+
+ template <typename Arg>
+ void operator()(std::exception_ptr ex, Arg&& arg)
+ {
+ this->frame()->attach_thread(this);
+ if (ex)
+ this->frame()->set_except(ex);
+ else
+ this->frame()->return_value(std::forward<Arg>(arg));
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename... Ts>
+class awaitable_handler
+ : public awaitable_handler_base<Executor, std::tuple<Ts...>>
+{
+public:
+ using awaitable_handler_base<Executor,
+ std::tuple<Ts...>>::awaitable_handler_base;
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ this->frame()->attach_thread(this);
+ this->frame()->return_values(std::forward<Args>(args)...);
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename... Ts>
+class awaitable_handler<Executor, boost::system::error_code, Ts...>
+ : public awaitable_handler_base<Executor, std::tuple<Ts...>>
+{
+public:
+ using awaitable_handler_base<Executor,
+ std::tuple<Ts...>>::awaitable_handler_base;
+
+ template <typename... Args>
+ void operator()(const boost::system::error_code& ec, Args&&... args)
+ {
+ this->frame()->attach_thread(this);
+ if (ec)
+ this->frame()->set_error(ec);
+ else
+ this->frame()->return_values(std::forward<Args>(args)...);
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename... Ts>
+class awaitable_handler<Executor, std::exception_ptr, Ts...>
+ : public awaitable_handler_base<Executor, std::tuple<Ts...>>
+{
+public:
+ using awaitable_handler_base<Executor,
+ std::tuple<Ts...>>::awaitable_handler_base;
+
+ template <typename... Args>
+ void operator()(std::exception_ptr ex, Args&&... args)
+ {
+ this->frame()->attach_thread(this);
+ if (ex)
+ this->frame()->set_except(ex);
+ else
+ this->frame()->return_values(std::forward<Args>(args)...);
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Executor, typename R, typename... Args>
+class async_result<use_awaitable_t<Executor>, R(Args...)>
+{
+public:
+ typedef typename detail::awaitable_handler<
+ Executor, typename decay<Args>::type...> handler_type;
+ typedef typename handler_type::awaitable_type return_type;
+
+#if defined(_MSC_VER)
+ template <typename T>
+ static T dummy_return()
+ {
+ return std::move(*static_cast<T*>(nullptr));
+ }
+
+ template <>
+ static void dummy_return()
+ {
+ }
+#endif // defined(_MSC_VER)
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation initiation,
+ use_awaitable_t<Executor>, InitArgs... args)
+ {
+ co_await [&](auto* frame)
+ {
+ handler_type handler(frame->detach_thread());
+ std::move(initiation)(std::move(handler), std::move(args)...);
+ return static_cast<handler_type*>(nullptr);
+ };
+
+ for (;;) {} // Never reached.
+#if defined(_MSC_VER)
+ co_return dummy_return<typename return_type::value_type>();
+#endif // defined(_MSC_VER)
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_USE_AWAITABLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/use_future.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/use_future.hpp
new file mode 100644
index 00000000000..83fb74aecba
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/use_future.hpp
@@ -0,0 +1,889 @@
+//
+// impl/use_future.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+
+#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.70.0/boost/asio/impl/write.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/write.hpp
new file mode 100644
index 00000000000..96243591ecb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/write.hpp
@@ -0,0 +1,980 @@
+//
+// impl/write.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WRITE_HPP
+#define BOOST_ASIO_IMPL_WRITE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/detail/array_fwd.hpp>
+#include <boost/asio/detail/base_from_completion_cond.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/consuming_buffers.hpp>
+#include <boost/asio/detail/dependent_type.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/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ template <typename SyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition>
+ std::size_t write_buffer_sequence(SyncWriteStream& s,
+ const ConstBufferSequence& buffers, const ConstBufferIterator&,
+ CompletionCondition completion_condition, boost::system::error_code& ec)
+ {
+ ec = boost::system::error_code();
+ boost::asio::detail::consuming_buffers<const_buffer,
+ ConstBufferSequence, ConstBufferIterator> tmp(buffers);
+ while (!tmp.empty())
+ {
+ if (std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, tmp.total_consumed())))
+ tmp.consume(s.write_some(tmp.prepare(max_size), ec));
+ else
+ break;
+ }
+ return tmp.total_consumed();;
+ }
+} // namespace detail
+
+template <typename SyncWriteStream, typename ConstBufferSequence,
+ typename CompletionCondition>
+inline 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*)
+{
+ return detail::write_buffer_sequence(s, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+}
+
+template <typename SyncWriteStream, typename ConstBufferSequence>
+inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename ConstBufferSequence>
+inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type*)
+{
+ return write(s, buffers, transfer_all(), ec);
+}
+
+template <typename SyncWriteStream, typename ConstBufferSequence,
+ typename CompletionCondition>
+inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write(s, buffers,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ typename decay<DynamicBuffer_v1>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+
+ std::size_t bytes_transferred = write(s, b.data(),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ b.consume(bytes_transferred);
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v1>
+inline std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v1>
+inline std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ transfer_all(), ec);
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition>
+inline std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename SyncWriteStream, typename Allocator,
+ typename CompletionCondition>
+inline std::size_t write(SyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec)
+{
+ return write(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+}
+
+template <typename SyncWriteStream, typename Allocator>
+inline std::size_t write(SyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b)
+{
+ return write(s, basic_streambuf_ref<Allocator>(b));
+}
+
+template <typename SyncWriteStream, typename Allocator>
+inline std::size_t write(SyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec)
+{
+ return write(s, basic_streambuf_ref<Allocator>(b), ec);
+}
+
+template <typename SyncWriteStream, typename Allocator,
+ typename CompletionCondition>
+inline std::size_t write(SyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition)
+{
+ return write(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ std::size_t bytes_transferred = write(s, buffers.data(0, buffers.size()),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ buffers.consume(bytes_transferred);
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2>
+inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2>
+inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ transfer_all(), ec);
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+namespace detail
+{
+ template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler>
+ class write_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ write_op(AsyncWriteStream& stream, const ConstBufferSequence& buffers,
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ stream_(stream),
+ buffers_(buffers),
+ start_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ write_op(const write_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ handler_(other.handler_)
+ {
+ }
+
+ write_op(write_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ start_(other.start_),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ std::size_t max_size;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ do
+ {
+ stream_.async_write_some(buffers_.prepare(max_size),
+ BOOST_ASIO_MOVE_CAST(write_op)(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ if ((!ec && bytes_transferred == 0) || buffers_.empty())
+ break;
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ } while (max_size > 0);
+
+ handler_(ec, buffers_.total_consumed());
+ }
+ }
+
+ //private:
+ typedef boost::asio::detail::consuming_buffers<const_buffer,
+ ConstBufferSequence, ConstBufferIterator> buffers_type;
+
+ AsyncWriteStream& stream_;
+ buffers_type buffers_;
+ int start_;
+ WriteHandler handler_;
+ };
+
+ template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncWriteStream,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncWriteStream,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler>
+ inline void start_write_buffer_sequence_op(AsyncWriteStream& stream,
+ const ConstBufferSequence& buffers, const ConstBufferIterator&,
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ {
+ detail::write_op<AsyncWriteStream, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>(
+ stream, buffers, completion_condition, handler)(
+ boost::system::error_code(), 0, 1);
+ }
+
+ struct initiate_async_write_buffer_sequence
+ {
+ template <typename WriteHandler, typename AsyncWriteStream,
+ typename ConstBufferSequence, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ AsyncWriteStream* s, const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_write_buffer_sequence_op(*s, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler, typename Allocator>
+struct associated_allocator<
+ detail::write_op<AsyncWriteStream, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator>::type type;
+
+ static type get(
+ const detail::write_op<AsyncWriteStream, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler, typename Executor>
+struct associated_executor<
+ detail::write_op<AsyncWriteStream, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>,
+ Executor>
+{
+ typedef typename associated_executor<WriteHandler, Executor>::type type;
+
+ static type get(
+ const detail::write_op<AsyncWriteStream, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename CompletionCondition, typename WriteHandler>
+inline 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*)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_buffer_sequence(), handler, &s, buffers,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename WriteHandler>
+inline 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*)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_buffer_sequence(),
+ handler, &s, buffers, transfer_all());
+}
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler>
+ class write_dynbuf_v1_op
+ {
+ public:
+ template <typename BufferSequence>
+ write_dynbuf_v1_op(AsyncWriteStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ completion_condition_(
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ write_dynbuf_v1_op(const write_dynbuf_v1_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ completion_condition_(other.completion_condition_),
+ handler_(other.handler_)
+ {
+ }
+
+ write_dynbuf_v1_op(write_dynbuf_v1_op&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ completion_condition_(
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(
+ other.completion_condition_)),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ switch (start)
+ {
+ case 1:
+ async_write(stream_, buffers_.data(),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition_),
+ BOOST_ASIO_MOVE_CAST(write_dynbuf_v1_op)(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ handler_(ec, static_cast<const std::size_t&>(bytes_transferred));
+ }
+ }
+
+ //private:
+ AsyncWriteStream& stream_;
+ DynamicBuffer_v1 buffers_;
+ CompletionCondition completion_condition_;
+ WriteHandler handler_;
+ };
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_write_dynbuf_v1
+ {
+ template <typename WriteHandler, typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ AsyncWriteStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ write_dynbuf_v1_op<AsyncWriteStream,
+ typename decay<DynamicBuffer_v1>::type,
+ CompletionCondition, typename decay<WriteHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ completion_cond2.value, handler2.value)(
+ boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler, typename Allocator>
+struct associated_allocator<
+ detail::write_dynbuf_v1_op<AsyncWriteStream,
+ DynamicBuffer_v1, CompletionCondition, WriteHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator>::type type;
+
+ static type get(
+ const detail::write_dynbuf_v1_op<AsyncWriteStream,
+ DynamicBuffer_v1, CompletionCondition, WriteHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler, typename Executor>
+struct associated_executor<
+ detail::write_dynbuf_v1_op<AsyncWriteStream,
+ DynamicBuffer_v1, CompletionCondition, WriteHandler>,
+ Executor>
+{
+ typedef typename associated_executor<WriteHandler, Executor>::type type;
+
+ static type get(
+ const detail::write_dynbuf_v1_op<AsyncWriteStream,
+ DynamicBuffer_v1, CompletionCondition, WriteHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_write(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ transfer_all(), BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+}
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type*)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1(), handler, &s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+{
+ return async_write(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+}
+
+template <typename AsyncWriteStream, typename Allocator,
+ typename CompletionCondition, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+{
+ return async_write(s, basic_streambuf_ref<Allocator>(b),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition),
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+ class write_dynbuf_v2_op
+ {
+ public:
+ template <typename BufferSequence>
+ write_dynbuf_v2_op(AsyncWriteStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ completion_condition_(
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ write_dynbuf_v2_op(const write_dynbuf_v2_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ completion_condition_(other.completion_condition_),
+ handler_(other.handler_)
+ {
+ }
+
+ write_dynbuf_v2_op(write_dynbuf_v2_op&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ completion_condition_(
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(
+ other.completion_condition_)),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ switch (start)
+ {
+ case 1:
+ async_write(stream_, buffers_.data(0, buffers_.size()),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition_),
+ BOOST_ASIO_MOVE_CAST(write_dynbuf_v2_op)(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ handler_(ec, static_cast<const std::size_t&>(bytes_transferred));
+ }
+ }
+
+ //private:
+ AsyncWriteStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ CompletionCondition completion_condition_;
+ WriteHandler handler_;
+ };
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_write_dynbuf_v2
+ {
+ template <typename WriteHandler, typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ AsyncWriteStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ write_dynbuf_v2_op<AsyncWriteStream,
+ typename decay<DynamicBuffer_v2>::type,
+ CompletionCondition, typename decay<WriteHandler>::type>(
+ *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ completion_cond2.value, handler2.value)(
+ boost::system::error_code(), 0, 1);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler, typename Allocator>
+struct associated_allocator<
+ detail::write_dynbuf_v2_op<AsyncWriteStream,
+ DynamicBuffer_v2, CompletionCondition, WriteHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator>::type type;
+
+ static type get(
+ const detail::write_dynbuf_v2_op<AsyncWriteStream,
+ DynamicBuffer_v2, CompletionCondition, WriteHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler, typename Executor>
+struct associated_executor<
+ detail::write_dynbuf_v2_op<AsyncWriteStream,
+ DynamicBuffer_v2, CompletionCondition, WriteHandler>,
+ Executor>
+{
+ typedef typename associated_executor<WriteHandler, Executor>::type type;
+
+ static type get(
+ const detail::write_dynbuf_v2_op<AsyncWriteStream,
+ DynamicBuffer_v2, CompletionCondition, WriteHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_write(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ transfer_all(), BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
+}
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type*)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v2(), handler, &s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_WRITE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/impl/write_at.hpp b/src/third_party/boost-1.70.0/boost/asio/impl/write_at.hpp
new file mode 100644
index 00000000000..3cad9c5b50d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/impl/write_at.hpp
@@ -0,0 +1,580 @@
+//
+// impl/write_at.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WRITE_AT_HPP
+#define BOOST_ASIO_IMPL_WRITE_AT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/detail/array_fwd.hpp>
+#include <boost/asio/detail/base_from_completion_cond.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/consuming_buffers.hpp>
+#include <boost/asio/detail/dependent_type.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/non_const_lvalue.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition>
+ std::size_t write_at_buffer_sequence(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ const ConstBufferIterator&, CompletionCondition completion_condition,
+ boost::system::error_code& ec)
+ {
+ ec = boost::system::error_code();
+ boost::asio::detail::consuming_buffers<const_buffer,
+ ConstBufferSequence, ConstBufferIterator> tmp(buffers);
+ while (!tmp.empty())
+ {
+ if (std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, tmp.total_consumed())))
+ {
+ tmp.consume(d.write_some_at(offset + tmp.total_consumed(),
+ tmp.prepare(max_size), ec));
+ }
+ else
+ break;
+ }
+ return tmp.total_consumed();;
+ }
+} // namespace detail
+
+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)
+{
+ return detail::write_at_buffer_sequence(d, offset, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+}
+
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
+inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write_at(
+ d, offset, buffers, transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "write_at");
+ return bytes_transferred;
+}
+
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
+inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ boost::system::error_code& ec)
+{
+ return write_at(d, offset, buffers, transfer_all(), ec);
+}
+
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename CompletionCondition>
+inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write_at(d, offset, buffers,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "write_at");
+ return bytes_transferred;
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename SyncRandomAccessWriteDevice, typename Allocator,
+ typename CompletionCondition>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec)
+{
+ std::size_t bytes_transferred = write_at(d, offset, b.data(),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ b.consume(bytes_transferred);
+ return bytes_transferred;
+}
+
+template <typename SyncRandomAccessWriteDevice, typename Allocator>
+inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write_at(d, offset, b, transfer_all(), ec);
+ boost::asio::detail::throw_error(ec, "write_at");
+ return bytes_transferred;
+}
+
+template <typename SyncRandomAccessWriteDevice, typename Allocator>
+inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec)
+{
+ return write_at(d, offset, b, transfer_all(), ec);
+}
+
+template <typename SyncRandomAccessWriteDevice, typename Allocator,
+ typename CompletionCondition>
+inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = write_at(d, offset, b,
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ boost::asio::detail::throw_error(ec, "write_at");
+ return bytes_transferred;
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+namespace detail
+{
+ template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ class write_at_op
+ : detail::base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ write_at_op(AsyncRandomAccessWriteDevice& device,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : detail::base_from_completion_cond<
+ CompletionCondition>(completion_condition),
+ device_(device),
+ offset_(offset),
+ buffers_(buffers),
+ start_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ write_at_op(const write_at_op& other)
+ : detail::base_from_completion_cond<CompletionCondition>(other),
+ device_(other.device_),
+ offset_(other.offset_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ handler_(other.handler_)
+ {
+ }
+
+ write_at_op(write_at_op&& other)
+ : detail::base_from_completion_cond<CompletionCondition>(
+ BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond<
+ CompletionCondition>)(other)),
+ device_(other.device_),
+ offset_(other.offset_),
+ buffers_(BOOST_ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ start_(other.start_),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ std::size_t max_size;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ do
+ {
+ device_.async_write_some_at(
+ offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
+ BOOST_ASIO_MOVE_CAST(write_at_op)(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ if ((!ec && bytes_transferred == 0) || buffers_.empty())
+ break;
+ max_size = this->check_for_completion(ec, buffers_.total_consumed());
+ } while (max_size > 0);
+
+ handler_(ec, buffers_.total_consumed());
+ }
+ }
+
+ //private:
+ typedef boost::asio::detail::consuming_buffers<const_buffer,
+ ConstBufferSequence, ConstBufferIterator> buffers_type;
+
+ AsyncRandomAccessWriteDevice& device_;
+ uint64_t offset_;
+ buffers_type buffers_;
+ int start_;
+ WriteHandler handler_;
+ };
+
+ template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler>
+ inline void start_write_at_buffer_sequence_op(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ const ConstBufferIterator&, CompletionCondition& completion_condition,
+ WriteHandler& handler)
+ {
+ detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>(
+ d, offset, buffers, completion_condition, handler)(
+ boost::system::error_code(), 0, 1);
+ }
+
+ struct initiate_async_write_at_buffer_sequence
+ {
+ template <typename WriteHandler, typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ AsyncRandomAccessWriteDevice* d, uint64_t offset,
+ const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ {
+ // 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;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_write_at_buffer_sequence_op(*d, offset, buffers,
+ boost::asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler, typename Allocator>
+struct associated_allocator<
+ detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator>::type type;
+
+ static type get(
+ const detail::write_at_op<AsyncRandomAccessWriteDevice,
+ ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename ConstBufferIterator,
+ typename CompletionCondition, typename WriteHandler, typename Executor>
+struct associated_executor<
+ detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>,
+ Executor>
+{
+ typedef typename associated_executor<WriteHandler, Executor>::type type;
+
+ static type get(
+ const detail::write_at_op<AsyncRandomAccessWriteDevice,
+ ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename CompletionCondition, typename WriteHandler>
+inline 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)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at_buffer_sequence(), handler, &d, offset,
+ buffers, BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename WriteHandler>
+inline 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)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at_buffer_sequence(),
+ handler, &d, offset, buffers, transfer_all());
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+namespace detail
+{
+ template <typename Allocator, typename WriteHandler>
+ class write_at_streambuf_op
+ {
+ public:
+ write_at_streambuf_op(
+ boost::asio::basic_streambuf<Allocator>& streambuf,
+ WriteHandler& handler)
+ : streambuf_(streambuf),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ write_at_streambuf_op(const write_at_streambuf_op& other)
+ : streambuf_(other.streambuf_),
+ handler_(other.handler_)
+ {
+ }
+
+ write_at_streambuf_op(write_at_streambuf_op&& other)
+ : streambuf_(other.streambuf_),
+ handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ const std::size_t bytes_transferred)
+ {
+ streambuf_.consume(bytes_transferred);
+ handler_(ec, bytes_transferred);
+ }
+
+ //private:
+ boost::asio::basic_streambuf<Allocator>& streambuf_;
+ WriteHandler handler_;
+ };
+
+ template <typename Allocator, typename WriteHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename Allocator, typename WriteHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename Allocator, typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
+ {
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename Allocator, typename WriteHandler>
+ inline void asio_handler_invoke(Function& function,
+ write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename Allocator, typename WriteHandler>
+ inline void asio_handler_invoke(const Function& function,
+ write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ struct initiate_async_write_at_streambuf
+ {
+ template <typename WriteHandler, typename AsyncRandomAccessWriteDevice,
+ typename Allocator, typename CompletionCondition>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ AsyncRandomAccessWriteDevice* d, uint64_t offset,
+ basic_streambuf<Allocator>* b,
+ BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_condition) const
+ {
+ // 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;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ async_write_at(*d, offset, b->data(),
+ BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition),
+ write_at_streambuf_op<Allocator, typename decay<WriteHandler>::type>(
+ *b, handler2.value));
+ }
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Allocator, typename WriteHandler, typename Allocator1>
+struct associated_allocator<
+ detail::write_at_streambuf_op<Allocator, WriteHandler>,
+ Allocator1>
+{
+ typedef typename associated_allocator<WriteHandler, Allocator1>::type type;
+
+ static type get(
+ const detail::write_at_streambuf_op<Allocator, WriteHandler>& h,
+ const Allocator1& a = Allocator1()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<WriteHandler, Allocator1>::get(h.handler_, a);
+ }
+};
+
+template <typename Executor, typename WriteHandler, typename Executor1>
+struct associated_executor<
+ detail::write_at_streambuf_op<Executor, WriteHandler>,
+ Executor1>
+{
+ typedef typename associated_executor<WriteHandler, Executor1>::type type;
+
+ static type get(
+ const detail::write_at_streambuf_op<Executor, WriteHandler>& h,
+ const Executor1& ex = Executor1()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<WriteHandler, Executor1>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncRandomAccessWriteDevice, typename Allocator,
+ typename CompletionCondition, typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at_streambuf(), handler, &d, offset,
+ &b, BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+}
+
+template <typename AsyncRandomAccessWriteDevice, typename Allocator,
+ typename WriteHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+{
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at_streambuf(),
+ handler, &d, offset, &b, transfer_all());
+}
+
+#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_WRITE_AT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/io_context.hpp b/src/third_party/boost-1.70.0/boost/asio/io_context.hpp
new file mode 100644
index 00000000000..1fb3864451a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/io_context.hpp
@@ -0,0 +1,874 @@
+//
+// io_context.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_CONTEXT_HPP
+#define BOOST_ASIO_IO_CONTEXT_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 <stdexcept>
+#include <typeinfo>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/wrapped_handler.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#if defined(BOOST_ASIO_HAS_CHRONO)
+# include <boost/asio/detail/chrono.hpp>
+#endif // defined(BOOST_ASIO_HAS_CHRONO)
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# include <boost/asio/detail/winsock_init.hpp>
+#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
+ || defined(__osf__)
+# include <boost/asio/detail/signal_init.hpp>
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail {
+#if defined(BOOST_ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context io_context_impl;
+ class win_iocp_overlapped_ptr;
+#else
+ typedef class scheduler io_context_impl;
+#endif
+} // namespace detail
+
+/// Provides core I/O functionality.
+/**
+ * The io_context class provides the core I/O functionality for users of the
+ * asynchronous I/O objects, including:
+ *
+ * @li boost::asio::ip::tcp::socket
+ * @li boost::asio::ip::tcp::acceptor
+ * @li boost::asio::ip::udp::socket
+ * @li boost::asio::deadline_timer.
+ *
+ * The io_context class also includes facilities intended for developers of
+ * custom asynchronous services.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe, with the specific exceptions of the restart()
+ * and notify_fork() functions. Calling restart() while there are unfinished
+ * run(), run_one(), run_for(), run_until(), poll() or poll_one() calls results
+ * in undefined behaviour. The notify_fork() function should not be called
+ * while any io_context function, or any function on an I/O object that is
+ * associated with the io_context, is being called in another thread.
+ *
+ * @par Concepts:
+ * Dispatcher.
+ *
+ * @par Synchronous and asynchronous operations
+ *
+ * Synchronous operations on I/O objects implicitly run the io_context object
+ * for an individual operation. The io_context functions run(), run_one(),
+ * run_for(), run_until(), poll() or poll_one() must be called for the
+ * io_context to perform asynchronous operations on behalf of a C++ program.
+ * Notification that an asynchronous operation has completed is delivered by
+ * invocation of the associated handler. Handlers are invoked only by a thread
+ * that is currently calling any overload of run(), run_one(), run_for(),
+ * run_until(), poll() or poll_one() for the io_context.
+ *
+ * @par Effect of exceptions thrown from handlers
+ *
+ * If an exception is thrown from a handler, the exception is allowed to
+ * propagate through the throwing thread's invocation of run(), run_one(),
+ * run_for(), run_until(), poll() or poll_one(). No other threads that are
+ * calling any of these functions are affected. It is then the responsibility
+ * of the application to catch the exception.
+ *
+ * After the exception has been caught, the run(), run_one(), run_for(),
+ * run_until(), poll() or poll_one() call may be restarted @em without the need
+ * for an intervening call to restart(). This allows the thread to rejoin the
+ * io_context object's thread pool without impacting any other threads in the
+ * pool.
+ *
+ * For example:
+ *
+ * @code
+ * boost::asio::io_context io_context;
+ * ...
+ * for (;;)
+ * {
+ * try
+ * {
+ * io_context.run();
+ * break; // run() exited normally
+ * }
+ * catch (my_exception& e)
+ * {
+ * // Deal with exception as appropriate.
+ * }
+ * }
+ * @endcode
+ *
+ * @par Submitting arbitrary tasks to the io_context
+ *
+ * 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()
+ * {
+ * ...
+ * }
+ *
+ * ...
+ *
+ * boost::asio::io_context io_context;
+ *
+ * // Submit a function to the io_context.
+ * boost::asio::post(io_context, my_task);
+ *
+ * // Submit a lambda object to the io_context.
+ * boost::asio::post(io_context,
+ * []()
+ * {
+ * ...
+ * });
+ *
+ * // Run the io_context until it runs out of work.
+ * io_context.run(); @endcode
+ *
+ * @par Stopping the io_context from running out of work
+ *
+ * Some applications may need to prevent an io_context object's run() call from
+ * returning when there is no more work to do. For example, the io_context may
+ * be being run in a background thread that is launched prior to the
+ * application's asynchronous operations. The run() call may be kept running by
+ * creating an object of type
+ * boost::asio::executor_work_guard<io_context::executor_type>:
+ *
+ * @code boost::asio::io_context io_context;
+ * boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
+ * = boost::asio::make_work_guard(io_context);
+ * ... @endcode
+ *
+ * To effect a shutdown, the application will then need to call the io_context
+ * object's stop() member function. This will cause the io_context run() call
+ * to return as soon as possible, abandoning unfinished operations and without
+ * permitting ready handlers to be dispatched.
+ *
+ * Alternatively, if the application requires that all operations and handlers
+ * be allowed to finish normally, the work object may be explicitly reset.
+ *
+ * @code boost::asio::io_context io_context;
+ * boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
+ * = boost::asio::make_work_guard(io_context);
+ * ...
+ * work.reset(); // Allow run() to exit. @endcode
+ */
+class io_context
+ : public execution_context
+{
+private:
+ typedef detail::io_context_impl impl_type;
+#if defined(BOOST_ASIO_HAS_IOCP)
+ friend class detail::win_iocp_overlapped_ptr;
+#endif
+
+public:
+ class executor_type;
+ friend class executor_type;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ class work;
+ friend class work;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ class service;
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+ class strand;
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+ /// The type used to count the number of handlers executed by the context.
+ typedef std::size_t count_type;
+
+ /// Constructor.
+ BOOST_ASIO_DECL io_context();
+
+ /// Constructor.
+ /**
+ * Construct with a hint about the required level of concurrency.
+ *
+ * @param concurrency_hint A suggestion to the implementation on how many
+ * threads it should allow to run simultaneously.
+ */
+ BOOST_ASIO_DECL explicit io_context(int concurrency_hint);
+
+ /// Destructor.
+ /**
+ * On destruction, the io_context performs the following sequence of
+ * operations:
+ *
+ * @li For each service object @c svc in the io_context set, in reverse order
+ * of the beginning of service object lifetime, performs
+ * @c svc->shutdown().
+ *
+ * @li Uninvoked handler objects that were scheduled for deferred invocation
+ * on the io_context, or any associated strand, are destroyed.
+ *
+ * @li For each service object @c svc in the io_context set, in reverse order
+ * of the beginning of service object lifetime, performs
+ * <tt>delete static_cast<io_context::service*>(svc)</tt>.
+ *
+ * @note The destruction sequence described above permits programs to
+ * simplify their resource management by using @c shared_ptr<>. Where an
+ * object's lifetime is tied to the lifetime of a connection (or some other
+ * sequence of asynchronous operations), a @c shared_ptr to the object would
+ * be bound into the handlers for all asynchronous operations associated with
+ * it. This works as follows:
+ *
+ * @li When a single connection ends, all associated asynchronous operations
+ * complete. The corresponding handler objects are destroyed, and all
+ * @c shared_ptr references to the objects are destroyed.
+ *
+ * @li To shut down the whole program, the io_context function stop() is
+ * called to terminate any run() calls as soon as possible. The io_context
+ * destructor defined above destroys all handlers, causing all @c shared_ptr
+ * references to all connection objects to be destroyed.
+ */
+ BOOST_ASIO_DECL ~io_context();
+
+ /// Obtains the executor associated with the io_context.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT;
+
+ /// Run the io_context object's event processing loop.
+ /**
+ * The run() function blocks until all work has finished and there are no
+ * more handlers to be dispatched, or until the io_context has been stopped.
+ *
+ * Multiple threads may call the run() function to set up a pool of threads
+ * from which the io_context may execute handlers. All threads that are
+ * waiting in the pool are equivalent and the io_context may choose any one
+ * of them to invoke a handler.
+ *
+ * A normal exit from the run() function implies that the io_context object
+ * is stopped (the stopped() function returns @c true). Subsequent calls to
+ * run(), run_one(), poll() or poll_one() will return immediately unless there
+ * is a prior call to restart().
+ *
+ * @return The number of handlers that were executed.
+ *
+ * @note Calling the run() function from a thread that is currently calling
+ * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
+ * the same io_context object may introduce the potential for deadlock. It is
+ * the caller's reponsibility to avoid this.
+ *
+ * The poll() function may also be used to dispatch ready handlers, but
+ * without blocking.
+ */
+ BOOST_ASIO_DECL count_type run();
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overload.) Run the io_context object's
+ /// event processing loop.
+ /**
+ * The run() function blocks until all work has finished and there are no
+ * more handlers to be dispatched, or until the io_context has been stopped.
+ *
+ * Multiple threads may call the run() function to set up a pool of threads
+ * from which the io_context may execute handlers. All threads that are
+ * waiting in the pool are equivalent and the io_context may choose any one
+ * of them to invoke a handler.
+ *
+ * A normal exit from the run() function implies that the io_context object
+ * is stopped (the stopped() function returns @c true). Subsequent calls to
+ * run(), run_one(), poll() or poll_one() will return immediately unless there
+ * is a prior call to restart().
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of handlers that were executed.
+ *
+ * @note Calling the run() function from a thread that is currently calling
+ * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
+ * the same io_context object may introduce the potential for deadlock. It is
+ * the caller's reponsibility to avoid this.
+ *
+ * The poll() function may also be used to dispatch ready handlers, but
+ * without blocking.
+ */
+ BOOST_ASIO_DECL count_type run(boost::system::error_code& ec);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+ /// Run the io_context object's event processing loop for a specified
+ /// duration.
+ /**
+ * The run_for() function blocks until all work has finished and there are no
+ * more handlers to be dispatched, until the io_context has been stopped, or
+ * until the specified duration has elapsed.
+ *
+ * @param rel_time The duration for which the call may block.
+ *
+ * @return The number of handlers that were executed.
+ */
+ template <typename Rep, typename Period>
+ std::size_t run_for(const chrono::duration<Rep, Period>& rel_time);
+
+ /// Run the io_context object's event processing loop until a specified time.
+ /**
+ * The run_until() function blocks until all work has finished and there are
+ * no more handlers to be dispatched, until the io_context has been stopped,
+ * or until the specified time has been reached.
+ *
+ * @param abs_time The time point until which the call may block.
+ *
+ * @return The number of handlers that were executed.
+ */
+ template <typename Clock, typename Duration>
+ std::size_t run_until(const chrono::time_point<Clock, Duration>& abs_time);
+#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+ /// Run the io_context object's event processing loop to execute at most one
+ /// handler.
+ /**
+ * The run_one() function blocks until one handler has been dispatched, or
+ * until the io_context has been stopped.
+ *
+ * @return The number of handlers that were executed. A zero return value
+ * implies that the io_context object is stopped (the stopped() function
+ * returns @c true). Subsequent calls to run(), run_one(), poll() or
+ * poll_one() will return immediately unless there is a prior call to
+ * restart().
+ *
+ * @note Calling the run_one() function from a thread that is currently
+ * calling one of run(), run_one(), run_for(), run_until(), poll() or
+ * poll_one() on the same io_context object may introduce the potential for
+ * deadlock. It is the caller's reponsibility to avoid this.
+ */
+ BOOST_ASIO_DECL count_type run_one();
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's
+ /// event processing loop to execute at most one handler.
+ /**
+ * The run_one() function blocks until one handler has been dispatched, or
+ * until the io_context has been stopped.
+ *
+ * @return The number of handlers that were executed. A zero return value
+ * implies that the io_context object is stopped (the stopped() function
+ * returns @c true). Subsequent calls to run(), run_one(), poll() or
+ * poll_one() will return immediately unless there is a prior call to
+ * restart().
+ *
+ * @return The number of handlers that were executed.
+ *
+ * @note Calling the run_one() function from a thread that is currently
+ * calling one of run(), run_one(), run_for(), run_until(), poll() or
+ * poll_one() on the same io_context object may introduce the potential for
+ * deadlock. It is the caller's reponsibility to avoid this.
+ */
+ BOOST_ASIO_DECL count_type run_one(boost::system::error_code& ec);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+ /// Run the io_context object's event processing loop for a specified duration
+ /// to execute at most one handler.
+ /**
+ * The run_one_for() function blocks until one handler has been dispatched,
+ * until the io_context has been stopped, or until the specified duration has
+ * elapsed.
+ *
+ * @param rel_time The duration for which the call may block.
+ *
+ * @return The number of handlers that were executed.
+ */
+ template <typename Rep, typename Period>
+ std::size_t run_one_for(const chrono::duration<Rep, Period>& rel_time);
+
+ /// Run the io_context object's event processing loop until a specified time
+ /// to execute at most one handler.
+ /**
+ * The run_one_until() function blocks until one handler has been dispatched,
+ * until the io_context has been stopped, or until the specified time has
+ * been reached.
+ *
+ * @param abs_time The time point until which the call may block.
+ *
+ * @return The number of handlers that were executed.
+ */
+ template <typename Clock, typename Duration>
+ std::size_t run_one_until(
+ const chrono::time_point<Clock, Duration>& abs_time);
+#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+ /// Run the io_context object's event processing loop to execute ready
+ /// handlers.
+ /**
+ * The poll() function runs handlers that are ready to run, without blocking,
+ * until the io_context has been stopped or there are no more ready handlers.
+ *
+ * @return The number of handlers that were executed.
+ */
+ BOOST_ASIO_DECL count_type poll();
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overload.) Run the io_context object's
+ /// event processing loop to execute ready handlers.
+ /**
+ * The poll() function runs handlers that are ready to run, without blocking,
+ * until the io_context has been stopped or there are no more ready handlers.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of handlers that were executed.
+ */
+ BOOST_ASIO_DECL count_type poll(boost::system::error_code& ec);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Run the io_context object's event processing loop to execute one ready
+ /// handler.
+ /**
+ * The poll_one() function runs at most one handler that is ready to run,
+ * without blocking.
+ *
+ * @return The number of handlers that were executed.
+ */
+ BOOST_ASIO_DECL count_type poll_one();
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use non-error_code overload.) Run the io_context object's
+ /// event processing loop to execute one ready handler.
+ /**
+ * The poll_one() function runs at most one handler that is ready to run,
+ * without blocking.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @return The number of handlers that were executed.
+ */
+ BOOST_ASIO_DECL count_type poll_one(boost::system::error_code& ec);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Stop the io_context object's event processing loop.
+ /**
+ * This function does not block, but instead simply signals the io_context to
+ * stop. All invocations of its run() or run_one() member functions should
+ * return as soon as possible. Subsequent calls to run(), run_one(), poll()
+ * or poll_one() will return immediately until restart() is called.
+ */
+ BOOST_ASIO_DECL void stop();
+
+ /// Determine whether the io_context object has been stopped.
+ /**
+ * This function is used to determine whether an io_context object has been
+ * stopped, either through an explicit call to stop(), or due to running out
+ * of work. When an io_context object is stopped, calls to run(), run_one(),
+ * poll() or poll_one() will return immediately without invoking any
+ * handlers.
+ *
+ * @return @c true if the io_context object is stopped, otherwise @c false.
+ */
+ BOOST_ASIO_DECL bool stopped() const;
+
+ /// Restart the io_context in preparation for a subsequent run() invocation.
+ /**
+ * This function must be called prior to any second or later set of
+ * invocations of the run(), run_one(), poll() or poll_one() functions when a
+ * previous invocation of these functions returned due to the io_context
+ * being stopped or running out of work. After a call to restart(), the
+ * io_context object's stopped() function will return @c false.
+ *
+ * This function must not be called while there are any unfinished calls to
+ * the run(), run_one(), poll() or poll_one() functions.
+ */
+ BOOST_ASIO_DECL void restart();
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use restart().) Reset the io_context in preparation for a
+ /// subsequent run() invocation.
+ /**
+ * This function must be called prior to any second or later set of
+ * invocations of the run(), run_one(), poll() or poll_one() functions when a
+ * previous invocation of these functions returned due to the io_context
+ * being stopped or running out of work. After a call to restart(), the
+ * io_context object's stopped() function will return @c false.
+ *
+ * This function must not be called while there are any unfinished calls to
+ * the run(), run_one(), poll() or poll_one() functions.
+ */
+ void reset();
+
+ /// (Deprecated: Use boost::asio::dispatch().) Request the io_context to
+ /// invoke the given handler.
+ /**
+ * This function is used to ask the io_context to execute the given handler.
+ *
+ * The io_context guarantees that the handler will only be called in a thread
+ * in which the run(), run_one(), poll() or poll_one() member functions is
+ * currently being invoked. The handler may be executed inside this function
+ * if the guarantee can be met.
+ *
+ * @param handler The handler to be called. The io_context will make
+ * a copy of the handler object as required. The function signature of the
+ * handler must be: @code void handler(); @endcode
+ *
+ * @note This function throws an exception only if:
+ *
+ * @li the handler's @c asio_handler_allocate function; or
+ *
+ * @li the handler's copy constructor
+ *
+ * throws an exception.
+ */
+ template <typename LegacyCompletionHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+ dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler);
+
+ /// (Deprecated: Use boost::asio::post().) Request the io_context to invoke
+ /// the given handler and return immediately.
+ /**
+ * This function is used to ask the io_context to execute the given handler,
+ * but without allowing the io_context to call the handler from inside this
+ * function.
+ *
+ * The io_context guarantees that the handler will only be called in a thread
+ * in which the run(), run_one(), poll() or poll_one() member functions is
+ * currently being invoked.
+ *
+ * @param handler The handler to be called. The io_context will make
+ * a copy of the handler object as required. The function signature of the
+ * handler must be: @code void handler(); @endcode
+ *
+ * @note This function throws an exception only if:
+ *
+ * @li the handler's @c asio_handler_allocate function; or
+ *
+ * @li the handler's copy constructor
+ *
+ * throws an exception.
+ */
+ template <typename LegacyCompletionHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+ post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler);
+
+ /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that
+ /// automatically dispatches the wrapped handler on the io_context.
+ /**
+ * This function is used to create a new handler function object that, when
+ * invoked, will automatically pass the wrapped handler to the io_context
+ * object's dispatch function.
+ *
+ * @param handler The handler to be wrapped. The io_context will make a copy
+ * of the handler object as required. The function signature of the handler
+ * must be: @code void handler(A1 a1, ... An an); @endcode
+ *
+ * @return A function object that, when invoked, passes the wrapped handler to
+ * the io_context object's dispatch function. Given a function object with the
+ * signature:
+ * @code R f(A1 a1, ... An an); @endcode
+ * If this function object is passed to the wrap function like so:
+ * @code io_context.wrap(f); @endcode
+ * then the return value is a function object with the signature
+ * @code void g(A1 a1, ... An an); @endcode
+ * that, when invoked, executes code equivalent to:
+ * @code io_context.dispatch(boost::bind(f, a1, ... an)); @endcode
+ */
+ template <typename Handler>
+#if defined(GENERATING_DOCUMENTATION)
+ unspecified
+#else
+ detail::wrapped_handler<io_context&, Handler>
+#endif
+ wrap(Handler handler);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+private:
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ struct initiate_dispatch;
+ struct initiate_post;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ // Helper function to add the implementation.
+ BOOST_ASIO_DECL impl_type& add_impl(impl_type* impl);
+
+ // Backwards compatible overload for use with services derived from
+ // io_context::service.
+ template <typename Service>
+ friend Service& use_service(io_context& ioc);
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ detail::winsock_init<> init_;
+#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
+ || defined(__osf__)
+ detail::signal_init<> init_;
+#endif
+
+ // The implementation.
+ impl_type& impl_;
+};
+
+/// Executor used to submit functions to an io_context.
+class io_context::executor_type
+{
+public:
+ /// Obtain the underlying execution context.
+ io_context& context() const BOOST_ASIO_NOEXCEPT;
+
+ /// Inform the io_context that it has some outstanding work to do.
+ /**
+ * This function is used to inform the io_context that some work has begun.
+ * This ensures that the io_context's run() and run_one() functions do not
+ * exit while the work is underway.
+ */
+ void on_work_started() const BOOST_ASIO_NOEXCEPT;
+
+ /// Inform the io_context that some work is no longer outstanding.
+ /**
+ * This function is used to inform the io_context that some work has
+ * finished. Once the count of unfinished work reaches zero, the io_context
+ * is stopped and the run() and run_one() functions may exit.
+ */
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT;
+
+ /// Request the io_context to invoke the given function object.
+ /**
+ * This function is used to ask the io_context to execute the given function
+ * object. If the current thread is running the io_context, @c dispatch()
+ * executes the function before returning. Otherwise, the function will be
+ * scheduled to run on the io_context.
+ *
+ * @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 io_context to invoke the given function object.
+ /**
+ * This function is used to ask the io_context 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 io_context.
+ *
+ * @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 io_context to invoke the given function object.
+ /**
+ * This function is used to ask the io_context 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 io_context.
+ *
+ * If the current thread belongs to the io_context, @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 io_context is running in the current thread.
+ /**
+ * @return @c true if the current thread is running the io_context. 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 io_context.
+ */
+ friend bool operator==(const executor_type& a,
+ const executor_type& b) BOOST_ASIO_NOEXCEPT
+ {
+ return &a.io_context_ == &b.io_context_;
+ }
+
+ /// Compare two executors for inequality.
+ /**
+ * Two executors are equal if they refer to the same underlying io_context.
+ */
+ friend bool operator!=(const executor_type& a,
+ const executor_type& b) BOOST_ASIO_NOEXCEPT
+ {
+ return &a.io_context_ != &b.io_context_;
+ }
+
+private:
+ friend class io_context;
+
+ // Constructor.
+ explicit executor_type(io_context& i) : io_context_(i) {}
+
+ // The underlying io_context.
+ io_context& io_context_;
+};
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+/// (Deprecated: Use executor_work_guard.) Class to inform the io_context when
+/// it has work to do.
+/**
+ * The work class is used to inform the io_context when work starts and
+ * finishes. This ensures that the io_context object's run() function will not
+ * exit while work is underway, and that it does exit when there is no
+ * unfinished work remaining.
+ *
+ * The work class is copy-constructible so that it may be used as a data member
+ * in a handler class. It is not assignable.
+ */
+class io_context::work
+{
+public:
+ /// Constructor notifies the io_context that work is starting.
+ /**
+ * The constructor is used to inform the io_context that some work has begun.
+ * This ensures that the io_context object's run() function will not exit
+ * while the work is underway.
+ */
+ explicit work(boost::asio::io_context& io_context);
+
+ /// Copy constructor notifies the io_context that work is starting.
+ /**
+ * The constructor is used to inform the io_context that some work has begun.
+ * This ensures that the io_context object's run() function will not exit
+ * while the work is underway.
+ */
+ work(const work& other);
+
+ /// Destructor notifies the io_context that the work is complete.
+ /**
+ * The destructor is used to inform the io_context that some work has
+ * finished. Once the count of unfinished work reaches zero, the io_context
+ * object's run() function is permitted to exit.
+ */
+ ~work();
+
+ /// Get the io_context associated with the work.
+ boost::asio::io_context& get_io_context();
+
+private:
+ // Prevent assignment.
+ void operator=(const work& other);
+
+ // The io_context implementation.
+ detail::io_context_impl& io_context_impl_;
+};
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Base class for all io_context services.
+class io_context::service
+ : public execution_context::service
+{
+public:
+ /// Get the io_context object that owns the service.
+ boost::asio::io_context& get_io_context();
+
+private:
+ /// Destroy all user-defined handler objects owned by the service.
+ BOOST_ASIO_DECL virtual void shutdown();
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use shutdown().) Destroy all user-defined handler objects
+ /// owned by the service.
+ BOOST_ASIO_DECL virtual void shutdown_service();
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Handle notification of a fork-related event to perform any necessary
+ /// housekeeping.
+ /**
+ * This function is not a pure virtual so that services only have to
+ * implement it if necessary. The default implementation does nothing.
+ */
+ BOOST_ASIO_DECL virtual void notify_fork(
+ execution_context::fork_event event);
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use notify_fork().) Handle notification of a fork-related
+ /// event to perform any necessary housekeeping.
+ /**
+ * This function is not a pure virtual so that services only have to
+ * implement it if necessary. The default implementation does nothing.
+ */
+ BOOST_ASIO_DECL virtual void fork_service(
+ execution_context::fork_event event);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+protected:
+ /// Constructor.
+ /**
+ * @param owner The io_context object that owns the service.
+ */
+ BOOST_ASIO_DECL service(boost::asio::io_context& owner);
+
+ /// Destructor.
+ BOOST_ASIO_DECL virtual ~service();
+};
+
+namespace detail {
+
+// Special service base class to keep classes header-file only.
+template <typename Type>
+class service_base
+ : public boost::asio::io_context::service
+{
+public:
+ static boost::asio::detail::service_id<Type> id;
+
+ // Constructor.
+ service_base(boost::asio::io_context& io_context)
+ : boost::asio::io_context::service(io_context)
+ {
+ }
+};
+
+template <typename Type>
+boost::asio::detail::service_id<Type> service_base<Type>::id;
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/io_context.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/io_context.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+// If both io_context.hpp and strand.hpp have been included, automatically
+// include the header file needed for the io_context::strand class.
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# if defined(BOOST_ASIO_STRAND_HPP)
+# include <boost/asio/io_context_strand.hpp>
+# endif // defined(BOOST_ASIO_STRAND_HPP)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#endif // BOOST_ASIO_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/io_context_strand.hpp b/src/third_party/boost-1.70.0/boost/asio/io_context_strand.hpp
new file mode 100644
index 00000000000..a9a9b522cd9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/io_context_strand.hpp
@@ -0,0 +1,376 @@
+//
+// io_context_strand.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_CONTEXT_STRAND_HPP
+#define BOOST_ASIO_IO_CONTEXT_STRAND_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_NO_EXTENSIONS)
+
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/strand_service.hpp>
+#include <boost/asio/detail/wrapped_handler.hpp>
+#include <boost/asio/io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Provides serialised handler execution.
+/**
+ * The io_context::strand class provides the ability to post and dispatch
+ * handlers with the guarantee that none of those handlers will execute
+ * concurrently.
+ *
+ * @par Order of handler invocation
+ * Given:
+ *
+ * @li a strand object @c s
+ *
+ * @li an object @c a meeting completion handler requirements
+ *
+ * @li an object @c a1 which is an arbitrary copy of @c a made by the
+ * implementation
+ *
+ * @li an object @c b meeting completion handler requirements
+ *
+ * @li an object @c b1 which is an arbitrary copy of @c b made by the
+ * implementation
+ *
+ * if any of the following conditions are true:
+ *
+ * @li @c s.post(a) happens-before @c s.post(b)
+ *
+ * @li @c s.post(a) happens-before @c s.dispatch(b), where the latter is
+ * performed outside the strand
+ *
+ * @li @c s.dispatch(a) happens-before @c s.post(b), where the former is
+ * performed outside the strand
+ *
+ * @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
+ * performed outside the strand
+ *
+ * then @c asio_handler_invoke(a1, &a1) happens-before
+ * @c asio_handler_invoke(b1, &b1).
+ *
+ * Note that in the following case:
+ * @code async_op_1(..., s.wrap(a));
+ * async_op_2(..., s.wrap(b)); @endcode
+ * the completion of the first async operation will perform @c s.dispatch(a),
+ * and the second will perform @c s.dispatch(b), but the order in which those
+ * are performed is unspecified. That is, you cannot state whether one
+ * happens-before the other. Therefore none of the above conditions are met and
+ * no ordering guarantee is made.
+ *
+ * @note The implementation makes no guarantee that handlers posted or
+ * dispatched through different @c strand objects will be invoked concurrently.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Dispatcher.
+ */
+class io_context::strand
+{
+public:
+ /// Constructor.
+ /**
+ * Constructs the strand.
+ *
+ * @param io_context The io_context object that the strand will use to
+ * dispatch handlers that are ready to be run.
+ */
+ explicit strand(boost::asio::io_context& io_context)
+ : service_(boost::asio::use_service<
+ boost::asio::detail::strand_service>(io_context))
+ {
+ service_.construct(impl_);
+ }
+
+ /// Destructor.
+ /**
+ * Destroys a strand.
+ *
+ * Handlers posted through the strand that have not yet been invoked will
+ * still be dispatched in a way that meets the guarantee of non-concurrency.
+ */
+ ~strand()
+ {
+ }
+
+ /// Obtain the underlying execution context.
+ boost::asio::io_context& context() const BOOST_ASIO_NOEXCEPT
+ {
+ return service_.get_io_context();
+ }
+
+ /// Inform the strand that it has some outstanding work to do.
+ /**
+ * The strand delegates this call to its underlying io_context.
+ */
+ void on_work_started() const BOOST_ASIO_NOEXCEPT
+ {
+ context().get_executor().on_work_started();
+ }
+
+ /// Inform the strand that some work is no longer outstanding.
+ /**
+ * The strand delegates this call to its underlying io_context.
+ */
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT
+ {
+ context().get_executor().on_work_finished();
+ }
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the strand to execute the given function
+ * object on its underlying io_context. The function object will be executed
+ * inside this function if the strand is not otherwise busy and if the
+ * underlying io_context's executor's @c dispatch() function is also able to
+ * execute the function before returning.
+ *
+ * @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
+ {
+ typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
+ service_.dispatch(impl_, tmp);
+ (void)a;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use boost::asio::dispatch().) Request the strand to invoke
+ /// the given handler.
+ /**
+ * This function is used to ask the strand to execute the given handler.
+ *
+ * The strand object guarantees that handlers posted or dispatched through
+ * the strand will not be executed concurrently. The handler may be executed
+ * inside this function if the guarantee can be met. If this function is
+ * called from within a handler that was posted or dispatched through the same
+ * strand, then the new handler will be executed immediately.
+ *
+ * The strand's guarantee is in addition to the guarantee provided by the
+ * underlying io_context. The io_context guarantees that the handler will only
+ * be called in a thread in which the io_context's run member function is
+ * currently being invoked.
+ *
+ * @param handler The handler to be called. The strand will make a copy of the
+ * handler object as required. The function signature of the handler must be:
+ * @code void handler(); @endcode
+ */
+ template <typename LegacyCompletionHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+ dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+ {
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_dispatch(), handler, this);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will never be executed inside this function.
+ * Instead, it will be scheduled to run by the underlying io_context.
+ *
+ * @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
+ {
+ typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
+ service_.post(impl_, tmp);
+ (void)a;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use boost::asio::post().) Request the strand to invoke the
+ /// given handler and return immediately.
+ /**
+ * This function is used to ask the strand to execute the given handler, but
+ * without allowing the strand to call the handler from inside this function.
+ *
+ * The strand object guarantees that handlers posted or dispatched through
+ * the strand will not be executed concurrently. The strand's guarantee is in
+ * addition to the guarantee provided by the underlying io_context. The
+ * io_context guarantees that the handler will only be called in a thread in
+ * which the io_context's run member function is currently being invoked.
+ *
+ * @param handler The handler to be called. The strand will make a copy of the
+ * handler object as required. The function signature of the handler must be:
+ * @code void handler(); @endcode
+ */
+ template <typename LegacyCompletionHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+ post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+ {
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_post(), handler, this);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will never be executed inside this function.
+ * Instead, it will be scheduled to run by the underlying io_context.
+ *
+ * @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
+ {
+ typename decay<Function>::type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
+ service_.post(impl_, tmp);
+ (void)a;
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that
+ /// automatically dispatches the wrapped handler on the strand.
+ /**
+ * This function is used to create a new handler function object that, when
+ * invoked, will automatically pass the wrapped handler to the strand's
+ * dispatch function.
+ *
+ * @param handler The handler to be wrapped. The strand will make a copy of
+ * the handler object as required. The function signature of the handler must
+ * be: @code void handler(A1 a1, ... An an); @endcode
+ *
+ * @return A function object that, when invoked, passes the wrapped handler to
+ * the strand's dispatch function. Given a function object with the signature:
+ * @code R f(A1 a1, ... An an); @endcode
+ * If this function object is passed to the wrap function like so:
+ * @code strand.wrap(f); @endcode
+ * then the return value is a function object with the signature
+ * @code void g(A1 a1, ... An an); @endcode
+ * that, when invoked, executes code equivalent to:
+ * @code strand.dispatch(boost::bind(f, a1, ... an)); @endcode
+ */
+ template <typename Handler>
+#if defined(GENERATING_DOCUMENTATION)
+ unspecified
+#else
+ detail::wrapped_handler<strand, Handler, detail::is_continuation_if_running>
+#endif
+ wrap(Handler handler)
+ {
+ return detail::wrapped_handler<io_context::strand, Handler,
+ detail::is_continuation_if_running>(*this, handler);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Determine whether the strand is running in the current thread.
+ /**
+ * @return @c true if the current thread is executing a handler that was
+ * submitted to the strand using post(), dispatch() or wrap(). Otherwise
+ * returns @c false.
+ */
+ bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT
+ {
+ return service_.running_in_this_thread(impl_);
+ }
+
+ /// Compare two strands for equality.
+ /**
+ * Two strands are equal if they refer to the same ordered, non-concurrent
+ * state.
+ */
+ friend bool operator==(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.impl_ == b.impl_;
+ }
+
+ /// Compare two strands for inequality.
+ /**
+ * Two strands are equal if they refer to the same ordered, non-concurrent
+ * state.
+ */
+ friend bool operator!=(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.impl_ != b.impl_;
+ }
+
+private:
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ struct initiate_dispatch
+ {
+ template <typename LegacyCompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ strand* self) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+ self->service_.dispatch(self->impl_, handler2.value);
+ }
+ };
+
+ struct initiate_post
+ {
+ template <typename LegacyCompletionHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ strand* self) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+ self->service_.post(self->impl_, handler2.value);
+ }
+ };
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ boost::asio::detail::strand_service& service_;
+ mutable boost::asio::detail::strand_service::implementation_type impl_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#endif // BOOST_ASIO_IO_CONTEXT_STRAND_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/io_service.hpp b/src/third_party/boost-1.70.0/boost/asio/io_service.hpp
new file mode 100644
index 00000000000..31f9e9849d3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/io_service.hpp
@@ -0,0 +1,35 @@
+//
+// io_service.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_SERVICE_HPP
+#define BOOST_ASIO_IO_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+/// Typedef for backwards compatibility.
+typedef io_context io_service;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IO_SERVICE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/io_service_strand.hpp b/src/third_party/boost-1.70.0/boost/asio/io_service_strand.hpp
new file mode 100644
index 00000000000..93b811b2ec6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/io_service_strand.hpp
@@ -0,0 +1,20 @@
+//
+// io_service_strand.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IO_SERVICE_STRAND_HPP
+#define BOOST_ASIO_IO_SERVICE_STRAND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/io_context_strand.hpp>
+
+#endif // BOOST_ASIO_IO_SERVICE_STRAND_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address.hpp
new file mode 100644
index 00000000000..fd6ce958503
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address.hpp
@@ -0,0 +1,270 @@
+//
+// ip/address.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ADDRESS_HPP
+#define BOOST_ASIO_IP_ADDRESS_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/detail/throw_exception.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio/ip/address_v6.hpp>
+#include <boost/asio/ip/bad_address_cast.hpp>
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Implements version-independent IP addresses.
+/**
+ * The boost::asio::ip::address class provides the ability to use either IP
+ * version 4 or version 6 addresses.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class address
+{
+public:
+ /// Default constructor.
+ BOOST_ASIO_DECL address() BOOST_ASIO_NOEXCEPT;
+
+ /// Construct an address from an IPv4 address.
+ BOOST_ASIO_DECL address(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT;
+
+ /// Construct an address from an IPv6 address.
+ BOOST_ASIO_DECL address(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT;
+
+ /// Copy constructor.
+ BOOST_ASIO_DECL address(const address& other) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ BOOST_ASIO_DECL address(address&& other) BOOST_ASIO_NOEXCEPT;
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another address.
+ BOOST_ASIO_DECL address& operator=(const address& other) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another address.
+ BOOST_ASIO_DECL address& operator=(address&& other) BOOST_ASIO_NOEXCEPT;
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from an IPv4 address.
+ BOOST_ASIO_DECL address& operator=(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT;
+
+ /// Assign from an IPv6 address.
+ BOOST_ASIO_DECL address& operator=(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT;
+
+ /// Get whether the address is an IP version 4 address.
+ bool is_v4() const BOOST_ASIO_NOEXCEPT
+ {
+ return type_ == ipv4;
+ }
+
+ /// Get whether the address is an IP version 6 address.
+ bool is_v6() const BOOST_ASIO_NOEXCEPT
+ {
+ return type_ == ipv6;
+ }
+
+ /// Get the address as an IP version 4 address.
+ BOOST_ASIO_DECL boost::asio::ip::address_v4 to_v4() const;
+
+ /// Get the address as an IP version 6 address.
+ BOOST_ASIO_DECL boost::asio::ip::address_v6 to_v6() const;
+
+ /// Get the address as a string.
+ BOOST_ASIO_DECL std::string to_string() const;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use other overload.) Get the address as a string.
+ BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
+
+ /// (Deprecated: Use make_address().) Create an address from an IPv4 address
+ /// string in dotted decimal form, or from an IPv6 address in hexadecimal
+ /// notation.
+ static address from_string(const char* str);
+
+ /// (Deprecated: Use make_address().) Create an address from an IPv4 address
+ /// string in dotted decimal form, or from an IPv6 address in hexadecimal
+ /// notation.
+ static address from_string(const char* str, boost::system::error_code& ec);
+
+ /// (Deprecated: Use make_address().) Create an address from an IPv4 address
+ /// string in dotted decimal form, or from an IPv6 address in hexadecimal
+ /// notation.
+ static address from_string(const std::string& str);
+
+ /// (Deprecated: Use make_address().) Create an address from an IPv4 address
+ /// string in dotted decimal form, or from an IPv6 address in hexadecimal
+ /// notation.
+ static address from_string(
+ const std::string& str, boost::system::error_code& ec);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Determine whether the address is a loopback address.
+ BOOST_ASIO_DECL bool is_loopback() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is unspecified.
+ BOOST_ASIO_DECL bool is_unspecified() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a multicast address.
+ BOOST_ASIO_DECL bool is_multicast() const BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two addresses for equality.
+ BOOST_ASIO_DECL friend bool operator==(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two addresses for inequality.
+ friend bool operator!=(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a1 == a2);
+ }
+
+ /// Compare addresses for ordering.
+ BOOST_ASIO_DECL friend bool operator<(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT;
+
+ /// Compare addresses for ordering.
+ friend bool operator>(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a2 < a1;
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator<=(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a2 < a1);
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator>=(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a1 < a2);
+ }
+
+private:
+ // The type of the address.
+ enum { ipv4, ipv6 } type_;
+
+ // The underlying IPv4 address.
+ boost::asio::ip::address_v4 ipv4_address_;
+
+ // The underlying IPv6 address.
+ boost::asio::ip::address_v6 ipv6_address_;
+};
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+BOOST_ASIO_DECL address make_address(const char* str);
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+BOOST_ASIO_DECL address make_address(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+BOOST_ASIO_DECL address make_address(const std::string& str);
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+BOOST_ASIO_DECL address make_address(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+BOOST_ASIO_DECL address make_address(string_view str);
+
+/// Create an address from an IPv4 address string in dotted decimal form,
+/// or from an IPv6 address in hexadecimal notation.
+/**
+ * @relates address
+ */
+BOOST_ASIO_DECL address make_address(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Output an address as a string.
+/**
+ * Used to output a human-readable string for a specified address.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param addr The address to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::ip::address
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const address& addr);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ip/impl/address.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/impl/address.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_ADDRESS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address_v4.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address_v4.hpp
new file mode 100644
index 00000000000..b612fa0cd77
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address_v4.hpp
@@ -0,0 +1,337 @@
+//
+// ip/address_v4.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ADDRESS_V4_HPP
+#define BOOST_ASIO_IP_ADDRESS_V4_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/detail/array.hpp>
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/winsock_init.hpp>
+#include <boost/system/error_code.hpp>
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Implements IP version 4 style addresses.
+/**
+ * The boost::asio::ip::address_v4 class provides the ability to use and
+ * manipulate IP version 4 addresses.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class address_v4
+{
+public:
+ /// The type used to represent an address as an unsigned integer.
+ typedef uint_least32_t uint_type;
+
+ /// The type used to represent an address as an array of bytes.
+ /**
+ * @note This type is defined in terms of the C++0x template @c std::array
+ * when it is available. Otherwise, it uses @c boost:array.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef array<unsigned char, 4> bytes_type;
+#else
+ typedef boost::asio::detail::array<unsigned char, 4> bytes_type;
+#endif
+
+ /// Default constructor.
+ address_v4() BOOST_ASIO_NOEXCEPT
+ {
+ addr_.s_addr = 0;
+ }
+
+ /// Construct an address from raw bytes.
+ BOOST_ASIO_DECL explicit address_v4(const bytes_type& bytes);
+
+ /// Construct an address from an unsigned integer in host byte order.
+ BOOST_ASIO_DECL explicit address_v4(uint_type addr);
+
+ /// Copy constructor.
+ address_v4(const address_v4& other) BOOST_ASIO_NOEXCEPT
+ : addr_(other.addr_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ address_v4(address_v4&& other) BOOST_ASIO_NOEXCEPT
+ : addr_(other.addr_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another address.
+ address_v4& operator=(const address_v4& other) BOOST_ASIO_NOEXCEPT
+ {
+ addr_ = other.addr_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another address.
+ address_v4& operator=(address_v4&& other) BOOST_ASIO_NOEXCEPT
+ {
+ addr_ = other.addr_;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Get the address in bytes, in network byte order.
+ BOOST_ASIO_DECL bytes_type to_bytes() const BOOST_ASIO_NOEXCEPT;
+
+ /// Get the address as an unsigned integer in host byte order
+ BOOST_ASIO_DECL uint_type to_uint() const BOOST_ASIO_NOEXCEPT;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// Get the address as an unsigned long in host byte order
+ BOOST_ASIO_DECL unsigned long to_ulong() const;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Get the address as a string in dotted decimal format.
+ BOOST_ASIO_DECL std::string to_string() const;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use other overload.) Get the address as a string in dotted
+ /// decimal format.
+ BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
+
+ /// (Deprecated: Use make_address_v4().) Create an address from an IP address
+ /// string in dotted decimal form.
+ static address_v4 from_string(const char* str);
+
+ /// (Deprecated: Use make_address_v4().) Create an address from an IP address
+ /// string in dotted decimal form.
+ static address_v4 from_string(
+ const char* str, boost::system::error_code& ec);
+
+ /// (Deprecated: Use make_address_v4().) Create an address from an IP address
+ /// string in dotted decimal form.
+ static address_v4 from_string(const std::string& str);
+
+ /// (Deprecated: Use make_address_v4().) Create an address from an IP address
+ /// string in dotted decimal form.
+ static address_v4 from_string(
+ const std::string& str, boost::system::error_code& ec);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Determine whether the address is a loopback address.
+ BOOST_ASIO_DECL bool is_loopback() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is unspecified.
+ BOOST_ASIO_DECL bool is_unspecified() const BOOST_ASIO_NOEXCEPT;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use network_v4 class.) Determine whether the address is a
+ /// class A address.
+ BOOST_ASIO_DECL bool is_class_a() const;
+
+ /// (Deprecated: Use network_v4 class.) Determine whether the address is a
+ /// class B address.
+ BOOST_ASIO_DECL bool is_class_b() const;
+
+ /// (Deprecated: Use network_v4 class.) Determine whether the address is a
+ /// class C address.
+ BOOST_ASIO_DECL bool is_class_c() const;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Determine whether the address is a multicast address.
+ BOOST_ASIO_DECL bool is_multicast() const BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two addresses for equality.
+ friend bool operator==(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a1.addr_.s_addr == a2.addr_.s_addr;
+ }
+
+ /// Compare two addresses for inequality.
+ friend bool operator!=(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a1.addr_.s_addr != a2.addr_.s_addr;
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator<(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a1.to_uint() < a2.to_uint();
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator>(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a1.to_uint() > a2.to_uint();
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator<=(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a1.to_uint() <= a2.to_uint();
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator>=(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a1.to_uint() >= a2.to_uint();
+ }
+
+ /// Obtain an address object that represents any address.
+ static address_v4 any() BOOST_ASIO_NOEXCEPT
+ {
+ return address_v4();
+ }
+
+ /// Obtain an address object that represents the loopback address.
+ static address_v4 loopback() BOOST_ASIO_NOEXCEPT
+ {
+ return address_v4(0x7F000001);
+ }
+
+ /// Obtain an address object that represents the broadcast address.
+ static address_v4 broadcast() BOOST_ASIO_NOEXCEPT
+ {
+ return address_v4(0xFFFFFFFF);
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use network_v4 class.) Obtain an address object that
+ /// represents the broadcast address that corresponds to the specified
+ /// address and netmask.
+ BOOST_ASIO_DECL static address_v4 broadcast(
+ const address_v4& addr, const address_v4& mask);
+
+ /// (Deprecated: Use network_v4 class.) Obtain the netmask that corresponds
+ /// to the address, based on its address class.
+ BOOST_ASIO_DECL static address_v4 netmask(const address_v4& addr);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+private:
+ // The underlying IPv4 address.
+ boost::asio::detail::in4_addr_type addr_;
+};
+
+/// Create an IPv4 address from raw bytes in network order.
+/**
+ * @relates address_v4
+ */
+inline address_v4 make_address_v4(const address_v4::bytes_type& bytes)
+{
+ return address_v4(bytes);
+}
+
+/// Create an IPv4 address from an unsigned integer in host byte order.
+/**
+ * @relates address_v4
+ */
+inline address_v4 make_address_v4(address_v4::uint_type addr)
+{
+ return address_v4(addr);
+}
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(const char* str);
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(const std::string& str);
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(string_view str);
+
+/// Create an IPv4 address from an IP address string in dotted decimal form.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Output an address as a string.
+/**
+ * Used to output a human-readable string for a specified address.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param addr The address to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::ip::address_v4
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const address_v4& addr);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ip/impl/address_v4.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/impl/address_v4.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_ADDRESS_V4_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address_v4_iterator.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address_v4_iterator.hpp
new file mode 100644
index 00000000000..5a52fe0e1a3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address_v4_iterator.hpp
@@ -0,0 +1,164 @@
+//
+// ip/address_v4_iterator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ADDRESS_V4_ITERATOR_HPP
+#define BOOST_ASIO_IP_ADDRESS_V4_ITERATOR_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/ip/address_v4.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename> class basic_address_iterator;
+
+/// An input iterator that can be used for traversing IPv4 addresses.
+/**
+ * In addition to satisfying the input iterator requirements, this iterator
+ * also supports decrement.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <> class basic_address_iterator<address_v4>
+{
+public:
+ /// The type of the elements pointed to by the iterator.
+ typedef address_v4 value_type;
+
+ /// Distance between two iterators.
+ typedef std::ptrdiff_t difference_type;
+
+ /// The type of a pointer to an element pointed to by the iterator.
+ typedef const address_v4* pointer;
+
+ /// The type of a reference to an element pointed to by the iterator.
+ typedef const address_v4& reference;
+
+ /// Denotes that the iterator satisfies the input iterator requirements.
+ typedef std::input_iterator_tag iterator_category;
+
+ /// Construct an iterator that points to the specified address.
+ basic_address_iterator(const address_v4& addr) BOOST_ASIO_NOEXCEPT
+ : address_(addr)
+ {
+ }
+
+ /// Copy constructor.
+ basic_address_iterator(
+ const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
+ : address_(other.address_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ basic_address_iterator(basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
+ : address_(BOOST_ASIO_MOVE_CAST(address_v4)(other.address_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assignment operator.
+ basic_address_iterator& operator=(
+ const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = other.address_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move assignment operator.
+ basic_address_iterator& operator=(
+ basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = BOOST_ASIO_MOVE_CAST(address_v4)(other.address_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Dereference the iterator.
+ const address_v4& operator*() const BOOST_ASIO_NOEXCEPT
+ {
+ return address_;
+ }
+
+ /// Dereference the iterator.
+ const address_v4* operator->() const BOOST_ASIO_NOEXCEPT
+ {
+ return &address_;
+ }
+
+ /// Pre-increment operator.
+ basic_address_iterator& operator++() BOOST_ASIO_NOEXCEPT
+ {
+ address_ = address_v4((address_.to_uint() + 1) & 0xFFFFFFFF);
+ return *this;
+ }
+
+ /// Post-increment operator.
+ basic_address_iterator operator++(int) BOOST_ASIO_NOEXCEPT
+ {
+ basic_address_iterator tmp(*this);
+ ++*this;
+ return tmp;
+ }
+
+ /// Pre-decrement operator.
+ basic_address_iterator& operator--() BOOST_ASIO_NOEXCEPT
+ {
+ address_ = address_v4((address_.to_uint() - 1) & 0xFFFFFFFF);
+ return *this;
+ }
+
+ /// Post-decrement operator.
+ basic_address_iterator operator--(int)
+ {
+ basic_address_iterator tmp(*this);
+ --*this;
+ return tmp;
+ }
+
+ /// Compare two addresses for equality.
+ friend bool operator==(const basic_address_iterator& a,
+ const basic_address_iterator& b)
+ {
+ return a.address_ == b.address_;
+ }
+
+ /// Compare two addresses for inequality.
+ friend bool operator!=(const basic_address_iterator& a,
+ const basic_address_iterator& b)
+ {
+ return a.address_ != b.address_;
+ }
+
+private:
+ address_v4 address_;
+};
+
+/// An input iterator that can be used for traversing IPv4 addresses.
+typedef basic_address_iterator<address_v4> address_v4_iterator;
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_ADDRESS_V4_ITERATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address_v4_range.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address_v4_range.hpp
new file mode 100644
index 00000000000..5e9c548bea2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address_v4_range.hpp
@@ -0,0 +1,136 @@
+//
+// ip/address_v4_range.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ADDRESS_V4_RANGE_HPP
+#define BOOST_ASIO_IP_ADDRESS_V4_RANGE_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/ip/address_v4_iterator.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename> class basic_address_range;
+
+/// Represents a range of IPv4 addresses.
+/**
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <> class basic_address_range<address_v4>
+{
+public:
+ /// The type of an iterator that points into the range.
+ typedef basic_address_iterator<address_v4> iterator;
+
+ /// Construct an empty range.
+ basic_address_range() BOOST_ASIO_NOEXCEPT
+ : begin_(address_v4()),
+ end_(address_v4())
+ {
+ }
+
+ /// Construct an range that represents the given range of addresses.
+ explicit basic_address_range(const iterator& first,
+ const iterator& last) BOOST_ASIO_NOEXCEPT
+ : begin_(first),
+ end_(last)
+ {
+ }
+
+ /// Copy constructor.
+ basic_address_range(const basic_address_range& other) BOOST_ASIO_NOEXCEPT
+ : begin_(other.begin_),
+ end_(other.end_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ basic_address_range(basic_address_range&& other) BOOST_ASIO_NOEXCEPT
+ : begin_(BOOST_ASIO_MOVE_CAST(iterator)(other.begin_)),
+ end_(BOOST_ASIO_MOVE_CAST(iterator)(other.end_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assignment operator.
+ basic_address_range& operator=(
+ const basic_address_range& other) BOOST_ASIO_NOEXCEPT
+ {
+ begin_ = other.begin_;
+ end_ = other.end_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move assignment operator.
+ basic_address_range& operator=(
+ basic_address_range&& other) BOOST_ASIO_NOEXCEPT
+ {
+ begin_ = BOOST_ASIO_MOVE_CAST(iterator)(other.begin_);
+ end_ = BOOST_ASIO_MOVE_CAST(iterator)(other.end_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Obtain an iterator that points to the start of the range.
+ iterator begin() const BOOST_ASIO_NOEXCEPT
+ {
+ return begin_;
+ }
+
+ /// Obtain an iterator that points to the end of the range.
+ iterator end() const BOOST_ASIO_NOEXCEPT
+ {
+ return end_;
+ }
+
+ /// Determine whether the range is empty.
+ bool empty() const BOOST_ASIO_NOEXCEPT
+ {
+ return size() == 0;
+ }
+
+ /// Return the size of the range.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return end_->to_uint() - begin_->to_uint();
+ }
+
+ /// Find an address in the range.
+ iterator find(const address_v4& addr) const BOOST_ASIO_NOEXCEPT
+ {
+ return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
+ }
+
+private:
+ iterator begin_;
+ iterator end_;
+};
+
+/// Represents a range of IPv4 addresses.
+typedef basic_address_range<address_v4> address_v4_range;
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_ADDRESS_V4_RANGE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address_v6.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address_v6.hpp
new file mode 100644
index 00000000000..62dff45c545
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address_v6.hpp
@@ -0,0 +1,343 @@
+//
+// ip/address_v6.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ADDRESS_V6_HPP
+#define BOOST_ASIO_IP_ADDRESS_V6_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/detail/array.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/winsock_init.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename> class basic_address_iterator;
+
+/// Implements IP version 6 style addresses.
+/**
+ * The boost::asio::ip::address_v6 class provides the ability to use and
+ * manipulate IP version 6 addresses.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class address_v6
+{
+public:
+ /// The type used to represent an address as an array of bytes.
+ /**
+ * @note This type is defined in terms of the C++0x template @c std::array
+ * when it is available. Otherwise, it uses @c boost:array.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef array<unsigned char, 16> bytes_type;
+#else
+ typedef boost::asio::detail::array<unsigned char, 16> bytes_type;
+#endif
+
+ /// Default constructor.
+ BOOST_ASIO_DECL address_v6() BOOST_ASIO_NOEXCEPT;
+
+ /// Construct an address from raw bytes and scope ID.
+ BOOST_ASIO_DECL explicit address_v6(const bytes_type& bytes,
+ unsigned long scope_id = 0);
+
+ /// Copy constructor.
+ BOOST_ASIO_DECL address_v6(const address_v6& other) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ BOOST_ASIO_DECL address_v6(address_v6&& other) BOOST_ASIO_NOEXCEPT;
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another address.
+ BOOST_ASIO_DECL address_v6& operator=(
+ const address_v6& other) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another address.
+ BOOST_ASIO_DECL address_v6& operator=(address_v6&& other) BOOST_ASIO_NOEXCEPT;
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// The scope ID of the address.
+ /**
+ * Returns the scope ID associated with the IPv6 address.
+ */
+ unsigned long scope_id() const BOOST_ASIO_NOEXCEPT
+ {
+ return scope_id_;
+ }
+
+ /// The scope ID of the address.
+ /**
+ * Modifies the scope ID associated with the IPv6 address.
+ */
+ void scope_id(unsigned long id) BOOST_ASIO_NOEXCEPT
+ {
+ scope_id_ = id;
+ }
+
+ /// Get the address in bytes, in network byte order.
+ BOOST_ASIO_DECL bytes_type to_bytes() const BOOST_ASIO_NOEXCEPT;
+
+ /// Get the address as a string.
+ BOOST_ASIO_DECL std::string to_string() const;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use other overload.) Get the address as a string.
+ BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
+
+ /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
+ /// address string.
+ static address_v6 from_string(const char* str);
+
+ /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
+ /// address string.
+ static address_v6 from_string(
+ const char* str, boost::system::error_code& ec);
+
+ /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
+ /// address string.
+ static address_v6 from_string(const std::string& str);
+
+ /// (Deprecated: Use make_address_v6().) Create an IPv6 address from an IP
+ /// address string.
+ static address_v6 from_string(
+ const std::string& str, boost::system::error_code& ec);
+
+ /// (Deprecated: Use make_address_v4().) Converts an IPv4-mapped or
+ /// IPv4-compatible address to an IPv4 address.
+ BOOST_ASIO_DECL address_v4 to_v4() const;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Determine whether the address is a loopback address.
+ BOOST_ASIO_DECL bool is_loopback() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is unspecified.
+ BOOST_ASIO_DECL bool is_unspecified() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is link local.
+ BOOST_ASIO_DECL bool is_link_local() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is site local.
+ BOOST_ASIO_DECL bool is_site_local() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a mapped IPv4 address.
+ BOOST_ASIO_DECL bool is_v4_mapped() const BOOST_ASIO_NOEXCEPT;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: No replacement.) Determine whether the address is an
+ /// IPv4-compatible address.
+ BOOST_ASIO_DECL bool is_v4_compatible() const;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Determine whether the address is a multicast address.
+ BOOST_ASIO_DECL bool is_multicast() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a global multicast address.
+ BOOST_ASIO_DECL bool is_multicast_global() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a link-local multicast address.
+ BOOST_ASIO_DECL bool is_multicast_link_local() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a node-local multicast address.
+ BOOST_ASIO_DECL bool is_multicast_node_local() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a org-local multicast address.
+ BOOST_ASIO_DECL bool is_multicast_org_local() const BOOST_ASIO_NOEXCEPT;
+
+ /// Determine whether the address is a site-local multicast address.
+ BOOST_ASIO_DECL bool is_multicast_site_local() const BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two addresses for equality.
+ BOOST_ASIO_DECL friend bool operator==(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two addresses for inequality.
+ friend bool operator!=(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a1 == a2);
+ }
+
+ /// Compare addresses for ordering.
+ BOOST_ASIO_DECL friend bool operator<(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT;
+
+ /// Compare addresses for ordering.
+ friend bool operator>(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return a2 < a1;
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator<=(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a2 < a1);
+ }
+
+ /// Compare addresses for ordering.
+ friend bool operator>=(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(a1 < a2);
+ }
+
+ /// Obtain an address object that represents any address.
+ static address_v6 any() BOOST_ASIO_NOEXCEPT
+ {
+ return address_v6();
+ }
+
+ /// Obtain an address object that represents the loopback address.
+ BOOST_ASIO_DECL static address_v6 loopback() BOOST_ASIO_NOEXCEPT;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address.
+ BOOST_ASIO_DECL static address_v6 v4_mapped(const address_v4& addr);
+
+ /// (Deprecated: No replacement.) Create an IPv4-compatible IPv6 address.
+ BOOST_ASIO_DECL static address_v6 v4_compatible(const address_v4& addr);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+private:
+ friend class basic_address_iterator<address_v6>;
+
+ // The underlying IPv6 address.
+ boost::asio::detail::in6_addr_type addr_;
+
+ // The scope ID associated with the address.
+ unsigned long scope_id_;
+};
+
+/// Create an IPv6 address from raw bytes and scope ID.
+/**
+ * @relates address_v6
+ */
+inline address_v6 make_address_v6(const address_v6::bytes_type& bytes,
+ unsigned long scope_id = 0)
+{
+ return address_v6(bytes, scope_id);
+}
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(const char* str);
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+/// Createan IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(const std::string& str);
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(string_view str);
+
+/// Create an IPv6 address from an IP address string.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Tag type used for distinguishing overloads that deal in IPv4-mapped IPv6
+/// addresses.
+enum v4_mapped_t { v4_mapped };
+
+/// Create an IPv4 address from a IPv4-mapped IPv6 address.
+/**
+ * @relates address_v4
+ */
+BOOST_ASIO_DECL address_v4 make_address_v4(
+ v4_mapped_t, const address_v6& v6_addr);
+
+/// Create an IPv4-mapped IPv6 address from an IPv4 address.
+/**
+ * @relates address_v6
+ */
+BOOST_ASIO_DECL address_v6 make_address_v6(
+ v4_mapped_t, const address_v4& v4_addr);
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Output an address as a string.
+/**
+ * Used to output a human-readable string for a specified address.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param addr The address to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::ip::address_v6
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const address_v6& addr);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ip/impl/address_v6.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/impl/address_v6.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_ADDRESS_V6_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address_v6_iterator.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address_v6_iterator.hpp
new file mode 100644
index 00000000000..4598a872b2c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address_v6_iterator.hpp
@@ -0,0 +1,185 @@
+//
+// ip/address_v6_iterator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Oliver Kowalke (oliver dot kowalke at gmail 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_ADDRESS_V6_ITERATOR_HPP
+#define BOOST_ASIO_IP_ADDRESS_V6_ITERATOR_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/ip/address_v6.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename> class basic_address_iterator;
+
+/// An input iterator that can be used for traversing IPv6 addresses.
+/**
+ * In addition to satisfying the input iterator requirements, this iterator
+ * also supports decrement.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <> class basic_address_iterator<address_v6>
+{
+public:
+ /// The type of the elements pointed to by the iterator.
+ typedef address_v6 value_type;
+
+ /// Distance between two iterators.
+ typedef std::ptrdiff_t difference_type;
+
+ /// The type of a pointer to an element pointed to by the iterator.
+ typedef const address_v6* pointer;
+
+ /// The type of a reference to an element pointed to by the iterator.
+ typedef const address_v6& reference;
+
+ /// Denotes that the iterator satisfies the input iterator requirements.
+ typedef std::input_iterator_tag iterator_category;
+
+ /// Construct an iterator that points to the specified address.
+ basic_address_iterator(const address_v6& addr) BOOST_ASIO_NOEXCEPT
+ : address_(addr)
+ {
+ }
+
+ /// Copy constructor.
+ basic_address_iterator(
+ const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
+ : address_(other.address_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ basic_address_iterator(basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
+ : address_(BOOST_ASIO_MOVE_CAST(address_v6)(other.address_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assignment operator.
+ basic_address_iterator& operator=(
+ const basic_address_iterator& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = other.address_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move assignment operator.
+ basic_address_iterator& operator=(
+ basic_address_iterator&& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = BOOST_ASIO_MOVE_CAST(address_v6)(other.address_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Dereference the iterator.
+ const address_v6& operator*() const BOOST_ASIO_NOEXCEPT
+ {
+ return address_;
+ }
+
+ /// Dereference the iterator.
+ const address_v6* operator->() const BOOST_ASIO_NOEXCEPT
+ {
+ return &address_;
+ }
+
+ /// Pre-increment operator.
+ basic_address_iterator& operator++() BOOST_ASIO_NOEXCEPT
+ {
+ for (int i = 15; i >= 0; --i)
+ {
+ if (address_.addr_.s6_addr[i] < 0xFF)
+ {
+ ++address_.addr_.s6_addr[i];
+ break;
+ }
+
+ address_.addr_.s6_addr[i] = 0;
+ }
+
+ return *this;
+ }
+
+ /// Post-increment operator.
+ basic_address_iterator operator++(int) BOOST_ASIO_NOEXCEPT
+ {
+ basic_address_iterator tmp(*this);
+ ++*this;
+ return tmp;
+ }
+
+ /// Pre-decrement operator.
+ basic_address_iterator& operator--() BOOST_ASIO_NOEXCEPT
+ {
+ for (int i = 15; i >= 0; --i)
+ {
+ if (address_.addr_.s6_addr[i] > 0)
+ {
+ --address_.addr_.s6_addr[i];
+ break;
+ }
+
+ address_.addr_.s6_addr[i] = 0xFF;
+ }
+
+ return *this;
+ }
+
+ /// Post-decrement operator.
+ basic_address_iterator operator--(int)
+ {
+ basic_address_iterator tmp(*this);
+ --*this;
+ return tmp;
+ }
+
+ /// Compare two addresses for equality.
+ friend bool operator==(const basic_address_iterator& a,
+ const basic_address_iterator& b)
+ {
+ return a.address_ == b.address_;
+ }
+
+ /// Compare two addresses for inequality.
+ friend bool operator!=(const basic_address_iterator& a,
+ const basic_address_iterator& b)
+ {
+ return a.address_ != b.address_;
+ }
+
+private:
+ address_v6 address_;
+};
+
+/// An input iterator that can be used for traversing IPv6 addresses.
+typedef basic_address_iterator<address_v6> address_v6_iterator;
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_ADDRESS_V6_ITERATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/address_v6_range.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/address_v6_range.hpp
new file mode 100644
index 00000000000..9189fde3c91
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/address_v6_range.hpp
@@ -0,0 +1,131 @@
+//
+// ip/address_v6_range.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Oliver Kowalke (oliver dot kowalke at gmail 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_ADDRESS_V6_RANGE_HPP
+#define BOOST_ASIO_IP_ADDRESS_V6_RANGE_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/ip/address_v6_iterator.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename> class basic_address_range;
+
+/// Represents a range of IPv6 addresses.
+/**
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <> class basic_address_range<address_v6>
+{
+public:
+ /// The type of an iterator that points into the range.
+ typedef basic_address_iterator<address_v6> iterator;
+
+ /// Construct an empty range.
+ basic_address_range() BOOST_ASIO_NOEXCEPT
+ : begin_(address_v6()),
+ end_(address_v6())
+ {
+ }
+
+ /// Construct an range that represents the given range of addresses.
+ explicit basic_address_range(const iterator& first,
+ const iterator& last) BOOST_ASIO_NOEXCEPT
+ : begin_(first),
+ end_(last)
+ {
+ }
+
+ /// Copy constructor.
+ basic_address_range(const basic_address_range& other) BOOST_ASIO_NOEXCEPT
+ : begin_(other.begin_),
+ end_(other.end_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ basic_address_range(basic_address_range&& other) BOOST_ASIO_NOEXCEPT
+ : begin_(BOOST_ASIO_MOVE_CAST(iterator)(other.begin_)),
+ end_(BOOST_ASIO_MOVE_CAST(iterator)(other.end_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assignment operator.
+ basic_address_range& operator=(
+ const basic_address_range& other) BOOST_ASIO_NOEXCEPT
+ {
+ begin_ = other.begin_;
+ end_ = other.end_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move assignment operator.
+ basic_address_range& operator=(
+ basic_address_range&& other) BOOST_ASIO_NOEXCEPT
+ {
+ begin_ = BOOST_ASIO_MOVE_CAST(iterator)(other.begin_);
+ end_ = BOOST_ASIO_MOVE_CAST(iterator)(other.end_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Obtain an iterator that points to the start of the range.
+ iterator begin() const BOOST_ASIO_NOEXCEPT
+ {
+ return begin_;
+ }
+
+ /// Obtain an iterator that points to the end of the range.
+ iterator end() const BOOST_ASIO_NOEXCEPT
+ {
+ return end_;
+ }
+
+ /// Determine whether the range is empty.
+ bool empty() const BOOST_ASIO_NOEXCEPT
+ {
+ return begin_ == end_;
+ }
+
+ /// Find an address in the range.
+ iterator find(const address_v6& addr) const BOOST_ASIO_NOEXCEPT
+ {
+ return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
+ }
+
+private:
+ iterator begin_;
+ iterator end_;
+};
+
+/// Represents a range of IPv6 addresses.
+typedef basic_address_range<address_v6> address_v6_range;
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_ADDRESS_V6_RANGE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/bad_address_cast.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/bad_address_cast.hpp
new file mode 100644
index 00000000000..da06983301d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/bad_address_cast.hpp
@@ -0,0 +1,55 @@
+//
+// ip/bad_address_cast.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/ip/basic_endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/basic_endpoint.hpp
new file mode 100644
index 00000000000..0951fd70d3f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/basic_endpoint.hpp
@@ -0,0 +1,266 @@
+//
+// ip/basic_endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ENDPOINT_HPP
+#define BOOST_ASIO_IP_BASIC_ENDPOINT_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/ip/address.hpp>
+#include <boost/asio/ip/detail/endpoint.hpp>
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Describes an endpoint for a version-independent IP socket.
+/**
+ * The boost::asio::ip::basic_endpoint class template describes an endpoint that
+ * may be associated with a particular socket.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * Endpoint.
+ */
+template <typename InternetProtocol>
+class basic_endpoint
+{
+public:
+ /// The protocol type associated with the endpoint.
+ typedef InternetProtocol protocol_type;
+
+ /// The type of the endpoint structure. This type is dependent on the
+ /// underlying implementation of the socket layer.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined data_type;
+#else
+ typedef boost::asio::detail::socket_addr_type data_type;
+#endif
+
+ /// Default constructor.
+ basic_endpoint() BOOST_ASIO_NOEXCEPT
+ : impl_()
+ {
+ }
+
+ /// Construct an endpoint using a port number, specified in the host's byte
+ /// order. The IP address will be the any address (i.e. INADDR_ANY or
+ /// in6addr_any). This constructor would typically be used for accepting new
+ /// connections.
+ /**
+ * @par Examples
+ * To initialise an IPv4 TCP endpoint for port 1234, use:
+ * @code
+ * boost::asio::ip::tcp::endpoint ep(boost::asio::ip::tcp::v4(), 1234);
+ * @endcode
+ *
+ * To specify an IPv6 UDP endpoint for port 9876, use:
+ * @code
+ * boost::asio::ip::udp::endpoint ep(boost::asio::ip::udp::v6(), 9876);
+ * @endcode
+ */
+ basic_endpoint(const InternetProtocol& internet_protocol,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
+ : impl_(internet_protocol.family(), port_num)
+ {
+ }
+
+ /// Construct an endpoint using a port number and an IP address. This
+ /// constructor may be used for accepting connections on a specific interface
+ /// or for making a connection to a remote endpoint.
+ basic_endpoint(const boost::asio::ip::address& addr,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
+ : impl_(addr, port_num)
+ {
+ }
+
+ /// Copy constructor.
+ basic_endpoint(const basic_endpoint& other) BOOST_ASIO_NOEXCEPT
+ : impl_(other.impl_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move constructor.
+ basic_endpoint(basic_endpoint&& other) BOOST_ASIO_NOEXCEPT
+ : impl_(other.impl_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Assign from another endpoint.
+ basic_endpoint& operator=(const basic_endpoint& other) BOOST_ASIO_NOEXCEPT
+ {
+ impl_ = other.impl_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-assign from another endpoint.
+ basic_endpoint& operator=(basic_endpoint&& other) BOOST_ASIO_NOEXCEPT
+ {
+ impl_ = other.impl_;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// The protocol associated with the endpoint.
+ protocol_type protocol() const BOOST_ASIO_NOEXCEPT
+ {
+ if (impl_.is_v4())
+ return InternetProtocol::v4();
+ return InternetProtocol::v6();
+ }
+
+ /// Get the underlying endpoint in the native type.
+ data_type* data() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.data();
+ }
+
+ /// Get the underlying endpoint in the native type.
+ const data_type* data() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.data();
+ }
+
+ /// Get the underlying size of the endpoint in the native type.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.size();
+ }
+
+ /// Set the underlying size of the endpoint in the native type.
+ void resize(std::size_t new_size)
+ {
+ impl_.resize(new_size);
+ }
+
+ /// Get the capacity of the endpoint in the native type.
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.capacity();
+ }
+
+ /// Get the port associated with the endpoint. The port number is always in
+ /// the host's byte order.
+ unsigned short port() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.port();
+ }
+
+ /// Set the port associated with the endpoint. The port number is always in
+ /// the host's byte order.
+ void port(unsigned short port_num) BOOST_ASIO_NOEXCEPT
+ {
+ impl_.port(port_num);
+ }
+
+ /// Get the IP address associated with the endpoint.
+ boost::asio::ip::address address() const BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.address();
+ }
+
+ /// Set the IP address associated with the endpoint.
+ void address(const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT
+ {
+ impl_.address(addr);
+ }
+
+ /// Compare two endpoints for equality.
+ friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
+ {
+ return e1.impl_ == e2.impl_;
+ }
+
+ /// Compare two endpoints for inequality.
+ friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(e1 == e2);
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
+ {
+ return e1.impl_ < e2.impl_;
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
+ {
+ return e2.impl_ < e1.impl_;
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(e2 < e1);
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
+ {
+ return !(e1 < e2);
+ }
+
+private:
+ // The underlying IP endpoint.
+ boost::asio::ip::detail::endpoint impl_;
+};
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Output an endpoint as a string.
+/**
+ * Used to output a human-readable string for a specified endpoint.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param endpoint The endpoint to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::ip::basic_endpoint
+ */
+template <typename Elem, typename Traits, typename InternetProtocol>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os,
+ const basic_endpoint<InternetProtocol>& endpoint);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ip/impl/basic_endpoint.hpp>
+
+#endif // BOOST_ASIO_IP_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver.hpp
new file mode 100644
index 00000000000..b937ce5c106
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver.hpp
@@ -0,0 +1,984 @@
+//
+// ip/basic_resolver.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.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_WINDOWS_RUNTIME)
+# include <boost/asio/detail/winrt_resolver_service.hpp>
+#else
+# include <boost/asio/detail/resolver_service.hpp>
+#endif
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+#if !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+#define BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename InternetProtocol, typename Executor = executor>
+class basic_resolver;
+
+#endif // !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+
+/// 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, typename Executor>
+class basic_resolver
+ : public resolver_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor 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;
+
+ /// Construct with executor.
+ /**
+ * This constructor creates a basic_resolver.
+ *
+ * @param ex The I/O executor that the resolver will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * resolver.
+ */
+ explicit basic_resolver(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct with execution context.
+ /**
+ * This constructor creates a basic_resolver.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the resolver will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the resolver.
+ */
+ template <typename ExecutionContext>
+ explicit basic_resolver(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(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(const executor_type&) constructor.
+ */
+ basic_resolver(basic_resolver&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// 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(const executor_type&) constructor.
+ */
+ basic_resolver& operator=(basic_resolver&& other)
+ {
+ impl_ = std::move(other.impl_);
+ 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()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// 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 impl_.get_service().cancel(impl_.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 = impl_.get_service().resolve(
+ impl_.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 impl_.get_service().resolve(impl_.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. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @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 = impl_.get_service().resolve(
+ impl_.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. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @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 impl_.get_service().resolve(impl_.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. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @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 = impl_.get_service().resolve(
+ impl_.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. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @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 impl_.get_service().resolve(impl_.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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+ {
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, q);
+ }
+#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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+ {
+ basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, q);
+ }
+
+ /// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+ {
+ basic_resolver_query<protocol_type> q(
+ protocol, static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, q);
+ }
+
+ /// 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 = impl_.get_service().resolve(
+ impl_.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 impl_.get_service().resolve(impl_.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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+ {
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, e);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_resolver(const basic_resolver&) BOOST_ASIO_DELETED;
+ basic_resolver& operator=(const basic_resolver&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_resolve
+ {
+ template <typename ResolveHandler, typename Query>
+ void operator()(BOOST_ASIO_MOVE_ARG(ResolveHandler) handler,
+ basic_resolver* self, const Query& q) const
+ {
+ // 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;
+
+ boost::asio::detail::non_const_lvalue<ResolveHandler> handler2(handler);
+ self->impl_.get_service().async_resolve(
+ self->impl_.get_implementation(), q, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ boost::asio::detail::io_object_impl<
+ boost::asio::detail::winrt_resolver_service<InternetProtocol>,
+ Executor> impl_;
+# else
+ boost::asio::detail::io_object_impl<
+ boost::asio::detail::resolver_service<InternetProtocol>,
+ Executor> impl_;
+# endif
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_BASIC_RESOLVER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_entry.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_entry.hpp
new file mode 100644
index 00000000000..c00f17a2aaa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_entry.hpp
@@ -0,0 +1,115 @@
+//
+// ip/basic_resolver_entry.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ENTRY_HPP
+#define BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_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/detail/string_view.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// An entry produced by a resolver.
+/**
+ * The boost::asio::ip::basic_resolver_entry class template describes an entry
+ * as returned by a resolver.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol>
+class basic_resolver_entry
+{
+public:
+ /// The protocol type associated with the endpoint entry.
+ typedef InternetProtocol protocol_type;
+
+ /// The endpoint type associated with the endpoint entry.
+ typedef typename InternetProtocol::endpoint endpoint_type;
+
+ /// Default constructor.
+ basic_resolver_entry()
+ {
+ }
+
+ /// Construct with specified endpoint, host name and service name.
+ basic_resolver_entry(const endpoint_type& ep,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service)
+ : endpoint_(ep),
+ host_name_(static_cast<std::string>(host)),
+ service_name_(static_cast<std::string>(service))
+ {
+ }
+
+ /// Get the endpoint associated with the entry.
+ endpoint_type endpoint() const
+ {
+ return endpoint_;
+ }
+
+ /// Convert to the endpoint associated with the entry.
+ operator endpoint_type() const
+ {
+ return endpoint_;
+ }
+
+ /// Get the host name associated with the entry.
+ std::string host_name() const
+ {
+ return host_name_;
+ }
+
+ /// Get the host name associated with the entry.
+ template <class Allocator>
+ std::basic_string<char, std::char_traits<char>, Allocator> host_name(
+ const Allocator& alloc = Allocator()) const
+ {
+ return std::basic_string<char, std::char_traits<char>, Allocator>(
+ host_name_.c_str(), alloc);
+ }
+
+ /// Get the service name associated with the entry.
+ std::string service_name() const
+ {
+ return service_name_;
+ }
+
+ /// Get the service name associated with the entry.
+ template <class Allocator>
+ std::basic_string<char, std::char_traits<char>, Allocator> service_name(
+ const Allocator& alloc = Allocator()) const
+ {
+ return std::basic_string<char, std::char_traits<char>, Allocator>(
+ service_name_.c_str(), alloc);
+ }
+
+private:
+ endpoint_type endpoint_;
+ std::string host_name_;
+ std::string service_name_;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_iterator.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_iterator.hpp
new file mode 100644
index 00000000000..5564a78d6f2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_iterator.hpp
@@ -0,0 +1,194 @@
+//
+// ip/basic_resolver_iterator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ITERATOR_HPP
+#define BOOST_ASIO_IP_BASIC_RESOLVER_ITERATOR_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 <iterator>
+#include <string>
+#include <vector>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/ip/basic_resolver_entry.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 {
+
+/// An iterator over the entries produced by a resolver.
+/**
+ * The boost::asio::ip::basic_resolver_iterator class template is used to define
+ * iterators over the results returned by a resolver.
+ *
+ * The iterator's value_type, obtained when the iterator is dereferenced, is:
+ * @code const basic_resolver_entry<InternetProtocol> @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol>
+class basic_resolver_iterator
+{
+public:
+ /// The type used for the distance between two iterators.
+ typedef std::ptrdiff_t difference_type;
+
+ /// The type of the value pointed to by the iterator.
+ typedef basic_resolver_entry<InternetProtocol> value_type;
+
+ /// The type of the result of applying operator->() to the iterator.
+ typedef const basic_resolver_entry<InternetProtocol>* pointer;
+
+ /// The type of the result of applying operator*() to the iterator.
+ typedef const basic_resolver_entry<InternetProtocol>& reference;
+
+ /// The iterator category.
+ typedef std::forward_iterator_tag iterator_category;
+
+ /// Default constructor creates an end iterator.
+ basic_resolver_iterator()
+ : index_(0)
+ {
+ }
+
+ /// Copy constructor.
+ basic_resolver_iterator(const basic_resolver_iterator& other)
+ : values_(other.values_),
+ index_(other.index_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move constructor.
+ basic_resolver_iterator(basic_resolver_iterator&& other)
+ : values_(BOOST_ASIO_MOVE_CAST(values_ptr_type)(other.values_)),
+ index_(other.index_)
+ {
+ other.index_ = 0;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator.
+ basic_resolver_iterator& operator=(const basic_resolver_iterator& other)
+ {
+ values_ = other.values_;
+ index_ = other.index_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-assignment operator.
+ basic_resolver_iterator& operator=(basic_resolver_iterator&& other)
+ {
+ if (this != &other)
+ {
+ values_ = BOOST_ASIO_MOVE_CAST(values_ptr_type)(other.values_);
+ index_ = other.index_;
+ other.index_ = 0;
+ }
+
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Dereference an iterator.
+ const basic_resolver_entry<InternetProtocol>& operator*() const
+ {
+ return dereference();
+ }
+
+ /// Dereference an iterator.
+ const basic_resolver_entry<InternetProtocol>* operator->() const
+ {
+ return &dereference();
+ }
+
+ /// Increment operator (prefix).
+ basic_resolver_iterator& operator++()
+ {
+ increment();
+ return *this;
+ }
+
+ /// Increment operator (postfix).
+ basic_resolver_iterator operator++(int)
+ {
+ basic_resolver_iterator tmp(*this);
+ ++*this;
+ return tmp;
+ }
+
+ /// Test two iterators for equality.
+ friend bool operator==(const basic_resolver_iterator& a,
+ const basic_resolver_iterator& b)
+ {
+ return a.equal(b);
+ }
+
+ /// Test two iterators for inequality.
+ friend bool operator!=(const basic_resolver_iterator& a,
+ const basic_resolver_iterator& b)
+ {
+ return !a.equal(b);
+ }
+
+protected:
+ void increment()
+ {
+ if (++index_ == values_->size())
+ {
+ // Reset state to match a default constructed end iterator.
+ values_.reset();
+ index_ = 0;
+ }
+ }
+
+ bool equal(const basic_resolver_iterator& other) const
+ {
+ if (!values_ && !other.values_)
+ return true;
+ if (values_ != other.values_)
+ return false;
+ return index_ == other.index_;
+ }
+
+ const basic_resolver_entry<InternetProtocol>& dereference() const
+ {
+ return (*values_)[index_];
+ }
+
+ typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+ typedef boost::asio::detail::shared_ptr<values_type> values_ptr_type;
+ values_ptr_type values_;
+ std::size_t index_;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_BASIC_RESOLVER_ITERATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_query.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_query.hpp
new file mode 100644
index 00000000000..e01597ebee0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_query.hpp
@@ -0,0 +1,246 @@
+//
+// ip/basic_resolver_query.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_QUERY_HPP
+#define BOOST_ASIO_IP_BASIC_RESOLVER_QUERY_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/detail/socket_ops.hpp>
+#include <boost/asio/ip/resolver_query_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// An query to be passed to a resolver.
+/**
+ * The boost::asio::ip::basic_resolver_query class template describes a query
+ * that can be passed to a resolver.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol>
+class basic_resolver_query
+ : public resolver_query_base
+{
+public:
+ /// The protocol type associated with the endpoint query.
+ typedef InternetProtocol protocol_type;
+
+ /// Construct with specified service name for any protocol.
+ /**
+ * This constructor is typically used to perform name resolution for local
+ * service binding.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for local service
+ * binding.
+ *
+ * @note 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.
+ */
+ basic_resolver_query(const std::string& service,
+ resolver_query_base::flags resolve_flags = passive | address_configured)
+ : hints_(),
+ host_name_(),
+ service_name_(service)
+ {
+ typename InternetProtocol::endpoint endpoint;
+ hints_.ai_flags = static_cast<int>(resolve_flags);
+ hints_.ai_family = PF_UNSPEC;
+ hints_.ai_socktype = endpoint.protocol().type();
+ hints_.ai_protocol = endpoint.protocol().protocol();
+ hints_.ai_addrlen = 0;
+ hints_.ai_canonname = 0;
+ hints_.ai_addr = 0;
+ hints_.ai_next = 0;
+ }
+
+ /// Construct with specified service name for a given protocol.
+ /**
+ * This constructor is typically used to perform name resolution for local
+ * service binding with a specific protocol version.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for local service
+ * binding.
+ *
+ * @note 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.
+ */
+ basic_resolver_query(const protocol_type& protocol,
+ const std::string& service,
+ resolver_query_base::flags resolve_flags = passive | address_configured)
+ : hints_(),
+ host_name_(),
+ service_name_(service)
+ {
+ hints_.ai_flags = static_cast<int>(resolve_flags);
+ hints_.ai_family = protocol.family();
+ hints_.ai_socktype = protocol.type();
+ hints_.ai_protocol = protocol.protocol();
+ hints_.ai_addrlen = 0;
+ hints_.ai_canonname = 0;
+ hints_.ai_addr = 0;
+ hints_.ai_next = 0;
+ }
+
+ /// Construct with specified host name and service name for any protocol.
+ /**
+ * This constructor is typically used to perform name resolution for
+ * communication with remote hosts.
+ *
+ * @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.
+ *
+ * @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.
+ */
+ basic_resolver_query(const std::string& host, const std::string& service,
+ resolver_query_base::flags resolve_flags = address_configured)
+ : hints_(),
+ host_name_(host),
+ service_name_(service)
+ {
+ typename InternetProtocol::endpoint endpoint;
+ hints_.ai_flags = static_cast<int>(resolve_flags);
+ hints_.ai_family = BOOST_ASIO_OS_DEF(AF_UNSPEC);
+ hints_.ai_socktype = endpoint.protocol().type();
+ hints_.ai_protocol = endpoint.protocol().protocol();
+ hints_.ai_addrlen = 0;
+ hints_.ai_canonname = 0;
+ hints_.ai_addr = 0;
+ hints_.ai_next = 0;
+ }
+
+ /// Construct with specified host name and service name for a given protocol.
+ /**
+ * This constructor is typically used to perform name resolution for
+ * communication with remote hosts.
+ *
+ * @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.
+ *
+ * @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.
+ */
+ basic_resolver_query(const protocol_type& protocol,
+ const std::string& host, const std::string& service,
+ resolver_query_base::flags resolve_flags = address_configured)
+ : hints_(),
+ host_name_(host),
+ service_name_(service)
+ {
+ hints_.ai_flags = static_cast<int>(resolve_flags);
+ hints_.ai_family = protocol.family();
+ hints_.ai_socktype = protocol.type();
+ hints_.ai_protocol = protocol.protocol();
+ hints_.ai_addrlen = 0;
+ hints_.ai_canonname = 0;
+ hints_.ai_addr = 0;
+ hints_.ai_next = 0;
+ }
+
+ /// Get the hints associated with the query.
+ const boost::asio::detail::addrinfo_type& hints() const
+ {
+ return hints_;
+ }
+
+ /// Get the host name associated with the query.
+ std::string host_name() const
+ {
+ return host_name_;
+ }
+
+ /// Get the service name associated with the query.
+ std::string service_name() const
+ {
+ return service_name_;
+ }
+
+private:
+ boost::asio::detail::addrinfo_type hints_;
+ std::string host_name_;
+ std::string service_name_;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_BASIC_RESOLVER_QUERY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_results.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_results.hpp
new file mode 100644
index 00000000000..64d1937c177
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/basic_resolver_results.hpp
@@ -0,0 +1,313 @@
+//
+// ip/basic_resolver_results.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/ip/detail/endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/detail/endpoint.hpp
new file mode 100644
index 00000000000..690e6b17039
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/detail/endpoint.hpp
@@ -0,0 +1,143 @@
+//
+// ip/detail/endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_ENDPOINT_HPP
+#define BOOST_ASIO_IP_DETAIL_ENDPOINT_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/detail/socket_types.hpp>
+#include <boost/asio/detail/winsock_init.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/ip/address.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+namespace detail {
+
+// Helper class for implementating an IP endpoint.
+class endpoint
+{
+public:
+ // Default constructor.
+ BOOST_ASIO_DECL endpoint() BOOST_ASIO_NOEXCEPT;
+
+ // Construct an endpoint using a family and port number.
+ BOOST_ASIO_DECL endpoint(int family,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT;
+
+ // Construct an endpoint using an address and port number.
+ BOOST_ASIO_DECL endpoint(const boost::asio::ip::address& addr,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT;
+
+ // Copy constructor.
+ endpoint(const endpoint& other) BOOST_ASIO_NOEXCEPT
+ : data_(other.data_)
+ {
+ }
+
+ // Assign from another endpoint.
+ endpoint& operator=(const endpoint& other) BOOST_ASIO_NOEXCEPT
+ {
+ data_ = other.data_;
+ return *this;
+ }
+
+ // Get the underlying endpoint in the native type.
+ boost::asio::detail::socket_addr_type* data() BOOST_ASIO_NOEXCEPT
+ {
+ return &data_.base;
+ }
+
+ // Get the underlying endpoint in the native type.
+ const boost::asio::detail::socket_addr_type* data() const BOOST_ASIO_NOEXCEPT
+ {
+ return &data_.base;
+ }
+
+ // Get the underlying size of the endpoint in the native type.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ if (is_v4())
+ return sizeof(boost::asio::detail::sockaddr_in4_type);
+ else
+ return sizeof(boost::asio::detail::sockaddr_in6_type);
+ }
+
+ // Set the underlying size of the endpoint in the native type.
+ BOOST_ASIO_DECL void resize(std::size_t new_size);
+
+ // Get the capacity of the endpoint in the native type.
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return sizeof(data_);
+ }
+
+ // Get the port associated with the endpoint.
+ BOOST_ASIO_DECL unsigned short port() const BOOST_ASIO_NOEXCEPT;
+
+ // Set the port associated with the endpoint.
+ BOOST_ASIO_DECL void port(unsigned short port_num) BOOST_ASIO_NOEXCEPT;
+
+ // Get the IP address associated with the endpoint.
+ BOOST_ASIO_DECL boost::asio::ip::address address() const BOOST_ASIO_NOEXCEPT;
+
+ // Set the IP address associated with the endpoint.
+ BOOST_ASIO_DECL void address(
+ const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT;
+
+ // Compare two endpoints for equality.
+ BOOST_ASIO_DECL friend bool operator==(const endpoint& e1,
+ const endpoint& e2) BOOST_ASIO_NOEXCEPT;
+
+ // Compare endpoints for ordering.
+ BOOST_ASIO_DECL friend bool operator<(const endpoint& e1,
+ const endpoint& e2) BOOST_ASIO_NOEXCEPT;
+
+ // Determine whether the endpoint is IPv4.
+ bool is_v4() const BOOST_ASIO_NOEXCEPT
+ {
+ return data_.base.sa_family == BOOST_ASIO_OS_DEF(AF_INET);
+ }
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+ // Convert to a string.
+ BOOST_ASIO_DECL std::string to_string() const;
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+private:
+ // The underlying IP socket address.
+ union data_union
+ {
+ boost::asio::detail::socket_addr_type base;
+ boost::asio::detail::sockaddr_in4_type v4;
+ boost::asio::detail::sockaddr_in6_type v6;
+ } data_;
+};
+
+} // namespace detail
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/detail/impl/endpoint.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_DETAIL_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/detail/impl/endpoint.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/detail/impl/endpoint.ipp
new file mode 100644
index 00000000000..92974299995
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/detail/impl/endpoint.ipp
@@ -0,0 +1,201 @@
+//
+// ip/detail/impl/endpoint.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_IMPL_ENDPOINT_IPP
+#define BOOST_ASIO_IP_DETAIL_IMPL_ENDPOINT_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>
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# include <sstream>
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/ip/detail/endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+namespace detail {
+
+endpoint::endpoint() BOOST_ASIO_NOEXCEPT
+ : data_()
+{
+ data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
+ data_.v4.sin_port = 0;
+ data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY);
+}
+
+endpoint::endpoint(int family, unsigned short port_num) BOOST_ASIO_NOEXCEPT
+ : data_()
+{
+ using namespace std; // For memcpy.
+ if (family == BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
+ data_.v4.sin_port =
+ boost::asio::detail::socket_ops::host_to_network_short(port_num);
+ data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY);
+ }
+ else
+ {
+ data_.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
+ data_.v6.sin6_port =
+ boost::asio::detail::socket_ops::host_to_network_short(port_num);
+ data_.v6.sin6_flowinfo = 0;
+ data_.v6.sin6_addr.s6_addr[0] = 0; data_.v6.sin6_addr.s6_addr[1] = 0;
+ data_.v6.sin6_addr.s6_addr[2] = 0; data_.v6.sin6_addr.s6_addr[3] = 0;
+ data_.v6.sin6_addr.s6_addr[4] = 0; data_.v6.sin6_addr.s6_addr[5] = 0;
+ data_.v6.sin6_addr.s6_addr[6] = 0; data_.v6.sin6_addr.s6_addr[7] = 0;
+ data_.v6.sin6_addr.s6_addr[8] = 0; data_.v6.sin6_addr.s6_addr[9] = 0;
+ data_.v6.sin6_addr.s6_addr[10] = 0; data_.v6.sin6_addr.s6_addr[11] = 0;
+ data_.v6.sin6_addr.s6_addr[12] = 0; data_.v6.sin6_addr.s6_addr[13] = 0;
+ data_.v6.sin6_addr.s6_addr[14] = 0; data_.v6.sin6_addr.s6_addr[15] = 0;
+ data_.v6.sin6_scope_id = 0;
+ }
+}
+
+endpoint::endpoint(const boost::asio::ip::address& addr,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
+ : data_()
+{
+ using namespace std; // For memcpy.
+ if (addr.is_v4())
+ {
+ data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
+ data_.v4.sin_port =
+ boost::asio::detail::socket_ops::host_to_network_short(port_num);
+ data_.v4.sin_addr.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ addr.to_v4().to_uint());
+ }
+ else
+ {
+ data_.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
+ data_.v6.sin6_port =
+ boost::asio::detail::socket_ops::host_to_network_short(port_num);
+ data_.v6.sin6_flowinfo = 0;
+ boost::asio::ip::address_v6 v6_addr = addr.to_v6();
+ boost::asio::ip::address_v6::bytes_type bytes = v6_addr.to_bytes();
+ memcpy(data_.v6.sin6_addr.s6_addr, bytes.data(), 16);
+ data_.v6.sin6_scope_id =
+ static_cast<boost::asio::detail::u_long_type>(
+ v6_addr.scope_id());
+ }
+}
+
+void endpoint::resize(std::size_t new_size)
+{
+ if (new_size > sizeof(boost::asio::detail::sockaddr_storage_type))
+ {
+ boost::system::error_code ec(boost::asio::error::invalid_argument);
+ boost::asio::detail::throw_error(ec);
+ }
+}
+
+unsigned short endpoint::port() const BOOST_ASIO_NOEXCEPT
+{
+ if (is_v4())
+ {
+ return boost::asio::detail::socket_ops::network_to_host_short(
+ data_.v4.sin_port);
+ }
+ else
+ {
+ return boost::asio::detail::socket_ops::network_to_host_short(
+ data_.v6.sin6_port);
+ }
+}
+
+void endpoint::port(unsigned short port_num) BOOST_ASIO_NOEXCEPT
+{
+ if (is_v4())
+ {
+ data_.v4.sin_port
+ = boost::asio::detail::socket_ops::host_to_network_short(port_num);
+ }
+ else
+ {
+ data_.v6.sin6_port
+ = boost::asio::detail::socket_ops::host_to_network_short(port_num);
+ }
+}
+
+boost::asio::ip::address endpoint::address() const BOOST_ASIO_NOEXCEPT
+{
+ using namespace std; // For memcpy.
+ if (is_v4())
+ {
+ return boost::asio::ip::address_v4(
+ boost::asio::detail::socket_ops::network_to_host_long(
+ data_.v4.sin_addr.s_addr));
+ }
+ else
+ {
+ boost::asio::ip::address_v6::bytes_type bytes;
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+ memcpy(bytes.data(), data_.v6.sin6_addr.s6_addr, 16);
+#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
+ memcpy(bytes.elems, data_.v6.sin6_addr.s6_addr, 16);
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+ return boost::asio::ip::address_v6(bytes, data_.v6.sin6_scope_id);
+ }
+}
+
+void endpoint::address(const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT
+{
+ endpoint tmp_endpoint(addr, port());
+ data_ = tmp_endpoint.data_;
+}
+
+bool operator==(const endpoint& e1, const endpoint& e2) BOOST_ASIO_NOEXCEPT
+{
+ return e1.address() == e2.address() && e1.port() == e2.port();
+}
+
+bool operator<(const endpoint& e1, const endpoint& e2) BOOST_ASIO_NOEXCEPT
+{
+ if (e1.address() < e2.address())
+ return true;
+ if (e1.address() != e2.address())
+ return false;
+ return e1.port() < e2.port();
+}
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+std::string endpoint::to_string() const
+{
+ std::ostringstream tmp_os;
+ tmp_os.imbue(std::locale::classic());
+ if (is_v4())
+ tmp_os << address();
+ else
+ tmp_os << '[' << address() << ']';
+ tmp_os << ':' << port();
+
+ return tmp_os.str();
+}
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace detail
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_DETAIL_IMPL_ENDPOINT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/detail/socket_option.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/detail/socket_option.hpp
new file mode 100644
index 00000000000..7f8b3f586f7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/detail/socket_option.hpp
@@ -0,0 +1,568 @@
+//
+// detail/socket_option.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_SOCKET_OPTION_HPP
+#define BOOST_ASIO_IP_DETAIL_SOCKET_OPTION_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 <stdexcept>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/ip/address.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+namespace detail {
+namespace socket_option {
+
+// Helper template for implementing multicast enable loopback options.
+template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
+class multicast_enable_loopback
+{
+public:
+#if defined(__sun) || defined(__osf__)
+ typedef unsigned char ipv4_value_type;
+ typedef unsigned char ipv6_value_type;
+#elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__)
+ typedef unsigned char ipv4_value_type;
+ typedef unsigned int ipv6_value_type;
+#else
+ typedef int ipv4_value_type;
+ typedef int ipv6_value_type;
+#endif
+
+ // Default constructor.
+ multicast_enable_loopback()
+ : ipv4_value_(0),
+ ipv6_value_(0)
+ {
+ }
+
+ // Construct with a specific option value.
+ explicit multicast_enable_loopback(bool v)
+ : ipv4_value_(v ? 1 : 0),
+ ipv6_value_(v ? 1 : 0)
+ {
+ }
+
+ // Set the value of the boolean.
+ multicast_enable_loopback& operator=(bool v)
+ {
+ ipv4_value_ = v ? 1 : 0;
+ ipv6_value_ = v ? 1 : 0;
+ return *this;
+ }
+
+ // Get the current value of the boolean.
+ bool value() const
+ {
+ return !!ipv4_value_;
+ }
+
+ // Convert to bool.
+ operator bool() const
+ {
+ return !!ipv4_value_;
+ }
+
+ // Test for false.
+ bool operator!() const
+ {
+ return !ipv4_value_;
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Level;
+ return IPv4_Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Name;
+ return IPv4_Name;
+ }
+
+ // Get the address of the boolean data.
+ template <typename Protocol>
+ void* data(const Protocol& protocol)
+ {
+ if (protocol.family() == PF_INET6)
+ return &ipv6_value_;
+ return &ipv4_value_;
+ }
+
+ // Get the address of the boolean data.
+ template <typename Protocol>
+ const void* data(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return &ipv6_value_;
+ return &ipv4_value_;
+ }
+
+ // Get the size of the boolean data.
+ template <typename Protocol>
+ std::size_t size(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return sizeof(ipv6_value_);
+ return sizeof(ipv4_value_);
+ }
+
+ // Set the size of the boolean data.
+ template <typename Protocol>
+ void resize(const Protocol& protocol, std::size_t s)
+ {
+ if (protocol.family() == PF_INET6)
+ {
+ if (s != sizeof(ipv6_value_))
+ {
+ std::length_error ex("multicast_enable_loopback socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ ipv4_value_ = ipv6_value_ ? 1 : 0;
+ }
+ else
+ {
+ if (s != sizeof(ipv4_value_))
+ {
+ std::length_error ex("multicast_enable_loopback socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ ipv6_value_ = ipv4_value_ ? 1 : 0;
+ }
+ }
+
+private:
+ ipv4_value_type ipv4_value_;
+ ipv6_value_type ipv6_value_;
+};
+
+// Helper template for implementing unicast hops options.
+template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
+class unicast_hops
+{
+public:
+ // Default constructor.
+ unicast_hops()
+ : value_(0)
+ {
+ }
+
+ // Construct with a specific option value.
+ explicit unicast_hops(int v)
+ : value_(v)
+ {
+ }
+
+ // Set the value of the option.
+ unicast_hops& operator=(int v)
+ {
+ value_ = v;
+ return *this;
+ }
+
+ // Get the current value of the option.
+ int value() const
+ {
+ return value_;
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Level;
+ return IPv4_Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Name;
+ return IPv4_Name;
+ }
+
+ // Get the address of the data.
+ template <typename Protocol>
+ int* data(const Protocol&)
+ {
+ return &value_;
+ }
+
+ // Get the address of the data.
+ template <typename Protocol>
+ const int* data(const Protocol&) const
+ {
+ return &value_;
+ }
+
+ // Get the size of the data.
+ template <typename Protocol>
+ std::size_t size(const Protocol&) const
+ {
+ return sizeof(value_);
+ }
+
+ // Set the size of the data.
+ template <typename Protocol>
+ void resize(const Protocol&, std::size_t s)
+ {
+ if (s != sizeof(value_))
+ {
+ std::length_error ex("unicast hops socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+#if defined(__hpux)
+ if (value_ < 0)
+ value_ = value_ & 0xFF;
+#endif
+ }
+
+private:
+ int value_;
+};
+
+// Helper template for implementing multicast hops options.
+template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
+class multicast_hops
+{
+public:
+#if defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE)
+ typedef int ipv4_value_type;
+#else
+ typedef unsigned char ipv4_value_type;
+#endif
+ typedef int ipv6_value_type;
+
+ // Default constructor.
+ multicast_hops()
+ : ipv4_value_(0),
+ ipv6_value_(0)
+ {
+ }
+
+ // Construct with a specific option value.
+ explicit multicast_hops(int v)
+ {
+ if (v < 0 || v > 255)
+ {
+ std::out_of_range ex("multicast hops value out of range");
+ boost::asio::detail::throw_exception(ex);
+ }
+ ipv4_value_ = (ipv4_value_type)v;
+ ipv6_value_ = v;
+ }
+
+ // Set the value of the option.
+ multicast_hops& operator=(int v)
+ {
+ if (v < 0 || v > 255)
+ {
+ std::out_of_range ex("multicast hops value out of range");
+ boost::asio::detail::throw_exception(ex);
+ }
+ ipv4_value_ = (ipv4_value_type)v;
+ ipv6_value_ = v;
+ return *this;
+ }
+
+ // Get the current value of the option.
+ int value() const
+ {
+ return ipv6_value_;
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Level;
+ return IPv4_Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Name;
+ return IPv4_Name;
+ }
+
+ // Get the address of the data.
+ template <typename Protocol>
+ void* data(const Protocol& protocol)
+ {
+ if (protocol.family() == PF_INET6)
+ return &ipv6_value_;
+ return &ipv4_value_;
+ }
+
+ // Get the address of the data.
+ template <typename Protocol>
+ const void* data(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return &ipv6_value_;
+ return &ipv4_value_;
+ }
+
+ // Get the size of the data.
+ template <typename Protocol>
+ std::size_t size(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return sizeof(ipv6_value_);
+ return sizeof(ipv4_value_);
+ }
+
+ // Set the size of the data.
+ template <typename Protocol>
+ void resize(const Protocol& protocol, std::size_t s)
+ {
+ if (protocol.family() == PF_INET6)
+ {
+ if (s != sizeof(ipv6_value_))
+ {
+ std::length_error ex("multicast hops socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ if (ipv6_value_ < 0)
+ ipv4_value_ = 0;
+ else if (ipv6_value_ > 255)
+ ipv4_value_ = 255;
+ else
+ ipv4_value_ = (ipv4_value_type)ipv6_value_;
+ }
+ else
+ {
+ if (s != sizeof(ipv4_value_))
+ {
+ std::length_error ex("multicast hops socket option resize");
+ boost::asio::detail::throw_exception(ex);
+ }
+ ipv6_value_ = ipv4_value_;
+ }
+ }
+
+private:
+ ipv4_value_type ipv4_value_;
+ ipv6_value_type ipv6_value_;
+};
+
+// Helper template for implementing ip_mreq-based options.
+template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
+class multicast_request
+{
+public:
+ // Default constructor.
+ multicast_request()
+ : ipv4_value_(), // Zero-initialisation gives the "any" address.
+ ipv6_value_() // Zero-initialisation gives the "any" address.
+ {
+ }
+
+ // Construct with multicast address only.
+ explicit multicast_request(const address& multicast_address)
+ : ipv4_value_(), // Zero-initialisation gives the "any" address.
+ ipv6_value_() // Zero-initialisation gives the "any" address.
+ {
+ if (multicast_address.is_v6())
+ {
+ using namespace std; // For memcpy.
+ address_v6 ipv6_address = multicast_address.to_v6();
+ address_v6::bytes_type bytes = ipv6_address.to_bytes();
+ memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16);
+ ipv6_value_.ipv6mr_interface = ipv6_address.scope_id();
+ }
+ else
+ {
+ ipv4_value_.imr_multiaddr.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ multicast_address.to_v4().to_uint());
+ ipv4_value_.imr_interface.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ address_v4::any().to_uint());
+ }
+ }
+
+ // Construct with multicast address and IPv4 address specifying an interface.
+ explicit multicast_request(const address_v4& multicast_address,
+ const address_v4& network_interface = address_v4::any())
+ : ipv6_value_() // Zero-initialisation gives the "any" address.
+ {
+ ipv4_value_.imr_multiaddr.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ multicast_address.to_uint());
+ ipv4_value_.imr_interface.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ network_interface.to_uint());
+ }
+
+ // Construct with multicast address and IPv6 network interface index.
+ explicit multicast_request(
+ const address_v6& multicast_address,
+ unsigned long network_interface = 0)
+ : ipv4_value_() // Zero-initialisation gives the "any" address.
+ {
+ using namespace std; // For memcpy.
+ address_v6::bytes_type bytes = multicast_address.to_bytes();
+ memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16);
+ if (network_interface)
+ ipv6_value_.ipv6mr_interface = network_interface;
+ else
+ ipv6_value_.ipv6mr_interface = multicast_address.scope_id();
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Level;
+ return IPv4_Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Name;
+ return IPv4_Name;
+ }
+
+ // Get the address of the option data.
+ template <typename Protocol>
+ const void* data(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return &ipv6_value_;
+ return &ipv4_value_;
+ }
+
+ // Get the size of the option data.
+ template <typename Protocol>
+ std::size_t size(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return sizeof(ipv6_value_);
+ return sizeof(ipv4_value_);
+ }
+
+private:
+ boost::asio::detail::in4_mreq_type ipv4_value_;
+ boost::asio::detail::in6_mreq_type ipv6_value_;
+};
+
+// Helper template for implementing options that specify a network interface.
+template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name>
+class network_interface
+{
+public:
+ // Default constructor.
+ network_interface()
+ {
+ ipv4_value_.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ address_v4::any().to_uint());
+ ipv6_value_ = 0;
+ }
+
+ // Construct with IPv4 interface.
+ explicit network_interface(const address_v4& ipv4_interface)
+ {
+ ipv4_value_.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ ipv4_interface.to_uint());
+ ipv6_value_ = 0;
+ }
+
+ // Construct with IPv6 interface.
+ explicit network_interface(unsigned int ipv6_interface)
+ {
+ ipv4_value_.s_addr =
+ boost::asio::detail::socket_ops::host_to_network_long(
+ address_v4::any().to_uint());
+ ipv6_value_ = ipv6_interface;
+ }
+
+ // Get the level of the socket option.
+ template <typename Protocol>
+ int level(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Level;
+ return IPv4_Level;
+ }
+
+ // Get the name of the socket option.
+ template <typename Protocol>
+ int name(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return IPv6_Name;
+ return IPv4_Name;
+ }
+
+ // Get the address of the option data.
+ template <typename Protocol>
+ const void* data(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return &ipv6_value_;
+ return &ipv4_value_;
+ }
+
+ // Get the size of the option data.
+ template <typename Protocol>
+ std::size_t size(const Protocol& protocol) const
+ {
+ if (protocol.family() == PF_INET6)
+ return sizeof(ipv6_value_);
+ return sizeof(ipv4_value_);
+ }
+
+private:
+ boost::asio::detail::in4_addr_type ipv4_value_;
+ unsigned int ipv6_value_;
+};
+
+} // namespace socket_option
+} // namespace detail
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_DETAIL_SOCKET_OPTION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/host_name.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/host_name.hpp
new file mode 100644
index 00000000000..bb893ef24bb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/host_name.hpp
@@ -0,0 +1,44 @@
+//
+// ip/host_name.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HOST_NAME_HPP
+#define BOOST_ASIO_IP_HOST_NAME_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/system/error_code.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Get the current host name.
+BOOST_ASIO_DECL std::string host_name();
+
+/// Get the current host name.
+BOOST_ASIO_DECL std::string host_name(boost::system::error_code& ec);
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/impl/host_name.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_HOST_NAME_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/icmp.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/icmp.hpp
new file mode 100644
index 00000000000..229529f7702
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/icmp.hpp
@@ -0,0 +1,117 @@
+//
+// ip/icmp.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ICMP_HPP
+#define BOOST_ASIO_IP_ICMP_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/socket_types.hpp>
+#include <boost/asio/basic_raw_socket.hpp>
+#include <boost/asio/ip/basic_endpoint.hpp>
+#include <boost/asio/ip/basic_resolver.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Encapsulates the flags needed for ICMP.
+/**
+ * The boost::asio::ip::icmp class contains flags necessary for ICMP sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol, InternetProtocol.
+ */
+class icmp
+{
+public:
+ /// The type of a ICMP endpoint.
+ typedef basic_endpoint<icmp> endpoint;
+
+ /// Construct to represent the IPv4 ICMP protocol.
+ static icmp v4()
+ {
+ return icmp(BOOST_ASIO_OS_DEF(IPPROTO_ICMP),
+ BOOST_ASIO_OS_DEF(AF_INET));
+ }
+
+ /// Construct to represent the IPv6 ICMP protocol.
+ static icmp v6()
+ {
+ return icmp(BOOST_ASIO_OS_DEF(IPPROTO_ICMPV6),
+ BOOST_ASIO_OS_DEF(AF_INET6));
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_RAW);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return protocol_;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// The ICMP socket type.
+ typedef basic_raw_socket<icmp> socket;
+
+ /// The ICMP resolver type.
+ typedef basic_resolver<icmp> resolver;
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const icmp& p1, const icmp& p2)
+ {
+ return p1.protocol_ == p2.protocol_ && p1.family_ == p2.family_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const icmp& p1, const icmp& p2)
+ {
+ return p1.protocol_ != p2.protocol_ || p1.family_ != p2.family_;
+ }
+
+private:
+ // Construct with a specific family.
+ explicit icmp(int protocol_id, int protocol_family)
+ : protocol_(protocol_id),
+ family_(protocol_family)
+ {
+ }
+
+ int protocol_;
+ int family_;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_ICMP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/address.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address.hpp
new file mode 100644
index 00000000000..63f6b2e0ac6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address.hpp
@@ -0,0 +1,69 @@
+//
+// ip/impl/address.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_ADDRESS_HPP
+#define BOOST_ASIO_IP_IMPL_ADDRESS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+inline address address::from_string(const char* str)
+{
+ return boost::asio::ip::make_address(str);
+}
+
+inline address address::from_string(
+ const char* str, boost::system::error_code& ec)
+{
+ return boost::asio::ip::make_address(str, ec);
+}
+
+inline address address::from_string(const std::string& str)
+{
+ return boost::asio::ip::make_address(str);
+}
+
+inline address address::from_string(
+ const std::string& str, boost::system::error_code& ec)
+{
+ return boost::asio::ip::make_address(str, ec);
+}
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const address& addr)
+{
+ return os << addr.to_string().c_str();
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_IP_IMPL_ADDRESS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/address.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address.ipp
new file mode 100644
index 00000000000..2dc55290b02
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address.ipp
@@ -0,0 +1,241 @@
+//
+// ip/impl/address.ipp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_ADDRESS_IPP
+#define BOOST_ASIO_IP_IMPL_ADDRESS_IPP
+
+#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/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/ip/address.hpp>
+#include <boost/asio/ip/bad_address_cast.hpp>
+#include <boost/system/system_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+address::address() BOOST_ASIO_NOEXCEPT
+ : type_(ipv4),
+ ipv4_address_(),
+ ipv6_address_()
+{
+}
+
+address::address(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT
+ : type_(ipv4),
+ ipv4_address_(ipv4_address),
+ ipv6_address_()
+{
+}
+
+address::address(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT
+ : type_(ipv6),
+ ipv4_address_(),
+ ipv6_address_(ipv6_address)
+{
+}
+
+address::address(const address& other) BOOST_ASIO_NOEXCEPT
+ : type_(other.type_),
+ ipv4_address_(other.ipv4_address_),
+ ipv6_address_(other.ipv6_address_)
+{
+}
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+address::address(address&& other) BOOST_ASIO_NOEXCEPT
+ : type_(other.type_),
+ ipv4_address_(other.ipv4_address_),
+ ipv6_address_(other.ipv6_address_)
+{
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+address& address::operator=(const address& other) BOOST_ASIO_NOEXCEPT
+{
+ type_ = other.type_;
+ ipv4_address_ = other.ipv4_address_;
+ ipv6_address_ = other.ipv6_address_;
+ return *this;
+}
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+address& address::operator=(address&& other) BOOST_ASIO_NOEXCEPT
+{
+ type_ = other.type_;
+ ipv4_address_ = other.ipv4_address_;
+ ipv6_address_ = other.ipv6_address_;
+ return *this;
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+address& address::operator=(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT
+{
+ type_ = ipv4;
+ ipv4_address_ = ipv4_address;
+ ipv6_address_ = boost::asio::ip::address_v6();
+ return *this;
+}
+
+address& address::operator=(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT
+{
+ type_ = ipv6;
+ ipv4_address_ = boost::asio::ip::address_v4();
+ ipv6_address_ = ipv6_address;
+ return *this;
+}
+
+address make_address(const char* str)
+{
+ boost::system::error_code ec;
+ address addr = make_address(str, ec);
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+address make_address(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ boost::asio::ip::address_v6 ipv6_address =
+ boost::asio::ip::make_address_v6(str, ec);
+ if (!ec)
+ return address(ipv6_address);
+
+ boost::asio::ip::address_v4 ipv4_address =
+ boost::asio::ip::make_address_v4(str, ec);
+ if (!ec)
+ return address(ipv4_address);
+
+ return address();
+}
+
+address make_address(const std::string& str)
+{
+ return make_address(str.c_str());
+}
+
+address make_address(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ return make_address(str.c_str(), ec);
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+address make_address(string_view str)
+{
+ return make_address(static_cast<std::string>(str));
+}
+
+address make_address(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ return make_address(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+boost::asio::ip::address_v4 address::to_v4() const
+{
+ if (type_ != ipv4)
+ {
+ bad_address_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ return ipv4_address_;
+}
+
+boost::asio::ip::address_v6 address::to_v6() const
+{
+ if (type_ != ipv6)
+ {
+ bad_address_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+ return ipv6_address_;
+}
+
+std::string address::to_string() const
+{
+ if (type_ == ipv6)
+ return ipv6_address_.to_string();
+ return ipv4_address_.to_string();
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+std::string address::to_string(boost::system::error_code& ec) const
+{
+ if (type_ == ipv6)
+ return ipv6_address_.to_string(ec);
+ return ipv4_address_.to_string(ec);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+bool address::is_loopback() const BOOST_ASIO_NOEXCEPT
+{
+ return (type_ == ipv4)
+ ? ipv4_address_.is_loopback()
+ : ipv6_address_.is_loopback();
+}
+
+bool address::is_unspecified() const BOOST_ASIO_NOEXCEPT
+{
+ return (type_ == ipv4)
+ ? ipv4_address_.is_unspecified()
+ : ipv6_address_.is_unspecified();
+}
+
+bool address::is_multicast() const BOOST_ASIO_NOEXCEPT
+{
+ return (type_ == ipv4)
+ ? ipv4_address_.is_multicast()
+ : ipv6_address_.is_multicast();
+}
+
+bool operator==(const address& a1, const address& a2) BOOST_ASIO_NOEXCEPT
+{
+ if (a1.type_ != a2.type_)
+ return false;
+ if (a1.type_ == address::ipv6)
+ return a1.ipv6_address_ == a2.ipv6_address_;
+ return a1.ipv4_address_ == a2.ipv4_address_;
+}
+
+bool operator<(const address& a1, const address& a2) BOOST_ASIO_NOEXCEPT
+{
+ if (a1.type_ < a2.type_)
+ return true;
+ if (a1.type_ > a2.type_)
+ return false;
+ if (a1.type_ == address::ipv6)
+ return a1.ipv6_address_ < a2.ipv6_address_;
+ return a1.ipv4_address_ < a2.ipv4_address_;
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_IMPL_ADDRESS_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.hpp
new file mode 100644
index 00000000000..98bd89d89f2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.hpp
@@ -0,0 +1,69 @@
+//
+// ip/impl/address_v4.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_ADDRESS_V4_HPP
+#define BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+inline address_v4 address_v4::from_string(const char* str)
+{
+ return boost::asio::ip::make_address_v4(str);
+}
+
+inline address_v4 address_v4::from_string(
+ const char* str, boost::system::error_code& ec)
+{
+ return boost::asio::ip::make_address_v4(str, ec);
+}
+
+inline address_v4 address_v4::from_string(const std::string& str)
+{
+ return boost::asio::ip::make_address_v4(str);
+}
+
+inline address_v4 address_v4::from_string(
+ const std::string& str, boost::system::error_code& ec)
+{
+ return boost::asio::ip::make_address_v4(str, ec);
+}
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const address_v4& addr)
+{
+ return os << addr.to_string().c_str();
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.ipp
new file mode 100644
index 00000000000..c572100a8bc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v4.ipp
@@ -0,0 +1,212 @@
+//
+// ip/impl/address_v4.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_ADDRESS_V4_IPP
+#define BOOST_ASIO_IP_IMPL_ADDRESS_V4_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <climits>
+#include <limits>
+#include <stdexcept>
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+address_v4::address_v4(const address_v4::bytes_type& bytes)
+{
+#if UCHAR_MAX > 0xFF
+ if (bytes[0] > 0xFF || bytes[1] > 0xFF
+ || bytes[2] > 0xFF || bytes[3] > 0xFF)
+ {
+ std::out_of_range ex("address_v4 from bytes_type");
+ boost::asio::detail::throw_exception(ex);
+ }
+#endif // UCHAR_MAX > 0xFF
+
+ using namespace std; // For memcpy.
+ memcpy(&addr_.s_addr, bytes.data(), 4);
+}
+
+address_v4::address_v4(address_v4::uint_type addr)
+{
+ if ((std::numeric_limits<uint_type>::max)() > 0xFFFFFFFF)
+ {
+ std::out_of_range ex("address_v4 from unsigned integer");
+ boost::asio::detail::throw_exception(ex);
+ }
+
+ addr_.s_addr = boost::asio::detail::socket_ops::host_to_network_long(
+ static_cast<boost::asio::detail::u_long_type>(addr));
+}
+
+address_v4::bytes_type address_v4::to_bytes() const BOOST_ASIO_NOEXCEPT
+{
+ using namespace std; // For memcpy.
+ bytes_type bytes;
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+ memcpy(bytes.data(), &addr_.s_addr, 4);
+#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
+ memcpy(bytes.elems, &addr_.s_addr, 4);
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+ return bytes;
+}
+
+address_v4::uint_type address_v4::to_uint() const BOOST_ASIO_NOEXCEPT
+{
+ return boost::asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+unsigned long address_v4::to_ulong() const
+{
+ return boost::asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+std::string address_v4::to_string() const
+{
+ boost::system::error_code ec;
+ char addr_str[boost::asio::detail::max_addr_v4_str_len];
+ const char* addr =
+ boost::asio::detail::socket_ops::inet_ntop(
+ BOOST_ASIO_OS_DEF(AF_INET), &addr_, addr_str,
+ boost::asio::detail::max_addr_v4_str_len, 0, ec);
+ if (addr == 0)
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+std::string address_v4::to_string(boost::system::error_code& ec) const
+{
+ char addr_str[boost::asio::detail::max_addr_v4_str_len];
+ const char* addr =
+ boost::asio::detail::socket_ops::inet_ntop(
+ BOOST_ASIO_OS_DEF(AF_INET), &addr_, addr_str,
+ boost::asio::detail::max_addr_v4_str_len, 0, ec);
+ if (addr == 0)
+ return std::string();
+ return addr;
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+bool address_v4::is_loopback() const BOOST_ASIO_NOEXCEPT
+{
+ return (to_uint() & 0xFF000000) == 0x7F000000;
+}
+
+bool address_v4::is_unspecified() const BOOST_ASIO_NOEXCEPT
+{
+ return to_uint() == 0;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+bool address_v4::is_class_a() const
+{
+ return (to_uint() & 0x80000000) == 0;
+}
+
+bool address_v4::is_class_b() const
+{
+ return (to_uint() & 0xC0000000) == 0x80000000;
+}
+
+bool address_v4::is_class_c() const
+{
+ return (to_uint() & 0xE0000000) == 0xC0000000;
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+bool address_v4::is_multicast() const BOOST_ASIO_NOEXCEPT
+{
+ return (to_uint() & 0xF0000000) == 0xE0000000;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+address_v4 address_v4::broadcast(const address_v4& addr, const address_v4& mask)
+{
+ return address_v4(addr.to_uint() | (mask.to_uint() ^ 0xFFFFFFFF));
+}
+
+address_v4 address_v4::netmask(const address_v4& addr)
+{
+ if (addr.is_class_a())
+ return address_v4(0xFF000000);
+ if (addr.is_class_b())
+ return address_v4(0xFFFF0000);
+ if (addr.is_class_c())
+ return address_v4(0xFFFFFF00);
+ return address_v4(0xFFFFFFFF);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+address_v4 make_address_v4(const char* str)
+{
+ boost::system::error_code ec;
+ address_v4 addr = make_address_v4(str, ec);
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+address_v4 make_address_v4(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ address_v4::bytes_type bytes;
+ if (boost::asio::detail::socket_ops::inet_pton(
+ BOOST_ASIO_OS_DEF(AF_INET), str, &bytes, 0, ec) <= 0)
+ return address_v4();
+ return address_v4(bytes);
+}
+
+address_v4 make_address_v4(const std::string& str)
+{
+ return make_address_v4(str.c_str());
+}
+
+address_v4 make_address_v4(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ return make_address_v4(str.c_str(), ec);
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+address_v4 make_address_v4(string_view str)
+{
+ return make_address_v4(static_cast<std::string>(str));
+}
+
+address_v4 make_address_v4(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ return make_address_v4(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V4_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.hpp
new file mode 100644
index 00000000000..ebfd467e0f6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.hpp
@@ -0,0 +1,69 @@
+//
+// ip/impl/address_v6.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_ADDRESS_V6_HPP
+#define BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+inline address_v6 address_v6::from_string(const char* str)
+{
+ return boost::asio::ip::make_address_v6(str);
+}
+
+inline address_v6 address_v6::from_string(
+ const char* str, boost::system::error_code& ec)
+{
+ return boost::asio::ip::make_address_v6(str, ec);
+}
+
+inline address_v6 address_v6::from_string(const std::string& str)
+{
+ return boost::asio::ip::make_address_v6(str);
+}
+
+inline address_v6 address_v6::from_string(
+ const std::string& str, boost::system::error_code& ec)
+{
+ return boost::asio::ip::make_address_v6(str, ec);
+}
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
+{
+ return os << addr.to_string().c_str();
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.ipp
new file mode 100644
index 00000000000..7ea2f24e1fd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/address_v6.ipp
@@ -0,0 +1,352 @@
+//
+// ip/impl/address_v6.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_ADDRESS_V6_IPP
+#define BOOST_ASIO_IP_IMPL_ADDRESS_V6_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 <stdexcept>
+#include <typeinfo>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/ip/address_v6.hpp>
+#include <boost/asio/ip/bad_address_cast.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+address_v6::address_v6() BOOST_ASIO_NOEXCEPT
+ : addr_(),
+ scope_id_(0)
+{
+}
+
+address_v6::address_v6(const address_v6::bytes_type& bytes,
+ unsigned long scope)
+ : scope_id_(scope)
+{
+#if UCHAR_MAX > 0xFF
+ for (std::size_t i = 0; i < bytes.size(); ++i)
+ {
+ if (bytes[i] > 0xFF)
+ {
+ std::out_of_range ex("address_v6 from bytes_type");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+#endif // UCHAR_MAX > 0xFF
+
+ using namespace std; // For memcpy.
+ memcpy(addr_.s6_addr, bytes.data(), 16);
+}
+
+address_v6::address_v6(const address_v6& other) BOOST_ASIO_NOEXCEPT
+ : addr_(other.addr_),
+ scope_id_(other.scope_id_)
+{
+}
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+address_v6::address_v6(address_v6&& other) BOOST_ASIO_NOEXCEPT
+ : addr_(other.addr_),
+ scope_id_(other.scope_id_)
+{
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+address_v6& address_v6::operator=(const address_v6& other) BOOST_ASIO_NOEXCEPT
+{
+ addr_ = other.addr_;
+ scope_id_ = other.scope_id_;
+ return *this;
+}
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+address_v6& address_v6::operator=(address_v6&& other) BOOST_ASIO_NOEXCEPT
+{
+ addr_ = other.addr_;
+ scope_id_ = other.scope_id_;
+ return *this;
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+address_v6::bytes_type address_v6::to_bytes() const BOOST_ASIO_NOEXCEPT
+{
+ using namespace std; // For memcpy.
+ bytes_type bytes;
+#if defined(BOOST_ASIO_HAS_STD_ARRAY)
+ memcpy(bytes.data(), addr_.s6_addr, 16);
+#else // defined(BOOST_ASIO_HAS_STD_ARRAY)
+ memcpy(bytes.elems, addr_.s6_addr, 16);
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY)
+ return bytes;
+}
+
+std::string address_v6::to_string() const
+{
+ boost::system::error_code ec;
+ char addr_str[boost::asio::detail::max_addr_v6_str_len];
+ const char* addr =
+ boost::asio::detail::socket_ops::inet_ntop(
+ BOOST_ASIO_OS_DEF(AF_INET6), &addr_, addr_str,
+ boost::asio::detail::max_addr_v6_str_len, scope_id_, ec);
+ if (addr == 0)
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+std::string address_v6::to_string(boost::system::error_code& ec) const
+{
+ char addr_str[boost::asio::detail::max_addr_v6_str_len];
+ const char* addr =
+ boost::asio::detail::socket_ops::inet_ntop(
+ BOOST_ASIO_OS_DEF(AF_INET6), &addr_, addr_str,
+ boost::asio::detail::max_addr_v6_str_len, scope_id_, ec);
+ if (addr == 0)
+ return std::string();
+ return addr;
+}
+
+address_v4 address_v6::to_v4() const
+{
+ if (!is_v4_mapped() && !is_v4_compatible())
+ {
+ bad_address_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+
+ address_v4::bytes_type v4_bytes = { { addr_.s6_addr[12],
+ addr_.s6_addr[13], addr_.s6_addr[14], addr_.s6_addr[15] } };
+ return address_v4(v4_bytes);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+bool address_v6::is_loopback() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
+ && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
+ && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
+ && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
+ && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
+ && (addr_.s6_addr[10] == 0) && (addr_.s6_addr[11] == 0)
+ && (addr_.s6_addr[12] == 0) && (addr_.s6_addr[13] == 0)
+ && (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 1));
+}
+
+bool address_v6::is_unspecified() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
+ && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
+ && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
+ && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
+ && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
+ && (addr_.s6_addr[10] == 0) && (addr_.s6_addr[11] == 0)
+ && (addr_.s6_addr[12] == 0) && (addr_.s6_addr[13] == 0)
+ && (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 0));
+}
+
+bool address_v6::is_link_local() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0x80));
+}
+
+bool address_v6::is_site_local() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0xc0));
+}
+
+bool address_v6::is_v4_mapped() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
+ && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
+ && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
+ && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
+ && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
+ && (addr_.s6_addr[10] == 0xff) && (addr_.s6_addr[11] == 0xff));
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+bool address_v6::is_v4_compatible() const
+{
+ return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
+ && (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
+ && (addr_.s6_addr[4] == 0) && (addr_.s6_addr[5] == 0)
+ && (addr_.s6_addr[6] == 0) && (addr_.s6_addr[7] == 0)
+ && (addr_.s6_addr[8] == 0) && (addr_.s6_addr[9] == 0)
+ && (addr_.s6_addr[10] == 0) && (addr_.s6_addr[11] == 0)
+ && !((addr_.s6_addr[12] == 0)
+ && (addr_.s6_addr[13] == 0)
+ && (addr_.s6_addr[14] == 0)
+ && ((addr_.s6_addr[15] == 0) || (addr_.s6_addr[15] == 1))));
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+bool address_v6::is_multicast() const BOOST_ASIO_NOEXCEPT
+{
+ return (addr_.s6_addr[0] == 0xff);
+}
+
+bool address_v6::is_multicast_global() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x0e));
+}
+
+bool address_v6::is_multicast_link_local() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x02));
+}
+
+bool address_v6::is_multicast_node_local() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x01));
+}
+
+bool address_v6::is_multicast_org_local() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x08));
+}
+
+bool address_v6::is_multicast_site_local() const BOOST_ASIO_NOEXCEPT
+{
+ return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x05));
+}
+
+bool operator==(const address_v6& a1, const address_v6& a2) BOOST_ASIO_NOEXCEPT
+{
+ using namespace std; // For memcmp.
+ return memcmp(&a1.addr_, &a2.addr_,
+ sizeof(boost::asio::detail::in6_addr_type)) == 0
+ && a1.scope_id_ == a2.scope_id_;
+}
+
+bool operator<(const address_v6& a1, const address_v6& a2) BOOST_ASIO_NOEXCEPT
+{
+ using namespace std; // For memcmp.
+ int memcmp_result = memcmp(&a1.addr_, &a2.addr_,
+ sizeof(boost::asio::detail::in6_addr_type));
+ if (memcmp_result < 0)
+ return true;
+ if (memcmp_result > 0)
+ return false;
+ return a1.scope_id_ < a2.scope_id_;
+}
+
+address_v6 address_v6::loopback() BOOST_ASIO_NOEXCEPT
+{
+ address_v6 tmp;
+ tmp.addr_.s6_addr[15] = 1;
+ return tmp;
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+address_v6 address_v6::v4_mapped(const address_v4& addr)
+{
+ address_v4::bytes_type v4_bytes = addr.to_bytes();
+ bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF,
+ v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
+ return address_v6(v6_bytes);
+}
+
+address_v6 address_v6::v4_compatible(const address_v4& addr)
+{
+ address_v4::bytes_type v4_bytes = addr.to_bytes();
+ bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
+ return address_v6(v6_bytes);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+address_v6 make_address_v6(const char* str)
+{
+ boost::system::error_code ec;
+ address_v6 addr = make_address_v6(str, ec);
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+address_v6 make_address_v6(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ address_v6::bytes_type bytes;
+ unsigned long scope_id = 0;
+ if (boost::asio::detail::socket_ops::inet_pton(
+ BOOST_ASIO_OS_DEF(AF_INET6), str, &bytes[0], &scope_id, ec) <= 0)
+ return address_v6();
+ return address_v6(bytes, scope_id);
+}
+
+address_v6 make_address_v6(const std::string& str)
+{
+ return make_address_v6(str.c_str());
+}
+
+address_v6 make_address_v6(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ return make_address_v6(str.c_str(), ec);
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+address_v6 make_address_v6(string_view str)
+{
+ return make_address_v6(static_cast<std::string>(str));
+}
+
+address_v6 make_address_v6(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
+{
+ return make_address_v6(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+address_v4 make_address_v4(
+ v4_mapped_t, const address_v6& v6_addr)
+{
+ if (!v6_addr.is_v4_mapped())
+ {
+ bad_address_cast ex;
+ boost::asio::detail::throw_exception(ex);
+ }
+
+ address_v6::bytes_type v6_bytes = v6_addr.to_bytes();
+ address_v4::bytes_type v4_bytes = { { v6_bytes[12],
+ v6_bytes[13], v6_bytes[14], v6_bytes[15] } };
+ return address_v4(v4_bytes);
+}
+
+address_v6 make_address_v6(
+ v4_mapped_t, const address_v4& v4_addr)
+{
+ address_v4::bytes_type v4_bytes = v4_addr.to_bytes();
+ address_v6::bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0xFF, 0xFF, v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
+ return address_v6(v6_bytes);
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V6_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/basic_endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/basic_endpoint.hpp
new file mode 100644
index 00000000000..5eba9252425
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/basic_endpoint.hpp
@@ -0,0 +1,45 @@
+//
+// ip/impl/basic_endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_BASIC_ENDPOINT_HPP
+#define BOOST_ASIO_IP_IMPL_BASIC_ENDPOINT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename Elem, typename Traits, typename InternetProtocol>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os,
+ const basic_endpoint<InternetProtocol>& endpoint)
+{
+ boost::asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port());
+ return os << tmp_ep.to_string().c_str();
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_IP_IMPL_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/host_name.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/host_name.ipp
new file mode 100644
index 00000000000..565e5459a3f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/host_name.ipp
@@ -0,0 +1,56 @@
+//
+// ip/impl/host_name.ipp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_HOST_NAME_IPP
+#define BOOST_ASIO_IP_IMPL_HOST_NAME_IPP
+
+#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/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/winsock_init.hpp>
+#include <boost/asio/ip/host_name.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+std::string host_name()
+{
+ char name[1024];
+ boost::system::error_code ec;
+ if (boost::asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0)
+ {
+ boost::asio::detail::throw_error(ec);
+ return std::string();
+ }
+ return std::string(name);
+}
+
+std::string host_name(boost::system::error_code& ec)
+{
+ char name[1024];
+ if (boost::asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0)
+ return std::string();
+ return std::string(name);
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_IMPL_HOST_NAME_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.hpp
new file mode 100644
index 00000000000..e20a6fefc9b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.hpp
@@ -0,0 +1,56 @@
+//
+// ip/impl/network_v4.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IMPL_NETWORK_V4_HPP
+#define BOOST_ASIO_IP_IMPL_NETWORK_V4_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const network_v4& addr)
+{
+ boost::system::error_code ec;
+ std::string s = addr.to_string(ec);
+ if (ec)
+ {
+ if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
+ boost::asio::detail::throw_error(ec);
+ else
+ os.setstate(std::basic_ostream<Elem, Traits>::failbit);
+ }
+ else
+ for (std::string::iterator i = s.begin(); i != s.end(); ++i)
+ os << os.widen(*i);
+ return os;
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_IP_IMPL_NETWORK_V4_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.ipp
new file mode 100644
index 00000000000..d4434751835
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v4.ipp
@@ -0,0 +1,218 @@
+//
+// ip/impl/network_v4.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IMPL_NETWORK_V4_IPP
+#define BOOST_ASIO_IP_IMPL_NETWORK_V4_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <climits>
+#include <cstdio>
+#include <cstdlib>
+#include <stdexcept>
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/ip/network_v4.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+network_v4::network_v4(const address_v4& addr, unsigned short prefix_len)
+ : address_(addr),
+ prefix_length_(prefix_len)
+{
+ if (prefix_len > 32)
+ {
+ std::out_of_range ex("prefix length too large");
+ boost::asio::detail::throw_exception(ex);
+ }
+}
+
+network_v4::network_v4(const address_v4& addr, const address_v4& mask)
+ : address_(addr),
+ prefix_length_(0)
+{
+ address_v4::bytes_type mask_bytes = mask.to_bytes();
+ bool finished = false;
+ for (std::size_t i = 0; i < mask_bytes.size(); ++i)
+ {
+ if (finished)
+ {
+ if (mask_bytes[i])
+ {
+ std::invalid_argument ex("non-contiguous netmask");
+ boost::asio::detail::throw_exception(ex);
+ }
+ continue;
+ }
+ else
+ {
+ switch (mask_bytes[i])
+ {
+ case 255:
+ prefix_length_ += 8;
+ break;
+ case 254: // prefix_length_ += 7
+ prefix_length_ += 1;
+ case 252: // prefix_length_ += 6
+ prefix_length_ += 1;
+ case 248: // prefix_length_ += 5
+ prefix_length_ += 1;
+ case 240: // prefix_length_ += 4
+ prefix_length_ += 1;
+ case 224: // prefix_length_ += 3
+ prefix_length_ += 1;
+ case 192: // prefix_length_ += 2
+ prefix_length_ += 1;
+ case 128: // prefix_length_ += 1
+ prefix_length_ += 1;
+ case 0: // nbits += 0
+ finished = true;
+ break;
+ default:
+ std::out_of_range ex("non-contiguous netmask");
+ boost::asio::detail::throw_exception(ex);
+ }
+ }
+ }
+}
+
+address_v4 network_v4::netmask() const BOOST_ASIO_NOEXCEPT
+{
+ uint32_t nmbits = 0xffffffff;
+ if (prefix_length_ == 0)
+ nmbits = 0;
+ else
+ nmbits = nmbits << (32 - prefix_length_);
+ return address_v4(nmbits);
+}
+
+address_v4_range network_v4::hosts() const BOOST_ASIO_NOEXCEPT
+{
+ return is_host()
+ ? address_v4_range(address_, address_v4(address_.to_uint() + 1))
+ : address_v4_range(address_v4(network().to_uint() + 1), broadcast());
+}
+
+bool network_v4::is_subnet_of(const network_v4& other) const
+{
+ if (other.prefix_length_ >= prefix_length_)
+ return false; // Only real subsets are allowed.
+ const network_v4 me(address_, other.prefix_length_);
+ return other.canonical() == me.canonical();
+}
+
+std::string network_v4::to_string() const
+{
+ boost::system::error_code ec;
+ std::string addr = to_string(ec);
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+std::string network_v4::to_string(boost::system::error_code& ec) const
+{
+ using namespace std; // For sprintf.
+ ec = boost::system::error_code();
+ char prefix_len[16];
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf(prefix_len, "/%u", prefix_length_);
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ return address_.to_string() + prefix_len;
+}
+
+network_v4 make_network_v4(const char* str)
+{
+ return make_network_v4(std::string(str));
+}
+
+network_v4 make_network_v4(const char* str, boost::system::error_code& ec)
+{
+ return make_network_v4(std::string(str), ec);
+}
+
+network_v4 make_network_v4(const std::string& str)
+{
+ boost::system::error_code ec;
+ network_v4 net = make_network_v4(str, ec);
+ boost::asio::detail::throw_error(ec);
+ return net;
+}
+
+network_v4 make_network_v4(const std::string& str,
+ boost::system::error_code& ec)
+{
+ std::string::size_type pos = str.find_first_of("/");
+
+ if (pos == std::string::npos)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v4();
+ }
+
+ if (pos == str.size() - 1)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v4();
+ }
+
+ std::string::size_type end = str.find_first_not_of("0123456789", pos + 1);
+ if (end != std::string::npos)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v4();
+ }
+
+ const address_v4 addr = make_address_v4(str.substr(0, pos), ec);
+ if (ec)
+ return network_v4();
+
+ const int prefix_len = std::atoi(str.substr(pos + 1).c_str());
+ if (prefix_len < 0 || prefix_len > 32)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v4();
+ }
+
+ return network_v4(addr, static_cast<unsigned short>(prefix_len));
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+network_v4 make_network_v4(string_view str)
+{
+ return make_network_v4(static_cast<std::string>(str));
+}
+
+network_v4 make_network_v4(string_view str,
+ boost::system::error_code& ec)
+{
+ return make_network_v4(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_IMPL_NETWORK_V4_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.hpp
new file mode 100644
index 00000000000..6be5ab533f9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.hpp
@@ -0,0 +1,55 @@
+//
+// ip/impl/network_v6.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IMPL_NETWORK_V6_HPP
+#define BOOST_ASIO_IP_IMPL_NETWORK_V6_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const network_v6& addr)
+{
+ boost::system::error_code ec;
+ std::string s = addr.to_string(ec);
+ if (ec)
+ {
+ if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
+ boost::asio::detail::throw_error(ec);
+ else
+ os.setstate(std::basic_ostream<Elem, Traits>::failbit);
+ }
+ else
+ for (std::string::iterator i = s.begin(); i != s.end(); ++i)
+ os << os.widen(*i);
+ return os;
+}
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_IP_IMPL_NETWORK_V6_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.ipp b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.ipp
new file mode 100644
index 00000000000..cbdb974489b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/impl/network_v6.ipp
@@ -0,0 +1,187 @@
+//
+// ip/impl/network_v6.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IMPL_NETWORK_V6_IPP
+#define BOOST_ASIO_IP_IMPL_NETWORK_V6_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <climits>
+#include <cstdio>
+#include <cstdlib>
+#include <stdexcept>
+#include <boost/asio/error.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/ip/network_v6.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+network_v6::network_v6(const address_v6& addr, unsigned short prefix_len)
+ : address_(addr),
+ prefix_length_(prefix_len)
+{
+ if (prefix_len > 128)
+ {
+ std::out_of_range ex("prefix length too large");
+ boost::asio::detail::throw_exception(ex);
+ }
+}
+
+BOOST_ASIO_DECL address_v6 network_v6::network() const BOOST_ASIO_NOEXCEPT
+{
+ address_v6::bytes_type bytes(address_.to_bytes());
+ for (std::size_t i = 0; i < 16; ++i)
+ {
+ if (prefix_length_ <= i * 8)
+ bytes[i] = 0;
+ else if (prefix_length_ < (i + 1) * 8)
+ bytes[i] &= 0xFF00 >> (prefix_length_ % 8);
+ }
+ return address_v6(bytes, address_.scope_id());
+}
+
+address_v6_range network_v6::hosts() const BOOST_ASIO_NOEXCEPT
+{
+ address_v6::bytes_type begin_bytes(address_.to_bytes());
+ address_v6::bytes_type end_bytes(address_.to_bytes());
+ for (std::size_t i = 0; i < 16; ++i)
+ {
+ if (prefix_length_ <= i * 8)
+ {
+ begin_bytes[i] = 0;
+ end_bytes[i] = 0xFF;
+ }
+ else if (prefix_length_ < (i + 1) * 8)
+ {
+ begin_bytes[i] &= 0xFF00 >> (prefix_length_ % 8);
+ end_bytes[i] |= 0xFF >> (prefix_length_ % 8);
+ }
+ }
+ return address_v6_range(
+ address_v6_iterator(address_v6(begin_bytes, address_.scope_id())),
+ ++address_v6_iterator(address_v6(end_bytes, address_.scope_id())));
+}
+
+bool network_v6::is_subnet_of(const network_v6& other) const
+{
+ if (other.prefix_length_ >= prefix_length_)
+ return false; // Only real subsets are allowed.
+ const network_v6 me(address_, other.prefix_length_);
+ return other.canonical() == me.canonical();
+}
+
+std::string network_v6::to_string() const
+{
+ boost::system::error_code ec;
+ std::string addr = to_string(ec);
+ boost::asio::detail::throw_error(ec);
+ return addr;
+}
+
+std::string network_v6::to_string(boost::system::error_code& ec) const
+{
+ using namespace std; // For sprintf.
+ ec = boost::system::error_code();
+ char prefix_len[16];
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf(prefix_len, "/%u", prefix_length_);
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ return address_.to_string() + prefix_len;
+}
+
+network_v6 make_network_v6(const char* str)
+{
+ return make_network_v6(std::string(str));
+}
+
+network_v6 make_network_v6(const char* str, boost::system::error_code& ec)
+{
+ return make_network_v6(std::string(str), ec);
+}
+
+network_v6 make_network_v6(const std::string& str)
+{
+ boost::system::error_code ec;
+ network_v6 net = make_network_v6(str, ec);
+ boost::asio::detail::throw_error(ec);
+ return net;
+}
+
+network_v6 make_network_v6(const std::string& str,
+ boost::system::error_code& ec)
+{
+ std::string::size_type pos = str.find_first_of("/");
+
+ if (pos == std::string::npos)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v6();
+ }
+
+ if (pos == str.size() - 1)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v6();
+ }
+
+ std::string::size_type end = str.find_first_not_of("0123456789", pos + 1);
+ if (end != std::string::npos)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v6();
+ }
+
+ const address_v6 addr = make_address_v6(str.substr(0, pos), ec);
+ if (ec)
+ return network_v6();
+
+ const int prefix_len = std::atoi(str.substr(pos + 1).c_str());
+ if (prefix_len < 0 || prefix_len > 128)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return network_v6();
+ }
+
+ return network_v6(addr, static_cast<unsigned short>(prefix_len));
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+network_v6 make_network_v6(string_view str)
+{
+ return make_network_v6(static_cast<std::string>(str));
+}
+
+network_v6 make_network_v6(string_view str,
+ boost::system::error_code& ec)
+{
+ return make_network_v6(static_cast<std::string>(str), ec);
+}
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_IMPL_NETWORK_V6_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/multicast.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/multicast.hpp
new file mode 100644
index 00000000000..d8632841921
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/multicast.hpp
@@ -0,0 +1,193 @@
+//
+// ip/multicast.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_MULTICAST_HPP
+#define BOOST_ASIO_IP_MULTICAST_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/ip/detail/socket_option.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+namespace multicast {
+
+/// Socket option to join a multicast group on a specified interface.
+/**
+ * Implements the IPPROTO_IP/IP_ADD_MEMBERSHIP socket option.
+ *
+ * @par Examples
+ * Setting the option to join a multicast group:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::address multicast_address =
+ * boost::asio::ip::address::from_string("225.0.0.1");
+ * boost::asio::ip::multicast::join_group option(multicast_address);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par Concepts:
+ * SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined join_group;
+#else
+typedef boost::asio::ip::detail::socket_option::multicast_request<
+ BOOST_ASIO_OS_DEF(IPPROTO_IP),
+ BOOST_ASIO_OS_DEF(IP_ADD_MEMBERSHIP),
+ BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
+ BOOST_ASIO_OS_DEF(IPV6_JOIN_GROUP)> join_group;
+#endif
+
+/// Socket option to leave a multicast group on a specified interface.
+/**
+ * Implements the IPPROTO_IP/IP_DROP_MEMBERSHIP socket option.
+ *
+ * @par Examples
+ * Setting the option to leave a multicast group:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::address multicast_address =
+ * boost::asio::ip::address::from_string("225.0.0.1");
+ * boost::asio::ip::multicast::leave_group option(multicast_address);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par Concepts:
+ * SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined leave_group;
+#else
+typedef boost::asio::ip::detail::socket_option::multicast_request<
+ BOOST_ASIO_OS_DEF(IPPROTO_IP),
+ BOOST_ASIO_OS_DEF(IP_DROP_MEMBERSHIP),
+ BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
+ BOOST_ASIO_OS_DEF(IPV6_LEAVE_GROUP)> leave_group;
+#endif
+
+/// Socket option for local interface to use for outgoing multicast packets.
+/**
+ * Implements the IPPROTO_IP/IP_MULTICAST_IF socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::address_v4 local_interface =
+ * boost::asio::ip::address_v4::from_string("1.2.3.4");
+ * boost::asio::ip::multicast::outbound_interface option(local_interface);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par Concepts:
+ * SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined outbound_interface;
+#else
+typedef boost::asio::ip::detail::socket_option::network_interface<
+ BOOST_ASIO_OS_DEF(IPPROTO_IP),
+ BOOST_ASIO_OS_DEF(IP_MULTICAST_IF),
+ BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
+ BOOST_ASIO_OS_DEF(IPV6_MULTICAST_IF)> outbound_interface;
+#endif
+
+/// Socket option for time-to-live associated with outgoing multicast packets.
+/**
+ * Implements the IPPROTO_IP/IP_MULTICAST_TTL socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::multicast::hops option(4);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::multicast::hops option;
+ * socket.get_option(option);
+ * int ttl = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * GettableSocketOption, SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined hops;
+#else
+typedef boost::asio::ip::detail::socket_option::multicast_hops<
+ BOOST_ASIO_OS_DEF(IPPROTO_IP),
+ BOOST_ASIO_OS_DEF(IP_MULTICAST_TTL),
+ BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
+ BOOST_ASIO_OS_DEF(IPV6_MULTICAST_HOPS)> hops;
+#endif
+
+/// Socket option determining whether outgoing multicast packets will be
+/// received on the same socket if it is a member of the multicast group.
+/**
+ * Implements the IPPROTO_IP/IP_MULTICAST_LOOP socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::multicast::enable_loopback option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::multicast::enable_loopback option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * GettableSocketOption, SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined enable_loopback;
+#else
+typedef boost::asio::ip::detail::socket_option::multicast_enable_loopback<
+ BOOST_ASIO_OS_DEF(IPPROTO_IP),
+ BOOST_ASIO_OS_DEF(IP_MULTICAST_LOOP),
+ BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
+ BOOST_ASIO_OS_DEF(IPV6_MULTICAST_LOOP)> enable_loopback;
+#endif
+
+} // namespace multicast
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_MULTICAST_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/network_v4.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/network_v4.hpp
new file mode 100644
index 00000000000..25cbbce69f0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/network_v4.hpp
@@ -0,0 +1,263 @@
+//
+// ip/network_v4.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_NETWORK_V4_HPP
+#define BOOST_ASIO_IP_NETWORK_V4_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/detail/string_view.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/ip/address_v4_range.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Represents an IPv4 network.
+/**
+ * The boost::asio::ip::network_v4 class provides the ability to use and
+ * manipulate IP version 4 networks.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class network_v4
+{
+public:
+ /// Default constructor.
+ network_v4() BOOST_ASIO_NOEXCEPT
+ : address_(),
+ prefix_length_(0)
+ {
+ }
+
+ /// Construct a network based on the specified address and prefix length.
+ BOOST_ASIO_DECL network_v4(const address_v4& addr,
+ unsigned short prefix_len);
+
+ /// Construct network based on the specified address and netmask.
+ BOOST_ASIO_DECL network_v4(const address_v4& addr,
+ const address_v4& mask);
+
+ /// Copy constructor.
+ network_v4(const network_v4& other) BOOST_ASIO_NOEXCEPT
+ : address_(other.address_),
+ prefix_length_(other.prefix_length_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ network_v4(network_v4&& other) BOOST_ASIO_NOEXCEPT
+ : address_(BOOST_ASIO_MOVE_CAST(address_v4)(other.address_)),
+ prefix_length_(other.prefix_length_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another network.
+ network_v4& operator=(const network_v4& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = other.address_;
+ prefix_length_ = other.prefix_length_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another network.
+ network_v4& operator=(network_v4&& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = BOOST_ASIO_MOVE_CAST(address_v4)(other.address_);
+ prefix_length_ = other.prefix_length_;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Obtain the address object specified when the network object was created.
+ address_v4 address() const BOOST_ASIO_NOEXCEPT
+ {
+ return address_;
+ }
+
+ /// Obtain the prefix length that was specified when the network object was
+ /// created.
+ unsigned short prefix_length() const BOOST_ASIO_NOEXCEPT
+ {
+ return prefix_length_;
+ }
+
+ /// Obtain the netmask that was specified when the network object was created.
+ BOOST_ASIO_DECL address_v4 netmask() const BOOST_ASIO_NOEXCEPT;
+
+ /// Obtain an address object that represents the network address.
+ address_v4 network() const BOOST_ASIO_NOEXCEPT
+ {
+ return address_v4(address_.to_uint() & netmask().to_uint());
+ }
+
+ /// Obtain an address object that represents the network's broadcast address.
+ address_v4 broadcast() const BOOST_ASIO_NOEXCEPT
+ {
+ return address_v4(network().to_uint() | (netmask().to_uint() ^ 0xFFFFFFFF));
+ }
+
+ /// Obtain an address range corresponding to the hosts in the network.
+ BOOST_ASIO_DECL address_v4_range hosts() const BOOST_ASIO_NOEXCEPT;
+
+ /// Obtain the true network address, omitting any host bits.
+ network_v4 canonical() const BOOST_ASIO_NOEXCEPT
+ {
+ return network_v4(network(), netmask());
+ }
+
+ /// Test if network is a valid host address.
+ bool is_host() const BOOST_ASIO_NOEXCEPT
+ {
+ return prefix_length_ == 32;
+ }
+
+ /// Test if a network is a real subnet of another network.
+ BOOST_ASIO_DECL bool is_subnet_of(const network_v4& other) const;
+
+ /// Get the network as an address in dotted decimal format.
+ BOOST_ASIO_DECL std::string to_string() const;
+
+ /// Get the network as an address in dotted decimal format.
+ BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
+
+ /// Compare two networks for equality.
+ friend bool operator==(const network_v4& a, const network_v4& b)
+ {
+ return a.address_ == b.address_ && a.prefix_length_ == b.prefix_length_;
+ }
+
+ /// Compare two networks for inequality.
+ friend bool operator!=(const network_v4& a, const network_v4& b)
+ {
+ return !(a == b);
+ }
+
+private:
+ address_v4 address_;
+ unsigned short prefix_length_;
+};
+
+/// Create an IPv4 network from an address and prefix length.
+/**
+ * @relates address_v4
+ */
+inline network_v4 make_network_v4(
+ const address_v4& addr, unsigned short prefix_len)
+{
+ return network_v4(addr, prefix_len);
+}
+
+/// Create an IPv4 network from an address and netmask.
+/**
+ * @relates address_v4
+ */
+inline network_v4 make_network_v4(
+ const address_v4& addr, const address_v4& mask)
+{
+ return network_v4(addr, mask);
+}
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+BOOST_ASIO_DECL network_v4 make_network_v4(const char* str);
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+BOOST_ASIO_DECL network_v4 make_network_v4(
+ const char* str, boost::system::error_code& ec);
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+BOOST_ASIO_DECL network_v4 make_network_v4(const std::string& str);
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+BOOST_ASIO_DECL network_v4 make_network_v4(
+ const std::string& str, boost::system::error_code& ec);
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+BOOST_ASIO_DECL network_v4 make_network_v4(string_view str);
+
+/// Create an IPv4 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v4
+ */
+BOOST_ASIO_DECL network_v4 make_network_v4(
+ string_view str, boost::system::error_code& ec);
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Output a network as a string.
+/**
+ * Used to output a human-readable string for a specified network.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param net The network to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::ip::address_v4
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const network_v4& net);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ip/impl/network_v4.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/impl/network_v4.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_NETWORK_V4_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/network_v6.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/network_v6.hpp
new file mode 100644
index 00000000000..dce950870b5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/network_v6.hpp
@@ -0,0 +1,237 @@
+//
+// ip/network_v6.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_NETWORK_V6_HPP
+#define BOOST_ASIO_IP_NETWORK_V6_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/detail/string_view.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/ip/address_v6_range.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Represents an IPv6 network.
+/**
+ * The boost::asio::ip::network_v6 class provides the ability to use and
+ * manipulate IP version 6 networks.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class network_v6
+{
+public:
+ /// Default constructor.
+ network_v6() BOOST_ASIO_NOEXCEPT
+ : address_(),
+ prefix_length_(0)
+ {
+ }
+
+ /// Construct a network based on the specified address and prefix length.
+ BOOST_ASIO_DECL network_v6(const address_v6& addr,
+ unsigned short prefix_len);
+
+ /// Copy constructor.
+ network_v6(const network_v6& other) BOOST_ASIO_NOEXCEPT
+ : address_(other.address_),
+ prefix_length_(other.prefix_length_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ network_v6(network_v6&& other) BOOST_ASIO_NOEXCEPT
+ : address_(BOOST_ASIO_MOVE_CAST(address_v6)(other.address_)),
+ prefix_length_(other.prefix_length_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another network.
+ network_v6& operator=(const network_v6& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = other.address_;
+ prefix_length_ = other.prefix_length_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another network.
+ network_v6& operator=(network_v6&& other) BOOST_ASIO_NOEXCEPT
+ {
+ address_ = BOOST_ASIO_MOVE_CAST(address_v6)(other.address_);
+ prefix_length_ = other.prefix_length_;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Obtain the address object specified when the network object was created.
+ address_v6 address() const BOOST_ASIO_NOEXCEPT
+ {
+ return address_;
+ }
+
+ /// Obtain the prefix length that was specified when the network object was
+ /// created.
+ unsigned short prefix_length() const BOOST_ASIO_NOEXCEPT
+ {
+ return prefix_length_;
+ }
+
+ /// Obtain an address object that represents the network address.
+ BOOST_ASIO_DECL address_v6 network() const BOOST_ASIO_NOEXCEPT;
+
+ /// Obtain an address range corresponding to the hosts in the network.
+ BOOST_ASIO_DECL address_v6_range hosts() const BOOST_ASIO_NOEXCEPT;
+
+ /// Obtain the true network address, omitting any host bits.
+ network_v6 canonical() const BOOST_ASIO_NOEXCEPT
+ {
+ return network_v6(network(), prefix_length());
+ }
+
+ /// Test if network is a valid host address.
+ bool is_host() const BOOST_ASIO_NOEXCEPT
+ {
+ return prefix_length_ == 128;
+ }
+
+ /// Test if a network is a real subnet of another network.
+ BOOST_ASIO_DECL bool is_subnet_of(const network_v6& other) const;
+
+ /// Get the network as an address in dotted decimal format.
+ BOOST_ASIO_DECL std::string to_string() const;
+
+ /// Get the network as an address in dotted decimal format.
+ BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const;
+
+ /// Compare two networks for equality.
+ friend bool operator==(const network_v6& a, const network_v6& b)
+ {
+ return a.address_ == b.address_ && a.prefix_length_ == b.prefix_length_;
+ }
+
+ /// Compare two networks for inequality.
+ friend bool operator!=(const network_v6& a, const network_v6& b)
+ {
+ return !(a == b);
+ }
+
+private:
+ address_v6 address_;
+ unsigned short prefix_length_;
+};
+
+/// Create an IPv6 network from an address and prefix length.
+/**
+ * @relates address_v6
+ */
+inline network_v6 make_network_v6(
+ const address_v6& addr, unsigned short prefix_len)
+{
+ return network_v6(addr, prefix_len);
+}
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+BOOST_ASIO_DECL network_v6 make_network_v6(const char* str);
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+BOOST_ASIO_DECL network_v6 make_network_v6(
+ const char* str, boost::system::error_code& ec);
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+BOOST_ASIO_DECL network_v6 make_network_v6(const std::string& str);
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+BOOST_ASIO_DECL network_v6 make_network_v6(
+ const std::string& str, boost::system::error_code& ec);
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+BOOST_ASIO_DECL network_v6 make_network_v6(string_view str);
+
+/// Create an IPv6 network from a string containing IP address and prefix
+/// length.
+/**
+ * @relates network_v6
+ */
+BOOST_ASIO_DECL network_v6 make_network_v6(
+ string_view str, boost::system::error_code& ec);
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Output a network as a string.
+/**
+ * Used to output a human-readable string for a specified network.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param net The network to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::ip::address_v6
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os, const network_v6& net);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ip/impl/network_v6.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ip/impl/network_v6.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_IP_NETWORK_V6_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/resolver_base.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/resolver_base.hpp
new file mode 100644
index 00000000000..a61565fdc14
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/resolver_base.hpp
@@ -0,0 +1,131 @@
+//
+// ip/resolver_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVER_BASE_HPP
+#define BOOST_ASIO_IP_RESOLVER_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/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// The resolver_base class is used as a base for the basic_resolver class
+/// templates to provide a common place to define the flag constants.
+class resolver_base
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// A bitmask type (C++ Std [lib.bitmask.types]).
+ typedef unspecified flags;
+
+ /// Determine the canonical name of the host specified in the query.
+ static const flags canonical_name = implementation_defined;
+
+ /// Indicate that returned endpoint is intended for use as a locally bound
+ /// socket endpoint.
+ static const flags passive = implementation_defined;
+
+ /// Host name should be treated as a numeric string defining an IPv4 or IPv6
+ /// address and no name resolution should be attempted.
+ static const flags numeric_host = implementation_defined;
+
+ /// Service name should be treated as a numeric string defining a port number
+ /// and no name resolution should be attempted.
+ static const flags numeric_service = implementation_defined;
+
+ /// If the query protocol family is specified as IPv6, return IPv4-mapped
+ /// IPv6 addresses on finding no IPv6 addresses.
+ static const flags v4_mapped = implementation_defined;
+
+ /// If used with v4_mapped, return all matching IPv6 and IPv4 addresses.
+ static const flags all_matching = implementation_defined;
+
+ /// Only return IPv4 addresses if a non-loopback IPv4 address is configured
+ /// for the system. Only return IPv6 addresses if a non-loopback IPv6 address
+ /// is configured for the system.
+ static const flags address_configured = implementation_defined;
+#else
+ enum flags
+ {
+ canonical_name = BOOST_ASIO_OS_DEF(AI_CANONNAME),
+ passive = BOOST_ASIO_OS_DEF(AI_PASSIVE),
+ numeric_host = BOOST_ASIO_OS_DEF(AI_NUMERICHOST),
+ numeric_service = BOOST_ASIO_OS_DEF(AI_NUMERICSERV),
+ v4_mapped = BOOST_ASIO_OS_DEF(AI_V4MAPPED),
+ all_matching = BOOST_ASIO_OS_DEF(AI_ALL),
+ address_configured = BOOST_ASIO_OS_DEF(AI_ADDRCONFIG)
+ };
+
+ // Implement bitmask operations as shown in C++ Std [lib.bitmask.types].
+
+ friend flags operator&(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
+ }
+
+ friend flags operator|(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
+ }
+
+ friend flags operator^(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
+ }
+
+ friend flags operator~(flags x)
+ {
+ return static_cast<flags>(~static_cast<unsigned int>(x));
+ }
+
+ friend flags& operator&=(flags& x, flags y)
+ {
+ x = x & y;
+ return x;
+ }
+
+ friend flags& operator|=(flags& x, flags y)
+ {
+ x = x | y;
+ return x;
+ }
+
+ friend flags& operator^=(flags& x, flags y)
+ {
+ x = x ^ y;
+ return x;
+ }
+#endif
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~resolver_base()
+ {
+ }
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_RESOLVER_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/resolver_query_base.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/resolver_query_base.hpp
new file mode 100644
index 00000000000..9e0a0321a5d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/resolver_query_base.hpp
@@ -0,0 +1,45 @@
+//
+// ip/resolver_query_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RESOLVER_QUERY_BASE_HPP
+#define BOOST_ASIO_IP_RESOLVER_QUERY_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/ip/resolver_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// The resolver_query_base class is used as a base for the
+/// basic_resolver_query class templates to provide a common place to define
+/// the flag constants.
+class resolver_query_base : public resolver_base
+{
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~resolver_query_base()
+ {
+ }
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_RESOLVER_QUERY_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/tcp.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/tcp.hpp
new file mode 100644
index 00000000000..d37b012b3c4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/tcp.hpp
@@ -0,0 +1,157 @@
+//
+// ip/tcp.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TCP_HPP
+#define BOOST_ASIO_IP_TCP_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/basic_socket_acceptor.hpp>
+#include <boost/asio/basic_socket_iostream.hpp>
+#include <boost/asio/basic_stream_socket.hpp>
+#include <boost/asio/detail/socket_option.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/ip/basic_endpoint.hpp>
+#include <boost/asio/ip/basic_resolver.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Encapsulates the flags needed for TCP.
+/**
+ * The boost::asio::ip::tcp class contains flags necessary for TCP sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol, InternetProtocol.
+ */
+class tcp
+{
+public:
+ /// The type of a TCP endpoint.
+ typedef basic_endpoint<tcp> endpoint;
+
+ /// Construct to represent the IPv4 TCP protocol.
+ static tcp v4()
+ {
+ return tcp(BOOST_ASIO_OS_DEF(AF_INET));
+ }
+
+ /// Construct to represent the IPv6 TCP protocol.
+ static tcp v6()
+ {
+ return tcp(BOOST_ASIO_OS_DEF(AF_INET6));
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_STREAM);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return BOOST_ASIO_OS_DEF(IPPROTO_TCP);
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// The TCP socket type.
+ typedef basic_stream_socket<tcp> socket;
+
+ /// The TCP acceptor type.
+ typedef basic_socket_acceptor<tcp> acceptor;
+
+ /// The TCP resolver type.
+ typedef basic_resolver<tcp> resolver;
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+ /// The TCP iostream type.
+ typedef basic_socket_iostream<tcp> iostream;
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+ /// Socket option for disabling the Nagle algorithm.
+ /**
+ * Implements the IPPROTO_TCP/TCP_NODELAY socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::no_delay option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::tcp::no_delay option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined no_delay;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(IPPROTO_TCP), BOOST_ASIO_OS_DEF(TCP_NODELAY)> no_delay;
+#endif
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const tcp& p1, const tcp& p2)
+ {
+ return p1.family_ == p2.family_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const tcp& p1, const tcp& p2)
+ {
+ return p1.family_ != p2.family_;
+ }
+
+private:
+ // Construct with a specific family.
+ explicit tcp(int protocol_family)
+ : family_(protocol_family)
+ {
+ }
+
+ int family_;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_TCP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/udp.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/udp.hpp
new file mode 100644
index 00000000000..8ba20b4e624
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/udp.hpp
@@ -0,0 +1,113 @@
+//
+// ip/udp.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_UDP_HPP
+#define BOOST_ASIO_IP_UDP_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/basic_datagram_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/ip/basic_endpoint.hpp>
+#include <boost/asio/ip/basic_resolver.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Encapsulates the flags needed for UDP.
+/**
+ * The boost::asio::ip::udp class contains flags necessary for UDP sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol, InternetProtocol.
+ */
+class udp
+{
+public:
+ /// The type of a UDP endpoint.
+ typedef basic_endpoint<udp> endpoint;
+
+ /// Construct to represent the IPv4 UDP protocol.
+ static udp v4()
+ {
+ return udp(BOOST_ASIO_OS_DEF(AF_INET));
+ }
+
+ /// Construct to represent the IPv6 UDP protocol.
+ static udp v6()
+ {
+ return udp(BOOST_ASIO_OS_DEF(AF_INET6));
+ }
+
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return BOOST_ASIO_OS_DEF(SOCK_DGRAM);
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return BOOST_ASIO_OS_DEF(IPPROTO_UDP);
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return family_;
+ }
+
+ /// The UDP socket type.
+ typedef basic_datagram_socket<udp> socket;
+
+ /// The UDP resolver type.
+ typedef basic_resolver<udp> resolver;
+
+ /// Compare two protocols for equality.
+ friend bool operator==(const udp& p1, const udp& p2)
+ {
+ return p1.family_ == p2.family_;
+ }
+
+ /// Compare two protocols for inequality.
+ friend bool operator!=(const udp& p1, const udp& p2)
+ {
+ return p1.family_ != p2.family_;
+ }
+
+private:
+ // Construct with a specific family.
+ explicit udp(int protocol_family)
+ : family_(protocol_family)
+ {
+ }
+
+ int family_;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_UDP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/unicast.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/unicast.hpp
new file mode 100644
index 00000000000..2cfcc596016
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/unicast.hpp
@@ -0,0 +1,72 @@
+//
+// ip/unicast.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_UNICAST_HPP
+#define BOOST_ASIO_IP_UNICAST_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/ip/detail/socket_option.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+namespace unicast {
+
+/// Socket option for time-to-live associated with outgoing unicast packets.
+/**
+ * Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::unicast::hops option(4);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::unicast::hops option;
+ * socket.get_option(option);
+ * int ttl = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * GettableSocketOption, SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined hops;
+#else
+typedef boost::asio::ip::detail::socket_option::unicast_hops<
+ BOOST_ASIO_OS_DEF(IPPROTO_IP),
+ BOOST_ASIO_OS_DEF(IP_TTL),
+ BOOST_ASIO_OS_DEF(IPPROTO_IPV6),
+ BOOST_ASIO_OS_DEF(IPV6_UNICAST_HOPS)> hops;
+#endif
+
+} // namespace unicast
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_UNICAST_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ip/v6_only.hpp b/src/third_party/boost-1.70.0/boost/asio/ip/v6_only.hpp
new file mode 100644
index 00000000000..54f47064308
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ip/v6_only.hpp
@@ -0,0 +1,71 @@
+//
+// ip/v6_only.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_V6_ONLY_HPP
+#define BOOST_ASIO_IP_V6_ONLY_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/socket_option.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Socket option for determining whether an IPv6 socket supports IPv6
+/// communication only.
+/**
+ * Implements the IPPROTO_IPV6/IP_V6ONLY socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::v6_only option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::ip::v6_only option;
+ * socket.get_option(option);
+ * bool v6_only = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * GettableSocketOption, SettableSocketOption.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+typedef implementation_defined v6_only;
+#elif defined(IPV6_V6ONLY)
+typedef boost::asio::detail::socket_option::boolean<
+ IPPROTO_IPV6, IPV6_V6ONLY> v6_only;
+#else
+typedef boost::asio::detail::socket_option::boolean<
+ boost::asio::detail::custom_socket_option_level,
+ boost::asio::detail::always_fail_option> v6_only;
+#endif
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_V6_ONLY_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/is_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/is_executor.hpp
new file mode 100644
index 00000000000..6cb8bb8380f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/is_executor.hpp
@@ -0,0 +1,48 @@
+//
+// is_executor.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IS_EXECUTOR_HPP
+#define BOOST_ASIO_IS_EXECUTOR_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/is_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// The is_executor trait detects whether a type T meets the Executor type
+/// requirements.
+/**
+ * Class template @c is_executor is a UnaryTypeTrait that is derived from @c
+ * true_type if the type @c T meets the syntactic requirements for Executor,
+ * otherwise @c false_type.
+ */
+template <typename T>
+struct is_executor
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : boost::asio::detail::is_executor<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IS_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/is_read_buffered.hpp b/src/third_party/boost-1.70.0/boost/asio/is_read_buffered.hpp
new file mode 100644
index 00000000000..bc97ba77f5e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/is_read_buffered.hpp
@@ -0,0 +1,61 @@
+//
+// is_read_buffered.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IS_READ_BUFFERED_HPP
+#define BOOST_ASIO_IS_READ_BUFFERED_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/buffered_read_stream_fwd.hpp>
+#include <boost/asio/buffered_stream_fwd.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail {
+
+template <typename Stream>
+char is_read_buffered_helper(buffered_stream<Stream>* s);
+
+template <typename Stream>
+char is_read_buffered_helper(buffered_read_stream<Stream>* s);
+
+struct is_read_buffered_big_type { char data[10]; };
+is_read_buffered_big_type is_read_buffered_helper(...);
+
+} // namespace detail
+
+/// The is_read_buffered class is a traits class that may be used to determine
+/// whether a stream type supports buffering of read data.
+template <typename Stream>
+class is_read_buffered
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true only if the Stream type supports buffering of
+ /// read data.
+ static const bool value;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(bool,
+ value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1);
+#endif
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IS_READ_BUFFERED_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/is_write_buffered.hpp b/src/third_party/boost-1.70.0/boost/asio/is_write_buffered.hpp
new file mode 100644
index 00000000000..5ed8318e53c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/is_write_buffered.hpp
@@ -0,0 +1,61 @@
+//
+// is_write_buffered.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_IS_WRITE_BUFFERED_HPP
+#define BOOST_ASIO_IS_WRITE_BUFFERED_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/buffered_stream_fwd.hpp>
+#include <boost/asio/buffered_write_stream_fwd.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail {
+
+template <typename Stream>
+char is_write_buffered_helper(buffered_stream<Stream>* s);
+
+template <typename Stream>
+char is_write_buffered_helper(buffered_write_stream<Stream>* s);
+
+struct is_write_buffered_big_type { char data[10]; };
+is_write_buffered_big_type is_write_buffered_helper(...);
+
+} // namespace detail
+
+/// The is_write_buffered class is a traits class that may be used to determine
+/// whether a stream type supports buffering of written data.
+template <typename Stream>
+class is_write_buffered
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true only if the Stream type supports buffering of
+ /// written data.
+ static const bool value;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(bool,
+ value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1);
+#endif
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IS_WRITE_BUFFERED_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/local/basic_endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/local/basic_endpoint.hpp
new file mode 100644
index 00000000000..835eb209223
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/local/basic_endpoint.hpp
@@ -0,0 +1,249 @@
+//
+// local/basic_endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Derived from a public domain implementation written by Daniel Casimiro.
+//
+// Distributed under the 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_LOCAL_BASIC_ENDPOINT_HPP
+#define BOOST_ASIO_LOCAL_BASIC_ENDPOINT_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_LOCAL_SOCKETS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/local/detail/endpoint.hpp>
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace local {
+
+/// Describes an endpoint for a UNIX socket.
+/**
+ * The boost::asio::local::basic_endpoint class template describes an endpoint
+ * that may be associated with a particular UNIX socket.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * Endpoint.
+ */
+template <typename Protocol>
+class basic_endpoint
+{
+public:
+ /// The protocol type associated with the endpoint.
+ typedef Protocol protocol_type;
+
+ /// The type of the endpoint structure. This type is dependent on the
+ /// underlying implementation of the socket layer.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined data_type;
+#else
+ typedef boost::asio::detail::socket_addr_type data_type;
+#endif
+
+ /// Default constructor.
+ basic_endpoint()
+ {
+ }
+
+ /// Construct an endpoint using the specified path name.
+ basic_endpoint(const char* path_name)
+ : impl_(path_name)
+ {
+ }
+
+ /// Construct an endpoint using the specified path name.
+ basic_endpoint(const std::string& path_name)
+ : impl_(path_name)
+ {
+ }
+
+ #if defined(BOOST_ASIO_HAS_STRING_VIEW)
+ /// Construct an endpoint using the specified path name.
+ basic_endpoint(string_view path_name)
+ : impl_(path_name)
+ {
+ }
+ #endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+ /// Copy constructor.
+ basic_endpoint(const basic_endpoint& other)
+ : impl_(other.impl_)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move constructor.
+ basic_endpoint(basic_endpoint&& other)
+ : impl_(other.impl_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// Assign from another endpoint.
+ basic_endpoint& operator=(const basic_endpoint& other)
+ {
+ impl_ = other.impl_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ /// Move-assign from another endpoint.
+ basic_endpoint& operator=(basic_endpoint&& other)
+ {
+ impl_ = other.impl_;
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ /// The protocol associated with the endpoint.
+ protocol_type protocol() const
+ {
+ return protocol_type();
+ }
+
+ /// Get the underlying endpoint in the native type.
+ data_type* data()
+ {
+ return impl_.data();
+ }
+
+ /// Get the underlying endpoint in the native type.
+ const data_type* data() const
+ {
+ return impl_.data();
+ }
+
+ /// Get the underlying size of the endpoint in the native type.
+ std::size_t size() const
+ {
+ return impl_.size();
+ }
+
+ /// Set the underlying size of the endpoint in the native type.
+ void resize(std::size_t new_size)
+ {
+ impl_.resize(new_size);
+ }
+
+ /// Get the capacity of the endpoint in the native type.
+ std::size_t capacity() const
+ {
+ return impl_.capacity();
+ }
+
+ /// Get the path associated with the endpoint.
+ std::string path() const
+ {
+ return impl_.path();
+ }
+
+ /// Set the path associated with the endpoint.
+ void path(const char* p)
+ {
+ impl_.path(p);
+ }
+
+ /// Set the path associated with the endpoint.
+ void path(const std::string& p)
+ {
+ impl_.path(p);
+ }
+
+ /// Compare two endpoints for equality.
+ friend bool operator==(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return e1.impl_ == e2.impl_;
+ }
+
+ /// Compare two endpoints for inequality.
+ friend bool operator!=(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return !(e1.impl_ == e2.impl_);
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator<(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return e1.impl_ < e2.impl_;
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator>(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return e2.impl_ < e1.impl_;
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator<=(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return !(e2 < e1);
+ }
+
+ /// Compare endpoints for ordering.
+ friend bool operator>=(const basic_endpoint<Protocol>& e1,
+ const basic_endpoint<Protocol>& e2)
+ {
+ return !(e1 < e2);
+ }
+
+private:
+ // The underlying UNIX domain endpoint.
+ boost::asio::local::detail::endpoint impl_;
+};
+
+/// Output an endpoint as a string.
+/**
+ * Used to output a human-readable string for a specified endpoint.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param endpoint The endpoint to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates boost::asio::local::basic_endpoint
+ */
+template <typename Elem, typename Traits, typename Protocol>
+std::basic_ostream<Elem, Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& os,
+ const basic_endpoint<Protocol>& endpoint)
+{
+ os << endpoint.path();
+ return os;
+}
+
+} // namespace local
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_LOCAL_BASIC_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/local/connect_pair.hpp b/src/third_party/boost-1.70.0/boost/asio/local/connect_pair.hpp
new file mode 100644
index 00000000000..6ee9a23ae34
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/local/connect_pair.hpp
@@ -0,0 +1,103 @@
+//
+// local/connect_pair.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_LOCAL_CONNECT_PAIR_HPP
+#define BOOST_ASIO_LOCAL_CONNECT_PAIR_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_LOCAL_SOCKETS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_socket.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/local/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace local {
+
+/// Create a pair of connected sockets.
+template <typename Protocol, typename Executor1, typename Executor2>
+void connect_pair(basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2);
+
+/// Create a pair of connected sockets.
+template <typename Protocol, typename Executor1, typename Executor2>
+BOOST_ASIO_SYNC_OP_VOID connect_pair(basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2, boost::system::error_code& ec);
+
+template <typename Protocol, typename Executor1, typename Executor2>
+inline void connect_pair(basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2)
+{
+ boost::system::error_code ec;
+ connect_pair(socket1, socket2, ec);
+ boost::asio::detail::throw_error(ec, "connect_pair");
+}
+
+template <typename Protocol, typename Executor1, typename Executor2>
+inline BOOST_ASIO_SYNC_OP_VOID connect_pair(
+ basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2, boost::system::error_code& ec)
+{
+ // Check that this function is only being used with a UNIX domain socket.
+ boost::asio::local::basic_endpoint<Protocol>* tmp
+ = static_cast<typename Protocol::endpoint*>(0);
+ (void)tmp;
+
+ Protocol protocol;
+ boost::asio::detail::socket_type sv[2];
+ if (boost::asio::detail::socket_ops::socketpair(protocol.family(),
+ protocol.type(), protocol.protocol(), sv, ec)
+ == boost::asio::detail::socket_error_retval)
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+
+ socket1.assign(protocol, sv[0], ec);
+ if (ec)
+ {
+ boost::system::error_code temp_ec;
+ boost::asio::detail::socket_ops::state_type state[2] = { 0, 0 };
+ boost::asio::detail::socket_ops::close(sv[0], state[0], true, temp_ec);
+ boost::asio::detail::socket_ops::close(sv[1], state[1], true, temp_ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ socket2.assign(protocol, sv[1], ec);
+ if (ec)
+ {
+ boost::system::error_code temp_ec;
+ socket1.close(temp_ec);
+ boost::asio::detail::socket_ops::state_type state = 0;
+ boost::asio::detail::socket_ops::close(sv[1], state, true, temp_ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+} // namespace local
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_LOCAL_CONNECT_PAIR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/local/datagram_protocol.hpp b/src/third_party/boost-1.70.0/boost/asio/local/datagram_protocol.hpp
new file mode 100644
index 00000000000..b29add6fc55
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/local/datagram_protocol.hpp
@@ -0,0 +1,82 @@
+//
+// local/datagram_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_LOCAL_DATAGRAM_PROTOCOL_HPP
+#define BOOST_ASIO_LOCAL_DATAGRAM_PROTOCOL_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_LOCAL_SOCKETS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_datagram_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/local/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace local {
+
+/// Encapsulates the flags needed for datagram-oriented UNIX sockets.
+/**
+ * The boost::asio::local::datagram_protocol class contains flags necessary for
+ * datagram-oriented UNIX domain sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class datagram_protocol
+{
+public:
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return SOCK_DGRAM;
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return 0;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return AF_UNIX;
+ }
+
+ /// The type of a UNIX domain endpoint.
+ typedef basic_endpoint<datagram_protocol> endpoint;
+
+ /// The UNIX domain socket type.
+ typedef basic_datagram_socket<datagram_protocol> socket;
+};
+
+} // namespace local
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/local/detail/endpoint.hpp b/src/third_party/boost-1.70.0/boost/asio/local/detail/endpoint.hpp
new file mode 100644
index 00000000000..294fb95ef92
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/local/detail/endpoint.hpp
@@ -0,0 +1,141 @@
+//
+// local/detail/endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Derived from a public domain implementation written by Daniel Casimiro.
+//
+// Distributed under the 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_LOCAL_DETAIL_ENDPOINT_HPP
+#define BOOST_ASIO_LOCAL_DETAIL_ENDPOINT_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_LOCAL_SOCKETS)
+
+#include <cstddef>
+#include <string>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/detail/string_view.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace local {
+namespace detail {
+
+// Helper class for implementing a UNIX domain endpoint.
+class endpoint
+{
+public:
+ // Default constructor.
+ BOOST_ASIO_DECL endpoint();
+
+ // Construct an endpoint using the specified path name.
+ BOOST_ASIO_DECL endpoint(const char* path_name);
+
+ // Construct an endpoint using the specified path name.
+ BOOST_ASIO_DECL endpoint(const std::string& path_name);
+
+ #if defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // Construct an endpoint using the specified path name.
+ BOOST_ASIO_DECL endpoint(string_view path_name);
+ #endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+ // Copy constructor.
+ endpoint(const endpoint& other)
+ : data_(other.data_),
+ path_length_(other.path_length_)
+ {
+ }
+
+ // Assign from another endpoint.
+ endpoint& operator=(const endpoint& other)
+ {
+ data_ = other.data_;
+ path_length_ = other.path_length_;
+ return *this;
+ }
+
+ // Get the underlying endpoint in the native type.
+ boost::asio::detail::socket_addr_type* data()
+ {
+ return &data_.base;
+ }
+
+ // Get the underlying endpoint in the native type.
+ const boost::asio::detail::socket_addr_type* data() const
+ {
+ return &data_.base;
+ }
+
+ // Get the underlying size of the endpoint in the native type.
+ std::size_t size() const
+ {
+ return path_length_
+ + offsetof(boost::asio::detail::sockaddr_un_type, sun_path);
+ }
+
+ // Set the underlying size of the endpoint in the native type.
+ BOOST_ASIO_DECL void resize(std::size_t size);
+
+ // Get the capacity of the endpoint in the native type.
+ std::size_t capacity() const
+ {
+ return sizeof(boost::asio::detail::sockaddr_un_type);
+ }
+
+ // Get the path associated with the endpoint.
+ BOOST_ASIO_DECL std::string path() const;
+
+ // Set the path associated with the endpoint.
+ BOOST_ASIO_DECL void path(const char* p);
+
+ // Set the path associated with the endpoint.
+ BOOST_ASIO_DECL void path(const std::string& p);
+
+ // Compare two endpoints for equality.
+ BOOST_ASIO_DECL friend bool operator==(
+ const endpoint& e1, const endpoint& e2);
+
+ // Compare endpoints for ordering.
+ BOOST_ASIO_DECL friend bool operator<(
+ const endpoint& e1, const endpoint& e2);
+
+private:
+ // The underlying UNIX socket address.
+ union data_union
+ {
+ boost::asio::detail::socket_addr_type base;
+ boost::asio::detail::sockaddr_un_type local;
+ } data_;
+
+ // The length of the path associated with the endpoint.
+ std::size_t path_length_;
+
+ // Initialise with a specified path.
+ BOOST_ASIO_DECL void init(const char* path, std::size_t path_length);
+};
+
+} // namespace detail
+} // namespace local
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/local/detail/impl/endpoint.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+
+#endif // BOOST_ASIO_LOCAL_DETAIL_ENDPOINT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/local/detail/impl/endpoint.ipp b/src/third_party/boost-1.70.0/boost/asio/local/detail/impl/endpoint.ipp
new file mode 100644
index 00000000000..51ce2cf36df
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/local/detail/impl/endpoint.ipp
@@ -0,0 +1,138 @@
+//
+// local/detail/impl/endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Derived from a public domain implementation written by Daniel Casimiro.
+//
+// Distributed under the 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_LOCAL_DETAIL_IMPL_ENDPOINT_IPP
+#define BOOST_ASIO_LOCAL_DETAIL_IMPL_ENDPOINT_IPP
+
+#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_LOCAL_SOCKETS)
+
+#include <cstring>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/local/detail/endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace local {
+namespace detail {
+
+endpoint::endpoint()
+{
+ init("", 0);
+}
+
+endpoint::endpoint(const char* path_name)
+{
+ using namespace std; // For strlen.
+ init(path_name, strlen(path_name));
+}
+
+endpoint::endpoint(const std::string& path_name)
+{
+ init(path_name.data(), path_name.length());
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW)
+endpoint::endpoint(string_view path_name)
+{
+ init(path_name.data(), path_name.length());
+}
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+void endpoint::resize(std::size_t new_size)
+{
+ if (new_size > sizeof(boost::asio::detail::sockaddr_un_type))
+ {
+ boost::system::error_code ec(boost::asio::error::invalid_argument);
+ boost::asio::detail::throw_error(ec);
+ }
+ else if (new_size == 0)
+ {
+ path_length_ = 0;
+ }
+ else
+ {
+ path_length_ = new_size
+ - offsetof(boost::asio::detail::sockaddr_un_type, sun_path);
+
+ // The path returned by the operating system may be NUL-terminated.
+ if (path_length_ > 0 && data_.local.sun_path[path_length_ - 1] == 0)
+ --path_length_;
+ }
+}
+
+std::string endpoint::path() const
+{
+ return std::string(data_.local.sun_path, path_length_);
+}
+
+void endpoint::path(const char* p)
+{
+ using namespace std; // For strlen.
+ init(p, strlen(p));
+}
+
+void endpoint::path(const std::string& p)
+{
+ init(p.data(), p.length());
+}
+
+bool operator==(const endpoint& e1, const endpoint& e2)
+{
+ return e1.path() == e2.path();
+}
+
+bool operator<(const endpoint& e1, const endpoint& e2)
+{
+ return e1.path() < e2.path();
+}
+
+void endpoint::init(const char* path_name, std::size_t path_length)
+{
+ if (path_length > sizeof(data_.local.sun_path) - 1)
+ {
+ // The buffer is not large enough to store this address.
+ boost::system::error_code ec(boost::asio::error::name_too_long);
+ boost::asio::detail::throw_error(ec);
+ }
+
+ using namespace std; // For memcpy.
+ data_.local = boost::asio::detail::sockaddr_un_type();
+ data_.local.sun_family = AF_UNIX;
+ if (path_length > 0)
+ memcpy(data_.local.sun_path, path_name, path_length);
+ path_length_ = path_length;
+
+ // NUL-terminate normal path names. Names that start with a NUL are in the
+ // UNIX domain protocol's "abstract namespace" and are not NUL-terminated.
+ if (path_length > 0 && data_.local.sun_path[0] == 0)
+ data_.local.sun_path[path_length] = 0;
+}
+
+} // namespace detail
+} // namespace local
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+
+#endif // BOOST_ASIO_LOCAL_DETAIL_IMPL_ENDPOINT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/local/stream_protocol.hpp b/src/third_party/boost-1.70.0/boost/asio/local/stream_protocol.hpp
new file mode 100644
index 00000000000..4fe0de53529
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/local/stream_protocol.hpp
@@ -0,0 +1,92 @@
+//
+// local/stream_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_LOCAL_STREAM_PROTOCOL_HPP
+#define BOOST_ASIO_LOCAL_STREAM_PROTOCOL_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_LOCAL_SOCKETS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_socket_acceptor.hpp>
+#include <boost/asio/basic_socket_iostream.hpp>
+#include <boost/asio/basic_stream_socket.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/local/basic_endpoint.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace local {
+
+/// Encapsulates the flags needed for stream-oriented UNIX sockets.
+/**
+ * The boost::asio::local::stream_protocol class contains flags necessary for
+ * stream-oriented UNIX domain sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class stream_protocol
+{
+public:
+ /// Obtain an identifier for the type of the protocol.
+ int type() const
+ {
+ return SOCK_STREAM;
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const
+ {
+ return 0;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const
+ {
+ return AF_UNIX;
+ }
+
+ /// The type of a UNIX domain endpoint.
+ typedef basic_endpoint<stream_protocol> endpoint;
+
+ /// The UNIX domain socket type.
+ typedef basic_stream_socket<stream_protocol> socket;
+
+ /// The UNIX domain acceptor type.
+ typedef basic_socket_acceptor<stream_protocol> acceptor;
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+ /// The UNIX domain iostream type.
+ typedef basic_socket_iostream<stream_protocol> iostream;
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+};
+
+} // namespace local
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_LOCAL_STREAM_PROTOCOL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/packaged_task.hpp b/src/third_party/boost-1.70.0/boost/asio/packaged_task.hpp
new file mode 100644
index 00000000000..0985e6d49bb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/packaged_task.hpp
@@ -0,0 +1,128 @@
+//
+// packaged_task.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/placeholders.hpp b/src/third_party/boost-1.70.0/boost/asio/placeholders.hpp
new file mode 100644
index 00000000000..3640bd62b53
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/placeholders.hpp
@@ -0,0 +1,153 @@
+//
+// placeholders.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_PLACEHOLDERS_HPP
+#define BOOST_ASIO_PLACEHOLDERS_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_BOOST_BIND)
+# include <boost/bind/arg.hpp>
+#endif // defined(BOOST_ASIO_HAS_BOOST_BIND)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace placeholders {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// An argument placeholder, for use with boost::bind(), that corresponds to
+/// the error argument of a handler for any of the asynchronous functions.
+unspecified error;
+
+/// An argument placeholder, for use with boost::bind(), that corresponds to
+/// the bytes_transferred argument of a handler for asynchronous functions such
+/// as boost::asio::basic_stream_socket::async_write_some or
+/// boost::asio::async_write.
+unspecified bytes_transferred;
+
+/// An argument placeholder, for use with boost::bind(), that corresponds to
+/// the iterator argument of a handler for asynchronous functions such as
+/// boost::asio::async_connect.
+unspecified iterator;
+
+/// An argument placeholder, for use with boost::bind(), that corresponds to
+/// the results argument of a handler for asynchronous functions such as
+/// boost::asio::basic_resolver::async_resolve.
+unspecified results;
+
+/// An argument placeholder, for use with boost::bind(), that corresponds to
+/// the results argument of a handler for asynchronous functions such as
+/// boost::asio::async_connect.
+unspecified endpoint;
+
+/// An argument placeholder, for use with boost::bind(), that corresponds to
+/// the signal_number argument of a handler for asynchronous functions such as
+/// boost::asio::signal_set::async_wait.
+unspecified signal_number;
+
+#elif defined(BOOST_ASIO_HAS_BOOST_BIND)
+# if defined(__BORLANDC__) || defined(__GNUC__)
+
+inline boost::arg<1> error()
+{
+ return boost::arg<1>();
+}
+
+inline boost::arg<2> bytes_transferred()
+{
+ return boost::arg<2>();
+}
+
+inline boost::arg<2> iterator()
+{
+ return boost::arg<2>();
+}
+
+inline boost::arg<2> results()
+{
+ return boost::arg<2>();
+}
+
+inline boost::arg<2> endpoint()
+{
+ return boost::arg<2>();
+}
+
+inline boost::arg<2> signal_number()
+{
+ return boost::arg<2>();
+}
+
+# else
+
+namespace detail
+{
+ template <int Number>
+ struct placeholder
+ {
+ static boost::arg<Number>& get()
+ {
+ static boost::arg<Number> result;
+ return result;
+ }
+ };
+}
+
+# if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC < 1400)
+
+static boost::arg<1>& error
+ = boost::asio::placeholders::detail::placeholder<1>::get();
+static boost::arg<2>& bytes_transferred
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+static boost::arg<2>& iterator
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+static boost::arg<2>& results
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+static boost::arg<2>& endpoint
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+static boost::arg<2>& signal_number
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+
+# else
+
+namespace
+{
+ boost::arg<1>& error
+ = boost::asio::placeholders::detail::placeholder<1>::get();
+ boost::arg<2>& bytes_transferred
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+ boost::arg<2>& iterator
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+ boost::arg<2>& results
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+ boost::arg<2>& endpoint
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+ boost::arg<2>& signal_number
+ = boost::asio::placeholders::detail::placeholder<2>::get();
+} // namespace
+
+# endif
+# endif
+#endif
+
+} // namespace placeholders
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_PLACEHOLDERS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/posix/basic_descriptor.hpp b/src/third_party/boost-1.70.0/boost/asio/posix/basic_descriptor.hpp
new file mode 100644
index 00000000000..301c618e4d9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/posix/basic_descriptor.hpp
@@ -0,0 +1,672 @@
+//
+// posix/basic_descriptor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_BASIC_DESCRIPTOR_HPP
+#define BOOST_ASIO_POSIX_BASIC_DESCRIPTOR_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_POSIX_STREAM_DESCRIPTOR) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
+#include <boost/asio/detail/reactive_descriptor_service.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/posix/descriptor_base.hpp>
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace posix {
+
+/// Provides POSIX descriptor functionality.
+/**
+ * The posix::basic_descriptor class template provides the ability to wrap a
+ * POSIX descriptor.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = executor>
+class basic_descriptor
+ : public descriptor_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a descriptor.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef detail::reactive_descriptor_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A descriptor is always the lowest layer.
+ typedef basic_descriptor lowest_layer_type;
+
+ /// Construct a descriptor without opening it.
+ /**
+ * This constructor creates a descriptor without opening it.
+ *
+ * @param ex The I/O executor that the descriptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * descriptor.
+ */
+ explicit basic_descriptor(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct a descriptor without opening it.
+ /**
+ * This constructor creates a descriptor without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ */
+ template <typename ExecutionContext>
+ explicit basic_descriptor(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct a descriptor on an existing native descriptor.
+ /**
+ * This constructor creates a descriptor object to hold an existing native
+ * descriptor.
+ *
+ * @param ex The I/O executor that the descriptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * descriptor.
+ *
+ * @param native_descriptor A native descriptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_descriptor(const executor_type& ex,
+ const native_handle_type& native_descriptor)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_descriptor, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a descriptor on an existing native descriptor.
+ /**
+ * This constructor creates a descriptor object to hold an existing native
+ * descriptor.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ *
+ * @param native_descriptor A native descriptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_descriptor(ExecutionContext& context,
+ const native_handle_type& native_descriptor,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_descriptor, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a descriptor from another.
+ /**
+ * This constructor moves a descriptor from one object to another.
+ *
+ * @param other The other descriptor 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_descriptor(const executor_type&)
+ * constructor.
+ */
+ basic_descriptor(basic_descriptor&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a descriptor from another.
+ /**
+ * This assignment operator moves a descriptor from one object to another.
+ *
+ * @param other The other descriptor 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_descriptor(const executor_type&)
+ * constructor.
+ */
+ basic_descriptor& operator=(basic_descriptor&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a descriptor cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a descriptor cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native descriptor to the descriptor.
+ /*
+ * This function opens the descriptor to hold an existing native descriptor.
+ *
+ * @param native_descriptor A native descriptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_descriptor)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_descriptor, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native descriptor to the descriptor.
+ /*
+ * This function opens the descriptor to hold an existing native descriptor.
+ *
+ * @param native_descriptor A native descriptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_descriptor, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the descriptor is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the descriptor.
+ /**
+ * This function is used to close the descriptor. Any asynchronous read or
+ * write operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ */
+ void close()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the descriptor.
+ /**
+ * This function is used to close the descriptor. Any asynchronous read or
+ * write operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ */
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the native descriptor representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * descriptor. This is intended to allow access to native descriptor
+ * functionality that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Release ownership of the native descriptor implementation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * descriptor. After calling this function, @c is_open() returns false. The
+ * caller is responsible for closing the descriptor.
+ *
+ * All outstanding asynchronous read or write operations will finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * boost::asio::error::operation_aborted error.
+ */
+ native_handle_type release()
+ {
+ return impl_.get_service().release(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the descriptor.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the descriptor.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Perform an IO control command on the descriptor.
+ /**
+ * This function is used to execute an IO control command on the descriptor.
+ *
+ * @param command The IO control command to be performed on the descriptor.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @sa IoControlCommand @n
+ * boost::asio::posix::descriptor_base::bytes_readable @n
+ * boost::asio::posix::descriptor_base::non_blocking_io
+ *
+ * @par Example
+ * Getting the number of bytes ready to read:
+ * @code
+ * boost::asio::posix::stream_descriptor descriptor(my_context);
+ * ...
+ * boost::asio::posix::stream_descriptor::bytes_readable command;
+ * descriptor.io_control(command);
+ * std::size_t bytes_readable = command.get();
+ * @endcode
+ */
+ template <typename IoControlCommand>
+ void io_control(IoControlCommand& command)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
+ boost::asio::detail::throw_error(ec, "io_control");
+ }
+
+ /// Perform an IO control command on the descriptor.
+ /**
+ * This function is used to execute an IO control command on the descriptor.
+ *
+ * @param command The IO control command to be performed on the descriptor.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @sa IoControlCommand @n
+ * boost::asio::posix::descriptor_base::bytes_readable @n
+ * boost::asio::posix::descriptor_base::non_blocking_io
+ *
+ * @par Example
+ * Getting the number of bytes ready to read:
+ * @code
+ * boost::asio::posix::stream_descriptor descriptor(my_context);
+ * ...
+ * boost::asio::posix::stream_descriptor::bytes_readable command;
+ * boost::system::error_code ec;
+ * descriptor.io_control(command, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * std::size_t bytes_readable = command.get();
+ * @endcode
+ */
+ template <typename IoControlCommand>
+ BOOST_ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Gets the non-blocking mode of the descriptor.
+ /**
+ * @returns @c true if the descriptor's synchronous operations will fail with
+ * boost::asio::error::would_block if they are unable to perform the requested
+ * operation immediately. If @c false, synchronous operations will block
+ * until complete.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ bool non_blocking() const
+ {
+ return impl_.get_service().non_blocking(impl_.get_implementation());
+ }
+
+ /// Sets the non-blocking mode of the descriptor.
+ /**
+ * @param mode If @c true, the descriptor's synchronous operations will fail
+ * with boost::asio::error::would_block if they are unable to perform the
+ * requested operation immediately. If @c false, synchronous operations will
+ * block until complete.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ void non_blocking(bool mode)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
+ boost::asio::detail::throw_error(ec, "non_blocking");
+ }
+
+ /// Sets the non-blocking mode of the descriptor.
+ /**
+ * @param mode If @c true, the descriptor's synchronous operations will fail
+ * with boost::asio::error::would_block if they are unable to perform the
+ * requested operation immediately. If @c false, synchronous operations will
+ * block until complete.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note The non-blocking mode has no effect on the behaviour of asynchronous
+ * operations. Asynchronous operations will never fail with the error
+ * boost::asio::error::would_block.
+ */
+ BOOST_ASIO_SYNC_OP_VOID non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Gets the non-blocking mode of the native descriptor implementation.
+ /**
+ * This function is used to retrieve the non-blocking mode of the underlying
+ * native descriptor. This mode has no effect on the behaviour of the
+ * descriptor object's synchronous operations.
+ *
+ * @returns @c true if the underlying descriptor is in non-blocking mode and
+ * direct system calls may fail with boost::asio::error::would_block (or the
+ * equivalent system error).
+ *
+ * @note The current non-blocking mode is cached by the descriptor object.
+ * Consequently, the return value may be incorrect if the non-blocking mode
+ * was set directly on the native descriptor.
+ */
+ bool native_non_blocking() const
+ {
+ return impl_.get_service().native_non_blocking(
+ impl_.get_implementation());
+ }
+
+ /// Sets the non-blocking mode of the native descriptor implementation.
+ /**
+ * This function is used to modify the non-blocking mode of the underlying
+ * native descriptor. It has no effect on the behaviour of the descriptor
+ * object's synchronous operations.
+ *
+ * @param mode If @c true, the underlying descriptor is put into non-blocking
+ * mode and direct system calls may fail with boost::asio::error::would_block
+ * (or the equivalent system error).
+ *
+ * @throws boost::system::system_error Thrown on failure. If the @c mode is
+ * @c false, but the current value of @c non_blocking() is @c true, this
+ * function fails with boost::asio::error::invalid_argument, as the
+ * combination does not make sense.
+ */
+ void native_non_blocking(bool mode)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
+ boost::asio::detail::throw_error(ec, "native_non_blocking");
+ }
+
+ /// Sets the non-blocking mode of the native descriptor implementation.
+ /**
+ * This function is used to modify the non-blocking mode of the underlying
+ * native descriptor. It has no effect on the behaviour of the descriptor
+ * object's synchronous operations.
+ *
+ * @param mode If @c true, the underlying descriptor is put into non-blocking
+ * mode and direct system calls may fail with boost::asio::error::would_block
+ * (or the equivalent system error).
+ *
+ * @param ec Set to indicate what error occurred, if any. If the @c mode is
+ * @c false, but the current value of @c non_blocking() is @c true, this
+ * function fails with boost::asio::error::invalid_argument, as the
+ * combination does not make sense.
+ */
+ BOOST_ASIO_SYNC_OP_VOID native_non_blocking(
+ bool mode, boost::system::error_code& ec)
+ {
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Wait for the descriptor to become ready to read, ready to write, or to
+ /// have pending error conditions.
+ /**
+ * This function is used to perform a blocking wait for a descriptor to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired descriptor state.
+ *
+ * @par Example
+ * Waiting for a descriptor to become readable.
+ * @code
+ * boost::asio::posix::stream_descriptor descriptor(my_context);
+ * ...
+ * descriptor.wait(boost::asio::posix::stream_descriptor::wait_read);
+ * @endcode
+ */
+ void wait(wait_type w)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Wait for the descriptor to become ready to read, ready to write, or to
+ /// have pending error conditions.
+ /**
+ * This function is used to perform a blocking wait for a descriptor to enter
+ * a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired descriptor state.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * Waiting for a descriptor to become readable.
+ * @code
+ * boost::asio::posix::stream_descriptor descriptor(my_context);
+ * ...
+ * boost::system::error_code ec;
+ * descriptor.wait(boost::asio::posix::stream_descriptor::wait_read, ec);
+ * @endcode
+ */
+ BOOST_ASIO_SYNC_OP_VOID wait(wait_type w, boost::system::error_code& ec)
+ {
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Asynchronously wait for the descriptor to become ready to read, ready to
+ /// write, or to have pending error conditions.
+ /**
+ * This function is used to perform an asynchronous wait for a descriptor to
+ * enter a ready to read, write or error condition state.
+ *
+ * @param w Specifies the desired descriptor state.
+ *
+ * @param handler The handler to be called when the wait 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
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @par Example
+ * @code
+ * void wait_handler(const boost::system::error_code& error)
+ * {
+ * if (!error)
+ * {
+ * // Wait succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * boost::asio::posix::stream_descriptor descriptor(my_context);
+ * ...
+ * descriptor.async_wait(
+ * boost::asio::posix::stream_descriptor::wait_read,
+ * wait_handler);
+ * @endcode
+ */
+ template <typename WaitHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
+ void (boost::system::error_code))
+ async_wait(wait_type w, BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ return async_initiate<WaitHandler, void (boost::system::error_code)>(
+ initiate_async_wait(), handler, this, w);
+ }
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the descriptor, cancelling any outstanding
+ * asynchronous wait operations associated with the descriptor as if by
+ * calling @c cancel.
+ */
+ ~basic_descriptor()
+ {
+ }
+
+ detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+
+private:
+ // Disallow copying and assignment.
+ basic_descriptor(const basic_descriptor&) BOOST_ASIO_DELETED;
+ basic_descriptor& operator=(const basic_descriptor&) BOOST_ASIO_DELETED;
+
+ struct initiate_async_wait
+ {
+ template <typename WaitHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler,
+ basic_descriptor* self, wait_type w) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WaitHandler.
+ BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
+
+ detail::non_const_lvalue<WaitHandler> handler2(handler);
+ self->impl_.get_service().async_wait(
+ self->impl_.get_implementation(), w, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace posix
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_POSIX_BASIC_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/posix/basic_stream_descriptor.hpp b/src/third_party/boost-1.70.0/boost/asio/posix/basic_stream_descriptor.hpp
new file mode 100644
index 00000000000..0098802211e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/posix/basic_stream_descriptor.hpp
@@ -0,0 +1,426 @@
+//
+// posix/basic_stream_descriptor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_BASIC_STREAM_DESCRIPTOR_HPP
+#define BOOST_ASIO_POSIX_BASIC_STREAM_DESCRIPTOR_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/posix/descriptor.hpp>
+
+#if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
+ || defined(GENERATING_DOCUMENTATION)
+
+namespace boost {
+namespace asio {
+namespace posix {
+
+/// Provides stream-oriented descriptor functionality.
+/**
+ * The posix::basic_stream_descriptor class template provides asynchronous and
+ * blocking stream-oriented descriptor functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Executor = executor>
+class basic_stream_descriptor
+ : public basic_descriptor<Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a descriptor.
+ typedef typename basic_descriptor<Executor>::native_handle_type
+ native_handle_type;
+
+ /// Construct a stream descriptor without opening it.
+ /**
+ * This constructor creates a stream descriptor without opening it. The
+ * descriptor needs to be opened and then connected or accepted before data
+ * can be sent or received on it.
+ *
+ * @param ex The I/O executor that the descriptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * descriptor.
+ */
+ explicit basic_stream_descriptor(const executor_type& ex)
+ : basic_descriptor<Executor>(ex)
+ {
+ }
+
+ /// Construct a stream descriptor without opening it.
+ /**
+ * This constructor creates a stream descriptor without opening it. The
+ * descriptor needs to be opened and then connected or accepted before data
+ * can be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_descriptor(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_descriptor<Executor>(context)
+ {
+ }
+
+ /// Construct a stream descriptor on an existing native descriptor.
+ /**
+ * This constructor creates a stream descriptor object to hold an existing
+ * native descriptor.
+ *
+ * @param ex The I/O executor that the descriptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * descriptor.
+ *
+ * @param native_descriptor The new underlying descriptor implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_stream_descriptor(const executor_type& ex,
+ const native_handle_type& native_descriptor)
+ : basic_descriptor<Executor>(ex, native_descriptor)
+ {
+ }
+
+ /// Construct a stream descriptor on an existing native descriptor.
+ /**
+ * This constructor creates a stream descriptor object to hold an existing
+ * native descriptor.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ *
+ * @param native_descriptor The new underlying descriptor implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_descriptor(ExecutionContext& context,
+ const native_handle_type& native_descriptor,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_descriptor<Executor>(context, native_descriptor)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a stream descriptor from another.
+ /**
+ * This constructor moves a stream descriptor from one object to another.
+ *
+ * @param other The other stream descriptor 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_stream_descriptor(const executor_type&)
+ * constructor.
+ */
+ basic_stream_descriptor(basic_stream_descriptor&& other)
+ : descriptor(std::move(other))
+ {
+ }
+
+ /// Move-assign a stream descriptor from another.
+ /**
+ * This assignment operator moves a stream descriptor from one object to
+ * another.
+ *
+ * @param other The other stream descriptor 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_stream_descriptor(const executor_type&)
+ * constructor.
+ */
+ basic_stream_descriptor& operator=(basic_stream_descriptor&& other)
+ {
+ descriptor::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Write some data to the descriptor.
+ /**
+ * This function is used to write data to the stream descriptor. The function
+ * call will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the descriptor.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * descriptor.write_some(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.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the descriptor.
+ /**
+ * This function is used to write data to the stream descriptor. The function
+ * call will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the descriptor.
+ *
+ * @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 this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the stream
+ * descriptor. The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be written to the descriptor.
+ * 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The write 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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * descriptor.async_write_some(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 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)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_write_some(), handler, this, buffers);
+ }
+
+ /// Read some data from the descriptor.
+ /**
+ * This function is used to read data from the stream descriptor. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * descriptor.read_some(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.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the descriptor.
+ /**
+ * This function is used to read data from the stream descriptor. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more 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 this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the stream
+ * descriptor. The function call always returns immediately.
+ *
+ * @param buffers One or more buffers 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 read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The read 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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * descriptor.async_read_some(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.
+ */
+ 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)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_read_some(), handler, this, buffers);
+ }
+
+private:
+ struct initiate_async_write_some
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ basic_stream_descriptor* self,
+ const ConstBufferSequence& buffers) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self->impl_.get_service().async_write_some(
+ self->impl_.get_implementation(), buffers, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+
+ struct initiate_async_read_some
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ basic_stream_descriptor* self,
+ const MutableBufferSequence& buffers) const
+ {
+ // 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;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self->impl_.get_service().async_read_some(
+ self->impl_.get_implementation(), buffers, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
+};
+
+} // namespace posix
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_POSIX_BASIC_STREAM_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/posix/descriptor.hpp b/src/third_party/boost-1.70.0/boost/asio/posix/descriptor.hpp
new file mode 100644
index 00000000000..d7aa928725c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/posix/descriptor.hpp
@@ -0,0 +1,39 @@
+//
+// posix/descriptor.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_DESCRIPTOR_HPP
+#define BOOST_ASIO_POSIX_DESCRIPTOR_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_POSIX_STREAM_DESCRIPTOR) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/posix/basic_descriptor.hpp>
+
+namespace boost {
+namespace asio {
+namespace posix {
+
+/// Typedef for the typical usage of basic_descriptor.
+typedef basic_descriptor<> descriptor;
+
+} // namespace posix
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_POSIX_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/posix/descriptor_base.hpp b/src/third_party/boost-1.70.0/boost/asio/posix/descriptor_base.hpp
new file mode 100644
index 00000000000..ff7d4c9845f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/posix/descriptor_base.hpp
@@ -0,0 +1,92 @@
+//
+// posix/descriptor_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_DESCRIPTOR_BASE_HPP
+#define BOOST_ASIO_POSIX_DESCRIPTOR_BASE_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_POSIX_STREAM_DESCRIPTOR) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/io_control.hpp>
+#include <boost/asio/detail/socket_option.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace posix {
+
+/// The descriptor_base class is used as a base for the descriptor class as a
+/// place to define the associated IO control commands.
+class descriptor_base
+{
+public:
+ /// Wait types.
+ /**
+ * For use with descriptor::wait() and descriptor::async_wait().
+ */
+ enum wait_type
+ {
+ /// Wait for a descriptor to become ready to read.
+ wait_read,
+
+ /// Wait for a descriptor to become ready to write.
+ wait_write,
+
+ /// Wait for a descriptor to have error conditions pending.
+ wait_error
+ };
+
+ /// IO control command to get the amount of data that can be read without
+ /// blocking.
+ /**
+ * Implements the FIONREAD IO control command.
+ *
+ * @par Example
+ * @code
+ * boost::asio::posix::stream_descriptor descriptor(my_context);
+ * ...
+ * boost::asio::descriptor_base::bytes_readable command(true);
+ * descriptor.io_control(command);
+ * std::size_t bytes_readable = command.get();
+ * @endcode
+ *
+ * @par Concepts:
+ * IoControlCommand.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined bytes_readable;
+#else
+ typedef boost::asio::detail::io_control::bytes_readable bytes_readable;
+#endif
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~descriptor_base()
+ {
+ }
+};
+
+} // namespace posix
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_POSIX_DESCRIPTOR_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/posix/stream_descriptor.hpp b/src/third_party/boost-1.70.0/boost/asio/posix/stream_descriptor.hpp
new file mode 100644
index 00000000000..035cf3c5b10
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/posix/stream_descriptor.hpp
@@ -0,0 +1,39 @@
+//
+// posix/stream_descriptor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POSIX_STREAM_DESCRIPTOR_HPP
+#define BOOST_ASIO_POSIX_STREAM_DESCRIPTOR_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_POSIX_STREAM_DESCRIPTOR) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/posix/basic_stream_descriptor.hpp>
+
+namespace boost {
+namespace asio {
+namespace posix {
+
+/// Typedef for the typical usage of a stream-oriented descriptor.
+typedef basic_stream_descriptor<> stream_descriptor;
+
+} // namespace posix
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_POSIX_STREAM_DESCRIPTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/post.hpp b/src/third_party/boost-1.70.0/boost/asio/post.hpp
new file mode 100644
index 00000000000..0fbdbf0b987
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/post.hpp
@@ -0,0 +1,115 @@
+//
+// post.hpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_POST_HPP
+#define BOOST_ASIO_POST_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/type_traits.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/is_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Submits a completion token or function object for execution.
+/**
+ * This function submits an object for execution using the object's associated
+ * executor. The function object is queued for execution, and is never called
+ * from the current thread prior to returning from <tt>post()</tt>.
+ *
+ * The use of @c post(), rather than @ref defer(), indicates the caller's
+ * preference that the function object be eagerly queued for execution.
+ *
+ * This function has the following effects:
+ *
+ * @li Constructs a function object handler of type @c Handler, initialized
+ * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ *
+ * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
+ * initializing the object as <tt>result(handler)</tt>.
+ *
+ * @li Obtains the handler's associated executor object @c ex by performing
+ * <tt>get_associated_executor(handler)</tt>.
+ *
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * <tt>get_associated_allocator(handler)</tt>.
+ *
+ * @li Performs <tt>ex.post(std::move(handler), alloc)</tt>.
+ *
+ * @li Returns <tt>result.get()</tt>.
+ */
+template <typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) token);
+
+/// Submits a completion token or function object for execution.
+/**
+ * This function submits an object for execution using the specified executor.
+ * The function object is queued for execution, and is never called from the
+ * current thread prior to returning from <tt>post()</tt>.
+ *
+ * The use of @c post(), rather than @ref defer(), indicates the caller's
+ * preference that the function object be eagerly queued for execution.
+ *
+ * This function has the following effects:
+ *
+ * @li Constructs a function object handler of type @c Handler, initialized
+ * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ *
+ * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
+ * initializing the object as <tt>result(handler)</tt>.
+ *
+ * @li Obtains the handler's associated executor object @c ex1 by performing
+ * <tt>get_associated_executor(handler)</tt>.
+ *
+ * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
+ *
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * <tt>get_associated_allocator(handler)</tt>.
+ *
+ * @li Constructs a function object @c f with a function call operator that
+ * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
+ * <tt>w.reset()</tt>.
+ *
+ * @li Performs <tt>Executor(ex).post(std::move(f), alloc)</tt>.
+ *
+ * @li Returns <tt>result.get()</tt>.
+ */
+template <typename Executor, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
+ const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_executor<Executor>::value>::type* = 0);
+
+/// Submits a completion token or function object for execution.
+/**
+ * @returns <tt>post(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
+ */
+template <typename ExecutionContext, typename CompletionToken>
+BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
+ ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token,
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type* = 0);
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/post.hpp>
+
+#endif // BOOST_ASIO_POST_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/read.hpp b/src/third_party/boost-1.70.0/boost/asio/read.hpp
new file mode 100644
index 00000000000..3c4868605b3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/read.hpp
@@ -0,0 +1,1245 @@
+//
+// read.hpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2019 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);
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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_v1>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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_v1>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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_v1,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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_v1,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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_v2>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/*@}*/
+/**
+ * @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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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);
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v1, 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_v1) buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ 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_v1) buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/*@}*/
+
+} // 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.70.0/boost/asio/read_at.hpp b/src/third_party/boost-1.70.0/boost/asio/read_at.hpp
new file mode 100644
index 00000000000..8319feb196a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/read_at.hpp
@@ -0,0 +1,673 @@
+//
+// read_at.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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.70.0/boost/asio/read_until.hpp b/src/third_party/boost-1.70.0/boost/asio/read_until.hpp
new file mode 100644
index 00000000000..96ed6a77de5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/read_until.hpp
@@ -0,0 +1,2797 @@
+//
+// read_until.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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/buffer.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.
+ */
+/*@{*/
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+/// 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_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ char delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+/// 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_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+/// 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_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+#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_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ const boost::regex& expr,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+/// 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_v1>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ const boost::regex& expr, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+#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_v1::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_v1, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ MatchCondition match_condition,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::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_v1::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_v1, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/// 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_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ char delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/// 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_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/// 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_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+#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_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::regex& expr,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/// 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_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::regex& expr, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+#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_v2::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_v2, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2::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_v2, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+#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.
+ */
+/*@{*/
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v1, 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_v1) buffers,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v1, 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_v1) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+#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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v1, 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_v1) buffers,
+ const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
+ >::type* = 0);
+
+#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_v1::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v1,
+ 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_v1) buffers,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+#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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v2, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+#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_v2::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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_v2,
+ typename MatchCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_match_condition<MatchCondition>::value
+ && is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+#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.70.0/boost/asio/redirect_error.hpp b/src/third_party/boost-1.70.0/boost/asio/redirect_error.hpp
new file mode 100644
index 00000000000..f4563a59314
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/redirect_error.hpp
@@ -0,0 +1,68 @@
+//
+// redirect_error.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_REDIRECT_ERROR_HPP
+#define BOOST_ASIO_REDIRECT_ERROR_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/system/error_code.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Completion token type used to specify that an error produced by an
+/// asynchronous operation is captured to an error_code variable.
+/**
+ * The redirect_error_t class is used to indicate that any error_code produced
+ * by an asynchronous operation is captured to a specified variable.
+ */
+template <typename CompletionToken>
+class redirect_error_t
+{
+public:
+ /// Constructor.
+ template <typename T>
+ redirect_error_t(BOOST_ASIO_MOVE_ARG(T) completion_token,
+ boost::system::error_code& ec)
+ : token_(BOOST_ASIO_MOVE_CAST(T)(completion_token)),
+ ec_(ec)
+ {
+ }
+
+//private:
+ CompletionToken token_;
+ boost::system::error_code& ec_;
+};
+
+/// Create a completion token to capture error_code values to a variable.
+template <typename CompletionToken>
+inline redirect_error_t<typename decay<CompletionToken>::type> redirect_error(
+ BOOST_ASIO_MOVE_ARG(CompletionToken) completion_token,
+ boost::system::error_code& ec)
+{
+ return redirect_error_t<typename decay<CompletionToken>::type>(
+ BOOST_ASIO_MOVE_CAST(CompletionToken)(completion_token), ec);
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/redirect_error.hpp>
+
+#endif // BOOST_ASIO_REDIRECT_ERROR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/serial_port.hpp b/src/third_party/boost-1.70.0/boost/asio/serial_port.hpp
new file mode 100644
index 00000000000..b0960d89342
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/serial_port.hpp
@@ -0,0 +1,38 @@
+//
+// serial_port.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_HPP
+#define BOOST_ASIO_SERIAL_PORT_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_SERIAL_PORT) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_serial_port.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for the typical usage of a serial port.
+typedef basic_serial_port<> serial_port;
+
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_SERIAL_PORT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/serial_port_base.hpp b/src/third_party/boost-1.70.0/boost/asio/serial_port_base.hpp
new file mode 100644
index 00000000000..f902af1ebee
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/serial_port_base.hpp
@@ -0,0 +1,169 @@
+//
+// serial_port_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_BASE_HPP
+#define BOOST_ASIO_SERIAL_PORT_BASE_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_SERIAL_PORT) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+# include <termios.h>
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/system/error_code.hpp>
+
+#if defined(GENERATING_DOCUMENTATION)
+# define BOOST_ASIO_OPTION_STORAGE implementation_defined
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# define BOOST_ASIO_OPTION_STORAGE DCB
+#else
+# define BOOST_ASIO_OPTION_STORAGE termios
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// The serial_port_base class is used as a base for the basic_serial_port class
+/// template so that we have a common place to define the serial port options.
+class serial_port_base
+{
+public:
+ /// Serial port option to permit changing the baud rate.
+ /**
+ * Implements changing the baud rate for a given serial port.
+ */
+ class baud_rate
+ {
+ public:
+ explicit baud_rate(unsigned int rate = 0);
+ unsigned int value() const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
+ BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec) const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
+ const BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec);
+ private:
+ unsigned int value_;
+ };
+
+ /// Serial port option to permit changing the flow control.
+ /**
+ * Implements changing the flow control for a given serial port.
+ */
+ class flow_control
+ {
+ public:
+ enum type { none, software, hardware };
+ BOOST_ASIO_DECL explicit flow_control(type t = none);
+ type value() const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
+ BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec) const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
+ const BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec);
+ private:
+ type value_;
+ };
+
+ /// Serial port option to permit changing the parity.
+ /**
+ * Implements changing the parity for a given serial port.
+ */
+ class parity
+ {
+ public:
+ enum type { none, odd, even };
+ BOOST_ASIO_DECL explicit parity(type t = none);
+ type value() const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
+ BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec) const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
+ const BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec);
+ private:
+ type value_;
+ };
+
+ /// Serial port option to permit changing the number of stop bits.
+ /**
+ * Implements changing the number of stop bits for a given serial port.
+ */
+ class stop_bits
+ {
+ public:
+ enum type { one, onepointfive, two };
+ BOOST_ASIO_DECL explicit stop_bits(type t = one);
+ type value() const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
+ BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec) const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
+ const BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec);
+ private:
+ type value_;
+ };
+
+ /// Serial port option to permit changing the character size.
+ /**
+ * Implements changing the character size for a given serial port.
+ */
+ class character_size
+ {
+ public:
+ BOOST_ASIO_DECL explicit character_size(unsigned int t = 8);
+ unsigned int value() const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID store(
+ BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec) const;
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load(
+ const BOOST_ASIO_OPTION_STORAGE& storage,
+ boost::system::error_code& ec);
+ private:
+ unsigned int value_;
+ };
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~serial_port_base()
+ {
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#undef BOOST_ASIO_OPTION_STORAGE
+
+#include <boost/asio/impl/serial_port_base.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/serial_port_base.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_SERIAL_PORT_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/signal_set.hpp b/src/third_party/boost-1.70.0/boost/asio/signal_set.hpp
new file mode 100644
index 00000000000..29cfd1b3e55
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/signal_set.hpp
@@ -0,0 +1,30 @@
+//
+// signal_set.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SIGNAL_SET_HPP
+#define BOOST_ASIO_SIGNAL_SET_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/basic_signal_set.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for the typical usage of a signal set.
+typedef basic_signal_set<> signal_set;
+
+} // namespace asio
+} // namespace boost
+
+#endif // BOOST_ASIO_SIGNAL_SET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/socket_base.hpp b/src/third_party/boost-1.70.0/boost/asio/socket_base.hpp
new file mode 100644
index 00000000000..c19f8d27423
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/socket_base.hpp
@@ -0,0 +1,561 @@
+//
+// socket_base.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SOCKET_BASE_HPP
+#define BOOST_ASIO_SOCKET_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/detail/io_control.hpp>
+#include <boost/asio/detail/socket_option.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// The socket_base class is used as a base for the basic_stream_socket and
+/// basic_datagram_socket class templates so that we have a common place to
+/// define the shutdown_type and enum.
+class socket_base
+{
+public:
+ /// Different ways a socket may be shutdown.
+ enum shutdown_type
+ {
+#if defined(GENERATING_DOCUMENTATION)
+ /// Shutdown the receive side of the socket.
+ shutdown_receive = implementation_defined,
+
+ /// Shutdown the send side of the socket.
+ shutdown_send = implementation_defined,
+
+ /// Shutdown both send and receive on the socket.
+ shutdown_both = implementation_defined
+#else
+ shutdown_receive = BOOST_ASIO_OS_DEF(SHUT_RD),
+ shutdown_send = BOOST_ASIO_OS_DEF(SHUT_WR),
+ shutdown_both = BOOST_ASIO_OS_DEF(SHUT_RDWR)
+#endif
+ };
+
+ /// Bitmask type for flags that can be passed to send and receive operations.
+ typedef int message_flags;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// Peek at incoming data without removing it from the input queue.
+ static const int message_peek = implementation_defined;
+
+ /// Process out-of-band data.
+ static const int message_out_of_band = implementation_defined;
+
+ /// Specify that the data should not be subject to routing.
+ static const int message_do_not_route = implementation_defined;
+
+ /// Specifies that the data marks the end of a record.
+ static const int message_end_of_record = implementation_defined;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(int,
+ message_peek = BOOST_ASIO_OS_DEF(MSG_PEEK));
+ BOOST_ASIO_STATIC_CONSTANT(int,
+ message_out_of_band = BOOST_ASIO_OS_DEF(MSG_OOB));
+ BOOST_ASIO_STATIC_CONSTANT(int,
+ message_do_not_route = BOOST_ASIO_OS_DEF(MSG_DONTROUTE));
+ BOOST_ASIO_STATIC_CONSTANT(int,
+ message_end_of_record = BOOST_ASIO_OS_DEF(MSG_EOR));
+#endif
+
+ /// Wait types.
+ /**
+ * For use with basic_socket::wait() and basic_socket::async_wait().
+ */
+ enum wait_type
+ {
+ /// Wait for a socket to become ready to read.
+ wait_read,
+
+ /// Wait for a socket to become ready to write.
+ wait_write,
+
+ /// Wait for a socket to have error conditions pending.
+ wait_error
+ };
+
+ /// Socket option to permit sending of broadcast messages.
+ /**
+ * Implements the SOL_SOCKET/SO_BROADCAST socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::broadcast option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::broadcast option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined broadcast;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_BROADCAST)>
+ broadcast;
+#endif
+
+ /// Socket option to enable socket-level debugging.
+ /**
+ * Implements the SOL_SOCKET/SO_DEBUG socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::debug option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::debug option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined debug;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DEBUG)> debug;
+#endif
+
+ /// Socket option to prevent routing, use local interfaces only.
+ /**
+ * Implements the SOL_SOCKET/SO_DONTROUTE socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::do_not_route option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::udp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::do_not_route option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined do_not_route;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DONTROUTE)>
+ do_not_route;
+#endif
+
+ /// Socket option to send keep-alives.
+ /**
+ * Implements the SOL_SOCKET/SO_KEEPALIVE socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::keep_alive option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::keep_alive option;
+ * socket.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined keep_alive;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_KEEPALIVE)> keep_alive;
+#endif
+
+ /// Socket option for the send buffer size of a socket.
+ /**
+ * Implements the SOL_SOCKET/SO_SNDBUF socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::send_buffer_size option(8192);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::send_buffer_size option;
+ * socket.get_option(option);
+ * int size = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Integer_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined send_buffer_size;
+#else
+ typedef boost::asio::detail::socket_option::integer<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDBUF)>
+ send_buffer_size;
+#endif
+
+ /// Socket option for the send low watermark.
+ /**
+ * Implements the SOL_SOCKET/SO_SNDLOWAT socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::send_low_watermark option(1024);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::send_low_watermark option;
+ * socket.get_option(option);
+ * int size = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Integer_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined send_low_watermark;
+#else
+ typedef boost::asio::detail::socket_option::integer<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDLOWAT)>
+ send_low_watermark;
+#endif
+
+ /// Socket option for the receive buffer size of a socket.
+ /**
+ * Implements the SOL_SOCKET/SO_RCVBUF socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::receive_buffer_size option(8192);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::receive_buffer_size option;
+ * socket.get_option(option);
+ * int size = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Integer_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined receive_buffer_size;
+#else
+ typedef boost::asio::detail::socket_option::integer<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVBUF)>
+ receive_buffer_size;
+#endif
+
+ /// Socket option for the receive low watermark.
+ /**
+ * Implements the SOL_SOCKET/SO_RCVLOWAT socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::receive_low_watermark option(1024);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::receive_low_watermark option;
+ * socket.get_option(option);
+ * int size = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Integer_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined receive_low_watermark;
+#else
+ typedef boost::asio::detail::socket_option::integer<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVLOWAT)>
+ receive_low_watermark;
+#endif
+
+ /// Socket option to allow the socket to be bound to an address that is
+ /// already in use.
+ /**
+ * Implements the SOL_SOCKET/SO_REUSEADDR socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::socket_base::reuse_address option(true);
+ * acceptor.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::socket_base::reuse_address option;
+ * acceptor.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined reuse_address;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_REUSEADDR)>
+ reuse_address;
+#endif
+
+ /// Socket option to specify whether the socket lingers on close if unsent
+ /// data is present.
+ /**
+ * Implements the SOL_SOCKET/SO_LINGER socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::linger option(true, 30);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::linger option;
+ * socket.get_option(option);
+ * bool is_set = option.enabled();
+ * unsigned short timeout = option.timeout();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Linger_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined linger;
+#else
+ typedef boost::asio::detail::socket_option::linger<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_LINGER)>
+ linger;
+#endif
+
+ /// Socket option for putting received out-of-band data inline.
+ /**
+ * Implements the SOL_SOCKET/SO_OOBINLINE socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::out_of_band_inline option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::out_of_band_inline option;
+ * socket.get_option(option);
+ * bool value = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined out_of_band_inline;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_OOBINLINE)>
+ out_of_band_inline;
+#endif
+
+ /// Socket option to report aborted connections on accept.
+ /**
+ * Implements a custom socket option that determines whether or not an accept
+ * operation is permitted to fail with boost::asio::error::connection_aborted.
+ * By default the option is false.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::socket_base::enable_connection_aborted option(true);
+ * acceptor.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * boost::asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * boost::asio::socket_base::enable_connection_aborted option;
+ * acceptor.get_option(option);
+ * bool is_set = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined enable_connection_aborted;
+#else
+ typedef boost::asio::detail::socket_option::boolean<
+ boost::asio::detail::custom_socket_option_level,
+ boost::asio::detail::enable_connection_aborted_option>
+ enable_connection_aborted;
+#endif
+
+ /// IO control command to get the amount of data that can be read without
+ /// blocking.
+ /**
+ * Implements the FIONREAD IO control command.
+ *
+ * @par Example
+ * @code
+ * boost::asio::ip::tcp::socket socket(my_context);
+ * ...
+ * boost::asio::socket_base::bytes_readable command(true);
+ * socket.io_control(command);
+ * std::size_t bytes_readable = command.get();
+ * @endcode
+ *
+ * @par Concepts:
+ * IO_Control_Command, Size_IO_Control_Command.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined bytes_readable;
+#else
+ typedef boost::asio::detail::io_control::bytes_readable bytes_readable;
+#endif
+
+ /// The maximum length of the queue of pending incoming connections.
+#if defined(GENERATING_DOCUMENTATION)
+ static const int max_listen_connections = implementation_defined;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(int, max_listen_connections
+ = BOOST_ASIO_OS_DEF(SOMAXCONN));
+#endif
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use max_listen_connections.) The maximum length of the queue
+ /// of pending incoming connections.
+#if defined(GENERATING_DOCUMENTATION)
+ static const int max_connections = implementation_defined;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(int, max_connections
+ = BOOST_ASIO_OS_DEF(SOMAXCONN));
+#endif
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~socket_base()
+ {
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SOCKET_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/spawn.hpp b/src/third_party/boost-1.70.0/boost/asio/spawn.hpp
new file mode 100644
index 00000000000..26fda32ff4a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/spawn.hpp
@@ -0,0 +1,338 @@
+//
+// spawn.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SPAWN_HPP
+#define BOOST_ASIO_SPAWN_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/coroutine/all.hpp>
+#include <boost/asio/bind_executor.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/detail/wrapped_handler.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/is_executor.hpp>
+#include <boost/asio/strand.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Context object the represents the currently executing coroutine.
+/**
+ * The basic_yield_context class is used to represent the currently executing
+ * stackful coroutine. A basic_yield_context may be passed as a handler to an
+ * asynchronous operation. For example:
+ *
+ * @code template <typename Handler>
+ * void my_coroutine(basic_yield_context<Handler> yield)
+ * {
+ * ...
+ * std::size_t n = my_socket.async_read_some(buffer, yield);
+ * ...
+ * } @endcode
+ *
+ * The initiating function (async_read_some in the above example) suspends the
+ * current coroutine. The coroutine is resumed when the asynchronous operation
+ * completes, and the result of the operation is returned.
+ */
+template <typename Handler>
+class basic_yield_context
+{
+public:
+ /// The coroutine callee type, used by the implementation.
+ /**
+ * When using Boost.Coroutine v1, this type is:
+ * @code typename coroutine<void()> @endcode
+ * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
+ * @code push_coroutine<void> @endcode
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined callee_type;
+#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
+ typedef boost::coroutines::push_coroutine<void> callee_type;
+#else
+ typedef boost::coroutines::coroutine<void()> callee_type;
+#endif
+
+ /// The coroutine caller type, used by the implementation.
+ /**
+ * When using Boost.Coroutine v1, this type is:
+ * @code typename coroutine<void()>::caller_type @endcode
+ * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
+ * @code pull_coroutine<void> @endcode
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined caller_type;
+#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
+ typedef boost::coroutines::pull_coroutine<void> caller_type;
+#else
+ typedef boost::coroutines::coroutine<void()>::caller_type caller_type;
+#endif
+
+ /// Construct a yield context to represent the specified coroutine.
+ /**
+ * Most applications do not need to use this constructor. Instead, the
+ * spawn() function passes a yield context as an argument to the coroutine
+ * function.
+ */
+ basic_yield_context(
+ const detail::weak_ptr<callee_type>& coro,
+ caller_type& ca, Handler& handler)
+ : coro_(coro),
+ ca_(ca),
+ handler_(handler),
+ ec_(0)
+ {
+ }
+
+ /// Construct a yield context from another yield context type.
+ /**
+ * Requires that OtherHandler be convertible to Handler.
+ */
+ template <typename OtherHandler>
+ basic_yield_context(const basic_yield_context<OtherHandler>& other)
+ : coro_(other.coro_),
+ ca_(other.ca_),
+ handler_(other.handler_),
+ ec_(other.ec_)
+ {
+ }
+
+ /// Return a yield context that sets the specified error_code.
+ /**
+ * By default, when a yield context is used with an asynchronous operation, a
+ * non-success error_code is converted to system_error and thrown. This
+ * operator may be used to specify an error_code object that should instead be
+ * set with the asynchronous operation's result. For example:
+ *
+ * @code template <typename Handler>
+ * void my_coroutine(basic_yield_context<Handler> yield)
+ * {
+ * ...
+ * std::size_t n = my_socket.async_read_some(buffer, yield[ec]);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * ...
+ * } @endcode
+ */
+ basic_yield_context operator[](boost::system::error_code& ec) const
+ {
+ basic_yield_context tmp(*this);
+ tmp.ec_ = &ec;
+ return tmp;
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+private:
+#endif // defined(GENERATING_DOCUMENTATION)
+ detail::weak_ptr<callee_type> coro_;
+ caller_type& ca_;
+ Handler handler_;
+ boost::system::error_code* ec_;
+};
+
+#if defined(GENERATING_DOCUMENTATION)
+/// Context object that represents the currently executing coroutine.
+typedef basic_yield_context<unspecified> yield_context;
+#else // defined(GENERATING_DOCUMENTATION)
+typedef basic_yield_context<
+ executor_binder<void(*)(), executor> > yield_context;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+/**
+ * @defgroup spawn boost::asio::spawn
+ *
+ * @brief Start a new stackful coroutine.
+ *
+ * The spawn() function is a high-level wrapper over the Boost.Coroutine
+ * library. This function enables programs to implement asynchronous logic in a
+ * synchronous manner, as illustrated by the following example:
+ *
+ * @code boost::asio::spawn(my_strand, do_echo);
+ *
+ * // ...
+ *
+ * void do_echo(boost::asio::yield_context yield)
+ * {
+ * try
+ * {
+ * char data[128];
+ * for (;;)
+ * {
+ * std::size_t length =
+ * my_socket.async_read_some(
+ * boost::asio::buffer(data), yield);
+ *
+ * boost::asio::async_write(my_socket,
+ * boost::asio::buffer(data, length), yield);
+ * }
+ * }
+ * catch (std::exception& e)
+ * {
+ * // ...
+ * }
+ * } @endcode
+ */
+/*@{*/
+
+/// Start a new stackful coroutine, calling the specified handler when it
+/// completes.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(basic_yield_context<Handler> yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Function>
+void spawn(BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes());
+
+/// Start a new stackful coroutine, calling the specified handler when it
+/// completes.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param handler A handler to be called when the coroutine exits. More
+ * importantly, the handler provides an execution context (via the the handler
+ * invocation hook) for the coroutine. The handler must have the signature:
+ * @code void handler(); @endcode
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(basic_yield_context<Handler> yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Handler, typename Function>
+void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes(),
+ typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
+ !is_convertible<Handler&, execution_context&>::value>::type* = 0);
+
+/// Start a new stackful coroutine, inheriting the execution context of another.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param ctx Identifies the current coroutine as a parent of the new
+ * coroutine. This specifies that the new coroutine should inherit the
+ * execution context of the parent. For example, if the parent coroutine is
+ * executing in a particular strand, then the new coroutine will execute in the
+ * same strand.
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(basic_yield_context<Handler> yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Handler, typename Function>
+void spawn(basic_yield_context<Handler> ctx,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes());
+
+/// Start a new stackful coroutine that executes on a given executor.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param ex Identifies the executor that will run the coroutine. The new
+ * coroutine is implicitly given its own strand within this executor.
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(yield_context yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Function, typename Executor>
+void spawn(const Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes(),
+ typename enable_if<is_executor<Executor>::value>::type* = 0);
+
+/// Start a new stackful coroutine that executes on a given strand.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param ex Identifies the strand that will run the coroutine.
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(yield_context yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Function, typename Executor>
+void spawn(const strand<Executor>& ex,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes());
+
+/// Start a new stackful coroutine that executes in the context of a strand.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param s Identifies a strand. By starting multiple coroutines on the same
+ * strand, the implementation ensures that none of those coroutines can execute
+ * simultaneously.
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(yield_context yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Function>
+void spawn(const boost::asio::io_context::strand& s,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes());
+
+/// Start a new stackful coroutine that executes on a given execution context.
+/**
+ * This function is used to launch a new coroutine.
+ *
+ * @param ctx Identifies the execution context that will run the coroutine. The
+ * new coroutine is implicitly given its own strand within this execution
+ * context.
+ *
+ * @param function The coroutine function. The function must have the signature:
+ * @code void function(yield_context yield); @endcode
+ *
+ * @param attributes Boost.Coroutine attributes used to customise the coroutine.
+ */
+template <typename Function, typename ExecutionContext>
+void spawn(ExecutionContext& ctx,
+ BOOST_ASIO_MOVE_ARG(Function) function,
+ const boost::coroutines::attributes& attributes
+ = boost::coroutines::attributes(),
+ typename enable_if<is_convertible<
+ ExecutionContext&, execution_context&>::value>::type* = 0);
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/spawn.hpp>
+
+#endif // BOOST_ASIO_SPAWN_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl.hpp
new file mode 100644
index 00000000000..924f1795038
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl.hpp
@@ -0,0 +1,27 @@
+//
+// ssl.hpp
+// ~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HPP
+#define BOOST_ASIO_SSL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/ssl/context.hpp>
+#include <boost/asio/ssl/context_base.hpp>
+#include <boost/asio/ssl/error.hpp>
+#include <boost/asio/ssl/rfc2818_verification.hpp>
+#include <boost/asio/ssl/stream.hpp>
+#include <boost/asio/ssl/stream_base.hpp>
+#include <boost/asio/ssl/verify_context.hpp>
+#include <boost/asio/ssl/verify_mode.hpp>
+
+#endif // BOOST_ASIO_SSL_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/context.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/context.hpp
new file mode 100644
index 00000000000..60b92a8438c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/context.hpp
@@ -0,0 +1,760 @@
+//
+// ssl/context.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_HPP
+#define BOOST_ASIO_SSL_CONTEXT_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/buffer.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/ssl/context_base.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+#include <boost/asio/ssl/detail/openssl_init.hpp>
+#include <boost/asio/ssl/detail/password_callback.hpp>
+#include <boost/asio/ssl/detail/verify_callback.hpp>
+#include <boost/asio/ssl/verify_mode.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+class context
+ : public context_base,
+ private noncopyable
+{
+public:
+ /// The native handle type of the SSL context.
+ typedef SSL_CTX* native_handle_type;
+
+ /// Constructor.
+ BOOST_ASIO_DECL explicit context(method m);
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a context from another.
+ /**
+ * This constructor moves an SSL context from one object to another.
+ *
+ * @param other The other context object from which the move will occur.
+ *
+ * @note Following the move, the following operations only are valid for the
+ * moved-from object:
+ * @li Destruction.
+ * @li As a target for move-assignment.
+ */
+ BOOST_ASIO_DECL context(context&& other);
+
+ /// Move-assign a context from another.
+ /**
+ * This assignment operator moves an SSL context from one object to another.
+ *
+ * @param other The other context object from which the move will occur.
+ *
+ * @note Following the move, the following operations only are valid for the
+ * moved-from object:
+ * @li Destruction.
+ * @li As a target for move-assignment.
+ */
+ BOOST_ASIO_DECL context& operator=(context&& other);
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destructor.
+ BOOST_ASIO_DECL ~context();
+
+ /// 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.
+ */
+ BOOST_ASIO_DECL native_handle_type native_handle();
+
+ /// Clear options on the context.
+ /**
+ * This function may be used to configure the SSL options used by the context.
+ *
+ * @param o A bitmask of options. The available option values are defined in
+ * the context_base class. The specified options, if currently enabled on the
+ * context, are cleared.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_clear_options.
+ */
+ BOOST_ASIO_DECL void clear_options(options o);
+
+ /// Clear options on the context.
+ /**
+ * This function may be used to configure the SSL options used by the context.
+ *
+ * @param o A bitmask of options. The available option values are defined in
+ * the context_base class. The specified options, if currently enabled on the
+ * context, are cleared.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_clear_options.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID clear_options(options o,
+ boost::system::error_code& ec);
+
+ /// Set options on the context.
+ /**
+ * This function may be used to configure the SSL options used by the context.
+ *
+ * @param o A bitmask of options. The available option values are defined in
+ * the context_base class. The options are bitwise-ored with any existing
+ * value for the options.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_set_options.
+ */
+ BOOST_ASIO_DECL void set_options(options o);
+
+ /// Set options on the context.
+ /**
+ * This function may be used to configure the SSL options used by the context.
+ *
+ * @param o A bitmask of options. The available option values are defined in
+ * the context_base class. The options are bitwise-ored with any existing
+ * value for the options.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_set_options.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_options(options o,
+ boost::system::error_code& ec);
+
+ /// Set the peer verification mode.
+ /**
+ * This function may be used to configure the peer verification mode used by
+ * 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_CTX_set_verify.
+ */
+ BOOST_ASIO_DECL void set_verify_mode(verify_mode v);
+
+ /// Set the peer verification mode.
+ /**
+ * This function may be used to configure the peer verification mode used by
+ * 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_CTX_set_verify.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_verify_mode(
+ verify_mode v, boost::system::error_code& ec);
+
+ /// Set the peer verification depth.
+ /**
+ * This function may be used to configure the maximum verification depth
+ * allowed by the context.
+ *
+ * @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_CTX_set_verify_depth.
+ */
+ BOOST_ASIO_DECL void set_verify_depth(int depth);
+
+ /// Set the peer verification depth.
+ /**
+ * This function may be used to configure the maximum verification depth
+ * allowed by the context.
+ *
+ * @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_CTX_set_verify_depth.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_verify_depth(
+ int depth, boost::system::error_code& 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_CTX_set_verify.
+ */
+ template <typename VerifyCallback>
+ void set_verify_callback(VerifyCallback 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_CTX_set_verify.
+ */
+ template <typename VerifyCallback>
+ BOOST_ASIO_SYNC_OP_VOID set_verify_callback(VerifyCallback callback,
+ boost::system::error_code& ec);
+
+ /// Load a certification authority file for performing verification.
+ /**
+ * This function is used to load one or more trusted certification authorities
+ * from a file.
+ *
+ * @param filename The name of a file containing certification authority
+ * certificates in PEM format.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_load_verify_locations.
+ */
+ BOOST_ASIO_DECL void load_verify_file(const std::string& filename);
+
+ /// Load a certification authority file for performing verification.
+ /**
+ * This function is used to load the certificates for one or more trusted
+ * certification authorities from a file.
+ *
+ * @param filename The name of a file containing certification authority
+ * certificates in PEM format.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_load_verify_locations.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID load_verify_file(
+ const std::string& filename, boost::system::error_code& ec);
+
+ /// Add certification authority for performing verification.
+ /**
+ * This function is used to add one trusted certification authority
+ * from a memory buffer.
+ *
+ * @param ca The buffer containing the certification authority certificate.
+ * The certificate must use the PEM format.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_get_cert_store and @c X509_STORE_add_cert.
+ */
+ BOOST_ASIO_DECL void add_certificate_authority(const const_buffer& ca);
+
+ /// Add certification authority for performing verification.
+ /**
+ * This function is used to add one trusted certification authority
+ * from a memory buffer.
+ *
+ * @param ca The buffer containing the certification authority certificate.
+ * The certificate must use the PEM format.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_get_cert_store and @c X509_STORE_add_cert.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID add_certificate_authority(
+ const const_buffer& ca, boost::system::error_code& ec);
+
+ /// Configures the context to use the default directories for finding
+ /// certification authority certificates.
+ /**
+ * This function specifies that the context should use the default,
+ * system-dependent directories for locating certification authority
+ * certificates.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_set_default_verify_paths.
+ */
+ BOOST_ASIO_DECL void set_default_verify_paths();
+
+ /// Configures the context to use the default directories for finding
+ /// certification authority certificates.
+ /**
+ * This function specifies that the context should use the default,
+ * system-dependent directories for locating certification authority
+ * certificates.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_set_default_verify_paths.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID set_default_verify_paths(
+ boost::system::error_code& ec);
+
+ /// Add a directory containing certificate authority files to be used for
+ /// performing verification.
+ /**
+ * This function is used to specify the name of a directory containing
+ * certification authority certificates. Each file in the directory must
+ * contain a single certificate. The files must be named using the subject
+ * name's hash and an extension of ".0".
+ *
+ * @param path The name of a directory containing the certificates.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_load_verify_locations.
+ */
+ BOOST_ASIO_DECL void add_verify_path(const std::string& path);
+
+ /// Add a directory containing certificate authority files to be used for
+ /// performing verification.
+ /**
+ * This function is used to specify the name of a directory containing
+ * certification authority certificates. Each file in the directory must
+ * contain a single certificate. The files must be named using the subject
+ * name's hash and an extension of ".0".
+ *
+ * @param path The name of a directory containing the certificates.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_load_verify_locations.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID add_verify_path(
+ const std::string& path, boost::system::error_code& ec);
+
+ /// Use a certificate from a memory buffer.
+ /**
+ * This function is used to load a certificate into the context from a buffer.
+ *
+ * @param certificate The buffer containing the certificate.
+ *
+ * @param format The certificate format (ASN.1 or PEM).
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.
+ */
+ BOOST_ASIO_DECL void use_certificate(
+ const const_buffer& certificate, file_format format);
+
+ /// Use a certificate from a memory buffer.
+ /**
+ * This function is used to load a certificate into the context from a buffer.
+ *
+ * @param certificate The buffer containing the certificate.
+ *
+ * @param format The certificate format (ASN.1 or PEM).
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_certificate or SSL_CTX_use_certificate_ASN1.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate(
+ const const_buffer& certificate, file_format format,
+ boost::system::error_code& ec);
+
+ /// Use a certificate from a file.
+ /**
+ * This function is used to load a certificate into the context from a file.
+ *
+ * @param filename The name of the file containing the certificate.
+ *
+ * @param format The file format (ASN.1 or PEM).
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_certificate_file.
+ */
+ BOOST_ASIO_DECL void use_certificate_file(
+ const std::string& filename, file_format format);
+
+ /// Use a certificate from a file.
+ /**
+ * This function is used to load a certificate into the context from a file.
+ *
+ * @param filename The name of the file containing the certificate.
+ *
+ * @param format The file format (ASN.1 or PEM).
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_certificate_file.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate_file(
+ const std::string& filename, file_format format,
+ boost::system::error_code& ec);
+
+ /// Use a certificate chain from a memory buffer.
+ /**
+ * This function is used to load a certificate chain into the context from a
+ * buffer.
+ *
+ * @param chain The buffer containing the certificate chain. The certificate
+ * chain must use the PEM format.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.
+ */
+ BOOST_ASIO_DECL void use_certificate_chain(const const_buffer& chain);
+
+ /// Use a certificate chain from a memory buffer.
+ /**
+ * This function is used to load a certificate chain into the context from a
+ * buffer.
+ *
+ * @param chain The buffer containing the certificate chain. The certificate
+ * chain must use the PEM format.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_certificate and SSL_CTX_add_extra_chain_cert.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate_chain(
+ const const_buffer& chain, boost::system::error_code& ec);
+
+ /// Use a certificate chain from a file.
+ /**
+ * This function is used to load a certificate chain into the context from a
+ * file.
+ *
+ * @param filename The name of the file containing the certificate. The file
+ * must use the PEM format.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_certificate_chain_file.
+ */
+ BOOST_ASIO_DECL void use_certificate_chain_file(const std::string& filename);
+
+ /// Use a certificate chain from a file.
+ /**
+ * This function is used to load a certificate chain into the context from a
+ * file.
+ *
+ * @param filename The name of the file containing the certificate. The file
+ * must use the PEM format.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_certificate_chain_file.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_certificate_chain_file(
+ const std::string& filename, boost::system::error_code& ec);
+
+ /// Use a private key from a memory buffer.
+ /**
+ * This function is used to load a private key into the context from a buffer.
+ *
+ * @param private_key The buffer containing the private key.
+ *
+ * @param format The private key format (ASN.1 or PEM).
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.
+ */
+ BOOST_ASIO_DECL void use_private_key(
+ const const_buffer& private_key, file_format format);
+
+ /// Use a private key from a memory buffer.
+ /**
+ * This function is used to load a private key into the context from a buffer.
+ *
+ * @param private_key The buffer containing the private key.
+ *
+ * @param format The private key format (ASN.1 or PEM).
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_PrivateKey or SSL_CTX_use_PrivateKey_ASN1.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_private_key(
+ const const_buffer& private_key, file_format format,
+ boost::system::error_code& ec);
+
+ /// Use a private key from a file.
+ /**
+ * This function is used to load a private key into the context from a file.
+ *
+ * @param filename The name of the file containing the private key.
+ *
+ * @param format The file format (ASN.1 or PEM).
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_PrivateKey_file.
+ */
+ BOOST_ASIO_DECL void use_private_key_file(
+ const std::string& filename, file_format format);
+
+ /// Use a private key from a file.
+ /**
+ * This function is used to load a private key into the context from a file.
+ *
+ * @param filename The name of the file containing the private key.
+ *
+ * @param format The file format (ASN.1 or PEM).
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_PrivateKey_file.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_private_key_file(
+ const std::string& filename, file_format format,
+ boost::system::error_code& ec);
+
+ /// Use an RSA private key from a memory buffer.
+ /**
+ * This function is used to load an RSA private key into the context from a
+ * buffer.
+ *
+ * @param private_key The buffer containing the RSA private key.
+ *
+ * @param format The private key format (ASN.1 or PEM).
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.
+ */
+ BOOST_ASIO_DECL void use_rsa_private_key(
+ const const_buffer& private_key, file_format format);
+
+ /// Use an RSA private key from a memory buffer.
+ /**
+ * This function is used to load an RSA private key into the context from a
+ * buffer.
+ *
+ * @param private_key The buffer containing the RSA private key.
+ *
+ * @param format The private key format (ASN.1 or PEM).
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_RSAPrivateKey or SSL_CTX_use_RSAPrivateKey_ASN1.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_rsa_private_key(
+ const const_buffer& private_key, file_format format,
+ boost::system::error_code& ec);
+
+ /// Use an RSA private key from a file.
+ /**
+ * This function is used to load an RSA private key into the context from a
+ * file.
+ *
+ * @param filename The name of the file containing the RSA private key.
+ *
+ * @param format The file format (ASN.1 or PEM).
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_use_RSAPrivateKey_file.
+ */
+ BOOST_ASIO_DECL void use_rsa_private_key_file(
+ const std::string& filename, file_format format);
+
+ /// Use an RSA private key from a file.
+ /**
+ * This function is used to load an RSA private key into the context from a
+ * file.
+ *
+ * @param filename The name of the file containing the RSA private key.
+ *
+ * @param format The file format (ASN.1 or PEM).
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_use_RSAPrivateKey_file.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_rsa_private_key_file(
+ const std::string& filename, file_format format,
+ boost::system::error_code& ec);
+
+ /// Use the specified memory buffer to obtain the temporary Diffie-Hellman
+ /// parameters.
+ /**
+ * This function is used to load Diffie-Hellman parameters into the context
+ * from a buffer.
+ *
+ * @param dh The memory buffer containing the Diffie-Hellman parameters. The
+ * buffer must use the PEM format.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_set_tmp_dh.
+ */
+ BOOST_ASIO_DECL void use_tmp_dh(const const_buffer& dh);
+
+ /// Use the specified memory buffer to obtain the temporary Diffie-Hellman
+ /// parameters.
+ /**
+ * This function is used to load Diffie-Hellman parameters into the context
+ * from a buffer.
+ *
+ * @param dh The memory buffer containing the Diffie-Hellman parameters. The
+ * buffer must use the PEM format.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_set_tmp_dh.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_tmp_dh(
+ const const_buffer& dh, boost::system::error_code& ec);
+
+ /// Use the specified file to obtain the temporary Diffie-Hellman parameters.
+ /**
+ * This function is used to load Diffie-Hellman parameters into the context
+ * from a file.
+ *
+ * @param filename The name of the file containing the Diffie-Hellman
+ * parameters. The file must use the PEM format.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_set_tmp_dh.
+ */
+ BOOST_ASIO_DECL void use_tmp_dh_file(const std::string& filename);
+
+ /// Use the specified file to obtain the temporary Diffie-Hellman parameters.
+ /**
+ * This function is used to load Diffie-Hellman parameters into the context
+ * from a file.
+ *
+ * @param filename The name of the file containing the Diffie-Hellman
+ * parameters. The file must use the PEM format.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_set_tmp_dh.
+ */
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID use_tmp_dh_file(
+ const std::string& filename, boost::system::error_code& ec);
+
+ /// Set the password callback.
+ /**
+ * This function is used to specify a callback function to obtain password
+ * information about an encrypted key in PEM format.
+ *
+ * @param callback The function object to be used for obtaining the password.
+ * The function signature of the handler must be:
+ * @code std::string password_callback(
+ * std::size_t max_length, // The maximum size for a password.
+ * password_purpose purpose // Whether password is for reading or writing.
+ * ); @endcode
+ * The return value of the callback is a string containing the password.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_CTX_set_default_passwd_cb.
+ */
+ template <typename PasswordCallback>
+ void set_password_callback(PasswordCallback callback);
+
+ /// Set the password callback.
+ /**
+ * This function is used to specify a callback function to obtain password
+ * information about an encrypted key in PEM format.
+ *
+ * @param callback The function object to be used for obtaining the password.
+ * The function signature of the handler must be:
+ * @code std::string password_callback(
+ * std::size_t max_length, // The maximum size for a password.
+ * password_purpose purpose // Whether password is for reading or writing.
+ * ); @endcode
+ * The return value of the callback is a string containing the password.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_CTX_set_default_passwd_cb.
+ */
+ template <typename PasswordCallback>
+ BOOST_ASIO_SYNC_OP_VOID set_password_callback(PasswordCallback callback,
+ boost::system::error_code& ec);
+
+private:
+ struct bio_cleanup;
+ struct x509_cleanup;
+ struct evp_pkey_cleanup;
+ struct rsa_cleanup;
+ struct dh_cleanup;
+
+ // Helper function used to set a peer certificate verification callback.
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID do_set_verify_callback(
+ detail::verify_callback_base* callback, boost::system::error_code& ec);
+
+ // Callback used when the SSL implementation wants to verify a certificate.
+ BOOST_ASIO_DECL static int verify_callback_function(
+ int preverified, X509_STORE_CTX* ctx);
+
+ // Helper function used to set a password callback.
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID do_set_password_callback(
+ detail::password_callback_base* callback, boost::system::error_code& ec);
+
+ // Callback used when the SSL implementation wants a password.
+ BOOST_ASIO_DECL static int password_callback_function(
+ char* buf, int size, int purpose, void* data);
+
+ // Helper function to set the temporary Diffie-Hellman parameters from a BIO.
+ BOOST_ASIO_DECL BOOST_ASIO_SYNC_OP_VOID do_use_tmp_dh(
+ BIO* bio, boost::system::error_code& ec);
+
+ // Helper function to make a BIO from a memory buffer.
+ BOOST_ASIO_DECL BIO* make_buffer_bio(const const_buffer& b);
+
+ // The underlying native implementation.
+ native_handle_type handle_;
+
+ // Ensure openssl is initialised.
+ boost::asio::ssl::detail::openssl_init<> init_;
+};
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/ssl/impl/context.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ssl/impl/context.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_SSL_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/context_base.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/context_base.hpp
new file mode 100644
index 00000000000..98fdedc2e55
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/context_base.hpp
@@ -0,0 +1,211 @@
+//
+// ssl/context_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/ssl/detail/buffered_handshake_op.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/buffered_handshake_op.hpp
new file mode 100644
index 00000000000..812e4d70167
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/buffered_handshake_op.hpp
@@ -0,0 +1,116 @@
+//
+// ssl/detail/buffered_handshake_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_BUFFERED_HANDSHAKE_OP_HPP
+#define BOOST_ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_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/engine.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class buffered_handshake_op
+{
+public:
+ buffered_handshake_op(stream_base::handshake_type type,
+ const ConstBufferSequence& buffers)
+ : type_(type),
+ buffers_(buffers),
+ total_buffer_size_(boost::asio::buffer_size(buffers_))
+ {
+ }
+
+ engine::want operator()(engine& eng,
+ boost::system::error_code& ec,
+ std::size_t& bytes_transferred) const
+ {
+ return this->process(eng, ec, bytes_transferred,
+ boost::asio::buffer_sequence_begin(buffers_),
+ boost::asio::buffer_sequence_end(buffers_));
+ }
+
+ template <typename Handler>
+ void call_handler(Handler& handler,
+ const boost::system::error_code& ec,
+ const std::size_t& bytes_transferred) const
+ {
+ handler(ec, bytes_transferred);
+ }
+
+private:
+ template <typename Iterator>
+ engine::want process(engine& eng,
+ boost::system::error_code& ec,
+ std::size_t& bytes_transferred,
+ Iterator begin, Iterator end) const
+ {
+ Iterator iter = begin;
+ std::size_t accumulated_size = 0;
+
+ for (;;)
+ {
+ engine::want want = eng.handshake(type_, ec);
+ if (want != engine::want_input_and_retry
+ || bytes_transferred == total_buffer_size_)
+ return want;
+
+ // Find the next buffer piece to be fed to the engine.
+ while (iter != end)
+ {
+ const_buffer buffer(*iter);
+
+ // Skip over any buffers which have already been consumed by the engine.
+ if (bytes_transferred >= accumulated_size + buffer.size())
+ {
+ accumulated_size += buffer.size();
+ ++iter;
+ continue;
+ }
+
+ // The current buffer may have been partially consumed by the engine on
+ // a previous iteration. If so, adjust the buffer to point to the
+ // unused portion.
+ if (bytes_transferred > accumulated_size)
+ buffer = buffer + (bytes_transferred - accumulated_size);
+
+ // Pass the buffer to the engine, and update the bytes transferred to
+ // reflect the total number of bytes consumed so far.
+ bytes_transferred += buffer.size();
+ buffer = eng.put_input(buffer);
+ bytes_transferred -= buffer.size();
+ break;
+ }
+ }
+ }
+
+ stream_base::handshake_type type_;
+ ConstBufferSequence buffers_;
+ std::size_t total_buffer_size_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/engine.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/engine.hpp
new file mode 100644
index 00000000000..37e4d33016d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/engine.hpp
@@ -0,0 +1,162 @@
+//
+// ssl/detail/engine.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_ENGINE_HPP
+#define BOOST_ASIO_SSL_DETAIL_ENGINE_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/buffer.hpp>
+#include <boost/asio/detail/static_mutex.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+#include <boost/asio/ssl/detail/verify_callback.hpp>
+#include <boost/asio/ssl/stream_base.hpp>
+#include <boost/asio/ssl/verify_mode.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class engine
+{
+public:
+ enum want
+ {
+ // Returned by functions to indicate that the engine wants input. The input
+ // buffer should be updated to point to the data. The engine then needs to
+ // be called again to retry the operation.
+ want_input_and_retry = -2,
+
+ // Returned by functions to indicate that the engine wants to write output.
+ // The output buffer points to the data to be written. The engine then
+ // needs to be called again to retry the operation.
+ want_output_and_retry = -1,
+
+ // Returned by functions to indicate that the engine doesn't need input or
+ // output.
+ want_nothing = 0,
+
+ // Returned by functions to indicate that the engine wants to write output.
+ // The output buffer points to the data to be written. After that the
+ // operation is complete, and the engine does not need to be called again.
+ want_output = 1
+ };
+
+ // Construct a new engine for the specified context.
+ BOOST_ASIO_DECL explicit engine(SSL_CTX* context);
+
+ // Destructor.
+ BOOST_ASIO_DECL ~engine();
+
+ // Get the underlying implementation in the native type.
+ BOOST_ASIO_DECL SSL* native_handle();
+
+ // Set the peer verification mode.
+ BOOST_ASIO_DECL boost::system::error_code set_verify_mode(
+ verify_mode v, boost::system::error_code& ec);
+
+ // Set the peer verification depth.
+ BOOST_ASIO_DECL boost::system::error_code set_verify_depth(
+ int depth, boost::system::error_code& ec);
+
+ // Set a peer certificate verification callback.
+ BOOST_ASIO_DECL boost::system::error_code set_verify_callback(
+ verify_callback_base* callback, boost::system::error_code& ec);
+
+ // Perform an SSL handshake using either SSL_connect (client-side) or
+ // SSL_accept (server-side).
+ BOOST_ASIO_DECL want handshake(
+ stream_base::handshake_type type, boost::system::error_code& ec);
+
+ // Perform a graceful shutdown of the SSL session.
+ BOOST_ASIO_DECL want shutdown(boost::system::error_code& ec);
+
+ // Write bytes to the SSL session.
+ BOOST_ASIO_DECL want write(const boost::asio::const_buffer& data,
+ boost::system::error_code& ec, std::size_t& bytes_transferred);
+
+ // Read bytes from the SSL session.
+ BOOST_ASIO_DECL want read(const boost::asio::mutable_buffer& data,
+ boost::system::error_code& ec, std::size_t& bytes_transferred);
+
+ // Get output data to be written to the transport.
+ BOOST_ASIO_DECL boost::asio::mutable_buffer get_output(
+ const boost::asio::mutable_buffer& data);
+
+ // Put input data that was read from the transport.
+ BOOST_ASIO_DECL boost::asio::const_buffer put_input(
+ const boost::asio::const_buffer& data);
+
+ // Map an error::eof code returned by the underlying transport according to
+ // the type and state of the SSL session. Returns a const reference to the
+ // error code object, suitable for passing to a completion handler.
+ BOOST_ASIO_DECL const boost::system::error_code& map_error_code(
+ boost::system::error_code& ec) const;
+
+private:
+ // Disallow copying and assignment.
+ engine(const engine&);
+ engine& operator=(const engine&);
+
+ // Callback used when the SSL implementation wants to verify a certificate.
+ BOOST_ASIO_DECL static int verify_callback_function(
+ int preverified, X509_STORE_CTX* ctx);
+
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ // The SSL_accept function may not be thread safe. This mutex is used to
+ // protect all calls to the SSL_accept function.
+ BOOST_ASIO_DECL static boost::asio::detail::static_mutex& accept_mutex();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+ // Perform one operation. Returns >= 0 on success or error, want_read if the
+ // operation needs more input, or want_write if it needs to write some output
+ // before the operation can complete.
+ BOOST_ASIO_DECL want perform(int (engine::* op)(void*, std::size_t),
+ void* data, std::size_t length, boost::system::error_code& ec,
+ std::size_t* bytes_transferred);
+
+ // Adapt the SSL_accept function to the signature needed for perform().
+ BOOST_ASIO_DECL int do_accept(void*, std::size_t);
+
+ // Adapt the SSL_connect function to the signature needed for perform().
+ BOOST_ASIO_DECL int do_connect(void*, std::size_t);
+
+ // Adapt the SSL_shutdown function to the signature needed for perform().
+ BOOST_ASIO_DECL int do_shutdown(void*, std::size_t);
+
+ // Adapt the SSL_read function to the signature needed for perform().
+ BOOST_ASIO_DECL int do_read(void* data, std::size_t length);
+
+ // Adapt the SSL_write function to the signature needed for perform().
+ BOOST_ASIO_DECL int do_write(void* data, std::size_t length);
+
+ SSL* ssl_;
+ BIO* ext_bio_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ssl/detail/impl/engine.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_SSL_DETAIL_ENGINE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/handshake_op.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/handshake_op.hpp
new file mode 100644
index 00000000000..846e33f2539
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/handshake_op.hpp
@@ -0,0 +1,64 @@
+//
+// ssl/detail/handshake_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_HANDSHAKE_OP_HPP
+#define BOOST_ASIO_SSL_DETAIL_HANDSHAKE_OP_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/engine.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class handshake_op
+{
+public:
+ handshake_op(stream_base::handshake_type type)
+ : type_(type)
+ {
+ }
+
+ engine::want operator()(engine& eng,
+ boost::system::error_code& ec,
+ std::size_t& bytes_transferred) const
+ {
+ bytes_transferred = 0;
+ return eng.handshake(type_, ec);
+ }
+
+ template <typename Handler>
+ void call_handler(Handler& handler,
+ const boost::system::error_code& ec,
+ const std::size_t&) const
+ {
+ handler(ec);
+ }
+
+private:
+ stream_base::handshake_type type_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/engine.ipp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/engine.ipp
new file mode 100644
index 00000000000..cac7dfda565
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/engine.ipp
@@ -0,0 +1,338 @@
+//
+// ssl/detail/impl/engine.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_IMPL_ENGINE_IPP
+#define BOOST_ASIO_SSL_DETAIL_IMPL_ENGINE_IPP
+
+#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/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/ssl/detail/engine.hpp>
+#include <boost/asio/ssl/error.hpp>
+#include <boost/asio/ssl/verify_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+engine::engine(SSL_CTX* context)
+ : ssl_(::SSL_new(context))
+{
+ if (!ssl_)
+ {
+ boost::system::error_code ec(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ boost::asio::detail::throw_error(ec, "engine");
+ }
+
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ accept_mutex().init();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+ ::SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE);
+ ::SSL_set_mode(ssl_, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+#if defined(SSL_MODE_RELEASE_BUFFERS)
+ ::SSL_set_mode(ssl_, SSL_MODE_RELEASE_BUFFERS);
+#endif // defined(SSL_MODE_RELEASE_BUFFERS)
+
+ ::BIO* int_bio = 0;
+ ::BIO_new_bio_pair(&int_bio, 0, &ext_bio_, 0);
+ ::SSL_set_bio(ssl_, int_bio, int_bio);
+}
+
+engine::~engine()
+{
+ if (SSL_get_app_data(ssl_))
+ {
+ delete static_cast<verify_callback_base*>(SSL_get_app_data(ssl_));
+ SSL_set_app_data(ssl_, 0);
+ }
+
+ ::BIO_free(ext_bio_);
+ ::SSL_free(ssl_);
+}
+
+SSL* engine::native_handle()
+{
+ return ssl_;
+}
+
+boost::system::error_code engine::set_verify_mode(
+ verify_mode v, boost::system::error_code& ec)
+{
+ ::SSL_set_verify(ssl_, v, ::SSL_get_verify_callback(ssl_));
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code engine::set_verify_depth(
+ int depth, boost::system::error_code& ec)
+{
+ ::SSL_set_verify_depth(ssl_, depth);
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+boost::system::error_code engine::set_verify_callback(
+ verify_callback_base* callback, boost::system::error_code& ec)
+{
+ if (SSL_get_app_data(ssl_))
+ delete static_cast<verify_callback_base*>(SSL_get_app_data(ssl_));
+
+ SSL_set_app_data(ssl_, callback);
+
+ ::SSL_set_verify(ssl_, ::SSL_get_verify_mode(ssl_),
+ &engine::verify_callback_function);
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+int engine::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_get_app_data(ssl))
+ {
+ verify_callback_base* callback =
+ static_cast<verify_callback_base*>(
+ SSL_get_app_data(ssl));
+
+ verify_context verify_ctx(ctx);
+ return callback->call(preverified != 0, verify_ctx) ? 1 : 0;
+ }
+ }
+ }
+
+ return 0;
+}
+
+engine::want engine::handshake(
+ stream_base::handshake_type type, boost::system::error_code& ec)
+{
+ return perform((type == boost::asio::ssl::stream_base::client)
+ ? &engine::do_connect : &engine::do_accept, 0, 0, ec, 0);
+}
+
+engine::want engine::shutdown(boost::system::error_code& ec)
+{
+ return perform(&engine::do_shutdown, 0, 0, ec, 0);
+}
+
+engine::want engine::write(const boost::asio::const_buffer& data,
+ boost::system::error_code& ec, std::size_t& bytes_transferred)
+{
+ if (data.size() == 0)
+ {
+ ec = boost::system::error_code();
+ return engine::want_nothing;
+ }
+
+ return perform(&engine::do_write,
+ const_cast<void*>(data.data()),
+ data.size(), ec, &bytes_transferred);
+}
+
+engine::want engine::read(const boost::asio::mutable_buffer& data,
+ boost::system::error_code& ec, std::size_t& bytes_transferred)
+{
+ if (data.size() == 0)
+ {
+ ec = boost::system::error_code();
+ return engine::want_nothing;
+ }
+
+ return perform(&engine::do_read, data.data(),
+ data.size(), ec, &bytes_transferred);
+}
+
+boost::asio::mutable_buffer engine::get_output(
+ const boost::asio::mutable_buffer& data)
+{
+ int length = ::BIO_read(ext_bio_,
+ data.data(), static_cast<int>(data.size()));
+
+ return boost::asio::buffer(data,
+ length > 0 ? static_cast<std::size_t>(length) : 0);
+}
+
+boost::asio::const_buffer engine::put_input(
+ const boost::asio::const_buffer& data)
+{
+ int length = ::BIO_write(ext_bio_,
+ data.data(), static_cast<int>(data.size()));
+
+ return boost::asio::buffer(data +
+ (length > 0 ? static_cast<std::size_t>(length) : 0));
+}
+
+const boost::system::error_code& engine::map_error_code(
+ boost::system::error_code& ec) const
+{
+ // We only want to map the error::eof code.
+ if (ec != boost::asio::error::eof)
+ return ec;
+
+ // If there's data yet to be read, it's an error.
+ if (BIO_wpending(ext_bio_))
+ {
+ ec = boost::asio::ssl::error::stream_truncated;
+ return ec;
+ }
+
+ // SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
+ // underlying transport is passed through.
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ if (SSL_version(ssl_) == SSL2_VERSION)
+ return ec;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+ // Otherwise, the peer should have negotiated a proper shutdown.
+ if ((::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN) == 0)
+ {
+ ec = boost::asio::ssl::error::stream_truncated;
+ }
+
+ return ec;
+}
+
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+boost::asio::detail::static_mutex& engine::accept_mutex()
+{
+ static boost::asio::detail::static_mutex mutex = BOOST_ASIO_STATIC_MUTEX_INIT;
+ return mutex;
+}
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+engine::want engine::perform(int (engine::* op)(void*, std::size_t),
+ void* data, std::size_t length, boost::system::error_code& ec,
+ std::size_t* bytes_transferred)
+{
+ std::size_t pending_output_before = ::BIO_ctrl_pending(ext_bio_);
+ ::ERR_clear_error();
+ int result = (this->*op)(data, length);
+ int ssl_error = ::SSL_get_error(ssl_, result);
+ int sys_error = static_cast<int>(::ERR_get_error());
+ std::size_t pending_output_after = ::BIO_ctrl_pending(ext_bio_);
+
+ if (ssl_error == SSL_ERROR_SSL)
+ {
+ ec = boost::system::error_code(sys_error,
+ boost::asio::error::get_ssl_category());
+ return pending_output_after > pending_output_before
+ ? want_output : want_nothing;
+ }
+
+ if (ssl_error == SSL_ERROR_SYSCALL)
+ {
+ if (sys_error == 0)
+ {
+ ec = boost::asio::ssl::error::unspecified_system_error;
+ }
+ else
+ {
+ ec = boost::system::error_code(sys_error,
+ boost::asio::error::get_ssl_category());
+ }
+ return pending_output_after > pending_output_before
+ ? want_output : want_nothing;
+ }
+
+ if (result > 0 && bytes_transferred)
+ *bytes_transferred = static_cast<std::size_t>(result);
+
+ if (ssl_error == SSL_ERROR_WANT_WRITE)
+ {
+ ec = boost::system::error_code();
+ return want_output_and_retry;
+ }
+ else if (pending_output_after > pending_output_before)
+ {
+ ec = boost::system::error_code();
+ return result > 0 ? want_output : want_output_and_retry;
+ }
+ else if (ssl_error == SSL_ERROR_WANT_READ)
+ {
+ ec = boost::system::error_code();
+ return want_input_and_retry;
+ }
+ else if (ssl_error == SSL_ERROR_ZERO_RETURN)
+ {
+ ec = boost::asio::error::eof;
+ return want_nothing;
+ }
+ else if (ssl_error == SSL_ERROR_NONE)
+ {
+ ec = boost::system::error_code();
+ return want_nothing;
+ }
+ else
+ {
+ ec = boost::asio::ssl::error::unexpected_result;
+ return want_nothing;
+ }
+}
+
+int engine::do_accept(void*, std::size_t)
+{
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ boost::asio::detail::static_mutex::scoped_lock lock(accept_mutex());
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ return ::SSL_accept(ssl_);
+}
+
+int engine::do_connect(void*, std::size_t)
+{
+ return ::SSL_connect(ssl_);
+}
+
+int engine::do_shutdown(void*, std::size_t)
+{
+ int result = ::SSL_shutdown(ssl_);
+ if (result == 0)
+ result = ::SSL_shutdown(ssl_);
+ return result;
+}
+
+int engine::do_read(void* data, std::size_t length)
+{
+ return ::SSL_read(ssl_, data,
+ length < INT_MAX ? static_cast<int>(length) : INT_MAX);
+}
+
+int engine::do_write(void* data, std::size_t length)
+{
+ return ::SSL_write(ssl_, data,
+ length < INT_MAX ? static_cast<int>(length) : INT_MAX);
+}
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_IMPL_ENGINE_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/openssl_init.ipp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/openssl_init.ipp
new file mode 100644
index 00000000000..5e80dd25560
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/impl/openssl_init.ipp
@@ -0,0 +1,167 @@
+//
+// ssl/detail/impl/openssl_init.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
+// Copyright (c) 2005-2019 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_DETAIL_IMPL_OPENSSL_INIT_IPP
+#define BOOST_ASIO_SSL_DETAIL_IMPL_OPENSSL_INIT_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <vector>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/tss_ptr.hpp>
+#include <boost/asio/ssl/detail/openssl_init.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class openssl_init_base::do_init
+{
+public:
+ do_init()
+ {
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::SSL_library_init();
+ ::SSL_load_error_strings();
+ ::OpenSSL_add_all_algorithms();
+
+ mutexes_.resize(::CRYPTO_num_locks());
+ for (size_t i = 0; i < mutexes_.size(); ++i)
+ mutexes_[i].reset(new boost::asio::detail::mutex);
+ ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ ::CRYPTO_set_id_callback(&do_init::openssl_id_func);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ null_compression_methods_ = sk_SSL_COMP_new_null();
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ }
+
+ ~do_init()
+ {
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ sk_SSL_COMP_free(null_compression_methods_);
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ ::CRYPTO_set_id_callback(0);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::CRYPTO_set_locking_callback(0);
+ ::ERR_free_strings();
+ ::EVP_cleanup();
+ ::CRYPTO_cleanup_all_ex_data();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ ::ERR_remove_state(0);
+#elif (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::ERR_remove_thread_state(NULL);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \
+ && (OPENSSL_VERSION_NUMBER < 0x10100000L) \
+ && !defined(SSL_OP_NO_COMPRESSION)
+ ::SSL_COMP_free_compression_methods();
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
+ // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ // && !defined(SSL_OP_NO_COMPRESSION)
+#if !defined(OPENSSL_IS_BORINGSSL)
+ ::CONF_modules_unload(1);
+#endif // !defined(OPENSSL_IS_BORINGSSL)
+#if !defined(OPENSSL_NO_ENGINE) \
+ && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::ENGINE_cleanup();
+#endif // !defined(OPENSSL_NO_ENGINE)
+ // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ }
+
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ STACK_OF(SSL_COMP)* get_null_compression_methods() const
+ {
+ return null_compression_methods_;
+ }
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+
+private:
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ static unsigned long openssl_id_func()
+ {
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ return ::GetCurrentThreadId();
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ void* id = &errno;
+ BOOST_ASIO_ASSERT(sizeof(unsigned long) >= sizeof(void*));
+ return reinterpret_cast<unsigned long>(id);
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ }
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ static void openssl_locking_func(int mode, int n,
+ const char* /*file*/, int /*line*/)
+ {
+ if (mode & CRYPTO_LOCK)
+ instance()->mutexes_[n]->lock();
+ else
+ instance()->mutexes_[n]->unlock();
+ }
+
+ // Mutexes to be used in locking callbacks.
+ std::vector<boost::asio::detail::shared_ptr<
+ boost::asio::detail::mutex> > mutexes_;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ STACK_OF(SSL_COMP)* null_compression_methods_;
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+};
+
+boost::asio::detail::shared_ptr<openssl_init_base::do_init>
+openssl_init_base::instance()
+{
+ static boost::asio::detail::shared_ptr<do_init> init(new do_init);
+ return init;
+}
+
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+STACK_OF(SSL_COMP)* openssl_init_base::get_null_compression_methods()
+{
+ return instance()->get_null_compression_methods();
+}
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_IMPL_OPENSSL_INIT_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/io.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/io.hpp
new file mode 100644
index 00000000000..f1c2e5317a6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/io.hpp
@@ -0,0 +1,383 @@
+//
+// ssl/detail/io.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_IO_HPP
+#define BOOST_ASIO_SSL_DETAIL_IO_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/engine.hpp>
+#include <boost/asio/ssl/detail/stream_core.hpp>
+#include <boost/asio/write.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+template <typename Stream, typename Operation>
+std::size_t io(Stream& next_layer, stream_core& core,
+ const Operation& op, boost::system::error_code& ec)
+{
+ boost::system::error_code io_ec;
+ std::size_t bytes_transferred = 0;
+ do switch (op(core.engine_, ec, bytes_transferred))
+ {
+ case engine::want_input_and_retry:
+
+ // If the input buffer is empty then we need to read some more data from
+ // the underlying transport.
+ if (core.input_.size() == 0)
+ {
+ core.input_ = boost::asio::buffer(core.input_buffer_,
+ next_layer.read_some(core.input_buffer_, io_ec));
+ if (!ec)
+ ec = io_ec;
+ }
+
+ // Pass the new input data to the engine.
+ core.input_ = core.engine_.put_input(core.input_);
+
+ // Try the operation again.
+ continue;
+
+ case engine::want_output_and_retry:
+
+ // Get output data from the engine and write it to the underlying
+ // transport.
+ boost::asio::write(next_layer,
+ core.engine_.get_output(core.output_buffer_), io_ec);
+ if (!ec)
+ ec = io_ec;
+
+ // Try the operation again.
+ continue;
+
+ case engine::want_output:
+
+ // Get output data from the engine and write it to the underlying
+ // transport.
+ boost::asio::write(next_layer,
+ core.engine_.get_output(core.output_buffer_), io_ec);
+ if (!ec)
+ ec = io_ec;
+
+ // Operation is complete. Return result to caller.
+ core.engine_.map_error_code(ec);
+ return bytes_transferred;
+
+ default:
+
+ // Operation is complete. Return result to caller.
+ core.engine_.map_error_code(ec);
+ return bytes_transferred;
+
+ } while (!ec);
+
+ // Operation failed. Return result to caller.
+ core.engine_.map_error_code(ec);
+ return 0;
+}
+
+template <typename Stream, typename Operation, typename Handler>
+class io_op
+{
+public:
+ io_op(Stream& next_layer, stream_core& core,
+ const Operation& op, Handler& handler)
+ : next_layer_(next_layer),
+ core_(core),
+ op_(op),
+ start_(0),
+ want_(engine::want_nothing),
+ bytes_transferred_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ io_op(const io_op& other)
+ : next_layer_(other.next_layer_),
+ core_(other.core_),
+ op_(other.op_),
+ start_(other.start_),
+ want_(other.want_),
+ ec_(other.ec_),
+ bytes_transferred_(other.bytes_transferred_),
+ handler_(other.handler_)
+ {
+ }
+
+ io_op(io_op&& other)
+ : next_layer_(other.next_layer_),
+ core_(other.core_),
+ op_(BOOST_ASIO_MOVE_CAST(Operation)(other.op_)),
+ start_(other.start_),
+ want_(other.want_),
+ ec_(other.ec_),
+ bytes_transferred_(other.bytes_transferred_),
+ handler_(BOOST_ASIO_MOVE_CAST(Handler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(boost::system::error_code ec,
+ std::size_t bytes_transferred = ~std::size_t(0), int start = 0)
+ {
+ switch (start_ = start)
+ {
+ case 1: // Called after at least one async operation.
+ do
+ {
+ switch (want_ = op_(core_.engine_, ec_, bytes_transferred_))
+ {
+ case engine::want_input_and_retry:
+
+ // If the input buffer already has data in it we can pass it to the
+ // engine and then retry the operation immediately.
+ if (core_.input_.size() != 0)
+ {
+ core_.input_ = core_.engine_.put_input(core_.input_);
+ continue;
+ }
+
+ // The engine wants more data to be read from input. However, we
+ // cannot allow more than one read operation at a time on the
+ // underlying transport. The pending_read_ timer's expiry is set to
+ // pos_infin if a read is in progress, and neg_infin otherwise.
+ if (core_.expiry(core_.pending_read_) == core_.neg_infin())
+ {
+ // Prevent other read operations from being started.
+ core_.pending_read_.expires_at(core_.pos_infin());
+
+ // Start reading some data from the underlying transport.
+ next_layer_.async_read_some(
+ boost::asio::buffer(core_.input_buffer_),
+ BOOST_ASIO_MOVE_CAST(io_op)(*this));
+ }
+ else
+ {
+ // Wait until the current read operation completes.
+ core_.pending_read_.async_wait(BOOST_ASIO_MOVE_CAST(io_op)(*this));
+ }
+
+ // Yield control until asynchronous operation completes. Control
+ // resumes at the "default:" label below.
+ return;
+
+ case engine::want_output_and_retry:
+ case engine::want_output:
+
+ // The engine wants some data to be written to the output. However, we
+ // cannot allow more than one write operation at a time on the
+ // underlying transport. The pending_write_ timer's expiry is set to
+ // pos_infin if a write is in progress, and neg_infin otherwise.
+ if (core_.expiry(core_.pending_write_) == core_.neg_infin())
+ {
+ // Prevent other write operations from being started.
+ core_.pending_write_.expires_at(core_.pos_infin());
+
+ // Start writing all the data to the underlying transport.
+ boost::asio::async_write(next_layer_,
+ core_.engine_.get_output(core_.output_buffer_),
+ BOOST_ASIO_MOVE_CAST(io_op)(*this));
+ }
+ else
+ {
+ // Wait until the current write operation completes.
+ core_.pending_write_.async_wait(BOOST_ASIO_MOVE_CAST(io_op)(*this));
+ }
+
+ // Yield control until asynchronous operation completes. Control
+ // resumes at the "default:" label below.
+ return;
+
+ default:
+
+ // The SSL operation is done and we can invoke the handler, but we
+ // have to keep in mind that this function might be being called from
+ // the async operation's initiating function. In this case we're not
+ // allowed to call the handler directly. Instead, issue a zero-sized
+ // read so the handler runs "as-if" posted using io_context::post().
+ if (start)
+ {
+ next_layer_.async_read_some(
+ boost::asio::buffer(core_.input_buffer_, 0),
+ BOOST_ASIO_MOVE_CAST(io_op)(*this));
+
+ // Yield control until asynchronous operation completes. Control
+ // resumes at the "default:" label below.
+ return;
+ }
+ else
+ {
+ // Continue on to run handler directly.
+ break;
+ }
+ }
+
+ default:
+ if (bytes_transferred == ~std::size_t(0))
+ bytes_transferred = 0; // Timer cancellation, no data transferred.
+ else if (!ec_)
+ ec_ = ec;
+
+ switch (want_)
+ {
+ case engine::want_input_and_retry:
+
+ // Add received data to the engine's input.
+ core_.input_ = boost::asio::buffer(
+ core_.input_buffer_, bytes_transferred);
+ core_.input_ = core_.engine_.put_input(core_.input_);
+
+ // Release any waiting read operations.
+ core_.pending_read_.expires_at(core_.neg_infin());
+
+ // Try the operation again.
+ continue;
+
+ case engine::want_output_and_retry:
+
+ // Release any waiting write operations.
+ core_.pending_write_.expires_at(core_.neg_infin());
+
+ // Try the operation again.
+ continue;
+
+ case engine::want_output:
+
+ // Release any waiting write operations.
+ core_.pending_write_.expires_at(core_.neg_infin());
+
+ // Fall through to call handler.
+
+ default:
+
+ // Pass the result to the handler.
+ op_.call_handler(handler_,
+ core_.engine_.map_error_code(ec_),
+ ec_ ? 0 : bytes_transferred_);
+
+ // Our work here is done.
+ return;
+ }
+ } while (!ec_);
+
+ // Operation failed. Pass the result to the handler.
+ op_.call_handler(handler_, core_.engine_.map_error_code(ec_), 0);
+ }
+ }
+
+//private:
+ Stream& next_layer_;
+ stream_core& core_;
+ Operation op_;
+ int start_;
+ engine::want want_;
+ boost::system::error_code ec_;
+ std::size_t bytes_transferred_;
+ Handler handler_;
+};
+
+template <typename Stream, typename Operation, typename Handler>
+inline void* asio_handler_allocate(std::size_t size,
+ io_op<Stream, Operation, Handler>* this_handler)
+{
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+}
+
+template <typename Stream, typename Operation, typename Handler>
+inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ io_op<Stream, Operation, Handler>* this_handler)
+{
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+}
+
+template <typename Stream, typename Operation, typename Handler>
+inline bool asio_handler_is_continuation(
+ io_op<Stream, Operation, Handler>* this_handler)
+{
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(this_handler->handler_);
+}
+
+template <typename Function, typename Stream,
+ typename Operation, typename Handler>
+inline void asio_handler_invoke(Function& function,
+ io_op<Stream, Operation, Handler>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Function, typename Stream,
+ typename Operation, typename Handler>
+inline void asio_handler_invoke(const Function& function,
+ io_op<Stream, Operation, Handler>* this_handler)
+{
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+}
+
+template <typename Stream, typename Operation, typename Handler>
+inline void async_io(Stream& next_layer, stream_core& core,
+ const Operation& op, Handler& handler)
+{
+ io_op<Stream, Operation, Handler>(
+ next_layer, core, op, handler)(
+ boost::system::error_code(), 0, 1);
+}
+
+} // namespace detail
+} // namespace ssl
+
+template <typename Stream, typename Operation,
+ typename Handler, typename Allocator>
+struct associated_allocator<
+ ssl::detail::io_op<Stream, Operation, Handler>, Allocator>
+{
+ typedef typename associated_allocator<Handler, Allocator>::type type;
+
+ static type get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename Stream, typename Operation,
+ typename Handler, typename Executor>
+struct associated_executor<
+ ssl::detail::io_op<Stream, Operation, Handler>, Executor>
+{
+ typedef typename associated_executor<Handler, Executor>::type type;
+
+ static type get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_IO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_init.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_init.hpp
new file mode 100644
index 00000000000..74556a233b2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_init.hpp
@@ -0,0 +1,103 @@
+//
+// ssl/detail/openssl_init.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_OPENSSL_INIT_HPP
+#define BOOST_ASIO_SSL_DETAIL_OPENSSL_INIT_HPP
+
+#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/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class openssl_init_base
+ : private noncopyable
+{
+protected:
+ // Class that performs the actual initialisation.
+ class do_init;
+
+ // Helper function to manage a do_init singleton. The static instance of the
+ // openssl_init object ensures that this function is always called before
+ // main, and therefore before any other threads can get started. The do_init
+ // instance must be static in this function to ensure that it gets
+ // initialised before any other global objects try to use it.
+ BOOST_ASIO_DECL static boost::asio::detail::shared_ptr<do_init> instance();
+
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ // Get an empty stack of compression methods, to be used when disabling
+ // compression.
+ BOOST_ASIO_DECL static STACK_OF(SSL_COMP)* get_null_compression_methods();
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+};
+
+template <bool Do_Init = true>
+class openssl_init : private openssl_init_base
+{
+public:
+ // Constructor.
+ openssl_init()
+ : ref_(instance())
+ {
+ using namespace std; // For memmove.
+
+ // Ensure openssl_init::instance_ is linked in.
+ openssl_init* tmp = &instance_;
+ memmove(&tmp, &tmp, sizeof(openssl_init*));
+ }
+
+ // Destructor.
+ ~openssl_init()
+ {
+ }
+
+#if !defined(SSL_OP_NO_COMPRESSION) \
+ && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ using openssl_init_base::get_null_compression_methods;
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+ // && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+
+private:
+ // Instance to force initialisation of openssl at global scope.
+ static openssl_init instance_;
+
+ // Reference to singleton do_init object to ensure that openssl does not get
+ // cleaned up until the last user has finished with it.
+ boost::asio::detail::shared_ptr<do_init> ref_;
+};
+
+template <bool Do_Init>
+openssl_init<Do_Init> openssl_init<Do_Init>::instance_;
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ssl/detail/impl/openssl_init.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_SSL_DETAIL_OPENSSL_INIT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_types.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_types.hpp
new file mode 100644
index 00000000000..494287a36e0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/openssl_types.hpp
@@ -0,0 +1,30 @@
+//
+// ssl/detail/openssl_types.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_OPENSSL_TYPES_HPP
+#define BOOST_ASIO_SSL_DETAIL_OPENSSL_TYPES_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/socket_types.hpp>
+#include <openssl/conf.h>
+#include <openssl/ssl.h>
+#if !defined(OPENSSL_NO_ENGINE)
+# include <openssl/engine.h>
+#endif // !defined(OPENSSL_NO_ENGINE)
+#include <openssl/dh.h>
+#include <openssl/err.h>
+#include <openssl/rsa.h>
+#include <openssl/x509v3.h>
+
+#endif // BOOST_ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/password_callback.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/password_callback.hpp
new file mode 100644
index 00000000000..9e57e90e390
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/password_callback.hpp
@@ -0,0 +1,68 @@
+//
+// ssl/detail/password_callback.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_PASSWORD_CALLBACK_HPP
+#define BOOST_ASIO_SSL_DETAIL_PASSWORD_CALLBACK_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/ssl/context_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class password_callback_base
+{
+public:
+ virtual ~password_callback_base()
+ {
+ }
+
+ virtual std::string call(std::size_t size,
+ context_base::password_purpose purpose) = 0;
+};
+
+template <typename PasswordCallback>
+class password_callback : public password_callback_base
+{
+public:
+ explicit password_callback(PasswordCallback callback)
+ : callback_(callback)
+ {
+ }
+
+ virtual std::string call(std::size_t size,
+ context_base::password_purpose purpose)
+ {
+ return callback_(size, purpose);
+ }
+
+private:
+ PasswordCallback callback_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_PASSWORD_CALLBACK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/read_op.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/read_op.hpp
new file mode 100644
index 00000000000..e0322aaa62e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/read_op.hpp
@@ -0,0 +1,69 @@
+//
+// ssl/detail/read_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_READ_OP_HPP
+#define BOOST_ASIO_SSL_DETAIL_READ_OP_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/buffer_sequence_adapter.hpp>
+#include <boost/asio/ssl/detail/engine.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class read_op
+{
+public:
+ read_op(const MutableBufferSequence& buffers)
+ : buffers_(buffers)
+ {
+ }
+
+ engine::want operator()(engine& eng,
+ boost::system::error_code& ec,
+ std::size_t& bytes_transferred) const
+ {
+ boost::asio::mutable_buffer buffer =
+ boost::asio::detail::buffer_sequence_adapter<boost::asio::mutable_buffer,
+ MutableBufferSequence>::first(buffers_);
+
+ return eng.read(buffer, ec, bytes_transferred);
+ }
+
+ template <typename Handler>
+ void call_handler(Handler& handler,
+ const boost::system::error_code& ec,
+ const std::size_t& bytes_transferred) const
+ {
+ handler(ec, bytes_transferred);
+ }
+
+private:
+ MutableBufferSequence buffers_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_READ_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/shutdown_op.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/shutdown_op.hpp
new file mode 100644
index 00000000000..d55058af374
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/shutdown_op.hpp
@@ -0,0 +1,66 @@
+//
+// ssl/detail/shutdown_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_SHUTDOWN_OP_HPP
+#define BOOST_ASIO_SSL_DETAIL_SHUTDOWN_OP_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/engine.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class shutdown_op
+{
+public:
+ engine::want operator()(engine& eng,
+ boost::system::error_code& ec,
+ std::size_t& bytes_transferred) const
+ {
+ bytes_transferred = 0;
+ return eng.shutdown(ec);
+ }
+
+ template <typename Handler>
+ void call_handler(Handler& handler,
+ const boost::system::error_code& ec,
+ const std::size_t&) const
+ {
+ if (ec == boost::asio::error::eof)
+ {
+ // The engine only generates an eof when the shutdown notification has
+ // been received from the peer. This indicates that the shutdown has
+ // completed successfully, and thus need not be passed on to the handler.
+ handler(boost::system::error_code());
+ }
+ else
+ {
+ handler(ec);
+ }
+ }
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/stream_core.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/stream_core.hpp
new file mode 100644
index 00000000000..eba283618f3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/stream_core.hpp
@@ -0,0 +1,137 @@
+//
+// ssl/detail/stream_core.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_STREAM_CORE_HPP
+#define BOOST_ASIO_SSL_DETAIL_STREAM_CORE_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_BOOST_DATE_TIME)
+# include <boost/asio/deadline_timer.hpp>
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+# include <boost/asio/steady_timer.hpp>
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+#include <boost/asio/ssl/detail/engine.hpp>
+#include <boost/asio/buffer.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+struct stream_core
+{
+ // According to the OpenSSL documentation, this is the buffer size that is
+ // sufficient to hold the largest possible TLS record.
+ enum { max_tls_record_size = 17 * 1024 };
+
+ template <typename Executor>
+ stream_core(SSL_CTX* context, const Executor& ex)
+ : engine_(context),
+ pending_read_(ex),
+ pending_write_(ex),
+ output_buffer_space_(max_tls_record_size),
+ output_buffer_(boost::asio::buffer(output_buffer_space_)),
+ input_buffer_space_(max_tls_record_size),
+ input_buffer_(boost::asio::buffer(input_buffer_space_))
+ {
+ pending_read_.expires_at(neg_infin());
+ pending_write_.expires_at(neg_infin());
+ }
+
+ ~stream_core()
+ {
+ }
+
+ // The SSL engine.
+ engine engine_;
+
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // Timer used for storing queued read operations.
+ boost::asio::deadline_timer pending_read_;
+
+ // Timer used for storing queued write operations.
+ boost::asio::deadline_timer pending_write_;
+
+ // Helper function for obtaining a time value that always fires.
+ static boost::asio::deadline_timer::time_type neg_infin()
+ {
+ return boost::posix_time::neg_infin;
+ }
+
+ // Helper function for obtaining a time value that never fires.
+ static boost::asio::deadline_timer::time_type pos_infin()
+ {
+ return boost::posix_time::pos_infin;
+ }
+
+ // Helper function to get a timer's expiry time.
+ static boost::asio::deadline_timer::time_type expiry(
+ const boost::asio::deadline_timer& timer)
+ {
+ return timer.expires_at();
+ }
+#else // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // Timer used for storing queued read operations.
+ boost::asio::steady_timer pending_read_;
+
+ // Timer used for storing queued write operations.
+ boost::asio::steady_timer pending_write_;
+
+ // Helper function for obtaining a time value that always fires.
+ static boost::asio::steady_timer::time_point neg_infin()
+ {
+ return (boost::asio::steady_timer::time_point::min)();
+ }
+
+ // Helper function for obtaining a time value that never fires.
+ static boost::asio::steady_timer::time_point pos_infin()
+ {
+ return (boost::asio::steady_timer::time_point::max)();
+ }
+
+ // Helper function to get a timer's expiry time.
+ static boost::asio::steady_timer::time_point expiry(
+ const boost::asio::steady_timer& timer)
+ {
+ return timer.expiry();
+ }
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+ // Buffer space used to prepare output intended for the transport.
+ std::vector<unsigned char> output_buffer_space_;
+
+ // A buffer that may be used to prepare output intended for the transport.
+ const boost::asio::mutable_buffer output_buffer_;
+
+ // Buffer space used to read input intended for the engine.
+ std::vector<unsigned char> input_buffer_space_;
+
+ // A buffer that may be used to read input intended for the engine.
+ const boost::asio::mutable_buffer input_buffer_;
+
+ // The buffer pointing to the engine's unconsumed input.
+ boost::asio::const_buffer input_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_STREAM_CORE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/verify_callback.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/verify_callback.hpp
new file mode 100644
index 00000000000..b4cfdcedc07
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/verify_callback.hpp
@@ -0,0 +1,64 @@
+//
+// ssl/detail/verify_callback.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_VERIFY_CALLBACK_HPP
+#define BOOST_ASIO_SSL_DETAIL_VERIFY_CALLBACK_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/verify_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+class verify_callback_base
+{
+public:
+ virtual ~verify_callback_base()
+ {
+ }
+
+ virtual bool call(bool preverified, verify_context& ctx) = 0;
+};
+
+template <typename VerifyCallback>
+class verify_callback : public verify_callback_base
+{
+public:
+ explicit verify_callback(VerifyCallback callback)
+ : callback_(callback)
+ {
+ }
+
+ virtual bool call(bool preverified, verify_context& ctx)
+ {
+ return callback_(preverified, ctx);
+ }
+
+private:
+ VerifyCallback callback_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/detail/write_op.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/write_op.hpp
new file mode 100644
index 00000000000..ec50cff54ac
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/detail/write_op.hpp
@@ -0,0 +1,69 @@
+//
+// ssl/detail/write_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_DETAIL_WRITE_OP_HPP
+#define BOOST_ASIO_SSL_DETAIL_WRITE_OP_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/buffer_sequence_adapter.hpp>
+#include <boost/asio/ssl/detail/engine.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class write_op
+{
+public:
+ write_op(const ConstBufferSequence& buffers)
+ : buffers_(buffers)
+ {
+ }
+
+ engine::want operator()(engine& eng,
+ boost::system::error_code& ec,
+ std::size_t& bytes_transferred) const
+ {
+ boost::asio::const_buffer buffer =
+ boost::asio::detail::buffer_sequence_adapter<boost::asio::const_buffer,
+ ConstBufferSequence>::first(buffers_);
+
+ return eng.write(buffer, ec, bytes_transferred);
+ }
+
+ template <typename Handler>
+ void call_handler(Handler& handler,
+ const boost::system::error_code& ec,
+ const std::size_t& bytes_transferred) const
+ {
+ handler(ec, bytes_transferred);
+ }
+
+private:
+ ConstBufferSequence buffers_;
+};
+
+} // namespace detail
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_DETAIL_WRITE_OP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/error.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/error.hpp
new file mode 100644
index 00000000000..e9ce78718ce
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/error.hpp
@@ -0,0 +1,127 @@
+//
+// ssl/error.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ERROR_HPP
+#define BOOST_ASIO_SSL_ERROR_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/system/error_code.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace error {
+
+enum ssl_errors
+{
+ // Error numbers are those produced by openssl.
+};
+
+extern BOOST_ASIO_DECL
+const boost::system::error_category& get_ssl_category();
+
+static const boost::system::error_category&
+ ssl_category BOOST_ASIO_UNUSED_VARIABLE
+ = boost::asio::error::get_ssl_category();
+
+} // namespace error
+namespace ssl {
+namespace error {
+
+enum stream_errors
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The underlying stream closed before the ssl stream gracefully shut down.
+ stream_truncated,
+
+ /// The underlying SSL library returned a system error without providing
+ /// further information.
+ unspecified_system_error,
+
+ /// The underlying SSL library generated an unexpected result from a function
+ /// call.
+ unexpected_result
+#else // defined(GENERATING_DOCUMENTATION)
+# if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
+ stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ),
+# else
+ stream_truncated = 1,
+# endif
+ unspecified_system_error = 2,
+ unexpected_result = 3
+#endif // defined(GENERATING_DOCUMENTATION)
+};
+
+extern BOOST_ASIO_DECL
+const boost::system::error_category& get_stream_category();
+
+static const boost::system::error_category&
+ stream_category BOOST_ASIO_UNUSED_VARIABLE
+ = boost::asio::ssl::error::get_stream_category();
+
+} // namespace error
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+namespace boost {
+namespace system {
+
+template<> struct is_error_code_enum<boost::asio::error::ssl_errors>
+{
+ static const bool value = true;
+};
+
+template<> struct is_error_code_enum<boost::asio::ssl::error::stream_errors>
+{
+ static const bool value = true;
+};
+
+} // namespace system
+} // namespace boost
+
+namespace boost {
+namespace asio {
+namespace error {
+
+inline boost::system::error_code make_error_code(ssl_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_ssl_category());
+}
+
+} // namespace error
+namespace ssl {
+namespace error {
+
+inline boost::system::error_code make_error_code(stream_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_stream_category());
+}
+
+} // namespace error
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ssl/impl/error.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_SSL_ERROR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.hpp
new file mode 100644
index 00000000000..f9ab3ad779d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.hpp
@@ -0,0 +1,69 @@
+//
+// ssl/impl/context.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
+// Copyright (c) 2005-2019 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_HPP
+#define BOOST_ASIO_SSL_IMPL_CONTEXT_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/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+template <typename VerifyCallback>
+void context::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");
+}
+
+template <typename VerifyCallback>
+BOOST_ASIO_SYNC_OP_VOID context::set_verify_callback(
+ VerifyCallback callback, boost::system::error_code& ec)
+{
+ do_set_verify_callback(
+ new detail::verify_callback<VerifyCallback>(callback), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+template <typename PasswordCallback>
+void context::set_password_callback(PasswordCallback callback)
+{
+ boost::system::error_code ec;
+ this->set_password_callback(callback, ec);
+ boost::asio::detail::throw_error(ec, "set_password_callback");
+}
+
+template <typename PasswordCallback>
+BOOST_ASIO_SYNC_OP_VOID context::set_password_callback(
+ PasswordCallback callback, boost::system::error_code& ec)
+{
+ do_set_password_callback(
+ new detail::password_callback<PasswordCallback>(callback), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_IMPL_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.ipp b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/context.ipp
new file mode 100644
index 00000000000..0947a87564e
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019 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.70.0/boost/asio/ssl/impl/error.ipp b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/error.ipp
new file mode 100644
index 00000000000..d77c051c9e3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/error.ipp
@@ -0,0 +1,104 @@
+//
+// ssl/impl/error.ipp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_ERROR_IPP
+#define BOOST_ASIO_SSL_IMPL_ERROR_IPP
+
+#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/error.hpp>
+#include <boost/asio/ssl/detail/openssl_init.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace error {
+namespace detail {
+
+class ssl_category : public boost::system::error_category
+{
+public:
+ const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+ {
+ return "asio.ssl";
+ }
+
+ std::string message(int value) const
+ {
+ const char* s = ::ERR_reason_error_string(value);
+ return s ? s : "asio.ssl error";
+ }
+};
+
+} // namespace detail
+
+const boost::system::error_category& get_ssl_category()
+{
+ static detail::ssl_category instance;
+ return instance;
+}
+
+} // namespace error
+namespace ssl {
+namespace error {
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
+
+const boost::system::error_category& get_stream_category()
+{
+ return boost::asio::error::get_ssl_category();
+}
+
+#else
+
+namespace detail {
+
+class stream_category : public boost::system::error_category
+{
+public:
+ const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+ {
+ return "asio.ssl.stream";
+ }
+
+ std::string message(int value) const
+ {
+ switch (value)
+ {
+ case stream_truncated: return "stream truncated";
+ case unspecified_system_error: return "unspecified system error";
+ case unexpected_result: return "unexpected result";
+ default: return "asio.ssl.stream error";
+ }
+ }
+};
+
+} // namespace detail
+
+const boost::system::error_category& get_stream_category()
+{
+ static detail::stream_category instance;
+ return instance;
+}
+
+#endif
+
+} // namespace error
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_IMPL_ERROR_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/impl/rfc2818_verification.ipp b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/rfc2818_verification.ipp
new file mode 100644
index 00000000000..3720509258c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/rfc2818_verification.ipp
@@ -0,0 +1,162 @@
+//
+// ssl/impl/rfc2818_verification.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RFC2818_VERIFICATION_IPP
+#define BOOST_ASIO_SSL_IMPL_RFC2818_VERIFICATION_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 <cstring>
+#include <boost/asio/ip/address.hpp>
+#include <boost/asio/ssl/rfc2818_verification.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+bool rfc2818_verification::operator()(
+ bool preverified, verify_context& ctx) const
+{
+ using namespace std; // For memcmp.
+
+ // Don't bother looking at certificates that have failed pre-verification.
+ if (!preverified)
+ return false;
+
+ // We're only interested in checking the certificate at the end of the chain.
+ int depth = X509_STORE_CTX_get_error_depth(ctx.native_handle());
+ if (depth > 0)
+ return true;
+
+ // Try converting the host name to an address. If it is an address then we
+ // need to look for an IP address in the certificate rather than a host name.
+ boost::system::error_code ec;
+ ip::address address = ip::make_address(host_, ec);
+ bool is_address = !ec;
+
+ X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
+
+ // Go through the alternate names in the certificate looking for matching DNS
+ // or IP address entries.
+ GENERAL_NAMES* gens = static_cast<GENERAL_NAMES*>(
+ X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0));
+ for (int i = 0; i < sk_GENERAL_NAME_num(gens); ++i)
+ {
+ GENERAL_NAME* gen = sk_GENERAL_NAME_value(gens, i);
+ if (gen->type == GEN_DNS && !is_address)
+ {
+ ASN1_IA5STRING* domain = gen->d.dNSName;
+ if (domain->type == V_ASN1_IA5STRING && domain->data && domain->length)
+ {
+ const char* pattern = reinterpret_cast<const char*>(domain->data);
+ std::size_t pattern_length = domain->length;
+ if (match_pattern(pattern, pattern_length, host_.c_str()))
+ {
+ GENERAL_NAMES_free(gens);
+ return true;
+ }
+ }
+ }
+ else if (gen->type == GEN_IPADD && is_address)
+ {
+ ASN1_OCTET_STRING* ip_address = gen->d.iPAddress;
+ if (ip_address->type == V_ASN1_OCTET_STRING && ip_address->data)
+ {
+ if (address.is_v4() && ip_address->length == 4)
+ {
+ ip::address_v4::bytes_type bytes = address.to_v4().to_bytes();
+ if (memcmp(bytes.data(), ip_address->data, 4) == 0)
+ {
+ GENERAL_NAMES_free(gens);
+ return true;
+ }
+ }
+ else if (address.is_v6() && ip_address->length == 16)
+ {
+ ip::address_v6::bytes_type bytes = address.to_v6().to_bytes();
+ if (memcmp(bytes.data(), ip_address->data, 16) == 0)
+ {
+ GENERAL_NAMES_free(gens);
+ return true;
+ }
+ }
+ }
+ }
+ }
+ GENERAL_NAMES_free(gens);
+
+ // No match in the alternate names, so try the common names. We should only
+ // use the "most specific" common name, which is the last one in the list.
+ X509_NAME* name = X509_get_subject_name(cert);
+ int i = -1;
+ ASN1_STRING* common_name = 0;
+ while ((i = X509_NAME_get_index_by_NID(name, NID_commonName, i)) >= 0)
+ {
+ X509_NAME_ENTRY* name_entry = X509_NAME_get_entry(name, i);
+ common_name = X509_NAME_ENTRY_get_data(name_entry);
+ }
+ if (common_name && common_name->data && common_name->length)
+ {
+ const char* pattern = reinterpret_cast<const char*>(common_name->data);
+ std::size_t pattern_length = common_name->length;
+ if (match_pattern(pattern, pattern_length, host_.c_str()))
+ return true;
+ }
+
+ return false;
+}
+
+bool rfc2818_verification::match_pattern(const char* pattern,
+ std::size_t pattern_length, const char* host)
+{
+ using namespace std; // For tolower.
+
+ const char* p = pattern;
+ const char* p_end = p + pattern_length;
+ const char* h = host;
+
+ while (p != p_end && *h)
+ {
+ if (*p == '*')
+ {
+ ++p;
+ while (*h && *h != '.')
+ if (match_pattern(p, p_end - p, h++))
+ return true;
+ }
+ else if (tolower(*p) == tolower(*h))
+ {
+ ++p;
+ ++h;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ return p == p_end && !*h;
+}
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_IMPL_RFC2818_VERIFICATION_IPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/impl/src.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/src.hpp
new file mode 100644
index 00000000000..4f965ed4ab3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/impl/src.hpp
@@ -0,0 +1,28 @@
+//
+// impl/ssl/src.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SRC_HPP
+#define BOOST_ASIO_SSL_IMPL_SRC_HPP
+
+#define BOOST_ASIO_SOURCE
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
+#endif
+
+#include <boost/asio/ssl/impl/context.ipp>
+#include <boost/asio/ssl/impl/error.ipp>
+#include <boost/asio/ssl/detail/impl/engine.ipp>
+#include <boost/asio/ssl/detail/impl/openssl_init.ipp>
+#include <boost/asio/ssl/impl/rfc2818_verification.ipp>
+
+#endif // BOOST_ASIO_SSL_IMPL_SRC_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/rfc2818_verification.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/rfc2818_verification.hpp
new file mode 100644
index 00000000000..1e4e4116586
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/rfc2818_verification.hpp
@@ -0,0 +1,96 @@
+//
+// ssl/rfc2818_verification.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_RFC2818_VERIFICATION_HPP
+#define BOOST_ASIO_SSL_RFC2818_VERIFICATION_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/ssl/detail/openssl_types.hpp>
+#include <boost/asio/ssl/verify_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+/// Verifies a certificate against a hostname according to the rules described
+/// in RFC 2818.
+/**
+ * @par Example
+ * The following example shows how to synchronously open a secure connection to
+ * a given host name:
+ * @code
+ * using boost::asio::ip::tcp;
+ * namespace ssl = boost::asio::ssl;
+ * typedef ssl::stream<tcp::socket> ssl_socket;
+ *
+ * // Create a context that uses the default paths for finding CA certificates.
+ * ssl::context ctx(ssl::context::sslv23);
+ * ctx.set_default_verify_paths();
+ *
+ * // Open a socket and connect it to the remote host.
+ * boost::asio::io_context io_context;
+ * ssl_socket sock(io_context, ctx);
+ * tcp::resolver resolver(io_context);
+ * tcp::resolver::query query("host.name", "https");
+ * boost::asio::connect(sock.lowest_layer(), resolver.resolve(query));
+ * sock.lowest_layer().set_option(tcp::no_delay(true));
+ *
+ * // Perform SSL handshake and verify the remote host's certificate.
+ * sock.set_verify_mode(ssl::verify_peer);
+ * sock.set_verify_callback(ssl::rfc2818_verification("host.name"));
+ * sock.handshake(ssl_socket::client);
+ *
+ * // ... read and write as normal ...
+ * @endcode
+ */
+class rfc2818_verification
+{
+public:
+ /// The type of the function object's result.
+ typedef bool result_type;
+
+ /// Constructor.
+ explicit rfc2818_verification(const std::string& host)
+ : host_(host)
+ {
+ }
+
+ /// Perform certificate verification.
+ BOOST_ASIO_DECL bool operator()(bool preverified, verify_context& ctx) const;
+
+private:
+ // Helper function to check a host name against a pattern.
+ BOOST_ASIO_DECL static bool match_pattern(const char* pattern,
+ std::size_t pattern_length, const char* host);
+
+ // Helper function to check a host name against an IPv4 address
+ // The host name to be checked.
+ std::string host_;
+};
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/ssl/impl/rfc2818_verification.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_SSL_RFC2818_VERIFICATION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/stream.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/stream.hpp
new file mode 100644
index 00000000000..2ae8c13a4ab
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/stream.hpp
@@ -0,0 +1,788 @@
+//
+// ssl/stream.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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/non_const_lvalue.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 my_context;
+ * boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23);
+ * boost::asio::ssl::stream<asio:ip::tcp::socket> sock(my_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())
+ {
+ }
+#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())
+ {
+ }
+#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();
+ }
+
+ /// 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(my_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)
+ {
+ return async_initiate<HandshakeHandler,
+ void (boost::system::error_code)>(
+ initiate_async_handshake(), handler, this, type);
+ }
+
+ /// 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)
+ {
+ return async_initiate<BufferedHandshakeHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_buffered_handshake(), handler, this, type, buffers);
+ }
+
+ /// 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)
+ {
+ return async_initiate<ShutdownHandler,
+ void (boost::system::error_code)>(
+ initiate_async_shutdown(), handler, this);
+ }
+
+ /// 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)
+ {
+ return async_initiate<WriteHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_write_some(), handler, this, buffers);
+ }
+
+ /// 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)
+ {
+ return async_initiate<ReadHandler,
+ void (boost::system::error_code, std::size_t)>(
+ initiate_async_read_some(), handler, this, buffers);
+ }
+
+private:
+ struct initiate_async_handshake
+ {
+ template <typename HandshakeHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler,
+ stream* self, handshake_type type) const
+ {
+ // 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::detail::non_const_lvalue<HandshakeHandler> handler2(handler);
+ detail::async_io(self->next_layer_, self->core_,
+ detail::handshake_op(type), handler2.value);
+ }
+ };
+
+ struct initiate_async_buffered_handshake
+ {
+ template <typename BufferedHandshakeHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler,
+ stream* self, handshake_type type,
+ const ConstBufferSequence& buffers) const
+ {
+ // 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::detail::non_const_lvalue<
+ BufferedHandshakeHandler> handler2(handler);
+ detail::async_io(self->next_layer_, self->core_,
+ detail::buffered_handshake_op<ConstBufferSequence>(type, buffers),
+ handler2.value);
+ }
+ };
+
+ struct initiate_async_shutdown
+ {
+ template <typename ShutdownHandler>
+ void operator()(BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler,
+ stream* self) const
+ {
+ // 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_HANDSHAKE_HANDLER_CHECK(ShutdownHandler, handler) type_check;
+
+ boost::asio::detail::non_const_lvalue<ShutdownHandler> handler2(handler);
+ detail::async_io(self->next_layer_, self->core_,
+ detail::shutdown_op(), handler2.value);
+ }
+ };
+
+ struct initiate_async_write_some
+ {
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ stream* self, const ConstBufferSequence& buffers) const
+ {
+ // 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::detail::non_const_lvalue<WriteHandler> handler2(handler);
+ detail::async_io(self->next_layer_, self->core_,
+ detail::write_op<ConstBufferSequence>(buffers), handler2.value);
+ }
+ };
+
+ struct initiate_async_read_some
+ {
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ stream* self, const MutableBufferSequence& buffers) const
+ {
+ // 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::detail::non_const_lvalue<ReadHandler> handler2(handler);
+ detail::async_io(self->next_layer_, self->core_,
+ detail::read_op<MutableBufferSequence>(buffers), handler2.value);
+ }
+ };
+
+ 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.70.0/boost/asio/ssl/stream_base.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/stream_base.hpp
new file mode 100644
index 00000000000..0fefde54f16
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/stream_base.hpp
@@ -0,0 +1,54 @@
+//
+// ssl/stream_base.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_BASE_HPP
+#define BOOST_ASIO_SSL_STREAM_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/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+/// The stream_base class is used as a base for the boost::asio::ssl::stream
+/// class template so that we have a common place to define various enums.
+class stream_base
+{
+public:
+ /// Different handshake types.
+ enum handshake_type
+ {
+ /// Perform handshaking as a client.
+ client,
+
+ /// Perform handshaking as a server.
+ server
+ };
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~stream_base()
+ {
+ }
+};
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_STREAM_BASE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/verify_context.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/verify_context.hpp
new file mode 100644
index 00000000000..952ec917cd6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/verify_context.hpp
@@ -0,0 +1,69 @@
+//
+// ssl/verify_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_VERIFY_CONTEXT_HPP
+#define BOOST_ASIO_SSL_VERIFY_CONTEXT_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/ssl/detail/openssl_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+/// A simple wrapper around the X509_STORE_CTX type, used during verification of
+/// a peer certificate.
+/**
+ * @note The verify_context does not own the underlying X509_STORE_CTX object.
+ */
+class verify_context
+ : private noncopyable
+{
+public:
+ /// The native handle type of the verification context.
+ typedef X509_STORE_CTX* native_handle_type;
+
+ /// Constructor.
+ explicit verify_context(native_handle_type handle)
+ : handle_(handle)
+ {
+ }
+
+ /// 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.
+ */
+ native_handle_type native_handle()
+ {
+ return handle_;
+ }
+
+private:
+ // The underlying native implementation.
+ native_handle_type handle_;
+};
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ssl/verify_mode.hpp b/src/third_party/boost-1.70.0/boost/asio/ssl/verify_mode.hpp
new file mode 100644
index 00000000000..0dcf18af967
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ssl/verify_mode.hpp
@@ -0,0 +1,65 @@
+//
+// ssl/verify_mode.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_VERIFY_MODE_HPP
+#define BOOST_ASIO_SSL_VERIFY_MODE_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 {
+
+/// Bitmask type for peer verification.
+/**
+ * Possible values are:
+ *
+ * @li @ref verify_none
+ * @li @ref verify_peer
+ * @li @ref verify_fail_if_no_peer_cert
+ * @li @ref verify_client_once
+ */
+typedef int verify_mode;
+
+#if defined(GENERATING_DOCUMENTATION)
+/// No verification.
+const int verify_none = implementation_defined;
+
+/// Verify the peer.
+const int verify_peer = implementation_defined;
+
+/// Fail verification if the peer has no certificate. Ignored unless
+/// @ref verify_peer is set.
+const int verify_fail_if_no_peer_cert = implementation_defined;
+
+/// Do not request client certificate on renegotiation. Ignored unless
+/// @ref verify_peer is set.
+const int verify_client_once = implementation_defined;
+#else
+const int verify_none = SSL_VERIFY_NONE;
+const int verify_peer = SSL_VERIFY_PEER;
+const int verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
+const int verify_client_once = SSL_VERIFY_CLIENT_ONCE;
+#endif
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_VERIFY_MODE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/steady_timer.hpp b/src/third_party/boost-1.70.0/boost/asio/steady_timer.hpp
new file mode 100644
index 00000000000..5c88e975dcf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/steady_timer.hpp
@@ -0,0 +1,44 @@
+//
+// steady_timer.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STEADY_TIMER_HPP
+#define BOOST_ASIO_STEADY_TIMER_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_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_waitable_timer.hpp>
+#include <boost/asio/detail/chrono.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for a timer based on the steady clock.
+/**
+ * This typedef uses the C++11 @c &lt;chrono&gt; standard library facility, if
+ * available. Otherwise, it may use the Boost.Chrono library. To explicitly
+ * utilise Boost.Chrono, use the basic_waitable_timer template directly:
+ * @code
+ * typedef basic_waitable_timer<boost::chrono::steady_clock> timer;
+ * @endcode
+ */
+typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
+
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_STEADY_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/strand.hpp b/src/third_party/boost-1.70.0/boost/asio/strand.hpp
new file mode 100644
index 00000000000..d08801bd903
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/strand.hpp
@@ -0,0 +1,315 @@
+//
+// strand.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STRAND_HPP
+#define BOOST_ASIO_STRAND_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/strand_executor_service.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Provides serialised function invocation for any executor type.
+template <typename Executor>
+class strand
+{
+public:
+ /// The type of the underlying executor.
+ typedef Executor inner_executor_type;
+
+ /// Default constructor.
+ /**
+ * This constructor is only valid if the underlying executor type is default
+ * constructible.
+ */
+ strand()
+ : executor_(),
+ impl_(use_service<detail::strand_executor_service>(
+ executor_.context()).create_implementation())
+ {
+ }
+
+ /// Construct a strand for the specified executor.
+ explicit strand(const Executor& e)
+ : executor_(e),
+ impl_(use_service<detail::strand_executor_service>(
+ executor_.context()).create_implementation())
+ {
+ }
+
+ /// Copy constructor.
+ strand(const strand& other) BOOST_ASIO_NOEXCEPT
+ : executor_(other.executor_),
+ impl_(other.impl_)
+ {
+ }
+
+ /// Converting constructor.
+ /**
+ * This constructor is only valid if the @c OtherExecutor type is convertible
+ * to @c Executor.
+ */
+ template <class OtherExecutor>
+ strand(
+ const strand<OtherExecutor>& other) BOOST_ASIO_NOEXCEPT
+ : executor_(other.executor_),
+ impl_(other.impl_)
+ {
+ }
+
+ /// Assignment operator.
+ strand& operator=(const strand& other) BOOST_ASIO_NOEXCEPT
+ {
+ executor_ = other.executor_;
+ impl_ = other.impl_;
+ return *this;
+ }
+
+ /// Converting assignment operator.
+ /**
+ * This assignment operator is only valid if the @c OtherExecutor type is
+ * convertible to @c Executor.
+ */
+ template <class OtherExecutor>
+ strand& operator=(
+ const strand<OtherExecutor>& other) BOOST_ASIO_NOEXCEPT
+ {
+ executor_ = other.executor_;
+ impl_ = other.impl_;
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move constructor.
+ strand(strand&& other) BOOST_ASIO_NOEXCEPT
+ : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)),
+ impl_(BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_))
+ {
+ }
+
+ /// Converting move constructor.
+ /**
+ * This constructor is only valid if the @c OtherExecutor type is convertible
+ * to @c Executor.
+ */
+ template <class OtherExecutor>
+ strand(strand<OtherExecutor>&& other) BOOST_ASIO_NOEXCEPT
+ : executor_(BOOST_ASIO_MOVE_CAST(OtherExecutor)(other)),
+ impl_(BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_))
+ {
+ }
+
+ /// Move assignment operator.
+ strand& operator=(strand&& other) BOOST_ASIO_NOEXCEPT
+ {
+ executor_ = BOOST_ASIO_MOVE_CAST(Executor)(other);
+ impl_ = BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_);
+ return *this;
+ }
+
+ /// Converting move assignment operator.
+ /**
+ * This assignment operator is only valid if the @c OtherExecutor type is
+ * convertible to @c Executor.
+ */
+ template <class OtherExecutor>
+ strand& operator=(
+ const strand<OtherExecutor>&& other) BOOST_ASIO_NOEXCEPT
+ {
+ executor_ = BOOST_ASIO_MOVE_CAST(OtherExecutor)(other);
+ impl_ = BOOST_ASIO_MOVE_CAST(implementation_type)(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destructor.
+ ~strand()
+ {
+ }
+
+ /// Obtain the underlying executor.
+ inner_executor_type get_inner_executor() const BOOST_ASIO_NOEXCEPT
+ {
+ return executor_;
+ }
+
+ /// Obtain the underlying execution context.
+ execution_context& context() const BOOST_ASIO_NOEXCEPT
+ {
+ return executor_.context();
+ }
+
+ /// Inform the strand that it has some outstanding work to do.
+ /**
+ * The strand delegates this call to its underlying executor.
+ */
+ void on_work_started() const BOOST_ASIO_NOEXCEPT
+ {
+ executor_.on_work_started();
+ }
+
+ /// Inform the strand that some work is no longer outstanding.
+ /**
+ * The strand delegates this call to its underlying executor.
+ */
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT
+ {
+ executor_.on_work_finished();
+ }
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the strand to execute the given function
+ * object on its underlying executor. The function object will be executed
+ * inside this function if the strand is not otherwise busy and if the
+ * underlying executor's @c dispatch() function is also able to execute the
+ * function before returning.
+ *
+ * @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
+ {
+ detail::strand_executor_service::dispatch(impl_,
+ executor_, BOOST_ASIO_MOVE_CAST(Function)(f), a);
+ }
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will never be executed inside this function.
+ * Instead, it will be scheduled by the underlying executor's defer function.
+ *
+ * @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
+ {
+ detail::strand_executor_service::post(impl_,
+ executor_, BOOST_ASIO_MOVE_CAST(Function)(f), a);
+ }
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will never be executed inside this function.
+ * Instead, it will be scheduled by the underlying executor's defer function.
+ *
+ * @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
+ {
+ detail::strand_executor_service::defer(impl_,
+ executor_, BOOST_ASIO_MOVE_CAST(Function)(f), a);
+ }
+
+ /// Determine whether the strand is running in the current thread.
+ /**
+ * @return @c true if the current thread is executing a function that was
+ * submitted to the strand using post(), dispatch() or defer(). Otherwise
+ * returns @c false.
+ */
+ bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT
+ {
+ return detail::strand_executor_service::running_in_this_thread(impl_);
+ }
+
+ /// Compare two strands for equality.
+ /**
+ * Two strands are equal if they refer to the same ordered, non-concurrent
+ * state.
+ */
+ friend bool operator==(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.impl_ == b.impl_;
+ }
+
+ /// Compare two strands for inequality.
+ /**
+ * Two strands are equal if they refer to the same ordered, non-concurrent
+ * state.
+ */
+ friend bool operator!=(const strand& a, const strand& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.impl_ != b.impl_;
+ }
+
+private:
+ Executor executor_;
+ typedef detail::strand_executor_service::implementation_type
+ implementation_type;
+ implementation_type impl_;
+};
+
+/** @defgroup make_strand boost::asio::make_strand
+ *
+ * @brief The boost::asio::make_strand function creates a @ref strand object for
+ * an executor or execution context.
+ */
+/*@{*/
+
+/// Create a @ref strand object for an executor.
+template <typename Executor>
+inline strand<Executor> make_strand(const Executor& ex,
+ typename enable_if<is_executor<Executor>::value>::type* = 0)
+{
+ return strand<Executor>(ex);
+}
+
+/// Create a @ref strand object for an execution context.
+template <typename ExecutionContext>
+inline strand<typename ExecutionContext::executor_type>
+make_strand(ExecutionContext& ctx,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value>::type* = 0)
+{
+ return strand<typename ExecutionContext::executor_type>(ctx.get_executor());
+}
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+// If both io_context.hpp and strand.hpp have been included, automatically
+// include the header file needed for the io_context::strand class.
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# if defined(BOOST_ASIO_IO_CONTEXT_HPP)
+# include <boost/asio/io_context_strand.hpp>
+# endif // defined(BOOST_ASIO_IO_CONTEXT_HPP)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#endif // BOOST_ASIO_STRAND_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/streambuf.hpp b/src/third_party/boost-1.70.0/boost/asio/streambuf.hpp
new file mode 100644
index 00000000000..a66600d0f70
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/streambuf.hpp
@@ -0,0 +1,35 @@
+//
+// streambuf.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_STREAMBUF_HPP
+#define BOOST_ASIO_STREAMBUF_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_NO_IOSTREAM)
+
+#include <boost/asio/basic_streambuf.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for the typical usage of basic_streambuf.
+typedef basic_streambuf<> streambuf;
+
+} // namespace asio
+} // namespace boost
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+#endif // BOOST_ASIO_STREAMBUF_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/system_context.hpp b/src/third_party/boost-1.70.0/boost/asio/system_context.hpp
new file mode 100644
index 00000000000..96d29f4249f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/system_context.hpp
@@ -0,0 +1,83 @@
+//
+// system_context.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SYSTEM_CONTEXT_HPP
+#define BOOST_ASIO_SYSTEM_CONTEXT_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/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 {
+
+class system_executor;
+
+/// The executor context for the system executor.
+class system_context : public execution_context
+{
+public:
+ /// The executor type associated with the context.
+ typedef system_executor executor_type;
+
+ /// Destructor shuts down all threads in the system thread pool.
+ BOOST_ASIO_DECL ~system_context();
+
+ /// Obtain an executor for the context.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT;
+
+ /// Signal all threads in the system thread pool to stop.
+ BOOST_ASIO_DECL void stop();
+
+ /// Determine whether the system thread pool has been stopped.
+ BOOST_ASIO_DECL bool stopped() const BOOST_ASIO_NOEXCEPT;
+
+ /// Join all threads in the system thread pool.
+ BOOST_ASIO_DECL void join();
+
+#if defined(GENERATING_DOCUMENTATION)
+private:
+#endif // defined(GENERATING_DOCUMENTATION)
+ // Constructor creates all threads in the system thread pool.
+ BOOST_ASIO_DECL system_context();
+
+private:
+ friend class system_executor;
+
+ struct thread_function;
+
+ // Helper function to create the underlying scheduler.
+ BOOST_ASIO_DECL detail::scheduler& add_scheduler(detail::scheduler* s);
+
+ // The underlying scheduler.
+ detail::scheduler& scheduler_;
+
+ // The threads in the system thread pool.
+ detail::thread_group threads_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/system_context.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/system_context.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_SYSTEM_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/system_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/system_executor.hpp
new file mode 100644
index 00000000000..5125046e8a7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/system_executor.hpp
@@ -0,0 +1,131 @@
+//
+// system_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SYSTEM_EXECUTOR_HPP
+#define BOOST_ASIO_SYSTEM_EXECUTOR_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class system_context;
+
+/// An executor that uses arbitrary threads.
+/**
+ * The system executor represents an execution context where functions are
+ * permitted to run on arbitrary threads. The post() and defer() functions
+ * schedule the function to run on an unspecified system thread pool, and
+ * dispatch() invokes the function immediately.
+ */
+class system_executor
+{
+public:
+ /// Obtain the underlying execution context.
+ system_context& context() const BOOST_ASIO_NOEXCEPT;
+
+ /// Inform the executor that it has some outstanding work to do.
+ /**
+ * For the system executor, this is a no-op.
+ */
+ void on_work_started() const BOOST_ASIO_NOEXCEPT
+ {
+ }
+
+ /// Inform the executor that some work is no longer outstanding.
+ /**
+ * For the system executor, this is a no-op.
+ */
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT
+ {
+ }
+
+ /// Request the system executor to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will always be executed inside this function.
+ *
+ * @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 system executor to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will never be executed inside this function.
+ * Instead, it will be scheduled to run on an unspecified system 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 system executor to invoke the given function object.
+ /**
+ * This function is used to ask the executor to execute the given function
+ * object. The function object will never be executed inside this function.
+ * Instead, it will be scheduled to run on an unspecified system 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 defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+
+ /// Compare two executors for equality.
+ /**
+ * System executors always compare equal.
+ */
+ friend bool operator==(const system_executor&,
+ const system_executor&) BOOST_ASIO_NOEXCEPT
+ {
+ return true;
+ }
+
+ /// Compare two executors for inequality.
+ /**
+ * System executors always compare equal.
+ */
+ friend bool operator!=(const system_executor&,
+ const system_executor&) BOOST_ASIO_NOEXCEPT
+ {
+ return false;
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/system_executor.hpp>
+
+#endif // BOOST_ASIO_SYSTEM_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/system_timer.hpp b/src/third_party/boost-1.70.0/boost/asio/system_timer.hpp
new file mode 100644
index 00000000000..880feac0d82
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/system_timer.hpp
@@ -0,0 +1,44 @@
+//
+// system_timer.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_SYSTEM_TIMER_HPP
+#define BOOST_ASIO_SYSTEM_TIMER_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_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/basic_waitable_timer.hpp>
+#include <boost/asio/detail/chrono.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Typedef for a timer based on the system clock.
+/**
+ * This typedef uses the C++11 @c &lt;chrono&gt; standard library facility, if
+ * available. Otherwise, it may use the Boost.Chrono library. To explicitly
+ * utilise Boost.Chrono, use the basic_waitable_timer template directly:
+ * @code
+ * typedef basic_waitable_timer<boost::chrono::system_clock> timer;
+ * @endcode
+ */
+typedef basic_waitable_timer<chrono::system_clock> system_timer;
+
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_SYSTEM_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/this_coro.hpp b/src/third_party/boost-1.70.0/boost/asio/this_coro.hpp
new file mode 100644
index 00000000000..19c50b20e8d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/this_coro.hpp
@@ -0,0 +1,47 @@
+//
+// this_coro.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_THIS_CORO_HPP
+#define BOOST_ASIO_THIS_CORO_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/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace this_coro {
+
+/// Awaitable type that returns the executor of the current coroutine.
+struct executor_t
+{
+ BOOST_ASIO_CONSTEXPR executor_t()
+ {
+ }
+};
+
+/// Awaitable object that returns the executor of the current coroutine.
+#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
+constexpr executor_t executor;
+#elif defined(BOOST_ASIO_MSVC)
+__declspec(selectany) executor_t executor;
+#endif
+
+} // namespace this_coro
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_THIS_CORO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/thread_pool.hpp b/src/third_party/boost-1.70.0/boost/asio/thread_pool.hpp
new file mode 100644
index 00000000000..765fa2aa21d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/thread_pool.hpp
@@ -0,0 +1,237 @@
+//
+// thread_pool.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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;
+
+ // Helper function to create the underlying scheduler.
+ BOOST_ASIO_DECL detail::scheduler& add_scheduler(detail::scheduler* s);
+
+ // 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.70.0/boost/asio/time_traits.hpp b/src/third_party/boost-1.70.0/boost/asio/time_traits.hpp
new file mode 100644
index 00000000000..b161f468b51
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/time_traits.hpp
@@ -0,0 +1,88 @@
+//
+// time_traits.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TIME_TRAITS_HPP
+#define BOOST_ASIO_TIME_TRAITS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/socket_types.hpp> // Must come before posix_time.
+
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Time traits suitable for use with the deadline timer.
+template <typename Time>
+struct time_traits;
+
+/// Time traits specialised for posix_time.
+template <>
+struct time_traits<boost::posix_time::ptime>
+{
+ /// The time type.
+ typedef boost::posix_time::ptime time_type;
+
+ /// The duration type.
+ typedef boost::posix_time::time_duration duration_type;
+
+ /// Get the current time.
+ static time_type now()
+ {
+#if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ return boost::posix_time::microsec_clock::universal_time();
+#else // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ return boost::posix_time::second_clock::universal_time();
+#endif // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ }
+
+ /// Add a duration to a time.
+ static time_type add(const time_type& t, const duration_type& d)
+ {
+ return t + d;
+ }
+
+ /// Subtract one time from another.
+ static duration_type subtract(const time_type& t1, const time_type& t2)
+ {
+ return t1 - t2;
+ }
+
+ /// Test whether one time is less than another.
+ static bool less_than(const time_type& t1, const time_type& t2)
+ {
+ return t1 < t2;
+ }
+
+ /// Convert to POSIX duration type.
+ static boost::posix_time::time_duration to_posix_duration(
+ const duration_type& d)
+ {
+ return d;
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_TIME_TRAITS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/buffer.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/buffer.hpp
new file mode 100644
index 00000000000..6357c34359f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/buffer.hpp
@@ -0,0 +1,24 @@
+//
+// ts/buffer.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_BUFFER_HPP
+#define BOOST_ASIO_TS_BUFFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/completion_condition.hpp>
+#include <boost/asio/read.hpp>
+#include <boost/asio/write.hpp>
+#include <boost/asio/read_until.hpp>
+
+#endif // BOOST_ASIO_TS_BUFFER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/executor.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/executor.hpp
new file mode 100644
index 00000000000..e7b01af6ef9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/executor.hpp
@@ -0,0 +1,34 @@
+//
+// ts/executor.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_EXECUTOR_HPP
+#define BOOST_ASIO_TS_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/is_executor.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/bind_executor.hpp>
+#include <boost/asio/executor_work_guard.hpp>
+#include <boost/asio/system_executor.hpp>
+#include <boost/asio/executor.hpp>
+#include <boost/asio/dispatch.hpp>
+#include <boost/asio/post.hpp>
+#include <boost/asio/defer.hpp>
+#include <boost/asio/strand.hpp>
+#include <boost/asio/packaged_task.hpp>
+#include <boost/asio/use_future.hpp>
+
+#endif // BOOST_ASIO_TS_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/internet.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/internet.hpp
new file mode 100644
index 00000000000..1e1abce6b64
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/internet.hpp
@@ -0,0 +1,40 @@
+//
+// ts/internet.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_INTERNET_HPP
+#define BOOST_ASIO_TS_INTERNET_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/ip/address.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio/ip/address_v4_iterator.hpp>
+#include <boost/asio/ip/address_v4_range.hpp>
+#include <boost/asio/ip/address_v6.hpp>
+#include <boost/asio/ip/address_v6_iterator.hpp>
+#include <boost/asio/ip/address_v6_range.hpp>
+#include <boost/asio/ip/bad_address_cast.hpp>
+#include <boost/asio/ip/basic_endpoint.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+#include <boost/asio/ip/basic_resolver_entry.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+#include <boost/asio/ip/basic_resolver.hpp>
+#include <boost/asio/ip/host_name.hpp>
+#include <boost/asio/ip/network_v4.hpp>
+#include <boost/asio/ip/network_v6.hpp>
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/asio/ip/udp.hpp>
+#include <boost/asio/ip/v6_only.hpp>
+#include <boost/asio/ip/unicast.hpp>
+#include <boost/asio/ip/multicast.hpp>
+
+#endif // BOOST_ASIO_TS_INTERNET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/io_context.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/io_context.hpp
new file mode 100644
index 00000000000..9ffb06258d8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/io_context.hpp
@@ -0,0 +1,20 @@
+//
+// ts/io_context.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_IO_CONTEXT_HPP
+#define BOOST_ASIO_TS_IO_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/io_context.hpp>
+
+#endif // BOOST_ASIO_TS_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/net.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/net.hpp
new file mode 100644
index 00000000000..dcafe696519
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/net.hpp
@@ -0,0 +1,26 @@
+//
+// ts/net.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_NET_HPP
+#define BOOST_ASIO_TS_NET_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/ts/netfwd.hpp>
+#include <boost/asio/ts/executor.hpp>
+#include <boost/asio/ts/io_context.hpp>
+#include <boost/asio/ts/timer.hpp>
+#include <boost/asio/ts/buffer.hpp>
+#include <boost/asio/ts/socket.hpp>
+#include <boost/asio/ts/internet.hpp>
+
+#endif // BOOST_ASIO_TS_NET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/netfwd.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/netfwd.hpp
new file mode 100644
index 00000000000..d165e5bfebf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/netfwd.hpp
@@ -0,0 +1,205 @@
+//
+// ts/netfwd.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_NETFWD_HPP
+#define BOOST_ASIO_TS_NETFWD_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_CHRONO)
+# include <boost/asio/detail/chrono.hpp>
+#endif // defined(BOOST_ASIO_HAS_CHRONO)
+
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+# include <boost/asio/detail/date_time_fwd.hpp>
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class execution_context;
+
+template <typename T, typename Executor>
+class executor_binder;
+
+template <typename Executor>
+class executor_work_guard;
+
+class system_executor;
+
+class executor;
+
+template <typename Executor>
+class strand;
+
+class io_context;
+
+template <typename Clock>
+struct wait_traits;
+
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+template <typename Time>
+struct time_traits;
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+#if !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+#define BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
+
+template <typename Clock,
+ typename WaitTraits = wait_traits<Clock>,
+ typename Executor = executor>
+class basic_waitable_timer;
+
+#endif // !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
+
+#if defined(BOOST_ASIO_HAS_CHRONO)
+
+typedef basic_waitable_timer<chrono::system_clock> system_timer;
+
+typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
+
+typedef basic_waitable_timer<chrono::high_resolution_clock>
+ high_resolution_timer;
+
+#endif // defined(BOOST_ASIO_HAS_CHRONO)
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_FWD_DECL
+
+template <typename Protocol, typename Executor = executor>
+class basic_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_FWD_DECL)
+
+#if !defined(BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL
+
+template <typename Protocol, typename Executor = executor>
+class basic_datagram_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+
+#if !defined(BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+#define BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = executor>
+class basic_stream_socket;
+
+#endif // !defined(BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL
+
+template <typename Protocol, typename Executor = executor>
+class basic_socket_acceptor;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol,
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ || defined(GENERATING_DOCUMENTATION)
+ typename Clock = boost::posix_time::ptime,
+ typename WaitTraits = time_traits<Clock> >
+#else
+ typename Clock = chrono::steady_clock,
+ typename WaitTraits = wait_traits<Clock> >
+#endif
+class basic_socket_streambuf;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
+
+#if !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+#define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol,
+#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
+ || defined(GENERATING_DOCUMENTATION)
+ typename Clock = boost::posix_time::ptime,
+ typename WaitTraits = time_traits<Clock> >
+#else
+ typename Clock = chrono::steady_clock,
+ typename WaitTraits = wait_traits<Clock> >
+#endif
+class basic_socket_iostream;
+
+#endif // !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
+
+namespace ip {
+
+class address;
+
+class address_v4;
+
+class address_v6;
+
+template <typename Address>
+class basic_address_iterator;
+
+typedef basic_address_iterator<address_v4> address_v4_iterator;
+
+typedef basic_address_iterator<address_v6> address_v6_iterator;
+
+template <typename Address>
+class basic_address_range;
+
+typedef basic_address_range<address_v4> address_v4_range;
+
+typedef basic_address_range<address_v6> address_v6_range;
+
+class network_v4;
+
+class network_v6;
+
+template <typename InternetProtocol>
+class basic_endpoint;
+
+template <typename InternetProtocol>
+class basic_resolver_entry;
+
+template <typename InternetProtocol>
+class basic_resolver_results;
+
+#if !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+#define BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL
+
+template <typename InternetProtocol, typename Executor = executor>
+class basic_resolver;
+
+#endif // !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+
+class tcp;
+
+class udp;
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_TS_NETFWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/socket.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/socket.hpp
new file mode 100644
index 00000000000..be7e82351c8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/socket.hpp
@@ -0,0 +1,27 @@
+//
+// ts/socket.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_SOCKET_HPP
+#define BOOST_ASIO_TS_SOCKET_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/socket_base.hpp>
+#include <boost/asio/basic_socket.hpp>
+#include <boost/asio/basic_datagram_socket.hpp>
+#include <boost/asio/basic_stream_socket.hpp>
+#include <boost/asio/basic_socket_acceptor.hpp>
+#include <boost/asio/basic_socket_streambuf.hpp>
+#include <boost/asio/basic_socket_iostream.hpp>
+#include <boost/asio/connect.hpp>
+
+#endif // BOOST_ASIO_TS_SOCKET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/ts/timer.hpp b/src/third_party/boost-1.70.0/boost/asio/ts/timer.hpp
new file mode 100644
index 00000000000..fec6245e388
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/ts/timer.hpp
@@ -0,0 +1,26 @@
+//
+// ts/timer.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_TS_TIMER_HPP
+#define BOOST_ASIO_TS_TIMER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/chrono.hpp>
+
+#include <boost/asio/wait_traits.hpp>
+#include <boost/asio/basic_waitable_timer.hpp>
+#include <boost/asio/system_timer.hpp>
+#include <boost/asio/steady_timer.hpp>
+#include <boost/asio/high_resolution_timer.hpp>
+
+#endif // BOOST_ASIO_TS_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/unyield.hpp b/src/third_party/boost-1.70.0/boost/asio/unyield.hpp
new file mode 100644
index 00000000000..c6874d5cf33
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/unyield.hpp
@@ -0,0 +1,21 @@
+//
+// unyield.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+//
+
+#ifdef reenter
+# undef reenter
+#endif
+
+#ifdef yield
+# undef yield
+#endif
+
+#ifdef fork
+# undef fork
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/asio/use_awaitable.hpp b/src/third_party/boost-1.70.0/boost/asio/use_awaitable.hpp
new file mode 100644
index 00000000000..8764b3d2d21
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/use_awaitable.hpp
@@ -0,0 +1,73 @@
+//
+// use_awaitable.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_AWAITABLE_HPP
+#define BOOST_ASIO_USE_AWAITABLE_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_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/awaitable.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// A completion token that represents the currently executing coroutine.
+/**
+ * The @c use_awaitable_t class, with its value @c use_awaitable, is used to
+ * represent the currently executing coroutine. This completion token may be
+ * passed as a handler to an asynchronous operation. For example:
+ *
+ * @code awaitable<void> my_coroutine()
+ * {
+ * std::size_t n = co_await my_socket.async_read_some(buffer, use_awaitable);
+ * ...
+ * } @endcode
+ *
+ * When used with co_await, the initiating function (@c async_read_some in the
+ * above example) suspends the current coroutine. The coroutine is resumed when
+ * the asynchronous operation completes, and the result of the operation is
+ * returned.
+ */
+template <typename Executor = executor>
+struct use_awaitable_t
+{
+ BOOST_ASIO_CONSTEXPR use_awaitable_t()
+ {
+ }
+};
+
+/// A completion token object that represents the currently executing coroutine.
+/**
+ * See the documentation for boost::asio::use_awaitable_t for a usage example.
+ */
+#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
+constexpr use_awaitable_t<> use_awaitable;
+#elif defined(BOOST_ASIO_MSVC)
+__declspec(selectany) use_awaitable_t<> use_awaitable;
+#endif
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/use_awaitable.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_USE_AWAITABLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/use_future.hpp b/src/third_party/boost-1.70.0/boost/asio/use_future.hpp
new file mode 100644
index 00000000000..45497efa083
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/use_future.hpp
@@ -0,0 +1,162 @@
+//
+// use_future.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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.70.0/boost/asio/uses_executor.hpp b/src/third_party/boost-1.70.0/boost/asio/uses_executor.hpp
new file mode 100644
index 00000000000..fb55b6751ed
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/uses_executor.hpp
@@ -0,0 +1,73 @@
+//
+// uses_executor.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_USES_EXECUTOR_HPP
+#define BOOST_ASIO_USES_EXECUTOR_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 {
+
+/// A special type, similar to std::nothrow_t, used to disambiguate
+/// constructors that accept executor arguments.
+/**
+ * The executor_arg_t struct is an empty structure type used as a unique type
+ * to disambiguate constructor and function overloading. Specifically, some
+ * types have constructors with executor_arg_t as the first argument,
+ * immediately followed by an argument of a type that satisfies the Executor
+ * type requirements.
+ */
+struct executor_arg_t
+{
+ /// Constructor.
+ BOOST_ASIO_CONSTEXPR executor_arg_t() BOOST_ASIO_NOEXCEPT
+ {
+ }
+};
+
+/// A special value, similar to std::nothrow, used to disambiguate constructors
+/// that accept executor arguments.
+/**
+ * See boost::asio::executor_arg_t and boost::asio::uses_executor
+ * for more information.
+ */
+#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
+constexpr executor_arg_t executor_arg;
+#elif defined(BOOST_ASIO_MSVC)
+__declspec(selectany) executor_arg_t executor_arg;
+#endif
+
+/// The uses_executor trait detects whether a type T has an associated executor
+/// that is convertible from type Executor.
+/**
+ * Meets the BinaryTypeTrait requirements. The Asio library provides a
+ * definition that is derived from false_type. A program may specialize this
+ * template to derive from true_type for a user-defined type T that can be
+ * constructed with an executor, where the first argument of a constructor has
+ * type executor_arg_t and the second argument is convertible from type
+ * Executor.
+ */
+template <typename T, typename Executor>
+struct uses_executor : false_type {};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_USES_EXECUTOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/version.hpp b/src/third_party/boost-1.70.0/boost/asio/version.hpp
new file mode 100644
index 00000000000..30d7b2348e1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/version.hpp
@@ -0,0 +1,23 @@
+//
+// version.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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 101400 // 1.14.0
+
+#endif // BOOST_ASIO_VERSION_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/wait_traits.hpp b/src/third_party/boost-1.70.0/boost/asio/wait_traits.hpp
new file mode 100644
index 00000000000..66719f23a95
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/wait_traits.hpp
@@ -0,0 +1,58 @@
+//
+// wait_traits.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WAIT_TRAITS_HPP
+#define BOOST_ASIO_WAIT_TRAITS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Wait traits suitable for use with the basic_waitable_timer class template.
+template <typename Clock>
+struct wait_traits
+{
+ /// Convert a clock duration into a duration used for waiting.
+ /**
+ * @returns @c d.
+ */
+ static typename Clock::duration to_wait_duration(
+ const typename Clock::duration& d)
+ {
+ return d;
+ }
+
+ /// Convert a clock duration into a duration used for waiting.
+ /**
+ * @returns @c d.
+ */
+ static typename Clock::duration to_wait_duration(
+ const typename Clock::time_point& t)
+ {
+ typename Clock::time_point now = Clock::now();
+ if (now + (Clock::duration::max)() < t)
+ return (Clock::duration::max)();
+ if (now + (Clock::duration::min)() > t)
+ return (Clock::duration::min)();
+ return t - now;
+ }
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_WAIT_TRAITS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/basic_object_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/basic_object_handle.hpp
new file mode 100644
index 00000000000..9519bc735e0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/basic_object_handle.hpp
@@ -0,0 +1,398 @@
+//
+// windows/basic_object_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// Distributed under the 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_WINDOWS_BASIC_OBJECT_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_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_WINDOWS_OBJECT_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_object_handle_service.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Provides object-oriented handle functionality.
+/**
+ * The windows::basic_object_handle class provides asynchronous and blocking
+ * object-oriented handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = executor>
+class basic_object_handle
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef boost::asio::detail::win_object_handle_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// An object handle is always the lowest layer.
+ typedef basic_object_handle lowest_layer_type;
+
+ /// Construct an object handle without opening it.
+ /**
+ * This constructor creates an object handle without opening it.
+ *
+ * @param ex The I/O executor that the object handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * object handle.
+ */
+ explicit basic_object_handle(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct an object handle without opening it.
+ /**
+ * This constructor creates an object handle without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the object handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the object handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_object_handle(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ basic_object_handle
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct an object handle on an existing native handle.
+ /**
+ * This constructor creates an object handle object to hold an existing native
+ * handle.
+ *
+ * @param ex The I/O executor that the object handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * object handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_object_handle(const executor_type& ex,
+ const native_handle_type& native_handle)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct an object handle on an existing native handle.
+ /**
+ * This constructor creates an object handle object to hold an existing native
+ * handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the object handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the object handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_object_handle(ExecutionContext& context,
+ const native_handle_type& native_handle,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct an object handle from another.
+ /**
+ * This constructor moves an object handle from one object to another.
+ *
+ * @param other The other object handle 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_object_handle(const executor_type&)
+ * constructor.
+ */
+ basic_object_handle(basic_object_handle&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an object handle from another.
+ /**
+ * This assignment operator moves an object handle from one object to another.
+ *
+ * @param other The other object handle 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_object_handle(const executor_type&)
+ * constructor.
+ */
+ basic_object_handle& operator=(basic_object_handle&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since an object handle cannot contain any further layers, it simply
+ * returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since an object handle cannot contain any further layers, it simply
+ * returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& handle)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the handle is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void close()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the native handle representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * handle. This is intended to allow access to native handle functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Perform a blocking wait on the object handle.
+ /**
+ * This function is used to wait for the object handle to be set to the
+ * signalled state. This function blocks and does not return until the object
+ * handle has been set to the signalled state.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void wait()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().wait(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Perform a blocking wait on the object handle.
+ /**
+ * This function is used to wait for the object handle to be set to the
+ * signalled state. This function blocks and does not return until the object
+ * handle has been set to the signalled state.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ void wait(boost::system::error_code& ec)
+ {
+ impl_.get_service().wait(impl_.get_implementation(), ec);
+ }
+
+ /// Start an asynchronous wait on the object handle.
+ /**
+ * This function is be used to initiate an asynchronous wait against the
+ * object handle. It always returns immediately.
+ *
+ * @param handler The handler to be called when the object handle is set to
+ * the signalled state. 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+ template <typename WaitHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler,
+ void (boost::system::error_code))
+ async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ boost::asio::async_completion<WaitHandler,
+ void (boost::system::error_code)> init(handler);
+
+ impl_.get_service().async_wait(impl_.get_implementation(),
+ init.completion_handler, impl_.get_implementation_executor());
+
+ return init.result.get();
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_object_handle(const basic_object_handle&) BOOST_ASIO_DELETED;
+ basic_object_handle& operator=(const basic_object_handle&) BOOST_ASIO_DELETED;
+
+ boost::asio::detail::io_object_impl<
+ boost::asio::detail::win_object_handle_service, Executor> impl_;
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/basic_overlapped_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/basic_overlapped_handle.hpp
new file mode 100644
index 00000000000..ccce21fecb5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/basic_overlapped_handle.hpp
@@ -0,0 +1,355 @@
+//
+// windows/basic_overlapped_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_BASIC_OVERLAPPED_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_BASIC_OVERLAPPED_HANDLE_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_WINDOWS_RANDOM_ACCESS_HANDLE) \
+ || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/win_iocp_handle_service.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Provides Windows handle functionality for objects that support
+/// overlapped I/O.
+/**
+ * The windows::overlapped_handle class provides the ability to wrap a Windows
+ * handle. The underlying object referred to by the handle must support
+ * overlapped I/O.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = executor>
+class basic_overlapped_handle
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef boost::asio::detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// An overlapped_handle is always the lowest layer.
+ typedef basic_overlapped_handle lowest_layer_type;
+
+ /// Construct an overlapped handle without opening it.
+ /**
+ * This constructor creates an overlapped handle without opening it.
+ *
+ * @param ex The I/O executor that the overlapped handle will use, by default,
+ * to dispatch handlers for any asynchronous operations performed on the
+ * overlapped handle.
+ */
+ explicit basic_overlapped_handle(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct an overlapped handle without opening it.
+ /**
+ * This constructor creates an overlapped handle without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the overlapped handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the overlapped handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_overlapped_handle(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ basic_overlapped_handle
+ >::type* = 0)
+ : impl_(context)
+ {
+ }
+
+ /// Construct an overlapped handle on an existing native handle.
+ /**
+ * This constructor creates an overlapped handle object to hold an existing
+ * native handle.
+ *
+ * @param ex The I/O executor that the overlapped handle will use, by default,
+ * to dispatch handlers for any asynchronous operations performed on the
+ * overlapped handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_overlapped_handle(const executor_type& ex,
+ const native_handle_type& native_handle)
+ : impl_(ex)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct an overlapped handle on an existing native handle.
+ /**
+ * This constructor creates an overlapped handle object to hold an existing
+ * native handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the overlapped handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the overlapped handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_overlapped_handle(ExecutionContext& context,
+ const native_handle_type& native_handle,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct an overlapped handle from another.
+ /**
+ * This constructor moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle 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 overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ basic_overlapped_handle(basic_overlapped_handle&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an overlapped handle from another.
+ /**
+ * This assignment operator moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle 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 overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ basic_overlapped_handle& operator=(basic_overlapped_handle&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since an overlapped_handle cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since an overlapped_handle cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& handle)
+ {
+ boost::system::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
+ boost::system::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the handle is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void close()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID close(boost::system::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the native handle representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * handle. This is intended to allow access to native handle functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ boost::system::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the boost::asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID cancel(boost::system::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the handle, cancelling any outstanding asynchronous
+ * wait operations associated with the handle as if by calling @c cancel.
+ */
+ ~basic_overlapped_handle()
+ {
+ }
+
+ boost::asio::detail::io_object_impl<
+ boost::asio::detail::win_iocp_handle_service, Executor> impl_;
+
+private:
+ // Disallow copying and assignment.
+ basic_overlapped_handle(const basic_overlapped_handle&) BOOST_ASIO_DELETED;
+ basic_overlapped_handle& operator=(
+ const basic_overlapped_handle&) BOOST_ASIO_DELETED;
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+ // || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_BASIC_OVERLAPPED_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/basic_random_access_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/basic_random_access_handle.hpp
new file mode 100644
index 00000000000..5f0d6d48c6a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/basic_random_access_handle.hpp
@@ -0,0 +1,429 @@
+//
+// windows/basic_random_access_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_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/windows/basic_overlapped_handle.hpp>
+
+#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Provides random-access handle functionality.
+/**
+ * The windows::basic_random_access_handle class provides asynchronous and
+ * blocking random-access handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = executor>
+class basic_random_access_handle
+ : public basic_overlapped_handle<Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef boost::asio::detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// Construct a random-access handle without opening it.
+ /**
+ * This constructor creates a random-access handle without opening it.
+ *
+ * @param ex The I/O executor that the random-access handle will use, by
+ * default, to dispatch handlers for any asynchronous operations performed on
+ * the random-access handle.
+ */
+ explicit basic_random_access_handle(const executor_type& ex)
+ : basic_overlapped_handle<Executor>(ex)
+ {
+ }
+
+ /// Construct a random-access handle without opening it.
+ /**
+ * This constructor creates a random-access handle without opening it. The
+ * handle needs to be opened or assigned before data can be sent or received
+ * on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the random-access handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the random-access handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_random_access_handle(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ basic_random_access_handle
+ >::type* = 0)
+ : basic_overlapped_handle<Executor>(context)
+ {
+ }
+
+ /// Construct a random-access handle on an existing native handle.
+ /**
+ * This constructor creates a random-access handle object to hold an existing
+ * native handle.
+ *
+ * @param ex The I/O executor that the random-access handle will use, by
+ * default, to dispatch handlers for any asynchronous operations performed on
+ * the random-access handle.
+ *
+ * @param handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_random_access_handle(const executor_type& ex,
+ const native_handle_type& handle)
+ : basic_overlapped_handle<Executor>(ex, handle)
+ {
+ }
+
+ /// Construct a random-access handle on an existing native handle.
+ /**
+ * This constructor creates a random-access handle object to hold an existing
+ * native handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the random-access handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the random-access handle.
+ *
+ * @param handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_handle(ExecutionContext& context,
+ const native_handle_type& handle,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_overlapped_handle<Executor>(context, handle)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a random-access handle from another.
+ /**
+ * This constructor moves a random-access handle from one object to another.
+ *
+ * @param other The other random-access handle 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_random_access_handle(const executor_type&)
+ * constructor.
+ */
+ basic_random_access_handle(basic_random_access_handle&& other)
+ : basic_overlapped_handle<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a random-access handle from another.
+ /**
+ * This assignment operator moves a random-access handle from one object to
+ * another.
+ *
+ * @param other The other random-access handle 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_random_access_handle(const executor_type&)
+ * constructor.
+ */
+ basic_random_access_handle& operator=(basic_random_access_handle&& other)
+ {
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Write some data to the handle at the specified offset.
+ /**
+ * This function is used to write data to the random-access handle. The
+ * function call will block until one or more bytes of the data has been
+ * written successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The write_some_at operation may not write all of the data. Consider
+ * using the @ref write_at function if you need to ensure that all data is
+ * written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.write_some_at(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.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some_at(uint64_t offset,
+ const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some_at");
+ return s;
+ }
+
+ /// Write some data to the handle at the specified offset.
+ /**
+ * This function is used to write data to the random-access handle. The
+ * function call will block until one or more bytes of the data has been
+ * written successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @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_at function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some_at(uint64_t offset,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ }
+
+ /// Start an asynchronous write at the specified offset.
+ /**
+ * This function is used to asynchronously write data to the random-access
+ * handle. The function call always returns immediately.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ * 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The write operation may not transmit all of the data to the peer.
+ * Consider using the @ref async_write_at function if you need to ensure that
+ * all data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_write_some_at(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 ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_write_some_at(uint64_t offset,
+ 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);
+
+ this->impl_.get_service().async_write_some_at(
+ this->impl_.get_implementation(), offset,
+ buffers, init.completion_handler,
+ this->impl_.get_implementation_executor());
+
+ return init.result.get();
+ }
+
+ /// Read some data from the handle at the specified offset.
+ /**
+ * This function is used to read data from the random-access handle. The
+ * function call will block until one or more bytes of data has been read
+ * successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read_at function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.read_some_at(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.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some_at(uint64_t offset,
+ const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some_at");
+ return s;
+ }
+
+ /// Read some data from the handle at the specified offset.
+ /**
+ * This function is used to read data from the random-access handle. The
+ * function call will block until one or more bytes of data has been read
+ * successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more 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_at 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_at(uint64_t offset,
+ const MutableBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ return this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ }
+
+ /// Start an asynchronous read at the specified offset.
+ /**
+ * This function is used to asynchronously read data from the random-access
+ * handle. The function call always returns immediately.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers 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 read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read_at function if you need to ensure that
+ * the requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_read_some_at(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.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_read_some_at(uint64_t offset,
+ 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);
+
+ this->impl_.get_service().async_read_some_at(
+ this->impl_.get_implementation(), offset,
+ buffers, init.completion_handler,
+ this->impl_.get_implementation_executor());
+
+ return init.result.get();
+ }
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/basic_stream_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/basic_stream_handle.hpp
new file mode 100644
index 00000000000..f8d50d552c4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/basic_stream_handle.hpp
@@ -0,0 +1,413 @@
+//
+// windows/basic_stream_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_BASIC_STREAM_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_BASIC_STREAM_HANDLE_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/windows/basic_overlapped_handle.hpp>
+
+#if defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Provides stream-oriented handle functionality.
+/**
+ * The windows::basic_stream_handle class provides asynchronous and blocking
+ * stream-oriented handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Executor = executor>
+class basic_stream_handle
+ : public basic_overlapped_handle<Executor>
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef boost::asio::detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// Construct a stream handle without opening it.
+ /**
+ * This constructor creates a stream handle without opening it.
+ *
+ * @param ex The I/O executor that the stream handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the stream
+ * handle.
+ */
+ explicit basic_stream_handle(const executor_type& ex)
+ : basic_overlapped_handle<Executor>(ex)
+ {
+ }
+
+ /// Construct a stream handle without opening it.
+ /**
+ * This constructor creates a stream handle without opening it. The handle
+ * needs to be opened or assigned before data can be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the stream handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the stream handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_handle(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ basic_stream_handle
+ >::type* = 0)
+ : basic_overlapped_handle<Executor>(context)
+ {
+ }
+
+ /// Construct a stream handle on an existing native handle.
+ /**
+ * This constructor creates a stream handle object to hold an existing native
+ * handle.
+ *
+ * @param ex The I/O executor that the stream handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the stream
+ * handle.
+ *
+ * @param handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_stream_handle(const executor_type& ex, const native_handle_type& handle)
+ : basic_overlapped_handle<Executor>(ex, handle)
+ {
+ }
+
+ /// Construct a stream handle on an existing native handle.
+ /**
+ * This constructor creates a stream handle object to hold an existing native
+ * handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the stream handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the stream handle.
+ *
+ * @param handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_handle(ExecutionContext& context,
+ const native_handle_type& handle,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : basic_overlapped_handle<Executor>(context, handle)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a stream handle from another.
+ /**
+ * This constructor moves a stream handle from one object to another.
+ *
+ * @param other The other stream handle 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_stream_handle(const executor_type&)
+ * constructor.
+ */
+ basic_stream_handle(basic_stream_handle&& other)
+ : basic_overlapped_handle<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a stream handle from another.
+ /**
+ * This assignment operator moves a stream handle from one object to
+ * another.
+ *
+ * @param other The other stream handle 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_stream_handle(const executor_type&)
+ * constructor.
+ */
+ basic_stream_handle& operator=(basic_stream_handle&& other)
+ {
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Write some data to the handle.
+ /**
+ * This function is used to write data to the stream handle. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.write_some(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.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the handle.
+ /**
+ * This function is used to write data to the stream handle. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @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 this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the stream handle.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ * 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.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The write 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.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_write_some(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 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);
+
+ this->impl_.get_service().async_write_some(
+ this->impl_.get_implementation(),
+ buffers, init.completion_handler,
+ this->impl_.get_implementation_executor());
+
+ return init.result.get();
+ }
+
+ /// Read some data from the handle.
+ /**
+ * This function is used to read data from the stream handle. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws boost::system::system_error Thrown on failure. An error code of
+ * boost::asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.read_some(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.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the handle.
+ /**
+ * This function is used to read data from the stream handle. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more 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 this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the stream handle.
+ * The function call always returns immediately.
+ *
+ * @param buffers One or more buffers 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 read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ *
+ * @note The read 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.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_read_some(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.
+ */
+ 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);
+
+ this->impl_.get_service().async_read_some(
+ this->impl_.get_implementation(),
+ buffers, init.completion_handler,
+ this->impl_.get_implementation_executor());
+
+ return init.result.get();
+ }
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_BASIC_STREAM_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/object_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/object_handle.hpp
new file mode 100644
index 00000000000..6cde16627ab
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/object_handle.hpp
@@ -0,0 +1,40 @@
+//
+// windows/object_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// Distributed under the 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_WINDOWS_OBJECT_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_OBJECT_HANDLE_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_WINDOWS_OBJECT_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/windows/basic_object_handle.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Typedef for the typical usage of an object handle.
+typedef basic_object_handle<> object_handle;
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_OBJECT_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/overlapped_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/overlapped_handle.hpp
new file mode 100644
index 00000000000..e87e7b35c02
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/overlapped_handle.hpp
@@ -0,0 +1,41 @@
+//
+// windows/overlapped_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_OVERLAPPED_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_OVERLAPPED_HANDLE_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_WINDOWS_RANDOM_ACCESS_HANDLE) \
+ || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/windows/basic_overlapped_handle.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Typedef for the typical usage of an overlapped handle.
+typedef basic_overlapped_handle<> overlapped_handle;
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+ // || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_OVERLAPPED_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/overlapped_ptr.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/overlapped_ptr.hpp
new file mode 100644
index 00000000000..a891248ceb0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/overlapped_ptr.hpp
@@ -0,0 +1,145 @@
+//
+// windows/overlapped_ptr.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_OVERLAPPED_PTR_HPP
+#define BOOST_ASIO_WINDOWS_OVERLAPPED_PTR_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_WINDOWS_OVERLAPPED_PTR) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/win_iocp_overlapped_ptr.hpp>
+#include <boost/asio/io_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Wraps a handler to create an OVERLAPPED object for use with overlapped I/O.
+/**
+ * A special-purpose smart pointer used to wrap an application handler so that
+ * it can be passed as the LPOVERLAPPED argument to overlapped I/O functions.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class overlapped_ptr
+ : private noncopyable
+{
+public:
+ /// Construct an empty overlapped_ptr.
+ overlapped_ptr()
+ : impl_()
+ {
+ }
+
+ /// Construct an overlapped_ptr to contain the specified handler.
+ template <typename ExecutionContext, typename Handler>
+ explicit overlapped_ptr(ExecutionContext& context,
+ BOOST_ASIO_MOVE_ARG(Handler) handler,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context.get_executor(), BOOST_ASIO_MOVE_CAST(Handler)(handler))
+ {
+ }
+
+ /// Construct an overlapped_ptr to contain the specified handler.
+ template <typename Executor, typename Handler>
+ explicit overlapped_ptr(const Executor& ex,
+ BOOST_ASIO_MOVE_ARG(Handler) handler,
+ typename enable_if<
+ is_executor<Executor>::value
+ >::type* = 0)
+ : impl_(ex, BOOST_ASIO_MOVE_CAST(Handler)(handler))
+ {
+ }
+
+ /// Destructor automatically frees the OVERLAPPED object unless released.
+ ~overlapped_ptr()
+ {
+ }
+
+ /// Reset to empty.
+ void reset()
+ {
+ impl_.reset();
+ }
+
+ /// Reset to contain the specified handler, freeing any current OVERLAPPED
+ /// object.
+ template <typename ExecutionContext, typename Handler>
+ void reset(ExecutionContext& context, BOOST_ASIO_MOVE_ARG(Handler) handler,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ {
+ impl_.reset(context.get_executor(), BOOST_ASIO_MOVE_CAST(Handler)(handler));
+ }
+
+ /// Reset to contain the specified handler, freeing any current OVERLAPPED
+ /// object.
+ template <typename Executor, typename Handler>
+ void reset(const Executor& ex, BOOST_ASIO_MOVE_ARG(Handler) handler,
+ typename enable_if<
+ is_executor<Executor>::value
+ >::type* = 0)
+ {
+ impl_.reset(ex, BOOST_ASIO_MOVE_CAST(Handler)(handler));
+ }
+
+ /// Get the contained OVERLAPPED object.
+ OVERLAPPED* get()
+ {
+ return impl_.get();
+ }
+
+ /// Get the contained OVERLAPPED object.
+ const OVERLAPPED* get() const
+ {
+ return impl_.get();
+ }
+
+ /// Release ownership of the OVERLAPPED object.
+ OVERLAPPED* release()
+ {
+ return impl_.release();
+ }
+
+ /// Post completion notification for overlapped operation. Releases ownership.
+ void complete(const boost::system::error_code& ec,
+ std::size_t bytes_transferred)
+ {
+ impl_.complete(ec, bytes_transferred);
+ }
+
+private:
+ detail::win_iocp_overlapped_ptr impl_;
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_OVERLAPPED_PTR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/random_access_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/random_access_handle.hpp
new file mode 100644
index 00000000000..77ae022f5d9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/random_access_handle.hpp
@@ -0,0 +1,39 @@
+//
+// windows/random_access_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_RANDOM_ACCESS_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_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_WINDOWS_RANDOM_ACCESS_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/windows/basic_random_access_handle.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Typedef for the typical usage of a random-access handle.
+typedef basic_random_access_handle<> random_access_handle;
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/windows/stream_handle.hpp b/src/third_party/boost-1.70.0/boost/asio/windows/stream_handle.hpp
new file mode 100644
index 00000000000..56e7db033bb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/windows/stream_handle.hpp
@@ -0,0 +1,39 @@
+//
+// windows/stream_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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_WINDOWS_STREAM_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_STREAM_HANDLE_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_WINDOWS_STREAM_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/windows/basic_stream_handle.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Typedef for the typical usage of a stream-oriented handle.
+typedef basic_stream_handle<> stream_handle;
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_STREAM_HANDLE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/asio/write.hpp b/src/third_party/boost-1.70.0/boost/asio/write.hpp
new file mode 100644
index 00000000000..041f163b400
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/write.hpp
@@ -0,0 +1,1219 @@
+//
+// write.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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);
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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_v1>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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_v1>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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_v1,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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_v1,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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_v2>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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_v2,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/*@}*/
+/**
+ * @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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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);
+
+#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v1, 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_v1) buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ 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_v1) buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
+ && !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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)
+#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
+ */
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >::type* = 0);
+
+/*@}*/
+
+} // 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.70.0/boost/asio/write_at.hpp b/src/third_party/boost-1.70.0/boost/asio/write_at.hpp
new file mode 100644
index 00000000000..d874327c5a2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/write_at.hpp
@@ -0,0 +1,681 @@
+//
+// write_at.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::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.70.0/boost/asio/yield.hpp b/src/third_party/boost-1.70.0/boost/asio/yield.hpp
new file mode 100644
index 00000000000..36628ff98b5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/asio/yield.hpp
@@ -0,0 +1,23 @@
+//
+// yield.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2019 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)
+//
+
+#include "coroutine.hpp"
+
+#ifndef reenter
+# define reenter(c) BOOST_ASIO_CORO_REENTER(c)
+#endif
+
+#ifndef yield
+# define yield BOOST_ASIO_CORO_YIELD
+#endif
+
+#ifndef fork
+# define fork BOOST_ASIO_CORO_FORK
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/assert.hpp b/src/third_party/boost-1.70.0/boost/assert.hpp
index 9650d7a2908..9650d7a2908 100644
--- a/src/third_party/boost-1.69.0/boost/assert.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/assign/assignment_exception.hpp
index 5a52fcd421a..5a52fcd421a 100644
--- a/src/third_party/boost-1.69.0/boost/assign/assignment_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/assign/assignment_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/assign/list_of.hpp b/src/third_party/boost-1.70.0/boost/assign/list_of.hpp
index b9ef968ddd4..b9ef968ddd4 100644
--- a/src/third_party/boost-1.69.0/boost/assign/list_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/assign/list_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic.hpp b/src/third_party/boost-1.70.0/boost/atomic.hpp
index cc28b1ab5e2..cc28b1ab5e2 100644
--- a/src/third_party/boost-1.69.0/boost/atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/atomic.hpp b/src/third_party/boost-1.70.0/boost/atomic/atomic.hpp
index 5a8058829cb..5a8058829cb 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/atomic_flag.hpp b/src/third_party/boost-1.70.0/boost/atomic/atomic_flag.hpp
index ac296bcc8e0..ac296bcc8e0 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/atomic_flag.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/atomic_flag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/capabilities.hpp b/src/third_party/boost-1.70.0/boost/atomic/capabilities.hpp
index 5c7434d9bd0..5c7434d9bd0 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/capabilities.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/capabilities.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/addressof.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/addressof.hpp
index 38e876e317e..38e876e317e 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/addressof.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/addressof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_flag.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/atomic_flag.hpp
index 6f5fc8acc36..6f5fc8acc36 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_flag.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/atomic_flag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_template.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/atomic_template.hpp
index fb0a8f58f0e..fb0a8f58f0e 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_template.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/atomic_template.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_cast.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/bitwise_cast.hpp
index 10d165e7c55..10d165e7c55 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/bitwise_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_fp_cast.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/bitwise_fp_cast.hpp
index a74b20b9720..a74b20b9720 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_fp_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/bitwise_fp_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_alpha.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_alpha.hpp
index 861432f58a6..861432f58a6 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_alpha.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_alpha.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_arm.hpp
index a26ea56ee51..a26ea56ee51 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_atomic.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_atomic.hpp
index 3b518cf49c0..3b518cf49c0 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_ppc.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_ppc.hpp
index 3e20fdee45a..3e20fdee45a 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sparc.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_sparc.hpp
index 5806684926a..5806684926a 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sparc.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_sparc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sync.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_sync.hpp
index ffbe605a1a7..ffbe605a1a7 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sync.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_sync.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_x86.hpp
index 70c64628afd..70c64628afd 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_gcc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_linux_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_linux_arm.hpp
index abe6fb81af7..abe6fb81af7 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_linux_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_linux_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_msvc_arm.hpp
index 6b3c61fb3ee..6b3c61fb3ee 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_msvc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_msvc_x86.hpp
index 2ee4c921113..2ee4c921113 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_msvc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_windows.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_windows.hpp
index 1cc0ded8333..1cc0ded8333 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/caps_windows.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/caps_windows.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/config.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/config.hpp
index d2a6afd203c..d2a6afd203c 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_operations.hpp
index 854d8c9bee6..854d8c9bee6 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_operations.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations_fwd.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_operations_fwd.hpp
index 79bca9d2cd2..79bca9d2cd2 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_operations_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_emulated.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_ops_emulated.hpp
index e04b2f50fb4..e04b2f50fb4 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_emulated.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_ops_emulated.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_generic.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_ops_generic.hpp
index 34902c472ca..34902c472ca 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_generic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_fp_ops_generic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_operations.hpp
index c04f55cd834..c04f55cd834 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_operations.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations_fwd.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_operations_fwd.hpp
index 399a8233515..399a8233515 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_operations_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_emulated.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_emulated.hpp
index c0e4832944d..c0e4832944d 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_emulated.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_emulated.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_arm.hpp
index e84f1771dac..e84f1771dac 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp
index dc4bbdbf744..dc4bbdbf744 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_x86.hpp
index ee2cd02a88d..ee2cd02a88d 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_gcc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_generic.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_generic.hpp
index 43842628a27..43842628a27 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_generic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_generic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_msvc_arm.hpp
index b8eb5bcb316..b8eb5bcb316 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_msvc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_msvc_x86.hpp
index 17451a83d61..17451a83d61 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/extra_ops_msvc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/float_sizes.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/float_sizes.hpp
index 4c3a346f15e..4c3a346f15e 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/float_sizes.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/float_sizes.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_operations.hpp
index 69cb0d19a2e..69cb0d19a2e 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_operations.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations_fwd.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_operations_fwd.hpp
index 8696de31cf6..8696de31cf6 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_operations_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_emulated.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_ops_emulated.hpp
index a87f1814b34..a87f1814b34 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_emulated.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_ops_emulated.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_generic.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_ops_generic.hpp
index b83e85a3593..b83e85a3593 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_generic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/fp_ops_generic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_arm.hpp
index 6d0c3386227..6d0c3386227 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp
index 2ec1e327a7f..2ec1e327a7f 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_x86.hpp
index 91a1aee3aae..91a1aee3aae 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/hwcaps_gcc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/int_sizes.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/int_sizes.hpp
index 2a9757c1472..2a9757c1472 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/int_sizes.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/int_sizes.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/integral_extend.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/integral_extend.hpp
index dea48ac6fe4..dea48ac6fe4 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/integral_extend.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/integral_extend.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/interlocked.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/interlocked.hpp
index 774354fb7f2..774354fb7f2 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/interlocked.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/interlocked.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/link.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/link.hpp
index 4f522acbcf9..4f522acbcf9 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/link.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/link.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/lockpool.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/lockpool.hpp
index 4e249aa048c..4e249aa048c 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/lockpool.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/lockpool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/operations.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/operations.hpp
index d81399a8e3f..d81399a8e3f 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/operations.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/operations.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/operations_fwd.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/operations_fwd.hpp
index efd49707477..efd49707477 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/operations_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/operations_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/operations_lockfree.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/operations_lockfree.hpp
index 62b45836b5f..62b45836b5f 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/operations_lockfree.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/operations_lockfree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_cas_based.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_cas_based.hpp
index e2e18aa3847..e2e18aa3847 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_cas_based.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_cas_based.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_emulated.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_emulated.hpp
index f30fbdab9f7..f30fbdab9f7 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_emulated.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_emulated.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_extending_cas_based.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_extending_cas_based.hpp
index 5f197cea48c..5f197cea48c 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_extending_cas_based.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_extending_cas_based.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_alpha.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_alpha.hpp
index 85b13429827..85b13429827 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_alpha.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_alpha.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_arm.hpp
index b32159536fb..b32159536fb 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm_common.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_arm_common.hpp
index 73c04ffe157..73c04ffe157 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_arm_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_atomic.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_atomic.hpp
index ce40e3b2b9d..ce40e3b2b9d 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_ppc.hpp
index a826736d17f..a826736d17f 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc_common.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_ppc_common.hpp
index e5c9303bf74..e5c9303bf74 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_ppc_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sparc.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_sparc.hpp
index 19b9b1fa872..19b9b1fa872 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sparc.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_sparc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sync.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_sync.hpp
index 1597de852a6..1597de852a6 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sync.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_sync.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_x86.hpp
index 007d4eeeebc..007d4eeeebc 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
index 4206bb39efc..4206bb39efc 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_linux_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_linux_arm.hpp
index 16af1732cf7..16af1732cf7 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_linux_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_linux_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_arm.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_arm.hpp
index 608c6fddf86..608c6fddf86 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_common.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_common.hpp
index 53628f36004..53628f36004 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_x86.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_x86.hpp
index 70b0ea994b1..70b0ea994b1 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_msvc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_windows.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_windows.hpp
index d4ce6d95e71..d4ce6d95e71 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/ops_windows.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/ops_windows.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/pause.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/pause.hpp
index 37aa5ca84ec..37aa5ca84ec 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/pause.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/pause.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/platform.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/platform.hpp
index df4cc305ac1..df4cc305ac1 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/platform.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/platform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/storage_type.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/storage_type.hpp
index 5d824d3a27e..5d824d3a27e 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/storage_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/storage_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/string_ops.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/string_ops.hpp
index ce145b98f23..ce145b98f23 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/string_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/string_ops.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/conditional.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/conditional.hpp
index 6b9e896729b..6b9e896729b 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/conditional.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/conditional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/integral_constant.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/integral_constant.hpp
index eac86491e05..eac86491e05 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/integral_constant.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/integral_constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_floating_point.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_floating_point.hpp
index c425112b8b5..c425112b8b5 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_floating_point.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_floating_point.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_function.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_function.hpp
index e7205356e45..e7205356e45 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_function.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_function.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_iec559.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_iec559.hpp
index 299c4f0f4f8..299c4f0f4f8 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_iec559.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_iec559.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_integral.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_integral.hpp
index ef3e2e347ef..ef3e2e347ef 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_integral.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_integral.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_signed.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_signed.hpp
index 2dc1df72678..2dc1df72678 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_signed.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_signed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp
index 5f88b88e428..5f88b88e428 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_signed.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/make_signed.hpp
index 82f61b33c07..82f61b33c07 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_signed.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/make_signed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_unsigned.hpp b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/make_unsigned.hpp
index 573a161694b..573a161694b 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_unsigned.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/detail/type_traits/make_unsigned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/atomic/fences.hpp b/src/third_party/boost-1.70.0/boost/atomic/fences.hpp
index 31e30405780..31e30405780 100644
--- a/src/third_party/boost-1.69.0/boost/atomic/fences.hpp
+++ b/src/third_party/boost-1.70.0/boost/atomic/fences.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind.hpp b/src/third_party/boost-1.70.0/boost/bind.hpp
index 450120c7a7a..450120c7a7a 100644
--- a/src/third_party/boost-1.69.0/boost/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/apply.hpp b/src/third_party/boost-1.70.0/boost/bind/apply.hpp
index 6a43a89ac85..6a43a89ac85 100644
--- a/src/third_party/boost-1.69.0/boost/bind/apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/arg.hpp b/src/third_party/boost-1.70.0/boost/bind/arg.hpp
index cb52e6689f7..cb52e6689f7 100644
--- a/src/third_party/boost-1.69.0/boost/bind/arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/bind.hpp b/src/third_party/boost-1.70.0/boost/bind/bind.hpp
index 4cedc5e9a4e..4cedc5e9a4e 100644
--- a/src/third_party/boost-1.69.0/boost/bind/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/bind_cc.hpp b/src/third_party/boost-1.70.0/boost/bind/bind_cc.hpp
index 278aa9a2a84..278aa9a2a84 100644
--- a/src/third_party/boost-1.69.0/boost/bind/bind_cc.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/bind_cc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/bind_mf2_cc.hpp b/src/third_party/boost-1.70.0/boost/bind/bind_mf2_cc.hpp
index 66476bc19d1..66476bc19d1 100644
--- a/src/third_party/boost-1.69.0/boost/bind/bind_mf2_cc.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/bind_mf2_cc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/bind_mf_cc.hpp b/src/third_party/boost-1.70.0/boost/bind/bind_mf_cc.hpp
index bbfd3719b64..bbfd3719b64 100644
--- a/src/third_party/boost-1.69.0/boost/bind/bind_mf_cc.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/bind_mf_cc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/bind_template.hpp b/src/third_party/boost-1.70.0/boost/bind/bind_template.hpp
index 411d20c74e9..411d20c74e9 100644
--- a/src/third_party/boost-1.69.0/boost/bind/bind_template.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/bind_template.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/make_adaptable.hpp b/src/third_party/boost-1.70.0/boost/bind/make_adaptable.hpp
index b9f083e307d..b9f083e307d 100644
--- a/src/third_party/boost-1.69.0/boost/bind/make_adaptable.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/make_adaptable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/mem_fn.hpp b/src/third_party/boost-1.70.0/boost/bind/mem_fn.hpp
index 956e7d88853..956e7d88853 100644
--- a/src/third_party/boost-1.69.0/boost/bind/mem_fn.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/mem_fn.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/mem_fn_cc.hpp b/src/third_party/boost-1.70.0/boost/bind/mem_fn_cc.hpp
index 8b6ea0ba13d..8b6ea0ba13d 100644
--- a/src/third_party/boost-1.69.0/boost/bind/mem_fn_cc.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/mem_fn_cc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/mem_fn_template.hpp b/src/third_party/boost-1.70.0/boost/bind/mem_fn_template.hpp
index b26d585dbc8..b26d585dbc8 100644
--- a/src/third_party/boost-1.69.0/boost/bind/mem_fn_template.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/mem_fn_template.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/mem_fn_vw.hpp b/src/third_party/boost-1.70.0/boost/bind/mem_fn_vw.hpp
index f3fc58db04e..f3fc58db04e 100644
--- a/src/third_party/boost-1.69.0/boost/bind/mem_fn_vw.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/mem_fn_vw.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/placeholders.hpp b/src/third_party/boost-1.70.0/boost/bind/placeholders.hpp
index b819ef4c46d..b819ef4c46d 100644
--- a/src/third_party/boost-1.69.0/boost/bind/placeholders.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/placeholders.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/protect.hpp b/src/third_party/boost-1.70.0/boost/bind/protect.hpp
index 749e158c349..749e158c349 100644
--- a/src/third_party/boost-1.69.0/boost/bind/protect.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/protect.hpp
diff --git a/src/third_party/boost-1.69.0/boost/bind/storage.hpp b/src/third_party/boost-1.70.0/boost/bind/storage.hpp
index be490b0f593..be490b0f593 100644
--- a/src/third_party/boost-1.69.0/boost/bind/storage.hpp
+++ b/src/third_party/boost-1.70.0/boost/bind/storage.hpp
diff --git a/src/third_party/boost-1.69.0/boost/call_traits.hpp b/src/third_party/boost-1.70.0/boost/call_traits.hpp
index 2c1328e94d7..2c1328e94d7 100644
--- a/src/third_party/boost-1.69.0/boost/call_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/call_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/cerrno.hpp b/src/third_party/boost-1.70.0/boost/cerrno.hpp
index 57278f5ceed..57278f5ceed 100644
--- a/src/third_party/boost-1.69.0/boost/cerrno.hpp
+++ b/src/third_party/boost-1.70.0/boost/cerrno.hpp
diff --git a/src/third_party/boost-1.69.0/boost/checked_delete.hpp b/src/third_party/boost-1.70.0/boost/checked_delete.hpp
index fb71c789c8d..fb71c789c8d 100644
--- a/src/third_party/boost-1.69.0/boost/checked_delete.hpp
+++ b/src/third_party/boost-1.70.0/boost/checked_delete.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono.hpp b/src/third_party/boost-1.70.0/boost/chrono.hpp
index a3a35229030..a3a35229030 100644
--- a/src/third_party/boost-1.69.0/boost/chrono.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/ceil.hpp b/src/third_party/boost-1.70.0/boost/chrono/ceil.hpp
index 7fbf9ddc29f..7fbf9ddc29f 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/ceil.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/ceil.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/chrono.hpp b/src/third_party/boost-1.70.0/boost/chrono/chrono.hpp
index ebc29d8d472..ebc29d8d472 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/chrono.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/chrono.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/chrono_io.hpp b/src/third_party/boost-1.70.0/boost/chrono/chrono_io.hpp
index ebd18a3dab6..ebd18a3dab6 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/chrono_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/chrono_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/clock_string.hpp b/src/third_party/boost-1.70.0/boost/chrono/clock_string.hpp
index af025f27e03..af025f27e03 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/clock_string.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/clock_string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/config.hpp b/src/third_party/boost-1.70.0/boost/chrono/config.hpp
index 1045ba3a796..1045ba3a796 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/chrono.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/chrono.hpp
index 3bad546d4c3..3bad546d4c3 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/chrono.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/chrono/detail/inlined/mac/chrono.hpp
index 9bf6c2bb12a..9bf6c2bb12a 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/chrono.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/chrono.hpp
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.70.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
index 29fe86ccfc8..29fe86ccfc8 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
index 74b820ace69..74b820ace69 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
diff --git a/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/chrono.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/chrono.hpp
new file mode 100644
index 00000000000..8baac39f39f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/chrono.hpp
@@ -0,0 +1,141 @@
+// 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>
+#include <boost/predef/os.h>
+
+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 BOOST_OS_CYGWIN
+ // lack of thread safety in high resolution timer initialization
+ // can lead to a timespec of zero without an error; was reported
+ // to the cygwin mailing list and can be removed once fixed
+ do
+ {
+#endif
+ if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+#if BOOST_OS_CYGWIN
+ } while (ts.tv_sec == 0 && ts.tv_nsec == 0);
+#endif
+ 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 BOOST_OS_CYGWIN
+ // lack of thread safety in high resolution timer initialization
+ // can lead to a timespec of zero without an error; was reported
+ // to the cygwin mailing list and can be removed once fixed
+ do
+ {
+#endif
+ 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_OS_CYGWIN
+ } while (ts.tv_sec == 0 && ts.tv_nsec == 0);
+#endif
+
+ 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.70.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
index f9a9e1293c8..f9a9e1293c8 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
index a2a2d9cf65d..a2a2d9cf65d 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp
index fad60361a3b..fad60361a3b 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/thread_clock.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/thread_clock.hpp
index e4f8317ec67..e4f8317ec67 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/thread_clock.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/chrono/detail/inlined/win/chrono.hpp
index 570dc02a15b..570dc02a15b 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/chrono.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/chrono.hpp
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.70.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
index a3a838a5cee..a3a838a5cee 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/thread_clock.hpp
index 776e5b4cd0c..776e5b4cd0c 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/inlined/win/thread_clock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/is_evenly_divisible_by.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/is_evenly_divisible_by.hpp
index 960a208a750..960a208a750 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/is_evenly_divisible_by.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/is_evenly_divisible_by.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
index 94936c8baf3..94936c8baf3 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/scan_keyword.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/scan_keyword.hpp
index aa4e2e87b9d..aa4e2e87b9d 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/scan_keyword.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/scan_keyword.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/static_assert.hpp b/src/third_party/boost-1.70.0/boost/chrono/detail/static_assert.hpp
index 86151947547..86151947547 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/static_assert.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/chrono/detail/system.hpp
index 3d82006a0b4..3d82006a0b4 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/detail/system.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/detail/system.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/duration.hpp b/src/third_party/boost-1.70.0/boost/chrono/duration.hpp
index 0a09674f1a8..0a09674f1a8 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/duration.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/duration.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/floor.hpp b/src/third_party/boost-1.70.0/boost/chrono/floor.hpp
index eb85fa7446c..eb85fa7446c 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/floor.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/floor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/include.hpp b/src/third_party/boost-1.70.0/boost/chrono/include.hpp
index b58f76bef81..b58f76bef81 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/include.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/include.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/duration_get.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/duration_get.hpp
index 081f071084b..081f071084b 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/duration_get.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/duration_get.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/duration_io.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/duration_io.hpp
index f3aca6adfd4..f3aca6adfd4 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/duration_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/duration_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/duration_put.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/duration_put.hpp
index 623eae1bf6b..623eae1bf6b 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/duration_put.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/duration_put.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/duration_style.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/duration_style.hpp
index 65b76a902ca..65b76a902ca 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/duration_style.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/duration_style.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/duration_units.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/duration_units.hpp
index 84faa819a91..84faa819a91 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/duration_units.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/duration_units.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/ios_base_state.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/ios_base_state.hpp
index 1393e2e699f..1393e2e699f 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/ios_base_state.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/ios_base_state.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_get.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/time_point_get.hpp
index 44c641e6da4..44c641e6da4 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_get.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/chrono/io/time_point_io.hpp
index d0f854cfbbe..d0f854cfbbe 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/time_point_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_put.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/time_point_put.hpp
index 9c8c7cadd01..9c8c7cadd01 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_put.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/time_point_put.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_units.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/time_point_units.hpp
index 6a4999a5e5c..6a4999a5e5c 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_units.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/time_point_units.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/timezone.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/timezone.hpp
index 67975da96fb..67975da96fb 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/timezone.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/timezone.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/utility/ios_base_state_ptr.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/utility/ios_base_state_ptr.hpp
index 15c8ac4d66e..15c8ac4d66e 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/utility/ios_base_state_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/utility/ios_base_state_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/utility/manip_base.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/utility/manip_base.hpp
index f4a5f562c44..f4a5f562c44 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/utility/manip_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/utility/manip_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/utility/to_string.hpp b/src/third_party/boost-1.70.0/boost/chrono/io/utility/to_string.hpp
index 4717ba6ad37..4717ba6ad37 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io/utility/to_string.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io/utility/to_string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io_v1/chrono_io.hpp b/src/third_party/boost-1.70.0/boost/chrono/io_v1/chrono_io.hpp
index afcc9ed7c93..afcc9ed7c93 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/io_v1/chrono_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/io_v1/chrono_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/process_cpu_clocks.hpp b/src/third_party/boost-1.70.0/boost/chrono/process_cpu_clocks.hpp
index 93d3c94ac80..93d3c94ac80 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/round.hpp b/src/third_party/boost-1.70.0/boost/chrono/round.hpp
index 09741fcf098..09741fcf098 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/round.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/round.hpp
diff --git a/src/third_party/boost-1.70.0/boost/chrono/system_clocks.hpp b/src/third_party/boost-1.70.0/boost/chrono/system_clocks.hpp
new file mode 100644
index 00000000000..3087311ffe2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/chrono/system_clocks.hpp
@@ -0,0 +1,233 @@
+// boost/chrono/system_clocks.hpp --------------------------------------------------------------//
+
+// Copyright 2008 Howard Hinnant
+// Copyright 2008 Beman Dawes
+// Copyright 2009-2011 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+/*
+
+This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
+Many thanks to Howard for making his code available under the Boost license.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
+
+time2_demo contained this comment:
+
+ Much thanks to Andrei Alexandrescu,
+ Walter Brown,
+ Peter Dimov,
+ Jeff Garland,
+ Terry Golubiewski,
+ Daniel Krugler,
+ Anthony Williams.
+*/
+
+/*
+
+TODO:
+
+ * Fully implement error handling, with test cases.
+ * Consider issues raised by Michael Marcin:
+
+ > In the past I've seen QueryPerformanceCounter give incorrect results,
+ > especially with SpeedStep processors on laptops. This was many years ago and
+ > might have been fixed by service packs and drivers.
+ >
+ > Typically you check the results of QPC against GetTickCount to see if the
+ > results are reasonable.
+ > http://support.microsoft.com/kb/274323
+ >
+ > I've also heard of problems with QueryPerformanceCounter in multi-processor
+ > systems.
+ >
+ > I know some people SetThreadAffinityMask to 1 for the current thread call
+ > their QueryPerformance* functions then restore SetThreadAffinityMask. This
+ > seems horrible to me because it forces your program to jump to another
+ > physical processor if it isn't already on cpu0 but they claim it worked well
+ > in practice because they called the timing functions infrequently.
+ >
+ > In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
+ > high resolution timers to avoid these issues.
+
+*/
+
+#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP
+#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/duration.hpp>
+#include <boost/chrono/time_point.hpp>
+#include <boost/chrono/detail/system.hpp>
+#include <boost/chrono/clock_string.hpp>
+
+#include <ctime>
+
+# if defined( BOOST_CHRONO_POSIX_API )
+# if ! defined(CLOCK_REALTIME) && ! defined (__hpux__)
+# error <time.h> does not supply CLOCK_REALTIME
+# endif
+# endif
+
+#ifdef BOOST_CHRONO_WINDOWS_API
+// The system_clock tick is 100 nanoseconds
+# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
+#else
+# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
+#endif
+
+// this must occur after all of the includes and before any code appears:
+#ifndef BOOST_CHRONO_HEADER_ONLY
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+#endif
+
+
+//----------------------------------------------------------------------------//
+// //
+// 20.9 Time utilities [time] //
+// synopsis //
+// //
+//----------------------------------------------------------------------------//
+
+namespace boost {
+namespace chrono {
+
+ // Clocks
+ class system_clock;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ class steady_clock;
+#endif
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires]
+#else
+ typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires]
+#endif
+
+//----------------------------------------------------------------------------//
+// //
+// 20.9.5 Clocks [time.clock] //
+// //
+//----------------------------------------------------------------------------//
+
+// If you're porting, clocks are the system-specific (non-portable) part.
+// You'll need to know how to get the current time and implement that under now().
+// You'll need to know what units (tick period) and representation makes the most
+// sense for your clock and set those accordingly.
+// If you know how to map this clock to time_t (perhaps your clock is std::time, which
+// makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t().
+
+//----------------------------------------------------------------------------//
+// 20.9.5.1 Class system_clock [time.clock.system] //
+//----------------------------------------------------------------------------//
+
+ class BOOST_CHRONO_DECL system_clock
+ {
+ public:
+ typedef BOOST_SYSTEM_CLOCK_DURATION duration;
+ typedef duration::rep rep;
+ typedef duration::period period;
+ typedef chrono::time_point<system_clock> time_point;
+ BOOST_STATIC_CONSTEXPR bool is_steady = false;
+
+ static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
+#endif
+
+ static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT;
+ static BOOST_CHRONO_INLINE time_point from_time_t(std::time_t t) BOOST_NOEXCEPT;
+ };
+
+//----------------------------------------------------------------------------//
+// 20.9.5.2 Class steady_clock [time.clock.steady] //
+//----------------------------------------------------------------------------//
+
+// As permitted by [time.clock.steady]
+// The class steady_clock is conditionally supported.
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ class BOOST_CHRONO_DECL steady_clock
+ {
+ public:
+ typedef nanoseconds duration;
+ typedef duration::rep rep;
+ typedef duration::period period;
+ typedef chrono::time_point<steady_clock> time_point;
+ BOOST_STATIC_CONSTEXPR bool is_steady = true;
+
+ static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
+#endif
+ };
+#endif
+//----------------------------------------------------------------------------//
+// 20.9.5.3 Class high_resolution_clock [time.clock.hires] //
+//----------------------------------------------------------------------------//
+
+// As permitted, steady_clock or system_clock is a typedef for high_resolution_clock.
+// See synopsis.
+
+
+ template<class CharT>
+ struct clock_string<system_clock, CharT>
+ {
+ static std::basic_string<CharT> name()
+ {
+ static const CharT u[] =
+ { 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
+ static const std::basic_string<CharT> str(u, u + sizeof(u)
+ / sizeof(u[0]));
+ return str;
+ }
+ static std::basic_string<CharT> since()
+ {
+ static const CharT
+ u[] =
+ { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' };
+ static const std::basic_string<CharT> str(u, u + sizeof(u)
+ / sizeof(u[0]));
+ return str;
+ }
+ };
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+
+ template<class CharT>
+ struct clock_string<steady_clock, CharT>
+ {
+ static std::basic_string<CharT> name()
+ {
+ static const CharT
+ u[] =
+ { 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' };
+ static const std::basic_string<CharT> str(u, u + sizeof(u)
+ / sizeof(u[0]));
+ return str;
+ }
+ static std::basic_string<CharT> since()
+ {
+ const CharT u[] =
+ { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' };
+ const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
+ return str;
+ }
+ };
+
+#endif
+
+} // namespace chrono
+} // namespace boost
+
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// the suffix header occurs after all of our code:
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#else
+#include <boost/chrono/detail/inlined/chrono.hpp>
+#endif
+
+#endif // BOOST_CHRONO_SYSTEM_CLOCKS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/chrono/thread_clock.hpp b/src/third_party/boost-1.70.0/boost/chrono/thread_clock.hpp
index 207697b4cc8..207697b4cc8 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/thread_clock.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/thread_clock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/time_point.hpp b/src/third_party/boost-1.70.0/boost/chrono/time_point.hpp
index fc230955d93..fc230955d93 100644
--- a/src/third_party/boost-1.69.0/boost/chrono/time_point.hpp
+++ b/src/third_party/boost-1.70.0/boost/chrono/time_point.hpp
diff --git a/src/third_party/boost-1.69.0/boost/compressed_pair.hpp b/src/third_party/boost-1.70.0/boost/compressed_pair.hpp
index a7be0f2ba2e..a7be0f2ba2e 100644
--- a/src/third_party/boost-1.69.0/boost/compressed_pair.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/concept/assert.hpp
index 36c3b03f330..36c3b03f330 100644
--- a/src/third_party/boost-1.69.0/boost/concept/assert.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/backward_compatibility.hpp b/src/third_party/boost-1.70.0/boost/concept/detail/backward_compatibility.hpp
index 66d573ef4bb..66d573ef4bb 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/backward_compatibility.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/detail/backward_compatibility.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/borland.hpp b/src/third_party/boost-1.70.0/boost/concept/detail/borland.hpp
index 300d5d40503..300d5d40503 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/borland.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/detail/borland.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/concept_def.hpp b/src/third_party/boost-1.70.0/boost/concept/detail/concept_def.hpp
index 750561ee301..750561ee301 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/concept_def.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/detail/concept_def.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/concept_undef.hpp b/src/third_party/boost-1.70.0/boost/concept/detail/concept_undef.hpp
index 713db89123b..713db89123b 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/concept_undef.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/concept/detail/general.hpp
index eeb08750f1c..eeb08750f1c 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/general.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/detail/general.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp b/src/third_party/boost-1.70.0/boost/concept/detail/has_constraints.hpp
index dc2c20714e5..dc2c20714e5 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/detail/has_constraints.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp b/src/third_party/boost-1.70.0/boost/concept/detail/msvc.hpp
index 933ac02a52d..933ac02a52d 100644
--- a/src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/detail/msvc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/requires.hpp b/src/third_party/boost-1.70.0/boost/concept/requires.hpp
index 365ce10045f..365ce10045f 100644
--- a/src/third_party/boost-1.69.0/boost/concept/requires.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/concept/usage.hpp
index 373de63a9d5..373de63a9d5 100644
--- a/src/third_party/boost-1.69.0/boost/concept/usage.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept/usage.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept_archetype.hpp b/src/third_party/boost-1.70.0/boost/concept_archetype.hpp
index a9d1808f301..a9d1808f301 100644
--- a/src/third_party/boost-1.69.0/boost/concept_archetype.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept_archetype.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept_check.hpp b/src/third_party/boost-1.70.0/boost/concept_check.hpp
index abbadb76be4..abbadb76be4 100644
--- a/src/third_party/boost-1.69.0/boost/concept_check.hpp
+++ b/src/third_party/boost-1.70.0/boost/concept_check.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config.hpp b/src/third_party/boost-1.70.0/boost/config.hpp
index f00a9805790..f00a9805790 100644
--- a/src/third_party/boost-1.69.0/boost/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/abi/borland_prefix.hpp b/src/third_party/boost-1.70.0/boost/config/abi/borland_prefix.hpp
index 3a0e5ae2d77..3a0e5ae2d77 100644
--- a/src/third_party/boost-1.69.0/boost/config/abi/borland_prefix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/abi/borland_prefix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/abi/borland_suffix.hpp b/src/third_party/boost-1.70.0/boost/config/abi/borland_suffix.hpp
index 940535f3819..940535f3819 100644
--- a/src/third_party/boost-1.69.0/boost/config/abi/borland_suffix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/abi/borland_suffix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/abi/msvc_prefix.hpp b/src/third_party/boost-1.70.0/boost/config/abi/msvc_prefix.hpp
index 97f06cdc0c2..97f06cdc0c2 100644
--- a/src/third_party/boost-1.69.0/boost/config/abi/msvc_prefix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/abi/msvc_prefix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/abi/msvc_suffix.hpp b/src/third_party/boost-1.70.0/boost/config/abi/msvc_suffix.hpp
index a64d783eb0f..a64d783eb0f 100644
--- a/src/third_party/boost-1.69.0/boost/config/abi/msvc_suffix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/abi/msvc_suffix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/abi_prefix.hpp b/src/third_party/boost-1.70.0/boost/config/abi_prefix.hpp
index 3b1347492ca..3b1347492ca 100644
--- a/src/third_party/boost-1.69.0/boost/config/abi_prefix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/abi_prefix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/abi_suffix.hpp b/src/third_party/boost-1.70.0/boost/config/abi_suffix.hpp
index 939161662ae..939161662ae 100644
--- a/src/third_party/boost-1.69.0/boost/config/abi_suffix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/abi_suffix.hpp
diff --git a/src/third_party/boost-1.70.0/boost/config/auto_link.hpp b/src/third_party/boost-1.70.0/boost/config/auto_link.hpp
new file mode 100644
index 00000000000..d0079d9bc27
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/config/auto_link.hpp
@@ -0,0 +1,479 @@
+// (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) && (BOOST_MSVC < 1920)
+
+ // vc14.1:
+# define BOOST_LIB_TOOLSET "vc141"
+
+# elif defined(BOOST_MSVC)
+
+ // vc14.2:
+# define BOOST_LIB_TOOLSET "vc142"
+
+# 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 BOOST_LIB_ARCH_AND_MODEL_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 BOOST_LIB_ARCH_AND_MODEL_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.70.0/boost/config/compiler/borland.hpp
index beec94621f3..beec94621f3 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/borland.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/borland.hpp
diff --git a/src/third_party/boost-1.70.0/boost/config/compiler/clang.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/clang.hpp
new file mode 100644
index 00000000000..52b23d9d020
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/clang.hpp
@@ -0,0 +1,348 @@
+// (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
+
+#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
+#if (__clang_major__ >= 4) && defined(__has_include)
+#if __has_include(<quadmath.h>)
+# define BOOST_HAS_FLOAT128
+#endif
+#endif
+#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.70.0/boost/config/compiler/codegear.hpp
index 52531d2f08c..52531d2f08c 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/codegear.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/codegear.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/comeau.hpp
index ca80fac37a2..ca80fac37a2 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/comeau.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/common_edg.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/common_edg.hpp
index 88aba9ac8f4..88aba9ac8f4 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/common_edg.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/common_edg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/compaq_cxx.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/compaq_cxx.hpp
index 4d6b8ab3ac7..4d6b8ab3ac7 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/compaq_cxx.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/compaq_cxx.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/cray.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/cray.hpp
index 412ef9efa5a..412ef9efa5a 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/cray.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/cray.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/diab.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/diab.hpp
index 943db83fd6e..943db83fd6e 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/diab.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/config/compiler/digitalmars.hpp
index 1466373191a..1466373191a 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/digitalmars.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/digitalmars.hpp
diff --git a/src/third_party/boost-1.70.0/boost/config/compiler/gcc.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/gcc.hpp
new file mode 100644
index 00000000000..9ae6072ee0e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/gcc.hpp
@@ -0,0 +1,361 @@
+// (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_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)
+// Note that while constexpr is partly supported in gcc-4.6 it's a
+// pre-std version with several bugs:
+# define BOOST_NO_CXX11_CONSTEXPR
+# 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.69.0/boost/config/compiler/gcc_xml.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/gcc_xml.hpp
index bdba4ed092b..bdba4ed092b 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/gcc_xml.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/config/compiler/greenhills.hpp
index 39112c2c1cf..39112c2c1cf 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/greenhills.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/greenhills.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/hp_acc.hpp
index 49d676fa2b2..49d676fa2b2 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/hp_acc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/intel.hpp
index f56807dbbcb..f56807dbbcb 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/intel.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/kai.hpp
index 0b22ec1d6c5..0b22ec1d6c5 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/kai.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/metrowerks.hpp
index 0e18e1809e7..0e18e1809e7 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/metrowerks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/mpw.hpp
index 05c066efbc5..05c066efbc5 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/mpw.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/nvcc.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/nvcc.hpp
index ed035fcf73e..ed035fcf73e 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/nvcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/nvcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/pathscale.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/pathscale.hpp
index 1318d275ade..1318d275ade 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/pathscale.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/pathscale.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/pgi.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/pgi.hpp
index 4e909d8a17e..4e909d8a17e 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/pgi.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/pgi.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/sgi_mipspro.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/sgi_mipspro.hpp
index 54433c99789..54433c99789 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/sgi_mipspro.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/sgi_mipspro.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/sunpro_cc.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/sunpro_cc.hpp
index 41b7bcade6e..41b7bcade6e 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/sunpro_cc.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/config/compiler/vacpp.hpp
index 8e264499681..8e264499681 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/vacpp.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/vacpp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/visualc.hpp
index 29642473cd1..29642473cd1 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/visualc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/xlcpp.hpp
index ee7aa1253ad..ee7aa1253ad 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/xlcpp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp_zos.hpp b/src/third_party/boost-1.70.0/boost/config/compiler/xlcpp_zos.hpp
index eb1bf2e9923..eb1bf2e9923 100644
--- a/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp_zos.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/compiler/xlcpp_zos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/detail/posix_features.hpp b/src/third_party/boost-1.70.0/boost/config/detail/posix_features.hpp
index d12954797f9..d12954797f9 100644
--- a/src/third_party/boost-1.69.0/boost/config/detail/posix_features.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/config/detail/select_compiler_config.hpp
index 8970dffb4f3..8970dffb4f3 100644
--- a/src/third_party/boost-1.69.0/boost/config/detail/select_compiler_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/detail/select_compiler_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/detail/select_platform_config.hpp b/src/third_party/boost-1.70.0/boost/config/detail/select_platform_config.hpp
index b36eca57a24..b36eca57a24 100644
--- a/src/third_party/boost-1.69.0/boost/config/detail/select_platform_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/detail/select_platform_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/detail/select_stdlib_config.hpp b/src/third_party/boost-1.70.0/boost/config/detail/select_stdlib_config.hpp
index 8db778c86ba..8db778c86ba 100644
--- a/src/third_party/boost-1.69.0/boost/config/detail/select_stdlib_config.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/config/detail/suffix.hpp
index cee9647b6bf..cee9647b6bf 100644
--- a/src/third_party/boost-1.69.0/boost/config/detail/suffix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/detail/suffix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/header_deprecated.hpp b/src/third_party/boost-1.70.0/boost/config/header_deprecated.hpp
index 864554f2a26..864554f2a26 100644
--- a/src/third_party/boost-1.69.0/boost/config/header_deprecated.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/header_deprecated.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/helper_macros.hpp b/src/third_party/boost-1.70.0/boost/config/helper_macros.hpp
index 3e79526df65..3e79526df65 100644
--- a/src/third_party/boost-1.69.0/boost/config/helper_macros.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/helper_macros.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/no_tr1/cmath.hpp b/src/third_party/boost-1.70.0/boost/config/no_tr1/cmath.hpp
index d8268d842a7..d8268d842a7 100644
--- a/src/third_party/boost-1.69.0/boost/config/no_tr1/cmath.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/no_tr1/cmath.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/no_tr1/complex.hpp b/src/third_party/boost-1.70.0/boost/config/no_tr1/complex.hpp
index ca200922b3c..ca200922b3c 100644
--- a/src/third_party/boost-1.69.0/boost/config/no_tr1/complex.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/no_tr1/complex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/no_tr1/functional.hpp b/src/third_party/boost-1.70.0/boost/config/no_tr1/functional.hpp
index e395efc1977..e395efc1977 100644
--- a/src/third_party/boost-1.69.0/boost/config/no_tr1/functional.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/no_tr1/functional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/no_tr1/memory.hpp b/src/third_party/boost-1.70.0/boost/config/no_tr1/memory.hpp
index 2b5d2080272..2b5d2080272 100644
--- a/src/third_party/boost-1.69.0/boost/config/no_tr1/memory.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/no_tr1/memory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/no_tr1/utility.hpp b/src/third_party/boost-1.70.0/boost/config/no_tr1/utility.hpp
index dea8f115bce..dea8f115bce 100644
--- a/src/third_party/boost-1.69.0/boost/config/no_tr1/utility.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/no_tr1/utility.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/aix.hpp b/src/third_party/boost-1.70.0/boost/config/platform/aix.hpp
index a48e2320618..a48e2320618 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/aix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/aix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/amigaos.hpp b/src/third_party/boost-1.70.0/boost/config/platform/amigaos.hpp
index 34bcf4128b7..34bcf4128b7 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/amigaos.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/amigaos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/beos.hpp b/src/third_party/boost-1.70.0/boost/config/platform/beos.hpp
index 6158c1c20be..6158c1c20be 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/beos.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/beos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/bsd.hpp b/src/third_party/boost-1.70.0/boost/config/platform/bsd.hpp
index 79e74a080a8..79e74a080a8 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/bsd.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/bsd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/cloudabi.hpp b/src/third_party/boost-1.70.0/boost/config/platform/cloudabi.hpp
index bed7b6318dc..bed7b6318dc 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/cloudabi.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/cloudabi.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/cray.hpp b/src/third_party/boost-1.70.0/boost/config/platform/cray.hpp
index 103e9c06204..103e9c06204 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/cray.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/cray.hpp
diff --git a/src/third_party/boost-1.70.0/boost/config/platform/cygwin.hpp b/src/third_party/boost-1.70.0/boost/config/platform/cygwin.hpp
new file mode 100644
index 00000000000..d0052d8b45f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/config/platform/cygwin.hpp
@@ -0,0 +1,71 @@
+// (C) Copyright John Maddock 2001 - 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.
+
+// cygwin specific config options:
+
+#define BOOST_PLATFORM "Cygwin"
+#define BOOST_HAS_DIRENT_H
+#define BOOST_HAS_LOG1P
+#define BOOST_HAS_EXPM1
+
+//
+// Threading API:
+// See if we have POSIX threads, if we do use them, otherwise
+// revert to native Win threads.
+#define BOOST_HAS_UNISTD_H
+#include <unistd.h>
+#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
+# define BOOST_HAS_PTHREADS
+# define BOOST_HAS_SCHED_YIELD
+# define BOOST_HAS_GETTIMEOFDAY
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+//# define BOOST_HAS_SIGACTION
+#else
+# if !defined(BOOST_HAS_WINTHREADS)
+# define BOOST_HAS_WINTHREADS
+# endif
+# define BOOST_HAS_FTIME
+#endif
+
+//
+// find out if we have a stdint.h, there should be a better way to do this:
+//
+#include <sys/types.h>
+#ifdef _STDINT_H
+#define BOOST_HAS_STDINT_H
+#endif
+#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H)
+# define BOOST_HAS_STDINT_H
+#endif
+
+#include <cygwin/version.h>
+#if (CYGWIN_VERSION_API_MAJOR == 0 && CYGWIN_VERSION_API_MINOR < 231)
+/// Cygwin has no fenv.h
+#define BOOST_NO_FENV_H
+#endif
+
+// Cygwin has it's own <pthread.h> which breaks <shared_mutex> unless the correct compiler flags are used:
+#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#include <pthread.h>
+#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112)
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+#endif
+
+// boilerplate code:
+#include <boost/config/detail/posix_features.hpp>
+
+//
+// Cygwin lies about XSI conformance, there is no nl_types.h:
+//
+#ifdef BOOST_HAS_NL_TYPES_H
+# undef BOOST_HAS_NL_TYPES_H
+#endif
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/haiku.hpp b/src/third_party/boost-1.70.0/boost/config/platform/haiku.hpp
index 04244c5677f..04244c5677f 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/haiku.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/haiku.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/hpux.hpp b/src/third_party/boost-1.70.0/boost/config/platform/hpux.hpp
index 222622e7ee5..222622e7ee5 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/hpux.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/hpux.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/irix.hpp b/src/third_party/boost-1.70.0/boost/config/platform/irix.hpp
index 0acb651552e..0acb651552e 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/irix.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/irix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/linux.hpp b/src/third_party/boost-1.70.0/boost/config/platform/linux.hpp
index c4eef8f80cb..c4eef8f80cb 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/linux.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/linux.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/macos.hpp b/src/third_party/boost-1.70.0/boost/config/platform/macos.hpp
index ed7dc15f282..ed7dc15f282 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/macos.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/macos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/qnxnto.hpp b/src/third_party/boost-1.70.0/boost/config/platform/qnxnto.hpp
index d0298cb4ecb..d0298cb4ecb 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/qnxnto.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/qnxnto.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/solaris.hpp b/src/third_party/boost-1.70.0/boost/config/platform/solaris.hpp
index 51ffe67f331..51ffe67f331 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/solaris.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/solaris.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/symbian.hpp b/src/third_party/boost-1.70.0/boost/config/platform/symbian.hpp
index f814d00b5b7..f814d00b5b7 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/symbian.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/symbian.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/vms.hpp b/src/third_party/boost-1.70.0/boost/config/platform/vms.hpp
index f70efcfb8ef..f70efcfb8ef 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/vms.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/vms.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/vxworks.hpp b/src/third_party/boost-1.70.0/boost/config/platform/vxworks.hpp
index a91e4ab439d..a91e4ab439d 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/vxworks.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/vxworks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/win32.hpp b/src/third_party/boost-1.70.0/boost/config/platform/win32.hpp
index 450158fbaab..450158fbaab 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/win32.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/win32.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/platform/zos.hpp b/src/third_party/boost-1.70.0/boost/config/platform/zos.hpp
index fa77999edc7..fa77999edc7 100644
--- a/src/third_party/boost-1.69.0/boost/config/platform/zos.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/platform/zos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/pragma_message.hpp b/src/third_party/boost-1.70.0/boost/config/pragma_message.hpp
index b2c5ff2e868..b2c5ff2e868 100644
--- a/src/third_party/boost-1.69.0/boost/config/pragma_message.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/pragma_message.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/requires_threads.hpp b/src/third_party/boost-1.70.0/boost/config/requires_threads.hpp
index cfaff23027c..cfaff23027c 100644
--- a/src/third_party/boost-1.69.0/boost/config/requires_threads.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/requires_threads.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/dinkumware.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/dinkumware.hpp
index e829f08e511..e829f08e511 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/dinkumware.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/dinkumware.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/libcomo.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/libcomo.hpp
index 75ac2bb76a2..75ac2bb76a2 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/libcomo.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/config/stdlib/libcpp.hpp
index ffe2f2a0f59..ffe2f2a0f59 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/libcpp.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/libstdcpp3.hpp
index 38209ddd453..38209ddd453 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/libstdcpp3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/modena.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/modena.hpp
index 81919e01801..81919e01801 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/modena.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/modena.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/msl.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/msl.hpp
index 0e2e2afee8b..0e2e2afee8b 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/msl.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/msl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/roguewave.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/roguewave.hpp
index df6021551a3..df6021551a3 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/roguewave.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/roguewave.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/sgi.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/sgi.hpp
index 0c8ab2e4c10..0c8ab2e4c10 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/sgi.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/sgi.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/stlport.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/stlport.hpp
index 2e304e2b945..2e304e2b945 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/stlport.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/stlport.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/vacpp.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/vacpp.hpp
index c4e1fb1847e..c4e1fb1847e 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/vacpp.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/vacpp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/xlcpp_zos.hpp b/src/third_party/boost-1.70.0/boost/config/stdlib/xlcpp_zos.hpp
index 4d5beb18552..4d5beb18552 100644
--- a/src/third_party/boost-1.69.0/boost/config/stdlib/xlcpp_zos.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/xlcpp_zos.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/user.hpp b/src/third_party/boost-1.70.0/boost/config/user.hpp
index 28e7476afd3..28e7476afd3 100644
--- a/src/third_party/boost-1.69.0/boost/config/user.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/user.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/warning_disable.hpp b/src/third_party/boost-1.70.0/boost/config/warning_disable.hpp
index fea8e829f14..fea8e829f14 100644
--- a/src/third_party/boost-1.69.0/boost/config/warning_disable.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/warning_disable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/workaround.hpp b/src/third_party/boost-1.70.0/boost/config/workaround.hpp
index fca8f3ab7e5..fca8f3ab7e5 100644
--- a/src/third_party/boost-1.69.0/boost/config/workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/config/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/adaptive_pool.hpp b/src/third_party/boost-1.70.0/boost/container/adaptive_pool.hpp
index d1d77bcade9..d1d77bcade9 100644
--- a/src/third_party/boost-1.69.0/boost/container/adaptive_pool.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/adaptive_pool.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/allocator.hpp b/src/third_party/boost-1.70.0/boost/container/allocator.hpp
new file mode 100644
index 00000000000..aef620ce597
--- /dev/null
+++ b/src/third_party/boost-1.70.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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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.70.0/boost/container/allocator_traits.hpp b/src/third_party/boost-1.70.0/boost/container/allocator_traits.hpp
new file mode 100644
index 00000000000..8cfb0378bc8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/allocator_traits.hpp
@@ -0,0 +1,493 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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 T, class VoidAllocator>
+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<T, 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)
+};
+
+#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+template<class T, class AllocatorOrVoid>
+struct real_allocator
+{
+ typedef AllocatorOrVoid type;
+};
+
+template<class T>
+struct real_allocator<T, void>
+{
+ typedef new_allocator<T> type;
+};
+
+#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.70.0/boost/container/container_fwd.hpp b/src/third_party/boost-1.70.0/boost/container/container_fwd.hpp
new file mode 100644
index 00000000000..b7591cd2563
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/container_fwd.hpp
@@ -0,0 +1,290 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-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_CONTAINER_FWD_HPP
+#define BOOST_CONTAINER_CONTAINER_FWD_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+//! \file
+//! This header file forward declares the following containers:
+//! - boost::container::vector
+//! - boost::container::stable_vector
+//! - boost::container::static_vector
+//! - boost::container::small_vector
+//! - boost::container::slist
+//! - boost::container::list
+//! - boost::container::set
+//! - boost::container::multiset
+//! - boost::container::map
+//! - boost::container::multimap
+//! - boost::container::flat_set
+//! - boost::container::flat_multiset
+//! - boost::container::flat_map
+//! - boost::container::flat_multimap
+//! - boost::container::basic_string
+//! - boost::container::string
+//! - boost::container::wstring
+//!
+//! Forward declares the following allocators:
+//! - boost::container::allocator
+//! - boost::container::node_allocator
+//! - boost::container::adaptive_pool
+//!
+//! Forward declares the following polymorphic resource classes:
+//! - boost::container::pmr::memory_resource
+//! - boost::container::pmr::polymorphic_allocator
+//! - boost::container::pmr::monotonic_buffer_resource
+//! - boost::container::pmr::pool_options
+//! - boost::container::pmr::unsynchronized_pool_resource
+//! - boost::container::pmr::synchronized_pool_resource
+//!
+//! And finally it defines the following types
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//Std forward declarations
+#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
+ #include <boost/container/detail/std_fwd.hpp>
+#endif
+
+namespace boost{
+namespace intrusive{
+namespace detail{
+ //Create namespace to avoid compilation errors
+}}}
+
+namespace boost{ namespace container{ namespace dtl{
+ namespace bi = boost::intrusive;
+ namespace bid = boost::intrusive::detail;
+}}}
+
+namespace boost{ namespace container{ namespace pmr{
+ namespace bi = boost::intrusive;
+ namespace bid = boost::intrusive::detail;
+}}}
+
+#include <cstddef>
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//////////////////////////////////////////////////////////////////////////////
+// Containers
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template<class T1, class T2>
+struct pair;
+
+template<class T>
+class new_allocator;
+
+template <class T
+ ,class Allocator = void
+ ,class Options = void>
+class vector;
+
+template <class T
+ ,class Allocator = void >
+class stable_vector;
+
+template <class T, std::size_t Capacity>
+class static_vector;
+
+template < class T, std::size_t N
+ , class Allocator = void >
+class small_vector;
+
+template <class T
+ ,class Allocator = void >
+class deque;
+
+template <class T
+ ,class Allocator = void >
+class list;
+
+template <class T
+ ,class Allocator = void >
+class slist;
+
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = void
+ ,class Options = void>
+class set;
+
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = void
+ ,class Options = void >
+class multiset;
+
+template <class Key
+ ,class T
+ ,class Compare = std::less<Key>
+ ,class Allocator = void
+ ,class Options = void >
+class map;
+
+template <class Key
+ ,class T
+ ,class Compare = std::less<Key>
+ ,class Allocator = void
+ ,class Options = void >
+class multimap;
+
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = void >
+class flat_set;
+
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = void >
+class flat_multiset;
+
+template <class Key
+ ,class T
+ ,class Compare = std::less<Key>
+ ,class Allocator = void >
+class flat_map;
+
+template <class Key
+ ,class T
+ ,class Compare = std::less<Key>
+ ,class Allocator = void >
+class flat_multimap;
+
+template <class CharT
+ ,class Traits = std::char_traits<CharT>
+ ,class Allocator = void >
+class basic_string;
+
+typedef basic_string <char> string;
+typedef basic_string<wchar_t> wstring;
+
+static const std::size_t ADP_nodes_per_block = 256u;
+static const std::size_t ADP_max_free_blocks = 2u;
+static const std::size_t ADP_overhead_percent = 1u;
+static const std::size_t ADP_only_alignment = 0u;
+
+template < class T
+ , std::size_t NodesPerBlock = ADP_nodes_per_block
+ , std::size_t MaxFreeBlocks = ADP_max_free_blocks
+ , std::size_t OverheadPercent = ADP_overhead_percent
+ , unsigned Version = 2
+ >
+class adaptive_pool;
+
+template < class T
+ , unsigned Version = 2
+ , unsigned int AllocationDisableMask = 0>
+class allocator;
+
+static const std::size_t NodeAlloc_nodes_per_block = 256u;
+
+template
+ < class T
+ , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block
+ , std::size_t Version = 2>
+class node_allocator;
+
+namespace pmr {
+
+class memory_resource;
+
+template<class T>
+class polymorphic_allocator;
+
+class monotonic_buffer_resource;
+
+struct pool_options;
+
+template <class Allocator>
+class resource_adaptor_imp;
+
+class unsynchronized_pool_resource;
+
+class synchronized_pool_resource;
+
+} //namespace pmr {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! Type used to tag that the input range is
+//! guaranteed to be ordered
+struct ordered_range_t
+{};
+
+//! Value used to tag that the input range is
+//! guaranteed to be ordered
+static const ordered_range_t ordered_range = ordered_range_t();
+
+//! Type used to tag that the input range is
+//! guaranteed to be ordered and unique
+struct ordered_unique_range_t
+ : public ordered_range_t
+{};
+
+//! Value used to tag that the input range is
+//! guaranteed to be ordered and unique
+static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
+
+//! Type used to tag that the inserted values
+//! should be default initialized
+struct default_init_t
+{};
+
+//! Value used to tag that the inserted values
+//! should be default initialized
+static const default_init_t default_init = default_init_t();
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! Type used to tag that the inserted values
+//! should be value initialized
+struct value_init_t
+{};
+
+//! Value used to tag that the inserted values
+//! should be value initialized
+static const value_init_t value_init = value_init_t();
+
+namespace container_detail_really_deep_namespace {
+
+//Otherwise, gcc issues a warning of previously defined
+//anonymous_instance and unique_instance
+struct dummy
+{
+ dummy()
+ {
+ (void)ordered_range;
+ (void)ordered_unique_range;
+ (void)default_init;
+ }
+};
+
+} //detail_really_deep_namespace {
+
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}} //namespace boost { namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
diff --git a/src/third_party/boost-1.70.0/boost/container/deque.hpp b/src/third_party/boost-1.70.0/boost/container/deque.hpp
new file mode 100644
index 00000000000..1fa3e5d5d4a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/deque.hpp
@@ -0,0 +1,2283 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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;
+
+ class nat;
+ typedef typename dtl::if_c< IsConst
+ , deque_iterator<Pointer, false>
+ , nat>::type nonconst_iterator;
+
+ BOOST_CONTAINER_FORCEINLINE 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:
+
+ BOOST_CONTAINER_FORCEINLINE Pointer get_cur() const { return m_cur; }
+ BOOST_CONTAINER_FORCEINLINE Pointer get_first() const { return m_first; }
+ BOOST_CONTAINER_FORCEINLINE Pointer get_last() const { return m_last; }
+ BOOST_CONTAINER_FORCEINLINE index_pointer get_node() const { return m_node; }
+
+ BOOST_CONTAINER_FORCEINLINE 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)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW
+ : m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator(const deque_iterator& 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())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator(const nonconst_iterator& 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)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator& operator=(const deque_iterator& 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(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE 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());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this->m_cur; }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { deque_iterator tmp(*this); return tmp += n; }
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this += -n; }
+
+ BOOST_CONTAINER_FORCEINLINE deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { deque_iterator tmp(*this); return tmp -= n; }
+
+ BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return *(*this + n); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_cur == r.m_cur; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_cur != r.m_cur; }
+
+ BOOST_CONTAINER_FORCEINLINE 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); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return r < l; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return !(r < l); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return !(l < r); }
+
+ BOOST_CONTAINER_FORCEINLINE 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();
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+
+ BOOST_CONTAINER_FORCEINLINE static size_type s_buffer_size() BOOST_NOEXCEPT_OR_NOTHROW
+ { return deque_buf_size<val_alloc_val>::value; }
+
+ BOOST_CONTAINER_FORCEINLINE val_alloc_ptr priv_allocate_node()
+ { return this->alloc().allocate(s_buffer_size()); }
+
+ BOOST_CONTAINER_FORCEINLINE void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->alloc().deallocate(p, s_buffer_size()); }
+
+ BOOST_CONTAINER_FORCEINLINE ptr_alloc_ptr priv_allocate_map(size_type n)
+ { return this->ptr_alloc().allocate(n); }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+
+ BOOST_CONTAINER_FORCEINLINE deque_base(size_type num_elements, const allocator_type& a)
+ : members_(a)
+ { this->priv_initialize_map(num_elements); }
+
+ BOOST_CONTAINER_FORCEINLINE explicit deque_base(const allocator_type& a)
+ : members_(a)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE deque_base()
+ : members_()
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE 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_;
+
+ BOOST_CONTAINER_FORCEINLINE ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+
+ BOOST_CONTAINER_FORCEINLINE const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+
+ BOOST_CONTAINER_FORCEINLINE allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+
+ BOOST_CONTAINER_FORCEINLINE 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<typename real_allocator<T, Allocator>::type>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ typedef deque_base<typename real_allocator<T, Allocator>::type> Base;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename real_allocator<T, Allocator>::type ValAllocator;
+
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef T value_type;
+ typedef ValAllocator allocator_type;
+ typedef typename ::boost::container::allocator_traits<ValAllocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<ValAllocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<ValAllocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<ValAllocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<ValAllocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<ValAllocator>::difference_type difference_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;
+ BOOST_CONTAINER_FORCEINLINE static size_type s_buffer_size()
+ { return Base::s_buffer_size(); }
+ typedef allocator_traits<ValAllocator> 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.
+ BOOST_CONTAINER_FORCEINLINE deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<ValAllocator>::value)
+ : Base()
+ {}
+
+ //! <b>Effects</b>: Constructs a deque taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n)
+ : Base(n, allocator_type())
+ {
+ dtl::insert_value_initialized_n_proxy<ValAllocator, 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
+ BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t)
+ : Base(n, allocator_type())
+ {
+ dtl::insert_default_initialized_n_proxy<ValAllocator, 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.
+ BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n, const allocator_type &a)
+ : Base(n, a)
+ {
+ dtl::insert_value_initialized_n_proxy<ValAllocator, 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
+ BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t, const allocator_type &a)
+ : Base(n, a)
+ {
+ dtl::insert_default_initialized_n_proxy<ValAllocator, 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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>
+ BOOST_CONTAINER_FORCEINLINE 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>
+ BOOST_CONTAINER_FORCEINLINE 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()).
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE ~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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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().
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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<ValAllocator, 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<ValAllocator, 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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<ValAllocator, 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<ValAllocator, 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<ValAllocator, 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\
+ <ValAllocator, 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\
+ <ValAllocator, 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\
+ <ValAllocator, 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.
+ BOOST_CONTAINER_FORCEINLINE 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()).
+ BOOST_CONTAINER_FORCEINLINE 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>
+ BOOST_CONTAINER_FORCEINLINE 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<ValAllocator, 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const deque& x, const deque& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE friend void swap(deque& x, deque& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ BOOST_CONTAINER_FORCEINLINE 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");
+ }
+
+ 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());
+ }
+
+ 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, ValAllocator>(::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, ValAllocator>(::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, ValAllocator>(::boost::forward<U>(x)));
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE T *priv_push_back_simple_pos() const
+ {
+ return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void priv_push_back_simple_commit()
+ {
+ ++this->members_.m_finish.m_cur;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool priv_push_front_simple_available() const
+ {
+ return this->members_.m_map &&
+ (this->members_.m_start.m_cur != this->members_.m_start.m_first);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE T *priv_push_front_simple_pos() const
+ { return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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.69.0/boost/container/detail/adaptive_node_pool.hpp b/src/third_party/boost-1.70.0/boost/container/detail/adaptive_node_pool.hpp
index d14e865d85b..d14e865d85b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/adaptive_node_pool_impl.hpp
index b2070921d97..b2070921d97 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/adaptive_node_pool_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/addressof.hpp b/src/third_party/boost-1.70.0/boost/container/detail/addressof.hpp
index b3b8a4dd6fa..b3b8a4dd6fa 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/addressof.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/advanced_insert_int.hpp
index 17ceb013fd0..17ceb013fd0 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/advanced_insert_int.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/advanced_insert_int.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/algorithm.hpp b/src/third_party/boost-1.70.0/boost/container/detail/algorithm.hpp
index 11844220e1c..11844220e1c 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/alloc_helpers.hpp b/src/third_party/boost-1.70.0/boost/container/detail/alloc_helpers.hpp
index 57c59e46c1b..57c59e46c1b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/alloc_helpers.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/alloc_helpers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/alloc_lib.h b/src/third_party/boost-1.70.0/boost/container/detail/alloc_lib.h
index 950ff722a52..950ff722a52 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/alloc_lib.h
+++ b/src/third_party/boost-1.70.0/boost/container/detail/alloc_lib.h
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/allocation_type.hpp b/src/third_party/boost-1.70.0/boost/container/detail/allocation_type.hpp
index 1e8aa673108..1e8aa673108 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/allocation_type.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/allocator_version_traits.hpp
index d037e0e3924..d037e0e3924 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/allocator_version_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/allocator_version_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/auto_link.hpp b/src/third_party/boost-1.70.0/boost/container/detail/auto_link.hpp
index 264b1ba1120..264b1ba1120 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/auto_link.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/auto_link.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/block_list.hpp b/src/third_party/boost-1.70.0/boost/container/detail/block_list.hpp
new file mode 100644
index 00000000000..0ed0e2279ad
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/block_list.hpp
@@ -0,0 +1,140 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_DETAIL_BLOCK_LIST_HEADER
+#define BOOST_CONTAINER_DETAIL_BLOCK_LIST_HEADER
+
+#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/pmr/memory_resource.hpp>
+#include <boost/container/throw_exception.hpp>
+#include <boost/intrusive/circular_list_algorithms.hpp>
+#include <boost/move/detail/type_traits.hpp>
+#include <boost/assert.hpp>
+#include <boost/container/detail/placement_new.hpp>
+
+#include <cstddef>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+struct list_node
+{
+ list_node *next;
+ list_node *previous;
+};
+
+struct list_node_traits
+{
+ typedef list_node node;
+ typedef list_node* node_ptr;
+ typedef const list_node* const_node_ptr;
+
+ static node_ptr get_next(const_node_ptr n)
+ { return n->next; }
+
+ static node_ptr get_previous(const_node_ptr n)
+ { return n->previous; }
+
+ static void set_next(const node_ptr & n, const node_ptr & next)
+ { n->next = next; }
+
+ static void set_previous(const node_ptr & n, const node_ptr & previous)
+ { n->previous = previous; }
+};
+
+struct block_list_header
+ : public list_node
+{
+ std::size_t size;
+};
+
+typedef bi::circular_list_algorithms<list_node_traits> list_algo;
+
+
+template<class DerivedFromBlockListHeader = block_list_header>
+class block_list_base
+{
+ list_node m_list;
+
+ static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
+
+ public:
+
+ static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockListHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
+
+ explicit block_list_base()
+ { list_algo::init_header(&m_list); }
+
+ #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ block_list_base(const block_list_base&) = delete;
+ block_list_base operator=(const block_list_base&) = delete;
+ #else
+ private:
+ block_list_base (const block_list_base&);
+ block_list_base operator=(const block_list_base&);
+ public:
+ #endif
+
+ ~block_list_base()
+ {}
+
+ void *allocate(std::size_t size, memory_resource &mr)
+ {
+ if((size_t(-1) - header_size) < size)
+ throw_bad_alloc();
+ void *p = mr.allocate(size+header_size);
+ block_list_header &mb = *::new((void*)p, boost_container_new_t()) DerivedFromBlockListHeader;
+ mb.size = size+header_size;
+ list_algo::link_after(&m_list, &mb);
+ return (char *)p + header_size;
+ }
+
+ void deallocate(void *p, memory_resource &mr) BOOST_NOEXCEPT
+ {
+ DerivedFromBlockListHeader *pheader = static_cast<DerivedFromBlockListHeader*>
+ (static_cast<void*>((char*)p - header_size));
+ list_algo::unlink(pheader);
+ const std::size_t size = pheader->size;
+ static_cast<DerivedFromBlockListHeader*>(pheader)->~DerivedFromBlockListHeader();
+ mr.deallocate(pheader, size, memory_resource::max_align);
+ }
+
+ void release(memory_resource &mr) BOOST_NOEXCEPT
+ {
+ list_node *n = list_algo::node_traits::get_next(&m_list);
+ while(n != &m_list){
+ DerivedFromBlockListHeader &d = static_cast<DerivedFromBlockListHeader&>(*n);
+ n = list_algo::node_traits::get_next(n);
+ std::size_t size = d.size;
+ d.~DerivedFromBlockListHeader();
+ mr.deallocate(reinterpret_cast<char*>(&d), size, memory_resource::max_align);
+ }
+ list_algo::init_header(&m_list);
+ }
+};
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_DETAIL_BLOCK_LIST_HEADER
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/block_slist.hpp b/src/third_party/boost-1.70.0/boost/container/detail/block_slist.hpp
new file mode 100644
index 00000000000..890e72588e7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/block_slist.hpp
@@ -0,0 +1,158 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_DETAIL_BLOCK_SLIST_HEADER
+#define BOOST_CONTAINER_DETAIL_BLOCK_SLIST_HEADER
+
+#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/pmr/memory_resource.hpp>
+#include <boost/container/throw_exception.hpp>
+#include <boost/container/detail/placement_new.hpp>
+
+#include <boost/move/detail/type_traits.hpp>
+#include <boost/intrusive/linear_slist_algorithms.hpp>
+#include <boost/assert.hpp>
+
+#include <cstddef>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+struct slist_node
+{
+ slist_node *next;
+};
+
+struct slist_node_traits
+{
+ typedef slist_node node;
+ typedef slist_node* node_ptr;
+ typedef const slist_node* const_node_ptr;
+
+ static node_ptr get_next(const_node_ptr n)
+ { return n->next; }
+
+ static void set_next(const node_ptr & n, const node_ptr & next)
+ { n->next = next; }
+};
+
+struct block_slist_header
+ : public slist_node
+{
+ std::size_t size;
+};
+
+typedef bi::linear_slist_algorithms<slist_node_traits> slist_algo;
+
+template<class DerivedFromBlockSlistHeader = block_slist_header>
+class block_slist_base
+{
+ slist_node m_slist;
+
+ static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
+
+ public:
+
+ static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockSlistHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
+
+ explicit block_slist_base()
+ { slist_algo::init_header(&m_slist); }
+
+ #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ block_slist_base(const block_slist_base&) = delete;
+ block_slist_base operator=(const block_slist_base&) = delete;
+ #else
+ private:
+ block_slist_base (const block_slist_base&);
+ block_slist_base operator=(const block_slist_base&);
+ public:
+ #endif
+
+ ~block_slist_base()
+ {}
+
+ void *allocate(std::size_t size, memory_resource &mr)
+ {
+ if((size_t(-1) - header_size) < size)
+ throw_bad_alloc();
+ void *p = mr.allocate(size+header_size);
+ block_slist_header &mb = *::new((void*)p, boost_container_new_t()) DerivedFromBlockSlistHeader;
+ mb.size = size+header_size;
+ slist_algo::link_after(&m_slist, &mb);
+ return (char *)p + header_size;
+ }
+
+ void release(memory_resource &mr) BOOST_NOEXCEPT
+ {
+ slist_node *n = slist_algo::node_traits::get_next(&m_slist);
+ while(n){
+ DerivedFromBlockSlistHeader &d = static_cast<DerivedFromBlockSlistHeader&>(*n);
+ n = slist_algo::node_traits::get_next(n);
+ std::size_t size = d.block_slist_header::size;
+ d.~DerivedFromBlockSlistHeader();
+ mr.deallocate(reinterpret_cast<char*>(&d), size, memory_resource::max_align);
+ }
+ slist_algo::init_header(&m_slist);
+ }
+};
+
+class block_slist
+ : public block_slist_base<>
+{
+ memory_resource &m_upstream_rsrc;
+
+ public:
+
+ explicit block_slist(memory_resource &upstream_rsrc)
+ : block_slist_base<>(), m_upstream_rsrc(upstream_rsrc)
+ {}
+
+ #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ block_slist(const block_slist&) = delete;
+ block_slist operator=(const block_slist&) = delete;
+ #else
+ private:
+ block_slist (const block_slist&);
+ block_slist operator=(const block_slist&);
+ public:
+ #endif
+
+ ~block_slist()
+ { this->release(); }
+
+ void *allocate(std::size_t size)
+ { return this->block_slist_base<>::allocate(size, m_upstream_rsrc); }
+
+ void release() BOOST_NOEXCEPT
+ { return this->block_slist_base<>::release(m_upstream_rsrc); }
+
+ memory_resource& upstream_resource() const BOOST_NOEXCEPT
+ { return m_upstream_rsrc; }
+};
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_DETAIL_BLOCK_SLIST_HEADER
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/compare_functors.hpp b/src/third_party/boost-1.70.0/boost/container/detail/compare_functors.hpp
new file mode 100644
index 00000000000..21f222bfa3e
--- /dev/null
+++ b/src/third_party/boost-1.70.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 ValueType>
+class equal_to_value
+{
+ typedef ValueType 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.69.0/boost/container/detail/config_begin.hpp b/src/third_party/boost-1.70.0/boost/container/detail/config_begin.hpp
index 4df9e35d8bc..4df9e35d8bc 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/config_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/config_end.hpp b/src/third_party/boost-1.70.0/boost/container/detail/config_end.hpp
index f93c8f6f79b..f93c8f6f79b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/config_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/config_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/construct_in_place.hpp b/src/third_party/boost-1.70.0/boost/container/detail/construct_in_place.hpp
index b131f06a862..b131f06a862 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/construct_in_place.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/construct_in_place.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/container_or_allocator_rebind.hpp b/src/third_party/boost-1.70.0/boost/container/detail/container_or_allocator_rebind.hpp
new file mode 100644
index 00000000000..1525e41d9d8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/container_or_allocator_rebind.hpp
@@ -0,0 +1,53 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2017-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/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
+#define BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/detail/container_rebind.hpp>
+#include <boost/container/detail/is_container.hpp>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
+struct container_or_allocator_rebind_impl
+ : container_rebind<AllocatorOrContainer, ToType>
+{};
+
+template<class AllocatorOrContainer, class ToType>
+struct container_or_allocator_rebind_impl<AllocatorOrContainer, ToType, false>
+ : allocator_traits<AllocatorOrContainer>::template portable_rebind_alloc<ToType>
+{};
+
+template<class ToType>
+struct container_or_allocator_rebind_impl<void, ToType, false>
+ : real_allocator<ToType, void>
+{};
+
+template<class AllocatorOrContainer, class ToType>
+struct container_or_allocator_rebind
+ : container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
+{};
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/container_rebind.hpp b/src/third_party/boost-1.70.0/boost/container/detail/container_rebind.hpp
index 0ebb4789e40..0ebb4789e40 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/container_rebind.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/copy_move_algo.hpp
index 29d47ccbda5..29d47ccbda5 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/copy_move_algo.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/copy_move_algo.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/destroyers.hpp b/src/third_party/boost-1.70.0/boost/container/detail/destroyers.hpp
index 9b0be44e66b..9b0be44e66b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/destroyers.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/destroyers.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/dispatch_uses_allocator.hpp b/src/third_party/boost-1.70.0/boost/container/detail/dispatch_uses_allocator.hpp
new file mode 100644
index 00000000000..ff88e273cc1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/dispatch_uses_allocator.hpp
@@ -0,0 +1,461 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_DISPATCH_USES_ALLOCATOR_HPP
+#define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_HPP
+
+#if defined (_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/uses_allocator.hpp>
+
+#include <boost/container/detail/addressof.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/pair.hpp>
+#include <boost/container/detail/type_traits.hpp>
+
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/utility_core.hpp>
+
+#include <boost/core/no_exceptions_support.hpp>
+
+namespace boost { namespace container {
+
+namespace dtl {
+
+
+// Check if we can detect is_convertible using advanced SFINAE expressions
+#if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ //! Code inspired by Mathias Gaunard's is_convertible.cpp found in the Boost mailing list
+ //! http://boost.2283326.n4.nabble.com/type-traits-is-constructible-when-decltype-is-supported-td3575452.html
+ //! Thanks Mathias!
+
+ //With variadic templates, we need a single class to implement the trait
+ template<class T, class ...Args>
+ struct is_constructible
+ {
+ typedef char yes_type;
+ struct no_type
+ { char padding[2]; };
+
+ template<std::size_t N>
+ struct dummy;
+
+ template<class X>
+ static decltype(X(boost::move_detail::declval<Args>()...), true_type()) test(int);
+
+ template<class X>
+ static no_type test(...);
+
+ static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
+ };
+
+ template <class T, class InnerAlloc, class ...Args>
+ struct is_constructible_with_allocator_prefix
+ : is_constructible<T, allocator_arg_t, InnerAlloc, Args...>
+ {};
+
+#else // #if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ //Without advanced SFINAE expressions, we can't use is_constructible
+ //so backup to constructible_with_allocator_xxx
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template <class T, class InnerAlloc, class ...Args>
+ struct is_constructible_with_allocator_prefix
+ : constructible_with_allocator_prefix<T>
+ {};
+
+ template <class T, class InnerAlloc, class ...Args>
+ struct is_constructible_with_allocator_suffix
+ : constructible_with_allocator_suffix<T>
+ {};
+
+ #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template <class T, class InnerAlloc, BOOST_MOVE_CLASSDFLT9>
+ struct is_constructible_with_allocator_prefix
+ : constructible_with_allocator_prefix<T>
+ {};
+
+ template <class T, class InnerAlloc, BOOST_MOVE_CLASSDFLT9>
+ struct is_constructible_with_allocator_suffix
+ : constructible_with_allocator_suffix<T>
+ {};
+
+ #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+#endif // #if !defined(BOOST_NO_SFINAE_EXPR)
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , typename T
+ , class ...Args
+ >
+inline typename dtl::enable_if_and
+ < void
+ , dtl::is_not_pair<T>
+ , dtl::not_< uses_allocator<T, ArgAlloc> >
+ >::type dispatch_uses_allocator
+ ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args)
+{
+ (void)arg_alloc;
+ allocator_traits<ConstructAlloc>::construct(construct_alloc, p, ::boost::forward<Args>(args)...);
+}
+
+// allocator_arg_t
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , typename T
+ , class ...Args
+ >
+inline typename dtl::enable_if_and
+ < void
+ , dtl::is_not_pair<T>
+ , uses_allocator<T, ArgAlloc>
+ , is_constructible_with_allocator_prefix<T, ArgAlloc, Args...>
+ >::type dispatch_uses_allocator
+ ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args) ...args)
+{
+ allocator_traits<ConstructAlloc>::construct
+ ( construct_alloc, p, allocator_arg
+ , ::boost::forward<ArgAlloc>(arg_alloc), ::boost::forward<Args>(args)...);
+}
+
+// allocator suffix
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , typename T
+ , class ...Args
+ >
+inline typename dtl::enable_if_and
+ < void
+ , dtl::is_not_pair<T>
+ , uses_allocator<T, ArgAlloc>
+ , dtl::not_<is_constructible_with_allocator_prefix<T, ArgAlloc, Args...> >
+ >::type dispatch_uses_allocator
+ ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args)
+{
+ allocator_traits<ConstructAlloc>::construct
+ (construct_alloc, p, ::boost::forward<Args>(args)..., ::boost::forward<ArgAlloc>(arg_alloc));
+}
+
+#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
+ template <typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ inline typename dtl::enable_if_and\
+ < void\
+ , dtl::is_not_pair<T>\
+ , dtl::not_<uses_allocator<T, ArgAlloc> >\
+ >::type\
+ dispatch_uses_allocator\
+ (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ (void)arg_alloc;\
+ allocator_traits<ConstructAlloc>::construct(construct_alloc, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ }\
+//
+BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE)
+#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE
+
+#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
+ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ inline typename dtl::enable_if_and\
+ < void\
+ , dtl::is_not_pair<T>\
+ , uses_allocator<T, ArgAlloc>\
+ , is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N>\
+ >::type\
+ dispatch_uses_allocator\
+ (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ allocator_traits<ConstructAlloc>::construct\
+ (construct_alloc, p, allocator_arg, ::boost::forward<ArgAlloc>(arg_alloc) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ }\
+//
+BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE)
+#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE
+
+#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
+ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ inline typename dtl::enable_if_and\
+ < void\
+ , dtl::is_not_pair<T>\
+ , uses_allocator<T, ArgAlloc>\
+ , dtl::not_<is_constructible_with_allocator_prefix<T, ArgAlloc BOOST_MOVE_I##N BOOST_MOVE_TARG##N> >\
+ >::type\
+ dispatch_uses_allocator\
+ (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ allocator_traits<ConstructAlloc>::construct\
+ (construct_alloc, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N, ::boost::forward<ArgAlloc>(arg_alloc));\
+ }\
+//
+BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE)
+#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE
+
+#endif //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , typename Pair
+ > inline
+BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> BOOST_MOVE_I void >::type)
+ dispatch_uses_allocator
+ ( ConstructAlloc & construct_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
+ , Pair* p)
+{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first));
+ BOOST_TRY{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second));
+ }
+ BOOST_CATCH(...) {
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+}
+
+
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , class Pair, class U, class V>
+BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> BOOST_MOVE_I void>::type)
+ dispatch_uses_allocator
+ ( ConstructAlloc & construct_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
+ , Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y)
+{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<U>(x));
+ BOOST_TRY{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<V>(y));
+ }
+ BOOST_CATCH(...){
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+}
+
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , class Pair, class Pair2>
+BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if< dtl::is_pair<Pair> BOOST_MOVE_I void >::type)
+ dispatch_uses_allocator
+ (ConstructAlloc & construct_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
+ , Pair* p, Pair2& x)
+{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, x.first, x.second); }
+
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , class Pair, class Pair2>
+typename dtl::enable_if_and
+ < void
+ , dtl::is_pair<Pair>
+ , dtl::not_<boost::move_detail::is_reference<Pair2> > >::type //This is needed for MSVC10 and ambiguous overloads
+ dispatch_uses_allocator
+ (ConstructAlloc & construct_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
+ , Pair* p, BOOST_RV_REF_BEG Pair2 BOOST_RV_REF_END x)
+{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, ::boost::move(x.first), ::boost::move(x.second)); }
+
+
+//piecewise construction from boost::tuple
+#define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\
+template< typename ConstructAlloc, typename ArgAlloc, class Pair \
+ , template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+typename dtl::enable_if< dtl::is_pair<Pair> BOOST_MOVE_I void>::type\
+ dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\
+ , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
+ , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q)\
+{\
+ (void)p; (void)q;\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+}\
+//
+BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
+#undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE
+
+//piecewise construction from Std Tuple
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair
+ , template<class ...> class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2>
+ void dispatch_uses_allocator_index( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair
+ , Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>)
+ {
+ (void)t1; (void)t2;
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(pair->first), ::boost::forward<Args1>(get<Indexes1>(t1))...);
+ BOOST_TRY{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(pair->second), ::boost::forward<Args2>(get<Indexes2>(t2))...);
+ }
+ BOOST_CATCH(...){
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair
+ , template<class ...> class Tuple, class... Args1, class... Args2>
+ typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
+ dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t
+ , Tuple<Args1...> t1, Tuple<Args2...> t2)
+ {
+ (dispatch_uses_allocator_index)( construct_alloc, arg_alloc, pair, t1, t2
+ , typename build_number_seq<sizeof...(Args1)>::type()
+ , typename build_number_seq<sizeof...(Args2)>::type());
+ }
+
+#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
+
+ //MSVC 2010 tuple implementation
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair\
+ , template<class, class, class, class, class, class, class, class, class, class> class StdTuple\
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ typename dtl::enable_if< dtl::is_pair<Pair> BOOST_MOVE_I void>::type\
+ dispatch_uses_allocator(ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
+ {\
+ (void)p; (void)q;\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
+ #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+
+#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
+ #if _VARIADIC_MAX >= 9
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9
+ #else
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1)
+ #endif
+
+ //MSVC 2012 tuple implementation
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair\
+ , template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ typename dtl::enable_if< dtl::is_pair<Pair> BOOST_MOVE_I void>::type\
+ dispatch_uses_allocator\
+ ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
+ {\
+ (void)p; (void)q;\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
+ #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+ #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT
+
+#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+template < typename ConstructAlloc
+ , typename ArgAlloc
+ , class Pair, class KeyType, class ... Args>
+typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
+ dispatch_uses_allocator
+ (ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args)
+{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));
+ BOOST_TRY{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<Args>(args)...);
+ }
+ BOOST_CATCH(...) {
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+}
+
+#else
+
+#define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE(N) \
+ template <typename ConstructAlloc, typename ArgAlloc, class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ inline typename dtl::enable_if\
+ < dtl::is_pair<Pair> BOOST_MOVE_I void >::type\
+ dispatch_uses_allocator\
+ (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, \
+ BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ }\
+//
+BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE)
+#undef BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE
+
+#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+} //namespace dtl
+
+}} // namespace boost { namespace container {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/dlmalloc.hpp b/src/third_party/boost-1.70.0/boost/container/detail/dlmalloc.hpp
index 15086c399fa..15086c399fa 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/dlmalloc.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/dlmalloc.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/flat_tree.hpp b/src/third_party/boost-1.70.0/boost/container/detail/flat_tree.hpp
new file mode 100644
index 00000000000..476a63aca03
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/flat_tree.hpp
@@ -0,0 +1,1632 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// (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, typename real_allocator<Value, AllocatorOrContainer>::type> 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_unique( 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_equal( 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.69.0/boost/container/detail/function_detector.hpp b/src/third_party/boost-1.70.0/boost/container/detail/function_detector.hpp
index 00caced5ba5..00caced5ba5 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/function_detector.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/function_detector.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/is_container.hpp b/src/third_party/boost-1.70.0/boost/container/detail/is_container.hpp
new file mode 100644
index 00000000000..7181c7f4af3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/is_container.hpp
@@ -0,0 +1,62 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2017-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/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
+#define BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+//empty
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME empty
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
+#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>
+
+//size
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME size
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
+#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>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+template <class Container>
+struct is_container
+{
+ static const bool value =
+ boost::container::is_container_detail::
+ has_member_function_callable_with_size <const Container>::value &&
+ boost::container::is_container_detail::
+ has_member_function_callable_with_empty<const Container>::value;
+};
+
+template <>
+struct is_container<void>
+{
+ static const bool value = false;
+};
+
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/is_contiguous_container.hpp b/src/third_party/boost-1.70.0/boost/container/detail/is_contiguous_container.hpp
index 528aeee133a..528aeee133a 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/is_contiguous_container.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/is_contiguous_container.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/is_sorted.hpp b/src/third_party/boost-1.70.0/boost/container/detail/is_sorted.hpp
index 315bab54d7b..315bab54d7b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/is_sorted.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/iterator.hpp
index 800cef3d92f..800cef3d92f 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/iterator_to_raw_pointer.hpp b/src/third_party/boost-1.70.0/boost/container/detail/iterator_to_raw_pointer.hpp
index 49f1d43babc..49f1d43babc 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/iterator_to_raw_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/iterator_to_raw_pointer.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/iterators.hpp b/src/third_party/boost-1.70.0/boost/container/detail/iterators.hpp
new file mode 100644
index 00000000000..4ac7d492a98
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/iterators.hpp
@@ -0,0 +1,891 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013.
+// (C) Copyright Gennaro Prota 2003 - 2004.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (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_ITERATORS_HPP
+#define BOOST_CONTAINER_DETAIL_ITERATORS_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>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/value_init.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/intrusive/detail/reverse_iterator.hpp>
+
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#else
+#include <boost/container/detail/variadic_templates_tools.hpp>
+#endif
+#include <boost/container/detail/iterator.hpp>
+
+namespace boost {
+namespace container {
+
+template <class T, class Difference = std::ptrdiff_t>
+class constant_iterator
+ : public ::boost::container::iterator
+ <std::random_access_iterator_tag, T, Difference, const T*, const T &>
+{
+ typedef constant_iterator<T, Difference> this_type;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE explicit constant_iterator(const T &ref, Difference range_size)
+ : m_ptr(&ref), m_num(range_size){}
+
+ //Constructors
+ BOOST_CONTAINER_FORCEINLINE constant_iterator()
+ : m_ptr(0), m_num(0){}
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator& operator++()
+ { increment(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator operator++(int)
+ {
+ constant_iterator result (*this);
+ increment();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator& operator--()
+ { decrement(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator operator--(int)
+ {
+ constant_iterator result (*this);
+ decrement();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const constant_iterator& i, const constant_iterator& i2)
+ { return i.equal(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const constant_iterator& i, const constant_iterator& i2)
+ { return !(i == i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator< (const constant_iterator& i, const constant_iterator& i2)
+ { return i.less(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator> (const constant_iterator& i, const constant_iterator& i2)
+ { return i2 < i; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const constant_iterator& i, const constant_iterator& i2)
+ { return !(i > i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const constant_iterator& i, const constant_iterator& i2)
+ { return !(i < i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend Difference operator- (const constant_iterator& i, const constant_iterator& i2)
+ { return i2.distance_to(i); }
+
+ //Arithmetic
+ BOOST_CONTAINER_FORCEINLINE constant_iterator& operator+=(Difference off)
+ { this->advance(off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator operator+(Difference off) const
+ {
+ constant_iterator other(*this);
+ other.advance(off);
+ return other;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend constant_iterator operator+(Difference off, const constant_iterator& right)
+ { return right + off; }
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator& operator-=(Difference off)
+ { this->advance(-off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE constant_iterator operator-(Difference off) const
+ { return *this + (-off); }
+
+ BOOST_CONTAINER_FORCEINLINE const T& operator*() const
+ { return dereference(); }
+
+ BOOST_CONTAINER_FORCEINLINE const T& operator[] (Difference ) const
+ { return dereference(); }
+
+ BOOST_CONTAINER_FORCEINLINE const T* operator->() const
+ { return &(dereference()); }
+
+ private:
+ const T * m_ptr;
+ Difference m_num;
+
+ BOOST_CONTAINER_FORCEINLINE void increment()
+ { --m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE void decrement()
+ { ++m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
+ { return m_num == other.m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
+ { return other.m_num < m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE const T & dereference() const
+ { return *m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE void advance(Difference n)
+ { m_num -= n; }
+
+ BOOST_CONTAINER_FORCEINLINE Difference distance_to(const this_type &other)const
+ { return m_num - other.m_num; }
+};
+
+template <class T, class Difference>
+class value_init_construct_iterator
+ : public ::boost::container::iterator
+ <std::random_access_iterator_tag, T, Difference, const T*, const T &>
+{
+ typedef value_init_construct_iterator<T, Difference> this_type;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE explicit value_init_construct_iterator(Difference range_size)
+ : m_num(range_size){}
+
+ //Constructors
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator()
+ : m_num(0){}
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator++()
+ { increment(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator++(int)
+ {
+ value_init_construct_iterator result (*this);
+ increment();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator--()
+ { decrement(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator--(int)
+ {
+ value_init_construct_iterator result (*this);
+ decrement();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return i.equal(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return !(i == i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return i.less(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return i2 < i; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return !(i > i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return !(i < i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend Difference operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
+ { return i2.distance_to(i); }
+
+ //Arithmetic
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator+=(Difference off)
+ { this->advance(off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator+(Difference off) const
+ {
+ value_init_construct_iterator other(*this);
+ other.advance(off);
+ return other;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend value_init_construct_iterator operator+(Difference off, const value_init_construct_iterator& right)
+ { return right + off; }
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator-=(Difference off)
+ { this->advance(-off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator-(Difference off) const
+ { return *this + (-off); }
+
+ //This pseudo-iterator's dereference operations have no sense since value is not
+ //constructed until ::boost::container::construct_in_place is called.
+ //So comment them to catch bad uses
+ //const T& operator*() const;
+ //const T& operator[](difference_type) const;
+ //const T* operator->() const;
+
+ private:
+ Difference m_num;
+
+ BOOST_CONTAINER_FORCEINLINE void increment()
+ { --m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE void decrement()
+ { ++m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
+ { return m_num == other.m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
+ { return other.m_num < m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE const T & dereference() const
+ {
+ static T dummy;
+ return dummy;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void advance(Difference n)
+ { m_num -= n; }
+
+ BOOST_CONTAINER_FORCEINLINE Difference distance_to(const this_type &other)const
+ { return m_num - other.m_num; }
+};
+
+template <class T, class Difference>
+class default_init_construct_iterator
+ : public ::boost::container::iterator
+ <std::random_access_iterator_tag, T, Difference, const T*, const T &>
+{
+ typedef default_init_construct_iterator<T, Difference> this_type;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE explicit default_init_construct_iterator(Difference range_size)
+ : m_num(range_size){}
+
+ //Constructors
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator()
+ : m_num(0){}
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator++()
+ { increment(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator++(int)
+ {
+ default_init_construct_iterator result (*this);
+ increment();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator--()
+ { decrement(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator--(int)
+ {
+ default_init_construct_iterator result (*this);
+ decrement();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return i.equal(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return !(i == i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return i.less(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return i2 < i; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return !(i > i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return !(i < i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend Difference operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
+ { return i2.distance_to(i); }
+
+ //Arithmetic
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator+=(Difference off)
+ { this->advance(off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator+(Difference off) const
+ {
+ default_init_construct_iterator other(*this);
+ other.advance(off);
+ return other;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend default_init_construct_iterator operator+(Difference off, const default_init_construct_iterator& right)
+ { return right + off; }
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator-=(Difference off)
+ { this->advance(-off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator-(Difference off) const
+ { return *this + (-off); }
+
+ //This pseudo-iterator's dereference operations have no sense since value is not
+ //constructed until ::boost::container::construct_in_place is called.
+ //So comment them to catch bad uses
+ //const T& operator*() const;
+ //const T& operator[](difference_type) const;
+ //const T* operator->() const;
+
+ private:
+ Difference m_num;
+
+ BOOST_CONTAINER_FORCEINLINE void increment()
+ { --m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE void decrement()
+ { ++m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
+ { return m_num == other.m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
+ { return other.m_num < m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE const T & dereference() const
+ {
+ static T dummy;
+ return dummy;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void advance(Difference n)
+ { m_num -= n; }
+
+ BOOST_CONTAINER_FORCEINLINE Difference distance_to(const this_type &other) const
+ { return m_num - other.m_num; }
+};
+
+
+template <class T, class Difference = std::ptrdiff_t>
+class repeat_iterator
+ : public ::boost::container::iterator
+ <std::random_access_iterator_tag, T, Difference, T*, T&>
+{
+ typedef repeat_iterator<T, Difference> this_type;
+ public:
+ BOOST_CONTAINER_FORCEINLINE explicit repeat_iterator(T &ref, Difference range_size)
+ : m_ptr(&ref), m_num(range_size){}
+
+ //Constructors
+ BOOST_CONTAINER_FORCEINLINE repeat_iterator()
+ : m_ptr(0), m_num(0){}
+
+ BOOST_CONTAINER_FORCEINLINE this_type& operator++()
+ { increment(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator++(int)
+ {
+ this_type result (*this);
+ increment();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE this_type& operator--()
+ { increment(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator--(int)
+ {
+ this_type result (*this);
+ increment();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2)
+ { return i.equal(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2)
+ { return !(i == i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2)
+ { return i.less(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2)
+ { return i2 < i; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2)
+ { return !(i > i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2)
+ { return !(i < i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend Difference operator- (const this_type& i, const this_type& i2)
+ { return i2.distance_to(i); }
+
+ //Arithmetic
+ BOOST_CONTAINER_FORCEINLINE this_type& operator+=(Difference off)
+ { this->advance(off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator+(Difference off) const
+ {
+ this_type other(*this);
+ other.advance(off);
+ return other;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend this_type operator+(Difference off, const this_type& right)
+ { return right + off; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type& operator-=(Difference off)
+ { this->advance(-off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator-(Difference off) const
+ { return *this + (-off); }
+
+ BOOST_CONTAINER_FORCEINLINE T& operator*() const
+ { return dereference(); }
+
+ BOOST_CONTAINER_FORCEINLINE T& operator[] (Difference ) const
+ { return dereference(); }
+
+ BOOST_CONTAINER_FORCEINLINE T *operator->() const
+ { return &(dereference()); }
+
+ private:
+ T * m_ptr;
+ Difference m_num;
+
+ BOOST_CONTAINER_FORCEINLINE void increment()
+ { --m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE void decrement()
+ { ++m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
+ { return m_num == other.m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
+ { return other.m_num < m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE T & dereference() const
+ { return *m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE void advance(Difference n)
+ { m_num -= n; }
+
+ BOOST_CONTAINER_FORCEINLINE Difference distance_to(const this_type &other)const
+ { return m_num - other.m_num; }
+};
+
+template <class T, class EmplaceFunctor, class Difference /*= std::ptrdiff_t*/>
+class emplace_iterator
+ : public ::boost::container::iterator
+ <std::random_access_iterator_tag, T, Difference, const T*, const T &>
+{
+ typedef emplace_iterator this_type;
+
+ public:
+ typedef Difference difference_type;
+ BOOST_CONTAINER_FORCEINLINE explicit emplace_iterator(EmplaceFunctor&e)
+ : m_num(1), m_pe(&e){}
+
+ BOOST_CONTAINER_FORCEINLINE emplace_iterator()
+ : m_num(0), m_pe(0){}
+
+ BOOST_CONTAINER_FORCEINLINE this_type& operator++()
+ { increment(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator++(int)
+ {
+ this_type result (*this);
+ increment();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE this_type& operator--()
+ { decrement(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator--(int)
+ {
+ this_type result (*this);
+ decrement();
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2)
+ { return i.equal(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2)
+ { return !(i == i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2)
+ { return i.less(i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2)
+ { return i2 < i; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2)
+ { return !(i > i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2)
+ { return !(i < i2); }
+
+ BOOST_CONTAINER_FORCEINLINE friend difference_type operator- (const this_type& i, const this_type& i2)
+ { return i2.distance_to(i); }
+
+ //Arithmetic
+ BOOST_CONTAINER_FORCEINLINE this_type& operator+=(difference_type off)
+ { this->advance(off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator+(difference_type off) const
+ {
+ this_type other(*this);
+ other.advance(off);
+ return other;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend this_type operator+(difference_type off, const this_type& right)
+ { return right + off; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type& operator-=(difference_type off)
+ { this->advance(-off); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE this_type operator-(difference_type off) const
+ { return *this + (-off); }
+
+ private:
+ //This pseudo-iterator's dereference operations have no sense since value is not
+ //constructed until ::boost::container::construct_in_place is called.
+ //So comment them to catch bad uses
+ const T& operator*() const;
+ const T& operator[](difference_type) const;
+ const T* operator->() const;
+
+ public:
+ template<class Allocator>
+ BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* ptr)
+ { (*m_pe)(a, ptr); }
+
+ template<class DestIt>
+ BOOST_CONTAINER_FORCEINLINE void assign_in_place(DestIt dest)
+ { (*m_pe)(dest); }
+
+ private:
+ difference_type m_num;
+ EmplaceFunctor * m_pe;
+
+ BOOST_CONTAINER_FORCEINLINE void increment()
+ { --m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE void decrement()
+ { ++m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
+ { return m_num == other.m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
+ { return other.m_num < m_num; }
+
+ BOOST_CONTAINER_FORCEINLINE const T & dereference() const
+ {
+ static T dummy;
+ return dummy;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void advance(difference_type n)
+ { m_num -= n; }
+
+ BOOST_CONTAINER_FORCEINLINE difference_type distance_to(const this_type &other)const
+ { return difference_type(m_num - other.m_num); }
+};
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+template<class ...Args>
+struct emplace_functor
+{
+ typedef typename dtl::build_number_seq<sizeof...(Args)>::type index_tuple_t;
+
+ BOOST_CONTAINER_FORCEINLINE emplace_functor(BOOST_FWD_REF(Args)... args)
+ : args_(args...)
+ {}
+
+ template<class Allocator, class T>
+ BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)
+ { emplace_functor::inplace_impl(a, ptr, index_tuple_t()); }
+
+ template<class DestIt>
+ BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)
+ { emplace_functor::inplace_impl(dest, index_tuple_t()); }
+
+ private:
+ template<class Allocator, class T, std::size_t ...IdxPack>
+ BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple<IdxPack...>&)
+ {
+ allocator_traits<Allocator>::construct
+ (a, ptr, ::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
+ }
+
+ template<class DestIt, std::size_t ...IdxPack>
+ BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const dtl::index_tuple<IdxPack...>&)
+ {
+ typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;
+ value_type && tmp= value_type(::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
+ *dest = ::boost::move(tmp);
+ }
+
+ dtl::tuple<Args&...> args_;
+};
+
+template<class ...Args>
+struct emplace_functor_type
+{
+ typedef emplace_functor<Args...> type;
+};
+
+#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+//Partial specializations cannot match argument list for primary template, so add an extra argument
+template <BOOST_MOVE_CLASSDFLT9, class Dummy = void>
+struct emplace_functor_type;
+
+#define BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE(N) \
+BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+struct emplace_functor##N\
+{\
+ BOOST_CONTAINER_FORCEINLINE explicit emplace_functor##N( BOOST_MOVE_UREF##N )\
+ BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N{}\
+ \
+ template<class Allocator, class T>\
+ BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)\
+ { allocator_traits<Allocator>::construct(a, ptr BOOST_MOVE_I##N BOOST_MOVE_MFWD##N); }\
+ \
+ template<class DestIt>\
+ BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)\
+ {\
+ typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;\
+ BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), dtl::value_init<value_type> tmp) ;\
+ *dest = ::boost::move(const_cast<value_type &>(BOOST_MOVE_IF(N, tmp, tmp.get())));\
+ }\
+ \
+ BOOST_MOVE_MREF##N\
+};\
+\
+template <BOOST_MOVE_CLASS##N>\
+struct emplace_functor_type<BOOST_MOVE_TARG##N>\
+{\
+ typedef emplace_functor##N BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N type;\
+};\
+//
+
+BOOST_MOVE_ITERATE_0TO9(BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE)
+
+#undef BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE
+
+#endif
+
+namespace dtl {
+
+template<class T>
+struct has_iterator_category
+{
+ struct two { char _[2]; };
+
+ template <typename X>
+ static char test(int, typename X::iterator_category*);
+
+ template <typename X>
+ static two test(int, ...);
+
+ static const bool value = (1 == sizeof(test<T>(0, 0)));
+};
+
+
+template<class T, bool = has_iterator_category<T>::value >
+struct is_input_iterator
+{
+ static const bool value = is_same<typename T::iterator_category, std::input_iterator_tag>::value;
+};
+
+template<class T>
+struct is_input_iterator<T, false>
+{
+ static const bool value = false;
+};
+
+template<class T>
+struct is_not_input_iterator
+{
+ static const bool value = !is_input_iterator<T>::value;
+};
+
+template<class T, bool = has_iterator_category<T>::value >
+struct is_forward_iterator
+{
+ static const bool value = is_same<typename T::iterator_category, std::forward_iterator_tag>::value;
+};
+
+template<class T>
+struct is_forward_iterator<T, false>
+{
+ static const bool value = false;
+};
+
+template<class T, bool = has_iterator_category<T>::value >
+struct is_bidirectional_iterator
+{
+ static const bool value = is_same<typename T::iterator_category, std::bidirectional_iterator_tag>::value;
+};
+
+template<class T>
+struct is_bidirectional_iterator<T, false>
+{
+ static const bool value = false;
+};
+
+template<class IINodeType>
+struct iiterator_node_value_type {
+ typedef typename IINodeType::value_type type;
+};
+
+template<class IIterator>
+struct iiterator_types
+{
+ typedef typename IIterator::value_type it_value_type;
+ typedef typename iiterator_node_value_type<it_value_type>::type value_type;
+ typedef typename boost::container::iterator_traits<IIterator>::pointer it_pointer;
+ typedef typename boost::container::iterator_traits<IIterator>::difference_type difference_type;
+ typedef typename ::boost::intrusive::pointer_traits<it_pointer>::
+ template rebind_pointer<value_type>::type pointer;
+ typedef typename ::boost::intrusive::pointer_traits<it_pointer>::
+ 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;
+ typedef typename IIterator::iterator_category iterator_category;
+};
+
+template<class IIterator, bool IsConst>
+struct iterator_types
+{
+ typedef typename ::boost::container::iterator
+ < typename iiterator_types<IIterator>::iterator_category
+ , typename iiterator_types<IIterator>::value_type
+ , typename iiterator_types<IIterator>::difference_type
+ , typename iiterator_types<IIterator>::const_pointer
+ , typename iiterator_types<IIterator>::const_reference> type;
+};
+
+template<class IIterator>
+struct iterator_types<IIterator, false>
+{
+ typedef typename ::boost::container::iterator
+ < typename iiterator_types<IIterator>::iterator_category
+ , typename iiterator_types<IIterator>::value_type
+ , typename iiterator_types<IIterator>::difference_type
+ , typename iiterator_types<IIterator>::pointer
+ , typename iiterator_types<IIterator>::reference> type;
+};
+
+template<class IIterator, bool IsConst>
+class iterator_from_iiterator
+{
+ typedef typename iterator_types<IIterator, IsConst>::type types_t;
+ class nat
+ {
+ public:
+ IIterator get() const
+ { return IIterator(); }
+ };
+ typedef typename dtl::if_c< IsConst
+ , iterator_from_iiterator<IIterator, false>
+ , nat>::type nonconst_iterator;
+
+ public:
+ typedef typename types_t::pointer pointer;
+ typedef typename types_t::reference reference;
+ typedef typename types_t::difference_type difference_type;
+ typedef typename types_t::iterator_category iterator_category;
+ typedef typename types_t::value_type value_type;
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator()
+ : m_iit()
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_iit(iit)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_iit(other.get())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_iit(other.get())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator=(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ { m_iit = other.get(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
+ { ++this->m_iit; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ iterator_from_iiterator result (*this);
+ ++this->m_iit;
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ //If the iterator_from_iiterator is not a bidirectional iterator, operator-- should not exist
+ BOOST_STATIC_ASSERT((is_bidirectional_iterator<iterator_from_iiterator>::value));
+ --this->m_iit; return *this;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ iterator_from_iiterator result (*this);
+ --this->m_iit;
+ return result;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_iit == r.m_iit; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return !(l == r); }
+
+ BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_iit->get_data(); }
+
+ BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return ::boost::intrusive::pointer_traits<pointer>::pointer_to(this->operator*()); }
+
+ BOOST_CONTAINER_FORCEINLINE const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_iit; }
+
+ private:
+ IIterator m_iit;
+};
+
+} //namespace dtl {
+
+using ::boost::intrusive::reverse_iterator;
+
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/math_functions.hpp b/src/third_party/boost-1.70.0/boost/container/detail/math_functions.hpp
index 8d350a141f1..8d350a141f1 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/math_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/math_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/min_max.hpp b/src/third_party/boost-1.70.0/boost/container/detail/min_max.hpp
index 35cf06617d1..35cf06617d1 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/min_max.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/min_max.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/minimal_char_traits_header.hpp b/src/third_party/boost-1.70.0/boost/container/detail/minimal_char_traits_header.hpp
index a92a31a2b41..a92a31a2b41 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/minimal_char_traits_header.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/mpl.hpp
index 4706c58022b..4706c58022b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/mpl.hpp
+++ b/src/third_party/boost-1.70.0/boost/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.70.0/boost/container/detail/multiallocation_chain.hpp
index c7d94f42a21..c7d94f42a21 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/multiallocation_chain.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/multiallocation_chain.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/mutex.hpp b/src/third_party/boost-1.70.0/boost/container/detail/mutex.hpp
index 56e72a81d05..56e72a81d05 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/next_capacity.hpp b/src/third_party/boost-1.70.0/boost/container/detail/next_capacity.hpp
index 7e6554ded06..7e6554ded06 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/next_capacity.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/node_alloc_holder.hpp
index a103e63c9a6..a103e63c9a6 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/node_alloc_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/node_alloc_holder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/node_pool.hpp b/src/third_party/boost-1.70.0/boost/container/detail/node_pool.hpp
index e43956b643f..e43956b643f 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/node_pool.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/node_pool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/node_pool_impl.hpp b/src/third_party/boost-1.70.0/boost/container/detail/node_pool_impl.hpp
index 97f555bc752..97f555bc752 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/node_pool_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/node_pool_impl.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/pair.hpp b/src/third_party/boost-1.70.0/boost/container/detail/pair.hpp
new file mode 100644
index 00000000000..feb1c7b94fb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/pair.hpp
@@ -0,0 +1,679 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_PAIR_HPP
+#define BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_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/static_assert.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/std_fwd.hpp>
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+# include <boost/container/detail/variadic_templates_tools.hpp>
+#endif
+#include <boost/move/adl_move_swap.hpp> //swap
+
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/move/utility_core.hpp>
+#include <boost/move/detail/fwd_macros.hpp>
+
+namespace boost {
+namespace tuples {
+
+struct null_type;
+
+template <
+ class T0, class T1, class T2,
+ class T3, class T4, class T5,
+ class T6, class T7, class T8,
+ class T9>
+class tuple;
+
+} //namespace tuples {
+} //namespace boost {
+
+namespace boost {
+namespace container {
+namespace pair_impl {
+
+template <class TupleClass>
+struct is_boost_tuple
+{
+ static const bool value = false;
+};
+
+template <
+ class T0, class T1, class T2,
+ class T3, class T4, class T5,
+ class T6, class T7, class T8,
+ class T9>
+struct is_boost_tuple< boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+{
+ static const bool value = true;
+};
+
+template<class Tuple>
+struct disable_if_boost_tuple
+ : boost::container::dtl::disable_if< is_boost_tuple<Tuple> >
+{};
+
+template<class T>
+struct is_tuple_null
+{
+ static const bool value = false;
+};
+
+template<>
+struct is_tuple_null<boost::tuples::null_type>
+{
+ static const bool value = true;
+};
+
+}}}
+
+#if defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
+//MSVC 2010 tuple marker
+namespace std { namespace tr1 { struct _Nil; }}
+#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
+//MSVC 2012 tuple marker
+namespace std { struct _Nil; }
+#endif
+
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ template <int Dummy = 0>
+ struct std_piecewise_construct_holder
+ {
+ static ::std::piecewise_construct_t *dummy;
+ };
+
+ template <int Dummy>
+ ::std::piecewise_construct_t *std_piecewise_construct_holder<Dummy>::dummy =
+ reinterpret_cast< ::std::piecewise_construct_t *>(0x01234); //Avoid sanitizer errors on references to null pointers
+
+typedef const std::piecewise_construct_t & piecewise_construct_t;
+
+struct try_emplace_t{};
+
+#else
+
+//! The piecewise_construct_t struct is an empty structure type used as a unique type to
+//! disambiguate used to disambiguate between different functions that take two tuple arguments.
+typedef unspecified piecewise_construct_t;
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A instance of type
+//! piecewise_construct_t
+static piecewise_construct_t piecewise_construct = BOOST_CONTAINER_DOC1ST(unspecified, *std_piecewise_construct_holder<>::dummy);
+
+///@cond
+
+namespace dtl {
+
+struct piecewise_construct_use
+{
+ //Avoid warnings of unused "piecewise_construct"
+ piecewise_construct_use()
+ { (void)&::boost::container::piecewise_construct; }
+};
+
+template <class T1, class T2>
+struct pair;
+
+template <class T>
+struct is_pair
+{
+ static const bool value = false;
+};
+
+template <class T1, class T2>
+struct is_pair< pair<T1, T2> >
+{
+ static const bool value = true;
+};
+
+template <class T1, class T2>
+struct is_pair< std::pair<T1, T2> >
+{
+ static const bool value = true;
+};
+
+template <class T>
+struct is_not_pair
+{
+ static const bool value = !is_pair<T>::value;
+};
+
+template <class T>
+struct is_std_pair
+{
+ static const bool value = false;
+};
+
+template <class T1, class T2>
+struct is_std_pair< std::pair<T1, T2> >
+{
+ static const bool value = true;
+};
+
+struct pair_nat;
+
+template<typename T, typename U, typename V>
+void get(T); //to enable ADL
+
+///@endcond
+
+#ifdef _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
+//Libc++, in some versions, has an ABI breakage that needs some
+//padding in dtl::pair, as "std::pair::first" is not at offset zero.
+//See: https://reviews.llvm.org/D56357 for more information.
+//
+template <class T1, class T2, std::size_t N>
+struct pair_padding
+{
+ char padding[N];
+};
+
+template <class T1, class T2>
+struct pair_padding<T1, T2, 0>
+{
+};
+
+template <class T1, class T2>
+struct simple_pair
+{
+ T1 first;
+ T2 second;
+};
+
+#endif
+
+template <class T1, class T2>
+struct pair
+#ifdef _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
+ : pair_padding<T1, T2, sizeof(std::pair<T1, T2>) - sizeof(simple_pair<T1, T2>)>
+#endif
+{
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(pair)
+
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+
+ T1 first;
+ T2 second;
+
+ //Default constructor
+ pair()
+ : first(), second()
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ //pair copy assignment
+ pair(const pair& x)
+ : first(x.first), second(x.second)
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ //pair move constructor
+ pair(BOOST_RV_REF(pair) p)
+ : first(::boost::move(p.first)), second(::boost::move(p.second))
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ template <class D, class S>
+ pair(const pair<D, S> &p)
+ : first(p.first), second(p.second)
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ template <class D, class S>
+ pair(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
+ : first(::boost::move(p.first)), second(::boost::move(p.second))
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ //pair from two values
+ pair(const T1 &t1, const T2 &t2)
+ : first(t1)
+ , second(t2)
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ template<class U, class V>
+ pair(BOOST_FWD_REF(U) u, BOOST_FWD_REF(V) v)
+ : first(::boost::forward<U>(u))
+ , second(::boost::forward<V>(v))
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ //And now compatibility with std::pair
+ pair(const std::pair<T1, T2>& x)
+ : first(x.first), second(x.second)
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ template <class D, class S>
+ pair(const std::pair<D, S>& p)
+ : first(p.first), second(p.second)
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ pair(BOOST_RV_REF_BEG std::pair<T1, T2> BOOST_RV_REF_END p)
+ : first(::boost::move(p.first)), second(::boost::move(p.second))
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ template <class D, class S>
+ pair(BOOST_RV_REF_BEG std::pair<D, S> BOOST_RV_REF_END p)
+ : first(::boost::move(p.first)), second(::boost::move(p.second))
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< class KeyType, class ...Args>
+ pair(try_emplace_t, BOOST_FWD_REF(KeyType) k, Args && ...args)
+ : first(boost::forward<KeyType>(k)), second(::boost::forward<Args>(args)...)\
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+ #else
+
+ //piecewise construction from boost::tuple
+ #define BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE(N)\
+ template< class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N > \
+ pair( try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\
+ : first(boost::forward<KeyType>(k)), second(BOOST_MOVE_FWD##N)\
+ {\
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE)
+ #undef BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE
+
+ #endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+ //piecewise construction from boost::tuple
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\
+ template< template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ pair( piecewise_construct_t\
+ , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
+ , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q\
+ , typename dtl::enable_if_c\
+ < pair_impl::is_boost_tuple< BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> >::value &&\
+ !(pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARG##N>::value || pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARGQ##M>::value) \
+ >::type* = 0\
+ )\
+ : first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\
+ { (void)p; (void)q;\
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE
+
+ //piecewise construction from variadic tuple (with delegating constructors)
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ # if !defined(BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS)
+ private:
+ template<template<class ...> class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2>
+ pair(Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>)
+ : first (::boost::forward<Args1>(get<Indexes1>(t1))...)
+ , second(::boost::forward<Args2>(get<Indexes2>(t2))...)
+ { (void) t1; (void)t2; }
+
+ public:
+ template< template<class ...> class Tuple, class... Args1, class... Args2
+ , class = typename pair_impl::disable_if_boost_tuple< Tuple<Args1...> >::type>
+ pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
+ : pair(t1, t2, typename build_number_seq<sizeof...(Args1)>::type(), typename build_number_seq<sizeof...(Args2)>::type())
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+ # else
+ //piecewise construction from variadic tuple (suboptimal, without delegating constructors)
+ private:
+ template<typename T, template<class ...> class Tuple, typename... Args>
+ static T build_from_args(Tuple<Args...>&& t)
+ { return do_build_from_args<T>(::boost::move(t), typename build_number_seq<sizeof...(Args)>::type()); }
+
+ template<typename T, template<class ...> class Tuple, typename... Args, std::size_t... Indexes>
+ static T do_build_from_args(Tuple<Args...> && t, const index_tuple<Indexes...>&)
+ { (void)t; return T(::boost::forward<Args>(get<Indexes>(t))...); }
+
+ public:
+ template< template<class ...> class Tuple, class... Args1, class... Args2
+ , class = typename pair_impl::disable_if_boost_tuple< Tuple<Args1...> >::type>
+ pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
+ : first (build_from_args<first_type> (::boost::move(t1)))
+ , second (build_from_args<second_type>(::boost::move(t2)))
+ {
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
+ }
+ # endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
+ //MSVC 2010 tuple implementation
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\
+ template< template<class, class, class, class, class, class, class, class, class, class> class StdTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ pair( piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
+ : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
+ { (void)p; (void)q;\
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+ #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
+ #if _VARIADIC_MAX >= 9
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9
+ #else
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1)
+ #endif
+
+ //MSVC 2012 tuple implementation
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\
+ template< template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ pair( piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
+ : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
+ { (void)p; (void)q;\
+ BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT
+ #endif
+
+ //pair copy assignment
+ pair& operator=(BOOST_COPY_ASSIGN_REF(pair) p)
+ {
+ first = p.first;
+ second = p.second;
+ return *this;
+ }
+
+ //pair move assignment
+ pair& operator=(BOOST_RV_REF(pair) p)
+ {
+ first = ::boost::move(p.first);
+ second = ::boost::move(p.second);
+ return *this;
+ }
+
+ template <class D, class S>
+ typename ::boost::container::dtl::disable_if_or
+ < pair &
+ , ::boost::container::dtl::is_same<T1, D>
+ , ::boost::container::dtl::is_same<T2, S>
+ >::type
+ operator=(const pair<D, S>&p)
+ {
+ first = p.first;
+ second = p.second;
+ return *this;
+ }
+
+ template <class D, class S>
+ typename ::boost::container::dtl::disable_if_or
+ < pair &
+ , ::boost::container::dtl::is_same<T1, D>
+ , ::boost::container::dtl::is_same<T2, S>
+ >::type
+ operator=(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
+ {
+ first = ::boost::move(p.first);
+ second = ::boost::move(p.second);
+ return *this;
+ }
+//std::pair copy assignment
+ pair& operator=(const std::pair<T1, T2> &p)
+ {
+ first = p.first;
+ second = p.second;
+ return *this;
+ }
+
+ template <class D, class S>
+ pair& operator=(const std::pair<D, S> &p)
+ {
+ first = ::boost::move(p.first);
+ second = ::boost::move(p.second);
+ return *this;
+ }
+
+ //std::pair move assignment
+ pair& operator=(BOOST_RV_REF_BEG std::pair<T1, T2> BOOST_RV_REF_END p)
+ {
+ first = ::boost::move(p.first);
+ second = ::boost::move(p.second);
+ return *this;
+ }
+
+ template <class D, class S>
+ pair& operator=(BOOST_RV_REF_BEG std::pair<D, S> BOOST_RV_REF_END p)
+ {
+ first = ::boost::move(p.first);
+ second = ::boost::move(p.second);
+ return *this;
+ }
+
+ //swap
+ void swap(pair& p)
+ {
+ ::boost::adl_move_swap(this->first, p.first);
+ ::boost::adl_move_swap(this->second, p.second);
+ }
+};
+
+template <class T1, class T2>
+inline bool operator==(const pair<T1,T2>& x, const pair<T1,T2>& y)
+{ return static_cast<bool>(x.first == y.first && x.second == y.second); }
+
+template <class T1, class T2>
+inline bool operator< (const pair<T1,T2>& x, const pair<T1,T2>& y)
+{ return static_cast<bool>(x.first < y.first ||
+ (!(y.first < x.first) && x.second < y.second)); }
+
+template <class T1, class T2>
+inline bool operator!=(const pair<T1,T2>& x, const pair<T1,T2>& y)
+{ return static_cast<bool>(!(x == y)); }
+
+template <class T1, class T2>
+inline bool operator> (const pair<T1,T2>& x, const pair<T1,T2>& y)
+{ return y < x; }
+
+template <class T1, class T2>
+inline bool operator>=(const pair<T1,T2>& x, const pair<T1,T2>& y)
+{ return static_cast<bool>(!(x < y)); }
+
+template <class T1, class T2>
+inline bool operator<=(const pair<T1,T2>& x, const pair<T1,T2>& y)
+{ return static_cast<bool>(!(y < x)); }
+
+template <class T1, class T2>
+inline pair<T1, T2> make_pair(T1 x, T2 y)
+{ return pair<T1, T2>(x, y); }
+
+template <class T1, class T2>
+inline void swap(pair<T1, T2>& x, pair<T1, T2>& y)
+{ x.swap(y); }
+
+} //namespace dtl {
+} //namespace container {
+
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template<class T1, class T2>
+struct has_move_emulation_enabled< ::boost::container::dtl::pair<T1, T2> >
+{
+ static const bool value = true;
+};
+
+#endif
+
+namespace move_detail{
+
+template<class T>
+struct is_class_or_union;
+
+template <class T1, class T2>
+struct is_class_or_union< ::boost::container::dtl::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
+
+template <class T1, class T2>
+struct is_class_or_union< std::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
+
+template<class T>
+struct is_union;
+
+template <class T1, class T2>
+struct is_union< ::boost::container::dtl::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = false;
+};
+
+template <class T1, class T2>
+struct is_union< std::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = false;
+};
+
+template<class T>
+struct is_class;
+
+template <class T1, class T2>
+struct is_class< ::boost::container::dtl::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
+
+template <class T1, class T2>
+struct is_class< std::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
+
+
+//Triviality of pair
+template<class T>
+struct is_trivially_copy_constructible;
+
+template<class A, class B>
+struct is_trivially_copy_assignable
+ <boost::container::dtl::pair<A,B> >
+{
+ static const bool value = boost::move_detail::is_trivially_copy_assignable<A>::value &&
+ boost::move_detail::is_trivially_copy_assignable<B>::value ;
+};
+
+template<class T>
+struct is_trivially_move_constructible;
+
+template<class A, class B>
+struct is_trivially_move_assignable
+ <boost::container::dtl::pair<A,B> >
+{
+ static const bool value = boost::move_detail::is_trivially_move_assignable<A>::value &&
+ boost::move_detail::is_trivially_move_assignable<B>::value ;
+};
+
+template<class T>
+struct is_trivially_copy_assignable;
+
+template<class A, class B>
+struct is_trivially_copy_constructible<boost::container::dtl::pair<A,B> >
+{
+ static const bool value = boost::move_detail::is_trivially_copy_constructible<A>::value &&
+ boost::move_detail::is_trivially_copy_constructible<B>::value ;
+};
+
+template<class T>
+struct is_trivially_move_assignable;
+
+template<class A, class B>
+struct is_trivially_move_constructible<boost::container::dtl::pair<A,B> >
+{
+ static const bool value = boost::move_detail::is_trivially_move_constructible<A>::value &&
+ boost::move_detail::is_trivially_move_constructible<B>::value ;
+};
+
+template<class T>
+struct is_trivially_destructible;
+
+template<class A, class B>
+struct is_trivially_destructible<boost::container::dtl::pair<A,B> >
+{
+ static const bool value = boost::move_detail::is_trivially_destructible<A>::value &&
+ boost::move_detail::is_trivially_destructible<B>::value ;
+};
+
+
+} //namespace move_detail{
+
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_PAIR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/pair_key_mapped_of_value.hpp b/src/third_party/boost-1.70.0/boost/container/detail/pair_key_mapped_of_value.hpp
index 6112b87826c..6112b87826c 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/pair_key_mapped_of_value.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/pair_key_mapped_of_value.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/placement_new.hpp b/src/third_party/boost-1.70.0/boost/container/detail/placement_new.hpp
index c50981f6858..c50981f6858 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/placement_new.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/placement_new.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/pool_common.hpp b/src/third_party/boost-1.70.0/boost/container/detail/pool_common.hpp
index f42c1dd4d24..f42c1dd4d24 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/pool_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/pool_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/pool_common_alloc.hpp b/src/third_party/boost-1.70.0/boost/container/detail/pool_common_alloc.hpp
index bfb82f5561b..bfb82f5561b 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/pool_common_alloc.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/pool_common_alloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/pool_resource.hpp b/src/third_party/boost-1.70.0/boost/container/detail/pool_resource.hpp
index e5f59f51869..e5f59f51869 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/pool_resource.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/pool_resource.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/singleton.hpp b/src/third_party/boost-1.70.0/boost/container/detail/singleton.hpp
index 7601c3ca8c0..7601c3ca8c0 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/singleton.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/detail/std_fwd.hpp
index a25c411e800..a25c411e800 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/std_fwd.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/container/detail/thread_mutex.hpp
index 66d64b9c5e7..66d64b9c5e7 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/thread_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/thread_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/transform_iterator.hpp b/src/third_party/boost-1.70.0/boost/container/detail/transform_iterator.hpp
index ce81813ebbc..ce81813ebbc 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/transform_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/transform_iterator.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/tree.hpp b/src/third_party/boost-1.70.0/boost/container/detail/tree.hpp
new file mode 100644
index 00000000000..08965e5a6d1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/tree.hpp
@@ -0,0 +1,1528 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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, class KeyOfValue>
+struct real_key_of_value
+{
+ typedef KeyOfValue type;
+};
+
+template<class T>
+struct real_key_of_value<T, void>
+{
+ typedef dtl::identity<T> type;
+};
+
+template<class T1, class T2>
+struct real_key_of_value<std::pair<T1, T2>, int>
+{
+ typedef dtl::select1st<T1> type;
+};
+
+template<class T1, class T2>
+struct real_key_of_value<boost::container::pair<T1, T2>, int>
+{
+ typedef dtl::select1st<T1> type;
+};
+
+template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
+class tree
+ : public dtl::node_alloc_holder
+ < typename real_allocator<T, Allocator>::type
+ , typename dtl::intrusive_tree_type
+ < typename real_allocator<T, Allocator>::type
+ , tree_value_compare
+ <typename allocator_traits<typename real_allocator<T, Allocator>::type>::pointer, Compare, typename real_key_of_value<T, KeyOfValue>::type>
+ , get_tree_opt<Options>::type::tree_type
+ , get_tree_opt<Options>::type::optimize_size
+ >::type
+ >
+{
+ typedef tree < T, KeyOfValue
+ , Compare, Allocator, Options> ThisType;
+ public:
+ typedef typename real_allocator<T, Allocator>::type allocator_type;
+
+ private:
+ typedef allocator_traits<allocator_type> allocator_traits_t;
+ typedef typename real_key_of_value<T, KeyOfValue>::type key_of_value_t;
+ typedef tree_value_compare
+ < typename allocator_traits_t::pointer
+ , Compare
+ , key_of_value_t> ValComp;
+ typedef typename get_tree_opt<Options>::type options_type;
+ typedef typename dtl::intrusive_tree_type
+ < allocator_type, ValComp
+ , options_type::tree_type
+ , options_type::optimize_size
+ >::type Icont;
+ typedef dtl::node_alloc_holder
+ <allocator_type, Icont> AllocHolder;
+ typedef typename AllocHolder::NodePtr NodePtr;
+
+ 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 key_of_value_t::type key_type;
+ typedef T value_type;
+ typedef Compare key_compare;
+ typedef ValComp value_compare;
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::pointer pointer;
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::reference reference;
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::size_type size_type;
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::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, key_of_value_t> 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(key_of_value_t()(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(key_of_value_t()(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, key_of_value_t()(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, key_of_value_t()(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, key_of_value_t()(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.70.0/boost/container/detail/type_traits.hpp
index 5e901540e75..5e901540e75 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/type_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/type_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/value_functors.hpp b/src/third_party/boost-1.70.0/boost/container/detail/value_functors.hpp
index a2c494c5e76..a2c494c5e76 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/value_functors.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/value_functors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/value_init.hpp b/src/third_party/boost-1.70.0/boost/container/detail/value_init.hpp
index 35b0aa11d3f..35b0aa11d3f 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/value_init.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/value_init.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/variadic_templates_tools.hpp b/src/third_party/boost-1.70.0/boost/container/detail/variadic_templates_tools.hpp
index 4f16fb04536..4f16fb04536 100644
--- a/src/third_party/boost-1.69.0/boost/container/detail/variadic_templates_tools.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/detail/variadic_templates_tools.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/version_type.hpp b/src/third_party/boost-1.70.0/boost/container/detail/version_type.hpp
new file mode 100644
index 00000000000..58e9da6aae5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/version_type.hpp
@@ -0,0 +1,100 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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.
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// This code comes from N1953 document by Howard E. Hinnant
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP
+#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_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/mpl.hpp>
+#include <boost/container/detail/type_traits.hpp>
+
+namespace boost{
+namespace container {
+namespace dtl {
+
+template <class T, unsigned V>
+struct version_type
+ : public dtl::integral_constant<unsigned, V>
+{
+ typedef T type;
+};
+
+namespace impl{
+
+template <class T>
+struct extract_version
+ : T::version
+{};
+
+template <class T>
+struct has_version
+{
+ private:
+ struct two {char _[2];};
+ template <class U> static two test(...);
+ template <class U> static char test(const typename U::version*);
+ public:
+ static const bool value = sizeof(test<T>(0)) == 1;
+ void dummy(){}
+};
+
+template <class T, bool = has_version<T>::value>
+struct version
+{
+ static const unsigned value = 1;
+};
+
+template <class T>
+struct version<T, true>
+{
+ static const unsigned value = extract_version<T>::value;
+};
+
+} //namespace impl
+
+template <class T>
+struct version
+ : public dtl::integral_constant<unsigned, impl::version<T>::value>
+{};
+
+template<class T, unsigned N>
+struct is_version
+{
+ static const bool value =
+ is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
+};
+
+} //namespace dtl {
+
+typedef dtl::integral_constant<unsigned, 0> version_0;
+typedef dtl::integral_constant<unsigned, 1> version_1;
+typedef dtl::integral_constant<unsigned, 2> version_2;
+
+} //namespace container {
+} //namespace boost{
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/container/detail/workaround.hpp b/src/third_party/boost-1.70.0/boost/container/detail/workaround.hpp
new file mode 100644
index 00000000000..83aacef604c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/detail/workaround.hpp
@@ -0,0 +1,133 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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
+ #ifdef __INTEL_COMPILER
+ //Intel compilers do not offer this feature yet
+ #define BOOST_CONTAINER_NO_CXX17_CTAD
+ #endif
+#else
+ #define BOOST_CONTAINER_NO_CXX17_CTAD
+#endif
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
diff --git a/src/third_party/boost-1.70.0/boost/container/flat_map.hpp b/src/third_party/boost-1.70.0/boost/container/flat_map.hpp
new file mode 100644
index 00000000000..283ab332dae
--- /dev/null
+++ b/src/third_party/boost-1.70.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>, 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 std::pair<iterator, bool> 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 std::pair<iterator, bool> 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>, 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.70.0/boost/container/flat_set.hpp
index 080beb5fae3..080beb5fae3 100644
--- a/src/third_party/boost-1.69.0/boost/container/flat_set.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/flat_set.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/list.hpp b/src/third_party/boost-1.70.0/boost/container/list.hpp
new file mode 100644
index 00000000000..ec5a4871e15
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/list.hpp
@@ -0,0 +1,1537 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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, use void
+//! for the default allocator
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class T, class Allocator = void >
+#else
+template <class T, class Allocator>
+#endif
+class list
+ : protected dtl::node_alloc_holder
+ < typename real_allocator<T, Allocator>::type
+ , typename dtl::intrusive_list_type<typename real_allocator<T, Allocator>::type>::type>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename real_allocator<T, Allocator>::type ValueAllocator;
+ typedef typename
+ dtl::intrusive_list_type<ValueAllocator>::type Icont;
+ typedef dtl::node_alloc_holder<ValueAllocator, 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<ValueAllocator> allocator_traits_type;
+ typedef boost::container::equal_to_value
+ <typename allocator_traits_type::value_type> 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<ValueAllocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::difference_type difference_type;
+ typedef ValueAllocator 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<ValueAllocator>::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(ValueAllocator())
+ { 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 ValueAllocator& a = ValueAllocator())
+ : 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 ValueAllocator &a = ValueAllocator())
+ : 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 ValueAllocator &a = ValueAllocator())
+ : 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 ValueAllocator>
+list(InputIterator, InputIterator, ValueAllocator const&) ->
+ list<typename iterator_traits<InputIterator>::value_type, ValueAllocator>;
+#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.70.0/boost/container/map.hpp b/src/third_party/boost-1.70.0/boost/container/map.hpp
new file mode 100644
index 00000000000..a21228b51c0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/map.hpp
@@ -0,0 +1,2313 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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 = void, 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>
+ , int
+ , Compare, Allocator, Options>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(map)
+
+ typedef int 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 T mapped_type;
+ typedef typename base_t::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename boost::container::allocator_traits<allocator_type>::value_type value_type;
+ typedef typename boost::container::allocator_traits<allocator_type>::pointer pointer;
+ typedef typename boost::container::allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename boost::container::allocator_traits<allocator_type>::reference reference;
+ typedef typename boost::container::allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename boost::container::allocator_traits<allocator_type>::size_type size_type;
+ typedef typename boost::container::allocator_traits<allocator_type>::difference_type difference_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_type>::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>
+ , int
+ , Compare, Allocator, Options>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(multimap)
+
+ typedef int 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 T mapped_type;
+ typedef typename base_t::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename boost::container::allocator_traits<allocator_type>::value_type value_type;
+ typedef typename boost::container::allocator_traits<allocator_type>::pointer pointer;
+ typedef typename boost::container::allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename boost::container::allocator_traits<allocator_type>::reference reference;
+ typedef typename boost::container::allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename boost::container::allocator_traits<allocator_type>::size_type size_type;
+ typedef typename boost::container::allocator_traits<allocator_type>::difference_type difference_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_type>::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.69.0/boost/container/new_allocator.hpp b/src/third_party/boost-1.70.0/boost/container/new_allocator.hpp
index 51065efa73a..51065efa73a 100644
--- a/src/third_party/boost-1.69.0/boost/container/new_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/new_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/node_allocator.hpp b/src/third_party/boost-1.70.0/boost/container/node_allocator.hpp
index b5c20a65d12..b5c20a65d12 100644
--- a/src/third_party/boost-1.69.0/boost/container/node_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/node_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/node_handle.hpp b/src/third_party/boost-1.70.0/boost/container/node_handle.hpp
index ef1d71f355d..ef1d71f355d 100644
--- a/src/third_party/boost-1.69.0/boost/container/node_handle.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/node_handle.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/options.hpp b/src/third_party/boost-1.70.0/boost/container/options.hpp
index 2ac7783e463..2ac7783e463 100644
--- a/src/third_party/boost-1.69.0/boost/container/options.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/deque.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/deque.hpp
index acb7da3d0de..acb7da3d0de 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/deque.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/deque.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/flat_map.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/flat_map.hpp
index 76c697bac43..76c697bac43 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/flat_map.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/flat_map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/flat_set.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/flat_set.hpp
index f072c951391..f072c951391 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/flat_set.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/flat_set.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/pmr/global_resource.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/global_resource.hpp
new file mode 100644
index 00000000000..4071c211fcc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/global_resource.hpp
@@ -0,0 +1,63 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_GLOBAL_RESOURCE_HPP
+#define BOOST_CONTAINER_PMR_GLOBAL_RESOURCE_HPP
+
+#if defined (_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/container/detail/auto_link.hpp>
+#include <boost/container/container_fwd.hpp>
+
+#include <cstddef>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+//! <b>Returns</b>: A pointer to a static-duration object of a type derived from
+//! memory_resource that can serve as a resource for allocating memory using
+//! global `operator new` and global `operator delete`. The same value is returned every time this function
+//! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p.
+BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT;
+
+//! <b>Returns</b>: A pointer to a static-duration object of a type derived from
+//! memory_resource for which allocate() always throws bad_alloc and for which
+//! deallocate() has no effect. The same value is returned every time this function
+//! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p.
+BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT;
+
+//! <b>Effects</b>: If r is non-null, sets the value of the default memory resource
+//! pointer to r, otherwise sets the default memory resource pointer to new_delete_resource().
+//!
+//! <b>Postconditions</b>: get_default_resource() == r.
+//!
+//! <b>Returns</b>: The previous value of the default memory resource pointer.
+//!
+//! <b>Remarks</b>: Calling the set_default_resource and get_default_resource functions shall
+//! not incur a data race. A call to the set_default_resource function shall synchronize
+//! with subsequent calls to the set_default_resource and get_default_resource functions.
+BOOST_CONTAINER_DECL memory_resource* set_default_resource(memory_resource* r) BOOST_NOEXCEPT;
+
+//! <b>Returns</b>: The current value of the default
+//! memory resource pointer.
+BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT;
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_PMR_GLOBAL_RESOURCE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/list.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/list.hpp
index f3676a3d171..f3676a3d171 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/map.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/map.hpp
index 71821606aeb..71821606aeb 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/map.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/pmr/memory_resource.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/memory_resource.hpp
new file mode 100644
index 00000000000..5ca2d7342bf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/memory_resource.hpp
@@ -0,0 +1,102 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_MEMORY_RESOURCE_HPP
+#define BOOST_CONTAINER_PMR_MEMORY_RESOURCE_HPP
+
+#if defined (_MSC_VER)
+# 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/detail/type_traits.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+//! The memory_resource class is an abstract interface to an
+//! unbounded set of classes encapsulating memory resources.
+class BOOST_CONTAINER_DECL memory_resource
+{
+ public:
+ // For exposition only
+ static BOOST_CONSTEXPR_OR_CONST std::size_t max_align =
+ boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
+
+ //! <b>Effects</b>: Destroys
+ //! this memory_resource.
+ virtual ~memory_resource(){}
+
+ //! <b>Effects</b>: Equivalent to
+ //! `return do_allocate(bytes, alignment);`
+ void* allocate(std::size_t bytes, std::size_t alignment = max_align)
+ { return this->do_allocate(bytes, alignment); }
+
+ //! <b>Effects</b>: Equivalent to
+ //! `return do_deallocate(bytes, alignment);`
+ void deallocate(void* p, std::size_t bytes, std::size_t alignment = max_align)
+ { return this->do_deallocate(p, bytes, alignment); }
+
+ //! <b>Effects</b>: Equivalent to
+ //! `return return do_is_equal(other);`
+ bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT
+ { return this->do_is_equal(other); }
+
+ //! <b>Returns</b>:
+ //! `&a == &b || a.is_equal(b)`.
+ friend bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
+ { return &a == &b || a.is_equal(b); }
+
+ //! <b>Returns</b>:
+ //! !(a == b).
+ friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
+ { return !(a == b); }
+
+ protected:
+ //! <b>Requires</b>: Alignment shall be a power of two.
+ //!
+ //! <b>Returns</b>: A derived class shall implement this function to return a pointer
+ //! to allocated storage with a size of at least bytes. The returned storage is
+ //! aligned to the specified alignment, if such alignment is supported; otherwise
+ //! it is aligned to max_align.
+ //!
+ //! <b>Throws</b>: A derived class implementation shall throw an appropriate exception if
+ //! it is unable to allocate memory with the requested size and alignment.
+ virtual void* do_allocate(std::size_t bytes, std::size_t alignment) = 0;
+
+ //! <b>Requires</b>: p shall have been returned from a prior call to
+ //! `allocate(bytes, alignment)` on a memory resource equal to *this, and the storage
+ //! at p shall not yet have been deallocated.
+ //!
+ //! <b>Effects</b>: A derived class shall implement this function to dispose of allocated storage.
+ //!
+ //! <b>Throws</b>: Nothing.
+ virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) = 0;
+
+ //! <b>Returns</b>: A derived class shall implement this function to return true if memory
+ //! allocated from this can be deallocated from other and vice-versa; otherwise it shall
+ //! return false. <i>[Note: The most-derived type of other might not match the type of this.
+ //! For a derived class, D, a typical implementation of this function will compute
+ //! `dynamic_cast<const D*>(&other)` and go no further (i.e., return false)
+ //! if it returns nullptr. - end note]</i>.
+ virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT = 0;
+};
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_PMR_MEMORY_RESOURCE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/container/pmr/monotonic_buffer_resource.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/monotonic_buffer_resource.hpp
new file mode 100644
index 00000000000..38b100a420d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/monotonic_buffer_resource.hpp
@@ -0,0 +1,183 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_MONOTONIC_BUFFER_RESOURCE_HPP
+#define BOOST_CONTAINER_PMR_MONOTONIC_BUFFER_RESOURCE_HPP
+
+#if defined (_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/container/detail/auto_link.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/pmr/memory_resource.hpp>
+#include <boost/container/detail/block_slist.hpp>
+
+#include <cstddef>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+//! A monotonic_buffer_resource is a special-purpose memory resource intended for
+//! very fast memory allocations in situations where memory is used to build up a
+//! few objects and then is released all at once when the memory resource object
+//! is destroyed. It has the following qualities:
+//!
+//! - A call to deallocate has no effect, thus the amount of memory consumed
+//! increases monotonically until the resource is destroyed.
+//!
+//! - The program can supply an initial buffer, which the allocator uses to satisfy
+//! memory requests.
+//!
+//! - When the initial buffer (if any) is exhausted, it obtains additional buffers
+//! from an upstream memory resource supplied at construction. Each additional
+//! buffer is larger than the previous one, following a geometric progression.
+//!
+//! - It is intended for access from one thread of control at a time. Specifically,
+//! calls to allocate and deallocate do not synchronize with one another.
+//!
+//! - It owns the allocated memory and frees it on destruction, even if deallocate has
+//! not been called for some of the allocated blocks.
+class BOOST_CONTAINER_DECL monotonic_buffer_resource
+ : public memory_resource
+{
+ block_slist m_memory_blocks;
+ void * m_current_buffer;
+ std::size_t m_current_buffer_size;
+ std::size_t m_next_buffer_size;
+ void * const m_initial_buffer;
+ std::size_t const m_initial_buffer_size;
+
+ /// @cond
+ void increase_next_buffer();
+ void increase_next_buffer_at_least_to(std::size_t minimum_size);
+ void *allocate_from_current(std::size_t aligner, std::size_t bytes);
+ /// @endcond
+
+ public:
+
+ //! The number of bytes that will be requested by the default in the first call
+ //! to the upstream allocator
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ static const std::size_t initial_next_buffer_size = 32u*sizeof(void*);
+
+ //! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`
+ //!
+ //! <b>Effects</b>: If `upstream` is not nullptr, sets the internal resource to `upstream`,
+ //! to get_default_resource() otherwise.
+ //! Sets the internal `current_buffer` to `nullptr` and the internal `next_buffer_size` to an
+ //! implementation-defined size.
+ explicit monotonic_buffer_resource(memory_resource* upstream = 0) BOOST_NOEXCEPT;
+
+ //! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`
+ //! and `initial_size` shall be greater than zero.
+ //!
+ //! <b>Effects</b>: If `upstream` is not nullptr, sets the internal resource to `upstream`,
+ //! to get_default_resource() otherwise. Sets the internal `current_buffer` to `nullptr` and
+ //! `next_buffer_size` to at least `initial_size`.
+ explicit monotonic_buffer_resource(std::size_t initial_size, memory_resource* upstream = 0) BOOST_NOEXCEPT;
+
+ //! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`,
+ //! `buffer_size` shall be no larger than the number of bytes in buffer.
+ //!
+ //! <b>Effects</b>: If `upstream` is not nullptr, sets the internal resource to `upstream`,
+ //! to get_default_resource() otherwise. Sets the internal `current_buffer` to `buffer`,
+ //! and `next_buffer_size` to `buffer_size` (but not less than an implementation-defined size),
+ //! then increases `next_buffer_size` by an implementation-defined growth factor (which need not be integral).
+ monotonic_buffer_resource(void* buffer, std::size_t buffer_size, memory_resource* upstream = 0) BOOST_NOEXCEPT;
+
+ #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ monotonic_buffer_resource(const monotonic_buffer_resource&) = delete;
+ monotonic_buffer_resource operator=(const monotonic_buffer_resource&) = delete;
+ #else
+ private:
+ monotonic_buffer_resource (const monotonic_buffer_resource&);
+ monotonic_buffer_resource operator=(const monotonic_buffer_resource&);
+ public:
+ #endif
+
+ //! <b>Effects</b>: Calls
+ //! `this->release()`.
+ virtual ~monotonic_buffer_resource();
+
+ //! <b>Effects</b>: `upstream_resource()->deallocate()` as necessary to release all allocated memory.
+ //! [Note: memory is released back to `upstream_resource()` even if some blocks that were allocated
+ //! from this have not been deallocated from this. - end note]
+ void release() BOOST_NOEXCEPT;
+
+ //! <b>Returns</b>: The value of
+ //! the internal resource.
+ memory_resource* upstream_resource() const BOOST_NOEXCEPT;
+
+ //! <b>Returns</b>:
+ //! The number of bytes of storage available for the specified alignment and
+ //! the number of bytes wasted due to the requested alignment.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ std::size_t remaining_storage(std::size_t alignment, std::size_t &wasted_due_to_alignment) const BOOST_NOEXCEPT;
+
+ //! <b>Returns</b>:
+ //! The number of bytes of storage available for the specified alignment.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ std::size_t remaining_storage(std::size_t alignment = 1u) const BOOST_NOEXCEPT;
+
+ //! <b>Returns</b>:
+ //! The address pointing to the start of the current free storage.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const void *current_buffer() const BOOST_NOEXCEPT;
+
+ //! <b>Returns</b>:
+ //! The number of bytes that will be requested for the next buffer once the
+ //! current one is exhausted.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ std::size_t next_buffer_size() const BOOST_NOEXCEPT;
+
+ protected:
+
+ //! <b>Returns</b>: A pointer to allocated storage with a size of at least `bytes`. The size
+ //! and alignment of the allocated memory shall meet the requirements for a class derived
+ //! from `memory_resource`.
+ //!
+ //! <b>Effects</b>: If the unused space in the internal `current_buffer` can fit a block with the specified
+ //! bytes and alignment, then allocate the return block from the internal `current_buffer`; otherwise sets
+ //! the internal `current_buffer` to `upstream_resource()->allocate(n, m)`, where `n` is not less than
+ //! `max(bytes, next_buffer_size)` and `m` is not less than alignment, and increase
+ //! `next_buffer_size` by an implementation-defined growth factor (which need not be integral),
+ //! then allocate the return block from the newly-allocated internal `current_buffer`.
+ //!
+ //! <b>Throws</b>: Nothing unless `upstream_resource()->allocate()` throws.
+ virtual void* do_allocate(std::size_t bytes, std::size_t alignment);
+
+ //! <b>Effects</b>: None
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Remarks</b>: Memory used by this resource increases monotonically until its destruction.
+ virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) BOOST_NOEXCEPT;
+
+ //! <b>Returns</b>:
+ //! `this == dynamic_cast<const monotonic_buffer_resource*>(&other)`.
+ virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT;
+};
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_PMR_MONOTONIC_BUFFER_RESOURCE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/polymorphic_allocator.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/polymorphic_allocator.hpp
index 8c046532131..8c046532131 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/polymorphic_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/polymorphic_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/pool_options.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/pool_options.hpp
index e9f72896b18..e9f72896b18 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/pool_options.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/container/pmr/resource_adaptor.hpp
index 33406267aa1..33406267aa1 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/resource_adaptor.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/resource_adaptor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/set.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/set.hpp
index 320169667f6..320169667f6 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/set.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/slist.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/slist.hpp
index c90fd7d6cd3..c90fd7d6cd3 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/slist.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/slist.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/small_vector.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/small_vector.hpp
index 6eef149728e..6eef149728e 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/small_vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/small_vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/stable_vector.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/stable_vector.hpp
index d11c426fc40..d11c426fc40 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/stable_vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/stable_vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/string.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/string.hpp
index c1eba672963..c1eba672963 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/string.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/synchronized_pool_resource.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/synchronized_pool_resource.hpp
index 516e6d2db09..516e6d2db09 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/synchronized_pool_resource.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/synchronized_pool_resource.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/unsynchronized_pool_resource.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/unsynchronized_pool_resource.hpp
index 21d30b1ebce..21d30b1ebce 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/unsynchronized_pool_resource.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/unsynchronized_pool_resource.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/vector.hpp b/src/third_party/boost-1.70.0/boost/container/pmr/vector.hpp
index 2bd9c157e0e..2bd9c157e0e 100644
--- a/src/third_party/boost-1.69.0/boost/container/pmr/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/pmr/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/scoped_allocator.hpp b/src/third_party/boost-1.70.0/boost/container/scoped_allocator.hpp
index 6cd69fe430c..6cd69fe430c 100644
--- a/src/third_party/boost-1.69.0/boost/container/scoped_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/scoped_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/scoped_allocator_fwd.hpp b/src/third_party/boost-1.70.0/boost/container/scoped_allocator_fwd.hpp
index cddf7fad156..cddf7fad156 100644
--- a/src/third_party/boost-1.69.0/boost/container/scoped_allocator_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/scoped_allocator_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/set.hpp b/src/third_party/boost-1.70.0/boost/container/set.hpp
new file mode 100644
index 00000000000..44bad8c65b9
--- /dev/null
+++ b/src/third_party/boost-1.70.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, void, Compare, Allocator, Options>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(set)
+ typedef dtl::tree
+ < Key, void, 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 key_compare value_compare;
+ typedef typename base_t::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::reference reference;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::difference_type difference_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_type>::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, void, 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, void, 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, void, Compare, Allocator, Options>
+ /// @endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(multiset)
+ typedef dtl::tree
+ <Key, void, 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 key_compare value_compare;
+ typedef typename base_t::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::reference reference;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::difference_type difference_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_type>::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, void, 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, void, 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.70.0/boost/container/slist.hpp b/src/third_party/boost-1.70.0/boost/container/slist.hpp
new file mode 100644
index 00000000000..a37851decd1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/slist.hpp
@@ -0,0 +1,1754 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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, use void
+//! for the default allocator
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class T, class Allocator = void >
+#else
+template <class T, class Allocator>
+#endif
+class slist
+ : protected dtl::node_alloc_holder
+ < typename real_allocator<T, Allocator>::type
+ , typename dtl::intrusive_slist_type<typename real_allocator<T, Allocator>::type>::type>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename real_allocator<T, Allocator>::type ValueAllocator;
+ typedef typename
+ dtl::intrusive_slist_type<ValueAllocator>::type Icont;
+ typedef dtl::node_alloc_holder<ValueAllocator, 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<ValueAllocator> allocator_traits_type;
+ typedef boost::container::equal_to_value
+ <typename allocator_traits_type::value_type> 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<ValueAllocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::difference_type difference_type;
+ typedef ValueAllocator 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<ValueAllocator>::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 ValueAllocator>
+class insert_iterator<boost::container::slist<T, ValueAllocator> >
+{
+ private:
+ typedef boost::container::slist<T, ValueAllocator> 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.70.0/boost/container/small_vector.hpp b/src/third_party/boost-1.70.0/boost/container/small_vector.hpp
new file mode 100644
index 00000000000..83f1cad1445
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/small_vector.hpp
@@ -0,0 +1,673 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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 = void >
+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<T, Allocator> >`
+//! and internal storage can be obtained downcasting that vector
+//! to `small_vector_base<T>`.
+template<class T, class VoidAllocator>
+class small_vector_allocator
+ : public allocator_traits<typename real_allocator<T, VoidAllocator>::type>::template portable_rebind_alloc<T>::type
+{
+ typedef unsigned int allocation_type;
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ typedef typename allocator_traits<typename real_allocator<T, VoidAllocator>::type>::template portable_rebind_alloc<T>::type allocator_type;
+
+ BOOST_COPYABLE_AND_MOVABLE(small_vector_allocator)
+
+ BOOST_CONTAINER_FORCEINLINE const allocator_type &as_base() const
+ { return static_cast<const allocator_type&>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE allocator_type &as_base()
+ { return static_cast<allocator_type&>(*this); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef allocator_traits<allocator_type> allocator_traits_type;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ typedef typename allocator_traits<allocator_type>::value_type value_type;
+ typedef typename allocator_traits<allocator_type>::pointer pointer;
+ typedef typename allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename allocator_traits<allocator_type>::reference reference;
+ typedef typename allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename allocator_traits<allocator_type>::size_type size_type;
+ typedef typename allocator_traits<allocator_type>::difference_type difference_type;
+ typedef typename allocator_traits<allocator_type>::void_pointer void_pointer;
+ typedef typename allocator_traits<allocator_type>::const_void_pointer const_void_pointer;
+
+ typedef typename allocator_traits<allocator_type>::propagate_on_container_copy_assignment propagate_on_container_copy_assignment;
+ typedef typename allocator_traits<allocator_type>::propagate_on_container_move_assignment propagate_on_container_move_assignment;
+ typedef typename allocator_traits<allocator_type>::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_type>::template portable_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_type(::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_type(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_type(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_type(::boost::move(other.as_base()))
+ {}
+
+ //!Constructor from related small_vector_allocator.
+ //!Never throws
+ template<class U, class OtherVoidAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator
+ (const small_vector_allocator<U, OtherVoidAllocator> &other) BOOST_NOEXCEPT_OR_NOTHROW
+ : allocator_type(other.as_base())
+ {}
+
+ //!Move constructor from related small_vector_allocator.
+ //!Never throws
+ template<class U, class OtherVoidAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator
+ (BOOST_RV_REF(small_vector_allocator<U BOOST_MOVE_I OtherVoidAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
+ : allocator_type(::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_type::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_type::operator=(::boost::move(other.as_base()))); }
+
+ //!Assignment from related small_vector_allocator.
+ //!Never throws
+ template<class U, class OtherVoidAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
+ operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator<U BOOST_MOVE_I OtherVoidAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<small_vector_allocator&>(this->allocator_type::operator=(other.as_base())); }
+
+ //!Move assignment from related small_vector_allocator.
+ //!Never throws
+ template<class U, class OtherVoidAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
+ operator=(BOOST_RV_REF(small_vector_allocator<U BOOST_MOVE_I OtherVoidAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<small_vector_allocator&>(this->allocator_type::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_type::allocate_one;
+ using allocator_type::allocate_individual;
+ using allocator_type::deallocate_one;
+ using allocator_type::deallocate_individual;
+ using allocator_type::allocate_many;
+ using allocator_type::deallocate_many;*/
+
+ typedef vector_alloc_holder< small_vector_allocator, size_type > vector_alloc_holder_t;
+ typedef vector<value_type, small_vector_allocator> vector_base;
+ typedef small_vector_base<value_type, allocator_type> derived_type;
+
+ BOOST_CONTAINER_FORCEINLINE bool is_internal_storage(const_pointer p) const
+ { return this->internal_storage() == p; }
+
+ BOOST_CONTAINER_FORCEINLINE
+ const_pointer internal_storage() const
+ {
+ 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()
+ {
+ 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
+ < T
+ , typename allocator_traits<typename real_allocator<T, SecondaryAllocator>::type>::template portable_rebind_alloc<void>::type
+ >
+ >
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKEDVECTOR
+ public:
+ //Make it public as it will be inherited by small_vector and container
+ //must have this public member
+ typedef typename real_allocator<T, SecondaryAllocator>::type secondary_allocator_t;
+ typedef typename allocator_traits<secondary_allocator_t>::template portable_rebind_alloc<void>::type void_allocator_t;
+ typedef vector<T, small_vector_allocator<T, void_allocator_t> > base_type;
+ typedef typename allocator_traits<secondary_allocator_t>::pointer pointer;
+ typedef typename allocator_traits<secondary_allocator_t>::const_pointer const_pointer;
+ typedef typename allocator_traits<secondary_allocator_t>::void_pointer void_pointer;
+ typedef typename allocator_traits<secondary_allocator_t>::const_void_pointer const_void_pointer;
+ typedef small_vector_allocator<T, void_allocator_t> allocator_type;
+
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(small_vector_base)
+
+ friend class small_vector_allocator<T, void_allocator_t>;
+
+ 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);
+ }
+
+ 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;
+
+ 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 typename real_allocator<T, Allocator>::type value_allocator_t;
+ typedef typename allocator_traits<value_allocator_t>::template portable_rebind_alloc<void>::type void_allocator_t;
+ typedef vector<T, small_vector_allocator<T, void_allocator_t> > 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 T, class Allocator, std::size_t N>
+struct small_vector_storage_definer
+{
+ typedef T 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. Use void
+//! for the default allocator
+template <class T, std::size_t N, class Allocator BOOST_CONTAINER_DOCONLY(= void) >
+class small_vector : public small_vector_base<T, Allocator>
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ , private small_vector_storage_definer<T, Allocator, N>::type
+ #endif
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef small_vector_base<T, Allocator> base_type;
+ typedef typename small_vector_storage_definer<T, 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.70.0/boost/container/stable_vector.hpp b/src/third_party/boost-1.70.0/boost/container/stable_vector.hpp
new file mode 100644
index 00000000000..92ef0f6a7f6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/stable_vector.hpp
@@ -0,0 +1,2198 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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:
+ BOOST_CONTAINER_FORCEINLINE clear_on_destroy(C &c)
+ : c_(c), do_clear_(true)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE void release()
+ { do_clear_ = false; }
+
+ BOOST_CONTAINER_FORCEINLINE ~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:
+ BOOST_CONTAINER_FORCEINLINE explicit node_base(const node_base_ptr_ptr &n)
+ : up(n)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE 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();
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE static index_iterator get_fix_up_end(index_type &index)
+ { return index.end() - (ExtraPointers - 1); }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+
+ 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;
+
+ class nat
+ {
+ public:
+ node_base_ptr node_pointer() const
+ { return node_base_ptr(); }
+ };
+ typedef typename dtl::if_c< IsConst
+ , stable_vector_iterator<Pointer, false>
+ , nat>::type nonconst_iterator;
+
+ node_base_ptr m_pn;
+
+ public:
+
+ BOOST_CONTAINER_FORCEINLINE explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn(p)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn(other.node_pointer())
+ {}
+
+ stable_vector_iterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn(other.node_pointer())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator & operator=(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ { m_pn = other.node_pointer(); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return node_ptr_traits::static_cast_from(m_pn); }
+
+ public:
+ //Pointer like operators
+ BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return node_pointer()->get_data(); }
+
+ BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return ptr_traits::pointer_to(this->operator*()); }
+
+ //Increment / Decrement
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ node_base_ptr_ptr p(this->m_pn->up);
+ this->m_pn = *(++p);
+ return *this;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
+ { stable_vector_iterator tmp(*this); ++*this; return stable_vector_iterator(tmp); }
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ node_base_ptr_ptr p(this->m_pn->up);
+ this->m_pn = *(--p);
+ return *this;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
+ { stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); }
+
+ BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return node_ptr_traits::static_cast_from(this->m_pn->up[off])->get_data(); }
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if(off) this->m_pn = this->m_pn->up[off];
+ return *this;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ { *this += -off; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn == r.m_pn; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn != r.m_pn; }
+
+ BOOST_CONTAINER_FORCEINLINE 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; }
+
+ BOOST_CONTAINER_FORCEINLINE 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; }
+
+ BOOST_CONTAINER_FORCEINLINE 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; }
+
+ BOOST_CONTAINER_FORCEINLINE 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 = void >
+#else
+template <class T, class Allocator>
+#endif
+class stable_vector
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename real_allocator<T, Allocator>::type ValueAllocator;
+ typedef allocator_traits<ValueAllocator> 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<ValueAllocator>::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;
+
+ BOOST_CONTAINER_FORCEINLINE node_ptr allocate_one()
+ { return allocator_version_traits_t::allocate_one(this->priv_node_alloc()); }
+
+ BOOST_CONTAINER_FORCEINLINE void deallocate_one(const node_ptr &p)
+ { allocator_version_traits_t::deallocate_one(this->priv_node_alloc(), p); }
+
+ BOOST_CONTAINER_FORCEINLINE 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); }
+
+ BOOST_CONTAINER_FORCEINLINE 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<ValueAllocator>::pointer
+ , false> iterator_impl;
+ typedef stable_vector_iterator
+ < typename allocator_traits<ValueAllocator>::pointer
+ , true> const_iterator_impl;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef T value_type;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<ValueAllocator>::difference_type difference_type;
+ typedef ValueAllocator 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.
+ BOOST_CONTAINER_FORCEINLINE stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<ValueAllocator>::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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ //!
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ 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 stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ 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 stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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
+ BOOST_CONTAINER_FORCEINLINE 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()).
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE 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.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const stable_vector& x, const stable_vector& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE 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());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos <= this->end());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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:
+ BOOST_CONTAINER_FORCEINLINE push_back_rollback(stable_vector &sv, const node_ptr &p)
+ : m_sv(sv), m_p(p)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE ~push_back_rollback()
+ {
+ if(m_p){
+ m_sv.priv_put_in_pool(m_p);
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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)); }
+
+ BOOST_CONTAINER_FORCEINLINE void priv_destroy_node(const node_type &n)
+ {
+ allocator_traits<node_allocator_type>::
+ destroy(this->priv_node_alloc(), &n);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE 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.70.0/boost/container/static_vector.hpp
index 059640e9372..059640e9372 100644
--- a/src/third_party/boost-1.69.0/boost/container/static_vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/static_vector.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/string.hpp b/src/third_party/boost-1.70.0/boost/container/string.hpp
new file mode 100644
index 00000000000..46ce035c7ea
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/string.hpp
@@ -0,0 +1,3505 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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 allocator_type;
+ public:
+ typedef allocator_traits<allocator_type> allocator_traits_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_type
+ {
+ void init()
+ {
+ short_t &s = *::new(this->m_repr.data) short_t;
+ s.h.is_short = 1;
+ s.h.length = 0;
+ }
+
+ members_holder()
+ : allocator_type()
+ { this->init(); }
+
+ template<class AllocatorConvertible>
+ explicit members_holder(BOOST_FWD_REF(AllocatorConvertible) a)
+ : allocator_type(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_type &alloc() const
+ { return members_; }
+
+ allocator_type &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_type>::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_type>::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 = void >
+#else
+template <class CharT, class Traits, class Allocator>
+#endif
+class basic_string
+ : private dtl::basic_string_base<typename real_allocator<CharT, Allocator>::type>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(basic_string)
+ typedef dtl::basic_string_base<typename real_allocator<CharT, Allocator>::type> base_t;
+ typedef typename base_t::allocator_traits_type allocator_traits_type;
+ 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 real_allocator<CharT, Allocator>::type allocator_type;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::reference reference;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<allocator_type>::difference_type difference_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_type>::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_type& a = allocator_type())
+ : 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_type>(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_type>(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_type>(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_type>(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_type>(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_type>(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
+ <typename boost::container::basic_string<C, T, Allocator>::allocator_type>::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.70.0/boost/container/throw_exception.hpp b/src/third_party/boost-1.70.0/boost/container/throw_exception.hpp
new file mode 100644
index 00000000000..e09f4231864
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/throw_exception.hpp
@@ -0,0 +1,181 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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_THROW_EXCEPTION_HPP
+#define BOOST_CONTAINER_THROW_EXCEPTION_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>
+
+#ifndef BOOST_NO_EXCEPTIONS
+ #include <stdexcept> //for std exception types
+ #include <string> //for implicit std::string conversion
+ #include <new> //for std::bad_alloc
+#else
+ #include <boost/assert.hpp>
+ #include <cstdlib> //for std::abort
+#endif
+
+namespace boost {
+namespace container {
+
+#if defined(BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS)
+ //The user must provide definitions for the following functions
+
+ void throw_bad_alloc();
+
+ void throw_out_of_range(const char* str);
+
+ void throw_length_error(const char* str);
+
+ void throw_logic_error(const char* str);
+
+ void throw_runtime_error(const char* str);
+
+#elif defined(BOOST_NO_EXCEPTIONS)
+
+ BOOST_NORETURN inline void throw_bad_alloc()
+ {
+ const char msg[] = "boost::container bad_alloc thrown";
+ (void)msg;
+ BOOST_ASSERT(!msg);
+ std::abort();
+ }
+
+ BOOST_NORETURN inline void throw_out_of_range(const char* str)
+ {
+ const char msg[] = "boost::container out_of_range thrown";
+ (void)msg; (void)str;
+ BOOST_ASSERT_MSG(!msg, str);
+ std::abort();
+ }
+
+ BOOST_NORETURN inline void throw_length_error(const char* str)
+ {
+ const char msg[] = "boost::container length_error thrown";
+ (void)msg; (void)str;
+ BOOST_ASSERT_MSG(!msg, str);
+ std::abort();
+ }
+
+ BOOST_NORETURN inline void throw_logic_error(const char* str)
+ {
+ const char msg[] = "boost::container logic_error thrown";
+ (void)msg; (void)str;
+ BOOST_ASSERT_MSG(!msg, str);
+ std::abort();
+ }
+
+ BOOST_NORETURN inline void throw_runtime_error(const char* str)
+ {
+ const char msg[] = "boost::container runtime_error thrown";
+ (void)msg; (void)str;
+ BOOST_ASSERT_MSG(!msg, str);
+ std::abort();
+ }
+
+#else //defined(BOOST_NO_EXCEPTIONS)
+
+ //! Exception callback called by Boost.Container when fails to allocate the requested storage space.
+ //! <ul>
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::bad_alloc()</code> is thrown.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
+ //! is NOT defined <code>BOOST_ASSERT(!"boost::container bad_alloc thrown")</code> is called
+ //! and <code>std::abort()</code> if the former returns.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
+ //! the user must provide an implementation and the function should not return.</li>
+ //! </ul>
+ BOOST_NORETURN inline void throw_bad_alloc()
+ {
+ throw std::bad_alloc();
+ }
+
+ //! Exception callback called by Boost.Container to signal arguments out of range.
+ //! <ul>
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::out_of_range(str)</code> is thrown.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str)</code> is called
+ //! and <code>std::abort()</code> if the former returns.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
+ //! the user must provide an implementation and the function should not return.</li>
+ //! </ul>
+ BOOST_NORETURN inline void throw_out_of_range(const char* str)
+ {
+ throw std::out_of_range(str);
+ }
+
+ //! Exception callback called by Boost.Container to signal errors resizing.
+ //! <ul>
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::length_error(str)</code> is thrown.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container length_error thrown", str)</code> is called
+ //! and <code>std::abort()</code> if the former returns.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
+ //! the user must provide an implementation and the function should not return.</li>
+ //! </ul>
+ BOOST_NORETURN inline void throw_length_error(const char* str)
+ {
+ throw std::length_error(str);
+ }
+
+ //! Exception callback called by Boost.Container to report errors in the internal logical
+ //! of the program, such as violation of logical preconditions or class invariants.
+ //! <ul>
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::logic_error(str)</code> is thrown.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str)</code> is called
+ //! and <code>std::abort()</code> if the former returns.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
+ //! the user must provide an implementation and the function should not return.</li>
+ //! </ul>
+ BOOST_NORETURN inline void throw_logic_error(const char* str)
+ {
+ throw std::logic_error(str);
+ }
+
+ //! Exception callback called by Boost.Container to report errors that can only be detected during runtime.
+ //! <ul>
+ //! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::runtime_error(str)</code> is thrown.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
+ //! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str)</code> is called
+ //! and <code>std::abort()</code> if the former returns.</li>
+ //!
+ //! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
+ //! the user must provide an implementation and the function should not return.</li>
+ //! </ul>
+ BOOST_NORETURN inline void throw_runtime_error(const char* str)
+ {
+ throw std::runtime_error(str);
+ }
+
+#endif
+
+}} //namespace boost { namespace container {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_THROW_EXCEPTION_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/uses_allocator.hpp b/src/third_party/boost-1.70.0/boost/container/uses_allocator.hpp
index e0e3518081a..e0e3518081a 100644
--- a/src/third_party/boost-1.69.0/boost/container/uses_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/uses_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/uses_allocator_fwd.hpp b/src/third_party/boost-1.70.0/boost/container/uses_allocator_fwd.hpp
index 42a5b904f00..42a5b904f00 100644
--- a/src/third_party/boost-1.69.0/boost/container/uses_allocator_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/container/uses_allocator_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/container/vector.hpp b/src/third_party/boost-1.70.0/boost/container/vector.hpp
new file mode 100644
index 00000000000..010b599d6da
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/container/vector.hpp
@@ -0,0 +1,3435 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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;
+
+ class nat
+ {
+ public:
+ Pointer get_ptr() const
+ { return Pointer(); }
+ };
+ typedef typename dtl::if_c< IsConst
+ , vec_iterator<Pointer, false>
+ , nat>::type nonconst_iterator;
+
+ 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(const vec_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_ptr(other.get_ptr())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator(const nonconst_iterator &other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_ptr(other.get_ptr())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator & operator=(const vec_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
+ { m_ptr = other.get_ptr(); return *this; }
+
+ //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_type> 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_type>::value)
+ : allocator_type(), 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_type(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_type(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_type()
+ , 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_type(BOOST_MOVE_BASE(allocator_type, 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_type(BOOST_MOVE_BASE(allocator_type, 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_type>::value)
+ : allocator_type()
+ , 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_type(::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>::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_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE const allocator_type &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 Allocator allocator_type;
+ typedef boost::container::
+ allocator_traits<allocator_type> 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_type>::value)
+ : allocator_type(), m_size()
+ {}
+
+ //Constructor, does not throw
+ template<class AllocConvertible>
+ explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
+ : allocator_type(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_type(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_type()
+ , 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_type(BOOST_MOVE_BASE(allocator_type, 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_type()
+ , 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_type::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)
+ {
+ typedef typename real_allocator<value_type, OtherAllocator>::type other_allocator_type;
+ if(this->m_size > other_allocator_type::internal_capacity || x.m_size > allocator_type::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_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE const allocator_type &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_type::internal_storage(); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_type::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_type::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 A The allocator used for all internal memory management, use void
+//! for the default allocator
+//! \tparam Options A type produced from \c boost::container::vector_options.
+template <class T, class A BOOST_CONTAINER_DOCONLY(= void), class Options BOOST_CONTAINER_DOCONLY(= void) >
+class vector
+{
+public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef T value_type;
+ typedef BOOST_CONTAINER_IMPDEF
+ (typename real_allocator<T BOOST_MOVE_I A>::type) allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_t;
+ typedef typename allocator_traits<allocator_type>::pointer pointer;
+ typedef typename allocator_traits<allocator_type>::const_pointer const_pointer;
+ typedef typename allocator_traits<allocator_type>::reference reference;
+ typedef typename allocator_traits<allocator_type>::const_reference const_reference;
+ typedef typename allocator_traits<allocator_type>::size_type size_type;
+ typedef typename allocator_traits<allocator_type>::difference_type difference_type;
+ typedef allocator_type stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(vec_iterator<pointer BOOST_MOVE_I false>) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(vec_iterator<pointer BOOST_MOVE_I true >) 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;
+
+private:
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename boost::container::
+ allocator_traits<allocator_type>::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>::type alloc_version;
+ typedef boost::container::vector_alloc_holder
+ <allocator_type, stored_size_type> alloc_holder_t;
+
+ alloc_holder_t m_holder;
+
+ typedef allocator_traits<allocator_type> allocator_traits_type;
+ template <class U, class UA, class UOptions>
+ friend class vector;
+
+
+ protected:
+ BOOST_CONTAINER_FORCEINLINE
+ static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
+ { return alloc_holder_t::is_propagable_from(from_alloc, p, to_alloc, propagate_allocator); }
+
+ BOOST_CONTAINER_FORCEINLINE
+ 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)
+ { return alloc_holder_t::are_swap_propagable(l_a, l_p, r_a, r_p, propagate_allocator); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(vector)
+ typedef vector_value_traits<allocator_type> 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_type>::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 OtherA>
+ vector(BOOST_RV_REF_BEG vector<T, OtherA, Options> BOOST_RV_REF_END x
+ , typename dtl::enable_if_c
+ < dtl::is_version<typename real_allocator<T, OtherA>::type, 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 (BOOST_LIKELY(&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)
+ {
+ if (BOOST_LIKELY(&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 OtherA>
+ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
+ < vector&
+ , dtl::is_version<typename real_allocator<T, OtherA>::type, 0>
+ , dtl::is_different<typename real_allocator<T, OtherA>::type, allocator_type>
+ >::type
+ operator=(BOOST_RV_REF_BEG vector<value_type, OtherA, Options> 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 OtherA>
+ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
+ < vector&
+ , dtl::is_version<typename real_allocator<T, OtherA>::type, 0>
+ , dtl::is_different<typename real_allocator<T, OtherA>::type, allocator_type>
+ >::type
+ operator=(const vector<value_type, OtherA, Options> &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_type, 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_type, 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_type, 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_type, 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_type, 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_type, 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_type, 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_type, 0>::value))
+ {
+ this->priv_swap(x, dtl::bool_<dtl::is_version<allocator_type, 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 OtherA>
+ BOOST_CONTAINER_FORCEINLINE void swap(vector<T, OtherA, Options> & x
+ , typename dtl::enable_if_and
+ < void
+ , dtl::is_version<typename real_allocator<T, OtherA>::type, 0>
+ , dtl::is_different<typename real_allocator<T, OtherA>::type, 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);
+ if (old_cap > 0) {
+ 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 OtherA>
+ void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherA, Options> BOOST_RV_REF_END x
+ , typename dtl::enable_if_c
+ < dtl::is_version<typename real_allocator<T, OtherA>::type, 0>::value >::type * = 0)
+ {
+ if(!dtl::is_same<typename real_allocator<T, OtherA>::type, 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 OtherA>
+ void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherA, Options> BOOST_RV_REF_END x
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_version<typename real_allocator<T, OtherA>::type, 0>
+ , dtl::is_different<typename real_allocator<T, OtherA>::type, 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 OtherA>
+ void priv_copy_assign(const vector<T, OtherA, Options> &x
+ , typename dtl::enable_if_c
+ < dtl::is_version<typename real_allocator<T, OtherA>::type, 0>::value >::type * = 0)
+ {
+ if(!dtl::is_same<typename real_allocator<T, OtherA>::type, 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 OtherA>
+ typename dtl::disable_if_or
+ < void
+ , dtl::is_version<typename real_allocator<T, OtherA>::type, 0>
+ , dtl::is_different<typename real_allocator<T, OtherA>::type, allocator_type>
+ >::type
+ priv_copy_assign(const vector<T, OtherA, Options> &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_type, boost::move_iterator<T*>, T*> priv_dummy_empty_proxy()
+ {
+ return dtl::insert_range_proxy<allocator_type, 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_type>(::boost::forward<U>(x)));
+ }
+
+ dtl::insert_copy_proxy<allocator_type, T*> priv_single_insert_proxy(const T &x)
+ { return dtl::insert_copy_proxy<allocator_type, T*> (x); }
+
+ dtl::insert_move_proxy<allocator_type, T*> priv_single_insert_proxy(BOOST_RV_REF(T) x)
+ { return dtl::insert_move_proxy<allocator_type, 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_type, T*> priv_resize_proxy(const T &x)
+ { return dtl::insert_n_copies_proxy<allocator_type, T*>(x); }
+
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_default_initialized_n_proxy<allocator_type, T*> priv_resize_proxy(default_init_t)
+ { return dtl::insert_default_initialized_n_proxy<allocator_type, T*>(); }
+
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_value_initialized_n_proxy<allocator_type, T*> priv_resize_proxy(value_init_t)
+ { return dtl::insert_value_initialized_n_proxy<allocator_type, 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, class Options>
+struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator, Options> >
+{
+ typedef typename ::boost::container::allocator_traits
+ <typename boost::container::real_allocator<T, Allocator>::type>::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.69.0/boost/container_hash/detail/float_functions.hpp b/src/third_party/boost-1.70.0/boost/container_hash/detail/float_functions.hpp
index f3db52f9cc5..f3db52f9cc5 100644
--- a/src/third_party/boost-1.69.0/boost/container_hash/detail/float_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/container_hash/detail/float_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container_hash/detail/hash_float.hpp b/src/third_party/boost-1.70.0/boost/container_hash/detail/hash_float.hpp
index f7634285087..f7634285087 100644
--- a/src/third_party/boost-1.69.0/boost/container_hash/detail/hash_float.hpp
+++ b/src/third_party/boost-1.70.0/boost/container_hash/detail/hash_float.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container_hash/detail/limits.hpp b/src/third_party/boost-1.70.0/boost/container_hash/detail/limits.hpp
index 4a971a6ac2d..4a971a6ac2d 100644
--- a/src/third_party/boost-1.69.0/boost/container_hash/detail/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/container_hash/detail/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container_hash/extensions.hpp b/src/third_party/boost-1.70.0/boost/container_hash/extensions.hpp
index 4eebb4bc93c..4eebb4bc93c 100644
--- a/src/third_party/boost-1.69.0/boost/container_hash/extensions.hpp
+++ b/src/third_party/boost-1.70.0/boost/container_hash/extensions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container_hash/hash.hpp b/src/third_party/boost-1.70.0/boost/container_hash/hash.hpp
index 76de7939eb0..76de7939eb0 100644
--- a/src/third_party/boost-1.69.0/boost/container_hash/hash.hpp
+++ b/src/third_party/boost-1.70.0/boost/container_hash/hash.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container_hash/hash_fwd.hpp b/src/third_party/boost-1.70.0/boost/container_hash/hash_fwd.hpp
index a87c182d39c..a87c182d39c 100644
--- a/src/third_party/boost-1.69.0/boost/container_hash/hash_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/container_hash/hash_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/context/detail/config.hpp b/src/third_party/boost-1.70.0/boost/context/detail/config.hpp
new file mode 100644
index 00000000000..b0b03c14ec4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/context/detail/config.hpp
@@ -0,0 +1,127 @@
+
+// Copyright Oliver Kowalke 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_CONTEXT_DETAIL_CONFIG_H
+#define BOOST_CONTEXT_DETAIL_CONFIG_H
+
+// required for SD-6 compile-time integer sequences
+#include <utility>
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_CONTEXT_DECL
+# undef BOOST_CONTEXT_DECL
+#endif
+
+#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTEXT_DYN_LINK) ) && ! defined(BOOST_CONTEXT_STATIC_LINK)
+# if defined(BOOST_CONTEXT_SOURCE)
+# define BOOST_CONTEXT_DECL BOOST_SYMBOL_EXPORT
+# define BOOST_CONTEXT_BUILD_DLL
+# else
+# define BOOST_CONTEXT_DECL BOOST_SYMBOL_IMPORT
+# endif
+#endif
+
+#if ! defined(BOOST_CONTEXT_DECL)
+# define BOOST_CONTEXT_DECL
+#endif
+
+#if ! defined(BOOST_CONTEXT_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_CONTEXT_NO_LIB)
+# define BOOST_LIB_NAME boost_context
+# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTEXT_DYN_LINK)
+# define BOOST_DYN_LINK
+# endif
+# include <boost/config/auto_link.hpp>
+#endif
+
+#undef BOOST_CONTEXT_CALLDECL
+#if (defined(i386) || defined(__i386__) || defined(__i386) \
+ || defined(__i486__) || defined(__i586__) || defined(__i686__) \
+ || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \
+ || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \
+ || defined(_M_IX86) || defined(_I86_)) && defined(BOOST_WINDOWS)
+# define BOOST_CONTEXT_CALLDECL __cdecl
+#else
+# define BOOST_CONTEXT_CALLDECL
+#endif
+
+#if defined(BOOST_USE_SEGMENTED_STACKS)
+# if ! ( (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) ) ) || \
+ (defined(__clang__) && (__clang_major__ > 2 || ( __clang_major__ == 2 && __clang_minor__ > 3) ) ) )
+# error "compiler does not support segmented_stack stacks"
+# endif
+# define BOOST_CONTEXT_SEGMENTS 10
+#endif
+
+
+#define BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
+// use rd6 macros for std::integer_sequence
+#if defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304
+# undef BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
+#endif
+// workaroud: MSVC 14 does not provide macros to test for compile-time integer sequence
+#if _MSC_VER > 1800 // _MSC_VER == 1800 -> MS Visual Studio 2013
+# undef BOOST_CONTEXT_NO_INDEX_SEQUENCE
+#endif
+// workaround: Xcode clang feature detection
+#if ! defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304
+# if _LIBCPP_STD_VER > 11
+# undef BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
+# endif
+#endif
+
+// workaroud: MSVC 14 does support constexpr
+#if _MSC_VER > 1800 // _MSC_VER == 1800 -> MS Visual Studio 2013
+# undef BOOST_NO_CXX11_CONSTEXPR
+#endif
+
+#undef BOOST_CONTEXT_NO_CXX11
+#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \
+ defined(BOOST_NO_CXX11_CONSTEXPR) || \
+ defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
+ defined(BOOST_NO_CXX11_FINAL) || \
+ defined(BOOST_NO_CXX11_HDR_TUPLE) || \
+ defined(BOOST_NO_CXX11_NOEXCEPT) || \
+ defined(BOOST_NO_CXX11_NULLPTR) || \
+ defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
+ defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \
+ defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \
+ defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
+ defined(BOOST_NO_HDR_ATOMIC) || \
+ defined(BOOST_NO_HDR_TUPLE)
+# define BOOST_CONTEXT_NO_CXX11
+#endif
+
+#if ! defined(BOOST_EXECUTION_CONTEXT)
+# if defined(BOOST_USE_SEGMENTED_STACKS)
+# define BOOST_EXECUTION_CONTEXT 1
+# else
+# define BOOST_EXECUTION_CONTEXT 2
+# endif
+#endif
+
+#if ! defined(BOOST_NO_CXX11_CONSTEXPR)
+// modern architectures have cachelines with 64byte length
+// ARM Cortex-A15 32/64byte, Cortex-A9 16/32/64bytes
+// MIPS 74K: 32byte, 4KEc: 16byte
+// ist should be safe to use 64byte for all
+static constexpr std::size_t cache_alignment{ 64 };
+static constexpr std::size_t cacheline_length{ 64 };
+// lookahead size for prefetching
+static constexpr std::size_t prefetch_stride{ 4 * cacheline_length };
+#endif
+
+#if defined(__GLIBCPP__) || defined(__GLIBCXX__)
+// GNU libstdc++ 3
+# define BOOST_CONTEXT_HAS_CXXABI_H
+#endif
+
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+# include <cxxabi.h>
+#endif
+
+#endif // BOOST_CONTEXT_DETAIL_CONFIG_H
diff --git a/src/third_party/boost-1.69.0/boost/context/detail/fcontext.hpp b/src/third_party/boost-1.70.0/boost/context/detail/fcontext.hpp
index 00cb24d9415..00cb24d9415 100644
--- a/src/third_party/boost-1.69.0/boost/context/detail/fcontext.hpp
+++ b/src/third_party/boost-1.70.0/boost/context/detail/fcontext.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/addressof.hpp b/src/third_party/boost-1.70.0/boost/core/addressof.hpp
index f7eab06ba75..f7eab06ba75 100644
--- a/src/third_party/boost-1.69.0/boost/core/addressof.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/addressof.hpp
diff --git a/src/third_party/boost-1.70.0/boost/core/checked_delete.hpp b/src/third_party/boost-1.70.0/boost/core/checked_delete.hpp
new file mode 100644
index 00000000000..6af5c14119f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/core/checked_delete.hpp
@@ -0,0 +1,71 @@
+#ifndef BOOST_CORE_CHECKED_DELETE_HPP
+#define BOOST_CORE_CHECKED_DELETE_HPP
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+//
+// boost/checked_delete.hpp
+//
+// Copyright (c) 2002, 2003 Peter Dimov
+// Copyright (c) 2003 Daniel Frey
+// Copyright (c) 2003 Howard Hinnant
+//
+// Distributed under the Boost Software License, Version 1.0. (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/checked_delete.html for documentation.
+//
+
+namespace boost
+{
+
+// verify that types are complete for increased safety
+
+template<class T> inline void checked_delete(T * x) BOOST_NOEXCEPT
+{
+ // intentionally complex - simplification causes regressions
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ (void) sizeof(type_must_be_complete);
+ delete x;
+}
+
+template<class T> inline void checked_array_delete(T * x) BOOST_NOEXCEPT
+{
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ (void) sizeof(type_must_be_complete);
+ delete [] x;
+}
+
+template<class T> struct checked_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+
+ void operator()(T * x) const BOOST_NOEXCEPT
+ {
+ // boost:: disables ADL
+ boost::checked_delete(x);
+ }
+};
+
+template<class T> struct checked_array_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+
+ void operator()(T * x) const BOOST_NOEXCEPT
+ {
+ boost::checked_array_delete(x);
+ }
+};
+
+} // namespace boost
+
+#endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/core/demangle.hpp b/src/third_party/boost-1.70.0/boost/core/demangle.hpp
index dc714d806cb..dc714d806cb 100644
--- a/src/third_party/boost-1.69.0/boost/core/demangle.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/core/empty_value.hpp
index 9265f05d3a7..9265f05d3a7 100644
--- a/src/third_party/boost-1.69.0/boost/core/empty_value.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/empty_value.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/enable_if.hpp b/src/third_party/boost-1.70.0/boost/core/enable_if.hpp
index 5dcef1e0354..5dcef1e0354 100644
--- a/src/third_party/boost-1.69.0/boost/core/enable_if.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/core/explicit_operator_bool.hpp
index d689f114d32..d689f114d32 100644
--- a/src/third_party/boost-1.69.0/boost/core/explicit_operator_bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/explicit_operator_bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/ignore_unused.hpp b/src/third_party/boost-1.70.0/boost/core/ignore_unused.hpp
index 994e5f64763..994e5f64763 100644
--- a/src/third_party/boost-1.69.0/boost/core/ignore_unused.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/ignore_unused.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/is_same.hpp b/src/third_party/boost-1.70.0/boost/core/is_same.hpp
index f373c654d5e..f373c654d5e 100644
--- a/src/third_party/boost-1.69.0/boost/core/is_same.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/core/lightweight_test.hpp
index 45736cb733d..45736cb733d 100644
--- a/src/third_party/boost-1.69.0/boost/core/lightweight_test.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/lightweight_test.hpp
diff --git a/src/third_party/boost-1.70.0/boost/core/lightweight_test_trait.hpp b/src/third_party/boost-1.70.0/boost/core/lightweight_test_trait.hpp
new file mode 100644
index 00000000000..73770f4e156
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/core/lightweight_test_trait.hpp
@@ -0,0 +1,83 @@
+#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, BOOST_TEST_TRAIT_SAME
+//
+// 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>
+#include <boost/core/is_same.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();
+ }
+}
+
+template<class T> inline bool test_trait_same_impl_( T )
+{
+ return T::value;
+}
+
+template<class T1, class T2> inline void test_trait_same_impl( char const * types,
+ boost::core::is_same<T1, T2> same, char const * file, int line, char const * function )
+{
+ if( test_trait_same_impl_( same ) )
+ {
+ test_results();
+ }
+ else
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): test 'is_same<" << types << ">'"
+ << " failed in function '" << function
+ << "' ('" << boost::core::demangled_name( BOOST_CORE_TYPEID(T1) )
+ << "' != '" << boost::core::demangled_name( BOOST_CORE_TYPEID(T2) ) << "')"
+ << 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) )
+#define BOOST_TEST_TRAIT_SAME(...) ( ::boost::detail::test_trait_same_impl(#__VA_ARGS__, ::boost::core::is_same<__VA_ARGS__>(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
+
+#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/core/no_exceptions_support.hpp b/src/third_party/boost-1.70.0/boost/core/no_exceptions_support.hpp
index e2453d084ba..e2453d084ba 100644
--- a/src/third_party/boost-1.69.0/boost/core/no_exceptions_support.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/core/noncopyable.hpp
index 4a4f8baba5d..4a4f8baba5d 100644
--- a/src/third_party/boost-1.69.0/boost/core/noncopyable.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/noncopyable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/pointer_traits.hpp b/src/third_party/boost-1.70.0/boost/core/pointer_traits.hpp
index e0ebfb0769d..e0ebfb0769d 100644
--- a/src/third_party/boost-1.69.0/boost/core/pointer_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/core/ref.hpp
index 77ef2b60862..77ef2b60862 100644
--- a/src/third_party/boost-1.69.0/boost/core/ref.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/ref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/scoped_enum.hpp b/src/third_party/boost-1.70.0/boost/core/scoped_enum.hpp
index 56dd0ede439..56dd0ede439 100644
--- a/src/third_party/boost-1.69.0/boost/core/scoped_enum.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/core/swap.hpp
index eff6b978df4..eff6b978df4 100644
--- a/src/third_party/boost-1.69.0/boost/core/swap.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/swap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/typeinfo.hpp b/src/third_party/boost-1.70.0/boost/core/typeinfo.hpp
index a272596a82c..a272596a82c 100644
--- a/src/third_party/boost-1.69.0/boost/core/typeinfo.hpp
+++ b/src/third_party/boost-1.70.0/boost/core/typeinfo.hpp
diff --git a/src/third_party/boost-1.70.0/boost/core/use_default.hpp b/src/third_party/boost-1.70.0/boost/core/use_default.hpp
new file mode 100644
index 00000000000..9d9be79d80d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/core/use_default.hpp
@@ -0,0 +1,17 @@
+/*
+Copyright 2019 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_USE_DEFAULT_HPP
+#define BOOST_CORE_USE_DEFAULT_HPP
+
+namespace boost {
+
+struct use_default { };
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/all.hpp b/src/third_party/boost-1.70.0/boost/coroutine/all.hpp
index 42f63a0a731..42f63a0a731 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/all.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/all.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/asymmetric_coroutine.hpp b/src/third_party/boost-1.70.0/boost/coroutine/asymmetric_coroutine.hpp
new file mode 100644
index 00000000000..78b18427b4f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/asymmetric_coroutine.hpp
@@ -0,0 +1,2408 @@
+
+// Copyright Oliver Kowalke 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)
+
+#ifndef BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
+#define BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
+
+#include <cstddef>
+#include <iterator>
+#include <memory>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/move/move.hpp>
+#include <boost/range.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/utility/explicit_operator_bool.hpp>
+
+#include <boost/coroutine/attributes.hpp>
+#include <boost/coroutine/detail/config.hpp>
+#include <boost/coroutine/detail/coroutine_context.hpp>
+#include <boost/coroutine/detail/parameters.hpp>
+#include <boost/coroutine/exceptions.hpp>
+#include <boost/coroutine/stack_allocator.hpp>
+#include <boost/coroutine/detail/pull_coroutine_impl.hpp>
+#include <boost/coroutine/detail/pull_coroutine_object.hpp>
+#include <boost/coroutine/detail/pull_coroutine_synthesized.hpp>
+#include <boost/coroutine/detail/push_coroutine_impl.hpp>
+#include <boost/coroutine/detail/push_coroutine_object.hpp>
+#include <boost/coroutine/detail/push_coroutine_synthesized.hpp>
+#include <boost/coroutine/stack_context.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace coroutines {
+
+template< typename R >
+class pull_coroutine;
+
+template< typename Arg >
+class push_coroutine
+{
+private:
+ template< typename V, typename X, typename Y, typename Z >
+ friend class detail::pull_coroutine_object;
+
+ typedef detail::push_coroutine_impl< Arg > impl_type;
+ typedef detail::push_coroutine_synthesized< Arg > synth_type;
+ typedef detail::parameters< Arg > param_type;
+
+ struct dummy {};
+
+ impl_type * impl_;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE( push_coroutine)
+
+ explicit push_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
+ impl_( & impl)
+ { BOOST_ASSERT( impl_); }
+
+public:
+ push_coroutine() BOOST_NOEXCEPT :
+ impl_( 0)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+ typedef void ( * coroutine_fn)( pull_coroutine< Arg > &);
+
+ explicit push_coroutine( coroutine_fn,
+ attributes const& = attributes() );
+
+ template< typename StackAllocator >
+ explicit push_coroutine( coroutine_fn,
+ attributes const&,
+ StackAllocator);
+# endif
+ template< typename Fn >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const&,
+ StackAllocator);
+#else
+ template< typename Fn >
+ explicit push_coroutine( Fn fn,
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( Fn fn,
+ attributes const&,
+ StackAllocator);
+
+ template< typename Fn >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const&,
+ StackAllocator);
+#endif
+
+ ~push_coroutine()
+ {
+ if ( 0 != impl_)
+ {
+ impl_->destroy();
+ impl_ = 0;
+ }
+ }
+
+ push_coroutine( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT :
+ impl_( 0)
+ { swap( other); }
+
+ push_coroutine & operator=( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT
+ {
+ push_coroutine tmp( boost::move( other) );
+ swap( tmp);
+ return * this;
+ }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL();
+
+ bool operator!() const BOOST_NOEXCEPT
+ { return 0 == impl_ || impl_->is_complete(); }
+
+ void swap( push_coroutine & other) BOOST_NOEXCEPT
+ { std::swap( impl_, other.impl_); }
+
+ push_coroutine & operator()( Arg arg)
+ {
+ BOOST_ASSERT( * this);
+
+ impl_->push( arg);
+ return * this;
+ }
+
+ class iterator
+ {
+ private:
+ push_coroutine< Arg > * c_;
+
+ public:
+ typedef std::output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ iterator() :
+ c_( 0)
+ {}
+
+ explicit iterator( push_coroutine< Arg > * c) :
+ c_( c)
+ {}
+
+ iterator & operator=( Arg a)
+ {
+ BOOST_ASSERT( c_);
+ if ( ! ( * c_)( a) ) c_ = 0;
+ return * this;
+ }
+
+ bool operator==( iterator const& other) const
+ { return other.c_ == c_; }
+
+ bool operator!=( iterator const& other) const
+ { return other.c_ != c_; }
+
+ iterator & operator*()
+ { return * this; }
+
+ iterator & operator++()
+ { return * this; }
+ };
+
+ struct const_iterator;
+};
+
+template< typename Arg >
+class push_coroutine< Arg & >
+{
+private:
+ template< typename V, typename X, typename Y, typename Z >
+ friend class detail::pull_coroutine_object;
+
+ typedef detail::push_coroutine_impl< Arg & > impl_type;
+ typedef detail::push_coroutine_synthesized< Arg & > synth_type;
+ typedef detail::parameters< Arg & > param_type;
+
+ struct dummy {};
+
+ impl_type * impl_;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE( push_coroutine)
+
+ explicit push_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
+ impl_( & impl)
+ { BOOST_ASSERT( impl_); }
+
+public:
+ push_coroutine() BOOST_NOEXCEPT :
+ impl_( 0)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+ typedef void ( * coroutine_fn)( pull_coroutine< Arg & > &);
+
+ explicit push_coroutine( coroutine_fn,
+ attributes const& = attributes() );
+
+ template< typename StackAllocator >
+ explicit push_coroutine( coroutine_fn,
+ attributes const&,
+ StackAllocator);
+# endif
+ template< typename Fn >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const&,
+ StackAllocator);
+#else
+ template< typename Fn >
+ explicit push_coroutine( Fn,
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( Fn,
+ attributes const&,
+ StackAllocator);
+
+ template< typename Fn >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const&,
+ StackAllocator);
+#endif
+
+ ~push_coroutine()
+ {
+ if ( 0 != impl_)
+ {
+ impl_->destroy();
+ impl_ = 0;
+ }
+ }
+
+ push_coroutine( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT :
+ impl_( 0)
+ { swap( other); }
+
+ push_coroutine & operator=( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT
+ {
+ push_coroutine tmp( boost::move( other) );
+ swap( tmp);
+ return * this;
+ }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL();
+
+ bool operator!() const BOOST_NOEXCEPT
+ { return 0 == impl_ || impl_->is_complete(); }
+
+ void swap( push_coroutine & other) BOOST_NOEXCEPT
+ { std::swap( impl_, other.impl_); }
+
+ push_coroutine & operator()( Arg & arg)
+ {
+ BOOST_ASSERT( * this);
+
+ impl_->push( arg);
+ return * this;
+ }
+
+ class iterator
+ {
+ private:
+ push_coroutine< Arg & > * c_;
+
+ public:
+ typedef std::output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ iterator() :
+ c_( 0)
+ {}
+
+ explicit iterator( push_coroutine< Arg & > * c) :
+ c_( c)
+ {}
+
+ iterator & operator=( Arg & a)
+ {
+ BOOST_ASSERT( c_);
+ if ( ! ( * c_)( a) ) c_ = 0;
+ return * this;
+ }
+
+ bool operator==( iterator const& other) const
+ { return other.c_ == c_; }
+
+ bool operator!=( iterator const& other) const
+ { return other.c_ != c_; }
+
+ iterator & operator*()
+ { return * this; }
+
+ iterator & operator++()
+ { return * this; }
+ };
+
+ struct const_iterator;
+};
+
+template<>
+class push_coroutine< void >
+{
+private:
+ template< typename V, typename X, typename Y, typename Z >
+ friend class detail::pull_coroutine_object;
+
+ typedef detail::push_coroutine_impl< void > impl_type;
+ typedef detail::push_coroutine_synthesized< void > synth_type;
+ typedef detail::parameters< void > param_type;
+
+ struct dummy {};
+
+ impl_type * impl_;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE( push_coroutine)
+
+ explicit push_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
+ impl_( & impl)
+ { BOOST_ASSERT( impl_); }
+
+public:
+ push_coroutine() BOOST_NOEXCEPT :
+ impl_( 0)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+ typedef void ( * coroutine_fn)( pull_coroutine< void > &);
+
+ explicit push_coroutine( coroutine_fn,
+ attributes const& = attributes() );
+
+ template< typename StackAllocator >
+ explicit push_coroutine( coroutine_fn,
+ attributes const&,
+ StackAllocator);
+# endif
+ template< typename Fn >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const&,
+ StackAllocator);
+#else
+ template< typename Fn >
+ explicit push_coroutine( Fn,
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( Fn,
+ attributes const&,
+ StackAllocator);
+
+ template< typename Fn >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const& = attributes() );
+
+ template< typename Fn, typename StackAllocator >
+ explicit push_coroutine( BOOST_RV_REF( Fn),
+ attributes const&,
+ StackAllocator);
+#endif
+
+ ~push_coroutine()
+ {
+ if ( 0 != impl_)
+ {
+ impl_->destroy();
+ impl_ = 0;
+ }
+ }
+
+ inline push_coroutine( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT :
+ impl_( 0)
+ { swap( other); }
+
+ inline push_coroutine & operator=( BOOST_RV_REF( push_coroutine) other) BOOST_NOEXCEPT
+ {
+ push_coroutine tmp( boost::move( other) );
+ swap( tmp);
+ return * this;
+ }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL();
+
+ inline bool operator!() const BOOST_NOEXCEPT
+ { return 0 == impl_ || impl_->is_complete(); }
+
+ inline void swap( push_coroutine & other) BOOST_NOEXCEPT
+ { std::swap( impl_, other.impl_); }
+
+ inline push_coroutine & operator()()
+ {
+ BOOST_ASSERT( * this);
+
+ impl_->push();
+ return * this;
+ }
+
+ struct iterator;
+ struct const_iterator;
+};
+
+
+
+template< typename R >
+class pull_coroutine
+{
+private:
+ template< typename V, typename X, typename Y, typename Z >
+ friend class detail::push_coroutine_object;
+
+ typedef detail::pull_coroutine_impl< R > impl_type;
+ typedef detail::pull_coroutine_synthesized< R > synth_type;
+ typedef detail::parameters< R > param_type;
+
+ struct dummy {};
+
+ impl_type * impl_;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE( pull_coroutine)
+
+ explicit pull_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
+ impl_( & impl)
+ { BOOST_ASSERT( impl_); }
+
+public:
+ pull_coroutine() BOOST_NOEXCEPT :
+ impl_( 0)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+ typedef void ( * coroutine_fn)( push_coroutine< R > &);
+
+ explicit pull_coroutine( coroutine_fn fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, coroutine_fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename StackAllocator >
+ explicit pull_coroutine( coroutine_fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, coroutine_fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+# endif
+ template< typename Fn >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+#else
+ template< typename Fn >
+ explicit pull_coroutine( Fn fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( Fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R >, R, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+#endif
+
+ ~pull_coroutine()
+ {
+ if ( 0 != impl_)
+ {
+ impl_->destroy();
+ impl_ = 0;
+ }
+ }
+
+ pull_coroutine( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT :
+ impl_( 0)
+ { swap( other); }
+
+ pull_coroutine & operator=( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT
+ {
+ pull_coroutine tmp( boost::move( other) );
+ swap( tmp);
+ return * this;
+ }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL();
+
+ bool operator!() const BOOST_NOEXCEPT
+ { return 0 == impl_ || impl_->is_complete(); }
+
+ void swap( pull_coroutine & other) BOOST_NOEXCEPT
+ { std::swap( impl_, other.impl_); }
+
+ pull_coroutine & operator()()
+ {
+ BOOST_ASSERT( * this);
+
+ impl_->pull();
+ return * this;
+ }
+
+ R get() const
+ {
+ BOOST_ASSERT( 0 != impl_);
+
+ return impl_->get();
+ }
+
+ class iterator
+ {
+ private:
+ pull_coroutine< R > * c_;
+ R * val_;
+
+ void fetch_()
+ {
+ BOOST_ASSERT( c_);
+
+ if ( ! ( * c_) )
+ {
+ c_ = 0;
+ val_ = 0;
+ return;
+ }
+ val_ = c_->impl_->get_pointer();
+ }
+
+ void increment_()
+ {
+ BOOST_ASSERT( c_);
+ BOOST_ASSERT( * c_);
+
+ ( * c_)();
+ fetch_();
+ }
+
+ public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef typename remove_reference< R >::type value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef value_type * pointer;
+ typedef value_type & reference;
+
+ typedef pointer pointer_t;
+ typedef reference reference_t;
+
+ iterator() :
+ c_( 0), val_( 0)
+ {}
+
+ explicit iterator( pull_coroutine< R > * c) :
+ c_( c), val_( 0)
+ { fetch_(); }
+
+ iterator( iterator const& other) :
+ c_( other.c_), val_( other.val_)
+ {}
+
+ iterator & operator=( iterator const& other)
+ {
+ if ( this == & other) return * this;
+ c_ = other.c_;
+ val_ = other.val_;
+ return * this;
+ }
+
+ bool operator==( iterator const& other) const
+ { return other.c_ == c_ && other.val_ == val_; }
+
+ bool operator!=( iterator const& other) const
+ { return other.c_ != c_ || other.val_ != val_; }
+
+ iterator & operator++()
+ {
+ increment_();
+ return * this;
+ }
+
+ iterator operator++( int);
+
+ reference_t operator*() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return * val_;
+ }
+
+ pointer_t operator->() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return val_;
+ }
+ };
+
+ class const_iterator
+ {
+ private:
+ pull_coroutine< R > * c_;
+ R * val_;
+
+ void fetch_()
+ {
+ BOOST_ASSERT( c_);
+
+ if ( ! ( * c_) )
+ {
+ c_ = 0;
+ val_ = 0;
+ return;
+ }
+ val_ = c_->impl_->get_pointer();
+ }
+
+ void increment_()
+ {
+ BOOST_ASSERT( c_);
+ BOOST_ASSERT( * c_);
+
+ ( * c_)();
+ fetch_();
+ }
+
+ public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef const typename remove_reference< R >::type value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef value_type * pointer;
+ typedef value_type & reference;
+
+ typedef pointer pointer_t;
+ typedef reference reference_t;
+
+ const_iterator() :
+ c_( 0), val_( 0)
+ {}
+
+ explicit const_iterator( pull_coroutine< R > const* c) :
+ c_( const_cast< pull_coroutine< R > * >( c) ),
+ val_( 0)
+ { fetch_(); }
+
+ const_iterator( const_iterator const& other) :
+ c_( other.c_), val_( other.val_)
+ {}
+
+ const_iterator & operator=( const_iterator const& other)
+ {
+ if ( this == & other) return * this;
+ c_ = other.c_;
+ val_ = other.val_;
+ return * this;
+ }
+
+ bool operator==( const_iterator const& other) const
+ { return other.c_ == c_ && other.val_ == val_; }
+
+ bool operator!=( const_iterator const& other) const
+ { return other.c_ != c_ || other.val_ != val_; }
+
+ const_iterator & operator++()
+ {
+ increment_();
+ return * this;
+ }
+
+ const_iterator operator++( int);
+
+ reference_t operator*() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return * val_;
+ }
+
+ pointer_t operator->() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return val_;
+ }
+ };
+
+ friend class iterator;
+ friend class const_iterator;
+};
+
+template< typename R >
+class pull_coroutine< R & >
+{
+private:
+ template< typename V, typename X, typename Y, typename Z >
+ friend class detail::push_coroutine_object;
+
+ typedef detail::pull_coroutine_impl< R & > impl_type;
+ typedef detail::pull_coroutine_synthesized< R & > synth_type;
+ typedef detail::parameters< R & > param_type;
+
+ struct dummy {};
+
+ impl_type * impl_;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE( pull_coroutine)
+
+ explicit pull_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
+ impl_( & impl)
+ { BOOST_ASSERT( impl_); }
+
+public:
+ pull_coroutine() BOOST_NOEXCEPT :
+ impl_( 0)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+ typedef void ( * coroutine_fn)( push_coroutine< R & > &);
+
+ explicit pull_coroutine( coroutine_fn fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, coroutine_fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename StackAllocator >
+ explicit pull_coroutine( coroutine_fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, coroutine_fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+# endif
+ template< typename Fn >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+#else
+ template< typename Fn >
+ explicit pull_coroutine( Fn fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( Fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< R & >, R &, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+#endif
+
+ ~pull_coroutine()
+ {
+ if ( 0 != impl_)
+ {
+ impl_->destroy();
+ impl_ = 0;
+ }
+ }
+
+ pull_coroutine( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT :
+ impl_( 0)
+ { swap( other); }
+
+ pull_coroutine & operator=( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT
+ {
+ pull_coroutine tmp( boost::move( other) );
+ swap( tmp);
+ return * this;
+ }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL();
+
+ bool operator!() const BOOST_NOEXCEPT
+ { return 0 == impl_ || impl_->is_complete(); }
+
+ void swap( pull_coroutine & other) BOOST_NOEXCEPT
+ { std::swap( impl_, other.impl_); }
+
+ pull_coroutine & operator()()
+ {
+ BOOST_ASSERT( * this);
+
+ impl_->pull();
+ return * this;
+ }
+
+ R & get() const
+ { return impl_->get(); }
+
+ class iterator
+ {
+ private:
+ pull_coroutine< R & > * c_;
+ R * val_;
+
+ void fetch_()
+ {
+ BOOST_ASSERT( c_);
+
+ if ( ! ( * c_) )
+ {
+ c_ = 0;
+ val_ = 0;
+ return;
+ }
+ val_ = c_->impl_->get_pointer();
+ }
+
+ void increment_()
+ {
+ BOOST_ASSERT( c_);
+ BOOST_ASSERT( * c_);
+
+ ( * c_)();
+ fetch_();
+ }
+
+ public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef typename remove_reference< R >::type value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef value_type * pointer;
+ typedef value_type & reference;
+
+ typedef pointer pointer_t;
+ typedef reference reference_t;
+
+ iterator() :
+ c_( 0), val_( 0)
+ {}
+
+ explicit iterator( pull_coroutine< R & > * c) :
+ c_( c), val_( 0)
+ { fetch_(); }
+
+ iterator( iterator const& other) :
+ c_( other.c_), val_( other.val_)
+ {}
+
+ iterator & operator=( iterator const& other)
+ {
+ if ( this == & other) return * this;
+ c_ = other.c_;
+ val_ = other.val_;
+ return * this;
+ }
+
+ bool operator==( iterator const& other) const
+ { return other.c_ == c_ && other.val_ == val_; }
+
+ bool operator!=( iterator const& other) const
+ { return other.c_ != c_ || other.val_ != val_; }
+
+ iterator & operator++()
+ {
+ increment_();
+ return * this;
+ }
+
+ iterator operator++( int);
+
+ reference_t operator*() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return * val_;
+ }
+
+ pointer_t operator->() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return val_;
+ }
+ };
+
+ class const_iterator
+ {
+ private:
+ pull_coroutine< R & > * c_;
+ R * val_;
+
+ void fetch_()
+ {
+ BOOST_ASSERT( c_);
+
+ if ( ! ( * c_) )
+ {
+ c_ = 0;
+ val_ = 0;
+ return;
+ }
+ val_ = c_->impl_->get_pointer();
+ }
+
+ void increment_()
+ {
+ BOOST_ASSERT( c_);
+ BOOST_ASSERT( * c_);
+
+ ( * c_)();
+ fetch_();
+ }
+
+ public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef const typename remove_reference< R >::type value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef value_type * pointer;
+ typedef value_type & reference;
+
+ typedef pointer pointer_t;
+ typedef reference reference_t;
+
+ const_iterator() :
+ c_( 0), val_( 0)
+ {}
+
+ explicit const_iterator( pull_coroutine< R & > const* c) :
+ c_( const_cast< pull_coroutine< R & > * >( c) ),
+ val_( 0)
+ { fetch_(); }
+
+ const_iterator( const_iterator const& other) :
+ c_( other.c_), val_( other.val_)
+ {}
+
+ const_iterator & operator=( const_iterator const& other)
+ {
+ if ( this == & other) return * this;
+ c_ = other.c_;
+ val_ = other.val_;
+ return * this;
+ }
+
+ bool operator==( const_iterator const& other) const
+ { return other.c_ == c_ && other.val_ == val_; }
+
+ bool operator!=( const_iterator const& other) const
+ { return other.c_ != c_ || other.val_ != val_; }
+
+ const_iterator & operator++()
+ {
+ increment_();
+ return * this;
+ }
+
+ const_iterator operator++( int);
+
+ reference_t operator*() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return * val_;
+ }
+
+ pointer_t operator->() const
+ {
+ if ( ! val_)
+ boost::throw_exception(
+ invalid_result() );
+ return val_;
+ }
+ };
+
+ friend class iterator;
+ friend class const_iterator;
+};
+
+template<>
+class pull_coroutine< void >
+{
+private:
+ template< typename V, typename X, typename Y, typename Z >
+ friend class detail::push_coroutine_object;
+
+ typedef detail::pull_coroutine_impl< void > impl_type;
+ typedef detail::pull_coroutine_synthesized< void > synth_type;
+ typedef detail::parameters< void > param_type;
+
+ struct dummy {};
+
+ impl_type * impl_;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE( pull_coroutine)
+
+ explicit pull_coroutine( detail::synthesized_t::flag_t, impl_type & impl) :
+ impl_( & impl)
+ { BOOST_ASSERT( impl_); }
+
+public:
+ pull_coroutine() BOOST_NOEXCEPT :
+ impl_( 0)
+ {}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+ typedef void ( * coroutine_fn)( push_coroutine< void > &);
+
+ explicit pull_coroutine( coroutine_fn fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, coroutine_fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename StackAllocator >
+ explicit pull_coroutine( coroutine_fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, coroutine_fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+# endif
+ template< typename Fn >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+#else
+ template< typename Fn >
+ explicit pull_coroutine( Fn fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( Fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs = attributes() ) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+
+ template< typename Fn, typename StackAllocator >
+ explicit pull_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+ {
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::pull_coroutine_object<
+ push_coroutine< void >, void, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+ impl_->pull();
+ }
+#endif
+
+ ~pull_coroutine()
+ {
+ if ( 0 != impl_)
+ {
+ impl_->destroy();
+ impl_ = 0;
+ }
+ }
+
+ inline pull_coroutine( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT :
+ impl_( 0)
+ { swap( other); }
+
+ inline pull_coroutine & operator=( BOOST_RV_REF( pull_coroutine) other) BOOST_NOEXCEPT
+ {
+ pull_coroutine tmp( boost::move( other) );
+ swap( tmp);
+ return * this;
+ }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL();
+
+ inline bool operator!() const BOOST_NOEXCEPT
+ { return 0 == impl_ || impl_->is_complete(); }
+
+ inline void swap( pull_coroutine & other) BOOST_NOEXCEPT
+ { std::swap( impl_, other.impl_); }
+
+ inline pull_coroutine & operator()()
+ {
+ BOOST_ASSERT( * this);
+
+ impl_->pull();
+ return * this;
+ }
+
+ struct iterator;
+ struct const_iterator;
+};
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# ifdef BOOST_MSVC
+template< typename Arg >
+push_coroutine< Arg >::push_coroutine( coroutine_fn fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, coroutine_fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename StackAllocator >
+push_coroutine< Arg >::push_coroutine( coroutine_fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, coroutine_fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+push_coroutine< Arg & >::push_coroutine( coroutine_fn fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, coroutine_fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename StackAllocator >
+push_coroutine< Arg & >::push_coroutine( coroutine_fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, coroutine_fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+inline push_coroutine< void >::push_coroutine( coroutine_fn fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, coroutine_fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename StackAllocator >
+push_coroutine< void >::push_coroutine( coroutine_fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, coroutine_fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< coroutine_fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+# endif
+template< typename Arg >
+template< typename Fn >
+push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn, typename StackAllocator >
+push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn >
+push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn, typename StackAllocator >
+push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Fn >
+push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Fn, typename StackAllocator >
+push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ boost::forward< Fn >( fn), attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+#else
+template< typename Arg >
+template< typename Fn >
+push_coroutine< Arg >::push_coroutine( Fn fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn, typename StackAllocator >
+push_coroutine< Arg >::push_coroutine( Fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn >
+push_coroutine< Arg & >::push_coroutine( Fn fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn, typename StackAllocator >
+push_coroutine< Arg & >::push_coroutine( Fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Fn >
+push_coroutine< void >::push_coroutine( Fn fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Fn, typename StackAllocator >
+push_coroutine< void >::push_coroutine( Fn fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn >
+push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn, typename StackAllocator >
+push_coroutine< Arg >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg >, Arg, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn >
+push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Arg >
+template< typename Fn, typename StackAllocator >
+push_coroutine< Arg & >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< Arg & >, Arg &, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Fn >
+push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ stack_allocator stack_alloc;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, Fn, stack_allocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+
+template< typename Fn, typename StackAllocator >
+push_coroutine< void >::push_coroutine( BOOST_RV_REF( Fn) fn,
+ attributes const& attrs,
+ StackAllocator stack_alloc) :
+ impl_( 0)
+{
+ // create a stack-context
+ stack_context stack_ctx;
+ // allocate the coroutine-stack
+ stack_alloc.allocate( stack_ctx, attrs.size);
+ BOOST_ASSERT( 0 != stack_ctx.sp);
+ // typedef of internal coroutine-type
+ typedef detail::push_coroutine_object<
+ pull_coroutine< void >, void, Fn, StackAllocator
+ > object_t;
+ // reserve space on top of coroutine-stack for internal coroutine-type
+ std::size_t size = stack_ctx.size - sizeof( object_t);
+ BOOST_ASSERT( 0 != size);
+ void * sp = static_cast< char * >( stack_ctx.sp) - sizeof( object_t);
+ BOOST_ASSERT( 0 != sp);
+ // placement new for internal coroutine
+ impl_ = new ( sp) object_t(
+ fn, attrs, detail::preallocated( sp, size, stack_ctx), stack_alloc);
+ BOOST_ASSERT( impl_);
+}
+#endif
+
+template< typename R >
+void swap( pull_coroutine< R > & l, pull_coroutine< R > & r) BOOST_NOEXCEPT
+{ l.swap( r); }
+
+template< typename Arg >
+void swap( push_coroutine< Arg > & l, push_coroutine< Arg > & r) BOOST_NOEXCEPT
+{ l.swap( r); }
+
+template< typename R >
+typename pull_coroutine< R >::iterator
+range_begin( pull_coroutine< R > & c)
+{ return typename pull_coroutine< R >::iterator( & c); }
+
+template< typename R >
+typename pull_coroutine< R >::const_iterator
+range_begin( pull_coroutine< R > const& c)
+{ return typename pull_coroutine< R >::const_iterator( & c); }
+
+template< typename R >
+typename pull_coroutine< R >::iterator
+range_end( pull_coroutine< R > &)
+{ return typename pull_coroutine< R >::iterator(); }
+
+template< typename R >
+typename pull_coroutine< R >::const_iterator
+range_end( pull_coroutine< R > const&)
+{ return typename pull_coroutine< R >::const_iterator(); }
+
+template< typename Arg >
+typename push_coroutine< Arg >::iterator
+range_begin( push_coroutine< Arg > & c)
+{ return typename push_coroutine< Arg >::iterator( & c); }
+
+template< typename Arg >
+typename push_coroutine< Arg >::iterator
+range_end( push_coroutine< Arg > &)
+{ return typename push_coroutine< Arg >::iterator(); }
+
+template< typename T >
+struct asymmetric_coroutine
+{
+ typedef push_coroutine< T > push_type;
+ typedef pull_coroutine< T > pull_type;
+};
+
+// deprecated
+template< typename T >
+struct coroutine
+{
+ typedef push_coroutine< T > push_type;
+ typedef pull_coroutine< T > pull_type;
+};
+
+template< typename R >
+typename pull_coroutine< R >::iterator
+begin( pull_coroutine< R > & c)
+{ return boost::begin( c); }
+
+template< typename R >
+typename pull_coroutine< R >::const_iterator
+begin( pull_coroutine< R > const& c)
+{ return boost::begin( c); }
+
+template< typename R >
+typename pull_coroutine< R >::iterator
+end( pull_coroutine< R > & c)
+{ return boost::end( c); }
+
+template< typename R >
+typename pull_coroutine< R >::const_iterator
+end( pull_coroutine< R > const& c)
+{ return boost::end( c); }
+
+template< typename R >
+typename push_coroutine< R >::iterator
+begin( push_coroutine< R > & c)
+{ return boost::begin( c); }
+
+template< typename R >
+typename push_coroutine< R >::iterator
+end( push_coroutine< R > & c)
+{ return boost::end( c); }
+
+}
+
+template< typename Arg >
+struct range_mutable_iterator< coroutines::push_coroutine< Arg > >
+{ typedef typename coroutines::push_coroutine< Arg >::iterator type; };
+
+template< typename R >
+struct range_mutable_iterator< coroutines::pull_coroutine< R > >
+{ typedef typename coroutines::pull_coroutine< R >::iterator type; };
+
+}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/attributes.hpp b/src/third_party/boost-1.70.0/boost/coroutine/attributes.hpp
index ca712ee68d0..ca712ee68d0 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/attributes.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/attributes.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/coroutine.hpp b/src/third_party/boost-1.70.0/boost/coroutine/coroutine.hpp
index 076ffd26eaa..076ffd26eaa 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/coroutine.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/coroutine.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/detail/config.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/config.hpp
new file mode 100644
index 00000000000..488a401862f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/config.hpp
@@ -0,0 +1,41 @@
+
+// Copyright Oliver Kowalke 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)
+
+#ifndef BOOST_COROUTINES_DETAIL_CONFIG_H
+#define BOOST_COROUTINES_DETAIL_CONFIG_H
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_COROUTINES_DECL
+# undef BOOST_COROUTINES_DECL
+#endif
+
+#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_COROUTINES_DYN_LINK) ) && ! defined(BOOST_COROUTINES_STATIC_LINK)
+# if defined(BOOST_COROUTINES_SOURCE)
+# define BOOST_COROUTINES_DECL BOOST_SYMBOL_EXPORT
+# define BOOST_COROUTINES_BUILD_DLL
+# else
+# define BOOST_COROUTINES_DECL BOOST_SYMBOL_IMPORT
+# endif
+#endif
+
+#if ! defined(BOOST_COROUTINES_DECL)
+# define BOOST_COROUTINES_DECL
+#endif
+
+#if ! defined(BOOST_COROUTINES_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_COROUTINES_NO_LIB)
+# define BOOST_LIB_NAME boost_coroutine
+# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_COROUTINES_DYN_LINK)
+# define BOOST_DYN_LINK
+# endif
+# include <boost/config/auto_link.hpp>
+#endif
+
+#define BOOST_COROUTINES_UNIDIRECT
+#define BOOST_COROUTINES_SYMMETRIC
+
+#endif // BOOST_COROUTINES_DETAIL_CONFIG_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/coroutine_context.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/coroutine_context.hpp
index 2d2b60ace26..2d2b60ace26 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/coroutine_context.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/coroutine_context.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/data.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/data.hpp
index 7c008fe831b..7c008fe831b 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/data.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/data.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/flags.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/flags.hpp
index 2078b62362a..2078b62362a 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/flags.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/flags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/parameters.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/parameters.hpp
index 8bad3910a9d..8bad3910a9d 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/parameters.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/parameters.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/detail/preallocated.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/preallocated.hpp
new file mode 100644
index 00000000000..a18acd37406
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/preallocated.hpp
@@ -0,0 +1,45 @@
+
+// Copyright Oliver Kowalke 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_COROUTINES_DETAIL_PREALLOCATED_H
+#define BOOST_COROUTINES_DETAIL_PREALLOCATED_H
+
+#include <cstddef>
+
+#include <boost/config.hpp>
+
+#include <boost/coroutine/detail/config.hpp>
+#include <boost/coroutine/stack_context.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace coroutines {
+namespace detail {
+
+struct BOOST_COROUTINES_DECL preallocated {
+ void * sp;
+ std::size_t size;
+ stack_context sctx;
+
+ preallocated() BOOST_NOEXCEPT :
+ sp( 0), size( 0), sctx() {
+ }
+
+ preallocated( void * sp_, std::size_t size_, stack_context sctx_) BOOST_NOEXCEPT :
+ sp( sp_), size( size_), sctx( sctx_) {
+ }
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_COROUTINES_DETAIL_PREALLOCATED_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_impl.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_impl.hpp
index e35b7894e2e..e35b7894e2e 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_impl.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_object.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_object.hpp
new file mode 100644
index 00000000000..c4bb2c45b74
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_object.hpp
@@ -0,0 +1,323 @@
+
+// Copyright Oliver Kowalke 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)
+
+#ifndef BOOST_COROUTINES_DETAIL_PULL_COROUTINE_OBJECT_H
+#define BOOST_COROUTINES_DETAIL_PULL_COROUTINE_OBJECT_H
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/context/detail/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/exception_ptr.hpp>
+#include <boost/move/move.hpp>
+
+#include <boost/coroutine/detail/config.hpp>
+#include <boost/coroutine/detail/coroutine_context.hpp>
+#include <boost/coroutine/detail/flags.hpp>
+#include <boost/coroutine/detail/preallocated.hpp>
+#include <boost/coroutine/detail/pull_coroutine_impl.hpp>
+#include <boost/coroutine/detail/trampoline_pull.hpp>
+#include <boost/coroutine/exceptions.hpp>
+#include <boost/coroutine/flags.hpp>
+#include <boost/coroutine/stack_context.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4355)
+#endif
+
+namespace boost {
+namespace coroutines {
+namespace detail {
+
+struct pull_coroutine_context
+{
+ coroutine_context caller;
+ coroutine_context callee;
+
+ template< typename Coro >
+ pull_coroutine_context( preallocated const& palloc, Coro *) :
+ caller(),
+ callee( trampoline_pull< Coro >, palloc)
+ {}
+};
+
+template< typename PushCoro, typename R, typename Fn, typename StackAllocator >
+class pull_coroutine_object : private pull_coroutine_context,
+ public pull_coroutine_impl< R >
+{
+private:
+ typedef pull_coroutine_context ctx_t;
+ typedef pull_coroutine_impl< R > base_t;
+ typedef pull_coroutine_object< PushCoro, R, Fn, StackAllocator > obj_t;
+
+ Fn fn_;
+ stack_context stack_ctx_;
+ StackAllocator stack_alloc_;
+
+ static void deallocate_( obj_t * obj)
+ {
+ stack_context stack_ctx( obj->stack_ctx_);
+ StackAllocator stack_alloc( obj->stack_alloc_);
+ obj->unwind_stack();
+ obj->~obj_t();
+ stack_alloc.deallocate( stack_ctx);
+ }
+
+public:
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ pull_coroutine_object( Fn fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+ fn_( fn),
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+#endif
+
+ pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ fn_( fn),
+#else
+ fn_( boost::forward< Fn >( fn) ),
+#endif
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+
+ void run()
+ {
+ BOOST_ASSERT( ! base_t::unwind_requested() );
+
+ base_t::flags_ |= flag_started;
+ base_t::flags_ |= flag_running;
+
+ // create push_coroutine
+ typename PushCoro::synth_type b( & this->callee, & this->caller, false);
+ PushCoro push_coro( synthesized_t::syntesized, b);
+ try
+ { fn_( push_coro); }
+ catch ( forced_unwind const&)
+ {}
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ catch ( abi::__forced_unwind const&)
+ { throw; }
+#endif
+ catch (...)
+ { base_t::except_ = current_exception(); }
+
+ base_t::flags_ |= flag_complete;
+ base_t::flags_ &= ~flag_running;
+ typename base_t::param_type to;
+ this->callee.jump(
+ this->caller,
+ & to);
+ BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
+ }
+
+ void destroy()
+ { deallocate_( this); }
+};
+
+template< typename PushCoro, typename R, typename Fn, typename StackAllocator >
+class pull_coroutine_object< PushCoro, R &, Fn, StackAllocator > : private pull_coroutine_context,
+ public pull_coroutine_impl< R & >
+{
+private:
+ typedef pull_coroutine_context ctx_t;
+ typedef pull_coroutine_impl< R & > base_t;
+ typedef pull_coroutine_object< PushCoro, R &, Fn, StackAllocator > obj_t;
+
+ Fn fn_;
+ stack_context stack_ctx_;
+ StackAllocator stack_alloc_;
+
+ static void deallocate_( obj_t * obj)
+ {
+ stack_context stack_ctx( obj->stack_ctx_);
+ StackAllocator stack_alloc( obj->stack_alloc_);
+ obj->unwind_stack();
+ obj->~obj_t();
+ stack_alloc.deallocate( stack_ctx);
+ }
+
+public:
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ pull_coroutine_object( Fn fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+ fn_( fn),
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+#endif
+
+ pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ fn_( fn),
+#else
+ fn_( boost::forward< Fn >( fn) ),
+#endif
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+
+ void run()
+ {
+ BOOST_ASSERT( ! base_t::unwind_requested() );
+
+ base_t::flags_ |= flag_started;
+ base_t::flags_ |= flag_running;
+
+ // create push_coroutine
+ typename PushCoro::synth_type b( & this->callee, & this->caller, false);
+ PushCoro push_coro( synthesized_t::syntesized, b);
+ try
+ { fn_( push_coro); }
+ catch ( forced_unwind const&)
+ {}
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ catch ( abi::__forced_unwind const&)
+ { throw; }
+#endif
+ catch (...)
+ { base_t::except_ = current_exception(); }
+
+ base_t::flags_ |= flag_complete;
+ base_t::flags_ &= ~flag_running;
+ typename base_t::param_type to;
+ this->callee.jump(
+ this->caller,
+ & to);
+ BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
+ }
+
+ void destroy()
+ { deallocate_( this); }
+};
+
+template< typename PushCoro, typename Fn, typename StackAllocator >
+class pull_coroutine_object< PushCoro, void, Fn, StackAllocator > : private pull_coroutine_context,
+ public pull_coroutine_impl< void >
+{
+private:
+ typedef pull_coroutine_context ctx_t;
+ typedef pull_coroutine_impl< void > base_t;
+ typedef pull_coroutine_object< PushCoro, void, Fn, StackAllocator > obj_t;
+
+ Fn fn_;
+ stack_context stack_ctx_;
+ StackAllocator stack_alloc_;
+
+ static void deallocate_( obj_t * obj)
+ {
+ stack_context stack_ctx( obj->stack_ctx_);
+ StackAllocator stack_alloc( obj->stack_alloc_);
+ obj->unwind_stack();
+ obj->~obj_t();
+ stack_alloc.deallocate( stack_ctx);
+ }
+
+public:
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ pull_coroutine_object( Fn fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+ fn_( fn),
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+#endif
+
+ pull_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ fn_( fn),
+#else
+ fn_( boost::forward< Fn >( fn) ),
+#endif
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+
+ void run()
+ {
+ BOOST_ASSERT( ! base_t::unwind_requested() );
+
+ base_t::flags_ |= flag_started;
+ base_t::flags_ |= flag_running;
+
+ // create push_coroutine
+ typename PushCoro::synth_type b( & this->callee, & this->caller, false);
+ PushCoro push_coro( synthesized_t::syntesized, b);
+ try
+ { fn_( push_coro); }
+ catch ( forced_unwind const&)
+ {}
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ catch ( abi::__forced_unwind const&)
+ { throw; }
+#endif
+ catch (...)
+ { base_t::except_ = current_exception(); }
+
+ base_t::flags_ |= flag_complete;
+ base_t::flags_ &= ~flag_running;
+ typename base_t::param_type to;
+ this->callee.jump(
+ this->caller,
+ & to);
+ BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
+ }
+
+ void destroy()
+ { deallocate_( this); }
+};
+
+}}}
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_COROUTINES_DETAIL_PULL_COROUTINE_OBJECT_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp
index 313de3c2dd0..313de3c2dd0 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_impl.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_impl.hpp
index 21c1df469ea..21c1df469ea 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_impl.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_object.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_object.hpp
new file mode 100644
index 00000000000..d0620229266
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_object.hpp
@@ -0,0 +1,335 @@
+
+// Copyright Oliver Kowalke 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)
+
+#ifndef BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_OBJECT_H
+#define BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_OBJECT_H
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/context/detail/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/exception_ptr.hpp>
+#include <boost/move/move.hpp>
+
+#include <boost/coroutine/detail/config.hpp>
+#include <boost/coroutine/detail/coroutine_context.hpp>
+#include <boost/coroutine/detail/flags.hpp>
+#include <boost/coroutine/detail/preallocated.hpp>
+#include <boost/coroutine/detail/push_coroutine_impl.hpp>
+#include <boost/coroutine/detail/trampoline_push.hpp>
+#include <boost/coroutine/exceptions.hpp>
+#include <boost/coroutine/flags.hpp>
+#include <boost/coroutine/stack_context.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4355)
+#endif
+
+namespace boost {
+namespace coroutines {
+namespace detail {
+
+struct push_coroutine_context
+{
+ coroutine_context caller;
+ coroutine_context callee;
+
+ template< typename Coro >
+ push_coroutine_context( preallocated const& palloc, Coro *) :
+ caller(),
+ callee( trampoline_push< Coro >, palloc)
+ {}
+};
+
+struct push_coroutine_context_void
+{
+ coroutine_context caller;
+ coroutine_context callee;
+
+ template< typename Coro >
+ push_coroutine_context_void( preallocated const& palloc, Coro *) :
+ caller(),
+ callee( trampoline_push_void< Coro >, palloc)
+ {}
+};
+
+template< typename PullCoro, typename R, typename Fn, typename StackAllocator >
+class push_coroutine_object : private push_coroutine_context,
+ public push_coroutine_impl< R >
+{
+private:
+ typedef push_coroutine_context ctx_t;
+ typedef push_coroutine_impl< R > base_t;
+ typedef push_coroutine_object< PullCoro, R, Fn, StackAllocator > obj_t;
+
+ Fn fn_;
+ stack_context stack_ctx_;
+ StackAllocator stack_alloc_;
+
+ static void deallocate_( obj_t * obj)
+ {
+ stack_context stack_ctx( obj->stack_ctx_);
+ StackAllocator stack_alloc( obj->stack_alloc_);
+ obj->unwind_stack();
+ obj->~obj_t();
+ stack_alloc.deallocate( stack_ctx);
+ }
+
+public:
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ push_coroutine_object( Fn fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+ fn_( fn),
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+#endif
+
+ push_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ fn_( fn),
+#else
+ fn_( boost::forward< Fn >( fn) ),
+#endif
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+
+ void run( R * result)
+ {
+ BOOST_ASSERT( ! base_t::unwind_requested() );
+
+ base_t::flags_ |= flag_started;
+ base_t::flags_ |= flag_running;
+
+ // create push_coroutine
+ typename PullCoro::synth_type b( & this->callee, & this->caller, false, result);
+ PullCoro pull_coro( synthesized_t::syntesized, b);
+ try
+ { fn_( pull_coro); }
+ catch ( forced_unwind const&)
+ {}
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ catch ( abi::__forced_unwind const&)
+ { throw; }
+#endif
+ catch (...)
+ { base_t::except_ = current_exception(); }
+
+ base_t::flags_ |= flag_complete;
+ base_t::flags_ &= ~flag_running;
+ typename base_t::param_type to;
+ this->callee.jump(
+ this->caller,
+ & to);
+ BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
+ }
+
+ void destroy()
+ { deallocate_( this); }
+};
+
+template< typename PullCoro, typename R, typename Fn, typename StackAllocator >
+class push_coroutine_object< PullCoro, R &, Fn, StackAllocator > : private push_coroutine_context,
+ public push_coroutine_impl< R & >
+{
+private:
+ typedef push_coroutine_context ctx_t;
+ typedef push_coroutine_impl< R & > base_t;
+ typedef push_coroutine_object< PullCoro, R &, Fn, StackAllocator > obj_t;
+
+ Fn fn_;
+ stack_context stack_ctx_;
+ StackAllocator stack_alloc_;
+
+ static void deallocate_( obj_t * obj)
+ {
+ stack_context stack_ctx( obj->stack_ctx_);
+ StackAllocator stack_alloc( obj->stack_alloc_);
+ obj->unwind_stack();
+ obj->~obj_t();
+ stack_alloc.deallocate( stack_ctx);
+ }
+
+public:
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ push_coroutine_object( Fn fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+ fn_( fn),
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+#endif
+
+ push_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ fn_( fn),
+#else
+ fn_( boost::forward< Fn >( fn) ),
+#endif
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+
+ void run( R * result)
+ {
+ BOOST_ASSERT( ! base_t::unwind_requested() );
+
+ base_t::flags_ |= flag_started;
+ base_t::flags_ |= flag_running;
+
+ // create push_coroutine
+ typename PullCoro::synth_type b( & this->callee, & this->caller, false, result);
+ PullCoro push_coro( synthesized_t::syntesized, b);
+ try
+ { fn_( push_coro); }
+ catch ( forced_unwind const&)
+ {}
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ catch ( abi::__forced_unwind const&)
+ { throw; }
+#endif
+ catch (...)
+ { base_t::except_ = current_exception(); }
+
+ base_t::flags_ |= flag_complete;
+ base_t::flags_ &= ~flag_running;
+ typename base_t::param_type to;
+ this->callee.jump(
+ this->caller,
+ & to);
+ BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
+ }
+
+ void destroy()
+ { deallocate_( this); }
+};
+
+template< typename PullCoro, typename Fn, typename StackAllocator >
+class push_coroutine_object< PullCoro, void, Fn, StackAllocator > : private push_coroutine_context_void,
+ public push_coroutine_impl< void >
+{
+private:
+ typedef push_coroutine_context_void ctx_t;
+ typedef push_coroutine_impl< void > base_t;
+ typedef push_coroutine_object< PullCoro, void, Fn, StackAllocator > obj_t;
+
+ Fn fn_;
+ stack_context stack_ctx_;
+ StackAllocator stack_alloc_;
+
+ static void deallocate_( obj_t * obj)
+ {
+ stack_context stack_ctx( obj->stack_ctx_);
+ StackAllocator stack_alloc( obj->stack_alloc_);
+ obj->unwind_stack();
+ obj->~obj_t();
+ stack_alloc.deallocate( stack_ctx);
+ }
+
+public:
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ push_coroutine_object( Fn fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+ fn_( fn),
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+#endif
+
+ push_coroutine_object( BOOST_RV_REF( Fn) fn, attributes const& attrs,
+ preallocated const& palloc,
+ StackAllocator const& stack_alloc) BOOST_NOEXCEPT :
+ ctx_t( palloc, this),
+ base_t( & this->caller,
+ & this->callee,
+ stack_unwind == attrs.do_unwind),
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ fn_( fn),
+#else
+ fn_( boost::forward< Fn >( fn) ),
+#endif
+ stack_ctx_( palloc.sctx),
+ stack_alloc_( stack_alloc)
+ {}
+
+ void run()
+ {
+ BOOST_ASSERT( ! base_t::unwind_requested() );
+
+ base_t::flags_ |= flag_started;
+ base_t::flags_ |= flag_running;
+
+ // create push_coroutine
+ typename PullCoro::synth_type b( & this->callee, & this->caller, false);
+ PullCoro push_coro( synthesized_t::syntesized, b);
+ try
+ { fn_( push_coro); }
+ catch ( forced_unwind const&)
+ {}
+#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
+ catch ( abi::__forced_unwind const&)
+ { throw; }
+#endif
+ catch (...)
+ { base_t::except_ = current_exception(); }
+
+ base_t::flags_ |= flag_complete;
+ base_t::flags_ &= ~flag_running;
+ typename base_t::param_type to;
+ this->callee.jump(
+ this->caller,
+ & to);
+ BOOST_ASSERT_MSG( false, "pull_coroutine is complete");
+ }
+
+ void destroy()
+ { deallocate_( this); }
+};
+
+}}}
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_OBJECT_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_synthesized.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_synthesized.hpp
index c10a468b9ba..c10a468b9ba 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_synthesized.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/push_coroutine_synthesized.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/setup.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/setup.hpp
index 35f601a7793..35f601a7793 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/setup.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/setup.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_call.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_call.hpp
index 3a9e4e6f9f3..3a9e4e6f9f3 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_call.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_call.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp
index b4066d8f78b..b4066d8f78b 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_object.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_object.hpp
index a19cd922322..a19cd922322 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_object.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_object.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp
index 296676b6f98..296676b6f98 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline.hpp
index eb0c6c23783..eb0c6c23783 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_pull.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline_pull.hpp
index 1daa76db3b0..1daa76db3b0 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_pull.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline_pull.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_push.hpp b/src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline_push.hpp
index 80f90d05183..80f90d05183 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_push.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/detail/trampoline_push.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/exceptions.hpp b/src/third_party/boost-1.70.0/boost/coroutine/exceptions.hpp
index 5dbd55f106a..5dbd55f106a 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/exceptions.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/exceptions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/flags.hpp b/src/third_party/boost-1.70.0/boost/coroutine/flags.hpp
index 81940f30e5a..81940f30e5a 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/flags.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/flags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/posix/protected_stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/posix/protected_stack_allocator.hpp
index 649248b57da..649248b57da 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/posix/protected_stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/posix/protected_stack_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/posix/segmented_stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/posix/segmented_stack_allocator.hpp
index 49cee28cd24..49cee28cd24 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/posix/segmented_stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/posix/segmented_stack_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/protected_stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/protected_stack_allocator.hpp
index 268786fec41..268786fec41 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/protected_stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/protected_stack_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/segmented_stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/segmented_stack_allocator.hpp
index f9525a1a5ee..f9525a1a5ee 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/segmented_stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/segmented_stack_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/stack_allocator.hpp
index 662533efe7b..662533efe7b 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/stack_allocator.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/stack_context.hpp b/src/third_party/boost-1.70.0/boost/coroutine/stack_context.hpp
new file mode 100644
index 00000000000..3f57b2527bf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/stack_context.hpp
@@ -0,0 +1,66 @@
+
+// Copyright Oliver Kowalke 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)
+
+#ifndef BOOST_COROUTINES_STACK_CONTEXT_H
+#define BOOST_COROUTINES_STACK_CONTEXT_H
+
+#include <cstddef>
+
+#include <boost/config.hpp>
+
+#include <boost/coroutine/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace coroutines {
+
+#if defined(BOOST_USE_SEGMENTED_STACKS)
+struct BOOST_COROUTINES_DECL stack_context
+{
+ typedef void * segments_context[BOOST_CONTEXT_SEGMENTS];
+
+ std::size_t size;
+ void * sp;
+ segments_context segments_ctx;
+#if defined(BOOST_USE_VALGRIND)
+ unsigned valgrind_stack_id;
+#endif
+
+ stack_context() :
+ size( 0), sp( 0), segments_ctx()
+#if defined(BOOST_USE_VALGRIND)
+ , valgrind_stack_id( 0)
+#endif
+ {}
+};
+#else
+struct BOOST_COROUTINES_DECL stack_context
+{
+ std::size_t size;
+ void * sp;
+#if defined(BOOST_USE_VALGRIND)
+ unsigned valgrind_stack_id;
+#endif
+
+ stack_context() :
+ size( 0), sp( 0)
+#if defined(BOOST_USE_VALGRIND)
+ , valgrind_stack_id( 0)
+#endif
+ {}
+};
+#endif
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_COROUTINES_STACK_CONTEXT_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/stack_traits.hpp b/src/third_party/boost-1.70.0/boost/coroutine/stack_traits.hpp
index 0e8f25182d8..0e8f25182d8 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/stack_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/stack_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/standard_stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/standard_stack_allocator.hpp
index b946fffc4a7..b946fffc4a7 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/standard_stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/standard_stack_allocator.hpp
diff --git a/src/third_party/boost-1.70.0/boost/coroutine/symmetric_coroutine.hpp b/src/third_party/boost-1.70.0/boost/coroutine/symmetric_coroutine.hpp
new file mode 100644
index 00000000000..543cae0a370
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/coroutine/symmetric_coroutine.hpp
@@ -0,0 +1,35 @@
+
+// Copyright Oliver Kowalke 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)
+
+#ifndef BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
+#define BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
+
+#include <boost/config.hpp>
+
+#include <boost/coroutine/detail/symmetric_coroutine_call.hpp>
+#include <boost/coroutine/detail/symmetric_coroutine_yield.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace coroutines {
+
+template< typename T >
+struct symmetric_coroutine
+{
+ typedef detail::symmetric_coroutine_call< T > call_type;
+ typedef detail::symmetric_coroutine_yield< T > yield_type;
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
diff --git a/src/third_party/boost-1.69.0/boost/coroutine/windows/protected_stack_allocator.hpp b/src/third_party/boost-1.70.0/boost/coroutine/windows/protected_stack_allocator.hpp
index 29e19babb7e..29e19babb7e 100644
--- a/src/third_party/boost-1.69.0/boost/coroutine/windows/protected_stack_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/coroutine/windows/protected_stack_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/cregex.hpp b/src/third_party/boost-1.70.0/boost/cregex.hpp
index b7a918eb8ed..b7a918eb8ed 100644
--- a/src/third_party/boost-1.69.0/boost/cregex.hpp
+++ b/src/third_party/boost-1.70.0/boost/cregex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/cstdint.hpp b/src/third_party/boost-1.70.0/boost/cstdint.hpp
index c8474c4623a..c8474c4623a 100644
--- a/src/third_party/boost-1.69.0/boost/cstdint.hpp
+++ b/src/third_party/boost-1.70.0/boost/cstdint.hpp
diff --git a/src/third_party/boost-1.69.0/boost/cstdlib.hpp b/src/third_party/boost-1.70.0/boost/cstdlib.hpp
index 63221463542..63221463542 100644
--- a/src/third_party/boost-1.69.0/boost/cstdlib.hpp
+++ b/src/third_party/boost-1.70.0/boost/cstdlib.hpp
diff --git a/src/third_party/boost-1.70.0/boost/current_function.hpp b/src/third_party/boost-1.70.0/boost/current_function.hpp
new file mode 100644
index 00000000000..731d1b13e55
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/current_function.hpp
@@ -0,0 +1,75 @@
+#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
+#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// boost/current_function.hpp - BOOST_CURRENT_FUNCTION
+//
+// Copyright 2002-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
+//
+// http://www.boost.org/libs/assert
+//
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void current_function_helper()
+{
+
+#if defined( BOOST_DISABLE_CURRENT_FUNCTION )
+
+# define BOOST_CURRENT_FUNCTION "(unknown)"
+
+#elif defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) || defined(__clang__)
+
+# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
+
+#elif defined(__DMC__) && (__DMC__ >= 0x810)
+
+# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
+
+#elif defined(__FUNCSIG__)
+
+# define BOOST_CURRENT_FUNCTION __FUNCSIG__
+
+#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
+
+# define BOOST_CURRENT_FUNCTION __FUNCTION__
+
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
+
+# define BOOST_CURRENT_FUNCTION __FUNC__
+
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
+
+# define BOOST_CURRENT_FUNCTION __func__
+
+#elif defined(__cplusplus) && (__cplusplus >= 201103)
+
+# define BOOST_CURRENT_FUNCTION __func__
+
+#else
+
+# define BOOST_CURRENT_FUNCTION "(unknown)"
+
+#endif
+
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/date_time.hpp b/src/third_party/boost-1.70.0/boost/date_time.hpp
index 51628cd3288..51628cd3288 100644
--- a/src/third_party/boost-1.69.0/boost/date_time.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/adjust_functors.hpp b/src/third_party/boost-1.70.0/boost/date_time/adjust_functors.hpp
index ec2a707659b..ec2a707659b 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/adjust_functors.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/adjust_functors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/c_local_time_adjustor.hpp b/src/third_party/boost-1.70.0/boost/date_time/c_local_time_adjustor.hpp
index 9170aa6687b..9170aa6687b 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/c_local_time_adjustor.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/c_local_time_adjustor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/c_time.hpp b/src/third_party/boost-1.70.0/boost/date_time/c_time.hpp
index 0b07a1b283b..0b07a1b283b 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/c_time.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/date_time/compiler_config.hpp
index 5dfb863f141..5dfb863f141 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/compiler_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/compiler_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/constrained_value.hpp b/src/third_party/boost-1.70.0/boost/date_time/constrained_value.hpp
index b1122d76d84..b1122d76d84 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/constrained_value.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/constrained_value.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date.hpp b/src/third_party/boost-1.70.0/boost/date_time/date.hpp
index 18333fd3ffe..18333fd3ffe 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_clock_device.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_clock_device.hpp
index 2145d65fd54..2145d65fd54 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_clock_device.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_clock_device.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_defs.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_defs.hpp
index 6c80db3a83d..6c80db3a83d 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_defs.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_defs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_duration.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_duration.hpp
index 82c75b42a0b..82c75b42a0b 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_duration.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_duration.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_duration_types.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_duration_types.hpp
index 7271d0191ae..7271d0191ae 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_duration_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_duration_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_facet.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_facet.hpp
index df7d53b6c9d..df7d53b6c9d 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_format_simple.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_format_simple.hpp
index 452990379b2..452990379b2 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_format_simple.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_format_simple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_formatting.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_formatting.hpp
index c1b69a8c798..c1b69a8c798 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_formatting.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_formatting.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_formatting_limited.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_formatting_limited.hpp
index 7c5c1735a34..7c5c1735a34 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_formatting_limited.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_formatting_limited.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_formatting_locales.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_formatting_locales.hpp
index a1daad33ae7..a1daad33ae7 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_formatting_locales.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_formatting_locales.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_generator_formatter.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_generator_formatter.hpp
index 42c396b2c03..42c396b2c03 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_generator_formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_generator_formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_generator_parser.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_generator_parser.hpp
index f4d7b27a79e..f4d7b27a79e 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_generator_parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_generator_parser.hpp
diff --git a/src/third_party/boost-1.70.0/boost/date_time/date_generators.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_generators.hpp
new file mode 100644
index 00000000000..67bfd5f0772
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_generators.hpp
@@ -0,0 +1,509 @@
+#ifndef DATE_TIME_DATE_GENERATORS_HPP__
+#define DATE_TIME_DATE_GENERATORS_HPP__
+
+/* Copyright (c) 2002,2003,2005 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$
+ */
+
+/*! @file date_generators.hpp
+ Definition and implementation of date algorithm templates
+*/
+
+#include <stdexcept>
+#include <sstream>
+#include <boost/throw_exception.hpp>
+#include <boost/date_time/date.hpp>
+#include <boost/date_time/compiler_config.hpp>
+
+namespace boost {
+namespace date_time {
+
+ //! Base class for all generators that take a year and produce a date.
+ /*! This class is a base class for polymorphic function objects that take
+ a year and produce a concrete date.
+ @tparam date_type The type representing a date. This type must
+ export a calender_type which defines a year_type.
+ */
+ template<class date_type>
+ class year_based_generator
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::year_type year_type;
+ year_based_generator() {}
+ virtual ~year_based_generator() {}
+ virtual date_type get_date(year_type y) const = 0;
+ //! Returns a string for use in a POSIX time_zone string
+ virtual std::string to_string() const =0;
+ };
+
+ //! Generates a date by applying the year to the given month and day.
+ /*!
+ Example usage:
+ @code
+ partial_date pd(1, Jan);
+ partial_date pd2(70);
+ date d = pd.get_date(2002); //2002-Jan-01
+ date d2 = pd2.get_date(2002); //2002-Mar-10
+ @endcode
+ \ingroup date_alg
+ */
+ template<class date_type>
+ class partial_date : public year_based_generator<date_type>
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::day_type day_type;
+ typedef typename calendar_type::month_type month_type;
+ typedef typename calendar_type::year_type year_type;
+ typedef typename date_type::duration_type duration_type;
+ typedef typename duration_type::duration_rep duration_rep;
+ partial_date(day_type d, month_type m) :
+ day_(d),
+ month_(m)
+ {}
+ //! Partial date created from number of days into year. Range 1-366
+ /*! Allowable values range from 1 to 366. 1=Jan1, 366=Dec31. If argument
+ * exceeds range, partial_date will be created with closest in-range value.
+ * 60 will always be Feb29, if get_date() is called with a non-leap year
+ * an exception will be thrown */
+ partial_date(duration_rep days) :
+ day_(1), // default values
+ month_(1)
+ {
+ date_type d1(2000,1,1);
+ if(days > 1) {
+ if(days > 366) // prevents wrapping
+ {
+ days = 366;
+ }
+ days = days - 1;
+ duration_type dd(days);
+ d1 = d1 + dd;
+ }
+ day_ = d1.day();
+ month_ = d1.month();
+ }
+ //! Return a concrete date when provided with a year specific year.
+ /*! Will throw an 'invalid_argument' exception if a partial_date object,
+ * instantiated with Feb-29, has get_date called with a non-leap year.
+ * Example:
+ * @code
+ * partial_date pd(29, Feb);
+ * pd.get_date(2003); // throws invalid_argument exception
+ * pg.get_date(2000); // returns 2000-2-29
+ * @endcode
+ */
+ date_type get_date(year_type y) const
+ {
+ if((day_ == 29) && (month_ == 2) && !(calendar_type::is_leap_year(y))) {
+ std::ostringstream ss;
+ ss << "No Feb 29th in given year of " << y << ".";
+ boost::throw_exception(std::invalid_argument(ss.str()));
+ }
+ return date_type(y, month_, day_);
+ }
+ date_type operator()(year_type y) const
+ {
+ return get_date(y);
+ //return date_type(y, month_, day_);
+ }
+ bool operator==(const partial_date& rhs) const
+ {
+ return (month_ == rhs.month_) && (day_ == rhs.day_);
+ }
+ bool operator<(const partial_date& rhs) const
+ {
+ if (month_ < rhs.month_) return true;
+ if (month_ > rhs.month_) return false;
+ //months are equal
+ return (day_ < rhs.day_);
+ }
+
+ // added for streaming purposes
+ month_type month() const
+ {
+ return month_;
+ }
+ day_type day() const
+ {
+ return day_;
+ }
+
+ //! Returns string suitable for use in POSIX time zone string
+ /*! Returns string formatted with up to 3 digits:
+ * Jan-01 == "0"
+ * Feb-29 == "58"
+ * Dec-31 == "365" */
+ virtual std::string to_string() const
+ {
+ std::ostringstream ss;
+ date_type d(2004, month_, day_);
+ unsigned short c = d.day_of_year();
+ c--; // numbered 0-365 while day_of_year is 1 based...
+ ss << c;
+ return ss.str();
+ }
+ private:
+ day_type day_;
+ month_type month_;
+ };
+
+
+ //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5.
+ BOOST_DATE_TIME_DECL const char* nth_as_str(int n);
+
+ //! Useful generator functor for finding holidays
+ /*! Based on the idea in Cal. Calc. for finding holidays that are
+ * the 'first Monday of September'. When instantiated with
+ * 'fifth' kday of month, the result will be the last kday of month
+ * which can be the fourth or fifth depending on the structure of
+ * the month.
+ *
+ * The algorithm here basically guesses for the first
+ * day of the month. Then finds the first day of the correct
+ * type. That is, if the first of the month is a Tuesday
+ * and it needs Wenesday then we simply increment by a day
+ * and then we can add the length of a week until we get
+ * to the 'nth kday'. There are probably more efficient
+ * algorithms based on using a mod 7, but this one works
+ * reasonably well for basic applications.
+ * \ingroup date_alg
+ */
+ template<class date_type>
+ class nth_kday_of_month : public year_based_generator<date_type>
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::day_of_week_type day_of_week_type;
+ typedef typename calendar_type::month_type month_type;
+ typedef typename calendar_type::year_type year_type;
+ typedef typename date_type::duration_type duration_type;
+ enum week_num {first=1, second, third, fourth, fifth};
+ nth_kday_of_month(week_num week_no,
+ day_of_week_type dow,
+ month_type m) :
+ month_(m),
+ wn_(week_no),
+ dow_(dow)
+ {}
+ //! Return a concrete date when provided with a year specific year.
+ date_type get_date(year_type y) const
+ {
+ date_type d(y, month_, 1); //first day of month
+ duration_type one_day(1);
+ duration_type one_week(7);
+ while (dow_ != d.day_of_week()) {
+ d = d + one_day;
+ }
+ int week = 1;
+ while (week < wn_) {
+ d = d + one_week;
+ week++;
+ }
+ // remove wrapping to next month behavior
+ if(d.month() != month_) {
+ d = d - one_week;
+ }
+ return d;
+ }
+ // added for streaming
+ month_type month() const
+ {
+ return month_;
+ }
+ week_num nth_week() const
+ {
+ return wn_;
+ }
+ day_of_week_type day_of_week() const
+ {
+ return dow_;
+ }
+ const char* nth_week_as_str() const
+ {
+ return nth_as_str(wn_);
+ }
+ //! Returns string suitable for use in POSIX time zone string
+ /*! Returns a string formatted as "M4.3.0" ==> 3rd Sunday in April. */
+ virtual std::string to_string() const
+ {
+ std::ostringstream ss;
+ ss << 'M'
+ << static_cast<int>(month_) << '.'
+ << static_cast<int>(wn_) << '.'
+ << static_cast<int>(dow_);
+ return ss.str();
+ }
+ private:
+ month_type month_;
+ week_num wn_;
+ day_of_week_type dow_;
+ };
+
+ //! Useful generator functor for finding holidays and daylight savings
+ /*! Similar to nth_kday_of_month, but requires less paramters
+ * \ingroup date_alg
+ */
+ template<class date_type>
+ class first_kday_of_month : public year_based_generator<date_type>
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::day_of_week_type day_of_week_type;
+ typedef typename calendar_type::month_type month_type;
+ typedef typename calendar_type::year_type year_type;
+ typedef typename date_type::duration_type duration_type;
+ //!Specify the first 'Sunday' in 'April' spec
+ /*!@param dow The day of week, eg: Sunday, Monday, etc
+ * @param m The month of the year, eg: Jan, Feb, Mar, etc
+ */
+ first_kday_of_month(day_of_week_type dow, month_type m) :
+ month_(m),
+ dow_(dow)
+ {}
+ //! Return a concrete date when provided with a year specific year.
+ date_type get_date(year_type year) const
+ {
+ date_type d(year, month_,1);
+ duration_type one_day(1);
+ while (dow_ != d.day_of_week()) {
+ d = d + one_day;
+ }
+ return d;
+ }
+ // added for streaming
+ month_type month() const
+ {
+ return month_;
+ }
+ day_of_week_type day_of_week() const
+ {
+ return dow_;
+ }
+ //! Returns string suitable for use in POSIX time zone string
+ /*! Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. */
+ virtual std::string to_string() const
+ {
+ std::ostringstream ss;
+ ss << 'M'
+ << static_cast<int>(month_) << '.'
+ << 1 << '.'
+ << static_cast<int>(dow_);
+ return ss.str();
+ }
+ private:
+ month_type month_;
+ day_of_week_type dow_;
+ };
+
+
+
+ //! Calculate something like Last Sunday of January
+ /*! Useful generator functor for finding holidays and daylight savings
+ * Get the last day of the month and then calculate the difference
+ * to the last previous day.
+ * @tparam date_type A date class that exports day_of_week, month_type, etc.
+ * \ingroup date_alg
+ */
+ template<class date_type>
+ class last_kday_of_month : public year_based_generator<date_type>
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::day_of_week_type day_of_week_type;
+ typedef typename calendar_type::month_type month_type;
+ typedef typename calendar_type::year_type year_type;
+ typedef typename date_type::duration_type duration_type;
+ //!Specify the date spec like last 'Sunday' in 'April' spec
+ /*!@param dow The day of week, eg: Sunday, Monday, etc
+ * @param m The month of the year, eg: Jan, Feb, Mar, etc
+ */
+ last_kday_of_month(day_of_week_type dow, month_type m) :
+ month_(m),
+ dow_(dow)
+ {}
+ //! Return a concrete date when provided with a year specific year.
+ date_type get_date(year_type year) const
+ {
+ date_type d(year, month_, calendar_type::end_of_month_day(year,month_));
+ duration_type one_day(1);
+ while (dow_ != d.day_of_week()) {
+ d = d - one_day;
+ }
+ return d;
+ }
+ // added for streaming
+ month_type month() const
+ {
+ return month_;
+ }
+ day_of_week_type day_of_week() const
+ {
+ return dow_;
+ }
+ //! Returns string suitable for use in POSIX time zone string
+ /*! Returns a string formatted as "M4.5.0" ==> last Sunday in April. */
+ virtual std::string to_string() const
+ {
+ std::ostringstream ss;
+ ss << 'M'
+ << static_cast<int>(month_) << '.'
+ << 5 << '.'
+ << static_cast<int>(dow_);
+ return ss.str();
+ }
+ private:
+ month_type month_;
+ day_of_week_type dow_;
+ };
+
+
+ //! Calculate something like "First Sunday after Jan 1,2002
+ /*! Date generator that takes a date and finds kday after
+ *@code
+ typedef boost::date_time::first_kday_after<date> firstkdayafter;
+ firstkdayafter fkaf(Monday);
+ fkaf.get_date(date(2002,Feb,1));
+ @endcode
+ * \ingroup date_alg
+ */
+ template<class date_type>
+ class first_kday_after
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::day_of_week_type day_of_week_type;
+ typedef typename date_type::duration_type duration_type;
+ first_kday_after(day_of_week_type dow) :
+ dow_(dow)
+ {}
+ //! Return next kday given.
+ date_type get_date(date_type start_day) const
+ {
+ duration_type one_day(1);
+ date_type d = start_day + one_day;
+ while (dow_ != d.day_of_week()) {
+ d = d + one_day;
+ }
+ return d;
+ }
+ // added for streaming
+ day_of_week_type day_of_week() const
+ {
+ return dow_;
+ }
+ private:
+ day_of_week_type dow_;
+ };
+
+ //! Calculate something like "First Sunday before Jan 1,2002
+ /*! Date generator that takes a date and finds kday after
+ *@code
+ typedef boost::date_time::first_kday_before<date> firstkdaybefore;
+ firstkdaybefore fkbf(Monday);
+ fkbf.get_date(date(2002,Feb,1));
+ @endcode
+ * \ingroup date_alg
+ */
+ template<class date_type>
+ class first_kday_before
+ {
+ public:
+ typedef typename date_type::calendar_type calendar_type;
+ typedef typename calendar_type::day_of_week_type day_of_week_type;
+ typedef typename date_type::duration_type duration_type;
+ first_kday_before(day_of_week_type dow) :
+ dow_(dow)
+ {}
+ //! Return next kday given.
+ date_type get_date(date_type start_day) const
+ {
+ duration_type one_day(1);
+ date_type d = start_day - one_day;
+ while (dow_ != d.day_of_week()) {
+ d = d - one_day;
+ }
+ return d;
+ }
+ // added for streaming
+ day_of_week_type day_of_week() const
+ {
+ return dow_;
+ }
+ private:
+ day_of_week_type dow_;
+ };
+
+ //! Calculates the number of days until the next weekday
+ /*! Calculates the number of days until the next weekday.
+ * If the date given falls on a Sunday and the given weekday
+ * is Tuesday the result will be 2 days */
+ template<typename date_type, class weekday_type>
+ inline
+ typename date_type::duration_type days_until_weekday(const date_type& d, const weekday_type& wd)
+ {
+ typedef typename date_type::duration_type duration_type;
+ duration_type wks(0);
+ duration_type dd(wd.as_number() - d.day_of_week().as_number());
+ if(dd.is_negative()){
+ wks = duration_type(7);
+ }
+ return dd + wks;
+ }
+
+ //! Calculates the number of days since the previous weekday
+ /*! Calculates the number of days since the previous weekday
+ * If the date given falls on a Sunday and the given weekday
+ * is Tuesday the result will be 5 days. The answer will be a positive
+ * number because Tuesday is 5 days before Sunday, not -5 days before. */
+ template<typename date_type, class weekday_type>
+ inline
+ typename date_type::duration_type days_before_weekday(const date_type& d, const weekday_type& wd)
+ {
+ typedef typename date_type::duration_type duration_type;
+ duration_type wks(0);
+ duration_type dd(wd.as_number() - d.day_of_week().as_number());
+ if(dd.days() > 0){
+ wks = duration_type(7);
+ }
+ // we want a number of days, not an offset. The value returned must
+ // be zero or larger.
+ return (-dd + wks);
+ }
+
+ //! Generates a date object representing the date of the following weekday from the given date
+ /*! Generates a date object representing the date of the following
+ * weekday from the given date. If the date given is 2004-May-9
+ * (a Sunday) and the given weekday is Tuesday then the resulting date
+ * will be 2004-May-11. */
+ template<class date_type, class weekday_type>
+ inline
+ date_type next_weekday(const date_type& d, const weekday_type& wd)
+ {
+ return d + days_until_weekday(d, wd);
+ }
+
+ //! Generates a date object representing the date of the previous weekday from the given date
+ /*! Generates a date object representing the date of the previous
+ * weekday from the given date. If the date given is 2004-May-9
+ * (a Sunday) and the given weekday is Tuesday then the resulting date
+ * will be 2004-May-4. */
+ template<class date_type, class weekday_type>
+ inline
+ date_type previous_weekday(const date_type& d, const weekday_type& wd)
+ {
+ return d - days_before_weekday(d, wd);
+ }
+
+} } //namespace date_time
+
+
+
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_iterator.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_iterator.hpp
index 3526ba18b48..3526ba18b48 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_names_put.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_names_put.hpp
index 20da2d2ed07..20da2d2ed07 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_names_put.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_names_put.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/date_parsing.hpp b/src/third_party/boost-1.70.0/boost/date_time/date_parsing.hpp
index 33c53660273..33c53660273 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/date_parsing.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/date_parsing.hpp
diff --git a/src/third_party/boost-1.70.0/boost/date_time/dst_rules.hpp b/src/third_party/boost-1.70.0/boost/date_time/dst_rules.hpp
new file mode 100644
index 00000000000..0c7aecef974
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/date_time/dst_rules.hpp
@@ -0,0 +1,391 @@
+#ifndef DATE_TIME_DST_RULES_HPP__
+#define DATE_TIME_DST_RULES_HPP__
+
+/* Copyright (c) 2002,2003, 2007 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$
+ */
+
+/*! @file dst_rules.hpp
+ Contains template class to provide static dst rule calculations
+*/
+
+#include "boost/date_time/date_generators.hpp"
+#include "boost/date_time/period.hpp"
+#include "boost/date_time/date_defs.hpp"
+#include <stdexcept>
+
+namespace boost {
+ namespace date_time {
+
+ enum time_is_dst_result {is_not_in_dst, is_in_dst,
+ ambiguous, invalid_time_label};
+
+
+ //! Dynamic class used to caluclate dst transition information
+ template<class date_type_,
+ class time_duration_type_>
+ class dst_calculator
+ {
+ public:
+ typedef time_duration_type_ time_duration_type;
+ typedef date_type_ date_type;
+
+ //! Check the local time offset when on dst start day
+ /*! On this dst transition, the time label between
+ * the transition boundary and the boudary + the offset
+ * are invalid times. If before the boundary then still
+ * not in dst.
+ *@param time_of_day Time offset in the day for the local time
+ *@param dst_start_offset_minutes Local day offset for start of dst
+ *@param dst_length_minutes Number of minutes to adjust clock forward
+ *@retval status of time label w.r.t. dst
+ */
+ static time_is_dst_result
+ process_local_dst_start_day(const time_duration_type& time_of_day,
+ unsigned int dst_start_offset_minutes,
+ long dst_length_minutes)
+ {
+ //std::cout << "here" << std::endl;
+ if (time_of_day < time_duration_type(0,dst_start_offset_minutes,0)) {
+ return is_not_in_dst;
+ }
+ long offset = dst_start_offset_minutes + dst_length_minutes;
+ if (time_of_day >= time_duration_type(0,offset,0)) {
+ return is_in_dst;
+ }
+ return invalid_time_label;
+ }
+
+ //! Check the local time offset when on the last day of dst
+ /*! This is the calculation for the DST end day. On that day times
+ * prior to the conversion time - dst_length (1 am in US) are still
+ * in dst. Times between the above and the switch time are
+ * ambiguous. Times after the start_offset are not in dst.
+ *@param time_of_day Time offset in the day for the local time
+ *@param dst_end_offset_minutes Local time of day for end of dst
+ *@retval status of time label w.r.t. dst
+ */
+ static time_is_dst_result
+ process_local_dst_end_day(const time_duration_type& time_of_day,
+ unsigned int dst_end_offset_minutes,
+ long dst_length_minutes)
+ {
+ //in US this will be 60 so offset in day is 1,0,0
+ int offset = dst_end_offset_minutes-dst_length_minutes;
+ if (time_of_day < time_duration_type(0,offset,0)) {
+ return is_in_dst;
+ }
+ if (time_of_day >= time_duration_type(0,dst_end_offset_minutes,0)) {
+ return is_not_in_dst;
+ }
+ return ambiguous;
+ }
+
+ //! Calculates if the given local time is dst or not
+ /*! Determines if the time is really in DST or not. Also checks for
+ * invalid and ambiguous.
+ * @param current_day The day to check for dst
+ * @param time_of_day Time offset within the day to check
+ * @param dst_start_day Starting day of dst for the given locality
+ * @param dst_start_offset Time offset within day for dst boundary
+ * @param dst_end_day Ending day of dst for the given locality
+ * @param dst_end_offset Time offset within day given in dst for dst boundary
+ * @param dst_length_minutes length of dst adjusment
+ * @retval The time is either ambiguous, invalid, in dst, or not in dst
+ */
+ static time_is_dst_result
+ local_is_dst(const date_type& current_day,
+ const time_duration_type& time_of_day,
+ const date_type& dst_start_day,
+ const time_duration_type& dst_start_offset,
+ const date_type& dst_end_day,
+ const time_duration_type& dst_end_offset,
+ const time_duration_type& dst_length)
+ {
+ unsigned int start_minutes = static_cast<unsigned>(
+ dst_start_offset.hours() * 60 + dst_start_offset.minutes());
+ unsigned int end_minutes = static_cast<unsigned>(
+ dst_end_offset.hours() * 60 + dst_end_offset.minutes());
+ long length_minutes = static_cast<long>(
+ dst_length.hours() * 60 + dst_length.minutes());
+
+ return local_is_dst(current_day, time_of_day,
+ dst_start_day, start_minutes,
+ dst_end_day, end_minutes,
+ length_minutes);
+ }
+
+ //! Calculates if the given local time is dst or not
+ /*! Determines if the time is really in DST or not. Also checks for
+ * invalid and ambiguous.
+ * @param current_day The day to check for dst
+ * @param time_of_day Time offset within the day to check
+ * @param dst_start_day Starting day of dst for the given locality
+ * @param dst_start_offset_minutes Offset within day for dst
+ * boundary (eg 120 for US which is 02:00:00)
+ * @param dst_end_day Ending day of dst for the given locality
+ * @param dst_end_offset_minutes Offset within day given in dst for dst
+ * boundary (eg 120 for US which is 02:00:00)
+ * @param dst_length_minutes Length of dst adjusment (eg: 60 for US)
+ * @retval The time is either ambiguous, invalid, in dst, or not in dst
+ */
+ static time_is_dst_result
+ local_is_dst(const date_type& current_day,
+ const time_duration_type& time_of_day,
+ const date_type& dst_start_day,
+ unsigned int dst_start_offset_minutes,
+ const date_type& dst_end_day,
+ unsigned int dst_end_offset_minutes,
+ long dst_length_minutes)
+ {
+ //in northern hemisphere dst is in the middle of the year
+ if (dst_start_day < dst_end_day) {
+ if ((current_day > dst_start_day) && (current_day < dst_end_day)) {
+ return is_in_dst;
+ }
+ if ((current_day < dst_start_day) || (current_day > dst_end_day)) {
+ return is_not_in_dst;
+ }
+ }
+ else {//southern hemisphere dst is at begining /end of year
+ if ((current_day < dst_start_day) && (current_day > dst_end_day)) {
+ return is_not_in_dst;
+ }
+ if ((current_day > dst_start_day) || (current_day < dst_end_day)) {
+ return is_in_dst;
+ }
+ }
+
+ if (current_day == dst_start_day) {
+ return process_local_dst_start_day(time_of_day,
+ dst_start_offset_minutes,
+ dst_length_minutes);
+ }
+
+ if (current_day == dst_end_day) {
+ return process_local_dst_end_day(time_of_day,
+ dst_end_offset_minutes,
+ dst_length_minutes);
+ }
+ //you should never reach this statement
+ return invalid_time_label;
+ }
+
+ };
+
+
+ //! Compile-time configurable daylight savings time calculation engine
+ /* This template provides the ability to configure a daylight savings
+ * calculation at compile time covering all the cases. Unfortunately
+ * because of the number of dimensions related to daylight savings
+ * calculation the number of parameters is high. In addition, the
+ * start and end transition rules are complex types that specify
+ * an algorithm for calculation of the starting day and ending
+ * day of daylight savings time including the month and day
+ * specifications (eg: last sunday in October).
+ *
+ * @param date_type A type that represents dates, typically gregorian::date
+ * @param time_duration_type Used for the offset in the day calculations
+ * @param dst_traits A set of traits that define the rules of dst
+ * calculation. The dst_trait must include the following:
+ * start_rule_functor - Rule to calculate the starting date of a
+ * dst transition (eg: last_kday_of_month).
+ * start_day - static function that returns month of dst start for
+ * start_rule_functor
+ * start_month -static function that returns day or day of week for
+ * dst start of dst
+ * end_rule_functor - Rule to calculate the end of dst day.
+ * end_day - static fucntion that returns end day for end_rule_functor
+ * end_month - static function that returns end month for end_rule_functor
+ * dst_start_offset_minutes - number of minutes from start of day to transition to dst -- 120 (or 2:00 am) is typical for the U.S. and E.U.
+ * dst_start_offset_minutes - number of minutes from start of day to transition off of dst -- 180 (or 3:00 am) is typical for E.U.
+ * dst_length_minutes - number of minutes that dst shifts clock
+ */
+ template<class date_type,
+ class time_duration_type,
+ class dst_traits>
+ class dst_calc_engine
+ {
+ public:
+ typedef typename date_type::year_type year_type;
+ typedef typename date_type::calendar_type calendar_type;
+ typedef dst_calculator<date_type, time_duration_type> dstcalc;
+
+ //! Calculates if the given local time is dst or not
+ /*! Determines if the time is really in DST or not. Also checks for
+ * invalid and ambiguous.
+ * @retval The time is either ambiguous, invalid, in dst, or not in dst
+ */
+ static time_is_dst_result local_is_dst(const date_type& d,
+ const time_duration_type& td)
+ {
+
+ year_type y = d.year();
+ date_type dst_start = local_dst_start_day(y);
+ date_type dst_end = local_dst_end_day(y);
+ return dstcalc::local_is_dst(d,td,
+ dst_start,
+ dst_traits::dst_start_offset_minutes(),
+ dst_end,
+ dst_traits::dst_end_offset_minutes(),
+ dst_traits::dst_shift_length_minutes());
+
+ }
+
+ static bool is_dst_boundary_day(date_type d)
+ {
+ year_type y = d.year();
+ return ((d == local_dst_start_day(y)) ||
+ (d == local_dst_end_day(y)));
+ }
+
+ //! The time of day for the dst transition (eg: typically 01:00:00 or 02:00:00)
+ static time_duration_type dst_offset()
+ {
+ return time_duration_type(0,dst_traits::dst_shift_length_minutes(),0);
+ }
+
+ static date_type local_dst_start_day(year_type year)
+ {
+ return dst_traits::local_dst_start_day(year);
+ }
+
+ static date_type local_dst_end_day(year_type year)
+ {
+ return dst_traits::local_dst_end_day(year);
+ }
+
+
+ };
+
+ //! Depricated: Class to calculate dst boundaries for US time zones
+ /* Use dst_calc_engine instead.
+ * In 2007 US/Canada DST rules changed
+ * (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_saving_time).
+ */
+ template<class date_type_,
+ class time_duration_type_,
+ unsigned int dst_start_offset_minutes=120, //from start of day
+ short dst_length_minutes=60> //1 hour == 60 min in US
+ class us_dst_rules
+ {
+ public:
+ typedef time_duration_type_ time_duration_type;
+ typedef date_type_ date_type;
+ typedef typename date_type::year_type year_type;
+ typedef typename date_type::calendar_type calendar_type;
+ typedef date_time::last_kday_of_month<date_type> lkday;
+ typedef date_time::first_kday_of_month<date_type> fkday;
+ typedef date_time::nth_kday_of_month<date_type> nkday;
+ typedef dst_calculator<date_type, time_duration_type> dstcalc;
+
+ //! Calculates if the given local time is dst or not
+ /*! Determines if the time is really in DST or not. Also checks for
+ * invalid and ambiguous.
+ * @retval The time is either ambiguous, invalid, in dst, or not in dst
+ */
+ static time_is_dst_result local_is_dst(const date_type& d,
+ const time_duration_type& td)
+ {
+
+ year_type y = d.year();
+ date_type dst_start = local_dst_start_day(y);
+ date_type dst_end = local_dst_end_day(y);
+ return dstcalc::local_is_dst(d,td,
+ dst_start,dst_start_offset_minutes,
+ dst_end, dst_start_offset_minutes,
+ dst_length_minutes);
+
+ }
+
+
+ static bool is_dst_boundary_day(date_type d)
+ {
+ year_type y = d.year();
+ return ((d == local_dst_start_day(y)) ||
+ (d == local_dst_end_day(y)));
+ }
+
+ static date_type local_dst_start_day(year_type year)
+ {
+ if (year >= year_type(2007)) {
+ //second sunday in march
+ nkday ssim(nkday::second, Sunday, gregorian::Mar);
+ return ssim.get_date(year);
+ } else {
+ //first sunday in april
+ fkday fsia(Sunday, gregorian::Apr);
+ return fsia.get_date(year);
+ }
+ }
+
+ static date_type local_dst_end_day(year_type year)
+ {
+ if (year >= year_type(2007)) {
+ //first sunday in november
+ fkday fsin(Sunday, gregorian::Nov);
+ return fsin.get_date(year);
+ } else {
+ //last sunday in october
+ lkday lsio(Sunday, gregorian::Oct);
+ return lsio.get_date(year);
+ }
+ }
+
+ static time_duration_type dst_offset()
+ {
+ return time_duration_type(0,dst_length_minutes,0);
+ }
+
+ private:
+
+
+ };
+
+ //! Used for local time adjustments in places that don't use dst
+ template<class date_type_, class time_duration_type_>
+ class null_dst_rules
+ {
+ public:
+ typedef time_duration_type_ time_duration_type;
+ typedef date_type_ date_type;
+
+
+ //! Calculates if the given local time is dst or not
+ /*! @retval Always is_not_in_dst since this is for zones without dst
+ */
+ static time_is_dst_result local_is_dst(const date_type&,
+ const time_duration_type&)
+ {
+ return is_not_in_dst;
+ }
+
+ //! Calculates if the given utc time is in dst
+ static time_is_dst_result utc_is_dst(const date_type&,
+ const time_duration_type&)
+ {
+ return is_not_in_dst;
+ }
+
+ static bool is_dst_boundary_day(date_type /*d*/)
+ {
+ return false;
+ }
+
+ static time_duration_type dst_offset()
+ {
+ return time_duration_type(0,0,0);
+ }
+
+ };
+
+
+ } } //namespace date_time
+
+
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/date_time/dst_transition_generators.hpp b/src/third_party/boost-1.70.0/boost/date_time/dst_transition_generators.hpp
new file mode 100644
index 00000000000..9780bbb30be
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/date_time/dst_transition_generators.hpp
@@ -0,0 +1,75 @@
+/* Copyright (c) 2002,2003,2005 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
+ */
+#ifndef DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__
+#define DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__
+
+
+
+namespace boost {
+namespace date_time {
+
+ //! Defines base interface for calculating start and end date of daylight savings
+ template<class date_type>
+ class dst_day_calc_rule
+ {
+ public:
+ typedef typename date_type::year_type year_type;
+ virtual ~dst_day_calc_rule() {}
+ virtual date_type start_day(year_type y) const=0;
+ virtual std::string start_rule_as_string() const=0;
+ virtual date_type end_day(year_type y) const=0;
+ virtual std::string end_rule_as_string() const=0;
+
+ };
+
+ //! Canonical form for a class that provides day rule calculation
+ /*! This class is used to generate specific sets of dst rules
+ *
+ *@tparam spec Provides a specifiction of the function object types used
+ * to generate start and end days of daylight savings as well
+ * as the date type.
+ */
+ template<class spec>
+ class day_calc_dst_rule : public dst_day_calc_rule<typename spec::date_type>
+ {
+ public:
+ typedef typename spec::date_type date_type;
+ typedef typename date_type::year_type year_type;
+ typedef typename spec::start_rule start_rule;
+ typedef typename spec::end_rule end_rule;
+ day_calc_dst_rule(start_rule dst_start,
+ end_rule dst_end) :
+ dst_start_(dst_start),
+ dst_end_(dst_end)
+ {}
+ virtual date_type start_day(year_type y) const
+ {
+ return dst_start_.get_date(y);
+ }
+ virtual std::string start_rule_as_string() const
+ {
+ return dst_start_.to_string();
+ }
+ virtual date_type end_day(year_type y) const
+ {
+ return dst_end_.get_date(y);
+ }
+ virtual std::string end_rule_as_string() const
+ {
+ return dst_end_.to_string();
+ }
+ private:
+ start_rule dst_start_;
+ end_rule dst_end_;
+ };
+
+
+} }//namespace
+
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/date_time/filetime_functions.hpp b/src/third_party/boost-1.70.0/boost/date_time/filetime_functions.hpp
index f5ef7bfb5e5..f5ef7bfb5e5 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/filetime_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/filetime_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/format_date_parser.hpp b/src/third_party/boost-1.70.0/boost/date_time/format_date_parser.hpp
index 0602e90f3f3..0602e90f3f3 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/format_date_parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/format_date_parser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/conversion.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/conversion.hpp
index c844c4e34b1..c844c4e34b1 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/conversion.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/conversion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/formatters.hpp
index d486ef0f4c6..d486ef0f4c6 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/formatters.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters_limited.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/formatters_limited.hpp
index 755f5aa68bb..755f5aa68bb 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters_limited.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/formatters_limited.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_calendar.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_calendar.hpp
index 16e47c1df4e..16e47c1df4e 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_calendar.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_calendar.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_date.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_date.hpp
index 4f56bedf1af..4f56bedf1af 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_date.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_date.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_day.hpp
index 014abfbda08..014abfbda08 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_day.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day_of_year.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_day_of_year.hpp
index 3f753e1d6a1..3f753e1d6a1 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day_of_year.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_day_of_year.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_duration.hpp
index 3b1a4978186..3b1a4978186 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_duration.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration_types.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_duration_types.hpp
index e6611e680c8..e6611e680c8 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_duration_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_facet.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_facet.hpp
index 5352df1398a..5352df1398a 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_month.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_month.hpp
index be0f93e13b4..be0f93e13b4 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_month.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_month.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_serialize.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_serialize.hpp
index 6740a0c50f8..6740a0c50f8 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_serialize.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_serialize.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_weekday.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_weekday.hpp
index 815051ede48..815051ede48 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_weekday.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_weekday.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_year.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_year.hpp
index a278bdaa037..a278bdaa037 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_year.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_year.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_ymd.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_ymd.hpp
index 503666c31d8..503666c31d8 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_ymd.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/greg_ymd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian.hpp
index 47d545eccd2..47d545eccd2 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_io.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian_io.hpp
index 49e5d41ed80..49e5d41ed80 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_types.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian_types.hpp
index d50e9cc7d78..d50e9cc7d78 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/gregorian_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian/parsers.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian/parsers.hpp
index afc6537c3bf..afc6537c3bf 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian/parsers.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian/parsers.hpp
diff --git a/src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.hpp b/src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.hpp
new file mode 100644
index 00000000000..db54a34b147
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.hpp
@@ -0,0 +1,71 @@
+#ifndef DATE_TIME_GREGORIAN_CALENDAR_HPP__
+#define DATE_TIME_GREGORIAN_CALENDAR_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/date_time/compiler_config.hpp>
+
+namespace boost {
+namespace date_time {
+
+
+ //! An implementation of the Gregorian calendar
+ /*! This is a parameterized implementation of a proleptic Gregorian Calendar that
+ can be used in the creation of date systems or just to perform calculations.
+ All the methods of this class are static functions, so the intent is to
+ never create instances of this class.
+ @tparam ymd_type_ Struct type representing the year, month, day. The ymd_type must
+ define a of types for the year, month, and day. These types need to be
+ arithmetic types.
+ @tparam date_int_type_ Underlying type for the date count. Must be an arithmetic type.
+ */
+ template<typename ymd_type_, typename date_int_type_>
+ class BOOST_SYMBOL_VISIBLE gregorian_calendar_base {
+ public:
+ //! define a type a date split into components
+ typedef ymd_type_ ymd_type;
+ //! define a type for representing months
+ typedef typename ymd_type::month_type month_type;
+ //! define a type for representing days
+ typedef typename ymd_type::day_type day_type;
+ //! Type to hold a stand alone year value (eg: 2002)
+ typedef typename ymd_type::year_type year_type;
+ //! Define the integer type to use for internal calculations
+ typedef date_int_type_ date_int_type;
+
+
+ static unsigned short day_of_week(const ymd_type& ymd);
+ static int week_number(const ymd_type&ymd);
+ //static unsigned short day_of_year(date_int_type);
+ static date_int_type day_number(const ymd_type& ymd);
+ static date_int_type julian_day_number(const ymd_type& ymd);
+ static date_int_type modjulian_day_number(const ymd_type& ymd);
+ static ymd_type from_day_number(date_int_type);
+ static ymd_type from_julian_day_number(date_int_type);
+ static ymd_type from_modjulian_day_number(date_int_type);
+ static bool is_leap_year(year_type);
+ static unsigned short end_of_month_day(year_type y, month_type m);
+ static ymd_type epoch();
+ static unsigned short days_in_week();
+
+ };
+
+
+
+} } //namespace
+
+#ifndef NO_BOOST_DATE_TIME_INLINE
+#include "boost/date_time/gregorian_calendar.ipp"
+#endif
+
+
+
+#endif
+
+
diff --git a/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.ipp b/src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.ipp
index 7b43ea85126..7b43ea85126 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.ipp
+++ b/src/third_party/boost-1.70.0/boost/date_time/gregorian_calendar.ipp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/int_adapter.hpp b/src/third_party/boost-1.70.0/boost/date_time/int_adapter.hpp
index 6ee7712fab2..6ee7712fab2 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/int_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/int_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/iso_format.hpp b/src/third_party/boost-1.70.0/boost/date_time/iso_format.hpp
index 2e7942d8ba6..2e7942d8ba6 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/iso_format.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/iso_format.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/conversion.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/conversion.hpp
index aa0b72c6c4e..aa0b72c6c4e 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/conversion.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/conversion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/custom_time_zone.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/custom_time_zone.hpp
index f82d87a7d7c..f82d87a7d7c 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/custom_time_zone.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/custom_time_zone.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/date_duration_operators.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/date_duration_operators.hpp
index e0f170fd7c9..e0f170fd7c9 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/date_duration_operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/date_duration_operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/dst_transition_day_rules.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/dst_transition_day_rules.hpp
index f372e44a45a..f372e44a45a 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/dst_transition_day_rules.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/dst_transition_day_rules.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_date_time.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_date_time.hpp
index e88a231b542..e88a231b542 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_date_time.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_date_time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_time.hpp
index 880989b6e7a..880989b6e7a 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_io.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_time_io.hpp
index c32b81e407d..c32b81e407d 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_time_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_types.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_time_types.hpp
index df2d08cb496..df2d08cb496 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/local_time_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/posix_time_zone.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/posix_time_zone.hpp
index 9c2c04ba416..9c2c04ba416 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/posix_time_zone.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/posix_time_zone.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time/tz_database.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time/tz_database.hpp
index 0c6fbbf9ea8..0c6fbbf9ea8 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time/tz_database.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time/tz_database.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_time_adjustor.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_time_adjustor.hpp
index 64134f3b285..64134f3b285 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_time_adjustor.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_time_adjustor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/local_timezone_defs.hpp b/src/third_party/boost-1.70.0/boost/date_time/local_timezone_defs.hpp
index 5564a110808..5564a110808 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/local_timezone_defs.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/local_timezone_defs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/locale_config.hpp b/src/third_party/boost-1.70.0/boost/date_time/locale_config.hpp
index 26a928f7bcd..26a928f7bcd 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/locale_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/locale_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/microsec_time_clock.hpp b/src/third_party/boost-1.70.0/boost/date_time/microsec_time_clock.hpp
index 42a918b53a6..42a918b53a6 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/microsec_time_clock.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/microsec_time_clock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/parse_format_base.hpp b/src/third_party/boost-1.70.0/boost/date_time/parse_format_base.hpp
index d4b2f5975bf..d4b2f5975bf 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/parse_format_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/parse_format_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/period.hpp b/src/third_party/boost-1.70.0/boost/date_time/period.hpp
index 13011af2715..13011af2715 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/period.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/period.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/period_formatter.hpp b/src/third_party/boost-1.70.0/boost/date_time/period_formatter.hpp
index 96106128341..96106128341 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/period_formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/period_formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/period_parser.hpp b/src/third_party/boost-1.70.0/boost/date_time/period_parser.hpp
index 83742348971..83742348971 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/period_parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/period_parser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/conversion.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/conversion.hpp
index cdff4b76fd1..cdff4b76fd1 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/conversion.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/conversion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/date_duration_operators.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/date_duration_operators.hpp
index f3c61d7a954..f3c61d7a954 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/date_duration_operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/date_duration_operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time.hpp
index aecf8a818d7..aecf8a818d7 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_config.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_config.hpp
index 996afcae595..996afcae595 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_config.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/date_time/posix_time/posix_time_duration.hpp
index c69236faeb2..c69236faeb2 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_duration.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_duration.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_io.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_io.hpp
index 90b02a69197..90b02a69197 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_legacy_io.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_legacy_io.hpp
index b31fb987233..b31fb987233 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_legacy_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_legacy_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_system.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_system.hpp
index 84c21ca00f8..84c21ca00f8 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_system.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_system.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_types.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_types.hpp
index f2488f8bed6..f2488f8bed6 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/posix_time_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/ptime.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/ptime.hpp
index c97edf9cfbf..c97edf9cfbf 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/ptime.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/ptime.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_formatters.hpp
index ce195682287..ce195682287 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_formatters.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters_limited.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_formatters_limited.hpp
index c74fcfa0b03..c74fcfa0b03 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters_limited.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_formatters_limited.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_parsers.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_parsers.hpp
index 24f20704aa1..24f20704aa1 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_parsers.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_parsers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_period.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_period.hpp
index 7c6095b8965..7c6095b8965 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_period.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_period.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_serialize.hpp b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_serialize.hpp
index 71f60b3741e..71f60b3741e 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_serialize.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/posix_time/time_serialize.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/special_defs.hpp b/src/third_party/boost-1.70.0/boost/date_time/special_defs.hpp
index 5a757be1031..5a757be1031 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/special_defs.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/special_defs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/special_values_formatter.hpp b/src/third_party/boost-1.70.0/boost/date_time/special_values_formatter.hpp
index c8653c1f485..c8653c1f485 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/special_values_formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/special_values_formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/special_values_parser.hpp b/src/third_party/boost-1.70.0/boost/date_time/special_values_parser.hpp
index 43748c74cd4..43748c74cd4 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/special_values_parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/special_values_parser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/string_convert.hpp b/src/third_party/boost-1.70.0/boost/date_time/string_convert.hpp
index 30be3567a52..30be3567a52 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/string_convert.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/string_convert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/string_parse_tree.hpp b/src/third_party/boost-1.70.0/boost/date_time/string_parse_tree.hpp
index a241e8553c0..a241e8553c0 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/string_parse_tree.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/string_parse_tree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/strings_from_facet.hpp b/src/third_party/boost-1.70.0/boost/date_time/strings_from_facet.hpp
index 800919a0b52..800919a0b52 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/strings_from_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/strings_from_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time.hpp b/src/third_party/boost-1.70.0/boost/date_time/time.hpp
index 632f10d7f28..632f10d7f28 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_clock.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_clock.hpp
index a64a5b81b93..a64a5b81b93 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_clock.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_clock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_defs.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_defs.hpp
index 852207e6857..852207e6857 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_defs.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_defs.hpp
diff --git a/src/third_party/boost-1.70.0/boost/date_time/time_duration.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_duration.hpp
new file mode 100644
index 00000000000..c52779be557
--- /dev/null
+++ b/src/third_party/boost-1.70.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.
+
+ @tparam T The subclass type
+ @tparam 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.69.0/boost/date_time/time_facet.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_facet.hpp
index 1e07093ffcf..1e07093ffcf 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_formatting_streams.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_formatting_streams.hpp
index f69f87a348b..f69f87a348b 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_formatting_streams.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_formatting_streams.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_iterator.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_iterator.hpp
index 64439363d7e..64439363d7e 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_parsing.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_parsing.hpp
index 5fa7e8d2c58..5fa7e8d2c58 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_parsing.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_parsing.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_resolution_traits.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_resolution_traits.hpp
index b622488005f..b622488005f 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_resolution_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_resolution_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_system_counted.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_system_counted.hpp
index af27aad36e5..af27aad36e5 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_system_counted.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_system_counted.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_system_split.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_system_split.hpp
index 8e1efbe4ca8..8e1efbe4ca8 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/time_system_split.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_system_split.hpp
diff --git a/src/third_party/boost-1.70.0/boost/date_time/time_zone_base.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_zone_base.hpp
new file mode 100644
index 00000000000..c1b08376a4a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_zone_base.hpp
@@ -0,0 +1,100 @@
+#ifndef _DATE_TIME_TIME_ZONE_BASE__
+#define _DATE_TIME_TIME_ZONE_BASE__
+
+/* Copyright (c) 2003-2005 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 <string>
+#include <sstream>
+#include <boost/date_time/compiler_config.hpp>
+
+namespace boost {
+namespace date_time {
+
+
+
+ //! Interface class for dynamic time zones.
+ /*! This class represents the base interface for all timezone
+ * representations. Subclasses may provide different systems
+ * for identifying a particular zone. For example some may
+ * provide a geographical based zone construction while others
+ * may specify the offset from GMT. Another possible implementation
+ * would be to convert from POSIX timezone strings. Regardless of
+ * the construction technique, this is the interface that these
+ * time zone types must provide.
+ *
+ * Note that this class is intended to be used as a shared
+ * resource (hence the derivation from boost::counted_base.
+ */
+ template<typename time_type, typename CharT>
+ class BOOST_SYMBOL_VISIBLE time_zone_base {
+ public:
+ typedef CharT char_type;
+ typedef std::basic_string<CharT> string_type;
+ typedef std::basic_ostringstream<CharT> stringstream_type;
+ typedef typename time_type::date_type::year_type year_type;
+ typedef typename time_type::time_duration_type time_duration_type;
+
+ time_zone_base() {}
+ virtual ~time_zone_base() {}
+ //!String for the timezone when in daylight savings (eg: EDT)
+ virtual string_type dst_zone_abbrev() const=0;
+ //!String for the zone when not in daylight savings (eg: EST)
+ virtual string_type std_zone_abbrev() const=0;
+ //!String for the timezone when in daylight savings (eg: Eastern Daylight Time)
+ virtual string_type dst_zone_name() const=0;
+ //!String for the zone when not in daylight savings (eg: Eastern Standard Time)
+ virtual string_type std_zone_name() const=0;
+ //! True if zone uses daylight savings adjustments otherwise false
+ virtual bool has_dst() const=0;
+ //! Local time that DST starts -- undefined if has_dst is false
+ virtual time_type dst_local_start_time(year_type y) const=0;
+ //! Local time that DST ends -- undefined if has_dst is false
+ virtual time_type dst_local_end_time(year_type y) const=0;
+ //! Base offset from UTC for zone (eg: -07:30:00)
+ virtual time_duration_type base_utc_offset() const=0;
+ //! Adjustment forward or back made while DST is in effect
+ virtual time_duration_type dst_offset() const=0;
+ //! Returns a POSIX time_zone string for this object
+ virtual string_type to_posix_string() const =0;
+
+ private:
+
+ };
+
+
+ //! Structure which holds the time offsets associated with daylight savings time
+ /*!
+ *@tparam time_duration_type A type used to represent the offset
+ */
+ template<class time_duration_type>
+ class dst_adjustment_offsets
+ {
+ public:
+ dst_adjustment_offsets(const time_duration_type& dst_adjust,
+ const time_duration_type& dst_start_offset,
+ const time_duration_type& dst_end_offset) :
+ dst_adjust_(dst_adjust),
+ dst_start_offset_(dst_start_offset),
+ dst_end_offset_(dst_end_offset)
+ {}
+
+ //! Amount DST adjusts the clock eg: plus one hour
+ time_duration_type dst_adjust_;
+ //! Time past midnight on start transition day that dst starts
+ time_duration_type dst_start_offset_;
+ //! Time past midnight on end transition day that dst ends
+ time_duration_type dst_end_offset_;
+ };
+
+
+} } //namespace date_time
+
+
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/date_time/time_zone_names.hpp b/src/third_party/boost-1.70.0/boost/date_time/time_zone_names.hpp
new file mode 100644
index 00000000000..80719735f44
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/date_time/time_zone_names.hpp
@@ -0,0 +1,98 @@
+#ifndef DATE_TIME_TIME_ZONE_NAMES_HPP__
+#define DATE_TIME_TIME_ZONE_NAMES_HPP__
+
+/* Copyright (c) 2002-2003,2005 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 <string>
+
+namespace boost {
+namespace date_time {
+
+ template<class CharT>
+ struct default_zone_names {
+ public:
+ typedef CharT char_type;
+ static const char_type standard_name[9];
+ static const char_type standard_abbrev[11];
+ static const char_type non_dst_identifier[7];
+ };
+ template <class CharT>
+ const typename default_zone_names<CharT>::char_type
+ default_zone_names<CharT>::standard_name[9] =
+ {'s','t','d','_','n','a','m','e'};
+
+ template <class CharT>
+ const typename default_zone_names<CharT>::char_type
+ default_zone_names<CharT>::standard_abbrev[11] =
+ {'s','t','d','_','a','b','b','r','e','v'};
+
+ template <class CharT>
+ const typename default_zone_names<CharT>::char_type
+ default_zone_names<CharT>::non_dst_identifier[7] =
+ {'n','o','-','d','s','t'};
+
+ //! Base type that holds various string names for timezone output.
+ /*! Class that holds various types of strings used for timezones.
+ * For example, for the western United States there is the full
+ * name: Pacific Standard Time and the abbreviated name: PST.
+ * During daylight savings there are additional names:
+ * Pacific Daylight Time and PDT.
+ *@tparam CharT Allows class to support different character types
+ */
+ template<class CharT>
+ class time_zone_names_base
+ {
+ public:
+ typedef std::basic_string<CharT> string_type;
+ time_zone_names_base() :
+ std_zone_name_(default_zone_names<CharT>::standard_name),
+ std_zone_abbrev_(default_zone_names<CharT>::standard_abbrev),
+ dst_zone_name_(default_zone_names<CharT>::non_dst_identifier),
+ dst_zone_abbrev_(default_zone_names<CharT>::non_dst_identifier)
+ {}
+ time_zone_names_base(const string_type& std_zone_name_str,
+ const string_type& std_zone_abbrev_str,
+ const string_type& dst_zone_name_str,
+ const string_type& dst_zone_abbrev_str) :
+ std_zone_name_(std_zone_name_str),
+ std_zone_abbrev_(std_zone_abbrev_str),
+ dst_zone_name_(dst_zone_name_str),
+ dst_zone_abbrev_(dst_zone_abbrev_str)
+ {}
+ string_type dst_zone_abbrev() const
+ {
+ return dst_zone_abbrev_;
+ }
+ string_type std_zone_abbrev() const
+ {
+ return std_zone_abbrev_;
+ }
+ string_type dst_zone_name() const
+ {
+ return dst_zone_name_;
+ }
+ string_type std_zone_name() const
+ {
+ return std_zone_name_;
+ }
+ private:
+ string_type std_zone_name_;
+ string_type std_zone_abbrev_;
+ string_type dst_zone_name_;
+ string_type dst_zone_abbrev_;
+
+ };
+
+ //! Specialization of timezone names for standard char.
+ //typedef time_zone_names_base<char> time_zone_names;
+
+} } //namespace
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/date_time/tz_db_base.hpp b/src/third_party/boost-1.70.0/boost/date_time/tz_db_base.hpp
index 5bf5b8af827..5bf5b8af827 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/tz_db_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/tz_db_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/wrapping_int.hpp b/src/third_party/boost-1.70.0/boost/date_time/wrapping_int.hpp
index 6f869d30234..6f869d30234 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/wrapping_int.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/wrapping_int.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/year_month_day.hpp b/src/third_party/boost-1.70.0/boost/date_time/year_month_day.hpp
index 6355ab27118..6355ab27118 100644
--- a/src/third_party/boost-1.69.0/boost/date_time/year_month_day.hpp
+++ b/src/third_party/boost-1.70.0/boost/date_time/year_month_day.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/atomic_count.hpp b/src/third_party/boost-1.70.0/boost/detail/atomic_count.hpp
index 5411c7ae990..5411c7ae990 100644
--- a/src/third_party/boost-1.69.0/boost/detail/atomic_count.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/atomic_count.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/basic_pointerbuf.hpp b/src/third_party/boost-1.70.0/boost/detail/basic_pointerbuf.hpp
index 85618f92abe..85618f92abe 100644
--- a/src/third_party/boost-1.69.0/boost/detail/basic_pointerbuf.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/basic_pointerbuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/bitmask.hpp b/src/third_party/boost-1.70.0/boost/detail/bitmask.hpp
index 63d4fac0c26..63d4fac0c26 100644
--- a/src/third_party/boost-1.69.0/boost/detail/bitmask.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/bitmask.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/call_traits.hpp b/src/third_party/boost-1.70.0/boost/detail/call_traits.hpp
index 36dea0003a8..36dea0003a8 100644
--- a/src/third_party/boost-1.69.0/boost/detail/call_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/detail/compressed_pair.hpp
index b090a727dee..b090a727dee 100644
--- a/src/third_party/boost-1.69.0/boost/detail/compressed_pair.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/compressed_pair.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/container_fwd.hpp b/src/third_party/boost-1.70.0/boost/detail/container_fwd.hpp
index 04ce972738e..04ce972738e 100644
--- a/src/third_party/boost-1.69.0/boost/detail/container_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/container_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/endian.hpp b/src/third_party/boost-1.70.0/boost/detail/endian.hpp
index f576c26b89a..f576c26b89a 100644
--- a/src/third_party/boost-1.69.0/boost/detail/endian.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/endian.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/fenv.hpp b/src/third_party/boost-1.70.0/boost/detail/fenv.hpp
index b268f5c1ccd..b268f5c1ccd 100644
--- a/src/third_party/boost-1.69.0/boost/detail/fenv.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/detail/indirect_traits.hpp
index 94e9b34dc2f..94e9b34dc2f 100644
--- a/src/third_party/boost-1.69.0/boost/detail/indirect_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/indirect_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/interlocked.hpp b/src/third_party/boost-1.70.0/boost/detail/interlocked.hpp
index b746cccff18..b746cccff18 100644
--- a/src/third_party/boost-1.69.0/boost/detail/interlocked.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/interlocked.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp b/src/third_party/boost-1.70.0/boost/detail/is_incrementable.hpp
index fa70cf2ed79..fa70cf2ed79 100644
--- a/src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/is_incrementable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/iterator.hpp b/src/third_party/boost-1.70.0/boost/detail/iterator.hpp
index 2498ef448ff..2498ef448ff 100644
--- a/src/third_party/boost-1.69.0/boost/detail/iterator.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/detail/lcast_precision.hpp
index 84bf1222b1f..84bf1222b1f 100644
--- a/src/third_party/boost-1.69.0/boost/detail/lcast_precision.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/lcast_precision.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/lightweight_main.hpp b/src/third_party/boost-1.70.0/boost/detail/lightweight_main.hpp
index 17053097806..17053097806 100644
--- a/src/third_party/boost-1.69.0/boost/detail/lightweight_main.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/lightweight_main.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/lightweight_mutex.hpp b/src/third_party/boost-1.70.0/boost/detail/lightweight_mutex.hpp
index b7a7f6dd4ed..b7a7f6dd4ed 100644
--- a/src/third_party/boost-1.69.0/boost/detail/lightweight_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/lightweight_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/lightweight_test.hpp b/src/third_party/boost-1.70.0/boost/detail/lightweight_test.hpp
index 9fece8ab7ea..9fece8ab7ea 100644
--- a/src/third_party/boost-1.69.0/boost/detail/lightweight_test.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/lightweight_test.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/lightweight_test_report.hpp b/src/third_party/boost-1.70.0/boost/detail/lightweight_test_report.hpp
index 1511ba9d149..1511ba9d149 100644
--- a/src/third_party/boost-1.69.0/boost/detail/lightweight_test_report.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/lightweight_test_report.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/lightweight_thread.hpp b/src/third_party/boost-1.70.0/boost/detail/lightweight_thread.hpp
index c2930d591ae..c2930d591ae 100644
--- a/src/third_party/boost-1.69.0/boost/detail/lightweight_thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/lightweight_thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/no_exceptions_support.hpp b/src/third_party/boost-1.70.0/boost/detail/no_exceptions_support.hpp
index 7d17454a732..7d17454a732 100644
--- a/src/third_party/boost-1.69.0/boost/detail/no_exceptions_support.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/detail/numeric_traits.hpp
index a62affb347c..a62affb347c 100644
--- a/src/third_party/boost-1.69.0/boost/detail/numeric_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/numeric_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/quick_allocator.hpp b/src/third_party/boost-1.70.0/boost/detail/quick_allocator.hpp
index d54b3a792d7..d54b3a792d7 100644
--- a/src/third_party/boost-1.69.0/boost/detail/quick_allocator.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/detail/reference_content.hpp
index c93ea6fdd01..c93ea6fdd01 100644
--- a/src/third_party/boost-1.69.0/boost/detail/reference_content.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/reference_content.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/scoped_enum_emulation.hpp b/src/third_party/boost-1.70.0/boost/detail/scoped_enum_emulation.hpp
index 1c7bc23c1c3..1c7bc23c1c3 100644
--- a/src/third_party/boost-1.69.0/boost/detail/scoped_enum_emulation.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/scoped_enum_emulation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/select_type.hpp b/src/third_party/boost-1.70.0/boost/detail/select_type.hpp
index c13946f3384..c13946f3384 100644
--- a/src/third_party/boost-1.69.0/boost/detail/select_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/select_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/sp_typeinfo.hpp b/src/third_party/boost-1.70.0/boost/detail/sp_typeinfo.hpp
index 4e4de55b05c..4e4de55b05c 100644
--- a/src/third_party/boost-1.69.0/boost/detail/sp_typeinfo.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/detail/utf8_codecvt_facet.hpp
index ad714c09e8e..ad714c09e8e 100644
--- a/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/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.70.0/boost/detail/utf8_codecvt_facet.ipp
index 24eb61aa2d9..24eb61aa2d9 100644
--- a/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.ipp
+++ b/src/third_party/boost-1.70.0/boost/detail/utf8_codecvt_facet.ipp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/detail/deprecated_namespace.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/detail/deprecated_namespace.hpp
index 40c9152704b..40c9152704b 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/detail/deprecated_namespace.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/detail/deprecated_namespace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_process.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/get_current_process.hpp
index b6a79150281..b6a79150281 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_process.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/get_current_process.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_thread.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/get_current_thread.hpp
index f9a27c3e6ec..f9a27c3e6ec 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/get_current_thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/get_last_error.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/get_last_error.hpp
index f76a008e080..f76a008e080 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/get_last_error.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/get_last_error.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/get_process_times.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/get_process_times.hpp
index 6babb3919d8..6babb3919d8 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/get_process_times.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/get_process_times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/get_thread_times.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/get_thread_times.hpp
index 96f1fac8f37..96f1fac8f37 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/get_thread_times.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/get_thread_times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/time.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/time.hpp
index a6d728a5a03..a6d728a5a03 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/time.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/winapi/timers.hpp b/src/third_party/boost-1.70.0/boost/detail/winapi/timers.hpp
index 4b874e249d1..4b874e249d1 100644
--- a/src/third_party/boost-1.69.0/boost/detail/winapi/timers.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/winapi/timers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/workaround.hpp b/src/third_party/boost-1.70.0/boost/detail/workaround.hpp
index fb961158804..fb961158804 100644
--- a/src/third_party/boost-1.69.0/boost/detail/workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/detail/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset.hpp b/src/third_party/boost-1.70.0/boost/dynamic_bitset.hpp
index 29e103862eb..29e103862eb 100644
--- a/src/third_party/boost-1.69.0/boost/dynamic_bitset.hpp
+++ b/src/third_party/boost-1.70.0/boost/dynamic_bitset.hpp
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset/config.hpp b/src/third_party/boost-1.70.0/boost/dynamic_bitset/config.hpp
index 1e6d9f7e471..1e6d9f7e471 100644
--- a/src/third_party/boost-1.69.0/boost/dynamic_bitset/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/dynamic_bitset/config.hpp
diff --git a/src/third_party/boost-1.70.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp b/src/third_party/boost-1.70.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp
new file mode 100644
index 00000000000..377d73f829a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp
@@ -0,0 +1,300 @@
+// -----------------------------------------------------------
+//
+// 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))
+
+/*
+ per https://github.com/boostorg/dynamic_bitset/issues/33
+ this code does not support older cpus properly...
+ it needs to check for cpuid support to avoid undefined behavior
+
+ 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.70.0/boost/dynamic_bitset/detail/lowest_bit.hpp
index 42f6fb6174f..42f6fb6174f 100644
--- a/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/lowest_bit.hpp
+++ b/src/third_party/boost-1.70.0/boost/dynamic_bitset/detail/lowest_bit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp b/src/third_party/boost-1.70.0/boost/dynamic_bitset/dynamic_bitset.hpp
index a128a698455..a128a698455 100644
--- a/src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp
+++ b/src/third_party/boost-1.70.0/boost/dynamic_bitset/dynamic_bitset.hpp
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset_fwd.hpp b/src/third_party/boost-1.70.0/boost/dynamic_bitset_fwd.hpp
index 7bb6e89743d..7bb6e89743d 100644
--- a/src/third_party/boost-1.69.0/boost/dynamic_bitset_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/dynamic_bitset_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/enable_shared_from_this.hpp b/src/third_party/boost-1.70.0/boost/enable_shared_from_this.hpp
index 18b938d5d00..18b938d5d00 100644
--- a/src/third_party/boost-1.69.0/boost/enable_shared_from_this.hpp
+++ b/src/third_party/boost-1.70.0/boost/enable_shared_from_this.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/current_exception_cast.hpp b/src/third_party/boost-1.70.0/boost/exception/current_exception_cast.hpp
index 5d81f00b00b..5d81f00b00b 100644
--- a/src/third_party/boost-1.69.0/boost/exception/current_exception_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/current_exception_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/clone_current_exception.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/clone_current_exception.hpp
index 6fc1374737e..6fc1374737e 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/clone_current_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/clone_current_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/error_info_impl.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/error_info_impl.hpp
index 6c48d61ab35..6c48d61ab35 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/error_info_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/error_info_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/exception_ptr.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/exception_ptr.hpp
index 8e19f0d9df3..8e19f0d9df3 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/exception_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/exception_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/is_output_streamable.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/is_output_streamable.hpp
index 10e5c5163ee..10e5c5163ee 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/is_output_streamable.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/is_output_streamable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/object_hex_dump.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/object_hex_dump.hpp
index 267bf0bf3e1..267bf0bf3e1 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/object_hex_dump.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/object_hex_dump.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/shared_ptr.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/shared_ptr.hpp
index 51febe8c8fb..51febe8c8fb 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/shared_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/shared_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/detail/type_info.hpp b/src/third_party/boost-1.70.0/boost/exception/detail/type_info.hpp
index 739ac5748e2..739ac5748e2 100644
--- a/src/third_party/boost-1.69.0/boost/exception/detail/type_info.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/detail/type_info.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/diagnostic_information.hpp b/src/third_party/boost-1.70.0/boost/exception/diagnostic_information.hpp
index 48f06a0fb98..48f06a0fb98 100644
--- a/src/third_party/boost-1.69.0/boost/exception/diagnostic_information.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/exception/exception.hpp
index d5c22c4ca23..d5c22c4ca23 100644
--- a/src/third_party/boost-1.69.0/boost/exception/exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/get_error_info.hpp b/src/third_party/boost-1.70.0/boost/exception/get_error_info.hpp
index 831717df596..831717df596 100644
--- a/src/third_party/boost-1.69.0/boost/exception/get_error_info.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/get_error_info.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/info.hpp b/src/third_party/boost-1.70.0/boost/exception/info.hpp
index f7ac50ecfcd..f7ac50ecfcd 100644
--- a/src/third_party/boost-1.69.0/boost/exception/info.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/info.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/to_string.hpp b/src/third_party/boost-1.70.0/boost/exception/to_string.hpp
index 51425b10d16..51425b10d16 100644
--- a/src/third_party/boost-1.69.0/boost/exception/to_string.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/to_string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/to_string_stub.hpp b/src/third_party/boost-1.70.0/boost/exception/to_string_stub.hpp
index 8ff5e47fd63..8ff5e47fd63 100644
--- a/src/third_party/boost-1.69.0/boost/exception/to_string_stub.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception/to_string_stub.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception_ptr.hpp b/src/third_party/boost-1.70.0/boost/exception_ptr.hpp
index d48cce9dc69..d48cce9dc69 100644
--- a/src/third_party/boost-1.69.0/boost/exception_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/exception_ptr.hpp
diff --git a/src/third_party/boost-1.70.0/boost/filesystem.hpp b/src/third_party/boost-1.70.0/boost/filesystem.hpp
new file mode 100644
index 00000000000..86d23ac65dd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem.hpp
@@ -0,0 +1,21 @@
+// boost/filesystem.hpp --------------------------------------------------------------//
+
+// 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
+
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_FILESYSTEM_FILESYSTEM_HPP
+#define BOOST_FILESYSTEM_FILESYSTEM_HPP
+
+# include <boost/filesystem/config.hpp>
+# include <boost/filesystem/path.hpp>
+# include <boost/filesystem/operations.hpp>
+# include <boost/filesystem/convenience.hpp>
+# include <boost/filesystem/string_file.hpp>
+
+#endif // BOOST_FILESYSTEM_FILESYSTEM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/config.hpp b/src/third_party/boost-1.70.0/boost/filesystem/config.hpp
new file mode 100644
index 00000000000..c4a1724e7fe
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/config.hpp
@@ -0,0 +1,110 @@
+// boost/filesystem/v3/config.hpp ----------------------------------------------------//
+
+// Copyright Beman Dawes 2003
+
+// 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_CONFIG_HPP
+#define BOOST_FILESYSTEM3_CONFIG_HPP
+
+# if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION != 3
+# error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
+# endif
+
+# if !defined(BOOST_FILESYSTEM_VERSION)
+# define BOOST_FILESYSTEM_VERSION 3
+# endif
+
+#define BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions
+
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+
+#include <boost/config.hpp>
+#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
+#include <boost/detail/workaround.hpp>
+
+// BOOST_FILESYSTEM_DEPRECATED needed for source compiles -----------------------------//
+
+# ifdef BOOST_FILESYSTEM_SOURCE
+# define BOOST_FILESYSTEM_DEPRECATED
+# undef BOOST_FILESYSTEM_NO_DEPRECATED // fixes #9454, src bld fails if NO_DEP defined
+# endif
+
+// throw an exception ----------------------------------------------------------------//
+//
+// Exceptions were originally thrown via boost::throw_exception().
+// As throw_exception() became more complex, it caused user error reporting
+// to be harder to interpret, since the exception reported became much more complex.
+// The immediate fix was to throw directly, wrapped in a macro to make any later change
+// easier.
+
+#define BOOST_FILESYSTEM_THROW(EX) throw EX
+
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+
+// normalize macros ------------------------------------------------------------------//
+
+#if !defined(BOOST_FILESYSTEM_DYN_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) \
+ && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
+# define BOOST_FILESYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_FILESYSTEM_DYN_LINK)
+# define BOOST_FILESYSTEM_DYN_LINK
+#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK)
+# define BOOST_FILESYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_FILESYSTEM_DYN_LINK) && defined(BOOST_FILESYSTEM_STATIC_LINK)
+# error Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB)
+# define BOOST_FILESYSTEM_NO_LIB
+#endif
+
+// enable dynamic linking ------------------------------------------------------------//
+
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
+# if defined(BOOST_FILESYSTEM_SOURCE)
+# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_EXPORT
+# else
+# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_IMPORT
+# endif
+#else
+# define BOOST_FILESYSTEM_DECL
+#endif
+
+// enable automatic library variant selection ----------------------------------------//
+
+#if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) \
+ && !defined(BOOST_FILESYSTEM_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_filesystem
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_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_FILESYSTEM3_CONFIG_HPP
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/convenience.hpp b/src/third_party/boost-1.70.0/boost/filesystem/convenience.hpp
new file mode 100644
index 00000000000..b1290c86d7a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/convenience.hpp
@@ -0,0 +1,58 @@
+// boost/filesystem/convenience.hpp ----------------------------------------//
+
+// Copyright Beman Dawes, 2002-2005
+// Copyright Vladimir Prus, 2002
+// 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 library home page at http://www.boost.org/libs/filesystem
+
+//----------------------------------------------------------------------------//
+
+#ifndef BOOST_FILESYSTEM3_CONVENIENCE_HPP
+#define BOOST_FILESYSTEM3_CONVENIENCE_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/operations.hpp>
+#include <boost/system/error_code.hpp>
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+namespace boost
+{
+ namespace filesystem
+ {
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+
+ inline std::string extension(const path & p)
+ {
+ return p.extension().string();
+ }
+
+ inline std::string basename(const path & p)
+ {
+ return p.stem().string();
+ }
+
+ inline path change_extension( const path & p, const path & new_extension )
+ {
+ path new_p( p );
+ new_p.replace_extension( new_extension );
+ return new_p;
+ }
+
+# endif
+
+
+ } // namespace filesystem
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#endif // BOOST_FILESYSTEM3_CONVENIENCE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/detail/macro_value.hpp b/src/third_party/boost-1.70.0/boost/filesystem/detail/macro_value.hpp
new file mode 100644
index 00000000000..5bda7a31e71
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/detail/macro_value.hpp
@@ -0,0 +1,44 @@
+// boost/filesystem/detail/macro_value.hpp -------------------------------------------//
+
+// (C) Copyright John Maddock 2001 - 2003
+// (C) Copyright Jens Maurer 2001
+// (C) Copyright Peter Dimov 2001
+// (C) Copyright Darin Adler 2001
+// (C) Copyright Beman Dawes 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_FILESYSTEM_MACRO_VALUE_HPP
+#define BOOST_FILESYSTEM_MACRO_VALUE_HPP
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <cstdlib>
+
+namespace boost
+{
+ namespace detail
+ {
+ inline const char* macro_value(const char* name, const char* value)
+ {
+ static const char* no_value = "[no value]";
+ static const char* not_defined = "[not defined]";
+
+ BOOST_ASSERT_MSG(name, "name argument must not be a null pointer");
+ BOOST_ASSERT_MSG(value, "value argument must not be a null pointer");
+
+ return strcmp(name, value + 1)
+ ? ((*value && *(value+1)) ? (value+1) : no_value)
+ : not_defined; // name == value+1 so the macro is not defined
+ }
+ } // detail
+} // boost
+
+#define BOOST_MACRO_VALUE(X) boost::detail::macro_value(#X, BOOST_STRINGIZE(=X))
+
+#endif // BOOST_FILESYSTEM_MACRO_VALUE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.70.0/boost/filesystem/detail/utf8_codecvt_facet.hpp
index 3b78fb1b663..3b78fb1b663 100644
--- a/src/third_party/boost-1.69.0/boost/filesystem/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/filesystem/detail/utf8_codecvt_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/exception.hpp b/src/third_party/boost-1.70.0/boost/filesystem/exception.hpp
index 985cd8f715f..985cd8f715f 100644
--- a/src/third_party/boost-1.69.0/boost/filesystem/exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/filesystem/exception.hpp
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/fstream.hpp b/src/third_party/boost-1.70.0/boost/filesystem/fstream.hpp
new file mode 100644
index 00000000000..23e44645fbf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/fstream.hpp
@@ -0,0 +1,192 @@
+// boost/filesystem/fstream.hpp ------------------------------------------------------//
+
+// Copyright Beman Dawes 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_FSTREAM_HPP
+#define BOOST_FILESYSTEM3_FSTREAM_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/path.hpp>
+#include <iosfwd>
+#include <fstream>
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+// on Windows, except for standard libaries known to have wchar_t overloads for
+// file stream I/O, use path::string() to get a narrow character c_str()
+#if defined(BOOST_WINDOWS_API) \
+ && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION))
+ // !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware
+# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available
+#else // use the native c_str, which will be narrow on POSIX, wide on Windows
+# define BOOST_FILESYSTEM_C_STR c_str()
+#endif
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+// 'boost::filesystem::basic_fstream<charT>' : inherits 'std::basic_istream<_Elem,_Traits>::std::basic_istream<_Elem,_Traits>::_Add_vtordisp1' via dominance
+#pragma warning(disable: 4250)
+#endif
+
+namespace boost
+{
+namespace filesystem
+{
+
+//--------------------------------------------------------------------------------------//
+// basic_filebuf //
+//--------------------------------------------------------------------------------------//
+
+ template < class charT, class traits = std::char_traits<charT> >
+ class basic_filebuf : public std::basic_filebuf<charT,traits>
+ {
+ private: // disallow copying
+ basic_filebuf(const basic_filebuf&);
+ const basic_filebuf& operator=(const basic_filebuf&);
+
+ public:
+ basic_filebuf() {}
+ virtual ~basic_filebuf() {}
+
+ basic_filebuf<charT,traits>*
+ open(const path& p, std::ios_base::openmode mode)
+ {
+ return std::basic_filebuf<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode)
+ ? this : 0;
+ }
+ };
+
+//--------------------------------------------------------------------------------------//
+// basic_ifstream //
+//--------------------------------------------------------------------------------------//
+
+ template < class charT, class traits = std::char_traits<charT> >
+ class basic_ifstream : public std::basic_ifstream<charT,traits>
+ {
+ private: // disallow copying
+ basic_ifstream(const basic_ifstream&);
+ const basic_ifstream& operator=(const basic_ifstream&);
+
+ public:
+ basic_ifstream() {}
+
+ // use two signatures, rather than one signature with default second
+ // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416)
+
+ explicit basic_ifstream(const path& p)
+ : std::basic_ifstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, std::ios_base::in) {}
+
+ basic_ifstream(const path& p, std::ios_base::openmode mode)
+ : std::basic_ifstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, mode) {}
+
+ void open(const path& p)
+ { std::basic_ifstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, std::ios_base::in); }
+
+ void open(const path& p, std::ios_base::openmode mode)
+ { std::basic_ifstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode); }
+
+ virtual ~basic_ifstream() {}
+ };
+
+//--------------------------------------------------------------------------------------//
+// basic_ofstream //
+//--------------------------------------------------------------------------------------//
+
+ template < class charT, class traits = std::char_traits<charT> >
+ class basic_ofstream : public std::basic_ofstream<charT,traits>
+ {
+ private: // disallow copying
+ basic_ofstream(const basic_ofstream&);
+ const basic_ofstream& operator=(const basic_ofstream&);
+
+ public:
+ basic_ofstream() {}
+
+ // use two signatures, rather than one signature with default second
+ // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416)
+
+ explicit basic_ofstream(const path& p)
+ : std::basic_ofstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, std::ios_base::out) {}
+
+ basic_ofstream(const path& p, std::ios_base::openmode mode)
+ : std::basic_ofstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, mode) {}
+
+ void open(const path& p)
+ { std::basic_ofstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, std::ios_base::out); }
+
+ void open(const path& p, std::ios_base::openmode mode)
+ { std::basic_ofstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode); }
+
+ virtual ~basic_ofstream() {}
+ };
+
+//--------------------------------------------------------------------------------------//
+// basic_fstream //
+//--------------------------------------------------------------------------------------//
+
+ template < class charT, class traits = std::char_traits<charT> >
+ class basic_fstream : public std::basic_fstream<charT,traits>
+ {
+ private: // disallow copying
+ basic_fstream(const basic_fstream&);
+ const basic_fstream & operator=(const basic_fstream&);
+
+ public:
+ basic_fstream() {}
+
+ // use two signatures, rather than one signature with default second
+ // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416)
+
+ explicit basic_fstream(const path& p)
+ : std::basic_fstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR,
+ std::ios_base::in | std::ios_base::out) {}
+
+ basic_fstream(const path& p, std::ios_base::openmode mode)
+ : std::basic_fstream<charT,traits>(p.BOOST_FILESYSTEM_C_STR, mode) {}
+
+ void open(const path& p)
+ { std::basic_fstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR,
+ std::ios_base::in | std::ios_base::out); }
+
+ void open(const path& p, std::ios_base::openmode mode)
+ { std::basic_fstream<charT,traits>::open(p.BOOST_FILESYSTEM_C_STR, mode); }
+
+ virtual ~basic_fstream() {}
+
+ };
+
+//--------------------------------------------------------------------------------------//
+// typedefs //
+//--------------------------------------------------------------------------------------//
+
+ typedef basic_filebuf<char> filebuf;
+ typedef basic_ifstream<char> ifstream;
+ typedef basic_ofstream<char> ofstream;
+ typedef basic_fstream<char> fstream;
+
+ typedef basic_filebuf<wchar_t> wfilebuf;
+ typedef basic_ifstream<wchar_t> wifstream;
+ typedef basic_ofstream<wchar_t> wofstream;
+ typedef basic_fstream<wchar_t> wfstream;
+
+} // namespace filesystem
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#endif // BOOST_FILESYSTEM3_FSTREAM_HPP
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/operations.hpp b/src/third_party/boost-1.70.0/boost/filesystem/operations.hpp
new file mode 100644
index 00000000000..74e47edbb8f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/operations.hpp
@@ -0,0 +1,1426 @@
+// 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/core/scoped_enum.hpp>
+#include <boost/detail/bitmask.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/system/system_error.hpp>
+#include <boost/smart_ptr/intrusive_ptr.hpp>
+#include <boost/smart_ptr/intrusive_ref_counter.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <string>
+#include <utility> // std::move
+#include <ctime>
+#include <vector>
+#include <stack>
+#include <new> // std::nothrow, std::bad_alloc
+
+#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 impl());
+ }
+ 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 impl(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 impl(path1_arg, 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 impl :
+ public boost::intrusive_ref_counter< impl >
+ {
+ path m_path1; // may be empty()
+ path m_path2; // may be empty()
+ std::string m_what; // not built until needed
+
+ BOOST_DEFAULTED_FUNCTION(impl(), {})
+ explicit impl(path const& path1) : m_path1(path1) {}
+ impl(path const& path1, path const& path2) : m_path1(path1), m_path2(path2) {}
+ };
+ boost::intrusive_ptr< impl > 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 file_status
+ {
+ public:
+ BOOST_CONSTEXPR file_status() BOOST_NOEXCEPT :
+ m_value(status_error), m_perms(perms_not_known)
+ {
+ }
+ explicit BOOST_CONSTEXPR file_status(file_type v) BOOST_NOEXCEPT :
+ m_value(v), m_perms(perms_not_known)
+ {
+ }
+ BOOST_CONSTEXPR 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.
+
+ BOOST_CONSTEXPR file_status(const file_status& rhs) BOOST_NOEXCEPT :
+ m_value(rhs.m_value), m_perms(rhs.m_perms)
+ {
+ }
+ BOOST_CXX14_CONSTEXPR 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)
+ // Note: std::move is not constexpr in C++11, that's why we're not using it here
+ BOOST_CONSTEXPR file_status(file_status&& rhs) BOOST_NOEXCEPT :
+ m_value(static_cast< file_type&& >(rhs.m_value)), m_perms(static_cast< enum perms&& >(rhs.m_perms))
+ {
+ }
+ BOOST_CXX14_CONSTEXPR 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
+ BOOST_CONSTEXPR file_type type() const BOOST_NOEXCEPT { return m_value; }
+ BOOST_CONSTEXPR perms permissions() const BOOST_NOEXCEPT { return m_perms; }
+
+ // modifiers
+ BOOST_CXX14_CONSTEXPR void type(file_type v) BOOST_NOEXCEPT { m_value = v; }
+ BOOST_CXX14_CONSTEXPR void permissions(perms prms) BOOST_NOEXCEPT { m_perms = prms; }
+
+ BOOST_CONSTEXPR bool operator==(const file_status& rhs) const BOOST_NOEXCEPT
+ {
+ return type() == rhs.type() &&
+ permissions() == rhs.permissions();
+ }
+ BOOST_CONSTEXPR bool operator!=(const file_status& rhs) const BOOST_NOEXCEPT
+ {
+ return !(*this == rhs);
+ }
+
+ private:
+ file_type m_value;
+ enum perms m_perms;
+ };
+
+ inline BOOST_CONSTEXPR bool type_present(file_status f) BOOST_NOEXCEPT
+ { return f.type() != status_error; }
+ inline BOOST_CONSTEXPR bool permissions_present(file_status f) BOOST_NOEXCEPT
+ {return f.permissions() != perms_not_known;}
+ inline BOOST_CONSTEXPR bool status_known(file_status f) BOOST_NOEXCEPT
+ { return filesystem::type_present(f) && filesystem::permissions_present(f); }
+ inline BOOST_CONSTEXPR bool exists(file_status f) BOOST_NOEXCEPT
+ { return f.type() != status_error
+ && f.type() != file_not_found; }
+ inline BOOST_CONSTEXPR bool is_regular_file(file_status f) BOOST_NOEXCEPT
+ { return f.type() == regular_file; }
+ inline BOOST_CONSTEXPR bool is_directory(file_status f) BOOST_NOEXCEPT
+ { return f.type() == directory_file; }
+ inline BOOST_CONSTEXPR bool is_symlink(file_status f) BOOST_NOEXCEPT
+ { return f.type() == symlink_file; }
+ inline BOOST_CONSTEXPR bool is_other(file_status f) BOOST_NOEXCEPT
+ { return filesystem::exists(f) && !filesystem::is_regular_file(f)
+ && !filesystem::is_directory(f) && !filesystem::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_DECLARE_BEGIN(copy_option)
+ {none=0, fail_if_exists = none, overwrite_if_exists}
+ BOOST_SCOPED_ENUM_DECLARE_END(copy_option)
+
+//--------------------------------------------------------------------------------------//
+// 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 vice 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_NATIVE(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_NATIVE(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(filesystem::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 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_DECL file_status m_get_status(system::error_code* ec=0) const;
+ BOOST_FILESYSTEM_DECL file_status m_get_symlink_status(system::error_code* ec=0) const;
+
+private:
+ boost::filesystem::path m_path;
+ mutable file_status m_status; // stat()-like
+ mutable file_status m_symlink_status; // lstat()-like
+}; // directory_entry
+
+
+//--------------------------------------------------------------------------------------//
+// //
+// directory_entry overloads //
+// //
+//--------------------------------------------------------------------------------------//
+
+// Without these functions, calling (for example) 'is_directory' with a 'directory_entry' results in:
+// - a conversion to 'path' using 'operator const boost::filesystem::path&()',
+// - then a call to 'is_directory(const path& p)' which recomputes the status with 'detail::status(p)'.
+//
+// These functions avoid a costly recomputation of the status if one calls 'is_directory(e)' instead of 'is_directory(e.status)'
+
+inline file_status status (const directory_entry& e) BOOST_NOEXCEPT { return e.status(); }
+inline bool type_present (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::type_present(e.status()); }
+inline bool status_known (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::status_known(e.status()); }
+inline bool exists (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::exists(e.status()); }
+inline bool is_regular_file(const directory_entry& e) BOOST_NOEXCEPT { return filesystem::is_regular_file(e.status()); }
+inline bool is_directory (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::is_directory(e.status()); }
+inline bool is_symlink (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::is_symlink(e.status()); }
+inline bool is_other (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::is_other(e.status()); }
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+inline bool is_regular (const directory_entry& e) BOOST_NOEXCEPT { return filesystem::is_regular(e.status()); }
+#endif
+
+//--------------------------------------------------------------------------------------//
+// //
+// 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 :
+ public boost::intrusive_ref_counter< dir_itr_imp >
+ {
+ directory_entry dir_entry;
+ void* handle;
+
+# ifdef BOOST_POSIX_API
+ void* buffer; // see dir_itr_increment implementation
+# endif
+
+ dir_itr_imp() BOOST_NOEXCEPT : handle(0)
+# ifdef BOOST_POSIX_API
+ , buffer(0)
+# endif
+ {}
+
+ ~dir_itr_imp() BOOST_NOEXCEPT
+ {
+ 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 (std::nothrow) detail::dir_itr_imp())
+ {
+ if (BOOST_UNLIKELY(!m_imp))
+ {
+ ec = make_error_code(system::errc::not_enough_memory);
+ return;
+ }
+
+ detail::directory_iterator_construct(*this, p, &ec);
+ }
+
+ BOOST_DEFAULTED_FUNCTION(directory_iterator(directory_iterator const& that), : m_imp(that.m_imp) {})
+ BOOST_DEFAULTED_FUNCTION(directory_iterator& operator= (directory_iterator const& that), { m_imp = that.m_imp; return *this; })
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ directory_iterator(directory_iterator&& that) BOOST_NOEXCEPT :
+ m_imp(std::move(that.m_imp))
+ {
+ }
+
+ directory_iterator& operator= (directory_iterator&& that) BOOST_NOEXCEPT
+ {
+ m_imp = std::move(that.m_imp);
+ return *this;
+ }
+#endif // !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+ 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);
+
+ // intrusive_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::intrusive_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-based 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 C++14 generic accessors for range const iterators
+ inline
+ const directory_iterator& cbegin(const directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ directory_iterator cend(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_UT_DECLARE_BEGIN(symlink_option, unsigned int)
+ {
+ 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_DECLARE_END(symlink_option)
+
+ BOOST_BITMASK(BOOST_SCOPED_ENUM_NATIVE(symlink_option))
+
+ namespace detail
+ {
+ struct recur_dir_itr_imp :
+ public boost::intrusive_ref_counter< recur_dir_itr_imp >
+ {
+ typedef directory_iterator element_type;
+ std::stack< element_type, std::vector< element_type > > m_stack;
+ int m_level;
+ // symlink_option values, declared as unsigned int for ABI compatibility
+ unsigned int m_options;
+
+ recur_dir_itr_imp() BOOST_NOEXCEPT : m_level(0), m_options(static_cast< unsigned int >(symlink_option::none)) {}
+ explicit recur_dir_itr_imp(BOOST_SCOPED_ENUM_NATIVE(symlink_option) opt) BOOST_NOEXCEPT : m_level(0), m_options(static_cast< unsigned int >(opt)) {}
+
+ // 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.
+ BOOST_FILESYSTEM_DECL void increment(system::error_code* ec);
+
+ // Returns: true if push occurs, otherwise false. Always returns false on error.
+ BOOST_FILESYSTEM_DECL bool push_directory(system::error_code& ec) BOOST_NOEXCEPT;
+
+ // ec == 0 means throw on error
+ BOOST_FILESYSTEM_DECL void pop(system::error_code* ec);
+ };
+
+ } // 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_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_NATIVE(symlink_option) opt) : // throws if !exists()
+ m_imp(new detail::recur_dir_itr_imp(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_NATIVE(symlink_option) opt,
+ system::error_code & ec) BOOST_NOEXCEPT :
+ m_imp(new (std::nothrow) detail::recur_dir_itr_imp(opt))
+ {
+ if (BOOST_UNLIKELY(!m_imp))
+ {
+ ec = make_error_code(system::errc::not_enough_memory);
+ return;
+ }
+
+ directory_iterator it(dir_path, ec);
+ if (ec || it == directory_iterator())
+ {
+ m_imp.reset();
+ return;
+ }
+
+ try
+ {
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ m_imp->m_stack.push(std::move(it));
+#else
+ m_imp->m_stack.push(it);
+#endif
+ }
+ catch (std::bad_alloc&)
+ {
+ ec = make_error_code(system::errc::not_enough_memory);
+ m_imp.reset();
+ }
+ }
+
+ recursive_directory_iterator(const path& dir_path,
+ system::error_code & ec) BOOST_NOEXCEPT :
+ m_imp(new (std::nothrow) detail::recur_dir_itr_imp())
+ {
+ if (BOOST_UNLIKELY(!m_imp))
+ {
+ ec = make_error_code(system::errc::not_enough_memory);
+ return;
+ }
+
+ directory_iterator it(dir_path, ec);
+ if (ec || it == directory_iterator())
+ {
+ m_imp.reset();
+ return;
+ }
+
+ try
+ {
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ m_imp->m_stack.push(std::move(it));
+#else
+ m_imp->m_stack.push(it);
+#endif
+ }
+ catch (std::bad_alloc&)
+ {
+ ec = make_error_code(system::errc::not_enough_memory);
+ m_imp.reset();
+ }
+ }
+
+ BOOST_DEFAULTED_FUNCTION(recursive_directory_iterator(recursive_directory_iterator const& that), : m_imp(that.m_imp) {})
+ BOOST_DEFAULTED_FUNCTION(recursive_directory_iterator& operator= (recursive_directory_iterator const& that), { m_imp = that.m_imp; return *this; })
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ recursive_directory_iterator(recursive_directory_iterator&& that) BOOST_NOEXCEPT :
+ m_imp(std::move(that.m_imp))
+ {
+ }
+
+ recursive_directory_iterator& operator= (recursive_directory_iterator&& that) BOOST_NOEXCEPT
+ {
+ m_imp = std::move(that.m_imp);
+ return *this;
+ }
+#endif // !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+ 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 & static_cast< unsigned int >(symlink_option::_detail_no_push))
+ == static_cast< unsigned int >(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(0);
+ if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator
+ }
+
+ void pop(system::error_code& ec) BOOST_NOEXCEPT
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "pop() on end recursive_directory_iterator");
+ m_imp->pop(&ec);
+ 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 |= static_cast< unsigned int >(symlink_option::_detail_no_push);
+ else
+ m_imp->m_options &= ~static_cast< unsigned int >(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:
+
+ // intrusive_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::intrusive_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 C++14 generic accessors for range const iterators
+ inline
+ const recursive_directory_iterator& cbegin(const recursive_directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ recursive_directory_iterator cend(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.70.0/boost/filesystem/path.hpp b/src/third_party/boost-1.70.0/boost/filesystem/path.hpp
new file mode 100644
index 00000000000..d0cf9a11ca3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/path.hpp
@@ -0,0 +1,1026 @@
+// filesystem path.hpp ---------------------------------------------------------------//
+
+// Copyright Beman Dawes 2002-2005, 2009
+// 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
+
+// path::stem(), extension(), and replace_extension() are based on
+// basename(), extension(), and change_extension() from the original
+// filesystem/convenience.hpp header by Vladimir Prus.
+
+#ifndef BOOST_FILESYSTEM_PATH_HPP
+#define BOOST_FILESYSTEM_PATH_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/assert.hpp>
+#include <boost/filesystem/config.hpp>
+#include <boost/filesystem/path_traits.hpp> // includes <cwchar>
+#include <boost/system/error_code.hpp>
+#include <boost/system/system_error.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/io/detail/quoted_manip.hpp>
+#include <boost/functional/hash_fwd.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <string>
+#include <iterator>
+#include <cstring>
+#include <iosfwd>
+#include <stdexcept>
+#include <cassert>
+#include <locale>
+#include <algorithm>
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+namespace boost
+{
+namespace filesystem
+{
+namespace path_detail // intentionally don't use filesystem::detail to not bring internal Boost.Filesystem functions into ADL via path_constants
+{
+
+ template< typename Char, Char Separator, Char PreferredSeparator, Char Dot >
+ struct path_constants
+ {
+ typedef path_constants< Char, Separator, PreferredSeparator, Dot > path_constants_base;
+ typedef Char value_type;
+ static BOOST_CONSTEXPR_OR_CONST value_type separator = Separator;
+ static BOOST_CONSTEXPR_OR_CONST value_type preferred_separator = PreferredSeparator;
+ static BOOST_CONSTEXPR_OR_CONST value_type dot = Dot;
+ };
+
+ template< typename Char, Char Separator, Char PreferredSeparator, Char Dot >
+ BOOST_CONSTEXPR_OR_CONST typename path_constants< Char, Separator, PreferredSeparator, Dot >::value_type
+ path_constants< Char, Separator, PreferredSeparator, Dot >::separator;
+ template< typename Char, Char Separator, Char PreferredSeparator, Char Dot >
+ BOOST_CONSTEXPR_OR_CONST typename path_constants< Char, Separator, PreferredSeparator, Dot >::value_type
+ path_constants< Char, Separator, PreferredSeparator, Dot >::preferred_separator;
+ template< typename Char, Char Separator, Char PreferredSeparator, Char Dot >
+ BOOST_CONSTEXPR_OR_CONST typename path_constants< Char, Separator, PreferredSeparator, Dot >::value_type
+ path_constants< Char, Separator, PreferredSeparator, Dot >::dot;
+
+} // namespace path_detail
+
+ //------------------------------------------------------------------------------------//
+ // //
+ // class path //
+ // //
+ //------------------------------------------------------------------------------------//
+
+ class path :
+ public filesystem::path_detail::path_constants<
+#ifdef BOOST_WINDOWS_API
+ wchar_t, L'/', L'\\', L'.'
+#else
+ char, '/', '/', '.'
+#endif
+ >
+ {
+ public:
+
+ // value_type is the character type used by the operating system API to
+ // represent paths.
+
+ typedef path_constants_base::value_type value_type;
+ typedef std::basic_string<value_type> string_type;
+ typedef std::codecvt<wchar_t, char,
+ std::mbstate_t> codecvt_type;
+
+
+ // ----- character encoding conversions -----
+
+ // Following the principle of least astonishment, path input arguments
+ // passed to or obtained from the operating system via objects of
+ // class path behave as if they were directly passed to or
+ // obtained from the O/S API, unless conversion is explicitly requested.
+ //
+ // POSIX specfies that path strings are passed unchanged to and from the
+ // API. Note that this is different from the POSIX command line utilities,
+ // which convert according to a locale.
+ //
+ // Thus for POSIX, char strings do not undergo conversion. wchar_t strings
+ // are converted to/from char using the path locale or, if a conversion
+ // argument is given, using a conversion object modeled on
+ // std::wstring_convert.
+ //
+ // The path locale, which is global to the thread, can be changed by the
+ // imbue() function. It is initialized to an implementation defined locale.
+ //
+ // For Windows, wchar_t strings do not undergo conversion. char strings
+ // are converted using the "ANSI" or "OEM" code pages, as determined by
+ // the AreFileApisANSI() function, or, if a conversion argument is given,
+ // using a conversion object modeled on std::wstring_convert.
+ //
+ // See m_pathname comments for further important rationale.
+
+ // TODO: rules needed for operating systems that use / or .
+ // differently, or format directory paths differently from file paths.
+ //
+ // **********************************************************************************
+ //
+ // More work needed: How to handle an operating system that may have
+ // slash characters or dot characters in valid filenames, either because
+ // it doesn't follow the POSIX standard, or because it allows MBCS
+ // filename encodings that may contain slash or dot characters. For
+ // example, ISO/IEC 2022 (JIS) encoding which allows switching to
+ // JIS x0208-1983 encoding. A valid filename in this set of encodings is
+ // 0x1B 0x24 0x42 [switch to X0208-1983] 0x24 0x2F [U+304F Kiragana letter KU]
+ // ^^^^
+ // Note that 0x2F is the ASCII slash character
+ //
+ // **********************************************************************************
+
+ // Supported source arguments: half-open iterator range, container, c-array,
+ // and single pointer to null terminated string.
+
+ // All source arguments except pointers to null terminated byte strings support
+ // multi-byte character strings which may have embedded nulls. Embedded null
+ // support is required for some Asian languages on Windows.
+
+ // "const codecvt_type& cvt=codecvt()" default arguments are not used because this
+ // limits the impact of locale("") initialization failures on POSIX systems to programs
+ // that actually depend on locale(""). It further ensures that exceptions thrown
+ // as a result of such failues occur after main() has started, so can be caught.
+
+ // ----- constructors -----
+
+ path() BOOST_NOEXCEPT {}
+ path(const path& p) : m_pathname(p.m_pathname) {}
+
+ template <class Source>
+ path(Source const& source,
+ typename boost::enable_if<path_traits::is_pathable<
+ typename boost::decay<Source>::type> >::type* =0)
+ {
+ path_traits::dispatch(source, m_pathname);
+ }
+
+ path(const value_type* s) : m_pathname(s) {}
+ path(value_type* s) : m_pathname(s) {}
+ path(const string_type& s) : m_pathname(s) {}
+ path(string_type& s) : m_pathname(s) {}
+
+ // 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)
+ path(path&& p) BOOST_NOEXCEPT : m_pathname(std::move(p.m_pathname)) {}
+ path& operator=(path&& p) BOOST_NOEXCEPT
+ { m_pathname = std::move(p.m_pathname); return *this; }
+# endif
+
+ template <class Source>
+ path(Source const& source, const codecvt_type& cvt)
+ {
+ path_traits::dispatch(source, m_pathname, cvt);
+ }
+
+ template <class InputIterator>
+ path(InputIterator begin, InputIterator end)
+ {
+ if (begin != end)
+ {
+ // convert requires contiguous string, so copy
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
+ }
+ }
+
+ template <class InputIterator>
+ path(InputIterator begin, InputIterator end, const codecvt_type& cvt)
+ {
+ if (begin != end)
+ {
+ // convert requires contiguous string, so copy
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
+ }
+ }
+
+ // ----- assignments -----
+
+ path& operator=(const path& p)
+ {
+ m_pathname = p.m_pathname;
+ return *this;
+ }
+
+ template <class Source>
+ typename boost::enable_if<path_traits::is_pathable<
+ typename boost::decay<Source>::type>, path&>::type
+ operator=(Source const& source)
+ {
+ m_pathname.clear();
+ path_traits::dispatch(source, m_pathname);
+ return *this;
+ }
+
+ // value_type overloads
+
+ path& operator=(const value_type* ptr) // required in case ptr overlaps *this
+ {m_pathname = ptr; return *this;}
+ path& operator=(value_type* ptr) // required in case ptr overlaps *this
+ {m_pathname = ptr; return *this;}
+ path& operator=(const string_type& s) {m_pathname = s; return *this;}
+ path& operator=(string_type& s) {m_pathname = s; return *this;}
+
+ path& assign(const value_type* ptr, const codecvt_type&) // required in case ptr overlaps *this
+ {m_pathname = ptr; return *this;}
+ template <class Source>
+ path& assign(Source const& source, const codecvt_type& cvt)
+ {
+ m_pathname.clear();
+ path_traits::dispatch(source, m_pathname, cvt);
+ return *this;
+ }
+
+ template <class InputIterator>
+ path& assign(InputIterator begin, InputIterator end)
+ {
+ m_pathname.clear();
+ if (begin != end)
+ {
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
+ }
+ return *this;
+ }
+
+ template <class InputIterator>
+ path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt)
+ {
+ m_pathname.clear();
+ if (begin != end)
+ {
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
+ }
+ return *this;
+ }
+
+ // ----- concatenation -----
+
+ template <class Source>
+ typename boost::enable_if<path_traits::is_pathable<
+ typename boost::decay<Source>::type>, path&>::type
+ operator+=(Source const& source)
+ {
+ return concat(source);
+ }
+
+ // value_type overloads. Same rationale as for constructors above
+ path& operator+=(const path& p) { m_pathname += p.m_pathname; return *this; }
+ path& operator+=(const value_type* ptr) { m_pathname += ptr; return *this; }
+ path& operator+=(value_type* ptr) { m_pathname += ptr; return *this; }
+ path& operator+=(const string_type& s) { m_pathname += s; return *this; }
+ path& operator+=(string_type& s) { m_pathname += s; return *this; }
+ path& operator+=(value_type c) { m_pathname += c; return *this; }
+
+ template <class CharT>
+ typename boost::enable_if<boost::is_integral<CharT>, path&>::type
+ operator+=(CharT c)
+ {
+ CharT tmp[2];
+ tmp[0] = c;
+ tmp[1] = 0;
+ return concat(tmp);
+ }
+
+ template <class Source>
+ path& concat(Source const& source)
+ {
+ path_traits::dispatch(source, m_pathname);
+ return *this;
+ }
+
+ template <class Source>
+ path& concat(Source const& source, const codecvt_type& cvt)
+ {
+ path_traits::dispatch(source, m_pathname, cvt);
+ return *this;
+ }
+
+ template <class InputIterator>
+ path& concat(InputIterator begin, InputIterator end)
+ {
+ if (begin == end)
+ return *this;
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
+ return *this;
+ }
+
+ template <class InputIterator>
+ path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt)
+ {
+ if (begin == end)
+ return *this;
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
+ return *this;
+ }
+
+ // ----- appends -----
+
+ // if a separator is added, it is the preferred separator for the platform;
+ // slash for POSIX, backslash for Windows
+
+ BOOST_FILESYSTEM_DECL path& operator/=(const path& p);
+
+ template <class Source>
+ typename boost::enable_if<path_traits::is_pathable<
+ typename boost::decay<Source>::type>, path&>::type
+ operator/=(Source const& source)
+ {
+ return append(source);
+ }
+
+ BOOST_FILESYSTEM_DECL path& operator/=(const value_type* ptr);
+ path& operator/=(value_type* ptr)
+ {
+ return this->operator/=(const_cast<const value_type*>(ptr));
+ }
+ path& operator/=(const string_type& s) { return this->operator/=(path(s)); }
+ path& operator/=(string_type& s) { return this->operator/=(path(s)); }
+
+ path& append(const value_type* ptr) // required in case ptr overlaps *this
+ {
+ this->operator/=(ptr);
+ return *this;
+ }
+
+ path& append(const value_type* ptr, const codecvt_type&) // required in case ptr overlaps *this
+ {
+ this->operator/=(ptr);
+ return *this;
+ }
+
+ template <class Source>
+ path& append(Source const& source);
+
+ template <class Source>
+ path& append(Source const& source, const codecvt_type& cvt);
+
+ template <class InputIterator>
+ path& append(InputIterator begin, InputIterator end);
+
+ template <class InputIterator>
+ path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt);
+
+ // ----- modifiers -----
+
+ void clear() BOOST_NOEXCEPT { m_pathname.clear(); }
+# ifdef BOOST_POSIX_API
+ path& make_preferred() { return *this; } // POSIX no effect
+# else // BOOST_WINDOWS_API
+ BOOST_FILESYSTEM_DECL path& make_preferred(); // change slashes to backslashes
+# endif
+ BOOST_FILESYSTEM_DECL path& remove_filename();
+ BOOST_FILESYSTEM_DECL path& remove_trailing_separator();
+ BOOST_FILESYSTEM_DECL path& replace_extension(const path& new_extension = path());
+ void swap(path& rhs) BOOST_NOEXCEPT { m_pathname.swap(rhs.m_pathname); }
+
+ // ----- observers -----
+
+ // For operating systems that format file paths differently than directory
+ // paths, return values from observers are formatted as file names unless there
+ // is a trailing separator, in which case returns are formatted as directory
+ // paths. POSIX and Windows make no such distinction.
+
+ // Implementations are permitted to return const values or const references.
+
+ // The string or path returned by an observer are specified as being formatted
+ // as "native" or "generic".
+ //
+ // For POSIX, these are all the same format; slashes and backslashes are as input and
+ // are not modified.
+ //
+ // For Windows, native: as input; slashes and backslashes are not modified;
+ // this is the format of the internally stored string.
+ // generic: backslashes are converted to slashes
+
+ // ----- native format observers -----
+
+ const string_type& native() const BOOST_NOEXCEPT { return m_pathname; }
+ const value_type* c_str() const BOOST_NOEXCEPT { return m_pathname.c_str(); }
+ string_type::size_type size() const BOOST_NOEXCEPT { return m_pathname.size(); }
+
+ template <class String>
+ String string() const;
+
+ template <class String>
+ String string(const codecvt_type& cvt) const;
+
+# ifdef BOOST_WINDOWS_API
+ const std::string string() const
+ {
+ std::string tmp;
+ if (!m_pathname.empty())
+ path_traits::convert(m_pathname.c_str(), m_pathname.c_str()+m_pathname.size(),
+ tmp);
+ return tmp;
+ }
+ const std::string string(const codecvt_type& cvt) const
+ {
+ std::string tmp;
+ if (!m_pathname.empty())
+ path_traits::convert(m_pathname.c_str(), m_pathname.c_str()+m_pathname.size(),
+ tmp, cvt);
+ return tmp;
+ }
+
+ // string_type is std::wstring, so there is no conversion
+ const std::wstring& wstring() const { return m_pathname; }
+ const std::wstring& wstring(const codecvt_type&) const { return m_pathname; }
+# else // BOOST_POSIX_API
+ // string_type is std::string, so there is no conversion
+ const std::string& string() const { return m_pathname; }
+ const std::string& string(const codecvt_type&) const { return m_pathname; }
+
+ const std::wstring wstring() const
+ {
+ std::wstring tmp;
+ if (!m_pathname.empty())
+ path_traits::convert(m_pathname.c_str(), m_pathname.c_str()+m_pathname.size(),
+ tmp);
+ return tmp;
+ }
+ const std::wstring wstring(const codecvt_type& cvt) const
+ {
+ std::wstring tmp;
+ if (!m_pathname.empty())
+ path_traits::convert(m_pathname.c_str(), m_pathname.c_str()+m_pathname.size(),
+ tmp, cvt);
+ return tmp;
+ }
+# endif
+
+ // ----- generic format observers -----
+
+ // Experimental generic function returning generic formatted path (i.e. separators
+ // are forward slashes). Motivation: simpler than a family of generic_*string
+ // functions.
+# ifdef BOOST_WINDOWS_API
+ BOOST_FILESYSTEM_DECL path generic_path() const;
+# else
+ path generic_path() const { return path(*this); }
+# endif
+
+ template <class String>
+ String generic_string() const;
+
+ template <class String>
+ String generic_string(const codecvt_type& cvt) const;
+
+# ifdef BOOST_WINDOWS_API
+ const std::string generic_string() const { return generic_path().string(); }
+ const std::string generic_string(const codecvt_type& cvt) const { return generic_path().string(cvt); }
+ const std::wstring generic_wstring() const { return generic_path().wstring(); }
+ const std::wstring generic_wstring(const codecvt_type&) const { return generic_wstring(); }
+# else // BOOST_POSIX_API
+ // On POSIX-like systems, the generic format is the same as the native format
+ const std::string& generic_string() const { return m_pathname; }
+ const std::string& generic_string(const codecvt_type&) const { return m_pathname; }
+ const std::wstring generic_wstring() const { return this->wstring(); }
+ const std::wstring generic_wstring(const codecvt_type& cvt) const { return this->wstring(cvt); }
+# endif
+
+ // ----- compare -----
+
+ BOOST_FILESYSTEM_DECL int compare(const path& p) const BOOST_NOEXCEPT; // generic, lexicographical
+ int compare(const std::string& s) const { return compare(path(s)); }
+ int compare(const value_type* s) const { return compare(path(s)); }
+
+ // ----- decomposition -----
+
+ BOOST_FILESYSTEM_DECL path root_path() const;
+ BOOST_FILESYSTEM_DECL path root_name() const; // returns 0 or 1 element path
+ // even on POSIX, root_name() is non-empty() for network paths
+ BOOST_FILESYSTEM_DECL path root_directory() const; // returns 0 or 1 element path
+ BOOST_FILESYSTEM_DECL path relative_path() const;
+ BOOST_FILESYSTEM_DECL path parent_path() const;
+ BOOST_FILESYSTEM_DECL path filename() const; // returns 0 or 1 element path
+ BOOST_FILESYSTEM_DECL path stem() const; // returns 0 or 1 element path
+ BOOST_FILESYSTEM_DECL path extension() const; // returns 0 or 1 element path
+
+ // ----- query -----
+
+ bool empty() const BOOST_NOEXCEPT { return m_pathname.empty(); }
+ bool filename_is_dot() const;
+ bool filename_is_dot_dot() const;
+ bool has_root_path() const { return has_root_directory() || has_root_name(); }
+ bool has_root_name() const { return !root_name().empty(); }
+ bool has_root_directory() const { return !root_directory().empty(); }
+ bool has_relative_path() const { return !relative_path().empty(); }
+ bool has_parent_path() const { return !parent_path().empty(); }
+ bool has_filename() const { return !m_pathname.empty(); }
+ bool has_stem() const { return !stem().empty(); }
+ bool has_extension() const { return !extension().empty(); }
+ bool is_relative() const { return !is_absolute(); }
+ bool is_absolute() const
+ {
+# ifdef BOOST_WINDOWS_API
+ return has_root_name() && has_root_directory();
+# else
+ return has_root_directory();
+# endif
+ }
+
+ // ----- lexical operations -----
+
+ BOOST_FILESYSTEM_DECL path lexically_normal() const;
+ BOOST_FILESYSTEM_DECL path lexically_relative(const path& base) const;
+ path lexically_proximate(const path& base) const
+ {
+ path tmp(lexically_relative(base));
+ return tmp.empty() ? *this : tmp;
+ }
+
+ // ----- iterators -----
+
+ class iterator;
+ typedef iterator const_iterator;
+ class reverse_iterator;
+ typedef reverse_iterator const_reverse_iterator;
+
+ BOOST_FILESYSTEM_DECL iterator begin() const;
+ BOOST_FILESYSTEM_DECL iterator end() const;
+ reverse_iterator rbegin() const;
+ reverse_iterator rend() const;
+
+ // ----- static member functions -----
+
+ static BOOST_FILESYSTEM_DECL std::locale imbue(const std::locale& loc);
+ static BOOST_FILESYSTEM_DECL const codecvt_type& codecvt();
+
+ // ----- deprecated functions -----
+
+# if defined(BOOST_FILESYSTEM_DEPRECATED) && defined(BOOST_FILESYSTEM_NO_DEPRECATED)
+# error both BOOST_FILESYSTEM_DEPRECATED and BOOST_FILESYSTEM_NO_DEPRECATED are defined
+# endif
+
+# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
+ // recently deprecated functions supplied by default
+ path& normalize() {
+ path tmp(lexically_normal());
+ m_pathname.swap(tmp.m_pathname);
+ return *this;
+ }
+ path& remove_leaf() { return remove_filename(); }
+ path leaf() const { return filename(); }
+ path branch_path() const { return parent_path(); }
+ path generic() const { return generic_path(); }
+ bool has_leaf() const { return !m_pathname.empty(); }
+ bool has_branch_path() const { return !parent_path().empty(); }
+ bool is_complete() const { return is_absolute(); }
+# endif
+
+# if defined(BOOST_FILESYSTEM_DEPRECATED)
+ // deprecated functions with enough signature or semantic changes that they are
+ // not supplied by default
+ const std::string file_string() const { return string(); }
+ const std::string directory_string() const { return string(); }
+ const std::string native_file_string() const { return string(); }
+ const std::string native_directory_string() const { return string(); }
+ const string_type external_file_string() const { return native(); }
+ const string_type external_directory_string() const { return native(); }
+
+ // older functions no longer supported
+ //typedef bool (*name_check)(const std::string & name);
+ //basic_path(const string_type& str, name_check) { operator/=(str); }
+ //basic_path(const typename string_type::value_type* s, name_check)
+ // { operator/=(s);}
+ //static bool default_name_check_writable() { return false; }
+ //static void default_name_check(name_check) {}
+ //static name_check default_name_check() { return 0; }
+ //basic_path& canonize();
+# endif
+
+//--------------------------------------------------------------------------------------//
+// class path private members //
+//--------------------------------------------------------------------------------------//
+
+ private:
+
+# if defined(_MSC_VER)
+# pragma warning(push) // Save warning settings
+# pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>'
+# endif // needs to have dll-interface...
+/*
+ m_pathname has the type, encoding, and format required by the native
+ operating system. Thus for POSIX and Windows there is no conversion for
+ passing m_pathname.c_str() to the O/S API or when obtaining a path from the
+ O/S API. POSIX encoding is unspecified other than for dot and slash
+ characters; POSIX just treats paths as a sequence of bytes. Windows
+ encoding is UCS-2 or UTF-16 depending on the version.
+*/
+ string_type m_pathname; // Windows: as input; backslashes NOT converted to slashes,
+ // slashes NOT converted to backslashes
+# if defined(_MSC_VER)
+# pragma warning(pop) // restore warning settings.
+# endif
+
+ // Returns: If separator is to be appended, m_pathname.size() before append. Otherwise 0.
+ // Note: An append is never performed if size()==0, so a returned 0 is unambiguous.
+ BOOST_FILESYSTEM_DECL string_type::size_type m_append_separator_if_needed();
+
+ BOOST_FILESYSTEM_DECL void m_erase_redundant_separator(string_type::size_type sep_pos);
+ BOOST_FILESYSTEM_DECL string_type::size_type m_parent_path_end() const;
+
+ // Was qualified; como433beta8 reports:
+ // warning #427-D: qualified name is not allowed in member declaration
+ friend class iterator;
+ friend bool operator<(const path& lhs, const path& rhs);
+
+ // see path::iterator::increment/decrement comment below
+ static BOOST_FILESYSTEM_DECL void m_path_iterator_increment(path::iterator& it);
+ static BOOST_FILESYSTEM_DECL void m_path_iterator_decrement(path::iterator& it);
+
+ }; // class path
+
+ namespace detail
+ {
+ BOOST_FILESYSTEM_DECL
+ int lex_compare(path::iterator first1, path::iterator last1,
+ path::iterator first2, path::iterator last2);
+ BOOST_FILESYSTEM_DECL
+ const path& dot_path();
+ BOOST_FILESYSTEM_DECL
+ const path& dot_dot_path();
+ }
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ typedef path wpath;
+# endif
+
+ //------------------------------------------------------------------------------------//
+ // class path::iterator //
+ //------------------------------------------------------------------------------------//
+
+ class path::iterator
+ : public boost::iterator_facade<
+ path::iterator,
+ path const,
+ boost::bidirectional_traversal_tag >
+ {
+ private:
+ friend class boost::iterator_core_access;
+ friend class boost::filesystem::path;
+ friend class boost::filesystem::path::reverse_iterator;
+ friend void m_path_iterator_increment(path::iterator & it);
+ friend void m_path_iterator_decrement(path::iterator & it);
+
+ const path& dereference() const { return m_element; }
+
+ bool equal(const iterator & rhs) const
+ {
+ return m_path_ptr == rhs.m_path_ptr && m_pos == rhs.m_pos;
+ }
+
+ // iterator_facade derived classes don't seem to like implementations in
+ // separate translation unit dll's, so forward to class path static members
+ void increment() { m_path_iterator_increment(*this); }
+ void decrement() { m_path_iterator_decrement(*this); }
+
+ path m_element; // current element
+ const path* m_path_ptr; // path being iterated over
+ string_type::size_type m_pos; // position of m_element in
+ // m_path_ptr->m_pathname.
+ // if m_element is implicit dot, m_pos is the
+ // position of the last separator in the path.
+ // end() iterator is indicated by
+ // m_pos == m_path_ptr->m_pathname.size()
+ }; // path::iterator
+
+ //------------------------------------------------------------------------------------//
+ // class path::reverse_iterator //
+ //------------------------------------------------------------------------------------//
+
+ class path::reverse_iterator
+ : public boost::iterator_facade<
+ path::reverse_iterator,
+ path const,
+ boost::bidirectional_traversal_tag >
+ {
+ public:
+ explicit reverse_iterator(iterator itr) : m_itr(itr)
+ {
+ if (itr != itr.m_path_ptr->begin())
+ m_element = *--itr;
+ }
+
+ private:
+ friend class boost::iterator_core_access;
+ friend class boost::filesystem::path;
+
+ const path& dereference() const { return m_element; }
+ bool equal(const reverse_iterator& rhs) const { return m_itr == rhs.m_itr; }
+ void increment()
+ {
+ --m_itr;
+ if (m_itr != m_itr.m_path_ptr->begin())
+ {
+ iterator tmp = m_itr;
+ m_element = *--tmp;
+ }
+ }
+ void decrement()
+ {
+ m_element = *m_itr;
+ ++m_itr;
+ }
+
+ iterator m_itr;
+ path m_element;
+
+ }; // path::reverse_iterator
+
+ //------------------------------------------------------------------------------------//
+ // //
+ // non-member functions //
+ // //
+ //------------------------------------------------------------------------------------//
+
+ // std::lexicographical_compare would infinitely recurse because path iterators
+ // yield paths, so provide a path aware version
+ inline bool lexicographical_compare(path::iterator first1, path::iterator last1,
+ path::iterator first2, path::iterator last2)
+ { return detail::lex_compare(first1, last1, first2, last2) < 0; }
+
+ inline bool operator==(const path& lhs, const path& rhs) {return lhs.compare(rhs) == 0;}
+ inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;}
+ inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
+ inline bool operator==(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) == 0;}
+ inline bool operator==(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
+
+ inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;}
+ inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;}
+ inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
+ inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;}
+ inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
+
+ // TODO: why do == and != have additional overloads, but the others don't?
+
+ inline bool operator<(const path& lhs, const path& rhs) {return lhs.compare(rhs) < 0;}
+ inline bool operator<=(const path& lhs, const path& rhs) {return !(rhs < lhs);}
+ inline bool operator> (const path& lhs, const path& rhs) {return rhs < lhs;}
+ inline bool operator>=(const path& lhs, const path& rhs) {return !(lhs < rhs);}
+
+ inline std::size_t hash_value(const path& x)
+ {
+# ifdef BOOST_WINDOWS_API
+ std::size_t seed = 0;
+ for(const path::value_type* it = x.c_str(); *it; ++it)
+ hash_combine(seed, *it == L'/' ? L'\\' : *it);
+ return seed;
+# else // BOOST_POSIX_API
+ return hash_range(x.native().begin(), x.native().end());
+# endif
+ }
+
+ inline void swap(path& lhs, path& rhs) BOOST_NOEXCEPT { lhs.swap(rhs); }
+
+ inline path operator/(const path& lhs, const path& rhs) { return path(lhs) /= rhs; }
+# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ inline path&& operator/(path&& lhs, const path& rhs) { lhs /= rhs; return std::move(lhs); }
+# endif
+
+ // inserters and extractors
+ // use boost::io::quoted() to handle spaces in paths
+ // use '&' as escape character to ease use for Windows paths
+
+ template <class Char, class Traits>
+ inline std::basic_ostream<Char, Traits>&
+ operator<<(std::basic_ostream<Char, Traits>& os, const path& p)
+ {
+ return os
+ << boost::io::quoted(p.template string<std::basic_string<Char> >(), static_cast<Char>('&'));
+ }
+
+ template <class Char, class Traits>
+ inline std::basic_istream<Char, Traits>&
+ operator>>(std::basic_istream<Char, Traits>& is, path& p)
+ {
+ std::basic_string<Char> str;
+ is >> boost::io::quoted(str, static_cast<Char>('&'));
+ p = str;
+ return is;
+ }
+
+ // name_checks
+
+ // These functions are holdovers from version 1. It isn't clear they have much
+ // usefulness, or how to generalize them for later versions.
+
+ BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name);
+ BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name);
+ BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name);
+ BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name);
+ BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name);
+ BOOST_FILESYSTEM_DECL bool native(const std::string & name);
+
+ namespace detail
+ {
+ // For POSIX, is_directory_separator() and is_element_separator() are identical since
+ // a forward slash is the only valid directory separator and also the only valid
+ // element separator. For Windows, forward slash and back slash are the possible
+ // directory separators, but colon (example: "c:foo") is also an element separator.
+
+ inline bool is_directory_separator(path::value_type c) BOOST_NOEXCEPT
+ {
+ return c == path::separator
+# ifdef BOOST_WINDOWS_API
+ || c == path::preferred_separator
+# endif
+ ;
+ }
+ inline bool is_element_separator(path::value_type c) BOOST_NOEXCEPT
+ {
+ return c == path::separator
+# ifdef BOOST_WINDOWS_API
+ || c == path::preferred_separator || c == L':'
+# endif
+ ;
+ }
+ } // namespace detail
+
+ //------------------------------------------------------------------------------------//
+ // class path miscellaneous function implementations //
+ //------------------------------------------------------------------------------------//
+
+ inline path::reverse_iterator path::rbegin() const { return reverse_iterator(end()); }
+ inline path::reverse_iterator path::rend() const { return reverse_iterator(begin()); }
+
+ inline bool path::filename_is_dot() const
+ {
+ // implicit dot is tricky, so actually call filename(); see path::filename() example
+ // in reference.html
+ path p(filename());
+ return p.size() == 1 && *p.c_str() == dot;
+ }
+
+ inline bool path::filename_is_dot_dot() const
+ {
+ return size() >= 2 && m_pathname[size()-1] == dot && m_pathname[size()-2] == dot
+ && (m_pathname.size() == 2 || detail::is_element_separator(m_pathname[size()-3]));
+ // use detail::is_element_separator() rather than detail::is_directory_separator
+ // to deal with "c:.." edge case on Windows when ':' acts as a separator
+ }
+
+//--------------------------------------------------------------------------------------//
+// class path member template implementation //
+//--------------------------------------------------------------------------------------//
+
+ template <class InputIterator>
+ path& path::append(InputIterator begin, InputIterator end)
+ {
+ if (begin == end)
+ return *this;
+ string_type::size_type sep_pos(m_append_separator_if_needed());
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
+ if (sep_pos)
+ m_erase_redundant_separator(sep_pos);
+ return *this;
+ }
+
+ template <class InputIterator>
+ path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt)
+ {
+ if (begin == end)
+ return *this;
+ string_type::size_type sep_pos(m_append_separator_if_needed());
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
+ seq(begin, end);
+ path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
+ if (sep_pos)
+ m_erase_redundant_separator(sep_pos);
+ return *this;
+ }
+
+ template <class Source>
+ path& path::append(Source const& source)
+ {
+ if (path_traits::empty(source))
+ return *this;
+ string_type::size_type sep_pos(m_append_separator_if_needed());
+ path_traits::dispatch(source, m_pathname);
+ if (sep_pos)
+ m_erase_redundant_separator(sep_pos);
+ return *this;
+ }
+
+ template <class Source>
+ path& path::append(Source const& source, const codecvt_type& cvt)
+ {
+ if (path_traits::empty(source))
+ return *this;
+ string_type::size_type sep_pos(m_append_separator_if_needed());
+ path_traits::dispatch(source, m_pathname, cvt);
+ if (sep_pos)
+ m_erase_redundant_separator(sep_pos);
+ return *this;
+ }
+
+//--------------------------------------------------------------------------------------//
+// class path member template specializations //
+//--------------------------------------------------------------------------------------//
+
+ template <> inline
+ std::string path::string<std::string>() const
+ { return string(); }
+
+ template <> inline
+ std::wstring path::string<std::wstring>() const
+ { return wstring(); }
+
+ template <> inline
+ std::string path::string<std::string>(const codecvt_type& cvt) const
+ { return string(cvt); }
+
+ template <> inline
+ std::wstring path::string<std::wstring>(const codecvt_type& cvt) const
+ { return wstring(cvt); }
+
+ template <> inline
+ std::string path::generic_string<std::string>() const
+ { return generic_string(); }
+
+ template <> inline
+ std::wstring path::generic_string<std::wstring>() const
+ { return generic_wstring(); }
+
+ template <> inline
+ std::string path::generic_string<std::string>(const codecvt_type& cvt) const
+ { return generic_string(cvt); }
+
+ template <> inline
+ std::wstring path::generic_string<std::wstring>(const codecvt_type& cvt) const
+ { return generic_wstring(cvt); }
+
+ //--------------------------------------------------------------------------------------//
+ // path_traits convert function implementations //
+ // requiring path::codecvt() be visable //
+ //--------------------------------------------------------------------------------------//
+
+namespace path_traits
+{ // without codecvt
+
+ inline
+ void convert(const char* from,
+ const char* from_end, // 0 for null terminated MBCS
+ std::wstring & to)
+ {
+ convert(from, from_end, to, path::codecvt());
+ }
+
+ inline
+ void convert(const wchar_t* from,
+ const wchar_t* from_end, // 0 for null terminated MBCS
+ std::string & to)
+ {
+ convert(from, from_end, to, path::codecvt());
+ }
+
+ inline
+ void convert(const char* from,
+ std::wstring & to)
+ {
+ BOOST_ASSERT(!!from);
+ convert(from, 0, to, path::codecvt());
+ }
+
+ inline
+ void convert(const wchar_t* from,
+ std::string & to)
+ {
+ BOOST_ASSERT(!!from);
+ convert(from, 0, to, path::codecvt());
+ }
+} // namespace path_traits
+} // namespace filesystem
+} // namespace boost
+
+//----------------------------------------------------------------------------//
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+
+#endif // BOOST_FILESYSTEM_PATH_HPP
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/path_traits.hpp b/src/third_party/boost-1.70.0/boost/filesystem/path_traits.hpp
new file mode 100644
index 00000000000..48a0f121831
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/path_traits.hpp
@@ -0,0 +1,352 @@
+// filesystem path_traits.hpp --------------------------------------------------------//
+
+// 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
+
+#ifndef BOOST_FILESYSTEM_PATH_TRAITS_HPP
+#define BOOST_FILESYSTEM_PATH_TRAITS_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/type_traits/is_array.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/core/enable_if.hpp>
+#include <cwchar> // for mbstate_t
+#include <string>
+#include <vector>
+#include <list>
+#include <iterator>
+#include <locale>
+#include <boost/assert.hpp>
+// #include <iostream> //**** comment me out ****
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+namespace boost { namespace filesystem {
+
+ BOOST_FILESYSTEM_DECL const system::error_category& codecvt_error_category();
+ // uses std::codecvt_base::result used for error codes:
+ //
+ // ok: Conversion successful.
+ // partial: Not all source characters converted; one or more additional source
+ // characters are needed to produce the final target character, or the
+ // size of the target intermediate buffer was too small to hold the result.
+ // error: A character in the source could not be converted to the target encoding.
+ // noconv: The source and target characters have the same type and encoding, so no
+ // conversion was necessary.
+
+ class directory_entry;
+
+namespace path_traits {
+
+ typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type;
+
+ // is_pathable type trait; allows disabling over-agressive class path member templates
+
+ template <class T>
+ struct is_pathable { static const bool value = false; };
+
+ template<> struct is_pathable<char*> { static const bool value = true; };
+ template<> struct is_pathable<const char*> { static const bool value = true; };
+ template<> struct is_pathable<wchar_t*> { static const bool value = true; };
+ template<> struct is_pathable<const wchar_t*> { static const bool value = true; };
+ template<> struct is_pathable<std::string> { static const bool value = true; };
+ template<> struct is_pathable<std::wstring> { static const bool value = true; };
+ template<> struct is_pathable<std::vector<char> > { static const bool value = true; };
+ template<> struct is_pathable<std::vector<wchar_t> > { static const bool value = true; };
+ template<> struct is_pathable<std::list<char> > { static const bool value = true; };
+ template<> struct is_pathable<std::list<wchar_t> > { static const bool value = true; };
+ template<> struct is_pathable<directory_entry> { static const bool value = true; };
+
+ // Pathable empty
+
+ template <class Container> inline
+ // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for
+ // conforming compilers. Replace by plain "bool" at some future date (2012?)
+ typename boost::disable_if<boost::is_array<Container>, bool>::type
+ empty(const Container & c)
+ { return c.begin() == c.end(); }
+
+ template <class T> inline
+ bool empty(T * const & c_str)
+ {
+ BOOST_ASSERT(c_str);
+ return !*c_str;
+ }
+
+ template <typename T, size_t N> inline
+ bool empty(T (&x)[N])
+ { return !x[0]; }
+
+ // value types differ ---------------------------------------------------------------//
+ //
+ // A from_end argument of 0 is less efficient than a known end, so use only if needed
+
+ // with codecvt
+
+ BOOST_FILESYSTEM_DECL
+ void convert(const char* from,
+ const char* from_end, // 0 for null terminated MBCS
+ std::wstring & to,
+ const codecvt_type& cvt);
+
+ BOOST_FILESYSTEM_DECL
+ void convert(const wchar_t* from,
+ const wchar_t* from_end, // 0 for null terminated MBCS
+ std::string & to,
+ const codecvt_type& cvt);
+
+ inline
+ void convert(const char* from,
+ std::wstring & to,
+ const codecvt_type& cvt)
+ {
+ BOOST_ASSERT(from);
+ convert(from, 0, to, cvt);
+ }
+
+ inline
+ void convert(const wchar_t* from,
+ std::string & to,
+ const codecvt_type& cvt)
+ {
+ BOOST_ASSERT(from);
+ convert(from, 0, to, cvt);
+ }
+
+ // without codecvt
+
+ inline
+ void convert(const char* from,
+ const char* from_end, // 0 for null terminated MBCS
+ std::wstring & to);
+
+ inline
+ void convert(const wchar_t* from,
+ const wchar_t* from_end, // 0 for null terminated MBCS
+ std::string & to);
+
+ inline
+ void convert(const char* from,
+ std::wstring & to);
+
+ inline
+ void convert(const wchar_t* from,
+ std::string & to);
+
+ // value types same -----------------------------------------------------------------//
+
+ // char with codecvt
+
+ inline
+ void convert(const char* from, const char* from_end, std::string & to,
+ const codecvt_type&)
+ {
+ BOOST_ASSERT(from);
+ BOOST_ASSERT(from_end);
+ to.append(from, from_end);
+ }
+
+ inline
+ void convert(const char* from,
+ std::string & to,
+ const codecvt_type&)
+ {
+ BOOST_ASSERT(from);
+ to += from;
+ }
+
+ // wchar_t with codecvt
+
+ inline
+ void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to,
+ const codecvt_type&)
+ {
+ BOOST_ASSERT(from);
+ BOOST_ASSERT(from_end);
+ to.append(from, from_end);
+ }
+
+ inline
+ void convert(const wchar_t* from,
+ std::wstring & to,
+ const codecvt_type&)
+ {
+ BOOST_ASSERT(from);
+ to += from;
+ }
+
+ // char without codecvt
+
+ inline
+ void convert(const char* from, const char* from_end, std::string & to)
+ {
+ BOOST_ASSERT(from);
+ BOOST_ASSERT(from_end);
+ to.append(from, from_end);
+ }
+
+ inline
+ void convert(const char* from, std::string & to)
+ {
+ BOOST_ASSERT(from);
+ to += from;
+ }
+
+ // wchar_t without codecvt
+
+ inline
+ void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to)
+ {
+ BOOST_ASSERT(from);
+ BOOST_ASSERT(from_end);
+ to.append(from, from_end);
+ }
+
+ inline
+ void convert(const wchar_t* from, std::wstring & to)
+ {
+ BOOST_ASSERT(from);
+ to += from;
+ }
+
+ // Source dispatch -----------------------------------------------------------------//
+
+ // contiguous containers with codecvt
+ template <class U> inline
+ void dispatch(const std::string& c, U& to, const codecvt_type& cvt)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
+ }
+ template <class U> inline
+ void dispatch(const std::wstring& c, U& to, const codecvt_type& cvt)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
+ }
+ template <class U> inline
+ void dispatch(const std::vector<char>& c, U& to, const codecvt_type& cvt)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
+ }
+ template <class U> inline
+ void dispatch(const std::vector<wchar_t>& c, U& to, const codecvt_type& cvt)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to, cvt);
+ }
+
+ // contiguous containers without codecvt
+ template <class U> inline
+ void dispatch(const std::string& c, U& to)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to);
+ }
+ template <class U> inline
+ void dispatch(const std::wstring& c, U& to)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to);
+ }
+ template <class U> inline
+ void dispatch(const std::vector<char>& c, U& to)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to);
+ }
+ template <class U> inline
+ void dispatch(const std::vector<wchar_t>& c, U& to)
+ {
+ if (c.size())
+ convert(&*c.begin(), &*c.begin() + c.size(), to);
+ }
+
+ // non-contiguous containers with codecvt
+ template <class Container, class U> inline
+ // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for
+ // conforming compilers. Replace by plain "void" at some future date (2012?)
+ typename boost::disable_if<boost::is_array<Container>, void>::type
+ dispatch(const Container & c, U& to, const codecvt_type& cvt)
+ {
+ if (c.size())
+ {
+ std::basic_string<typename Container::value_type> s(c.begin(), c.end());
+ convert(s.c_str(), s.c_str()+s.size(), to, cvt);
+ }
+ }
+
+ // c_str
+ template <class T, class U> inline
+ void dispatch(T * const & c_str, U& to, const codecvt_type& cvt)
+ {
+ // std::cout << "dispatch() const T *\n";
+ BOOST_ASSERT(c_str);
+ convert(c_str, to, cvt);
+ }
+
+ // Note: there is no dispatch on C-style arrays because the array may
+ // contain a string smaller than the array size.
+
+ BOOST_FILESYSTEM_DECL
+ void dispatch(const directory_entry & de,
+# ifdef BOOST_WINDOWS_API
+ std::wstring & to,
+# else
+ std::string & to,
+# endif
+ const codecvt_type&);
+
+ // non-contiguous containers without codecvt
+ template <class Container, class U> inline
+ // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for
+ // conforming compilers. Replace by plain "void" at some future date (2012?)
+ typename boost::disable_if<boost::is_array<Container>, void>::type
+ dispatch(const Container & c, U& to)
+ {
+ if (c.size())
+ {
+ std::basic_string<typename Container::value_type> seq(c.begin(), c.end());
+ convert(seq.c_str(), seq.c_str()+seq.size(), to);
+ }
+ }
+
+ // c_str
+ template <class T, class U> inline
+ void dispatch(T * const & c_str, U& to)
+ {
+ // std::cout << "dispatch() const T *\n";
+ BOOST_ASSERT(c_str);
+ convert(c_str, to);
+ }
+
+ // Note: there is no dispatch on C-style arrays because the array may
+ // contain a string smaller than the array size.
+
+ BOOST_FILESYSTEM_DECL
+ void dispatch(const directory_entry & de,
+# ifdef BOOST_WINDOWS_API
+ std::wstring & to
+# else
+ std::string & to
+# endif
+ );
+
+
+}}} // namespace boost::filesystem::path_traits
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+
+#endif // BOOST_FILESYSTEM_PATH_TRAITS_HPP
diff --git a/src/third_party/boost-1.70.0/boost/filesystem/string_file.hpp b/src/third_party/boost-1.70.0/boost/filesystem/string_file.hpp
new file mode 100644
index 00000000000..f8c6d215fdb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/filesystem/string_file.hpp
@@ -0,0 +1,43 @@
+// filesystem/string_file.hpp --------------------------------------------------------//
+
+// Copyright Beman Dawes 2015
+
+// 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_FILESYSTEM_STRING_FILE_HPP
+#define BOOST_FILESYSTEM_STRING_FILE_HPP
+
+#include <string>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/operations.hpp>
+
+namespace boost
+{
+namespace filesystem
+{
+inline
+void save_string_file(const path& p, const std::string& str)
+{
+ filesystem::ofstream file;
+ file.exceptions(std::ofstream::failbit | std::ofstream::badbit);
+ file.open(p, std::ios_base::binary);
+ file.write(str.c_str(), str.size());
+}
+
+inline
+void load_string_file(const path& p, std::string& str)
+{
+ filesystem::ifstream file;
+ file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
+ file.open(p, std::ios_base::binary);
+ std::size_t sz = static_cast<std::size_t>(filesystem::file_size(p));
+ str.resize(sz, '\0');
+ file.read(&str[0], sz);
+}
+} // namespace filesystem
+} // namespace boost
+
+#endif // include guard
diff --git a/src/third_party/boost-1.69.0/boost/foreach.hpp b/src/third_party/boost-1.70.0/boost/foreach.hpp
index eb3a50b6531..eb3a50b6531 100644
--- a/src/third_party/boost-1.69.0/boost/foreach.hpp
+++ b/src/third_party/boost-1.70.0/boost/foreach.hpp
diff --git a/src/third_party/boost-1.69.0/boost/foreach_fwd.hpp b/src/third_party/boost-1.70.0/boost/foreach_fwd.hpp
index 4e0bb370c2f..4e0bb370c2f 100644
--- a/src/third_party/boost-1.69.0/boost/foreach_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/foreach_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format.hpp b/src/third_party/boost-1.70.0/boost/format.hpp
index 73464a819f8..73464a819f8 100644
--- a/src/third_party/boost-1.69.0/boost/format.hpp
+++ b/src/third_party/boost-1.70.0/boost/format.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/alt_sstream.hpp b/src/third_party/boost-1.70.0/boost/format/alt_sstream.hpp
index 138e1757381..138e1757381 100644
--- a/src/third_party/boost-1.69.0/boost/format/alt_sstream.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/alt_sstream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/alt_sstream_impl.hpp b/src/third_party/boost-1.70.0/boost/format/alt_sstream_impl.hpp
index 998f8b2e55d..998f8b2e55d 100644
--- a/src/third_party/boost-1.69.0/boost/format/alt_sstream_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/alt_sstream_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/detail/compat_workarounds.hpp b/src/third_party/boost-1.70.0/boost/format/detail/compat_workarounds.hpp
index 8e51514f3ef..8e51514f3ef 100644
--- a/src/third_party/boost-1.69.0/boost/format/detail/compat_workarounds.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/detail/compat_workarounds.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/detail/config_macros.hpp b/src/third_party/boost-1.70.0/boost/format/detail/config_macros.hpp
index 44d1e86c631..44d1e86c631 100644
--- a/src/third_party/boost-1.69.0/boost/format/detail/config_macros.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/detail/config_macros.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/detail/msvc_disambiguater.hpp b/src/third_party/boost-1.70.0/boost/format/detail/msvc_disambiguater.hpp
index c2692c44356..c2692c44356 100644
--- a/src/third_party/boost-1.69.0/boost/format/detail/msvc_disambiguater.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/detail/msvc_disambiguater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/detail/unset_macros.hpp b/src/third_party/boost-1.70.0/boost/format/detail/unset_macros.hpp
index b3ac47b42be..b3ac47b42be 100644
--- a/src/third_party/boost-1.69.0/boost/format/detail/unset_macros.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/detail/unset_macros.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/detail/workarounds_gcc-2_95.hpp b/src/third_party/boost-1.70.0/boost/format/detail/workarounds_gcc-2_95.hpp
index 8c49d42d02c..8c49d42d02c 100644
--- a/src/third_party/boost-1.69.0/boost/format/detail/workarounds_gcc-2_95.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/detail/workarounds_gcc-2_95.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/detail/workarounds_stlport.hpp b/src/third_party/boost-1.70.0/boost/format/detail/workarounds_stlport.hpp
index 5d435b98a0e..5d435b98a0e 100644
--- a/src/third_party/boost-1.69.0/boost/format/detail/workarounds_stlport.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/detail/workarounds_stlport.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/exceptions.hpp b/src/third_party/boost-1.70.0/boost/format/exceptions.hpp
index 56ee30dce09..56ee30dce09 100644
--- a/src/third_party/boost-1.69.0/boost/format/exceptions.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/exceptions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/feed_args.hpp b/src/third_party/boost-1.70.0/boost/format/feed_args.hpp
index b0e520e54af..b0e520e54af 100644
--- a/src/third_party/boost-1.69.0/boost/format/feed_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/feed_args.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/format_class.hpp b/src/third_party/boost-1.70.0/boost/format/format_class.hpp
index ae98be4d759..ae98be4d759 100644
--- a/src/third_party/boost-1.69.0/boost/format/format_class.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/format_class.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/format_fwd.hpp b/src/third_party/boost-1.70.0/boost/format/format_fwd.hpp
index 16b8565468d..16b8565468d 100644
--- a/src/third_party/boost-1.69.0/boost/format/format_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/format_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/format_implementation.hpp b/src/third_party/boost-1.70.0/boost/format/format_implementation.hpp
index 2abb5c4b033..2abb5c4b033 100644
--- a/src/third_party/boost-1.69.0/boost/format/format_implementation.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/format_implementation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/free_funcs.hpp b/src/third_party/boost-1.70.0/boost/format/free_funcs.hpp
index 3a51545526f..3a51545526f 100644
--- a/src/third_party/boost-1.69.0/boost/format/free_funcs.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/free_funcs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/group.hpp b/src/third_party/boost-1.70.0/boost/format/group.hpp
index c586b2a6171..c586b2a6171 100644
--- a/src/third_party/boost-1.69.0/boost/format/group.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/group.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/internals.hpp b/src/third_party/boost-1.70.0/boost/format/internals.hpp
index cd5fc540d38..cd5fc540d38 100644
--- a/src/third_party/boost-1.69.0/boost/format/internals.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/internals.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/internals_fwd.hpp b/src/third_party/boost-1.70.0/boost/format/internals_fwd.hpp
index 18cf122412d..18cf122412d 100644
--- a/src/third_party/boost-1.69.0/boost/format/internals_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/internals_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/format/parsing.hpp b/src/third_party/boost-1.70.0/boost/format/parsing.hpp
index 00074925c91..00074925c91 100644
--- a/src/third_party/boost-1.69.0/boost/format/parsing.hpp
+++ b/src/third_party/boost-1.70.0/boost/format/parsing.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function.hpp b/src/third_party/boost-1.70.0/boost/function.hpp
index ef907e0ff15..ef907e0ff15 100644
--- a/src/third_party/boost-1.69.0/boost/function.hpp
+++ b/src/third_party/boost-1.70.0/boost/function.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/detail/function_iterate.hpp b/src/third_party/boost-1.70.0/boost/function/detail/function_iterate.hpp
index 5370b36aac5..5370b36aac5 100644
--- a/src/third_party/boost-1.69.0/boost/function/detail/function_iterate.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/detail/function_iterate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/detail/gen_maybe_include.pl b/src/third_party/boost-1.70.0/boost/function/detail/gen_maybe_include.pl
index bc409840b6a..bc409840b6a 100644
--- a/src/third_party/boost-1.69.0/boost/function/detail/gen_maybe_include.pl
+++ b/src/third_party/boost-1.70.0/boost/function/detail/gen_maybe_include.pl
diff --git a/src/third_party/boost-1.69.0/boost/function/detail/maybe_include.hpp b/src/third_party/boost-1.70.0/boost/function/detail/maybe_include.hpp
index ec88905dcd9..ec88905dcd9 100644
--- a/src/third_party/boost-1.69.0/boost/function/detail/maybe_include.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/detail/maybe_include.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/detail/prologue.hpp b/src/third_party/boost-1.70.0/boost/function/detail/prologue.hpp
index 53d0f05cd37..53d0f05cd37 100644
--- a/src/third_party/boost-1.69.0/boost/function/detail/prologue.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/detail/prologue.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function0.hpp b/src/third_party/boost-1.70.0/boost/function/function0.hpp
index 65a02e5facb..65a02e5facb 100644
--- a/src/third_party/boost-1.69.0/boost/function/function0.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function0.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function1.hpp b/src/third_party/boost-1.70.0/boost/function/function1.hpp
index 9089715155c..9089715155c 100644
--- a/src/third_party/boost-1.69.0/boost/function/function1.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function10.hpp b/src/third_party/boost-1.70.0/boost/function/function10.hpp
index 65627248496..65627248496 100644
--- a/src/third_party/boost-1.69.0/boost/function/function10.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function2.hpp b/src/third_party/boost-1.70.0/boost/function/function2.hpp
index dc8bf97521d..dc8bf97521d 100644
--- a/src/third_party/boost-1.69.0/boost/function/function2.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function3.hpp b/src/third_party/boost-1.70.0/boost/function/function3.hpp
index 19d1a49dd5a..19d1a49dd5a 100644
--- a/src/third_party/boost-1.69.0/boost/function/function3.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function4.hpp b/src/third_party/boost-1.70.0/boost/function/function4.hpp
index f3349e2dc97..f3349e2dc97 100644
--- a/src/third_party/boost-1.69.0/boost/function/function4.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function5.hpp b/src/third_party/boost-1.70.0/boost/function/function5.hpp
index a1305eb5ce2..a1305eb5ce2 100644
--- a/src/third_party/boost-1.69.0/boost/function/function5.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function6.hpp b/src/third_party/boost-1.70.0/boost/function/function6.hpp
index 1f609149196..1f609149196 100644
--- a/src/third_party/boost-1.69.0/boost/function/function6.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function7.hpp b/src/third_party/boost-1.70.0/boost/function/function7.hpp
index 68542ed46aa..68542ed46aa 100644
--- a/src/third_party/boost-1.69.0/boost/function/function7.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function8.hpp b/src/third_party/boost-1.70.0/boost/function/function8.hpp
index cf2c37661f7..cf2c37661f7 100644
--- a/src/third_party/boost-1.69.0/boost/function/function8.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function9.hpp b/src/third_party/boost-1.70.0/boost/function/function9.hpp
index 590e0883d78..590e0883d78 100644
--- a/src/third_party/boost-1.69.0/boost/function/function9.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/function/function_base.hpp
index 4db31c4fbcb..4db31c4fbcb 100644
--- a/src/third_party/boost-1.69.0/boost/function/function_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function_fwd.hpp b/src/third_party/boost-1.70.0/boost/function/function_fwd.hpp
index e79b504899e..e79b504899e 100644
--- a/src/third_party/boost-1.69.0/boost/function/function_fwd.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/function/function_template.hpp
index 56f6bb491a7..56f6bb491a7 100644
--- a/src/third_party/boost-1.69.0/boost/function/function_template.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function_template.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function_typeof.hpp b/src/third_party/boost-1.70.0/boost/function/function_typeof.hpp
index 246dc15d09a..246dc15d09a 100644
--- a/src/third_party/boost-1.69.0/boost/function/function_typeof.hpp
+++ b/src/third_party/boost-1.70.0/boost/function/function_typeof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/gen_function_N.pl b/src/third_party/boost-1.70.0/boost/function/gen_function_N.pl
index d8f1249b07a..d8f1249b07a 100644
--- a/src/third_party/boost-1.69.0/boost/function/gen_function_N.pl
+++ b/src/third_party/boost-1.70.0/boost/function/gen_function_N.pl
diff --git a/src/third_party/boost-1.69.0/boost/function_equal.hpp b/src/third_party/boost-1.70.0/boost/function_equal.hpp
index 2d76c75bc90..2d76c75bc90 100644
--- a/src/third_party/boost-1.69.0/boost/function_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/function_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/functional/hash.hpp b/src/third_party/boost-1.70.0/boost/functional/hash.hpp
index 327a3ecae76..327a3ecae76 100644
--- a/src/third_party/boost-1.69.0/boost/functional/hash.hpp
+++ b/src/third_party/boost-1.70.0/boost/functional/hash.hpp
diff --git a/src/third_party/boost-1.69.0/boost/functional/hash/hash.hpp b/src/third_party/boost-1.70.0/boost/functional/hash/hash.hpp
index 327a3ecae76..327a3ecae76 100644
--- a/src/third_party/boost-1.69.0/boost/functional/hash/hash.hpp
+++ b/src/third_party/boost-1.70.0/boost/functional/hash/hash.hpp
diff --git a/src/third_party/boost-1.69.0/boost/functional/hash_fwd.hpp b/src/third_party/boost-1.70.0/boost/functional/hash_fwd.hpp
index 62bc23c73b9..62bc23c73b9 100644
--- a/src/third_party/boost-1.69.0/boost/functional/hash_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/functional/hash_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp
index 3f087bda480..3f087bda480 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/detail/end_impl.hpp
index 7ef13fb4f88..7ef13fb4f88 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/mpl_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/mpl_iterator.hpp
index 87de32ada12..87de32ada12 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/mpl_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/mpl/mpl_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/std_pair.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/std_pair.hpp
index 79de3d44f37..79de3d44f37 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/std_pair.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/fusion/adapted/struct/adapt_struct.hpp
index 928bc995706..928bc995706 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/adapt_struct.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/adapt_struct.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp
index 71a542c7a43..71a542c7a43 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
index c66118f4544..c66118f4544 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
index 3755bc3679b..3755bc3679b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp
index 8430262f8cb..8430262f8cb 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/at_impl.hpp
index 52ed847d6ea..52ed847d6ea 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/begin_impl.hpp
index f67df3a7241..f67df3a7241 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp
index b98e8242028..b98e8242028 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/deref_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/deref_impl.hpp
index c53b51a3208..c53b51a3208 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/end_impl.hpp
index 855be7a4ee1..855be7a4ee1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/extension.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/extension.hpp
index e63a0a45353..e63a0a45353 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/extension.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/extension.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
index afcbe5ba444..afcbe5ba444 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp
index 71d284077ca..71d284077ca 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp
index 00371ca5b8a..00371ca5b8a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/size_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/size_impl.hpp
index baf411bd000..baf411bd000 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/size_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/size_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp
index f820475324d..f820475324d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp
index 63dcbe52ff8..63dcbe52ff8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_back.hpp b/src/third_party/boost-1.70.0/boost/fusion/algorithm/transformation/push_back.hpp
index 51c2569d23b..51c2569d23b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/algorithm/transformation/push_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_front.hpp b/src/third_party/boost-1.70.0/boost/fusion/algorithm/transformation/push_front.hpp
index a1b7b390c39..a1b7b390c39 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/algorithm/transformation/push_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/generation/ignore.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/generation/ignore.hpp
index 781966322fc..781966322fc 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/generation/ignore.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/generation/ignore.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/cons.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/cons.hpp
index dd7f887389f..dd7f887389f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/cons.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/cons.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/cons_fwd.hpp
index 547c42ca9b4..547c42ca9b4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/cons_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/cons_iterator.hpp
index 58b7fd9e360..58b7fd9e360 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/cons_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/at_impl.hpp
index ab36665c11a..ab36665c11a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/begin_impl.hpp
index 088b382d1cf..088b382d1cf 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/limits.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/limits.hpp
index cc64ad7224e..cc64ad7224e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp
index cedc7003434..cedc7003434 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp
index f513a991942..f513a991942 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp
index 2eedc8b293e..2eedc8b293e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp
index 32bfc606f79..32bfc606f79 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp
index 5d0da6df4bc..5d0da6df4bc 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp
index 2b3ae66cb6e..2b3ae66cb6e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp
index 8a4037da487..8a4037da487 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/deref_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/deref_impl.hpp
index 3358a2a2f9f..3358a2a2f9f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/empty_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/empty_impl.hpp
index e25eab0bcc0..e25eab0bcc0 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/empty_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/empty_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/end_impl.hpp
index 6ed05a5f315..6ed05a5f315 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/equal_to_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/equal_to_impl.hpp
index a0fc297fc6f..a0fc297fc6f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/equal_to_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/equal_to_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/next_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/next_impl.hpp
index f766458be07..f766458be07 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/next_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/reverse_cons.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/reverse_cons.hpp
index 14905180fb6..14905180fb6 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/reverse_cons.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/reverse_cons.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/value_at_impl.hpp
index 8b288a12bdc..8b288a12bdc 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/value_of_impl.hpp
index 9e7aa2085c1..9e7aa2085c1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/list_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/list_fwd.hpp
index c5f26192678..c5f26192678 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/list_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/list_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/list/nil.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/list/nil.hpp
index 1b2c234986f..1b2c234986f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/list/nil.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/list/nil.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/advance_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/advance_impl.hpp
index 3bf26a59141..3bf26a59141 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/advance_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/advance_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/at_impl.hpp
index a2900d79430..a2900d79430 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/begin_impl.hpp
index ef24cd74ee2..ef24cd74ee2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/config.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/config.hpp
index 718b2d7954d..718b2d7954d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/limits.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/limits.hpp
index 74a05102d21..74a05102d21 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp
index 35b8e64329f..35b8e64329f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp
index d5e8aad116d..d5e8aad116d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp
index 33f817ffaf9..33f817ffaf9 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp
index 91a9e59c468..91a9e59c468 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp
index b1672857a84..b1672857a84 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp
index c8234520383..c8234520383 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp
index 39f96aa836f..39f96aa836f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp
index ec16fcd94a4..ec16fcd94a4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp
index e1d6e0911a2..e1d6e0911a2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp
index 2d787edfb62..2d787edfb62 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp
index 6829e9b50f8..6829e9b50f8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp
index fb8f0e2f5b2..fb8f0e2f5b2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp
index d631b53208b..d631b53208b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp
index 9628f483ed8..9628f483ed8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp
index 38edabf45e9..38edabf45e9 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp
index a784b757368..a784b757368 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp
index fc9a260e20e..fc9a260e20e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp
index 42c3f5bc6cc..42c3f5bc6cc 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp
index 12b7a570ca7..12b7a570ca7 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp
index 97f64fa3595..97f64fa3595 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp
index 9c64ef05e9c..9c64ef05e9c 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp
index 8d4ea992d15..8d4ea992d15 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp
index 9df40b53a82..9df40b53a82 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp
index 03f289e9c9a..03f289e9c9a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp
index 5da47eebc63..5da47eebc63 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp
index 55c1097a757..55c1097a757 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp
index 47e878bccf4..47e878bccf4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp
index 621f1606bf3..621f1606bf3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp
index 44feb6002ca..44feb6002ca 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector.hpp
index f5c3024ea0e..f5c3024ea0e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp
index 58a31ddec34..58a31ddec34 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp
index d221faece21..d221faece21 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp
index 89f644c5a4e..89f644c5a4e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp
index e69b59f4a6a..e69b59f4a6a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp
index ad838c9ac69..ad838c9ac69 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp
index e799b096573..e799b096573 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp
index 10770907ebb..10770907ebb 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp
index 790dd76135b..790dd76135b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp
index 6c0b48bbc4a..6c0b48bbc4a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp
index 4ec5e2812c2..4ec5e2812c2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp
index 3422e4b9991..3422e4b9991 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp
index f894b1a6998..f894b1a6998 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp
index 932ce36c7d8..932ce36c7d8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp
index 002889ceb54..002889ceb54 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/deref_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/deref_impl.hpp
index c85bb82b3b1..c85bb82b3b1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/distance_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/distance_impl.hpp
index 4c2a1226d66..4c2a1226d66 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/distance_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/distance_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/end_impl.hpp
index a77ef644e6a..a77ef644e6a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/equal_to_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/equal_to_impl.hpp
index 18b3e4a31ed..18b3e4a31ed 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/equal_to_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/equal_to_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/next_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/next_impl.hpp
index 28408205d8d..28408205d8d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/next_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/prior_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/prior_impl.hpp
index 4d040d3959f..4d040d3959f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/prior_impl.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/fusion/container/vector/detail/value_at_impl.hpp
index f29c0e14e59..f29c0e14e59 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/detail/value_of_impl.hpp
index d67ab3fcc21..d67ab3fcc21 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/fusion/container/vector/vector.hpp
index 02ffe514503..02ffe514503 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/vector_fwd.hpp
index dcb0a0fc0c8..dcb0a0fc0c8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/vector_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/container/vector/vector_iterator.hpp
index 150530d14d5..150530d14d5 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/container/vector/vector_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/include/std_pair.hpp b/src/third_party/boost-1.70.0/boost/fusion/include/std_pair.hpp
index 7a882a97ad2..7a882a97ad2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/include/std_pair.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/include/std_pair.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/include/tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/include/tuple.hpp
index 5d167f4f9d0..5d167f4f9d0 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/include/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/include/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/advance.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/advance.hpp
index f81596a7a5f..f81596a7a5f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/advance.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/advance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/basic_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/basic_iterator.hpp
index eae46e63550..eae46e63550 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/basic_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/basic_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/deref.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/deref.hpp
index c31962cb093..c31962cb093 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/deref.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/deref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/deref_data.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/deref_data.hpp
index 65a43324f94..65a43324f94 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/deref_data.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/deref_data.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp
index bee0934f579..bee0934f579 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_value_traits.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/adapt_value_traits.hpp
index e27a2f90fd4..e27a2f90fd4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_value_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/adapt_value_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/advance.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/advance.hpp
index 7eb3bbbdbd5..7eb3bbbdbd5 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/advance.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/advance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/distance.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/distance.hpp
index 698490263b2..698490263b2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/distance.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/distance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segment_sequence.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segment_sequence.hpp
index 8b8d5c13f42..8b8d5c13f42 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segment_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segment_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_equal_to.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_equal_to.hpp
index 77a080f2b23..77a080f2b23 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_iterator.hpp
index 9e114155e01..9e114155e01 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_next_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_next_impl.hpp
index 62502ceef5f..62502ceef5f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_next_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/detail/segmented_next_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/distance.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/distance.hpp
index 7f993c0d175..7f993c0d175 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/distance.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/distance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/equal_to.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/equal_to.hpp
index 191795e1304..191795e1304 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/iterator_facade.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/iterator_facade.hpp
index 1760957eef3..1760957eef3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/iterator_facade.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/iterator_facade.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/key_of.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/key_of.hpp
index 3459ab58e57..3459ab58e57 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/key_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/key_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/convert_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/mpl/convert_iterator.hpp
index 3e17478eb20..3e17478eb20 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/convert_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/mpl/convert_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/fusion_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/mpl/fusion_iterator.hpp
index f8feacf6710..f8feacf6710 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/fusion_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/mpl/fusion_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/next.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/next.hpp
index d6ca3d66305..d6ca3d66305 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/next.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/next.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/prior.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/prior.hpp
index 80e891c791e..80e891c791e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/prior.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/prior.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/segmented_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/segmented_iterator.hpp
index b9aac07c6c4..b9aac07c6c4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/segmented_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/segmented_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/value_of.hpp
index 1408dc7a557..1408dc7a557 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/value_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of_data.hpp b/src/third_party/boost-1.70.0/boost/fusion/iterator/value_of_data.hpp
index 341fe882a91..341fe882a91 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of_data.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/iterator/value_of_data.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/mpl/begin.hpp b/src/third_party/boost-1.70.0/boost/fusion/mpl/begin.hpp
index f97e82ceb1f..f97e82ceb1f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/mpl/begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/mpl/begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/mpl/end.hpp b/src/third_party/boost-1.70.0/boost/fusion/mpl/end.hpp
index e5aa8b96c42..e5aa8b96c42 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/mpl/end.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/mpl/end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison.hpp
index d319f9e07f5..d319f9e07f5 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/equal_to.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/equal_to.hpp
index cffed6c399a..cffed6c399a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/greater.hpp
index d762652935a..d762652935a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp
index d15d88c4040..d15d88c4040 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/less.hpp
index 04377d69603..04377d69603 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less_equal.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/less_equal.hpp
index e61d33c4fa4..e61d33c4fa4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
index 323b2ac9d09..323b2ac9d09 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/enable_comparison.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/enable_comparison.hpp
index 12794177142..12794177142 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/enable_comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/enable_comparison.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/equal_to.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/equal_to.hpp
index 283ffefc8b7..283ffefc8b7 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/greater.hpp
index fbbb7bfae2f..fbbb7bfae2f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/greater_equal.hpp
index 7b91a8886b9..7b91a8886b9 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/less.hpp
index b056552a9ea..b056552a9ea 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less_equal.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/less_equal.hpp
index c5dfa8d5c74..c5dfa8d5c74 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/not_equal_to.hpp
index fc2fef3343f..fc2fef3343f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/comparison/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/at.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/at.hpp
index a103e078a2f..a103e078a2f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/at.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/at.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/begin.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/begin.hpp
index 79c14d74aba..79c14d74aba 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
index ec20ac414d7..ec20ac414d7 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
index 12d9e24c479..12d9e24c479 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
index 55419ed80d2..55419ed80d2 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
index da48649a246..da48649a246 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp
index 4defcedde1a..4defcedde1a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/empty.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/empty.hpp
index 6a0dbe74a5c..6a0dbe74a5c 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/end.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/end.hpp
index b342468f0ee..b342468f0ee 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/end.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/segments.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/segments.hpp
index 41501a96435..41501a96435 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/segments.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/segments.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/size.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/size.hpp
index 97aa3ef9ecf..97aa3ef9ecf 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/value_at.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/value_at.hpp
index 152f0c94555..152f0c94555 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/value_at.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic/value_at.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic_fwd.hpp
index a6354ea3bb3..a6354ea3bb3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/intrinsic_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/io.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/io.hpp
index b0baf426c5f..b0baf426c5f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/io.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/in.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/in.hpp
index d0a8dc4964a..d0a8dc4964a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/in.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/in.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/manip.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/manip.hpp
index 01dd476cbd5..01dd476cbd5 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/manip.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/manip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/out.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/out.hpp
index 7da87a53a41..7da87a53a41 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/out.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/detail/out.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/in.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/in.hpp
index 288c247331b..288c247331b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/in.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/in.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/out.hpp b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/out.hpp
index 5c4637d57b6..5c4637d57b6 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/sequence/io/out.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/sequence/io/out.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/as_const.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/as_const.hpp
index 04d5bfcc144..04d5bfcc144 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/as_const.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/as_const.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/category_of.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/category_of.hpp
index 7397c45ad64..7397c45ad64 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/category_of.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/fusion/support/config.hpp
index dc614d9d33b..dc614d9d33b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/access.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/access.hpp
index ab88538314c..ab88538314c 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/access.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/access.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/and.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/and.hpp
index 42926cb1584..42926cb1584 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/as_fusion_element.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/as_fusion_element.hpp
index 2af960eedf3..2af960eedf3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/as_fusion_element.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/as_fusion_element.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/enabler.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/enabler.hpp
index ea263a41d33..ea263a41d33 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/enabler.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/enabler.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/index_sequence.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/index_sequence.hpp
index e86def005e1..e86def005e1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/index_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/index_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_mpl_sequence.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/is_mpl_sequence.hpp
index 16b6db12355..16b6db12355 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_mpl_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/is_mpl_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp
index 189c784dabe..189c784dabe 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/mpl_iterator_category.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/mpl_iterator_category.hpp
index fcb00a01ca6..fcb00a01ca6 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/mpl_iterator_category.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/mpl_iterator_category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/pp_round.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/pp_round.hpp
index 6c43b66f11e..6c43b66f11e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/pp_round.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/pp_round.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp
index 6a388bf8340..6a388bf8340 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/is_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/is_iterator.hpp
index b48aab8c3f6..b48aab8c3f6 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/is_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/is_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/is_segmented.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/is_segmented.hpp
index 1326feb346f..1326feb346f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/is_segmented.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/is_segmented.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/is_sequence.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/is_sequence.hpp
index 95a9423f942..95a9423f942 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/is_sequence.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/fusion/support/is_view.hpp
index b2b52c423e7..b2b52c423e7 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/is_view.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/is_view.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/iterator_base.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/iterator_base.hpp
index 5d8ce3abb77..5d8ce3abb77 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/iterator_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/iterator_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/sequence_base.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/sequence_base.hpp
index 2f9320e6c82..2f9320e6c82 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/sequence_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/sequence_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/tag_of.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/tag_of.hpp
index 61cb3b19ae8..61cb3b19ae8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/tag_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/tag_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/tag_of_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/tag_of_fwd.hpp
index ba434d93345..ba434d93345 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/tag_of_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/tag_of_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/void.hpp b/src/third_party/boost-1.70.0/boost/fusion/support/void.hpp
index 7650519012d..7650519012d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/support/void.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/support/void.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple.hpp
index 49dac1d745a..49dac1d745a 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/make_tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/make_tuple.hpp
index f87ea5a2315..f87ea5a2315 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/make_tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/make_tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp
index 6abb0336889..6abb0336889 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp
index f0ba114d6e8..f0ba114d6e8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp
index 31ef304e2a9..31ef304e2a9 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp
index 850829f3c7d..850829f3c7d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp
index c85741b9588..c85741b9588 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp
index b4c99c51801..b4c99c51801 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp
index 3fd0e18becf..3fd0e18becf 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp
index a24a29a12ec..a24a29a12ec 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp
index 7ec319608b3..7ec319608b3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp
index 73de49ffb86..73de49ffb86 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp
index 3769f890201..3769f890201 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp
index 9db26a0c9a1..9db26a0c9a1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp
index b9f3e017c32..b9f3e017c32 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp
index 44e0d2c1d51..44e0d2c1d51 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp
index 200bf5db500..200bf5db500 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp
index db157b65491..db157b65491 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp
index 18fd75c4083..18fd75c4083 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
index 234936c587d..234936c587d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp
index 5898c6b9784..5898c6b9784 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp
index 67ec63b78e3..67ec63b78e3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp
index 37581f20c50..37581f20c50 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp
index d81cb0cdd62..d81cb0cdd62 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp
index 69eb0d8ddfb..69eb0d8ddfb 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp
index a024e5731cf..a024e5731cf 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple.hpp
index 45408f0652b..45408f0652b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_expand.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_expand.hpp
index 3909f647b85..3909f647b85 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_expand.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_expand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_fwd.hpp
index ef6bdfe8b60..ef6bdfe8b60 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_tie.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_tie.hpp
index b650d1cc160..b650d1cc160 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_tie.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/detail/tuple_tie.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/make_tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/make_tuple.hpp
index e5cbb3b2ac8..e5cbb3b2ac8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/make_tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/make_tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/tuple.hpp
index 16b855113c8..16b855113c8 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/tuple_fwd.hpp
index b763acd52fe..b763acd52fe 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/tuple_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_tie.hpp b/src/third_party/boost-1.70.0/boost/fusion/tuple/tuple_tie.hpp
index a07dc0a43e4..a07dc0a43e4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_tie.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/tuple/tuple_tie.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range.hpp
index 78d6ffad9e4..78d6ffad9e4 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/at_impl.hpp
index 20f1758310c..20f1758310c 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp
index 7e00dec0916..7e00dec0916 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/end_impl.hpp
index b76aa91cd51..b76aa91cd51 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp
index 88f4358bdf1..88f4358bdf1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp
index 4b2c11ebe21..4b2c11ebe21 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp
index bbf4c45ad3b..bbf4c45ad3b 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/size_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/size_impl.hpp
index 0678e5dde15..0678e5dde15 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/size_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/size_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
index 652b8da192f..652b8da192f 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/iterator_range.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/iterator_range.hpp
index 272abcd9114..272abcd9114 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/iterator_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/iterator_range/iterator_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/begin_impl.hpp
index b7a961a7f24..b7a961a7f24 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
index 2d5f8317e1d..2d5f8317e1d 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/deref_impl.hpp
index 0e1e39fffa0..0e1e39fffa0 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/end_impl.hpp
index 0b4b9b0abdf..0b4b9b0abdf 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp
index ec682f614d0..ec682f614d0 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/next_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/next_impl.hpp
index a7d18757da6..a7d18757da6 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/next_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
index f797135b395..f797135b395 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp
index f058a60cbcb..f058a60cbcb 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view.hpp
index 676cbc54dd3..676cbc54dd3 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_fwd.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view_fwd.hpp
index c3e3b45e831..c3e3b45e831 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view_iterator.hpp
index ddd1341ee1e..ddd1341ee1e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/joint_view/joint_view_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/advance_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/advance_impl.hpp
index 5af22321b91..5af22321b91 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/advance_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/advance_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/at_impl.hpp
index 6c4c7579b66..6c4c7579b66 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/begin_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/begin_impl.hpp
index d6bca8f6b56..d6bca8f6b56 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/deref_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/deref_impl.hpp
index acb90d836b9..acb90d836b9 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/distance_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/distance_impl.hpp
index 9cd85fdc316..9cd85fdc316 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/distance_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/distance_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/end_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/end_impl.hpp
index d662ac246be..d662ac246be 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp
index a14b4c51285..a14b4c51285 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/next_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/next_impl.hpp
index 55a4ff11b40..55a4ff11b40 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/next_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/prior_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/prior_impl.hpp
index 823f96e5a5e..823f96e5a5e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/prior_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/prior_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/size_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/size_impl.hpp
index eba89cdd8d7..eba89cdd8d7 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/size_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/size_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_at_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/value_at_impl.hpp
index b5721b84bd1..b5721b84bd1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_of_impl.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/value_of_impl.hpp
index dfb345c8cd1..dfb345c8cd1 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/single_view.hpp
index a4437902c1e..a4437902c1e 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/single_view.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view_iterator.hpp b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/single_view_iterator.hpp
index 0f3e2744b57..0f3e2744b57 100644
--- a/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/fusion/view/single_view/single_view_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/generator_iterator.hpp b/src/third_party/boost-1.70.0/boost/generator_iterator.hpp
index 0fe1569c5a1..0fe1569c5a1 100644
--- a/src/third_party/boost-1.69.0/boost/generator_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/generator_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/get_pointer.hpp b/src/third_party/boost-1.70.0/boost/get_pointer.hpp
index 36e2cd7d0fb..36e2cd7d0fb 100644
--- a/src/third_party/boost-1.69.0/boost/get_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/get_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/indirect_reference.hpp b/src/third_party/boost-1.70.0/boost/indirect_reference.hpp
index 3279cd052c8..3279cd052c8 100644
--- a/src/third_party/boost-1.69.0/boost/indirect_reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/indirect_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer.hpp b/src/third_party/boost-1.70.0/boost/integer.hpp
index 9fa00194845..9fa00194845 100644
--- a/src/third_party/boost-1.69.0/boost/integer.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer/common_factor.hpp b/src/third_party/boost-1.70.0/boost/integer/common_factor.hpp
index fab919937ca..fab919937ca 100644
--- a/src/third_party/boost-1.69.0/boost/integer/common_factor.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer/common_factor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer/common_factor_ct.hpp b/src/third_party/boost-1.70.0/boost/integer/common_factor_ct.hpp
index 0671d161c37..0671d161c37 100644
--- a/src/third_party/boost-1.69.0/boost/integer/common_factor_ct.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer/common_factor_ct.hpp
diff --git a/src/third_party/boost-1.70.0/boost/integer/common_factor_rt.hpp b/src/third_party/boost-1.70.0/boost/integer/common_factor_rt.hpp
new file mode 100644
index 00000000000..65f18d24aff
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/integer/common_factor_rt.hpp
@@ -0,0 +1,580 @@
+// (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;
+ ++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;
+ ++first;
+ while (d != T(0) && 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.70.0/boost/integer/extended_euclidean.hpp b/src/third_party/boost-1.70.0/boost/integer/extended_euclidean.hpp
new file mode 100644
index 00000000000..6326a1f1bda
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/integer/extended_euclidean.hpp
@@ -0,0 +1,83 @@
+/*
+ * (C) Copyright Nick Thompson 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)
+ */
+#ifndef BOOST_INTEGER_EXTENDED_EUCLIDEAN_HPP
+#define BOOST_INTEGER_EXTENDED_EUCLIDEAN_HPP
+#include <limits>
+#include <stdexcept>
+#include <boost/throw_exception.hpp>
+#include <boost/core/swap.hpp>
+#include <boost/core/enable_if.hpp>
+
+namespace boost { namespace integer {
+
+// From "The Joy of Factoring", Algorithm 2.7, with a small optimization to remove tmps from Wikipedia.
+// Solves mx + ny = gcd(m,n). Returns tuple with (gcd(m,n), x, y).
+
+template<class Z>
+struct euclidean_result_t
+{
+ Z gcd;
+ Z x;
+ Z y;
+};
+
+template<class Z>
+typename boost::enable_if_c< std::numeric_limits< Z >::is_signed, euclidean_result_t< Z > >::type
+extended_euclidean(Z m, Z n)
+{
+ if (m < 1 || n < 1)
+ {
+ BOOST_THROW_EXCEPTION(std::domain_error("extended_euclidean: arguments must be strictly positive"));
+ }
+
+ bool swapped = false;
+ if (m < n)
+ {
+ swapped = true;
+ boost::swap(m, n);
+ }
+ Z u0 = m;
+ Z u1 = 1;
+ Z u2 = 0;
+ Z v0 = n;
+ Z v1 = 0;
+ Z v2 = 1;
+ Z w0;
+ Z w1;
+ Z w2;
+ while(v0 > 0)
+ {
+ Z q = u0/v0;
+ w0 = u0 - q*v0;
+ w1 = u1 - q*v1;
+ w2 = u2 - q*v2;
+ u0 = v0;
+ u1 = v1;
+ u2 = v2;
+ v0 = w0;
+ v1 = w1;
+ v2 = w2;
+ }
+
+ euclidean_result_t< Z > result;
+ result.gcd = u0;
+ if (!swapped)
+ {
+ result.x = u1;
+ result.y = u2;
+ }
+ else
+ {
+ result.x = u2;
+ result.y = u1;
+ }
+
+ return result;
+}
+
+}}
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/integer/integer_log2.hpp b/src/third_party/boost-1.70.0/boost/integer/integer_log2.hpp
index 8b34ce7440a..8b34ce7440a 100644
--- a/src/third_party/boost-1.69.0/boost/integer/integer_log2.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer/integer_log2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer/integer_mask.hpp b/src/third_party/boost-1.70.0/boost/integer/integer_mask.hpp
index eee4679b84b..eee4679b84b 100644
--- a/src/third_party/boost-1.69.0/boost/integer/integer_mask.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer/integer_mask.hpp
diff --git a/src/third_party/boost-1.70.0/boost/integer/mod_inverse.hpp b/src/third_party/boost-1.70.0/boost/integer/mod_inverse.hpp
new file mode 100644
index 00000000000..04b6e819320
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/integer/mod_inverse.hpp
@@ -0,0 +1,53 @@
+/*
+ * (C) Copyright Nick Thompson 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)
+ */
+#ifndef BOOST_INTEGER_MOD_INVERSE_HPP
+#define BOOST_INTEGER_MOD_INVERSE_HPP
+#include <stdexcept>
+#include <boost/throw_exception.hpp>
+#include <boost/integer/extended_euclidean.hpp>
+
+namespace boost { namespace integer {
+
+// From "The Joy of Factoring", Algorithm 2.7.
+// Here's some others names I've found for this function:
+// PowerMod[a, -1, m] (Mathematica)
+// mpz_invert (gmplib)
+// modinv (some dude on stackoverflow)
+// Would mod_inverse be sometimes mistaken as the modular *additive* inverse?
+// In any case, I think this is the best name we can get for this function without agonizing.
+template<class Z>
+Z mod_inverse(Z a, Z modulus)
+{
+ if (modulus < Z(2))
+ {
+ BOOST_THROW_EXCEPTION(std::domain_error("mod_inverse: modulus must be > 1"));
+ }
+ // make sure a < modulus:
+ a = a % modulus;
+ if (a == Z(0))
+ {
+ // a doesn't have a modular multiplicative inverse:
+ return Z(0);
+ }
+ boost::integer::euclidean_result_t<Z> u = boost::integer::extended_euclidean(a, modulus);
+ if (u.gcd > Z(1))
+ {
+ return Z(0);
+ }
+ // x might not be in the range 0 < x < m, let's fix that:
+ while (u.x <= Z(0))
+ {
+ u.x += modulus;
+ }
+ // While indeed this is an inexpensive and comforting check,
+ // the multiplication overflows and hence makes the check itself buggy.
+ //BOOST_ASSERT(u.x*a % modulus == 1);
+ return u.x;
+}
+
+}}
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/integer/static_log2.hpp b/src/third_party/boost-1.70.0/boost/integer/static_log2.hpp
index 56c7a001251..56c7a001251 100644
--- a/src/third_party/boost-1.69.0/boost/integer/static_log2.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer/static_log2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer/static_min_max.hpp b/src/third_party/boost-1.70.0/boost/integer/static_min_max.hpp
index ee76fd424a1..ee76fd424a1 100644
--- a/src/third_party/boost-1.69.0/boost/integer/static_min_max.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer/static_min_max.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer_fwd.hpp b/src/third_party/boost-1.70.0/boost/integer_fwd.hpp
index 18519dd696d..18519dd696d 100644
--- a/src/third_party/boost-1.69.0/boost/integer_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer_traits.hpp b/src/third_party/boost-1.70.0/boost/integer_traits.hpp
index 94eb00d31e4..94eb00d31e4 100644
--- a/src/third_party/boost-1.69.0/boost/integer_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/integer_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/allocators/allocator.hpp b/src/third_party/boost-1.70.0/boost/interprocess/allocators/allocator.hpp
index 9a5bf32631a..9a5bf32631a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/allocators/allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/allocators/allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/allocators/detail/allocator_common.hpp b/src/third_party/boost-1.70.0/boost/interprocess/allocators/detail/allocator_common.hpp
index 79394046966..79394046966 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/allocators/detail/allocator_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/allocators/detail/allocator_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/containers/allocation_type.hpp b/src/third_party/boost-1.70.0/boost/interprocess/containers/allocation_type.hpp
index 71752074731..71752074731 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/containers/allocation_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/containers/allocation_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/containers/containers_fwd.hpp b/src/third_party/boost-1.70.0/boost/interprocess/containers/containers_fwd.hpp
index 9620a92ee92..9620a92ee92 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/containers/containers_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/containers/containers_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/containers/string.hpp b/src/third_party/boost-1.70.0/boost/interprocess/containers/string.hpp
index bd1286411a8..bd1286411a8 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/containers/string.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/containers/string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/containers/vector.hpp b/src/third_party/boost-1.70.0/boost/interprocess/containers/vector.hpp
index 89b3e471499..89b3e471499 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/containers/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/containers/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/containers/version_type.hpp b/src/third_party/boost-1.70.0/boost/interprocess/containers/version_type.hpp
index 68850729923..68850729923 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/containers/version_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/containers/version_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/creation_tags.hpp b/src/third_party/boost-1.70.0/boost/interprocess/creation_tags.hpp
index faf4e6f2d6b..faf4e6f2d6b 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/creation_tags.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/creation_tags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/atomic.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/atomic.hpp
index 041076cd652..041076cd652 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/cast_tags.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/cast_tags.hpp
index e47b86344cc..e47b86344cc 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/cast_tags.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/cast_tags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_begin.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_begin.hpp
index d003ccd3144..d003ccd3144 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_end.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_end.hpp
index 55bccd1bf16..55bccd1bf16 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_begin.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_external_begin.hpp
index fb578ef013a..fb578ef013a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_external_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_end.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/config_external_end.hpp
index 214558f58c8..214558f58c8 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_end.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/interprocess/detail/file_wrapper.hpp
index 99e0fea570a..99e0fea570a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/file_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/file_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/in_place_interface.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/in_place_interface.hpp
index 367f9dca3dd..367f9dca3dd 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/in_place_interface.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/in_place_interface.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/intermodule_singleton_common.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/intermodule_singleton_common.hpp
index 392db1f86b7..392db1f86b7 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/intermodule_singleton_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/intermodule_singleton_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/interprocess_tester.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/interprocess_tester.hpp
index 368820f82a3..368820f82a3 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/interprocess_tester.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/interprocess_tester.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_memory_impl.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/managed_memory_impl.hpp
index 939dc6a9717..939dc6a9717 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_memory_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/managed_memory_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_open_or_create_impl.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/managed_open_or_create_impl.hpp
index b47c310f48a..b47c310f48a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_open_or_create_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/managed_open_or_create_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/math_functions.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/math_functions.hpp
index a19efac1a42..a19efac1a42 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/math_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/math_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/min_max.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/min_max.hpp
index 2097ff42460..2097ff42460 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/min_max.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/min_max.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/mpl.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/mpl.hpp
index 3dd8d63e179..3dd8d63e179 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/mpl.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/mpl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/named_proxy.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/named_proxy.hpp
index f3eb61d3981..f3eb61d3981 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/named_proxy.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/named_proxy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/nothrow.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/nothrow.hpp
index d79ba7647ec..d79ba7647ec 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/nothrow.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/nothrow.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/os_file_functions.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/os_file_functions.hpp
index 7a41868188c..7a41868188c 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/os_file_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/os_file_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/os_thread_functions.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/os_thread_functions.hpp
index 1c48ecf58b7..1c48ecf58b7 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/os_thread_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/os_thread_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/posix_time_types_wrk.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/posix_time_types_wrk.hpp
index 5a12d83d76a..5a12d83d76a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/posix_time_types_wrk.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/posix_time_types_wrk.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/segment_manager_helper.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/segment_manager_helper.hpp
index 96ccf227fe1..96ccf227fe1 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/segment_manager_helper.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/segment_manager_helper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/shared_dir_helpers.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/shared_dir_helpers.hpp
index 0fcd898dcb9..0fcd898dcb9 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/shared_dir_helpers.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/shared_dir_helpers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/simple_swap.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/simple_swap.hpp
index 797a997075b..797a997075b 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/simple_swap.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/simple_swap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/std_fwd.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/std_fwd.hpp
index 282771c3e61..282771c3e61 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/std_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/std_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/transform_iterator.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/transform_iterator.hpp
index d409b523622..d409b523622 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/transform_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/transform_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/type_traits.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/type_traits.hpp
index 5765c888e7c..5765c888e7c 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/type_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/type_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/utilities.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/utilities.hpp
index c1b23423c22..c1b23423c22 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/utilities.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/utilities.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/variadic_templates_tools.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/variadic_templates_tools.hpp
index 936f702bc26..936f702bc26 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/variadic_templates_tools.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/interprocess/detail/win32_api.hpp
index bf0c6831855..bf0c6831855 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/win32_api.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/win32_api.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/windows_intermodule_singleton.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/windows_intermodule_singleton.hpp
index 12ad2015e3a..12ad2015e3a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/windows_intermodule_singleton.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/windows_intermodule_singleton.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/workaround.hpp b/src/third_party/boost-1.70.0/boost/interprocess/detail/workaround.hpp
index ea92db7f357..ea92db7f357 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/detail/workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/detail/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/errors.hpp b/src/third_party/boost-1.70.0/boost/interprocess/errors.hpp
index f0198527a45..f0198527a45 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/errors.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/interprocess/exceptions.hpp
index 336a5fce825..336a5fce825 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/exceptions.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/exceptions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/file_mapping.hpp b/src/third_party/boost-1.70.0/boost/interprocess/file_mapping.hpp
index 0d1cf1fe418..0d1cf1fe418 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/file_mapping.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/file_mapping.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/indexes/iset_index.hpp b/src/third_party/boost-1.70.0/boost/interprocess/indexes/iset_index.hpp
index ffaa24fa775..ffaa24fa775 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/indexes/iset_index.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/indexes/iset_index.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/interprocess_fwd.hpp b/src/third_party/boost-1.70.0/boost/interprocess/interprocess_fwd.hpp
index 882256e9344..882256e9344 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/interprocess_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/interprocess_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/managed_mapped_file.hpp b/src/third_party/boost-1.70.0/boost/interprocess/managed_mapped_file.hpp
index 14ec160614b..14ec160614b 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/managed_mapped_file.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/managed_mapped_file.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/managed_shared_memory.hpp b/src/third_party/boost-1.70.0/boost/interprocess/managed_shared_memory.hpp
index fadc19a71e6..fadc19a71e6 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/managed_shared_memory.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/managed_shared_memory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/mapped_region.hpp b/src/third_party/boost-1.70.0/boost/interprocess/mapped_region.hpp
index 1fb64086b56..1fb64086b56 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/mapped_region.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/mapped_region.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp b/src/third_party/boost-1.70.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
index eda4cf1be30..eda4cf1be30 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp b/src/third_party/boost-1.70.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp
index 7da31f73bfc..7da31f73bfc 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/offset_ptr.hpp b/src/third_party/boost-1.70.0/boost/interprocess/offset_ptr.hpp
index 66d38cc965a..66d38cc965a 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/offset_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/offset_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/permissions.hpp b/src/third_party/boost-1.70.0/boost/interprocess/permissions.hpp
index 87fea28be79..87fea28be79 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/permissions.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/permissions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/segment_manager.hpp b/src/third_party/boost-1.70.0/boost/interprocess/segment_manager.hpp
index 8e2221e4dfa..8e2221e4dfa 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/segment_manager.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/segment_manager.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/shared_memory_object.hpp b/src/third_party/boost-1.70.0/boost/interprocess/shared_memory_object.hpp
index 34a695d461b..34a695d461b 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/shared_memory_object.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/shared_memory_object.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/smart_ptr/deleter.hpp b/src/third_party/boost-1.70.0/boost/interprocess/smart_ptr/deleter.hpp
index 3cd469df8ba..3cd469df8ba 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/smart_ptr/deleter.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/smart_ptr/deleter.hpp
diff --git a/src/third_party/boost-1.70.0/boost/interprocess/streams/bufferstream.hpp b/src/third_party/boost-1.70.0/boost/interprocess/streams/bufferstream.hpp
new file mode 100644
index 00000000000..3690128fe20
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/interprocess/streams/bufferstream.hpp
@@ -0,0 +1,491 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-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.
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// This file comes from SGI's sstream file. Modified by Ion Gaztanaga 2005-2012.
+// Changed internal SGI string to a buffer. Added efficient
+// internal buffer get/set/swap functions, so that we can obtain/establish the
+// internal buffer without any reallocation or copy. Kill those temporaries!
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ */
+
+//!\file
+//!This file defines basic_bufferbuf, basic_ibufferstream,
+//!basic_obufferstream, and basic_bufferstream classes. These classes
+//!represent streamsbufs and streams whose sources or destinations
+//!are fixed size character buffers.
+
+#ifndef BOOST_INTERPROCESS_BUFFERSTREAM_HPP
+#define BOOST_INTERPROCESS_BUFFERSTREAM_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 <iosfwd>
+#include <ios>
+#include <istream>
+#include <ostream>
+#include <string> // char traits
+#include <cstddef> // ptrdiff_t
+#include <boost/assert.hpp>
+#include <boost/interprocess/interprocess_fwd.hpp>
+
+namespace boost { namespace interprocess {
+
+//!A streambuf class that controls the transmission of elements to and from
+//!a basic_xbufferstream. The elements are transmitted from a to a fixed
+//!size buffer
+template <class CharT, class CharTraits>
+class basic_bufferbuf
+ : public std::basic_streambuf<CharT, CharTraits>
+{
+ public:
+ typedef CharT char_type;
+ typedef typename CharTraits::int_type int_type;
+ typedef typename CharTraits::pos_type pos_type;
+ typedef typename CharTraits::off_type off_type;
+ typedef CharTraits traits_type;
+ typedef std::basic_streambuf<char_type, traits_type> basic_streambuf_t;
+
+ public:
+ //!Constructor.
+ //!Does not throw.
+ explicit basic_bufferbuf(std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ : basic_streambuf_t(), m_mode(mode), m_buffer(0), m_length(0)
+ {}
+
+ //!Constructor. Assigns formatting buffer.
+ //!Does not throw.
+ explicit basic_bufferbuf(CharT *buf, std::size_t length,
+ std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ : basic_streambuf_t(), m_mode(mode), m_buffer(buf), m_length(length)
+ { this->set_pointers(); }
+
+ virtual ~basic_bufferbuf(){}
+
+ public:
+ //!Returns the pointer and size of the internal buffer.
+ //!Does not throw.
+ std::pair<CharT *, std::size_t> buffer() const
+ { return std::pair<CharT *, std::size_t>(m_buffer, m_length); }
+
+ //!Sets the underlying buffer to a new value
+ //!Does not throw.
+ void buffer(CharT *buf, std::size_t length)
+ { m_buffer = buf; m_length = length; this->set_pointers(); }
+
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private:
+ void set_pointers()
+ {
+ // The initial read position is the beginning of the buffer.
+ if(m_mode & std::ios_base::in)
+ this->setg(m_buffer, m_buffer, m_buffer + m_length);
+
+ // The initial write position is the beginning of the buffer.
+ if(m_mode & std::ios_base::out)
+ this->setp(m_buffer, m_buffer + m_length);
+ }
+
+ protected:
+ virtual int_type underflow()
+ {
+ // Precondition: gptr() >= egptr(). Returns a character, if available.
+ return this->gptr() != this->egptr() ?
+ CharTraits::to_int_type(*this->gptr()) : CharTraits::eof();
+ }
+
+ virtual int_type pbackfail(int_type c = CharTraits::eof())
+ {
+ if(this->gptr() != this->eback()) {
+ if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
+ if(CharTraits::eq(CharTraits::to_char_type(c), this->gptr()[-1])) {
+ this->gbump(-1);
+ return c;
+ }
+ else if(m_mode & std::ios_base::out) {
+ this->gbump(-1);
+ *this->gptr() = c;
+ return c;
+ }
+ else
+ return CharTraits::eof();
+ }
+ else {
+ this->gbump(-1);
+ return CharTraits::not_eof(c);
+ }
+ }
+ else
+ return CharTraits::eof();
+ }
+
+ virtual int_type overflow(int_type c = CharTraits::eof())
+ {
+ if(m_mode & std::ios_base::out) {
+ if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
+// if(!(m_mode & std::ios_base::in)) {
+// if(this->pptr() != this->epptr()) {
+// *this->pptr() = CharTraits::to_char_type(c);
+// this->pbump(1);
+// return c;
+// }
+// else
+// return CharTraits::eof();
+// }
+// else {
+ if(this->pptr() == this->epptr()) {
+ //We can't append to a static buffer
+ return CharTraits::eof();
+ }
+ else {
+ *this->pptr() = CharTraits::to_char_type(c);
+ this->pbump(1);
+ return c;
+ }
+// }
+ }
+ else // c is EOF, so we don't have to do anything
+ return CharTraits::not_eof(c);
+ }
+ else // Overflow always fails if it's read-only.
+ return CharTraits::eof();
+ }
+
+ virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir,
+ std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ {
+ bool in = false;
+ bool out = false;
+
+ const std::ios_base::openmode inout =
+ std::ios_base::in | std::ios_base::out;
+
+ if((mode & inout) == inout) {
+ if(dir == std::ios_base::beg || dir == std::ios_base::end)
+ in = out = true;
+ }
+ else if(mode & std::ios_base::in)
+ in = true;
+ else if(mode & std::ios_base::out)
+ out = true;
+
+ if(!in && !out)
+ return pos_type(off_type(-1));
+ else if((in && (!(m_mode & std::ios_base::in) || (off != 0 && this->gptr() == 0) )) ||
+ (out && (!(m_mode & std::ios_base::out) || (off != 0 && this->pptr() == 0))))
+ return pos_type(off_type(-1));
+
+ std::streamoff newoff;
+ switch(dir) {
+ case std::ios_base::beg:
+ newoff = 0;
+ break;
+ case std::ios_base::end:
+ newoff = static_cast<std::streamoff>(m_length);
+ break;
+ case std::ios_base::cur:
+ newoff = in ? static_cast<std::streamoff>(this->gptr() - this->eback())
+ : static_cast<std::streamoff>(this->pptr() - this->pbase());
+ break;
+ default:
+ return pos_type(off_type(-1));
+ }
+
+ off += newoff;
+
+ if(in) {
+ std::ptrdiff_t n = this->egptr() - this->eback();
+
+ if(off < 0 || off > n)
+ return pos_type(off_type(-1));
+ else
+ this->setg(this->eback(), this->eback() + off, this->eback() + n);
+ }
+
+ if(out) {
+ std::ptrdiff_t n = this->epptr() - this->pbase();
+
+ if(off < 0 || off > n)
+ return pos_type(off_type(-1));
+ else {
+ this->setp(this->pbase(), this->pbase() + n);
+ this->pbump(off);
+ }
+ }
+
+ return pos_type(off);
+ }
+
+ virtual pos_type seekpos(pos_type pos, std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ { return seekoff(pos - pos_type(off_type(0)), std::ios_base::beg, mode); }
+
+ private:
+ std::ios_base::openmode m_mode;
+ CharT * m_buffer;
+ std::size_t m_length;
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+};
+
+//!A basic_istream class that uses a fixed size character buffer
+//!as its formatting buffer.
+template <class CharT, class CharTraits>
+class basic_ibufferstream :
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private basic_bufferbuf<CharT, CharTraits>,
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+ public std::basic_istream<CharT, CharTraits>
+{
+ public: // Typedefs
+ typedef typename std::basic_ios
+ <CharT, CharTraits>::char_type char_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::int_type int_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::pos_type pos_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::off_type off_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type;
+
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private:
+ typedef basic_bufferbuf<CharT, CharTraits> bufferbuf_t;
+ typedef std::basic_ios<char_type, CharTraits> basic_ios_t;
+ typedef std::basic_istream<char_type, CharTraits> basic_streambuf_t;
+ bufferbuf_t & get_buf() { return *this; }
+ const bufferbuf_t & get_buf() const{ return *this; }
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+
+ public:
+ //!Constructor.
+ //!Does not throw.
+ basic_ibufferstream(std::ios_base::openmode mode = std::ios_base::in)
+ : //basic_ios_t() is called first (lefting it uninitialized) as it's a
+ //virtual base of basic_istream. The class will be initialized when
+ //basic_istream is constructed calling basic_ios_t::init().
+ //As bufferbuf_t's constructor does not throw there is no risk of
+ //calling the basic_ios_t's destructor without calling basic_ios_t::init()
+ bufferbuf_t(mode | std::ios_base::in)
+ , basic_streambuf_t(this)
+ {}
+
+ //!Constructor. Assigns formatting buffer.
+ //!Does not throw.
+ basic_ibufferstream(const CharT *buf, std::size_t length,
+ std::ios_base::openmode mode = std::ios_base::in)
+ : //basic_ios_t() is called first (lefting it uninitialized) as it's a
+ //virtual base of basic_istream. The class will be initialized when
+ //basic_istream is constructed calling basic_ios_t::init().
+ //As bufferbuf_t's constructor does not throw there is no risk of
+ //calling the basic_ios_t's destructor without calling basic_ios_t::init()
+ bufferbuf_t(const_cast<CharT*>(buf), length, mode | std::ios_base::in)
+ , basic_streambuf_t(this)
+ {}
+
+ ~basic_ibufferstream(){}
+
+ public:
+ //!Returns the address of the stored
+ //!stream buffer.
+ basic_bufferbuf<CharT, CharTraits>* rdbuf() const
+ { return const_cast<basic_bufferbuf<CharT, CharTraits>*>(&get_buf()); }
+
+ //!Returns the pointer and size of the internal buffer.
+ //!Does not throw.
+ std::pair<const CharT *, std::size_t> buffer() const
+ { return get_buf().buffer(); }
+
+ //!Sets the underlying buffer to a new value. Resets
+ //!stream position. Does not throw.
+ void buffer(const CharT *buf, std::size_t length)
+ { get_buf().buffer(const_cast<CharT*>(buf), length); }
+};
+
+//!A basic_ostream class that uses a fixed size character buffer
+//!as its formatting buffer.
+template <class CharT, class CharTraits>
+class basic_obufferstream :
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private basic_bufferbuf<CharT, CharTraits>,
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+ public std::basic_ostream<CharT, CharTraits>
+{
+ public:
+ typedef typename std::basic_ios
+ <CharT, CharTraits>::char_type char_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::int_type int_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::pos_type pos_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::off_type off_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type;
+
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private:
+ typedef basic_bufferbuf<CharT, CharTraits> bufferbuf_t;
+ typedef std::basic_ios<char_type, CharTraits> basic_ios_t;
+ typedef std::basic_ostream<char_type, CharTraits> basic_ostream_t;
+ bufferbuf_t & get_buf() { return *this; }
+ const bufferbuf_t & get_buf() const{ return *this; }
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+
+ public:
+ //!Constructor.
+ //!Does not throw.
+ basic_obufferstream(std::ios_base::openmode mode = std::ios_base::out)
+ : //basic_ios_t() is called first (lefting it uninitialized) as it's a
+ //virtual base of basic_istream. The class will be initialized when
+ //basic_istream is constructed calling basic_ios_t::init().
+ //As bufferbuf_t's constructor does not throw there is no risk of
+ //calling the basic_ios_t's destructor without calling basic_ios_t::init()
+ bufferbuf_t(mode | std::ios_base::out)
+ , basic_ostream_t(this)
+ {}
+
+ //!Constructor. Assigns formatting buffer.
+ //!Does not throw.
+ basic_obufferstream(CharT *buf, std::size_t length,
+ std::ios_base::openmode mode = std::ios_base::out)
+ : //basic_ios_t() is called first (lefting it uninitialized) as it's a
+ //virtual base of basic_istream. The class will be initialized when
+ //basic_istream is constructed calling basic_ios_t::init().
+ //As bufferbuf_t's constructor does not throw there is no risk of
+ //calling the basic_ios_t's destructor without calling basic_ios_t::init()
+ bufferbuf_t(buf, length, mode | std::ios_base::out)
+ , basic_ostream_t(this)
+ {}
+
+ ~basic_obufferstream(){}
+
+ public:
+ //!Returns the address of the stored
+ //!stream buffer.
+ basic_bufferbuf<CharT, CharTraits>* rdbuf() const
+ { return const_cast<basic_bufferbuf<CharT, CharTraits>*>(&get_buf()); }
+
+ //!Returns the pointer and size of the internal buffer.
+ //!Does not throw.
+ std::pair<CharT *, std::size_t> buffer() const
+ { return get_buf().buffer(); }
+
+ //!Sets the underlying buffer to a new value. Resets
+ //!stream position. Does not throw.
+ void buffer(CharT *buf, std::size_t length)
+ { get_buf().buffer(buf, length); }
+};
+
+
+//!A basic_iostream class that uses a fixed size character buffer
+//!as its formatting buffer.
+template <class CharT, class CharTraits>
+class basic_bufferstream :
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private basic_bufferbuf<CharT, CharTraits>,
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+ public std::basic_iostream<CharT, CharTraits>
+{
+ public: // Typedefs
+ typedef typename std::basic_ios
+ <CharT, CharTraits>::char_type char_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::int_type int_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::pos_type pos_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::off_type off_type;
+ typedef typename std::basic_ios<char_type, CharTraits>::traits_type traits_type;
+
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private:
+ typedef basic_bufferbuf<CharT, CharTraits> bufferbuf_t;
+ typedef std::basic_ios<char_type, CharTraits> basic_ios_t;
+ typedef std::basic_iostream<char_type, CharTraits> basic_iostream_t;
+ bufferbuf_t & get_buf() { return *this; }
+ const bufferbuf_t & get_buf() const{ return *this; }
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+
+ public:
+ //!Constructor.
+ //!Does not throw.
+ basic_bufferstream(std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ : //basic_ios_t() is called first (lefting it uninitialized) as it's a
+ //virtual base of basic_istream. The class will be initialized when
+ //basic_istream is constructed calling basic_ios_t::init().
+ //As bufferbuf_t's constructor does not throw there is no risk of
+ //calling the basic_ios_t's destructor without calling basic_ios_t::init()
+ bufferbuf_t(mode)
+ , basic_iostream_t(this)
+ {}
+
+ //!Constructor. Assigns formatting buffer.
+ //!Does not throw.
+ basic_bufferstream(CharT *buf, std::size_t length,
+ std::ios_base::openmode mode
+ = std::ios_base::in | std::ios_base::out)
+ : //basic_ios_t() is called first (lefting it uninitialized) as it's a
+ //virtual base of basic_istream. The class will be initialized when
+ //basic_istream is constructed calling basic_ios_t::init().
+ //As bufferbuf_t's constructor does not throw there is no risk of
+ //calling the basic_ios_t's destructor without calling basic_ios_t::init()
+ bufferbuf_t(buf, length, mode)
+ , basic_iostream_t(this)
+ {}
+
+ ~basic_bufferstream(){}
+
+ public:
+ //!Returns the address of the stored
+ //!stream buffer.
+ basic_bufferbuf<CharT, CharTraits>* rdbuf() const
+ { return const_cast<basic_bufferbuf<CharT, CharTraits>*>(&get_buf()); }
+
+ //!Returns the pointer and size of the internal buffer.
+ //!Does not throw.
+ std::pair<CharT *, std::size_t> buffer() const
+ { return get_buf().buffer(); }
+
+ //!Sets the underlying buffer to a new value. Resets
+ //!stream position. Does not throw.
+ void buffer(CharT *buf, std::size_t length)
+ { get_buf().buffer(buf, length); }
+};
+
+//Some typedefs to simplify usage
+typedef basic_bufferbuf<char> bufferbuf;
+typedef basic_bufferstream<char> bufferstream;
+typedef basic_ibufferstream<char> ibufferstream;
+typedef basic_obufferstream<char> obufferstream;
+
+typedef basic_bufferbuf<wchar_t> wbufferbuf;
+typedef basic_bufferstream<wchar_t> wbufferstream;
+typedef basic_ibufferstream<wchar_t> wibufferstream;
+typedef basic_obufferstream<wchar_t> wobufferstream;
+
+
+}} //namespace boost { namespace interprocess {
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif /* BOOST_INTERPROCESS_BUFFERSTREAM_HPP */
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/common_algorithms.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/detail/common_algorithms.hpp
index 87739b81213..87739b81213 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/common_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/detail/common_algorithms.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/locks.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/detail/locks.hpp
index 88d9c0cb487..88d9c0cb487 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/locks.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/detail/locks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/interprocess_mutex.hpp
index 8bfc02c15d2..8bfc02c15d2 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/interprocess_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp
index e3825749379..e3825749379 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/lock_options.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/lock_options.hpp
index 981ff5b6d3b..981ff5b6d3b 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/lock_options.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/lock_options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/mutex_family.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/mutex_family.hpp
index b136ce4418d..b136ce4418d 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/mutex_family.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/mutex_family.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/named_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/named_mutex.hpp
index 127e8d8a8f0..127e8d8a8f0 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/named_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/named_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/null_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/null_mutex.hpp
index f3c29eb2567..f3c29eb2567 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/null_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/null_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/mutex.hpp
index 70adc23c96c..70adc23c96c 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/named_mutex.hpp
index 28fafa83ed9..28fafa83ed9 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/named_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_semaphore.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/named_semaphore.hpp
index 8180da1e481..8180da1e481 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_semaphore.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/named_semaphore.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/pthread_helpers.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/pthread_helpers.hpp
index c615c851ebb..c615c851ebb 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/pthread_helpers.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/pthread_helpers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp
index 5aa09e0c19e..5aa09e0c19e 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/recursive_mutex.hpp
index 9ef4f127887..9ef4f127887 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp
index ca0f519b68e..ca0f519b68e 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/scoped_lock.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/scoped_lock.hpp
index 97986f0361e..97986f0361e 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/scoped_lock.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/scoped_lock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_creation_functor.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/shm/named_creation_functor.hpp
index 137a1a8ea7d..137a1a8ea7d 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_creation_functor.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/shm/named_creation_functor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/shm/named_mutex.hpp
index 846727463f0..846727463f0 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/shm/named_mutex.hpp
diff --git a/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/mutex.hpp
new file mode 100644
index 00000000000..c2a6f42ada0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/mutex.hpp
@@ -0,0 +1,101 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-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_SPIN_MUTEX_HPP
+#define BOOST_INTERPROCESS_DETAIL_SPIN_MUTEX_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/posix_time_types_wrk.hpp>
+#include <boost/assert.hpp>
+#include <boost/interprocess/detail/atomic.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/interprocess/detail/os_thread_functions.hpp>
+#include <boost/interprocess/sync/detail/common_algorithms.hpp>
+
+namespace boost {
+namespace interprocess {
+namespace ipcdetail {
+
+class spin_mutex
+{
+ spin_mutex(const spin_mutex &);
+ spin_mutex &operator=(const spin_mutex &);
+ public:
+
+ spin_mutex();
+ ~spin_mutex();
+
+ void lock();
+ bool try_lock();
+ bool timed_lock(const boost::posix_time::ptime &abs_time);
+ void unlock();
+ void take_ownership(){}
+ private:
+ volatile boost::uint32_t m_s;
+};
+
+inline spin_mutex::spin_mutex()
+ : m_s(0)
+{
+ //Note that this class is initialized to zero.
+ //So zeroed memory can be interpreted as an
+ //initialized mutex
+}
+
+inline spin_mutex::~spin_mutex()
+{
+ //Trivial destructor
+}
+
+inline void spin_mutex::lock(void)
+{
+#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
+ boost::posix_time::ptime wait_time
+ = microsec_clock::universal_time()
+ + boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
+ if (!timed_lock(wait_time))
+ {
+ throw interprocess_exception(timeout_when_locking_error
+ , "Interprocess mutex timeout when locking. Possible deadlock: "
+ "owner died without unlocking?");
+ }
+#else
+ return ipcdetail::try_based_lock(*this);
+#endif
+}
+
+inline bool spin_mutex::try_lock(void)
+{
+ boost::uint32_t prev_s = ipcdetail::atomic_cas32(const_cast<boost::uint32_t*>(&m_s), 1, 0);
+ return m_s == 1 && prev_s == 0;
+}
+
+inline bool spin_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
+{ return ipcdetail::try_based_timed_lock(*this, abs_time); }
+
+inline void spin_mutex::unlock(void)
+{ ipcdetail::atomic_cas32(const_cast<boost::uint32_t*>(&m_s), 0, 1); }
+
+} //namespace ipcdetail {
+} //namespace interprocess {
+} //namespace boost {
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif //BOOST_INTERPROCESS_DETAIL_SPIN_MUTEX_HPP
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/recursive_mutex.hpp
index 495efd900ef..495efd900ef 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/wait.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/wait.hpp
index 984f91ad008..984f91ad008 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/wait.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/spin/wait.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/mutex.hpp
index 4747d0cc66b..4747d0cc66b 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/named_mutex.hpp
index 64a83c94f8e..64a83c94f8e 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/named_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_sync.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/named_sync.hpp
index cf19335a34e..cf19335a34e 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_sync.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/named_sync.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/recursive_mutex.hpp
index bf406f8fec8..bf406f8fec8 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/sync_utils.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/sync_utils.hpp
index 8e054660ca9..8e054660ca9 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/sync_utils.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/sync_utils.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
index 983e33571da..983e33571da 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
index c98224f15d2..c98224f15d2 100644
--- a/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
diff --git a/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
new file mode 100644
index 00000000000..0bc6a2d9033
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
@@ -0,0 +1,82 @@
+ //////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2011-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_WINAPI_WRAPPER_COMMON_HPP
+#define BOOST_INTERPROCESS_DETAIL_WINAPI_WRAPPER_COMMON_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/win32_api.hpp>
+#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
+#include <boost/interprocess/errors.hpp>
+#include <boost/interprocess/exceptions.hpp>
+#include <limits>
+
+namespace boost {
+namespace interprocess {
+namespace ipcdetail {
+
+inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boost::posix_time::ptime &abs_time);
+
+inline void winapi_wrapper_wait_for_single_object(void *handle)
+{
+ winapi_wrapper_timed_wait_for_single_object(handle, boost::posix_time::pos_infin);
+}
+
+inline bool winapi_wrapper_try_wait_for_single_object(void *handle)
+{
+ return winapi_wrapper_timed_wait_for_single_object(handle, boost::posix_time::min_date_time);
+}
+
+inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boost::posix_time::ptime &abs_time)
+{
+ const boost::posix_time::ptime cur_time = microsec_clock::universal_time();
+ //Windows uses relative wait times so check for negative waits
+ //and implement as 0 wait to allow try-semantics as POSIX mandates.
+ unsigned long time = 0u;
+ if (abs_time == boost::posix_time::pos_infin){
+ time = winapi::infinite_time;
+ }
+ else if(abs_time > cur_time){
+ time = (abs_time - cur_time).total_milliseconds();
+ }
+
+ unsigned long ret = winapi::wait_for_single_object(handle, time);
+ if(ret == winapi::wait_object_0){
+ return true;
+ }
+ else if(ret == winapi::wait_timeout){
+ return false;
+ }
+ else if(ret == winapi::wait_abandoned){ //Special case for orphaned mutexes
+ winapi::release_mutex(handle);
+ throw interprocess_exception(owner_dead_error);
+ }
+ else{
+ error_info err = system_error_code();
+ throw interprocess_exception(err);
+ }
+}
+
+} //namespace ipcdetail {
+} //namespace interprocess {
+} //namespace boost {
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif //BOOST_INTERPROCESS_DETAIL_WINAPI_WRAPPER_COMMON_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/any_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/any_hook.hpp
index 6d187812a6f..6d187812a6f 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/any_hook.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/any_hook.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/avl_set.hpp b/src/third_party/boost-1.70.0/boost/intrusive/avl_set.hpp
new file mode 100644
index 00000000000..d714ab12f08
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/avl_set.hpp
@@ -0,0 +1,1073 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_AVL_SET_HPP
+#define BOOST_INTRUSIVE_AVL_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/avltree.hpp>
+#include <boost/intrusive/detail/mpl.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 {
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class avl_multiset_impl;
+#endif
+
+//! The class template avl_set is an intrusive container, that mimics most of
+//! the interface of std::set as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class avl_set_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set_impl)
+
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+
+ //! @copydoc ::boost::intrusive::avltree::avltree()
+ avl_set_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::avltree(const key_compare &,const value_traits &)
+ explicit avl_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::avltree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ avl_set_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(true, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&)
+ avl_set_impl(BOOST_RV_REF(avl_set_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&)
+ avl_set_impl& operator=(BOOST_RV_REF(avl_set_impl) x)
+ { return static_cast<avl_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::~avltree()
+ ~avl_set_impl();
+
+ //! @copydoc ::boost::intrusive::avltree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::avltree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::avltree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::avltree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::avltree::begin()
+ reverse_iterator avlegin();
+
+ //! @copydoc ::boost::intrusive::avltree::begin()const
+ const_reverse_iterator avlegin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::avltree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::avltree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::avltree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::avltree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::avltree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
+ static avl_set_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
+ static const avl_set_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
+ static avl_set_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
+ static const avl_set_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::avltree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::avltree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::avltree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::avltree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::avltree::swap
+ void swap(avl_set_impl& other);
+
+ //! @copydoc ::boost::intrusive::avltree::clone_from(const avltree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const avl_set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::clone_from(avltree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(avl_set_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique(reference)
+ std::pair<iterator, bool> insert(reference value)
+ { return tree_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_unique(hint, value); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const key_type &key, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const key_type &key
+ ,insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_unique_commit
+ iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return tree_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::avltree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const key_type &key)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::avltree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
+ size_type count(const key_type &key) const
+ { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
+
+ //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
+ { return this->tree_type::equal_range(key, comp); }
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return this->tree_type::equal_range(key, comp); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::avltree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::avltree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::avltree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_unique
+ template<class ...Options2>
+ void merge(avl_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_unique
+ template<class ...Options2>
+ void merge(avl_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(avl_set_impl<T, Options...> &x, avl_set_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c 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>
+#endif
+struct make_avl_set
+{
+ /// @cond
+ typedef typename pack_options
+ < avltree_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 avl_set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 avl_set
+ : public make_avl_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_avl_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set)
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 avl_set()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit avl_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE avl_set( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE avl_set(BOOST_RV_REF(avl_set) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE avl_set& operator=(BOOST_RV_REF(avl_set) x)
+ { return static_cast<avl_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const avl_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(avl_set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static avl_set &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<avl_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const avl_set &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const avl_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static avl_set &container_from_iterator(iterator it)
+ { return static_cast<avl_set &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const avl_set &container_from_iterator(const_iterator it)
+ { return static_cast<const avl_set &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+//! The class template avl_multiset is an intrusive container, that mimics most of
+//! the interface of std::_multiset as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class avl_multiset_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset_impl)
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::avltree::avltree()
+ avl_multiset_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::avltree(const key_compare &,const value_traits &)
+ explicit avl_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::avltree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ avl_multiset_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(false, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&)
+ avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&)
+ avl_multiset_impl& operator=(BOOST_RV_REF(avl_multiset_impl) x)
+ { return static_cast<avl_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::avltree::~avltree()
+ ~avl_multiset_impl();
+
+ //! @copydoc ::boost::intrusive::avltree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::avltree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::avltree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::avltree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::avltree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::avltree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::avltree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::avltree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::avltree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::avltree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::avltree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::avltree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
+ static avl_multiset_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
+ static const avl_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
+ static avl_multiset_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
+ static const avl_multiset_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::avltree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::avltree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::avltree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::avltree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::avltree::swap
+ void swap(avl_multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::avltree::clone_from(const avltree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const avl_multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::avltree::clone_from(avltree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(avl_multiset_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_equal(reference)
+ iterator insert(reference value)
+ { return tree_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_equal(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_equal(hint, value); }
+
+ //! @copydoc ::boost::intrusive::avltree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::avltree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::avltree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &key upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::avltree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::avltree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::avltree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_equal
+ template<class ...Options2>
+ void merge(avl_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_equal
+ template<class ...Options2>
+ void merge(avl_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(avl_multiset_impl<T, Options...> &x, avl_multiset_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c avl_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>
+#endif
+struct make_avl_multiset
+{
+ /// @cond
+ typedef typename pack_options
+ < avltree_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 avl_multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 avl_multiset
+ : public make_avl_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_avl_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 avl_multiset()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit avl_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE avl_multiset( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE avl_multiset(BOOST_RV_REF(avl_multiset) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE avl_multiset& operator=(BOOST_RV_REF(avl_multiset) x)
+ { return static_cast<avl_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const avl_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(avl_multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static avl_multiset &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const avl_multiset &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static avl_multiset &container_from_iterator(iterator it)
+ { return static_cast<avl_multiset &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const avl_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const avl_multiset &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_AVL_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/avl_set_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/avl_set_hook.hpp
index 187130365b9..187130365b9 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/avl_set_hook.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/avl_set_hook.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/avltree.hpp b/src/third_party/boost-1.70.0/boost/intrusive/avltree.hpp
new file mode 100644
index 00000000000..b80cb938e17
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/avltree.hpp
@@ -0,0 +1,588 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_HPP
+#define BOOST_INTRUSIVE_AVLTREE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <cstddef>
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
+#include <boost/intrusive/detail/minimal_pair_header.hpp>
+
+#include <boost/static_assert.hpp>
+#include <boost/intrusive/avl_set_hook.hpp>
+#include <boost/intrusive/detail/avltree_node.hpp>
+#include <boost/intrusive/bstree.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/avltree_algorithms.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/move/utility_core.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+struct default_avltree_hook_applier
+{ template <class T> struct apply{ typedef typename T::default_avltree_hook type; }; };
+
+template<>
+struct is_default_hook_tag<default_avltree_hook_applier>
+{ static const bool value = true; };
+
+struct avltree_defaults
+ : bstree_defaults
+{
+ typedef default_avltree_hook_applier proto_value_traits;
+};
+
+/// @endcond
+
+//! The class template avltree is an intrusive AVL tree container, that
+//! is used to construct intrusive avl_set and avl_multiset containers.
+//! The no-throw guarantee holds only, if the key_compare object
+//! doesn't throw.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class avltree_impl
+ /// @cond
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
+ /// @endcond
+{
+ public:
+ typedef ValueTraits value_traits;
+ /// @cond
+ typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
+ , ConstantTimeSize, AvlTreeAlgorithms
+ , HeaderHolder> tree_type;
+ typedef tree_type implementation_defined;
+ /// @endcond
+
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ 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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_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;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+ /// @cond
+ private:
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(avltree_impl)
+
+ /// @endcond
+
+ public:
+
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+
+ //! @copydoc ::boost::intrusive::bstree::bstree()
+ avltree_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
+ explicit avltree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ avltree_impl( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(unique, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ avltree_impl(BOOST_RV_REF(avltree_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ avltree_impl& operator=(BOOST_RV_REF(avltree_impl) x)
+ { return static_cast<avltree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~avltree_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static avltree_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const avltree_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static avltree_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const avltree_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::bstree::swap
+ void swap(avltree_impl& other);
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const avltree_impl &src, Cloner cloner, Disposer disposer);
+
+ #else //BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(avltree_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
+ iterator insert_equal(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
+ iterator insert_equal(const_iterator hint, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert_equal(Iterator b, Iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
+ std::pair<iterator, bool> insert_unique(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
+ iterator insert_unique(const_iterator hint, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const key_type &key, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const key_type &key, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert_unique(Iterator b, Iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &ke)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &key)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_unique(avltree<T, Options2...> &);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_equal(avltree<T, Options2...> &);
+
+ friend bool operator< (const avltree_impl &x, const avltree_impl &y);
+
+ friend bool operator==(const avltree_impl &x, const avltree_impl &y);
+
+ friend bool operator!= (const avltree_impl &x, const avltree_impl &y);
+
+ friend bool operator>(const avltree_impl &x, const avltree_impl &y);
+
+ friend bool operator<=(const avltree_impl &x, const avltree_impl &y);
+
+ friend bool operator>=(const avltree_impl &x, const avltree_impl &y);
+
+ friend void swap(avltree_impl &x, avltree_impl &y);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+
+//! Helper metafunction to define a \c avltree 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_avltree
+{
+ /// @cond
+ typedef typename pack_options
+ < avltree_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 avltree_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 avltree
+ : public make_avltree<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_avltree
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(avltree)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::reverse_iterator reverse_iterator;
+ typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+ //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 avltree()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit avltree( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE avltree( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(unique, b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE avltree(BOOST_RV_REF(avltree) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE avltree& operator=(BOOST_RV_REF(avltree) x)
+ { return static_cast<avltree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const avltree &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(avltree) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static avltree &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<avltree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const avltree &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const avltree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static avltree &container_from_iterator(iterator it)
+ { return static_cast<avltree &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const avltree &container_from_iterator(const_iterator it)
+ { return static_cast<const avltree &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //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.70.0/boost/intrusive/avltree_algorithms.hpp
index 1d206cdc680..1d206cdc680 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/avltree_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/avltree_algorithms.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/bs_set.hpp b/src/third_party/boost-1.70.0/boost/intrusive/bs_set.hpp
new file mode 100644
index 00000000000..cbb2a35f8af
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/bs_set.hpp
@@ -0,0 +1,1069 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2013-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_BS_SET_HPP
+#define BOOST_INTRUSIVE_BS_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/bstree.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/static_assert.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class bs_multiset_impl;
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! The class template bs_set is an intrusive container, that mimics most of
+//! the interface of std::set as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class bs_set_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_set_impl)
+
+ typedef tree_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::value_traits value_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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::bstree::bstree()
+ bs_set_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
+ explicit bs_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ bs_set_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(true, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ bs_set_impl(BOOST_RV_REF(bs_set_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ bs_set_impl& operator=(BOOST_RV_REF(bs_set_impl) x)
+ { return static_cast<bs_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~bs_set_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static bs_set_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const bs_set_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static bs_set_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const bs_set_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::bstree::swap
+ void swap(bs_set_impl& other);
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const bs_set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(bs_set_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
+ std::pair<iterator, bool> insert(reference value)
+ { return tree_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_unique(hint, value); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const key_type &key, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const key_type &key
+ ,insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
+ iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return tree_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ size_type count(const key_type &key) const
+ { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
+ { return this->tree_type::equal_range(key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return this->tree_type::equal_range(key, comp); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type&,const key_type&,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type& lower_key, const key_type& upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type&,const key_type&,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type& lower_key, const key_type& upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class ...Options2>
+ void merge(bs_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class ...Options2>
+ void merge(bs_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(bs_set_impl<T, Options...> &x, bs_set_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c bs_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>
+#endif
+struct make_bs_set
+{
+ /// @cond
+ typedef typename pack_options
+ < bstree_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 bs_set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 bs_set
+ : public make_bs_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_bs_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_set)
+ public:
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 bs_set()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit bs_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE bs_set( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bs_set(BOOST_RV_REF(bs_set) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bs_set& operator=(BOOST_RV_REF(bs_set) x)
+ { return static_cast<bs_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const bs_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(bs_set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bs_set &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<bs_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const bs_set &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const bs_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bs_set &container_from_iterator(iterator it)
+ { return static_cast<bs_set &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const bs_set &container_from_iterator(const_iterator it)
+ { return static_cast<const bs_set &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+//! The class template bs_multiset is an intrusive container, that mimics most of
+//! the interface of std::multiset as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class bs_multiset_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder> tree_type;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_multiset_impl)
+ typedef tree_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::value_traits value_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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::bstree::bstree()
+ bs_multiset_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
+ explicit bs_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ bs_multiset_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(false, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ bs_multiset_impl(BOOST_RV_REF(bs_multiset_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ bs_multiset_impl& operator=(BOOST_RV_REF(bs_multiset_impl) x)
+ { return static_cast<bs_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~bs_multiset_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static bs_multiset_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const bs_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static bs_multiset_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const bs_multiset_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::bstree::swap
+ void swap(bs_multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const bs_multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(bs_multiset_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
+ iterator insert(reference value)
+ { return tree_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_equal(hint, value); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type & lower_key, const key_type & upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type & lower_key, const key_type & upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal
+ template<class ...Options2>
+ void merge(bs_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal
+ template<class ...Options2>
+ void merge(bs_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(bs_multiset_impl<T, Options...> &x, bs_multiset_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c bs_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>
+#endif
+struct make_bs_multiset
+{
+ /// @cond
+ typedef typename pack_options
+ < bstree_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 bs_multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 bs_multiset
+ : public make_bs_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_bs_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_multiset)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 bs_multiset()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit bs_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE bs_multiset( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bs_multiset(BOOST_RV_REF(bs_multiset) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bs_multiset& operator=(BOOST_RV_REF(bs_multiset) x)
+ { return static_cast<bs_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const bs_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(bs_multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bs_multiset &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const bs_multiset &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bs_multiset &container_from_iterator(iterator it)
+ { return static_cast<bs_multiset &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const bs_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const bs_multiset &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_BS_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/bs_set_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/bs_set_hook.hpp
index a64c15ace59..a64c15ace59 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/bs_set_hook.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/bs_set_hook.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/bstree.hpp b/src/third_party/boost-1.70.0/boost/intrusive/bstree.hpp
new file mode 100644
index 00000000000..2cde5314d58
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/bstree.hpp
@@ -0,0 +1,2246 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2013-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_HPP
+#define BOOST_INTRUSIVE_BSTREE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/bs_set_hook.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+#include <boost/intrusive/detail/tree_iterator.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
+#include <boost/intrusive/detail/empty_node_checker.hpp>
+#include <boost/intrusive/detail/default_header_holder.hpp>
+#include <boost/intrusive/detail/reverse_iterator.hpp>
+#include <boost/intrusive/detail/exception_disposer.hpp>
+#include <boost/intrusive/detail/node_cloner_disposer.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/algo_type.hpp>
+#include <boost/intrusive/detail/algorithm.hpp>
+#include <boost/intrusive/detail/tree_value_compare.hpp>
+
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/bstree_algorithms.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/parent_from_member.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/move/adl_move_swap.hpp>
+
+#include <boost/intrusive/detail/minimal_pair_header.hpp>
+#include <cstddef> //size_t...
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal_to
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+struct default_bstree_hook_applier
+{ template <class T> struct apply{ typedef typename T::default_bstree_hook type; }; };
+
+template<>
+struct is_default_hook_tag<default_bstree_hook_applier>
+{ static const bool value = true; };
+
+struct bstree_defaults
+{
+ typedef default_bstree_hook_applier proto_value_traits;
+ static const bool constant_time_size = true;
+ typedef std::size_t size_type;
+ typedef void compare;
+ typedef void key_of_value;
+ static const bool floating_point = true; //For sgtree
+ typedef void priority; //For treap
+ typedef void header_holder_type;
+};
+
+template<class ValueTraits, algo_types AlgoType, typename HeaderHolder>
+struct bstbase3
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node node_type;
+ typedef typename get_algo<AlgoType, node_traits>::type node_algorithms;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef tree_iterator<value_traits, false> iterator;
+ typedef tree_iterator<value_traits, true> const_iterator;
+ typedef boost::intrusive::reverse_iterator<iterator> reverse_iterator;
+ typedef boost::intrusive::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::const_pointer) const_pointer;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::element_type) value_type;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::reference) reference;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::reference) const_reference;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
+ typedef typename detail::get_header_holder_type
+ < value_traits,HeaderHolder >::type header_holder_type;
+
+ 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;
+ static const bool has_container_from_iterator =
+ detail::is_same< header_holder_type, detail::default_header_holder< node_traits > >::value;
+
+ struct holder_t : public ValueTraits
+ {
+ BOOST_INTRUSIVE_FORCEINLINE explicit holder_t(const ValueTraits &vtraits)
+ : ValueTraits(vtraits)
+ {}
+ header_holder_type root;
+ } holder;
+
+ static bstbase3 &get_tree_base_from_end_iterator(const const_iterator &end_iterator)
+ {
+ BOOST_STATIC_ASSERT(has_container_from_iterator);
+ node_ptr p = end_iterator.pointed_node();
+ header_holder_type* h = header_holder_type::get_holder(p);
+ holder_t *holder = get_parent_from_member<holder_t, header_holder_type>(h, &holder_t::root);
+ bstbase3 *base = get_parent_from_member<bstbase3, holder_t> (holder, &bstbase3::holder);
+ return *base;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE bstbase3(const ValueTraits &vtraits)
+ : holder(vtraits)
+ {
+ node_algorithms::init_header(this->header_ptr());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr header_ptr()
+ { return holder.root.get_node(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_node_ptr header_ptr() const
+ { return holder.root.get_node(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const value_traits &get_value_traits() const
+ { return this->holder; }
+
+ BOOST_INTRUSIVE_FORCEINLINE value_traits &get_value_traits()
+ { return this->holder; }
+
+ typedef typename boost::intrusive::value_traits_pointers
+ <ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
+ { return pointer_traits<const_value_traits_ptr>::pointer_to(this->get_value_traits()); }
+
+ iterator begin()
+ { return iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
+ { return cbegin(); }
+
+ const_iterator cbegin() const
+ { return const_iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
+
+ iterator end()
+ { return iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
+ { return cend(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
+ { return const_iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE iterator root()
+ { return iterator(node_algorithms::root_node(this->header_ptr()), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator root() const
+ { return croot(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator croot() const
+ { return const_iterator(node_algorithms::root_node(this->header_ptr()), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rbegin()
+ { return reverse_iterator(end()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rend()
+ { return reverse_iterator(begin()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rend() const
+ { return const_reverse_iterator(begin()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crend() const
+ { return const_reverse_iterator(begin()); }
+
+ void replace_node(iterator replace_this, reference with_this)
+ {
+ node_algorithms::replace_node( get_value_traits().to_node_ptr(*replace_this)
+ , this->header_ptr()
+ , get_value_traits().to_node_ptr(with_this));
+ if(safemode_or_autounlink)
+ node_algorithms::init(replace_this.pointed_node());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE void rebalance()
+ { node_algorithms::rebalance(this->header_ptr()); }
+
+ iterator rebalance_subtree(iterator root)
+ { return iterator(node_algorithms::rebalance_subtree(root.pointed_node()), this->priv_value_traits_ptr()); }
+
+ 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());
+ }
+
+ static const_iterator s_iterator_to(const_reference value)
+ {
+ BOOST_STATIC_ASSERT((!stateful_value_traits));
+ return const_iterator (value_traits::to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), const_value_traits_ptr());
+ }
+
+ iterator iterator_to(reference value)
+ { return iterator (this->get_value_traits().to_node_ptr(value), this->priv_value_traits_ptr()); }
+
+ const_iterator iterator_to(const_reference value) const
+ { return const_iterator (this->get_value_traits().to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void init_node(reference value)
+ { node_algorithms::init(value_traits::to_node_ptr(value)); }
+
+};
+
+template<class Less, class T>
+struct get_compare
+{
+ typedef Less type;
+};
+
+template<class T>
+struct get_compare<void, T>
+{
+ typedef ::std::less<T> type;
+};
+
+template<class KeyOfValue, class T>
+struct get_key_of_value
+{
+ typedef KeyOfValue type;
+};
+
+template<class T>
+struct get_key_of_value<void, T>
+{
+ typedef ::boost::intrusive::detail::identity<T> type;
+};
+
+template<class ValuePtr, class VoidOrKeyOfValue, class VoidOrKeyComp>
+struct bst_key_types
+{
+ typedef typename
+ boost::movelib::pointer_element<ValuePtr>::type value_type;
+ typedef typename get_key_of_value
+ < VoidOrKeyOfValue, value_type>::type key_of_value;
+ typedef typename key_of_value::type key_type;
+ typedef typename get_compare< VoidOrKeyComp
+ , key_type
+ >::type key_compare;
+ typedef tree_value_compare
+ <ValuePtr, key_compare, key_of_value> value_compare;
+};
+
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, algo_types AlgoType, typename HeaderHolder>
+struct bstbase2
+ //Put the (possibly empty) functor in the first position to get EBO in MSVC
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public detail::ebo_functor_holder
+ < typename bst_key_types
+ < typename ValueTraits::pointer
+ , VoidOrKeyOfValue
+ , VoidOrKeyComp
+
+ >::value_compare
+ >
+ , public bstbase3<ValueTraits, AlgoType, HeaderHolder>
+{
+ typedef bstbase3<ValueTraits, AlgoType, HeaderHolder> treeheader_t;
+ typedef bst_key_types< typename ValueTraits::pointer
+ , VoidOrKeyOfValue
+ , VoidOrKeyComp> key_types;
+ typedef typename treeheader_t::value_traits value_traits;
+ typedef typename treeheader_t::node_algorithms node_algorithms;
+ typedef typename ValueTraits::value_type value_type;
+ typedef typename key_types::key_type key_type;
+ typedef typename key_types::key_of_value key_of_value;
+ typedef typename key_types::key_compare key_compare;
+ typedef typename key_types::value_compare value_compare;
+ typedef typename treeheader_t::iterator iterator;
+ typedef typename treeheader_t::const_iterator const_iterator;
+ typedef typename treeheader_t::node_ptr node_ptr;
+ typedef typename treeheader_t::const_node_ptr const_node_ptr;
+
+ bstbase2(const key_compare &comp, const ValueTraits &vtraits)
+ : detail::ebo_functor_holder<value_compare>(value_compare(comp)), treeheader_t(vtraits)
+ {}
+
+ const value_compare &comp() const
+ { return this->get(); }
+
+ value_compare &comp()
+ { return this->get(); }
+
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::const_pointer) const_pointer;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::reference) reference;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::reference) const_reference;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
+ typedef typename node_algorithms::insert_commit_data insert_commit_data;
+
+ BOOST_INTRUSIVE_FORCEINLINE value_compare value_comp() const
+ { return this->comp(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE key_compare key_comp() const
+ { return this->comp().key_comp(); }
+
+ //lower_bound
+ BOOST_INTRUSIVE_FORCEINLINE iterator lower_bound(const key_type &key)
+ { return this->lower_bound(key, this->key_comp()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator lower_bound(const key_type &key) const
+ { return this->lower_bound(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ return iterator(node_algorithms::lower_bound
+ (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
+ }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp) const
+ {
+ return const_iterator(node_algorithms::lower_bound
+ (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
+ }
+
+ //upper_bound
+ BOOST_INTRUSIVE_FORCEINLINE iterator upper_bound(const key_type &key)
+ { return this->upper_bound(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ return iterator(node_algorithms::upper_bound
+ (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator upper_bound(const key_type &key) const
+ { return this->upper_bound(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp) const
+ {
+ return const_iterator(node_algorithms::upper_bound
+ (this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
+ }
+
+ template<class KeyTypeKeyCompare>
+ struct key_node_comp_ret
+ { typedef detail::key_nodeptr_comp<KeyTypeKeyCompare, value_traits, key_of_value> type; };
+
+ template<class KeyTypeKeyCompare>
+ BOOST_INTRUSIVE_FORCEINLINE typename key_node_comp_ret<KeyTypeKeyCompare>::type key_node_comp(KeyTypeKeyCompare comp) const
+ {
+ return detail::key_nodeptr_comp<KeyTypeKeyCompare, value_traits, key_of_value>(comp, &this->get_value_traits());
+ }
+
+ //find
+ BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
+ { return this->find(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ return iterator
+ (node_algorithms::find(this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
+ { return this->find(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType &key, KeyTypeKeyCompare comp) const
+ {
+ return const_iterator
+ (node_algorithms::find(this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
+ }
+
+ //equal_range
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->equal_range(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ std::pair<node_ptr, node_ptr> ret
+ (node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp)));
+ return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
+ , iterator(ret.second, this->priv_value_traits_ptr()));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->equal_range(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType &key, KeyTypeKeyCompare comp) const
+ {
+ std::pair<node_ptr, node_ptr> ret
+ (node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp)));
+ return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
+ , const_iterator(ret.second, this->priv_value_traits_ptr()));
+ }
+
+ //lower_bound_range
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> lower_bound_range(const key_type &key)
+ { return this->lower_bound_range(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> lower_bound_range(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ std::pair<node_ptr, node_ptr> ret
+ (node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp)));
+ return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
+ , iterator(ret.second, this->priv_value_traits_ptr()));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
+ lower_bound_range(const key_type &key) const
+ { return this->lower_bound_range(key, this->key_comp()); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ lower_bound_range(const KeyType &key, KeyTypeKeyCompare comp) const
+ {
+ std::pair<node_ptr, node_ptr> ret
+ (node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp)));
+ return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
+ , const_iterator(ret.second, this->priv_value_traits_ptr()));
+ }
+
+ //bounded_range
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed)
+ { return this->bounded_range(lower_key, upper_key, this->key_comp(), left_closed, right_closed); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed)
+ {
+ std::pair<node_ptr, node_ptr> ret
+ (node_algorithms::bounded_range
+ (this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed));
+ return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
+ , iterator(ret.second, this->priv_value_traits_ptr()));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator,const_iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const
+ { return this->bounded_range(lower_key, upper_key, this->key_comp(), left_closed, right_closed); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator,const_iterator> bounded_range
+ (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const
+ {
+ std::pair<node_ptr, node_ptr> ret
+ (node_algorithms::bounded_range
+ (this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed));
+ return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
+ , const_iterator(ret.second, this->priv_value_traits_ptr()));
+ }
+
+ //insert_unique_check
+ 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->key_comp(), commit_data); }
+
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const key_type &key, insert_commit_data &commit_data)
+ { return this->insert_unique_check(hint, key, this->key_comp(), commit_data); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
+ , typename detail::disable_if_convertible
+ <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
+ std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
+ insert_unique_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> ret =
+ (node_algorithms::insert_unique_check
+ (this->header_ptr(), key, this->key_node_comp(comp), commit_data));
+ return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
+ }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> ret =
+ (node_algorithms::insert_unique_check
+ (this->header_ptr(), hint.pointed_node(), key, this->key_node_comp(comp), commit_data));
+ return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
+ }
+};
+
+//Due to MSVC's EBO implementation, to save space and maintain the ABI, we must put the non-empty size member
+//in the first position, but if size is not going to be stored then we'll use an specialization
+//that doesn't inherit from size_holder
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, bool ConstantTimeSize, class SizeType, algo_types AlgoType, typename HeaderHolder>
+struct bstbase_hack
+ : public detail::size_holder<ConstantTimeSize, SizeType>
+ , public bstbase2 < ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder>
+{
+ typedef bstbase2< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder> base_type;
+ typedef typename base_type::key_compare key_compare;
+ typedef typename base_type::value_compare value_compare;
+ typedef SizeType size_type;
+ typedef typename base_type::node_traits node_traits;
+ typedef typename get_algo
+ <AlgoType, node_traits>::type algo_type;
+
+ BOOST_INTRUSIVE_FORCEINLINE bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
+ : base_type(comp, vtraits)
+ {
+ this->sz_traits().set_size(size_type(0));
+ }
+
+ typedef detail::size_holder<ConstantTimeSize, SizeType> size_traits;
+
+ BOOST_INTRUSIVE_FORCEINLINE size_traits &sz_traits()
+ { return static_cast<size_traits &>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const size_traits &sz_traits() const
+ { return static_cast<const size_traits &>(*this); }
+};
+
+//Specialization for ConstantTimeSize == false
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, algo_types AlgoType, typename HeaderHolder>
+struct bstbase_hack<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, false, SizeType, AlgoType, HeaderHolder>
+ : public bstbase2 < ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder>
+{
+ typedef bstbase2< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder> base_type;
+ typedef typename base_type::value_compare value_compare;
+ typedef typename base_type::key_compare key_compare;
+ BOOST_INTRUSIVE_FORCEINLINE bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
+ : base_type(comp, vtraits)
+ {}
+
+ typedef detail::size_holder<false, SizeType> size_traits;
+
+ BOOST_INTRUSIVE_FORCEINLINE size_traits sz_traits() const
+ { return size_traits(); }
+};
+
+//This class will
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, bool ConstantTimeSize, class SizeType, algo_types AlgoType, typename HeaderHolder>
+struct bstbase
+ : public bstbase_hack< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder>
+{
+ typedef bstbase_hack< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder> base_type;
+ typedef ValueTraits value_traits;
+ typedef typename base_type::value_compare value_compare;
+ typedef typename base_type::key_compare key_compare;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::node_traits node_traits;
+ typedef typename get_algo
+ <AlgoType, node_traits>::type node_algorithms;
+ typedef SizeType size_type;
+
+ BOOST_INTRUSIVE_FORCEINLINE bstbase(const key_compare & comp, const ValueTraits &vtraits)
+ : base_type(comp, vtraits)
+ {}
+
+ //Detach all inserted nodes. This will add exception safety to bstree_impl
+ //constructors inserting elements.
+ ~bstbase()
+ {
+ if(is_safe_autounlink<value_traits::link_mode>::value){
+ node_algorithms::clear_and_dispose
+ ( this->header_ptr()
+ , detail::node_disposer<detail::null_disposer, value_traits, AlgoType>
+ (detail::null_disposer(), &this->get_value_traits()));
+ node_algorithms::init(this->header_ptr());
+ }
+ }
+};
+
+
+/// @endcond
+
+//! The class template bstree is an unbalanced intrusive binary search tree
+//! container. The no-throw guarantee holds only, if the key_compare object
+//! doesn't throw.
+//!
+//! The complexity guarantees only hold if the tree is balanced, logarithmic
+//! complexity would increase to linear if the tree is totally unbalanced.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, algo_types AlgoType, typename HeaderHolder>
+#endif
+class bstree_impl
+ : public bstbase<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder>
+{
+ public:
+ /// @cond
+ typedef bstbase<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder> data_type;
+ typedef tree_iterator<ValueTraits, false> iterator_type;
+ typedef tree_iterator<ValueTraits, true> const_iterator_type;
+ /// @endcond
+
+ typedef BOOST_INTRUSIVE_IMPDEF(ValueTraits) value_traits;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::const_pointer) const_pointer;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::element_type) value_type;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::key_type) key_type;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::key_of_value) key_of_value;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<pointer>::reference) reference;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::reference) const_reference;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
+ typedef BOOST_INTRUSIVE_IMPDEF(SizeType) size_type;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::value_compare) value_compare;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename data_type::key_compare) key_compare;
+ typedef BOOST_INTRUSIVE_IMPDEF(iterator_type) iterator;
+ typedef BOOST_INTRUSIVE_IMPDEF(const_iterator_type) const_iterator;
+ typedef BOOST_INTRUSIVE_IMPDEF(boost::intrusive::reverse_iterator<iterator>) reverse_iterator;
+ typedef BOOST_INTRUSIVE_IMPDEF(boost::intrusive::reverse_iterator<const_iterator>) const_reverse_iterator;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::node_traits) node_traits;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename node_traits::node) node;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename node_traits::node_ptr) node_ptr;
+ typedef BOOST_INTRUSIVE_IMPDEF(typename node_traits::const_node_ptr) const_node_ptr;
+ /// @cond
+ typedef typename get_algo<AlgoType, node_traits>::type algo_type;
+ /// @endcond
+ typedef BOOST_INTRUSIVE_IMPDEF(algo_type) node_algorithms;
+
+ static const bool constant_time_size = ConstantTimeSize;
+ static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
+ /// @cond
+ private:
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(bstree_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)));
+
+
+ protected:
+
+
+ /// @endcond
+
+ public:
+
+ typedef typename node_algorithms::insert_commit_data insert_commit_data;
+
+ //! <b>Effects</b>: Constructs an empty container.
+ //!
+ //! <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 of the key_compare object throws. Basic guarantee.
+ bstree_impl()
+ : data_type(key_compare(), value_traits())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container with given comparison and traits.
+ //!
+ //! <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 of the key_compare object throws. Basic guarantee.
+ explicit bstree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : data_type(cmp, v_traits)
+ {}
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
+ //! cmp must be a comparison function that induces a strict weak ordering.
+ //!
+ //! <b>Effects</b>: Constructs an empty container and inserts elements from
+ //! [b, e).
+ //!
+ //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
+ //! comp and otherwise N * log N, where N is the distance between first and last.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the copy constructor/operator() of the key_compare object throws. Basic guarantee.
+ template<class Iterator>
+ bstree_impl( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : data_type(cmp, v_traits)
+ {
+ //bstbase releases elements in case of exceptions
+ 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 comparison object and 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 the comparison objet throws.
+ bstree_impl(BOOST_RV_REF(bstree_impl) x)
+ : data_type(::boost::move(x.comp()), ::boost::move(x.get_value_traits()))
+ {
+ this->swap(x);
+ }
+
+ //! <b>Effects</b>: Equivalent to swap
+ //!
+ BOOST_INTRUSIVE_FORCEINLINE bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x)
+ { this->swap(x); return *this; }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! <b>Effects</b>: Detaches all elements from this. The objects in the set
+ //! are not deleted (i.e. no destructors are called), but the nodes according to
+ //! the value_traits template parameter are reinitialized and thus can be reused.
+ //!
+ //! <b>Complexity</b>: Linear to elements contained in *this.
+ //!
+ //! <b>Throws</b>: Nothing.
+ ~bstree_impl()
+ {}
+
+ //! <b>Effects</b>: Returns an iterator pointing to the beginning of the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator begin();
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the beginning of the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator begin() const;
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the beginning of the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator cbegin() const;
+
+ //! <b>Effects</b>: Returns an iterator pointing to the end of the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator end();
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the end of the container.
+ //!
+ //! <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 container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator cend() const;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning of the
+ //! reversed container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ reverse_iterator rbegin();
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_reverse_iterator rbegin() const;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_reverse_iterator crbegin() const;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ reverse_iterator rend();
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_reverse_iterator rend() const;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_reverse_iterator crend() const;
+
+ //! <b>Effects</b>: Returns a iterator pointing to the root node of the container or end() if not present.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator root();
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator root() const;
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator croot() const;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Precondition</b>: end_iterator must be a valid end iterator
+ //! of the container.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the container associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static bstree_impl &container_from_end_iterator(iterator end_iterator)
+ {
+ return static_cast<bstree_impl&>
+ (data_type::get_tree_base_from_end_iterator(end_iterator));
+ }
+
+ //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
+ //! of the container.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the container associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static const bstree_impl &container_from_end_iterator(const_iterator end_iterator)
+ {
+ return static_cast<bstree_impl&>
+ (data_type::get_tree_base_from_end_iterator(end_iterator));
+ }
+
+ //! <b>Precondition</b>: it must be a valid iterator
+ //! of the container.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the container associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static bstree_impl &container_from_iterator(iterator it)
+ { return container_from_end_iterator(it.end_iterator_from_it()); }
+
+ //! <b>Precondition</b>: it must be a valid end const_iterator
+ //! of container.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the container associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const bstree_impl &container_from_iterator(const_iterator it)
+ { return container_from_end_iterator(it.end_iterator_from_it()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Returns the key_compare object used by the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If key_compare copy-constructor throws.
+ key_compare key_comp() const;
+
+ //! <b>Effects</b>: Returns the value_compare object used by the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_compare copy-constructor throws.
+ value_compare value_comp() const;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Returns true if the container is empty.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ bool empty() const
+ {
+ if(ConstantTimeSize){
+ return !this->data_type::sz_traits().get_size();
+ }
+ else{
+ return algo_type::unique(this->header_ptr());
+ }
+ }
+
+ //! <b>Effects</b>: Returns the number of elements stored in the container.
+ //!
+ //! <b>Complexity</b>: Linear to elements contained in *this
+ //! if constant-time size option is disabled. Constant time otherwise.
+ //!
+ //! <b>Throws</b>: Nothing.
+ size_type size() const
+ {
+ if(constant_time_size)
+ return this->sz_traits().get_size();
+ else{
+ return (size_type)node_algorithms::size(this->header_ptr());
+ }
+ }
+
+ //! <b>Effects</b>: Swaps the contents of two containers.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If the comparison functor's swap call throws.
+ void swap(bstree_impl& other)
+ {
+ //This can throw
+ ::boost::adl_move_swap(this->comp(), other.comp());
+ //These can't throw
+ node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
+ this->sz_traits().swap(other.sz_traits());
+ }
+
+ //! <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. Copies the predicate from the source container.
+ //!
+ //! 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 or predicate copy assignment throws. Basic guarantee.
+ template <class Cloner, class Disposer>
+ void clone_from(const bstree_impl &src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ if(!src.empty()){
+ detail::exception_disposer<bstree_impl, Disposer>
+ rollback(*this, disposer);
+ node_algorithms::clone
+ (src.header_ptr()
+ ,this->header_ptr()
+ ,detail::node_cloner <Cloner, value_traits, AlgoType>(cloner, &this->get_value_traits())
+ ,detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
+ this->sz_traits().set_size(src.sz_traits().get_size());
+ this->comp() = src.comp();
+ 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. Copies the predicate from the source container.
+ //!
+ //! 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 or predicate copy assignment throws. Basic guarantee.
+ //!
+ //! <b>Note</b>: This version can modify the source container, useful to implement
+ //! move semantics.
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(bstree_impl) src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ if(!src.empty()){
+ detail::exception_disposer<bstree_impl, Disposer>
+ rollback(*this, disposer);
+ node_algorithms::clone
+ (src.header_ptr()
+ ,this->header_ptr()
+ ,detail::node_cloner <Cloner, value_traits, AlgoType, false>(cloner, &this->get_value_traits())
+ ,detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
+ this->sz_traits().set_size(src.sz_traits().get_size());
+ this->comp() = src.comp();
+ rollback.release();
+ }
+ }
+
+ //! <b>Requires</b>: value must be an lvalue
+ //!
+ //! <b>Effects</b>: Inserts value into the container before the upper bound.
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If the internal key_compare ordering function 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)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ iterator ret(node_algorithms::insert_equal_upper_bound
+ (this->header_ptr(), to_insert, this->key_node_comp(this->key_comp())), this->priv_value_traits_ptr());
+ this->sz_traits().increment();
+ return ret;
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and "hint" must be
+ //! a valid iterator.
+ //!
+ //! <b>Effects</b>: Inserts x into the container, 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 t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the internal key_compare ordering function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ iterator insert_equal(const_iterator hint, reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ iterator ret(node_algorithms::insert_equal
+ (this->header_ptr(), hint.pointed_node(), to_insert, this->key_node_comp(this->key_comp())), this->priv_value_traits_ptr());
+ this->sz_traits().increment();
+ return ret;
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
+ //! of type value_type.
+ //!
+ //! <b>Effects</b>: Inserts a each element of a range into the container
+ //! before the upper bound of the key of each element.
+ //!
+ //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
+ //! size of the range. However, it is linear in N if the range is already sorted
+ //! by value_comp().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <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)
+ {
+ iterator iend(this->end());
+ for (; b != e; ++b)
+ this->insert_equal(iend, *b);
+ }
+
+ //! <b>Requires</b>: value must be an lvalue
+ //!
+ //! <b>Effects</b>: Inserts value into the container if the value
+ //! is not already present.
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <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<node_ptr, bool> ret =
+ (node_algorithms::insert_unique_check
+ (this->header_ptr(), key_of_value()(value), this->key_node_comp(this->key_comp()), commit_data));
+ return std::pair<iterator, bool>
+ ( ret.second ? this->insert_unique_commit(value, commit_data)
+ : iterator(ret.first, this->priv_value_traits_ptr())
+ , ret.second);
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and "hint" must be
+ //! a valid iterator
+ //!
+ //! <b>Effects</b>: Tries to insert x into the container, using "hint" as a hint
+ //! to where it will be inserted.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but it is amortized
+ //! constant time (two comparisons in the worst case)
+ //! if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ iterator insert_unique(const_iterator hint, reference value)
+ {
+ insert_commit_data commit_data;
+ std::pair<node_ptr, bool> ret =
+ (node_algorithms::insert_unique_check
+ (this->header_ptr(), hint.pointed_node(), key_of_value()(value), this->key_node_comp(this->key_comp()), commit_data));
+ return ret.second ? this->insert_unique_commit(value, commit_data)
+ : iterator(ret.first, this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
+ //! of type value_type.
+ //!
+ //! <b>Effects</b>: Tries to insert each element of a range into the container.
+ //!
+ //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
+ //! size of the range. However, it is linear in N if the range is already sorted
+ //! by value_comp().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <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)
+ {
+ if(this->empty()){
+ iterator iend(this->end());
+ for (; b != e; ++b)
+ this->insert_unique(iend, *b);
+ }
+ else{
+ for (; b != e; ++b)
+ this->insert_unique(*b);
+ }
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If the comp ordering function throws. Strong guarantee.
+ std::pair<iterator, bool> insert_unique_check(const key_type &key, insert_commit_data &commit_data);
+
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, using
+ //! a user provided key instead of the value itself, using "hint"
+ //! as a hint to where it will be inserted.
+ //!
+ //! <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>: Logarithmic in general, but it's amortized
+ //! constant time if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the comp ordering function throws. Strong guarantee.
+ std::pair<iterator, bool> insert_unique_check(const_iterator hint, const key_type &key, insert_commit_data &commit_data);
+
+ //! <b>Requires</b>: comp must be a comparison function that induces
+ //! the same strict weak ordering as key_compare. The difference is that
+ //! comp compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If the comp ordering function throws. 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 order is much cheaper to construct
+ //! than the value_type 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 value_type and use
+ //! "insert_commit" to insert the object 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_commit" only if no more
+ //! objects are inserted or erased from the container.
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! <b>Requires</b>: comp must be a comparison function that induces
+ //! the same strict weak ordering as key_compare. The difference is that
+ //! comp compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, using
+ //! a user provided key instead of the value itself, using "hint"
+ //! as a hint to where it will be inserted.
+ //!
+ //! <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>: Logarithmic in general, but it's amortized
+ //! constant time if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the comp ordering function throws. 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
+ //! constructing that is used to impose the order is much cheaper to construct
+ //! than the value_type and this function offers the possibility to use that key
+ //! 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. This can give a total
+ //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
+ //! objects are inserted or erased from the container.
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <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 container between
+ //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
+ //!
+ //! <b>Effects</b>: Inserts the value in the container 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.
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+
+ #if !(defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ))
+ //Test insertion position is correct
+ iterator p(commit_data.node, this->priv_value_traits_ptr());
+ if(!commit_data.link_left){
+ ++p;
+ }
+ //Check if the insertion point is correct to detect wrong
+ //uses insert_unique_check
+ BOOST_ASSERT(( p == this->end() || !this->comp()(*p, value) ));
+ BOOST_ASSERT(( p == this->begin() || !this->comp()(value, *--p) ));
+ #endif
+
+ node_algorithms::insert_unique_commit
+ (this->header_ptr(), to_insert, commit_data);
+ this->sz_traits().increment();
+ return iterator(to_insert, this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, "pos" must be
+ //! a valid iterator (or end) and must be the succesor of value
+ //! once inserted according to the predicate
+ //!
+ //! <b>Effects</b>: Inserts x into the container before "pos".
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function does not check preconditions so if "pos" is not
+ //! the successor of "value" container ordering invariant will be broken.
+ //! This is a low-level function to be used only for performance reasons
+ //! by advanced users.
+ iterator insert_before(const_iterator pos, reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ this->sz_traits().increment();
+ return iterator(node_algorithms::insert_before
+ (this->header_ptr(), pos.pointed_node(), to_insert), this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and it must be no less
+ //! than the greatest inserted key
+ //!
+ //! <b>Effects</b>: Inserts x into the container in the last position.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function does not check preconditions so if value is
+ //! less than the greatest inserted key container ordering invariant will be broken.
+ //! This function is slightly more efficient than using "insert_before".
+ //! This is a low-level function to be used only for performance reasons
+ //! by advanced users.
+ void push_back(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ this->sz_traits().increment();
+ node_algorithms::push_back(this->header_ptr(), to_insert);
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and it must be no greater
+ //! than the minimum inserted key
+ //!
+ //! <b>Effects</b>: Inserts x into the container in the first position.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function does not check preconditions so if value is
+ //! greater than the minimum inserted key container ordering invariant will be broken.
+ //! This function is slightly more efficient than using "insert_before".
+ //! This is a low-level function to be used only for performance reasons
+ //! by advanced users.
+ void push_front(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ this->sz_traits().increment();
+ node_algorithms::push_front(this->header_ptr(), to_insert);
+ }
+
+ //! <b>Effects</b>: Erases the element pointed to by i.
+ //!
+ //! <b>Complexity</b>: Average complexity for erase element is constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ iterator erase(const_iterator i)
+ {
+ const_iterator ret(i);
+ ++ret;
+ node_ptr to_erase(i.pointed_node());
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase));
+ node_algorithms::erase(this->header_ptr(), to_erase);
+ this->sz_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ return ret.unconst();
+ }
+
+ //! <b>Effects</b>: Erases the range pointed to by b end e.
+ //!
+ //! <b>Complexity</b>: Average complexity for erase range is at most
+ //! O(log(size() + N)), where N is the number of elements in the range.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ iterator erase(const_iterator b, const_iterator e)
+ { size_type n; return this->private_erase(b, e, n); }
+
+ //! <b>Effects</b>: Erases all the elements with the given value.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ size_type erase(const key_type &key)
+ { return this->erase(key, this->key_comp()); }
+
+ //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
+ //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
+ //! with nk the key_type of a value_type inserted into `*this`.
+ //!
+ //! <b>Effects</b>: Erases all the elements with the given key.
+ //! according to the comparison functor "comp".
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ template<class KeyType, class KeyTypeKeyCompare>
+ BOOST_INTRUSIVE_DOC1ST(size_type
+ , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
+ erase(const KeyType& key, KeyTypeKeyCompare comp)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key, comp);
+ size_type n;
+ this->private_erase(p.first, p.second, n);
+ return n;
+ }
+
+ //! <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 complexity for erase element is constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer)
+ {
+ node_ptr to_erase(i.pointed_node());
+ iterator ret(this->erase(i));
+ disposer(this->get_value_traits().to_value_ptr(to_erase));
+ return ret;
+ }
+
+ //! <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>: O(log(size() + N).
+ //!
+ //! <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>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key);
+ size_type n;
+ this->private_erase(p.first, p.second, n, disposer);
+ return n;
+ }
+
+ //! <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 complexity for erase range is at most
+ //! O(log(size() + N)), where N is the number of elements in the range.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
+ { size_type n; return this->private_erase(b, e, n, disposer); }
+
+ //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
+ //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk)
+ //! and nk the key_type of a value_type inserted into `*this`.
+ //!
+ //! <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 "comp".
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ BOOST_INTRUSIVE_DOC1ST(size_type
+ , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
+ erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key, comp);
+ size_type n;
+ this->private_erase(p.first, p.second, n, disposer);
+ return n;
+ }
+
+ //! <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()
+ {
+ if(safemode_or_autounlink){
+ this->clear_and_dispose(detail::null_disposer());
+ }
+ else{
+ node_algorithms::init_header(this->header_ptr());
+ this->sz_traits().set_size(0);
+ }
+ }
+
+ //! <b>Effects</b>: Erases all of the elements calling disposer(p) for
+ //! each node to be erased.
+ //! <b>Complexity</b>: Average complexity for is at most O(log(size() + N)),
+ //! where N is the number of elements in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. Calls N times to disposer functor.
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer)
+ {
+ node_algorithms::clear_and_dispose(this->header_ptr()
+ , detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
+ node_algorithms::init_header(this->header_ptr());
+ this->sz_traits().set_size(0);
+ }
+
+ //! <b>Effects</b>: Returns the number of contained elements with the given value
+ //!
+ //! <b>Complexity</b>: Logarithmic to the number of elements contained plus lineal
+ //! to number of objects with the given value.
+ //!
+ //! <b>Throws</b>: If `key_compare` throws.
+ size_type count(const key_type &key) const
+ { return size_type(this->count(key, this->key_comp())); }
+
+ //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
+ //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
+ //! and nk the key_type of a value_type inserted into `*this`.
+ //!
+ //! <b>Effects</b>: Returns the number of contained elements with the given key
+ //!
+ //! <b>Complexity</b>: Logarithmic to the number of elements contained plus lineal
+ //! to number of objects with the given key.
+ //!
+ //! <b>Throws</b>: If `comp` throws.
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType &key, KeyTypeKeyCompare comp) const
+ {
+ std::pair<const_iterator, const_iterator> ret = this->equal_range(key, comp);
+ size_type n = 0;
+ for(; ret.first != ret.second; ++ret.first){ ++n; }
+ return n;
+ }
+
+ #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //Add non-const overloads to theoretically const members
+ //as some algorithms have different behavior when non-const versions are used (like splay trees).
+ size_type count(const key_type &key)
+ { return size_type(this->count(key, this->key_comp())); }
+
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ std::pair<const_iterator, const_iterator> ret = this->equal_range(key, comp);
+ size_type n = 0;
+ for(; ret.first != ret.second; ++ret.first){ ++n; }
+ return n;
+ }
+
+ #else //defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Returns an iterator to the first element whose
+ //! key is not less than k or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `key_compare` throws.
+ iterator lower_bound(const key_type &key);
+
+ //! <b>Effects</b>: Returns an iterator to the first element whose
+ //! key is not less than k or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `key_compare` throws.
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! <b>Effects</b>: Returns an iterator to the first element whose
+ //! key is greater than k or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `key_compare` throws.
+ iterator upper_bound(const key_type &key);
+
+ //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
+ //! !comp(key, nk), with nk the key_type of a value_type inserted into `*this`.
+ //!
+ //! <b>Effects</b>: Returns an iterator to the first element whose
+ //! key is greater than k according to comp or end() if that element
+ //! does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `comp` throws.
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! <b>Effects</b>: Finds an iterator to the first element whose key is
+ //! k or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `key_compare` throws.
+ iterator find(const key_type &key);
+
+ //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
+ //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
+ //! and nk the key_type of a value_type inserted into `*this`.
+ //!
+ //! <b>Effects</b>: Finds an iterator to the first element whose key is
+ //! k or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `comp` throws.
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! <b>Effects</b>: Finds a range containing all elements whose key is k or
+ //! an empty range that indicates the position where those elements would be
+ //! if they there is no elements with key k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `key_compare` throws.
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
+ //! comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk),
+ //! with nk the key_type of a value_type inserted into `*this`.
+ //!
+ //! <b>Effects</b>: Finds a range containing all elements whose key is k or
+ //! an empty range that indicates the position where those elements would be
+ //! if they there is no elements with key k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If `comp` throws.
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<const_iterator, const_iterator> equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! <b>Requires</b>:
+ //! `upper_key` shall not precede `lower_key` according to key_compare.
+ //! [key_comp()(upper_key, lower_key) shall be false]
+ //!
+ //! If `lower_key` is equivalent to `upper_key`
+ //! [!key_comp()(upper_key, lower_key) && !key_comp()(lower_key, upper_key)] then
+ //! ('left_closed' || 'right_closed') must be false.
+ //!
+ //! <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 `key_compare` throws.
+ //!
+ //! <b>Note</b>: This function can be more efficient than calling upper_bound
+ //! and lower_bound for lower_value and upper_value.
+ //!
+ //! <b>Note</b>: Experimental function, the interface might change in future releases.
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_value, bool left_closed, bool right_closed);
+
+ //! <b>Requires</b>:
+ //! `lower_key` is a value such that `*this` is partitioned with respect to
+ //! comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.
+ //!
+ //! `upper_key` is a value such that `*this` is partitioned with respect to
+ //! !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.
+ //!
+ //! `upper_key` shall not precede `lower_key` according to comp
+ //! [comp(upper_key, lower_key) shall be false]
+ //!
+ //! If `lower_key` is equivalent to `upper_key`
+ //! [!comp(upper_key, lower_key) && !comp(lower_key, upper_key)] then
+ //! ('left_closed' || 'right_closed') must be false.
+ //!
+ //! <b>Effects</b>: Returns an a pair with the following criteria:
+ //!
+ //! first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise
+ //!
+ //! second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) 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 in future releases.
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<const_iterator,const_iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator,const_iterator> bounded_range
+ (const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid iterator i belonging to the 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 iterator s_iterator_to(reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid const_iterator i belonging to the
+ //! 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_iterator s_iterator_to(const_reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid iterator i belonging to the set
+ //! that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator iterator_to(reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid const_iterator i belonging to the
+ //! set that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator iterator_to(const_reference value) const;
+
+ //! <b>Requires</b>: value shall not be in a container.
+ //!
+ //! <b>Effects</b>: init_node puts the hook of a value in a well-known default
+ //! state.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: This function puts the hook in the well-known default state
+ //! used by auto_unlink and safe hooks.
+ static void init_node(reference value);
+
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Unlinks the leftmost node from the container.
+ //!
+ //! <b>Complexity</b>: Average complexity is constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Notes</b>: This function breaks the container and the container 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 container.
+ pointer unlink_leftmost_without_rebalance()
+ {
+ node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance
+ (this->header_ptr()));
+ if(!to_be_disposed)
+ return 0;
+ this->sz_traits().decrement();
+ if(safemode_or_autounlink)//If this is commented does not work with normal_link
+ node_algorithms::init(to_be_disposed);
+ return this->get_value_traits().to_value_ptr(to_be_disposed);
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Requires</b>: replace_this must be a valid iterator of *this
+ //! and with_this must not be inserted in any container.
+ //!
+ //! <b>Effects</b>: Replaces replace_this in its position in the
+ //! container with with_this. The container 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
+ //! with_this is not equivalent to *replace_this according to the
+ //! ordering rules. This function is faster than erasing and inserting
+ //! the node, since no rebalancing or comparison is needed.
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! <b>Effects</b>: Rebalances the tree.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear.
+ void rebalance();
+
+ //! <b>Requires</b>: old_root is a node of a tree.
+ //!
+ //! <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 to the elements in the subtree.
+ iterator rebalance_subtree(iterator root);
+
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: removes "value" from the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic time.
+ //!
+ //! <b>Note</b>: This static function is only usable with non-constant
+ //! time size containers that have stateless comparison functors.
+ //!
+ //! If the user calls
+ //! this function with a constant time size container or stateful comparison
+ //! functor a compilation error will be issued.
+ static void remove_node(reference value)
+ {
+ BOOST_STATIC_ASSERT((!constant_time_size));
+ node_ptr to_remove(value_traits::to_node_ptr(value));
+ node_algorithms::unlink(to_remove);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_remove);
+ }
+
+ //! <b>Requires</b>: "source" container's Options can only can differ in the comparison
+ //! function from *this.
+ //!
+ //! <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())
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ template<class T, class ...Options2> void merge_unique(bstree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_unique(bstree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, AlgoType, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ if( node_algorithms::transfer_unique(this->header_ptr(), this->key_node_comp(this->key_comp()), source.header_ptr(), p) ){
+ source.sz_traits().decrement();
+ this->sz_traits().increment();
+ }
+ }
+ }
+
+ //! <b>Requires</b>: "source" container's Options can only can differ in the comparison
+ //! function from *this.
+ //!
+ //! <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())
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ template<class T, class ...Options2> void merge_equal(bstree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_equal(bstree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, AlgoType, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ node_algorithms::transfer_equal(this->header_ptr(), this->key_node_comp(this->key_comp()), source.header_ptr(), p);
+ source.sz_traits().decrement();
+ this->sz_traits().increment();
+ }
+ }
+
+ //! <b>Effects</b>: Asserts the integrity of the container with additional checks provided by the user.
+ //!
+ //! <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 ExtraChecker>
+ void check(ExtraChecker extra_checker) const
+ {
+ typedef detail::key_nodeptr_comp<key_compare, value_traits, key_of_value> nodeptr_comp_t;
+ nodeptr_comp_t nodeptr_comp(this->key_comp(), &this->get_value_traits());
+ typedef typename get_node_checker<AlgoType, ValueTraits, nodeptr_comp_t, ExtraChecker>::type node_checker_t;
+ typename node_checker_t::return_type checker_return;
+ node_algorithms::check(this->header_ptr(), node_checker_t(nodeptr_comp, extra_checker), checker_return);
+ if (constant_time_size)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(this->sz_traits().get_size() == checker_return.node_count);
+ }
+
+ //! <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
+ {
+ check(detail::empty_node_checker<ValueTraits>());
+ }
+
+ friend bool operator==(const bstree_impl &x, const bstree_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 bstree_impl &x, const bstree_impl &y)
+ { return !(x == y); }
+
+ friend bool operator<(const bstree_impl &x, const bstree_impl &y)
+ { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ friend bool operator>(const bstree_impl &x, const bstree_impl &y)
+ { return y < x; }
+
+ friend bool operator<=(const bstree_impl &x, const bstree_impl &y)
+ { return !(x > y); }
+
+ friend bool operator>=(const bstree_impl &x, const bstree_impl &y)
+ { return !(x < y); }
+
+ friend void swap(bstree_impl &x, bstree_impl &y)
+ { x.swap(y); }
+
+ /// @cond
+ private:
+ template<class Disposer>
+ iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
+ {
+ for(n = 0; b != e; ++n)
+ this->erase_and_dispose(b++, disposer);
+ return b.unconst();
+ }
+
+ iterator private_erase(const_iterator b, const_iterator e, size_type &n)
+ {
+ for(n = 0; b != e; ++n)
+ this->erase(b++);
+ return b.unconst();
+ }
+ /// @endcond
+};
+
+//! Helper metafunction to define a \c bstree 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_bstree
+{
+ /// @cond
+ typedef typename pack_options
+ < bstree_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 bstree_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , BsTreeAlgorithms
+ , 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 bstree
+ : public make_bstree<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_bstree
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(bstree)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 bstree()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit bstree( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE bstree( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(unique, b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bstree(BOOST_RV_REF(bstree) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bstree& operator=(BOOST_RV_REF(bstree) x)
+ { return static_cast<bstree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const bstree &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(bstree) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bstree &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<bstree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const bstree &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const bstree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bstree &container_from_iterator(iterator it)
+ { return static_cast<bstree &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const bstree &container_from_iterator(const_iterator it)
+ { return static_cast<const bstree &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_BSTREE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/bstree_algorithms.hpp b/src/third_party/boost-1.70.0/boost/intrusive/bstree_algorithms.hpp
new file mode 100644
index 00000000000..9088911d4d0
--- /dev/null
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/circular_list_algorithms.hpp
index e5d41750469..e5d41750469 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/circular_list_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/intrusive/circular_slist_algorithms.hpp
index bc5b4817897..bc5b4817897 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/circular_slist_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/intrusive/derivation_value_traits.hpp
index 223b9836327..223b9836327 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/derivation_value_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/derivation_value_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/algo_type.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/algo_type.hpp
index 70ec63f5740..70ec63f5740 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/algo_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/algo_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/algorithm.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/algorithm.hpp
index d2421ffaad6..d2421ffaad6 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/algorithm.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/detail/any_node_and_algorithms.hpp
index f04491840d6..f04491840d6 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/any_node_and_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/any_node_and_algorithms.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/array_initializer.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/array_initializer.hpp
index 126a253afb8..126a253afb8 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/array_initializer.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/array_initializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/assert.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/assert.hpp
index 7199eb240c9..7199eb240c9 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/assert.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/detail/avltree_node.hpp
index 85a864260c1..85a864260c1 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/avltree_node.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/avltree_node.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/bstree_algorithms_base.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/bstree_algorithms_base.hpp
index 84040105658..84040105658 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/bstree_algorithms_base.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/detail/common_slist_algorithms.hpp
index 88f3fedac59..88f3fedac59 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/common_slist_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/common_slist_algorithms.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/config_begin.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/config_begin.hpp
index 8bd57a3b512..8bd57a3b512 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/config_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/config_end.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/config_end.hpp
index a081443e69e..a081443e69e 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/config_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/config_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/default_header_holder.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/default_header_holder.hpp
index ba561b5f5bc..ba561b5f5bc 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/default_header_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/default_header_holder.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/ebo_functor_holder.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/ebo_functor_holder.hpp
new file mode 100644
index 00000000000..88831667838
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/ebo_functor_holder.hpp
@@ -0,0 +1,292 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Joaquin M Lopez Munoz 2006-2013
+// (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_EBO_HOLDER_HPP
+#define BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_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/move/utility_core.hpp>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+#if defined(BOOST_MSVC) || defined(__BORLANDC_)
+#define BOOST_INTRUSIVE_TT_DECL __cdecl
+#else
+#define BOOST_INTRUSIVE_TT_DECL
+#endif
+
+#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(_M_ARM) && !defined(_M_ARM64) && !defined(UNDER_CE)
+#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+#endif
+
+template <typename T>
+struct is_unary_or_binary_function_impl
+{ static const bool value = false; };
+
+// see boost ticket #4094
+// avoid duplicate definitions of is_unary_or_binary_function_impl
+#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+
+template <typename R>
+struct is_unary_or_binary_function_impl<R (*)()>
+{ static const bool value = true; };
+
+template <typename R>
+struct is_unary_or_binary_function_impl<R (*)(...)>
+{ static const bool value = true; };
+
+#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+
+template <typename R>
+struct is_unary_or_binary_function_impl<R (__stdcall*)()>
+{ static const bool value = true; };
+
+#ifndef _MANAGED
+
+template <typename R>
+struct is_unary_or_binary_function_impl<R (__fastcall*)()>
+{ static const bool value = true; };
+
+#endif
+
+template <typename R>
+struct is_unary_or_binary_function_impl<R (__cdecl*)()>
+{ static const bool value = true; };
+
+template <typename R>
+struct is_unary_or_binary_function_impl<R (__cdecl*)(...)>
+{ static const bool value = true; };
+
+#endif
+
+// see boost ticket #4094
+// avoid duplicate definitions of is_unary_or_binary_function_impl
+#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+
+template <typename R, class T0>
+struct is_unary_or_binary_function_impl<R (*)(T0)>
+{ static const bool value = true; };
+
+template <typename R, class T0>
+struct is_unary_or_binary_function_impl<R (*)(T0...)>
+{ static const bool value = true; };
+
+#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+
+template <typename R, class T0>
+struct is_unary_or_binary_function_impl<R (__stdcall*)(T0)>
+{ static const bool value = true; };
+
+#ifndef _MANAGED
+
+template <typename R, class T0>
+struct is_unary_or_binary_function_impl<R (__fastcall*)(T0)>
+{ static const bool value = true; };
+
+#endif
+
+template <typename R, class T0>
+struct is_unary_or_binary_function_impl<R (__cdecl*)(T0)>
+{ static const bool value = true; };
+
+template <typename R, class T0>
+struct is_unary_or_binary_function_impl<R (__cdecl*)(T0...)>
+{ static const bool value = true; };
+
+#endif
+
+// see boost ticket #4094
+// avoid duplicate definitions of is_unary_or_binary_function_impl
+#ifndef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+
+template <typename R, class T0, class T1>
+struct is_unary_or_binary_function_impl<R (*)(T0, T1)>
+{ static const bool value = true; };
+
+template <typename R, class T0, class T1>
+struct is_unary_or_binary_function_impl<R (*)(T0, T1...)>
+{ static const bool value = true; };
+
+#else // BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS
+
+template <typename R, class T0, class T1>
+struct is_unary_or_binary_function_impl<R (__stdcall*)(T0, T1)>
+{ static const bool value = true; };
+
+#ifndef _MANAGED
+
+template <typename R, class T0, class T1>
+struct is_unary_or_binary_function_impl<R (__fastcall*)(T0, T1)>
+{ static const bool value = true; };
+
+#endif
+
+template <typename R, class T0, class T1>
+struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1)>
+{ static const bool value = true; };
+
+template <typename R, class T0, class T1>
+struct is_unary_or_binary_function_impl<R (__cdecl*)(T0, T1...)>
+{ static const bool value = true; };
+#endif
+
+template <typename T>
+struct is_unary_or_binary_function_impl<T&>
+{ static const bool value = false; };
+
+template<typename T>
+struct is_unary_or_binary_function : is_unary_or_binary_function_impl<T>
+{};
+
+template<typename T, typename Tag = void, bool = is_unary_or_binary_function<T>::value>
+class ebo_functor_holder
+{
+ BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
+
+ public:
+ typedef T functor_type;
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder()
+ : t_()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(const T &t)
+ : t_(t)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(BOOST_RV_REF(T) t)
+ : t_(::boost::move(t))
+ {}
+
+ template<class Arg1, class Arg2>
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
+ : t_(::boost::forward<Arg1>(arg1), ::boost::forward<Arg2>(arg2))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(const ebo_functor_holder &x)
+ : t_(x.t_)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_RV_REF(ebo_functor_holder) x)
+ : t_(x.t_)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_COPY_ASSIGN_REF(ebo_functor_holder) x)
+ {
+ this->get() = x.get();
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(ebo_functor_holder) x)
+ {
+ this->get() = ::boost::move(x.get());
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(const T &x)
+ {
+ this->get() = x;
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(T) x)
+ {
+ this->get() = ::boost::move(x);
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE T& get(){return t_;}
+ BOOST_INTRUSIVE_FORCEINLINE const T& get()const{return t_;}
+
+ private:
+ T t_;
+};
+
+template<typename T, typename Tag>
+class ebo_functor_holder<T, Tag, false>
+ : public T
+{
+ BOOST_COPYABLE_AND_MOVABLE(ebo_functor_holder)
+
+ public:
+ typedef T functor_type;
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder()
+ : T()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(const T &t)
+ : T(t)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit ebo_functor_holder(BOOST_RV_REF(T) t)
+ : T(::boost::move(t))
+ {}
+
+ template<class Arg1, class Arg2>
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
+ : T(::boost::forward<Arg1>(arg1), ::boost::forward<Arg2>(arg2))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(const ebo_functor_holder &x)
+ : T(static_cast<const T&>(x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder(BOOST_RV_REF(ebo_functor_holder) x)
+ : T(BOOST_MOVE_BASE(T, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_COPY_ASSIGN_REF(ebo_functor_holder) x)
+ {
+ const ebo_functor_holder&r = x;
+ this->get() = r;
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(ebo_functor_holder) x)
+ {
+ this->get() = ::boost::move(x.get());
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(const T &x)
+ {
+ this->get() = x;
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_RV_REF(T) x)
+ {
+ this->get() = ::boost::move(x);
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE T& get(){return *this;}
+ BOOST_INTRUSIVE_FORCEINLINE const T& get()const{return *this;}
+};
+
+} //namespace detail {
+} //namespace intrusive {
+} //namespace boost {
+
+#endif //#ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/empty_node_checker.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/empty_node_checker.hpp
index 16aa5600e71..16aa5600e71 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/empty_node_checker.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/empty_node_checker.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/equal_to_value.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/equal_to_value.hpp
index c5d9e5305c1..c5d9e5305c1 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/equal_to_value.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/equal_to_value.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/exception_disposer.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/exception_disposer.hpp
index 91c5bf3b67f..91c5bf3b67f 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/exception_disposer.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/exception_disposer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/function_detector.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/function_detector.hpp
index 5ecaeaf0731..5ecaeaf0731 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/function_detector.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/function_detector.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/generic_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/generic_hook.hpp
new file mode 100644
index 00000000000..eff7fa0472a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/generic_hook.hpp
@@ -0,0 +1,223 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_GENERIC_HOOK_HPP
+#define BOOST_INTRUSIVE_GENERIC_HOOK_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/node_holder.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+namespace detail {
+
+template <link_mode_type LinkMode>
+struct link_dispatch
+{};
+
+template<class Hook>
+void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
+{ //If this assertion raises, you might have destroyed an object
+ //while it was still inserted in a container that is alive.
+ //If so, remove the object from the container before destroying it.
+ (void)hook; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!hook.is_linked());
+}
+
+template<class Hook>
+void destructor_impl(Hook &hook, detail::link_dispatch<auto_unlink>)
+{ hook.unlink(); }
+
+template<class Hook>
+void destructor_impl(Hook &, detail::link_dispatch<normal_link>)
+{}
+
+} //namespace detail {
+
+enum base_hook_type
+{ NoBaseHookId
+, ListBaseHookId
+, SlistBaseHookId
+, RbTreeBaseHookId
+, HashBaseHookId
+, AvlTreeBaseHookId
+, BsTreeBaseHookId
+, TreapTreeBaseHookId
+, AnyBaseHookId
+};
+
+
+template <class HookTags, unsigned int>
+struct hook_tags_definer{};
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, ListBaseHookId>
+{ typedef HookTags default_list_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, SlistBaseHookId>
+{ typedef HookTags default_slist_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, RbTreeBaseHookId>
+{ typedef HookTags default_rbtree_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, HashBaseHookId>
+{ typedef HookTags default_hashtable_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, AvlTreeBaseHookId>
+{ typedef HookTags default_avltree_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, BsTreeBaseHookId>
+{ typedef HookTags default_bstree_hook; };
+
+template <class HookTags>
+struct hook_tags_definer<HookTags, AnyBaseHookId>
+{ typedef HookTags default_any_hook; };
+
+template
+ < class NodeTraits
+ , class Tag
+ , link_mode_type LinkMode
+ , base_hook_type BaseHookType
+ >
+struct hooktags_impl
+{
+ static const link_mode_type link_mode = LinkMode;
+ typedef Tag tag;
+ typedef NodeTraits node_traits;
+ static const bool is_base_hook = !detail::is_same<Tag, member_tag>::value;
+ static const bool safemode_or_autounlink = is_safe_autounlink<link_mode>::value;
+ static const unsigned int type = BaseHookType;
+};
+
+/// @endcond
+
+template
+ < boost::intrusive::algo_types Algo
+ , class NodeTraits
+ , class Tag
+ , link_mode_type LinkMode
+ , base_hook_type BaseHookType
+ >
+class generic_hook
+ /// @cond
+ //If the hook is a base hook, derive generic hook from node_holder
+ //so that a unique base class is created to convert from the node
+ //to the type. This mechanism will be used by bhtraits.
+ //
+ //If the hook is a member hook, generic hook will directly derive
+ //from the hook.
+ : public detail::if_c
+ < detail::is_same<Tag, member_tag>::value
+ , typename NodeTraits::node
+ , node_holder<typename NodeTraits::node, Tag, BaseHookType>
+ >::type
+ //If this is the a default-tagged base hook derive from a class that
+ //will define an special internal typedef. Containers will be able to detect this
+ //special typedef and obtain generic_hook's internal types in order to deduce
+ //value_traits for this hook.
+ , public hook_tags_definer
+ < generic_hook<Algo, NodeTraits, Tag, LinkMode, BaseHookType>
+ , detail::is_same<Tag, dft_tag>::value ? BaseHookType : NoBaseHookId>
+ /// @endcond
+{
+ /// @cond
+ typedef typename get_algo<Algo, NodeTraits>::type node_algorithms;
+ typedef typename node_algorithms::node node;
+ typedef typename node_algorithms::node_ptr node_ptr;
+ typedef typename node_algorithms::const_node_ptr const_node_ptr;
+
+ public:
+
+ typedef hooktags_impl
+ < NodeTraits
+ , Tag, LinkMode, BaseHookType> hooktags;
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr this_ptr()
+ { return pointer_traits<node_ptr>::pointer_to(static_cast<node&>(*this)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_node_ptr this_ptr() const
+ { return pointer_traits<const_node_ptr>::pointer_to(static_cast<const node&>(*this)); }
+
+ public:
+ /// @endcond
+
+ BOOST_INTRUSIVE_FORCEINLINE generic_hook()
+ {
+ if(hooktags::safemode_or_autounlink){
+ node_algorithms::init(this->this_ptr());
+ }
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE generic_hook(const generic_hook& )
+ {
+ if(hooktags::safemode_or_autounlink){
+ node_algorithms::init(this->this_ptr());
+ }
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE generic_hook& operator=(const generic_hook& )
+ { return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE ~generic_hook()
+ {
+ destructor_impl
+ (*this, detail::link_dispatch<hooktags::link_mode>());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE void swap_nodes(generic_hook &other)
+ {
+ node_algorithms::swap_nodes
+ (this->this_ptr(), other.this_ptr());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE bool is_linked() const
+ {
+ //is_linked() can be only used in safe-mode or auto-unlink
+ BOOST_STATIC_ASSERT(( hooktags::safemode_or_autounlink ));
+ return !node_algorithms::unique(this->this_ptr());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE void unlink()
+ {
+ BOOST_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
+ node_ptr n(this->this_ptr());
+ if(!node_algorithms::inited(n)){
+ node_algorithms::unlink(n);
+ node_algorithms::init(n);
+ }
+ }
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_GENERIC_HOOK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/get_value_traits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/get_value_traits.hpp
index 222f8078a64..222f8078a64 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/get_value_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/get_value_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/has_member_function_callable_with.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/has_member_function_callable_with.hpp
index 92ef60ee6df..92ef60ee6df 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/has_member_function_callable_with.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/has_member_function_callable_with.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/hashtable_node.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/hashtable_node.hpp
new file mode 100644
index 00000000000..913c38da70e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/hashtable_node.hpp
@@ -0,0 +1,295 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_HASHTABLE_NODE_HPP
+#define BOOST_INTRUSIVE_HASHTABLE_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/detail/assert.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/trivial_value_traits.hpp>
+#include <boost/intrusive/slist.hpp> //make_slist
+#include <cstddef>
+#include <climits>
+#include <boost/move/core.hpp>
+
+
+namespace boost {
+namespace intrusive {
+
+template <class Slist>
+struct bucket_impl : public Slist
+{
+ typedef Slist slist_type;
+ BOOST_INTRUSIVE_FORCEINLINE bucket_impl()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_impl(const bucket_impl &)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE ~bucket_impl()
+ {
+ //This bucket is still being used!
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_impl &operator=(const bucket_impl&)
+ {
+ //This bucket is still in use!
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
+ return *this;
+ }
+};
+
+template<class Slist>
+struct bucket_traits_impl
+{
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(bucket_traits_impl)
+
+ public:
+ /// @cond
+
+ typedef typename pointer_traits
+ <typename Slist::pointer>::template rebind_pointer
+ < bucket_impl<Slist> >::type bucket_ptr;
+ typedef Slist slist;
+ typedef typename Slist::size_type size_type;
+ /// @endcond
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(bucket_ptr buckets, size_type len)
+ : buckets_(buckets), buckets_len_(len)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(const bucket_traits_impl &x)
+ : buckets_(x.buckets_), buckets_len_(x.buckets_len_)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(BOOST_RV_REF(bucket_traits_impl) x)
+ : buckets_(x.buckets_), buckets_len_(x.buckets_len_)
+ { x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_RV_REF(bucket_traits_impl) x)
+ {
+ buckets_ = x.buckets_; buckets_len_ = x.buckets_len_;
+ x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_COPY_ASSIGN_REF(bucket_traits_impl) x)
+ {
+ buckets_ = x.buckets_; buckets_len_ = x.buckets_len_; return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &bucket_begin() const
+ { return buckets_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
+ { return buckets_len_; }
+
+ private:
+ bucket_ptr buckets_;
+ size_type buckets_len_;
+};
+
+template <class NodeTraits>
+struct hash_reduced_slist_node_traits
+{
+ template <class U> static detail::no_type test(...);
+ template <class U> static detail::yes_type test(typename U::reduced_slist_node_traits*);
+ static const bool value = sizeof(test<NodeTraits>(0)) == sizeof(detail::yes_type);
+};
+
+template <class NodeTraits>
+struct apply_reduced_slist_node_traits
+{
+ typedef typename NodeTraits::reduced_slist_node_traits type;
+};
+
+template <class NodeTraits>
+struct reduced_slist_node_traits
+{
+ typedef typename detail::eval_if_c
+ < hash_reduced_slist_node_traits<NodeTraits>::value
+ , apply_reduced_slist_node_traits<NodeTraits>
+ , detail::identity<NodeTraits>
+ >::type type;
+};
+
+template<class NodeTraits>
+struct get_slist_impl
+{
+ typedef trivial_value_traits<NodeTraits, normal_link> trivial_traits;
+
+ //Reducing symbol length
+ struct type : make_slist
+ < typename NodeTraits::node
+ , boost::intrusive::value_traits<trivial_traits>
+ , boost::intrusive::constant_time_size<false>
+ , boost::intrusive::size_type<std::size_t>
+ >::type
+ {};
+};
+
+template<class BucketValueTraits, bool IsConst>
+class hashtable_iterator
+{
+ typedef typename BucketValueTraits::value_traits value_traits;
+ typedef typename BucketValueTraits::bucket_traits bucket_traits;
+
+ typedef iiterator< value_traits, IsConst
+ , std::forward_iterator_tag> types_t;
+ 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;
+
+ private:
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename get_slist_impl
+ < typename reduced_slist_node_traits
+ <node_traits>::type >::type slist_impl;
+ typedef typename slist_impl::iterator siterator;
+ typedef typename slist_impl::const_iterator const_siterator;
+ typedef bucket_impl<slist_impl> bucket_type;
+
+ typedef typename pointer_traits
+ <pointer>::template rebind_pointer
+ < const BucketValueTraits >::type const_bucketvaltraits_ptr;
+ typedef typename slist_impl::size_type size_type;
+ class nat;
+ typedef typename
+ detail::if_c< IsConst
+ , hashtable_iterator<BucketValueTraits, false>
+ , nat>::type nonconst_iterator;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_ptr p)
+ {
+ return pointer_traits<node_ptr>::
+ pointer_to(static_cast<typename node_traits::node&>(*p));
+ }
+
+ public:
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator ()
+ : slist_it_() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit hashtable_iterator(siterator ptr, const BucketValueTraits *cont)
+ : slist_it_ (ptr)
+ , traitsptr_ (cont ? pointer_traits<const_bucketvaltraits_ptr>::pointer_to(*cont) : const_bucketvaltraits_ptr() )
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator &other)
+ : slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const nonconst_iterator &other)
+ : slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE const siterator &slist_it() const
+ { return slist_it_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, false> unconst() const
+ { return hashtable_iterator<BucketValueTraits, false>(this->slist_it(), this->get_bucket_value_traits()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
+ { this->increment(); return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator &operator=(const hashtable_iterator &other)
+ { slist_it_ = other.slist_it(); traitsptr_ = other.get_bucket_value_traits(); return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator operator++(int)
+ {
+ hashtable_iterator result (*this);
+ this->increment();
+ return result;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const hashtable_iterator& i, const hashtable_iterator& i2)
+ { return i.slist_it_ == i2.slist_it_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const hashtable_iterator& i, const hashtable_iterator& i2)
+ { return !(i == i2); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
+ { return *this->operator ->(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
+ {
+ return this->priv_value_traits().to_value_ptr
+ (downcast_bucket(slist_it_.pointed_node()));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE const const_bucketvaltraits_ptr &get_bucket_value_traits() const
+ { return traitsptr_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
+ { return traitsptr_->priv_value_traits(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
+ { return traitsptr_->priv_bucket_traits(); }
+
+ private:
+ void increment()
+ {
+ const bucket_traits &rbuck_traits = this->priv_bucket_traits();
+ bucket_type* const buckets = boost::movelib::to_raw_pointer(rbuck_traits.bucket_begin());
+ const size_type buckets_len = rbuck_traits.bucket_count();
+
+ ++slist_it_;
+ const typename slist_impl::node_ptr n = slist_it_.pointed_node();
+ const siterator first_bucket_bbegin = buckets->end();
+ if(first_bucket_bbegin.pointed_node() <= n && n <= buckets[buckets_len-1].cend().pointed_node()){
+ //If one-past the node is inside the bucket then look for the next non-empty bucket
+ //1. get the bucket_impl from the iterator
+ const bucket_type &b = static_cast<const bucket_type&>
+ (bucket_type::slist_type::container_from_end_iterator(slist_it_));
+
+ //2. Now just calculate the index b has in the bucket array
+ size_type n_bucket = static_cast<size_type>(&b - buckets);
+
+ //3. Iterate until a non-empty bucket is found
+ do{
+ if (++n_bucket >= buckets_len){ //bucket overflow, return end() iterator
+ slist_it_ = buckets->before_begin();
+ return;
+ }
+ }
+ while (buckets[n_bucket].empty());
+ slist_it_ = buckets[n_bucket].begin();
+ }
+ else{
+ //++slist_it_ yield to a valid object
+ }
+ }
+
+ siterator slist_it_;
+ const_bucketvaltraits_ptr traitsptr_;
+};
+
+} //namespace intrusive {
+} //namespace boost {
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/hook_traits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/hook_traits.hpp
new file mode 100644
index 00000000000..7f7dc27e0e9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/hook_traits.hpp
@@ -0,0 +1,195 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_DETAIL_HOOK_TRAITS_HPP
+#define BOOST_INTRUSIVE_DETAIL_HOOK_TRAITS_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_traits.hpp>
+#include <boost/intrusive/detail/parent_from_member.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/intrusive/detail/node_holder.hpp>
+
+namespace boost {
+namespace intrusive {
+
+template<class T, class NodePtr, class Tag, unsigned int Type>
+struct bhtraits_base
+{
+ public:
+ typedef NodePtr node_ptr;
+ typedef typename pointer_traits<node_ptr>::element_type node;
+ typedef node_holder<node, Tag, Type> node_holder_type;
+ typedef T value_type;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const node>::type const_node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<T>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const T>::type const_pointer;
+ //typedef typename pointer_traits<pointer>::reference reference;
+ //typedef typename pointer_traits<const_pointer>::reference const_reference;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef node_holder_type & node_holder_reference;
+ typedef const node_holder_type & const_node_holder_reference;
+ typedef node& node_reference;
+ typedef const node & const_node_reference;
+
+ BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
+ {
+ pointer p = pointer_traits<pointer>::pointer_to
+ (static_cast<reference>(static_cast<node_holder_reference>(*n)));
+ BOOST_ASSERT(!!p);
+ return p;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
+ {
+ const_pointer p = pointer_traits<const_pointer>::pointer_to
+ (static_cast<const_reference>(static_cast<const_node_holder_reference>(*n)));
+ BOOST_ASSERT(!!p);
+ return p;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
+ {
+ node_ptr p = pointer_traits<node_ptr>::pointer_to
+ (static_cast<node_reference>(static_cast<node_holder_reference>(value)));
+ BOOST_ASSERT(!!p);
+ return p;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
+ {
+ const_node_ptr p = pointer_traits<const_node_ptr>::pointer_to
+ (static_cast<const_node_reference>(static_cast<const_node_holder_reference>(value)));
+ BOOST_ASSERT(!!p);
+ return p;
+ }
+};
+
+template<class T, class NodeTraits, link_mode_type LinkMode, class Tag, unsigned int Type>
+struct bhtraits
+ : public bhtraits_base<T, typename NodeTraits::node_ptr, Tag, Type>
+{
+ static const link_mode_type link_mode = LinkMode;
+ typedef NodeTraits node_traits;
+};
+
+
+template<class T, class Hook, Hook T::* P>
+struct mhtraits
+{
+ public:
+ typedef Hook hook_type;
+ typedef typename hook_type::hooktags::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef T value_type;
+ 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<T>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const T>::type const_pointer;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef node& node_reference;
+ typedef const node & const_node_reference;
+ typedef hook_type& hook_reference;
+ typedef const hook_type & const_hook_reference;
+
+ static const link_mode_type link_mode = Hook::hooktags::link_mode;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
+ {
+ return pointer_traits<node_ptr>::pointer_to
+ (static_cast<node_reference>(static_cast<hook_reference>(value.*P)));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
+ {
+ return pointer_traits<const_node_ptr>::pointer_to
+ (static_cast<const_node_reference>(static_cast<const_hook_reference>(value.*P)));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
+ {
+ return pointer_traits<pointer>::pointer_to
+ (*detail::parent_from_member<T, Hook>
+ (static_cast<Hook*>(boost::movelib::to_raw_pointer(n)), P));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
+ {
+ return pointer_traits<const_pointer>::pointer_to
+ (*detail::parent_from_member<T, Hook>
+ (static_cast<const Hook*>(boost::movelib::to_raw_pointer(n)), P));
+ }
+};
+
+
+template<class Functor>
+struct fhtraits
+{
+ public:
+ typedef typename Functor::hook_type hook_type;
+ typedef typename Functor::hook_ptr hook_ptr;
+ typedef typename Functor::const_hook_ptr const_hook_ptr;
+ typedef typename hook_type::hooktags::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename Functor::value_type value_type;
+ 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 value_type & reference;
+ typedef const value_type & const_reference;
+ static const link_mode_type link_mode = hook_type::hooktags::link_mode;
+
+ static node_ptr to_node_ptr(reference value)
+ { return static_cast<node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
+
+ static const_node_ptr to_node_ptr(const_reference value)
+ { return static_cast<const node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
+
+ static pointer to_value_ptr(const node_ptr & n)
+ { return Functor::to_value_ptr(to_hook_ptr(n)); }
+
+ static const_pointer to_value_ptr(const const_node_ptr & n)
+ { return Functor::to_value_ptr(to_hook_ptr(n)); }
+
+ private:
+ static hook_ptr to_hook_ptr(const node_ptr & n)
+ { return hook_ptr(&*static_cast<hook_type*>(&*n)); }
+
+ static const_hook_ptr to_hook_ptr(const const_node_ptr & n)
+ { return const_hook_ptr(&*static_cast<const hook_type*>(&*n)); }
+};
+
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_DETAIL_HOOK_TRAITS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/iiterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/iiterator.hpp
index 5ab1de2bb12..5ab1de2bb12 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/iiterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/iiterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/is_stateful_value_traits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/is_stateful_value_traits.hpp
index e43f6d340ac..e43f6d340ac 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/is_stateful_value_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/is_stateful_value_traits.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/iterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/iterator.hpp
new file mode 100644
index 00000000000..41ffca1255a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/iterator.hpp
@@ -0,0 +1,262 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_ITERATOR_HPP
+#define BOOST_INTRUSIVE_DETAIL_ITERATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <cstddef>
+#include <boost/intrusive/detail/std_fwd.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/meta_utils_core.hpp>
+
+namespace boost{
+namespace iterators{
+
+struct incrementable_traversal_tag;
+struct single_pass_traversal_tag;
+struct forward_traversal_tag;
+struct bidirectional_traversal_tag;
+struct random_access_traversal_tag;
+
+namespace detail{
+
+template <class Category, class Traversal>
+struct iterator_category_with_traversal;
+
+} //namespace boost{
+} //namespace iterators{
+} //namespace detail{
+
+namespace boost {
+namespace intrusive {
+
+using boost::movelib::iterator_traits;
+
+////////////////////
+// iterator
+////////////////////
+template<class Category, class T, class Difference, class Pointer, class Reference>
+struct iterator
+{
+ typedef Category iterator_category;
+ typedef T value_type;
+ typedef Difference difference_type;
+ typedef Pointer pointer;
+ typedef Reference reference;
+};
+
+////////////////////////////////////////
+// iterator_[dis|en]able_if_boost_iterator
+////////////////////////////////////////
+template<class I>
+struct is_boost_iterator
+{
+ static const bool value = false;
+};
+
+template<class Category, class Traversal>
+struct is_boost_iterator< boost::iterators::detail::iterator_category_with_traversal<Category, Traversal> >
+{
+ static const bool value = true;
+};
+
+template<class I, class R = void>
+struct iterator_enable_if_boost_iterator
+ : ::boost::move_detail::enable_if_c
+ < is_boost_iterator<typename boost::intrusive::iterator_traits<I>::iterator_category >::value
+ , R>
+{};
+
+////////////////////////////////////////
+// iterator_[dis|en]able_if_tag
+////////////////////////////////////////
+template<class I, class Tag, class R = void>
+struct iterator_enable_if_tag
+ : ::boost::move_detail::enable_if_c
+ < ::boost::move_detail::is_same
+ < typename boost::intrusive::iterator_traits<I>::iterator_category
+ , Tag
+ >::value
+ , R>
+{};
+
+template<class I, class Tag, class R = void>
+struct iterator_disable_if_tag
+ : ::boost::move_detail::enable_if_c
+ < !::boost::move_detail::is_same
+ < typename boost::intrusive::iterator_traits<I>::iterator_category
+ , Tag
+ >::value
+ , R>
+{};
+
+////////////////////////////////////////
+// iterator_[dis|en]able_if_tag
+////////////////////////////////////////
+template<class I, class Tag, class Tag2, class R = void>
+struct iterator_enable_if_convertible_tag
+ : ::boost::move_detail::enable_if_c
+ < ::boost::move_detail::is_same_or_convertible
+ < typename boost::intrusive::iterator_traits<I>::iterator_category
+ , Tag
+ >::value &&
+ !::boost::move_detail::is_same_or_convertible
+ < typename boost::intrusive::iterator_traits<I>::iterator_category
+ , Tag2
+ >::value
+ , R>
+{};
+
+////////////////////////////////////////
+// iterator_[dis|en]able_if_tag_difference_type
+////////////////////////////////////////
+template<class I, class Tag>
+struct iterator_enable_if_tag_difference_type
+ : iterator_enable_if_tag<I, Tag, typename boost::intrusive::iterator_traits<I>::difference_type>
+{};
+
+template<class I, class Tag>
+struct iterator_disable_if_tag_difference_type
+ : iterator_disable_if_tag<I, Tag, typename boost::intrusive::iterator_traits<I>::difference_type>
+{};
+
+////////////////////
+// advance
+////////////////////
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::input_iterator_tag>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ while(n--)
+ ++it;
+}
+
+template<class InputIt, class Distance>
+typename iterator_enable_if_tag<InputIt, std::forward_iterator_tag>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ while(n--)
+ ++it;
+}
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::bidirectional_iterator_tag>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ for (; 0 < n; --n)
+ ++it;
+ for (; n < 0; ++n)
+ --it;
+}
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random_access_iterator_tag>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ it += n;
+}
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
+ <InputIt, const boost::iterators::incrementable_traversal_tag&, const boost::iterators::single_pass_traversal_tag&>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ while(n--)
+ ++it;
+}
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
+ <InputIt, const boost::iterators::single_pass_traversal_tag &, const boost::iterators::forward_traversal_tag&>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ while(n--)
+ ++it;
+}
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
+ <InputIt, const boost::iterators::forward_traversal_tag&, const boost::iterators::bidirectional_traversal_tag&>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ while(n--)
+ ++it;
+}
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
+ <InputIt, const boost::iterators::bidirectional_traversal_tag&, const boost::iterators::random_access_traversal_tag&>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ for (; 0 < n; --n)
+ ++it;
+ for (; n < 0; ++n)
+ --it;
+}
+
+class fake{};
+
+template<class InputIt, class Distance>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
+ <InputIt, const boost::iterators::random_access_traversal_tag&, const fake&>::type
+ iterator_advance(InputIt& it, Distance n)
+{
+ it += n;
+}
+
+////////////////////
+// distance
+////////////////////
+template<class InputIt> inline
+typename iterator_disable_if_tag_difference_type
+ <InputIt, std::random_access_iterator_tag>::type
+ iterator_distance(InputIt first, InputIt last)
+{
+ typename iterator_traits<InputIt>::difference_type off = 0;
+ while(first != last){
+ ++off;
+ ++first;
+ }
+ return off;
+}
+
+template<class InputIt>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag_difference_type
+ <InputIt, std::random_access_iterator_tag>::type
+ iterator_distance(InputIt first, InputIt last)
+{
+ typename iterator_traits<InputIt>::difference_type off = last - first;
+ return off;
+}
+
+template<class I>
+BOOST_INTRUSIVE_FORCEINLINE typename iterator_traits<I>::pointer iterator_arrow_result(const I &i)
+{ return i.operator->(); }
+
+template<class T>
+BOOST_INTRUSIVE_FORCEINLINE T * iterator_arrow_result(T *p)
+{ return p; }
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_DETAIL_ITERATOR_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/key_nodeptr_comp.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/key_nodeptr_comp.hpp
new file mode 100644
index 00000000000..1029a3404a0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/key_nodeptr_comp.hpp
@@ -0,0 +1,125 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_KEY_NODEPTR_COMP_HPP
+#define BOOST_INTRUSIVE_DETAIL_KEY_NODEPTR_COMP_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/detail/tree_value_compare.hpp>
+
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template < class KeyTypeKeyCompare
+ , class ValueTraits
+ , class KeyOfValue
+ >
+struct key_nodeptr_comp_types
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::node_ptr node_ptr;
+ typedef typename value_traits::const_node_ptr const_node_ptr;
+ typedef typename detail::if_c
+ < detail::is_same<KeyOfValue, void>::value
+ , detail::identity<value_type>
+ , KeyOfValue
+ >::type key_of_value;
+ typedef tree_value_compare
+ <typename ValueTraits::pointer, KeyTypeKeyCompare, key_of_value> base_t;
+};
+
+//This function object transforms a key comparison type to
+//a function that can compare nodes or nodes with nodes or keys.
+template < class KeyTypeKeyCompare
+ , class ValueTraits
+ , class KeyOfValue = void
+ >
+struct key_nodeptr_comp
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue>::base_t
+{
+private:
+ struct sfinae_type;
+
+public:
+ typedef key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue> types_t;
+ typedef typename types_t::value_traits value_traits;
+ typedef typename types_t::value_type value_type;
+ typedef typename types_t::node_ptr node_ptr;
+ typedef typename types_t::const_node_ptr const_node_ptr;
+ typedef typename types_t::base_t base_t;
+ typedef typename types_t::key_of_value key_of_value;
+
+ template <class P1>
+ struct is_same_or_nodeptr_convertible
+ {
+ static const bool same_type = is_same<P1,const_node_ptr>::value || is_same<P1,node_ptr>::value;
+ static const bool value = same_type || is_convertible<P1, const_node_ptr>::value;
+ };
+
+ BOOST_INTRUSIVE_FORCEINLINE base_t base() const
+ { return static_cast<const base_t&>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE key_nodeptr_comp(KeyTypeKeyCompare kcomp, const ValueTraits *traits)
+ : base_t(kcomp), traits_(traits)
+ {}
+
+ //pred(pnode)
+ template<class T1>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value, sfinae_type* >::type = 0) const
+ { return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); }
+
+ //operator() 2 arg
+ //pred(pnode, pnode)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
+ { return base()(*traits_->to_value_ptr(t1), *traits_->to_value_ptr(t2)); }
+
+ //pred(pnode, key)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
+ { return base()(*traits_->to_value_ptr(t1), t2); }
+
+ //pred(key, pnode)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
+ { return base()(t1, *traits_->to_value_ptr(t2)); }
+
+ //pred(key, key)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
+ { return base()(t1, t2); }
+
+ const ValueTraits *const traits_;
+};
+
+} //namespace detail{
+} //namespace intrusive{
+} //namespace boost{
+
+#endif //BOOST_INTRUSIVE_DETAIL_KEY_NODEPTR_COMP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/list_iterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/list_iterator.hpp
new file mode 100644
index 00000000000..880b6a98479
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/list_iterator.hpp
@@ -0,0 +1,146 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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;
+ class nat;
+ typedef typename
+ detail::if_c< IsConst
+ , list_iterator<value_traits, false>
+ , nat>::type nonconst_iterator;
+
+ 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(const list_iterator &other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator(const nonconst_iterator &other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const list_iterator &other)
+ { members_.nodeptr_ = other.members_.nodeptr_; return *this; }
+
+ 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 *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>()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE 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.70.0/boost/intrusive/detail/list_node.hpp
index bc30e89f258..bc30e89f258 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/list_node.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/list_node.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/math.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/math.hpp
new file mode 100644
index 00000000000..200f8b87766
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/math.hpp
@@ -0,0 +1,295 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_MATH_HPP
+#define BOOST_INTRUSIVE_DETAIL_MATH_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <cstddef>
+#include <climits>
+#include <boost/intrusive/detail/mpl.hpp>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+///////////////////////////
+// floor_log2 Dispatcher
+////////////////////////////
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+
+ }}} //namespace boost::intrusive::detail
+
+ //Use _BitScanReverseXX intrinsics
+
+ #if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IA64) //64 bit target
+ #define BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
+ #endif
+
+ #ifndef __INTRIN_H_ // Avoid including any windows system header
+ #ifdef __cplusplus
+ extern "C" {
+ #endif // __cplusplus
+
+ #if defined(BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT) //64 bit target
+ unsigned char _BitScanReverse64(unsigned long *index, unsigned __int64 mask);
+ #pragma intrinsic(_BitScanReverse64)
+ #else //32 bit target
+ unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
+ #pragma intrinsic(_BitScanReverse)
+ #endif
+
+ #ifdef __cplusplus
+ }
+ #endif // __cplusplus
+ #endif // __INTRIN_H_
+
+ #ifdef BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
+ #define BOOST_INTRUSIVE_BSR_INTRINSIC _BitScanReverse64
+ #undef BOOST_INTRUSIVE_BSR_INTRINSIC_64_BIT
+ #else
+ #define BOOST_INTRUSIVE_BSR_INTRINSIC _BitScanReverse
+ #endif
+
+ namespace boost {
+ namespace intrusive {
+ namespace detail {
+
+ inline std::size_t floor_log2 (std::size_t x)
+ {
+ unsigned long log2;
+ BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, (unsigned long)x );
+ return log2;
+ }
+
+ #undef BOOST_INTRUSIVE_BSR_INTRINSIC
+
+#elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) //GCC >=3.4
+
+ //Compile-time error in case of missing specialization
+ template<class Uint>
+ struct builtin_clz_dispatch;
+
+ #if defined(BOOST_HAS_LONG_LONG)
+ template<>
+ struct builtin_clz_dispatch< ::boost::ulong_long_type >
+ {
+ static ::boost::ulong_long_type call(::boost::ulong_long_type n)
+ { return __builtin_clzll(n); }
+ };
+ #endif
+
+ template<>
+ struct builtin_clz_dispatch<unsigned long>
+ {
+ static unsigned long call(unsigned long n)
+ { return __builtin_clzl(n); }
+ };
+
+ template<>
+ struct builtin_clz_dispatch<unsigned int>
+ {
+ static unsigned int call(unsigned int n)
+ { return __builtin_clz(n); }
+ };
+
+ inline std::size_t floor_log2(std::size_t n)
+ {
+ return sizeof(std::size_t)*CHAR_BIT - std::size_t(1) - builtin_clz_dispatch<std::size_t>::call(n);
+ }
+
+#else //Portable methods
+
+////////////////////////////
+// Generic method
+////////////////////////////
+
+ inline std::size_t floor_log2_get_shift(std::size_t n, true_ )//power of two size_t
+ { return n >> 1; }
+
+ inline std::size_t floor_log2_get_shift(std::size_t n, false_ )//non-power of two size_t
+ { return (n >> 1) + ((n & 1u) & (n != 1)); }
+
+ template<std::size_t N>
+ inline std::size_t floor_log2 (std::size_t x, integral_constant<std::size_t, N>)
+ {
+ const std::size_t Bits = N;
+ const bool Size_t_Bits_Power_2= !(Bits & (Bits-1));
+
+ std::size_t n = x;
+ std::size_t log2 = 0;
+
+ std::size_t remaining_bits = Bits;
+ std::size_t shift = floor_log2_get_shift(remaining_bits, bool_<Size_t_Bits_Power_2>());
+ while(shift){
+ std::size_t tmp = n >> shift;
+ if (tmp){
+ log2 += shift, n = tmp;
+ }
+ shift = floor_log2_get_shift(shift, bool_<Size_t_Bits_Power_2>());
+ }
+
+ return log2;
+ }
+
+ ////////////////////////////
+ // DeBruijn method
+ ////////////////////////////
+
+ //Taken from:
+ //http://stackoverflow.com/questions/11376288/fast-computing-of-log2-for-64-bit-integers
+ //Thanks to Desmond Hume
+
+ inline std::size_t floor_log2 (std::size_t v, integral_constant<std::size_t, 32>)
+ {
+ static const int MultiplyDeBruijnBitPosition[32] =
+ {
+ 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
+ 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
+ };
+
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+
+ return MultiplyDeBruijnBitPosition[(std::size_t)(v * 0x07C4ACDDU) >> 27];
+ }
+
+ inline std::size_t floor_log2 (std::size_t v, integral_constant<std::size_t, 64>)
+ {
+ static const std::size_t MultiplyDeBruijnBitPosition[64] = {
+ 63, 0, 58, 1, 59, 47, 53, 2,
+ 60, 39, 48, 27, 54, 33, 42, 3,
+ 61, 51, 37, 40, 49, 18, 28, 20,
+ 55, 30, 34, 11, 43, 14, 22, 4,
+ 62, 57, 46, 52, 38, 26, 32, 41,
+ 50, 36, 17, 19, 29, 10, 13, 21,
+ 56, 45, 25, 31, 35, 16, 9, 12,
+ 44, 24, 15, 8, 23, 7, 6, 5};
+
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ v |= v >> 32;
+ return MultiplyDeBruijnBitPosition[((std::size_t)((v - (v >> 1))*0x07EDD5E59A4E28C2ULL)) >> 58];
+ }
+
+
+ inline std::size_t floor_log2 (std::size_t x)
+ {
+ const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT;
+ return floor_log2(x, integral_constant<std::size_t, Bits>());
+ }
+
+#endif
+
+//Thanks to Laurent de Soras in
+//http://www.flipcode.com/archives/Fast_log_Function.shtml
+inline float fast_log2 (float val)
+{
+ union caster_t
+ {
+ unsigned x;
+ float val;
+ } caster;
+
+ caster.val = val;
+ unsigned x = caster.x;
+ const int log_2 = int((x >> 23) & 255) - 128;
+ x &= ~(unsigned(255u) << 23u);
+ x += unsigned(127) << 23u;
+ caster.x = x;
+ val = caster.val;
+ //1+log2(m), m ranging from 1 to 2
+ //3rd degree polynomial keeping first derivate continuity.
+ //For less precision the line can be commented out
+ val = ((-1.f/3.f) * val + 2.f) * val - (2.f/3.f);
+ return val + static_cast<float>(log_2);
+}
+
+inline bool is_pow2(std::size_t x)
+{ return (x & (x-1)) == 0; }
+
+template<std::size_t N>
+struct static_is_pow2
+{
+ static const bool value = (N & (N-1)) == 0;
+};
+
+inline std::size_t ceil_log2 (std::size_t x)
+{
+ return static_cast<std::size_t>(!(is_pow2)(x)) + floor_log2(x);
+}
+
+inline std::size_t ceil_pow2 (std::size_t x)
+{
+ return std::size_t(1u) << (ceil_log2)(x);
+}
+
+inline std::size_t previous_or_equal_pow2(std::size_t x)
+{
+ return std::size_t(1u) << floor_log2(x);
+}
+
+template<class SizeType, std::size_t N>
+struct numbits_eq
+{
+ static const bool value = sizeof(SizeType)*CHAR_BIT == N;
+};
+
+template<class SizeType, class Enabler = void >
+struct sqrt2_pow_max;
+
+template <class SizeType>
+struct sqrt2_pow_max<SizeType, typename voider<typename enable_if< numbits_eq<SizeType, 32> >::type>::type>
+{
+ static const SizeType value = 0xb504f334;
+ static const std::size_t pow = 31;
+};
+
+#ifndef BOOST_NO_INT64_T
+
+template <class SizeType>
+struct sqrt2_pow_max<SizeType, typename voider<typename enable_if< numbits_eq<SizeType, 64> >::type>::type>
+{
+ static const SizeType value = 0xb504f333f9de6484ull;
+ static const std::size_t pow = 63;
+};
+
+#endif //BOOST_NO_INT64_T
+
+// Returns floor(pow(sqrt(2), x * 2 + 1)).
+// Defined for X from 0 up to the number of bits in size_t minus 1.
+inline std::size_t sqrt2_pow_2xplus1 (std::size_t x)
+{
+ const std::size_t value = (std::size_t)sqrt2_pow_max<std::size_t>::value;
+ const std::size_t pow = (std::size_t)sqrt2_pow_max<std::size_t>::pow;
+ return (value >> (pow - x)) + 1;
+}
+
+} //namespace detail
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_DETAIL_MATH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_less_equal_header.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/minimal_less_equal_header.hpp
index 5e8a19debf9..5e8a19debf9 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_less_equal_header.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/minimal_less_equal_header.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_pair_header.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/minimal_pair_header.hpp
index 1358a085881..1358a085881 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_pair_header.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/minimal_pair_header.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/mpl.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/mpl.hpp
new file mode 100644
index 00000000000..935c04c282b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/mpl.hpp
@@ -0,0 +1,217 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2014
+// (C) Copyright 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 http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_DETAIL_MPL_HPP
+#define BOOST_INTRUSIVE_DETAIL_MPL_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/move/detail/type_traits.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+using boost::move_detail::is_same;
+using boost::move_detail::add_const;
+using boost::move_detail::remove_const;
+using boost::move_detail::remove_cv;
+using boost::move_detail::remove_reference;
+using boost::move_detail::add_reference;
+using boost::move_detail::remove_pointer;
+using boost::move_detail::add_pointer;
+using boost::move_detail::true_type;
+using boost::move_detail::false_type;
+using boost::move_detail::voider;
+using boost::move_detail::enable_if_c;
+using boost::move_detail::enable_if;
+using boost::move_detail::disable_if_c;
+using boost::move_detail::disable_if;
+using boost::move_detail::is_convertible;
+using boost::move_detail::if_c;
+using boost::move_detail::if_;
+using boost::move_detail::is_const;
+using boost::move_detail::identity;
+using boost::move_detail::alignment_of;
+using boost::move_detail::is_empty;
+using boost::move_detail::addressof;
+using boost::move_detail::integral_constant;
+using boost::move_detail::enable_if_convertible;
+using boost::move_detail::disable_if_convertible;
+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::apply;
+using boost::move_detail::eval_if_c;
+using boost::move_detail::eval_if;
+using boost::move_detail::unvoid_ref;
+using boost::move_detail::add_const_if_c;
+
+template<std::size_t S>
+struct ls_zeros
+{
+ static const std::size_t value = (S & std::size_t(1)) ? 0 : (1 + ls_zeros<(S>>1u)>::value);
+};
+
+template<>
+struct ls_zeros<0>
+{
+ static const std::size_t value = 0;
+};
+
+template<>
+struct ls_zeros<1>
+{
+ static const std::size_t value = 0;
+};
+
+// Infrastructure for providing a default type for T::TNAME if absent.
+#define BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(TNAME) \
+ template <typename T> \
+ struct boost_intrusive_has_type_ ## TNAME \
+ { \
+ template <typename X> \
+ static char test(int, typename X::TNAME*); \
+ \
+ template <typename X> \
+ static int test(...); \
+ \
+ static const bool value = (1 == sizeof(test<T>(0, 0))); \
+ }; \
+ \
+ template <typename T, typename DefaultType> \
+ struct boost_intrusive_default_type_ ## TNAME \
+ { \
+ struct DefaultWrap { typedef DefaultType TNAME; }; \
+ \
+ typedef typename \
+ ::boost::intrusive::detail::if_c \
+ < boost_intrusive_has_type_ ## TNAME<T>::value \
+ , T, DefaultWrap>::type::TNAME type; \
+ }; \
+ //
+
+#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
+ typename INSTANTIATION_NS_PREFIX \
+ boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
+//
+
+#define BOOST_INTRUSIVE_HAS_TYPE(INSTANTIATION_NS_PREFIX, T, TNAME) \
+ INSTANTIATION_NS_PREFIX \
+ boost_intrusive_has_type_ ## TNAME< T >::value \
+//
+
+#define BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(TNAME)\
+ template <typename T, typename DefaultType> \
+ struct boost_intrusive_eval_default_type_ ## TNAME \
+ { \
+ template <typename X> \
+ static char test(int, typename X::TNAME*); \
+ \
+ template <typename X> \
+ static int test(...); \
+ \
+ struct DefaultWrap \
+ { typedef typename DefaultType::type TNAME; }; \
+ \
+ static const bool value = (1 == sizeof(test<T>(0, 0))); \
+ \
+ typedef typename \
+ ::boost::intrusive::detail::eval_if_c \
+ < value \
+ , ::boost::intrusive::detail::identity<T> \
+ , ::boost::intrusive::detail::identity<DefaultWrap> \
+ >::type::TNAME type; \
+ }; \
+//
+
+#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
+ typename INSTANTIATION_NS_PREFIX \
+ boost_intrusive_eval_default_type_ ## TNAME< T, TIMPL >::type \
+//
+
+#define BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(TRAITS_PREFIX, TYPEDEF_TO_FIND) \
+template <class T>\
+struct TRAITS_PREFIX##_bool\
+{\
+ 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::TYPEDEF_TO_FIND> test (int);\
+ static const std::size_t value = sizeof(test<T>(0));\
+};\
+\
+template <class T>\
+struct TRAITS_PREFIX##_bool_is_true\
+{\
+ static const bool value = TRAITS_PREFIX##_bool<T>::value > sizeof(yes_type)*2;\
+};\
+//
+
+#define BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(TRAITS_NAME, FUNC_NAME) \
+ template <typename U, typename Signature> \
+ class TRAITS_NAME \
+ { \
+ private: \
+ template<Signature> struct helper;\
+ template<typename T> \
+ static ::boost::intrusive::detail::yes_type test(helper<&T::FUNC_NAME>*); \
+ template<typename T> static ::boost::intrusive::detail::no_type test(...); \
+ public: \
+ static const bool value = sizeof(test<U>(0)) == sizeof(::boost::intrusive::detail::yes_type); \
+ }; \
+//
+
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED(TRAITS_NAME, FUNC_NAME) \
+template <typename Type> \
+struct TRAITS_NAME \
+{ \
+ struct BaseMixin \
+ { \
+ void FUNC_NAME(); \
+ }; \
+ struct Base : public Type, public BaseMixin { Base(); }; \
+ template <typename T, T t> class Helper{}; \
+ template <typename U> \
+ static ::boost::intrusive::detail::no_type test(U*, Helper<void (BaseMixin::*)(), &U::FUNC_NAME>* = 0); \
+ static ::boost::intrusive::detail::yes_type test(...); \
+ static const bool value = sizeof(::boost::intrusive::detail::yes_type) == sizeof(test((Base*)(0))); \
+};\
+//
+
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(TRAITS_NAME, FUNC_NAME) \
+BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED(TRAITS_NAME##_ignore_signature, FUNC_NAME) \
+\
+template <typename Type, class> \
+struct TRAITS_NAME \
+ : public TRAITS_NAME##_ignore_signature<Type> \
+{};\
+//
+
+} //namespace detail
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //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.70.0/boost/intrusive/detail/node_cloner_disposer.hpp
index 8ed3c4dab2e..8ed3c4dab2e 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/node_cloner_disposer.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/node_cloner_disposer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/node_holder.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/node_holder.hpp
index b8dabef2dfa..b8dabef2dfa 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/node_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/node_holder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/node_to_value.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/node_to_value.hpp
index 218e78e4e0e..218e78e4e0e 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/node_to_value.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/node_to_value.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/parent_from_member.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/parent_from_member.hpp
index 275229ab474..275229ab474 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/parent_from_member.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/detail/rbtree_node.hpp
index 8b573ecc212..8b573ecc212 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/rbtree_node.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/rbtree_node.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/reverse_iterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/reverse_iterator.hpp
index 57631feb5d4..57631feb5d4 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/reverse_iterator.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/detail/simple_disposers.hpp
index f9d23bf62ed..f9d23bf62ed 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/simple_disposers.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/simple_disposers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/size_holder.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/size_holder.hpp
index bd14dc50499..bd14dc50499 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/size_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/size_holder.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/slist_iterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/slist_iterator.hpp
new file mode 100644
index 00000000000..9e72af9f39d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/slist_iterator.hpp
@@ -0,0 +1,137 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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;
+ class nat;
+ typedef typename
+ detail::if_c< IsConst
+ , slist_iterator<value_traits, false>
+ , nat>::type nonconst_iterator;
+
+ 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(const slist_iterator &other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator(const nonconst_iterator &other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const slist_iterator &other)
+ { members_.nodeptr_ = other.members_.nodeptr_; return *this; }
+
+ 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.70.0/boost/intrusive/detail/slist_node.hpp
index ee8ab40a3da..ee8ab40a3da 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_node.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/slist_node.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/std_fwd.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/std_fwd.hpp
index 8193ea8ed1f..8193ea8ed1f 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/std_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/std_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/transform_iterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/transform_iterator.hpp
index 0a715754d71..0a715754d71 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/transform_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/transform_iterator.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/tree_iterator.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/tree_iterator.hpp
new file mode 100644
index 00000000000..41988cf1803
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/tree_iterator.hpp
@@ -0,0 +1,184 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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;
+ class nat;
+ typedef typename
+ detail::if_c< IsConst
+ , tree_iterator<value_traits, false>
+ , nat>::type nonconst_iterator;
+
+ 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(const tree_iterator &other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator(const nonconst_iterator &other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const tree_iterator &other)
+ { members_.nodeptr_ = other.members_.nodeptr_; return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const node_ptr &nodeptr)
+ { members_.nodeptr_ = nodeptr; return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
+ { return members_.nodeptr_; }
+
+ public:
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& operator++()
+ {
+ members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
+ return *this;
+ }
+
+ tree_iterator operator++(int)
+ {
+ tree_iterator result (*this);
+ members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
+ return result;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& operator--()
+ {
+ members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
+ return *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 *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_right()
+ {
+ members_.nodeptr_ = node_traits::get_right(members_.nodeptr_);
+ return *this;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_parent()
+ {
+ members_.nodeptr_ = node_traits::get_parent(members_.nodeptr_);
+ return *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.70.0/boost/intrusive/detail/tree_node.hpp
index 6df3343e03f..6df3343e03f 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_node.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/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.70.0/boost/intrusive/detail/tree_value_compare.hpp
index c78da0acd6c..c78da0acd6c 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_value_compare.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/tree_value_compare.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/uncast.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/uncast.hpp
index 7db97b74571..7db97b74571 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/detail/uncast.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/uncast.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/detail/workaround.hpp b/src/third_party/boost-1.70.0/boost/intrusive/detail/workaround.hpp
new file mode 100644
index 00000000000..a9e157077a0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/detail/workaround.hpp
@@ -0,0 +1,53 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
+#define BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#ifndef BOOST_CONFIG_HPP
+#include <boost/config.hpp>
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ #define BOOST_INTRUSIVE_PERFECT_FORWARDING
+#endif
+
+//Macros for documentation purposes. For code, expands to the argument
+#define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
+#define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
+#define BOOST_INTRUSIVE_DOC1ST(TYPE1, TYPE2) TYPE2
+#define BOOST_INTRUSIVE_I ,
+#define BOOST_INTRUSIVE_DOCIGN(T1) T1
+
+//#define BOOST_INTRUSIVE_DISABLE_FORCEINLINE
+
+#if defined(BOOST_INTRUSIVE_DISABLE_FORCEINLINE)
+ #define BOOST_INTRUSIVE_FORCEINLINE inline
+#elif defined(BOOST_INTRUSIVE_FORCEINLINE_IS_BOOST_FORCELINE)
+ #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
+#elif defined(BOOST_MSVC) && defined(_DEBUG)
+ //"__forceinline" and MSVC seems to have some bugs in debug mode
+ #define BOOST_INTRUSIVE_FORCEINLINE inline
+#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
+ //Older GCCs have problems with forceinline
+ #define BOOST_INTRUSIVE_FORCEINLINE inline
+#else
+ #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
+#endif
+
+#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/hashtable.hpp b/src/third_party/boost-1.70.0/boost/intrusive/hashtable.hpp
new file mode 100644
index 00000000000..1fada98f898
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/hashtable.hpp
@@ -0,0 +1,3664 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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 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 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 get_slist_impl
+ <typename 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 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 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 get_slist_impl
+ <typename 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 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
+template < class T
+ , bool UniqueKeys
+ , class PackedOptions
+ >
+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 get_slist_impl
+ <typename 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
+ , 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.70.0/boost/intrusive/intrusive_fwd.hpp b/src/third_party/boost-1.70.0/boost/intrusive/intrusive_fwd.hpp
new file mode 100644
index 00000000000..37cdb6613e0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/intrusive_fwd.hpp
@@ -0,0 +1,766 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_FWD_HPP
+#define BOOST_INTRUSIVE_FWD_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#ifndef BOOST_CSTDINT_HPP
+# include <boost/cstdint.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+//! \file
+//! This header file forward declares most Intrusive classes.
+//!
+//! It forward declares the following containers and hooks:
+//! - boost::intrusive::slist / boost::intrusive::slist_base_hook / boost::intrusive::slist_member_hook
+//! - boost::intrusive::list / boost::intrusive::list_base_hook / boost::intrusive::list_member_hook
+//! - boost::intrusive::bstree / boost::intrusive::bs_set / boost::intrusive::bs_multiset /
+//! boost::intrusive::bs_set_base_hook / boost::intrusive::bs_set_member_hook
+//! - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
+//! boost::intrusive::set_base_hook / boost::intrusive::set_member_hook
+//! - boost::intrusive::avltree / boost::intrusive::avl_set / boost::intrusive::avl_multiset /
+//! boost::intrusive::avl_set_base_hook / boost::intrusive::avl_set_member_hook
+//! - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
+//! - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
+//! - boost::intrusive::treap / boost::intrusive::treap_set / boost::intrusive::treap_multiset
+//! - boost::intrusive::hashtable / boost::intrusive::unordered_set / boost::intrusive::unordered_multiset /
+//! boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
+//! - boost::intrusive::any_base_hook / boost::intrusive::any_member_hook
+//!
+//! It forward declares the following container or hook options:
+//! - boost::intrusive::constant_time_size / boost::intrusive::size_type / boost::intrusive::compare / boost::intrusive::equal
+//! - boost::intrusive::floating_point / boost::intrusive::priority / boost::intrusive::hash
+//! - boost::intrusive::value_traits / boost::intrusive::member_hook / boost::intrusive::function_hook / boost::intrusive::base_hook
+//! - boost::intrusive::void_pointer / boost::intrusive::tag / boost::intrusive::link_mode
+//! - boost::intrusive::optimize_size / boost::intrusive::linear / boost::intrusive::cache_last
+//! - boost::intrusive::bucket_traits / boost::intrusive::store_hash / boost::intrusive::optimize_multikey
+//! - boost::intrusive::power_2_buckets / boost::intrusive::cache_begin / boost::intrusive::compare_hash / boost::intrusive::incremental
+//!
+//! It forward declares the following value traits utilities:
+//! - boost::intrusive::value_traits / boost::intrusive::derivation_value_traits /
+//! boost::intrusive::trivial_value_traits
+//!
+//! Finally it forward declares the following general purpose utilities:
+//! - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+#include <cstddef>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+
+namespace boost {
+namespace intrusive {
+
+#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+# ifdef BOOST_HAS_INTPTR_T
+ using ::boost::uintptr_t;
+# else
+ typedef std::size_t uintptr_t;
+# endif
+#endif
+
+////////////////////////////
+// Node algorithms
+////////////////////////////
+
+//Algorithms predeclarations
+template<class NodeTraits>
+class circular_list_algorithms;
+
+template<class NodeTraits>
+class circular_slist_algorithms;
+
+template<class NodeTraits>
+class linear_slist_algorithms;
+
+template<class NodeTraits>
+class bstree_algorithms;
+
+template<class NodeTraits>
+class rbtree_algorithms;
+
+template<class NodeTraits>
+class avltree_algorithms;
+
+template<class NodeTraits>
+class sgtree_algorithms;
+
+template<class NodeTraits>
+class splaytree_algorithms;
+
+template<class NodeTraits>
+class treap_algorithms;
+
+////////////////////////////
+// Containers
+////////////////////////////
+
+//slist
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class slist;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class slist_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class slist_member_hook;
+
+//list
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class list;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class list_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class list_member_hook;
+
+//rbtree/set/multiset
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class rbtree;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class multiset;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class ...Options>
+#endif
+class set_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class ...Options>
+#endif
+class set_member_hook;
+
+//splaytree/splay_set/splay_multiset
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class splaytree;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class splay_set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class splay_multiset;
+
+//avltree/avl_set/avl_multiset
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class avltree;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class avl_set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class avl_multiset;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class ...Options>
+#endif
+class avl_set_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class ...Options>
+#endif
+class avl_set_member_hook;
+
+
+//treap/treap_set/treap_multiset
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ , class O7 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class treap;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ , class O7 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class treap_set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ , class O7 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class treap_multiset;
+
+//sgtree/sg_set/sg_multiset
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class sgtree;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class sg_set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class sg_multiset;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class bstree;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class bs_set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class T
+ , class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ , class O5 = void
+ , class O6 = void
+ >
+#else
+template<class T, class ...Options>
+#endif
+class bs_multiset;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class bs_set_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class bs_set_member_hook;
+
+//hashtable/unordered_set/unordered_multiset
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+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
+ >
+#else
+template<class T, class ...Options>
+#endif
+class hashtable;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+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
+ >
+#else
+template<class T, class ...Options>
+#endif
+class unordered_set;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+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
+ >
+#else
+template<class T, class ...Options>
+#endif
+class unordered_multiset;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class ...Options>
+#endif
+class unordered_set_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ , class O4 = void
+ >
+#else
+template<class ...Options>
+#endif
+class unordered_set_member_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class any_base_hook;
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template
+ < class O1 = void
+ , class O2 = void
+ , class O3 = void
+ >
+#else
+template<class ...Options>
+#endif
+class any_member_hook;
+
+//Options
+
+template<bool Enabled>
+struct constant_time_size;
+
+template<typename SizeType>
+struct size_type;
+
+template<typename Compare>
+struct compare;
+
+template<bool Enabled>
+struct floating_point;
+
+template<typename Equal>
+struct equal;
+
+template<typename Priority>
+struct priority;
+
+template<typename Hash>
+struct hash;
+
+template<typename ValueTraits> struct value_traits;
+
+template< typename Parent
+ , typename MemberHook
+ , MemberHook Parent::* PtrToMember>
+struct member_hook;
+
+template<typename Functor>
+struct function_hook;
+
+template<typename BaseHook>
+struct base_hook;
+
+template<typename VoidPointer>
+struct void_pointer;
+
+template<typename Tag>
+struct tag;
+
+template<link_mode_type LinkType>
+struct link_mode;
+
+template<bool Enabled> struct
+optimize_size;
+
+template<bool Enabled>
+struct linear;
+
+template<bool Enabled>
+struct cache_last;
+
+template<typename BucketTraits>
+struct bucket_traits;
+
+template<bool Enabled>
+struct store_hash;
+
+template<bool Enabled>
+struct optimize_multikey;
+
+template<bool Enabled>
+struct power_2_buckets;
+
+template<bool Enabled>
+struct cache_begin;
+
+template<bool Enabled>
+struct compare_hash;
+
+template<bool Enabled>
+struct incremental;
+
+//Value traits
+
+template<typename ValueTraits>
+struct value_traits;
+
+template< typename Parent
+ , typename MemberHook
+ , MemberHook Parent::* PtrToMember>
+struct member_hook;
+
+template< typename Functor>
+struct function_hook;
+
+template<typename BaseHook>
+struct base_hook;
+
+template<class T, class NodeTraits, link_mode_type LinkMode = safe_link>
+struct derivation_value_traits;
+
+template<class NodeTraits, link_mode_type LinkMode = normal_link>
+struct trivial_value_traits;
+
+//Additional utilities
+
+template<typename VoidPointer, std::size_t Alignment>
+struct max_pointer_plus_bits;
+
+template<std::size_t Alignment>
+struct max_pointer_plus_bits<void *, Alignment>;
+
+template<typename Pointer, std::size_t NumBits>
+struct pointer_plus_bits;
+
+template<typename T, std::size_t NumBits>
+struct pointer_plus_bits<T *, NumBits>;
+
+template<typename Ptr>
+struct pointer_traits;
+
+template<typename T>
+struct pointer_traits<T *>;
+
+} //namespace intrusive {
+} //namespace boost {
+
+#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+#endif //#ifndef BOOST_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.70.0/boost/intrusive/linear_slist_algorithms.hpp
index 6aeb036ab52..6aeb036ab52 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/linear_slist_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/linear_slist_algorithms.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/link_mode.hpp b/src/third_party/boost-1.70.0/boost/intrusive/link_mode.hpp
index 4ba4daff7d7..4ba4daff7d7 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/link_mode.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/link_mode.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/list.hpp b/src/third_party/boost-1.70.0/boost/intrusive/list.hpp
new file mode 100644
index 00000000000..4313f124f5e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/list.hpp
@@ -0,0 +1,1516 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_LIST_HPP
+#define BOOST_INTRUSIVE_LIST_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/list_hook.hpp>
+#include <boost/intrusive/circular_list_algorithms.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/mpl.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/reverse_iterator.hpp>
+#include <boost/intrusive/detail/uncast.hpp>
+#include <boost/intrusive/detail/list_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, etc.
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+struct default_list_hook_applier
+{ template <class T> struct apply{ typedef typename T::default_list_hook type; }; };
+
+template<>
+struct is_default_hook_tag<default_list_hook_applier>
+{ static const bool value = true; };
+
+struct list_defaults
+{
+ typedef default_list_hook_applier proto_value_traits;
+ static const bool constant_time_size = true;
+ typedef std::size_t size_type;
+ typedef void header_holder_type;
+};
+
+/// @endcond
+
+//! The class template list is an intrusive container that mimics most of the
+//! interface of std::list as described in the C++ standard.
+//!
+//! 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<> and \c size_type<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template <class ValueTraits, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class list_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 list_iterator<value_traits, false> iterator;
+ typedef list_iterator<value_traits, true> const_iterator;
+ typedef boost::intrusive::reverse_iterator<iterator> reverse_iterator;
+ typedef boost::intrusive::reverse_iterator<const_iterator> const_reverse_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 circular_list_algorithms<node_traits> node_algorithms;
+ typedef typename detail::get_header_holder_type
+ < value_traits, HeaderHolder >::type header_holder_type;
+
+ static const bool constant_time_size = ConstantTimeSize;
+ static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
+ static const bool has_container_from_iterator =
+ detail::is_same< header_holder_type, detail::default_header_holder< node_traits > >::value;
+
+ /// @cond
+
+ private:
+ typedef detail::size_holder<constant_time_size, size_type> size_traits;
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(list_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)
+ ));
+
+ node_ptr get_root_node()
+ { return data_.root_plus_size_.m_header.get_node(); }
+
+ const_node_ptr get_root_node() const
+ { return data_.root_plus_size_.m_header.get_node(); }
+
+ struct root_plus_size : public size_traits
+ {
+ header_holder_type m_header;
+ };
+
+ struct data_t : public value_traits
+ {
+ typedef typename list_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:
+
+ //! <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).
+ list_impl()
+ : data_(value_traits())
+ {
+ this->priv_size_traits().set_size(size_type(0));
+ node_algorithms::init_header(this->get_root_node());
+ }
+
+ //! <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 list_impl(const value_traits &v_traits)
+ : data_(v_traits)
+ {
+ this->priv_size_traits().set_size(size_type(0));
+ node_algorithms::init_header(this->get_root_node());
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
+ //!
+ //! <b>Effects</b>: Constructs a list equal to the range [first,last).
+ //!
+ //! <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>
+ list_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
+ : data_(v_traits)
+ {
+ //nothrow, no need to rollback to release elements on exception
+ this->priv_size_traits().set_size(size_type(0));
+ node_algorithms::init_header(this->get_root_node());
+ //nothrow, no need to rollback to release elements on exception
+ this->insert(this->cend(), 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.
+ list_impl(BOOST_RV_REF(list_impl) x)
+ : data_(::boost::move(x.priv_value_traits()))
+ {
+ this->priv_size_traits().set_size(size_type(0));
+ node_algorithms::init_header(this->get_root_node());
+ //nothrow, no need to rollback to release elements on exception
+ this->swap(x);
+ }
+
+ //! <b>Effects</b>: Equivalent to swap
+ //!
+ list_impl& operator=(BOOST_RV_REF(list_impl) x)
+ { this->swap(x); return *this; }
+
+ //! <b>Effects</b>: If it's not a safe-mode or an auto-unlink value_type
+ //! 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 ValueTraits 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.
+ ~list_impl()
+ {
+ if(is_safe_autounlink<ValueTraits::link_mode>::value){
+ this->clear();
+ node_algorithms::init(this->get_root_node());
+ }
+ }
+
+ //! <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.
+ void push_back(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));
+ node_algorithms::link_before(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 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));
+ node_algorithms::link_before(node_traits::get_next(this->get_root_node()), to_insert);
+ this->priv_size_traits().increment();
+ }
+
+ //! <b>Effects</b>: Erases the last 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_back()
+ { return this->pop_back_and_dispose(detail::null_disposer()); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the last element of the list.
+ //! No destructors are called.
+ //! 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_back_and_dispose(Disposer disposer)
+ {
+ node_ptr to_erase = node_traits::get_previous(this->get_root_node());
+ node_algorithms::unlink(to_erase);
+ this->priv_size_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ }
+
+ //! <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.
+ //! No destructors are called.
+ //! 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(to_erase);
+ this->priv_size_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ }
+
+ //! <b>Effects</b>: Returns a reference to the first element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front()
+ { return *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 *priv_value_traits().to_value_ptr(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.
+ reference back()
+ { return *priv_value_traits().to_value_ptr(node_traits::get_previous(this->get_root_node())); }
+
+ //! <b>Effects</b>: Returns a const_reference to the last element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference back() const
+ { return *priv_value_traits().to_value_ptr(detail::uncast(node_traits::get_previous(this->get_root_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 this->cbegin(); }
+
+ //! <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_root_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 this->cend(); }
+
+ //! <b>Effects</b>: Returns a constant iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const
+ { return const_iterator(detail::uncast(this->get_root_node()), this->priv_value_traits_ptr()); }
+
+ //! <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()
+ { return reverse_iterator(this->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
+ { return this->crbegin(); }
+
+ //! <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
+ { return const_reverse_iterator(end()); }
+
+ //! <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()
+ { 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
+ { return this->crend(); }
+
+ //! <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
+ { return const_reverse_iterator(this->begin()); }
+
+ //! <b>Precondition</b>: end_iterator must be a valid end iterator
+ //! of list.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the list associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static list_impl &container_from_end_iterator(iterator end_iterator)
+ { return list_impl::priv_container_from_end_iterator(end_iterator); }
+
+ //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
+ //! of list.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the list associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static const list_impl &container_from_end_iterator(const_iterator end_iterator)
+ { return list_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 option is disabled. 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>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ void swap(list_impl& other)
+ {
+ node_algorithms::swap_nodes(this->get_root_node(), other.get_root_node());
+ 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 shifts.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ void shift_backwards(size_type n = 1)
+ { node_algorithms::move_forward(this->get_root_node(), n); }
+
+ //! <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 shifts.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ void shift_forward(size_type n = 1)
+ { node_algorithms::move_backwards(this->get_root_node(), n); }
+
+ //! <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>: Constant.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase(const_iterator i)
+ { return this->erase_and_dispose(i, detail::null_disposer()); }
+
+ //! <b>Requires</b>: b and e must be valid iterators to elements in *this.
+ //!
+ //! <b>Effects</b>: Erases the element 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 number of erased elements if it's a safe-mode
+ //! or auto-unlink value, or constant-time size is enabled. Constant-time otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased elements.
+ iterator erase(const_iterator b, const_iterator e)
+ {
+ if(safemode_or_autounlink || constant_time_size){
+ return this->erase_and_dispose(b, e, detail::null_disposer());
+ }
+ else{
+ node_algorithms::unlink(b.pointed_node(), e.pointed_node());
+ return e.unconst();
+ }
+ }
+
+ //! <b>Requires</b>: b and e must be valid iterators to elements in *this.
+ //! n must be distance(b, e).
+ //!
+ //! <b>Effects</b>: Erases the element 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 number of erased elements if it's a safe-mode
+ //! or auto-unlink value is enabled. Constant-time otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased elements.
+ iterator erase(const_iterator b, const_iterator e, size_type n)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(b.pointed_node(), e.pointed_node()) == n);
+ if(safemode_or_autounlink || constant_time_size){
+ return this->erase_and_dispose(b, e, detail::null_disposer());
+ }
+ else{
+ if(constant_time_size){
+ this->priv_size_traits().decrease(n);
+ }
+ node_algorithms::unlink(b.pointed_node(), e.pointed_node());
+ return e.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>: Constant.
+ //!
+ //! <b>Note</b>: Invalidates the iterators to the erased element.
+ template <class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer)
+ {
+ node_ptr to_erase(i.pointed_node());
+ ++i;
+ node_algorithms::unlink(to_erase);
+ this->priv_size_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(this->priv_value_traits().to_value_ptr(to_erase));
+ return i.unconst();
+ }
+
+ #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>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the element 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 elements erased.
+ //!
+ //! <b>Note</b>: Invalidates the iterators to the erased elements.
+ template <class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
+ {
+ node_ptr bp(b.pointed_node()), ep(e.pointed_node());
+ node_algorithms::unlink(bp, ep);
+ while(bp != ep){
+ node_ptr to_erase(bp);
+ bp = node_traits::get_next(bp);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ this->priv_size_traits().decrement();
+ }
+ return e.unconst();
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the container.
+ //! No destructors are called.
+ //!
+ //! <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{
+ node_algorithms::init_header(this->get_root_node());
+ this->priv_size_traits().set_size(size_type(0));
+ }
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases all the elements of the container.
+ //! No destructors are called.
+ //! 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));
+ }
+ node_algorithms::init_header(this->get_root_node());
+ this->priv_size_traits().set_size(0);
+ }
+
+ //! <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. Basic guarantee.
+ template <class Cloner, class Disposer>
+ void clone_from(const list_impl &src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ detail::exception_disposer<list_impl, Disposer>
+ rollback(*this, disposer);
+ const_iterator b(src.begin()), e(src.end());
+ for(; b != e; ++b){
+ this->push_back(*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. Basic guarantee.
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(list_impl) src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ detail::exception_disposer<list_impl, Disposer>
+ rollback(*this, disposer);
+ iterator b(src.begin()), e(src.end());
+ for(; b != e; ++b){
+ this->push_back(*cloner(*b));
+ }
+ rollback.release();
+ }
+
+ //! <b>Requires</b>: value must be an lvalue and p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts the value before the position pointed by p.
+ //!
+ //! <b>Returns</b>: An iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time. No copy constructors are called.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ iterator insert(const_iterator p, reference value)
+ {
+ node_ptr to_insert = this->priv_value_traits().to_node_ptr(value);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
+ node_algorithms::link_before(p.pointed_node(), to_insert);
+ this->priv_size_traits().increment();
+ return iterator(to_insert, this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield
+ //! an lvalue of type value_type and p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts the range 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.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ template<class Iterator>
+ void insert(const_iterator p, Iterator b, Iterator e)
+ {
+ for (; b != e; ++b)
+ this->insert(p, *b);
+ }
+
+ //! <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(this->cend(), 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(this->cend(), b, e);
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <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_impl& x)
+ {
+ if(!x.empty()){
+ node_algorithms::transfer
+ (p.pointed_node(), x.begin().pointed_node(), x.end().pointed_node());
+ size_traits &thist = this->priv_size_traits();
+ size_traits &xt = x.priv_size_traits();
+ thist.increase(xt.get_size());
+ xt.set_size(size_type(0));
+ }
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //! new_ele must point to an element contained in list x.
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by new_ele, from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //! If p == new_ele or p == ++new_ele, 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_impl&x, const_iterator new_ele)
+ {
+ node_algorithms::transfer(p.pointed_node(), new_ele.pointed_node());
+ x.priv_size_traits().decrement();
+ this->priv_size_traits().increment();
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //! f and e must point to elements contained in list x.
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by f and e 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
+ //! if constant-time size option is enabled. 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(const_iterator p, list_impl&x, const_iterator f, const_iterator e)
+ {
+ if(constant_time_size)
+ this->splice(p, x, f, e, node_algorithms::distance(f.pointed_node(), e.pointed_node()));
+ else
+ this->splice(p, x, f, e, 1);//intrusive::iterator_distance is a dummy value
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //! f and e must point to elements contained in list x.
+ //! n == distance(f, e)
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by f and e 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.
+ void splice(const_iterator p, list_impl&x, const_iterator f, const_iterator e, size_type n)
+ {
+ if(n){
+ if(constant_time_size){
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(n == node_algorithms::distance(f.pointed_node(), e.pointed_node()));
+ node_algorithms::transfer(p.pointed_node(), f.pointed_node(), e.pointed_node());
+ size_traits &thist = this->priv_size_traits();
+ size_traits &xt = x.priv_size_traits();
+ thist.increase(n);
+ xt.decrease(n);
+ }
+ else{
+ node_algorithms::transfer(p.pointed_node(), f.pointed_node(), e.pointed_node());
+ }
+ }
+ }
+
+ //! <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 std::less<value_type> throws. Basic guarantee.
+ //!
+ //! <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(std::less<value_type>()); }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak ordering
+ //!
+ //! <b>Effects</b>: This function sorts the list *this according to p. 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>Notes</b>: This won't throw if list_base_hook<> or
+ //! list_member_hook are used.
+ //! 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 Predicate>
+ void sort(Predicate p)
+ {
+ if(node_traits::get_next(this->get_root_node())
+ != node_traits::get_previous(this->get_root_node())){
+ list_impl carry(this->priv_value_traits());
+ detail::array_initializer<list_impl, 64> counter(this->priv_value_traits());
+ int fill = 0;
+ while(!this->empty()){
+ carry.splice(carry.cbegin(), *this, this->cbegin());
+ int i = 0;
+ while(i < fill && !counter[i].empty()) {
+ counter[i].merge(carry, p);
+ carry.swap(counter[i++]);
+ }
+ carry.swap(counter[i]);
+ if(i == fill)
+ ++fill;
+ }
+ for (int i = 1; i < fill; ++i)
+ counter[i].merge(counter[i-1], p);
+ this->swap(counter[fill-1]);
+ }
+ }
+
+ //! <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(list_impl& x)
+ { this->merge(x, 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>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.
+ template<class Predicate>
+ void merge(list_impl& x, Predicate p)
+ {
+ const_iterator e(this->cend()), ex(x.cend());
+ const_iterator b(this->cbegin());
+ while(!x.empty()){
+ const_iterator ix(x.cbegin());
+ while (b != e && !p(*ix, *b)){
+ ++b;
+ }
+ if(b == e){
+ //Now transfer the rest to the end of the container
+ this->splice(e, x);
+ break;
+ }
+ else{
+ size_type n(0);
+ do{
+ ++ix; ++n;
+ } while(ix != ex && p(*ix, *b));
+ this->splice(b, x, x.begin(), ix, n);
+ }
+ }
+ }
+
+ //! <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()
+ { node_algorithms::reverse(this->get_root_node()); }
+
+ //! <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.
+ 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 root_node = this->get_root_node();
+ typename node_algorithms::stable_partition_info info;
+ node_algorithms::stable_partition
+ (node_traits::get_next(root_node), root_node, detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
+ //Invariants preserved by stable_partition so erase can be safely called
+ //The first element might have changed so calculate it again
+ this->erase( const_iterator(node_traits::get_next(root_node), 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 root_node = this->get_root_node();
+ typename node_algorithms::stable_partition_info info;
+ node_algorithms::stable_partition
+ (node_traits::get_next(root_node), root_node, detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
+ //Invariants preserved by stable_partition so erase can be safely called
+ //The first element might have changed so calculate it again
+ this->erase_and_dispose( const_iterator(node_traits::get_next(root_node), 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 pred 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 are equal 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_and_dispose(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 pred 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 itend(this->cend());
+ const_iterator cur(this->cbegin());
+
+ if(cur != itend){
+ const_iterator after(cur);
+ ++after;
+ while(after != itend){
+ if(pred(*cur, *after)){
+ after = this->erase_and_dispose(after, disposer);
+ }
+ else{
+ cur = after;
+ ++after;
+ }
+ }
+ }
+ }
+
+ //! <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));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(value)));
+ 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));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(r)));
+ 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(!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(!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>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 and prev are never null
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_next(header_ptr));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_previous(header_ptr));
+ // header's next and prev either both point to header (empty list) or neither does
+ BOOST_INTRUSIVE_INVARIANT_ASSERT((node_traits::get_next(header_ptr) == header_ptr)
+ == (node_traits::get_previous(header_ptr) == 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);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(next_p);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_previous(next_p) == p);
+ p = next_p;
+ if (p == header_ptr) break;
+ ++node_count;
+ }
+ if (constant_time_size)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == node_count);
+ }
+
+ friend bool operator==(const list_impl &x, const list_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 list_impl &x, const list_impl &y)
+ { return !(x == y); }
+
+ friend bool operator<(const list_impl &x, const list_impl &y)
+ { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ friend bool operator>(const list_impl &x, const list_impl &y)
+ { return y < x; }
+
+ friend bool operator<=(const list_impl &x, const list_impl &y)
+ { return !(y < x); }
+
+ friend bool operator>=(const list_impl &x, const list_impl &y)
+ { return !(x < y); }
+
+ friend void swap(list_impl &x, list_impl &y)
+ { x.swap(y); }
+
+ /// @cond
+
+ private:
+ static list_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
+ {
+ BOOST_STATIC_ASSERT((has_container_from_iterator));
+ node_ptr p = end_iterator.pointed_node();
+ header_holder_type* h = header_holder_type::get_holder(p);
+ root_plus_size* r = detail::parent_from_member
+ < root_plus_size, header_holder_type>(h, &root_plus_size::m_header);
+ data_t *d = detail::parent_from_member<data_t, root_plus_size>
+ ( r, &data_t::root_plus_size_);
+ list_impl *s = detail::parent_from_member<list_impl, data_t>(d, &list_impl::data_);
+ return *s;
+ }
+ /// @endcond
+};
+
+
+//! Helper metafunction to define a \c list 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>
+#endif
+struct make_list
+{
+ /// @cond
+ typedef typename pack_options
+ < list_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+ typedef list_impl
+ <
+ value_traits,
+ typename packed_options::size_type,
+ packed_options::constant_time_size,
+ 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>
+#else
+template<class T, class ...Options>
+#endif
+class list
+ : public make_list<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_list
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #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(list)
+
+ public:
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ BOOST_INTRUSIVE_FORCEINLINE list()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit list(const value_traits &v_traits)
+ : Base(v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE list(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
+ : Base(b, e, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE list(BOOST_RV_REF(list) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE list& operator=(BOOST_RV_REF(list) x)
+ { return static_cast<list &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const list &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(list) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static list &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<list &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const list &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const list &>(Base::container_from_end_iterator(end_iterator)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_LIST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/list_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/list_hook.hpp
index 892e4e20d7d..892e4e20d7d 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/list_hook.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/list_hook.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/member_value_traits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/member_value_traits.hpp
index 0ab7ffb1122..0ab7ffb1122 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/member_value_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/member_value_traits.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/options.hpp b/src/third_party/boost-1.70.0/boost/intrusive/options.hpp
new file mode 100644
index 00000000000..8bf9ca8a887
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/options.hpp
@@ -0,0 +1,264 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_OPTIONS_HPP
+#define BOOST_INTRUSIVE_OPTIONS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/pack_options.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+struct empty
+{};
+
+template<class Functor>
+struct fhtraits;
+
+template<class T, class Hook, Hook T::* P>
+struct mhtraits;
+
+struct dft_tag;
+struct member_tag;
+
+template<class SupposedValueTraits>
+struct is_default_hook_tag;
+
+#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+//!This option setter specifies if the intrusive
+//!container stores its size as a member to
+//!obtain constant-time size() member.
+BOOST_INTRUSIVE_OPTION_CONSTANT(constant_time_size, bool, Enabled, constant_time_size)
+
+//!This option setter specifies a container header holder type
+BOOST_INTRUSIVE_OPTION_TYPE(header_holder_type, HeaderHolder, HeaderHolder, header_holder_type)
+
+//!This option setter specifies the type that
+//!the container will use to store its size.
+BOOST_INTRUSIVE_OPTION_TYPE(size_type, SizeType, SizeType, size_type)
+
+//!This option setter specifies the strict weak ordering
+//!comparison functor for the value type
+BOOST_INTRUSIVE_OPTION_TYPE(compare, Compare, Compare, compare)
+
+//!This option setter specifies a function object
+//!that specifies the type of the key of an associative
+//!container and an operator to obtain it from a value type.
+//!
+//!This function object must the define a `type` member typedef and
+//!a member with signature `type [const&] operator()(const value_type &) const`
+//!that will return the key from a value_type of an associative container
+BOOST_INTRUSIVE_OPTION_TYPE(key_of_value, KeyOfValue, KeyOfValue, key_of_value)
+
+//!This option setter specifies a function object
+//!that specifies the type of the priority of a treap
+//!container and an operator to obtain it from a value type.
+//!
+//!This function object must the define a `type` member typedef and
+//!a member with signature `type [const&] operator()(const value_type &) const`
+//!that will return the priority from a value_type of a treap container
+BOOST_INTRUSIVE_OPTION_TYPE(priority_of_value, PrioOfValue, PrioOfValue, priority_of_value)
+
+//!This option setter for scapegoat containers specifies if
+//!the intrusive scapegoat container should use a non-variable
+//!alpha value that does not need floating-point operations.
+//!
+//!If activated, the fixed alpha value is 1/sqrt(2). This
+//!option also saves some space in the container since
+//!the alpha value and some additional data does not need
+//!to be stored in the container.
+//!
+//!If the user only needs an alpha value near 1/sqrt(2), this
+//!option also improves performance since avoids logarithm
+//!and division operations when rebalancing the tree.
+BOOST_INTRUSIVE_OPTION_CONSTANT(floating_point, bool, Enabled, floating_point)
+
+//!This option setter specifies the equality
+//!functor for the value type
+BOOST_INTRUSIVE_OPTION_TYPE(equal, Equal, Equal, equal)
+
+//!This option setter specifies the priority comparison
+//!functor for the value type
+BOOST_INTRUSIVE_OPTION_TYPE(priority, Priority, Priority, priority)
+
+//!This option setter specifies the hash
+//!functor for the value type
+BOOST_INTRUSIVE_OPTION_TYPE(hash, Hash, Hash, hash)
+
+//!This option setter specifies the relationship between the type
+//!to be managed by the container (the value type) and the node to be
+//!used in the node algorithms. It also specifies the linking policy.
+BOOST_INTRUSIVE_OPTION_TYPE(value_traits, ValueTraits, ValueTraits, proto_value_traits)
+
+//#define BOOST_INTRUSIVE_COMMA ,
+//#define BOOST_INTRUSIVE_LESS <
+//#define BOOST_INTRUSIVE_MORE >
+//BOOST_INTRUSIVE_OPTION_TYPE (member_hook, Parent BOOST_INTRUSIVE_COMMA class MemberHook BOOST_INTRUSIVE_COMMA MemberHook Parent::* PtrToMember , mhtraits BOOST_INTRUSIVE_LESS Parent BOOST_INTRUSIVE_COMMA MemberHook BOOST_INTRUSIVE_COMMA PtrToMember BOOST_INTRUSIVE_MORE , proto_value_traits)
+//template< class Parent , class MemberHook , MemberHook Parent::* PtrToMember>
+//struct member_hook {
+// template<class Base> struct pack : Base {
+// typedef mhtraits < Parent , MemberHook , PtrToMember > proto_value_traits;
+// };
+//};
+//
+//#undef BOOST_INTRUSIVE_COMMA
+//#undef BOOST_INTRUSIVE_LESS
+//#undef BOOST_INTRUSIVE_MORE
+
+//!This option setter specifies the member hook the
+//!container must use.
+template< typename Parent
+ , typename MemberHook
+ , MemberHook Parent::* PtrToMember>
+struct member_hook
+{
+// @cond
+// typedef typename MemberHook::hooktags::node_traits node_traits;
+// typedef typename node_traits::node node_type;
+// typedef node_type Parent::* Ptr2MemNode;
+// typedef mhtraits
+// < Parent
+// , node_traits
+// //This cast is really ugly but necessary to reduce template bloat.
+// //Since we control the layout between the hook and the node, and there is
+// //always single inheritance, the offset of the node is exactly the offset of
+// //the hook. Since the node type is shared between all member hooks, this saves
+// //quite a lot of symbol stuff.
+// , (Ptr2MemNode)PtrToMember
+// , MemberHook::hooktags::link_mode> member_value_traits;
+ typedef mhtraits <Parent, MemberHook, PtrToMember> member_value_traits;
+ template<class Base>
+ struct pack : Base
+ {
+ typedef member_value_traits proto_value_traits;
+ };
+/// @endcond
+};
+
+//!This option setter specifies the function object that will
+//!be used to convert between values to be inserted in a container
+//!and the hook to be used for that purpose.
+BOOST_INTRUSIVE_OPTION_TYPE(function_hook, Functor, fhtraits<Functor>, proto_value_traits)
+
+//!This option setter specifies that the container
+//!must use the specified base hook
+BOOST_INTRUSIVE_OPTION_TYPE(base_hook, BaseHook, BaseHook, proto_value_traits)
+
+//!This option setter specifies the type of
+//!a void pointer. This will instruct the hook
+//!to use this type of pointer instead of the
+//!default one
+BOOST_INTRUSIVE_OPTION_TYPE(void_pointer, VoidPointer, VoidPointer, void_pointer)
+
+//!This option setter specifies the type of
+//!the tag of a base hook. A type cannot have two
+//!base hooks of the same type, so a tag can be used
+//!to differentiate two base hooks with otherwise same type
+BOOST_INTRUSIVE_OPTION_TYPE(tag, Tag, Tag, tag)
+
+//!This option setter specifies the link mode
+//!(normal_link, safe_link or auto_unlink)
+BOOST_INTRUSIVE_OPTION_CONSTANT(link_mode, link_mode_type, LinkType, link_mode)
+
+//!This option setter specifies if the hook
+//!should be optimized for size instead of for speed.
+BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size)
+
+//!This option setter specifies if the slist container should
+//!use a linear implementation instead of a circular one.
+BOOST_INTRUSIVE_OPTION_CONSTANT(linear, bool, Enabled, linear)
+
+//!If true, slist also stores a pointer to the last element of the singly linked list.
+//!This allows O(1) swap and splice_after(iterator, slist &) for circular slists and makes
+//!possible new functions like push_back(reference) and back().
+BOOST_INTRUSIVE_OPTION_CONSTANT(cache_last, bool, Enabled, cache_last)
+
+//!This option setter specifies the bucket traits
+//!class for unordered associative containers. When this option is specified,
+//!instead of using the default bucket traits, a user defined holder will be defined
+BOOST_INTRUSIVE_OPTION_TYPE(bucket_traits, BucketTraits, BucketTraits, bucket_traits)
+
+//!This option setter specifies if the unordered hook
+//!should offer room to store the hash value.
+//!Storing the hash in the hook will speed up rehashing
+//!processes in applications where rehashing is frequent,
+//!rehashing might throw or the value is heavy to hash.
+BOOST_INTRUSIVE_OPTION_CONSTANT(store_hash, bool, Enabled, store_hash)
+
+//!This option setter specifies if the unordered hook
+//!should offer room to store another link to another node
+//!with the same key.
+//!Storing this link will speed up lookups and insertions on
+//!unordered_multiset containers with a great number of elements
+//!with the same key.
+BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_multikey, bool, Enabled, optimize_multikey)
+
+//!This option setter specifies if the bucket array will be always power of two.
+//!This allows using masks instead of the default modulo operation to determine
+//!the bucket number from the hash value, leading to better performance.
+//!In debug mode, if power of two buckets mode is activated, the bucket length
+//!will be checked with assertions.
+BOOST_INTRUSIVE_OPTION_CONSTANT(power_2_buckets, bool, Enabled, power_2_buckets)
+
+//!This option setter specifies if the container will cache a pointer to the first
+//!non-empty bucket so that begin() is always constant-time.
+//!This is specially helpful when we can have containers with a few elements
+//!but with big bucket arrays (that is, hashtables with low load factors).
+BOOST_INTRUSIVE_OPTION_CONSTANT(cache_begin, bool, Enabled, cache_begin)
+
+//!This option setter specifies if the container will compare the hash value
+//!before comparing objects. This option can't be specified if store_hash<>
+//!is not true.
+//!This is specially helpful when we have containers with a high load factor.
+//!and the comparison function is much more expensive that comparing already
+//!stored hash values.
+BOOST_INTRUSIVE_OPTION_CONSTANT(compare_hash, bool, Enabled, compare_hash)
+
+//!This option setter specifies if the hash container will use incremental
+//!hashing. With incremental hashing the cost of hash table expansion is spread
+//!out across each hash table insertion operation, as opposed to be incurred all at once.
+//!Therefore linear hashing is well suited for interactive applications or real-time
+//!appplications where the worst-case insertion time of non-incremental hash containers
+//!(rehashing the whole bucket array) is not admisible.
+BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, incremental)
+
+/// @cond
+
+struct hook_defaults
+{
+ typedef void* void_pointer;
+ static const link_mode_type link_mode = safe_link;
+ typedef dft_tag tag;
+ static const bool optimize_size = false;
+ static const bool store_hash = false;
+ static const bool linear = false;
+ static const bool optimize_multikey = false;
+};
+
+/// @endcond
+
+} //namespace intrusive {
+} //namespace boost {
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_INTRUSIVE_OPTIONS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/pack_options.hpp b/src/third_party/boost-1.70.0/boost/intrusive/pack_options.hpp
index 944243f661c..944243f661c 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/pack_options.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/pack_options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/parent_from_member.hpp b/src/third_party/boost-1.70.0/boost/intrusive/parent_from_member.hpp
index a9a9293c7ca..a9a9293c7ca 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/parent_from_member.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/parent_from_member.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/pointer_plus_bits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/pointer_plus_bits.hpp
index 2130f3c41c3..2130f3c41c3 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/pointer_plus_bits.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/pointer_plus_bits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/pointer_rebind.hpp b/src/third_party/boost-1.70.0/boost/intrusive/pointer_rebind.hpp
index 9592e06e1de..9592e06e1de 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/pointer_rebind.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/pointer_rebind.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/pointer_traits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/pointer_traits.hpp
new file mode 100644
index 00000000000..9e8d36496d4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/pointer_traits.hpp
@@ -0,0 +1,318 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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-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_POINTER_TRAITS_HPP
+#define BOOST_INTRUSIVE_POINTER_TRAITS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+#include <boost/move/detail/pointer_element.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <cstddef>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1310)
+BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_pointer_to, pointer_to)
+BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_dynamic_cast_from, dynamic_cast_from)
+BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_static_cast_from, static_cast_from)
+BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_const_cast_from, const_cast_from)
+#else
+BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_pointer_to, pointer_to)
+BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_dynamic_cast_from, dynamic_cast_from)
+BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_static_cast_from, static_cast_from)
+BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_const_cast_from, const_cast_from)
+#endif
+
+BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(element_type)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
+
+} //namespace detail {
+
+
+//! pointer_traits is the implementation of C++11 std::pointer_traits class with some
+//! extensions like castings.
+//!
+//! pointer_traits supplies a uniform interface to certain attributes of pointer-like types.
+//!
+//! <b>Note</b>: When defining a custom family of pointers or references to be used with BI
+//! library, make sure the public static conversion functions accessed through
+//! the `pointer_traits` interface (`*_cast_from` and `pointer_to`) can
+//! properly convert between const and nonconst referred member types
+//! <b>without the use of implicit constructor calls</b>. It is suggested these
+//! conversions be implemented as function templates, where the template
+//! argument is the type of the object being converted from.
+template <typename Ptr>
+struct pointer_traits
+{
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //!The pointer type
+ //!queried by this pointer_traits instantiation
+ typedef Ptr pointer;
+
+ //!Ptr::element_type if such a type exists; otherwise, T if Ptr is a class
+ //!template instantiation of the form SomePointer<T, Args>, where Args is zero or
+ //!more type arguments ; otherwise , the specialization is ill-formed.
+ typedef unspecified_type element_type;
+
+ //!Ptr::difference_type if such a type exists; otherwise,
+ //!std::ptrdiff_t.
+ typedef unspecified_type difference_type;
+
+ //!Ptr::rebind<U> if such a type exists; otherwise, SomePointer<U, Args> if Ptr is
+ //!a class template instantiation of the form SomePointer<T, Args>, where Args is zero or
+ //!more type arguments ; otherwise, the instantiation of rebind is ill-formed.
+ //!
+ //!For portable code for C++03 and C++11, <pre>typename rebind_pointer<U>::type</pre>
+ //!shall be used instead of rebind<U> to obtain a pointer to U.
+ template <class U> using rebind = unspecified;
+
+ //!Ptr::reference if such a type exists (non-standard extension); otherwise, element_type &
+ //!
+ typedef unspecified_type reference;
+ #else
+ typedef Ptr pointer;
+ //
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT
+ ( boost::intrusive::detail::, Ptr, element_type
+ , boost::movelib::detail::first_param<Ptr>) element_type;
+ //
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::intrusive::detail::, Ptr, difference_type, std::ptrdiff_t) difference_type;
+
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::intrusive::detail::, Ptr, reference, typename boost::intrusive::detail::unvoid_ref<element_type>::type) reference;
+ //
+ template <class U> struct rebind_pointer
+ {
+ typedef typename boost::intrusive::pointer_rebind<Ptr, U>::type type;
+ };
+
+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+ template <class U> using rebind = typename boost::intrusive::pointer_rebind<Ptr, U>::type;
+ #endif
+ #endif //#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ //! <b>Remark</b>: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise,
+ //! it is element_type &.
+ //!
+ //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(reference).
+ //! Non-standard extension: If such function does not exist, returns pointer(addressof(r));
+ //!
+ //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
+ //! <code>pointer_to</code> is checked.
+ BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r)
+ {
+ //Non-standard extension, it does not require Ptr::pointer_to. If not present
+ //tries to converts &r to pointer.
+ const bool value = boost::intrusive::detail::
+ has_member_function_callable_with_pointer_to
+ <Ptr, Ptr (*)(reference)>::value;
+ boost::intrusive::detail::bool_<value> flag;
+ return pointer_traits::priv_pointer_to(flag, r);
+ }
+
+ //! <b>Remark</b>: Non-standard extension.
+ //!
+ //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
+ //! Ptr::static_cast_from(UPpr/const UPpr &).
+ //! If such function does not exist, returns pointer_to(static_cast<element_type&>(*uptr))
+ //!
+ //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
+ //! <code>static_cast_from</code> is checked.
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(const UPtr &uptr)
+ {
+ typedef const UPtr &RefArg;
+ const bool value = boost::intrusive::detail::
+ has_member_function_callable_with_static_cast_from
+ <pointer, pointer(*)(RefArg)>::value
+ || boost::intrusive::detail::
+ has_member_function_callable_with_static_cast_from
+ <pointer, pointer(*)(UPtr)>::value;
+ return pointer_traits::priv_static_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
+ }
+
+ //! <b>Remark</b>: Non-standard extension.
+ //!
+ //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
+ //! Ptr::const_cast_from<UPtr>(UPpr/const UPpr &).
+ //! If such function does not exist, returns pointer_to(const_cast<element_type&>(*uptr))
+ //!
+ //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
+ //! <code>const_cast_from</code> is checked.
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(const UPtr &uptr)
+ {
+ typedef const UPtr &RefArg;
+ const bool value = boost::intrusive::detail::
+ has_member_function_callable_with_const_cast_from
+ <pointer, pointer(*)(RefArg)>::value
+ || boost::intrusive::detail::
+ has_member_function_callable_with_const_cast_from
+ <pointer, pointer(*)(UPtr)>::value;
+ return pointer_traits::priv_const_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
+ }
+
+ //! <b>Remark</b>: Non-standard extension.
+ //!
+ //! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
+ //! Ptr::dynamic_cast_from<UPtr>(UPpr/const UPpr &).
+ //! If such function does not exist, returns pointer_to(*dynamic_cast<element_type*>(&*uptr))
+ //!
+ //! <b>Note</b>: For non-conforming compilers only the existence of a member function called
+ //! <code>dynamic_cast_from</code> is checked.
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(const UPtr &uptr)
+ {
+ typedef const UPtr &RefArg;
+ const bool value = boost::intrusive::detail::
+ has_member_function_callable_with_dynamic_cast_from
+ <pointer, pointer(*)(RefArg)>::value
+ || boost::intrusive::detail::
+ has_member_function_callable_with_dynamic_cast_from
+ <pointer, pointer(*)(UPtr)>::value;
+ return pointer_traits::priv_dynamic_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
+ }
+
+ ///@cond
+ private:
+ //priv_to_raw_pointer
+ template <class T>
+ BOOST_INTRUSIVE_FORCEINLINE static T* to_raw_pointer(T* p)
+ { return p; }
+
+ template <class Pointer>
+ BOOST_INTRUSIVE_FORCEINLINE static typename pointer_traits<Pointer>::element_type*
+ to_raw_pointer(const Pointer &p)
+ { return pointer_traits::to_raw_pointer(p.operator->()); }
+
+ //priv_pointer_to
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_pointer_to(boost::intrusive::detail::true_, reference r)
+ { return Ptr::pointer_to(r); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_pointer_to(boost::intrusive::detail::false_, reference r)
+ { return pointer(boost::intrusive::detail::addressof(r)); }
+
+ //priv_static_cast_from
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_static_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
+ { return Ptr::static_cast_from(uptr); }
+
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_static_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
+ { return uptr ? pointer_to(*static_cast<element_type*>(to_raw_pointer(uptr))) : pointer(); }
+
+ //priv_const_cast_from
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_const_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
+ { return Ptr::const_cast_from(uptr); }
+
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_const_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
+ { return uptr ? pointer_to(const_cast<element_type&>(*uptr)) : pointer(); }
+
+ //priv_dynamic_cast_from
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_dynamic_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
+ { return Ptr::dynamic_cast_from(uptr); }
+
+ template<class UPtr>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer priv_dynamic_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
+ { return uptr ? pointer_to(dynamic_cast<element_type&>(*uptr)) : pointer(); }
+ ///@endcond
+};
+
+///@cond
+
+// Remove cv qualification from Ptr parameter to pointer_traits:
+template <typename Ptr>
+struct pointer_traits<const Ptr> : pointer_traits<Ptr> {};
+template <typename Ptr>
+struct pointer_traits<volatile Ptr> : pointer_traits<Ptr> { };
+template <typename Ptr>
+struct pointer_traits<const volatile Ptr> : pointer_traits<Ptr> { };
+// Remove reference from Ptr parameter to pointer_traits:
+template <typename Ptr>
+struct pointer_traits<Ptr&> : pointer_traits<Ptr> { };
+
+///@endcond
+
+//! Specialization of pointer_traits for raw pointers
+//!
+template <typename T>
+struct pointer_traits<T*>
+{
+ typedef T element_type;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ typedef T & reference;
+ //!typedef for <pre>U *</pre>
+ //!
+ //!For portable code for C++03 and C++11, <pre>typename rebind_pointer<U>::type</pre>
+ //!shall be used instead of rebind<U> to obtain a pointer to U.
+ template <class U> using rebind = U*;
+ #else
+ typedef typename boost::intrusive::detail::unvoid_ref<element_type>::type reference;
+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+ template <class U> using rebind = U*;
+ #endif
+ #endif
+
+ template <class U> struct rebind_pointer
+ { typedef U* type; };
+
+ //! <b>Returns</b>: addressof(r)
+ //!
+ BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r)
+ { return boost::intrusive::detail::addressof(r); }
+
+ //! <b>Returns</b>: static_cast<pointer>(uptr)
+ //!
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(U *uptr)
+ { return static_cast<pointer>(uptr); }
+
+ //! <b>Returns</b>: const_cast<pointer>(uptr)
+ //!
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(U *uptr)
+ { return const_cast<pointer>(uptr); }
+
+ //! <b>Returns</b>: dynamic_cast<pointer>(uptr)
+ //!
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(U *uptr)
+ { return dynamic_cast<pointer>(uptr); }
+};
+
+} //namespace container {
+} //namespace boost {
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif // ! defined(BOOST_INTRUSIVE_POINTER_TRAITS_HPP)
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/priority_compare.hpp b/src/third_party/boost-1.70.0/boost/intrusive/priority_compare.hpp
new file mode 100644
index 00000000000..3cf2b1c622a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/priority_compare.hpp
@@ -0,0 +1,82 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
+#define BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+template<class U>
+void priority_order();
+
+/// @endcond
+
+template <class T = void>
+struct priority_compare
+{
+ //Compatibility with std::binary_function
+ typedef T first_argument_type;
+ typedef T second_argument_type;
+ typedef bool result_type;
+
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &val, const T &val2) const
+ {
+ return priority_order(val, val2);
+ }
+};
+
+template <>
+struct priority_compare<void>
+{
+ template<class T, class U>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
+ {
+ return priority_order(t, u);
+ }
+};
+
+/// @cond
+
+template<class PrioComp, class T>
+struct get_prio_comp
+{
+ typedef PrioComp type;
+};
+
+
+template<class T>
+struct get_prio_comp<void, T>
+{
+ typedef ::boost::intrusive::priority_compare<T> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/rbtree.hpp b/src/third_party/boost-1.70.0/boost/intrusive/rbtree.hpp
new file mode 100644
index 00000000000..9d9b1169df6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/rbtree.hpp
@@ -0,0 +1,591 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_RBTREE_HPP
+#define BOOST_INTRUSIVE_RBTREE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <cstddef>
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+
+#include <boost/intrusive/set_hook.hpp>
+#include <boost/intrusive/detail/rbtree_node.hpp>
+#include <boost/intrusive/bstree.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/rbtree_algorithms.hpp>
+#include <boost/intrusive/link_mode.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 {
+
+/// @cond
+
+struct default_rbtree_hook_applier
+{ template <class T> struct apply{ typedef typename T::default_rbtree_hook type; }; };
+
+template<>
+struct is_default_hook_tag<default_rbtree_hook_applier>
+{ static const bool value = true; };
+
+struct rbtree_defaults
+ : bstree_defaults
+{
+ typedef default_rbtree_hook_applier proto_value_traits;
+};
+
+/// @endcond
+
+//! The class template rbtree is an intrusive red-black tree container, that
+//! is used to construct intrusive set and multiset containers. The no-throw
+//! guarantee holds only, if the key_compare object
+//! doesn't throw.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class rbtree_impl
+ /// @cond
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder>
+ /// @endcond
+{
+ public:
+ typedef ValueTraits value_traits;
+ /// @cond
+ typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
+ , ConstantTimeSize, RbTreeAlgorithms
+ , HeaderHolder> tree_type;
+ typedef tree_type implementation_defined;
+ /// @endcond
+
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ 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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_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;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+ /// @cond
+ private:
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(rbtree_impl)
+
+ /// @endcond
+
+ public:
+
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+
+ //! @copydoc ::boost::intrusive::bstree::bstree()
+ rbtree_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
+ explicit rbtree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ rbtree_impl( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(unique, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ rbtree_impl(BOOST_RV_REF(rbtree_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ rbtree_impl& operator=(BOOST_RV_REF(rbtree_impl) x)
+ { return static_cast<rbtree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~rbtree_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static rbtree_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const rbtree_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static rbtree_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const rbtree_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::bstree::swap
+ void swap(rbtree_impl& other);
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const rbtree_impl &src, Cloner cloner, Disposer disposer);
+
+ #else //BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(rbtree_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(rbtree_impl &&src, Cloner cloner, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
+ iterator insert_equal(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
+ iterator insert_equal(const_iterator hint, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert_equal(Iterator b, Iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
+ std::pair<iterator, bool> insert_unique(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
+ iterator insert_unique(const_iterator hint, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const key_type &key, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const key_type &key, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert_unique(Iterator b, Iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const key_type &key)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_unique(rbtree<T, Options2...> &);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_equal(rbtree<T, Options2...> &);
+
+ friend bool operator< (const rbtree_impl &x, const rbtree_impl &y);
+
+ friend bool operator==(const rbtree_impl &x, const rbtree_impl &y);
+
+ friend bool operator!= (const rbtree_impl &x, const rbtree_impl &y);
+
+ friend bool operator>(const rbtree_impl &x, const rbtree_impl &y);
+
+ friend bool operator<=(const rbtree_impl &x, const rbtree_impl &y);
+
+ friend bool operator>=(const rbtree_impl &x, const rbtree_impl &y);
+
+ friend void swap(rbtree_impl &x, rbtree_impl &y);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+
+//! Helper metafunction to define a \c rbtree 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_rbtree
+{
+ /// @cond
+ typedef typename pack_options
+ < rbtree_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 rbtree_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 rbtree
+ : public make_rbtree<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_rbtree
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(rbtree)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::reverse_iterator reverse_iterator;
+ typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+ //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 rbtree()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit rbtree( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE rbtree( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(unique, b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE rbtree(BOOST_RV_REF(rbtree) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE rbtree& operator=(BOOST_RV_REF(rbtree) x)
+ { return static_cast<rbtree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const rbtree &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(rbtree) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static rbtree &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<rbtree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const rbtree &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const rbtree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static rbtree &container_from_iterator(iterator it)
+ { return static_cast<rbtree &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const rbtree &container_from_iterator(const_iterator it)
+ { return static_cast<const rbtree &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_RBTREE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/rbtree_algorithms.hpp b/src/third_party/boost-1.70.0/boost/intrusive/rbtree_algorithms.hpp
new file mode 100644
index 00000000000..3f3bc25079b
--- /dev/null
+++ b/src/third_party/boost-1.70.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)
+ BOOST_INTRUSIVE_FORCEINLINE 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.70.0/boost/intrusive/set.hpp b/src/third_party/boost-1.70.0/boost/intrusive/set.hpp
new file mode 100644
index 00000000000..366931f54f3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/set.hpp
@@ -0,0 +1,1073 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_SET_HPP
+#define BOOST_INTRUSIVE_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/rbtree.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 {
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class multiset_impl;
+#endif
+
+//! The class template set is an intrusive container, that mimics most of
+//! the interface of std::set as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class set_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(set_impl)
+
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::rbtree::rbtree()
+ set_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::rbtree(const key_compare &,const value_traits &)
+ explicit set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::rbtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ set_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(true, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::rbtree(rbtree &&)
+ set_impl(BOOST_RV_REF(set_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::operator=(rbtree &&)
+ set_impl& operator=(BOOST_RV_REF(set_impl) x)
+ { return static_cast<set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::rbtree::~rbtree()
+ ~set_impl();
+
+ //! @copydoc ::boost::intrusive::rbtree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::rbtree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::rbtree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::rbtree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::rbtree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::rbtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
+ static set_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(const_iterator)
+ static const set_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(iterator)
+ static set_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(const_iterator)
+ static const set_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::rbtree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::swap
+ void swap(set_impl& other);
+
+ //! @copydoc ::boost::intrusive::rbtree::clone_from(const rbtree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::clone_from(rbtree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(set_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique(reference)
+ std::pair<iterator, bool> insert(reference value)
+ { return tree_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_unique(hint, value); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const key_type &key, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const key_type &key
+ ,insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_commit
+ iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return tree_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::rbtree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::rbtree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::count(const key_type &)const
+ size_type count(const key_type &key) const
+ { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
+
+ //! @copydoc ::boost::intrusive::rbtree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
+ { return this->tree_type::equal_range(key, comp); }
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return this->tree_type::equal_range(key, comp); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::rbtree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::rbtree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const set_impl<T, Options...> &x, const set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(set_impl<T, Options...> &x, set_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c 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>
+#endif
+struct make_set
+{
+ /// @cond
+ typedef typename pack_options
+ < rbtree_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 set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 set
+ : public make_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(set)
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 set()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit set( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE set( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE set(BOOST_RV_REF(set) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE set& operator=(BOOST_RV_REF(set) x)
+ { return static_cast<set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const 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(set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static set &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const set &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static set &container_from_iterator(iterator it)
+ { return static_cast<set &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const set &container_from_iterator(const_iterator it)
+ { return static_cast<const set &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+//! The class template multiset is an intrusive container, that mimics most of
+//! the interface of std::multiset as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class multiset_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, RbTreeAlgorithms, HeaderHolder> tree_type;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(multiset_impl)
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::rbtree::rbtree()
+ multiset_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::rbtree(const key_compare &,const value_traits &)
+ explicit multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::rbtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ multiset_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(false, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::rbtree(rbtree &&)
+ multiset_impl(BOOST_RV_REF(multiset_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::rbtree::operator=(rbtree &&)
+ multiset_impl& operator=(BOOST_RV_REF(multiset_impl) x)
+ { return static_cast<multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::rbtree::~rbtree()
+ ~multiset_impl();
+
+ //! @copydoc ::boost::intrusive::rbtree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::rbtree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::rbtree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::rbtree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::rbtree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::rbtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
+ static multiset_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(const_iterator)
+ static const multiset_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(iterator)
+ static multiset_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::rbtree::container_from_iterator(const_iterator)
+ static const multiset_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::rbtree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::swap
+ void swap(multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::rbtree::clone_from(const rbtree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::clone_from(rbtree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(multiset_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_equal(reference)
+ iterator insert(reference value)
+ { return tree_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_equal(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_equal(hint, value); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::rbtree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::rbtree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::rbtree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::rbtree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::rbtree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::rbtree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_equal
+ template<class ...Options2>
+ void merge(multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_equal
+ template<class ...Options2>
+ void merge(set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const multiset_impl<T, Options...> &x, const multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(multiset_impl<T, Options...> &x, multiset_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c 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>
+#endif
+struct make_multiset
+{
+ /// @cond
+ typedef typename pack_options
+ < rbtree_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 multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 multiset
+ : public make_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(multiset)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 multiset()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE multiset( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE multiset(BOOST_RV_REF(multiset) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x)
+ { return static_cast<multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const 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(multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static multiset &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const multiset &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static multiset &container_from_iterator(iterator it)
+ { return static_cast<multiset &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const multiset &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/set_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/set_hook.hpp
index e303b6442be..e303b6442be 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/set_hook.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/set_hook.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/sg_set.hpp b/src/third_party/boost-1.70.0/boost/intrusive/sg_set.hpp
new file mode 100644
index 00000000000..4144e14ba21
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/sg_set.hpp
@@ -0,0 +1,1094 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_SG_SET_HPP
+#define BOOST_INTRUSIVE_SG_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/sgtree.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/move/utility_core.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class sg_multiset_impl;
+#endif
+
+//! The class template sg_set is an intrusive container, that mimics most of
+//! the interface of std::sg_set as described in the C++ standard.
+//!
+//! 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 floating_point<>, \c size_type<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool FloatingPoint, typename HeaderHolder>
+#endif
+class sg_set_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_set_impl)
+
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::sgtree::sgtree()
+ sg_set_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::sgtree(const key_compare &,const value_traits &)
+ explicit sg_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::sgtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ sg_set_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(true, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::sgtree(sgtree &&)
+ sg_set_impl(BOOST_RV_REF(sg_set_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::operator=(sgtree &&)
+ sg_set_impl& operator=(BOOST_RV_REF(sg_set_impl) x)
+ { return static_cast<sg_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::sgtree::~sgtree()
+ ~sg_set_impl();
+
+ //! @copydoc ::boost::intrusive::sgtree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::sgtree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::sgtree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::sgtree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::sgtree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::sgtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
+ static sg_set_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
+ static const sg_set_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
+ static sg_set_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
+ static const sg_set_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::sgtree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::swap
+ void swap(sg_set_impl& other);
+
+ //! @copydoc ::boost::intrusive::sgtree::clone_from(const sgtree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const sg_set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::sgtree::clone_from(sgtree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(sg_set_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique(reference)
+ std::pair<iterator, bool> insert(reference value)
+ { return tree_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_unique(hint, value); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const key_type &key, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const key_type &key
+ ,insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_unique_commit
+ iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return tree_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::sgtree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
+ size_type count(const key_type &key) const
+ { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
+
+ //! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
+ { return this->tree_type::equal_range(key, comp); }
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return this->tree_type::equal_range(key, comp); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::sgtree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::sgtree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::rebalance
+ void rebalance();
+
+ //! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
+ iterator rebalance_subtree(iterator root);
+
+ //! @copydoc ::boost::intrusive::sgtree::balance_factor()
+ float balance_factor() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
+ void balance_factor(float new_alpha);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(sg_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(sg_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ template<class Compare2>
+ void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(sg_set_impl<T, Options...> &x, sg_set_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c sg_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>
+#endif
+struct make_sg_set
+{
+ /// @cond
+ typedef typename pack_options
+ < sgtree_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 sg_set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::floating_point
+ , 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 sg_set
+ : public make_sg_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_sg_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_set)
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 sg_set()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit sg_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE sg_set( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE sg_set(BOOST_RV_REF(sg_set) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE sg_set& operator=(BOOST_RV_REF(sg_set) x)
+ { return static_cast<sg_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const sg_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(sg_set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static sg_set &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<sg_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const sg_set &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const sg_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static sg_set &container_from_iterator(iterator it)
+ { return static_cast<sg_set &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const sg_set &container_from_iterator(const_iterator it)
+ { return static_cast<const sg_set &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+//! The class template sg_multiset is an intrusive container, that mimics most of
+//! the interface of std::sg_multiset as described in the C++ standard.
+//!
+//! 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 floating_point<>, \c size_type<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool FloatingPoint, typename HeaderHolder>
+#endif
+class sg_multiset_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder> tree_type;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_multiset_impl)
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::sgtree::sgtree()
+ sg_multiset_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::sgtree(const key_compare &,const value_traits &)
+ explicit sg_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::sgtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ sg_multiset_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(false, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::sgtree(sgtree &&)
+ sg_multiset_impl(BOOST_RV_REF(sg_multiset_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::sgtree::operator=(sgtree &&)
+ sg_multiset_impl& operator=(BOOST_RV_REF(sg_multiset_impl) x)
+ { return static_cast<sg_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::sgtree::~sgtree()
+ ~sg_multiset_impl();
+
+ //! @copydoc ::boost::intrusive::sgtree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::sgtree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::sgtree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::sgtree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::sgtree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::sgtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
+ static sg_multiset_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
+ static const sg_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
+ static sg_multiset_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
+ static const sg_multiset_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::sgtree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::swap
+ void swap(sg_multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::sgtree::clone_from(const sgtree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const sg_multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::sgtree::clone_from(sgtree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(sg_multiset_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_equal(reference)
+ iterator insert(reference value)
+ { return tree_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_equal(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_equal(hint, value); }
+
+ //! @copydoc ::boost::intrusive::sgtree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::sgtree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::sgtree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::sgtree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::sgtree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::sgtree::rebalance
+ void rebalance();
+
+ //! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
+ iterator rebalance_subtree(iterator root);
+
+ //! @copydoc ::boost::intrusive::sgtree::balance_factor()
+ float balance_factor() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
+ void balance_factor(float new_alpha);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(sg_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(sg_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(sg_multiset_impl<T, Options...> &x, sg_multiset_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c sg_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>
+#endif
+struct make_sg_multiset
+{
+ /// @cond
+ typedef typename pack_options
+ < sgtree_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 sg_multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::floating_point
+ , 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 sg_multiset
+ : public make_sg_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_sg_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_multiset)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 sg_multiset()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit sg_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE sg_multiset( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE sg_multiset(BOOST_RV_REF(sg_multiset) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE sg_multiset& operator=(BOOST_RV_REF(sg_multiset) x)
+ { return static_cast<sg_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const sg_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(sg_multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static sg_multiset &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const sg_multiset &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static sg_multiset &container_from_iterator(iterator it)
+ { return static_cast<sg_multiset &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const sg_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const sg_multiset &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SG_SET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/sgtree.hpp b/src/third_party/boost-1.70.0/boost/intrusive/sgtree.hpp
new file mode 100644
index 00000000000..89a97a147cb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/sgtree.hpp
@@ -0,0 +1,1081 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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 option that yields to non-floating point 1/sqrt(2) alpha is taken
+// from the scapegoat tree implementation of the PSPP library.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_SGTREE_HPP
+#define BOOST_INTRUSIVE_SGTREE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/intrusive/bs_set_hook.hpp>
+#include <boost/intrusive/bstree.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/math.hpp>
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/sgtree_algorithms.hpp>
+#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
+#include <boost/intrusive/link_mode.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/adl_move_swap.hpp>
+
+#include <cstddef>
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+#include <cmath>
+#include <cstddef>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+namespace detail{
+
+/////////////////////////////////////////////////////////////
+//
+// Halpha for fixed floating_point<false> option
+//
+/////////////////////////////////////////////////////////////
+
+//! Returns floor(log2(n)/log2(sqrt(2))) -> floor(2*log2(n))
+//! Undefined if N is 0.
+//!
+//! This function does not use float point operations.
+inline std::size_t calculate_h_sqrt2 (std::size_t n)
+{
+ std::size_t f_log2 = detail::floor_log2(n);
+ return (2*f_log2) + static_cast<std::size_t>(n >= detail::sqrt2_pow_2xplus1(f_log2));
+}
+
+struct h_alpha_sqrt2_t
+{
+ h_alpha_sqrt2_t(void){}
+ std::size_t operator()(std::size_t n) const
+ { return calculate_h_sqrt2(n); }
+};
+
+struct alpha_0_75_by_max_size_t
+{
+ alpha_0_75_by_max_size_t(void){}
+
+ std::size_t operator()(std::size_t max_tree_size) const
+ {
+ const std::size_t max_tree_size_limit = ((~std::size_t(0))/std::size_t(3));
+ return max_tree_size > max_tree_size_limit ? max_tree_size/4*3 : max_tree_size*3/4;
+ }
+};
+
+/////////////////////////////////////////////////////////////
+//
+// Halpha for fixed floating_point<true> option
+//
+/////////////////////////////////////////////////////////////
+
+struct h_alpha_t
+{
+ explicit h_alpha_t(float inv_minus_logalpha)
+ : inv_minus_logalpha_(inv_minus_logalpha)
+ {}
+
+ std::size_t operator()(std::size_t n) const
+ {
+ ////////////////////////////////////////////////////////////
+ // This function must return "floor(log2(1/alpha(n)))" ->
+ // floor(log2(n)/log(1/alpha)) ->
+ // floor(log2(n)/-log2(alpha))
+ // floor(log2(n)*(1/-log2(alpha)))
+ ////////////////////////////////////////////////////////////
+ return static_cast<std::size_t>(detail::fast_log2(float(n))*inv_minus_logalpha_);
+ }
+
+ private:
+ //Since the function will be repeatedly called
+ //precalculate constant data to avoid repeated
+ //calls to log and division.
+ //This will store 1/(-std::log2(alpha_))
+ float inv_minus_logalpha_;
+};
+
+struct alpha_by_max_size_t
+{
+ explicit alpha_by_max_size_t(float alpha)
+ : alpha_(alpha)
+ {}
+
+ float operator()(std::size_t max_tree_size) const
+ { return float(max_tree_size)*alpha_; }
+
+ private:
+ float alpha_;
+};
+
+template<bool Activate, class SizeType>
+struct alpha_holder
+{
+ typedef boost::intrusive::detail::h_alpha_t h_alpha_t;
+ typedef boost::intrusive::detail::alpha_by_max_size_t multiply_by_alpha_t;
+
+ alpha_holder()
+ : max_tree_size_()
+ { set_alpha(0.70711f); } // ~1/sqrt(2)
+
+ float get_alpha() const
+ { return alpha_; }
+
+ void set_alpha(float alpha)
+ {
+ alpha_ = alpha;
+ inv_minus_logalpha_ = 1/(-detail::fast_log2(alpha));
+ }
+
+ h_alpha_t get_h_alpha_t() const
+ { return h_alpha_t(inv_minus_logalpha_); }
+
+ multiply_by_alpha_t get_multiply_by_alpha_t() const
+ { return multiply_by_alpha_t(alpha_); }
+
+ SizeType &get_max_tree_size()
+ { return max_tree_size_; }
+
+ protected:
+ float alpha_;
+ float inv_minus_logalpha_;
+ SizeType max_tree_size_;
+};
+
+template<class SizeType>
+struct alpha_holder<false, SizeType>
+{
+ //This specialization uses alpha = 1/sqrt(2)
+ //without using floating point operations
+ //Downside: alpha CAN't be changed.
+ typedef boost::intrusive::detail::h_alpha_sqrt2_t h_alpha_t;
+ typedef boost::intrusive::detail::alpha_0_75_by_max_size_t multiply_by_alpha_t;
+
+ alpha_holder()
+ : max_tree_size_()
+ {}
+
+ float get_alpha() const
+ { return 0.70710677f; }
+
+ void set_alpha(float)
+ { //alpha CAN't be changed.
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(0);
+ }
+
+ h_alpha_t get_h_alpha_t() const
+ { return h_alpha_t(); }
+
+ multiply_by_alpha_t get_multiply_by_alpha_t() const
+ { return multiply_by_alpha_t(); }
+
+ SizeType &get_max_tree_size()
+ { return max_tree_size_; }
+
+ protected:
+ SizeType max_tree_size_;
+};
+
+} //namespace detail{
+
+struct sgtree_defaults
+ : bstree_defaults
+{
+ static const bool floating_point = true;
+};
+
+/// @endcond
+
+//! The class template sgtree is an intrusive scapegoat tree container, that
+//! is used to construct intrusive sg_set and sg_multiset containers.
+//! The no-throw guarantee holds only, if the value_compare object
+//! doesn't throw.
+//!
+//! 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 floating_point<>, \c size_type<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool FloatingPoint, typename HeaderHolder>
+#endif
+class sgtree_impl
+ /// @cond
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, true, SgTreeAlgorithms, HeaderHolder>
+ , public detail::alpha_holder<FloatingPoint, SizeType>
+ /// @endcond
+{
+ public:
+ typedef ValueTraits value_traits;
+ /// @cond
+ typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
+ , true, SgTreeAlgorithms, HeaderHolder> tree_type;
+ typedef tree_type implementation_defined;
+
+ /// @endcond
+
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ 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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_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 BOOST_INTRUSIVE_IMPDEF(sgtree_algorithms<node_traits>) node_algorithms;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+ static const bool floating_point = FloatingPoint;
+ static const bool stateful_value_traits = implementation_defined::stateful_value_traits;
+
+ /// @cond
+ private:
+
+ //noncopyable
+ typedef detail::alpha_holder<FloatingPoint, SizeType> alpha_traits;
+ typedef typename alpha_traits::h_alpha_t h_alpha_t;
+ typedef typename alpha_traits::multiply_by_alpha_t multiply_by_alpha_t;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(sgtree_impl)
+ BOOST_STATIC_ASSERT(((int)value_traits::link_mode != (int)auto_unlink));
+
+ enum { safemode_or_autounlink =
+ (int)value_traits::link_mode == (int)auto_unlink ||
+ (int)value_traits::link_mode == (int)safe_link };
+
+ /// @endcond
+
+ public:
+
+ typedef BOOST_INTRUSIVE_IMPDEF(typename node_algorithms::insert_commit_data) insert_commit_data;
+
+ //! @copydoc ::boost::intrusive::bstree::bstree()
+ sgtree_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
+ explicit sgtree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ sgtree_impl( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {
+ if(unique)
+ this->insert_unique(b, e);
+ else
+ this->insert_equal(b, e);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ sgtree_impl(BOOST_RV_REF(sgtree_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x)), alpha_traits(x.get_alpha_traits())
+ { ::boost::adl_move_swap(this->get_alpha_traits(), x.get_alpha_traits()); }
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ sgtree_impl& operator=(BOOST_RV_REF(sgtree_impl) x)
+ {
+ this->get_alpha_traits() = x.get_alpha_traits();
+ return static_cast<sgtree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x)));
+ }
+
+ /// @cond
+ private:
+
+ const alpha_traits &get_alpha_traits() const
+ { return *this; }
+
+ alpha_traits &get_alpha_traits()
+ { return *this; }
+
+ h_alpha_t get_h_alpha_func() const
+ { return this->get_alpha_traits().get_h_alpha_t(); }
+
+ multiply_by_alpha_t get_alpha_by_max_size_func() const
+ { return this->get_alpha_traits().get_multiply_by_alpha_t(); }
+
+ /// @endcond
+
+ public:
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~sgtree_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static sgtree_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const sgtree_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static sgtree_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const sgtree_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::swap
+ void swap(sgtree_impl& other)
+ {
+ //This can throw
+ this->tree_type::swap(static_cast<tree_type&>(other));
+ ::boost::adl_move_swap(this->get_alpha_traits(), other.get_alpha_traits());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
+ //! Additional notes: it also copies the alpha factor from the source container.
+ template <class Cloner, class Disposer>
+ void clone_from(const sgtree_impl &src, Cloner cloner, Disposer disposer)
+ {
+ tree_type::clone_from(src, cloner, disposer);
+ this->get_alpha_traits() = src.get_alpha_traits();
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ //! Additional notes: it also copies the alpha factor from the source container.
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(sgtree_impl) src, Cloner cloner, Disposer disposer)
+ {
+ tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer);
+ this->get_alpha_traits() = ::boost::move(src.get_alpha_traits());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
+ iterator insert_equal(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
+ node_ptr p = node_algorithms::insert_equal_upper_bound
+ (this->tree_type::header_ptr(), to_insert, this->key_node_comp(this->key_comp())
+ , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->tree_type::sz_traits().increment();
+ this->max_tree_size_ = (size_type)max_tree_size;
+ return iterator(p, this->priv_value_traits_ptr());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
+ iterator insert_equal(const_iterator hint, reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
+ node_ptr p = node_algorithms::insert_equal
+ ( this->tree_type::header_ptr(), hint.pointed_node(), to_insert, this->key_node_comp(this->key_comp())
+ , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->tree_type::sz_traits().increment();
+ this->max_tree_size_ = (size_type)max_tree_size;
+ return iterator(p, this->priv_value_traits_ptr());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert_equal(Iterator b, Iterator e)
+ {
+ iterator iend(this->end());
+ for (; b != e; ++b)
+ this->insert_equal(iend, *b);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
+ 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), this->key_comp(), commit_data);
+ if(!ret.second)
+ return ret;
+ return std::pair<iterator, bool> (this->insert_unique_commit(value, commit_data), true);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
+ iterator insert_unique(const_iterator hint, reference value)
+ {
+ insert_commit_data commit_data;
+ std::pair<iterator, bool> ret = this->insert_unique_check
+ (hint, key_of_value()(value), this->key_comp(), commit_data);
+ if(!ret.second)
+ return ret.first;
+ return this->insert_unique_commit(value, commit_data);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
+ , typename detail::disable_if_convertible
+ <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
+ std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
+ insert_unique_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> ret =
+ node_algorithms::insert_unique_check
+ (this->tree_type::header_ptr(), key, this->key_node_comp(comp), commit_data);
+ return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> ret =
+ node_algorithms::insert_unique_check
+ (this->tree_type::header_ptr(), hint.pointed_node(), key, this->key_node_comp(comp), commit_data);
+ return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const key_type &key, insert_commit_data &commit_data)
+ { return this->insert_unique_check(key, this->key_comp(), commit_data); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const key_type &key, insert_commit_data &commit_data)
+ { return this->insert_unique_check(hint, key, this->key_comp(), commit_data); }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
+ node_algorithms::insert_unique_commit
+ ( this->tree_type::header_ptr(), to_insert, commit_data
+ , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->tree_type::sz_traits().increment();
+ this->max_tree_size_ = (size_type)max_tree_size;
+ return iterator(to_insert, this->priv_value_traits_ptr());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert_unique(Iterator b, Iterator e)
+ {
+ if(this->empty()){
+ iterator iend(this->end());
+ for (; b != e; ++b)
+ this->insert_unique(iend, *b);
+ }
+ else{
+ for (; b != e; ++b)
+ this->insert_unique(*b);
+ }
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::insert_before
+ iterator insert_before(const_iterator pos, reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
+ node_ptr p = node_algorithms::insert_before
+ ( this->tree_type::header_ptr(), pos.pointed_node(), to_insert
+ , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->tree_type::sz_traits().increment();
+ this->max_tree_size_ = (size_type)max_tree_size;
+ return iterator(p, this->priv_value_traits_ptr());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::push_back
+ void push_back(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
+ node_algorithms::push_back
+ ( this->tree_type::header_ptr(), to_insert
+ , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->tree_type::sz_traits().increment();
+ this->max_tree_size_ = (size_type)max_tree_size;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::push_front
+ void push_front(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
+ std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
+ node_algorithms::push_front
+ ( this->tree_type::header_ptr(), to_insert
+ , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->tree_type::sz_traits().increment();
+ this->max_tree_size_ = (size_type)max_tree_size;
+ }
+
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
+ iterator erase(const_iterator i)
+ {
+ const_iterator ret(i);
+ ++ret;
+ node_ptr to_erase(i.pointed_node());
+ if(safemode_or_autounlink)
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase));
+ std::size_t max_tree_size = this->max_tree_size_;
+ node_algorithms::erase
+ ( this->tree_type::header_ptr(), to_erase, (std::size_t)this->size()
+ , max_tree_size, this->get_alpha_by_max_size_func());
+ this->max_tree_size_ = (size_type)max_tree_size;
+ this->tree_type::sz_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ return ret.unconst();
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e)
+ { size_type n; return private_erase(b, e, n); }
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
+ size_type erase(const key_type &key)
+ { return this->erase(key, this->key_comp()); }
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ BOOST_INTRUSIVE_DOC1ST(size_type
+ , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
+ erase(const KeyType& key, KeyTypeKeyCompare comp)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key, comp);
+ size_type n;
+ private_erase(p.first, p.second, n);
+ return n;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer)
+ {
+ node_ptr to_erase(i.pointed_node());
+ iterator ret(this->erase(i));
+ disposer(this->get_value_traits().to_value_ptr(to_erase));
+ return ret;
+ }
+
+ #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
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
+ { size_type n; return private_erase(b, e, n, disposer); }
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key);
+ size_type n;
+ private_erase(p.first, p.second, n, disposer);
+ return n;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ BOOST_INTRUSIVE_DOC1ST(size_type
+ , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
+ erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key, comp);
+ size_type n;
+ private_erase(p.first, p.second, n, disposer);
+ return n;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::clear
+ void clear()
+ {
+ tree_type::clear();
+ this->max_tree_size_ = 0;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer)
+ {
+ tree_type::clear_and_dispose(disposer);
+ this->max_tree_size_ = 0;
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_unique(sgtree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+
+ std::size_t max_tree1_size = this->max_tree_size_;
+ std::size_t max_tree2_size = source.get_max_tree_size();
+ if( node_algorithms::transfer_unique
+ ( this->header_ptr(), this->key_node_comp(this->key_comp()), this->size(), max_tree1_size
+ , source.header_ptr(), p, source.size(), max_tree2_size
+ , this->get_h_alpha_func(), this->get_alpha_by_max_size_func()) ){
+ this->max_tree_size_ = (size_type)max_tree1_size;
+ this->sz_traits().increment();
+ source.get_max_tree_size() = (size_type)max_tree2_size;
+ source.sz_traits().decrement();
+ }
+ }
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_equal
+ template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_equal(sgtree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ std::size_t max_tree1_size = this->max_tree_size_;
+ std::size_t max_tree2_size = source.get_max_tree_size();
+ node_algorithms::transfer_equal
+ ( this->header_ptr(), this->key_node_comp(this->key_comp()), this->size(), max_tree1_size
+ , source.header_ptr(), p, source.size(), max_tree2_size
+ , this->get_h_alpha_func(), this->get_alpha_by_max_size_func());
+ this->max_tree_size_ = (size_type)max_tree1_size;
+ this->sz_traits().increment();
+ source.get_max_tree_size() = (size_type)max_tree2_size;
+ source.sz_traits().decrement();
+ }
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::rebalance
+ void rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::rebalance_subtree
+ iterator rebalance_subtree(iterator root);
+
+ friend bool operator< (const sgtree_impl &x, const sgtree_impl &y);
+
+ friend bool operator==(const sgtree_impl &x, const sgtree_impl &y);
+
+ friend bool operator!= (const sgtree_impl &x, const sgtree_impl &y);
+
+ friend bool operator>(const sgtree_impl &x, const sgtree_impl &y);
+
+ friend bool operator<=(const sgtree_impl &x, const sgtree_impl &y);
+
+ friend bool operator>=(const sgtree_impl &x, const sgtree_impl &y);
+
+ friend void swap(sgtree_impl &x, sgtree_impl &y);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Returns</b>: The balance factor (alpha) used in this tree
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ float balance_factor() const
+ { return this->get_alpha_traits().get_alpha(); }
+
+ //! <b>Requires</b>: new_alpha must be a value between 0.5 and 1.0
+ //!
+ //! <b>Effects</b>: Establishes a new balance factor (alpha) and rebalances
+ //! the tree if the new balance factor is stricter (less) than the old factor.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements in the subtree.
+ void balance_factor(float new_alpha)
+ {
+ //The alpha factor CAN't be changed if the fixed, floating operation-less
+ //1/sqrt(2) alpha factor option is activated
+ BOOST_STATIC_ASSERT((floating_point));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT((new_alpha > 0.5f && new_alpha < 1.0f));
+ if(new_alpha >= 0.5f && new_alpha < 1.0f){
+ float old_alpha = this->get_alpha_traits().get_alpha();
+ this->get_alpha_traits().set_alpha(new_alpha);
+ if(new_alpha < old_alpha){
+ this->max_tree_size_ = this->size();
+ this->rebalance();
+ }
+ }
+ }
+
+ /// @cond
+ private:
+ template<class Disposer>
+ iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
+ {
+ for(n = 0; b != e; ++n)
+ this->erase_and_dispose(b++, disposer);
+ return b.unconst();
+ }
+
+ iterator private_erase(const_iterator b, const_iterator e, size_type &n)
+ {
+ for(n = 0; b != e; ++n)
+ this->erase(b++);
+ return b.unconst();
+ }
+ /// @endcond
+};
+
+
+//! Helper metafunction to define a \c sgtree 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_sgtree
+{
+ /// @cond
+ typedef typename pack_options
+ < sgtree_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 sgtree_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::floating_point
+ , 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 sgtree
+ : public make_sgtree<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_sgtree
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(sgtree)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::reverse_iterator reverse_iterator;
+ typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+ //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 sgtree()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit sgtree(const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE sgtree( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(unique, b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE sgtree(BOOST_RV_REF(sgtree) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE sgtree& operator=(BOOST_RV_REF(sgtree) x)
+ { return static_cast<sgtree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const sgtree &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(sgtree) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static sgtree &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<sgtree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const sgtree &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const sgtree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static sgtree &container_from_iterator(iterator it)
+ { return static_cast<sgtree &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const sgtree &container_from_iterator(const_iterator it)
+ { return static_cast<const sgtree &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //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.70.0/boost/intrusive/sgtree_algorithms.hpp
index a3e233ce032..a3e233ce032 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/sgtree_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/sgtree_algorithms.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/slist.hpp b/src/third_party/boost-1.70.0/boost/intrusive/slist.hpp
new file mode 100644
index 00000000000..08797e3f538
--- /dev/null
+++ b/src/third_party/boost-1.70.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 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;
+
+ BOOST_INTRUSIVE_FORCEINLINE slist()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit slist(const value_traits &v_traits)
+ : Base(v_traits)
+ {}
+
+ struct incorporate_t{};
+
+ BOOST_INTRUSIVE_FORCEINLINE 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>
+ BOOST_INTRUSIVE_FORCEINLINE slist(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
+ : Base(b, e, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE slist(BOOST_RV_REF(slist) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE slist& operator=(BOOST_RV_REF(slist) x)
+ { return static_cast<slist &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const slist &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(slist) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static slist &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<slist &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE 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.69.0/boost/intrusive/slist_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/slist_hook.hpp
index 0f37772c6d1..0f37772c6d1 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/slist_hook.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/slist_hook.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/splay_set.hpp b/src/third_party/boost-1.70.0/boost/intrusive/splay_set.hpp
new file mode 100644
index 00000000000..9f6e92e9341
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/splay_set.hpp
@@ -0,0 +1,1110 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_SPLAY_SET_HPP
+#define BOOST_INTRUSIVE_SPLAY_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/splaytree.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/static_assert.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class splay_multiset_impl;
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! The class template splay_set is an intrusive container, that mimics most of
+//! the interface of std::set as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class splay_set_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_set_impl)
+
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::splaytree::splaytree()
+ splay_set_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::splaytree(const key_compare &,const value_traits &)
+ explicit splay_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::splaytree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ splay_set_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(true, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::splaytree(splaytree &&)
+ splay_set_impl(BOOST_RV_REF(splay_set_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::operator=(splaytree &&)
+ splay_set_impl& operator=(BOOST_RV_REF(splay_set_impl) x)
+ { return static_cast<splay_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::splaytree::~splaytree()
+ ~splay_set_impl();
+
+ //! @copydoc ::boost::intrusive::splaytree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::splaytree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::splaytree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::splaytree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::splaytree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::splaytree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
+ static splay_set_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
+ static const splay_set_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
+ static splay_set_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
+ static const splay_set_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::splaytree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::swap
+ void swap(splay_set_impl& other);
+
+ //! @copydoc ::boost::intrusive::splaytree::clone_from(const splaytree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const splay_set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::splaytree::clone_from(splaytree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(splay_set_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_unique(reference)
+ std::pair<iterator, bool> insert(reference value)
+ { return tree_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_unique(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_unique(hint, value); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const key_type &key, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const key_type &key
+ ,insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_unique_commit
+ iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return tree_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::splaytree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::splaytree::count(const key_type &)const
+ size_type count(const key_type &key) const
+ { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
+
+ //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::splaytree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
+ { return this->tree_type::equal_range(key, comp); }
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return this->tree_type::equal_range(key, comp); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&,const key_type&,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&,const key_type&,bool,bool)const
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::splaytree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::splaytree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
+ void splay_up(iterator i);
+
+ //! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::splay_down(const key_type &key)
+ iterator splay_down(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::rebalance
+ void rebalance();
+
+ //! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
+ iterator rebalance_subtree(iterator root);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_unique
+ template<class ...Options2>
+ void merge(splay_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_unique
+ template<class ...Options2>
+ void merge(splay_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(splay_set_impl<T, Options...> &x, splay_set_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c splay_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>
+#endif
+struct make_splay_set
+{
+ /// @cond
+ typedef typename pack_options
+ < splaytree_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 splay_set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 splay_set
+ : public make_splay_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_splay_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_set)
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 splay_set()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit splay_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE splay_set( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE splay_set(BOOST_RV_REF(splay_set) x)
+ : Base(::boost::move(static_cast<Base&>(x)))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE splay_set& operator=(BOOST_RV_REF(splay_set) x)
+ { return static_cast<splay_set &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const splay_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(splay_set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static splay_set &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<splay_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const splay_set &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const splay_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static splay_set &container_from_iterator(iterator it)
+ { return static_cast<splay_set &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const splay_set &container_from_iterator(const_iterator it)
+ { return static_cast<const splay_set &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+//! The class template splay_multiset is an intrusive container, that mimics most of
+//! the interface of std::multiset as described in the C++ standard.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class splay_multiset_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_multiset_impl)
+ typedef tree_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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = tree_type::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::splaytree::splaytree()
+ splay_multiset_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::splaytree(const key_compare &,const value_traits &)
+ explicit splay_multiset_impl(const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::splaytree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ splay_multiset_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(false, b, e, cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::splaytree(splaytree &&)
+ splay_multiset_impl(BOOST_RV_REF(splay_multiset_impl) x)
+ : tree_type(::boost::move(static_cast<tree_type&>(x)))
+ {}
+
+ //! @copydoc ::boost::intrusive::splaytree::operator=(splaytree &&)
+ splay_multiset_impl& operator=(BOOST_RV_REF(splay_multiset_impl) x)
+ { return static_cast<splay_multiset_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::splaytree::~splaytree()
+ ~splay_multiset_impl();
+
+ //! @copydoc ::boost::intrusive::splaytree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::splaytree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::splaytree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::splaytree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::splaytree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::splaytree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
+ static splay_multiset_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
+ static const splay_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
+ static splay_multiset_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
+ static const splay_multiset_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::splaytree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::swap
+ void swap(splay_multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::splaytree::clone_from(const splaytree&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const splay_multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::splaytree::clone_from(splaytree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(splay_multiset_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_equal(reference)
+ iterator insert(reference value)
+ { return tree_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_equal(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_equal(hint, value); }
+
+ //! @copydoc ::boost::intrusive::splaytree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::splaytree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const key_type&)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type&, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::splaytree::count(const key_type&)
+ size_type count(const key_type&);
+
+ //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type&)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type&)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type&)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type&)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const key_type&)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const key_type&)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::equal_range(const key_type&)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::equal_range(const key_type&)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&, const key_type&,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&, const key_type&,bool,bool)const
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::splaytree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::splaytree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::splaytree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
+ void splay_up(iterator i);
+
+ //! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::splaytree::splay_down(const key_type &key)
+ iterator splay_down(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::splaytree::rebalance
+ void rebalance();
+
+ //! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
+ iterator rebalance_subtree(iterator root);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_equal
+ template<class ...Options2>
+ void merge(splay_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_equal
+ template<class ...Options2>
+ void merge(splay_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<class T, class ...Options>
+bool operator!= (const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator<=(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+bool operator>=(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
+
+template<class T, class ...Options>
+void swap(splay_multiset_impl<T, Options...> &x, splay_multiset_impl<T, Options...> &y);
+
+#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//! Helper metafunction to define a \c splay_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>
+#endif
+struct make_splay_multiset
+{
+ /// @cond
+ typedef typename pack_options
+ < splaytree_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 splay_multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 splay_multiset
+ : public make_splay_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_splay_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_multiset)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 splay_multiset()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit splay_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE splay_multiset( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE splay_multiset(BOOST_RV_REF(splay_multiset) x)
+ : Base(::boost::move(static_cast<Base&>(x)))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE splay_multiset& operator=(BOOST_RV_REF(splay_multiset) x)
+ { return static_cast<splay_multiset &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const splay_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(splay_multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static splay_multiset &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const splay_multiset &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static splay_multiset &container_from_iterator(iterator it)
+ { return static_cast<splay_multiset &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const splay_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const splay_multiset &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SPLAY_SET_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/splaytree.hpp b/src/third_party/boost-1.70.0/boost/intrusive/splaytree.hpp
new file mode 100644
index 00000000000..a93f1f7b132
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/splaytree.hpp
@@ -0,0 +1,666 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_SPLAYTREE_HPP
+#define BOOST_INTRUSIVE_SPLAYTREE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <cstddef>
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+
+#include <boost/static_assert.hpp>
+#include <boost/intrusive/bstree.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/function_detector.hpp>
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/splaytree_algorithms.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
+#include <boost/move/utility_core.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+struct splaytree_defaults
+ : bstree_defaults
+{};
+
+/// @endcond
+
+//! The class template splaytree is an intrusive splay tree container that
+//! is used to construct intrusive splay_set and splay_multiset containers. The no-throw
+//! guarantee holds only, if the key_compare object
+//! doesn't throw.
+//!
+//! 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<> and
+//! \c compare<>.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class splaytree_impl
+ /// @cond
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, SplayTreeAlgorithms, HeaderHolder>
+ /// @endcond
+{
+ public:
+ typedef ValueTraits value_traits;
+ /// @cond
+ typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
+ , ConstantTimeSize, SplayTreeAlgorithms
+ , HeaderHolder> tree_type;
+ typedef tree_type implementation_defined;
+ /// @endcond
+
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ 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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_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;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+ /// @cond
+ private:
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(splaytree_impl)
+
+ /// @endcond
+
+ public:
+
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+
+ //! @copydoc ::boost::intrusive::bstree::bstree()
+ splaytree_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
+ explicit splaytree_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
+ template<class Iterator>
+ splaytree_impl( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits)
+ {
+ if(unique)
+ this->insert_unique(b, e);
+ else
+ this->insert_equal(b, e);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ splaytree_impl(BOOST_RV_REF(splaytree_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ splaytree_impl& operator=(BOOST_RV_REF(splaytree_impl) x)
+ { return static_cast<splaytree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~splaytree_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static splaytree_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const splaytree_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static splaytree_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const splaytree_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::bstree::swap
+ void swap(splaytree_impl& other);
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
+ //! Additional notes: it also copies the alpha factor from the source container.
+ template <class Cloner, class Disposer>
+ void clone_from(const splaytree_impl &src, Cloner cloner, Disposer disposer);
+
+ #else //BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ using tree_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(splaytree_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
+ iterator insert_equal(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
+ iterator insert_equal(const_iterator hint, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert_equal(Iterator b, Iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
+ std::pair<iterator, bool> insert_unique(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
+ iterator insert_unique(const_iterator hint, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const key_type &key, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const key_type &key, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, bool> insert_unique_check
+ (const_iterator hint, const KeyType &key
+ ,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert_unique(Iterator b, Iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ //! Additional note: non-const function, splaying is performed.
+ size_type count(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ //! Additional note: non-const function, splaying is performed.
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ //! Additional note: const function, no splaying is performed
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ //! Additional note: const function, no splaying is performed
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ //! Additional note: non-const function, splaying is performed.
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ //! Additional note: const function, no splaying is performed
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "key"
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ //! Additional note: const function, no splaying is performed
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "value"
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ //! Additional note: const function, no splaying is performed
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "key"
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ //! Additional note: const function, no splaying is performed
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "value"
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ //! Additional note: const function, no splaying is performed
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "key"
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ //! Additional note: const function, no splaying is performed
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "value"
+ std::pair<iterator, iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ //! Additional note: const function, no splaying is performed
+ std::pair<const_iterator, const_iterator> equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ //! Additional note: non-const function, splaying is performed for the first
+ //! element of the equal range of "key"
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator, iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ //! Additional note: const function, no splaying is performed
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_unique(splaytree<T, Options2...> &);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_equal(splaytree<T, Options2...> &);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Requires</b>: i must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Rearranges the container so that the element pointed by i
+ //! is placed as the root of the tree, improving future searches of this value.
+ //!
+ //! <b>Complexity</b>: Amortized logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ void splay_up(iterator i)
+ { return node_algorithms::splay_up(i.pointed_node(), tree_type::header_ptr()); }
+
+ //! <b>Effects</b>: Rearranges the container so that if *this stores an element
+ //! with a key equivalent to value the element is placed as the root of the
+ //! tree. If the element is not present returns the last node compared with the key.
+ //! If the tree is empty, end() is returned.
+ //!
+ //! <b>Complexity</b>: Amortized logarithmic.
+ //!
+ //! <b>Returns</b>: An iterator to the new root of the tree, end() if the tree is empty.
+ //!
+ //! <b>Throws</b>: If the comparison functor throws.
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp)
+ {
+ detail::key_nodeptr_comp<value_compare, value_traits>
+ key_node_comp(comp, &this->get_value_traits());
+ node_ptr r = node_algorithms::splay_down(tree_type::header_ptr(), key, key_node_comp);
+ return iterator(r, this->priv_value_traits_ptr());
+ }
+
+ //! <b>Effects</b>: Rearranges the container so that if *this stores an element
+ //! with a key equivalent to value the element is placed as the root of the
+ //! tree.
+ //!
+ //! <b>Complexity</b>: Amortized logarithmic.
+ //!
+ //! <b>Returns</b>: An iterator to the new root of the tree, end() if the tree is empty.
+ //!
+ //! <b>Throws</b>: If the predicate throws.
+ iterator splay_down(const key_type &key)
+ { return this->splay_down(key, this->key_comp()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::rebalance
+ void rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::rebalance_subtree
+ iterator rebalance_subtree(iterator root);
+
+ friend bool operator< (const splaytree_impl &x, const splaytree_impl &y);
+
+ friend bool operator==(const splaytree_impl &x, const splaytree_impl &y);
+
+ friend bool operator!= (const splaytree_impl &x, const splaytree_impl &y);
+
+ friend bool operator>(const splaytree_impl &x, const splaytree_impl &y);
+
+ friend bool operator<=(const splaytree_impl &x, const splaytree_impl &y);
+
+ friend bool operator>=(const splaytree_impl &x, const splaytree_impl &y);
+
+ friend void swap(splaytree_impl &x, splaytree_impl &y);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+//! Helper metafunction to define a \c splaytree 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_splaytree
+{
+ /// @cond
+ typedef typename pack_options
+ < splaytree_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 splaytree_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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 splaytree
+ : public make_splaytree<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_splaytree
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(splaytree)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::reverse_iterator reverse_iterator;
+ typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+ //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 splaytree()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit splaytree( const key_compare &cmp, const value_traits &v_traits = value_traits())
+ : Base(cmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE splaytree( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(unique, b, e, cmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE splaytree(BOOST_RV_REF(splaytree) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE splaytree& operator=(BOOST_RV_REF(splaytree) x)
+ { return static_cast<splaytree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const splaytree &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(splaytree) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static splaytree &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<splaytree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const splaytree &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const splaytree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static splaytree &container_from_iterator(iterator it)
+ { return static_cast<splaytree &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const splaytree &container_from_iterator(const_iterator it)
+ { return static_cast<const splaytree &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //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.70.0/boost/intrusive/splaytree_algorithms.hpp
index 6376d32afdf..6376d32afdf 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/splaytree_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/splaytree_algorithms.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/treap.hpp b/src/third_party/boost-1.70.0/boost/intrusive/treap.hpp
new file mode 100644
index 00000000000..56569757c81
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/treap.hpp
@@ -0,0 +1,1371 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_INTRUSIVE_TREAP_HPP
+#define BOOST_INTRUSIVE_TREAP_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/bs_set_hook.hpp>
+#include <boost/intrusive/bstree.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/treap_algorithms.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/priority_compare.hpp>
+#include <boost/intrusive/detail/node_cloner_disposer.hpp>
+#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
+
+#include <boost/static_assert.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/move/adl_move_swap.hpp>
+
+#include <cstddef>
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+struct treap_defaults
+ : bstree_defaults
+{
+ typedef void priority;
+ typedef void priority_of_value;
+};
+
+template<class ValuePtr, class VoidOrPrioOfValue, class VoidOrPrioComp>
+struct treap_prio_types
+{
+ typedef typename
+ boost::movelib::pointer_element<ValuePtr>::type value_type;
+ typedef typename get_key_of_value
+ < VoidOrPrioOfValue, value_type>::type priority_of_value;
+ typedef typename priority_of_value::type priority_type;
+ typedef typename get_prio_comp< VoidOrPrioComp
+ , priority_type
+ >::type priority_compare;
+};
+
+struct treap_tag;
+
+/// @endcond
+
+//! The class template treap is an intrusive treap container that
+//! is used to construct intrusive set and multiset containers. The no-throw
+//! guarantee holds only, if the key_compare object and priority_compare object
+//! don't throw.
+//!
+//! 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 compare<> and \c priority_compare<>
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioOfValue, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class treap_impl
+ /// @cond
+ : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
+ //Use public inheritance to avoid MSVC bugs with closures
+ , public detail::ebo_functor_holder
+ < typename treap_prio_types<typename ValueTraits::pointer, VoidOrPrioOfValue, VoidOrPrioComp>::priority_compare
+ , treap_tag>
+ /// @endcond
+{
+ public:
+ typedef ValueTraits value_traits;
+ /// @cond
+ typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
+ , ConstantTimeSize, BsTreeAlgorithms
+ , HeaderHolder> tree_type;
+ typedef tree_type implementation_defined;
+ typedef treap_prio_types
+ < typename ValueTraits::pointer
+ , VoidOrPrioOfValue, VoidOrPrioComp> treap_prio_types_t;
+
+ typedef detail::ebo_functor_holder
+ <typename treap_prio_types_t::priority_compare, treap_tag> prio_base;
+
+ /// @endcond
+
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ 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::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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_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 BOOST_INTRUSIVE_IMPDEF(treap_algorithms<node_traits>) node_algorithms;
+ typedef BOOST_INTRUSIVE_IMPDEF
+ (typename treap_prio_types_t::priority_type) priority_type;
+ typedef BOOST_INTRUSIVE_IMPDEF
+ (typename treap_prio_types_t::priority_of_value) priority_of_value;
+ typedef BOOST_INTRUSIVE_IMPDEF
+ (typename treap_prio_types_t::priority_compare) priority_compare;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+ static const bool stateful_value_traits = implementation_defined::stateful_value_traits;
+ static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
+
+ typedef detail::key_nodeptr_comp<priority_compare, value_traits, priority_of_value> prio_node_prio_comp_t;
+
+ template<class PrioPrioComp>
+ detail::key_nodeptr_comp<PrioPrioComp, value_traits, priority_of_value> prio_node_prio_comp(PrioPrioComp priopriocomp) const
+ { return detail::key_nodeptr_comp<PrioPrioComp, value_traits, priority_of_value>(priopriocomp, &this->get_value_traits()); }
+
+ /// @cond
+ private:
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_impl)
+
+ const priority_compare &priv_pcomp() const
+ { return static_cast<const prio_base&>(*this).get(); }
+
+ priority_compare &priv_pcomp()
+ { return static_cast<prio_base&>(*this).get(); }
+
+ /// @endcond
+
+ public:
+ typedef typename node_algorithms::insert_commit_data insert_commit_data;
+
+ //! <b>Effects</b>: Constructs an empty container.
+ //!
+ //! <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 of the value_compare/priority_compare objects throw. Basic guarantee.
+ treap_impl()
+ : tree_type(), prio_base()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container.
+ //!
+ //! <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 of the value_compare/priority_compare objects throw. Basic guarantee.
+ explicit treap_impl( const key_compare &cmp
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits), prio_base(pcmp)
+ {}
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
+ //! cmp must be a comparison function that induces a strict weak ordering.
+ //!
+ //! <b>Effects</b>: Constructs an empty container and inserts elements from
+ //! [b, e).
+ //!
+ //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
+ //! comp and otherwise N * log N, where N is the distance between first and last.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the copy constructor/operator() of the key_compare/priority_compare objects
+ //! throw. Basic guarantee.
+ template<class Iterator>
+ treap_impl( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(cmp, v_traits), prio_base(pcmp)
+ {
+ if(unique)
+ this->insert_unique(b, e);
+ else
+ this->insert_equal(b, e);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
+ treap_impl(BOOST_RV_REF(treap_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ , prio_base(::boost::move(x.priv_pcomp()))
+ {}
+
+ //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
+ treap_impl& operator=(BOOST_RV_REF(treap_impl) x)
+ { this->swap(x); return *this; }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::~bstree()
+ ~treap_impl();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::bstree::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::bstree::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::bstree::cend()const
+ const_iterator cend() const;
+ #endif
+
+ //! <b>Effects</b>: Returns an iterator pointing to the highest priority object of the treap.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator top()
+ { return this->tree_type::root(); }
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator top() const
+ { return this->ctop(); }
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator ctop() const
+ { return this->tree_type::root(); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::bstree::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::bstree::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::bstree::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
+ #endif
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the highest priority object of the
+ //! reversed treap.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ reverse_iterator rtop()
+ { return reverse_iterator(this->top()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority objec
+ //! of the reversed treap.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_reverse_iterator rtop() const
+ { return const_reverse_iterator(this->top()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority object
+ //! of the reversed treap.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_reverse_iterator crtop() const
+ { return const_reverse_iterator(this->top()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
+ static treap_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
+ static const treap_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
+ static treap_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
+ static const treap_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::bstree::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::bstree::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::bstree::size()const
+ size_type size() const;
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Returns the priority_compare object used by the container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If priority_compare copy-constructor throws.
+ priority_compare priority_comp() const
+ { return this->priv_pcomp(); }
+
+ //! <b>Effects</b>: Swaps the contents of two treaps.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If the comparison functor's swap call throws.
+ void swap(treap_impl& other)
+ {
+ //This can throw
+ ::boost::adl_move_swap(this->priv_pcomp(), other.priv_pcomp());
+ tree_type::swap(other);
+ }
+
+ //! <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. Copies the predicate from the source container.
+ //!
+ //! 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 or predicate copy assignment throws. Basic guarantee.
+ template <class Cloner, class Disposer>
+ void clone_from(const treap_impl &src, Cloner cloner, Disposer disposer)
+ {
+ tree_type::clone_from(src, cloner, disposer);
+ this->priv_pcomp() = src.priv_pcomp();
+ }
+
+ //! <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. Copies the predicate from the source container.
+ //!
+ //! 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 or predicate copy assignment throws. Basic guarantee.
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(treap_impl) src, Cloner cloner, Disposer disposer)
+ {
+ tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer);
+ this->priv_pcomp() = ::boost::move(src.priv_pcomp());
+ }
+
+ //! <b>Requires</b>: value must be an lvalue
+ //!
+ //! <b>Effects</b>: Inserts value into the container before the upper bound.
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw. Strong guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ iterator insert_equal(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
+ iterator ret
+ ( node_algorithms::insert_equal_upper_bound
+ ( this->tree_type::header_ptr()
+ , to_insert
+ , this->key_node_comp(this->key_comp())
+ , this->prio_node_prio_comp(this->priv_pcomp()))
+ , this->priv_value_traits_ptr());
+ this->tree_type::sz_traits().increment();
+ return ret;
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and "hint" must be
+ //! a valid iterator.
+ //!
+ //! <b>Effects</b>: Inserts x into the container, 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 t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw. Strong guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ iterator insert_equal(const_iterator hint, reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
+ iterator ret
+ (node_algorithms::insert_equal
+ ( this->tree_type::header_ptr()
+ , hint.pointed_node()
+ , to_insert
+ , this->key_node_comp(this->key_comp())
+ , this->prio_node_prio_comp(this->priv_pcomp()))
+ , this->priv_value_traits_ptr());
+ this->tree_type::sz_traits().increment();
+ return ret;
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
+ //! of type value_type.
+ //!
+ //! <b>Effects</b>: Inserts a each element of a range into the container
+ //! before the upper bound of the key of each element.
+ //!
+ //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
+ //! size of the range. However, it is linear in N if the range is already sorted
+ //! by key_comp().
+ //!
+ //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
+ //! Strong 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)
+ {
+ iterator iend(this->end());
+ for (; b != e; ++b)
+ this->insert_equal(iend, *b);
+ }
+
+ //! <b>Requires</b>: value must be an lvalue
+ //!
+ //! <b>Effects</b>: Inserts value into the container if the value
+ //! is not already present.
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
+ //! 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), priority_of_value()(value), commit_data);
+ if(!ret.second)
+ return ret;
+ return std::pair<iterator, bool> (this->insert_unique_commit(value, commit_data), true);
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and "hint" must be
+ //! a valid iterator
+ //!
+ //! <b>Effects</b>: Tries to insert x into the container, using "hint" as a hint
+ //! to where it will be inserted.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but it is amortized
+ //! constant time (two comparisons in the worst case)
+ //! if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
+ //! Strong guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ iterator insert_unique(const_iterator hint, reference value)
+ {
+ insert_commit_data commit_data;
+ std::pair<iterator, bool> ret = this->insert_unique_check(hint, key_of_value()(value), priority_of_value()(value), commit_data);
+ if(!ret.second)
+ return ret.first;
+ return this->insert_unique_commit(value, commit_data);
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
+ //! of type value_type.
+ //!
+ //! <b>Effects</b>: Tries to insert each element of a range into the container.
+ //!
+ //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
+ //! size of the range. However, it is linear in N if the range is already sorted
+ //! by key_comp().
+ //!
+ //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
+ //! Strong 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)
+ {
+ if(this->empty()){
+ iterator iend(this->end());
+ for (; b != e; ++b)
+ this->insert_unique(iend, *b);
+ }
+ else{
+ for (; b != e; ++b)
+ this->insert_unique(*b);
+ }
+ }
+
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If the comparison or predicate functions 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 order is much cheaper to construct
+ //! than the value_type 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 value_type and use
+ //! "insert_commit" to insert the object 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_commit" only if no more
+ //! objects are inserted or erased from the container.
+ std::pair<iterator, bool> insert_unique_check
+ ( const key_type &key, const priority_type &prio, insert_commit_data &commit_data)
+ { return this->insert_unique_check(key, this->key_comp(), prio, this->priv_pcomp(), commit_data); }
+
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, using
+ //! a user provided key instead of the value itself, using "hint"
+ //! as a hint to where it will be inserted.
+ //!
+ //! <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>: Logarithmic in general, but it's amortized
+ //! constant time if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the comparison or predicate functions 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
+ //! constructing that is used to impose the order is much cheaper to construct
+ //! than the value_type and this function offers the possibility to use that key
+ //! 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. This can give a total
+ //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
+ //! objects are inserted or erased from the container.
+ std::pair<iterator, bool> insert_unique_check
+ ( const_iterator hint, const key_type &key, const priority_type &prio, insert_commit_data &commit_data)
+ { return this->insert_unique_check(hint, key, this->key_comp(), prio, this->priv_pcomp(), commit_data); }
+
+ //! <b>Requires</b>: comp must be a comparison function that induces
+ //! the same strict weak ordering as key_compare.
+ //! prio_value_pcomp must be a comparison function that induces
+ //! the same strict weak ordering as priority_compare. The difference is that
+ //! prio_value_pcomp and comp compare an arbitrary key/priority with the contained values.
+ //!
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, 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 complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If the comp or prio_value_pcomp
+ //! ordering functions 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 order is much cheaper to construct
+ //! than the value_type 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 value_type and use
+ //! "insert_commit" to insert the object 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_commit" only if no more
+ //! objects are inserted or erased from the container.
+ template<class KeyType, class KeyTypeKeyCompare, class PrioType, class PrioValuePrioCompare>
+ BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
+ , typename detail::disable_if_convertible
+ <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
+ std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
+ insert_unique_check
+ ( const KeyType &key, KeyTypeKeyCompare comp
+ , const PrioType &prio, PrioValuePrioCompare prio_value_pcomp, insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> const ret =
+ (node_algorithms::insert_unique_check
+ ( this->tree_type::header_ptr()
+ , key, this->key_node_comp(comp)
+ , prio, this->prio_node_prio_comp(prio_value_pcomp)
+ , commit_data));
+ return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
+ }
+
+ //! <b>Requires</b>: comp must be a comparison function that induces
+ //! the same strict weak ordering as key_compare.
+ //! prio_value_pcomp must be a comparison function that induces
+ //! the same strict weak ordering as priority_compare. The difference is that
+ //! prio_value_pcomp and comp compare an arbitrary key/priority with the contained values.
+ //!
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, using
+ //! a user provided key instead of the value itself, using "hint"
+ //! as a hint to where it will be inserted.
+ //!
+ //! <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>: Logarithmic in general, but it's amortized
+ //! constant time if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the comp or prio_value_pcomp
+ //! ordering functions 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
+ //! constructing that is used to impose the order is much cheaper to construct
+ //! than the value_type and this function offers the possibility to use that key
+ //! 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. This can give a total
+ //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
+ //! objects are inserted or erased from the container.
+ template<class KeyType, class KeyTypeKeyCompare, class PrioType, class PrioValuePrioCompare>
+ std::pair<iterator, bool> insert_unique_check
+ ( const_iterator hint
+ , const KeyType &key
+ , KeyTypeKeyCompare comp
+ , const PrioType &prio
+ , PrioValuePrioCompare prio_value_pcomp
+ , insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> const ret =
+ (node_algorithms::insert_unique_check
+ ( this->tree_type::header_ptr(), hint.pointed_node()
+ , key, this->key_node_comp(comp)
+ , prio, this->prio_node_prio_comp(prio_value_pcomp)
+ , commit_data));
+ return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
+ }
+
+ //! <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 container between
+ //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
+ //!
+ //! <b>Effects</b>: Inserts the value in the avl_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.
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
+ node_algorithms::insert_unique_commit(this->tree_type::header_ptr(), to_insert, commit_data);
+ this->tree_type::sz_traits().increment();
+ return iterator(to_insert, this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, "pos" must be
+ //! a valid iterator (or end) and must be the succesor of value
+ //! once inserted according to the predicate
+ //!
+ //! <b>Effects</b>: Inserts x into the container before "pos".
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: This function does not check preconditions so if "pos" is not
+ //! the successor of "value" container ordering invariant will be broken.
+ //! This is a low-level function to be used only for performance reasons
+ //! by advanced users.
+ iterator insert_before(const_iterator pos, reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
+ iterator ret
+ ( node_algorithms::insert_before
+ ( this->tree_type::header_ptr()
+ , pos.pointed_node()
+ , to_insert
+ , this->prio_node_prio_comp(this->priv_pcomp())
+ )
+ , this->priv_value_traits_ptr());
+ this->tree_type::sz_traits().increment();
+ return ret;
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and it must be no less
+ //! than the greatest inserted key
+ //!
+ //! <b>Effects</b>: Inserts x into the container in the last position.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: This function does not check preconditions so if value is
+ //! less than the greatest inserted key container ordering invariant will be broken.
+ //! This function is slightly more efficient than using "insert_before".
+ //! This is a low-level function to be used only for performance reasons
+ //! by advanced users.
+ void push_back(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
+ node_algorithms::push_back
+ (this->tree_type::header_ptr(), to_insert, this->prio_node_prio_comp(this->priv_pcomp()));
+ this->tree_type::sz_traits().increment();
+ }
+
+ //! <b>Requires</b>: value must be an lvalue, and it must be no greater
+ //! than the minimum inserted key
+ //!
+ //! <b>Effects</b>: Inserts x into the container in the first position.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: This function does not check preconditions so if value is
+ //! greater than the minimum inserted key container ordering invariant will be broken.
+ //! This function is slightly more efficient than using "insert_before".
+ //! This is a low-level function to be used only for performance reasons
+ //! by advanced users.
+ void push_front(reference value)
+ {
+ node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
+ node_algorithms::push_front
+ (this->tree_type::header_ptr(), to_insert, this->prio_node_prio_comp(this->priv_pcomp()));
+ this->tree_type::sz_traits().increment();
+ }
+
+ //! <b>Effects</b>: Erases the element pointed to by i.
+ //!
+ //! <b>Complexity</b>: Average complexity for erase element is constant time.
+ //!
+ //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ iterator erase(const_iterator i)
+ {
+ const_iterator ret(i);
+ ++ret;
+ node_ptr to_erase(i.pointed_node());
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(to_erase));
+ node_algorithms::erase
+ (this->tree_type::header_ptr(), to_erase, this->prio_node_prio_comp(this->priv_pcomp()));
+ this->tree_type::sz_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ return ret.unconst();
+ }
+
+ //! <b>Effects</b>: Erases the range pointed to by b end e.
+ //!
+ //! <b>Complexity</b>: Average complexity for erase range is at most
+ //! O(log(size() + N)), where N is the number of elements in the range.
+ //!
+ //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ iterator erase(const_iterator b, const_iterator e)
+ { size_type n; return private_erase(b, e, n); }
+
+ //! <b>Effects</b>: Erases all the elements with the given value.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ size_type erase(const key_type &key)
+ { return this->erase(key, this->key_comp()); }
+
+ //! <b>Effects</b>: Erases all the elements with the given key.
+ //! according to the comparison functor "comp".
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: if the internal priority_compare function throws.
+ //! Equivalent guarantee to <i>while(beg != end) erase(beg++);</i>
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ template<class KeyType, class KeyTypeKeyCompare>
+ BOOST_INTRUSIVE_DOC1ST(size_type
+ , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
+ erase(const KeyType& key, KeyTypeKeyCompare comp)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key, comp);
+ size_type n;
+ private_erase(p.first, p.second, n);
+ return n;
+ }
+
+ //! <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 complexity for erase element is constant time.
+ //!
+ //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer)
+ {
+ node_ptr to_erase(i.pointed_node());
+ iterator ret(this->erase(i));
+ disposer(this->get_value_traits().to_value_ptr(to_erase));
+ return ret;
+ }
+
+ #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>: 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 complexity for erase range is at most
+ //! O(log(size() + N)), where N is the number of elements in the range.
+ //!
+ //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
+ { size_type n; return private_erase(b, e, n, disposer); }
+
+ //! <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>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: if the priority_compare function throws then weak guarantee and heap invariants are broken.
+ //! The safest thing would be to clear or destroy the container.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key);
+ size_type n;
+ private_erase(p.first, p.second, n, disposer);
+ return n;
+ }
+
+ //! <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 "comp".
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: O(log(size() + N).
+ //!
+ //! <b>Throws</b>: if the priority_compare function throws then weak guarantee and heap invariants are broken.
+ //! The safest thing would be to clear or destroy the container.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ BOOST_INTRUSIVE_DOC1ST(size_type
+ , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
+ erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
+ {
+ std::pair<iterator,iterator> p = this->equal_range(key, comp);
+ size_type n;
+ private_erase(p.first, p.second, n, disposer);
+ return n;
+ }
+
+ //! <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()
+ { tree_type::clear(); }
+
+ //! <b>Effects</b>: Erases all of the elements calling disposer(p) for
+ //! each node to be erased.
+ //! <b>Complexity</b>: Average complexity for is at most O(log(size() + N)),
+ //! where N is the number of elements in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. Calls N times to disposer functor.
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer)
+ {
+ node_algorithms::clear_and_dispose(this->tree_type::header_ptr()
+ , detail::node_disposer<Disposer, value_traits, TreapAlgorithms>(disposer, &this->get_value_traits()));
+ node_algorithms::init_header(this->tree_type::header_ptr());
+ this->tree_type::sz_traits().set_size(0);
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_unique(treap_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+
+ if( node_algorithms::transfer_unique
+ ( this->header_ptr(), this->key_node_comp(this->key_comp())
+ , this->prio_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p) ){
+ this->sz_traits().increment();
+ source.sz_traits().decrement();
+ }
+ }
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_equal(treap_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ node_algorithms::transfer_equal
+ ( this->header_ptr(), this->key_node_comp(this->key_comp())
+ , this->prio_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p);
+ this->sz_traits().increment();
+ source.sz_traits().decrement();
+ }
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::check(ExtraChecker)const
+ template <class ExtraChecker>
+ void check(ExtraChecker extra_checker) const
+ {
+ typedef detail::key_nodeptr_comp<priority_compare, value_traits, priority_of_value> nodeptr_prio_comp_t;
+ tree_type::check(detail::treap_node_extra_checker
+ <ValueTraits, nodeptr_prio_comp_t, ExtraChecker>
+ (this->prio_node_prio_comp(this->priv_pcomp()), extra_checker));
+ }
+
+ //! @copydoc ::boost::intrusive::bstree::check()const
+ void check() const
+ { check(detail::empty_node_checker<ValueTraits>()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::bstree::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::bstree::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::bstree::remove_node
+ void remove_node(reference value);
+
+ friend bool operator< (const treap_impl &x, const treap_impl &y);
+
+ friend bool operator==(const treap_impl &x, const treap_impl &y);
+
+ friend bool operator!= (const treap_impl &x, const treap_impl &y);
+
+ friend bool operator>(const treap_impl &x, const treap_impl &y);
+
+ friend bool operator<=(const treap_impl &x, const treap_impl &y);
+
+ friend bool operator>=(const treap_impl &x, const treap_impl &y);
+
+ friend void swap(treap_impl &x, treap_impl &y);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ /// @cond
+ private:
+ template<class Disposer>
+ iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
+ {
+ for(n = 0; b != e; ++n)
+ this->erase_and_dispose(b++, disposer);
+ return b.unconst();
+ }
+
+ iterator private_erase(const_iterator b, const_iterator e, size_type &n)
+ {
+ for(n = 0; b != e; ++n)
+ this->erase(b++);
+ return b.unconst();
+ }
+ /// @endcond
+};
+
+
+//! Helper metafunction to define a \c treap 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>
+#endif
+struct make_treap
+{
+ typedef typename pack_options
+ < treap_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+
+ typedef treap_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::priority_of_value
+ , typename packed_options::priority
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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, class O7>
+#else
+template<class T, class ...Options>
+#endif
+class treap
+ : public make_treap<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_treap
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(treap)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::priority_compare priority_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::reverse_iterator reverse_iterator;
+ typedef typename Base::const_reverse_iterator const_reverse_iterator;
+
+ //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 treap()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit treap( const key_compare &cmp
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(cmp, pcmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE treap( bool unique, Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(unique, b, e, cmp, pcmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE treap(BOOST_RV_REF(treap) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE treap& operator=(BOOST_RV_REF(treap) x)
+ { return static_cast<treap&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const treap &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(treap) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static treap &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<treap &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const treap &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const treap &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static treap &container_from_iterator(iterator it)
+ { return static_cast<treap &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const treap &container_from_iterator(const_iterator it)
+ { return static_cast<const treap &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_TREAP_HPP
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/treap_algorithms.hpp b/src/third_party/boost-1.70.0/boost/intrusive/treap_algorithms.hpp
new file mode 100644
index 00000000000..a75b48bccaa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/treap_algorithms.hpp
@@ -0,0 +1,702 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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 PrioType, class PrioNodePtrPrioCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ ( const_node_ptr header
+ , const KeyType &key, KeyNodePtrCompare comp
+ , const PrioType &prio, PrioNodePtrPrioCompare 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, prio, 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 PrioType, class PrioNodePtrPrioCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ ( const_node_ptr header, node_ptr hint
+ , const KeyType &key, KeyNodePtrCompare comp
+ , const PrioType &prio, PrioNodePtrPrioCompare 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, prio, 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 PrioNodePtrPrioCompare>
+ static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, PrioNodePtrPrioCompare pcomp, node_ptr header2, node_ptr z)
+ {
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, z, 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 PrioNodePtrPrioCompare>
+ static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, PrioNodePtrPrioCompare 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.70.0/boost/intrusive/treap_set.hpp b/src/third_party/boost-1.70.0/boost/intrusive/treap_set.hpp
new file mode 100644
index 00000000000..6c0ea3b643d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/intrusive/treap_set.hpp
@@ -0,0 +1,1113 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (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_TREAP_SET_HPP
+#define BOOST_INTRUSIVE_TREAP_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/treap.hpp>
+#include <boost/intrusive/detail/mpl.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 {
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioOfValue, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class treap_multiset_impl;
+#endif
+
+//! The class template treap_set is an intrusive container, that mimics most of
+//! the interface of std::set as described in the C++ standard.
+//!
+//! 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 compare<> and \c priority_compare<>
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioOfValue, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class treap_set_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder>
+#endif
+{
+ /// @cond
+ public:
+ typedef treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set_impl)
+
+ typedef tree_type implementation_defined;
+ /// @endcond
+
+ public:
+ typedef typename implementation_defined::value_type value_type;
+ typedef typename implementation_defined::value_traits value_traits;
+ typedef typename implementation_defined::key_type key_type;
+ typedef typename implementation_defined::key_of_value key_of_value;
+ 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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::priority_type priority_type;
+ typedef typename implementation_defined::priority_compare priority_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+
+ public:
+ //! @copydoc ::boost::intrusive::treap::treap()
+ treap_set_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::treap::treap(const key_compare &,const priority_compare &,const value_traits &)
+ explicit treap_set_impl( const key_compare &cmp
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(cmp, pcmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::treap::treap(bool,Iterator,Iterator,const key_compare &,const priority_compare &,const value_traits &)
+ template<class Iterator>
+ treap_set_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(true, b, e, cmp, pcmp, v_traits)
+ {}
+
+ //! <b>Effects</b>: to-do
+ //!
+ treap_set_impl(BOOST_RV_REF(treap_set_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! <b>Effects</b>: to-do
+ //!
+ treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x)
+ { return static_cast<treap_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::treap::~treap()
+ ~treap_set_impl();
+
+ //! @copydoc ::boost::intrusive::treap::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::treap::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::treap::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::treap::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::treap::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::treap::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::treap::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::treap::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::treap::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::treap::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::treap::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::treap::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::treap::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::treap::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::treap::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
+ static treap_set_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
+ static const treap_set_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
+ static treap_set_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
+ static const treap_set_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::treap::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::treap::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::treap::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::treap::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::treap::swap
+ void swap(treap_set_impl& other);
+
+ //! @copydoc ::boost::intrusive::treap::clone_from(const treap&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const treap_set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif
+
+ //! @copydoc ::boost::intrusive::treap::clone_from(treap&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(treap_set_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::intrusive::treap::top()
+ iterator top();
+
+ //! @copydoc ::boost::intrusive::treap::top()const
+ const_iterator top() const;
+
+ //! @copydoc ::boost::intrusive::treap::ctop()const
+ const_iterator ctop() const;
+
+ //! @copydoc ::boost::intrusive::treap::rtop()
+ reverse_iterator rtop();
+
+ //! @copydoc ::boost::intrusive::treap::rtop()const
+ const_reverse_iterator rtop() const;
+
+ //! @copydoc ::boost::intrusive::treap::crtop()const
+ const_reverse_iterator crtop() const;
+
+ //! @copydoc ::boost::intrusive::treap::crtop() const
+ priority_compare priority_comp() const;
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique(reference)
+ std::pair<iterator, bool> insert(reference value)
+ { return tree_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_unique(hint, value); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique_check(const key_type&,const priority_type &,insert_commit_data&)
+ std::pair<iterator, bool> insert_check( const key_type &key, const priority_type &prio, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, prio, commit_data); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique_check(const_iterator,const key_type&,const priority_type &,insert_commit_data&)
+ std::pair<iterator, bool> insert_check
+ ( const_iterator hint, const key_type &key, const priority_type &prio, insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, prio, commit_data); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique_check(const KeyType&,KeyTypeKeyCompare,PrioValuePrioCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare, class PrioType, class PrioValuePrioCompare>
+ std::pair<iterator, bool> insert_check
+ ( const KeyType &key, KeyTypeKeyCompare comp, const PrioType &prio, PrioValuePrioCompare pcomp
+ , insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(key, comp, prio, pcomp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,PrioValuePrioCompare,insert_commit_data&)
+ template<class KeyType, class KeyTypeKeyCompare, class PrioType, class PrioValuePrioCompare>
+ std::pair<iterator, bool> insert_check
+ ( const_iterator hint
+ , const KeyType &key, KeyTypeKeyCompare comp
+ , const PrioType &prio, PrioValuePrioCompare pcomp
+ , insert_commit_data &commit_data)
+ { return tree_type::insert_unique_check(hint, key, comp, prio, pcomp, commit_data); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_unique_commit
+ iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return tree_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::treap::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::treap::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::treap::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::treap::count(const key_type &)const
+ size_type count(const key_type &key) const
+ { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
+
+ //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
+ { return this->tree_type::equal_range(key, comp); }
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->tree_type::lower_bound_range(key); }
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
+ { return this->tree_type::equal_range(key, comp); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::treap::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::treap::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::treap::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::treap::remove_node
+ void remove_node(reference value);
+
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ template<class Compare2>
+ void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+
+//! Helper metafunction to define a \c treap_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>
+#endif
+struct make_treap_set
+{
+ typedef typename pack_options
+ < treap_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+
+ typedef treap_set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::priority_of_value
+ , typename packed_options::priority
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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, class O7>
+#else
+template<class T, class ...Options>
+#endif
+class treap_set
+ : public make_treap_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_treap_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::priority_compare priority_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 treap_set()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit treap_set( const key_compare &cmp
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(cmp, pcmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE treap_set( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, pcmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE treap_set(BOOST_RV_REF(treap_set) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE treap_set& operator=(BOOST_RV_REF(treap_set) x)
+ { return static_cast<treap_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const treap_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(treap_set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static treap_set &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const treap_set &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const treap_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static treap_set &container_from_iterator(iterator it)
+ { return static_cast<treap_set &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const treap_set &container_from_iterator(const_iterator it)
+ { return static_cast<const treap_set &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+//! The class template treap_multiset is an intrusive container, that mimics most of
+//! the interface of std::treap_multiset as described in the C++ standard.
+//!
+//! 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 compare<> and \c priority_compare<>
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioOfValue, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+#endif
+class treap_multiset_impl
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder>
+#endif
+{
+ /// @cond
+ typedef treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset_impl)
+
+ typedef tree_type implementation_defined;
+ /// @endcond
+
+ public:
+ typedef typename implementation_defined::value_type value_type;
+ typedef typename implementation_defined::value_traits value_traits;
+ typedef typename implementation_defined::key_type key_type;
+ typedef typename implementation_defined::key_of_value key_of_value;
+ 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::value_compare value_compare;
+ typedef typename implementation_defined::key_compare key_compare;
+ typedef typename implementation_defined::priority_type priority_type;
+ typedef typename implementation_defined::priority_compare priority_compare;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::reverse_iterator reverse_iterator;
+ typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ 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;
+
+ static const bool constant_time_size = implementation_defined::constant_time_size;
+
+ public:
+
+ //! @copydoc ::boost::intrusive::treap::treap()
+ treap_multiset_impl()
+ : tree_type()
+ {}
+
+ //! @copydoc ::boost::intrusive::treap::treap(const key_compare &,const priority_compare &,const value_traits &)
+ explicit treap_multiset_impl( const key_compare &cmp
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(cmp, pcmp, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::treap::treap(bool,Iterator,Iterator,const key_compare &,const priority_compare &,const value_traits &)
+ template<class Iterator>
+ treap_multiset_impl( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : tree_type(false, b, e, cmp, pcmp, v_traits)
+ {}
+
+ //! <b>Effects</b>: to-do
+ //!
+ treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x)
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
+ {}
+
+ //! <b>Effects</b>: to-do
+ //!
+ treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x)
+ { return static_cast<treap_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::treap::~treap()
+ ~treap_multiset_impl();
+
+ //! @copydoc ::boost::intrusive::treap::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::treap::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::treap::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::treap::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::treap::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::treap::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::treap::rbegin()
+ reverse_iterator rbegin();
+
+ //! @copydoc ::boost::intrusive::treap::rbegin()const
+ const_reverse_iterator rbegin() const;
+
+ //! @copydoc ::boost::intrusive::treap::crbegin()const
+ const_reverse_iterator crbegin() const;
+
+ //! @copydoc ::boost::intrusive::treap::rend()
+ reverse_iterator rend();
+
+ //! @copydoc ::boost::intrusive::treap::rend()const
+ const_reverse_iterator rend() const;
+
+ //! @copydoc ::boost::intrusive::treap::crend()const
+ const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::treap::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::treap::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::treap::croot()const
+ const_iterator croot() const;
+
+ //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
+ static treap_multiset_impl &container_from_end_iterator(iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
+ static const treap_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
+
+ //! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
+ static treap_multiset_impl &container_from_iterator(iterator it);
+
+ //! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
+ static const treap_multiset_impl &container_from_iterator(const_iterator it);
+
+ //! @copydoc ::boost::intrusive::treap::key_comp()const
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::intrusive::treap::value_comp()const
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::intrusive::treap::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::treap::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::treap::swap
+ void swap(treap_multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::treap::clone_from(const treap&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const treap_multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using tree_type::clone_from;
+
+ #endif
+
+ //! @copydoc ::boost::intrusive::treap::clone_from(treap&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(treap_multiset_impl) src, Cloner cloner, Disposer disposer)
+ { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::intrusive::treap::top()
+ iterator top();
+
+ //! @copydoc ::boost::intrusive::treap::top()const
+ const_iterator top() const;
+
+ //! @copydoc ::boost::intrusive::treap::ctop()const
+ const_iterator ctop() const;
+
+ //! @copydoc ::boost::intrusive::treap::rtop()
+ reverse_iterator rtop();
+
+ //! @copydoc ::boost::intrusive::treap::rtop()const
+ const_reverse_iterator rtop() const;
+
+ //! @copydoc ::boost::intrusive::treap::crtop()const
+ const_reverse_iterator crtop() const;
+
+ //! @copydoc ::boost::intrusive::treap::crtop() const
+ priority_compare priority_comp() const;
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::treap::insert_equal(reference)
+ iterator insert(reference value)
+ { return tree_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_equal(const_iterator,reference)
+ iterator insert(const_iterator hint, reference value)
+ { return tree_type::insert_equal(hint, value); }
+
+ //! @copydoc ::boost::intrusive::treap::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ void insert(Iterator b, Iterator e)
+ { tree_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::treap::insert_before
+ iterator insert_before(const_iterator pos, reference value);
+
+ //! @copydoc ::boost::intrusive::treap::push_back
+ void push_back(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::push_front
+ void push_front(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const_iterator)
+ iterator erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::erase(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
+ template<class KeyType, class KeyTypeKeyCompare, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::treap::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::treap::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)
+ iterator lower_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)const
+ const_iterator lower_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)
+ iterator upper_bound(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)const
+ const_iterator upper_bound(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ iterator find(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::find(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)
+ std::pair<iterator,iterator> bounded_range
+ (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<iterator,iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)const
+ std::pair<const_iterator, const_iterator>
+ bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
+ template<class KeyType, class KeyTypeKeyCompare>
+ std::pair<const_iterator, const_iterator> bounded_range
+ (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
+
+ //! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
+ static iterator s_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
+ static const_iterator s_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::treap::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::treap::init_node(reference)
+ static void init_node(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
+ pointer unlink_leftmost_without_rebalance();
+
+ //! @copydoc ::boost::intrusive::treap::replace_node
+ void replace_node(iterator replace_this, reference with_this);
+
+ //! @copydoc ::boost::intrusive::treap::remove_node
+ void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioOfValue, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+
+//! Helper metafunction to define a \c treap_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>
+#endif
+struct make_treap_multiset
+{
+ typedef typename pack_options
+ < treap_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+
+ typedef treap_multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::compare
+ , typename packed_options::priority_of_value
+ , typename packed_options::priority
+ , typename packed_options::size_type
+ , packed_options::constant_time_size
+ , 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, class O7>
+#else
+template<class T, class ...Options>
+#endif
+class treap_multiset
+ : public make_treap_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_treap_multiset
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset)
+
+ public:
+ typedef typename Base::key_compare key_compare;
+ typedef typename Base::priority_compare priority_compare;
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+
+ //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 treap_multiset()
+ : Base()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit treap_multiset( const key_compare &cmp
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(cmp, pcmp, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE treap_multiset( Iterator b, Iterator e
+ , const key_compare &cmp = key_compare()
+ , const priority_compare &pcmp = priority_compare()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, cmp, pcmp, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE treap_multiset(BOOST_RV_REF(treap_multiset) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE treap_multiset& operator=(BOOST_RV_REF(treap_multiset) x)
+ { return static_cast<treap_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const treap_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(treap_multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static treap_multiset &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const treap_multiset &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static treap_multiset &container_from_iterator(iterator it)
+ { return static_cast<treap_multiset &>(Base::container_from_iterator(it)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static const treap_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const treap_multiset &>(Base::container_from_iterator(it)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_TREAP_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/trivial_value_traits.hpp b/src/third_party/boost-1.70.0/boost/intrusive/trivial_value_traits.hpp
index 84fac665d14..84fac665d14 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/trivial_value_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/intrusive/unordered_set.hpp
index 5588cb160ab..5588cb160ab 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive/unordered_set.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive/unordered_set.hpp
diff --git a/src/third_party/boost-1.70.0/boost/intrusive/unordered_set_hook.hpp b/src/third_party/boost-1.70.0/boost/intrusive/unordered_set_hook.hpp
new file mode 100644
index 00000000000..54a04d373c1
--- /dev/null
+++ b/src/third_party/boost-1.70.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;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
+ { return pointer_traits<node_ptr>::static_cast_from(n->next_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
+ { n->next_ = next; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
+ { return n->prev_in_group_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(node_ptr n, node_ptr prev)
+ { n->prev_in_group_ = prev; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
+ { return n->hash_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE 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;
+
+ BOOST_INTRUSIVE_FORCEINLINE static void init(typename base_type::node_ptr n)
+ {
+ base_type::init(n);
+ group_algorithms::init(n);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(typename base_type::node_ptr n)
+ {
+ base_type::init_header(n);
+ group_algorithms::init_header(n);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE 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.69.0/boost/intrusive_ptr.hpp b/src/third_party/boost-1.70.0/boost/intrusive_ptr.hpp
index c43adbdc0dc..c43adbdc0dc 100644
--- a/src/third_party/boost-1.69.0/boost/intrusive_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/intrusive_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/io/detail/quoted_manip.hpp b/src/third_party/boost-1.70.0/boost/io/detail/quoted_manip.hpp
index 502f422aa1a..502f422aa1a 100644
--- a/src/third_party/boost-1.69.0/boost/io/detail/quoted_manip.hpp
+++ b/src/third_party/boost-1.70.0/boost/io/detail/quoted_manip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/io/ios_state.hpp b/src/third_party/boost-1.70.0/boost/io/ios_state.hpp
index 07cfb345ff5..07cfb345ff5 100644
--- a/src/third_party/boost-1.69.0/boost/io/ios_state.hpp
+++ b/src/third_party/boost-1.70.0/boost/io/ios_state.hpp
diff --git a/src/third_party/boost-1.69.0/boost/io_fwd.hpp b/src/third_party/boost-1.70.0/boost/io_fwd.hpp
index 417b81e3e12..417b81e3e12 100644
--- a/src/third_party/boost-1.69.0/boost/io_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/io_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/categories.hpp b/src/third_party/boost-1.70.0/boost/iostreams/categories.hpp
index 0e84de1e985..0e84de1e985 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/categories.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/chain.hpp
index 5a17b8c4724..5a17b8c4724 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/chain.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/chain.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/char_traits.hpp b/src/third_party/boost-1.70.0/boost/iostreams/char_traits.hpp
index 76ddf9d4f26..76ddf9d4f26 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/char_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/char_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/checked_operations.hpp b/src/third_party/boost-1.70.0/boost/iostreams/checked_operations.hpp
index 667d9254438..667d9254438 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/checked_operations.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/checked_operations.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/close.hpp b/src/third_party/boost-1.70.0/boost/iostreams/close.hpp
index 8ae499ff26c..8ae499ff26c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/close.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/close.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/code_converter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/code_converter.hpp
index 0bac461d440..0bac461d440 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/code_converter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/code_converter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/combine.hpp b/src/third_party/boost-1.70.0/boost/iostreams/combine.hpp
index 107122a97bb..107122a97bb 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/combine.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/combine.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/compose.hpp b/src/third_party/boost-1.70.0/boost/iostreams/compose.hpp
index 6d62721f330..6d62721f330 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/compose.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/compose.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/concepts.hpp b/src/third_party/boost-1.70.0/boost/iostreams/concepts.hpp
index da4bfd69509..da4bfd69509 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/concepts.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/concepts.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/constants.hpp b/src/third_party/boost-1.70.0/boost/iostreams/constants.hpp
index 55e6f5fdf32..55e6f5fdf32 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/constants.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/constants.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/copy.hpp b/src/third_party/boost-1.70.0/boost/iostreams/copy.hpp
index d165cc0e013..d165cc0e013 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/absolute_path.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/absolute_path.hpp
index 090958a95eb..090958a95eb 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/absolute_path.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/absolute_path.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/access_control.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/access_control.hpp
index 9c3328a2265..9c3328a2265 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/access_control.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/access_control.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/concept_adapter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/concept_adapter.hpp
index 05b5ff4ca72..05b5ff4ca72 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/concept_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/concept_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/device_adapter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/device_adapter.hpp
index 9dd723a0fd1..9dd723a0fd1 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/device_adapter.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/adapter/direct_adapter.hpp
index 60fe8c274f7..60fe8c274f7 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/direct_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/direct_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/filter_adapter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/filter_adapter.hpp
index a2ab49250b9..a2ab49250b9 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/filter_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/filter_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/mode_adapter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/mode_adapter.hpp
index 46e83c58af5..46e83c58af5 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/mode_adapter.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
index 85794d0daa4..85794d0daa4 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
index 2ed9039c7ba..2ed9039c7ba 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/range_adapter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/range_adapter.hpp
index b7fe56f7ed9..b7fe56f7ed9 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/range_adapter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/adapter/range_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/add_facet.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/add_facet.hpp
index 6033d4f8a1e..6033d4f8a1e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/add_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/add_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/bool_trait_def.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/bool_trait_def.hpp
index c3fb9d587b9..c3fb9d587b9 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/bool_trait_def.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/bool_trait_def.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp
index 4444916c3ae..4444916c3ae 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp
index 834f996f40e..834f996f40e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
index d5c7107087e..d5c7107087e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/buffer.hpp
index 59617f4eb3e..59617f4eb3e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/buffer.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/buffer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/call_traits.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/call_traits.hpp
index be6123737be..be6123737be 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/call_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/call_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/char_traits.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/char_traits.hpp
index ce3eb6dbe7b..ce3eb6dbe7b 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/char_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/char_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_helper.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/codecvt_helper.hpp
index 0bd8d598ea9..0bd8d598ea9 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_helper.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/codecvt_helper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_holder.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/codecvt_holder.hpp
index 13a93334ebe..13a93334ebe 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/codecvt_holder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/auto_link.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/auto_link.hpp
index 07ab23c3c1d..07ab23c3c1d 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/auto_link.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/auto_link.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/bzip2.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/bzip2.hpp
index bfcda405600..bfcda405600 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/bzip2.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/config/codecvt.hpp
index 48adf4da800..48adf4da800 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/codecvt.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/codecvt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/disable_warnings.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/disable_warnings.hpp
index ef25cdb907a..ef25cdb907a 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/disable_warnings.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/disable_warnings.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/dyn_link.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/dyn_link.hpp
index cc8c73bd909..cc8c73bd909 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/dyn_link.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/dyn_link.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/enable_warnings.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/enable_warnings.hpp
index 5712f364423..5712f364423 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/enable_warnings.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/enable_warnings.hpp
diff --git a/src/third_party/boost-1.70.0/boost/iostreams/detail/config/fpos.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/fpos.hpp
new file mode 100644
index 00000000000..c5dc6cf59d9
--- /dev/null
+++ b/src/third_party/boost-1.70.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) || defined(BOOST_CLANG)) && _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.69.0/boost/iostreams/detail/config/gcc.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/gcc.hpp
index ff6892a5e52..ff6892a5e52 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/gcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/gcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/limits.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/limits.hpp
index 155d6b0a69c..155d6b0a69c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/overload_resolution.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/overload_resolution.hpp
index 63d9e2830d5..63d9e2830d5 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/overload_resolution.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/overload_resolution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/rtl.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/rtl.hpp
index d9fbe5080de..d9fbe5080de 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/rtl.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/rtl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/unreachable_return.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/unreachable_return.hpp
index 65fba609deb..65fba609deb 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/unreachable_return.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/config/wide_streams.hpp
index ca8dff38f5c..ca8dff38f5c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/wide_streams.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/wide_streams.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/windows_posix.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/windows_posix.hpp
index 4e73c50d0de..4e73c50d0de 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/windows_posix.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/windows_posix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/zlib.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/zlib.hpp
index 017dd0c1828..017dd0c1828 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/zlib.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/config/zlib.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/counted_array.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/counted_array.hpp
index c0cd8a17654..c0cd8a17654 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/counted_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/counted_array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/current_directory.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/current_directory.hpp
index 374444c59f1..374444c59f1 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/current_directory.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/current_directory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/default_arg.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/default_arg.hpp
index c443e9872ab..c443e9872ab 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/default_arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/default_arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/dispatch.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/dispatch.hpp
index 35cf244141b..35cf244141b 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/dispatch.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/dispatch.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/double_object.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/double_object.hpp
index efb3b786010..efb3b786010 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/double_object.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/double_object.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/enable_if_stream.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/enable_if_stream.hpp
index 826e44d2a55..826e44d2a55 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/enable_if_stream.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/enable_if_stream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/error.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/error.hpp
index 85cbd98fe26..85cbd98fe26 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/error.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/error.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/execute.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/execute.hpp
index 28e42172344..28e42172344 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/execute.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/execute.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/file_handle.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/file_handle.hpp
index d797efb29a0..d797efb29a0 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/file_handle.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/file_handle.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/forward.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/forward.hpp
index f5ed4f85dc9..f5ed4f85dc9 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/fstream.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/fstream.hpp
index 848258d97c0..848258d97c0 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/fstream.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/fstream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/functional.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/functional.hpp
index 97b7fe5e758..97b7fe5e758 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/functional.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/functional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/ios.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/ios.hpp
index b123ddeb58e..b123ddeb58e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/ios.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/ios.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/iostream.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/iostream.hpp
index 1e19f082785..1e19f082785 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/iostream.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/iostream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/is_dereferenceable.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/is_dereferenceable.hpp
index 06744abbdf1..06744abbdf1 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/is_dereferenceable.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/is_dereferenceable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/is_iterator_range.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/is_iterator_range.hpp
index 39d845f4a37..39d845f4a37 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/is_iterator_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/is_iterator_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/newline.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/newline.hpp
index d6fceb04b0c..d6fceb04b0c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/newline.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/newline.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/optional.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/optional.hpp
index 867dfbda690..867dfbda690 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/optional.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/optional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/param_type.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/param_type.hpp
index 3a9949348cc..3a9949348cc 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/param_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/param_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/path.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/path.hpp
index a5d1ad330f0..a5d1ad330f0 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/path.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/path.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/push.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/push.hpp
index 1a9393cb026..1a9393cb026 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/push.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/push.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/push_params.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/push_params.hpp
index 8d8e5d74b36..8d8e5d74b36 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/push_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/push_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/resolve.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/resolve.hpp
index 2d480950e11..2d480950e11 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/resolve.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/restrict_impl.hpp
index e949b6ac479..e949b6ac479 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/restrict_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/restrict_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/select.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/select.hpp
index 16c5973ad11..16c5973ad11 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/select.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/select.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/select_by_size.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/select_by_size.hpp
index e08ca3458b6..e08ca3458b6 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/select_by_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/select_by_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf.hpp
index f2e8081b20c..f2e8081b20c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/chainbuf.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/chainbuf.hpp
index c3714fe041c..c3714fe041c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/chainbuf.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
index a55c4621efa..a55c4621efa 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
index 6eb10507171..6eb10507171 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
index 708c2c42aba..708c2c42aba 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/system_failure.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/system_failure.hpp
index 10b291a516f..10b291a516f 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/system_failure.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/system_failure.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/template_params.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/template_params.hpp
index b07012fb825..b07012fb825 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/template_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/template_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/translate_int_type.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/translate_int_type.hpp
index ae48a2c46fe..ae48a2c46fe 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/translate_int_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/translate_int_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/wrap_unwrap.hpp b/src/third_party/boost-1.70.0/boost/iostreams/detail/wrap_unwrap.hpp
index f5f97897f9e..f5f97897f9e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/detail/wrap_unwrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/detail/wrap_unwrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/device/array.hpp b/src/third_party/boost-1.70.0/boost/iostreams/device/array.hpp
index 768a5644a11..768a5644a11 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/device/array.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/device/array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/device/back_inserter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/device/back_inserter.hpp
index 669c889e0ad..669c889e0ad 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/device/back_inserter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/device/back_inserter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/device/file.hpp b/src/third_party/boost-1.70.0/boost/iostreams/device/file.hpp
index 3eb0301647e..3eb0301647e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/device/file.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/device/file.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/device/file_descriptor.hpp b/src/third_party/boost-1.70.0/boost/iostreams/device/file_descriptor.hpp
index 5d6af128147..5d6af128147 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/device/file_descriptor.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/device/file_descriptor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/device/mapped_file.hpp b/src/third_party/boost-1.70.0/boost/iostreams/device/mapped_file.hpp
index 1332beabd14..1332beabd14 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/device/mapped_file.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/device/mapped_file.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/device/null.hpp b/src/third_party/boost-1.70.0/boost/iostreams/device/null.hpp
index a3943d7436b..a3943d7436b 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/device/null.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/device/null.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/aggregate.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/aggregate.hpp
index a645a75a2ea..a645a75a2ea 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/aggregate.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/filter/bzip2.hpp
index 249e43a04fc..249e43a04fc 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/bzip2.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/bzip2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/counter.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/counter.hpp
index 8cf775e7037..8cf775e7037 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/counter.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/counter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/grep.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/grep.hpp
index b30309734e2..b30309734e2 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/grep.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/grep.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/gzip.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/gzip.hpp
index e236983e0ba..e236983e0ba 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/gzip.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/gzip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/line.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/line.hpp
index 2c66f0ed91a..2c66f0ed91a 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/line.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/line.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/lzma.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/lzma.hpp
index 94cd2b3b54e..94cd2b3b54e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/lzma.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/lzma.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/newline.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/newline.hpp
index 57a36395eda..57a36395eda 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/newline.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/newline.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/regex.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/regex.hpp
index e943553c61b..e943553c61b 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/stdio.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/stdio.hpp
index 5ad921b2cea..5ad921b2cea 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/stdio.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/stdio.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/symmetric.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/symmetric.hpp
index f18089f4fb8..f18089f4fb8 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/symmetric.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/symmetric.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/test.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/test.hpp
index 00e2dffd4cb..00e2dffd4cb 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/test.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/test.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/zlib.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filter/zlib.hpp
index e57870a510f..e57870a510f 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/zlib.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iostreams/filter/zstd.hpp
index 176799d937f..176799d937f 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filter/zstd.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filter/zstd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filtering_stream.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filtering_stream.hpp
index 8621ef96b2e..8621ef96b2e 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filtering_stream.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filtering_stream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filtering_streambuf.hpp b/src/third_party/boost-1.70.0/boost/iostreams/filtering_streambuf.hpp
index affe4a71c43..affe4a71c43 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/filtering_streambuf.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/filtering_streambuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/flush.hpp b/src/third_party/boost-1.70.0/boost/iostreams/flush.hpp
index 5212a448f1a..5212a448f1a 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/flush.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/flush.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/get.hpp b/src/third_party/boost-1.70.0/boost/iostreams/get.hpp
index 12d530fd816..12d530fd816 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/get.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/get.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/imbue.hpp b/src/third_party/boost-1.70.0/boost/iostreams/imbue.hpp
index 48d2e1845ac..48d2e1845ac 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/imbue.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/imbue.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/input_sequence.hpp b/src/third_party/boost-1.70.0/boost/iostreams/input_sequence.hpp
index e504c8e8ff9..e504c8e8ff9 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/input_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/input_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/invert.hpp b/src/third_party/boost-1.70.0/boost/iostreams/invert.hpp
index d4a17bf7f33..d4a17bf7f33 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/invert.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/invert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/operations.hpp b/src/third_party/boost-1.70.0/boost/iostreams/operations.hpp
index 28bd7731723..28bd7731723 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/operations.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/operations.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/operations_fwd.hpp b/src/third_party/boost-1.70.0/boost/iostreams/operations_fwd.hpp
index ae68d704676..ae68d704676 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/operations_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/operations_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/optimal_buffer_size.hpp b/src/third_party/boost-1.70.0/boost/iostreams/optimal_buffer_size.hpp
index 13894faab86..13894faab86 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/optimal_buffer_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/optimal_buffer_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/output_sequence.hpp b/src/third_party/boost-1.70.0/boost/iostreams/output_sequence.hpp
index 5b42bf457df..5b42bf457df 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/output_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/output_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/pipeline.hpp b/src/third_party/boost-1.70.0/boost/iostreams/pipeline.hpp
index d29c2da3f75..d29c2da3f75 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/pipeline.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/pipeline.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/positioning.hpp b/src/third_party/boost-1.70.0/boost/iostreams/positioning.hpp
index 12f2afc84b6..12f2afc84b6 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/positioning.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/positioning.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/put.hpp b/src/third_party/boost-1.70.0/boost/iostreams/put.hpp
index a3fe33f2071..a3fe33f2071 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/put.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/put.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/putback.hpp b/src/third_party/boost-1.70.0/boost/iostreams/putback.hpp
index a4969f641a7..a4969f641a7 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/putback.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/putback.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/read.hpp b/src/third_party/boost-1.70.0/boost/iostreams/read.hpp
index a8652c5644b..a8652c5644b 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/read.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/read.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/restrict.hpp b/src/third_party/boost-1.70.0/boost/iostreams/restrict.hpp
index e17eb8c9659..e17eb8c9659 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/restrict.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/restrict.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/seek.hpp b/src/third_party/boost-1.70.0/boost/iostreams/seek.hpp
index 148c90bfa8c..148c90bfa8c 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/seek.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/seek.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/skip.hpp b/src/third_party/boost-1.70.0/boost/iostreams/skip.hpp
index eb097dd7bb5..eb097dd7bb5 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/skip.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/skip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/slice.hpp b/src/third_party/boost-1.70.0/boost/iostreams/slice.hpp
index 820a316fe1b..820a316fe1b 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/slice.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/slice.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/stream.hpp b/src/third_party/boost-1.70.0/boost/iostreams/stream.hpp
index c581837b754..c581837b754 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/stream.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/stream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/stream_buffer.hpp b/src/third_party/boost-1.70.0/boost/iostreams/stream_buffer.hpp
index dbcb786c659..dbcb786c659 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/stream_buffer.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/stream_buffer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/tee.hpp b/src/third_party/boost-1.70.0/boost/iostreams/tee.hpp
index 6df85e9b402..6df85e9b402 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/tee.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/tee.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/traits.hpp b/src/third_party/boost-1.70.0/boost/iostreams/traits.hpp
index f8d7a3ff5b8..f8d7a3ff5b8 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/traits_fwd.hpp b/src/third_party/boost-1.70.0/boost/iostreams/traits_fwd.hpp
index a3e952623a6..a3e952623a6 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/traits_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/traits_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/write.hpp b/src/third_party/boost-1.70.0/boost/iostreams/write.hpp
index 8faf986ae03..8faf986ae03 100644
--- a/src/third_party/boost-1.69.0/boost/iostreams/write.hpp
+++ b/src/third_party/boost-1.70.0/boost/iostreams/write.hpp
diff --git a/src/third_party/boost-1.69.0/boost/is_placeholder.hpp b/src/third_party/boost-1.70.0/boost/is_placeholder.hpp
index 5f1b544f944..5f1b544f944 100644
--- a/src/third_party/boost-1.69.0/boost/is_placeholder.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/iterator/advance.hpp
index 92af8fbfe63..92af8fbfe63 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/advance.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/advance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp b/src/third_party/boost-1.70.0/boost/iterator/counting_iterator.hpp
index d90980e1179..d90980e1179 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/counting_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/detail/config_def.hpp b/src/third_party/boost-1.70.0/boost/iterator/detail/config_def.hpp
index 117e75a76d4..117e75a76d4 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/detail/config_def.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/detail/config_def.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/detail/config_undef.hpp b/src/third_party/boost-1.70.0/boost/iterator/detail/config_undef.hpp
index bf1b8d708c5..bf1b8d708c5 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/detail/config_undef.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/detail/config_undef.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/detail/enable_if.hpp b/src/third_party/boost-1.70.0/boost/iterator/detail/enable_if.hpp
index 071f5fe81d4..071f5fe81d4 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/detail/enable_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/detail/enable_if.hpp
diff --git a/src/third_party/boost-1.70.0/boost/iterator/detail/facade_iterator_category.hpp b/src/third_party/boost-1.70.0/boost/iterator/detail/facade_iterator_category.hpp
new file mode 100644
index 00000000000..6db45e45392
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/iterator/detail/facade_iterator_category.hpp
@@ -0,0 +1,194 @@
+// Copyright David Abrahams 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)
+#ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
+# define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
+
+# include <boost/core/use_default.hpp>
+
+# include <boost/iterator/iterator_categories.hpp>
+
+# include <boost/mpl/or.hpp> // used in iterator_tag inheritance logic
+# include <boost/mpl/and.hpp>
+# include <boost/mpl/if.hpp>
+# include <boost/mpl/eval_if.hpp>
+# include <boost/mpl/identity.hpp>
+# include <boost/mpl/assert.hpp>
+
+# include <boost/type_traits/is_same.hpp>
+# include <boost/type_traits/is_const.hpp>
+# include <boost/type_traits/is_reference.hpp>
+# include <boost/type_traits/is_convertible.hpp>
+
+# include <boost/type_traits/is_same.hpp>
+
+# include <boost/iterator/detail/config_def.hpp> // try to keep this last
+
+# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+# include <boost/detail/indirect_traits.hpp>
+# endif
+
+//
+// iterator_category deduction for iterator_facade
+//
+
+namespace boost {
+namespace iterators {
+
+using boost::use_default;
+
+namespace detail {
+
+struct input_output_iterator_tag
+ : std::input_iterator_tag
+{
+ // Using inheritance for only input_iterator_tag helps to avoid
+ // ambiguities when a stdlib implementation dispatches on a
+ // function which is overloaded on both input_iterator_tag and
+ // output_iterator_tag, as STLPort does, in its __valid_range
+ // function. I claim it's better to avoid the ambiguity in these
+ // cases.
+ operator std::output_iterator_tag() const
+ {
+ return std::output_iterator_tag();
+ }
+};
+
+//
+// True iff the user has explicitly disabled writability of this
+// iterator. Pass the iterator_facade's Value parameter and its
+// nested ::reference type.
+//
+template <class ValueParam, class Reference>
+struct iterator_writability_disabled
+# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic?
+ : mpl::or_<
+ is_const<Reference>
+ , boost::detail::indirect_traits::is_reference_to_const<Reference>
+ , is_const<ValueParam>
+ >
+# else
+ : is_const<ValueParam>
+# endif
+{};
+
+
+//
+// Convert an iterator_facade's traversal category, Value parameter,
+// and ::reference type to an appropriate old-style category.
+//
+// Due to changeset 21683, this now never results in a category convertible
+// to output_iterator_tag.
+//
+// Change at: https://svn.boost.org/trac/boost/changeset/21683
+template <class Traversal, class ValueParam, class Reference>
+struct iterator_facade_default_category
+ : mpl::eval_if<
+ mpl::and_<
+ is_reference<Reference>
+ , is_convertible<Traversal,forward_traversal_tag>
+ >
+ , mpl::eval_if<
+ is_convertible<Traversal,random_access_traversal_tag>
+ , mpl::identity<std::random_access_iterator_tag>
+ , mpl::if_<
+ is_convertible<Traversal,bidirectional_traversal_tag>
+ , std::bidirectional_iterator_tag
+ , std::forward_iterator_tag
+ >
+ >
+ , typename mpl::eval_if<
+ mpl::and_<
+ is_convertible<Traversal, single_pass_traversal_tag>
+
+ // check for readability
+ , is_convertible<Reference, ValueParam>
+ >
+ , mpl::identity<std::input_iterator_tag>
+ , mpl::identity<Traversal>
+ >
+ >
+{
+};
+
+// True iff T is convertible to an old-style iterator category.
+template <class T>
+struct is_iterator_category
+ : mpl::or_<
+ is_convertible<T,std::input_iterator_tag>
+ , is_convertible<T,std::output_iterator_tag>
+ >
+{
+};
+
+template <class T>
+struct is_iterator_traversal
+ : is_convertible<T,incrementable_traversal_tag>
+{};
+
+//
+// A composite iterator_category tag convertible to Category (a pure
+// old-style category) and Traversal (a pure traversal tag).
+// Traversal must be a strict increase of the traversal power given by
+// Category.
+//
+template <class Category, class Traversal>
+struct iterator_category_with_traversal
+ : Category, Traversal
+{
+ // Make sure this isn't used to build any categories where
+ // convertibility to Traversal is redundant. Should just use the
+ // Category element in that case.
+ BOOST_MPL_ASSERT_NOT((
+ is_convertible<
+ typename iterator_category_to_traversal<Category>::type
+ , Traversal
+ >));
+
+ BOOST_MPL_ASSERT((is_iterator_category<Category>));
+ BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
+ BOOST_MPL_ASSERT_NOT((is_iterator_traversal<Category>));
+# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+ BOOST_MPL_ASSERT((is_iterator_traversal<Traversal>));
+# endif
+};
+
+// Computes an iterator_category tag whose traversal is Traversal and
+// which is appropriate for an iterator
+template <class Traversal, class ValueParam, class Reference>
+struct facade_iterator_category_impl
+{
+ BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
+
+ typedef typename iterator_facade_default_category<
+ Traversal,ValueParam,Reference
+ >::type category;
+
+ typedef typename mpl::if_<
+ is_same<
+ Traversal
+ , typename iterator_category_to_traversal<category>::type
+ >
+ , category
+ , iterator_category_with_traversal<category,Traversal>
+ >::type type;
+};
+
+//
+// Compute an iterator_category for iterator_facade
+//
+template <class CategoryOrTraversal, class ValueParam, class Reference>
+struct facade_iterator_category
+ : mpl::eval_if<
+ is_iterator_category<CategoryOrTraversal>
+ , mpl::identity<CategoryOrTraversal> // old-style categories are fine as-is
+ , facade_iterator_category_impl<CategoryOrTraversal,ValueParam,Reference>
+ >
+{
+};
+
+}}} // namespace boost::iterators::detail
+
+# include <boost/iterator/detail/config_undef.hpp>
+
+#endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
diff --git a/src/third_party/boost-1.69.0/boost/iterator/distance.hpp b/src/third_party/boost-1.70.0/boost/iterator/distance.hpp
index bef650b289f..bef650b289f 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/distance.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/distance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/filter_iterator.hpp b/src/third_party/boost-1.70.0/boost/iterator/filter_iterator.hpp
index b87c02b0aba..b87c02b0aba 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/filter_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/filter_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/indirect_iterator.hpp b/src/third_party/boost-1.70.0/boost/iterator/indirect_iterator.hpp
index 7449d621bbf..7449d621bbf 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/indirect_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/indirect_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/interoperable.hpp b/src/third_party/boost-1.70.0/boost/iterator/interoperable.hpp
index 6f3c872a27b..6f3c872a27b 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/interoperable.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/interoperable.hpp
diff --git a/src/third_party/boost-1.70.0/boost/iterator/iterator_adaptor.hpp b/src/third_party/boost-1.70.0/boost/iterator/iterator_adaptor.hpp
new file mode 100644
index 00000000000..db1c4daa3cf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/iterator/iterator_adaptor.hpp
@@ -0,0 +1,358 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek 2002.
+// (C) Copyright Thomas Witt 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 BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
+#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
+
+#include <boost/static_assert.hpp>
+
+#include <boost/core/use_default.hpp>
+
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/iterator/detail/enable_if.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/or.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+# include <boost/type_traits/remove_reference.hpp>
+#endif
+
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/iterator/detail/config_def.hpp>
+
+#include <boost/iterator/iterator_traits.hpp>
+
+namespace boost {
+namespace iterators {
+
+ // Used as a default template argument internally, merely to
+ // indicate "use the default", this can also be passed by users
+ // explicitly in order to specify that the default should be used.
+ using boost::use_default;
+
+} // namespace iterators
+
+// the incompleteness of use_default causes massive problems for
+// is_convertible (naturally). This workaround is fortunately not
+// needed for vc6/vc7.
+template<class To>
+struct is_convertible<use_default,To>
+ : mpl::false_ {};
+
+namespace iterators {
+
+ namespace detail
+ {
+
+ //
+ // Result type used in enable_if_convertible meta function.
+ // This can be an incomplete type, as only pointers to
+ // enable_if_convertible< ... >::type are used.
+ // We could have used void for this, but conversion to
+ // void* is just to easy.
+ //
+ struct enable_type;
+ }
+
+
+ //
+ // enable_if for use in adapted iterators constructors.
+ //
+ // In order to provide interoperability between adapted constant and
+ // mutable iterators, adapted iterators will usually provide templated
+ // conversion constructors of the following form
+ //
+ // template <class BaseIterator>
+ // class adapted_iterator :
+ // public iterator_adaptor< adapted_iterator<Iterator>, Iterator >
+ // {
+ // public:
+ //
+ // ...
+ //
+ // template <class OtherIterator>
+ // adapted_iterator(
+ // OtherIterator const& it
+ // , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0);
+ //
+ // ...
+ // };
+ //
+ // enable_if_convertible is used to remove those overloads from the overload
+ // set that cannot be instantiated. For all practical purposes only overloads
+ // for constant/mutable interaction will remain. This has the advantage that
+ // meta functions like boost::is_convertible do not return false positives,
+ // as they can only look at the signature of the conversion constructor
+ // and not at the actual instantiation.
+ //
+ // enable_if_interoperable can be safely used in user code. It falls back to
+ // always enabled for compilers that don't support enable_if or is_convertible.
+ // There is no need for compiler specific workarounds in user code.
+ //
+ // The operators implementation relies on boost::is_convertible not returning
+ // false positives for user/library defined iterator types. See comments
+ // on operator implementation for consequences.
+ //
+# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
+
+ template <class From, class To>
+ struct enable_if_convertible
+ {
+ typedef boost::iterators::detail::enable_type type;
+ };
+
+# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292))
+
+ // For some reason vc7.1 needs us to "cut off" instantiation
+ // of is_convertible in a few cases.
+ template<typename From, typename To>
+ struct enable_if_convertible
+ : iterators::enable_if<
+ mpl::or_<
+ is_same<From,To>
+ , is_convertible<From, To>
+ >
+ , boost::iterators::detail::enable_type
+ >
+ {};
+
+# else
+
+ template<typename From, typename To>
+ struct enable_if_convertible
+ : iterators::enable_if<
+ is_convertible<From, To>
+ , boost::iterators::detail::enable_type
+ >
+ {};
+
+# endif
+
+ //
+ // Default template argument handling for iterator_adaptor
+ //
+ namespace detail
+ {
+ // If T is use_default, return the result of invoking
+ // DefaultNullaryFn, otherwise return T.
+ template <class T, class DefaultNullaryFn>
+ struct ia_dflt_help
+ : mpl::eval_if<
+ is_same<T, use_default>
+ , DefaultNullaryFn
+ , mpl::identity<T>
+ >
+ {
+ };
+
+ // A metafunction which computes an iterator_adaptor's base class,
+ // a specialization of iterator_facade.
+ template <
+ class Derived
+ , class Base
+ , class Value
+ , class Traversal
+ , class Reference
+ , class Difference
+ >
+ struct iterator_adaptor_base
+ {
+ typedef iterator_facade<
+ Derived
+
+# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+ , typename boost::iterators::detail::ia_dflt_help<
+ Value
+ , mpl::eval_if<
+ is_same<Reference,use_default>
+ , iterator_value<Base>
+ , remove_reference<Reference>
+ >
+ >::type
+# else
+ , typename boost::iterators::detail::ia_dflt_help<
+ Value, iterator_value<Base>
+ >::type
+# endif
+
+ , typename boost::iterators::detail::ia_dflt_help<
+ Traversal
+ , iterator_traversal<Base>
+ >::type
+
+ , typename boost::iterators::detail::ia_dflt_help<
+ Reference
+ , mpl::eval_if<
+ is_same<Value,use_default>
+ , iterator_reference<Base>
+ , add_reference<Value>
+ >
+ >::type
+
+ , typename boost::iterators::detail::ia_dflt_help<
+ Difference, iterator_difference<Base>
+ >::type
+ >
+ type;
+ };
+
+ // workaround for aC++ CR JAGaf33512
+ template <class Tr1, class Tr2>
+ inline void iterator_adaptor_assert_traversal ()
+ {
+ BOOST_STATIC_ASSERT((is_convertible<Tr1, Tr2>::value));
+ }
+ }
+
+ //
+ // Iterator Adaptor
+ //
+ // The parameter ordering changed slightly with respect to former
+ // versions of iterator_adaptor The idea is that when the user needs
+ // to fiddle with the reference type it is highly likely that the
+ // iterator category has to be adjusted as well. Any of the
+ // following four template arguments may be ommitted or explicitly
+ // replaced by use_default.
+ //
+ // Value - if supplied, the value_type of the resulting iterator, unless
+ // const. If const, a conforming compiler strips constness for the
+ // value_type. If not supplied, iterator_traits<Base>::value_type is used
+ //
+ // Category - the traversal category of the resulting iterator. If not
+ // supplied, iterator_traversal<Base>::type is used.
+ //
+ // Reference - the reference type of the resulting iterator, and in
+ // particular, the result type of operator*(). If not supplied but
+ // Value is supplied, Value& is used. Otherwise
+ // iterator_traits<Base>::reference is used.
+ //
+ // Difference - the difference_type of the resulting iterator. If not
+ // supplied, iterator_traits<Base>::difference_type is used.
+ //
+ template <
+ class Derived
+ , class Base
+ , class Value = use_default
+ , class Traversal = use_default
+ , class Reference = use_default
+ , class Difference = use_default
+ >
+ class iterator_adaptor
+ : public boost::iterators::detail::iterator_adaptor_base<
+ Derived, Base, Value, Traversal, Reference, Difference
+ >::type
+ {
+ friend class iterator_core_access;
+
+ protected:
+ typedef typename boost::iterators::detail::iterator_adaptor_base<
+ Derived, Base, Value, Traversal, Reference, Difference
+ >::type super_t;
+ public:
+ iterator_adaptor() {}
+
+ explicit iterator_adaptor(Base const &iter)
+ : m_iterator(iter)
+ {
+ }
+
+ typedef Base base_type;
+
+ Base const& base() const
+ { return m_iterator; }
+
+ protected:
+ // for convenience in derived classes
+ typedef iterator_adaptor<Derived,Base,Value,Traversal,Reference,Difference> iterator_adaptor_;
+
+ //
+ // lvalue access to the Base object for Derived
+ //
+ Base const& base_reference() const
+ { return m_iterator; }
+
+ Base& base_reference()
+ { return m_iterator; }
+
+ private:
+ //
+ // Core iterator interface for iterator_facade. This is private
+ // to prevent temptation for Derived classes to use it, which
+ // will often result in an error. Derived classes should use
+ // base_reference(), above, to get direct access to m_iterator.
+ //
+ typename super_t::reference dereference() const
+ { return *m_iterator; }
+
+ template <
+ class OtherDerived, class OtherIterator, class V, class C, class R, class D
+ >
+ bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const
+ {
+ // Maybe readd with same_distance
+ // BOOST_STATIC_ASSERT(
+ // (detail::same_category_and_difference<Derived,OtherDerived>::value)
+ // );
+ return m_iterator == x.base();
+ }
+
+ typedef typename iterator_category_to_traversal<
+ typename super_t::iterator_category
+ >::type my_traversal;
+
+# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \
+ boost::iterators::detail::iterator_adaptor_assert_traversal<my_traversal, cat>();
+
+ void advance(typename super_t::difference_type n)
+ {
+ BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag)
+ m_iterator += n;
+ }
+
+ void increment() { ++m_iterator; }
+
+ void decrement()
+ {
+ BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag)
+ --m_iterator;
+ }
+
+ template <
+ class OtherDerived, class OtherIterator, class V, class C, class R, class D
+ >
+ typename super_t::difference_type distance_to(
+ iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const
+ {
+ BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag)
+ // Maybe readd with same_distance
+ // BOOST_STATIC_ASSERT(
+ // (detail::same_category_and_difference<Derived,OtherDerived>::value)
+ // );
+ return y.base() - m_iterator;
+ }
+
+# undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL
+
+ private: // data members
+ Base m_iterator;
+ };
+
+} // namespace iterators
+
+using iterators::iterator_adaptor;
+using iterators::enable_if_convertible;
+
+} // namespace boost
+
+#include <boost/iterator/detail/config_undef.hpp>
+
+#endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
diff --git a/src/third_party/boost-1.69.0/boost/iterator/iterator_categories.hpp b/src/third_party/boost-1.70.0/boost/iterator/iterator_categories.hpp
index baf805af6e3..baf805af6e3 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/iterator_categories.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/iterator_categories.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/iterator_concepts.hpp b/src/third_party/boost-1.70.0/boost/iterator/iterator_concepts.hpp
index 415cc496a02..415cc496a02 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/iterator_concepts.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/iterator_concepts.hpp
diff --git a/src/third_party/boost-1.70.0/boost/iterator/iterator_facade.hpp b/src/third_party/boost-1.70.0/boost/iterator/iterator_facade.hpp
new file mode 100644
index 00000000000..b43e618f0a0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/iterator/iterator_facade.hpp
@@ -0,0 +1,981 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek 2002.
+// (C) Copyright Thomas Witt 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 BOOST_ITERATOR_FACADE_23022003THW_HPP
+#define BOOST_ITERATOR_FACADE_23022003THW_HPP
+
+#include <boost/config.hpp>
+#include <boost/iterator/interoperable.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+
+#include <boost/iterator/detail/facade_iterator_category.hpp>
+#include <boost/iterator/detail/enable_if.hpp>
+
+#include <boost/static_assert.hpp>
+#include <boost/core/addressof.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_pod.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <cstddef>
+
+#include <boost/iterator/detail/config_def.hpp> // this goes last
+
+namespace boost {
+namespace iterators {
+
+ // This forward declaration is required for the friend declaration
+ // in iterator_core_access
+ template <class I, class V, class TC, class R, class D> class iterator_facade;
+
+ namespace detail
+ {
+ // A binary metafunction class that always returns bool. VC6
+ // ICEs on mpl::always<bool>, probably because of the default
+ // parameters.
+ struct always_bool2
+ {
+ template <class T, class U>
+ struct apply
+ {
+ typedef bool type;
+ };
+ };
+
+ // The type trait checks if the category or traversal is at least as advanced as the specified required traversal
+ template< typename CategoryOrTraversal, typename Required >
+ struct is_traversal_at_least :
+ public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required >
+ {};
+
+ //
+ // enable if for use in operator implementation.
+ //
+ template <
+ class Facade1
+ , class Facade2
+ , class Return
+ >
+ struct enable_if_interoperable :
+ public boost::iterators::enable_if<
+ is_interoperable< Facade1, Facade2 >
+ , Return
+ >
+ {};
+
+ //
+ // enable if for use in implementation of operators specific for random access traversal.
+ //
+ template <
+ class Facade1
+ , class Facade2
+ , class Return
+ >
+ struct enable_if_interoperable_and_random_access_traversal :
+ public boost::iterators::enable_if<
+ mpl::and_<
+ is_interoperable< Facade1, Facade2 >
+ , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag >
+ , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag >
+ >
+ , Return
+ >
+ {};
+
+ //
+ // Generates associated types for an iterator_facade with the
+ // given parameters.
+ //
+ template <
+ class ValueParam
+ , class CategoryOrTraversal
+ , class Reference
+ , class Difference
+ >
+ struct iterator_facade_types
+ {
+ typedef typename facade_iterator_category<
+ CategoryOrTraversal, ValueParam, Reference
+ >::type iterator_category;
+
+ typedef typename remove_const<ValueParam>::type value_type;
+
+ // Not the real associated pointer type
+ typedef typename mpl::eval_if<
+ boost::iterators::detail::iterator_writability_disabled<ValueParam,Reference>
+ , add_pointer<const value_type>
+ , add_pointer<value_type>
+ >::type pointer;
+
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \
+ || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \
+ || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \
+ || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310)
+
+ // To interoperate with some broken library/compiler
+ // combinations, user-defined iterators must be derived from
+ // std::iterator. It is possible to implement a standard
+ // library for broken compilers without this limitation.
+# define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1
+
+ typedef
+ iterator<iterator_category, value_type, Difference, pointer, Reference>
+ base;
+# endif
+ };
+
+ // iterators whose dereference operators reference the same value
+ // for all iterators into the same sequence (like many input
+ // iterators) need help with their postfix ++: the referenced
+ // value must be read and stored away before the increment occurs
+ // so that *a++ yields the originally referenced element and not
+ // the next one.
+ template <class Iterator>
+ class postfix_increment_proxy
+ {
+ typedef typename iterator_value<Iterator>::type value_type;
+ public:
+ explicit postfix_increment_proxy(Iterator const& x)
+ : stored_value(*x)
+ {}
+
+ // Returning a mutable reference allows nonsense like
+ // (*r++).mutate(), but it imposes fewer assumptions about the
+ // behavior of the value_type. In particular, recall that
+ // (*r).mutate() is legal if operator* returns by value.
+ value_type&
+ operator*() const
+ {
+ return this->stored_value;
+ }
+ private:
+ mutable value_type stored_value;
+ };
+
+ //
+ // In general, we can't determine that such an iterator isn't
+ // writable -- we also need to store a copy of the old iterator so
+ // that it can be written into.
+ template <class Iterator>
+ class writable_postfix_increment_proxy
+ {
+ typedef typename iterator_value<Iterator>::type value_type;
+ public:
+ explicit writable_postfix_increment_proxy(Iterator const& x)
+ : stored_value(*x)
+ , stored_iterator(x)
+ {}
+
+ // Dereferencing must return a proxy so that both *r++ = o and
+ // value_type(*r++) can work. In this case, *r is the same as
+ // *r++, and the conversion operator below is used to ensure
+ // readability.
+ writable_postfix_increment_proxy const&
+ operator*() const
+ {
+ return *this;
+ }
+
+ // Provides readability of *r++
+ operator value_type&() const
+ {
+ return stored_value;
+ }
+
+ // Provides writability of *r++
+ template <class T>
+ T const& operator=(T const& x) const
+ {
+ *this->stored_iterator = x;
+ return x;
+ }
+
+ // This overload just in case only non-const objects are writable
+ template <class T>
+ T& operator=(T& x) const
+ {
+ *this->stored_iterator = x;
+ return x;
+ }
+
+ // Provides X(r++)
+ operator Iterator const&() const
+ {
+ return stored_iterator;
+ }
+
+ private:
+ mutable value_type stored_value;
+ Iterator stored_iterator;
+ };
+
+# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ template <class Reference, class Value>
+ struct is_non_proxy_reference_impl
+ {
+ static Reference r;
+
+ template <class R>
+ static typename mpl::if_<
+ is_convertible<
+ R const volatile*
+ , Value const volatile*
+ >
+ , char[1]
+ , char[2]
+ >::type& helper(R const&);
+
+ BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1);
+ };
+
+ template <class Reference, class Value>
+ struct is_non_proxy_reference
+ : mpl::bool_<
+ is_non_proxy_reference_impl<Reference, Value>::value
+ >
+ {};
+# else
+ template <class Reference, class Value>
+ struct is_non_proxy_reference
+ : is_convertible<
+ typename remove_reference<Reference>::type
+ const volatile*
+ , Value const volatile*
+ >
+ {};
+# endif
+
+ // A metafunction to choose the result type of postfix ++
+ //
+ // Because the C++98 input iterator requirements say that *r++ has
+ // type T (value_type), implementations of some standard
+ // algorithms like lexicographical_compare may use constructions
+ // like:
+ //
+ // *r++ < *s++
+ //
+ // If *r++ returns a proxy (as required if r is writable but not
+ // multipass), this sort of expression will fail unless the proxy
+ // supports the operator<. Since there are any number of such
+ // operations, we're not going to try to support them. Therefore,
+ // even if r++ returns a proxy, *r++ will only return a proxy if
+ // *r also returns a proxy.
+ template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
+ struct postfix_increment_result
+ : mpl::eval_if<
+ mpl::and_<
+ // A proxy is only needed for readable iterators
+ is_convertible<
+ Reference
+ // Use add_lvalue_reference to form `reference to Value` due to
+ // some (strict) C++03 compilers (e.g. `gcc -std=c++03`) reject
+ // 'reference-to-reference' in the template which described in CWG
+ // DR106.
+ // http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_defects.html#106
+ , typename add_lvalue_reference<Value const>::type
+ >
+
+ // No multipass iterator can have values that disappear
+ // before positions can be re-visited
+ , mpl::not_<
+ is_convertible<
+ typename iterator_category_to_traversal<CategoryOrTraversal>::type
+ , forward_traversal_tag
+ >
+ >
+ >
+ , mpl::if_<
+ is_non_proxy_reference<Reference,Value>
+ , postfix_increment_proxy<Iterator>
+ , writable_postfix_increment_proxy<Iterator>
+ >
+ , mpl::identity<Iterator>
+ >
+ {};
+
+ // operator->() needs special support for input iterators to strictly meet the
+ // standard's requirements. If *i is not a reference type, we must still
+ // produce an lvalue to which a pointer can be formed. We do that by
+ // returning a proxy object containing an instance of the reference object.
+ template <class Reference, class Pointer>
+ struct operator_arrow_dispatch // proxy references
+ {
+ struct proxy
+ {
+ explicit proxy(Reference const & x) : m_ref(x) {}
+ Reference* operator->() { return boost::addressof(m_ref); }
+ // This function is needed for MWCW and BCC, which won't call
+ // operator-> again automatically per 13.3.1.2 para 8
+ operator Reference*() { return boost::addressof(m_ref); }
+ Reference m_ref;
+ };
+ typedef proxy result_type;
+ static result_type apply(Reference const & x)
+ {
+ return result_type(x);
+ }
+ };
+
+ template <class T, class Pointer>
+ struct operator_arrow_dispatch<T&, Pointer> // "real" references
+ {
+ typedef Pointer result_type;
+ static result_type apply(T& x)
+ {
+ return boost::addressof(x);
+ }
+ };
+
+ // A proxy return type for operator[], needed to deal with
+ // iterators that may invalidate referents upon destruction.
+ // Consider the temporary iterator in *(a + n)
+ template <class Iterator>
+ class operator_brackets_proxy
+ {
+ // Iterator is actually an iterator_facade, so we do not have to
+ // go through iterator_traits to access the traits.
+ typedef typename Iterator::reference reference;
+ typedef typename Iterator::value_type value_type;
+
+ public:
+ operator_brackets_proxy(Iterator const& iter)
+ : m_iter(iter)
+ {}
+
+ operator reference() const
+ {
+ return *m_iter;
+ }
+
+ operator_brackets_proxy& operator=(value_type const& val)
+ {
+ *m_iter = val;
+ return *this;
+ }
+
+ private:
+ Iterator m_iter;
+ };
+
+ // A metafunction that determines whether operator[] must return a
+ // proxy, or whether it can simply return a copy of the value_type.
+ template <class ValueType, class Reference>
+ struct use_operator_brackets_proxy
+ : mpl::not_<
+ mpl::and_<
+ // Really we want an is_copy_constructible trait here,
+ // but is_POD will have to suffice in the meantime.
+ boost::is_POD<ValueType>
+ , iterator_writability_disabled<ValueType,Reference>
+ >
+ >
+ {};
+
+ template <class Iterator, class Value, class Reference>
+ struct operator_brackets_result
+ {
+ typedef typename mpl::if_<
+ use_operator_brackets_proxy<Value,Reference>
+ , operator_brackets_proxy<Iterator>
+ , Value
+ >::type type;
+ };
+
+ template <class Iterator>
+ operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_)
+ {
+ return operator_brackets_proxy<Iterator>(iter);
+ }
+
+ template <class Iterator>
+ typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_)
+ {
+ return *iter;
+ }
+
+ struct choose_difference_type
+ {
+ template <class I1, class I2>
+ struct apply
+ :
+# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
+ iterator_difference<I1>
+# else
+ mpl::eval_if<
+ is_convertible<I2,I1>
+ , iterator_difference<I1>
+ , iterator_difference<I2>
+ >
+# endif
+ {};
+
+ };
+
+ template <
+ class Derived
+ , class Value
+ , class CategoryOrTraversal
+ , class Reference
+ , class Difference
+ , bool IsBidirectionalTraversal
+ , bool IsRandomAccessTraversal
+ >
+ class iterator_facade_base;
+
+ } // namespace detail
+
+
+ // Macros which describe the declarations of binary operators
+# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
+# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
+ template < \
+ class Derived1, class V1, class TC1, class Reference1, class Difference1 \
+ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
+ > \
+ prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \
+ operator op( \
+ iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
+ , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
+# else
+# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \
+ template < \
+ class Derived1, class V1, class TC1, class Reference1, class Difference1 \
+ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
+ > \
+ prefix typename enabler< \
+ Derived1, Derived2 \
+ , typename mpl::apply2<result_type,Derived1,Derived2>::type \
+ >::type \
+ operator op( \
+ iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
+ , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
+# endif
+
+# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable)
+
+# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal)
+
+# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \
+ template <class Derived, class V, class TC, class R, class D> \
+ prefix typename boost::iterators::enable_if< \
+ boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \
+ Derived \
+ >::type operator+ args
+
+ //
+ // Helper class for granting access to the iterator core interface.
+ //
+ // The simple core interface is used by iterator_facade. The core
+ // interface of a user/library defined iterator type should not be made public
+ // so that it does not clutter the public interface. Instead iterator_core_access
+ // should be made friend so that iterator_facade can access the core
+ // interface through iterator_core_access.
+ //
+ class iterator_core_access
+ {
+# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
+ // Tasteless as this may seem, making all members public allows member templates
+ // to work in the absence of member template friends.
+ public:
+# else
+
+ template <class I, class V, class TC, class R, class D> friend class iterator_facade;
+ template <class I, class V, class TC, class R, class D, bool IsBidirectionalTraversal, bool IsRandomAccessTraversal>
+ friend class detail::iterator_facade_base;
+
+# define BOOST_ITERATOR_FACADE_RELATION(op) \
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2);
+
+ BOOST_ITERATOR_FACADE_RELATION(==)
+ BOOST_ITERATOR_FACADE_RELATION(!=)
+
+# undef BOOST_ITERATOR_FACADE_RELATION
+
+# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2);
+
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<)
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>)
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=)
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=)
+
+# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
+
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(
+ friend, -, boost::iterators::detail::choose_difference_type)
+ ;
+
+ BOOST_ITERATOR_FACADE_PLUS_HEAD(
+ friend inline
+ , (iterator_facade<Derived, V, TC, R, D> const&
+ , typename Derived::difference_type)
+ )
+ ;
+
+ BOOST_ITERATOR_FACADE_PLUS_HEAD(
+ friend inline
+ , (typename Derived::difference_type
+ , iterator_facade<Derived, V, TC, R, D> const&)
+ )
+ ;
+
+# endif
+
+ template <class Facade>
+ static typename Facade::reference dereference(Facade const& f)
+ {
+ return f.dereference();
+ }
+
+ template <class Facade>
+ static void increment(Facade& f)
+ {
+ f.increment();
+ }
+
+ template <class Facade>
+ static void decrement(Facade& f)
+ {
+ f.decrement();
+ }
+
+ template <class Facade1, class Facade2>
+ static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_)
+ {
+ return f1.equal(f2);
+ }
+
+ template <class Facade1, class Facade2>
+ static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_)
+ {
+ return f2.equal(f1);
+ }
+
+ template <class Facade>
+ static void advance(Facade& f, typename Facade::difference_type n)
+ {
+ f.advance(n);
+ }
+
+ template <class Facade1, class Facade2>
+ static typename Facade1::difference_type distance_from(
+ Facade1 const& f1, Facade2 const& f2, mpl::true_)
+ {
+ return -f1.distance_to(f2);
+ }
+
+ template <class Facade1, class Facade2>
+ static typename Facade2::difference_type distance_from(
+ Facade1 const& f1, Facade2 const& f2, mpl::false_)
+ {
+ return f2.distance_to(f1);
+ }
+
+ //
+ // Curiously Recurring Template interface.
+ //
+ template <class I, class V, class TC, class R, class D>
+ static I& derived(iterator_facade<I,V,TC,R,D>& facade)
+ {
+ return *static_cast<I*>(&facade);
+ }
+
+ template <class I, class V, class TC, class R, class D>
+ static I const& derived(iterator_facade<I,V,TC,R,D> const& facade)
+ {
+ return *static_cast<I const*>(&facade);
+ }
+
+ // objects of this class are useless
+ BOOST_DELETED_FUNCTION(iterator_core_access())
+ };
+
+ namespace detail {
+
+ // Implementation for forward traversal iterators
+ template <
+ class Derived
+ , class Value
+ , class CategoryOrTraversal
+ , class Reference
+ , class Difference
+ >
+ class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
+# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
+ : public boost::iterators::detail::iterator_facade_types<
+ Value, CategoryOrTraversal, Reference, Difference
+ >::base
+# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
+# endif
+ {
+ private:
+ typedef boost::iterators::detail::iterator_facade_types<
+ Value, CategoryOrTraversal, Reference, Difference
+ > associated_types;
+
+ typedef boost::iterators::detail::operator_arrow_dispatch<
+ Reference
+ , typename associated_types::pointer
+ > operator_arrow_dispatch_;
+
+ public:
+ typedef typename associated_types::value_type value_type;
+ typedef Reference reference;
+ typedef Difference difference_type;
+
+ typedef typename operator_arrow_dispatch_::result_type pointer;
+
+ typedef typename associated_types::iterator_category iterator_category;
+
+ public:
+ reference operator*() const
+ {
+ return iterator_core_access::dereference(this->derived());
+ }
+
+ pointer operator->() const
+ {
+ return operator_arrow_dispatch_::apply(*this->derived());
+ }
+
+ Derived& operator++()
+ {
+ iterator_core_access::increment(this->derived());
+ return this->derived();
+ }
+
+ protected:
+ //
+ // Curiously Recurring Template interface.
+ //
+ Derived& derived()
+ {
+ return *static_cast<Derived*>(this);
+ }
+
+ Derived const& derived() const
+ {
+ return *static_cast<Derived const*>(this);
+ }
+ };
+
+ // Implementation for bidirectional traversal iterators
+ template <
+ class Derived
+ , class Value
+ , class CategoryOrTraversal
+ , class Reference
+ , class Difference
+ >
+ class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > :
+ public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
+ {
+ public:
+ Derived& operator--()
+ {
+ iterator_core_access::decrement(this->derived());
+ return this->derived();
+ }
+
+ Derived operator--(int)
+ {
+ Derived tmp(this->derived());
+ --*this;
+ return tmp;
+ }
+ };
+
+ // Implementation for random access traversal iterators
+ template <
+ class Derived
+ , class Value
+ , class CategoryOrTraversal
+ , class Reference
+ , class Difference
+ >
+ class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > :
+ public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false >
+ {
+ private:
+ typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type;
+
+ public:
+ typedef typename base_type::reference reference;
+ typedef typename base_type::difference_type difference_type;
+
+ public:
+ typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type
+ operator[](difference_type n) const
+ {
+ typedef boost::iterators::detail::use_operator_brackets_proxy<Value, Reference> use_proxy;
+
+ return boost::iterators::detail::make_operator_brackets_result<Derived>(
+ this->derived() + n
+ , use_proxy()
+ );
+ }
+
+ Derived& operator+=(difference_type n)
+ {
+ iterator_core_access::advance(this->derived(), n);
+ return this->derived();
+ }
+
+ Derived& operator-=(difference_type n)
+ {
+ iterator_core_access::advance(this->derived(), -n);
+ return this->derived();
+ }
+
+ Derived operator-(difference_type x) const
+ {
+ Derived result(this->derived());
+ return result -= x;
+ }
+ };
+
+ } // namespace detail
+
+ //
+ // iterator_facade - use as a public base class for defining new
+ // standard-conforming iterators.
+ //
+ template <
+ class Derived // The derived iterator type being constructed
+ , class Value
+ , class CategoryOrTraversal
+ , class Reference = Value&
+ , class Difference = std::ptrdiff_t
+ >
+ class iterator_facade :
+ public detail::iterator_facade_base<
+ Derived,
+ Value,
+ CategoryOrTraversal,
+ Reference,
+ Difference,
+ detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value,
+ detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value
+ >
+ {
+ protected:
+ // For use by derived classes
+ typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_;
+ };
+
+ template <class I, class V, class TC, class R, class D>
+ inline typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
+ operator++(
+ iterator_facade<I,V,TC,R,D>& i
+ , int
+ )
+ {
+ typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
+ tmp(*static_cast<I*>(&i));
+
+ ++i;
+
+ return tmp;
+ }
+
+
+ //
+ // Comparison operator implementation. The library supplied operators
+ // enables the user to provide fully interoperable constant/mutable
+ // iterator types. I.e. the library provides all operators
+ // for all mutable/constant iterator combinations.
+ //
+ // Note though that this kind of interoperability for constant/mutable
+ // iterators is not required by the standard for container iterators.
+ // All the standard asks for is a conversion mutable -> constant.
+ // Most standard library implementations nowadays provide fully interoperable
+ // iterator implementations, but there are still heavily used implementations
+ // that do not provide them. (Actually it's even worse, they do not provide
+ // them for only a few iterators.)
+ //
+ // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should
+ // enable the user to turn off mixed type operators
+ //
+ // The library takes care to provide only the right operator overloads.
+ // I.e.
+ //
+ // bool operator==(Iterator, Iterator);
+ // bool operator==(ConstIterator, Iterator);
+ // bool operator==(Iterator, ConstIterator);
+ // bool operator==(ConstIterator, ConstIterator);
+ //
+ // ...
+ //
+ // In order to do so it uses c++ idioms that are not yet widely supported
+ // by current compiler releases. The library is designed to degrade gracefully
+ // in the face of compiler deficiencies. In general compiler
+ // deficiencies result in less strict error checking and more obscure
+ // error messages, functionality is not affected.
+ //
+ // For full operation compiler support for "Substitution Failure Is Not An Error"
+ // (aka. enable_if) and boost::is_convertible is required.
+ //
+ // The following problems occur if support is lacking.
+ //
+ // Pseudo code
+ //
+ // ---------------
+ // AdaptorA<Iterator1> a1;
+ // AdaptorA<Iterator2> a2;
+ //
+ // // This will result in a no such overload error in full operation
+ // // If enable_if or is_convertible is not supported
+ // // The instantiation will fail with an error hopefully indicating that
+ // // there is no operator== for Iterator1, Iterator2
+ // // The same will happen if no enable_if is used to remove
+ // // false overloads from the templated conversion constructor
+ // // of AdaptorA.
+ //
+ // a1 == a2;
+ // ----------------
+ //
+ // AdaptorA<Iterator> a;
+ // AdaptorB<Iterator> b;
+ //
+ // // This will result in a no such overload error in full operation
+ // // If enable_if is not supported the static assert used
+ // // in the operator implementation will fail.
+ // // This will accidently work if is_convertible is not supported.
+ //
+ // a == b;
+ // ----------------
+ //
+
+# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
+# define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_()
+# else
+# define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible<a,b>()
+# endif
+
+# define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \
+ BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \
+ { \
+ /* For those compilers that do not support enable_if */ \
+ BOOST_STATIC_ASSERT(( \
+ is_interoperable< Derived1, Derived2 >::value \
+ )); \
+ return_prefix iterator_core_access::base_op( \
+ *static_cast<Derived1 const*>(&lhs) \
+ , *static_cast<Derived2 const*>(&rhs) \
+ , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
+ ); \
+ }
+
+# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \
+ BOOST_ITERATOR_FACADE_INTEROP( \
+ op \
+ , boost::iterators::detail::always_bool2 \
+ , return_prefix \
+ , base_op \
+ )
+
+ BOOST_ITERATOR_FACADE_RELATION(==, return, equal)
+ BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal)
+
+# undef BOOST_ITERATOR_FACADE_RELATION
+
+
+# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \
+ { \
+ /* For those compilers that do not support enable_if */ \
+ BOOST_STATIC_ASSERT(( \
+ is_interoperable< Derived1, Derived2 >::value && \
+ boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \
+ boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \
+ )); \
+ return_prefix iterator_core_access::base_op( \
+ *static_cast<Derived1 const*>(&lhs) \
+ , *static_cast<Derived2 const*>(&rhs) \
+ , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
+ ); \
+ }
+
+# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \
+ op \
+ , boost::iterators::detail::always_bool2 \
+ , return_prefix \
+ , base_op \
+ )
+
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from)
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from)
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from)
+ BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from)
+
+# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
+
+ // operator- requires an additional part in the static assertion
+ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(
+ -
+ , boost::iterators::detail::choose_difference_type
+ , return
+ , distance_from
+ )
+
+# undef BOOST_ITERATOR_FACADE_INTEROP
+# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS
+
+# define BOOST_ITERATOR_FACADE_PLUS(args) \
+ BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \
+ { \
+ Derived tmp(static_cast<Derived const&>(i)); \
+ return tmp += n; \
+ }
+
+ BOOST_ITERATOR_FACADE_PLUS((
+ iterator_facade<Derived, V, TC, R, D> const& i
+ , typename Derived::difference_type n
+ ))
+
+ BOOST_ITERATOR_FACADE_PLUS((
+ typename Derived::difference_type n
+ , iterator_facade<Derived, V, TC, R, D> const& i
+ ))
+
+# undef BOOST_ITERATOR_FACADE_PLUS
+# undef BOOST_ITERATOR_FACADE_PLUS_HEAD
+
+# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD
+# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD
+# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL
+
+} // namespace iterators
+
+using iterators::iterator_core_access;
+using iterators::iterator_facade;
+
+} // namespace boost
+
+#include <boost/iterator/detail/config_undef.hpp>
+
+#endif // BOOST_ITERATOR_FACADE_23022003THW_HPP
diff --git a/src/third_party/boost-1.69.0/boost/iterator/iterator_traits.hpp b/src/third_party/boost-1.70.0/boost/iterator/iterator_traits.hpp
index 6582a68f507..6582a68f507 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/iterator_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/iterator_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/minimum_category.hpp b/src/third_party/boost-1.70.0/boost/iterator/minimum_category.hpp
index 15679bc77d5..15679bc77d5 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/minimum_category.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/minimum_category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/reverse_iterator.hpp b/src/third_party/boost-1.70.0/boost/iterator/reverse_iterator.hpp
index 03b7925ca72..03b7925ca72 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/reverse_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/transform_iterator.hpp b/src/third_party/boost-1.70.0/boost/iterator/transform_iterator.hpp
index 2281df877f1..2281df877f1 100644
--- a/src/third_party/boost-1.69.0/boost/iterator/transform_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/iterator/transform_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/bind.hpp b/src/third_party/boost-1.70.0/boost/lambda/bind.hpp
index 0371393cbaf..0371393cbaf 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/core.hpp b/src/third_party/boost-1.70.0/boost/lambda/core.hpp
index b81fdf88a1e..b81fdf88a1e 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/core.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/core.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/actions.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/actions.hpp
index 668799f9fef..668799f9fef 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/actions.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/actions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/arity_code.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/arity_code.hpp
index bed34b9a4dd..bed34b9a4dd 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/arity_code.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/arity_code.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/bind_functions.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/bind_functions.hpp
index f85513c091a..f85513c091a 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/bind_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/bind_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/function_adaptors.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/function_adaptors.hpp
index 35db8b43045..35db8b43045 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/function_adaptors.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/function_adaptors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/is_instance_of.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/is_instance_of.hpp
index 1dfbd43a533..1dfbd43a533 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/is_instance_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/is_instance_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_config.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_config.hpp
index f47100b9698..f47100b9698 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functor_base.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_functor_base.hpp
index b084acd21aa..b084acd21aa 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functor_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_functor_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functors.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_functors.hpp
index febb6fc828a..febb6fc828a 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functors.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_functors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_fwd.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_fwd.hpp
index a27bfaded19..a27bfaded19 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_traits.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_traits.hpp
index cae0f38e6da..cae0f38e6da 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/lambda_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/member_ptr.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/member_ptr.hpp
index 288f70c5de6..288f70c5de6 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/member_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/member_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/operator_actions.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/operator_actions.hpp
index 949b40fa431..949b40fa431 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/operator_actions.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/operator_actions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/operator_lambda_func_base.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/operator_lambda_func_base.hpp
index 12a6d934a49..12a6d934a49 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/operator_lambda_func_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/operator_lambda_func_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/operator_return_type_traits.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/operator_return_type_traits.hpp
index 6af4d03671a..6af4d03671a 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/operator_return_type_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/operator_return_type_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/operators.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/operators.hpp
index 136e28f1b41..136e28f1b41 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/ret.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/ret.hpp
index 96f5fc18bb6..96f5fc18bb6 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/ret.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/ret.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/return_type_traits.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/return_type_traits.hpp
index da2879cbb0d..da2879cbb0d 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/return_type_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/return_type_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/detail/select_functions.hpp b/src/third_party/boost-1.70.0/boost/lambda/detail/select_functions.hpp
index 956045c63f4..956045c63f4 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/detail/select_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/detail/select_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/if.hpp b/src/third_party/boost-1.70.0/boost/lambda/if.hpp
index 08f45f984a3..08f45f984a3 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/if.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lambda/lambda.hpp b/src/third_party/boost-1.70.0/boost/lambda/lambda.hpp
index e1654a29641..e1654a29641 100644
--- a/src/third_party/boost-1.69.0/boost/lambda/lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/lambda/lambda.hpp
diff --git a/src/third_party/boost-1.70.0/boost/lexical_cast.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast.hpp
new file mode 100644
index 00000000000..e5d6fcf3cce
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/lexical_cast.hpp
@@ -0,0 +1,105 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/bad_lexical_cast.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/bad_lexical_cast.hpp
new file mode 100644
index 00000000000..bf7b28acf0c
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/converter_lexical.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/converter_lexical.hpp
new file mode 100644
index 00000000000..59c4c24f04d
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/converter_lexical_streams.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/converter_lexical_streams.hpp
new file mode 100644
index 00000000000..2906846a96c
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/converter_numeric.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/converter_numeric.hpp
new file mode 100644
index 00000000000..1488fd5765e
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/inf_nan.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/inf_nan.hpp
new file mode 100644
index 00000000000..bea55b70a03
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/is_character.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/is_character.hpp
new file mode 100644
index 00000000000..c50664625c1
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/lcast_char_constants.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/lcast_char_constants.hpp
new file mode 100644
index 00000000000..ee6ef4b46d2
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
new file mode 100644
index 00000000000..c837832f34f
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/detail/widest_char.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/detail/widest_char.hpp
new file mode 100644
index 00000000000..b9c725b61fb
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.70.0/boost/lexical_cast/try_lexical_convert.hpp b/src/third_party/boost-1.70.0/boost/lexical_cast/try_lexical_convert.hpp
new file mode 100644
index 00000000000..ac2e4f3cfc4
--- /dev/null
+++ b/src/third_party/boost-1.70.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-2019.
+//
+// Distributed under the 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.69.0/boost/limits.hpp b/src/third_party/boost-1.70.0/boost/limits.hpp
index 47d81556118..47d81556118 100644
--- a/src/third_party/boost-1.69.0/boost/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/logic/tribool.hpp b/src/third_party/boost-1.70.0/boost/logic/tribool.hpp
index 041c59cefc6..041c59cefc6 100644
--- a/src/third_party/boost-1.69.0/boost/logic/tribool.hpp
+++ b/src/third_party/boost-1.70.0/boost/logic/tribool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/logic/tribool_fwd.hpp b/src/third_party/boost-1.70.0/boost/logic/tribool_fwd.hpp
index 2cdd91bb338..2cdd91bb338 100644
--- a/src/third_party/boost-1.69.0/boost/logic/tribool_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/logic/tribool_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/make_shared.hpp b/src/third_party/boost-1.70.0/boost/make_shared.hpp
index 588fbfde1b8..588fbfde1b8 100644
--- a/src/third_party/boost-1.69.0/boost/make_shared.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/constants/calculate_constants.hpp
index 71487885bfe..71487885bfe 100644
--- a/src/third_party/boost-1.69.0/boost/math/constants/calculate_constants.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/constants/calculate_constants.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/constants/constants.hpp b/src/third_party/boost-1.70.0/boost/math/constants/constants.hpp
new file mode 100644
index 00000000000..0a32e5d4748
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/constants/constants.hpp
@@ -0,0 +1,357 @@
+// 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>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+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.69.0/boost/math/distributions/beta.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/beta.hpp
index 5ecf902d990..5ecf902d990 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/beta.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/beta.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/binomial.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/binomial.hpp
index 620bf9b1214..620bf9b1214 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/binomial.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/binomial.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/cauchy.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/cauchy.hpp
index 5a3a64f0f2c..5a3a64f0f2c 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/cauchy.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/cauchy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/chi_squared.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/chi_squared.hpp
index 071c7756f49..071c7756f49 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/chi_squared.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/chi_squared.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/complement.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/complement.hpp
index 26d0d49e6de..26d0d49e6de 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/complement.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/complement.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/detail/common_error_handling.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/detail/common_error_handling.hpp
index 486fb0b5c8d..486fb0b5c8d 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/detail/common_error_handling.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/detail/common_error_handling.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/detail/derived_accessors.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/detail/derived_accessors.hpp
index 00f5a93258c..00f5a93258c 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/detail/derived_accessors.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/detail/derived_accessors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_mode.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/detail/generic_mode.hpp
index 3857c9f2ec9..3857c9f2ec9 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_mode.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/detail/generic_mode.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_quantile.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/detail/generic_quantile.hpp
index afde2cacb71..afde2cacb71 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_quantile.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/detail/generic_quantile.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/detail/inv_discrete_quantile.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/detail/inv_discrete_quantile.hpp
index 23e00b8e036..23e00b8e036 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/detail/inv_discrete_quantile.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/detail/inv_discrete_quantile.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/exponential.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/exponential.hpp
index 05c49374ed1..05c49374ed1 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/exponential.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/distributions/extreme_value.hpp
index 3f745868297..3f745868297 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/extreme_value.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/extreme_value.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/fisher_f.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/fisher_f.hpp
index 798db2fa75f..798db2fa75f 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/fisher_f.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/fisher_f.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/fwd.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/fwd.hpp
index 5b212c8ec66..5b212c8ec66 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/gamma.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/gamma.hpp
index 9a9e2a4f524..9a9e2a4f524 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/gamma.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/gamma.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/geometric.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/geometric.hpp
index 6c9713eadd8..6c9713eadd8 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/geometric.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/geometric.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/hyperexponential.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/hyperexponential.hpp
index 4ed281c6626..4ed281c6626 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/hyperexponential.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/hyperexponential.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/laplace.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/laplace.hpp
index 09b24c868b5..09b24c868b5 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/laplace.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/laplace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/lognormal.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/lognormal.hpp
index 4e6c0610d4b..4e6c0610d4b 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/lognormal.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/lognormal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/negative_binomial.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/negative_binomial.hpp
index 3b4de4062f7..3b4de4062f7 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/negative_binomial.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/negative_binomial.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/non_central_chi_squared.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/non_central_chi_squared.hpp
index 038d951b029..038d951b029 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/non_central_chi_squared.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/non_central_chi_squared.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/normal.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/normal.hpp
index 32cf66e3ef0..32cf66e3ef0 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/normal.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/normal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/poisson.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/poisson.hpp
index e4665bff69b..e4665bff69b 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/poisson.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/poisson.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/students_t.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/students_t.hpp
index 6bf0e3cd02b..6bf0e3cd02b 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/students_t.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/students_t.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/triangular.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/triangular.hpp
index 1e49a38faf7..1e49a38faf7 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/triangular.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/triangular.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/uniform.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/uniform.hpp
index 856c144e369..856c144e369 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/uniform.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/uniform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/weibull.hpp b/src/third_party/boost-1.70.0/boost/math/distributions/weibull.hpp
index da1189090cb..da1189090cb 100644
--- a/src/third_party/boost-1.69.0/boost/math/distributions/weibull.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/distributions/weibull.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/policies/error_handling.hpp b/src/third_party/boost-1.70.0/boost/math/policies/error_handling.hpp
index 124337ee879..124337ee879 100644
--- a/src/third_party/boost-1.69.0/boost/math/policies/error_handling.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/policies/error_handling.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/policies/policy.hpp b/src/third_party/boost-1.70.0/boost/math/policies/policy.hpp
index c1e1a7be4a4..c1e1a7be4a4 100644
--- a/src/third_party/boost-1.69.0/boost/math/policies/policy.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/policies/policy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/acosh.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/acosh.hpp
index 3b7edbad3f8..3b7edbad3f8 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/acosh.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/acosh.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/asinh.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/asinh.hpp
index e55a3562846..e55a3562846 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/asinh.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/asinh.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/atanh.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/atanh.hpp
index 871a465a8cd..871a465a8cd 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/atanh.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/atanh.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/bernoulli.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/bernoulli.hpp
index e5323fbd425..e5323fbd425 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/bernoulli.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/bernoulli.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/bessel.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/bessel.hpp
index 69f931bd5a4..69f931bd5a4 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/bessel.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/bessel.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/beta.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/beta.hpp
index 35b114ef158..35b114ef158 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/beta.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/beta.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/binomial.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/binomial.hpp
index 9a24fc15bbd..9a24fc15bbd 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/binomial.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/binomial.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/cbrt.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/cbrt.hpp
index c34ad39949a..c34ad39949a 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/cbrt.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/cbrt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/cos_pi.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/cos_pi.hpp
index 669a2c87ae3..669a2c87ae3 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/cos_pi.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/cos_pi.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp
index b5a71c78eb2..b5a71c78eb2 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bernoulli_details.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bernoulli_details.hpp
index 75fadbf34ae..75fadbf34ae 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bernoulli_details.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bernoulli_details.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i0.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i0.hpp
new file mode 100644
index 00000000000..30b89e6a473
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i0.hpp
@@ -0,0 +1,564 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// Copyright (c) 2017 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_BESSEL_I0_HPP
+#define BOOST_MATH_BESSEL_I0_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Modified Bessel function of the first kind of order zero
+// we use the approximating forms derived in:
+// "Rational Approximations for the Modified Bessel Function of the First Kind - I0(x) for Computations with Double Precision"
+// by Pavel Holoborodko,
+// see http://www.advanpix.com/2015/11/11/rational-approximations-for-the-modified-bessel-function-of-the-first-kind-i0-computations-double-precision
+// The actual coefficients used are our own, and extend Pavel's work to precision's other than double.
+
+namespace boost { namespace math { namespace detail{
+
+template <typename T>
+T bessel_i0(const T& x);
+
+template <class T, class tag>
+struct bessel_i0_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ static void do_init(const mpl::int_<64>&)
+ {
+ bessel_i0(T(1));
+ bessel_i0(T(8));
+ bessel_i0(T(12));
+ bessel_i0(T(40));
+ bessel_i0(T(101));
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ bessel_i0(T(1));
+ bessel_i0(T(10));
+ bessel_i0(T(20));
+ bessel_i0(T(40));
+ bessel_i0(T(101));
+ }
+ template <class U>
+ static void do_init(const U&) {}
+ void force_instantiate()const {}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class tag>
+const typename bessel_i0_initializer<T, tag>::init bessel_i0_initializer<T, tag>::initializer;
+
+template <typename T, int N>
+T bessel_i0_imp(const T&, const mpl::int_<N>&)
+{
+ BOOST_ASSERT(0);
+ return 0;
+}
+
+template <typename T>
+T bessel_i0_imp(const T& x, const mpl::int_<24>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Max error in interpolated form: 3.929e-08
+ // Max Error found at float precision = Poly: 1.991226e-07
+ static const float P[] = {
+ 1.00000003928615375e+00f,
+ 2.49999576572179639e-01f,
+ 2.77785268558399407e-02f,
+ 1.73560257755821695e-03f,
+ 6.96166518788906424e-05f,
+ 1.89645733877137904e-06f,
+ 4.29455004657565361e-08f,
+ 3.90565476357034480e-10f,
+ 1.48095934745267240e-11f
+ };
+ T a = x * x / 4;
+ return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
+ }
+ else if(x < 50)
+ {
+ // Max error in interpolated form: 5.195e-08
+ // Max Error found at float precision = Poly: 8.502534e-08
+ static const float P[] = {
+ 3.98942651588301770e-01f,
+ 4.98327234176892844e-02f,
+ 2.91866904423115499e-02f,
+ 1.35614940793742178e-02f,
+ 1.31409251787866793e-01f
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else
+ {
+ // Max error in interpolated form: 1.782e-09
+ // Max Error found at float precision = Poly: 6.473568e-08
+ static const float P[] = {
+ 3.98942391532752700e-01f,
+ 4.98455950638200020e-02f,
+ 2.94835666900682535e-02f
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i0_imp(const T& x, const mpl::int_<53>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Bessel I0 over[10 ^ -16, 7.75]
+ // Max error in interpolated form : 3.042e-18
+ // Max Error found at double precision = Poly : 5.106609e-16 Cheb : 5.239199e-16
+ static const double P[] = {
+ 1.00000000000000000e+00,
+ 2.49999999999999909e-01,
+ 2.77777777777782257e-02,
+ 1.73611111111023792e-03,
+ 6.94444444453352521e-05,
+ 1.92901234513219920e-06,
+ 3.93675991102510739e-08,
+ 6.15118672704439289e-10,
+ 7.59407002058973446e-12,
+ 7.59389793369836367e-14,
+ 6.27767773636292611e-16,
+ 4.34709704153272287e-18,
+ 2.63417742690109154e-20,
+ 1.13943037744822825e-22,
+ 9.07926920085624812e-25
+ };
+ T a = x * x / 4;
+ return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
+ }
+ else if(x < 500)
+ {
+ // Max error in interpolated form : 1.685e-16
+ // Max Error found at double precision = Poly : 2.575063e-16 Cheb : 2.247615e+00
+ static const double P[] = {
+ 3.98942280401425088e-01,
+ 4.98677850604961985e-02,
+ 2.80506233928312623e-02,
+ 2.92211225166047873e-02,
+ 4.44207299493659561e-02,
+ 1.30970574605856719e-01,
+ -3.35052280231727022e+00,
+ 2.33025711583514727e+02,
+ -1.13366350697172355e+04,
+ 4.24057674317867331e+05,
+ -1.23157028595698731e+07,
+ 2.80231938155267516e+08,
+ -5.01883999713777929e+09,
+ 7.08029243015109113e+10,
+ -7.84261082124811106e+11,
+ 6.76825737854096565e+12,
+ -4.49034849696138065e+13,
+ 2.24155239966958995e+14,
+ -8.13426467865659318e+14,
+ 2.02391097391687777e+15,
+ -3.08675715295370878e+15,
+ 2.17587543863819074e+15
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else
+ {
+ // Max error in interpolated form : 2.437e-18
+ // Max Error found at double precision = Poly : 1.216719e-16
+ static const double P[] = {
+ 3.98942280401432905e-01,
+ 4.98677850491434560e-02,
+ 2.80506308916506102e-02,
+ 2.92179096853915176e-02,
+ 4.53371208762579442e-02
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i0_imp(const T& x, const mpl::int_<64>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Bessel I0 over[10 ^ -16, 7.75]
+ // Max error in interpolated form : 3.899e-20
+ // Max Error found at float80 precision = Poly : 1.770840e-19
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.99999999999999999961011629e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.50000000000000001321873912e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.77777777777777703400424216e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.73611111111112764793802701e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.94444444444251461247253525e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.92901234569262206386118739e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.93675988851131457141005209e-08),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.15118734688297476454205352e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.59405797058091016449222685e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.59406599631719800679835140e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.27598961062070013516660425e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.35920318970387940278362992e-18),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.57372492687715452949437981e-20),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.33908663475949906992942204e-22),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.15976668870980234582896010e-25),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.46240478946376069211156548e-27)
+ };
+ T a = x * x / 4;
+ return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
+ }
+ else if(x < 10)
+ {
+ // Maximum Deviation Found: 6.906e-21
+ // Expected Error Term : -6.903e-21
+ // Maximum Relative Change in Control Points : 1.631e-04
+ // Max Error found at float80 precision = Poly : 7.811948e-21
+ static const T Y = 4.051098823547363281250e-01f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -6.158081780620616479492e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.883635969834048766148e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.892782002476195771920e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.478784996478070170327e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.988611837308006851257e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.140133766747436806179e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.117316447921276453271e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.942353667455141676001e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.493482682461387081534e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -5.228100538921466124653e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.195279248600467989454e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.601530760654337045917e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.504921137873298402679e+05)
+ };
+ return exp(x) * (boost::math::tools::evaluate_polynomial(P, T(1 / x)) + Y) / sqrt(x);
+ }
+ else if(x < 15)
+ {
+ // Maximum Deviation Found: 4.083e-21
+ // Expected Error Term : -4.025e-21
+ // Maximum Relative Change in Control Points : 1.304e-03
+ // Max Error found at float80 precision = Poly : 2.303527e-20
+ static const T Y = 4.033188819885253906250e-01f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.376373876116109401062e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.982899138682911273321e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.109477529533515397644e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.163760580110576407673e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.776501832837367371883e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.101478069227776656318e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.892071912448960299773e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.417739279982328117483e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.296963447724067390552e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.598589306710589358747e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.903662411851774878322e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.622677059040339516093e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.227776578828667629347e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.727797957441040896878e+07)
+ };
+ return exp(x) * (boost::math::tools::evaluate_polynomial(P, T(1 / x)) + Y) / sqrt(x);
+ }
+ else if(x < 50)
+ {
+ // Max error in interpolated form: 1.035e-21
+ // Max Error found at float80 precision = Poly: 1.885872e-21
+ static const T Y = 4.011702537536621093750e-01f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.227973351806078464328e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.986778486088017419036e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.805066823812285310011e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.921443721160964964623e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.517504941996594744052e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.316922639868793684401e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.535891099168810015433e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.706078229522448308087e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.351015763079160914632e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.948809013999277355098e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.967598958582595361757e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -6.346924657995383019558e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.998794574259956613472e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.016371355801690142095e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.768791455631826490838e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.441995678177349895640e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.482292669974971387738e+09)
+ };
+ return exp(x) * (boost::math::tools::evaluate_polynomial(P, T(1 / x)) + Y) / sqrt(x);
+ }
+ else
+ {
+ // Bessel I0 over[50, INF]
+ // Max error in interpolated form : 5.587e-20
+ // Max Error found at float80 precision = Poly : 8.776852e-20
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942280401432677955074061e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.98677850501789875615574058e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.80506290908675604202206833e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.92194052159035901631494784e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.47422430732256364094681137e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.05971614435738691235525172e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.29180522595459823234266708e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.15122547776140254569073131e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.48491812136365376477357324e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.45569740166506688169730713e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.66857566379480730407063170e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.71924083955641197750323901e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.74276685704579268845870586e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -8.89753803265734681907148778e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.82590905134996782086242180e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -7.30623197145529889358596301e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.27310000726207055200805893e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -6.64365417189215599168817064e+10)
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i0_imp(const T& x, const mpl::int_<113>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Bessel I0 over[10 ^ -34, 7.75]
+ // Max error in interpolated form : 1.274e-34
+ // Max Error found at float128 precision = Poly : 3.096091e-34
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000001273856e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.4999999999999999999999999999999107477496e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.7777777777777777777777777777881795230918e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.7361111111111111111111111106290091648808e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.9444444444444444444444445629960334523101e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.9290123456790123456790105563456483249753e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.9367598891408415217940836339080514004844e-08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.1511873267825648777900014857992724731476e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281266233066162999610732449709209e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281266232783124723601470051895304e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.2760813455591936763439337059117957836078e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.3583898233049738471136482147779094353096e-18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.5789288895299965395422423848480340736308e-20),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.3157800456718804437960453545507623434606e-22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.8479113149412360748032684260932041506493e-25),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.2843403488398038539283241944594140493394e-27),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.9042925594356556196790242908697582021825e-30),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.4395919891312152120710245152115597111101e-32),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.7580986145276689333214547502373003196707e-35),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.6886514018062348877723837017198859723889e-37),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.8540558465757554512570197585002702777999e-40),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.4684706070226893763741850944911705726436e-43),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.0210715309399646335858150349406935414314e-45)
+ };
+ T a = x * x / 4;
+ return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
+ }
+ else if(x < 15)
+ {
+ // Bessel I0 over[7.75, 15]
+ // Max error in interpolated form : 7.534e-35
+ // Max Error found at float128 precision = Poly : 6.123912e-34
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.9999999999999999992388573069504617493518e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.5000000000000000007304739268173096975340e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.7777777777777777744261405400543564492074e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.7361111111111111209006987259719750726867e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.9444444444444442399703186871329381908321e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.9290123456790126709286741580242189785431e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.9367598891408374246503061422528266924389e-08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.1511873267826068395343047827801353170966e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281262673459688011737168286944521e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281291583769928563167645746144508e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.2760813455438840231126529638737436950274e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.3583898233839583885132809584770578894948e-18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.5789288891798658971960571838369339742994e-20),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.3157800470129311623308216856009970266088e-22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.8479112701534604520063520412207286692581e-25),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.2843404822552330714586265081801727491890e-27),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.9042888166225242675881424439818162458179e-30),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.4396027771820721384198604723320045236973e-32),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.7577659910606076328136207973456511895030e-35),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.6896548123724136624716224328803899914646e-37),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.8285850162160539150210466453921758781984e-40),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.9419071894227736216423562425429524883562e-43),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.4720374049498608905571855665134539425038e-45),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.7763533278527958112907118930154738930378e-48),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.1213839473168678646697528580511702663617e-51),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0648035313124146852372607519737686740964e-53),
+ -BOOST_MATH_BIG_CONSTANT(T, 113, 5.1255595184052024349371058585102280860878e-57),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.4652470895944157957727948355523715335882e-59)
+ };
+ T a = x * x / 4;
+ return a * boost::math::tools::evaluate_polynomial(P, a) + 1;
+ }
+ else if(x < 30)
+ {
+ // Max error in interpolated form : 1.808e-34
+ // Max Error found at float128 precision = Poly : 2.399403e-34
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040870793650581242239624530714032e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.9867780576714783790784348982178607842250e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.8051948347934462928487999569249907599510e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.8971143420388958551176254291160976367263e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.8197359701715582763961322341827341098897e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.3430484862908317377522273217643346601271e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.7884507603213662610604413960838990199224e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.8304926482356755790062999202373909300514e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.8867173178574875515293357145875120137676e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.4261178812193528551544261731796888257644e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.6453010340778116475788083817762403540097e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.0432401330113978669454035365747869477960e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.2462165331309799059332310595587606836357e+12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.3299800389951335932792950236410844978273e+13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.5748218240248714177527965706790413406639e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.8330014378766930869945511450377736037385e+15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.8494610073827453236940544799030787866218e+17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.7244661371420647691301043350229977856476e+18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.2386378807889388140099109087465781254321e+20),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.1104000573102013529518477353943384110982e+21),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.9426541092239879262282594572224300191016e+22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.4061439136301913488512592402635688101020e+23),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.2836554760521986358980180942859101564671e+24),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.6270285589905206294944214795661236766988e+25),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.7278631455211972017740134341610659484259e+26),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.1971734473772196124736986948034978906801e+26),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.8669270707172568763908838463689093500098e+27),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.2368879358870281916900125550129211146626e+28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.8296235063297831758204519071113999839858e+28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.1253861666023020670144616019148954773662e+28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.8809536950051955163648980306847791014734e+28) };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else if(x < 100)
+ {
+ // Bessel I0 over[30, 100]
+ // Max error in interpolated form : 1.487e-34
+ // Max Error found at float128 precision = Poly : 1.929924e-34
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040143267793996798658172135362278e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.9867785050179084714910130342157246539820e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.8050629090725751585266360464766768437048e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.9219405302833158254515212437025679637597e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.4742214371598631578107310396249912330627e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.0602983776478659136184969363625092585520e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.2839507231977478205885469900971893734770e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.8925739165733823730525449511456529001868e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.4238082222874015159424842335385854632223e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.6759648427182491050716309699208988458050e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.7292246491169360014875196108746167872215e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.1001411442786230340015781205680362993575e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.8277628835804873490331739499978938078848e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.1208326312801432038715638596517882759639e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.4813611580683862051838126076298945680803e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.1278197693321821164135890132925119054391e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.3190303792682886967459489059860595063574e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.1580767338646580750893606158043485767644e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.0256008808415702780816006134784995506549e+11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.9044186472918017896554580836514681614475e+13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.2521078890073151875661384381880225635135e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.3620352486836976842181057590770636605454e+15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.0375525734060401555856465179734887312420e+16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.6392664899881014534361728644608549445131e+16)
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else
+ {
+ // Bessel I0 over[100, INF]
+ // Max error in interpolated form : 5.459e-35
+ // Max Error found at float128 precision = Poly : 1.472240e-34
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040143267793994605993438166526772e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.9867785050179084742493257495245185241487e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.8050629090725735167652437695397756897920e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.9219405302839307466358297347675795965363e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.4742214369972689474366968442268908028204e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.0602984099194778006610058410222616383078e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.2839502241666629677015839125593079416327e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.8926354981801627920292655818232972385750e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.4231921590621824187100989532173995000655e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.7264260959693775207585700654645245723497e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.3890136225398811195878046856373030127018e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.1999720924619285464910452647408431234369e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.2076909538525038580501368530598517194748e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.5684635141332367730007149159063086133399e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.5178192543258299267923025833141286569141e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.2966297919851965784482163987240461837728e+05) };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i0_imp(const T& x, const mpl::int_<0>&)
+{
+ if(boost::math::tools::digits<T>() <= 24)
+ return bessel_i0_imp(x, mpl::int_<24>());
+ else if(boost::math::tools::digits<T>() <= 53)
+ return bessel_i0_imp(x, mpl::int_<53>());
+ else if(boost::math::tools::digits<T>() <= 64)
+ return bessel_i0_imp(x, mpl::int_<64>());
+ else if(boost::math::tools::digits<T>() <= 113)
+ return bessel_i0_imp(x, mpl::int_<113>());
+ BOOST_ASSERT(0);
+ return 0;
+}
+
+template <typename T>
+inline T bessel_i0(const T& x)
+{
+ typedef mpl::int_<
+ ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
+ 0 :
+ std::numeric_limits<T>::digits <= 24 ?
+ 24 :
+ std::numeric_limits<T>::digits <= 53 ?
+ 53 :
+ std::numeric_limits<T>::digits <= 64 ?
+ 64 :
+ std::numeric_limits<T>::digits <= 113 ?
+ 113 : -1
+ > tag_type;
+
+ bessel_i0_initializer<T, tag_type>::force_instantiate();
+ return bessel_i0_imp(x, tag_type());
+}
+
+}}} // namespaces
+
+#endif // BOOST_MATH_BESSEL_I0_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i1.hpp
new file mode 100644
index 00000000000..460efbd4610
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_i1.hpp
@@ -0,0 +1,592 @@
+// Copyright (c) 2017 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)
+
+// Modified Bessel function of the first kind of order zero
+// we use the approximating forms derived in:
+// "Rational Approximations for the Modified Bessel Function of the First Kind - I1(x) for Computations with Double Precision"
+// by Pavel Holoborodko,
+// see http://www.advanpix.com/2015/11/12/rational-approximations-for-the-modified-bessel-function-of-the-first-kind-i1-for-computations-with-double-precision/
+// The actual coefficients used are our own, and extend Pavel's work to precision's other than double.
+
+#ifndef BOOST_MATH_BESSEL_I1_HPP
+#define BOOST_MATH_BESSEL_I1_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Modified Bessel function of the first kind of order one
+// minimax rational approximations on intervals, see
+// Blair and Edwards, Chalk River Report AECL-4928, 1974
+
+namespace boost { namespace math { namespace detail{
+
+template <typename T>
+T bessel_i1(const T& x);
+
+template <class T, class tag>
+struct bessel_i1_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ static void do_init(const mpl::int_<64>&)
+ {
+ bessel_i1(T(1));
+ bessel_i1(T(15));
+ bessel_i1(T(80));
+ bessel_i1(T(101));
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ bessel_i1(T(1));
+ bessel_i1(T(10));
+ bessel_i1(T(14));
+ bessel_i1(T(19));
+ bessel_i1(T(34));
+ bessel_i1(T(99));
+ bessel_i1(T(101));
+ }
+ template <class U>
+ static void do_init(const U&) {}
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class tag>
+const typename bessel_i1_initializer<T, tag>::init bessel_i1_initializer<T, tag>::initializer;
+
+template <typename T, int N>
+T bessel_i1_imp(const T&, const mpl::int_<N>&)
+{
+ BOOST_ASSERT(0);
+ return 0;
+}
+
+template <typename T>
+T bessel_i1_imp(const T& x, const mpl::int_<24>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ //Max error in interpolated form : 1.348e-08
+ // Max Error found at float precision = Poly : 1.469121e-07
+ static const float P[] = {
+ 8.333333221e-02f,
+ 6.944453712e-03f,
+ 3.472097211e-04f,
+ 1.158047174e-05f,
+ 2.739745142e-07f,
+ 5.135884609e-09f,
+ 5.262251502e-11f,
+ 1.331933703e-12f
+ };
+ T a = x * x / 4;
+ T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
+ return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
+ }
+ else
+ {
+ // Max error in interpolated form: 9.000e-08
+ // Max Error found at float precision = Poly: 1.044345e-07
+
+ static const float P[] = {
+ 3.98942115977513013e-01f,
+ -1.49581264836620262e-01f,
+ -4.76475741878486795e-02f,
+ -2.65157315524784407e-02f,
+ -1.47148600683672014e-01f
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i1_imp(const T& x, const mpl::int_<53>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Bessel I0 over[10 ^ -16, 7.75]
+ // Max error in interpolated form: 5.639e-17
+ // Max Error found at double precision = Poly: 1.795559e-16
+
+ static const double P[] = {
+ 8.333333333333333803e-02,
+ 6.944444444444341983e-03,
+ 3.472222222225921045e-04,
+ 1.157407407354987232e-05,
+ 2.755731926254790268e-07,
+ 4.920949692800671435e-09,
+ 6.834657311305621830e-11,
+ 7.593969849687574339e-13,
+ 6.904822652741917551e-15,
+ 5.220157095351373194e-17,
+ 3.410720494727771276e-19,
+ 1.625212890947171108e-21,
+ 1.332898928162290861e-23
+ };
+ T a = x * x / 4;
+ T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
+ return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
+ }
+ else if(x < 500)
+ {
+ // Max error in interpolated form: 1.796e-16
+ // Max Error found at double precision = Poly: 2.898731e-16
+
+ static const double P[] = {
+ 3.989422804014406054e-01,
+ -1.496033551613111533e-01,
+ -4.675104253598537322e-02,
+ -4.090895951581637791e-02,
+ -5.719036414430205390e-02,
+ -1.528189554374492735e-01,
+ 3.458284470977172076e+00,
+ -2.426181371595021021e+02,
+ 1.178785865993440669e+04,
+ -4.404655582443487334e+05,
+ 1.277677779341446497e+07,
+ -2.903390398236656519e+08,
+ 5.192386898222206474e+09,
+ -7.313784438967834057e+10,
+ 8.087824484994859552e+11,
+ -6.967602516005787001e+12,
+ 4.614040809616582764e+13,
+ -2.298849639457172489e+14,
+ 8.325554073334618015e+14,
+ -2.067285045778906105e+15,
+ 3.146401654361325073e+15,
+ -2.213318202179221945e+15
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else
+ {
+ // Max error in interpolated form: 1.320e-19
+ // Max Error found at double precision = Poly: 7.065357e-17
+ static const double P[] = {
+ 3.989422804014314820e-01,
+ -1.496033551467584157e-01,
+ -4.675105322571775911e-02,
+ -4.090421597376992892e-02,
+ -5.843630344778927582e-02
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i1_imp(const T& x, const mpl::int_<64>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Bessel I0 over[10 ^ -16, 7.75]
+ // Max error in interpolated form: 8.086e-21
+ // Max Error found at float80 precision = Poly: 7.225090e-20
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.33333333333333333340071817e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.94444444444444442462728070e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.47222222222222318886683883e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.15740740740738880709555060e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.75573192240046222242685145e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.92094986131253986838697503e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.83465258979924922633502182e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.59405830675154933645967137e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.90369179710633344508897178e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.23003610041709452814262671e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.35291901027762552549170038e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.83991379419781823063672109e-21),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.87732714140192556332037815e-24),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.32120654663773147206454247e-26),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.95294659305369207813486871e-28)
+ };
+ T a = x * x / 4;
+ T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
+ return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
+ }
+ else if(x < 20)
+ {
+ // Max error in interpolated form: 4.258e-20
+ // Max Error found at float80 precision = Poly: 2.851105e-19
+ // Maximum Deviation Found : 3.887e-20
+ // Expected Error Term : 3.887e-20
+ // Maximum Relative Change in Control Points : 1.681e-04
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942260530218897338680e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.49599542849073670179540e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.70492865454119188276875e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.12389893307392002405869e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.49696126385202602071197e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.84206507612717711565967e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.14748094784412558689584e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -7.70652726663596993005669e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.01659736164815617174439e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.04740659606466305607544e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.38383394696382837263656e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -8.00779638649147623107378e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.02338237858684714480491e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -6.41198553664947312995879e+11),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.05915186909564986897554e+12),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.00907636964168581116181e+13),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.60855263982359981275199e+13),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.12901817219239205393806e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.14861794397709807823575e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -5.02808138522587680348583e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.85505477056514919387171e+14)
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else if(x < 100)
+ {
+ // Bessel I0 over [15, 50]
+ // Maximum Deviation Found: 2.444e-20
+ // Expected Error Term : 2.438e-20
+ // Maximum Relative Change in Control Points : 2.101e-03
+ // Max Error found at float80 precision = Poly : 6.029974e-20
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942280401431675205845e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.49603355149968887210170e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.67510486284376330257260e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.09071458907089270559464e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -5.75278280327696940044714e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.10591299500956620739254e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.77061766699949309115618e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -5.42683771801837596371638e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -9.17021412070404158464316e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.04154379346763380543310e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.43462345357478348323006e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.98109660274422449523837e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.74438822767781410362757e+04)
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else
+ {
+ // Bessel I0 over[100, INF]
+ // Max error in interpolated form: 2.456e-20
+ // Max Error found at float80 precision = Poly: 5.446356e-20
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.98942280401432677958445e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.49603355150537411254359e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.67510484842456251368526e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.09071676503922479645155e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -5.75256179814881566010606e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.10754910257965227825040e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.67858639515616079840294e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -9.17266479586791298924367e-01)
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i1_imp(const T& x, const mpl::int_<113>&)
+{
+ BOOST_MATH_STD_USING
+ if(x < 7.75)
+ {
+ // Bessel I0 over[10 ^ -34, 7.75]
+ // Max error in interpolated form: 1.835e-35
+ // Max Error found at float128 precision = Poly: 1.645036e-34
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.3333333333333333333333333333333331804098e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.9444444444444444444444444444445418303082e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.4722222222222222222222222222119082346591e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.1574074074074074074074074078415867655987e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.7557319223985890652557318255143448192453e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.9209498614260519022423916850415000626427e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.8346525853139609753354247043900442393686e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.5940584281266233060080535940234144302217e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.9036894801151120925605467963949641957095e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.2300677879659941472662086395055636394839e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.3526075563884539394691458717439115962233e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.8420920639497841692288943167036233338434e-21),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.7718669711748690065381181691546032291365e-24),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.6549445715236427401845636880769861424730e-26),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.3437296196812697924703896979250126739676e-28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.3912734588619073883015937023564978854893e-31),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.2839967682792395867255384448052781306897e-33),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.3790094235693528861015312806394354114982e-36),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.0423861671932104308662362292359563970482e-39),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.7493858979396446292135661268130281652945e-41),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.2786079392547776769387921361408303035537e-44),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.2335693685833531118863552173880047183822e-47)
+ };
+ T a = x * x / 4;
+ T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
+ return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
+ }
+ else if(x < 11)
+ {
+ // Max error in interpolated form: 8.574e-36
+ // Maximum Deviation Found : 4.689e-36
+ // Expected Error Term : 3.760e-36
+ // Maximum Relative Change in Control Points : 5.204e-03
+ // Max Error found at float128 precision = Poly : 2.882561e-34
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.333333333333333326889717360850080939e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.944444444444444511272790848815114507e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.472222222222221892451965054394153443e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.157407407407408437378868534321538798e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.755731922398566216824909767320161880e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.920949861426434829568192525456800388e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.834652585308926245465686943255486934e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.594058428179852047689599244015979196e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.903689479655006062822949671528763738e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.230067791254403974475987777406992984e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.352607536815161679702105115200693346e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.842092161364672561828681848278567885e-21),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.771862912600611801856514076709932773e-24),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.654958704184380914803366733193713605e-26),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.343688672071130980471207297730607625e-28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.392252844664709532905868749753463950e-31),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.282086786672692641959912811902298600e-33),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.408812012322547015191398229942864809e-36),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.681220437734066258673404589233009892e-39),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.072417451640733785626701738789290055e-41),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.352218520142636864158849446833681038e-44),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.407918492276267527897751358794783640e-46)
+ };
+ T a = x * x / 4;
+ T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
+ return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
+ }
+ else if(x < 15)
+ {
+ //Max error in interpolated form: 7.599e-36
+ // Maximum Deviation Found : 1.766e-35
+ // Expected Error Term : 1.021e-35
+ // Maximum Relative Change in Control Points : 6.228e-03
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.333333333333255774414858563409941233e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.944444444444897867884955912228700291e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.472222222220954970397343617150959467e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.157407407409660682751155024932538578e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.755731922369973706427272809014190998e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.920949861702265600960449699129258153e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.834652583208361401197752793379677147e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.594058441128280500819776168239988143e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.903689413939268702265479276217647209e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.230068069012898202890718644753625569e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.352606552027491657204243201021677257e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.842095100698532984651921750204843362e-21),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.771789051329870174925649852681844169e-24),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.655114381199979536997025497438385062e-26),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.343415732516712339472538688374589373e-28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.396177019032432392793591204647901390e-31),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.277563309255167951005939802771456315e-33),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.449201419305514579791370198046544736e-36),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.415430703400740634202379012388035255e-39),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.195458831864936225409005027914934499e-41),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.829726762743879793396637797534668039e-45),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.698302711685624490806751012380215488e-46),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.062520475425422618494185821587228317e-49),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.732372906742845717148185173723304360e-52)
+ };
+ T a = x * x / 4;
+ T Q[3] = { 1, 0.5f, boost::math::tools::evaluate_polynomial(P, a) };
+ return x * boost::math::tools::evaluate_polynomial(Q, a) / 2;
+ }
+ else if(x < 20)
+ {
+ // Max error in interpolated form: 8.864e-36
+ // Max Error found at float128 precision = Poly: 8.522841e-35
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.989422793693152031514179994954750043e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.496029423752889591425633234009799670e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.682975926820553021482820043377990241e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.138871171577224532369979905856458929e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.765350219426341341990447005798111212e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.321389275507714530941178258122955540e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.727748393898888756515271847678850411e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.123040820686242586086564998713862335e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.784112378374753535335272752884808068e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.054920416060932189433079126269416563e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.450129415468060676827180524327749553e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.758831882046487398739784498047935515e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.736936520262204842199620784338052937e+11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.051128683324042629513978256179115439e+13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.188008285959794869092624343537262342e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.108530004906954627420484180793165669e+15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.441516828490144766650287123765318484e+15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.158251664797753450664499268756393535e+16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.467314522709016832128790443932896401e+17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.896222045367960462945885220710294075e+17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.273382139594876997203657902425653079e+18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.669871448568623680543943144842394531e+18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.813923031370708069940575240509912588e+18)
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else if(x < 35)
+ {
+ // Max error in interpolated form: 6.028e-35
+ // Max Error found at float128 precision = Poly: 1.368313e-34
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.989422804012941975429616956496046931e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.496033550576049830976679315420681402e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.675107835141866009896710750800622147e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.090104965125365961928716504473692957e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.842241652296980863361375208605487570e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.063604828033747303936724279018650633e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -9.113375972811586130949401996332817152e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.334748570425075872639817839399823709e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.759150758768733692594821032784124765e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.863672813448915255286274382558526321e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.798248643371718775489178767529282534e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.769963173932801026451013022000669267e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.381780137198278741566746511015220011e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.163891337116820832871382141011952931e+12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.764325864671438675151635117936912390e+13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.925668307403332887856809510525154955e+14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.416692606589060039334938090985713641e+16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.892398600219306424294729851605944429e+17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.107232903741874160308537145391245060e+18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.930223393531877588898224144054112045e+19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.427759576167665663373350433236061007e+20),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.306019279465532835530812122374386654e+20),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.653753000392125229440044977239174472e+21),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.140760686989511568435076842569804906e+22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.249149337812510200795436107962504749e+22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.101619088427348382058085685849420866e+22)
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else if(x < 100)
+ {
+ // Max error in interpolated form: 5.494e-35
+ // Max Error found at float128 precision = Poly: 1.214651e-34
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.989422804014326779399307367861631577e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.496033551505372542086590873271571919e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.675104848454290286276466276677172664e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.090716742397105403027549796269213215e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.752570419098513588311026680089351230e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.107369803696534592906420980901195808e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.699214194000085622941721628134575121e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.953006169077813678478720427604462133e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.746618809476524091493444128605380593e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.084446249943196826652788161656973391e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.020325182518980633783194648285500554e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.510195971266257573425196228564489134e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.241661863814900938075696173192225056e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.323374362891993686413568398575539777e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.112838452096066633754042734723911040e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.369270194978310081563767560113534023e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.704295412488936504389347368131134993e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.320829576277038198439987439508754886e+10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.258818139077875493434420764260185306e+11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.396791306321498426110315039064592443e+12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.217617301585849875301440316301068439e+12)
+ };
+ return exp(x) * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ }
+ else
+ {
+ // Bessel I0 over[100, INF]
+ // Max error in interpolated form: 6.081e-35
+ // Max Error found at float128 precision = Poly: 1.407151e-34
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.9894228040143267793994605993438200208417e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.4960335515053725422747977247811372936584e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.6751048484542891946087411826356811991039e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.0907167423975030452875828826630006305665e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.7525704189964886494791082898669060345483e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.1073698056568248642163476807108190176386e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.6992139012879749064623499618582631684228e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.9530409594026597988098934027440110587905e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.7462844478733532517044536719240098183686e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.0870711340681926669381449306654104739256e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.8510175413216969245241059608553222505228e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.4094682286011573747064907919522894740063e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.3128845936764406865199641778959502795443e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.1655901321962541203257516341266838487359e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.8019591025686295090160445920753823994556e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -6.7008089049178178697338128837158732831105e+05)
+ };
+ T ex = exp(x / 2);
+ T result = ex * boost::math::tools::evaluate_polynomial(P, T(1 / x)) / sqrt(x);
+ result *= ex;
+ return result;
+ }
+}
+
+template <typename T>
+T bessel_i1_imp(const T& x, const mpl::int_<0>&)
+{
+ if(boost::math::tools::digits<T>() <= 24)
+ return bessel_i1_imp(x, mpl::int_<24>());
+ else if(boost::math::tools::digits<T>() <= 53)
+ return bessel_i1_imp(x, mpl::int_<53>());
+ else if(boost::math::tools::digits<T>() <= 64)
+ return bessel_i1_imp(x, mpl::int_<64>());
+ else if(boost::math::tools::digits<T>() <= 113)
+ return bessel_i1_imp(x, mpl::int_<113>());
+ BOOST_ASSERT(0);
+ return 0;
+}
+
+template <typename T>
+inline T bessel_i1(const T& x)
+{
+ typedef mpl::int_<
+ ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
+ 0 :
+ std::numeric_limits<T>::digits <= 24 ?
+ 24 :
+ std::numeric_limits<T>::digits <= 53 ?
+ 53 :
+ std::numeric_limits<T>::digits <= 64 ?
+ 64 :
+ std::numeric_limits<T>::digits <= 113 ?
+ 113 : -1
+ > tag_type;
+
+ bessel_i1_initializer<T, tag_type>::force_instantiate();
+ return bessel_i1_imp(x, tag_type());
+}
+
+}}} // namespaces
+
+#endif // BOOST_MATH_BESSEL_I1_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_ik.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_ik.hpp
index aac1781e10d..aac1781e10d 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_ik.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_ik.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j0.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j0.hpp
new file mode 100644
index 00000000000..f7c381c47eb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j0.hpp
@@ -0,0 +1,203 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// 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_BESSEL_J0_HPP
+#define BOOST_MATH_BESSEL_J0_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/constants/constants.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Bessel function of the first kind of order zero
+// x <= 8, minimax rational approximations on root-bracketing intervals
+// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
+
+namespace boost { namespace math { namespace detail{
+
+template <typename T>
+T bessel_j0(T x);
+
+template <class T>
+struct bessel_j0_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init();
+ }
+ static void do_init()
+ {
+ bessel_j0(T(1));
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T>
+const typename bessel_j0_initializer<T>::init bessel_j0_initializer<T>::initializer;
+
+template <typename T>
+T bessel_j0(T x)
+{
+ bessel_j0_initializer<T>::force_instantiate();
+
+ static const T P1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.1298668500990866786e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.7282507878605942706e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.2140700423540120665e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6302997904833794242e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.6629814655107086448e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0344222815443188943e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2117036164593528341e-01))
+ };
+ static const T Q1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.3883787996332290397e+12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.6328198300859648632e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3985097372263433271e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.5612696224219938200e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.3614022392337710626e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
+ };
+ static const T P2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8319397969392084011e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2254078161378989535e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -7.2879702464464618998e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0341910641583726701e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1725046279757103576e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.4176707025325087628e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.4321196680624245801e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.8591703355916499363e+01))
+ };
+ static const T Q2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.5783478026152301072e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4599102262586308984e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.4055062591169562211e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8680990008359188352e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.9458766545509337327e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.3307310774649071172e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.5258076240801555057e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
+ };
+ static const T PC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684302e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1345386639580765797e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1170523380864944322e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4806486443249270347e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5376201909008354296e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.8961548424210455236e-01))
+ };
+ static const T QC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684318e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1370412495510416640e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1215350561880115730e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5028735138235608207e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5711159858080893649e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
+ };
+ static const T PS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.9226600200800094098e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8591953644342993800e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1183429920482737611e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.2300261666214198472e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2441026745835638459e+00)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.8033303048680751817e-03))
+ };
+ static const T QS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.7105024128512061905e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1951131543434613647e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.2642780169211018836e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4887231232283756582e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.0593769594993125859e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
+ };
+ static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4048255576957727686e+00)),
+ x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.5200781102863106496e+00)),
+ x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.160e+02)),
+ x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.42444230422723137837e-03)),
+ x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4130e+03)),
+ x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.46860286310649596604e-04));
+
+ T value, factor, r, rc, rs;
+
+ BOOST_MATH_STD_USING
+ using namespace boost::math::tools;
+ using namespace boost::math::constants;
+
+ if (x < 0)
+ {
+ x = -x; // even function
+ }
+ if (x == 0)
+ {
+ return static_cast<T>(1);
+ }
+ if (x <= 4) // x in (0, 4]
+ {
+ T y = x * x;
+ BOOST_ASSERT(sizeof(P1) == sizeof(Q1));
+ r = evaluate_rational(P1, Q1, y);
+ factor = (x + x1) * ((x - x11/256) - x12);
+ value = factor * r;
+ }
+ else if (x <= 8.0) // x in (4, 8]
+ {
+ T y = 1 - (x * x)/64;
+ BOOST_ASSERT(sizeof(P2) == sizeof(Q2));
+ r = evaluate_rational(P2, Q2, y);
+ factor = (x + x2) * ((x - x21/256) - x22);
+ value = factor * r;
+ }
+ else // x in (8, \infty)
+ {
+ T y = 8 / x;
+ T y2 = y * y;
+ BOOST_ASSERT(sizeof(PC) == sizeof(QC));
+ BOOST_ASSERT(sizeof(PS) == sizeof(QS));
+ rc = evaluate_rational(PC, QC, y2);
+ rs = evaluate_rational(PS, QS, y2);
+ factor = constants::one_div_root_pi<T>() / sqrt(x);
+ //
+ // What follows is really just:
+ //
+ // T z = x - pi/4;
+ // value = factor * (rc * cos(z) - y * rs * sin(z));
+ //
+ // But using the addition formulae for sin and cos, plus
+ // the special values for sin/cos of pi/4.
+ //
+ T sx = sin(x);
+ T cx = cos(x);
+ value = factor * (rc * (cx + sx) - y * rs * (sx - cx));
+ }
+
+ return value;
+}
+
+}}} // namespaces
+
+#endif // BOOST_MATH_BESSEL_J0_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j1.hpp
new file mode 100644
index 00000000000..05cf40f0d78
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_j1.hpp
@@ -0,0 +1,209 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// 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_BESSEL_J1_HPP
+#define BOOST_MATH_BESSEL_J1_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/constants/constants.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Bessel function of the first kind of order one
+// x <= 8, minimax rational approximations on root-bracketing intervals
+// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
+
+namespace boost { namespace math{ namespace detail{
+
+template <typename T>
+T bessel_j1(T x);
+
+template <class T>
+struct bessel_j1_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init();
+ }
+ static void do_init()
+ {
+ bessel_j1(T(1));
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T>
+const typename bessel_j1_initializer<T>::init bessel_j1_initializer<T>::initializer;
+
+template <typename T>
+T bessel_j1(T x)
+{
+ bessel_j1_initializer<T>::force_instantiate();
+
+ static const T P1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4258509801366645672e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6781041261492395835e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1548696764841276794e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.8062904098958257677e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4615792982775076130e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0650724020080236441e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0767857011487300348e-02))
+ };
+ static const T Q1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1868604460820175290e+12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.2091902282580133541e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.0228375140097033958e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.9117614494174794095e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0742272239517380498e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
+ };
+ static const T P2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.7527881995806511112e+16)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.6608531731299018674e+15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.6658018905416665164e+13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5580665670910619166e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8113931269860667829e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.0793266148011179143e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -7.5023342220781607561e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.6179191852758252278e+00))
+ };
+ static const T Q2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7253905888447681194e+18)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7128800897135812012e+16)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.4899346165481429307e+13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.7622777286244082666e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.4872502899596389593e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1267125065029138050e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3886978985861357615e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
+ };
+ static const T PC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278571e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9422465050776411957e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.6033732483649391093e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5235293511811373833e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0982405543459346727e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6116166443246101165e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
+ };
+ static const T QC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278568e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9341243899345856590e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.5853394797230870728e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5118095066341608816e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0726385991103820119e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4550094401904961825e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
+ };
+ static const T PS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.3220913409857223519e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.5145160675335701966e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6178836581270835179e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8494262873223866797e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7063754290207680021e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5265133846636032186e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0))
+ };
+ static const T QS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0871281941028743574e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8194580422439972989e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4194606696037208929e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0029443582266975117e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.7890229745772202641e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.6383677696049909675e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
+ };
+ static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.8317059702075123156e+00)),
+ x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0155866698156187535e+00)),
+ x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.810e+02)),
+ x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.2527979248768438556e-04)),
+ x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7960e+03)),
+ x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.8330184381246462950e-05));
+
+ T value, factor, r, rc, rs, w;
+
+ BOOST_MATH_STD_USING
+ using namespace boost::math::tools;
+ using namespace boost::math::constants;
+
+ w = abs(x);
+ if (x == 0)
+ {
+ return static_cast<T>(0);
+ }
+ if (w <= 4) // w in (0, 4]
+ {
+ T y = x * x;
+ BOOST_ASSERT(sizeof(P1) == sizeof(Q1));
+ r = evaluate_rational(P1, Q1, y);
+ factor = w * (w + x1) * ((w - x11/256) - x12);
+ value = factor * r;
+ }
+ else if (w <= 8) // w in (4, 8]
+ {
+ T y = x * x;
+ BOOST_ASSERT(sizeof(P2) == sizeof(Q2));
+ r = evaluate_rational(P2, Q2, y);
+ factor = w * (w + x2) * ((w - x21/256) - x22);
+ value = factor * r;
+ }
+ else // w in (8, \infty)
+ {
+ T y = 8 / w;
+ T y2 = y * y;
+ BOOST_ASSERT(sizeof(PC) == sizeof(QC));
+ BOOST_ASSERT(sizeof(PS) == sizeof(QS));
+ rc = evaluate_rational(PC, QC, y2);
+ rs = evaluate_rational(PS, QS, y2);
+ factor = 1 / (sqrt(w) * constants::root_pi<T>());
+ //
+ // What follows is really just:
+ //
+ // T z = w - 0.75f * pi<T>();
+ // value = factor * (rc * cos(z) - y * rs * sin(z));
+ //
+ // but using the sin/cos addition rules plus constants
+ // for the values of sin/cos of 3PI/4 which then cancel
+ // out with corresponding terms in "factor".
+ //
+ T sx = sin(x);
+ T cx = cos(x);
+ value = factor * (rc * (sx - cx) + y * rs * (sx + cx));
+ }
+
+ if (x < 0)
+ {
+ value *= -1; // odd function
+ }
+ return value;
+}
+
+}}} // namespaces
+
+#endif // BOOST_MATH_BESSEL_J1_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jn.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jn.hpp
index 2413630637f..2413630637f 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jn.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jn.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy.hpp
index b67d989b689..b67d989b689 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_asym.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_asym.hpp
index 4d7ac485ad6..4d7ac485ad6 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_asym.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_asym.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_series.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_series.hpp
index d50bef84e81..d50bef84e81 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_series.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_series.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_zero.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_zero.hpp
index ecd8696eeeb..ecd8696eeeb 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_zero.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_jy_zero.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k0.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k0.hpp
new file mode 100644
index 00000000000..c24d89093cc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k0.hpp
@@ -0,0 +1,519 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// Copyright (c) 2017 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_BESSEL_K0_HPP
+#define BOOST_MATH_BESSEL_K0_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
+#endif
+
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Modified Bessel function of the second kind of order zero
+// minimax rational approximations on intervals, see
+// Russon and Blair, Chalk River Report AECL-3461, 1969,
+// as revised by Pavel Holoborodko in "Rational Approximations
+// for the Modified Bessel Function of the Second Kind - K0(x)
+// for Computations with Double Precision", see
+// http://www.advanpix.com/2015/11/25/rational-approximations-for-the-modified-bessel-function-of-the-second-kind-k0-for-computations-with-double-precision/
+//
+// The actual coefficients used are our own derivation (by JM)
+// since we extend to both greater and lesser precision than the
+// references above. We can also improve performance WRT to
+// Holoborodko without loss of precision.
+
+namespace boost { namespace math { namespace detail{
+
+template <typename T>
+T bessel_k0(const T& x);
+
+template <class T, class tag>
+struct bessel_k0_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ bessel_k0(T(0.5));
+ bessel_k0(T(1.5));
+ }
+ static void do_init(const mpl::int_<64>&)
+ {
+ bessel_k0(T(0.5));
+ bessel_k0(T(1.5));
+ }
+ template <class U>
+ static void do_init(const U&){}
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class tag>
+const typename bessel_k0_initializer<T, tag>::init bessel_k0_initializer<T, tag>::initializer;
+
+
+template <typename T, int N>
+T bessel_k0_imp(const T& x, const mpl::int_<N>&)
+{
+ BOOST_ASSERT(0);
+ return 0;
+}
+
+template <typename T>
+T bessel_k0_imp(const T& x, const mpl::int_<24>&)
+{
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found : 2.358e-09
+ // Expected Error Term : -2.358e-09
+ // Maximum Relative Change in Control Points : 9.552e-02
+ // Max Error found at float precision = Poly : 4.448220e-08
+ static const T Y = 1.137250900268554688f;
+ static const T P[] =
+ {
+ -1.372508979104259711e-01f,
+ 2.622545986273687617e-01f,
+ 5.047103728247919836e-03f
+ };
+ static const T Q[] =
+ {
+ 1.000000000000000000e+00f,
+ -8.928694018000029415e-02f,
+ 2.985980684180969241e-03f
+ };
+ T a = x * x / 4;
+ a = (tools::evaluate_rational(P, Q, a) + Y) * a + 1;
+
+ // Maximum Deviation Found: 1.346e-09
+ // Expected Error Term : -1.343e-09
+ // Maximum Relative Change in Control Points : 2.405e-02
+ // Max Error found at float precision = Poly : 1.354814e-07
+ static const T P2[] = {
+ 1.159315158e-01f,
+ 2.789828686e-01f,
+ 2.524902861e-02f,
+ 8.457241514e-04f,
+ 1.530051997e-05f
+ };
+ return tools::evaluate_polynomial(P2, T(x * x)) - log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 1.587e-08
+ // Expected Error Term : 1.531e-08
+ // Maximum Relative Change in Control Points : 9.064e-02
+ // Max Error found at float precision = Poly : 5.065020e-08
+
+ static const T P[] =
+ {
+ 2.533141220e-01,
+ 5.221502603e-01,
+ 6.380180669e-02,
+ -5.934976547e-02
+ };
+ static const T Q[] =
+ {
+ 1.000000000e+00,
+ 2.679722431e+00,
+ 1.561635813e+00,
+ 1.573660661e-01
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + 1) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + 1) * ex / sqrt(x)) * ex;
+ }
+ }
+}
+
+template <typename T>
+T bessel_k0_imp(const T& x, const mpl::int_<53>&)
+{
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 6.077e-17
+ // Expected Error Term : -6.077e-17
+ // Maximum Relative Change in Control Points : 7.797e-02
+ // Max Error found at double precision = Poly : 1.003156e-16
+ static const T Y = 1.137250900268554688;
+ static const T P[] =
+ {
+ -1.372509002685546267e-01,
+ 2.574916117833312855e-01,
+ 1.395474602146869316e-02,
+ 5.445476986653926759e-04,
+ 7.125159422136622118e-06
+ };
+ static const T Q[] =
+ {
+ 1.000000000000000000e+00,
+ -5.458333438017788530e-02,
+ 1.291052816975251298e-03,
+ -1.367653946978586591e-05
+ };
+
+ T a = x * x / 4;
+ a = (tools::evaluate_polynomial(P, a) / tools::evaluate_polynomial(Q, a) + Y) * a + 1;
+
+ // Maximum Deviation Found: 3.429e-18
+ // Expected Error Term : 3.392e-18
+ // Maximum Relative Change in Control Points : 2.041e-02
+ // Max Error found at double precision = Poly : 2.513112e-16
+ static const T P2[] =
+ {
+ 1.159315156584124484e-01,
+ 2.789828789146031732e-01,
+ 2.524892993216121934e-02,
+ 8.460350907213637784e-04,
+ 1.491471924309617534e-05,
+ 1.627106892422088488e-07,
+ 1.208266102392756055e-09,
+ 6.611686391749704310e-12
+ };
+
+ return tools::evaluate_polynomial(P2, T(x * x)) - log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 4.316e-17
+ // Expected Error Term : 9.570e-18
+ // Maximum Relative Change in Control Points : 2.757e-01
+ // Max Error found at double precision = Poly : 1.001560e-16
+
+ static const T Y = 1;
+ static const T P[] =
+ {
+ 2.533141373155002416e-01,
+ 3.628342133984595192e+00,
+ 1.868441889406606057e+01,
+ 4.306243981063412784e+01,
+ 4.424116209627428189e+01,
+ 1.562095339356220468e+01,
+ -1.810138978229410898e+00,
+ -1.414237994269995877e+00,
+ -9.369168119754924625e-02
+ };
+ static const T Q[] =
+ {
+ 1.000000000000000000e+00,
+ 1.494194694879908328e+01,
+ 8.265296455388554217e+01,
+ 2.162779506621866970e+02,
+ 2.845145155184222157e+02,
+ 1.851714491916334995e+02,
+ 5.486540717439723515e+01,
+ 6.118075837628957015e+00,
+ 1.586261269326235053e-01
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+}
+
+template <typename T>
+T bessel_k0_imp(const T& x, const mpl::int_<64>&)
+{
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 2.180e-22
+ // Expected Error Term : 2.180e-22
+ // Maximum Relative Change in Control Points : 2.943e-01
+ // Max Error found at float80 precision = Poly : 3.923207e-20
+ static const T Y = 1.137250900268554687500e+00;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.372509002685546875002e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.566481981037407600436e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.551881122448948854873e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.646112454323276529650e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.213747930378196492543e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.423709328020389560844e-08)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.843828412587773008342e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.088484822515098936140e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.374724008530702784829e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.452665455952581680339e-08)
+ };
+
+
+ T a = x * x / 4;
+ a = (tools::evaluate_polynomial(P, a) / tools::evaluate_polynomial(Q, a) + Y) * a + 1;
+
+ // Maximum Deviation Found: 2.440e-21
+ // Expected Error Term : -2.434e-21
+ // Maximum Relative Change in Control Points : 2.459e-02
+ // Max Error found at float80 precision = Poly : 1.482487e-19
+ static const T P2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.159315156584124488110e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.764832791416047889734e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.926062887220923354112e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.660777862036966089410e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.094942446930673386849e-06)
+ };
+ static const T Q2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.156100313881251616320e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.315993873344905957033e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.529444499350703363451e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.524988589917857531177e-09)
+ };
+ return tools::evaluate_rational(P2, Q2, T(x * x)) - log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 4.291e-20
+ // Expected Error Term : 2.236e-21
+ // Maximum Relative Change in Control Points : 3.021e-01
+ //Max Error found at float80 precision = Poly : 8.727378e-20
+ static const T Y = 1;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.533141373155002512056e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.417942070721928652715e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.477464607463971754433e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.838745728725943889876e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.009736314927811202517e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.557411293123609803452e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.360222564015361268955e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.385435333168505701022e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.750195760942181592050e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.059789241612946683713e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.612783121537333908889e-01)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.200669254769325861404e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.900177593527144126549e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.361003989965786932682e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.041319870804843395893e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.828491555113790345068e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.190342229261529076624e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.003330795963812219852e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.773371397243777891569e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.368634935531158398439e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.543310879400359967327e-01)
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+}
+
+template <typename T>
+T bessel_k0_imp(const T& x, const mpl::int_<113>&)
+{
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 5.682e-37
+ // Expected Error Term : 5.682e-37
+ // Maximum Relative Change in Control Points : 6.094e-04
+ // Max Error found at float128 precision = Poly : 5.338213e-35
+ static const T Y = 1.137250900268554687500000000000000000e+00f;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.372509002685546875000000000000000006e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.556212905071072782462974351698081303e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.742459135264203478530904179889103929e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.077860530453688571555479526961318918e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.868173911669241091399374307788635148e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.496405768838992243478709145123306602e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.752489221949580551692915881999762125e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.243010555737173524710512824955368526e-12)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.095631064064621099785696980653193721e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.313880983725212151967078809725835532e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.095229912293480063501285562382835142e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.022828799511943141130509410251996277e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -6.860874007419812445494782795829046836e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.107297802344970725756092082686799037e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.460529579244623559164763757787600944e-15)
+ };
+ T a = x * x / 4;
+ a = (tools::evaluate_rational(P, Q, a) + Y) * a + 1;
+
+ // Maximum Deviation Found: 5.173e-38
+ // Expected Error Term : 5.105e-38
+ // Maximum Relative Change in Control Points : 9.734e-03
+ // Max Error found at float128 precision = Poly : 1.688806e-34
+ static const T P2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.159315156584124488107200313757741370e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.789828789146031122026800078439435369e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.524892993216269451266750049024628432e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.460350907082229957222453839935101823e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.491471929926042875260452849503857976e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.627105610481598430816014719558896866e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.208426165007797264194914898538250281e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.508697838747354949164182457073784117e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.659784680639805301101014383907273109e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.531090131964391104248859415958109654e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.205195117066478034260323124669936314e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.692219280289030165761119775783115426e-22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.362350161092532344171965861545860747e-25),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.277990623924628999539014980773738258e-27)
+ };
+
+ return tools::evaluate_polynomial(P2, T(x * x)) - log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 1.462e-34
+ // Expected Error Term : 4.917e-40
+ // Maximum Relative Change in Control Points : 3.385e-01
+ // Max Error found at float128 precision = Poly : 1.567573e-34
+ static const T Y = 1;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.533141373155002512078826424055226265e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.001949740768235770078339977110749204e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.991516715983883248363351472378349986e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.429587951594593159075690819360687720e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.911933815201948768044660065771258450e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.769943016204926614862175317962439875e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.170866154649560750500954150401105606e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.634687099724383996792011977705727661e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.989524036456492581597607246664394014e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.160394785715328062088529400178080360e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.778173054417826368076483100902201433e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.335667778588806892764139643950439733e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.283635100080306980206494425043706838e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.300616188213640626577036321085025855e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.277591957076162984986406540894621482e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.564360536834214058158565361486115932e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.043505161612403359098596828115690596e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.217035248223503605127967970903027314e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.422938158797326748375799596769964430e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.229125746200586805278634786674745210e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.201632288615609937883545928660649813e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.690820607338480548346746717311811406e+01)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.964877874035741452203497983642653107e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.808929943826193766839360018583294769e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.814524004679994110944366890912384139e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.897794522506725610540209610337355118e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.456339470955813675629523617440433672e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.057818717813969772198911392875127212e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.513821619536852436424913886081133209e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.255938846873380596038513316919990776e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.537077551699028079347581816919572141e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.176769339768120752974843214652367321e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.828722317390455845253191337207432060e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.698864296569996402006511705803675890e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.007803261356636409943826918468544629e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.016564631288740308993071395104715469e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.595893010619754750655947035567624730e+09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.241241839120481076862742189989406856e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.168778094393076220871007550235840858e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.156200301360388147635052029404211109e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.752130382550379886741949463587008794e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.370574966987293592457152146806662562e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.871254714311063594080644835895740323e+01)
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+}
+
+template <typename T>
+T bessel_k0_imp(const T& x, const mpl::int_<0>&)
+{
+ if(boost::math::tools::digits<T>() <= 24)
+ return bessel_k0_imp(x, mpl::int_<24>());
+ else if(boost::math::tools::digits<T>() <= 53)
+ return bessel_k0_imp(x, mpl::int_<53>());
+ else if(boost::math::tools::digits<T>() <= 64)
+ return bessel_k0_imp(x, mpl::int_<64>());
+ else if(boost::math::tools::digits<T>() <= 113)
+ return bessel_k0_imp(x, mpl::int_<113>());
+ BOOST_ASSERT(0);
+ return 0;
+}
+
+template <typename T>
+inline T bessel_k0(const T& x)
+{
+ typedef mpl::int_<
+ ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
+ 0 :
+ std::numeric_limits<T>::digits <= 24 ?
+ 24 :
+ std::numeric_limits<T>::digits <= 53 ?
+ 53 :
+ std::numeric_limits<T>::digits <= 64 ?
+ 64 :
+ std::numeric_limits<T>::digits <= 113 ?
+ 113 : -1
+ > tag_type;
+
+ bessel_k0_initializer<T, tag_type>::force_instantiate();
+ return bessel_k0_imp(x, tag_type());
+}
+
+}}} // namespaces
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MATH_BESSEL_K0_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k1.hpp
new file mode 100644
index 00000000000..4a851a67d26
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_k1.hpp
@@ -0,0 +1,561 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// Copyright (c) 2017 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_BESSEL_K1_HPP
+#define BOOST_MATH_BESSEL_K1_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
+#endif
+
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Modified Bessel function of the second kind of order zero
+// minimax rational approximations on intervals, see
+// Russon and Blair, Chalk River Report AECL-3461, 1969,
+// as revised by Pavel Holoborodko in "Rational Approximations
+// for the Modified Bessel Function of the Second Kind - K0(x)
+// for Computations with Double Precision", see
+// http://www.advanpix.com/2016/01/05/rational-approximations-for-the-modified-bessel-function-of-the-second-kind-k1-for-computations-with-double-precision/
+//
+// The actual coefficients used are our own derivation (by JM)
+// since we extend to both greater and lesser precision than the
+// references above. We can also improve performance WRT to
+// Holoborodko without loss of precision.
+
+namespace boost { namespace math { namespace detail{
+
+ template <typename T>
+ T bessel_k1(const T& x);
+
+ template <class T, class tag>
+ struct bessel_k1_initializer
+ {
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ bessel_k1(T(0.5));
+ bessel_k1(T(2));
+ bessel_k1(T(6));
+ }
+ static void do_init(const mpl::int_<64>&)
+ {
+ bessel_k1(T(0.5));
+ bessel_k1(T(6));
+ }
+ template <class U>
+ static void do_init(const U&) {}
+ void force_instantiate()const {}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+ };
+
+ template <class T, class tag>
+ const typename bessel_k1_initializer<T, tag>::init bessel_k1_initializer<T, tag>::initializer;
+
+
+ template <typename T, int N>
+ inline T bessel_k1_imp(const T& x, const mpl::int_<N>&)
+ {
+ BOOST_ASSERT(0);
+ return 0;
+ }
+
+ template <typename T>
+ T bessel_k1_imp(const T& x, const mpl::int_<24>&)
+ {
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 3.090e-12
+ // Expected Error Term : -3.053e-12
+ // Maximum Relative Change in Control Points : 4.927e-02
+ // Max Error found at float precision = Poly : 7.918347e-10
+ static const T Y = 8.695471287e-02f;
+ static const T P[] =
+ {
+ -3.621379531e-03f,
+ 7.131781976e-03f,
+ -1.535278300e-05f
+ };
+ static const T Q[] =
+ {
+ 1.000000000e+00f,
+ -5.173102701e-02f,
+ 9.203530671e-04f
+ };
+
+ T a = x * x / 4;
+ a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
+
+ // Maximum Deviation Found: 3.556e-08
+ // Expected Error Term : -3.541e-08
+ // Maximum Relative Change in Control Points : 8.203e-02
+ static const T P2[] =
+ {
+ -3.079657469e-01f,
+ -8.537108913e-02f,
+ -4.640275408e-03f,
+ -1.156442414e-04f
+ };
+
+ return tools::evaluate_polynomial(P2, T(x * x)) * x + 1 / x + log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 3.369e-08
+ // Expected Error Term : -3.227e-08
+ // Maximum Relative Change in Control Points : 9.917e-02
+ // Max Error found at float precision = Poly : 6.084411e-08
+ static const T Y = 1.450342178f;
+ static const T P[] =
+ {
+ -1.970280088e-01f,
+ 2.188747807e-02f,
+ 7.270394756e-01f,
+ 2.490678196e-01f
+ };
+ static const T Q[] =
+ {
+ 1.000000000e+00f,
+ 2.274292882e+00f,
+ 9.904984851e-01f,
+ 4.585534549e-02f
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+ }
+
+ template <typename T>
+ T bessel_k1_imp(const T& x, const mpl::int_<53>&)
+ {
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 1.922e-17
+ // Expected Error Term : 1.921e-17
+ // Maximum Relative Change in Control Points : 5.287e-03
+ // Max Error found at double precision = Poly : 2.004747e-17
+ static const T Y = 8.69547128677368164e-02f;
+ static const T P[] =
+ {
+ -3.62137953440350228e-03,
+ 7.11842087490330300e-03,
+ 1.00302560256614306e-05,
+ 1.77231085381040811e-06
+ };
+ static const T Q[] =
+ {
+ 1.00000000000000000e+00,
+ -4.80414794429043831e-02,
+ 9.85972641934416525e-04,
+ -8.91196859397070326e-06
+ };
+
+ T a = x * x / 4;
+ a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
+
+ // Maximum Deviation Found: 4.053e-17
+ // Expected Error Term : -4.053e-17
+ // Maximum Relative Change in Control Points : 3.103e-04
+ // Max Error found at double precision = Poly : 1.246698e-16
+
+ static const T P2[] =
+ {
+ -3.07965757829206184e-01,
+ -7.80929703673074907e-02,
+ -2.70619343754051620e-03,
+ -2.49549522229072008e-05
+ };
+ static const T Q2[] =
+ {
+ 1.00000000000000000e+00,
+ -2.36316836412163098e-02,
+ 2.64524577525962719e-04,
+ -1.49749618004162787e-06
+ };
+
+ return tools::evaluate_rational(P2, Q2, T(x * x)) * x + 1 / x + log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 8.883e-17
+ // Expected Error Term : -1.641e-17
+ // Maximum Relative Change in Control Points : 2.786e-01
+ // Max Error found at double precision = Poly : 1.258798e-16
+
+ static const T Y = 1.45034217834472656f;
+ static const T P[] =
+ {
+ -1.97028041029226295e-01,
+ -2.32408961548087617e+00,
+ -7.98269784507699938e+00,
+ -2.39968410774221632e+00,
+ 3.28314043780858713e+01,
+ 5.67713761158496058e+01,
+ 3.30907788466509823e+01,
+ 6.62582288933739787e+00,
+ 3.08851840645286691e-01
+ };
+ static const T Q[] =
+ {
+ 1.00000000000000000e+00,
+ 1.41811409298826118e+01,
+ 7.35979466317556420e+01,
+ 1.77821793937080859e+02,
+ 2.11014501598705982e+02,
+ 1.19425262951064454e+02,
+ 2.88448064302447607e+01,
+ 2.27912927104139732e+00,
+ 2.50358186953478678e-02
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_rational(P, Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+ }
+
+ template <typename T>
+ T bessel_k1_imp(const T& x, const mpl::int_<64>&)
+ {
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 5.549e-23
+ // Expected Error Term : -5.548e-23
+ // Maximum Relative Change in Control Points : 2.002e-03
+ // Max Error found at float80 precision = Poly : 9.352785e-22
+ static const T Y = 8.695471286773681640625e-02f;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.621379534403483072861e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.102135866103952705932e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.167545240236717601167e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.537484002571894870830e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.603228256820000135990e-09)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.354457194045068370363e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.709137201220209072820e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -9.676151796359590545143e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 5.162715192766245311659e-08)
+ };
+
+ T a = x * x / 4;
+ a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
+
+ // Maximum Deviation Found: 1.995e-23
+ // Expected Error Term : 1.995e-23
+ // Maximum Relative Change in Control Points : 8.174e-04
+ // Max Error found at float80 precision = Poly : 4.137325e-20
+ static const T P2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.079657578292062244054e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -7.963049154965966503231e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.103277523735639924895e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.023052834702215699504e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.719459155018493821839e-07)
+ };
+ static const T Q2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.863917670410152669768e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.699367098849735298090e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -9.309358790546076298429e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.708893480271612711933e-09)
+ };
+
+ return tools::evaluate_rational(P2, Q2, T(x * x)) * x + 1 / x + log(x) * a;
+ }
+ else
+ {
+ // Maximum Deviation Found: 9.785e-20
+ // Expected Error Term : -3.302e-21
+ // Maximum Relative Change in Control Points : 3.432e-01
+ // Max Error found at float80 precision = Poly : 1.083755e-19
+ static const T Y = 1.450342178344726562500e+00f;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.970280410292263112917e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.058564803062959169322e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.036658174194917777473e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -9.576825392332820142173e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -6.706969489248020941949e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.264572499406168221382e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.584972047303151034100e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 8.422082733280017909550e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.738005441471368178383e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.016938390144121276609e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.319614662598089438939e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.710715864316521856193e-02)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.298433045824439052398e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.082047745067709230037e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 9.662367854250262046592e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.504148628460454004686e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.712730364911389908905e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.108002081150068641112e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.400149940532448553143e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.083303048095846226299e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.748706060530351833346e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.321900849331506946977e-01),
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+ }
+
+ template <typename T>
+ T bessel_k1_imp(const T& x, const mpl::int_<113>&)
+ {
+ BOOST_MATH_STD_USING
+ if(x <= 1)
+ {
+ // Maximum Deviation Found: 7.120e-35
+ // Expected Error Term : -7.119e-35
+ // Maximum Relative Change in Control Points : 1.207e-03
+ // Max Error found at float128 precision = Poly : 7.143688e-35
+ static const T Y = 8.695471286773681640625000000000000000e-02f;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.621379534403483072916666666666595475e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.074117676930975433219826471336547627e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.631337631362776369069668419033041661e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.468935967870048731821071646104412775e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.956705020559599861444492614737168261e-08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.347140307321161346703214099534250263e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.569608494081482873946791086435679661e-13)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.580768910152105375615558920428350204e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.197467671701485365363068445534557369e-04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -6.707466533308630411966030561446666237e-06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.846687802282250112624373388491123527e-08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.248493131151981569517383040323900343e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.319279786372775264555728921709381080e-13)
+ };
+
+ T a = x * x / 4;
+ a = ((tools::evaluate_rational(P, Q, a) + Y) * a * a + a / 2 + 1) * x / 2;
+
+ // Maximum Deviation Found: 4.473e-37
+ // Expected Error Term : 4.473e-37
+ // Maximum Relative Change in Control Points : 8.550e-04
+ // Max Error found at float128 precision = Poly : 8.167701e-35
+ static const T P2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.079657578292062244053600156878870690e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.133183745732467770755578848987414875e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.548968792764174773125420229299431951e-03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.886125468718182876076972186152445490e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.506712111733707245745396404449639865e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.632502325880313239698965376754406011e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.311973065898784812266544485665624227e-12)
+ };
+ static const T Q2[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.311471216733781016657962995723287450e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.571876054797365417068164018709472969e-05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.630181215268238731442496851497901293e-07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.070176111227805048604885986867484807e-09),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.129046580769872602793220056461084761e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.294906469421390890762001971790074432e-15)
+ };
+
+ return tools::evaluate_rational(P2, Q2, T(x * x)) * x + 1 / x + log(x) * a;
+ }
+ else if(x < 4)
+ {
+ // Max error in interpolated form: 5.307e-37
+ // Max Error found at float128 precision = Poly: 7.087862e-35
+ static const T Y = 1.5023040771484375f;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.489899398329369710528254347931380044e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -6.819080211203854781858815596508456873e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -7.599915699069767382647695624952723034e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.450211910821295507926582231071300718e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.451374687870925175794150513723956533e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.405805746895098802803503988539098226e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.638808326778389656403861103277220518e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.513958744081268456191778822780865708e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.121301640926540743072258116122834804e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.080094900175649541266613109971296190e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.896531083639613332407534434915552429e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.856602122319645694042555107114028437e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.237121918853145421414003823957537419e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.842072954561323076230238664623893504e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.039705646510167437971862966128055524e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.008418100718254816100425022904039530e-02)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.927456835239137986889227412815459529e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.598985593265577043711382994516531273e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.449897377085510281395819892689690579e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.025555887684561913263090023158085327e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.774140447181062463181892531100679195e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.962055507843204417243602332246120418e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.908269326976180183216954452196772931e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.655160454422016855911700790722577942e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.383586885019548163464418964577684608e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.679920375586960324298491662159976419e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.478586421028842906987799049804565008e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.565384974896746094224942654383537090e+02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.902617937084010911005732488607114511e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.429293010387921526110949911029094926e-01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.880342607911083143560111853491047663e-04)
+ };
+ return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ }
+ else
+ {
+ // Maximum Deviation Found: 4.359e-37
+ // Expected Error Term : -6.565e-40
+ // Maximum Relative Change in Control Points : 1.880e-01
+ // Max Error found at float128 precision = Poly : 2.943572e-35
+ static const T Y = 1.308816909790039062500000000000000000f;
+ static const T P[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -5.550277247453881129211735759447737350e-02),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.485883080219574328217554864956175929e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.903760658131484239300875153154881958e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.144813672213626237418235110712293337e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -6.498400501156131446691826557494158173e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.573531831870363502604119835922166116e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.417416550054632009958262596048841154e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.271266450613557412825896604269130661e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.898386013314389952534433455681107783e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 5.353798784656436259250791761023512750e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 9.839619195427352438957774052763490067e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.169246368651532232388152442538005637e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.696368884166831199967845883371116431e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.810226630422736458064005843327500169e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.854996610560406127438950635716757614e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.981057433937398731355768088809437625e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.519440069856232098711793483639792952e+04)
+ };
+ static const T Q[] =
+ {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.000000000000000000000000000000000000e+00),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 7.127348248283623146544565916604103560e+01),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.205092684176906740104488180754982065e+03),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.911249195069050636298346469740075758e+04),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.426103406579046249654548481377792614e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.365861555422488771286500241966208541e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.765377714160383676864913709252529840e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 6.453822726931857253365138260720815246e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.643207885048369990391975749439783892e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.882540678243694621895816336640877878e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.410120808992380266174106812005338148e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.628138016559335882019310900426773027e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.250794693811010646965360198541047961e+08),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.378723408195485594610593014072950078e+07),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.488253856312453816451380319061865560e+06),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.202167197882689873967723350537104582e+05),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.673233230356966539460728211412989843e+03)
+ };
+ if(x < tools::log_max_value<T>())
+ return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * exp(-x) / sqrt(x));
+ else
+ {
+ T ex = exp(-x / 2);
+ return ((tools::evaluate_polynomial(P, T(1 / x)) / tools::evaluate_polynomial(Q, T(1 / x)) + Y) * ex / sqrt(x)) * ex;
+ }
+ }
+ }
+
+ template <typename T>
+ T bessel_k1_imp(const T& x, const mpl::int_<0>&)
+ {
+ if(boost::math::tools::digits<T>() <= 24)
+ return bessel_k1_imp(x, mpl::int_<24>());
+ else if(boost::math::tools::digits<T>() <= 53)
+ return bessel_k1_imp(x, mpl::int_<53>());
+ else if(boost::math::tools::digits<T>() <= 64)
+ return bessel_k1_imp(x, mpl::int_<64>());
+ else if(boost::math::tools::digits<T>() <= 113)
+ return bessel_k1_imp(x, mpl::int_<113>());
+ BOOST_ASSERT(0);
+ return 0;
+ }
+
+ template <typename T>
+ inline T bessel_k1(const T& x)
+ {
+ typedef mpl::int_<
+ ((std::numeric_limits<T>::digits == 0) || (std::numeric_limits<T>::radix != 2)) ?
+ 0 :
+ std::numeric_limits<T>::digits <= 24 ?
+ 24 :
+ std::numeric_limits<T>::digits <= 53 ?
+ 53 :
+ std::numeric_limits<T>::digits <= 64 ?
+ 64 :
+ std::numeric_limits<T>::digits <= 113 ?
+ 113 : -1
+ > tag_type;
+
+ bessel_k1_initializer<T, tag_type>::force_instantiate();
+ return bessel_k1_imp(x, tag_type());
+ }
+
+}}} // namespaces
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MATH_BESSEL_K1_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_kn.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_kn.hpp
index 54c4a1cfa7a..54c4a1cfa7a 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_kn.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_kn.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y0.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y0.hpp
new file mode 100644
index 00000000000..fb93edd1c86
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y0.hpp
@@ -0,0 +1,240 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// 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_BESSEL_Y0_HPP
+#define BOOST_MATH_BESSEL_Y0_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
+#endif
+
+#include <boost/math/special_functions/detail/bessel_j0.hpp>
+#include <boost/math/constants/constants.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Bessel function of the second kind of order zero
+// x <= 8, minimax rational approximations on root-bracketing intervals
+// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
+
+namespace boost { namespace math { namespace detail{
+
+template <typename T, typename Policy>
+T bessel_y0(T x, const Policy&);
+
+template <class T, class Policy>
+struct bessel_y0_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init();
+ }
+ static void do_init()
+ {
+ bessel_y0(T(1), Policy());
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class Policy>
+const typename bessel_y0_initializer<T, Policy>::init bessel_y0_initializer<T, Policy>::initializer;
+
+template <typename T, typename Policy>
+T bessel_y0(T x, const Policy& pol)
+{
+ bessel_y0_initializer<T, Policy>::force_instantiate();
+
+ static const T P1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0723538782003176831e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.3716255451260504098e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.0422274357376619816e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.1287548474401797963e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0102532948020907590e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8402381979244993524e+01)),
+ };
+ static const T Q1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.8873865738997033405e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.1617187777290363573e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.5662956624278251596e+07)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.3889393209447253406e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6475986689240190091e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T P2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.2213976967566192242e+13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.5107435206722644429e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.3600098638603061642e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.9590439394619619534e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.6905288611678631510e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4566865832663635920e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7427031242901594547e+01)),
+ };
+ static const T Q2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.3386146580707264428e+14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.4266824419412347550e+12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4015103849971240096e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3960202770986831075e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0669982352539552018e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.3030857612070288823e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T P3[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.0728726905150210443e+15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.7016641869173237784e+14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2829912364088687306e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.9363051266772083678e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1958827170518100757e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0085539923498211426e+07)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1363534169313901632e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.7439661319197499338e+01)),
+ };
+ static const T Q3[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4563724628846457519e+17)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.9272425569640309819e+15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2598377924042897629e+13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.6926121104209825246e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4727219475672302327e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.3924739209768057030e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.7903362168128450017e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T PC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684302e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1345386639580765797e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1170523380864944322e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.4806486443249270347e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5376201909008354296e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.8961548424210455236e-01)),
+ };
+ static const T QC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2779090197304684318e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1370412495510416640e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1215350561880115730e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5028735138235608207e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5711159858080893649e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T PS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.9226600200800094098e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.8591953644342993800e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1183429920482737611e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.2300261666214198472e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2441026745835638459e+00)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -8.8033303048680751817e-03)),
+ };
+ static const T QS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.7105024128512061905e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1951131543434613647e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.2642780169211018836e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4887231232283756582e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.0593769594993125859e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.9357696627916752158e-01)),
+ x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.9576784193148578684e+00)),
+ x3 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0860510603017726976e+00)),
+ x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.280e+02)),
+ x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.9519662791675215849e-03)),
+ x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0130e+03)),
+ x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.4716931485786837568e-04)),
+ x31 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8140e+03)),
+ x32 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1356030177269762362e-04))
+ ;
+ T value, factor, r, rc, rs;
+
+ BOOST_MATH_STD_USING
+ using namespace boost::math::tools;
+ using namespace boost::math::constants;
+
+ static const char* function = "boost::math::bessel_y0<%1%>(%1%,%1%)";
+
+ if (x < 0)
+ {
+ return policies::raise_domain_error<T>(function,
+ "Got x = %1% but x must be non-negative, complex result not supported.", x, pol);
+ }
+ if (x == 0)
+ {
+ return -policies::raise_overflow_error<T>(function, 0, pol);
+ }
+ if (x <= 3) // x in (0, 3]
+ {
+ T y = x * x;
+ T z = 2 * log(x/x1) * bessel_j0(x) / pi<T>();
+ r = evaluate_rational(P1, Q1, y);
+ factor = (x + x1) * ((x - x11/256) - x12);
+ value = z + factor * r;
+ }
+ else if (x <= 5.5f) // x in (3, 5.5]
+ {
+ T y = x * x;
+ T z = 2 * log(x/x2) * bessel_j0(x) / pi<T>();
+ r = evaluate_rational(P2, Q2, y);
+ factor = (x + x2) * ((x - x21/256) - x22);
+ value = z + factor * r;
+ }
+ else if (x <= 8) // x in (5.5, 8]
+ {
+ T y = x * x;
+ T z = 2 * log(x/x3) * bessel_j0(x) / pi<T>();
+ r = evaluate_rational(P3, Q3, y);
+ factor = (x + x3) * ((x - x31/256) - x32);
+ value = z + factor * r;
+ }
+ else // x in (8, \infty)
+ {
+ T y = 8 / x;
+ T y2 = y * y;
+ rc = evaluate_rational(PC, QC, y2);
+ rs = evaluate_rational(PS, QS, y2);
+ factor = constants::one_div_root_pi<T>() / sqrt(x);
+ //
+ // The following code is really just:
+ //
+ // T z = x - 0.25f * pi<T>();
+ // value = factor * (rc * sin(z) + y * rs * cos(z));
+ //
+ // But using the sin/cos addition formulae and constant values for
+ // sin/cos of PI/4 which then cancel part of the "factor" term as they're all
+ // 1 / sqrt(2):
+ //
+ T sx = sin(x);
+ T cx = cos(x);
+ value = factor * (rc * (sx - cx) + y * rs * (cx + sx));
+ }
+
+ return value;
+}
+
+}}} // namespaces
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MATH_BESSEL_Y0_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y1.hpp
new file mode 100644
index 00000000000..98389a90e68
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_y1.hpp
@@ -0,0 +1,212 @@
+// Copyright (c) 2006 Xiaogang Zhang
+// 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_BESSEL_Y1_HPP
+#define BOOST_MATH_BESSEL_Y1_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
+#endif
+
+#include <boost/math/special_functions/detail/bessel_j1.hpp>
+#include <boost/math/constants/constants.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/assert.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+// Bessel function of the second kind of order one
+// x <= 8, minimax rational approximations on root-bracketing intervals
+// x > 8, Hankel asymptotic expansion in Hart, Computer Approximations, 1968
+
+namespace boost { namespace math { namespace detail{
+
+template <typename T, typename Policy>
+T bessel_y1(T x, const Policy&);
+
+template <class T, class Policy>
+struct bessel_y1_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init();
+ }
+ static void do_init()
+ {
+ bessel_y1(T(1), Policy());
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class Policy>
+const typename bessel_y1_initializer<T, Policy>::init bessel_y1_initializer<T, Policy>::initializer;
+
+template <typename T, typename Policy>
+T bessel_y1(T x, const Policy& pol)
+{
+ bessel_y1_initializer<T, Policy>::force_instantiate();
+
+ static const T P1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0535726612579544093e+13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.4708611716525426053e+12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.7595974497819597599e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.2144548214502560419e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.9157479997408395984e+07)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.2157953222280260820e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.1714424660046133456e+02)),
+ };
+ static const T Q1[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.0737873921079286084e+14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.1272286200406461981e+12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.7800352738690585613e+10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.2250435122182963220e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.8136470753052572164e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.2079908168393867438e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T P2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1514276357909013326e+19)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.6808094574724204577e+18)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.3638408497043134724e+16)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0686275289804744814e+15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -5.9530713129741981618e+13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.7453673962438488783e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.1957961912070617006e+09)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.9153806858264202986e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.2337180442012953128e+03)),
+ };
+ static const T Q2[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.3321844313316185697e+20)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.6968198822857178911e+18)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.0837179548112881950e+16)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1187010065856971027e+14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.0221766852960403645e+11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.3550318087088919566e+08)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0453748201934079734e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.2855164849321609336e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T PC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278571e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9422465050776411957e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.6033732483649391093e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5235293511811373833e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0982405543459346727e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6116166443246101165e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0)),
+ };
+ static const T QC[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -4.4357578167941278568e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -9.9341243899345856590e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.5853394797230870728e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.5118095066341608816e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.0726385991103820119e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.4550094401904961825e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T PS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.3220913409857223519e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.5145160675335701966e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6.6178836581270835179e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8494262873223866797e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7063754290207680021e+03)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.5265133846636032186e+01)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0)),
+ };
+ static const T QS[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.0871281941028743574e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8194580422439972989e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4194606696037208929e+06)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.0029443582266975117e+05)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.7890229745772202641e+04)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 8.6383677696049909675e+02)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0)),
+ };
+ static const T x1 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1971413260310170351e+00)),
+ x2 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.4296810407941351328e+00)),
+ x11 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.620e+02)),
+ x12 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8288260310170351490e-03)),
+ x21 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3900e+03)),
+ x22 = static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -6.4592058648672279948e-06))
+ ;
+ T value, factor, r, rc, rs;
+
+ BOOST_MATH_STD_USING
+ using namespace boost::math::tools;
+ using namespace boost::math::constants;
+
+ if (x <= 0)
+ {
+ return policies::raise_domain_error<T>("bost::math::bessel_y1<%1%>(%1%,%1%)",
+ "Got x == %1%, but x must be > 0, complex result not supported.", x, pol);
+ }
+ if (x <= 4) // x in (0, 4]
+ {
+ T y = x * x;
+ T z = 2 * log(x/x1) * bessel_j1(x) / pi<T>();
+ r = evaluate_rational(P1, Q1, y);
+ factor = (x + x1) * ((x - x11/256) - x12) / x;
+ value = z + factor * r;
+ }
+ else if (x <= 8) // x in (4, 8]
+ {
+ T y = x * x;
+ T z = 2 * log(x/x2) * bessel_j1(x) / pi<T>();
+ r = evaluate_rational(P2, Q2, y);
+ factor = (x + x2) * ((x - x21/256) - x22) / x;
+ value = z + factor * r;
+ }
+ else // x in (8, \infty)
+ {
+ T y = 8 / x;
+ T y2 = y * y;
+ rc = evaluate_rational(PC, QC, y2);
+ rs = evaluate_rational(PS, QS, y2);
+ factor = 1 / (sqrt(x) * root_pi<T>());
+ //
+ // This code is really just:
+ //
+ // T z = x - 0.75f * pi<T>();
+ // value = factor * (rc * sin(z) + y * rs * cos(z));
+ //
+ // But using the sin/cos addition rules, plus constants for sin/cos of 3PI/4
+ // which then cancel out with corresponding terms in "factor".
+ //
+ T sx = sin(x);
+ T cx = cos(x);
+ value = factor * (y * rs * (sx - cx) - rc * (sx + cx));
+ }
+
+ return value;
+}
+
+}}} // namespaces
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MATH_BESSEL_Y1_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_yn.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_yn.hpp
index 62d7377e4ff..62d7377e4ff 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_yn.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/bessel_yn.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/erf_inv.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/erf_inv.hpp
index 4e483005216..4e483005216 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/erf_inv.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/special_functions/detail/fp_traits.hpp
index 013f830bcad..013f830bcad 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/fp_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/fp_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/gamma_inva.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/gamma_inva.hpp
index 7c32d2946c0..7c32d2946c0 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/gamma_inva.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/gamma_inva.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp
index f5735a84956..f5735a84956 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inverse.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/ibeta_inverse.hpp
index a9fe8cd49cb..a9fe8cd49cb 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inverse.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/special_functions/detail/iconv.hpp
index 4256ffcc88e..4256ffcc88e 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/iconv.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/iconv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_inverse.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_inverse.hpp
index fd0189ca6d5..fd0189ca6d5 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_inverse.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_inverse.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_large.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_large.hpp
new file mode 100644
index 00000000000..59a75b14333
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/igamma_large.hpp
@@ -0,0 +1,778 @@
+// 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)
+//
+// This file implements the asymptotic expansions of the incomplete
+// gamma functions P(a, x) and Q(a, x), used when a is large and
+// x ~ a.
+//
+// The primary reference is:
+//
+// "The Asymptotic Expansion of the Incomplete Gamma Functions"
+// N. M. Temme.
+// Siam J. Math Anal. Vol 10 No 4, July 1979, p757.
+//
+// A different way of evaluating these expansions,
+// plus a lot of very useful background information is in:
+//
+// "A Set of Algorithms For the Incomplete Gamma Functions."
+// N. M. Temme.
+// Probability in the Engineering and Informational Sciences,
+// 8, 1994, 291.
+//
+// An alternative implementation is in:
+//
+// "Computation of the Incomplete Gamma Function Ratios and their Inverse."
+// A. R. Didonato and A. H. Morris.
+// ACM TOMS, Vol 12, No 4, Dec 1986, p377.
+//
+// There are various versions of the same code below, each accurate
+// to a different precision. To understand the code, refer to Didonato
+// and Morris, from Eq 17 and 18 onwards.
+//
+// The coefficients used here are not taken from Didonato and Morris:
+// the domain over which these expansions are used is slightly different
+// to theirs, and their constants are not quite accurate enough for
+// 128-bit long double's. Instead the coefficients were calculated
+// using the methods described by Temme p762 from Eq 3.8 onwards.
+// The values obtained agree with those obtained by Didonato and Morris
+// (at least to the first 30 digits that they provide).
+// At double precision the degrees of polynomial required for full
+// machine precision are close to those recomended to Didonato and Morris,
+// but of course many more terms are needed for larger types.
+//
+#ifndef BOOST_MATH_DETAIL_IGAMMA_LARGE
+#define BOOST_MATH_DETAIL_IGAMMA_LARGE
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost{ namespace math{ namespace detail{
+
+// This version will never be called (at runtime), it's a stub used
+// when T is unsuitable to be passed to these routines:
+//
+template <class T, class Policy>
+inline T igamma_temme_large(T, T, const Policy& /* pol */, mpl::int_<0> const *)
+{
+ // stub function, should never actually be called
+ BOOST_ASSERT(0);
+ return 0;
+}
+//
+// This version is accurate for up to 64-bit mantissa's,
+// (80-bit long double, or 10^-20).
+//
+template <class T, class Policy>
+T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<64> const *)
+{
+ BOOST_MATH_STD_USING // ADL of std functions
+ T sigma = (x - a) / a;
+ T phi = -boost::math::log1pmx(sigma, pol);
+ T y = a * phi;
+ T z = sqrt(2 * phi);
+ if(x < a)
+ z = -z;
+
+ T workspace[13];
+
+ static const T C0[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.333333333333333333333),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0833333333333333333333),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0148148148148148148148),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00115740740740740740741),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000352733686067019400353),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0001787551440329218107),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.39192631785224377817e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.218544851067999216147e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.18540622107151599607e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.829671134095308600502e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.176659527368260793044e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.670785354340149858037e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.102618097842403080426e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.438203601845335318655e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.914769958223679023418e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.255141939949462497669e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.583077213255042506746e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.243619480206674162437e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.502766928011417558909e-11),
+ };
+ workspace[0] = tools::evaluate_polynomial(C0, z);
+
+ static const T C1[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00185185185185185185185),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00347222222222222222222),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00264550264550264550265),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000990226337448559670782),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000205761316872427983539),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.40187757201646090535e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.18098550334489977837e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.764916091608111008464e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.161209008945634460038e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.464712780280743434226e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.137863344691572095931e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.575254560351770496402e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.119516285997781473243e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.175432417197476476238e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.100915437106004126275e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.416279299184258263623e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.856390702649298063807e-10),
+ };
+ workspace[1] = tools::evaluate_polynomial(C1, z);
+
+ static const T C2[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00413359788359788359788),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00268132716049382716049),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000771604938271604938272),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.200938786008230452675e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000107366532263651605215),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.529234488291201254164e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.127606351886187277134e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.342357873409613807419e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.137219573090629332056e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.629899213838005502291e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.142806142060642417916e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.204770984219908660149e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.140925299108675210533e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.622897408492202203356e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.136704883966171134993e-8),
+ };
+ workspace[2] = tools::evaluate_polynomial(C2, z);
+
+ static const T C3[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000649434156378600823045),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000229472093621399176955),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000469189494395255712128),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000267720632062838852962),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.756180167188397641073e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.239650511386729665193e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.110826541153473023615e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.56749528269915965675e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.142309007324358839146e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.278610802915281422406e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.169584040919302772899e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.809946490538808236335e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.191111684859736540607e-7),
+ };
+ workspace[3] = tools::evaluate_polynomial(C3, z);
+
+ static const T C4[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000861888290916711698605),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000784039221720066627474),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000299072480303190179733),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.146384525788434181781e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.664149821546512218666e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.396836504717943466443e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.113757269706784190981e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.250749722623753280165e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.169541495365583060147e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.890750753220530968883e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.229293483400080487057e-6),
+ };
+ workspace[4] = tools::evaluate_polynomial(C4, z);
+
+ static const T C5[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000336798553366358150309),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.697281375836585777429e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000277275324495939207873),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000199325705161888477003),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.679778047793720783882e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.141906292064396701483e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.135940481897686932785e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.801847025633420153972e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.229148117650809517038e-5),
+ };
+ workspace[5] = tools::evaluate_polynomial(C5, z);
+
+ static const T C6[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000531307936463992223166),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000592166437353693882865),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000270878209671804482771),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.790235323266032787212e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.815396936756196875093e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.561168275310624965004e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.183291165828433755673e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.307961345060330478256e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.346515536880360908674e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.20291327396058603727e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.57887928631490037089e-6),
+ };
+ workspace[6] = tools::evaluate_polynomial(C6, z);
+
+ static const T C7[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000344367606892377671254),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.517179090826059219337e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000334931610811422363117),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000281269515476323702274),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000109765822446847310235),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.127410090954844853795e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.277444515115636441571e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.182634888057113326614e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.578769494973505239894e-5),
+ };
+ workspace[7] = tools::evaluate_polynomial(C7, z);
+
+ static const T C8[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000652623918595309418922),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000839498720672087279993),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000438297098541721005061),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.696909145842055197137e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000166448466420675478374),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000127835176797692185853),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.462995326369130429061e-4),
+ };
+ workspace[8] = tools::evaluate_polynomial(C8, z);
+
+ static const T C9[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000596761290192746250124),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.720489541602001055909e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000678230883766732836162),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0006401475260262758451),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000277501076343287044992),
+ };
+ workspace[9] = tools::evaluate_polynomial(C9, z);
+
+ static const T C10[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00133244544948006563713),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0019144384985654775265),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00110893691345966373396),
+ };
+ workspace[10] = tools::evaluate_polynomial(C10, z);
+
+ static const T C11[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00157972766073083495909),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000162516262783915816899),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00206334210355432762645),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00213896861856890981541),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00101085593912630031708),
+ };
+ workspace[11] = tools::evaluate_polynomial(C11, z);
+
+ static const T C12[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00407251211951401664727),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00640336283380806979482),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00404101610816766177474),
+ };
+ workspace[12] = tools::evaluate_polynomial(C12, z);
+
+ T result = tools::evaluate_polynomial<13, T, T>(workspace, 1/a);
+ result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
+ if(x < a)
+ result = -result;
+
+ result += boost::math::erfc(sqrt(y), pol) / 2;
+
+ return result;
+}
+//
+// This one is accurate for 53-bit mantissa's
+// (IEEE double precision or 10^-17).
+//
+template <class T, class Policy>
+T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<53> const *)
+{
+ BOOST_MATH_STD_USING // ADL of std functions
+ T sigma = (x - a) / a;
+ T phi = -boost::math::log1pmx(sigma, pol);
+ T y = a * phi;
+ T z = sqrt(2 * phi);
+ if(x < a)
+ z = -z;
+
+ T workspace[10];
+
+ static const T C0[] = {
+ static_cast<T>(-0.33333333333333333L),
+ static_cast<T>(0.083333333333333333L),
+ static_cast<T>(-0.014814814814814815L),
+ static_cast<T>(0.0011574074074074074L),
+ static_cast<T>(0.0003527336860670194L),
+ static_cast<T>(-0.00017875514403292181L),
+ static_cast<T>(0.39192631785224378e-4L),
+ static_cast<T>(-0.21854485106799922e-5L),
+ static_cast<T>(-0.185406221071516e-5L),
+ static_cast<T>(0.8296711340953086e-6L),
+ static_cast<T>(-0.17665952736826079e-6L),
+ static_cast<T>(0.67078535434014986e-8L),
+ static_cast<T>(0.10261809784240308e-7L),
+ static_cast<T>(-0.43820360184533532e-8L),
+ static_cast<T>(0.91476995822367902e-9L),
+ };
+ workspace[0] = tools::evaluate_polynomial(C0, z);
+
+ static const T C1[] = {
+ static_cast<T>(-0.0018518518518518519L),
+ static_cast<T>(-0.0034722222222222222L),
+ static_cast<T>(0.0026455026455026455L),
+ static_cast<T>(-0.00099022633744855967L),
+ static_cast<T>(0.00020576131687242798L),
+ static_cast<T>(-0.40187757201646091e-6L),
+ static_cast<T>(-0.18098550334489978e-4L),
+ static_cast<T>(0.76491609160811101e-5L),
+ static_cast<T>(-0.16120900894563446e-5L),
+ static_cast<T>(0.46471278028074343e-8L),
+ static_cast<T>(0.1378633446915721e-6L),
+ static_cast<T>(-0.5752545603517705e-7L),
+ static_cast<T>(0.11951628599778147e-7L),
+ };
+ workspace[1] = tools::evaluate_polynomial(C1, z);
+
+ static const T C2[] = {
+ static_cast<T>(0.0041335978835978836L),
+ static_cast<T>(-0.0026813271604938272L),
+ static_cast<T>(0.00077160493827160494L),
+ static_cast<T>(0.20093878600823045e-5L),
+ static_cast<T>(-0.00010736653226365161L),
+ static_cast<T>(0.52923448829120125e-4L),
+ static_cast<T>(-0.12760635188618728e-4L),
+ static_cast<T>(0.34235787340961381e-7L),
+ static_cast<T>(0.13721957309062933e-5L),
+ static_cast<T>(-0.6298992138380055e-6L),
+ static_cast<T>(0.14280614206064242e-6L),
+ };
+ workspace[2] = tools::evaluate_polynomial(C2, z);
+
+ static const T C3[] = {
+ static_cast<T>(0.00064943415637860082L),
+ static_cast<T>(0.00022947209362139918L),
+ static_cast<T>(-0.00046918949439525571L),
+ static_cast<T>(0.00026772063206283885L),
+ static_cast<T>(-0.75618016718839764e-4L),
+ static_cast<T>(-0.23965051138672967e-6L),
+ static_cast<T>(0.11082654115347302e-4L),
+ static_cast<T>(-0.56749528269915966e-5L),
+ static_cast<T>(0.14230900732435884e-5L),
+ };
+ workspace[3] = tools::evaluate_polynomial(C3, z);
+
+ static const T C4[] = {
+ static_cast<T>(-0.0008618882909167117L),
+ static_cast<T>(0.00078403922172006663L),
+ static_cast<T>(-0.00029907248030319018L),
+ static_cast<T>(-0.14638452578843418e-5L),
+ static_cast<T>(0.66414982154651222e-4L),
+ static_cast<T>(-0.39683650471794347e-4L),
+ static_cast<T>(0.11375726970678419e-4L),
+ };
+ workspace[4] = tools::evaluate_polynomial(C4, z);
+
+ static const T C5[] = {
+ static_cast<T>(-0.00033679855336635815L),
+ static_cast<T>(-0.69728137583658578e-4L),
+ static_cast<T>(0.00027727532449593921L),
+ static_cast<T>(-0.00019932570516188848L),
+ static_cast<T>(0.67977804779372078e-4L),
+ static_cast<T>(0.1419062920643967e-6L),
+ static_cast<T>(-0.13594048189768693e-4L),
+ static_cast<T>(0.80184702563342015e-5L),
+ static_cast<T>(-0.22914811765080952e-5L),
+ };
+ workspace[5] = tools::evaluate_polynomial(C5, z);
+
+ static const T C6[] = {
+ static_cast<T>(0.00053130793646399222L),
+ static_cast<T>(-0.00059216643735369388L),
+ static_cast<T>(0.00027087820967180448L),
+ static_cast<T>(0.79023532326603279e-6L),
+ static_cast<T>(-0.81539693675619688e-4L),
+ static_cast<T>(0.56116827531062497e-4L),
+ static_cast<T>(-0.18329116582843376e-4L),
+ };
+ workspace[6] = tools::evaluate_polynomial(C6, z);
+
+ static const T C7[] = {
+ static_cast<T>(0.00034436760689237767L),
+ static_cast<T>(0.51717909082605922e-4L),
+ static_cast<T>(-0.00033493161081142236L),
+ static_cast<T>(0.0002812695154763237L),
+ static_cast<T>(-0.00010976582244684731L),
+ };
+ workspace[7] = tools::evaluate_polynomial(C7, z);
+
+ static const T C8[] = {
+ static_cast<T>(-0.00065262391859530942L),
+ static_cast<T>(0.00083949872067208728L),
+ static_cast<T>(-0.00043829709854172101L),
+ };
+ workspace[8] = tools::evaluate_polynomial(C8, z);
+ workspace[9] = static_cast<T>(-0.00059676129019274625L);
+
+ T result = tools::evaluate_polynomial<10, T, T>(workspace, 1/a);
+ result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
+ if(x < a)
+ result = -result;
+
+ result += boost::math::erfc(sqrt(y), pol) / 2;
+
+ return result;
+}
+//
+// This one is accurate for 24-bit mantissa's
+// (IEEE float precision, or 10^-8)
+//
+template <class T, class Policy>
+T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<24> const *)
+{
+ BOOST_MATH_STD_USING // ADL of std functions
+ T sigma = (x - a) / a;
+ T phi = -boost::math::log1pmx(sigma, pol);
+ T y = a * phi;
+ T z = sqrt(2 * phi);
+ if(x < a)
+ z = -z;
+
+ T workspace[3];
+
+ static const T C0[] = {
+ static_cast<T>(-0.333333333L),
+ static_cast<T>(0.0833333333L),
+ static_cast<T>(-0.0148148148L),
+ static_cast<T>(0.00115740741L),
+ static_cast<T>(0.000352733686L),
+ static_cast<T>(-0.000178755144L),
+ static_cast<T>(0.391926318e-4L),
+ };
+ workspace[0] = tools::evaluate_polynomial(C0, z);
+
+ static const T C1[] = {
+ static_cast<T>(-0.00185185185L),
+ static_cast<T>(-0.00347222222L),
+ static_cast<T>(0.00264550265L),
+ static_cast<T>(-0.000990226337L),
+ static_cast<T>(0.000205761317L),
+ };
+ workspace[1] = tools::evaluate_polynomial(C1, z);
+
+ static const T C2[] = {
+ static_cast<T>(0.00413359788L),
+ static_cast<T>(-0.00268132716L),
+ static_cast<T>(0.000771604938L),
+ };
+ workspace[2] = tools::evaluate_polynomial(C2, z);
+
+ T result = tools::evaluate_polynomial(workspace, 1/a);
+ result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
+ if(x < a)
+ result = -result;
+
+ result += boost::math::erfc(sqrt(y), pol) / 2;
+
+ return result;
+}
+//
+// And finally, a version for 113-bit mantissa's
+// (128-bit long doubles, or 10^-34).
+// Note this one has been optimised for a > 200
+// It's use for a < 200 is not recomended, that would
+// require many more terms in the polynomials.
+//
+template <class T, class Policy>
+T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<113> const *)
+{
+ BOOST_MATH_STD_USING // ADL of std functions
+ T sigma = (x - a) / a;
+ T phi = -boost::math::log1pmx(sigma, pol);
+ T y = a * phi;
+ T z = sqrt(2 * phi);
+ if(x < a)
+ z = -z;
+
+ T workspace[14];
+
+ static const T C0[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.333333333333333333333333333333333333),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0833333333333333333333333333333333333),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0148148148148148148148148148148148148),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00115740740740740740740740740740740741),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0003527336860670194003527336860670194),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000178755144032921810699588477366255144),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.391926317852243778169704095630021556e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.218544851067999216147364295512443661e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.185406221071515996070179883622956325e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.829671134095308600501624213166443227e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.17665952736826079304360054245742403e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.670785354340149858036939710029613572e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.102618097842403080425739573227252951e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.438203601845335318655297462244719123e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.914769958223679023418248817633113681e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.255141939949462497668779537993887013e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.583077213255042506746408945040035798e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.243619480206674162436940696707789943e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.502766928011417558909054985925744366e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.110043920319561347708374174497293411e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.337176326240098537882769884169200185e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.13923887224181620659193661848957998e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.285348938070474432039669099052828299e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.513911183424257261899064580300494205e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.197522882943494428353962401580710912e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.809952115670456133407115668702575255e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.165225312163981618191514820265351162e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.253054300974788842327061090060267385e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.116869397385595765888230876507793475e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.477003704982048475822167804084816597e-17),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.969912605905623712420709685898585354e-18),
+ };
+ workspace[0] = tools::evaluate_polynomial(C0, z);
+
+ static const T C1[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00185185185185185185185185185185185185),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00347222222222222222222222222222222222),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0026455026455026455026455026455026455),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000990226337448559670781893004115226337),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000205761316872427983539094650205761317),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.401877572016460905349794238683127572e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.180985503344899778370285914867533523e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.76491609160811100846374214980916921e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.16120900894563446003775221882217767e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.464712780280743434226135033938722401e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.137863344691572095931187533077488877e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.575254560351770496402194531835048307e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.119516285997781473243076536699698169e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.175432417197476476237547551202312502e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.100915437106004126274577504686681675e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.416279299184258263623372347219858628e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.856390702649298063807431562579670208e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.606721510160475861512701762169919581e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.716249896481148539007961017165545733e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.293318664377143711740636683615595403e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.599669636568368872330374527568788909e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.216717865273233141017100472779701734e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.497833997236926164052815522048108548e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.202916288237134247736694804325894226e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.413125571381061004935108332558187111e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.828651623988309644380188591057589316e-18),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.341003088693333279336339355910600992e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.138541953028939715357034547426313703e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.281234665322887466568860332727259483e-16),
+ };
+ workspace[1] = tools::evaluate_polynomial(C1, z);
+
+ static const T C2[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0041335978835978835978835978835978836),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00268132716049382716049382716049382716),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000771604938271604938271604938271604938),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.200938786008230452674897119341563786e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000107366532263651605215391223621676297),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.529234488291201254164217127180090143e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.127606351886187277133779191392360117e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.34235787340961380741902003904747389e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.137219573090629332055943852926020279e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.629899213838005502290672234278391876e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.142806142060642417915846008822771748e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.204770984219908660149195854409200226e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.140925299108675210532930244154315272e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.622897408492202203356394293530327112e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.136704883966171134992724380284402402e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.942835615901467819547711211663208075e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.128722524000893180595479368872770442e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.556459561343633211465414765894951439e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.119759355463669810035898150310311343e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.416897822518386350403836626692480096e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.109406404278845944099299008640802908e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.4662239946390135746326204922464679e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.990510576390690597844122258212382301e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.189318767683735145056885183170630169e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.885922187259112726176031067028740667e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.373782039804640545306560251777191937e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.786883363903515525774088394065960751e-15),
+ };
+ workspace[2] = tools::evaluate_polynomial(C2, z);
+
+ static const T C3[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000649434156378600823045267489711934156),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000229472093621399176954732510288065844),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000469189494395255712128140111679206329),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000267720632062838852962309752433209223),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.756180167188397641072538191879755666e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.239650511386729665193314027333231723e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.110826541153473023614770299726861227e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.567495282699159656749963105701560205e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.14230900732435883914551894470580433e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.278610802915281422405802158211174452e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.16958404091930277289864168795820267e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.809946490538808236335278504852724081e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.191111684859736540606728140872727635e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.239286204398081179686413514022282056e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.206201318154887984369925818486654549e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.946049666185513217375417988510192814e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.215410497757749078380130268468744512e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.138882333681390304603424682490735291e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.218947616819639394064123400466489455e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.979099895117168512568262802255883368e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.217821918801809621153859472011393244e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.62088195734079014258166361684972205e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.212697836327973697696702537114614471e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.934468879151743333127396765626749473e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.204536712267828493249215913063207436e-13),
+ };
+ workspace[3] = tools::evaluate_polynomial(C3, z);
+
+ static const T C4[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000861888290916711698604702719929057378),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00078403922172006662747403488144228885),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000299072480303190179733389609932819809),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.146384525788434181781232535690697556e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.664149821546512218665853782451862013e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.396836504717943466443123507595386882e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.113757269706784190980552042885831759e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.250749722623753280165221942390057007e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.169541495365583060147164356781525752e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.890750753220530968882898422505515924e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.229293483400080487057216364891158518e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.295679413754404904696572852500004588e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.288658297427087836297341274604184504e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.141897394378032193894774303903982717e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.344635804994648970659527720474194356e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.230245171745280671320192735850147087e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.394092330280464052750697640085291799e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.186023389685045019134258533045185639e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.435632300505661804380678327446262424e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.127860010162962312660550463349930726e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.467927502665791946200382739991760062e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.214924647061348285410535341910721086e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.490881561480965216323649688463984082e-12),
+ };
+ workspace[4] = tools::evaluate_polynomial(C4, z);
+
+ static const T C5[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000336798553366358150308767592718210002),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.697281375836585777429398828575783308e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00027727532449593920787336425196507501),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000199325705161888477003360405280844238),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.679778047793720783881640176604435742e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.141906292064396701483392727105575757e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.135940481897686932784583938837504469e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.80184702563342015397192571980419684e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.229148117650809517038048790128781806e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.325247355129845395166230137750005047e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.346528464910852649559195496827579815e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.184471871911713432765322367374920978e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.482409670378941807563762631738989002e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.179894667217435153025754291716644314e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.630619450001352343517516981425944698e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.316241762877456793773762181540969623e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.784092425369742929000839303523267545e-9),
+ };
+ workspace[5] = tools::evaluate_polynomial(C5, z);
+
+ static const T C6[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00053130793646399222316574854297762391),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000592166437353693882864836225604401187),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000270878209671804482771279183488328692),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.790235323266032787212032944390816666e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.815396936756196875092890088464682624e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.561168275310624965003775619041471695e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.183291165828433755673259749374098313e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.307961345060330478256414192546677006e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.346515536880360908673728529745376913e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.202913273960586037269527254582695285e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.578879286314900370889997586203187687e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.233863067382665698933480579231637609e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.88286007463304835250508524317926246e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.474359588804081278032150770595852426e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.125454150207103824457130611214783073e-7),
+ };
+ workspace[6] = tools::evaluate_polynomial(C6, z);
+
+ static const T C7[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000344367606892377671254279625108523655),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.517179090826059219337057843002058823e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000334931610811422363116635090580012327),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000281269515476323702273722110707777978),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000109765822446847310235396824500789005),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.127410090954844853794579954588107623e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.277444515115636441570715073933712622e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.182634888057113326614324442681892723e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.578769494973505239894178121070843383e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.493875893393627039981813418398565502e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.105953670140260427338098566209633945e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.616671437611040747858836254004890765e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.175629733590604619378669693914265388e-6),
+ };
+ workspace[7] = tools::evaluate_polynomial(C7, z);
+
+ static const T C8[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000652623918595309418922034919726622692),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000839498720672087279993357516764983445),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000438297098541721005061087953050560377),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.696909145842055197136911097362072702e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00016644846642067547837384572662326101),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000127835176797692185853344001461664247),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.462995326369130429061361032704489636e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.455790986792270771162749294232219616e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.105952711258051954718238500312872328e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.678334290486516662273073740749269432e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.210754766662588042469972680229376445e-5),
+ };
+ workspace[8] = tools::evaluate_polynomial(C8, z);
+
+ static const T C9[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000596761290192746250124390067179459605),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.720489541602001055908571930225015052e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000678230883766732836161951166000673426),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000640147526026275845100045652582354779),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000277501076343287044992374518205845463),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.181970083804651510461686554030325202e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.847950711706850318239732559632810086e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.610519208250153101764709122740859458e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.210739201834048624082975255893773306e-4),
+ };
+ workspace[9] = tools::evaluate_polynomial(C9, z);
+
+ static const T C10[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00133244544948006563712694993432717968),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00191443849856547752650089885832852254),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0011089369134596637339607446329267522),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.993240412264229896742295262075817566e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000508745012930931989848393025305956774),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00042735056665392884328432271160040444),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000168588537679107988033552814662382059),
+ };
+ workspace[10] = tools::evaluate_polynomial(C10, z);
+
+ static const T C11[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00157972766073083495908785631307733022),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000162516262783915816898635123980270998),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00206334210355432762645284467690276817),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00213896861856890981541061922797693947),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00101085593912630031708085801712479376),
+ };
+ workspace[11] = tools::evaluate_polynomial(C11, z);
+
+ static const T C12[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00407251211951401664727281097914544601),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00640336283380806979482363809026579583),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00404101610816766177473974858518094879),
+ };
+ workspace[12] = tools::evaluate_polynomial(C12, z);
+ workspace[13] = -0.0059475779383993002845382844736066323L;
+
+ T result = tools::evaluate_polynomial(workspace, T(1/a));
+ result *= exp(-y) / sqrt(2 * constants::pi<T>() * a);
+ if(x < a)
+ result = -result;
+
+ result += boost::math::erfc(sqrt(y), pol) / 2;
+
+ return result;
+}
+
+} // namespace detail
+} // namespace math
+} // namespace math
+
+
+#endif // BOOST_MATH_DETAIL_IGAMMA_LARGE
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lanczos_sse2.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/lanczos_sse2.hpp
index df1a047435d..df1a047435d 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lanczos_sse2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/lanczos_sse2.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/lgamma_small.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/lgamma_small.hpp
new file mode 100644
index 00000000000..f4012d836b8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/lgamma_small.hpp
@@ -0,0 +1,532 @@
+// (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_FUNCTIONS_DETAIL_LGAMMA_SMALL
+#define BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/big_constant.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost{ namespace math{ namespace detail{
+
+//
+// These need forward declaring to keep GCC happy:
+//
+template <class T, class Policy, class Lanczos>
+T gamma_imp(T z, const Policy& pol, const Lanczos& l);
+template <class T, class Policy>
+T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l);
+
+//
+// lgamma for small arguments:
+//
+template <class T, class Policy, class Lanczos>
+T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<64>&, const Policy& /* l */, const Lanczos&)
+{
+ // This version uses rational approximations for small
+ // values of z accurate enough for 64-bit mantissas
+ // (80-bit long doubles), works well for 53-bit doubles as well.
+ // Lanczos is only used to select the Lanczos function.
+
+ BOOST_MATH_STD_USING // for ADL of std names
+ T result = 0;
+ if(z < tools::epsilon<T>())
+ {
+ result = -log(z);
+ }
+ else if((zm1 == 0) || (zm2 == 0))
+ {
+ // nothing to do, result is zero....
+ }
+ else if(z > 2)
+ {
+ //
+ // Begin by performing argument reduction until
+ // z is in [2,3):
+ //
+ if(z >= 3)
+ {
+ do
+ {
+ z -= 1;
+ zm2 -= 1;
+ result += log(z);
+ }while(z >= 3);
+ // Update zm2, we need it below:
+ zm2 = z - 2;
+ }
+
+ //
+ // Use the following form:
+ //
+ // lgamma(z) = (z-2)(z+1)(Y + R(z-2))
+ //
+ // where R(z-2) is a rational approximation optimised for
+ // low absolute error - as long as it's absolute error
+ // is small compared to the constant Y - then any rounding
+ // error in it's computation will get wiped out.
+ //
+ // R(z-2) has the following properties:
+ //
+ // At double: Max error found: 4.231e-18
+ // At long double: Max error found: 1.987e-21
+ // Maximum Deviation Found (approximation error): 5.900e-24
+ //
+ static const T P[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.180355685678449379109e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.25126649619989678683e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.494103151567532234274e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.172491608709613993966e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.259453563205438108893e-3)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.541009869215204396339e-3)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.324588649825948492091e-4))
+ };
+ static const T Q[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.196202987197795200688e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.148019669424231326694e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.541391432071720958364e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.988504251128010129477e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.82130967464889339326e-2)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.224936291922115757597e-3)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.223352763208617092964e-6))
+ };
+
+ static const float Y = 0.158963680267333984375e0f;
+
+ T r = zm2 * (z + 1);
+ T R = tools::evaluate_polynomial(P, zm2);
+ R /= tools::evaluate_polynomial(Q, zm2);
+
+ result += r * Y + r * R;
+ }
+ else
+ {
+ //
+ // If z is less than 1 use recurrance to shift to
+ // z in the interval [1,2]:
+ //
+ if(z < 1)
+ {
+ result += -log(z);
+ zm2 = zm1;
+ zm1 = z;
+ z += 1;
+ }
+ //
+ // Two approximations, on for z in [1,1.5] and
+ // one for z in [1.5,2]:
+ //
+ if(z <= 1.5)
+ {
+ //
+ // Use the following form:
+ //
+ // lgamma(z) = (z-1)(z-2)(Y + R(z-1))
+ //
+ // where R(z-1) is a rational approximation optimised for
+ // low absolute error - as long as it's absolute error
+ // is small compared to the constant Y - then any rounding
+ // error in it's computation will get wiped out.
+ //
+ // R(z-1) has the following properties:
+ //
+ // At double precision: Max error found: 1.230011e-17
+ // At 80-bit long double precision: Max error found: 5.631355e-21
+ // Maximum Deviation Found: 3.139e-021
+ // Expected Error Term: 3.139e-021
+
+ //
+ static const float Y = 0.52815341949462890625f;
+
+ static const T P[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.490622454069039543534e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.969117530159521214579e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.414983358359495381969e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.406567124211938417342e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.158413586390692192217e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.240149820648571559892e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.100346687696279557415e-2))
+ };
+ static const T Q[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.302349829846463038743e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.348739585360723852576e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.191415588274426679201e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.507137738614363510846e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.577039722690451849648e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.195768102601107189171e-2))
+ };
+
+ T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1);
+ T prefix = zm1 * zm2;
+
+ result += prefix * Y + prefix * r;
+ }
+ else
+ {
+ //
+ // Use the following form:
+ //
+ // lgamma(z) = (2-z)(1-z)(Y + R(2-z))
+ //
+ // where R(2-z) is a rational approximation optimised for
+ // low absolute error - as long as it's absolute error
+ // is small compared to the constant Y - then any rounding
+ // error in it's computation will get wiped out.
+ //
+ // R(2-z) has the following properties:
+ //
+ // At double precision, max error found: 1.797565e-17
+ // At 80-bit long double precision, max error found: 9.306419e-21
+ // Maximum Deviation Found: 2.151e-021
+ // Expected Error Term: 2.150e-021
+ //
+ static const float Y = 0.452017307281494140625f;
+
+ static const T P[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.292329721830270012337e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.144216267757192309184e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.142440390738631274135e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.542809694055053558157e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.850535976868336437746e-2)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.431171342679297331241e-3))
+ };
+ static const T Q[] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.150169356054485044494e1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.846973248876495016101e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.220095151814995745555e0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.25582797155975869989e-1)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.100666795539143372762e-2)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.827193521891290553639e-6))
+ };
+ T r = zm2 * zm1;
+ T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2));
+
+ result += r * Y + r * R;
+ }
+ }
+ return result;
+}
+template <class T, class Policy, class Lanczos>
+T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<113>&, const Policy& /* l */, const Lanczos&)
+{
+ //
+ // This version uses rational approximations for small
+ // values of z accurate enough for 113-bit mantissas
+ // (128-bit long doubles).
+ //
+ BOOST_MATH_STD_USING // for ADL of std names
+ T result = 0;
+ if(z < tools::epsilon<T>())
+ {
+ result = -log(z);
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ else if((zm1 == 0) || (zm2 == 0))
+ {
+ // nothing to do, result is zero....
+ }
+ else if(z > 2)
+ {
+ //
+ // Begin by performing argument reduction until
+ // z is in [2,3):
+ //
+ if(z >= 3)
+ {
+ do
+ {
+ z -= 1;
+ result += log(z);
+ }while(z >= 3);
+ zm2 = z - 2;
+ }
+ BOOST_MATH_INSTRUMENT_CODE(zm2);
+ BOOST_MATH_INSTRUMENT_CODE(z);
+ BOOST_MATH_INSTRUMENT_CODE(result);
+
+ //
+ // Use the following form:
+ //
+ // lgamma(z) = (z-2)(z+1)(Y + R(z-2))
+ //
+ // where R(z-2) is a rational approximation optimised for
+ // low absolute error - as long as it's absolute error
+ // is small compared to the constant Y - then any rounding
+ // error in it's computation will get wiped out.
+ //
+ // Maximum Deviation Found (approximation error) 3.73e-37
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.018035568567844937910504030027467476655),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.013841458273109517271750705401202404195),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.062031842739486600078866923383017722399),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.052518418329052161202007865149435256093),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.01881718142472784129191838493267755758),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0025104830367021839316463675028524702846),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00021043176101831873281848891452678568311),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00010249622350908722793327719494037981166),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.11381479670982006841716879074288176994e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.49999811718089980992888533630523892389e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.70529798686542184668416911331718963364e-8)
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.5877485070422317542808137697939233685),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.8797959228352591788629602533153837126),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.8030885955284082026405495275461180977),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.69774331297747390169238306148355428436),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.17261566063277623942044077039756583802),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.02729301254544230229429621192443000121),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0026776425891195270663133581960016620433),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00015244249160486584591370355730402168106),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.43997034032479866020546814475414346627e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.46295080708455613044541885534408170934e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.93326638207459533682980757982834180952e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.42316456553164995177177407325292867513e-13)
+ };
+
+ T R = tools::evaluate_polynomial(P, zm2);
+ R /= tools::evaluate_polynomial(Q, zm2);
+
+ static const float Y = 0.158963680267333984375F;
+
+ T r = zm2 * (z + 1);
+
+ result += r * Y + r * R;
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ else
+ {
+ //
+ // If z is less than 1 use recurrance to shift to
+ // z in the interval [1,2]:
+ //
+ if(z < 1)
+ {
+ result += -log(z);
+ zm2 = zm1;
+ zm1 = z;
+ z += 1;
+ }
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ BOOST_MATH_INSTRUMENT_CODE(z);
+ BOOST_MATH_INSTRUMENT_CODE(zm2);
+ //
+ // Three approximations, on for z in [1,1.35], [1.35,1.625] and [1.625,1]
+ //
+ if(z <= 1.35)
+ {
+ //
+ // Use the following form:
+ //
+ // lgamma(z) = (z-1)(z-2)(Y + R(z-1))
+ //
+ // where R(z-1) is a rational approximation optimised for
+ // low absolute error - as long as it's absolute error
+ // is small compared to the constant Y - then any rounding
+ // error in it's computation will get wiped out.
+ //
+ // R(z-1) has the following properties:
+ //
+ // Maximum Deviation Found (approximation error) 1.659e-36
+ // Expected Error Term (theoretical error) 1.343e-36
+ // Max error found at 128-bit long double precision 1.007e-35
+ //
+ static const float Y = 0.54076099395751953125f;
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.036454670944013329356512090082402429697),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.066235835556476033710068679907798799959),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.67492399795577182387312206593595565371),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.4345555263962411429855341651960000166),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.4894319559821365820516771951249649563),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.87210277668067964629483299712322411566),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.29602090537771744401524080430529369136),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0561832587517836908929331992218879676),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0053236785487328044334381502530383140443),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00018629360291358130461736386077971890789),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.10164985672213178500790406939467614498e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.13680157145361387405588201461036338274e-8)
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 4.9106336261005990534095838574132225599),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 10.258804800866438510889341082793078432),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 11.88588976846826108836629960537466889),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 8.3455000546999704314454891036700998428),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.6428823682421746343233362007194282703),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.97465989807254572142266753052776132252),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.15121052897097822172763084966793352524),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.012017363555383555123769849654484594893),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0003583032812720649835431669893011257277)
+ };
+
+ T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1);
+ T prefix = zm1 * zm2;
+
+ result += prefix * Y + prefix * r;
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ else if(z <= 1.625)
+ {
+ //
+ // Use the following form:
+ //
+ // lgamma(z) = (2-z)(1-z)(Y + R(2-z))
+ //
+ // where R(2-z) is a rational approximation optimised for
+ // low absolute error - as long as it's absolute error
+ // is small compared to the constant Y - then any rounding
+ // error in it's computation will get wiped out.
+ //
+ // R(2-z) has the following properties:
+ //
+ // Max error found at 128-bit long double precision 9.634e-36
+ // Maximum Deviation Found (approximation error) 1.538e-37
+ // Expected Error Term (theoretical error) 2.350e-38
+ //
+ static const float Y = 0.483787059783935546875f;
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.017977422421608624353488126610933005432),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.18484528905298309555089509029244135703),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.40401251514859546989565001431430884082),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.40277179799147356461954182877921388182),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.21993421441282936476709677700477598816),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.069595742223850248095697771331107571011),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.012681481427699686635516772923547347328),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0012489322866834830413292771335113136034),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.57058739515423112045108068834668269608e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.8207548771933585614380644961342925976e-6)
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.9629552288944259229543137757200262073),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.7118380799042118987185957298964772755),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.5569815272165399297600586376727357187),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0546764918220835097855665680632153367),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.26574021300894401276478730940980810831),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.03996289731752081380552901986471233462),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0033398680924544836817826046380586480873),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00013288854760548251757651556792598235735),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.17194794958274081373243161848194745111e-5)
+ };
+ T r = zm2 * zm1;
+ T R = tools::evaluate_polynomial(P, T(0.625 - zm1)) / tools::evaluate_polynomial(Q, T(0.625 - zm1));
+
+ result += r * Y + r * R;
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ else
+ {
+ //
+ // Same form as above.
+ //
+ // Max error found (at 128-bit long double precision) 1.831e-35
+ // Maximum Deviation Found (approximation error) 8.588e-36
+ // Expected Error Term (theoretical error) 1.458e-36
+ //
+ static const float Y = 0.443811893463134765625f;
+
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.021027558364667626231512090082402429494),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.15128811104498736604523586803722368377),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.26249631480066246699388544451126410278),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.21148748610533489823742352180628489742),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.093964130697489071999873506148104370633),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.024292059227009051652542804957550866827),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0036284453226534839926304745756906117066),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0002939230129315195346843036254392485984),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.11088589183158123733132268042570710338e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.13240510580220763969511741896361984162e-6)
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.4240003754444040525462170802796471996),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.4868383476933178722203278602342786002),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.4047068395206343375520721509193698547),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.47583809087867443858344765659065773369),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.09865724264554556400463655444270700132),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.012238223514176587501074150988445109735),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00084625068418239194670614419707491797097),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.2796574430456237061420839429225710602e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.30202973883316730694433702165188835331e-6)
+ };
+ // (2 - x) * (1 - x) * (c + R(2 - x))
+ T r = zm2 * zm1;
+ T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2));
+
+ result += r * Y + r * R;
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ }
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ return result;
+}
+template <class T, class Policy, class Lanczos>
+T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<0>&, const Policy& pol, const Lanczos&)
+{
+ //
+ // No rational approximations are available because either
+ // T has no numeric_limits support (so we can't tell how
+ // many digits it has), or T has more digits than we know
+ // what to do with.... we do have a Lanczos approximation
+ // though, and that can be used to keep errors under control.
+ //
+ BOOST_MATH_STD_USING // for ADL of std names
+ T result = 0;
+ if(z < tools::epsilon<T>())
+ {
+ result = -log(z);
+ }
+ else if(z < 0.5)
+ {
+ // taking the log of tgamma reduces the error, no danger of overflow here:
+ result = log(gamma_imp(z, pol, Lanczos()));
+ }
+ else if(z >= 3)
+ {
+ // taking the log of tgamma reduces the error, no danger of overflow here:
+ result = log(gamma_imp(z, pol, Lanczos()));
+ }
+ else if(z >= 1.5)
+ {
+ // special case near 2:
+ T dz = zm2;
+ result = dz * log((z + Lanczos::g() - T(0.5)) / boost::math::constants::e<T>());
+ result += boost::math::log1p(dz / (Lanczos::g() + T(1.5)), pol) * T(1.5);
+ result += boost::math::log1p(Lanczos::lanczos_sum_near_2(dz), pol);
+ }
+ else
+ {
+ // special case near 1:
+ T dz = zm1;
+ result = dz * log((z + Lanczos::g() - T(0.5)) / boost::math::constants::e<T>());
+ result += boost::math::log1p(dz / (Lanczos::g() + T(0.5)), pol) / 2;
+ result += boost::math::log1p(Lanczos::lanczos_sum_near_1(dz), pol);
+ }
+ return result;
+}
+
+}}} // namespaces
+
+#endif // BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/round_fwd.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/round_fwd.hpp
index 8c45a7d75a4..8c45a7d75a4 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/round_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/round_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/t_distribution_inv.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/t_distribution_inv.hpp
index ab5a8fbca69..ab5a8fbca69 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/t_distribution_inv.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/t_distribution_inv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp
index 5a16d9df176..5a16d9df176 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_factorial.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_factorial.hpp
new file mode 100644
index 00000000000..642df7ce504
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/detail/unchecked_factorial.hpp
@@ -0,0 +1,815 @@
+// 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_SP_UC_FACTORIALS_HPP
+#define BOOST_MATH_SP_UC_FACTORIALS_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push) // Temporary until lexical cast fixed.
+#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 <cmath>
+#include <boost/math/special_functions/math_fwd.hpp>
+
+#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
+#include <array>
+#else
+#include <boost/array.hpp>
+#endif
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost { namespace math
+{
+// Forward declarations:
+template <class T>
+struct max_factorial;
+
+// Definitions:
+template <>
+inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION float unchecked_factorial<float>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(float))
+{
+#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
+ constexpr std::array<float, 35> factorials = { {
+#else
+ static const boost::array<float, 35> factorials = {{
+#endif
+ 1.0F,
+ 1.0F,
+ 2.0F,
+ 6.0F,
+ 24.0F,
+ 120.0F,
+ 720.0F,
+ 5040.0F,
+ 40320.0F,
+ 362880.0F,
+ 3628800.0F,
+ 39916800.0F,
+ 479001600.0F,
+ 6227020800.0F,
+ 87178291200.0F,
+ 1307674368000.0F,
+ 20922789888000.0F,
+ 355687428096000.0F,
+ 6402373705728000.0F,
+ 121645100408832000.0F,
+ 0.243290200817664e19F,
+ 0.5109094217170944e20F,
+ 0.112400072777760768e22F,
+ 0.2585201673888497664e23F,
+ 0.62044840173323943936e24F,
+ 0.15511210043330985984e26F,
+ 0.403291461126605635584e27F,
+ 0.10888869450418352160768e29F,
+ 0.304888344611713860501504e30F,
+ 0.8841761993739701954543616e31F,
+ 0.26525285981219105863630848e33F,
+ 0.822283865417792281772556288e34F,
+ 0.26313083693369353016721801216e36F,
+ 0.868331761881188649551819440128e37F,
+ 0.29523279903960414084761860964352e39F,
+ }};
+
+ return factorials[i];
+}
+
+template <>
+struct max_factorial<float>
+{
+ BOOST_STATIC_CONSTANT(unsigned, value = 34);
+};
+
+
+template <>
+inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION long double unchecked_factorial<long double>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(long double))
+{
+#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
+ constexpr std::array<long double, 171> factorials = { {
+#else
+ static const boost::array<long double, 171> factorials = {{
+#endif
+ 1L,
+ 1L,
+ 2L,
+ 6L,
+ 24L,
+ 120L,
+ 720L,
+ 5040L,
+ 40320L,
+ 362880.0L,
+ 3628800.0L,
+ 39916800.0L,
+ 479001600.0L,
+ 6227020800.0L,
+ 87178291200.0L,
+ 1307674368000.0L,
+ 20922789888000.0L,
+ 355687428096000.0L,
+ 6402373705728000.0L,
+ 121645100408832000.0L,
+ 0.243290200817664e19L,
+ 0.5109094217170944e20L,
+ 0.112400072777760768e22L,
+ 0.2585201673888497664e23L,
+ 0.62044840173323943936e24L,
+ 0.15511210043330985984e26L,
+ 0.403291461126605635584e27L,
+ 0.10888869450418352160768e29L,
+ 0.304888344611713860501504e30L,
+ 0.8841761993739701954543616e31L,
+ 0.26525285981219105863630848e33L,
+ 0.822283865417792281772556288e34L,
+ 0.26313083693369353016721801216e36L,
+ 0.868331761881188649551819440128e37L,
+ 0.29523279903960414084761860964352e39L,
+ 0.103331479663861449296666513375232e41L,
+ 0.3719933267899012174679994481508352e42L,
+ 0.137637530912263450463159795815809024e44L,
+ 0.5230226174666011117600072241000742912e45L,
+ 0.203978820811974433586402817399028973568e47L,
+ 0.815915283247897734345611269596115894272e48L,
+ 0.3345252661316380710817006205344075166515e50L,
+ 0.1405006117752879898543142606244511569936e52L,
+ 0.6041526306337383563735513206851399750726e53L,
+ 0.265827157478844876804362581101461589032e55L,
+ 0.1196222208654801945619631614956577150644e57L,
+ 0.5502622159812088949850305428800254892962e58L,
+ 0.2586232415111681806429643551536119799692e60L,
+ 0.1241391559253607267086228904737337503852e62L,
+ 0.6082818640342675608722521633212953768876e63L,
+ 0.3041409320171337804361260816606476884438e65L,
+ 0.1551118753287382280224243016469303211063e67L,
+ 0.8065817517094387857166063685640376697529e68L,
+ 0.427488328406002556429801375338939964969e70L,
+ 0.2308436973392413804720927426830275810833e72L,
+ 0.1269640335365827592596510084756651695958e74L,
+ 0.7109985878048634518540456474637249497365e75L,
+ 0.4052691950487721675568060190543232213498e77L,
+ 0.2350561331282878571829474910515074683829e79L,
+ 0.1386831185456898357379390197203894063459e81L,
+ 0.8320987112741390144276341183223364380754e82L,
+ 0.507580213877224798800856812176625227226e84L,
+ 0.3146997326038793752565312235495076408801e86L,
+ 0.1982608315404440064116146708361898137545e88L,
+ 0.1268869321858841641034333893351614808029e90L,
+ 0.8247650592082470666723170306785496252186e91L,
+ 0.5443449390774430640037292402478427526443e93L,
+ 0.3647111091818868528824985909660546442717e95L,
+ 0.2480035542436830599600990418569171581047e97L,
+ 0.1711224524281413113724683388812728390923e99L,
+ 0.1197857166996989179607278372168909873646e101L,
+ 0.8504785885678623175211676442399260102886e102L,
+ 0.6123445837688608686152407038527467274078e104L,
+ 0.4470115461512684340891257138125051110077e106L,
+ 0.3307885441519386412259530282212537821457e108L,
+ 0.2480914081139539809194647711659403366093e110L,
+ 0.188549470166605025498793226086114655823e112L,
+ 0.1451830920282858696340707840863082849837e114L,
+ 0.1132428117820629783145752115873204622873e116L,
+ 0.8946182130782975286851441715398316520698e117L,
+ 0.7156945704626380229481153372318653216558e119L,
+ 0.5797126020747367985879734231578109105412e121L,
+ 0.4753643337012841748421382069894049466438e123L,
+ 0.3945523969720658651189747118012061057144e125L,
+ 0.3314240134565353266999387579130131288001e127L,
+ 0.2817104114380550276949479442260611594801e129L,
+ 0.2422709538367273238176552320344125971528e131L,
+ 0.210775729837952771721360051869938959523e133L,
+ 0.1854826422573984391147968456455462843802e135L,
+ 0.1650795516090846108121691926245361930984e137L,
+ 0.1485715964481761497309522733620825737886e139L,
+ 0.1352001527678402962551665687594951421476e141L,
+ 0.1243841405464130725547532432587355307758e143L,
+ 0.1156772507081641574759205162306240436215e145L,
+ 0.1087366156656743080273652852567866010042e147L,
+ 0.103299784882390592625997020993947270954e149L,
+ 0.9916779348709496892095714015418938011582e150L,
+ 0.9619275968248211985332842594956369871234e152L,
+ 0.942689044888324774562618574305724247381e154L,
+ 0.9332621544394415268169923885626670049072e156L,
+ 0.9332621544394415268169923885626670049072e158L,
+ 0.9425947759838359420851623124482936749562e160L,
+ 0.9614466715035126609268655586972595484554e162L,
+ 0.990290071648618040754671525458177334909e164L,
+ 0.1029901674514562762384858386476504428305e167L,
+ 0.1081396758240290900504101305800329649721e169L,
+ 0.1146280563734708354534347384148349428704e171L,
+ 0.1226520203196137939351751701038733888713e173L,
+ 0.132464181945182897449989183712183259981e175L,
+ 0.1443859583202493582204882102462797533793e177L,
+ 0.1588245541522742940425370312709077287172e179L,
+ 0.1762952551090244663872161047107075788761e181L,
+ 0.1974506857221074023536820372759924883413e183L,
+ 0.2231192748659813646596607021218715118256e185L,
+ 0.2543559733472187557120132004189335234812e187L,
+ 0.2925093693493015690688151804817735520034e189L,
+ 0.339310868445189820119825609358857320324e191L,
+ 0.396993716080872089540195962949863064779e193L,
+ 0.4684525849754290656574312362808384164393e195L,
+ 0.5574585761207605881323431711741977155627e197L,
+ 0.6689502913449127057588118054090372586753e199L,
+ 0.8094298525273443739681622845449350829971e201L,
+ 0.9875044200833601362411579871448208012564e203L,
+ 0.1214630436702532967576624324188129585545e206L,
+ 0.1506141741511140879795014161993280686076e208L,
+ 0.1882677176888926099743767702491600857595e210L,
+ 0.237217324288004688567714730513941708057e212L,
+ 0.3012660018457659544809977077527059692324e214L,
+ 0.3856204823625804217356770659234636406175e216L,
+ 0.4974504222477287440390234150412680963966e218L,
+ 0.6466855489220473672507304395536485253155e220L,
+ 0.8471580690878820510984568758152795681634e222L,
+ 0.1118248651196004307449963076076169029976e225L,
+ 0.1487270706090685728908450891181304809868e227L,
+ 0.1992942746161518876737324194182948445223e229L,
+ 0.269047270731805048359538766214698040105e231L,
+ 0.3659042881952548657689727220519893345429e233L,
+ 0.5012888748274991661034926292112253883237e235L,
+ 0.6917786472619488492228198283114910358867e237L,
+ 0.9615723196941089004197195613529725398826e239L,
+ 0.1346201247571752460587607385894161555836e242L,
+ 0.1898143759076170969428526414110767793728e244L,
+ 0.2695364137888162776588507508037290267094e246L,
+ 0.3854370717180072770521565736493325081944e248L,
+ 0.5550293832739304789551054660550388118e250L,
+ 0.80479260574719919448490292577980627711e252L,
+ 0.1174997204390910823947958271638517164581e255L,
+ 0.1727245890454638911203498659308620231933e257L,
+ 0.2556323917872865588581178015776757943262e259L,
+ 0.380892263763056972698595524350736933546e261L,
+ 0.571338395644585459047893286526105400319e263L,
+ 0.8627209774233240431623188626544191544816e265L,
+ 0.1311335885683452545606724671234717114812e268L,
+ 0.2006343905095682394778288746989117185662e270L,
+ 0.308976961384735088795856467036324046592e272L,
+ 0.4789142901463393876335775239063022722176e274L,
+ 0.7471062926282894447083809372938315446595e276L,
+ 0.1172956879426414428192158071551315525115e279L,
+ 0.1853271869493734796543609753051078529682e281L,
+ 0.2946702272495038326504339507351214862195e283L,
+ 0.4714723635992061322406943211761943779512e285L,
+ 0.7590705053947218729075178570936729485014e287L,
+ 0.1229694218739449434110178928491750176572e290L,
+ 0.2004401576545302577599591653441552787813e292L,
+ 0.3287218585534296227263330311644146572013e294L,
+ 0.5423910666131588774984495014212841843822e296L,
+ 0.9003691705778437366474261723593317460744e298L,
+ 0.1503616514864999040201201707840084015944e301L,
+ 0.2526075744973198387538018869171341146786e303L,
+ 0.4269068009004705274939251888899566538069e305L,
+ 0.7257415615307998967396728211129263114717e307L,
+ }};
+
+ return factorials[i];
+}
+
+template <>
+struct max_factorial<long double>
+{
+ BOOST_STATIC_CONSTANT(unsigned, value = 170);
+};
+
+#ifdef BOOST_MATH_USE_FLOAT128
+
+template <>
+inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION BOOST_MATH_FLOAT128_TYPE unchecked_factorial<BOOST_MATH_FLOAT128_TYPE>(unsigned i)
+{
+#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
+ constexpr std::array<BOOST_MATH_FLOAT128_TYPE, 171> factorials = { {
+#else
+ static const boost::array<BOOST_MATH_FLOAT128_TYPE, 171> factorials = { {
+#endif
+ 1,
+ 1,
+ 2,
+ 6,
+ 24,
+ 120,
+ 720,
+ 5040,
+ 40320,
+ 362880.0Q,
+ 3628800.0Q,
+ 39916800.0Q,
+ 479001600.0Q,
+ 6227020800.0Q,
+ 87178291200.0Q,
+ 1307674368000.0Q,
+ 20922789888000.0Q,
+ 355687428096000.0Q,
+ 6402373705728000.0Q,
+ 121645100408832000.0Q,
+ 0.243290200817664e19Q,
+ 0.5109094217170944e20Q,
+ 0.112400072777760768e22Q,
+ 0.2585201673888497664e23Q,
+ 0.62044840173323943936e24Q,
+ 0.15511210043330985984e26Q,
+ 0.403291461126605635584e27Q,
+ 0.10888869450418352160768e29Q,
+ 0.304888344611713860501504e30Q,
+ 0.8841761993739701954543616e31Q,
+ 0.26525285981219105863630848e33Q,
+ 0.822283865417792281772556288e34Q,
+ 0.26313083693369353016721801216e36Q,
+ 0.868331761881188649551819440128e37Q,
+ 0.29523279903960414084761860964352e39Q,
+ 0.103331479663861449296666513375232e41Q,
+ 0.3719933267899012174679994481508352e42Q,
+ 0.137637530912263450463159795815809024e44Q,
+ 0.5230226174666011117600072241000742912e45Q,
+ 0.203978820811974433586402817399028973568e47Q,
+ 0.815915283247897734345611269596115894272e48Q,
+ 0.3345252661316380710817006205344075166515e50Q,
+ 0.1405006117752879898543142606244511569936e52Q,
+ 0.6041526306337383563735513206851399750726e53Q,
+ 0.265827157478844876804362581101461589032e55Q,
+ 0.1196222208654801945619631614956577150644e57Q,
+ 0.5502622159812088949850305428800254892962e58Q,
+ 0.2586232415111681806429643551536119799692e60Q,
+ 0.1241391559253607267086228904737337503852e62Q,
+ 0.6082818640342675608722521633212953768876e63Q,
+ 0.3041409320171337804361260816606476884438e65Q,
+ 0.1551118753287382280224243016469303211063e67Q,
+ 0.8065817517094387857166063685640376697529e68Q,
+ 0.427488328406002556429801375338939964969e70Q,
+ 0.2308436973392413804720927426830275810833e72Q,
+ 0.1269640335365827592596510084756651695958e74Q,
+ 0.7109985878048634518540456474637249497365e75Q,
+ 0.4052691950487721675568060190543232213498e77Q,
+ 0.2350561331282878571829474910515074683829e79Q,
+ 0.1386831185456898357379390197203894063459e81Q,
+ 0.8320987112741390144276341183223364380754e82Q,
+ 0.507580213877224798800856812176625227226e84Q,
+ 0.3146997326038793752565312235495076408801e86Q,
+ 0.1982608315404440064116146708361898137545e88Q,
+ 0.1268869321858841641034333893351614808029e90Q,
+ 0.8247650592082470666723170306785496252186e91Q,
+ 0.5443449390774430640037292402478427526443e93Q,
+ 0.3647111091818868528824985909660546442717e95Q,
+ 0.2480035542436830599600990418569171581047e97Q,
+ 0.1711224524281413113724683388812728390923e99Q,
+ 0.1197857166996989179607278372168909873646e101Q,
+ 0.8504785885678623175211676442399260102886e102Q,
+ 0.6123445837688608686152407038527467274078e104Q,
+ 0.4470115461512684340891257138125051110077e106Q,
+ 0.3307885441519386412259530282212537821457e108Q,
+ 0.2480914081139539809194647711659403366093e110Q,
+ 0.188549470166605025498793226086114655823e112Q,
+ 0.1451830920282858696340707840863082849837e114Q,
+ 0.1132428117820629783145752115873204622873e116Q,
+ 0.8946182130782975286851441715398316520698e117Q,
+ 0.7156945704626380229481153372318653216558e119Q,
+ 0.5797126020747367985879734231578109105412e121Q,
+ 0.4753643337012841748421382069894049466438e123Q,
+ 0.3945523969720658651189747118012061057144e125Q,
+ 0.3314240134565353266999387579130131288001e127Q,
+ 0.2817104114380550276949479442260611594801e129Q,
+ 0.2422709538367273238176552320344125971528e131Q,
+ 0.210775729837952771721360051869938959523e133Q,
+ 0.1854826422573984391147968456455462843802e135Q,
+ 0.1650795516090846108121691926245361930984e137Q,
+ 0.1485715964481761497309522733620825737886e139Q,
+ 0.1352001527678402962551665687594951421476e141Q,
+ 0.1243841405464130725547532432587355307758e143Q,
+ 0.1156772507081641574759205162306240436215e145Q,
+ 0.1087366156656743080273652852567866010042e147Q,
+ 0.103299784882390592625997020993947270954e149Q,
+ 0.9916779348709496892095714015418938011582e150Q,
+ 0.9619275968248211985332842594956369871234e152Q,
+ 0.942689044888324774562618574305724247381e154Q,
+ 0.9332621544394415268169923885626670049072e156Q,
+ 0.9332621544394415268169923885626670049072e158Q,
+ 0.9425947759838359420851623124482936749562e160Q,
+ 0.9614466715035126609268655586972595484554e162Q,
+ 0.990290071648618040754671525458177334909e164Q,
+ 0.1029901674514562762384858386476504428305e167Q,
+ 0.1081396758240290900504101305800329649721e169Q,
+ 0.1146280563734708354534347384148349428704e171Q,
+ 0.1226520203196137939351751701038733888713e173Q,
+ 0.132464181945182897449989183712183259981e175Q,
+ 0.1443859583202493582204882102462797533793e177Q,
+ 0.1588245541522742940425370312709077287172e179Q,
+ 0.1762952551090244663872161047107075788761e181Q,
+ 0.1974506857221074023536820372759924883413e183Q,
+ 0.2231192748659813646596607021218715118256e185Q,
+ 0.2543559733472187557120132004189335234812e187Q,
+ 0.2925093693493015690688151804817735520034e189Q,
+ 0.339310868445189820119825609358857320324e191Q,
+ 0.396993716080872089540195962949863064779e193Q,
+ 0.4684525849754290656574312362808384164393e195Q,
+ 0.5574585761207605881323431711741977155627e197Q,
+ 0.6689502913449127057588118054090372586753e199Q,
+ 0.8094298525273443739681622845449350829971e201Q,
+ 0.9875044200833601362411579871448208012564e203Q,
+ 0.1214630436702532967576624324188129585545e206Q,
+ 0.1506141741511140879795014161993280686076e208Q,
+ 0.1882677176888926099743767702491600857595e210Q,
+ 0.237217324288004688567714730513941708057e212Q,
+ 0.3012660018457659544809977077527059692324e214Q,
+ 0.3856204823625804217356770659234636406175e216Q,
+ 0.4974504222477287440390234150412680963966e218Q,
+ 0.6466855489220473672507304395536485253155e220Q,
+ 0.8471580690878820510984568758152795681634e222Q,
+ 0.1118248651196004307449963076076169029976e225Q,
+ 0.1487270706090685728908450891181304809868e227Q,
+ 0.1992942746161518876737324194182948445223e229Q,
+ 0.269047270731805048359538766214698040105e231Q,
+ 0.3659042881952548657689727220519893345429e233Q,
+ 0.5012888748274991661034926292112253883237e235Q,
+ 0.6917786472619488492228198283114910358867e237Q,
+ 0.9615723196941089004197195613529725398826e239Q,
+ 0.1346201247571752460587607385894161555836e242Q,
+ 0.1898143759076170969428526414110767793728e244Q,
+ 0.2695364137888162776588507508037290267094e246Q,
+ 0.3854370717180072770521565736493325081944e248Q,
+ 0.5550293832739304789551054660550388118e250Q,
+ 0.80479260574719919448490292577980627711e252Q,
+ 0.1174997204390910823947958271638517164581e255Q,
+ 0.1727245890454638911203498659308620231933e257Q,
+ 0.2556323917872865588581178015776757943262e259Q,
+ 0.380892263763056972698595524350736933546e261Q,
+ 0.571338395644585459047893286526105400319e263Q,
+ 0.8627209774233240431623188626544191544816e265Q,
+ 0.1311335885683452545606724671234717114812e268Q,
+ 0.2006343905095682394778288746989117185662e270Q,
+ 0.308976961384735088795856467036324046592e272Q,
+ 0.4789142901463393876335775239063022722176e274Q,
+ 0.7471062926282894447083809372938315446595e276Q,
+ 0.1172956879426414428192158071551315525115e279Q,
+ 0.1853271869493734796543609753051078529682e281Q,
+ 0.2946702272495038326504339507351214862195e283Q,
+ 0.4714723635992061322406943211761943779512e285Q,
+ 0.7590705053947218729075178570936729485014e287Q,
+ 0.1229694218739449434110178928491750176572e290Q,
+ 0.2004401576545302577599591653441552787813e292Q,
+ 0.3287218585534296227263330311644146572013e294Q,
+ 0.5423910666131588774984495014212841843822e296Q,
+ 0.9003691705778437366474261723593317460744e298Q,
+ 0.1503616514864999040201201707840084015944e301Q,
+ 0.2526075744973198387538018869171341146786e303Q,
+ 0.4269068009004705274939251888899566538069e305Q,
+ 0.7257415615307998967396728211129263114717e307Q,
+ } };
+
+ return factorials[i];
+}
+
+template <>
+struct max_factorial<BOOST_MATH_FLOAT128_TYPE>
+{
+ BOOST_STATIC_CONSTANT(unsigned, value = 170);
+};
+
+#endif
+
+template <>
+inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION double unchecked_factorial<double>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(double))
+{
+ return static_cast<double>(boost::math::unchecked_factorial<long double>(i));
+}
+
+template <>
+struct max_factorial<double>
+{
+ BOOST_STATIC_CONSTANT(unsigned,
+ value = ::boost::math::max_factorial<long double>::value);
+};
+
+#ifndef BOOST_MATH_NO_LEXICAL_CAST
+
+template <class T>
+struct unchecked_factorial_initializer
+{
+ struct init
+ {
+ init()
+ {
+ boost::math::unchecked_factorial<T>(3);
+ }
+ void force_instantiate()const {}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T>
+const typename unchecked_factorial_initializer<T>::init unchecked_factorial_initializer<T>::initializer;
+
+
+template <class T, int N>
+inline T unchecked_factorial_imp(unsigned i, const mpl::int_<N>&)
+{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
+ // factorial<unsigned int>(n) is not implemented
+ // because it would overflow integral type T for too small n
+ // to be useful. Use instead a floating-point type,
+ // and convert to an unsigned type if essential, for example:
+ // unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
+ // See factorial documentation for more detail.
+
+ unchecked_factorial_initializer<T>::force_instantiate();
+
+ static const boost::array<T, 101> factorials = {{
+ T(boost::math::tools::convert_from_string<T>("1")),
+ T(boost::math::tools::convert_from_string<T>("1")),
+ T(boost::math::tools::convert_from_string<T>("2")),
+ T(boost::math::tools::convert_from_string<T>("6")),
+ T(boost::math::tools::convert_from_string<T>("24")),
+ T(boost::math::tools::convert_from_string<T>("120")),
+ T(boost::math::tools::convert_from_string<T>("720")),
+ T(boost::math::tools::convert_from_string<T>("5040")),
+ T(boost::math::tools::convert_from_string<T>("40320")),
+ T(boost::math::tools::convert_from_string<T>("362880")),
+ T(boost::math::tools::convert_from_string<T>("3628800")),
+ T(boost::math::tools::convert_from_string<T>("39916800")),
+ T(boost::math::tools::convert_from_string<T>("479001600")),
+ T(boost::math::tools::convert_from_string<T>("6227020800")),
+ T(boost::math::tools::convert_from_string<T>("87178291200")),
+ T(boost::math::tools::convert_from_string<T>("1307674368000")),
+ T(boost::math::tools::convert_from_string<T>("20922789888000")),
+ T(boost::math::tools::convert_from_string<T>("355687428096000")),
+ T(boost::math::tools::convert_from_string<T>("6402373705728000")),
+ T(boost::math::tools::convert_from_string<T>("121645100408832000")),
+ T(boost::math::tools::convert_from_string<T>("2432902008176640000")),
+ T(boost::math::tools::convert_from_string<T>("51090942171709440000")),
+ T(boost::math::tools::convert_from_string<T>("1124000727777607680000")),
+ T(boost::math::tools::convert_from_string<T>("25852016738884976640000")),
+ T(boost::math::tools::convert_from_string<T>("620448401733239439360000")),
+ T(boost::math::tools::convert_from_string<T>("15511210043330985984000000")),
+ T(boost::math::tools::convert_from_string<T>("403291461126605635584000000")),
+ T(boost::math::tools::convert_from_string<T>("10888869450418352160768000000")),
+ T(boost::math::tools::convert_from_string<T>("304888344611713860501504000000")),
+ T(boost::math::tools::convert_from_string<T>("8841761993739701954543616000000")),
+ T(boost::math::tools::convert_from_string<T>("265252859812191058636308480000000")),
+ T(boost::math::tools::convert_from_string<T>("8222838654177922817725562880000000")),
+ T(boost::math::tools::convert_from_string<T>("263130836933693530167218012160000000")),
+ T(boost::math::tools::convert_from_string<T>("8683317618811886495518194401280000000")),
+ T(boost::math::tools::convert_from_string<T>("295232799039604140847618609643520000000")),
+ T(boost::math::tools::convert_from_string<T>("10333147966386144929666651337523200000000")),
+ T(boost::math::tools::convert_from_string<T>("371993326789901217467999448150835200000000")),
+ T(boost::math::tools::convert_from_string<T>("13763753091226345046315979581580902400000000")),
+ T(boost::math::tools::convert_from_string<T>("523022617466601111760007224100074291200000000")),
+ T(boost::math::tools::convert_from_string<T>("20397882081197443358640281739902897356800000000")),
+ T(boost::math::tools::convert_from_string<T>("815915283247897734345611269596115894272000000000")),
+ T(boost::math::tools::convert_from_string<T>("33452526613163807108170062053440751665152000000000")),
+ T(boost::math::tools::convert_from_string<T>("1405006117752879898543142606244511569936384000000000")),
+ T(boost::math::tools::convert_from_string<T>("60415263063373835637355132068513997507264512000000000")),
+ T(boost::math::tools::convert_from_string<T>("2658271574788448768043625811014615890319638528000000000")),
+ T(boost::math::tools::convert_from_string<T>("119622220865480194561963161495657715064383733760000000000")),
+ T(boost::math::tools::convert_from_string<T>("5502622159812088949850305428800254892961651752960000000000")),
+ T(boost::math::tools::convert_from_string<T>("258623241511168180642964355153611979969197632389120000000000")),
+ T(boost::math::tools::convert_from_string<T>("12413915592536072670862289047373375038521486354677760000000000")),
+ T(boost::math::tools::convert_from_string<T>("608281864034267560872252163321295376887552831379210240000000000")),
+ T(boost::math::tools::convert_from_string<T>("30414093201713378043612608166064768844377641568960512000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1551118753287382280224243016469303211063259720016986112000000000000")),
+ T(boost::math::tools::convert_from_string<T>("80658175170943878571660636856403766975289505440883277824000000000000")),
+ T(boost::math::tools::convert_from_string<T>("4274883284060025564298013753389399649690343788366813724672000000000000")),
+ T(boost::math::tools::convert_from_string<T>("230843697339241380472092742683027581083278564571807941132288000000000000")),
+ T(boost::math::tools::convert_from_string<T>("12696403353658275925965100847566516959580321051449436762275840000000000000")),
+ T(boost::math::tools::convert_from_string<T>("710998587804863451854045647463724949736497978881168458687447040000000000000")),
+ T(boost::math::tools::convert_from_string<T>("40526919504877216755680601905432322134980384796226602145184481280000000000000")),
+ T(boost::math::tools::convert_from_string<T>("2350561331282878571829474910515074683828862318181142924420699914240000000000000")),
+ T(boost::math::tools::convert_from_string<T>("138683118545689835737939019720389406345902876772687432540821294940160000000000000")),
+ T(boost::math::tools::convert_from_string<T>("8320987112741390144276341183223364380754172606361245952449277696409600000000000000")),
+ T(boost::math::tools::convert_from_string<T>("507580213877224798800856812176625227226004528988036003099405939480985600000000000000")),
+ T(boost::math::tools::convert_from_string<T>("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000")),
+ T(boost::math::tools::convert_from_string<T>("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000")),
+ T(boost::math::tools::convert_from_string<T>("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000")),
+ }};
+
+ return factorials[i];
+}
+
+template <class T>
+inline T unchecked_factorial_imp(unsigned i, const mpl::int_<0>&)
+{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
+ // factorial<unsigned int>(n) is not implemented
+ // because it would overflow integral type T for too small n
+ // to be useful. Use instead a floating-point type,
+ // and convert to an unsigned type if essential, for example:
+ // unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
+ // See factorial documentation for more detail.
+#ifdef BOOST_NO_CXX11_THREAD_LOCAL
+ unchecked_factorial_initializer<T>::force_instantiate();
+#endif
+ static const char* const factorial_strings[] = {
+ "1",
+ "1",
+ "2",
+ "6",
+ "24",
+ "120",
+ "720",
+ "5040",
+ "40320",
+ "362880",
+ "3628800",
+ "39916800",
+ "479001600",
+ "6227020800",
+ "87178291200",
+ "1307674368000",
+ "20922789888000",
+ "355687428096000",
+ "6402373705728000",
+ "121645100408832000",
+ "2432902008176640000",
+ "51090942171709440000",
+ "1124000727777607680000",
+ "25852016738884976640000",
+ "620448401733239439360000",
+ "15511210043330985984000000",
+ "403291461126605635584000000",
+ "10888869450418352160768000000",
+ "304888344611713860501504000000",
+ "8841761993739701954543616000000",
+ "265252859812191058636308480000000",
+ "8222838654177922817725562880000000",
+ "263130836933693530167218012160000000",
+ "8683317618811886495518194401280000000",
+ "295232799039604140847618609643520000000",
+ "10333147966386144929666651337523200000000",
+ "371993326789901217467999448150835200000000",
+ "13763753091226345046315979581580902400000000",
+ "523022617466601111760007224100074291200000000",
+ "20397882081197443358640281739902897356800000000",
+ "815915283247897734345611269596115894272000000000",
+ "33452526613163807108170062053440751665152000000000",
+ "1405006117752879898543142606244511569936384000000000",
+ "60415263063373835637355132068513997507264512000000000",
+ "2658271574788448768043625811014615890319638528000000000",
+ "119622220865480194561963161495657715064383733760000000000",
+ "5502622159812088949850305428800254892961651752960000000000",
+ "258623241511168180642964355153611979969197632389120000000000",
+ "12413915592536072670862289047373375038521486354677760000000000",
+ "608281864034267560872252163321295376887552831379210240000000000",
+ "30414093201713378043612608166064768844377641568960512000000000000",
+ "1551118753287382280224243016469303211063259720016986112000000000000",
+ "80658175170943878571660636856403766975289505440883277824000000000000",
+ "4274883284060025564298013753389399649690343788366813724672000000000000",
+ "230843697339241380472092742683027581083278564571807941132288000000000000",
+ "12696403353658275925965100847566516959580321051449436762275840000000000000",
+ "710998587804863451854045647463724949736497978881168458687447040000000000000",
+ "40526919504877216755680601905432322134980384796226602145184481280000000000000",
+ "2350561331282878571829474910515074683828862318181142924420699914240000000000000",
+ "138683118545689835737939019720389406345902876772687432540821294940160000000000000",
+ "8320987112741390144276341183223364380754172606361245952449277696409600000000000000",
+ "507580213877224798800856812176625227226004528988036003099405939480985600000000000000",
+ "31469973260387937525653122354950764088012280797258232192163168247821107200000000000000",
+ "1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000",
+ "126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000",
+ "8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000",
+ "544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000",
+ "36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000",
+ "2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000",
+ "171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000",
+ "11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000",
+ "850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000",
+ "61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000",
+ "4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000",
+ "330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000",
+ "24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000",
+ "1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000",
+ "145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000",
+ "11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000",
+ "894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000",
+ "71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000",
+ "5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000",
+ "475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000",
+ "39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000",
+ "3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000",
+ "281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000",
+ "24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000",
+ "2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000",
+ "185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000",
+ "16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000",
+ "1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000",
+ "135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000",
+ "12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000",
+ "1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000",
+ "108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000",
+ "10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000",
+ "991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000",
+ "96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000",
+ "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000",
+ "933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000",
+ "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000",
+ };
+
+ static BOOST_MATH_THREAD_LOCAL T factorials[sizeof(factorial_strings) / sizeof(factorial_strings[0])];
+ static BOOST_MATH_THREAD_LOCAL int digits = 0;
+
+ int current_digits = boost::math::tools::digits<T>();
+
+ if(digits != current_digits)
+ {
+ digits = current_digits;
+ for(unsigned k = 0; k < sizeof(factorials) / sizeof(factorials[0]); ++k)
+ factorials[k] = static_cast<T>(boost::math::tools::convert_from_string<T>(factorial_strings[k]));
+ }
+
+ return factorials[i];
+}
+
+template <class T>
+inline T unchecked_factorial(unsigned i)
+{
+ typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type tag_type;
+ return unchecked_factorial_imp<T>(i, tag_type());
+}
+
+template <class T>
+struct max_factorial
+{
+ BOOST_STATIC_CONSTANT(unsigned, value = 100);
+};
+
+#else // BOOST_MATH_NO_LEXICAL_CAST
+
+template <class T>
+inline T unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
+{
+ return 1;
+}
+
+template <class T>
+struct max_factorial
+{
+ BOOST_STATIC_CONSTANT(unsigned, value = 0);
+};
+
+#endif
+
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+template <class T>
+const unsigned max_factorial<T>::value;
+#endif
+
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_SP_UC_FACTORIALS_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/erf.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/erf.hpp
new file mode 100644
index 00000000000..b888dd12b7b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/erf.hpp
@@ -0,0 +1,1286 @@
+// (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>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+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.70.0/boost/math/special_functions/expm1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/expm1.hpp
new file mode 100644
index 00000000000..5dc283aae64
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/expm1.hpp
@@ -0,0 +1,357 @@
+// (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_EXPM1_INCLUDED
+#define BOOST_MATH_EXPM1_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <math.h> // platform's ::expm1
+#include <boost/limits.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/math/tools/series.hpp>
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/mpl/less_equal.hpp>
+
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# include <boost/static_assert.hpp>
+#else
+# include <boost/assert.hpp>
+#endif
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost{ namespace math{
+
+namespace detail
+{
+ // Functor expm1_series returns the next term in the Taylor series
+ // x^k / k!
+ // each time that operator() is invoked.
+ //
+ template <class T>
+ struct expm1_series
+ {
+ typedef T result_type;
+
+ expm1_series(T x)
+ : k(0), m_x(x), m_term(1) {}
+
+ T operator()()
+ {
+ ++k;
+ m_term *= m_x;
+ m_term /= k;
+ return m_term;
+ }
+
+ int count()const
+ {
+ return k;
+ }
+
+ private:
+ int k;
+ const T m_x;
+ T m_term;
+ expm1_series(const expm1_series&);
+ expm1_series& operator=(const expm1_series&);
+ };
+
+template <class T, class Policy, class tag>
+struct expm1_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ template <int N>
+ static void do_init(const mpl::int_<N>&){}
+ static void do_init(const mpl::int_<64>&)
+ {
+ expm1(T(0.5));
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ expm1(T(0.5));
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class Policy, class tag>
+const typename expm1_initializer<T, Policy, tag>::init expm1_initializer<T, Policy, tag>::initializer;
+
+//
+// Algorithm expm1 is part of C99, but is not yet provided by many compilers.
+//
+// This version uses a Taylor series expansion for 0.5 > |x| > epsilon.
+//
+template <class T, class Policy>
+T expm1_imp(T x, const mpl::int_<0>&, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+
+ T a = fabs(x);
+ if((boost::math::isnan)(a))
+ {
+ return policies::raise_domain_error<T>("boost::math::expm1<%1%>(%1%)", "expm1 requires a finite argument, but got %1%", a, pol);
+ }
+ if(a > T(0.5f))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
+ return exp(x) - T(1);
+ }
+ if(a < tools::epsilon<T>())
+ return x;
+ detail::expm1_series<T> s(x);
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
+ T result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter);
+#else
+ T zero = 0;
+ T result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, zero);
+#endif
+ policies::check_series_iterations<T>("boost::math::expm1<%1%>(%1%)", max_iter, pol);
+ return result;
+}
+
+template <class T, class P>
+T expm1_imp(T x, const mpl::int_<53>&, const P& pol)
+{
+ BOOST_MATH_STD_USING
+
+ T a = fabs(x);
+ if(a > T(0.5L))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
+ return exp(x) - T(1);
+ }
+ if(a < tools::epsilon<T>())
+ return x;
+
+ static const float Y = 0.10281276702880859e1f;
+ static const T n[] = { static_cast<T>(-0.28127670288085937e-1), static_cast<T>(0.51278186299064534e0), static_cast<T>(-0.6310029069350198e-1), static_cast<T>(0.11638457975729296e-1), static_cast<T>(-0.52143390687521003e-3), static_cast<T>(0.21491399776965688e-4) };
+ static const T d[] = { 1, static_cast<T>(-0.45442309511354755e0), static_cast<T>(0.90850389570911714e-1), static_cast<T>(-0.10088963629815502e-1), static_cast<T>(0.63003407478692265e-3), static_cast<T>(-0.17976570003654402e-4) };
+
+ T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x);
+ return result;
+}
+
+template <class T, class P>
+T expm1_imp(T x, const mpl::int_<64>&, const P& pol)
+{
+ BOOST_MATH_STD_USING
+
+ T a = fabs(x);
+ if(a > T(0.5L))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
+ return exp(x) - T(1);
+ }
+ if(a < tools::epsilon<T>())
+ return x;
+
+ static const float Y = 0.10281276702880859375e1f;
+ static const T n[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.281276702880859375e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.512980290285154286358e0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.667758794592881019644e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.131432469658444745835e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.72303795326880286965e-3),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.447441185192951335042e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.714539134024984593011e-6)
+ };
+ static const T d[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.461477618025562520389e0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.961237488025708540713e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.116483957658204450739e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.873308008461557544458e-3),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.387922804997682392562e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.807473180049193557294e-6)
+ };
+
+ T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x);
+ return result;
+}
+
+template <class T, class P>
+T expm1_imp(T x, const mpl::int_<113>&, const P& pol)
+{
+ BOOST_MATH_STD_USING
+
+ T a = fabs(x);
+ if(a > T(0.5L))
+ {
+ if(a >= tools::log_max_value<T>())
+ {
+ if(x > 0)
+ return policies::raise_overflow_error<T>("boost::math::expm1<%1%>(%1%)", 0, pol);
+ return -1;
+ }
+ return exp(x) - T(1);
+ }
+ if(a < tools::epsilon<T>())
+ return x;
+
+ static const float Y = 0.10281276702880859375e1f;
+ static const T n[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.28127670288085937499999999999999999854e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.51278156911210477556524452177540792214e0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.63263178520747096729500254678819588223e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.14703285606874250425508446801230572252e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.8675686051689527802425310407898459386e-3),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.88126359618291165384647080266133492399e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.25963087867706310844432390015463138953e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.14226691087800461778631773363204081194e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.15995603306536496772374181066765665596e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.45261820069007790520447958280473183582e-10)
+ };
+ static const T d[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.45441264709074310514348137469214538853e0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.96827131936192217313133611655555298106e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.12745248725908178612540554584374876219e-1),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.11473613871583259821612766907781095472e-2),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.73704168477258911962046591907690764416e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.34087499397791555759285503797256103259e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.11114024704296196166272091230695179724e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.23987051614110848595909588343223896577e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.29477341859111589208776402638429026517e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.13222065991022301420255904060628100924e-12)
+ };
+
+ T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x);
+ return result;
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type expm1(T x, 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;
+
+ typedef typename mpl::if_c<
+ ::std::numeric_limits<result_type>::is_specialized == 0,
+ mpl::int_<0>, // no numeric_limits, use generic solution
+ typename mpl::if_<
+ typename mpl::less_equal<precision_type, mpl::int_<53> >::type,
+ mpl::int_<53>, // double
+ typename mpl::if_<
+ typename mpl::less_equal<precision_type, mpl::int_<64> >::type,
+ mpl::int_<64>, // 80-bit long double
+ typename mpl::if_<
+ typename mpl::less_equal<precision_type, mpl::int_<113> >::type,
+ mpl::int_<113>, // 128-bit long double
+ mpl::int_<0> // too many bits, use generic version.
+ >::type
+ >::type
+ >::type
+ >::type tag_type;
+
+ detail::expm1_initializer<value_type, forwarding_policy, tag_type>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::expm1_imp(
+ static_cast<value_type>(x),
+ tag_type(), forwarding_policy()), "boost::math::expm1<%1%>(%1%)");
+}
+
+#ifdef expm1
+# ifndef BOOST_HAS_expm1
+# define BOOST_HAS_expm1
+# endif
+# undef expm1
+#endif
+
+#if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER))
+# ifdef BOOST_MATH_USE_C99
+inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); }
+# ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); }
+# endif
+# else
+inline float expm1(float x, const policies::policy<>&){ return static_cast<float>(::expm1(x)); }
+# endif
+inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); }
+#endif
+
+template <class T>
+inline typename tools::promote_args<T>::type expm1(T x)
+{
+ return expm1(x, policies::policy<>());
+}
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+inline float expm1(float z)
+{
+ return expm1<float>(z);
+}
+inline double expm1(double z)
+{
+ return expm1<double>(z);
+}
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+inline long double expm1(long double z)
+{
+ return expm1<long double>(z);
+}
+#endif
+#endif
+
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_HYPOT_INCLUDED
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/factorials.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/factorials.hpp
index e36a098bb63..e36a098bb63 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/factorials.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/factorials.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/fpclassify.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/fpclassify.hpp
index d83e111c48c..d83e111c48c 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/fpclassify.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/fpclassify.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/gamma.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/gamma.hpp
new file mode 100644
index 00000000000..c16c04e93a7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/gamma.hpp
@@ -0,0 +1,2135 @@
+
+// Copyright John Maddock 2006-7, 2013-14.
+// Copyright Paul A. Bristow 2007, 2013-14.
+// Copyright Nikhar Agrawal 2013-14
+// Copyright Christopher Kormanyos 2013-14
+
+// 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_SF_GAMMA_HPP
+#define BOOST_MATH_SF_GAMMA_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/math/tools/series.hpp>
+#include <boost/math/tools/fraction.hpp>
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/tools/promotion.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/constants/constants.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/log1p.hpp>
+#include <boost/math/special_functions/trunc.hpp>
+#include <boost/math/special_functions/powm1.hpp>
+#include <boost/math/special_functions/sqrt1pm1.hpp>
+#include <boost/math/special_functions/lanczos.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/math/special_functions/detail/igamma_large.hpp>
+#include <boost/math/special_functions/detail/unchecked_factorial.hpp>
+#include <boost/math/special_functions/detail/lgamma_small.hpp>
+#include <boost/math/special_functions/bernoulli.hpp>
+#include <boost/math/special_functions/zeta.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/assert.hpp>
+#include <boost/mpl/greater.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/greater.hpp>
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <algorithm>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
+# pragma warning(disable: 4127) // conditional expression is constant.
+# pragma warning(disable: 4100) // unreferenced formal parameter.
+// Several variables made comments,
+// but some difficulty as whether referenced on not may depend on macro values.
+// So to be safe, 4100 warnings suppressed.
+// TODO - revisit this?
+#endif
+
+namespace boost{ namespace math{
+
+namespace detail{
+
+template <class T>
+inline bool is_odd(T v, const boost::true_type&)
+{
+ int i = static_cast<int>(v);
+ return i&1;
+}
+template <class T>
+inline bool is_odd(T v, const boost::false_type&)
+{
+ // Oh dear can't cast T to int!
+ BOOST_MATH_STD_USING
+ T modulus = v - 2 * floor(v/2);
+ return static_cast<bool>(modulus != 0);
+}
+template <class T>
+inline bool is_odd(T v)
+{
+ return is_odd(v, ::boost::is_convertible<T, int>());
+}
+
+template <class T>
+T sinpx(T z)
+{
+ // Ad hoc function calculates x * sin(pi * x),
+ // taking extra care near when x is near a whole number.
+ BOOST_MATH_STD_USING
+ int sign = 1;
+ if(z < 0)
+ {
+ z = -z;
+ }
+ T fl = floor(z);
+ T dist;
+ if(is_odd(fl))
+ {
+ fl += 1;
+ dist = fl - z;
+ sign = -sign;
+ }
+ else
+ {
+ dist = z - fl;
+ }
+ BOOST_ASSERT(fl >= 0);
+ if(dist > 0.5)
+ dist = 1 - dist;
+ T result = sin(dist*boost::math::constants::pi<T>());
+ return sign*z*result;
+} // template <class T> T sinpx(T z)
+//
+// tgamma(z), with Lanczos support:
+//
+template <class T, class Policy, class Lanczos>
+T gamma_imp(T z, const Policy& pol, const Lanczos& l)
+{
+ BOOST_MATH_STD_USING
+
+ T result = 1;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ static bool b = false;
+ if(!b)
+ {
+ std::cout << "tgamma_imp called with " << typeid(z).name() << " " << typeid(l).name() << std::endl;
+ b = true;
+ }
+#endif
+ static const char* function = "boost::math::tgamma<%1%>(%1%)";
+
+ if(z <= 0)
+ {
+ if(floor(z) == z)
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
+ if(z <= -20)
+ {
+ result = gamma_imp(T(-z), pol, l) * sinpx(z);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ if((fabs(result) < 1) && (tools::max_value<T>() * fabs(result) < boost::math::constants::pi<T>()))
+ return -boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ result = -boost::math::constants::pi<T>() / result;
+ if(result == 0)
+ return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
+ if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL)
+ return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ return result;
+ }
+
+ // shift z to > 1:
+ while(z < 0)
+ {
+ result /= z;
+ z += 1;
+ }
+ }
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ if((floor(z) == z) && (z < max_factorial<T>::value))
+ {
+ result *= unchecked_factorial<T>(itrunc(z, pol) - 1);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
+ else if (z < tools::root_epsilon<T>())
+ {
+ if (z < 1 / tools::max_value<T>())
+ result = policies::raise_overflow_error<T>(function, 0, pol);
+ result *= 1 / z - constants::euler<T>();
+ }
+ else
+ {
+ result *= Lanczos::lanczos_sum(z);
+ T zgh = (z + static_cast<T>(Lanczos::g()) - boost::math::constants::half<T>());
+ T lzgh = log(zgh);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ BOOST_MATH_INSTRUMENT_VARIABLE(tools::log_max_value<T>());
+ if(z * lzgh > tools::log_max_value<T>())
+ {
+ // we're going to overflow unless this is done with care:
+ BOOST_MATH_INSTRUMENT_VARIABLE(zgh);
+ if(lzgh * z / 2 > tools::log_max_value<T>())
+ return boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ T hp = pow(zgh, (z / 2) - T(0.25));
+ BOOST_MATH_INSTRUMENT_VARIABLE(hp);
+ result *= hp / exp(zgh);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ if(tools::max_value<T>() / hp < result)
+ return boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+ result *= hp;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
+ else
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(zgh);
+ BOOST_MATH_INSTRUMENT_VARIABLE(pow(zgh, z - boost::math::constants::half<T>()));
+ BOOST_MATH_INSTRUMENT_VARIABLE(exp(zgh));
+ result *= pow(zgh, z - boost::math::constants::half<T>()) / exp(zgh);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
+ }
+ return result;
+}
+//
+// lgamma(z) with Lanczos support:
+//
+template <class T, class Policy, class Lanczos>
+T lgamma_imp(T z, const Policy& pol, const Lanczos& l, int* sign = 0)
+{
+#ifdef BOOST_MATH_INSTRUMENT
+ static bool b = false;
+ if(!b)
+ {
+ std::cout << "lgamma_imp called with " << typeid(z).name() << " " << typeid(l).name() << std::endl;
+ b = true;
+ }
+#endif
+
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::lgamma<%1%>(%1%)";
+
+ T result = 0;
+ int sresult = 1;
+ if(z <= -tools::root_epsilon<T>())
+ {
+ // reflection formula:
+ if(floor(z) == z)
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
+
+ T t = sinpx(z);
+ z = -z;
+ if(t < 0)
+ {
+ t = -t;
+ }
+ else
+ {
+ sresult = -sresult;
+ }
+ result = log(boost::math::constants::pi<T>()) - lgamma_imp(z, pol, l) - log(t);
+ }
+ else if (z < tools::root_epsilon<T>())
+ {
+ if (0 == z)
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
+ if (fabs(z) < 1 / tools::max_value<T>())
+ result = -log(fabs(z));
+ else
+ result = log(fabs(1 / z - constants::euler<T>()));
+ if (z < 0)
+ sresult = -1;
+ }
+ else if(z < 15)
+ {
+ typedef typename policies::precision<T, Policy>::type precision_type;
+ typedef typename mpl::if_<
+ mpl::and_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::greater<precision_type, mpl::int_<0> >
+ >,
+ mpl::int_<64>,
+ typename mpl::if_<
+ mpl::and_<
+ mpl::less_equal<precision_type, mpl::int_<113> >,
+ mpl::greater<precision_type, mpl::int_<0> >
+ >,
+ mpl::int_<113>, mpl::int_<0> >::type
+ >::type tag_type;
+ result = lgamma_small_imp<T>(z, T(z - 1), T(z - 2), tag_type(), pol, l);
+ }
+ else if((z >= 3) && (z < 100) && (std::numeric_limits<T>::max_exponent >= 1024))
+ {
+ // taking the log of tgamma reduces the error, no danger of overflow here:
+ result = log(gamma_imp(z, pol, l));
+ }
+ else
+ {
+ // regular evaluation:
+ T zgh = static_cast<T>(z + Lanczos::g() - boost::math::constants::half<T>());
+ result = log(zgh) - 1;
+ result *= z - 0.5f;
+ result += log(Lanczos::lanczos_sum_expG_scaled(z));
+ }
+
+ if(sign)
+ *sign = sresult;
+ return result;
+}
+
+//
+// Incomplete gamma functions follow:
+//
+template <class T>
+struct upper_incomplete_gamma_fract
+{
+private:
+ T z, a;
+ int k;
+public:
+ typedef std::pair<T,T> result_type;
+
+ upper_incomplete_gamma_fract(T a1, T z1)
+ : z(z1-a1+1), a(a1), k(0)
+ {
+ }
+
+ result_type operator()()
+ {
+ ++k;
+ z += 2;
+ return result_type(k * (a - k), z);
+ }
+};
+
+template <class T>
+inline T upper_gamma_fraction(T a, T z, T eps)
+{
+ // Multiply result by z^a * e^-z to get the full
+ // upper incomplete integral. Divide by tgamma(z)
+ // to normalise.
+ upper_incomplete_gamma_fract<T> f(a, z);
+ return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps));
+}
+
+template <class T>
+struct lower_incomplete_gamma_series
+{
+private:
+ T a, z, result;
+public:
+ typedef T result_type;
+ lower_incomplete_gamma_series(T a1, T z1) : a(a1), z(z1), result(1){}
+
+ T operator()()
+ {
+ T r = result;
+ a += 1;
+ result *= z/a;
+ return r;
+ }
+};
+
+template <class T, class Policy>
+inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0)
+{
+ // Multiply result by ((z^a) * (e^-z) / a) to get the full
+ // lower incomplete integral. Then divide by tgamma(a)
+ // to get the normalised value.
+ lower_incomplete_gamma_series<T> s(a, z);
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
+ T factor = policies::get_epsilon<T, Policy>();
+ T result = boost::math::tools::sum_series(s, factor, max_iter, init_value);
+ policies::check_series_iterations<T>("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol);
+ return result;
+}
+
+//
+// Fully generic tgamma and lgamma use Stirling's approximation
+// with Bernoulli numbers.
+//
+template<class T>
+std::size_t highest_bernoulli_index()
+{
+ const float digits10_of_type = (std::numeric_limits<T>::is_specialized
+ ? static_cast<float>(std::numeric_limits<T>::digits10)
+ : static_cast<float>(boost::math::tools::digits<T>() * 0.301F));
+
+ // Find the high index n for Bn to produce the desired precision in Stirling's calculation.
+ return static_cast<std::size_t>(18.0F + (0.6F * digits10_of_type));
+}
+
+template<class T>
+T minimum_argument_for_bernoulli_recursion()
+{
+ const float digits10_of_type = (std::numeric_limits<T>::is_specialized
+ ? static_cast<float>(std::numeric_limits<T>::digits10)
+ : static_cast<float>(boost::math::tools::digits<T>() * 0.301F));
+
+ return T(digits10_of_type * 1.7F);
+}
+
+// Forward declaration of the lgamma_imp template specialization.
+template <class T, class Policy>
+T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign = 0);
+
+template <class T, class Policy>
+T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&)
+{
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::tgamma<%1%>(%1%)";
+
+ // Check if the argument of tgamma is identically zero.
+ const bool is_at_zero = (z == 0);
+
+ if((is_at_zero) || ((boost::math::isinf)(z) && (z < 0)))
+ return policies::raise_domain_error<T>(function, "Evaluation of tgamma at %1%.", z, pol);
+
+ const bool b_neg = (z < 0);
+
+ const bool floor_of_z_is_equal_to_z = (floor(z) == z);
+
+ // Special case handling of small factorials:
+ if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial<T>::value))
+ {
+ return boost::math::unchecked_factorial<T>(itrunc(z) - 1);
+ }
+
+ // Make a local, unsigned copy of the input argument.
+ T zz((!b_neg) ? z : -z);
+
+ // Special case for ultra-small z:
+ if(zz < tools::cbrt_epsilon<T>())
+ {
+ const T a0(1);
+ const T a1(boost::math::constants::euler<T>());
+ const T six_euler_squared((boost::math::constants::euler<T>() * boost::math::constants::euler<T>()) * 6);
+ const T a2((six_euler_squared - boost::math::constants::pi_sqr<T>()) / 12);
+
+ const T inverse_tgamma_series = z * ((a2 * z + a1) * z + a0);
+
+ return 1 / inverse_tgamma_series;
+ }
+
+ // Scale the argument up for the calculation of lgamma,
+ // and use downward recursion later for the final result.
+ const T min_arg_for_recursion = minimum_argument_for_bernoulli_recursion<T>();
+
+ int n_recur;
+
+ if(zz < min_arg_for_recursion)
+ {
+ n_recur = boost::math::itrunc(min_arg_for_recursion - zz) + 1;
+
+ zz += n_recur;
+ }
+ else
+ {
+ n_recur = 0;
+ }
+
+ const T log_gamma_value = lgamma_imp(zz, pol, lanczos::undefined_lanczos());
+
+ if(log_gamma_value > tools::log_max_value<T>())
+ return policies::raise_overflow_error<T>(function, 0, pol);
+
+ T gamma_value = exp(log_gamma_value);
+
+ // Rescale the result using downward recursion if necessary.
+ if(n_recur)
+ {
+ // The order of divides is important, if we keep subtracting 1 from zz
+ // we DO NOT get back to z (cancellation error). Further if z < epsilon
+ // we would end up dividing by zero. Also in order to prevent spurious
+ // overflow with the first division, we must save dividing by |z| till last,
+ // so the optimal order of divides is z+1, z+2, z+3...z+n_recur-1,z.
+ zz = fabs(z) + 1;
+ for(int k = 1; k < n_recur; ++k)
+ {
+ gamma_value /= zz;
+ zz += 1;
+ }
+ gamma_value /= fabs(z);
+ }
+
+ // Return the result, accounting for possible negative arguments.
+ if(b_neg)
+ {
+ // Provide special error analysis for:
+ // * arguments in the neighborhood of a negative integer
+ // * arguments exactly equal to a negative integer.
+
+ // Check if the argument of tgamma is exactly equal to a negative integer.
+ if(floor_of_z_is_equal_to_z)
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
+
+ gamma_value *= sinpx(z);
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(gamma_value);
+
+ const bool result_is_too_large_to_represent = ( (abs(gamma_value) < 1)
+ && ((tools::max_value<T>() * abs(gamma_value)) < boost::math::constants::pi<T>()));
+
+ if(result_is_too_large_to_represent)
+ return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
+
+ gamma_value = -boost::math::constants::pi<T>() / gamma_value;
+ BOOST_MATH_INSTRUMENT_VARIABLE(gamma_value);
+
+ if(gamma_value == 0)
+ return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
+
+ if((boost::math::fpclassify)(gamma_value) == static_cast<int>(FP_SUBNORMAL))
+ return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", gamma_value, pol);
+ }
+
+ return gamma_value;
+}
+
+template <class T, class Policy>
+inline T log_gamma_near_1(const T& z, Policy const& pol)
+{
+ //
+ // This is for the multiprecision case where there is
+ // no lanczos support...
+ //
+ BOOST_MATH_STD_USING // ADL of std names
+
+ BOOST_ASSERT(fabs(z) < 1);
+
+ T result = -constants::euler<T>() * z;
+
+ T power_term = z * z;
+ T term;
+ unsigned j = 0;
+
+ do
+ {
+ term = boost::math::zeta<T>(j + 2, pol) * power_term / (j + 2);
+ if(j & 1)
+ result -= term;
+ else
+ result += term;
+ power_term *= z;
+ ++j;
+ } while(fabs(result) * tools::epsilon<T>() < fabs(term));
+
+ return result;
+}
+
+template <class T, class Policy>
+T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign)
+{
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::lgamma<%1%>(%1%)";
+
+ // Check if the argument of lgamma is identically zero.
+ const bool is_at_zero = (z == 0);
+
+ if(is_at_zero)
+ return policies::raise_domain_error<T>(function, "Evaluation of lgamma at zero %1%.", z, pol);
+ if((boost::math::isnan)(z))
+ return policies::raise_domain_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
+ if((boost::math::isinf)(z))
+ return policies::raise_overflow_error<T>(function, 0, pol);
+
+ const bool b_neg = (z < 0);
+
+ const bool floor_of_z_is_equal_to_z = (floor(z) == z);
+
+ // Special case handling of small factorials:
+ if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial<T>::value))
+ {
+ if (sign)
+ *sign = 1;
+ return log(boost::math::unchecked_factorial<T>(itrunc(z) - 1));
+ }
+
+ // Make a local, unsigned copy of the input argument.
+ T zz((!b_neg) ? z : -z);
+
+ const T min_arg_for_recursion = minimum_argument_for_bernoulli_recursion<T>();
+
+ T log_gamma_value;
+
+ if (zz < min_arg_for_recursion)
+ {
+ // Here we simply take the logarithm of tgamma(). This is somewhat
+ // inefficient, but simple. The rationale is that the argument here
+ // is relatively small and overflow is not expected to be likely.
+ if(fabs(z - 1) < 0.25)
+ {
+ log_gamma_value = log_gamma_near_1(T(zz - 1), pol);
+ }
+ else if(fabs(z - 2) < 0.25)
+ {
+ log_gamma_value = log_gamma_near_1(T(zz - 2), pol) + log(zz - 1);
+ }
+ else if (z > -tools::root_epsilon<T>())
+ {
+ // Reflection formula may fail if z is very close to zero, let the series
+ // expansion for tgamma close to zero do the work:
+ if (sign)
+ *sign = z < 0 ? -1 : 1;
+ return log(abs(gamma_imp(z, pol, lanczos::undefined_lanczos())));
+ }
+ else
+ {
+ // No issue with spurious overflow in reflection formula,
+ // just fall through to regular code:
+ log_gamma_value = log(abs(gamma_imp(zz, pol, lanczos::undefined_lanczos())));
+ }
+ }
+ else
+ {
+ // Perform the Bernoulli series expansion of Stirling's approximation.
+
+ const std::size_t number_of_bernoullis_b2n = highest_bernoulli_index<T>();
+
+ T one_over_x_pow_two_n_minus_one = 1 / zz;
+ const T one_over_x2 = one_over_x_pow_two_n_minus_one * one_over_x_pow_two_n_minus_one;
+ T sum = (boost::math::bernoulli_b2n<T>(1) / 2) * one_over_x_pow_two_n_minus_one;
+ const T target_epsilon_to_break_loop = (sum * boost::math::tools::epsilon<T>()) * T(1.0E-10F);
+
+ for(std::size_t n = 2U; n < number_of_bernoullis_b2n; ++n)
+ {
+ one_over_x_pow_two_n_minus_one *= one_over_x2;
+
+ const std::size_t n2 = static_cast<std::size_t>(n * 2U);
+
+ const T term = (boost::math::bernoulli_b2n<T>(static_cast<int>(n)) * one_over_x_pow_two_n_minus_one) / (n2 * (n2 - 1U));
+
+ if((n >= 8U) && (abs(term) < target_epsilon_to_break_loop))
+ {
+ // We have reached the desired precision in Stirling's expansion.
+ // Adding additional terms to the sum of this divergent asymptotic
+ // expansion will not improve the result.
+
+ // Break from the loop.
+ break;
+ }
+
+ sum += term;
+ }
+
+ // Complete Stirling's approximation.
+ const T half_ln_two_pi = log(boost::math::constants::two_pi<T>()) / 2;
+
+ log_gamma_value = ((((zz - boost::math::constants::half<T>()) * log(zz)) - zz) + half_ln_two_pi) + sum;
+ }
+
+ int sign_of_result = 1;
+
+ if(b_neg)
+ {
+ // Provide special error analysis if the argument is exactly
+ // equal to a negative integer.
+
+ // Check if the argument of lgamma is exactly equal to a negative integer.
+ if(floor_of_z_is_equal_to_z)
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
+
+ T t = sinpx(z);
+
+ if(t < 0)
+ {
+ t = -t;
+ }
+ else
+ {
+ sign_of_result = -sign_of_result;
+ }
+
+ log_gamma_value = - log_gamma_value
+ + log(boost::math::constants::pi<T>())
+ - log(t);
+ }
+
+ if(sign != static_cast<int*>(0U)) { *sign = sign_of_result; }
+
+ return log_gamma_value;
+}
+
+//
+// This helper calculates tgamma(dz+1)-1 without cancellation errors,
+// used by the upper incomplete gamma with z < 1:
+//
+template <class T, class Policy, class Lanczos>
+T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l)
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename policies::precision<T,Policy>::type precision_type;
+
+ typedef typename mpl::if_<
+ mpl::or_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<113> >
+ >,
+ typename mpl::if_<
+ mpl::and_<is_same<Lanczos, lanczos::lanczos24m113>, mpl::greater<precision_type, mpl::int_<0> > >,
+ mpl::int_<113>,
+ mpl::int_<0>
+ >::type,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::int_<64>, mpl::int_<113> >::type
+ >::type tag_type;
+
+ T result;
+ if(dz < 0)
+ {
+ if(dz < -0.5)
+ {
+ // Best method is simply to subtract 1 from tgamma:
+ result = boost::math::tgamma(1+dz, pol) - 1;
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ else
+ {
+ // Use expm1 on lgamma:
+ result = boost::math::expm1(-boost::math::log1p(dz, pol)
+ + lgamma_small_imp<T>(dz+2, dz + 1, dz, tag_type(), pol, l));
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ }
+ else
+ {
+ if(dz < 2)
+ {
+ // Use expm1 on lgamma:
+ result = boost::math::expm1(lgamma_small_imp<T>(dz+1, dz, dz-1, tag_type(), pol, l), pol);
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ else
+ {
+ // Best method is simply to subtract 1 from tgamma:
+ result = boost::math::tgamma(1+dz, pol) - 1;
+ BOOST_MATH_INSTRUMENT_CODE(result);
+ }
+ }
+
+ return result;
+}
+
+template <class T, class Policy>
+inline T tgammap1m1_imp(T z, Policy const& pol,
+ const ::boost::math::lanczos::undefined_lanczos&)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ if(fabs(z) < 0.55)
+ {
+ return boost::math::expm1(log_gamma_near_1(z, pol));
+ }
+ return boost::math::expm1(boost::math::lgamma(1 + z, pol));
+}
+
+//
+// Series representation for upper fraction when z is small:
+//
+template <class T>
+struct small_gamma2_series
+{
+ typedef T result_type;
+
+ small_gamma2_series(T a_, T x_) : result(-x_), x(-x_), apn(a_+1), n(1){}
+
+ T operator()()
+ {
+ T r = result / (apn);
+ result *= x;
+ result /= ++n;
+ apn += 1;
+ return r;
+ }
+
+private:
+ T result, x, apn;
+ int n;
+};
+//
+// calculate power term prefix (z^a)(e^-z) used in the non-normalised
+// incomplete gammas:
+//
+template <class T, class Policy>
+T full_igamma_prefix(T a, T z, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+
+ T prefix;
+ if (z > tools::max_value<T>())
+ return 0;
+ T alz = a * log(z);
+
+ if(z >= 1)
+ {
+ if((alz < tools::log_max_value<T>()) && (-z > tools::log_min_value<T>()))
+ {
+ prefix = pow(z, a) * exp(-z);
+ }
+ else if(a >= 1)
+ {
+ prefix = pow(z / exp(z/a), a);
+ }
+ else
+ {
+ prefix = exp(alz - z);
+ }
+ }
+ else
+ {
+ if(alz > tools::log_min_value<T>())
+ {
+ prefix = pow(z, a) * exp(-z);
+ }
+ else if(z/a < tools::log_max_value<T>())
+ {
+ prefix = pow(z / exp(z/a), a);
+ }
+ else
+ {
+ prefix = exp(alz - z);
+ }
+ }
+ //
+ // This error handling isn't very good: it happens after the fact
+ // rather than before it...
+ //
+ if((boost::math::fpclassify)(prefix) == (int)FP_INFINITE)
+ return policies::raise_overflow_error<T>("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol);
+
+ return prefix;
+}
+//
+// Compute (z^a)(e^-z)/tgamma(a)
+// most if the error occurs in this function:
+//
+template <class T, class Policy, class Lanczos>
+T regularised_gamma_prefix(T a, T z, const Policy& pol, const Lanczos& l)
+{
+ BOOST_MATH_STD_USING
+ if (z >= tools::max_value<T>())
+ return 0;
+ T agh = a + static_cast<T>(Lanczos::g()) - T(0.5);
+ T prefix;
+ T d = ((z - a) - static_cast<T>(Lanczos::g()) + T(0.5)) / agh;
+
+ if(a < 1)
+ {
+ //
+ // We have to treat a < 1 as a special case because our Lanczos
+ // approximations are optimised against the factorials with a > 1,
+ // and for high precision types especially (128-bit reals for example)
+ // very small values of a can give rather eroneous results for gamma
+ // unless we do this:
+ //
+ // TODO: is this still required? Lanczos approx should be better now?
+ //
+ if(z <= tools::log_min_value<T>())
+ {
+ // Oh dear, have to use logs, should be free of cancellation errors though:
+ return exp(a * log(z) - z - lgamma_imp(a, pol, l));
+ }
+ else
+ {
+ // direct calculation, no danger of overflow as gamma(a) < 1/a
+ // for small a.
+ return pow(z, a) * exp(-z) / gamma_imp(a, pol, l);
+ }
+ }
+ else if((fabs(d*d*a) <= 100) && (a > 150))
+ {
+ // special case for large a and a ~ z.
+ prefix = a * boost::math::log1pmx(d, pol) + z * static_cast<T>(0.5 - Lanczos::g()) / agh;
+ prefix = exp(prefix);
+ }
+ else
+ {
+ //
+ // general case.
+ // direct computation is most accurate, but use various fallbacks
+ // for different parts of the problem domain:
+ //
+ T alz = a * log(z / agh);
+ T amz = a - z;
+ if(((std::min)(alz, amz) <= tools::log_min_value<T>()) || ((std::max)(alz, amz) >= tools::log_max_value<T>()))
+ {
+ T amza = amz / a;
+ if(((std::min)(alz, amz)/2 > tools::log_min_value<T>()) && ((std::max)(alz, amz)/2 < tools::log_max_value<T>()))
+ {
+ // compute square root of the result and then square it:
+ T sq = pow(z / agh, a / 2) * exp(amz / 2);
+ prefix = sq * sq;
+ }
+ else if(((std::min)(alz, amz)/4 > tools::log_min_value<T>()) && ((std::max)(alz, amz)/4 < tools::log_max_value<T>()) && (z > a))
+ {
+ // compute the 4th root of the result then square it twice:
+ T sq = pow(z / agh, a / 4) * exp(amz / 4);
+ prefix = sq * sq;
+ prefix *= prefix;
+ }
+ else if((amza > tools::log_min_value<T>()) && (amza < tools::log_max_value<T>()))
+ {
+ prefix = pow((z * exp(amza)) / agh, a);
+ }
+ else
+ {
+ prefix = exp(alz + amz);
+ }
+ }
+ else
+ {
+ prefix = pow(z / agh, a) * exp(amz);
+ }
+ }
+ prefix *= sqrt(agh / boost::math::constants::e<T>()) / Lanczos::lanczos_sum_expG_scaled(a);
+ return prefix;
+}
+//
+// And again, without Lanczos support:
+//
+template <class T, class Policy>
+T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined_lanczos&)
+{
+ BOOST_MATH_STD_USING
+
+ T limit = (std::max)(T(10), a);
+ T sum = detail::lower_gamma_series(a, limit, pol) / a;
+ sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policies::get_epsilon<T, Policy>());
+
+ if(a < 10)
+ {
+ // special case for small a:
+ T prefix = pow(z / 10, a);
+ prefix *= exp(10-z);
+ if(0 == prefix)
+ {
+ prefix = pow((z * exp((10-z)/a)) / 10, a);
+ }
+ prefix /= sum;
+ return prefix;
+ }
+
+ T zoa = z / a;
+ T amz = a - z;
+ T alzoa = a * log(zoa);
+ T prefix;
+ if(((std::min)(alzoa, amz) <= tools::log_min_value<T>()) || ((std::max)(alzoa, amz) >= tools::log_max_value<T>()))
+ {
+ T amza = amz / a;
+ if((amza <= tools::log_min_value<T>()) || (amza >= tools::log_max_value<T>()))
+ {
+ prefix = exp(alzoa + amz);
+ }
+ else
+ {
+ prefix = pow(zoa * exp(amza), a);
+ }
+ }
+ else
+ {
+ prefix = pow(zoa, a) * exp(amz);
+ }
+ prefix /= sum;
+ return prefix;
+}
+//
+// Upper gamma fraction for very small a:
+//
+template <class T, class Policy>
+inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0)
+{
+ BOOST_MATH_STD_USING // ADL of std functions.
+ //
+ // Compute the full upper fraction (Q) when a is very small:
+ //
+ T result;
+ result = boost::math::tgamma1pm1(a, pol);
+ if(pgam)
+ *pgam = (result + 1) / a;
+ T p = boost::math::powm1(x, a, pol);
+ result -= p;
+ result /= a;
+ detail::small_gamma2_series<T> s(a, x);
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>() - 10;
+ p += 1;
+ if(pderivative)
+ *pderivative = p / (*pgam * exp(x));
+ T init_value = invert ? *pgam : 0;
+ result = -p * tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, (init_value - result) / p);
+ policies::check_series_iterations<T>("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol);
+ if(invert)
+ result = -result;
+ return result;
+}
+//
+// Upper gamma fraction for integer a:
+//
+template <class T, class Policy>
+inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0)
+{
+ //
+ // Calculates normalised Q when a is an integer:
+ //
+ BOOST_MATH_STD_USING
+ T e = exp(-x);
+ T sum = e;
+ if(sum != 0)
+ {
+ T term = sum;
+ for(unsigned n = 1; n < a; ++n)
+ {
+ term /= n;
+ term *= x;
+ sum += term;
+ }
+ }
+ if(pderivative)
+ {
+ *pderivative = e * pow(x, a) / boost::math::unchecked_factorial<T>(itrunc(T(a - 1), pol));
+ }
+ return sum;
+}
+//
+// Upper gamma fraction for half integer a:
+//
+template <class T, class Policy>
+T finite_half_gamma_q(T a, T x, T* p_derivative, const Policy& pol)
+{
+ //
+ // Calculates normalised Q when a is a half-integer:
+ //
+ BOOST_MATH_STD_USING
+ T e = boost::math::erfc(sqrt(x), pol);
+ if((e != 0) && (a > 1))
+ {
+ T term = exp(-x) / sqrt(constants::pi<T>() * x);
+ term *= x;
+ static const T half = T(1) / 2;
+ term /= half;
+ T sum = term;
+ for(unsigned n = 2; n < a; ++n)
+ {
+ term /= n - half;
+ term *= x;
+ sum += term;
+ }
+ e += sum;
+ if(p_derivative)
+ {
+ *p_derivative = 0;
+ }
+ }
+ else if(p_derivative)
+ {
+ // We'll be dividing by x later, so calculate derivative * x:
+ *p_derivative = sqrt(x) * exp(-x) / constants::root_pi<T>();
+ }
+ return e;
+}
+//
+// Asymptotic approximation for large argument, see: https://dlmf.nist.gov/8.11#E2
+//
+template <class T>
+struct incomplete_tgamma_large_x_series
+{
+ typedef T result_type;
+ incomplete_tgamma_large_x_series(const T& a, const T& x)
+ : a_poch(a - 1), z(x), term(1) {}
+ T operator()()
+ {
+ T result = term;
+ term *= a_poch / z;
+ a_poch -= 1;
+ return result;
+ }
+ T a_poch, z, term;
+};
+
+template <class T, class Policy>
+T incomplete_tgamma_large_x(const T& a, const T& x, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ incomplete_tgamma_large_x_series<T> s(a, x);
+ boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations<Policy>();
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter);
+ boost::math::policies::check_series_iterations<T>("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol);
+ return result;
+}
+
+
+//
+// Main incomplete gamma entry point, handles all four incomplete gamma's:
+//
+template <class T, class Policy>
+T gamma_incomplete_imp(T a, T x, bool normalised, bool invert,
+ const Policy& pol, T* p_derivative)
+{
+ static const char* function = "boost::math::gamma_p<%1%>(%1%, %1%)";
+ if(a <= 0)
+ return policies::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
+ if(x < 0)
+ return policies::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
+
+ BOOST_MATH_STD_USING
+
+ typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
+
+ T result = 0; // Just to avoid warning C4701: potentially uninitialized local variable 'result' used
+
+ if(a >= max_factorial<T>::value && !normalised)
+ {
+ //
+ // When we're computing the non-normalized incomplete gamma
+ // and a is large the result is rather hard to compute unless
+ // we use logs. There are really two options - if x is a long
+ // way from a in value then we can reliably use methods 2 and 4
+ // below in logarithmic form and go straight to the result.
+ // Otherwise we let the regularized gamma take the strain
+ // (the result is unlikely to unerflow in the central region anyway)
+ // and combine with lgamma in the hopes that we get a finite result.
+ //
+ if(invert && (a * 4 < x))
+ {
+ // This is method 4 below, done in logs:
+ result = a * log(x) - x;
+ if(p_derivative)
+ *p_derivative = exp(result);
+ result += log(upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>()));
+ }
+ else if(!invert && (a > 4 * x))
+ {
+ // This is method 2 below, done in logs:
+ result = a * log(x) - x;
+ if(p_derivative)
+ *p_derivative = exp(result);
+ T init_value = 0;
+ result += log(detail::lower_gamma_series(a, x, pol, init_value) / a);
+ }
+ else
+ {
+ result = gamma_incomplete_imp(a, x, true, invert, pol, p_derivative);
+ if(result == 0)
+ {
+ if(invert)
+ {
+ // Try http://functions.wolfram.com/06.06.06.0039.01
+ result = 1 + 1 / (12 * a) + 1 / (288 * a * a);
+ result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi<T>());
+ if(p_derivative)
+ *p_derivative = exp(a * log(x) - x);
+ }
+ else
+ {
+ // This is method 2 below, done in logs, we're really outside the
+ // range of this method, but since the result is almost certainly
+ // infinite, we should probably be OK:
+ result = a * log(x) - x;
+ if(p_derivative)
+ *p_derivative = exp(result);
+ T init_value = 0;
+ result += log(detail::lower_gamma_series(a, x, pol, init_value) / a);
+ }
+ }
+ else
+ {
+ result = log(result) + boost::math::lgamma(a, pol);
+ }
+ }
+ if(result > tools::log_max_value<T>())
+ return policies::raise_overflow_error<T>(function, 0, pol);
+ return exp(result);
+ }
+
+ BOOST_ASSERT((p_derivative == 0) || (normalised == true));
+
+ bool is_int, is_half_int;
+ bool is_small_a = (a < 30) && (a <= x + 1) && (x < tools::log_max_value<T>());
+ if(is_small_a)
+ {
+ T fa = floor(a);
+ is_int = (fa == a);
+ is_half_int = is_int ? false : (fabs(fa - a) == 0.5f);
+ }
+ else
+ {
+ is_int = is_half_int = false;
+ }
+
+ int eval_method;
+
+ if(is_int && (x > 0.6))
+ {
+ // calculate Q via finite sum:
+ invert = !invert;
+ eval_method = 0;
+ }
+ else if(is_half_int && (x > 0.2))
+ {
+ // calculate Q via finite sum for half integer a:
+ invert = !invert;
+ eval_method = 1;
+ }
+ else if((x < tools::root_epsilon<T>()) && (a > 1))
+ {
+ eval_method = 6;
+ }
+ else if ((x > 1000) && ((a < x) || (fabs(a - 50) / x < 1)))
+ {
+ // calculate Q via asymptotic approximation:
+ invert = !invert;
+ eval_method = 7;
+ }
+ else if(x < 0.5)
+ {
+ //
+ // Changeover criterion chosen to give a changeover at Q ~ 0.33
+ //
+ if(-0.4 / log(x) < a)
+ {
+ eval_method = 2;
+ }
+ else
+ {
+ eval_method = 3;
+ }
+ }
+ else if(x < 1.1)
+ {
+ //
+ // Changover here occurs when P ~ 0.75 or Q ~ 0.25:
+ //
+ if(x * 0.75f < a)
+ {
+ eval_method = 2;
+ }
+ else
+ {
+ eval_method = 3;
+ }
+ }
+ else
+ {
+ //
+ // Begin by testing whether we're in the "bad" zone
+ // where the result will be near 0.5 and the usual
+ // series and continued fractions are slow to converge:
+ //
+ bool use_temme = false;
+ if(normalised && std::numeric_limits<T>::is_specialized && (a > 20))
+ {
+ T sigma = fabs((x-a)/a);
+ if((a > 200) && (policies::digits<T, Policy>() <= 113))
+ {
+ //
+ // This limit is chosen so that we use Temme's expansion
+ // only if the result would be larger than about 10^-6.
+ // Below that the regular series and continued fractions
+ // converge OK, and if we use Temme's method we get increasing
+ // errors from the dominant erfc term as it's (inexact) argument
+ // increases in magnitude.
+ //
+ if(20 / a > sigma * sigma)
+ use_temme = true;
+ }
+ else if(policies::digits<T, Policy>() <= 64)
+ {
+ // Note in this zone we can't use Temme's expansion for
+ // types longer than an 80-bit real:
+ // it would require too many terms in the polynomials.
+ if(sigma < 0.4)
+ use_temme = true;
+ }
+ }
+ if(use_temme)
+ {
+ eval_method = 5;
+ }
+ else
+ {
+ //
+ // Regular case where the result will not be too close to 0.5.
+ //
+ // Changeover here occurs at P ~ Q ~ 0.5
+ // Note that series computation of P is about x2 faster than continued fraction
+ // calculation of Q, so try and use the CF only when really necessary, especially
+ // for small x.
+ //
+ if(x - (1 / (3 * x)) < a)
+ {
+ eval_method = 2;
+ }
+ else
+ {
+ eval_method = 4;
+ invert = !invert;
+ }
+ }
+ }
+
+ switch(eval_method)
+ {
+ case 0:
+ {
+ result = finite_gamma_q(a, x, pol, p_derivative);
+ if(normalised == false)
+ result *= boost::math::tgamma(a, pol);
+ break;
+ }
+ case 1:
+ {
+ result = finite_half_gamma_q(a, x, p_derivative, pol);
+ if(normalised == false)
+ result *= boost::math::tgamma(a, pol);
+ if(p_derivative && (*p_derivative == 0))
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ break;
+ }
+ case 2:
+ {
+ // Compute P:
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
+ if(p_derivative)
+ *p_derivative = result;
+ if(result != 0)
+ {
+ //
+ // If we're going to be inverting the result then we can
+ // reduce the number of series evaluations by quite
+ // a few iterations if we set an initial value for the
+ // series sum based on what we'll end up subtracting it from
+ // at the end.
+ // Have to be careful though that this optimization doesn't
+ // lead to spurious numberic overflow. Note that the
+ // scary/expensive overflow checks below are more often
+ // than not bypassed in practice for "sensible" input
+ // values:
+ //
+ T init_value = 0;
+ bool optimised_invert = false;
+ if(invert)
+ {
+ init_value = (normalised ? 1 : boost::math::tgamma(a, pol));
+ if(normalised || (result >= 1) || (tools::max_value<T>() * result > init_value))
+ {
+ init_value /= result;
+ if(normalised || (a < 1) || (tools::max_value<T>() / a > init_value))
+ {
+ init_value *= -a;
+ optimised_invert = true;
+ }
+ else
+ init_value = 0;
+ }
+ else
+ init_value = 0;
+ }
+ result *= detail::lower_gamma_series(a, x, pol, init_value) / a;
+ if(optimised_invert)
+ {
+ invert = false;
+ result = -result;
+ }
+ }
+ break;
+ }
+ case 3:
+ {
+ // Compute Q:
+ invert = !invert;
+ T g;
+ result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative);
+ invert = false;
+ if(normalised)
+ result /= g;
+ break;
+ }
+ case 4:
+ {
+ // Compute Q:
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
+ if(p_derivative)
+ *p_derivative = result;
+ if(result != 0)
+ result *= upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>());
+ break;
+ }
+ case 5:
+ {
+ //
+ // Use compile time dispatch to the appropriate
+ // Temme asymptotic expansion. This may be dead code
+ // if T does not have numeric limits support, or has
+ // too many digits for the most precise version of
+ // these expansions, in that case we'll be calling
+ // an empty function.
+ //
+ typedef typename policies::precision<T, Policy>::type precision_type;
+
+ typedef typename mpl::if_<
+ mpl::or_<mpl::equal_to<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<113> > >,
+ mpl::int_<0>,
+ 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>,
+ mpl::int_<113>
+ >::type
+ >::type
+ >::type tag_type;
+
+ result = igamma_temme_large(a, x, pol, static_cast<tag_type const*>(0));
+ if(x >= a)
+ invert = !invert;
+ if(p_derivative)
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ break;
+ }
+ case 6:
+ {
+ // x is so small that P is necessarily very small too,
+ // use http://functions.wolfram.com/GammaBetaErf/GammaRegularized/06/01/05/01/01/
+ result = !normalised ? pow(x, a) / (a) : pow(x, a) / boost::math::tgamma(a + 1, pol);
+ result *= 1 - a * x / (a + 1);
+ if (p_derivative)
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ break;
+ }
+ case 7:
+ {
+ // x is large,
+ // Compute Q:
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
+ if (p_derivative)
+ *p_derivative = result;
+ result /= x;
+ if (result != 0)
+ result *= incomplete_tgamma_large_x(a, x, pol);
+ break;
+ }
+ }
+
+ if(normalised && (result > 1))
+ result = 1;
+ if(invert)
+ {
+ T gam = normalised ? 1 : boost::math::tgamma(a, pol);
+ result = gam - result;
+ }
+ if(p_derivative)
+ {
+ //
+ // Need to convert prefix term to derivative:
+ //
+ if((x < 1) && (tools::max_value<T>() * x < *p_derivative))
+ {
+ // overflow, just return an arbitrarily large value:
+ *p_derivative = tools::max_value<T>() / 2;
+ }
+
+ *p_derivative /= x;
+ }
+
+ return result;
+}
+
+//
+// Ratios of two gamma functions:
+//
+template <class T, class Policy, class Lanczos>
+T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const Lanczos& l)
+{
+ BOOST_MATH_STD_USING
+ if(z < tools::epsilon<T>())
+ {
+ //
+ // We get spurious numeric overflow unless we're very careful, this
+ // can occur either inside Lanczos::lanczos_sum(z) or in the
+ // final combination of terms, to avoid this, split the product up
+ // into 2 (or 3) parts:
+ //
+ // G(z) / G(L) = 1 / (z * G(L)) ; z < eps, L = z + delta = delta
+ // z * G(L) = z * G(lim) * (G(L)/G(lim)) ; lim = largest factorial
+ //
+ if(boost::math::max_factorial<T>::value < delta)
+ {
+ T ratio = tgamma_delta_ratio_imp_lanczos(delta, T(boost::math::max_factorial<T>::value - delta), pol, l);
+ ratio *= z;
+ ratio *= boost::math::unchecked_factorial<T>(boost::math::max_factorial<T>::value - 1);
+ return 1 / ratio;
+ }
+ else
+ {
+ return 1 / (z * boost::math::tgamma(z + delta, pol));
+ }
+ }
+ T zgh = static_cast<T>(z + Lanczos::g() - constants::half<T>());
+ T result;
+ if(z + delta == z)
+ {
+ if(fabs(delta) < 10)
+ result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
+ else
+ result = 1;
+ }
+ else
+ {
+ if(fabs(delta) < 10)
+ {
+ result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
+ }
+ else
+ {
+ result = pow(zgh / (zgh + delta), z - constants::half<T>());
+ }
+ // Split the calculation up to avoid spurious overflow:
+ result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta));
+ }
+ result *= pow(constants::e<T>() / (zgh + delta), delta);
+ return result;
+}
+//
+// And again without Lanczos support this time:
+//
+template <class T, class Policy>
+T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos&)
+{
+ BOOST_MATH_STD_USING
+ //
+ // The upper gamma fraction is *very* slow for z < 6, actually it's very
+ // slow to converge everywhere but recursing until z > 6 gets rid of the
+ // worst of it's behaviour.
+ //
+ T prefix = 1;
+ T zd = z + delta;
+ while((zd < 6) && (z < 6))
+ {
+ prefix /= z;
+ prefix *= zd;
+ z += 1;
+ zd += 1;
+ }
+ if(delta < 10)
+ {
+ prefix *= exp(-z * boost::math::log1p(delta / z, pol));
+ }
+ else
+ {
+ prefix *= pow(z / zd, z);
+ }
+ prefix *= pow(constants::e<T>() / zd, delta);
+ T sum = detail::lower_gamma_series(z, z, pol) / z;
+ sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::get_epsilon<T, Policy>());
+ T sumd = detail::lower_gamma_series(zd, zd, pol) / zd;
+ sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policies::get_epsilon<T, Policy>());
+ sum /= sumd;
+ if(fabs(tools::max_value<T>() / prefix) < fabs(sum))
+ return policies::raise_overflow_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Result of tgamma is too large to represent.", pol);
+ return sum * prefix;
+}
+
+template <class T, class Policy>
+T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+
+ if((z <= 0) || (z + delta <= 0))
+ {
+ // This isn't very sofisticated, or accurate, but it does work:
+ return boost::math::tgamma(z, pol) / boost::math::tgamma(z + delta, pol);
+ }
+
+ if(floor(delta) == delta)
+ {
+ if(floor(z) == z)
+ {
+ //
+ // Both z and delta are integers, see if we can just use table lookup
+ // of the factorials to get the result:
+ //
+ if((z <= max_factorial<T>::value) && (z + delta <= max_factorial<T>::value))
+ {
+ return unchecked_factorial<T>((unsigned)itrunc(z, pol) - 1) / unchecked_factorial<T>((unsigned)itrunc(T(z + delta), pol) - 1);
+ }
+ }
+ if(fabs(delta) < 20)
+ {
+ //
+ // delta is a small integer, we can use a finite product:
+ //
+ if(delta == 0)
+ return 1;
+ if(delta < 0)
+ {
+ z -= 1;
+ T result = z;
+ while(0 != (delta += 1))
+ {
+ z -= 1;
+ result *= z;
+ }
+ return result;
+ }
+ else
+ {
+ T result = 1 / z;
+ while(0 != (delta -= 1))
+ {
+ z += 1;
+ result /= z;
+ }
+ return result;
+ }
+ }
+ }
+ typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
+ return tgamma_delta_ratio_imp_lanczos(z, delta, pol, lanczos_type());
+}
+
+template <class T, class Policy>
+T tgamma_ratio_imp(T x, T y, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+
+ if((x <= 0) || (boost::math::isinf)(x))
+ return policies::raise_domain_error<T>("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", x, pol);
+ if((y <= 0) || (boost::math::isinf)(y))
+ return policies::raise_domain_error<T>("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", y, pol);
+
+ if(x <= tools::min_value<T>())
+ {
+ // Special case for denorms...Ugh.
+ T shift = ldexp(T(1), tools::digits<T>());
+ return shift * tgamma_ratio_imp(T(x * shift), y, pol);
+ }
+
+ if((x < max_factorial<T>::value) && (y < max_factorial<T>::value))
+ {
+ // Rather than subtracting values, lets just call the gamma functions directly:
+ return boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
+ }
+ T prefix = 1;
+ if(x < 1)
+ {
+ if(y < 2 * max_factorial<T>::value)
+ {
+ // We need to sidestep on x as well, otherwise we'll underflow
+ // before we get to factor in the prefix term:
+ prefix /= x;
+ x += 1;
+ while(y >= max_factorial<T>::value)
+ {
+ y -= 1;
+ prefix /= y;
+ }
+ return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
+ }
+ //
+ // result is almost certainly going to underflow to zero, try logs just in case:
+ //
+ return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol));
+ }
+ if(y < 1)
+ {
+ if(x < 2 * max_factorial<T>::value)
+ {
+ // We need to sidestep on y as well, otherwise we'll overflow
+ // before we get to factor in the prefix term:
+ prefix *= y;
+ y += 1;
+ while(x >= max_factorial<T>::value)
+ {
+ x -= 1;
+ prefix *= x;
+ }
+ return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
+ }
+ //
+ // Result will almost certainly overflow, try logs just in case:
+ //
+ return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol));
+ }
+ //
+ // Regular case, x and y both large and similar in magnitude:
+ //
+ return boost::math::tgamma_delta_ratio(x, y - x, pol);
+}
+
+template <class T, class Policy>
+T gamma_p_derivative_imp(T a, T x, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ //
+ // Usual error checks first:
+ //
+ if(a <= 0)
+ return policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
+ if(x < 0)
+ return policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
+ //
+ // Now special cases:
+ //
+ if(x == 0)
+ {
+ return (a > 1) ? 0 :
+ (a == 1) ? 1 : policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
+ }
+ //
+ // Normal case:
+ //
+ typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
+ T f1 = detail::regularised_gamma_prefix(a, x, pol, lanczos_type());
+ if((x < 1) && (tools::max_value<T>() * x < f1))
+ {
+ // overflow:
+ return policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol);
+ }
+ if(f1 == 0)
+ {
+ // Underflow in calculation, use logs instead:
+ f1 = a * log(x) - x - lgamma(a, pol) - log(x);
+ f1 = exp(f1);
+ }
+ else
+ f1 /= x;
+
+ return f1;
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type
+ tgamma(T z, const Policy& /* pol */, const mpl::true_)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)");
+}
+
+template <class T, class Policy>
+struct igamma_initializer
+{
+ struct init
+ {
+ init()
+ {
+ typedef typename policies::precision<T, Policy>::type precision_type;
+
+ typedef typename mpl::if_<
+ mpl::or_<mpl::equal_to<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<113> > >,
+ mpl::int_<0>,
+ 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>,
+ mpl::int_<113>
+ >::type
+ >::type
+ >::type tag_type;
+
+ do_init(tag_type());
+ }
+ template <int N>
+ static void do_init(const mpl::int_<N>&)
+ {
+ // If std::numeric_limits<T>::digits is zero, we must not call
+ // our inituialization code here as the precision presumably
+ // varies at runtime, and will not have been set yet. Plus the
+ // code requiring initialization isn't called when digits == 0.
+ if(std::numeric_limits<T>::digits)
+ {
+ boost::math::gamma_p(static_cast<T>(400), static_cast<T>(400), Policy());
+ }
+ }
+ static void do_init(const mpl::int_<53>&){}
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class Policy>
+const typename igamma_initializer<T, Policy>::init igamma_initializer<T, Policy>::initializer;
+
+template <class T, class Policy>
+struct lgamma_initializer
+{
+ struct init
+ {
+ init()
+ {
+ typedef typename policies::precision<T, Policy>::type precision_type;
+ typedef typename mpl::if_<
+ mpl::and_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::greater<precision_type, mpl::int_<0> >
+ >,
+ mpl::int_<64>,
+ typename mpl::if_<
+ mpl::and_<
+ mpl::less_equal<precision_type, mpl::int_<113> >,
+ mpl::greater<precision_type, mpl::int_<0> >
+ >,
+ mpl::int_<113>, mpl::int_<0> >::type
+ >::type tag_type;
+ do_init(tag_type());
+ }
+ static void do_init(const mpl::int_<64>&)
+ {
+ boost::math::lgamma(static_cast<T>(2.5), Policy());
+ boost::math::lgamma(static_cast<T>(1.25), Policy());
+ boost::math::lgamma(static_cast<T>(1.75), Policy());
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ boost::math::lgamma(static_cast<T>(2.5), Policy());
+ boost::math::lgamma(static_cast<T>(1.25), Policy());
+ boost::math::lgamma(static_cast<T>(1.5), Policy());
+ boost::math::lgamma(static_cast<T>(1.75), Policy());
+ }
+ static void do_init(const mpl::int_<0>&)
+ {
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class Policy>
+const typename lgamma_initializer<T, Policy>::init lgamma_initializer<T, Policy>::initializer;
+
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma(T1 a, T2 z, const Policy&, const mpl::false_)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ igamma_initializer<value_type, forwarding_policy>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
+ static_cast<value_type>(z), false, true,
+ forwarding_policy(), static_cast<value_type*>(0)), "boost::math::tgamma<%1%>(%1%, %1%)");
+}
+
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma(T1 a, T2 z, const mpl::false_ tag)
+{
+ return tgamma(a, z, policies::policy<>(), tag);
+}
+
+
+} // namespace detail
+
+template <class T>
+inline typename tools::promote_args<T>::type
+ tgamma(T z)
+{
+ return tgamma(z, policies::policy<>());
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type
+ lgamma(T z, int* sign, const Policy&)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ detail::lgamma_initializer<value_type, forwarding_policy>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::lgamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)");
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type
+ lgamma(T z, int* sign)
+{
+ return lgamma(z, sign, policies::policy<>());
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type
+ lgamma(T x, const Policy& pol)
+{
+ return ::boost::math::lgamma(x, 0, pol);
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type
+ lgamma(T x)
+{
+ return ::boost::math::lgamma(x, 0, policies::policy<>());
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type
+ tgamma1pm1(T z, const Policy& /* pol */)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ return policies::checked_narrowing_cast<typename remove_cv<result_type>::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)");
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type
+ tgamma1pm1(T z)
+{
+ return tgamma1pm1(z, policies::policy<>());
+}
+
+//
+// Full upper incomplete gamma:
+//
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma(T1 a, T2 z)
+{
+ //
+ // Type T2 could be a policy object, or a value, select the
+ // right overload based on T2:
+ //
+ typedef typename policies::is_policy<T2>::type maybe_policy;
+ return detail::tgamma(a, z, maybe_policy());
+}
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma(T1 a, T2 z, const Policy& pol)
+{
+ return detail::tgamma(a, z, pol, mpl::false_());
+}
+//
+// Full lower incomplete gamma:
+//
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma_lower(T1 a, T2 z, const Policy&)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ detail::igamma_initializer<value_type, forwarding_policy>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
+ static_cast<value_type>(z), false, false,
+ forwarding_policy(), static_cast<value_type*>(0)), "tgamma_lower<%1%>(%1%, %1%)");
+}
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma_lower(T1 a, T2 z)
+{
+ return tgamma_lower(a, z, policies::policy<>());
+}
+//
+// Regularised upper incomplete gamma:
+//
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ gamma_q(T1 a, T2 z, const Policy& /* pol */)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ detail::igamma_initializer<value_type, forwarding_policy>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
+ static_cast<value_type>(z), true, true,
+ forwarding_policy(), static_cast<value_type*>(0)), "gamma_q<%1%>(%1%, %1%)");
+}
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ gamma_q(T1 a, T2 z)
+{
+ return gamma_q(a, z, policies::policy<>());
+}
+//
+// Regularised lower incomplete gamma:
+//
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ gamma_p(T1 a, T2 z, const Policy&)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ detail::igamma_initializer<value_type, forwarding_policy>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
+ static_cast<value_type>(z), true, false,
+ forwarding_policy(), static_cast<value_type*>(0)), "gamma_p<%1%>(%1%, %1%)");
+}
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ gamma_p(T1 a, T2 z)
+{
+ return gamma_p(a, z, policies::policy<>());
+}
+
+// ratios of gamma functions:
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma_delta_ratio(T1 z, T2 delta, const Policy& /* pol */)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(z), static_cast<value_type>(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
+}
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma_delta_ratio(T1 z, T2 delta)
+{
+ return tgamma_delta_ratio(z, delta, policies::policy<>());
+}
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma_ratio(T1 a, T2 b, const Policy&)
+{
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_ratio_imp(static_cast<value_type>(a), static_cast<value_type>(b), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
+}
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ tgamma_ratio(T1 a, T2 b)
+{
+ return tgamma_ratio(a, b, policies::policy<>());
+}
+
+template <class T1, class T2, class Policy>
+inline typename tools::promote_args<T1, T2>::type
+ gamma_p_derivative(T1 a, T2 x, const Policy&)
+{
+ BOOST_FPU_EXCEPTION_GUARD
+ typedef typename tools::promote_args<T1, T2>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_p_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)");
+}
+template <class T1, class T2>
+inline typename tools::promote_args<T1, T2>::type
+ gamma_p_derivative(T1 a, T2 x)
+{
+ return gamma_p_derivative(a, x, policies::policy<>());
+}
+
+} // namespace math
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#include <boost/math/special_functions/detail/igamma_inverse.hpp>
+#include <boost/math/special_functions/detail/gamma_inva.hpp>
+#include <boost/math/special_functions/erf.hpp>
+
+#endif // BOOST_MATH_SF_GAMMA_HPP
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/hypot.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/hypot.hpp
index efe1a3f2115..efe1a3f2115 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/hypot.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/hypot.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/lanczos.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/lanczos.hpp
new file mode 100644
index 00000000000..8f506ae133f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/lanczos.hpp
@@ -0,0 +1,1306 @@
+// (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_FUNCTIONS_LANCZOS
+#define BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/limits.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/policies/policy.hpp>
+#include <boost/mpl/less_equal.hpp>
+
+#include <limits.h>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost{ namespace math{ namespace lanczos{
+
+//
+// Individual lanczos approximations start here.
+//
+// Optimal values for G for each N are taken from
+// http://web.mala.bc.ca/pughg/phdThesis/phdThesis.pdf,
+// as are the theoretical error bounds.
+//
+// Constants calculated using the method described by Godfrey
+// http://my.fit.edu/~gabdo/gamma.txt and elaborated by Toth at
+// http://www.rskey.org/gamma.htm using NTL::RR at 1000 bit precision.
+//
+// Begin with a small helper to force initialization of constants prior
+// to main. This makes the constant initialization thread safe, even
+// when called with a user-defined number type.
+//
+template <class Lanczos, class T>
+struct lanczos_initializer
+{
+ struct init
+ {
+ init()
+ {
+ T t(1);
+ Lanczos::lanczos_sum(t);
+ Lanczos::lanczos_sum_expG_scaled(t);
+ Lanczos::lanczos_sum_near_1(t);
+ Lanczos::lanczos_sum_near_2(t);
+ Lanczos::g();
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+template <class Lanczos, class T>
+typename lanczos_initializer<Lanczos, T>::init const lanczos_initializer<Lanczos, T>::initializer;
+//
+// Lanczos Coefficients for N=6 G=5.581
+// Max experimental error (with arbitary precision arithmetic) 9.516e-12
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos6 : public mpl::int_<35>
+{
+ //
+ // Produces slightly better than float precision when evaluated at
+ // double precision:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[6] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 8706.349592549009182288174442774377925882)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 8523.650341121874633477483696775067709735)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 3338.029219476423550899999750161289306564)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 653.6424994294008795995653541449610986791)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 63.99951844938187085666201263218840287667)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.506628274631006311133031631822390264407))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
+ static_cast<boost::uint16_t>(0u),
+ static_cast<boost::uint16_t>(24u),
+ static_cast<boost::uint16_t>(50u),
+ static_cast<boost::uint16_t>(35u),
+ static_cast<boost::uint16_t>(10u),
+ static_cast<boost::uint16_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[6] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 32.81244541029783471623665933780748627823)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 32.12388941444332003446077108933558534361)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 12.58034729455216106950851080138931470954)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.463444478353241423633780693218408889251)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.2412010548258800231126240760264822486599)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.009446967704539249494420221613134244048319))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
+ static_cast<boost::uint16_t>(0u),
+ static_cast<boost::uint16_t>(24u),
+ static_cast<boost::uint16_t>(50u),
+ static_cast<boost::uint16_t>(35u),
+ static_cast<boost::uint16_t>(10u),
+ static_cast<boost::uint16_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[5] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.044879010930422922760429926121241330235)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -2.751366405578505366591317846728753993668)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 1.02282965224225004296750609604264824677)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -0.09786124911582813985028889636665335893627)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.0009829742267506615183144364420540766510112)),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ lanczos_initializer<lanczos6, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[5] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 5.748142489536043490764289256167080091892)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -7.734074268282457156081021756682138251825)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 2.875167944990511006997713242805893543947)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, -0.2750873773533504542306766137703788781776)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 35, 0.002763134585812698552178368447708846850353)),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 5.581000000000000405009359383257105946541; }
+};
+
+//
+// Lanczos Coefficients for N=11 G=10.900511
+// Max experimental error (with arbitary precision arithmetic) 2.16676e-19
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos11 : public mpl::int_<60>
+{
+ //
+ // Produces slightly better than double precision when evaluated at
+ // extended-double precision:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[11] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 38474670393.31776828316099004518914832218)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 36857665043.51950660081971227404959150474)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 15889202453.72942008945006665994637853242)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 4059208354.298834770194507810788393801607)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 680547661.1834733286087695557084801366446)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 78239755.00312005289816041245285376206263)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 6246580.776401795264013335510453568106366)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 341986.3488721347032223777872763188768288)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 12287.19451182455120096222044424100527629)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 261.6140441641668190791708576058805625502)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 2.506628274631000502415573855452633787834))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[11] = {
+ static_cast<boost::uint32_t>(0u),
+ static_cast<boost::uint32_t>(362880u),
+ static_cast<boost::uint32_t>(1026576u),
+ static_cast<boost::uint32_t>(1172700u),
+ static_cast<boost::uint32_t>(723680u),
+ static_cast<boost::uint32_t>(269325u),
+ static_cast<boost::uint32_t>(63273u),
+ static_cast<boost::uint32_t>(9450u),
+ static_cast<boost::uint32_t>(870u),
+ static_cast<boost::uint32_t>(45u),
+ static_cast<boost::uint32_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[11] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 709811.662581657956893540610814842699825)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 679979.847415722640161734319823103390728)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 293136.785721159725251629480984140341656)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 74887.5403291467179935942448101441897121)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 12555.29058241386295096255111537516768137)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 1443.42992444170669746078056942194198252)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 115.2419459613734722083208906727972935065)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 6.30923920573262762719523981992008976989)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.2266840463022436475495508977579735223818)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.004826466289237661857584712046231435101741)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.4624429436045378766270459638520555557321e-4))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[11] = {
+ static_cast<boost::uint32_t>(0u),
+ static_cast<boost::uint32_t>(362880u),
+ static_cast<boost::uint32_t>(1026576u),
+ static_cast<boost::uint32_t>(1172700u),
+ static_cast<boost::uint32_t>(723680u),
+ static_cast<boost::uint32_t>(269325u),
+ static_cast<boost::uint32_t>(63273u),
+ static_cast<boost::uint32_t>(9450u),
+ static_cast<boost::uint32_t>(870u),
+ static_cast<boost::uint32_t>(45u),
+ static_cast<boost::uint32_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[10] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 4.005853070677940377969080796551266387954)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -13.17044315127646469834125159673527183164)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 17.19146865350790353683895137079288129318)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -11.36446409067666626185701599196274701126)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 4.024801119349323770107694133829772634737)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.7445703262078094128346501724255463005006)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.06513861351917497265045550019547857713172)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.00217899958561830354633560009312512312758)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.17655204574495137651670832229571934738e-4)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.1036282091079938047775645941885460820853e-7)),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ lanczos_initializer<lanczos11, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[10] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 19.05889633808148715159575716844556056056)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -62.66183664701721716960978577959655644762)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 81.7929198065004751699057192860287512027)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -54.06941772964234828416072865069196553015)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 19.14904664790693019642068229478769661515)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -3.542488556926667589704590409095331790317)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.3099140334815639910894627700232804503017)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.01036716187296241640634252431913030440825)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, 0.8399926504443119927673843789048514017761e-4)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 60, -0.493038376656195010308610694048822561263e-7)),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 10.90051099999999983936049829935654997826; }
+};
+
+//
+// Lanczos Coefficients for N=13 G=13.144565
+// Max experimental error (with arbitary precision arithmetic) 9.2213e-23
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos13 : public mpl::int_<72>
+{
+ //
+ // Produces slightly better than extended-double precision when evaluated at
+ // higher precision:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[13] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 44012138428004.60895436261759919070125699)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 41590453358593.20051581730723108131357995)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 18013842787117.99677796276038389462742949)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 4728736263475.388896889723995205703970787)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 837910083628.4046470415724300225777912264)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 105583707273.4299344907359855510105321192)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 9701363618.494999493386608345339104922694)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 654914397.5482052641016767125048538245644)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 32238322.94213356530668889463945849409184)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1128514.219497091438040721811544858643121)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 26665.79378459858944762533958798805525125)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 381.8801248632926870394389468349331394196)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 2.506628274631000502415763426076722427007))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
+ static_cast<boost::uint32_t>(0u),
+ static_cast<boost::uint32_t>(39916800u),
+ static_cast<boost::uint32_t>(120543840u),
+ static_cast<boost::uint32_t>(150917976u),
+ static_cast<boost::uint32_t>(105258076u),
+ static_cast<boost::uint32_t>(45995730u),
+ static_cast<boost::uint32_t>(13339535u),
+ static_cast<boost::uint32_t>(2637558u),
+ static_cast<boost::uint32_t>(357423u),
+ static_cast<boost::uint32_t>(32670u),
+ static_cast<boost::uint32_t>(1925u),
+ static_cast<boost::uint32_t>(66u),
+ static_cast<boost::uint32_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[13] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 86091529.53418537217994842267760536134841)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 81354505.17858011242874285785316135398567)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 35236626.38815461910817650960734605416521)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 9249814.988024471294683815872977672237195)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1639024.216687146960253839656643518985826)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 206530.8157641225032631778026076868855623)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 18976.70193530288915698282139308582105936)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1281.068909912559479885759622791374106059)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 63.06093343420234536146194868906771599354)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 2.207470909792527638222674678171050209691)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.05216058694613505427476207805814960742102)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.0007469903808915448316510079585999893674101)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.4903180573459871862552197089738373164184e-5))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
+ static_cast<boost::uint32_t>(0u),
+ static_cast<boost::uint32_t>(39916800u),
+ static_cast<boost::uint32_t>(120543840u),
+ static_cast<boost::uint32_t>(150917976u),
+ static_cast<boost::uint32_t>(105258076u),
+ static_cast<boost::uint32_t>(45995730u),
+ static_cast<boost::uint32_t>(13339535u),
+ static_cast<boost::uint32_t>(2637558u),
+ static_cast<boost::uint32_t>(357423u),
+ static_cast<boost::uint32_t>(32670u),
+ static_cast<boost::uint32_t>(1925u),
+ static_cast<boost::uint32_t>(66u),
+ static_cast<boost::uint32_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[12] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 4.832115561461656947793029596285626840312)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -19.86441536140337740383120735104359034688)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 33.9927422807443239927197864963170585331)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -31.41520692249765980987427413991250886138)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 17.0270866009599345679868972409543597821)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -5.5077216950865501362506920516723682167)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 1.037811741948214855286817963800439373362)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.106640468537356182313660880481398642811)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.005276450526660653288757565778182586742831)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.0001000935625597121545867453746252064770029)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.462590910138598083940803704521211569234e-6)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.1735307814426389420248044907765671743012e-9)),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ lanczos_initializer<lanczos13, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[12] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 26.96979819614830698367887026728396466395)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -110.8705424709385114023884328797900204863)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 189.7258846119231466417015694690434770085)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -175.3397202971107486383321670769397356553)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 95.03437648691551457087250340903980824948)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -30.7406022781665264273675797983497141978)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 5.792405601630517993355102578874590410552)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.5951993240669148697377539518639997795831)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.02944979359164017509944724739946255067671)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.0005586586555377030921194246330399163602684)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, 0.2581888478270733025288922038673392636029e-5)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 72, -0.9685385411006641478305219367315965391289e-9)),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 13.1445650000000000545696821063756942749; }
+};
+
+//
+// Lanczos Coefficients for N=22 G=22.61891
+// Max experimental error (with arbitary precision arithmetic) 2.9524e-38
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos22 : public mpl::int_<120>
+{
+ //
+ // Produces slightly better than 128-bit long-double precision when
+ // evaluated at higher precision:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[22] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 46198410803245094237463011094.12173081986)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 43735859291852324413622037436.321513777)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 19716607234435171720534556386.97481377748)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 5629401471315018442177955161.245623932129)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1142024910634417138386281569.245580222392)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 175048529315951173131586747.695329230778)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 21044290245653709191654675.41581372963167)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2033001410561031998451380.335553678782601)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 160394318862140953773928.8736211601848891)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 10444944438396359705707.48957290388740896)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 565075825801617290121.1466393747967538948)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 25475874292116227538.99448534450411942597)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 957135055846602154.6720835535232270205725)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 29874506304047462.23662392445173880821515)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 769651310384737.2749087590725764959689181)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 16193289100889.15989633624378404096011797)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 273781151680.6807433264462376754578933261)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3630485900.32917021712188739762161583295)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 36374352.05577334277856865691538582936484)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 258945.7742115532455441786924971194951043)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1167.501919472435718934219997431551246996)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2.50662827463100050241576528481104525333))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[22] = {
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2432902008176640000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8752948036761600000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(13803759753640704000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(12870931245150988800, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8037811822645051776, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(3599979517947607200, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1206647803780373360, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(311333643161390640, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(63030812099294896, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(10142299865511450, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307535010540395, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(135585182899530, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(11310276995381, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(756111184500, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(40171771630, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1672280820, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(53327946, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1256850, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(20615, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(210, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[22] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 6939996264376682180.277485395074954356211)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 6570067992110214451.87201438870245659384)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2961859037444440551.986724631496417064121)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 845657339772791245.3541226499766163431651)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 171556737035449095.2475716923888737881837)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 26296059072490867.7822441885603400926007)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3161305619652108.433798300149816829198706)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 305400596026022.4774396904484542582526472)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 24094681058862.55120507202622377623528108)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1569055604375.919477574824168939428328839)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 84886558909.02047889339710230696942513159)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3827024985.166751989686050643579753162298)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 143782298.9273215199098728674282885500522)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 4487794.24541641841336786238909171265944)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 115618.2025760830513505888216285273541959)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 2432.580773108508276957461757328744780439)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 41.12782532742893597168530008461874360191)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.5453771709477689805460179187388702295792)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.005464211062612080347167337964166505282809)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.388992321263586767037090706042788910953e-4)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.1753839324538447655939518484052327068859e-6)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.3765495513732730583386223384116545391759e-9))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[22] = {
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2432902008176640000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8752948036761600000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(13803759753640704000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(12870931245150988800, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8037811822645051776, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(3599979517947607200, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1206647803780373360, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(311333643161390640, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(63030812099294896, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(10142299865511450, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307535010540395, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(135585182899530, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(11310276995381, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(756111184500, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(40171771630, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1672280820, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(53327946, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1256850, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(20615, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(210, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[21] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 8.318998691953337183034781139546384476554)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -63.15415991415959158214140353299240638675)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 217.3108224383632868591462242669081540163)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -448.5134281386108366899784093610397354889)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 619.2903759363285456927248474593012711346)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -604.1630177420625418522025080080444177046)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 428.8166750424646119935047118287362193314)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -224.6988753721310913866347429589434550302)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 87.32181627555510833499451817622786940961)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -25.07866854821128965662498003029199058098)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 5.264398125689025351448861011657789005392)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.792518936256495243383586076579921559914)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.08317448364744713773350272460937904691566)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.005845345166274053157781068150827567998882)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.0002599412126352082483326238522490030412391)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.6748102079670763884917431338234783496303e-5)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.908824383434109002762325095643458603605e-7)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.5299325929309389890892469299969669579725e-9)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.994306085859549890267983602248532869362e-12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.3499893692975262747371544905820891835298e-15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.7260746353663365145454867069182884694961e-20)),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ lanczos_initializer<lanczos22, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[21] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 75.39272007105208086018421070699575462226)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -572.3481967049935412452681346759966390319)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 1969.426202741555335078065370698955484358)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -4064.74968778032030891520063865996757519)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 5612.452614138013929794736248384309574814)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -5475.357667500026172903620177988213902339)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 3886.243614216111328329547926490398103492)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -2036.382026072125407192448069428134470564)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 791.3727954936062108045551843636692287652)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -227.2808432388436552794021219198885223122)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 47.70974355562144229897637024320739257284)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -7.182373807798293545187073539819697141572)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.7537866989631514559601547530490976100468)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.05297470142240154822658739758236594717787)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.00235577330936380542539812701472320434133)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.6115613067659273118098229498679502138802e-4)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.8236417010170941915758315020695551724181e-6)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.4802628430993048190311242611330072198089e-8)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.9011113376981524418952720279739624707342e-11)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, -0.3171854152689711198382455703658589996796e-14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 120, 0.6580207998808093935798753964580596673177e-19)),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 22.61890999999999962710717227309942245483; }
+};
+
+//
+// Lanczos Coefficients for N=6 G=1.428456135094165802001953125
+// Max experimental error (with arbitary precision arithmetic) 8.111667e-8
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos6m24 : public mpl::int_<24>
+{
+ //
+ // Use for float precision, when evaluated as a float:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ static const T num[6] = {
+ static_cast<T>(58.52061591769095910314047740215847630266L),
+ static_cast<T>(182.5248962595894264831189414768236280862L),
+ static_cast<T>(211.0971093028510041839168287718170827259L),
+ static_cast<T>(112.2526547883668146736465390902227161763L),
+ static_cast<T>(27.5192015197455403062503721613097825345L),
+ static_cast<T>(2.50662858515256974113978724717473206342L)
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
+ static_cast<boost::uint16_t>(0u),
+ static_cast<boost::uint16_t>(24u),
+ static_cast<boost::uint16_t>(50u),
+ static_cast<boost::uint16_t>(35u),
+ static_cast<boost::uint16_t>(10u),
+ static_cast<boost::uint16_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ static const T num[6] = {
+ static_cast<T>(14.0261432874996476619570577285003839357L),
+ static_cast<T>(43.74732405540314316089531289293124360129L),
+ static_cast<T>(50.59547402616588964511581430025589038612L),
+ static_cast<T>(26.90456680562548195593733429204228910299L),
+ static_cast<T>(6.595765571169314946316366571954421695196L),
+ static_cast<T>(0.6007854010515290065101128585795542383721L)
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint16_t) denom[6] = {
+ static_cast<boost::uint16_t>(0u),
+ static_cast<boost::uint16_t>(24u),
+ static_cast<boost::uint16_t>(50u),
+ static_cast<boost::uint16_t>(35u),
+ static_cast<boost::uint16_t>(10u),
+ static_cast<boost::uint16_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ static const T d[5] = {
+ static_cast<T>(0.4922488055204602807654354732674868442106L),
+ static_cast<T>(0.004954497451132152436631238060933905650346L),
+ static_cast<T>(-0.003374784572167105840686977985330859371848L),
+ static_cast<T>(0.001924276018962061937026396537786414831385L),
+ static_cast<T>(-0.00056533046336427583708166383712907694434L),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ static const T d[5] = {
+ static_cast<T>(0.6534966888520080645505805298901130485464L),
+ static_cast<T>(0.006577461728560758362509168026049182707101L),
+ static_cast<T>(-0.004480276069269967207178373559014835978161L),
+ static_cast<T>(0.00255461870648818292376982818026706528842L),
+ static_cast<T>(-0.000750517993690428370380996157470900204524L),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 1.428456135094165802001953125; }
+};
+
+//
+// Lanczos Coefficients for N=13 G=6.024680040776729583740234375
+// Max experimental error (with arbitary precision arithmetic) 1.196214e-17
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos13m53 : public mpl::int_<53>
+{
+ //
+ // Use for double precision, when evaluated as a double:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ static const T num[13] = {
+ static_cast<T>(23531376880.41075968857200767445163675473L),
+ static_cast<T>(42919803642.64909876895789904700198885093L),
+ static_cast<T>(35711959237.35566804944018545154716670596L),
+ static_cast<T>(17921034426.03720969991975575445893111267L),
+ static_cast<T>(6039542586.35202800506429164430729792107L),
+ static_cast<T>(1439720407.311721673663223072794912393972L),
+ static_cast<T>(248874557.8620541565114603864132294232163L),
+ static_cast<T>(31426415.58540019438061423162831820536287L),
+ static_cast<T>(2876370.628935372441225409051620849613599L),
+ static_cast<T>(186056.2653952234950402949897160456992822L),
+ static_cast<T>(8071.672002365816210638002902272250613822L),
+ static_cast<T>(210.8242777515793458725097339207133627117L),
+ static_cast<T>(2.506628274631000270164908177133837338626L)
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
+ static_cast<boost::uint32_t>(0u),
+ static_cast<boost::uint32_t>(39916800u),
+ static_cast<boost::uint32_t>(120543840u),
+ static_cast<boost::uint32_t>(150917976u),
+ static_cast<boost::uint32_t>(105258076u),
+ static_cast<boost::uint32_t>(45995730u),
+ static_cast<boost::uint32_t>(13339535u),
+ static_cast<boost::uint32_t>(2637558u),
+ static_cast<boost::uint32_t>(357423u),
+ static_cast<boost::uint32_t>(32670u),
+ static_cast<boost::uint32_t>(1925u),
+ static_cast<boost::uint32_t>(66u),
+ static_cast<boost::uint32_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ static const T num[13] = {
+ static_cast<T>(56906521.91347156388090791033559122686859L),
+ static_cast<T>(103794043.1163445451906271053616070238554L),
+ static_cast<T>(86363131.28813859145546927288977868422342L),
+ static_cast<T>(43338889.32467613834773723740590533316085L),
+ static_cast<T>(14605578.08768506808414169982791359218571L),
+ static_cast<T>(3481712.15498064590882071018964774556468L),
+ static_cast<T>(601859.6171681098786670226533699352302507L),
+ static_cast<T>(75999.29304014542649875303443598909137092L),
+ static_cast<T>(6955.999602515376140356310115515198987526L),
+ static_cast<T>(449.9445569063168119446858607650988409623L),
+ static_cast<T>(19.51992788247617482847860966235652136208L),
+ static_cast<T>(0.5098416655656676188125178644804694509993L),
+ static_cast<T>(0.006061842346248906525783753964555936883222L)
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint32_t) denom[13] = {
+ static_cast<boost::uint32_t>(0u),
+ static_cast<boost::uint32_t>(39916800u),
+ static_cast<boost::uint32_t>(120543840u),
+ static_cast<boost::uint32_t>(150917976u),
+ static_cast<boost::uint32_t>(105258076u),
+ static_cast<boost::uint32_t>(45995730u),
+ static_cast<boost::uint32_t>(13339535u),
+ static_cast<boost::uint32_t>(2637558u),
+ static_cast<boost::uint32_t>(357423u),
+ static_cast<boost::uint32_t>(32670u),
+ static_cast<boost::uint32_t>(1925u),
+ static_cast<boost::uint32_t>(66u),
+ static_cast<boost::uint32_t>(1u)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ static const T d[12] = {
+ static_cast<T>(2.208709979316623790862569924861841433016L),
+ static_cast<T>(-3.327150580651624233553677113928873034916L),
+ static_cast<T>(1.483082862367253753040442933770164111678L),
+ static_cast<T>(-0.1993758927614728757314233026257810172008L),
+ static_cast<T>(0.004785200610085071473880915854204301886437L),
+ static_cast<T>(-0.1515973019871092388943437623825208095123e-5L),
+ static_cast<T>(-0.2752907702903126466004207345038327818713e-7L),
+ static_cast<T>(0.3075580174791348492737947340039992829546e-7L),
+ static_cast<T>(-0.1933117898880828348692541394841204288047e-7L),
+ static_cast<T>(0.8690926181038057039526127422002498960172e-8L),
+ static_cast<T>(-0.2499505151487868335680273909354071938387e-8L),
+ static_cast<T>(0.3394643171893132535170101292240837927725e-9L),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ static const T d[12] = {
+ static_cast<T>(6.565936202082889535528455955485877361223L),
+ static_cast<T>(-9.8907772644920670589288081640128194231L),
+ static_cast<T>(4.408830289125943377923077727900630927902L),
+ static_cast<T>(-0.5926941084905061794445733628891024027949L),
+ static_cast<T>(0.01422519127192419234315002746252160965831L),
+ static_cast<T>(-0.4506604409707170077136555010018549819192e-5L),
+ static_cast<T>(-0.8183698410724358930823737982119474130069e-7L),
+ static_cast<T>(0.9142922068165324132060550591210267992072e-7L),
+ static_cast<T>(-0.5746670642147041587497159649318454348117e-7L),
+ static_cast<T>(0.2583592566524439230844378948704262291927e-7L),
+ static_cast<T>(-0.7430396708998719707642735577238449585822e-8L),
+ static_cast<T>(0.1009141566987569892221439918230042368112e-8L),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 6.024680040776729583740234375; }
+};
+
+//
+// Lanczos Coefficients for N=17 G=12.2252227365970611572265625
+// Max experimental error (with arbitary precision arithmetic) 2.7699e-26
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos17m64 : public mpl::int_<64>
+{
+ //
+ // Use for extended-double precision, when evaluated as an extended-double:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[17] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 553681095419291969.2230556393350368550504)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 731918863887667017.2511276782146694632234)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 453393234285807339.4627124634539085143364)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 174701893724452790.3546219631779712198035)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 46866125995234723.82897281620357050883077)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9281280675933215.169109622777099699054272)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1403600894156674.551057997617468721789536)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 165345984157572.7305349809894046783973837)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 15333629842677.31531822808737907246817024)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1123152927963.956626161137169462874517318)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 64763127437.92329018717775593533620578237)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2908830362.657527782848828237106640944457)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 99764700.56999856729959383751710026787811)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2525791.604886139959837791244686290089331)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 44516.94034970167828580039370201346554872)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 488.0063567520005730476791712814838113252)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.50662827463100050241576877135758834683))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[17] = {
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307674368000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4339163001600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6165817614720, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(5056995703824, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2706813345600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1009672107080, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(272803210680, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(54631129553, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8207628000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(928095740, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(78558480, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4899622, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(218400, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6580, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(120, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[17] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2715894658327.717377557655133124376674911)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3590179526097.912105038525528721129550434)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2223966599737.814969312127353235818710172)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 856940834518.9562481809925866825485883417)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 229885871668.749072933597446453399395469)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 45526171687.54610815813502794395753410032)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 6884887713.165178784550917647709216424823)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 811048596.1407531864760282453852372777439)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 75213915.96540822314499613623119501704812)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5509245.417224265151697527957954952830126)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 317673.5368435419126714931842182369574221)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 14268.27989845035520147014373320337523596)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 489.3618720403263670213909083601787814792)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 12.38941330038454449295883217865458609584)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.2183627389504614963941574507281683147897)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.002393749522058449186690627996063983095463)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1229541408909435212800785616808830746135e-4))
+ };
+ static const BOOST_MATH_INT_TABLE_TYPE(T, boost::uint64_t) denom[17] = {
+ BOOST_MATH_INT_VALUE_SUFFIX(0, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1307674368000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4339163001600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6165817614720, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(5056995703824, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(2706813345600, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1009672107080, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(272803210680, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(54631129553, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(8207628000, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(928095740, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(78558480, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(4899622, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(218400, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(6580, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(120, uLL),
+ BOOST_MATH_INT_VALUE_SUFFIX(1, uLL)
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[16] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.493645054286536365763334986866616581265)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -16.95716370392468543800733966378143997694)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 26.19196892983737527836811770970479846644)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -21.3659076437988814488356323758179283908)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.913992596774556590710751047594507535764)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.62888300018780199210536267080940382158)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.3807056693542503606384861890663080735588)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.02714647489697685807340312061034730486958)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.0007815484715461206757220527133967191796747)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.6108630817371501052576880554048972272435e-5)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.5037380238864836824167713635482801545086e-8)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.1483232144262638814568926925964858237006e-13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1346609158752142460943888149156716841693e-14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.660492688923978805315914918995410340796e-15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.1472114697343266749193617793755763792681e-15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.1410901942033374651613542904678399264447e-16)),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ lanczos_initializer<lanczos17m64, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[16] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 23.56409085052261327114594781581930373708)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -88.92116338946308797946237246006238652361)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 137.3472822086847596961177383569603988797)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -112.0400438263562152489272966461114852861)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 51.98768915202973863076166956576777843805)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -13.78552090862799358221343319574970124948)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.996371068830872830250406773917646121742)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.1423525874909934506274738563671862576161)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.004098338646046865122459664947239111298524)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.3203286637326511000882086573060433529094e-4)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.2641536751640138646146395939004587594407e-7)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.7777876663062235617693516558976641009819e-13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.7061443477097101636871806229515157914789e-14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.3463537849537988455590834887691613484813e-14)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 0.7719578215795234036320348283011129450595e-15)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -0.7398586479708476329563577384044188912075e-16)),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 12.2252227365970611572265625; }
+};
+
+//
+// Lanczos Coefficients for N=24 G=20.3209821879863739013671875
+// Max experimental error (with arbitary precision arithmetic) 1.0541e-38
+// Generated with compiler: Microsoft Visual C++ version 8.0 on Win32 at Mar 23 2006
+//
+struct lanczos24m113 : public mpl::int_<113>
+{
+ //
+ // Use for long-double precision, when evaluated as an long-double:
+ //
+ template <class T>
+ static T lanczos_sum(const T& z)
+ {
+ lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[24] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516))
+ };
+ static const T denom[24] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.112400072777760768e22)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.414847677933545472e22)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6756146673770930688000.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6548684852703068697600.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4280722865357147142912.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2021687376910682741568.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 720308216440924653696.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 199321978221066137360.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 43714229649594412832.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 7707401101297361068.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1103230881185949736.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 129006659818331295.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 12363045847086207.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 971250460939913.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 62382416421941.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3256091103430.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 136717357942.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4546047198.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 116896626.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2240315.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 30107.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 253.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1.0))
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+ template <class T>
+ static T lanczos_sum_expG_scaled(const T& z)
+ {
+ lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T num[24] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8))
+ };
+ static const T denom[24] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.112400072777760768e22)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.414847677933545472e22)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6756146673770930688000.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 6548684852703068697600.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4280722865357147142912.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2021687376910682741568.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 720308216440924653696.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 199321978221066137360.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 43714229649594412832.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 7707401101297361068.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1103230881185949736.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 129006659818331295.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 12363045847086207.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 971250460939913.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 62382416421941.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 3256091103430.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 136717357942.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4546047198.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 116896626.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2240315.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 30107.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 253.0)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1.0))
+ };
+ return boost::math::tools::evaluate_rational(num, denom, z);
+ }
+
+
+ template<class T>
+ static T lanczos_sum_near_1(const T& dz)
+ {
+ lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[23] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26)),
+ };
+ T result = 0;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(k*dz + k*k);
+ }
+ return result;
+ }
+
+ template<class T>
+ static T lanczos_sum_near_2(const T& dz)
+ {
+ lanczos_initializer<lanczos24m113, T>::force_instantiate(); // Ensure our constants get initialized before main()
+ static const T d[23] = {
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, -0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24)),
+ static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 113, 0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25)),
+ };
+ T result = 0;
+ T z = dz + 2;
+ for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k)
+ {
+ result += (-d[k-1]*dz)/(z + k*z + k*k - 1);
+ }
+ return result;
+ }
+
+ static double g(){ return 20.3209821879863739013671875; }
+};
+
+
+//
+// placeholder for no lanczos info available:
+//
+struct undefined_lanczos : public mpl::int_<INT_MAX - 1> { };
+
+#if 0
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#define BOOST_MATH_FLT_DIGITS ::std::numeric_limits<float>::digits
+#define BOOST_MATH_DBL_DIGITS ::std::numeric_limits<double>::digits
+#define BOOST_MATH_LDBL_DIGITS ::std::numeric_limits<long double>::digits
+#else
+#define BOOST_MATH_FLT_DIGITS FLT_MANT_DIG
+#define BOOST_MATH_DBL_DIGITS DBL_MANT_DIG
+#define BOOST_MATH_LDBL_DIGITS LDBL_MANT_DIG
+#endif
+#endif
+
+typedef mpl::list<
+ lanczos6m24,
+/* lanczos6, */
+ lanczos13m53,
+/* lanczos13, */
+ lanczos17m64,
+ lanczos24m113,
+ lanczos22,
+ undefined_lanczos> lanczos_list;
+
+template <class Real, class Policy>
+struct lanczos
+{
+ typedef typename mpl::if_<
+ typename mpl::less_equal<
+ typename policies::precision<Real, Policy>::type,
+ mpl::int_<0>
+ >::type,
+ mpl::int_<INT_MAX - 2>,
+ typename policies::precision<Real, Policy>::type
+ >::type target_precision;
+
+ typedef typename mpl::deref<typename mpl::find_if<
+ lanczos_list,
+ mpl::less_equal<target_precision, mpl::_1> >::type>::type type;
+};
+
+} // namespace lanczos
+} // namespace math
+} // namespace boost
+
+#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__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_MANAGED)
+#include <boost/math/special_functions/detail/lanczos_sse2.hpp>
+#endif
+#endif
+
+#endif // BOOST_MATH_SPECIAL_FUNCTIONS_LANCZOS
+
+
+
+
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/log1p.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/log1p.hpp
new file mode 100644
index 00000000000..04cac4077ae
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/log1p.hpp
@@ -0,0 +1,519 @@
+// (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_LOG1P_INCLUDED
+#define BOOST_MATH_LOG1P_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
+#endif
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <math.h> // platform's ::log1p
+#include <boost/limits.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/math/tools/series.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# include <boost/static_assert.hpp>
+#else
+# include <boost/assert.hpp>
+#endif
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost{ namespace math{
+
+namespace detail
+{
+ // Functor log1p_series returns the next term in the Taylor series
+ // pow(-1, k-1)*pow(x, k) / k
+ // each time that operator() is invoked.
+ //
+ template <class T>
+ struct log1p_series
+ {
+ typedef T result_type;
+
+ log1p_series(T x)
+ : k(0), m_mult(-x), m_prod(-1){}
+
+ T operator()()
+ {
+ m_prod *= m_mult;
+ return m_prod / ++k;
+ }
+
+ int count()const
+ {
+ return k;
+ }
+
+ private:
+ int k;
+ const T m_mult;
+ T m_prod;
+ log1p_series(const log1p_series&);
+ log1p_series& operator=(const log1p_series&);
+ };
+
+// Algorithm log1p is part of C99, but is not yet provided by many compilers.
+//
+// This version uses a Taylor series expansion for 0.5 > x > epsilon, which may
+// require up to std::numeric_limits<T>::digits+1 terms to be calculated.
+// It would be much more efficient to use the equivalence:
+// log(1+x) == (log(1+x) * x) / ((1-x) - 1)
+// Unfortunately many optimizing compilers make such a mess of this, that
+// it performs no better than log(1+x): which is to say not very well at all.
+//
+template <class T, class Policy>
+T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&)
+{ // The function returns the natural logarithm of 1 + x.
+ typedef typename tools::promote_args<T>::type result_type;
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::log1p<%1%>(%1%)";
+
+ if((x < -1) || (boost::math::isnan)(x))
+ return policies::raise_domain_error<T>(
+ function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<T>(
+ function, 0, pol);
+
+ result_type a = abs(result_type(x));
+ if(a > result_type(0.5f))
+ return log(1 + result_type(x));
+ // Note that without numeric_limits specialisation support,
+ // epsilon just returns zero, and our "optimisation" will always fail:
+ if(a < tools::epsilon<result_type>())
+ return x;
+ detail::log1p_series<result_type> s(x);
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
+ result_type result = tools::sum_series(s, policies::get_epsilon<result_type, Policy>(), max_iter);
+#else
+ result_type zero = 0;
+ result_type result = tools::sum_series(s, policies::get_epsilon<result_type, Policy>(), max_iter, zero);
+#endif
+ policies::check_series_iterations<T>(function, max_iter, pol);
+ return result;
+}
+
+template <class T, class Policy>
+T log1p_imp(T const& x, const Policy& pol, const mpl::int_<53>&)
+{ // The function returns the natural logarithm of 1 + x.
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::log1p<%1%>(%1%)";
+
+ if(x < -1)
+ return policies::raise_domain_error<T>(
+ function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<T>(
+ function, 0, pol);
+
+ T a = fabs(x);
+ if(a > 0.5f)
+ return log(1 + x);
+ // Note that without numeric_limits specialisation support,
+ // epsilon just returns zero, and our "optimisation" will always fail:
+ if(a < tools::epsilon<T>())
+ return x;
+
+ // Maximum Deviation Found: 1.846e-017
+ // Expected Error Term: 1.843e-017
+ // Maximum Relative Change in Control Points: 8.138e-004
+ // Max Error found at double precision = 3.250766e-016
+ static const T P[] = {
+ 0.15141069795941984e-16L,
+ 0.35495104378055055e-15L,
+ 0.33333333333332835L,
+ 0.99249063543365859L,
+ 1.1143969784156509L,
+ 0.58052937949269651L,
+ 0.13703234928513215L,
+ 0.011294864812099712L
+ };
+ static const T Q[] = {
+ 1L,
+ 3.7274719063011499L,
+ 5.5387948649720334L,
+ 4.159201143419005L,
+ 1.6423855110312755L,
+ 0.31706251443180914L,
+ 0.022665554431410243L,
+ -0.29252538135177773e-5L
+ };
+
+ T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x);
+ result *= x;
+
+ return result;
+}
+
+template <class T, class Policy>
+T log1p_imp(T const& x, const Policy& pol, const mpl::int_<64>&)
+{ // The function returns the natural logarithm of 1 + x.
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::log1p<%1%>(%1%)";
+
+ if(x < -1)
+ return policies::raise_domain_error<T>(
+ function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<T>(
+ function, 0, pol);
+
+ T a = fabs(x);
+ if(a > 0.5f)
+ return log(1 + x);
+ // Note that without numeric_limits specialisation support,
+ // epsilon just returns zero, and our "optimisation" will always fail:
+ if(a < tools::epsilon<T>())
+ return x;
+
+ // Maximum Deviation Found: 8.089e-20
+ // Expected Error Term: 8.088e-20
+ // Maximum Relative Change in Control Points: 9.648e-05
+ // Max Error found at long double precision = 2.242324e-19
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.807533446680736736712e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.490881544804798926426e-18),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.333333333333333373941),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.17141290782087994162),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.62790522814926264694),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.13156411870766876113),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.408087379932853785336),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0706537026422828914622),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00441709903782239229447)
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.26423872346263928361),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 7.48189472704477708962),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 6.94757016732904280913),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 3.6493508622280767304),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.06884863623790638317),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.158292216998514145947),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00885295524069924328658),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.560026216133415663808e-6)
+ };
+
+ T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x);
+ result *= x;
+
+ return result;
+}
+
+template <class T, class Policy>
+T log1p_imp(T const& x, const Policy& pol, const mpl::int_<24>&)
+{ // The function returns the natural logarithm of 1 + x.
+ BOOST_MATH_STD_USING
+
+ static const char* function = "boost::math::log1p<%1%>(%1%)";
+
+ if(x < -1)
+ return policies::raise_domain_error<T>(
+ function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<T>(
+ function, 0, pol);
+
+ T a = fabs(x);
+ if(a > 0.5f)
+ return log(1 + x);
+ // Note that without numeric_limits specialisation support,
+ // epsilon just returns zero, and our "optimisation" will always fail:
+ if(a < tools::epsilon<T>())
+ return x;
+
+ // Maximum Deviation Found: 6.910e-08
+ // Expected Error Term: 6.910e-08
+ // Maximum Relative Change in Control Points: 2.509e-04
+ // Max Error found at double precision = 6.910422e-08
+ // Max Error found at float precision = 8.357242e-08
+ static const T P[] = {
+ -0.671192866803148236519e-7L,
+ 0.119670999140731844725e-6L,
+ 0.333339469182083148598L,
+ 0.237827183019664122066L
+ };
+ static const T Q[] = {
+ 1L,
+ 1.46348272586988539733L,
+ 0.497859871350117338894L,
+ -0.00471666268910169651936L
+ };
+
+ T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x);
+ result *= x;
+
+ return result;
+}
+
+template <class T, class Policy, class tag>
+struct log1p_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ template <int N>
+ static void do_init(const mpl::int_<N>&){}
+ static void do_init(const mpl::int_<64>&)
+ {
+ boost::math::log1p(static_cast<T>(0.25), 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 log1p_initializer<T, Policy, tag>::init log1p_initializer<T, Policy, tag>::initializer;
+
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type log1p(T x, const Policy&)
+{
+ 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;
+
+ 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
+ mpl::int_<0> // too many bits, use generic version.
+ >::type
+ >::type
+ >::type tag_type;
+
+ detail::log1p_initializer<value_type, forwarding_policy, tag_type>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
+ detail::log1p_imp(static_cast<value_type>(x), forwarding_policy(), tag_type()), "boost::math::log1p<%1%>(%1%)");
+}
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+// These overloads work around a type deduction bug:
+inline float log1p(float z)
+{
+ return log1p<float>(z);
+}
+inline double log1p(double z)
+{
+ return log1p<double>(z);
+}
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+inline long double log1p(long double z)
+{
+ return log1p<long double>(z);
+}
+#endif
+#endif
+
+#ifdef log1p
+# ifndef BOOST_HAS_LOG1P
+# define BOOST_HAS_LOG1P
+# endif
+# undef log1p
+#endif
+
+#if defined(BOOST_HAS_LOG1P) && !(defined(__osf__) && defined(__DECCXX_VER))
+# ifdef BOOST_MATH_USE_C99
+template <class Policy>
+inline float log1p(float x, const Policy& pol)
+{
+ if(x < -1)
+ return policies::raise_domain_error<float>(
+ "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<float>(
+ "log1p<%1%>(%1%)", 0, pol);
+ return ::log1pf(x);
+}
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template <class Policy>
+inline long double log1p(long double x, const Policy& pol)
+{
+ if(x < -1)
+ return policies::raise_domain_error<long double>(
+ "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<long double>(
+ "log1p<%1%>(%1%)", 0, pol);
+ return ::log1pl(x);
+}
+#endif
+#else
+template <class Policy>
+inline float log1p(float x, const Policy& pol)
+{
+ if(x < -1)
+ return policies::raise_domain_error<float>(
+ "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<float>(
+ "log1p<%1%>(%1%)", 0, pol);
+ return ::log1p(x);
+}
+#endif
+template <class Policy>
+inline double log1p(double x, const Policy& pol)
+{
+ if(x < -1)
+ return policies::raise_domain_error<double>(
+ "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<double>(
+ "log1p<%1%>(%1%)", 0, pol);
+ return ::log1p(x);
+}
+#elif defined(_MSC_VER) && (BOOST_MSVC >= 1400)
+//
+// You should only enable this branch if you are absolutely sure
+// that your compilers optimizer won't mess this code up!!
+// Currently tested with VC8 and Intel 9.1.
+//
+template <class Policy>
+inline double log1p(double x, const Policy& pol)
+{
+ if(x < -1)
+ return policies::raise_domain_error<double>(
+ "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<double>(
+ "log1p<%1%>(%1%)", 0, pol);
+ double u = 1+x;
+ if(u == 1.0)
+ return x;
+ else
+ return ::log(u)*(x/(u-1.0));
+}
+template <class Policy>
+inline float log1p(float x, const Policy& pol)
+{
+ return static_cast<float>(boost::math::log1p(static_cast<double>(x), pol));
+}
+#ifndef _WIN32_WCE
+//
+// For some reason this fails to compile under WinCE...
+// Needs more investigation.
+//
+template <class Policy>
+inline long double log1p(long double x, const Policy& pol)
+{
+ if(x < -1)
+ return policies::raise_domain_error<long double>(
+ "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<long double>(
+ "log1p<%1%>(%1%)", 0, pol);
+ long double u = 1+x;
+ if(u == 1.0)
+ return x;
+ else
+ return ::logl(u)*(x/(u-1.0));
+}
+#endif
+#endif
+
+template <class T>
+inline typename tools::promote_args<T>::type log1p(T x)
+{
+ return boost::math::log1p(x, policies::policy<>());
+}
+//
+// Compute log(1+x)-x:
+//
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type
+ log1pmx(T x, const Policy& pol)
+{
+ typedef typename tools::promote_args<T>::type result_type;
+ BOOST_MATH_STD_USING
+ static const char* function = "boost::math::log1pmx<%1%>(%1%)";
+
+ if(x < -1)
+ return policies::raise_domain_error<T>(
+ function, "log1pmx(x) requires x > -1, but got x = %1%.", x, pol);
+ if(x == -1)
+ return -policies::raise_overflow_error<T>(
+ function, 0, pol);
+
+ result_type a = abs(result_type(x));
+ if(a > result_type(0.95f))
+ return log(1 + result_type(x)) - result_type(x);
+ // Note that without numeric_limits specialisation support,
+ // epsilon just returns zero, and our "optimisation" will always fail:
+ if(a < tools::epsilon<result_type>())
+ return -x * x / 2;
+ boost::math::detail::log1p_series<T> s(x);
+ s();
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ T zero = 0;
+ T result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, zero);
+#else
+ T result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter);
+#endif
+ policies::check_series_iterations<T>(function, max_iter, pol);
+ return result;
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type log1pmx(T x)
+{
+ return log1pmx(x, policies::policy<>());
+}
+
+} // namespace math
+} // namespace boost
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MATH_LOG1P_INCLUDED
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/math_fwd.hpp
index 795620b4ed7..795620b4ed7 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/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.70.0/boost/math/special_functions/next.hpp
index e27bf0ed958..e27bf0ed958 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/next.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/next.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/pow.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/pow.hpp
index 494f721d058..494f721d058 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/pow.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/pow.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/powm1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/powm1.hpp
index 37db8746c8a..37db8746c8a 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/powm1.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/powm1.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/round.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/round.hpp
new file mode 100644
index 00000000000..71439a6f6bd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/round.hpp
@@ -0,0 +1,132 @@
+// 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_ROUND_HPP
+#define BOOST_MATH_ROUND_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/config.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/special_functions/math_fwd.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 round(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::round<%1%>(%1%)", 0, static_cast<result_type>(v), static_cast<result_type>(v), pol);
+ //
+ // The logic here is rather convoluted, but avoids a number of traps,
+ // see discussion here https://github.com/boostorg/math/pull/8
+ //
+ if (-0.5 < v && v < 0.5)
+ {
+ // special case to avoid rounding error on the direct
+ // predecessor of +0.5 resp. the direct successor of -0.5 in
+ // IEEE floating point types
+ return static_cast<result_type>(0);
+ }
+ else if (v > 0)
+ {
+ // subtract v from ceil(v) first in order to avoid rounding
+ // errors on largest representable integer numbers
+ result_type c(ceil(v));
+ return 0.5 < c - v ? c - 1 : c;
+ }
+ else
+ {
+ // see former branch
+ result_type f(floor(v));
+ return 0.5 < v - f ? f + 1 : f;
+ }
+}
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type round(const T& v, const Policy&, const mpl::true_)
+{
+ return v;
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type round(const T& v, const Policy& pol)
+{
+ return detail::round(v, pol, mpl::bool_<detail::is_integer_for_rounding<T>::value>());
+}
+template <class T>
+inline typename tools::promote_args<T>::type round(const T& v)
+{
+ return round(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 iround(const T& v, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ T r = boost::math::round(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::iround<%1%>(%1%)", 0, v, 0, pol));
+ return static_cast<int>(r);
+}
+template <class T>
+inline int iround(const T& v)
+{
+ return iround(v, policies::policy<>());
+}
+
+template <class T, class Policy>
+inline long lround(const T& v, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ T r = boost::math::round(v, pol);
+ if((r > (std::numeric_limits<long>::max)()) || (r < (std::numeric_limits<long>::min)()))
+ return static_cast<long int>(policies::raise_rounding_error("boost::math::lround<%1%>(%1%)", 0, v, 0L, pol));
+ return static_cast<long int>(r);
+}
+template <class T>
+inline long lround(const T& v)
+{
+ return lround(v, policies::policy<>());
+}
+
+#ifdef BOOST_HAS_LONG_LONG
+
+template <class T, class Policy>
+inline boost::long_long_type llround(const T& v, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ T r = boost::math::round(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::llround<%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 llround(const T& v)
+{
+ return llround(v, policies::policy<>());
+}
+
+#endif
+
+}} // namespaces
+
+#endif // BOOST_MATH_ROUND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/sign.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/sign.hpp
index 5cb21bac54a..5cb21bac54a 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/sign.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/sign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/sin_pi.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/sin_pi.hpp
index ae6b3e74423..ae6b3e74423 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/sin_pi.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/sin_pi.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/sinc.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/sinc.hpp
index 131e985fd9f..131e985fd9f 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/sinc.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/sinc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/sqrt1pm1.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/sqrt1pm1.hpp
index 293a9d97b31..293a9d97b31 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/sqrt1pm1.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/special_functions/trunc.hpp
index 8a7b042449f..8a7b042449f 100644
--- a/src/third_party/boost-1.69.0/boost/math/special_functions/trunc.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/trunc.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/special_functions/zeta.hpp b/src/third_party/boost-1.70.0/boost/math/special_functions/zeta.hpp
new file mode 100644
index 00000000000..b8554f2b0b4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/special_functions/zeta.hpp
@@ -0,0 +1,1110 @@
+// Copyright John Maddock 2007, 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)
+
+#ifndef BOOST_MATH_ZETA_HPP
+#define BOOST_MATH_ZETA_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/tools/series.hpp>
+#include <boost/math/tools/big_constant.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/special_functions/factorials.hpp>
+#include <boost/math/special_functions/sin_pi.hpp>
+
+#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
+//
+// This is the only way we can avoid
+// warning: non-standard suffix on floating constant [-Wpedantic]
+// when building with -Wall -pedantic. Neither __extension__
+// nor #pragma dianostic ignored work :(
+//
+#pragma GCC system_header
+#endif
+
+namespace boost{ namespace math{ namespace detail{
+
+#if 0
+//
+// This code is commented out because we have a better more rapidly converging series
+// now. Retained for future reference and in case the new code causes any issues down the line....
+//
+
+template <class T, class Policy>
+struct zeta_series_cache_size
+{
+ //
+ // Work how large to make our cache size when evaluating the series
+ // evaluation: normally this is just large enough for the series
+ // to have converged, but for arbitrary precision types we need a
+ // really large cache to achieve reasonable precision in a reasonable
+ // time. This is important when constructing rational approximations
+ // to zeta for example.
+ //
+ typedef typename boost::math::policies::precision<T,Policy>::type precision_type;
+ typedef typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::int_<5000>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::int_<70>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<113> >,
+ mpl::int_<100>,
+ mpl::int_<5000>
+ >::type
+ >::type
+ >::type type;
+};
+
+template <class T, class Policy>
+T zeta_series_imp(T s, T sc, const Policy&)
+{
+ //
+ // Series evaluation from:
+ // Havil, J. Gamma: Exploring Euler's Constant.
+ // Princeton, NJ: Princeton University Press, 2003.
+ //
+ // See also http://mathworld.wolfram.com/RiemannZetaFunction.html
+ //
+ BOOST_MATH_STD_USING
+ T sum = 0;
+ T mult = 0.5;
+ T change;
+ typedef typename zeta_series_cache_size<T,Policy>::type cache_size;
+ T powers[cache_size::value] = { 0, };
+ unsigned n = 0;
+ do{
+ T binom = -static_cast<T>(n);
+ T nested_sum = 1;
+ if(n < sizeof(powers) / sizeof(powers[0]))
+ powers[n] = pow(static_cast<T>(n + 1), -s);
+ for(unsigned k = 1; k <= n; ++k)
+ {
+ T p;
+ if(k < sizeof(powers) / sizeof(powers[0]))
+ {
+ p = powers[k];
+ //p = pow(k + 1, -s);
+ }
+ else
+ p = pow(static_cast<T>(k + 1), -s);
+ nested_sum += binom * p;
+ binom *= (k - static_cast<T>(n)) / (k + 1);
+ }
+ change = mult * nested_sum;
+ sum += change;
+ mult /= 2;
+ ++n;
+ }while(fabs(change / sum) > tools::epsilon<T>());
+
+ return sum * 1 / -boost::math::powm1(T(2), sc);
+}
+
+//
+// Classical p-series:
+//
+template <class T>
+struct zeta_series2
+{
+ typedef T result_type;
+ zeta_series2(T _s) : s(-_s), k(1){}
+ T operator()()
+ {
+ BOOST_MATH_STD_USING
+ return pow(static_cast<T>(k++), s);
+ }
+private:
+ T s;
+ unsigned k;
+};
+
+template <class T, class Policy>
+inline T zeta_series2_imp(T s, const Policy& pol)
+{
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();;
+ zeta_series2<T> f(s);
+ T result = tools::sum_series(
+ f,
+ policies::get_epsilon<T, Policy>(),
+ max_iter);
+ policies::check_series_iterations<T>("boost::math::zeta_series2<%1%>(%1%)", max_iter, pol);
+ return result;
+}
+#endif
+
+template <class T, class Policy>
+T zeta_polynomial_series(T s, T sc, Policy const &)
+{
+ //
+ // This is algorithm 3 from:
+ //
+ // "An Efficient Algorithm for the Riemann Zeta Function", P. Borwein,
+ // Canadian Mathematical Society, Conference Proceedings.
+ // See: http://www.cecm.sfu.ca/personal/pborwein/PAPERS/P155.pdf
+ //
+ BOOST_MATH_STD_USING
+ int n = itrunc(T(log(boost::math::tools::epsilon<T>()) / -2));
+ 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 * (-powm1(T(2), sc)));
+}
+
+template <class T, class Policy>
+T zeta_imp_prec(T s, T sc, const Policy& pol, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING
+ T result;
+ if(s >= policies::digits<T, Policy>())
+ return 1;
+ result = zeta_polynomial_series(s, sc, pol);
+#if 0
+ // Old code archived for future reference:
+
+ //
+ // Only use power series if it will converge in 100
+ // iterations or less: the more iterations it consumes
+ // the slower convergence becomes so we have to be very
+ // careful in it's usage.
+ //
+ if (s > -log(tools::epsilon<T>()) / 4.5)
+ result = detail::zeta_series2_imp(s, pol);
+ else
+ result = detail::zeta_series_imp(s, sc, pol);
+#endif
+ return result;
+}
+
+template <class T, class Policy>
+inline T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<53>&)
+{
+ BOOST_MATH_STD_USING
+ T result;
+ if(s < 1)
+ {
+ // Rational Approximation
+ // Maximum Deviation Found: 2.020e-18
+ // Expected Error Term: -2.020e-18
+ // Max error found at double precision: 3.994987e-17
+ static const T P[6] = {
+ static_cast<T>(0.24339294433593750202L),
+ static_cast<T>(-0.49092470516353571651L),
+ static_cast<T>(0.0557616214776046784287L),
+ static_cast<T>(-0.00320912498879085894856L),
+ static_cast<T>(0.000451534528645796438704L),
+ static_cast<T>(-0.933241270357061460782e-5L),
+ };
+ static const T Q[6] = {
+ static_cast<T>(1L),
+ static_cast<T>(-0.279960334310344432495L),
+ static_cast<T>(0.0419676223309986037706L),
+ static_cast<T>(-0.00413421406552171059003L),
+ static_cast<T>(0.00024978985622317935355L),
+ static_cast<T>(-0.101855788418564031874e-4L),
+ };
+ result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc);
+ result -= 1.2433929443359375F;
+ result += (sc);
+ result /= (sc);
+ }
+ else if(s <= 2)
+ {
+ // Maximum Deviation Found: 9.007e-20
+ // Expected Error Term: 9.007e-20
+ static const T P[6] = {
+ static_cast<T>(0.577215664901532860516L),
+ static_cast<T>(0.243210646940107164097L),
+ static_cast<T>(0.0417364673988216497593L),
+ static_cast<T>(0.00390252087072843288378L),
+ static_cast<T>(0.000249606367151877175456L),
+ static_cast<T>(0.110108440976732897969e-4L),
+ };
+ static const T Q[6] = {
+ static_cast<T>(1.0),
+ static_cast<T>(0.295201277126631761737L),
+ static_cast<T>(0.043460910607305495864L),
+ static_cast<T>(0.00434930582085826330659L),
+ static_cast<T>(0.000255784226140488490982L),
+ static_cast<T>(0.10991819782396112081e-4L),
+ };
+ result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
+ result += 1 / (-sc);
+ }
+ else if(s <= 4)
+ {
+ // Maximum Deviation Found: 5.946e-22
+ // Expected Error Term: -5.946e-22
+ static const float Y = 0.6986598968505859375;
+ static const T P[6] = {
+ static_cast<T>(-0.0537258300023595030676L),
+ static_cast<T>(0.0445163473292365591906L),
+ static_cast<T>(0.0128677673534519952905L),
+ static_cast<T>(0.00097541770457391752726L),
+ static_cast<T>(0.769875101573654070925e-4L),
+ static_cast<T>(0.328032510000383084155e-5L),
+ };
+ static const T Q[7] = {
+ 1.0f,
+ static_cast<T>(0.33383194553034051422L),
+ static_cast<T>(0.0487798431291407621462L),
+ static_cast<T>(0.00479039708573558490716L),
+ static_cast<T>(0.000270776703956336357707L),
+ static_cast<T>(0.106951867532057341359e-4L),
+ static_cast<T>(0.236276623974978646399e-7L),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
+ result += Y + 1 / (-sc);
+ }
+ else if(s <= 7)
+ {
+ // Maximum Deviation Found: 2.955e-17
+ // Expected Error Term: 2.955e-17
+ // Max error found at double precision: 2.009135e-16
+
+ static const T P[6] = {
+ static_cast<T>(-2.49710190602259410021L),
+ static_cast<T>(-2.60013301809475665334L),
+ static_cast<T>(-0.939260435377109939261L),
+ static_cast<T>(-0.138448617995741530935L),
+ static_cast<T>(-0.00701721240549802377623L),
+ static_cast<T>(-0.229257310594893932383e-4L),
+ };
+ static const T Q[9] = {
+ 1.0f,
+ static_cast<T>(0.706039025937745133628L),
+ static_cast<T>(0.15739599649558626358L),
+ static_cast<T>(0.0106117950976845084417L),
+ static_cast<T>(-0.36910273311764618902e-4L),
+ static_cast<T>(0.493409563927590008943e-5L),
+ static_cast<T>(-0.234055487025287216506e-6L),
+ static_cast<T>(0.718833729365459760664e-8L),
+ static_cast<T>(-0.1129200113474947419e-9L),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
+ result = 1 + exp(result);
+ }
+ else if(s < 15)
+ {
+ // Maximum Deviation Found: 7.117e-16
+ // Expected Error Term: 7.117e-16
+ // Max error found at double precision: 9.387771e-16
+ static const T P[7] = {
+ static_cast<T>(-4.78558028495135619286L),
+ static_cast<T>(-1.89197364881972536382L),
+ static_cast<T>(-0.211407134874412820099L),
+ static_cast<T>(-0.000189204758260076688518L),
+ static_cast<T>(0.00115140923889178742086L),
+ static_cast<T>(0.639949204213164496988e-4L),
+ static_cast<T>(0.139348932445324888343e-5L),
+ };
+ static const T Q[9] = {
+ 1.0f,
+ static_cast<T>(0.244345337378188557777L),
+ static_cast<T>(0.00873370754492288653669L),
+ static_cast<T>(-0.00117592765334434471562L),
+ static_cast<T>(-0.743743682899933180415e-4L),
+ static_cast<T>(-0.21750464515767984778e-5L),
+ static_cast<T>(0.471001264003076486547e-8L),
+ static_cast<T>(-0.833378440625385520576e-10L),
+ static_cast<T>(0.699841545204845636531e-12L),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7));
+ result = 1 + exp(result);
+ }
+ else if(s < 36)
+ {
+ // Max error in interpolated form: 1.668e-17
+ // Max error found at long double precision: 1.669714e-17
+ static const T P[8] = {
+ static_cast<T>(-10.3948950573308896825L),
+ static_cast<T>(-2.85827219671106697179L),
+ static_cast<T>(-0.347728266539245787271L),
+ static_cast<T>(-0.0251156064655346341766L),
+ static_cast<T>(-0.00119459173416968685689L),
+ static_cast<T>(-0.382529323507967522614e-4L),
+ static_cast<T>(-0.785523633796723466968e-6L),
+ static_cast<T>(-0.821465709095465524192e-8L),
+ };
+ static const T Q[10] = {
+ 1.0f,
+ static_cast<T>(0.208196333572671890965L),
+ static_cast<T>(0.0195687657317205033485L),
+ static_cast<T>(0.00111079638102485921877L),
+ static_cast<T>(0.408507746266039256231e-4L),
+ static_cast<T>(0.955561123065693483991e-6L),
+ static_cast<T>(0.118507153474022900583e-7L),
+ static_cast<T>(0.222609483627352615142e-14L),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15));
+ result = 1 + exp(result);
+ }
+ else if(s < 56)
+ {
+ result = 1 + pow(T(2), -s);
+ }
+ else
+ {
+ result = 1;
+ }
+ return result;
+}
+
+template <class T, class Policy>
+T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<64>&)
+{
+ BOOST_MATH_STD_USING
+ T result;
+ if(s < 1)
+ {
+ // Rational Approximation
+ // Maximum Deviation Found: 3.099e-20
+ // Expected Error Term: 3.099e-20
+ // Max error found at long double precision: 5.890498e-20
+ static const T P[6] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.243392944335937499969),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.496837806864865688082),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0680008039723709987107),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00511620413006619942112),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000455369899250053003335),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.279496685273033761927e-4),
+ };
+ static const T Q[7] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.30425480068225790522),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.050052748580371598736),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00519355671064700627862),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000360623385771198350257),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.159600883054550987633e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.339770279812410586032e-6),
+ };
+ result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc);
+ result -= 1.2433929443359375F;
+ result += (sc);
+ result /= (sc);
+ }
+ else if(s <= 2)
+ {
+ // Maximum Deviation Found: 1.059e-21
+ // Expected Error Term: 1.059e-21
+ // Max error found at long double precision: 1.626303e-19
+
+ static const T P[6] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.577215664901532860605),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.222537368917162139445),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0356286324033215682729),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00304465292366350081446),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000178102511649069421904),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.700867470265983665042e-5),
+ };
+ static const T Q[7] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.259385759149531030085),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0373974962106091316854),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00332735159183332820617),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000188690420706998606469),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.635994377921861930071e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.226583954978371199405e-7),
+ };
+ result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
+ result += 1 / (-sc);
+ }
+ else if(s <= 4)
+ {
+ // Maximum Deviation Found: 5.946e-22
+ // Expected Error Term: -5.946e-22
+ static const float Y = 0.6986598968505859375;
+ static const T P[7] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.053725830002359501027),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0470551187571475844778),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0101339410415759517471),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00100240326666092854528),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.685027119098122814867e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.390972820219765942117e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.540319769113543934483e-7),
+ };
+ static const T Q[8] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.286577739726542730421),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0447355811517733225843),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00430125107610252363302),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000284956969089786662045),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.116188101609848411329e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.278090318191657278204e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.19683620233222028478e-8),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
+ result += Y + 1 / (-sc);
+ }
+ else if(s <= 7)
+ {
+ // Max error found at long double precision: 8.132216e-19
+ static const T P[8] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.49710190602259407065),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.36664913245960625334),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -1.77180020623777595452),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.464717885249654313933),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0643694921293579472583),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00464265386202805715487),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000165556579779704340166),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.252884970740994069582e-5),
+ };
+ static const T Q[9] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.01300131390690459085),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.387898115758643503827),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0695071490045701135188),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00586908595251442839291),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000217752974064612188616),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.397626583349419011731e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.927884739284359700764e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.119810501805618894381e-9),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
+ result = 1 + exp(result);
+ }
+ else if(s < 15)
+ {
+ // Max error in interpolated form: 1.133e-18
+ // Max error found at long double precision: 2.183198e-18
+ static const T P[9] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -4.78558028495135548083),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -3.23873322238609358947),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.892338582881021799922),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.131326296217965913809),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0115651591773783712996),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000657728968362695775205),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.252051328129449973047e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.626503445372641798925e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.815696314790853893484e-8),
+ };
+ static const T Q[9] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.525765665400123515036),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.10852641753657122787),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0115669945375362045249),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000732896513858274091966),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.30683952282420248448e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.819649214609633126119e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.117957556472335968146e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.193432300973017671137e-12),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7));
+ result = 1 + exp(result);
+ }
+ else if(s < 42)
+ {
+ // Max error in interpolated form: 1.668e-17
+ // Max error found at long double precision: 1.669714e-17
+ static const T P[9] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -10.3948950573308861781),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -2.82646012777913950108),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.342144362739570333665),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0249285145498722647472),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00122493108848097114118),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.423055371192592850196e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.1025215577185967488e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.165096762663509467061e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.145392555873022044329e-9),
+ };
+ static const T Q[10] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.205135978585281988052),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0192359357875879453602),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00111496452029715514119),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.434928449016693986857e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.116911068726610725891e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.206704342290235237475e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.209772836100827647474e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.939798249922234703384e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.264584017421245080294e-18),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15));
+ result = 1 + exp(result);
+ }
+ else if(s < 63)
+ {
+ result = 1 + pow(T(2), -s);
+ }
+ else
+ {
+ result = 1;
+ }
+ return result;
+}
+
+template <class T, class Policy>
+T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<113>&)
+{
+ BOOST_MATH_STD_USING
+ T result;
+ if(s < 1)
+ {
+ // Rational Approximation
+ // Maximum Deviation Found: 9.493e-37
+ // Expected Error Term: 9.492e-37
+ // Max error found at long double precision: 7.281332e-31
+
+ static const T P[10] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0353008629988648122808504280990313668),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0107795651204927743049369868548706909),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000523961870530500751114866884685172975),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.661805838304910731947595897966487515e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.658932670403818558510656304189164638e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.103437265642266106533814021041010453e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.116818787212666457105375746642927737e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.660690993901506912123512551294239036e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.113103113698388531428914333768142527e-10),
+ };
+ static const T Q[11] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.387483472099602327112637481818565459),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0802265315091063135271497708694776875),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0110727276164171919280036408995078164),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00112552716946286252000434849173787243),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.874554160748626916455655180296834352e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.530097847491828379568636739662278322e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.248461553590496154705565904497247452e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.881834921354014787309644951507523899e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.217062446168217797598596496310953025e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.315823200002384492377987848307151168e-11),
+ };
+ result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc);
+ result += (sc);
+ result /= (sc);
+ }
+ else if(s <= 2)
+ {
+ // Maximum Deviation Found: 1.616e-37
+ // Expected Error Term: -1.615e-37
+
+ static const T P[10] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.577215664901532860606512090082402431),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.255597968739771510415479842335906308),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0494056503552807274142218876983542205),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00551372778611700965268920983472292325),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00043667616723970574871427830895192731),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.268562259154821957743669387915239528e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.109249633923016310141743084480436612e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.273895554345300227466534378753023924e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.583103205551702720149237384027795038e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.835774625259919268768735944711219256e-11),
+ };
+ static const T Q[11] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.316661751179735502065583176348292881),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0540401806533507064453851182728635272),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00598621274107420237785899476374043797),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000474907812321704156213038740142079615),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.272125421722314389581695715835862418e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.112649552156479800925522445229212933e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.301838975502992622733000078063330461e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.422960728687211282539769943184270106e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.377105263588822468076813329270698909e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.581926559304525152432462127383600681e-13),
+ };
+ result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc));
+ result += 1 / (-sc);
+ }
+ else if(s <= 4)
+ {
+ // Maximum Deviation Found: 1.891e-36
+ // Expected Error Term: -1.891e-36
+ // Max error found: 2.171527e-35
+
+ static const float Y = 0.6986598968505859375;
+ static const T P[11] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0537258300023595010275848333539748089),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0429086930802630159457448174466342553),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0136148228754303412510213395034056857),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00190231601036042925183751238033763915),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000186880390916311438818302549192456581),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.145347370745893262394287982691323657e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.805843276446813106414036600485884885e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.340818159286739137503297172091882574e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.115762357488748996526167305116837246e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.231904754577648077579913403645767214e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.340169592866058506675897646629036044e-12),
+ };
+ static const T Q[12] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.363755247765087100018556983050520554),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0696581979014242539385695131258321598),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00882208914484611029571547753782014817),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000815405623261946661762236085660996718),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.571366167062457197282642344940445452e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.309278269271853502353954062051797838e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.12822982083479010834070516053794262e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.397876357325018976733953479182110033e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.8484432107648683277598472295289279e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.105677416606909614301995218444080615e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.547223964564003701979951154093005354e-15),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2));
+ result += Y + 1 / (-sc);
+ }
+ else if(s <= 6)
+ {
+ // Max error in interpolated form: 1.510e-37
+ // Max error found at long double precision: 2.769266e-34
+
+ static const T Y = 3.28348541259765625F;
+
+ static const T P[13] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.786383506575062179339611614117697622),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.495766593395271370974685959652073976),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.409116737851754766422360889037532228),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.57340744006238263817895456842655987),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.280479899797421910694892949057963111),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0753148409447590257157585696212649869),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0122934003684672788499099362823748632),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00126148398446193639247961370266962927),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.828465038179772939844657040917364896e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.361008916706050977143208468690645684e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.109879825497910544424797771195928112e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.214539416789686920918063075528797059e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.15090220092460596872172844424267351e-10),
+ };
+ static const T Q[14] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.69490865837142338462982225731926485),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.22697696630994080733321401255942464),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.495409420862526540074366618006341533),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.122368084916843823462872905024259633),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0191412993625268971656513890888208623),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00191401538628980617753082598351559642),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000123318142456272424148930280876444459),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.531945488232526067889835342277595709e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.161843184071894368337068779669116236e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.305796079600152506743828859577462778e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.233582592298450202680170811044408894e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.275363878344548055574209713637734269e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.221564186807357535475441900517843892e-15),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4));
+ result -= Y;
+ result = 1 + exp(result);
+ }
+ else if(s < 10)
+ {
+ // Max error in interpolated form: 1.999e-34
+ // Max error found at long double precision: 2.156186e-33
+
+ static const T P[13] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.0545627381873738086704293881227365),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.70088348734699134347906176097717782),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -2.36921550900925512951976617607678789),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.684322583796369508367726293719322866),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.126026534540165129870721937592996324),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.015636903921778316147260572008619549),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00135442294754728549644376325814460807),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.842793965853572134365031384646117061e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.385602133791111663372015460784978351e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.130458500394692067189883214401478539e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.315861074947230418778143153383660035e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.500334720512030826996373077844707164e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.420204769185233365849253969097184005e-12),
+ };
+ static const T Q[14] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.97663511666410096104783358493318814),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.40878780231201806504987368939673249),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0963890666609396058945084107597727252),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0142207619090854604824116070866614505),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00139010220902667918476773423995750877),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.940669540194694997889636696089994734e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.458220848507517004399292480807026602e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.16345521617741789012782420625435495e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.414007452533083304371566316901024114e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.68701473543366328016953742622661377e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.603461891080716585087883971886075863e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.294670713571839023181857795866134957e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.147003914536437243143096875069813451e-18),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 6)) / tools::evaluate_polynomial(Q, T(s - 6));
+ result = 1 + exp(result);
+ }
+ else if(s < 17)
+ {
+ // Max error in interpolated form: 1.641e-32
+ // Max error found at long double precision: 1.696121e-32
+ static const T P[13] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -6.91319491921722925920883787894829678),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -3.65491257639481960248690596951049048),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.813557553449954526442644544105257881),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0994317301685870959473658713841138083),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00726896610245676520248617014211734906),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000317253318715075854811266230916762929),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.66851422826636750855184211580127133e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.879464154730985406003332577806849971e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.113838903158254250631678791998294628e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.379184410304927316385211327537817583e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.612992858643904887150527613446403867e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.347873737198164757035457841688594788e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.289187187441625868404494665572279364e-15),
+ };
+ static const T Q[14] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.427310044448071818775721584949868806),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.074602514873055756201435421385243062),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00688651562174480772901425121653945942),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000360174847635115036351323894321880445),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.973556847713307543918865405758248777e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.853455848314516117964634714780874197e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.118203513654855112421673192194622826e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.462521662511754117095006543363328159e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.834212591919475633107355719369463143e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.5354594751002702935740220218582929e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.406451690742991192964889603000756203e-15),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.887948682401000153828241615760146728e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.34980761098820347103967203948619072e-21),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 10)) / tools::evaluate_polynomial(Q, T(s - 10));
+ result = 1 + exp(result);
+ }
+ else if(s < 30)
+ {
+ // Max error in interpolated form: 1.563e-31
+ // Max error found at long double precision: 1.562725e-31
+
+ static const T P[13] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -11.7824798233959252791987402769438322),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.36131215284987731928174218354118102),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.732260980060982349410898496846972204),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0744985185694913074484248803015717388),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00517228281320594683022294996292250527),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000260897206152101522569969046299309939),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.989553462123121764865178453128769948e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.286916799741891410827712096608826167e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.637262477796046963617949532211619729e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.106796831465628373325491288787760494e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.129343095511091870860498356205376823e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.102397936697965977221267881716672084e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.402663128248642002351627980255756363e-16),
+ };
+ static const T Q[14] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.311288325355705609096155335186466508),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0438318468940415543546769437752132748),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00374396349183199548610264222242269536),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000218707451200585197339671707189281302),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.927578767487930747532953583797351219e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.294145760625753561951137473484889639e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.704618586690874460082739479535985395e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.126333332872897336219649130062221257e-9),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.16317315713773503718315435769352765e-11),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.137846712823719515148344938160275695e-13),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.580975420554224366450994232723910583e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.291354445847552426900293580511392459e-22),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.73614324724785855925025452085443636e-25),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 17)) / tools::evaluate_polynomial(Q, T(s - 17));
+ result = 1 + exp(result);
+ }
+ else if(s < 74)
+ {
+ // Max error in interpolated form: 2.311e-27
+ // Max error found at long double precision: 2.297544e-27
+ static const T P[14] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -20.7944102007844314586649688802236072),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -4.95759941987499442499908748130192187),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.563290752832461751889194629200298688),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0406197001137935911912457120706122877),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0020846534789473022216888863613422293),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.808095978462109173749395599401375667e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.244706022206249301640890603610060959e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.589477682919645930544382616501666572e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.113699573675553496343617442433027672e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.174767860183598149649901223128011828e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.210051620306761367764549971980026474e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.189187969537370950337212675466400599e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.116313253429564048145641663778121898e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.376708747782400769427057630528578187e-19),
+ };
+ static const T Q[16] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.205076752981410805177554569784219717),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0202526722696670378999575738524540269),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.001278305290005994980069466658219057),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.576404779858501791742255670403304787e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.196477049872253010859712483984252067e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.521863830500876189501054079974475762e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.109524209196868135198775445228552059e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.181698713448644481083966260949267825e-10),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.234793316975091282090312036524695562e-12),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.227490441461460571047545264251399048e-14),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.151500292036937400913870642638520668e-16),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.543475775154780935815530649335936121e-19),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.241647013434111434636554455083309352e-28),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.557103423021951053707162364713587374e-31),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.618708773442584843384712258199645166e-34),
+ };
+ result = tools::evaluate_polynomial(P, T(s - 30)) / tools::evaluate_polynomial(Q, T(s - 30));
+ result = 1 + exp(result);
+ }
+ else if(s < 117)
+ {
+ result = 1 + pow(T(2), -s);
+ }
+ else
+ {
+ result = 1;
+ }
+ return result;
+}
+
+template <class T, class Policy>
+T zeta_imp_odd_integer(int s, const T&, const Policy&, const mpl::true_&)
+{
+ static const T results[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.2020569031595942853997381615114500), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0369277551433699263313654864570342), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0083492773819228268397975498497968), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0020083928260822144178527692324121), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0004941886041194645587022825264699), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0001227133475784891467518365263574), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000305882363070204935517285106451), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000076371976378997622736002935630), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000019082127165539389256569577951), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000004769329867878064631167196044), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000001192199259653110730677887189), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000298035035146522801860637051), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000074507117898354294919810042), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000018626597235130490064039099), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000004656629065033784072989233), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000001164155017270051977592974), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000291038504449709968692943), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000072759598350574810145209), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000018189896503070659475848), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000004547473783042154026799), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000001136868407680227849349), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000284217097688930185546), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000071054273952108527129), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000017763568435791203275), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000004440892103143813364), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000001110223025141066134), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000277555756213612417), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000069388939045441537), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000017347234760475766), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000004336808690020650), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000001084202172494241), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000271050543122347), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000067762635780452), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000016940658945098), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000004235164736273), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000001058791184068), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000264697796017), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000066174449004), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000016543612251), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000004135903063), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000001033975766), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000258493941), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000064623485), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000016155871), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000004038968), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000001009742), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000252435), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000063109), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000015777), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000003944), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000986), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000247), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000062), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000015), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000004), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000001),
+ };
+ return s > 113 ? 1 : results[(s - 3) / 2];
+}
+
+template <class T, class Policy>
+T zeta_imp_odd_integer(int s, const T& sc, const Policy& pol, const mpl::false_&)
+{
+ static BOOST_MATH_THREAD_LOCAL bool is_init = false;
+ static BOOST_MATH_THREAD_LOCAL T results[50] = {};
+ static BOOST_MATH_THREAD_LOCAL int digits = tools::digits<T>();
+ int current_digits = tools::digits<T>();
+ if(digits != current_digits)
+ {
+ // Oh my precision has changed...
+ is_init = false;
+ }
+ if(!is_init)
+ {
+ is_init = true;
+ digits = current_digits;
+ for(unsigned k = 0; k < sizeof(results) / sizeof(results[0]); ++k)
+ {
+ T arg = k * 2 + 3;
+ T c_arg = 1 - arg;
+ results[k] = zeta_polynomial_series(arg, c_arg, pol);
+ }
+ }
+ unsigned index = (s - 3) / 2;
+ return index >= sizeof(results) / sizeof(results[0]) ? zeta_polynomial_series(T(s), sc, pol): results[index];
+}
+
+template <class T, class Policy, class Tag>
+T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag)
+{
+ BOOST_MATH_STD_USING
+ static const char* function = "boost::math::zeta<%1%>";
+ if(sc == 0)
+ return policies::raise_pole_error<T>(
+ function,
+ "Evaluation of zeta function at pole %1%",
+ s, pol);
+ T result;
+ //
+ // Trivial case:
+ //
+ if(s > policies::digits<T, Policy>())
+ return 1;
+ //
+ // Start by seeing if we have a simple closed form:
+ //
+ if(floor(s) == s)
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ // Without exceptions we expect itrunc to return INT_MAX on overflow
+ // and we fall through anyway.
+ try
+ {
+#endif
+ int v = itrunc(s);
+ if(v == s)
+ {
+ if(v < 0)
+ {
+ if(((-v) & 1) == 0)
+ return 0;
+ int n = (-v + 1) / 2;
+ if(n <= (int)boost::math::max_bernoulli_b2n<T>::value)
+ return T((-v & 1) ? -1 : 1) * boost::math::unchecked_bernoulli_b2n<T>(n) / (1 - v);
+ }
+ else if((v & 1) == 0)
+ {
+ if(((v / 2) <= (int)boost::math::max_bernoulli_b2n<T>::value) && (v <= (int)boost::math::max_factorial<T>::value))
+ return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi<T, Policy>(), v) *
+ boost::math::unchecked_bernoulli_b2n<T>(v / 2) / boost::math::unchecked_factorial<T>(v);
+ return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi<T, Policy>(), v) *
+ boost::math::bernoulli_b2n<T>(v / 2) / boost::math::factorial<T>(v);
+ }
+ else
+ return zeta_imp_odd_integer(v, sc, pol, mpl::bool_<(Tag::value <= 113) && Tag::value>());
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(const boost::math::rounding_error&){} // Just fall through, s is too large to round
+ catch(const std::overflow_error&){}
+#endif
+ }
+
+ if(fabs(s) < tools::root_epsilon<T>())
+ {
+ result = -0.5f - constants::log_root_two_pi<T, Policy>() * s;
+ }
+ else if(s < 0)
+ {
+ std::swap(s, sc);
+ if(floor(sc/2) == sc/2)
+ result = 0;
+ else
+ {
+ if(s > max_factorial<T>::value)
+ {
+ T mult = boost::math::sin_pi(0.5f * sc, pol) * 2 * zeta_imp(s, sc, pol, tag);
+ result = boost::math::lgamma(s, pol);
+ result -= s * log(2 * constants::pi<T>());
+ if(result > tools::log_max_value<T>())
+ return sign(mult) * policies::raise_overflow_error<T>(function, 0, pol);
+ result = exp(result);
+ if(tools::max_value<T>() / fabs(mult) < result)
+ return boost::math::sign(mult) * policies::raise_overflow_error<T>(function, 0, pol);
+ result *= mult;
+ }
+ else
+ {
+ result = boost::math::sin_pi(0.5f * sc, pol)
+ * 2 * pow(2 * constants::pi<T>(), -s)
+ * boost::math::tgamma(s, pol)
+ * zeta_imp(s, sc, pol, tag);
+ }
+ }
+ }
+ else
+ {
+ result = zeta_imp_prec(s, sc, pol, tag);
+ }
+ return result;
+}
+
+template <class T, class Policy, class tag>
+struct zeta_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ static void do_init(const mpl::int_<0>&){ boost::math::zeta(static_cast<T>(5), Policy()); }
+ static void do_init(const mpl::int_<53>&){ boost::math::zeta(static_cast<T>(5), Policy()); }
+ static void do_init(const mpl::int_<64>&)
+ {
+ boost::math::zeta(static_cast<T>(0.5), Policy());
+ boost::math::zeta(static_cast<T>(1.5), Policy());
+ boost::math::zeta(static_cast<T>(3.5), Policy());
+ boost::math::zeta(static_cast<T>(6.5), Policy());
+ boost::math::zeta(static_cast<T>(14.5), Policy());
+ boost::math::zeta(static_cast<T>(40.5), Policy());
+
+ boost::math::zeta(static_cast<T>(5), Policy());
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ boost::math::zeta(static_cast<T>(0.5), Policy());
+ boost::math::zeta(static_cast<T>(1.5), Policy());
+ boost::math::zeta(static_cast<T>(3.5), Policy());
+ boost::math::zeta(static_cast<T>(5.5), Policy());
+ boost::math::zeta(static_cast<T>(9.5), Policy());
+ boost::math::zeta(static_cast<T>(16.5), Policy());
+ boost::math::zeta(static_cast<T>(25.5), Policy());
+ boost::math::zeta(static_cast<T>(70.5), Policy());
+
+ boost::math::zeta(static_cast<T>(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 zeta_initializer<T, Policy, tag>::init zeta_initializer<T, Policy, tag>::initializer;
+
+} // detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type zeta(T s, const Policy&)
+{
+ 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;
+ 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;
+ //typedef mpl::int_<0> tag_type;
+
+ detail::zeta_initializer<value_type, forwarding_policy, tag_type>::force_instantiate();
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::zeta_imp(
+ static_cast<value_type>(s),
+ static_cast<value_type>(1 - static_cast<value_type>(s)),
+ forwarding_policy(),
+ tag_type()), "boost::math::zeta<%1%>(%1%)");
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type zeta(T s)
+{
+ return zeta(s, policies::policy<>());
+}
+
+}} // namespaces
+
+#endif // BOOST_MATH_ZETA_HPP
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/atomic.hpp b/src/third_party/boost-1.70.0/boost/math/tools/atomic.hpp
index 29a48b824c7..29a48b824c7 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/big_constant.hpp b/src/third_party/boost-1.70.0/boost/math/tools/big_constant.hpp
index a6f7bc0f1a8..a6f7bc0f1a8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/big_constant.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/tools/complex.hpp
index f3c01846dc7..f3c01846dc7 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/complex.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/complex.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/tools/config.hpp b/src/third_party/boost-1.70.0/boost/math/tools/config.hpp
new file mode 100644
index 00000000000..47fdea65c8d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/tools/config.hpp
@@ -0,0 +1,469 @@
+// Copyright (c) 2006-7 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_TOOLS_CONFIG_HPP
+#define BOOST_MATH_TOOLS_CONFIG_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/predef/architecture/x86.h>
+#include <boost/cstdint.hpp> // for boost::uintmax_t
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <algorithm> // for min and max
+#include <boost/config/no_tr1/cmath.hpp>
+#include <climits>
+#include <cfloat>
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+# include <math.h>
+#endif
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# include <limits>
+#endif
+
+#include <boost/math/tools/user.hpp>
+
+#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+ || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
+ && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+//
+// Borland post 5.8.2 uses Dinkumware's std C lib which
+// doesn't have true long double precision. Earlier
+// versions are problematic too:
+//
+# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+# include <float.h>
+#endif
+#ifdef __IBMCPP__
+//
+// For reasons I don't unserstand, the tests with IMB's compiler all
+// pass at long double precision, but fail with real_concept, those tests
+// are disabled for now. (JM 2012).
+# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#endif
+#ifdef sun
+// Any use of __float128 in program startup code causes a segfault (tested JM 2015, Solaris 11).
+# define BOOST_MATH_DISABLE_FLOAT128
+#endif
+#ifdef __HAIKU__
+//
+// Not sure what's up with the math detection on Haiku, but linking fails with
+// float128 code enabled, and we don't have an implementation of __expl, so
+// disabling long double functions for now as well.
+# define BOOST_MATH_DISABLE_FLOAT128
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Darwin's rather strange "double double" is rather hard to
+// support, it should be possible given enough effort though...
+//
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Intel compiler prior to version 10 has sporadic problems
+// calling the long double overloads of the std lib math functions:
+// calling ::powl is OK, but std::pow(long double, long double)
+// may segfault depending upon the value of the arguments passed
+// and the specific Linux distribution.
+//
+// We'll be conservative and disable long double support for this compiler.
+//
+// Comment out this #define and try building the tests to determine whether
+// your Intel compiler version has this issue or not.
+//
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER)
+//
+// Intel compiler has sporadic issues compiling std::fpclassify depending on
+// the exact OS version used. Use our own code for this as we know it works
+// well on Intel processors:
+//
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#endif
+
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
+ // Better safe than sorry, our tests don't support hardware exceptions:
+# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#endif
+
+#ifdef __IBMCPP__
+# define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
+#endif
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
+# define BOOST_MATH_USE_C99
+#endif
+
+#if (defined(__hpux) && !defined(__hppa))
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
+ || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+ || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
+ || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#endif
+
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+
+# include "boost/type.hpp"
+# include "boost/non_type.hpp"
+
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
+
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#else
+
+// no workaround needed: expand to nothing
+
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+
+#endif // __SUNPRO_CC
+
+#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
+// Sun's compiler emits a hard error if a constant underflows,
+// as does aCC on PA-RISC, while gcc issues a large number of warnings:
+# define BOOST_MATH_SMALL_CONSTANT(x) 0.0
+#else
+# define BOOST_MATH_SMALL_CONSTANT(x) x
+#endif
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+//
+// Define if constants too large for a float cause "bad"
+// values to be stored in the data, rather than infinity
+// or a suitably large value.
+//
+# define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#endif
+//
+// Tune performance options for specific compilers:
+//
+#ifdef BOOST_MSVC
+# define BOOST_MATH_POLY_METHOD 2
+# define BOOST_MATH_RATIONAL_METHOD 1
+#elif defined(BOOST_INTEL)
+# define BOOST_MATH_POLY_METHOD 2
+# define BOOST_MATH_RATIONAL_METHOD 1
+#elif defined(__GNUC__)
+#if __GNUC__ < 4
+# define BOOST_MATH_POLY_METHOD 3
+# define BOOST_MATH_RATIONAL_METHOD 3
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#else
+# define BOOST_MATH_POLY_METHOD 3
+# define BOOST_MATH_RATIONAL_METHOD 1
+#endif
+#endif
+
+#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+//
+// constexpr support, early GCC implementations can't cope so disable
+// constexpr for them:
+//
+#if !defined(__clang__) && defined(__GNUC__)
+#if (__GNUC__ * 100 + __GNUC_MINOR__) < 490
+# define BOOST_MATH_DISABLE_CONSTEXPR
+#endif
+#endif
+
+#ifdef BOOST_MATH_DISABLE_CONSTEXPR
+# define BOOST_MATH_CONSTEXPR
+#else
+# define BOOST_MATH_CONSTEXPR BOOST_CONSTEXPR
+#endif
+
+//
+// noexcept support:
+//
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+#ifndef BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#include <type_traits>
+# define BOOST_MATH_NOEXCEPT(T) noexcept(std::is_floating_point<T>::value)
+# define BOOST_MATH_IS_FLOAT(T) (std::is_floating_point<T>::value)
+#else
+#include <boost/type_traits/is_floating_point.hpp>
+# define BOOST_MATH_NOEXCEPT(T) noexcept(boost::is_floating_point<T>::value)
+# define BOOST_MATH_IS_FLOAT(T) (boost::is_floating_point<T>::value)
+#endif
+#else
+# define BOOST_MATH_NOEXCEPT(T)
+# define BOOST_MATH_IS_FLOAT(T) false
+#endif
+
+//
+// The maximum order of polynomial that will be evaluated
+// via an unrolled specialisation:
+//
+#ifndef BOOST_MATH_MAX_POLY_ORDER
+# define BOOST_MATH_MAX_POLY_ORDER 20
+#endif
+//
+// Set the method used to evaluate polynomials and rationals:
+//
+#ifndef BOOST_MATH_POLY_METHOD
+# define BOOST_MATH_POLY_METHOD 2
+#endif
+#ifndef BOOST_MATH_RATIONAL_METHOD
+# define BOOST_MATH_RATIONAL_METHOD 1
+#endif
+//
+// decide whether to store constants as integers or reals:
+//
+#ifndef BOOST_MATH_INT_TABLE_TYPE
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+#endif
+#ifndef BOOST_MATH_INT_VALUE_SUFFIX
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#endif
+//
+// And then the actual configuration:
+//
+#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \
+ && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128)
+//
+// Only enable this when the compiler really is GCC as clang and probably
+// intel too don't support __float128 yet :-(
+//
+#ifndef BOOST_MATH_USE_FLOAT128
+# define BOOST_MATH_USE_FLOAT128
+#endif
+
+# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__)
+# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
+# define BOOST_MATH_FLOAT128_TYPE __float128
+# endif
+# elif defined(__GNUC__)
+# define BOOST_MATH_FLOAT128_TYPE __float128
+# endif
+
+# ifndef BOOST_MATH_FLOAT128_TYPE
+# define BOOST_MATH_FLOAT128_TYPE _Quad
+# endif
+#endif
+//
+// Check for WinCE with no iostream support:
+//
+#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT)
+# define BOOST_MATH_NO_LEXICAL_CAST
+#endif
+
+//
+// Helper macro for controlling the FP behaviour:
+//
+#ifndef BOOST_MATH_CONTROL_FP
+# define BOOST_MATH_CONTROL_FP
+#endif
+//
+// Helper macro for using statements:
+//
+#define BOOST_MATH_STD_USING_CORE \
+ using std::abs;\
+ using std::acos;\
+ using std::cos;\
+ using std::fmod;\
+ using std::modf;\
+ using std::tan;\
+ using std::asin;\
+ using std::cosh;\
+ using std::frexp;\
+ using std::pow;\
+ using std::tanh;\
+ using std::atan;\
+ using std::exp;\
+ using std::ldexp;\
+ using std::sin;\
+ using std::atan2;\
+ using std::fabs;\
+ using std::log;\
+ using std::sinh;\
+ using std::ceil;\
+ using std::floor;\
+ using std::log10;\
+ using std::sqrt;
+
+#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE
+
+namespace boost{ namespace math{
+namespace tools
+{
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) BOOST_MATH_NOEXCEPT(T)
+{
+ return (std::max)((std::max)(a, b), c);
+}
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) BOOST_MATH_NOEXCEPT(T)
+{
+ return (std::max)((std::max)(a, b), (std::max)(c, d));
+}
+
+} // namespace tools
+
+template <class T>
+void suppress_unused_variable_warning(const T&) BOOST_MATH_NOEXCEPT(T)
+{
+}
+
+namespace detail{
+
+template <class T>
+struct is_integer_for_rounding
+{
+ static const bool value = boost::is_integral<T>::value
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer)
+#endif
+ ;
+};
+
+}
+
+}} // namespace boost namespace math
+
+#ifdef __GLIBC_PREREQ
+# if __GLIBC_PREREQ(2,14)
+# define BOOST_MATH_HAVE_FIXED_GLIBC
+# endif
+#endif
+
+#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+//
+// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445
+// Basically powl and expl can return garbage when the result is small and certain exception flags are set
+// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011).
+// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4
+//
+
+ #include <boost/detail/fenv.hpp>
+
+# ifdef FE_ALL_EXCEPT
+
+namespace boost{ namespace math{
+ namespace detail
+ {
+ struct fpu_guard
+ {
+ fpu_guard()
+ {
+ fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
+ feclearexcept(FE_ALL_EXCEPT);
+ }
+ ~fpu_guard()
+ {
+ fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
+ }
+ private:
+ fexcept_t m_flags;
+ };
+
+ } // namespace detail
+ }} // namespaces
+
+# define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
+# define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0);
+
+# else
+
+# define BOOST_FPU_EXCEPTION_GUARD
+# define BOOST_MATH_INSTRUMENT_FPU
+
+# endif
+
+#else // All other platforms.
+# define BOOST_FPU_EXCEPTION_GUARD
+# define BOOST_MATH_INSTRUMENT_FPU
+#endif
+
+#ifdef BOOST_MATH_INSTRUMENT
+
+# include <iostream>
+# include <iomanip>
+# include <typeinfo>
+
+# define BOOST_MATH_INSTRUMENT_CODE(x) \
+ std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
+#else
+
+# define BOOST_MATH_INSTRUMENT_CODE(x)
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
+#endif
+
+//
+// Thread local storage:
+//
+#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL)
+# define BOOST_MATH_THREAD_LOCAL thread_local
+#else
+# define BOOST_MATH_THREAD_LOCAL
+#endif
+
+//
+// Can we have constexpr tables?
+//
+#if (!defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_CXX14_CONSTEXPR)) || BOOST_WORKAROUND(BOOST_MSVC, >= 1910)
+#define BOOST_MATH_HAVE_CONSTEXPR_TABLES
+#define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION constexpr
+#else
+#define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION
+#endif
+
+
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/convert_from_string.hpp b/src/third_party/boost-1.70.0/boost/math/tools/convert_from_string.hpp
index cce61ccbd9d..cce61ccbd9d 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/convert_from_string.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/convert_from_string.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/tools/detail/is_const_iterable.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/is_const_iterable.hpp
new file mode 100644
index 00000000000..805b66e22a2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/is_const_iterable.hpp
@@ -0,0 +1,40 @@
+// (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)
+
+#ifndef BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
+#define BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
+
+#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_SFINAE_EXPR)
+
+#define BOOST_MATH_HAS_IS_CONST_ITERABLE
+
+#include <boost/type_traits/is_detected.hpp>
+#include <utility>
+
+namespace boost {
+ namespace math {
+ namespace tools {
+ namespace detail {
+
+ template<class T>
+ using begin_t = decltype(std::declval<const T&>().begin());
+ template<class T>
+ using end_t = decltype(std::declval<const T&>().end());
+ template<class T>
+ using const_iterator_t = typename T::const_iterator;
+
+ template <class T>
+ struct is_const_iterable
+ : public boost::integral_constant<bool,
+ boost::is_detected<begin_t, T>::value
+ && boost::is_detected<end_t, T>::value
+ && boost::is_detected<const_iterator_t, T>::value
+ > {};
+
+} } } }
+
+#endif
+
+#endif // BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_10.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_10.hpp
index 48cf9e39b3a..48cf9e39b3a 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_10.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_11.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_11.hpp
index e52595429eb..e52595429eb 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_11.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_12.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_12.hpp
index 10cd178975d..10cd178975d 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_12.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_12.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_13.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_13.hpp
index 90fa9ec43d8..90fa9ec43d8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_13.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_13.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_14.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_14.hpp
index 389c8063b0f..389c8063b0f 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_14.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_14.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_15.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_15.hpp
index d196a41603b..d196a41603b 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_15.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_15.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_16.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_16.hpp
index fa48c6614c0..fa48c6614c0 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_16.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_16.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_17.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_17.hpp
index 4575aeac7b3..4575aeac7b3 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_17.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_17.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_18.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_18.hpp
index 95dd4004169..95dd4004169 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_18.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_18.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_19.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_19.hpp
index 6d73eb8ffc1..6d73eb8ffc1 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_19.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_19.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_2.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_2.hpp
index 85640edf677..85640edf677 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_20.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_20.hpp
index f8b7f34384e..f8b7f34384e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_20.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_3.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_3.hpp
index c0ad4660e9b..c0ad4660e9b 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_3.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_4.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_4.hpp
index 27ad74eb951..27ad74eb951 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_4.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_5.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_5.hpp
index 5cfafb4052c..5cfafb4052c 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_5.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_6.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_6.hpp
index f7f4bee4801..f7f4bee4801 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_6.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_7.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_7.hpp
index c612822fc05..c612822fc05 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_7.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_8.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_8.hpp
index 5d9b453b9d1..5d9b453b9d1 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_8.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_9.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_9.hpp
index 84977fd13b6..84977fd13b6 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_9.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner1_9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_10.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_10.hpp
index f10c5d04928..f10c5d04928 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_10.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_11.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_11.hpp
index 757357addf9..757357addf9 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_11.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_12.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_12.hpp
index e0fc8a9df75..e0fc8a9df75 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_12.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_12.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_13.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_13.hpp
index c13a0a7cc2c..c13a0a7cc2c 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_13.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_13.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_14.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_14.hpp
index ccc6e7d8da1..ccc6e7d8da1 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_14.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_14.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_15.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_15.hpp
index a409ba7fdba..a409ba7fdba 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_15.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_15.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_16.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_16.hpp
index a69c1a36192..a69c1a36192 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_16.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_16.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_17.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_17.hpp
index 9e7c05d0071..9e7c05d0071 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_17.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_17.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_18.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_18.hpp
index 1ea0e052c06..1ea0e052c06 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_18.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_18.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_19.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_19.hpp
index 45c125c871c..45c125c871c 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_19.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_19.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_2.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_2.hpp
index 20da483c338..20da483c338 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_20.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_20.hpp
index 956c6dba4f9..956c6dba4f9 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_20.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_3.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_3.hpp
index 58b290c7c91..58b290c7c91 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_3.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_4.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_4.hpp
index 74f969b749c..74f969b749c 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_4.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_5.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_5.hpp
index 134cbc8ef90..134cbc8ef90 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_5.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_6.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_6.hpp
index 7cb75d75c8f..7cb75d75c8f 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_6.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_7.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_7.hpp
index 327639deb61..327639deb61 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_7.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_8.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_8.hpp
index 2145ad6dcdf..2145ad6dcdf 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_8.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_9.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_9.hpp
index 08f6336e49a..08f6336e49a 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_9.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner2_9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_10.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_10.hpp
index 05ad20cc300..05ad20cc300 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_10.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_11.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_11.hpp
index 9f8628e7504..9f8628e7504 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_11.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_12.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_12.hpp
index ccb3ec4d109..ccb3ec4d109 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_12.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_12.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_13.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_13.hpp
index a8cdf2c508f..a8cdf2c508f 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_13.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_13.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_14.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_14.hpp
index 5eb4ef1f289..5eb4ef1f289 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_14.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_14.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_15.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_15.hpp
index 7e8edcd8aab..7e8edcd8aab 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_15.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_15.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_16.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_16.hpp
index 58bea1581f2..58bea1581f2 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_16.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_16.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_17.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_17.hpp
index 007b8a4918d..007b8a4918d 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_17.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_17.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_18.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_18.hpp
index 68935adba15..68935adba15 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_18.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_18.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_19.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_19.hpp
index acffba6b476..acffba6b476 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_19.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_19.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_2.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_2.hpp
index 6b8d9a71f87..6b8d9a71f87 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_20.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_20.hpp
index b3a170c095f..b3a170c095f 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_20.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_3.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_3.hpp
index 05fe88fcccf..05fe88fcccf 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_3.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_4.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_4.hpp
index b98d6f678d4..b98d6f678d4 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_4.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_5.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_5.hpp
index 12e639cef3e..12e639cef3e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_5.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_6.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_6.hpp
index b645cb5bbc0..b645cb5bbc0 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_6.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_7.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_7.hpp
index 3df4b5b4eff..3df4b5b4eff 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_7.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_8.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_8.hpp
index 9a49d2555ed..9a49d2555ed 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_8.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_9.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_9.hpp
index 3507d376047..3507d376047 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_9.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/polynomial_horner3_9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_10.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_10.hpp
index e6708538698..e6708538698 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_10.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_11.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_11.hpp
index 65e17598ff3..65e17598ff3 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_11.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_12.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_12.hpp
index de33af0e07c..de33af0e07c 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_12.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_12.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_13.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_13.hpp
index ed4ac1af8b9..ed4ac1af8b9 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_13.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_13.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_14.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_14.hpp
index a3222f8212b..a3222f8212b 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_14.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_14.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_15.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_15.hpp
index c8cd691573f..c8cd691573f 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_15.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_15.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_16.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_16.hpp
index 8003c82db73..8003c82db73 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_16.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_16.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_17.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_17.hpp
index 294c3f175d6..294c3f175d6 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_17.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_17.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_18.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_18.hpp
index 1a48bba0971..1a48bba0971 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_18.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_18.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_19.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_19.hpp
index 12fd75cf1bc..12fd75cf1bc 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_19.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_19.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_2.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_2.hpp
index c838f2a2cd3..c838f2a2cd3 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_20.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_20.hpp
index 3ee3e966e61..3ee3e966e61 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_20.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_3.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_3.hpp
index 034ead3f660..034ead3f660 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_3.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_4.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_4.hpp
index de2972f4c49..de2972f4c49 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_4.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_5.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_5.hpp
index a59ff114d14..a59ff114d14 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_5.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_6.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_6.hpp
index c5000c5db46..c5000c5db46 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_6.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_7.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_7.hpp
index bc860f3bf7e..bc860f3bf7e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_7.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_8.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_8.hpp
index 69368978b6a..69368978b6a 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_8.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_9.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_9.hpp
index 0aafea15fd8..0aafea15fd8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_9.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner1_9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_10.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_10.hpp
index 127777bc2a2..127777bc2a2 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_10.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_11.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_11.hpp
index 53983ed4ad1..53983ed4ad1 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_11.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_12.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_12.hpp
index 4ad0856b06e..4ad0856b06e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_12.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_12.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_13.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_13.hpp
index 5f9303d0c3a..5f9303d0c3a 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_13.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_13.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_14.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_14.hpp
index dc512f393fd..dc512f393fd 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_14.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_14.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_15.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_15.hpp
index cf084e8be05..cf084e8be05 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_15.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_15.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_16.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_16.hpp
index 3d13db25534..3d13db25534 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_16.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_16.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_17.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_17.hpp
index 3adf4053bdf..3adf4053bdf 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_17.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_17.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_18.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_18.hpp
index 607609fd8e4..607609fd8e4 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_18.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_18.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_19.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_19.hpp
index bc324c3be32..bc324c3be32 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_19.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_19.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_2.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_2.hpp
index 95ec0251d5e..95ec0251d5e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_20.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_20.hpp
index cf1211b61fb..cf1211b61fb 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_20.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_3.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_3.hpp
index 9ce437b41f8..9ce437b41f8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_3.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_4.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_4.hpp
index 00543ede853..00543ede853 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_4.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_5.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_5.hpp
index d117b66633d..d117b66633d 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_5.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_6.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_6.hpp
index c431d16344a..c431d16344a 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_6.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_7.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_7.hpp
index 2104302472f..2104302472f 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_7.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_8.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_8.hpp
index fd98289b993..fd98289b993 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_8.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_9.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_9.hpp
index 1081ab2f8b4..1081ab2f8b4 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_9.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner2_9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_10.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_10.hpp
index 7da05875f32..7da05875f32 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_10.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_11.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_11.hpp
index df971197a35..df971197a35 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_11.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_11.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_12.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_12.hpp
index 668f76684fa..668f76684fa 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_12.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_12.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_13.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_13.hpp
index b0b4c2ac589..b0b4c2ac589 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_13.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_13.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_14.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_14.hpp
index 92035ef8060..92035ef8060 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_14.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_14.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_15.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_15.hpp
index 9536ecd8447..9536ecd8447 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_15.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_15.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_16.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_16.hpp
index 7ccf8f6e7af..7ccf8f6e7af 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_16.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_16.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_17.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_17.hpp
index 1a35c47397a..1a35c47397a 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_17.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_17.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_18.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_18.hpp
index 8a1c16eb2f0..8a1c16eb2f0 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_18.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_18.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_19.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_19.hpp
index 15d16bafc39..15d16bafc39 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_19.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_19.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_2.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_2.hpp
index 95ec0251d5e..95ec0251d5e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_2.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_20.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_20.hpp
index 78233214d87..78233214d87 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_20.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_3.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_3.hpp
index 9ce437b41f8..9ce437b41f8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_3.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_4.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_4.hpp
index 00543ede853..00543ede853 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_4.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_5.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_5.hpp
index 35dce45a805..35dce45a805 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_5.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_6.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_6.hpp
index b9361ba07ab..b9361ba07ab 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_6.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_6.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_7.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_7.hpp
index 92b00b3a15e..92b00b3a15e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_7.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_7.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_8.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_8.hpp
index 197b6c05500..197b6c05500 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_8.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_8.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_9.hpp b/src/third_party/boost-1.70.0/boost/math/tools/detail/rational_horner3_9.hpp
index 5aad957c373..5aad957c373 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_9.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/tools/fraction.hpp
index 8c41d4472db..8c41d4472db 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/fraction.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/fraction.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/minima.hpp b/src/third_party/boost-1.70.0/boost/math/tools/minima.hpp
index b76dabe3f6e..b76dabe3f6e 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/minima.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/math/tools/precision.hpp
index 6d1de643715..6d1de643715 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/precision.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/precision.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/promotion.hpp b/src/third_party/boost-1.70.0/boost/math/tools/promotion.hpp
index 494d7f99e20..494d7f99e20 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/promotion.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/promotion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/rational.hpp b/src/third_party/boost-1.70.0/boost/math/tools/rational.hpp
index d8bd4a73aa8..d8bd4a73aa8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/rational.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/rational.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/real_cast.hpp b/src/third_party/boost-1.70.0/boost/math/tools/real_cast.hpp
index 873e60259b8..873e60259b8 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/real_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/real_cast.hpp
diff --git a/src/third_party/boost-1.70.0/boost/math/tools/roots.hpp b/src/third_party/boost-1.70.0/boost/math/tools/roots.hpp
new file mode 100644
index 00000000000..e16294dc15f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/math/tools/roots.hpp
@@ -0,0 +1,831 @@
+// (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 <boost/multiprecision/detail/number_base.hpp> // test for multiprecision types.
+#include <boost/type_traits/is_complex.hpp> // test for complex types
+
+#include <iostream>
+#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.
+ T shift = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ if ((result != 0) && (fabs(shift) > fabs(result)))
+ {
+ delta = sign(delta) * result; // protect against huge jumps!
+ }
+ else
+ delta = shift;
+ // reset delta1/2 so we don't take this branch next time round:
+ delta1 = 3 * 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 ((result != 0) && (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 * 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)
+ : (fabs(min) < 1) && (fabs(tools::max_value<T>() * min) < fabs(result))
+ ? ((min < 0) != (result < 0)) ? -tools::max_value<T>() : tools::max_value<T>() : 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))
+ {
+ using std::fabs;
+ T ratio = f0 / f1;
+ T delta;
+ if((x != 0) && (fabs(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);
+}
+
+#ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS
+/*
+ * Why do we set the default maximum number of iterations to the number of digits in the type?
+ * Because for double roots, the number of digits increases linearly with the number of iterations,
+ * so this default should recover full precision even in this somewhat pathological case.
+ * For isolated roots, the problem is so rapidly convergent that this doesn't matter at all.
+ */
+template<class Complex, class F>
+Complex complex_newton(F g, Complex guess, int max_iterations=std::numeric_limits<typename Complex::value_type>::digits)
+{
+ typedef typename Complex::value_type Real;
+ using std::norm;
+ using std::abs;
+ using std::max;
+ // z0, z1, and z2 cannot be the same, in case we immediately need to resort to Muller's Method:
+ Complex z0 = guess + Complex(1,0);
+ Complex z1 = guess + Complex(0,1);
+ Complex z2 = guess;
+
+ do {
+ auto pair = g(z2);
+ if (norm(pair.second) == 0)
+ {
+ // Muller's method. Notation follows Numerical Recipes, 9.5.2:
+ Complex q = (z2 - z1)/(z1 - z0);
+ auto P0 = g(z0);
+ auto P1 = g(z1);
+ Complex qp1 = static_cast<Complex>(1)+q;
+ Complex A = q*(pair.first - qp1*P1.first + q*P0.first);
+
+ Complex B = (static_cast<Complex>(2)*q+static_cast<Complex>(1))*pair.first - qp1*qp1*P1.first +q*q*P0.first;
+ Complex C = qp1*pair.first;
+ Complex rad = sqrt(B*B - static_cast<Complex>(4)*A*C);
+ Complex denom1 = B + rad;
+ Complex denom2 = B - rad;
+ Complex correction = (z1-z2)*static_cast<Complex>(2)*C;
+ if (norm(denom1) > norm(denom2))
+ {
+ correction /= denom1;
+ }
+ else
+ {
+ correction /= denom2;
+ }
+
+ z0 = z1;
+ z1 = z2;
+ z2 = z2 + correction;
+ }
+ else
+ {
+ z0 = z1;
+ z1 = z2;
+ z2 = z2 - (pair.first/pair.second);
+ }
+
+ // See: https://math.stackexchange.com/questions/3017766/constructing-newton-iteration-converging-to-non-root
+ // If f' is continuous, then convergence of x_n -> x* implies f(x*) = 0.
+ // This condition approximates this convergence condition by requiring three consecutive iterates to be clustered.
+ Real tol = max(abs(z2)*std::numeric_limits<Real>::epsilon(), std::numeric_limits<Real>::epsilon());
+ bool real_close = abs(z0.real() - z1.real()) < tol && abs(z0.real() - z2.real()) < tol && abs(z1.real() - z2.real()) < tol;
+ bool imag_close = abs(z0.imag() - z1.imag()) < tol && abs(z0.imag() - z2.imag()) < tol && abs(z1.imag() - z2.imag()) < tol;
+ if (real_close && imag_close)
+ {
+ return z2;
+ }
+
+ } while(max_iterations--);
+
+ // The idea is that if we can get abs(f) < eps, we should, but if we go through all these iterations
+ // and abs(f) < sqrt(eps), then roundoff error simply does not allow that we can evaluate f to < eps
+ // This is somewhat awkward as it isn't scale invariant, but using the Daubechies coefficient example code,
+ // I found this condition generates correct roots, whereas the scale invariant condition discussed here:
+ // https://scicomp.stackexchange.com/questions/30597/defining-a-condition-number-and-termination-criteria-for-newtons-method
+ // allows nonroots to be passed off as roots.
+ auto pair = g(z2);
+ if (abs(pair.first) < sqrt(std::numeric_limits<Real>::epsilon()))
+ {
+ return z2;
+ }
+
+ return {std::numeric_limits<Real>::quiet_NaN(),
+ std::numeric_limits<Real>::quiet_NaN()};
+}
+#endif
+
+
+#if !defined(BOOST_NO_CXX17_IF_CONSTEXPR)
+// https://stackoverflow.com/questions/48979861/numerically-stable-method-for-solving-quadratic-equations/50065711
+namespace detail
+{
+ template<class T>
+ inline T discriminant(T const & a, T const & b, T const & c)
+ {
+ T w = 4*a*c;
+ T e = std::fma(-c, 4*a, w);
+ T f = std::fma(b, b, -w);
+ return f + e;
+ }
+}
+
+template<class T>
+auto quadratic_roots(T const& a, T const& b, T const& c)
+{
+ using std::copysign;
+ using std::sqrt;
+ if constexpr (std::is_integral<T>::value)
+ {
+ // What I want is to write:
+ // return quadratic_roots(double(a), double(b), double(c));
+ // but that doesn't compile.
+ double nan = std::numeric_limits<double>::quiet_NaN();
+ if(a==0)
+ {
+ if (b==0 && c != 0)
+ {
+ return std::pair<double, double>(nan, nan);
+ }
+ else if (b==0 && c==0)
+ {
+ return std::pair<double, double>(0,0);
+ }
+ return std::pair<double, double>(-c/b, -c/b);
+ }
+ if (b==0)
+ {
+ double x0_sq = -double(c)/double(a);
+ if (x0_sq < 0) {
+ return std::pair<double, double>(nan, nan);
+ }
+ double x0 = sqrt(x0_sq);
+ return std::pair<double, double>(-x0,x0);
+ }
+ double discriminant = detail::discriminant(double(a), double(b), double(c));
+ if (discriminant < 0)
+ {
+ return std::pair<double, double>(nan, nan);
+ }
+ double q = -(b + copysign(sqrt(discriminant), double(b)))/T(2);
+ double x0 = q/a;
+ double x1 = c/q;
+ if (x0 < x1) {
+ return std::pair<double, double>(x0, x1);
+ }
+ return std::pair<double, double>(x1, x0);
+ }
+ else if constexpr (std::is_floating_point<T>::value)
+ {
+ T nan = std::numeric_limits<T>::quiet_NaN();
+ if(a==0)
+ {
+ if (b==0 && c != 0)
+ {
+ return std::pair<T, T>(nan, nan);
+ }
+ else if (b==0 && c==0)
+ {
+ return std::pair<T, T>(0,0);
+ }
+ return std::pair<T, T>(-c/b, -c/b);
+ }
+ if (b==0)
+ {
+ T x0_sq = -c/a;
+ if (x0_sq < 0) {
+ return std::pair<T, T>(nan, nan);
+ }
+ T x0 = sqrt(x0_sq);
+ return std::pair<T, T>(-x0,x0);
+ }
+ T discriminant = detail::discriminant(a, b, c);
+ // Is there a sane way to flush very small negative values to zero?
+ // If there is I don't know of it.
+ if (discriminant < 0)
+ {
+ return std::pair<T, T>(nan, nan);
+ }
+ T q = -(b + copysign(sqrt(discriminant), b))/T(2);
+ T x0 = q/a;
+ T x1 = c/q;
+ if (x0 < x1)
+ {
+ return std::pair<T, T>(x0, x1);
+ }
+ return std::pair<T, T>(x1, x0);
+ }
+ else if constexpr (boost::is_complex<T>::value || boost::multiprecision::number_category<T>::value == boost::multiprecision::number_kind_complex)
+ {
+ typename T::value_type nan = std::numeric_limits<typename T::value_type>::quiet_NaN();
+ if(a.real()==0 && a.imag() ==0)
+ {
+ using std::norm;
+ if (b.real()==0 && b.imag() && norm(c) != 0)
+ {
+ return std::pair<T, T>({nan, nan}, {nan, nan});
+ }
+ else if (b.real()==0 && b.imag() && c.real() ==0 && c.imag() == 0)
+ {
+ return std::pair<T, T>({0,0},{0,0});
+ }
+ return std::pair<T, T>(-c/b, -c/b);
+ }
+ if (b.real()==0 && b.imag() == 0)
+ {
+ T x0_sq = -c/a;
+ T x0 = sqrt(x0_sq);
+ return std::pair<T, T>(-x0, x0);
+ }
+ // There's no fma for complex types:
+ T discriminant = b*b - T(4)*a*c;
+ T q = -(b + sqrt(discriminant))/T(2);
+ return std::pair<T, T>(q/a, c/q);
+ }
+ else // Most likely the type is a boost.multiprecision.
+ { //There is no fma for multiprecision, and in addition it doesn't seem to be useful, so revert to the naive computation.
+ T nan = std::numeric_limits<T>::quiet_NaN();
+ if(a==0)
+ {
+ if (b==0 && c != 0)
+ {
+ return std::pair<T, T>(nan, nan);
+ }
+ else if (b==0 && c==0)
+ {
+ return std::pair<T, T>(0,0);
+ }
+ return std::pair<T, T>(-c/b, -c/b);
+ }
+ if (b==0)
+ {
+ T x0_sq = -c/a;
+ if (x0_sq < 0) {
+ return std::pair<T, T>(nan, nan);
+ }
+ T x0 = sqrt(x0_sq);
+ return std::pair<T, T>(-x0,x0);
+ }
+ T discriminant = b*b - 4*a*c;
+ if (discriminant < 0)
+ {
+ return std::pair<T, T>(nan, nan);
+ }
+ T q = -(b + copysign(sqrt(discriminant), b))/T(2);
+ T x0 = q/a;
+ T x1 = c/q;
+ if (x0 < x1)
+ {
+ return std::pair<T, T>(x0, x1);
+ }
+ return std::pair<T, T>(x1, x0);
+ }
+}
+#endif
+
+} // 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.70.0/boost/math/tools/series.hpp
index eea1046cd38..eea1046cd38 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/series.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/series.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp b/src/third_party/boost-1.70.0/boost/math/tools/toms748_solve.hpp
index 8beb0172dae..8beb0172dae 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/toms748_solve.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/tuple.hpp b/src/third_party/boost-1.70.0/boost/math/tools/tuple.hpp
index 81de59fa3ab..81de59fa3ab 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/user.hpp b/src/third_party/boost-1.70.0/boost/math/tools/user.hpp
index 08a7e53d9eb..08a7e53d9eb 100644
--- a/src/third_party/boost-1.69.0/boost/math/tools/user.hpp
+++ b/src/third_party/boost-1.70.0/boost/math/tools/user.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mem_fn.hpp b/src/third_party/boost-1.70.0/boost/mem_fn.hpp
index 3bcd2c548bc..3bcd2c548bc 100644
--- a/src/third_party/boost-1.69.0/boost/mem_fn.hpp
+++ b/src/third_party/boost-1.70.0/boost/mem_fn.hpp
diff --git a/src/third_party/boost-1.69.0/boost/memory_order.hpp b/src/third_party/boost-1.70.0/boost/memory_order.hpp
index 1f7d2027315..1f7d2027315 100644
--- a/src/third_party/boost-1.69.0/boost/memory_order.hpp
+++ b/src/third_party/boost-1.70.0/boost/memory_order.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/adl_move_swap.hpp b/src/third_party/boost-1.70.0/boost/move/adl_move_swap.hpp
index d9096e36c37..d9096e36c37 100644
--- a/src/third_party/boost-1.69.0/boost/move/adl_move_swap.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/adl_move_swap.hpp
diff --git a/src/third_party/boost-1.70.0/boost/move/algo/adaptive_merge.hpp b/src/third_party/boost-1.70.0/boost/move/algo/adaptive_merge.hpp
new file mode 100644
index 00000000000..21698433792
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/algo/adaptive_merge.hpp
@@ -0,0 +1,352 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_MOVE_ADAPTIVE_MERGE_HPP
+#define BOOST_MOVE_ADAPTIVE_MERGE_HPP
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/algo/detail/adaptive_sort_merge.hpp>
+
+namespace boost {
+namespace movelib {
+
+///@cond
+namespace detail_adaptive {
+
+template<class RandIt, class Compare, class XBuf>
+inline void adaptive_merge_combine_blocks( RandIt first
+ , typename iterator_traits<RandIt>::size_type len1
+ , typename iterator_traits<RandIt>::size_type len2
+ , typename iterator_traits<RandIt>::size_type collected
+ , typename iterator_traits<RandIt>::size_type n_keys
+ , typename iterator_traits<RandIt>::size_type l_block
+ , bool use_internal_buf
+ , bool xbuf_used
+ , Compare comp
+ , XBuf & xbuf
+ )
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const len = len1+len2;
+ size_type const l_combine = len-collected;
+ size_type const l_combine1 = len1-collected;
+
+ if(n_keys){
+ RandIt const first_data = first+collected;
+ RandIt const keys = first;
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combine: ", len);
+ if(xbuf_used){
+ if(xbuf.size() < l_block){
+ xbuf.initialize_until(l_block, *first);
+ }
+ BOOST_ASSERT(xbuf.size() >= l_block);
+ size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
+ combine_params( keys, comp, l_combine
+ , l_combine1, l_block, xbuf
+ , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
+ op_merge_blocks_with_buf
+ (keys, comp, first_data, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op(), xbuf.data());
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A mrg xbf: ", len);
+ }
+ else{
+ size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
+ combine_params( keys, comp, l_combine
+ , l_combine1, l_block, xbuf
+ , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
+ if(use_internal_buf){
+ op_merge_blocks_with_buf
+ (keys, comp, first_data, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, swap_op(), first_data-l_block);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A mrg buf: ", len);
+ }
+ else{
+ merge_blocks_bufferless
+ (keys, comp, first_data, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A mrg nbf: ", len);
+ }
+ }
+ }
+ else{
+ xbuf.shrink_to_fit(l_block);
+ if(xbuf.size() < l_block){
+ xbuf.initialize_until(l_block, *first);
+ }
+ size_type *const uint_keys = xbuf.template aligned_trailing<size_type>(l_block);
+ size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
+ combine_params( uint_keys, less(), l_combine
+ , l_combine1, l_block, xbuf
+ , n_block_a, n_block_b, l_irreg1, l_irreg2, true); //Outputs
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combine: ", len);
+ BOOST_ASSERT(xbuf.size() >= l_block);
+ op_merge_blocks_with_buf
+ (uint_keys, less(), first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op(), xbuf.data());
+ xbuf.clear();
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A mrg buf: ", len);
+ }
+}
+
+template<class RandIt, class Compare, class XBuf>
+inline void adaptive_merge_final_merge( RandIt first
+ , typename iterator_traits<RandIt>::size_type len1
+ , typename iterator_traits<RandIt>::size_type len2
+ , typename iterator_traits<RandIt>::size_type collected
+ , typename iterator_traits<RandIt>::size_type l_intbuf
+ , typename iterator_traits<RandIt>::size_type l_block
+ , bool use_internal_buf
+ , bool xbuf_used
+ , Compare comp
+ , XBuf & xbuf
+ )
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ (void)l_block;
+ (void)use_internal_buf;
+ size_type n_keys = collected-l_intbuf;
+ size_type len = len1+len2;
+ if (!xbuf_used || n_keys) {
+ xbuf.clear();
+ const size_type middle = xbuf_used && n_keys ? n_keys: collected;
+ unstable_sort(first, first + middle, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A k/b srt: ", len);
+ stable_merge(first, first + middle, first + len, comp, xbuf);
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" A fin mrg: ", len);
+}
+
+template<class SizeType>
+inline static SizeType adaptive_merge_n_keys_without_external_keys(SizeType l_block, SizeType len1, SizeType len2, SizeType l_intbuf)
+{
+ typedef SizeType size_type;
+ //This is the minimum number of keys to implement the ideal algorithm
+ size_type n_keys = len1/l_block+len2/l_block;
+ const size_type second_half_blocks = len2/l_block;
+ const size_type first_half_aux = len1-l_intbuf;
+ while(n_keys >= ((first_half_aux-n_keys)/l_block + second_half_blocks)){
+ --n_keys;
+ }
+ ++n_keys;
+ return n_keys;
+}
+
+template<class SizeType>
+inline static SizeType adaptive_merge_n_keys_with_external_keys(SizeType l_block, SizeType len1, SizeType len2, SizeType l_intbuf)
+{
+ typedef SizeType size_type;
+ //This is the minimum number of keys to implement the ideal algorithm
+ size_type n_keys = (len1-l_intbuf)/l_block + len2/l_block;
+ return n_keys;
+}
+
+template<class SizeType, class Xbuf>
+inline SizeType adaptive_merge_n_keys_intbuf(SizeType &rl_block, SizeType len1, SizeType len2, Xbuf & xbuf, SizeType &l_intbuf_inout)
+{
+ typedef SizeType size_type;
+ size_type l_block = rl_block;
+ size_type l_intbuf = xbuf.capacity() >= l_block ? 0u : l_block;
+
+ if (xbuf.capacity() > l_block){
+ l_block = xbuf.capacity();
+ }
+
+ //This is the minimum number of keys to implement the ideal algorithm
+ size_type n_keys = adaptive_merge_n_keys_without_external_keys(l_block, len1, len2, l_intbuf);
+ BOOST_ASSERT(n_keys >= ((len1-l_intbuf-n_keys)/l_block + len2/l_block));
+
+ if(xbuf.template supports_aligned_trailing<size_type>
+ ( l_block
+ , adaptive_merge_n_keys_with_external_keys(l_block, len1, len2, l_intbuf)))
+ {
+ n_keys = 0u;
+ }
+ l_intbuf_inout = l_intbuf;
+ rl_block = l_block;
+ return n_keys;
+}
+
+// Main explanation of the merge algorithm.
+//
+// csqrtlen = ceil(sqrt(len));
+//
+// * First, csqrtlen [to be used as buffer] + (len/csqrtlen - 1) [to be used as keys] => to_collect
+// unique elements are extracted from elements to be sorted and placed in the beginning of the range.
+//
+// * Step "combine_blocks": the leading (len1-to_collect) elements plus trailing len2 elements
+// are merged with a non-trivial ("smart") algorithm to form an ordered range trailing "len-to_collect" elements.
+//
+// Explanation of the "combine_blocks" step:
+//
+// * Trailing [first+to_collect, first+len1) elements are divided in groups of cqrtlen elements.
+// Remaining elements that can't form a group are grouped in front of those elements.
+// * Trailing [first+len1, first+len1+len2) elements are divided in groups of cqrtlen elements.
+// Remaining elements that can't form a group are grouped in the back of those elements.
+// * In parallel the following two steps are performed:
+// * Groups are selection-sorted by first or last element (depending whether they are going
+// to be merged to left or right) and keys are reordered accordingly as an imitation-buffer.
+// * Elements of each block pair are merged using the csqrtlen buffer taking into account
+// if they belong to the first half or second half (marked by the key).
+//
+// * In the final merge step leading "to_collect" elements are merged with rotations
+// with the rest of merged elements in the "combine_blocks" step.
+//
+// Corner cases:
+//
+// * If no "to_collect" elements can be extracted:
+//
+// * If more than a minimum number of elements is extracted
+// then reduces the number of elements used as buffer and keys in the
+// and "combine_blocks" steps. If "combine_blocks" has no enough keys due to this reduction
+// then uses a rotation based smart merge.
+//
+// * If the minimum number of keys can't be extracted, a rotation-based merge is performed.
+//
+// * If auxiliary memory is more or equal than min(len1, len2), a buffered merge is performed.
+//
+// * If the len1 or len2 are less than 2*csqrtlen then a rotation-based merge is performed.
+//
+// * If auxiliary memory is more than csqrtlen+n_keys*sizeof(std::size_t),
+// then no csqrtlen need to be extracted and "combine_blocks" will use integral
+// keys to combine blocks.
+template<class RandIt, class Compare, class XBuf>
+void adaptive_merge_impl
+ ( RandIt first
+ , typename iterator_traits<RandIt>::size_type len1
+ , typename iterator_traits<RandIt>::size_type len2
+ , Compare comp
+ , XBuf & xbuf
+ )
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ if(xbuf.capacity() >= min_value<size_type>(len1, len2)){
+ buffered_merge(first, first+len1, first+(len1+len2), comp, xbuf);
+ }
+ else{
+ const size_type len = len1+len2;
+ //Calculate ideal parameters and try to collect needed unique keys
+ size_type l_block = size_type(ceil_sqrt(len));
+
+ //One range is not big enough to extract keys and the internal buffer so a
+ //rotation-based based merge will do just fine
+ if(len1 <= l_block*2 || len2 <= l_block*2){
+ merge_bufferless(first, first+len1, first+len1+len2, comp);
+ return;
+ }
+
+ //Detail the number of keys and internal buffer. If xbuf has enough memory, no
+ //internal buffer is needed so l_intbuf will remain 0.
+ size_type l_intbuf = 0;
+ size_type n_keys = adaptive_merge_n_keys_intbuf(l_block, len1, len2, xbuf, l_intbuf);
+ size_type const to_collect = l_intbuf+n_keys;
+ //Try to extract needed unique values from the first range
+ size_type const collected = collect_unique(first, first+len1, to_collect, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1("\n A collect: ", len);
+
+ //Not the minimum number of keys is not available on the first range, so fallback to rotations
+ if(collected != to_collect && collected < 4){
+ merge_bufferless(first, first+collected, first+len1, comp);
+ merge_bufferless(first, first + len1, first + len1 + len2, comp);
+ return;
+ }
+
+ //If not enough keys but more than minimum, adjust the internal buffer and key count
+ bool use_internal_buf = collected == to_collect;
+ if (!use_internal_buf){
+ l_intbuf = 0u;
+ n_keys = collected;
+ l_block = lblock_for_combine(l_intbuf, n_keys, len, use_internal_buf);
+ //If use_internal_buf is false, then then internal buffer will be zero and rotation-based combination will be used
+ l_intbuf = use_internal_buf ? l_block : 0u;
+ }
+
+ bool const xbuf_used = collected == to_collect && xbuf.capacity() >= l_block;
+ //Merge trailing elements using smart merges
+ adaptive_merge_combine_blocks(first, len1, len2, collected, n_keys, l_block, use_internal_buf, xbuf_used, comp, xbuf);
+ //Merge buffer and keys with the rest of the values
+ adaptive_merge_final_merge (first, len1, len2, collected, l_intbuf, l_block, use_internal_buf, xbuf_used, comp, xbuf);
+ }
+}
+
+} //namespace detail_adaptive {
+
+///@endcond
+
+//! <b>Effects</b>: Merges two consecutive sorted ranges [first, middle) and [middle, last)
+//! into one sorted range [first, last) according to the given comparison function comp.
+//! The algorithm is stable (if there are equivalent elements in the original two ranges,
+//! the elements from the first range (preserving their original order) precede the elements
+//! from the second range (preserving their original order).
+//!
+//! <b>Requires</b>:
+//! - RandIt must meet the requirements of ValueSwappable and RandomAccessIterator.
+//! - The type of dereferenced RandIt must meet the requirements of MoveAssignable and MoveConstructible.
+//!
+//! <b>Parameters</b>:
+//! - first: the beginning of the first sorted range.
+//! - middle: the end of the first sorted range and the beginning of the second
+//! - last: the end of the second sorted range
+//! - comp: comparison function object which returns true if the first argument is is ordered before the second.
+//! - uninitialized, uninitialized_len: raw storage starting on "uninitialized", able to hold "uninitialized_len"
+//! elements of type iterator_traits<RandIt>::value_type. Maximum performance is achieved when uninitialized_len
+//! is min(std::distance(first, middle), std::distance(middle, last)).
+//!
+//! <b>Throws</b>: If comp throws or the move constructor, move assignment or swap of the type
+//! of dereferenced RandIt throws.
+//!
+//! <b>Complexity</b>: Always K x O(N) comparisons and move assignments/constructors/swaps.
+//! Constant factor for comparisons and data movement is minimized when uninitialized_len
+//! is min(std::distance(first, middle), std::distance(middle, last)).
+//! Pretty good enough performance is achieved when uninitialized_len is
+//! ceil(sqrt(std::distance(first, last)))*2.
+//!
+//! <b>Caution</b>: Experimental implementation, not production-ready.
+template<class RandIt, class Compare>
+void adaptive_merge( RandIt first, RandIt middle, RandIt last, Compare comp
+ , typename iterator_traits<RandIt>::value_type* uninitialized = 0
+ , typename iterator_traits<RandIt>::size_type uninitialized_len = 0)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+
+ if (first == middle || middle == last){
+ return;
+ }
+
+ //Reduce ranges to merge if possible
+ do {
+ if (comp(*middle, *first)){
+ break;
+ }
+ ++first;
+ if (first == middle)
+ return;
+ } while(1);
+
+ RandIt first_high(middle);
+ --first_high;
+ do {
+ --last;
+ if (comp(*last, *first_high)){
+ ++last;
+ break;
+ }
+ if (last == middle)
+ return;
+ } while(1);
+
+ ::boost::movelib::adaptive_xbuf<value_type, value_type*, size_type> xbuf(uninitialized, size_type(uninitialized_len));
+ ::boost::movelib::detail_adaptive::adaptive_merge_impl(first, size_type(middle - first), size_type(last - middle), comp, xbuf);
+}
+
+} //namespace movelib {
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#define BOOST_MOVE_ADAPTIVE_MERGE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/move/algo/adaptive_sort.hpp b/src/third_party/boost-1.70.0/boost/move/algo/adaptive_sort.hpp
new file mode 100644
index 00000000000..581939937cc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/algo/adaptive_sort.hpp
@@ -0,0 +1,631 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_MOVE_ADAPTIVE_SORT_HPP
+#define BOOST_MOVE_ADAPTIVE_SORT_HPP
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/algo/detail/adaptive_sort_merge.hpp>
+
+namespace boost {
+namespace movelib {
+
+///@cond
+namespace detail_adaptive {
+
+template<class RandIt>
+void move_data_backward( RandIt cur_pos
+ , typename iterator_traits<RandIt>::size_type const l_data
+ , RandIt new_pos
+ , bool const xbuf_used)
+{
+ //Move buffer to the total combination right
+ if(xbuf_used){
+ boost::move_backward(cur_pos, cur_pos+l_data, new_pos+l_data);
+ }
+ else{
+ boost::adl_move_swap_ranges_backward(cur_pos, cur_pos+l_data, new_pos+l_data);
+ //Rotate does less moves but it seems slower due to cache issues
+ //rotate_gcd(first-l_block, first+len-l_block, first+len);
+ }
+}
+
+template<class RandIt>
+void move_data_forward( RandIt cur_pos
+ , typename iterator_traits<RandIt>::size_type const l_data
+ , RandIt new_pos
+ , bool const xbuf_used)
+{
+ //Move buffer to the total combination right
+ if(xbuf_used){
+ boost::move(cur_pos, cur_pos+l_data, new_pos);
+ }
+ else{
+ boost::adl_move_swap_ranges(cur_pos, cur_pos+l_data, new_pos);
+ //Rotate does less moves but it seems slower due to cache issues
+ //rotate_gcd(first-l_block, first+len-l_block, first+len);
+ }
+}
+
+// build blocks of length 2*l_build_buf. l_build_buf is power of two
+// input: [0, l_build_buf) elements are buffer, rest unsorted elements
+// output: [0, l_build_buf) elements are buffer, blocks 2*l_build_buf and last subblock sorted
+//
+// First elements are merged from right to left until elements start
+// at first. All old elements [first, first + l_build_buf) are placed at the end
+// [first+len-l_build_buf, first+len). To achieve this:
+// - If we have external memory to merge, we save elements from the buffer
+// so that a non-swapping merge is used. Buffer elements are restored
+// at the end of the buffer from the external memory.
+//
+// - When the external memory is not available or it is insufficient
+// for a merge operation, left swap merging is used.
+//
+// Once elements are merged left to right in blocks of l_build_buf, then a single left
+// to right merge step is performed to achieve merged blocks of size 2K.
+// If external memory is available, usual merge is used, swap merging otherwise.
+//
+// As a last step, if auxiliary memory is available in-place merge is performed.
+// until all is merged or auxiliary memory is not large enough.
+template<class RandIt, class Compare, class XBuf>
+typename iterator_traits<RandIt>::size_type
+ adaptive_sort_build_blocks
+ ( RandIt const first
+ , typename iterator_traits<RandIt>::size_type const len
+ , typename iterator_traits<RandIt>::size_type const l_base
+ , typename iterator_traits<RandIt>::size_type const l_build_buf
+ , XBuf & xbuf
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ BOOST_ASSERT(l_build_buf <= len);
+ BOOST_ASSERT(0 == ((l_build_buf / l_base)&(l_build_buf/l_base-1)));
+
+ //Place the start pointer after the buffer
+ RandIt first_block = first + l_build_buf;
+ size_type const elements_in_blocks = len - l_build_buf;
+
+ //////////////////////////////////
+ // Start of merge to left step
+ //////////////////////////////////
+ size_type l_merged = 0u;
+
+ BOOST_ASSERT(l_build_buf);
+ //If there is no enough buffer for the insertion sort step, just avoid the external buffer
+ size_type kbuf = min_value<size_type>(l_build_buf, size_type(xbuf.capacity()));
+ kbuf = kbuf < l_base ? 0 : kbuf;
+
+ if(kbuf){
+ //Backup internal buffer values in external buffer so they can be overwritten
+ xbuf.move_assign(first+l_build_buf-kbuf, kbuf);
+ l_merged = op_insertion_sort_step_left(first_block, elements_in_blocks, l_base, comp, move_op());
+
+ //Now combine them using the buffer. Elements from buffer can be
+ //overwritten since they've been saved to xbuf
+ l_merged = op_merge_left_step_multiple
+ ( first_block - l_merged, elements_in_blocks, l_merged, l_build_buf, kbuf - l_merged, comp, move_op());
+
+ //Restore internal buffer from external buffer unless kbuf was l_build_buf,
+ //in that case restoration will happen later
+ if(kbuf != l_build_buf){
+ boost::move(xbuf.data()+kbuf-l_merged, xbuf.data() + kbuf, first_block-l_merged+elements_in_blocks);
+ }
+ }
+ else{
+ l_merged = insertion_sort_step(first_block, elements_in_blocks, l_base, comp);
+ rotate_gcd(first_block - l_merged, first_block, first_block+elements_in_blocks);
+ }
+
+ //Now combine elements using the buffer. Elements from buffer can't be
+ //overwritten since xbuf was not big enough, so merge swapping elements.
+ l_merged = op_merge_left_step_multiple
+ (first_block - l_merged, elements_in_blocks, l_merged, l_build_buf, l_build_buf - l_merged, comp, swap_op());
+
+ BOOST_ASSERT(l_merged == l_build_buf);
+
+ //////////////////////////////////
+ // Start of merge to right step
+ //////////////////////////////////
+
+ //If kbuf is l_build_buf then we can merge right without swapping
+ //Saved data is still in xbuf
+ if(kbuf && kbuf == l_build_buf){
+ op_merge_right_step_once(first, elements_in_blocks, l_build_buf, comp, move_op());
+ //Restore internal buffer from external buffer if kbuf was l_build_buf.
+ //as this operation was previously delayed.
+ boost::move(xbuf.data(), xbuf.data() + kbuf, first);
+ }
+ else{
+ op_merge_right_step_once(first, elements_in_blocks, l_build_buf, comp, swap_op());
+ }
+ xbuf.clear();
+ //2*l_build_buf or total already merged
+ return min_value<size_type>(elements_in_blocks, 2*l_build_buf);
+}
+
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class XBuf>
+void adaptive_sort_combine_blocks
+ ( RandItKeys const keys
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const len
+ , typename iterator_traits<RandIt>::size_type const l_prev_merged
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , bool const use_buf
+ , bool const xbuf_used
+ , XBuf & xbuf
+ , Compare comp
+ , bool merge_left)
+{
+ (void)xbuf;
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ size_type const l_reg_combined = 2*l_prev_merged;
+ size_type l_irreg_combined = 0;
+ size_type const l_total_combined = calculate_total_combined(len, l_prev_merged, &l_irreg_combined);
+ size_type const n_reg_combined = len/l_reg_combined;
+ RandIt combined_first = first;
+
+ (void)l_total_combined;
+ BOOST_ASSERT(l_total_combined <= len);
+
+ size_type const max_i = n_reg_combined + (l_irreg_combined != 0);
+
+ if(merge_left || !use_buf) {
+ for( size_type combined_i = 0; combined_i != max_i; ++combined_i, combined_first += l_reg_combined) {
+ //Now merge blocks
+ bool const is_last = combined_i==n_reg_combined;
+ size_type const l_cur_combined = is_last ? l_irreg_combined : l_reg_combined;
+
+ range_xbuf<RandIt, size_type, move_op> rbuf( (use_buf && xbuf_used) ? (combined_first-l_block) : combined_first, combined_first);
+ size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
+ combine_params( keys, key_comp, l_cur_combined
+ , l_prev_merged, l_block, rbuf
+ , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combpar: ", len + l_block);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(combined_first, combined_first + n_block_a*l_block+l_irreg1, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(combined_first + n_block_a*l_block+l_irreg1, combined_first + n_block_a*l_block+l_irreg1+n_block_b*l_block+l_irreg2, comp));
+ if(!use_buf){
+ merge_blocks_bufferless
+ (keys, key_comp, combined_first, l_block, 0u, n_block_a, n_block_b, l_irreg2, comp);
+ }
+ else{
+ merge_blocks_left
+ (keys, key_comp, combined_first, l_block, 0u, n_block_a, n_block_b, l_irreg2, comp, xbuf_used);
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" After merge_blocks_L: ", len + l_block);
+ }
+ }
+ else{
+ combined_first += l_reg_combined*(max_i-1);
+ for( size_type combined_i = max_i; combined_i--; combined_first -= l_reg_combined) {
+ bool const is_last = combined_i==n_reg_combined;
+ size_type const l_cur_combined = is_last ? l_irreg_combined : l_reg_combined;
+
+ RandIt const combined_last(combined_first+l_cur_combined);
+ range_xbuf<RandIt, size_type, move_op> rbuf(combined_last, xbuf_used ? (combined_last+l_block) : combined_last);
+ size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
+ combine_params( keys, key_comp, l_cur_combined
+ , l_prev_merged, l_block, rbuf
+ , n_block_a, n_block_b, l_irreg1, l_irreg2); //Outputs
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combpar: ", len + l_block);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(combined_first, combined_first + n_block_a*l_block+l_irreg1, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(combined_first + n_block_a*l_block+l_irreg1, combined_first + n_block_a*l_block+l_irreg1+n_block_b*l_block+l_irreg2, comp));
+ merge_blocks_right
+ (keys, key_comp, combined_first, l_block, n_block_a, n_block_b, l_irreg2, comp, xbuf_used);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" After merge_blocks_R: ", len + l_block);
+ }
+ }
+}
+
+//Returns true if buffer is placed in
+//[buffer+len-l_intbuf, buffer+len). Otherwise, buffer is
+//[buffer,buffer+l_intbuf)
+template<class RandIt, class Compare, class XBuf>
+bool adaptive_sort_combine_all_blocks
+ ( RandIt keys
+ , typename iterator_traits<RandIt>::size_type &n_keys
+ , RandIt const buffer
+ , typename iterator_traits<RandIt>::size_type const l_buf_plus_data
+ , typename iterator_traits<RandIt>::size_type l_merged
+ , typename iterator_traits<RandIt>::size_type &l_intbuf
+ , XBuf & xbuf
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ RandIt const first = buffer + l_intbuf;
+ size_type const l_data = l_buf_plus_data - l_intbuf;
+ size_type const l_unique = l_intbuf+n_keys;
+ //Backup data to external buffer once if possible
+ bool const common_xbuf = l_data > l_merged && l_intbuf && l_intbuf <= xbuf.capacity();
+ if(common_xbuf){
+ xbuf.move_assign(buffer, l_intbuf);
+ }
+
+ bool prev_merge_left = true;
+ size_type l_prev_total_combined = l_merged, l_prev_block = 0;
+ bool prev_use_internal_buf = true;
+
+ for( size_type n = 0; l_data > l_merged
+ ; l_merged*=2
+ , ++n){
+ //If l_intbuf is non-zero, use that internal buffer.
+ // Implies l_block == l_intbuf && use_internal_buf == true
+ //If l_intbuf is zero, see if half keys can be reused as a reduced emergency buffer,
+ // Implies l_block == n_keys/2 && use_internal_buf == true
+ //Otherwise, just give up and and use all keys to merge using rotations (use_internal_buf = false)
+ bool use_internal_buf = false;
+ size_type const l_block = lblock_for_combine(l_intbuf, n_keys, size_type(2*l_merged), use_internal_buf);
+ BOOST_ASSERT(!l_intbuf || (l_block == l_intbuf));
+ BOOST_ASSERT(n == 0 || (!use_internal_buf || prev_use_internal_buf) );
+ BOOST_ASSERT(n == 0 || (!use_internal_buf || l_prev_block == l_block) );
+
+ bool const is_merge_left = (n&1) == 0;
+ size_type const l_total_combined = calculate_total_combined(l_data, l_merged);
+ if(n && prev_use_internal_buf && prev_merge_left){
+ if(is_merge_left || !use_internal_buf){
+ move_data_backward(first-l_prev_block, l_prev_total_combined, first, common_xbuf);
+ }
+ else{
+ //Put the buffer just after l_total_combined
+ RandIt const buf_end = first+l_prev_total_combined;
+ RandIt const buf_beg = buf_end-l_block;
+ if(l_prev_total_combined > l_total_combined){
+ size_type const l_diff = l_prev_total_combined - l_total_combined;
+ move_data_backward(buf_beg-l_diff, l_diff, buf_end-l_diff, common_xbuf);
+ }
+ else if(l_prev_total_combined < l_total_combined){
+ size_type const l_diff = l_total_combined - l_prev_total_combined;
+ move_data_forward(buf_end, l_diff, buf_beg, common_xbuf);
+ }
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" After move_data : ", l_data + l_intbuf);
+ }
+
+ //Combine to form l_merged*2 segments
+ if(n_keys){
+ size_type upper_n_keys_this_iter = 2*l_merged/l_block;
+ if(upper_n_keys_this_iter > 256){
+ adaptive_sort_combine_blocks
+ ( keys, comp, !use_internal_buf || is_merge_left ? first : first-l_block
+ , l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
+ }
+ else{
+ unsigned char uint_keys[256];
+ adaptive_sort_combine_blocks
+ ( uint_keys, less(), !use_internal_buf || is_merge_left ? first : first-l_block
+ , l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
+ }
+ }
+ else{
+ size_type *const uint_keys = xbuf.template aligned_trailing<size_type>();
+ adaptive_sort_combine_blocks
+ ( uint_keys, less(), !use_internal_buf || is_merge_left ? first : first-l_block
+ , l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
+ }
+
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(is_merge_left ? " After comb blocks L: " : " After comb blocks R: ", l_data + l_intbuf);
+ prev_merge_left = is_merge_left;
+ l_prev_total_combined = l_total_combined;
+ l_prev_block = l_block;
+ prev_use_internal_buf = use_internal_buf;
+ }
+ BOOST_ASSERT(l_prev_total_combined == l_data);
+ bool const buffer_right = prev_use_internal_buf && prev_merge_left;
+
+ l_intbuf = prev_use_internal_buf ? l_prev_block : 0u;
+ n_keys = l_unique - l_intbuf;
+ //Restore data from to external common buffer if used
+ if(common_xbuf){
+ if(buffer_right){
+ boost::move(xbuf.data(), xbuf.data() + l_intbuf, buffer+l_data);
+ }
+ else{
+ boost::move(xbuf.data(), xbuf.data() + l_intbuf, buffer);
+ }
+ }
+ return buffer_right;
+}
+
+
+template<class RandIt, class Compare, class XBuf>
+void adaptive_sort_final_merge( bool buffer_right
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_intbuf
+ , typename iterator_traits<RandIt>::size_type const n_keys
+ , typename iterator_traits<RandIt>::size_type const len
+ , XBuf & xbuf
+ , Compare comp)
+{
+ //BOOST_ASSERT(n_keys || xbuf.size() == l_intbuf);
+ xbuf.clear();
+
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const n_key_plus_buf = l_intbuf+n_keys;
+ if(buffer_right){
+ //Use stable sort as some buffer elements might not be unique (see non_unique_buf)
+ stable_sort(first+len-l_intbuf, first+len, comp, xbuf);
+ stable_merge(first+n_keys, first+len-l_intbuf, first+len, antistable<Compare>(comp), xbuf);
+ unstable_sort(first, first+n_keys, comp, xbuf);
+ stable_merge(first, first+n_keys, first+len, comp, xbuf);
+ }
+ else{
+ //Use stable sort as some buffer elements might not be unique (see non_unique_buf)
+ stable_sort(first, first+n_key_plus_buf, comp, xbuf);
+ if(xbuf.capacity() >= n_key_plus_buf){
+ buffered_merge(first, first+n_key_plus_buf, first+len, comp, xbuf);
+ }
+ else if(xbuf.capacity() >= min_value<size_type>(l_intbuf, n_keys)){
+ stable_merge(first+n_keys, first+n_key_plus_buf, first+len, comp, xbuf);
+ stable_merge(first, first+n_keys, first+len, comp, xbuf);
+ }
+ else{
+ stable_merge(first, first+n_key_plus_buf, first+len, comp, xbuf);
+ }
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" After final_merge : ", len);
+}
+
+template<class RandIt, class Compare, class Unsigned, class XBuf>
+bool adaptive_sort_build_params
+ (RandIt first, Unsigned const len, Compare comp
+ , Unsigned &n_keys, Unsigned &l_intbuf, Unsigned &l_base, Unsigned &l_build_buf
+ , XBuf & xbuf
+ )
+{
+ typedef Unsigned size_type;
+
+ //Calculate ideal parameters and try to collect needed unique keys
+ l_base = 0u;
+
+ //Try to find a value near sqrt(len) that is 2^N*l_base where
+ //l_base <= AdaptiveSortInsertionSortThreshold. This property is important
+ //as build_blocks merges to the left iteratively duplicating the
+ //merged size and all the buffer must be used just before the final
+ //merge to right step. This guarantees "build_blocks" produces
+ //segments of size l_build_buf*2, maximizing the classic merge phase.
+ l_intbuf = size_type(ceil_sqrt_multiple(len, &l_base));
+
+ //The internal buffer can be expanded if there is enough external memory
+ while(xbuf.capacity() >= l_intbuf*2){
+ l_intbuf *= 2;
+ }
+
+ //This is the minimum number of keys to implement the ideal algorithm
+ //
+ //l_intbuf is used as buffer plus the key count
+ size_type n_min_ideal_keys = l_intbuf-1;
+ while(n_min_ideal_keys >= (len-l_intbuf-n_min_ideal_keys)/l_intbuf){
+ --n_min_ideal_keys;
+ }
+ n_min_ideal_keys += 1;
+ BOOST_ASSERT(n_min_ideal_keys <= l_intbuf);
+
+ if(xbuf.template supports_aligned_trailing<size_type>(l_intbuf, (len-l_intbuf-1)/l_intbuf+1)){
+ n_keys = 0u;
+ l_build_buf = l_intbuf;
+ }
+ else{
+ //Try to achieve a l_build_buf of length l_intbuf*2, so that we can merge with that
+ //l_intbuf*2 buffer in "build_blocks" and use half of them as buffer and the other half
+ //as keys in combine_all_blocks. In that case n_keys >= n_min_ideal_keys but by a small margin.
+ //
+ //If available memory is 2*sqrt(l), then only sqrt(l) unique keys are needed,
+ //(to be used for keys in combine_all_blocks) as the whole l_build_buf
+ //will be backuped in the buffer during build_blocks.
+ bool const non_unique_buf = xbuf.capacity() >= l_intbuf;
+ size_type const to_collect = non_unique_buf ? n_min_ideal_keys : l_intbuf*2;
+ size_type collected = collect_unique(first, first+len, to_collect, comp, xbuf);
+
+ //If available memory is 2*sqrt(l), then for "build_params"
+ //the situation is the same as if 2*l_intbuf were collected.
+ if(non_unique_buf && collected == n_min_ideal_keys){
+ l_build_buf = l_intbuf;
+ n_keys = n_min_ideal_keys;
+ }
+ else if(collected == 2*l_intbuf){
+ //l_intbuf*2 elements found. Use all of them in the build phase
+ l_build_buf = l_intbuf*2;
+ n_keys = l_intbuf;
+ }
+ else if(collected == (n_min_ideal_keys+l_intbuf)){
+ l_build_buf = l_intbuf;
+ n_keys = n_min_ideal_keys;
+ }
+ //If collected keys are not enough, try to fix n_keys and l_intbuf. If no fix
+ //is possible (due to very low unique keys), then go to a slow sort based on rotations.
+ else{
+ BOOST_ASSERT(collected < (n_min_ideal_keys+l_intbuf));
+ if(collected < 4){ //No combination possible with less that 4 keys
+ return false;
+ }
+ n_keys = l_intbuf;
+ while(n_keys&(n_keys-1)){
+ n_keys &= n_keys-1; // make it power or 2
+ }
+ while(n_keys > collected){
+ n_keys/=2;
+ }
+ //AdaptiveSortInsertionSortThreshold is always power of two so the minimum is power of two
+ l_base = min_value<Unsigned>(n_keys, AdaptiveSortInsertionSortThreshold);
+ l_intbuf = 0;
+ l_build_buf = n_keys;
+ }
+ BOOST_ASSERT((n_keys+l_intbuf) >= l_build_buf);
+ }
+
+ return true;
+}
+
+// Main explanation of the sort algorithm.
+//
+// csqrtlen = ceil(sqrt(len));
+//
+// * First, 2*csqrtlen unique elements elements are extracted from elements to be
+// sorted and placed in the beginning of the range.
+//
+// * Step "build_blocks": In this nearly-classic merge step, 2*csqrtlen unique elements
+// will be used as auxiliary memory, so trailing len-2*csqrtlen elements are
+// are grouped in blocks of sorted 4*csqrtlen elements. At the end of the step
+// 2*csqrtlen unique elements are again the leading elements of the whole range.
+//
+// * Step "combine_blocks": pairs of previously formed blocks are merged with a different
+// ("smart") algorithm to form blocks of 8*csqrtlen elements. This step is slower than the
+// "build_blocks" step and repeated iteratively (forming blocks of 16*csqrtlen, 32*csqrtlen
+// elements, etc) of until all trailing (len-2*csqrtlen) elements are merged.
+//
+// In "combine_blocks" len/csqrtlen elements used are as "keys" (markers) to
+// know if elements belong to the first or second block to be merged and another
+// leading csqrtlen elements are used as buffer. Explanation of the "combine_blocks" step:
+//
+// Iteratively until all trailing (len-2*csqrtlen) elements are merged:
+// Iteratively for each pair of previously merged block:
+// * Blocks are divided groups of csqrtlen elements and
+// 2*merged_block/csqrtlen keys are sorted to be used as markers
+// * Groups are selection-sorted by first or last element (depending whether they are going
+// to be merged to left or right) and keys are reordered accordingly as an imitation-buffer.
+// * Elements of each block pair are merged using the csqrtlen buffer taking into account
+// if they belong to the first half or second half (marked by the key).
+//
+// * In the final merge step leading elements (2*csqrtlen) are sorted and merged with
+// rotations with the rest of sorted elements in the "combine_blocks" step.
+//
+// Corner cases:
+//
+// * If no 2*csqrtlen elements can be extracted:
+//
+// * If csqrtlen+len/csqrtlen are extracted, then only csqrtlen elements are used
+// as buffer in the "build_blocks" step forming blocks of 2*csqrtlen elements. This
+// means that an additional "combine_blocks" step will be needed to merge all elements.
+//
+// * If no csqrtlen+len/csqrtlen elements can be extracted, but still more than a minimum,
+// then reduces the number of elements used as buffer and keys in the "build_blocks"
+// and "combine_blocks" steps. If "combine_blocks" has no enough keys due to this reduction
+// then uses a rotation based smart merge.
+//
+// * If the minimum number of keys can't be extracted, a rotation-based sorting is performed.
+//
+// * If auxiliary memory is more or equal than ceil(len/2), half-copying mergesort is used.
+//
+// * If auxiliary memory is more than csqrtlen+n_keys*sizeof(std::size_t),
+// then only csqrtlen elements need to be extracted and "combine_blocks" will use integral
+// keys to combine blocks.
+//
+// * If auxiliary memory is available, the "build_blocks" will be extended to build bigger blocks
+// using classic merge and "combine_blocks" will use bigger blocks when merging.
+template<class RandIt, class Compare, class XBuf>
+void adaptive_sort_impl
+ ( RandIt first
+ , typename iterator_traits<RandIt>::size_type const len
+ , Compare comp
+ , XBuf & xbuf
+ )
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ //Small sorts go directly to insertion sort
+ if(len <= size_type(AdaptiveSortInsertionSortThreshold)){
+ insertion_sort(first, first + len, comp);
+ }
+ else if((len-len/2) <= xbuf.capacity()){
+ merge_sort(first, first+len, comp, xbuf.data());
+ }
+ else{
+ //Make sure it is at least four
+ BOOST_STATIC_ASSERT(AdaptiveSortInsertionSortThreshold >= 4);
+
+ size_type l_base = 0;
+ size_type l_intbuf = 0;
+ size_type n_keys = 0;
+ size_type l_build_buf = 0;
+
+ //Calculate and extract needed unique elements. If a minimum is not achieved
+ //fallback to a slow stable sort
+ if(!adaptive_sort_build_params(first, len, comp, n_keys, l_intbuf, l_base, l_build_buf, xbuf)){
+ stable_sort(first, first+len, comp, xbuf);
+ }
+ else{
+ BOOST_ASSERT(l_build_buf);
+ //Otherwise, continue the adaptive_sort
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1("\n After collect_unique: ", len);
+ size_type const n_key_plus_buf = l_intbuf+n_keys;
+ //l_build_buf is always power of two if l_intbuf is zero
+ BOOST_ASSERT(l_intbuf || (0 == (l_build_buf & (l_build_buf-1))));
+
+ //Classic merge sort until internal buffer and xbuf are exhausted
+ size_type const l_merged = adaptive_sort_build_blocks
+ (first+n_key_plus_buf-l_build_buf, len-n_key_plus_buf+l_build_buf, l_base, l_build_buf, xbuf, comp);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(" After build_blocks: ", len);
+
+ //Non-trivial merge
+ bool const buffer_right = adaptive_sort_combine_all_blocks
+ (first, n_keys, first+n_keys, len-n_keys, l_merged, l_intbuf, xbuf, comp);
+
+ //Sort keys and buffer and merge the whole sequence
+ adaptive_sort_final_merge(buffer_right, first, l_intbuf, n_keys, len, xbuf, comp);
+ }
+ }
+}
+
+} //namespace detail_adaptive {
+
+///@endcond
+
+//! <b>Effects</b>: Sorts the elements in the range [first, last) in ascending order according
+//! to comparison functor "comp". The sort is stable (order of equal elements
+//! is guaranteed to be preserved). Performance is improved if additional raw storage is
+//! provided.
+//!
+//! <b>Requires</b>:
+//! - RandIt must meet the requirements of ValueSwappable and RandomAccessIterator.
+//! - The type of dereferenced RandIt must meet the requirements of MoveAssignable and MoveConstructible.
+//!
+//! <b>Parameters</b>:
+//! - first, last: the range of elements to sort
+//! - comp: comparison function object which returns true if the first argument is is ordered before the second.
+//! - uninitialized, uninitialized_len: raw storage starting on "uninitialized", able to hold "uninitialized_len"
+//! elements of type iterator_traits<RandIt>::value_type. Maximum performance is achieved when uninitialized_len
+//! is ceil(std::distance(first, last)/2).
+//!
+//! <b>Throws</b>: If comp throws or the move constructor, move assignment or swap of the type
+//! of dereferenced RandIt throws.
+//!
+//! <b>Complexity</b>: Always K x O(Nxlog(N)) comparisons and move assignments/constructors/swaps.
+//! Comparisons are close to minimum even with no additional memory. Constant factor for data movement is minimized
+//! when uninitialized_len is ceil(std::distance(first, last)/2). Pretty good enough performance is achieved when
+//! ceil(sqrt(std::distance(first, last)))*2.
+//!
+//! <b>Caution</b>: Experimental implementation, not production-ready.
+template<class RandIt, class RandRawIt, class Compare>
+void adaptive_sort( RandIt first, RandIt last, Compare comp
+ , RandRawIt uninitialized
+ , typename iterator_traits<RandIt>::size_type uninitialized_len)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+
+ ::boost::movelib::adaptive_xbuf<value_type, RandRawIt, size_type> xbuf(uninitialized, uninitialized_len);
+ ::boost::movelib::detail_adaptive::adaptive_sort_impl(first, size_type(last - first), comp, xbuf);
+}
+
+template<class RandIt, class Compare>
+void adaptive_sort( RandIt first, RandIt last, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+ adaptive_sort(first, last, comp, (value_type*)0, 0u);
+}
+
+} //namespace movelib {
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#define BOOST_MOVE_ADAPTIVE_SORT_HPP
diff --git a/src/third_party/boost-1.70.0/boost/move/algo/detail/adaptive_sort_merge.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/adaptive_sort_merge.hpp
new file mode 100644
index 00000000000..60ef24a3535
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/adaptive_sort_merge.hpp
@@ -0,0 +1,1475 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// Stable sorting that works in O(N*log(N)) worst time
+// and uses O(1) extra memory
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// The main idea of the adaptive_sort algorithm was developed by Andrey Astrelin
+// and explained in the article from the russian collaborative blog
+// Habrahabr (http://habrahabr.ru/post/205290/). The algorithm is based on
+// ideas from B-C. Huang and M. A. Langston explained in their article
+// "Fast Stable Merging and Sorting in Constant Extra Space (1989-1992)"
+// (http://comjnl.oxfordjournals.org/content/35/6/643.full.pdf).
+//
+// This implementation by Ion Gaztanaga uses previous ideas with additional changes:
+//
+// - Use of GCD-based rotation.
+// - Non power of two buffer-sizes.
+// - Tries to find sqrt(len)*2 unique keys, so that the merge sort
+// phase can form up to sqrt(len)*4 segments if enough keys are found.
+// - The merge-sort phase can take advantage of external memory to
+// save some additional combination steps.
+// - Combination phase: Blocks are selection sorted and merged in parallel.
+// - The combination phase is performed alternating merge to left and merge
+// to right phases minimizing swaps due to internal buffer repositioning.
+// - When merging blocks special optimizations are made to avoid moving some
+// elements twice.
+//
+// The adaptive_merge algorithm was developed by Ion Gaztanaga reusing some parts
+// from the sorting algorithm and implementing an additional block merge algorithm
+// without moving elements to left or right.
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
+#define BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/reverse_iterator.hpp>
+#include <boost/move/algo/move.hpp>
+#include <boost/move/algo/detail/merge.hpp>
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/algo/detail/insertion_sort.hpp>
+#include <boost/move/algo/detail/merge_sort.hpp>
+#include <boost/move/algo/detail/heap_sort.hpp>
+#include <boost/move/algo/detail/merge.hpp>
+#include <boost/move/algo/detail/is_sorted.hpp>
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+
+#ifndef BOOST_MOVE_ADAPTIVE_SORT_STATS_LEVEL
+ #define BOOST_MOVE_ADAPTIVE_SORT_STATS_LEVEL 1
+#endif
+
+#ifdef BOOST_MOVE_ADAPTIVE_SORT_STATS
+ #if BOOST_MOVE_ADAPTIVE_SORT_STATS_LEVEL == 2
+ #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(STR, L) \
+ print_stats(STR, L)\
+ //
+
+ #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(STR, L) \
+ print_stats(STR, L)\
+ //
+ #else
+ #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(STR, L) \
+ print_stats(STR, L)\
+ //
+
+ #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(STR, L)
+ #endif
+#else
+ #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1(STR, L)
+ #define BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(STR, L)
+#endif
+
+#ifdef BOOST_MOVE_ADAPTIVE_SORT_INVARIANTS
+ #define BOOST_MOVE_ADAPTIVE_SORT_INVARIANT BOOST_ASSERT
+#else
+ #define BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(L)
+#endif
+
+namespace boost {
+namespace movelib {
+
+#if defined(BOOST_MOVE_ADAPTIVE_SORT_INVARIANTS)
+
+bool is_sorted(::order_perf_type *first, ::order_perf_type *last, ::order_type_less)
+{
+ if (first != last) {
+ const order_perf_type *next = first, *cur(first);
+ while (++next != last) {
+ if (!(cur->key < next->key || (cur->key == next->key && cur->val < next->val)))
+ return false;
+ cur = next;
+ }
+ }
+ return true;
+}
+
+#endif //BOOST_MOVE_ADAPTIVE_SORT_INVARIANTS
+
+namespace detail_adaptive {
+
+static const std::size_t AdaptiveSortInsertionSortThreshold = 16;
+//static const std::size_t AdaptiveSortInsertionSortThreshold = 4;
+BOOST_STATIC_ASSERT((AdaptiveSortInsertionSortThreshold&(AdaptiveSortInsertionSortThreshold-1)) == 0);
+
+#if defined BOOST_HAS_INTPTR_T
+ typedef ::boost::uintptr_t uintptr_t;
+#else
+ typedef std::size_t uintptr_t;
+#endif
+
+template<class T>
+const T &min_value(const T &a, const T &b)
+{
+ return a < b ? a : b;
+}
+
+template<class T>
+const T &max_value(const T &a, const T &b)
+{
+ return a > b ? a : b;
+}
+
+template<class ForwardIt, class Pred, class V>
+typename iterator_traits<ForwardIt>::size_type
+ count_if_with(ForwardIt first, ForwardIt last, Pred pred, const V &v)
+{
+ typedef typename iterator_traits<ForwardIt>::size_type size_type;
+ size_type count = 0;
+ while(first != last) {
+ count += static_cast<size_type>(0 != pred(*first, v));
+ ++first;
+ }
+ return count;
+}
+
+
+template<class RandIt, class Compare>
+RandIt skip_until_merge
+ ( RandIt first1, RandIt const last1
+ , const typename iterator_traits<RandIt>::value_type &next_key, Compare comp)
+{
+ while(first1 != last1 && !comp(next_key, *first1)){
+ ++first1;
+ }
+ return first1;
+}
+
+
+template<class RandItKeys, class RandIt>
+void swap_and_update_key
+ ( RandItKeys const key_next
+ , RandItKeys const key_range2
+ , RandItKeys &key_mid
+ , RandIt const begin
+ , RandIt const end
+ , RandIt const with)
+{
+ if(begin != with){
+ ::boost::adl_move_swap_ranges(begin, end, with);
+ ::boost::adl_move_swap(*key_next, *key_range2);
+ if(key_next == key_mid){
+ key_mid = key_range2;
+ }
+ else if(key_mid == key_range2){
+ key_mid = key_next;
+ }
+ }
+}
+
+template<class RandItKeys>
+void update_key
+(RandItKeys const key_next
+ , RandItKeys const key_range2
+ , RandItKeys &key_mid)
+{
+ if (key_next != key_range2) {
+ ::boost::adl_move_swap(*key_next, *key_range2);
+ if (key_next == key_mid) {
+ key_mid = key_range2;
+ }
+ else if (key_mid == key_range2) {
+ key_mid = key_next;
+ }
+ }
+}
+
+template<class RandItKeys, class RandIt, class RandIt2, class Op>
+RandIt2 buffer_and_update_key
+(RandItKeys const key_next
+ , RandItKeys const key_range2
+ , RandItKeys &key_mid
+ , RandIt begin
+ , RandIt end
+ , RandIt with
+ , RandIt2 buffer
+ , Op op)
+{
+ if (begin != with) {
+ while(begin != end) {
+ op(three_way_t(), begin++, with++, buffer++);
+ }
+ ::boost::adl_move_swap(*key_next, *key_range2);
+ if (key_next == key_mid) {
+ key_mid = key_range2;
+ }
+ else if (key_mid == key_range2) {
+ key_mid = key_next;
+ }
+ }
+ return buffer;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// MERGE BUFFERLESS
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// [first1, last1) merge [last1,last2) -> [first1,last2)
+template<class RandIt, class Compare>
+RandIt partial_merge_bufferless_impl
+ (RandIt first1, RandIt last1, RandIt const last2, bool *const pis_range1_A, Compare comp)
+{
+ if(last1 == last2){
+ return first1;
+ }
+ bool const is_range1_A = *pis_range1_A;
+ if(first1 != last1 && comp(*last1, last1[-1])){
+ do{
+ RandIt const old_last1 = last1;
+ last1 = boost::movelib::lower_bound(last1, last2, *first1, comp);
+ first1 = rotate_gcd(first1, old_last1, last1);//old_last1 == last1 supported
+ if(last1 == last2){
+ return first1;
+ }
+ do{
+ ++first1;
+ } while(last1 != first1 && !comp(*last1, *first1) );
+ } while(first1 != last1);
+ }
+ *pis_range1_A = !is_range1_A;
+ return last1;
+}
+
+// [first1, last1) merge [last1,last2) -> [first1,last2)
+template<class RandIt, class Compare>
+RandIt partial_merge_bufferless
+ (RandIt first1, RandIt last1, RandIt const last2, bool *const pis_range1_A, Compare comp)
+{
+ return *pis_range1_A ? partial_merge_bufferless_impl(first1, last1, last2, pis_range1_A, comp)
+ : partial_merge_bufferless_impl(first1, last1, last2, pis_range1_A, antistable<Compare>(comp));
+}
+
+template<class SizeType>
+static SizeType needed_keys_count(SizeType n_block_a, SizeType n_block_b)
+{
+ return n_block_a + n_block_b;
+}
+
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
+typename iterator_traits<RandIt>::size_type
+ find_next_block
+ ( RandItKeys const key_first
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type const ix_first_block
+ , typename iterator_traits<RandIt>::size_type const ix_last_block
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+ typedef typename iterator_traits<RandItKeys>::value_type key_type;
+ BOOST_ASSERT(ix_first_block <= ix_last_block);
+ size_type ix_min_block = 0u;
+ for (size_type szt_i = ix_first_block; szt_i < ix_last_block; ++szt_i) {
+ const value_type &min_val = first[ix_min_block*l_block];
+ const value_type &cur_val = first[szt_i*l_block];
+ const key_type &min_key = key_first[ix_min_block];
+ const key_type &cur_key = key_first[szt_i];
+
+ bool const less_than_minimum = comp(cur_val, min_val) ||
+ (!comp(min_val, cur_val) && key_comp(cur_key, min_key));
+
+ if (less_than_minimum) {
+ ix_min_block = szt_i;
+ }
+ }
+ return ix_min_block;
+}
+
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
+void merge_blocks_bufferless
+ ( RandItKeys const key_first
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type const l_irreg1
+ , typename iterator_traits<RandIt>::size_type const n_block_a
+ , typename iterator_traits<RandIt>::size_type const n_block_b
+ , typename iterator_traits<RandIt>::size_type const l_irreg2
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const key_count = needed_keys_count(n_block_a, n_block_b); (void)key_count;
+ //BOOST_ASSERT(n_block_a || n_block_b);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted_and_unique(key_first, key_first + key_count, key_comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + key_count, key_comp, key_first[n_block_a]));
+
+ size_type n_bef_irreg2 = 0;
+ bool l_irreg_pos_count = true;
+ RandItKeys key_mid(key_first + n_block_a);
+ RandIt const first_irr2 = first + l_irreg1 + (n_block_a+n_block_b)*l_block;
+ RandIt const last_irr2 = first_irr2 + l_irreg2;
+
+ { //Selection sort blocks
+ size_type n_block_left = n_block_b + n_block_a;
+ RandItKeys key_range2(key_first);
+
+ size_type min_check = n_block_a == n_block_left ? 0u : n_block_a;
+ size_type max_check = min_value<size_type>(min_check+1, n_block_left);
+ for (RandIt f = first+l_irreg1; n_block_left; --n_block_left, ++key_range2, f += l_block, min_check -= min_check != 0, max_check -= max_check != 0) {
+ size_type const next_key_idx = find_next_block(key_range2, key_comp, f, l_block, min_check, max_check, comp);
+ RandItKeys const key_next(key_range2 + next_key_idx);
+ max_check = min_value<size_type>(max_value<size_type>(max_check, next_key_idx+size_type(2)), n_block_left);
+
+ RandIt const first_min = f + next_key_idx*l_block;
+
+ //Check if irregular b block should go here.
+ //If so, break to the special code handling the irregular block
+ if (l_irreg_pos_count && l_irreg2 && comp(*first_irr2, *first_min)){
+ l_irreg_pos_count = false;
+ }
+ n_bef_irreg2 += l_irreg_pos_count;
+
+ swap_and_update_key(key_next, key_range2, key_mid, f, f + l_block, first_min);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(f, f+l_block, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first_min, first_min + l_block, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT((f == (first+l_irreg1)) || !comp(*f, *(f-l_block)));
+ }
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first+l_irreg1+n_bef_irreg2*l_block, first_irr2, comp));
+
+ RandIt first1 = first;
+ RandIt last1 = first+l_irreg1;
+ RandItKeys const key_end (key_first+n_bef_irreg2);
+ bool is_range1_A = true;
+
+ for(RandItKeys key_next = key_first; key_next != key_end; ++key_next){
+ bool is_range2_A = key_mid == (key_first+key_count) || key_comp(*key_next, *key_mid);
+ first1 = is_range1_A == is_range2_A
+ ? last1 : partial_merge_bufferless(first1, last1, last1 + l_block, &is_range1_A, comp);
+ last1 += l_block;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, first1, comp));
+ }
+
+ merge_bufferless(is_range1_A ? first1 : last1, first_irr2, last_irr2, comp);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, last_irr2, comp));
+}
+
+// Complexity: 2*distance(first, last)+max_collected^2/2
+//
+// Tries to collect at most n_keys unique elements from [first, last),
+// in the begining of the range, and ordered according to comp
+//
+// Returns the number of collected keys
+template<class RandIt, class Compare, class XBuf>
+typename iterator_traits<RandIt>::size_type
+ collect_unique
+ ( RandIt const first, RandIt const last
+ , typename iterator_traits<RandIt>::size_type const max_collected, Compare comp
+ , XBuf & xbuf)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type h = 0;
+ if(max_collected){
+ ++h; // first key is always here
+ RandIt h0 = first;
+ RandIt u = first; ++u;
+ RandIt search_end = u;
+
+ if(xbuf.capacity() >= max_collected){
+ typename XBuf::iterator const ph0 = xbuf.add(first);
+ while(u != last && h < max_collected){
+ typename XBuf::iterator const r = boost::movelib::lower_bound(ph0, xbuf.end(), *u, comp);
+ //If key not found add it to [h, h+h0)
+ if(r == xbuf.end() || comp(*u, *r) ){
+ RandIt const new_h0 = boost::move(search_end, u, h0);
+ search_end = u;
+ ++search_end;
+ ++h;
+ xbuf.insert(r, u);
+ h0 = new_h0;
+ }
+ ++u;
+ }
+ boost::move_backward(first, h0, h0+h);
+ boost::move(xbuf.data(), xbuf.end(), first);
+ }
+ else{
+ while(u != last && h < max_collected){
+ RandIt const r = boost::movelib::lower_bound(h0, search_end, *u, comp);
+ //If key not found add it to [h, h+h0)
+ if(r == search_end || comp(*u, *r) ){
+ RandIt const new_h0 = rotate_gcd(h0, search_end, u);
+ search_end = u;
+ ++search_end;
+ ++h;
+ rotate_gcd(r+(new_h0-h0), u, search_end);
+ h0 = new_h0;
+ }
+ ++u;
+ }
+ rotate_gcd(first, h0, h0+h);
+ }
+ }
+ return h;
+}
+
+template<class Unsigned>
+Unsigned floor_sqrt(Unsigned const n)
+{
+ Unsigned x = n;
+ Unsigned y = x/2 + (x&1);
+ while (y < x){
+ x = y;
+ y = (x + n / x)/2;
+ }
+ return x;
+}
+
+template<class Unsigned>
+Unsigned ceil_sqrt(Unsigned const n)
+{
+ Unsigned r = floor_sqrt(n);
+ return r + Unsigned((n%r) != 0);
+}
+
+template<class Unsigned>
+Unsigned floor_merge_multiple(Unsigned const n, Unsigned &base, Unsigned &pow)
+{
+ Unsigned s = n;
+ Unsigned p = 0;
+ while(s > AdaptiveSortInsertionSortThreshold){
+ s /= 2;
+ ++p;
+ }
+ base = s;
+ pow = p;
+ return s << p;
+}
+
+template<class Unsigned>
+Unsigned ceil_merge_multiple(Unsigned const n, Unsigned &base, Unsigned &pow)
+{
+ Unsigned fm = floor_merge_multiple(n, base, pow);
+
+ if(fm != n){
+ if(base < AdaptiveSortInsertionSortThreshold){
+ ++base;
+ }
+ else{
+ base = AdaptiveSortInsertionSortThreshold/2 + 1;
+ ++pow;
+ }
+ }
+ return base << pow;
+}
+
+template<class Unsigned>
+Unsigned ceil_sqrt_multiple(Unsigned const n, Unsigned *pbase = 0)
+{
+ Unsigned const r = ceil_sqrt(n);
+ Unsigned pow = 0;
+ Unsigned base = 0;
+ Unsigned const res = ceil_merge_multiple(r, base, pow);
+ if(pbase) *pbase = base;
+ return res;
+}
+
+struct less
+{
+ template<class T>
+ bool operator()(const T &l, const T &r)
+ { return l < r; }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// MERGE BLOCKS
+//
+///////////////////////////////////////////////////////////////////////////////
+
+//#define ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+
+#if defined ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+template<class RandIt, class Compare>
+void slow_stable_sort
+ ( RandIt const first, RandIt const last, Compare comp)
+{
+ boost::movelib::inplace_stable_sort(first, last, comp);
+}
+
+#else //ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+
+template<class RandIt, class Compare>
+void slow_stable_sort
+ ( RandIt const first, RandIt const last, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type L = size_type(last - first);
+ { //Use insertion sort to merge first elements
+ size_type m = 0;
+ while((L - m) > size_type(AdaptiveSortInsertionSortThreshold)){
+ insertion_sort(first+m, first+m+size_type(AdaptiveSortInsertionSortThreshold), comp);
+ m += AdaptiveSortInsertionSortThreshold;
+ }
+ insertion_sort(first+m, last, comp);
+ }
+
+ size_type h = AdaptiveSortInsertionSortThreshold;
+ for(bool do_merge = L > h; do_merge; h*=2){
+ do_merge = (L - h) > h;
+ size_type p0 = 0;
+ if(do_merge){
+ size_type const h_2 = 2*h;
+ while((L-p0) > h_2){
+ merge_bufferless(first+p0, first+p0+h, first+p0+h_2, comp);
+ p0 += h_2;
+ }
+ }
+ if((L-p0) > h){
+ merge_bufferless(first+p0, first+p0+h, last, comp);
+ }
+ }
+}
+
+#endif //ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+
+//Returns new l_block and updates use_buf
+template<class Unsigned>
+Unsigned lblock_for_combine
+ (Unsigned const l_block, Unsigned const n_keys, Unsigned const l_data, bool &use_buf)
+{
+ BOOST_ASSERT(l_data > 1);
+
+ //We need to guarantee lblock >= l_merged/(n_keys/2) keys for the combination.
+ //We have at least 4 keys guaranteed (which are the minimum to merge 2 ranges)
+ //If l_block != 0, then n_keys is already enough to merge all blocks in all
+ //phases as we've found all needed keys for that buffer and length before.
+ //If l_block == 0 then see if half keys can be used as buffer and the rest
+ //as keys guaranteeing that n_keys >= (2*l_merged)/lblock =
+ if(!l_block){
+ //If l_block == 0 then n_keys is power of two
+ //(guaranteed by build_params(...))
+ BOOST_ASSERT(n_keys >= 4);
+ //BOOST_ASSERT(0 == (n_keys &(n_keys-1)));
+
+ //See if half keys are at least 4 and if half keys fulfill
+ Unsigned const new_buf = n_keys/2;
+ Unsigned const new_keys = n_keys-new_buf;
+ use_buf = new_keys >= 4 && new_keys >= l_data/new_buf;
+ if(use_buf){
+ return new_buf;
+ }
+ else{
+ return l_data/n_keys;
+ }
+ }
+ else{
+ use_buf = true;
+ return l_block;
+ }
+}
+
+template<class RandIt, class Compare, class XBuf>
+void stable_sort( RandIt first, RandIt last, Compare comp, XBuf & xbuf)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const len = size_type(last - first);
+ size_type const half_len = len/2 + (len&1);
+ if(std::size_t(xbuf.capacity() - xbuf.size()) >= half_len) {
+ merge_sort(first, last, comp, xbuf.data()+xbuf.size());
+ }
+ else{
+ slow_stable_sort(first, last, comp);
+ }
+}
+
+template<class RandIt, class Comp, class XBuf>
+void unstable_sort( RandIt first, RandIt last
+ , Comp comp
+ , XBuf & xbuf)
+{
+ heap_sort(first, last, comp);(void)xbuf;
+}
+
+template<class RandIt, class Compare, class XBuf>
+void stable_merge
+ ( RandIt first, RandIt const middle, RandIt last
+ , Compare comp
+ , XBuf &xbuf)
+{
+ BOOST_ASSERT(xbuf.empty());
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const len1 = size_type(middle-first);
+ size_type const len2 = size_type(last-middle);
+ size_type const l_min = min_value<size_type>(len1, len2);
+ if(xbuf.capacity() >= l_min){
+ buffered_merge(first, middle, last, comp, xbuf);
+ xbuf.clear();
+ }
+ else{
+ //merge_bufferless(first, middle, last, comp);
+ merge_adaptive_ONlogN(first, middle, last, comp, xbuf.begin(), xbuf.capacity());
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, last, boost::movelib::unantistable(comp)));
+}
+
+template<class RandIt, class Comp, class XBuf>
+void initialize_keys( RandIt first, RandIt last
+ , Comp comp
+ , XBuf & xbuf)
+{
+ unstable_sort(first, last, comp, xbuf);
+ BOOST_ASSERT(boost::movelib::is_sorted_and_unique(first, last, comp));
+}
+
+template<class RandIt, class U>
+void initialize_keys( RandIt first, RandIt last
+ , less
+ , U &)
+{
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+ std::size_t count = std::size_t(last - first);
+ for(std::size_t i = 0; i != count; ++i){
+ *first = static_cast<value_type>(i);
+ ++first;
+ }
+}
+
+template <class Unsigned>
+Unsigned calculate_total_combined(Unsigned const len, Unsigned const l_prev_merged, Unsigned *pl_irreg_combined = 0)
+{
+ typedef Unsigned size_type;
+
+ size_type const l_combined = 2*l_prev_merged;
+ size_type l_irreg_combined = len%l_combined;
+ size_type l_total_combined = len;
+ if(l_irreg_combined <= l_prev_merged){
+ l_total_combined -= l_irreg_combined;
+ l_irreg_combined = 0;
+ }
+ if(pl_irreg_combined)
+ *pl_irreg_combined = l_irreg_combined;
+ return l_total_combined;
+}
+
+template<class RandItKeys, class KeyCompare, class SizeType, class XBuf>
+void combine_params
+ ( RandItKeys const keys
+ , KeyCompare key_comp
+ , SizeType l_combined
+ , SizeType const l_prev_merged
+ , SizeType const l_block
+ , XBuf & xbuf
+ //Output
+ , SizeType &n_block_a
+ , SizeType &n_block_b
+ , SizeType &l_irreg1
+ , SizeType &l_irreg2
+ //Options
+ , bool do_initialize_keys = true)
+{
+ typedef SizeType size_type;
+
+ //Initial parameters for selection sort blocks
+ l_irreg1 = l_prev_merged%l_block;
+ l_irreg2 = (l_combined-l_irreg1)%l_block;
+ BOOST_ASSERT(((l_combined-l_irreg1-l_irreg2)%l_block) == 0);
+ size_type const n_reg_block = (l_combined-l_irreg1-l_irreg2)/l_block;
+ n_block_a = l_prev_merged/l_block;
+ n_block_b = n_reg_block - n_block_a;
+ BOOST_ASSERT(n_reg_block>=n_block_a);
+
+ //Key initialization
+ if (do_initialize_keys) {
+ initialize_keys(keys, keys + needed_keys_count(n_block_a, n_block_b), key_comp, xbuf);
+ }
+}
+
+
+
+//////////////////////////////////
+//
+// partial_merge
+//
+//////////////////////////////////
+template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
+OutputIt op_partial_merge_impl
+ (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, OutputIt d_first, Compare comp, Op op)
+{
+ InputIt1 first1(r_first1);
+ InputIt2 first2(r_first2);
+ if(first2 != last2 && last1 != first1)
+ while(1){
+ if(comp(*first2, *first1)) {
+ op(first2++, d_first++);
+ if(first2 == last2){
+ break;
+ }
+ }
+ else{
+ op(first1++, d_first++);
+ if(first1 == last1){
+ break;
+ }
+ }
+ }
+ r_first1 = first1;
+ r_first2 = first2;
+ return d_first;
+}
+
+template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
+OutputIt op_partial_merge
+ (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, OutputIt d_first, Compare comp, Op op, bool is_stable)
+{
+ return is_stable ? op_partial_merge_impl(r_first1, last1, r_first2, last2, d_first, comp, op)
+ : op_partial_merge_impl(r_first1, last1, r_first2, last2, d_first, antistable<Compare>(comp), op);
+}
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// op_partial_merge_and_save
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
+OutputIt op_partial_merge_and_swap_impl
+ (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, InputIt2 &r_first_min, OutputIt d_first, Compare comp, Op op)
+{
+ InputIt1 first1(r_first1);
+ InputIt2 first2(r_first2);
+
+ if(first2 != last2 && last1 != first1) {
+ InputIt2 first_min(r_first_min);
+ bool non_empty_ranges = true;
+ do{
+ if(comp(*first_min, *first1)) {
+ op(three_way_t(), first2++, first_min++, d_first++);
+ non_empty_ranges = first2 != last2;
+ }
+ else{
+ op(first1++, d_first++);
+ non_empty_ranges = first1 != last1;
+ }
+ } while(non_empty_ranges);
+ r_first_min = first_min;
+ r_first1 = first1;
+ r_first2 = first2;
+ }
+ return d_first;
+}
+
+template<class RandIt, class InputIt2, class OutputIt, class Compare, class Op>
+OutputIt op_partial_merge_and_swap
+ (RandIt &r_first1, RandIt const last1, InputIt2 &r_first2, InputIt2 const last2, InputIt2 &r_first_min, OutputIt d_first, Compare comp, Op op, bool is_stable)
+{
+ return is_stable ? op_partial_merge_and_swap_impl(r_first1, last1, r_first2, last2, r_first_min, d_first, comp, op)
+ : op_partial_merge_and_swap_impl(r_first1, last1, r_first2, last2, r_first_min, d_first, antistable<Compare>(comp), op);
+}
+
+template<class RandIt1, class RandIt2, class RandItB, class Compare, class Op>
+RandItB op_buffered_partial_merge_and_swap_to_range1_and_buffer
+ ( RandIt1 first1, RandIt1 const last1
+ , RandIt2 &rfirst2, RandIt2 const last2, RandIt2 &rfirst_min
+ , RandItB &rfirstb, Compare comp, Op op )
+{
+ RandItB firstb = rfirstb;
+ RandItB lastb = firstb;
+ RandIt2 first2 = rfirst2;
+
+ //Move to buffer while merging
+ //Three way moves need less moves when op is swap_op so use it
+ //when merging elements from range2 to the destination occupied by range1
+ if(first1 != last1 && first2 != last2){
+ RandIt2 first_min = rfirst_min;
+ op(four_way_t(), first2++, first_min++, first1++, lastb++);
+
+ while(first1 != last1){
+ if(first2 == last2){
+ lastb = op(forward_t(), first1, last1, firstb);
+ break;
+ }
+
+ if(comp(*first_min, *firstb)){
+ op( four_way_t(), first2++, first_min++, first1++, lastb++);
+ }
+ else{
+ op(three_way_t(), firstb++, first1++, lastb++);
+ }
+ }
+ rfirst2 = first2;
+ rfirstb = firstb;
+ rfirst_min = first_min;
+ }
+
+ return lastb;
+}
+
+template<class RandIt1, class RandIt2, class RandItB, class Compare, class Op>
+RandItB op_buffered_partial_merge_to_range1_and_buffer
+ ( RandIt1 first1, RandIt1 const last1
+ , RandIt2 &rfirst2, RandIt2 const last2
+ , RandItB &rfirstb, Compare comp, Op op )
+{
+ RandItB firstb = rfirstb;
+ RandItB lastb = firstb;
+ RandIt2 first2 = rfirst2;
+
+ //Move to buffer while merging
+ //Three way moves need less moves when op is swap_op so use it
+ //when merging elements from range2 to the destination occupied by range1
+ if(first1 != last1 && first2 != last2){
+ op(three_way_t(), first2++, first1++, lastb++);
+
+ while(true){
+ if(first1 == last1){
+ break;
+ }
+ if(first2 == last2){
+ lastb = op(forward_t(), first1, last1, firstb);
+ break;
+ }
+ if (comp(*first2, *firstb)) {
+ op(three_way_t(), first2++, first1++, lastb++);
+ }
+ else {
+ op(three_way_t(), firstb++, first1++, lastb++);
+ }
+ }
+ rfirst2 = first2;
+ rfirstb = firstb;
+ }
+
+ return lastb;
+}
+
+template<class RandIt, class RandItBuf, class Compare, class Op>
+RandIt op_partial_merge_and_save_impl
+ ( RandIt first1, RandIt const last1, RandIt &rfirst2, RandIt last2, RandIt first_min
+ , RandItBuf &buf_first1_in_out, RandItBuf &buf_last1_in_out
+ , Compare comp, Op op
+ )
+{
+ RandItBuf buf_first1 = buf_first1_in_out;
+ RandItBuf buf_last1 = buf_last1_in_out;
+ RandIt first2(rfirst2);
+
+ bool const do_swap = first2 != first_min;
+ if(buf_first1 == buf_last1){
+ //Skip any element that does not need to be moved
+ RandIt new_first1 = skip_until_merge(first1, last1, *first_min, comp);
+ buf_first1 += (new_first1-first1);
+ first1 = new_first1;
+ buf_last1 = do_swap ? op_buffered_partial_merge_and_swap_to_range1_and_buffer(first1, last1, first2, last2, first_min, buf_first1, comp, op)
+ : op_buffered_partial_merge_to_range1_and_buffer (first1, last1, first2, last2, buf_first1, comp, op);
+ first1 = last1;
+ }
+ else{
+ BOOST_ASSERT((last1-first1) == (buf_last1 - buf_first1));
+ }
+
+ //Now merge from buffer
+ first1 = do_swap ? op_partial_merge_and_swap_impl(buf_first1, buf_last1, first2, last2, first_min, first1, comp, op)
+ : op_partial_merge_impl (buf_first1, buf_last1, first2, last2, first1, comp, op);
+ buf_first1_in_out = buf_first1;
+ buf_last1_in_out = buf_last1;
+ rfirst2 = first2;
+ return first1;
+}
+
+template<class RandIt, class RandItBuf, class Compare, class Op>
+RandIt op_partial_merge_and_save
+ ( RandIt first1, RandIt const last1, RandIt &rfirst2, RandIt last2, RandIt first_min
+ , RandItBuf &buf_first1_in_out
+ , RandItBuf &buf_last1_in_out
+ , Compare comp
+ , Op op
+ , bool is_stable)
+{
+ return is_stable
+ ? op_partial_merge_and_save_impl
+ (first1, last1, rfirst2, last2, first_min, buf_first1_in_out, buf_last1_in_out, comp, op)
+ : op_partial_merge_and_save_impl
+ (first1, last1, rfirst2, last2, first_min, buf_first1_in_out, buf_last1_in_out, antistable<Compare>(comp), op)
+ ;
+}
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// op_merge_blocks_with_irreg
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+
+template<class RandItKeys, class KeyCompare, class RandIt, class RandIt2, class OutputIt, class Compare, class Op>
+OutputIt op_merge_blocks_with_irreg
+ ( RandItKeys key_first
+ , RandItKeys key_mid
+ , KeyCompare key_comp
+ , RandIt first_reg
+ , RandIt2 &first_irr
+ , RandIt2 const last_irr
+ , OutputIt dest
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type n_block_left
+ , typename iterator_traits<RandIt>::size_type min_check
+ , typename iterator_traits<RandIt>::size_type max_check
+ , Compare comp, bool const is_stable, Op op)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ for(; n_block_left; --n_block_left, ++key_first, min_check -= min_check != 0, max_check -= max_check != 0){
+ size_type next_key_idx = find_next_block(key_first, key_comp, first_reg, l_block, min_check, max_check, comp);
+ max_check = min_value<size_type>(max_value<size_type>(max_check, next_key_idx+size_type(2)), n_block_left);
+ RandIt const last_reg = first_reg + l_block;
+ RandIt first_min = first_reg + next_key_idx*l_block;
+ RandIt const last_min = first_min + l_block; (void)last_min;
+
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first_reg, last_reg, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!next_key_idx || boost::movelib::is_sorted(first_min, last_min, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT((!next_key_idx || !comp(*first_reg, *first_min )));
+
+ OutputIt orig_dest = dest; (void)orig_dest;
+ dest = next_key_idx ? op_partial_merge_and_swap(first_irr, last_irr, first_reg, last_reg, first_min, dest, comp, op, is_stable)
+ : op_partial_merge (first_irr, last_irr, first_reg, last_reg, dest, comp, op, is_stable);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(orig_dest, dest, comp));
+
+ if(first_reg == dest){
+ dest = next_key_idx ? ::boost::adl_move_swap_ranges(first_min, last_min, first_reg)
+ : last_reg;
+ }
+ else{
+ dest = next_key_idx ? op(three_way_forward_t(), first_reg, last_reg, first_min, dest)
+ : op(forward_t(), first_reg, last_reg, dest);
+ }
+
+ RandItKeys const key_next(key_first + next_key_idx);
+ swap_and_update_key(key_next, key_first, key_mid, last_reg, last_reg, first_min);
+
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(orig_dest, dest, comp));
+ first_reg = last_reg;
+ }
+ return dest;
+}
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// op_merge_blocks_left/right
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class Op>
+void op_merge_blocks_left
+ ( RandItKeys const key_first
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type const l_irreg1
+ , typename iterator_traits<RandIt>::size_type const n_block_a
+ , typename iterator_traits<RandIt>::size_type const n_block_b
+ , typename iterator_traits<RandIt>::size_type const l_irreg2
+ , Compare comp, Op op)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const key_count = needed_keys_count(n_block_a, n_block_b); (void)key_count;
+// BOOST_ASSERT(n_block_a || n_block_b);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted_and_unique(key_first, key_first + key_count, key_comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + key_count, key_comp, key_first[n_block_a]));
+
+ size_type n_block_b_left = n_block_b;
+ size_type n_block_a_left = n_block_a;
+ size_type n_block_left = n_block_b + n_block_a;
+ RandItKeys key_mid(key_first + n_block_a);
+
+ RandIt buffer = first - l_block;
+ RandIt first1 = first;
+ RandIt last1 = first1 + l_irreg1;
+ RandIt first2 = last1;
+ RandIt const irreg2 = first2 + n_block_left*l_block;
+ bool is_range1_A = true;
+
+ RandItKeys key_range2(key_first);
+
+ ////////////////////////////////////////////////////////////////////////////
+ //Process all regular blocks before the irregular B block
+ ////////////////////////////////////////////////////////////////////////////
+ size_type min_check = n_block_a == n_block_left ? 0u : n_block_a;
+ size_type max_check = min_value<size_type>(min_check+size_type(1), n_block_left);
+ for (; n_block_left; --n_block_left, ++key_range2, min_check -= min_check != 0, max_check -= max_check != 0) {
+ size_type const next_key_idx = find_next_block(key_range2, key_comp, first2, l_block, min_check, max_check, comp);
+ max_check = min_value<size_type>(max_value<size_type>(max_check, next_key_idx+size_type(2)), n_block_left);
+ RandIt const first_min = first2 + next_key_idx*l_block;
+ RandIt const last_min = first_min + l_block; (void)last_min;
+ RandIt const last2 = first2 + l_block;
+
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first1, last1, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first2, last2, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_left || boost::movelib::is_sorted(first_min, last_min, comp));
+
+ //Check if irregular b block should go here.
+ //If so, break to the special code handling the irregular block
+ if (!n_block_b_left &&
+ ( (l_irreg2 && comp(*irreg2, *first_min)) || (!l_irreg2 && is_range1_A)) ){
+ break;
+ }
+
+ RandItKeys const key_next(key_range2 + next_key_idx);
+ bool const is_range2_A = key_mid == (key_first+key_count) || key_comp(*key_next, *key_mid);
+
+ bool const is_buffer_middle = last1 == buffer;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT( ( is_buffer_middle && size_type(first2-buffer) == l_block && buffer == last1) ||
+ (!is_buffer_middle && size_type(first1-buffer) == l_block && first2 == last1));
+
+ if(is_range1_A == is_range2_A){
+ BOOST_ASSERT((first1 == last1) || !comp(*first_min, last1[-1]));
+ if(!is_buffer_middle){
+ buffer = op(forward_t(), first1, last1, buffer);
+ }
+ swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
+ first1 = first2;
+ last1 = last2;
+ }
+ else {
+ RandIt unmerged;
+ RandIt buf_beg;
+ RandIt buf_end;
+ if(is_buffer_middle){
+ buf_end = buf_beg = first2 - (last1-first1);
+ unmerged = op_partial_merge_and_save( first1, last1, first2, last2, first_min
+ , buf_beg, buf_end, comp, op, is_range1_A);
+ }
+ else{
+ buf_beg = first1;
+ buf_end = last1;
+ unmerged = op_partial_merge_and_save
+ (buffer, buffer+(last1-first1), first2, last2, first_min, buf_beg, buf_end, comp, op, is_range1_A);
+ }
+ (void)unmerged;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first-l_block, unmerged, comp));
+
+ swap_and_update_key( key_next, key_range2, key_mid, first2, last2
+ , last_min - size_type(last2 - first2));
+
+ if(buf_beg != buf_end){ //range2 exhausted: is_buffer_middle for the next iteration
+ first1 = buf_beg;
+ last1 = buf_end;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(buf_end == (last2-l_block));
+ buffer = last1;
+ }
+ else{ //range1 exhausted: !is_buffer_middle for the next iteration
+ first1 = first2;
+ last1 = last2;
+ buffer = first2 - l_block;
+ is_range1_A = is_range2_A;
+ }
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT( (is_range2_A && n_block_a_left) || (!is_range2_A && n_block_b_left));
+ is_range2_A ? --n_block_a_left : --n_block_b_left;
+ first2 = last2;
+ }
+
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_range2 + n_block_left, key_comp, *key_mid));
+ BOOST_ASSERT(!n_block_b_left);
+
+ ////////////////////////////////////////////////////////////////////////////
+ //Process remaining range 1 left before the irregular B block
+ ////////////////////////////////////////////////////////////////////////////
+ bool const is_buffer_middle = last1 == buffer;
+ RandIt first_irr2 = irreg2;
+ RandIt const last_irr2 = first_irr2 + l_irreg2;
+ if(l_irreg2 && is_range1_A){
+ if(is_buffer_middle){
+ first1 = skip_until_merge(first1, last1, *first_irr2, comp);
+ //Even if we copy backward, no overlapping occurs so use forward copy
+ //that can be faster specially with trivial types
+ RandIt const new_first1 = first2 - (last1 - first1);
+ op(forward_t(), first1, last1, new_first1);
+ first1 = new_first1;
+ last1 = first2;
+ buffer = first1 - l_block;
+ }
+ buffer = op_partial_merge_impl(first1, last1, first_irr2, last_irr2, buffer, comp, op);
+ buffer = op(forward_t(), first1, last1, buffer);
+ }
+ else if(!is_buffer_middle){
+ buffer = op(forward_t(), first1, last1, buffer);
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first-l_block, buffer, comp));
+
+ ////////////////////////////////////////////////////////////////////////////
+ //Process irregular B block and remaining A blocks
+ ////////////////////////////////////////////////////////////////////////////
+ buffer = op_merge_blocks_with_irreg
+ ( key_range2, key_mid, key_comp, first2, first_irr2, last_irr2
+ , buffer, l_block, n_block_left, min_check, max_check, comp, false, op);
+ buffer = op(forward_t(), first_irr2, last_irr2, buffer);(void)buffer;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first-l_block, buffer, comp));
+}
+
+// first - first element to merge.
+// first[-l_block, 0) - buffer (if use_buf == true)
+// l_block - length of regular blocks. First nblocks are stable sorted by 1st elements and key-coded
+// keys - sequence of keys, in same order as blocks. key<midkey means stream A
+// n_bef_irreg2/n_aft_irreg2 are regular blocks
+// l_irreg2 is a irregular block, that is to be combined after n_bef_irreg2 blocks and before n_aft_irreg2 blocks
+// If l_irreg2==0 then n_aft_irreg2==0 (no irregular blocks).
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
+void merge_blocks_left
+ ( RandItKeys const key_first
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type const l_irreg1
+ , typename iterator_traits<RandIt>::size_type const n_block_a
+ , typename iterator_traits<RandIt>::size_type const n_block_b
+ , typename iterator_traits<RandIt>::size_type const l_irreg2
+ , Compare comp
+ , bool const xbuf_used)
+{
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + needed_keys_count(n_block_a, n_block_b), key_comp, key_first[n_block_a]));
+ if(xbuf_used){
+ op_merge_blocks_left
+ (key_first, key_comp, first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op());
+ }
+ else{
+ op_merge_blocks_left
+ (key_first, key_comp, first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, swap_op());
+ }
+}
+
+// first - first element to merge.
+// [first+l_block*(n_bef_irreg2+n_aft_irreg2)+l_irreg2, first+l_block*(n_bef_irreg2+n_aft_irreg2+1)+l_irreg2) - buffer
+// l_block - length of regular blocks. First nblocks are stable sorted by 1st elements and key-coded
+// keys - sequence of keys, in same order as blocks. key<midkey means stream A
+// n_bef_irreg2/n_aft_irreg2 are regular blocks
+// l_irreg2 is a irregular block, that is to be combined after n_bef_irreg2 blocks and before n_aft_irreg2 blocks
+// If l_irreg2==0 then n_aft_irreg2==0 (no irregular blocks).
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
+void merge_blocks_right
+ ( RandItKeys const key_first
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type const n_block_a
+ , typename iterator_traits<RandIt>::size_type const n_block_b
+ , typename iterator_traits<RandIt>::size_type const l_irreg2
+ , Compare comp
+ , bool const xbuf_used)
+{
+ merge_blocks_left
+ ( (make_reverse_iterator)(key_first + needed_keys_count(n_block_a, n_block_b))
+ , inverse<KeyCompare>(key_comp)
+ , (make_reverse_iterator)(first + ((n_block_a+n_block_b)*l_block+l_irreg2))
+ , l_block
+ , l_irreg2
+ , n_block_b
+ , n_block_a
+ , 0
+ , inverse<Compare>(comp), xbuf_used);
+}
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// op_merge_blocks_with_buf
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class Op, class RandItBuf>
+void op_merge_blocks_with_buf
+ ( RandItKeys key_first
+ , KeyCompare key_comp
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_block
+ , typename iterator_traits<RandIt>::size_type const l_irreg1
+ , typename iterator_traits<RandIt>::size_type const n_block_a
+ , typename iterator_traits<RandIt>::size_type const n_block_b
+ , typename iterator_traits<RandIt>::size_type const l_irreg2
+ , Compare comp
+ , Op op
+ , RandItBuf const buf_first)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const key_count = needed_keys_count(n_block_a, n_block_b); (void)key_count;
+ //BOOST_ASSERT(n_block_a || n_block_b);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted_and_unique(key_first, key_first + key_count, key_comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_b || n_block_a == count_if_with(key_first, key_first + key_count, key_comp, key_first[n_block_a]));
+
+ size_type n_block_b_left = n_block_b;
+ size_type n_block_a_left = n_block_a;
+ size_type n_block_left = n_block_b + n_block_a;
+ RandItKeys key_mid(key_first + n_block_a);
+
+ RandItBuf buffer = buf_first;
+ RandItBuf buffer_end = buffer;
+ RandIt first1 = first;
+ RandIt last1 = first1 + l_irreg1;
+ RandIt first2 = last1;
+ RandIt const first_irr2 = first2 + n_block_left*l_block;
+ bool is_range1_A = true;
+ const size_type len = l_block * n_block_a + l_block * n_block_b + l_irreg1 + l_irreg2; (void)len;
+
+ RandItKeys key_range2(key_first);
+
+ ////////////////////////////////////////////////////////////////////////////
+ //Process all regular blocks before the irregular B block
+ ////////////////////////////////////////////////////////////////////////////
+ size_type min_check = n_block_a == n_block_left ? 0u : n_block_a;
+ size_type max_check = min_value<size_type>(min_check+size_type(1), n_block_left);
+ for (; n_block_left; --n_block_left, ++key_range2, min_check -= min_check != 0, max_check -= max_check != 0) {
+ size_type const next_key_idx = find_next_block(key_range2, key_comp, first2, l_block, min_check, max_check, comp);
+ max_check = min_value<size_type>(max_value<size_type>(max_check, next_key_idx+size_type(2)), n_block_left);
+ RandIt first_min = first2 + next_key_idx*l_block;
+ RandIt const last_min = first_min + l_block; (void)last_min;
+ RandIt const last2 = first2 + l_block;
+
+ bool const buffer_empty = buffer == buffer_end; (void)buffer_empty;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(buffer_empty ? boost::movelib::is_sorted(first1, last1, comp) : boost::movelib::is_sorted(buffer, buffer_end, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first2, last2, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!n_block_left || boost::movelib::is_sorted(first_min, last_min, comp));
+
+ //Check if irregular b block should go here.
+ //If so, break to the special code handling the irregular block
+ if (!n_block_b_left &&
+ ( (l_irreg2 && comp(*first_irr2, *first_min)) || (!l_irreg2 && is_range1_A)) ){
+ break;
+ }
+
+ RandItKeys const key_next(key_range2 + next_key_idx);
+ bool const is_range2_A = key_mid == (key_first+key_count) || key_comp(*key_next, *key_mid);
+
+ if(is_range1_A == is_range2_A){
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT((first1 == last1) || (buffer_empty ? !comp(*first_min, last1[-1]) : !comp(*first_min, buffer_end[-1])));
+ //If buffered, put those elements in place
+ RandIt res = op(forward_t(), buffer, buffer_end, first1);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_fwd: ", len);
+ buffer = buffer_end = buf_first;
+ BOOST_ASSERT(buffer_empty || res == last1); (void)res;
+ //swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
+ buffer_end = buffer_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min, buffer = buf_first, op);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_swp: ", len);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first2, last2, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first_min, last_min, comp));
+ first1 = first2;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, first1, comp));
+ }
+ else {
+ RandIt const unmerged = op_partial_merge_and_save(first1, last1, first2, last2, first_min, buffer, buffer_end, comp, op, is_range1_A);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_mrs: ", len);
+ bool const is_range_1_empty = buffer == buffer_end;
+ BOOST_ASSERT(is_range_1_empty || (buffer_end-buffer) == (last1+l_block-unmerged));
+ if(is_range_1_empty){
+ buffer = buffer_end = buf_first;
+ first_min = last_min - (last2 - first2);
+ //swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
+ buffer_end = buffer_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min, buf_first, op);
+ }
+ else{
+ first_min = last_min;
+ //swap_and_update_key(key_next, key_range2, key_mid, first2, last2, first_min);
+ update_key(key_next, key_range2, key_mid);
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(!is_range_1_empty || (last_min-first_min) == (last2-unmerged));
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_swp: ", len);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first_min, last_min, comp));
+ is_range1_A ^= is_range_1_empty;
+ first1 = unmerged;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, unmerged, comp));
+ }
+ BOOST_ASSERT( (is_range2_A && n_block_a_left) || (!is_range2_A && n_block_b_left));
+ is_range2_A ? --n_block_a_left : --n_block_b_left;
+ last1 += l_block;
+ first2 = last2;
+ }
+ RandIt res = op(forward_t(), buffer, buffer_end, first1); (void)res;
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, res, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_fwd: ", len);
+
+ ////////////////////////////////////////////////////////////////////////////
+ //Process irregular B block and remaining A blocks
+ ////////////////////////////////////////////////////////////////////////////
+ RandIt const last_irr2 = first_irr2 + l_irreg2;
+ op(forward_t(), first_irr2, first_irr2+l_irreg2, buf_first);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_fwir:", len);
+ buffer = buf_first;
+ buffer_end = buffer+l_irreg2;
+
+ reverse_iterator<RandItBuf> rbuf_beg(buffer_end);
+ RandIt dest = op_merge_blocks_with_irreg
+ ((make_reverse_iterator)(key_first + n_block_b + n_block_a), (make_reverse_iterator)(key_mid), inverse<KeyCompare>(key_comp)
+ , (make_reverse_iterator)(first_irr2), rbuf_beg, (make_reverse_iterator)(buffer), (make_reverse_iterator)(last_irr2)
+ , l_block, n_block_left, 0, n_block_left
+ , inverse<Compare>(comp), true, op).base();
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(dest, last_irr2, comp));
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_blocks_w_irg: ", len);
+
+ buffer_end = rbuf_beg.base();
+ BOOST_ASSERT((dest-last1) == (buffer_end-buffer));
+ op_merge_with_left_placed(is_range1_A ? first1 : last1, last1, dest, buffer, buffer_end, comp, op);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" merge_with_left_plc:", len);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(first, last_irr2, comp));
+}
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// op_insertion_sort_step_left/right
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+
+template<class RandIt, class Compare, class Op>
+typename iterator_traits<RandIt>::size_type
+ op_insertion_sort_step_left
+ ( RandIt const first
+ , typename iterator_traits<RandIt>::size_type const length
+ , typename iterator_traits<RandIt>::size_type const step
+ , Compare comp, Op op)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const s = min_value<size_type>(step, AdaptiveSortInsertionSortThreshold);
+ size_type m = 0;
+
+ while((length - m) > s){
+ insertion_sort_op(first+m, first+m+s, first+m-s, comp, op);
+ m += s;
+ }
+ insertion_sort_op(first+m, first+length, first+m-s, comp, op);
+ return s;
+}
+
+template<class RandIt, class Compare, class Op>
+void op_merge_right_step_once
+ ( RandIt first_block
+ , typename iterator_traits<RandIt>::size_type const elements_in_blocks
+ , typename iterator_traits<RandIt>::size_type const l_build_buf
+ , Compare comp
+ , Op op)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type restk = elements_in_blocks%(2*l_build_buf);
+ size_type p = elements_in_blocks - restk;
+ BOOST_ASSERT(0 == (p%(2*l_build_buf)));
+
+ if(restk <= l_build_buf){
+ op(backward_t(),first_block+p, first_block+p+restk, first_block+p+restk+l_build_buf);
+ }
+ else{
+ op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+restk, first_block+p+restk+l_build_buf, comp, op);
+ }
+ while(p>0){
+ p -= 2*l_build_buf;
+ op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+2*l_build_buf, first_block+p+3*l_build_buf, comp, op);
+ }
+}
+
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// insertion_sort_step
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+template<class RandIt, class Compare>
+typename iterator_traits<RandIt>::size_type
+ insertion_sort_step
+ ( RandIt const first
+ , typename iterator_traits<RandIt>::size_type const length
+ , typename iterator_traits<RandIt>::size_type const step
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const s = min_value<size_type>(step, AdaptiveSortInsertionSortThreshold);
+ size_type m = 0;
+
+ while((length - m) > s){
+ insertion_sort(first+m, first+m+s, comp);
+ m += s;
+ }
+ insertion_sort(first+m, first+length, comp);
+ return s;
+}
+
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+//
+// op_merge_left_step_multiple
+//
+//////////////////////////////////
+//////////////////////////////////
+//////////////////////////////////
+template<class RandIt, class Compare, class Op>
+typename iterator_traits<RandIt>::size_type
+ op_merge_left_step_multiple
+ ( RandIt first_block
+ , typename iterator_traits<RandIt>::size_type const elements_in_blocks
+ , typename iterator_traits<RandIt>::size_type l_merged
+ , typename iterator_traits<RandIt>::size_type const l_build_buf
+ , typename iterator_traits<RandIt>::size_type l_left_space
+ , Compare comp
+ , Op op)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ for(; l_merged < l_build_buf && l_left_space >= l_merged; l_merged*=2){
+ size_type p0=0;
+ RandIt pos = first_block;
+ while((elements_in_blocks - p0) > 2*l_merged) {
+ op_merge_left(pos-l_merged, pos, pos+l_merged, pos+2*l_merged, comp, op);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(pos-l_merged, pos+l_merged, comp));
+ p0 += 2*l_merged;
+ pos = first_block+p0;
+ }
+ if((elements_in_blocks-p0) > l_merged) {
+ op_merge_left(pos-l_merged, pos, pos+l_merged, first_block+elements_in_blocks, comp, op);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(pos-l_merged, pos-l_merged+(first_block+elements_in_blocks-pos), comp));
+ }
+ else {
+ op(forward_t(), pos, first_block+elements_in_blocks, pos-l_merged);
+ BOOST_MOVE_ADAPTIVE_SORT_INVARIANT(boost::movelib::is_sorted(pos-l_merged, first_block+elements_in_blocks-l_merged, comp));
+ }
+ first_block -= l_merged;
+ l_left_space -= l_merged;
+ }
+ return l_merged;
+}
+
+
+} //namespace detail_adaptive {
+} //namespace movelib {
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#define BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/basic_op.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/basic_op.hpp
index ea5faf0e537..ea5faf0e537 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/basic_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/basic_op.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/heap_sort.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/heap_sort.hpp
index 5474d9f5c42..5474d9f5c42 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/heap_sort.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/heap_sort.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/insertion_sort.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/insertion_sort.hpp
index 5c378c3e36b..5c378c3e36b 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/insertion_sort.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/insertion_sort.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/is_sorted.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/is_sorted.hpp
index d3dccfc2dbd..d3dccfc2dbd 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/is_sorted.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/is_sorted.hpp
diff --git a/src/third_party/boost-1.70.0/boost/move/algo/detail/merge.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/merge.hpp
new file mode 100644
index 00000000000..58df061637a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/merge.hpp
@@ -0,0 +1,980 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MOVE_MERGE_HPP
+#define BOOST_MOVE_MERGE_HPP
+
+#include <boost/move/algo/move.hpp>
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/algo/detail/basic_op.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/destruct_n.hpp>
+#include <boost/move/algo/predicate.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/assert.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace movelib {
+
+template<class T, class RandRawIt = T*, class SizeType = typename iterator_traits<RandRawIt>::size_type>
+class adaptive_xbuf
+{
+ adaptive_xbuf(const adaptive_xbuf &);
+ adaptive_xbuf & operator=(const adaptive_xbuf &);
+
+ #if !defined(UINTPTR_MAX)
+ typedef std::size_t uintptr_t;
+ #endif
+
+ public:
+ typedef RandRawIt iterator;
+ typedef SizeType size_type;
+
+ adaptive_xbuf()
+ : m_ptr(), m_size(0), m_capacity(0)
+ {}
+
+ adaptive_xbuf(RandRawIt raw_memory, size_type capacity)
+ : m_ptr(raw_memory), m_size(0), m_capacity(capacity)
+ {}
+
+ template<class RandIt>
+ void move_assign(RandIt first, size_type n)
+ {
+ if(n <= m_size){
+ boost::move(first, first+n, m_ptr);
+ size_type size = m_size;
+ while(size-- != n){
+ m_ptr[size].~T();
+ }
+ m_size = n;
+ }
+ else{
+ RandRawIt result = boost::move(first, first+m_size, m_ptr);
+ boost::uninitialized_move(first+m_size, first+n, result);
+ m_size = n;
+ }
+ }
+
+ template<class RandIt>
+ void push_back(RandIt first, size_type n)
+ {
+ BOOST_ASSERT(m_capacity - m_size >= n);
+ boost::uninitialized_move(first, first+n, m_ptr+m_size);
+ m_size += n;
+ }
+
+ template<class RandIt>
+ iterator add(RandIt it)
+ {
+ BOOST_ASSERT(m_size < m_capacity);
+ RandRawIt p_ret = m_ptr + m_size;
+ ::new(&*p_ret) T(::boost::move(*it));
+ ++m_size;
+ return p_ret;
+ }
+
+ template<class RandIt>
+ void insert(iterator pos, RandIt it)
+ {
+ if(pos == (m_ptr + m_size)){
+ this->add(it);
+ }
+ else{
+ this->add(m_ptr+m_size-1);
+ //m_size updated
+ boost::move_backward(pos, m_ptr+m_size-2, m_ptr+m_size-1);
+ *pos = boost::move(*it);
+ }
+ }
+
+ void set_size(size_type size)
+ {
+ m_size = size;
+ }
+
+ void shrink_to_fit(size_type const size)
+ {
+ if(m_size > size){
+ for(size_type szt_i = size; szt_i != m_size; ++szt_i){
+ m_ptr[szt_i].~T();
+ }
+ m_size = size;
+ }
+ }
+
+ void initialize_until(size_type const size, T &t)
+ {
+ BOOST_ASSERT(m_size < m_capacity);
+ if(m_size < size){
+ BOOST_TRY
+ {
+ ::new((void*)&m_ptr[m_size]) T(::boost::move(t));
+ ++m_size;
+ for(; m_size != size; ++m_size){
+ ::new((void*)&m_ptr[m_size]) T(::boost::move(m_ptr[m_size-1]));
+ }
+ t = ::boost::move(m_ptr[m_size-1]);
+ }
+ BOOST_CATCH(...)
+ {
+ while(m_size)
+ {
+ --m_size;
+ m_ptr[m_size].~T();
+ }
+ }
+ BOOST_CATCH_END
+ }
+ }
+
+ private:
+ template<class RIt>
+ static bool is_raw_ptr(RIt)
+ {
+ return false;
+ }
+
+ static bool is_raw_ptr(T*)
+ {
+ return true;
+ }
+
+ public:
+ template<class U>
+ bool supports_aligned_trailing(size_type size, size_type trail_count) const
+ {
+ if(this->is_raw_ptr(this->data()) && m_capacity){
+ uintptr_t u_addr_sz = uintptr_t(&*(this->data()+size));
+ uintptr_t u_addr_cp = uintptr_t(&*(this->data()+this->capacity()));
+ u_addr_sz = ((u_addr_sz + sizeof(U)-1)/sizeof(U))*sizeof(U);
+ return (u_addr_cp >= u_addr_sz) && ((u_addr_cp - u_addr_sz)/sizeof(U) >= trail_count);
+ }
+ return false;
+ }
+
+ template<class U>
+ U *aligned_trailing() const
+ {
+ return this->aligned_trailing<U>(this->size());
+ }
+
+ template<class U>
+ U *aligned_trailing(size_type pos) const
+ {
+ uintptr_t u_addr = uintptr_t(&*(this->data()+pos));
+ u_addr = ((u_addr + sizeof(U)-1)/sizeof(U))*sizeof(U);
+ return (U*)u_addr;
+ }
+
+ ~adaptive_xbuf()
+ {
+ this->clear();
+ }
+
+ size_type capacity() const
+ { return m_capacity; }
+
+ iterator data() const
+ { return m_ptr; }
+
+ iterator begin() const
+ { return m_ptr; }
+
+ iterator end() const
+ { return m_ptr+m_size; }
+
+ size_type size() const
+ { return m_size; }
+
+ bool empty() const
+ { return !m_size; }
+
+ void clear()
+ {
+ this->shrink_to_fit(0u);
+ }
+
+ private:
+ RandRawIt m_ptr;
+ size_type m_size;
+ size_type m_capacity;
+};
+
+template<class Iterator, class SizeType, class Op>
+class range_xbuf
+{
+ range_xbuf(const range_xbuf &);
+ range_xbuf & operator=(const range_xbuf &);
+
+ public:
+ typedef SizeType size_type;
+ typedef Iterator iterator;
+
+ range_xbuf(Iterator first, Iterator last)
+ : m_first(first), m_last(first), m_cap(last)
+ {}
+
+ template<class RandIt>
+ void move_assign(RandIt first, size_type n)
+ {
+ BOOST_ASSERT(size_type(n) <= size_type(m_cap-m_first));
+ m_last = Op()(forward_t(), first, first+n, m_first);
+ }
+
+ ~range_xbuf()
+ {}
+
+ size_type capacity() const
+ { return m_cap-m_first; }
+
+ Iterator data() const
+ { return m_first; }
+
+ Iterator end() const
+ { return m_last; }
+
+ size_type size() const
+ { return m_last-m_first; }
+
+ bool empty() const
+ { return m_first == m_last; }
+
+ void clear()
+ {
+ m_last = m_first;
+ }
+
+ template<class RandIt>
+ iterator add(RandIt it)
+ {
+ Iterator pos(m_last);
+ *pos = boost::move(*it);
+ ++m_last;
+ return pos;
+ }
+
+ void set_size(size_type size)
+ {
+ m_last = m_first;
+ m_last += size;
+ }
+
+ private:
+ Iterator const m_first;
+ Iterator m_last;
+ Iterator const m_cap;
+};
+
+
+
+// @cond
+
+/*
+template<typename Unsigned>
+inline Unsigned gcd(Unsigned x, Unsigned y)
+{
+ if(0 == ((x &(x-1)) | (y & (y-1)))){
+ return x < y ? x : y;
+ }
+ else{
+ do
+ {
+ Unsigned t = x % y;
+ x = y;
+ y = t;
+ } while (y);
+ return x;
+ }
+}
+*/
+
+//Modified version from "An Optimal In-Place Array Rotation Algorithm", Ching-Kuang Shene
+template<typename Unsigned>
+Unsigned gcd(Unsigned x, Unsigned y)
+{
+ if(0 == ((x &(x-1)) | (y & (y-1)))){
+ return x < y ? x : y;
+ }
+ else{
+ Unsigned z = 1;
+ while((!(x&1)) & (!(y&1))){
+ z <<=1, x>>=1, y>>=1;
+ }
+ while(x && y){
+ if(!(x&1))
+ x >>=1;
+ else if(!(y&1))
+ y >>=1;
+ else if(x >=y)
+ x = (x-y) >> 1;
+ else
+ y = (y-x) >> 1;
+ }
+ return z*(x+y);
+ }
+}
+
+template<typename RandIt>
+RandIt rotate_gcd(RandIt first, RandIt middle, RandIt last)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+
+ if(first == middle)
+ return last;
+ if(middle == last)
+ return first;
+ const size_type middle_pos = size_type(middle - first);
+ RandIt ret = last - middle_pos;
+ if (middle == ret){
+ boost::adl_move_swap_ranges(first, middle, middle);
+ }
+ else{
+ const size_type length = size_type(last - first);
+ for( RandIt it_i(first), it_gcd(it_i + gcd(length, middle_pos))
+ ; it_i != it_gcd
+ ; ++it_i){
+ value_type temp(boost::move(*it_i));
+ RandIt it_j = it_i;
+ RandIt it_k = it_j+middle_pos;
+ do{
+ *it_j = boost::move(*it_k);
+ it_j = it_k;
+ size_type const left = size_type(last - it_j);
+ it_k = left > middle_pos ? it_j + middle_pos : first + (middle_pos - left);
+ } while(it_k != it_i);
+ *it_j = boost::move(temp);
+ }
+ }
+ return ret;
+}
+
+template <class RandIt, class T, class Compare>
+RandIt lower_bound
+ (RandIt first, const RandIt last, const T& key, Compare comp)
+{
+ typedef typename iterator_traits
+ <RandIt>::size_type size_type;
+ size_type len = size_type(last - first);
+ RandIt middle;
+
+ while (len) {
+ size_type step = len >> 1;
+ middle = first;
+ middle += step;
+
+ if (comp(*middle, key)) {
+ first = ++middle;
+ len -= step + 1;
+ }
+ else{
+ len = step;
+ }
+ }
+ return first;
+}
+
+template <class RandIt, class T, class Compare>
+RandIt upper_bound
+ (RandIt first, const RandIt last, const T& key, Compare comp)
+{
+ typedef typename iterator_traits
+ <RandIt>::size_type size_type;
+ size_type len = size_type(last - first);
+ RandIt middle;
+
+ while (len) {
+ size_type step = len >> 1;
+ middle = first;
+ middle += step;
+
+ if (!comp(key, *middle)) {
+ first = ++middle;
+ len -= step + 1;
+ }
+ else{
+ len = step;
+ }
+ }
+ return first;
+}
+
+
+template<class RandIt, class Compare, class Op>
+void op_merge_left( RandIt buf_first
+ , RandIt first1
+ , RandIt const last1
+ , RandIt const last2
+ , Compare comp
+ , Op op)
+{
+ for(RandIt first2=last1; first2 != last2; ++buf_first){
+ if(first1 == last1){
+ op(forward_t(), first2, last2, buf_first);
+ return;
+ }
+ else if(comp(*first2, *first1)){
+ op(first2, buf_first);
+ ++first2;
+ }
+ else{
+ op(first1, buf_first);
+ ++first1;
+ }
+ }
+ if(buf_first != first1){//In case all remaining elements are in the same place
+ //(e.g. buffer is exactly the size of the second half
+ //and all elements from the second half are less)
+ op(forward_t(), first1, last1, buf_first);
+ }
+}
+
+// [buf_first, first1) -> buffer
+// [first1, last1) merge [last1,last2) -> [buf_first,buf_first+(last2-first1))
+// Elements from buffer are moved to [last2 - (first1-buf_first), last2)
+// Note: distance(buf_first, first1) >= distance(last1, last2), so no overlapping occurs
+template<class RandIt, class Compare>
+void merge_left
+ (RandIt buf_first, RandIt first1, RandIt const last1, RandIt const last2, Compare comp)
+{
+ op_merge_left(buf_first, first1, last1, last2, comp, move_op());
+}
+
+// [buf_first, first1) -> buffer
+// [first1, last1) merge [last1,last2) -> [buf_first,buf_first+(last2-first1))
+// Elements from buffer are swapped to [last2 - (first1-buf_first), last2)
+// Note: distance(buf_first, first1) >= distance(last1, last2), so no overlapping occurs
+template<class RandIt, class Compare>
+void swap_merge_left
+ (RandIt buf_first, RandIt first1, RandIt const last1, RandIt const last2, Compare comp)
+{
+ op_merge_left(buf_first, first1, last1, last2, comp, swap_op());
+}
+
+template<class RandIt, class Compare, class Op>
+void op_merge_right
+ (RandIt const first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp, Op op)
+{
+ RandIt const first2 = last1;
+ while(first1 != last1){
+ if(last2 == first2){
+ op(backward_t(), first1, last1, buf_last);
+ return;
+ }
+ --last2;
+ --last1;
+ --buf_last;
+ if(comp(*last2, *last1)){
+ op(last1, buf_last);
+ ++last2;
+ }
+ else{
+ op(last2, buf_last);
+ ++last1;
+ }
+ }
+ if(last2 != buf_last){ //In case all remaining elements are in the same place
+ //(e.g. buffer is exactly the size of the first half
+ //and all elements from the second half are less)
+ op(backward_t(), first2, last2, buf_last);
+ }
+}
+
+// [last2, buf_last) - buffer
+// [first1, last1) merge [last1,last2) -> [first1+(buf_last-last2), buf_last)
+// Note: distance[last2, buf_last) >= distance[first1, last1), so no overlapping occurs
+template<class RandIt, class Compare>
+void merge_right
+ (RandIt first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp)
+{
+ op_merge_right(first1, last1, last2, buf_last, comp, move_op());
+}
+
+// [last2, buf_last) - buffer
+// [first1, last1) merge [last1,last2) -> [first1+(buf_last-last2), buf_last)
+// Note: distance[last2, buf_last) >= distance[first1, last1), so no overlapping occurs
+template<class RandIt, class Compare>
+void swap_merge_right
+ (RandIt first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp)
+{
+ op_merge_right(first1, last1, last2, buf_last, comp, swap_op());
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// BUFFERED MERGE
+//
+///////////////////////////////////////////////////////////////////////////////
+template<class RandIt, class Compare, class Op, class Buf>
+void op_buffered_merge
+ ( RandIt first, RandIt const middle, RandIt last
+ , Compare comp, Op op
+ , Buf &xbuf)
+{
+ if(first != middle && middle != last && comp(*middle, middle[-1])){
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const len1 = size_type(middle-first);
+ size_type const len2 = size_type(last-middle);
+ if(len1 <= len2){
+ first = boost::movelib::upper_bound(first, middle, *middle, comp);
+ xbuf.move_assign(first, size_type(middle-first));
+ op_merge_with_right_placed
+ (xbuf.data(), xbuf.end(), first, middle, last, comp, op);
+ }
+ else{
+ last = boost::movelib::lower_bound(middle, last, middle[-1], comp);
+ xbuf.move_assign(middle, size_type(last-middle));
+ op_merge_with_left_placed
+ (first, middle, last, xbuf.data(), xbuf.end(), comp, op);
+ }
+ }
+}
+
+template<class RandIt, class Compare, class XBuf>
+void buffered_merge
+ ( RandIt first, RandIt const middle, RandIt last
+ , Compare comp
+ , XBuf &xbuf)
+{
+ op_buffered_merge(first, middle, last, comp, move_op(), xbuf);
+}
+
+//Complexity: min(len1,len2)^2 + max(len1,len2)
+template<class RandIt, class Compare>
+void merge_bufferless_ON2(RandIt first, RandIt middle, RandIt last, Compare comp)
+{
+ if((middle - first) < (last - middle)){
+ while(first != middle){
+ RandIt const old_last1 = middle;
+ middle = boost::movelib::lower_bound(middle, last, *first, comp);
+ first = rotate_gcd(first, old_last1, middle);
+ if(middle == last){
+ break;
+ }
+ do{
+ ++first;
+ } while(first != middle && !comp(*middle, *first));
+ }
+ }
+ else{
+ while(middle != last){
+ RandIt p = boost::movelib::upper_bound(first, middle, last[-1], comp);
+ last = rotate_gcd(p, middle, last);
+ middle = p;
+ if(middle == first){
+ break;
+ }
+ --p;
+ do{
+ --last;
+ } while(middle != last && !comp(last[-1], *p));
+ }
+ }
+}
+
+static const std::size_t MergeBufferlessONLogNRotationThreshold = 16u;
+
+template <class RandIt, class Compare>
+void merge_bufferless_ONlogN_recursive
+ ( RandIt first, RandIt middle, RandIt last
+ , typename iterator_traits<RandIt>::size_type len1
+ , typename iterator_traits<RandIt>::size_type len2
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ while(1) {
+ //trivial cases
+ if (!len2) {
+ return;
+ }
+ else if (!len1) {
+ return;
+ }
+ else if (size_type(len1 | len2) == 1u) {
+ if (comp(*middle, *first))
+ adl_move_swap(*first, *middle);
+ return;
+ }
+ else if(size_type(len1+len2) < MergeBufferlessONLogNRotationThreshold){
+ merge_bufferless_ON2(first, middle, last, comp);
+ return;
+ }
+
+ RandIt first_cut = first;
+ RandIt second_cut = middle;
+ size_type len11 = 0;
+ size_type len22 = 0;
+ if (len1 > len2) {
+ len11 = len1 / 2;
+ first_cut += len11;
+ second_cut = boost::movelib::lower_bound(middle, last, *first_cut, comp);
+ len22 = size_type(second_cut - middle);
+ }
+ else {
+ len22 = len2 / 2;
+ second_cut += len22;
+ first_cut = boost::movelib::upper_bound(first, middle, *second_cut, comp);
+ len11 = size_type(first_cut - first);
+ }
+ RandIt new_middle = rotate_gcd(first_cut, middle, second_cut);
+
+ //Avoid one recursive call doing a manual tail call elimination on the biggest range
+ const size_type len_internal = len11+len22;
+ if( len_internal < (len1 + len2 - len_internal) ) {
+ merge_bufferless_ONlogN_recursive(first, first_cut, new_middle, len11, len22, comp);
+ first = new_middle;
+ middle = second_cut;
+ len1 -= len11;
+ len2 -= len22;
+ }
+ else {
+ merge_bufferless_ONlogN_recursive(new_middle, second_cut, last, len1 - len11, len2 - len22, comp);
+ middle = first_cut;
+ last = new_middle;
+ len1 = len11;
+ len2 = len22;
+ }
+ }
+}
+
+
+//Complexity: NlogN
+template<class RandIt, class Compare>
+void merge_bufferless_ONlogN(RandIt first, RandIt middle, RandIt last, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ merge_bufferless_ONlogN_recursive
+ (first, middle, last, size_type(middle - first), size_type(last - middle), comp);
+}
+
+template<class RandIt, class Compare>
+void merge_bufferless(RandIt first, RandIt middle, RandIt last, Compare comp)
+{
+ #define BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
+ #ifdef BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
+ merge_bufferless_ONlogN(first, middle, last, comp);
+ #else
+ merge_bufferless_ON2(first, middle, last, comp);
+ #endif //BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
+}
+
+// [r_first, r_last) are already in the right part of the destination range.
+template <class Compare, class InputIterator, class InputOutIterator, class Op>
+void op_merge_with_right_placed
+ ( InputIterator first, InputIterator last
+ , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
+ , Compare comp, Op op)
+{
+ BOOST_ASSERT((last - first) == (r_first - dest_first));
+ while ( first != last ) {
+ if (r_first == r_last) {
+ InputOutIterator end = op(forward_t(), first, last, dest_first);
+ BOOST_ASSERT(end == r_last);
+ (void)end;
+ return;
+ }
+ else if (comp(*r_first, *first)) {
+ op(r_first, dest_first);
+ ++r_first;
+ }
+ else {
+ op(first, dest_first);
+ ++first;
+ }
+ ++dest_first;
+ }
+ // Remaining [r_first, r_last) already in the correct place
+}
+
+template <class Compare, class InputIterator, class InputOutIterator>
+void swap_merge_with_right_placed
+ ( InputIterator first, InputIterator last
+ , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
+ , Compare comp)
+{
+ op_merge_with_right_placed(first, last, dest_first, r_first, r_last, comp, swap_op());
+}
+
+// [first, last) are already in the right part of the destination range.
+template <class Compare, class Op, class BidirIterator, class BidirOutIterator>
+void op_merge_with_left_placed
+ ( BidirOutIterator const first, BidirOutIterator last, BidirOutIterator dest_last
+ , BidirIterator const r_first, BidirIterator r_last
+ , Compare comp, Op op)
+{
+ BOOST_ASSERT((dest_last - last) == (r_last - r_first));
+ while( r_first != r_last ) {
+ if(first == last) {
+ BidirOutIterator res = op(backward_t(), r_first, r_last, dest_last);
+ BOOST_ASSERT(last == res);
+ (void)res;
+ return;
+ }
+ --r_last;
+ --last;
+ if(comp(*r_last, *last)){
+ ++r_last;
+ --dest_last;
+ op(last, dest_last);
+ }
+ else{
+ ++last;
+ --dest_last;
+ op(r_last, dest_last);
+ }
+ }
+ // Remaining [first, last) already in the correct place
+}
+
+// @endcond
+
+// [first, last) are already in the right part of the destination range.
+template <class Compare, class BidirIterator, class BidirOutIterator>
+void merge_with_left_placed
+ ( BidirOutIterator const first, BidirOutIterator last, BidirOutIterator dest_last
+ , BidirIterator const r_first, BidirIterator r_last
+ , Compare comp)
+{
+ op_merge_with_left_placed(first, last, dest_last, r_first, r_last, comp, move_op());
+}
+
+// [r_first, r_last) are already in the right part of the destination range.
+template <class Compare, class InputIterator, class InputOutIterator>
+void merge_with_right_placed
+ ( InputIterator first, InputIterator last
+ , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
+ , Compare comp)
+{
+ op_merge_with_right_placed(first, last, dest_first, r_first, r_last, comp, move_op());
+}
+
+// [r_first, r_last) are already in the right part of the destination range.
+// [dest_first, r_first) is uninitialized memory
+template <class Compare, class InputIterator, class InputOutIterator>
+void uninitialized_merge_with_right_placed
+ ( InputIterator first, InputIterator last
+ , InputOutIterator dest_first, InputOutIterator r_first, InputOutIterator r_last
+ , Compare comp)
+{
+ BOOST_ASSERT((last - first) == (r_first - dest_first));
+ typedef typename iterator_traits<InputOutIterator>::value_type value_type;
+ InputOutIterator const original_r_first = r_first;
+
+ destruct_n<value_type, InputOutIterator> d(dest_first);
+
+ while ( first != last && dest_first != original_r_first ) {
+ if (r_first == r_last) {
+ for(; dest_first != original_r_first; ++dest_first, ++first){
+ ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*first));
+ d.incr();
+ }
+ d.release();
+ InputOutIterator end = ::boost::move(first, last, original_r_first);
+ BOOST_ASSERT(end == r_last);
+ (void)end;
+ return;
+ }
+ else if (comp(*r_first, *first)) {
+ ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*r_first));
+ d.incr();
+ ++r_first;
+ }
+ else {
+ ::new((iterator_to_raw_pointer)(dest_first)) value_type(::boost::move(*first));
+ d.incr();
+ ++first;
+ }
+ ++dest_first;
+ }
+ d.release();
+ merge_with_right_placed(first, last, original_r_first, r_first, r_last, comp);
+}
+
+/*
+// [r_first, r_last) are already in the right part of the destination range.
+// [dest_first, r_first) is uninitialized memory
+template <class Compare, class BidirOutIterator, class BidirIterator>
+void uninitialized_merge_with_left_placed
+ ( BidirOutIterator dest_first, BidirOutIterator r_first, BidirOutIterator r_last
+ , BidirIterator first, BidirIterator last
+ , Compare comp)
+{
+ BOOST_ASSERT((last - first) == (r_last - r_first));
+ typedef typename iterator_traits<BidirOutIterator>::value_type value_type;
+ BidirOutIterator const original_r_last = r_last;
+
+ destruct_n<value_type> d(&*dest_last);
+
+ while ( first != last && dest_first != original_r_first ) {
+ if (r_first == r_last) {
+ for(; dest_first != original_r_first; ++dest_first, ++first){
+ ::new(&*dest_first) value_type(::boost::move(*first));
+ d.incr();
+ }
+ d.release();
+ BidirOutIterator end = ::boost::move(first, last, original_r_first);
+ BOOST_ASSERT(end == r_last);
+ (void)end;
+ return;
+ }
+ else if (comp(*r_first, *first)) {
+ ::new(&*dest_first) value_type(::boost::move(*r_first));
+ d.incr();
+ ++r_first;
+ }
+ else {
+ ::new(&*dest_first) value_type(::boost::move(*first));
+ d.incr();
+ ++first;
+ }
+ ++dest_first;
+ }
+ d.release();
+ merge_with_right_placed(first, last, original_r_first, r_first, r_last, comp);
+}
+*/
+
+
+/// This is a helper function for the merge routines.
+template<typename BidirectionalIterator1, typename BidirectionalIterator2>
+ BidirectionalIterator1
+ rotate_adaptive(BidirectionalIterator1 first,
+ BidirectionalIterator1 middle,
+ BidirectionalIterator1 last,
+ typename iterator_traits<BidirectionalIterator1>::size_type len1,
+ typename iterator_traits<BidirectionalIterator1>::size_type len2,
+ BidirectionalIterator2 buffer,
+ typename iterator_traits<BidirectionalIterator1>::size_type buffer_size)
+{
+ if (len1 > len2 && len2 <= buffer_size)
+ {
+ if(len2) //Protect against self-move ranges
+ {
+ BidirectionalIterator2 buffer_end = boost::move(middle, last, buffer);
+ boost::move_backward(first, middle, last);
+ return boost::move(buffer, buffer_end, first);
+ }
+ else
+ return first;
+ }
+ else if (len1 <= buffer_size)
+ {
+ if(len1) //Protect against self-move ranges
+ {
+ BidirectionalIterator2 buffer_end = boost::move(first, middle, buffer);
+ BidirectionalIterator1 ret = boost::move(middle, last, first);
+ boost::move(buffer, buffer_end, ret);
+ return ret;
+ }
+ else
+ return last;
+ }
+ else
+ return rotate_gcd(first, middle, last);
+}
+
+template<typename BidirectionalIterator,
+ typename Pointer, typename Compare>
+ void merge_adaptive_ONlogN_recursive
+ (BidirectionalIterator first,
+ BidirectionalIterator middle,
+ BidirectionalIterator last,
+ typename iterator_traits<BidirectionalIterator>::size_type len1,
+ typename iterator_traits<BidirectionalIterator>::size_type len2,
+ Pointer buffer,
+ typename iterator_traits<BidirectionalIterator>::size_type buffer_size,
+ Compare comp)
+{
+ typedef typename iterator_traits<BidirectionalIterator>::size_type size_type;
+ //trivial cases
+ if (!len2 || !len1) {
+ return;
+ }
+ else if (len1 <= buffer_size || len2 <= buffer_size)
+ {
+ range_xbuf<Pointer, size_type, move_op> rxbuf(buffer, buffer + buffer_size);
+ buffered_merge(first, middle, last, comp, rxbuf);
+ }
+ else if (size_type(len1 + len2) == 2u) {
+ if (comp(*middle, *first))
+ adl_move_swap(*first, *middle);
+ return;
+ }
+ else if (size_type(len1 + len2) < MergeBufferlessONLogNRotationThreshold) {
+ merge_bufferless_ON2(first, middle, last, comp);
+ return;
+ }
+ BidirectionalIterator first_cut = first;
+ BidirectionalIterator second_cut = middle;
+ size_type len11 = 0;
+ size_type len22 = 0;
+ if (len1 > len2) //(len1 < len2)
+ {
+ len11 = len1 / 2;
+ first_cut += len11;
+ second_cut = boost::movelib::lower_bound(middle, last, *first_cut, comp);
+ len22 = second_cut - middle;
+ }
+ else
+ {
+ len22 = len2 / 2;
+ second_cut += len22;
+ first_cut = boost::movelib::upper_bound(first, middle, *second_cut, comp);
+ len11 = first_cut - first;
+ }
+
+ BidirectionalIterator new_middle
+ = rotate_adaptive(first_cut, middle, second_cut,
+ size_type(len1 - len11), len22, buffer,
+ buffer_size);
+ merge_adaptive_ONlogN_recursive(first, first_cut, new_middle, len11,
+ len22, buffer, buffer_size, comp);
+ merge_adaptive_ONlogN_recursive(new_middle, second_cut, last,
+ len1 - len11, len2 - len22, buffer, buffer_size, comp);
+}
+
+
+template<typename BidirectionalIterator, typename Compare, typename RandRawIt>
+void merge_adaptive_ONlogN(BidirectionalIterator first,
+ BidirectionalIterator middle,
+ BidirectionalIterator last,
+ Compare comp,
+ RandRawIt uninitialized,
+ typename iterator_traits<BidirectionalIterator>::size_type uninitialized_len)
+{
+ typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
+ typedef typename iterator_traits<BidirectionalIterator>::size_type size_type;
+
+ if (first == middle || middle == last)
+ return;
+
+ if(uninitialized_len)
+ {
+ const size_type len1 = size_type(middle - first);
+ const size_type len2 = size_type(last - middle);
+
+ ::boost::movelib::adaptive_xbuf<value_type, RandRawIt> xbuf(uninitialized, uninitialized_len);
+ xbuf.initialize_until(uninitialized_len, *first);
+ merge_adaptive_ONlogN_recursive(first, middle, last, len1, len2, xbuf.begin(), uninitialized_len, comp);
+ }
+ else
+ {
+ merge_bufferless(first, middle, last, comp);
+ }
+}
+
+
+} //namespace movelib {
+} //namespace boost {
+
+#endif //#define BOOST_MOVE_MERGE_HPP
diff --git a/src/third_party/boost-1.70.0/boost/move/algo/detail/merge_sort.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/merge_sort.hpp
new file mode 100644
index 00000000000..34bbd2e2a88
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/merge_sort.hpp
@@ -0,0 +1,207 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_DETAIL_MERGE_SORT_HPP
+#define BOOST_MOVE_DETAIL_MERGE_SORT_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>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/algo/move.hpp>
+#include <boost/move/algo/detail/merge.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/detail/destruct_n.hpp>
+#include <boost/move/algo/detail/insertion_sort.hpp>
+#include <cassert>
+
+namespace boost {
+namespace movelib {
+
+// @cond
+
+static const unsigned MergeSortInsertionSortThreshold = 16;
+
+template <class RandIt, class Compare>
+void inplace_stable_sort(RandIt first, RandIt last, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ if (size_type(last - first) <= size_type(MergeSortInsertionSortThreshold)) {
+ insertion_sort(first, last, comp);
+ return;
+ }
+ RandIt middle = first + (last - first) / 2;
+ inplace_stable_sort(first, middle, comp);
+ inplace_stable_sort(middle, last, comp);
+ merge_bufferless_ONlogN_recursive
+ (first, middle, last, size_type(middle - first), size_type(last - middle), comp);
+}
+
+// @endcond
+
+template<class RandIt, class RandIt2, class Compare>
+void merge_sort_copy( RandIt first, RandIt last
+ , RandIt2 dest, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ size_type const count = size_type(last - first);
+ if(count <= MergeSortInsertionSortThreshold){
+ insertion_sort_copy(first, last, dest, comp);
+ }
+ else{
+ size_type const half = count/2;
+ merge_sort_copy(first + half, last , dest+half , comp);
+ merge_sort_copy(first , first + half, first + half, comp);
+ merge_with_right_placed
+ ( first + half, first + half + half
+ , dest, dest+half, dest + count
+ , comp);
+ }
+}
+
+template<class RandIt, class RandItRaw, class Compare>
+void merge_sort_uninitialized_copy( RandIt first, RandIt last
+ , RandItRaw uninitialized
+ , Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+
+ size_type const count = size_type(last - first);
+ if(count <= MergeSortInsertionSortThreshold){
+ insertion_sort_uninitialized_copy(first, last, uninitialized, comp);
+ }
+ else{
+ size_type const half = count/2;
+ merge_sort_uninitialized_copy(first + half, last, uninitialized + half, comp);
+ destruct_n<value_type, RandItRaw> d(uninitialized+half);
+ d.incr(count-half);
+ merge_sort_copy(first, first + half, first + half, comp);
+ uninitialized_merge_with_right_placed
+ ( first + half, first + half + half
+ , uninitialized, uninitialized+half, uninitialized+count
+ , comp);
+ d.release();
+ }
+}
+
+template<class RandIt, class RandItRaw, class Compare>
+void merge_sort( RandIt first, RandIt last, Compare comp
+ , RandItRaw uninitialized)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ typedef typename iterator_traits<RandIt>::value_type value_type;
+
+ size_type const count = size_type(last - first);
+ if(count <= MergeSortInsertionSortThreshold){
+ insertion_sort(first, last, comp);
+ }
+ else{
+ size_type const half = count/2;
+ size_type const rest = count - half;
+ RandIt const half_it = first + half;
+ RandIt const rest_it = first + rest;
+
+ merge_sort_uninitialized_copy(half_it, last, uninitialized, comp);
+ destruct_n<value_type, RandItRaw> d(uninitialized);
+ d.incr(rest);
+ merge_sort_copy(first, half_it, rest_it, comp);
+ merge_with_right_placed
+ ( uninitialized, uninitialized + rest
+ , first, rest_it, last, antistable<Compare>(comp));
+ }
+}
+
+///@cond
+
+template<class RandIt, class RandItRaw, class Compare>
+void merge_sort_with_constructed_buffer( RandIt first, RandIt last, Compare comp, RandItRaw buffer)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+
+ size_type const count = size_type(last - first);
+ if(count <= MergeSortInsertionSortThreshold){
+ insertion_sort(first, last, comp);
+ }
+ else{
+ size_type const half = count/2;
+ size_type const rest = count - half;
+ RandIt const half_it = first + half;
+ RandIt const rest_it = first + rest;
+
+ merge_sort_copy(half_it, last, buffer, comp);
+ merge_sort_copy(first, half_it, rest_it, comp);
+ merge_with_right_placed
+ (buffer, buffer + rest
+ , first, rest_it, last, antistable<Compare>(comp));
+ }
+}
+
+template<typename RandIt, typename Pointer,
+ typename Distance, typename Compare>
+void stable_sort_ONlogN_recursive(RandIt first, RandIt last, Pointer buffer, Distance buffer_size, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ if (size_type(last - first) <= size_type(MergeSortInsertionSortThreshold)) {
+ insertion_sort(first, last, comp);
+ }
+ else {
+ const size_type len = (last - first) / 2;
+ const RandIt middle = first + len;
+ if (len > ((buffer_size+1)/2)){
+ stable_sort_ONlogN_recursive(first, middle, buffer, buffer_size, comp);
+ stable_sort_ONlogN_recursive(middle, last, buffer, buffer_size, comp);
+ }
+ else{
+ merge_sort_with_constructed_buffer(first, middle, comp, buffer);
+ merge_sort_with_constructed_buffer(middle, last, comp, buffer);
+ }
+ merge_adaptive_ONlogN_recursive(first, middle, last,
+ size_type(middle - first),
+ size_type(last - middle),
+ buffer, buffer_size,
+ comp);
+ }
+}
+
+template<typename BidirectionalIterator, typename Compare, typename RandRawIt>
+void stable_sort_adaptive_ONlogN2(BidirectionalIterator first,
+ BidirectionalIterator last,
+ Compare comp,
+ RandRawIt uninitialized,
+ std::size_t uninitialized_len)
+{
+ typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
+
+ ::boost::movelib::adaptive_xbuf<value_type, RandRawIt> xbuf(uninitialized, uninitialized_len);
+ xbuf.initialize_until(uninitialized_len, *first);
+ stable_sort_ONlogN_recursive(first, last, uninitialized, uninitialized_len, comp);
+}
+
+///@endcond
+
+}} //namespace boost { namespace movelib{
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_DETAIL_MERGE_SORT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/pdqsort.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/pdqsort.hpp
index b6a127896c9..b6a127896c9 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/pdqsort.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algo/detail/pdqsort.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/detail/set_difference.hpp b/src/third_party/boost-1.70.0/boost/move/algo/detail/set_difference.hpp
index 51d047592af..51d047592af 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/detail/set_difference.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/move/algo/move.hpp
index 5d5ba19ea0f..5d5ba19ea0f 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/move.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algo/move.hpp
diff --git a/src/third_party/boost-1.70.0/boost/move/algo/predicate.hpp b/src/third_party/boost-1.70.0/boost/move/algo/predicate.hpp
new file mode 100644
index 00000000000..ca76b754a4c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/algo/predicate.hpp
@@ -0,0 +1,101 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MOVE_ALGO_PREDICATE_HPP
+#define BOOST_MOVE_ALGO_PREDICATE_HPP
+
+#include <boost/move/algo/move.hpp>
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/algo/detail/basic_op.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/destruct_n.hpp>
+#include <boost/assert.hpp>
+
+namespace boost {
+namespace movelib {
+
+template<class Comp>
+struct antistable
+{
+ explicit antistable(Comp &comp)
+ : m_comp(comp)
+ {}
+
+ antistable(const antistable & other)
+ : m_comp(other.m_comp)
+ {}
+
+ template<class U, class V>
+ bool operator()(const U &u, const V & v)
+ { return !m_comp(v, u); }
+
+ const Comp &get() const
+ { return m_comp; }
+
+ private:
+ antistable & operator=(const antistable &);
+ Comp &m_comp;
+};
+
+template<class Comp>
+Comp unantistable(Comp comp)
+{ return comp; }
+
+template<class Comp>
+Comp unantistable(antistable<Comp> comp)
+{ return comp.get(); }
+
+template <class Comp>
+class negate
+{
+ public:
+ negate()
+ {}
+
+ explicit negate(Comp comp)
+ : m_comp(comp)
+ {}
+
+ template <class T1, class T2>
+ bool operator()(const T1& l, const T2& r)
+ {
+ return !m_comp(l, r);
+ }
+
+ private:
+ Comp m_comp;
+};
+
+
+template <class Comp>
+class inverse
+{
+ public:
+ inverse()
+ {}
+
+ explicit inverse(Comp comp)
+ : m_comp(comp)
+ {}
+
+ template <class T1, class T2>
+ bool operator()(const T1& l, const T2& r)
+ {
+ return m_comp(r, l);
+ }
+
+ private:
+ Comp m_comp;
+};
+
+} //namespace movelib {
+} //namespace boost {
+
+#endif //#define BOOST_MOVE_ALGO_PREDICATE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/unique.hpp b/src/third_party/boost-1.70.0/boost/move/algo/unique.hpp
index 8022a654e26..8022a654e26 100644
--- a/src/third_party/boost-1.69.0/boost/move/algo/unique.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/move/algorithm.hpp
index 880d661e7dd..880d661e7dd 100644
--- a/src/third_party/boost-1.69.0/boost/move/algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/core.hpp b/src/third_party/boost-1.70.0/boost/move/core.hpp
index b34740dcf83..b34740dcf83 100644
--- a/src/third_party/boost-1.69.0/boost/move/core.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/core.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/default_delete.hpp b/src/third_party/boost-1.70.0/boost/move/default_delete.hpp
index 31ae67aa07c..31ae67aa07c 100644
--- a/src/third_party/boost-1.69.0/boost/move/default_delete.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/default_delete.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/config_begin.hpp b/src/third_party/boost-1.70.0/boost/move/detail/config_begin.hpp
index 637eb158bd1..637eb158bd1 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/config_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/config_end.hpp b/src/third_party/boost-1.70.0/boost/move/detail/config_end.hpp
index 71a99e93c9d..71a99e93c9d 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/config_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/config_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/destruct_n.hpp b/src/third_party/boost-1.70.0/boost/move/detail/destruct_n.hpp
index 9f60fc2773a..9f60fc2773a 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/destruct_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/destruct_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/fwd_macros.hpp b/src/third_party/boost-1.70.0/boost/move/detail/fwd_macros.hpp
index a5df5f1be78..a5df5f1be78 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/fwd_macros.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/fwd_macros.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/iterator_to_raw_pointer.hpp b/src/third_party/boost-1.70.0/boost/move/detail/iterator_to_raw_pointer.hpp
index 97ee3a65955..97ee3a65955 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/iterator_to_raw_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/iterator_to_raw_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/iterator_traits.hpp b/src/third_party/boost-1.70.0/boost/move/detail/iterator_traits.hpp
index 5ffcb2cf056..5ffcb2cf056 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/iterator_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/move/detail/meta_utils.hpp
index f16e185d6df..f16e185d6df 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/meta_utils.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/meta_utils.hpp
diff --git a/src/third_party/boost-1.70.0/boost/move/detail/meta_utils_core.hpp b/src/third_party/boost-1.70.0/boost/move/detail/meta_utils_core.hpp
new file mode 100644
index 00000000000..4e116738345
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/move/detail/meta_utils_core.hpp
@@ -0,0 +1,137 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
+#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+//Small meta-typetraits to support move
+
+namespace boost {
+namespace move_detail {
+
+template<typename T>
+struct voider { typedef void type; };
+
+//////////////////////////////////////
+// if_c
+//////////////////////////////////////
+template<bool C, typename T1, typename T2>
+struct if_c
+{
+ typedef T1 type;
+};
+
+template<typename T1, typename T2>
+struct if_c<false,T1,T2>
+{
+ typedef T2 type;
+};
+
+//////////////////////////////////////
+// if_
+//////////////////////////////////////
+template<typename T1, typename T2, typename T3>
+struct if_ : if_c<0 != T1::value, T2, T3>
+{};
+
+//////////////////////////////////////
+// enable_if_c
+//////////////////////////////////////
+struct enable_if_nat{};
+
+template <bool B, class T = enable_if_nat>
+struct enable_if_c
+{
+ typedef T type;
+};
+
+template <class T>
+struct enable_if_c<false, T> {};
+
+//////////////////////////////////////
+// enable_if
+//////////////////////////////////////
+template <class Cond, class T = enable_if_nat>
+struct enable_if : enable_if_c<Cond::value, T> {};
+
+//////////////////////////////////////
+// disable_if_c
+//////////////////////////////////////
+template <bool B, class T = enable_if_nat>
+struct disable_if_c
+ : enable_if_c<!B, T>
+{};
+
+//////////////////////////////////////
+// disable_if
+//////////////////////////////////////
+template <class Cond, class T = enable_if_nat>
+struct disable_if : enable_if_c<!Cond::value, T> {};
+
+//////////////////////////////////////
+// integral_constant
+//////////////////////////////////////
+template<class T, T v>
+struct integral_constant
+{
+ static const T value = v;
+ typedef T value_type;
+ typedef integral_constant<T, v> type;
+
+ operator T() const { return value; }
+ T operator()() const { return value; }
+};
+
+typedef integral_constant<bool, true > true_type;
+typedef integral_constant<bool, false > false_type;
+
+
+//////////////////////////////////////
+// is_same
+//////////////////////////////////////
+template<class T, class U>
+struct is_same
+{
+ static const bool value = false;
+};
+
+template<class T>
+struct is_same<T, T>
+{
+ static const bool value = true;
+};
+
+//////////////////////////////////////
+// enable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = enable_if_nat>
+struct enable_if_same : enable_if<is_same<T, U>, R> {};
+
+//////////////////////////////////////
+// disable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = enable_if_nat>
+struct disable_if_same : disable_if<is_same<T, U>, R> {};
+
+} //namespace move_detail {
+} //namespace boost {
+
+#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/move_helpers.hpp b/src/third_party/boost-1.70.0/boost/move/detail/move_helpers.hpp
index 17138444d1d..17138444d1d 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/move_helpers.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/move_helpers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/placement_new.hpp b/src/third_party/boost-1.70.0/boost/move/detail/placement_new.hpp
index 69d33328cfe..69d33328cfe 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/placement_new.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/placement_new.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/pointer_element.hpp b/src/third_party/boost-1.70.0/boost/move/detail/pointer_element.hpp
index ecdd6080ce0..ecdd6080ce0 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/pointer_element.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/pointer_element.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/reverse_iterator.hpp b/src/third_party/boost-1.70.0/boost/move/detail/reverse_iterator.hpp
index 73f59ce79f1..73f59ce79f1 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/reverse_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/std_ns_begin.hpp b/src/third_party/boost-1.70.0/boost/move/detail/std_ns_begin.hpp
index a768e61a15e..a768e61a15e 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/std_ns_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/std_ns_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/std_ns_end.hpp b/src/third_party/boost-1.70.0/boost/move/detail/std_ns_end.hpp
index 097505995bb..097505995bb 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/std_ns_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/std_ns_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/to_raw_pointer.hpp b/src/third_party/boost-1.70.0/boost/move/detail/to_raw_pointer.hpp
index 7e89beb4db0..7e89beb4db0 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/to_raw_pointer.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/move/detail/type_traits.hpp
index 8432ca22830..8432ca22830 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/type_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/type_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/unique_ptr_meta_utils.hpp b/src/third_party/boost-1.70.0/boost/move/detail/unique_ptr_meta_utils.hpp
index e11124d8988..e11124d8988 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/unique_ptr_meta_utils.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/unique_ptr_meta_utils.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/workaround.hpp b/src/third_party/boost-1.70.0/boost/move/detail/workaround.hpp
index 1d16f243321..1d16f243321 100644
--- a/src/third_party/boost-1.69.0/boost/move/detail/workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/detail/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/iterator.hpp b/src/third_party/boost-1.70.0/boost/move/iterator.hpp
index f36df23c0c0..f36df23c0c0 100644
--- a/src/third_party/boost-1.69.0/boost/move/iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/make_unique.hpp b/src/third_party/boost-1.70.0/boost/move/make_unique.hpp
index ef106dbb55a..ef106dbb55a 100644
--- a/src/third_party/boost-1.69.0/boost/move/make_unique.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/make_unique.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/move.hpp b/src/third_party/boost-1.70.0/boost/move/move.hpp
index 62dddbc9548..62dddbc9548 100644
--- a/src/third_party/boost-1.69.0/boost/move/move.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/move.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/traits.hpp b/src/third_party/boost-1.70.0/boost/move/traits.hpp
index b48b8f61d2d..b48b8f61d2d 100644
--- a/src/third_party/boost-1.69.0/boost/move/traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/unique_ptr.hpp b/src/third_party/boost-1.70.0/boost/move/unique_ptr.hpp
index 2d794e8ed57..2d794e8ed57 100644
--- a/src/third_party/boost-1.69.0/boost/move/unique_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/unique_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/utility.hpp b/src/third_party/boost-1.70.0/boost/move/utility.hpp
index 28de7935c86..28de7935c86 100644
--- a/src/third_party/boost-1.69.0/boost/move/utility.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/utility.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/utility_core.hpp b/src/third_party/boost-1.70.0/boost/move/utility_core.hpp
index 55042a9bb15..55042a9bb15 100644
--- a/src/third_party/boost-1.69.0/boost/move/utility_core.hpp
+++ b/src/third_party/boost-1.70.0/boost/move/utility_core.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/O1_size.hpp b/src/third_party/boost-1.70.0/boost/mpl/O1_size.hpp
index 98bd3a7459f..98bd3a7459f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/O1_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/O1_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/O1_size_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/O1_size_fwd.hpp
index c84a7a56ae1..c84a7a56ae1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/O1_size_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/O1_size_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/advance.hpp b/src/third_party/boost-1.70.0/boost/mpl/advance.hpp
index 1af600417f8..1af600417f8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/advance.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/advance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/advance_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/advance_fwd.hpp
index 803841019d3..803841019d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/advance_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/advance_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/always.hpp b/src/third_party/boost-1.70.0/boost/mpl/always.hpp
index 5fe71321e10..5fe71321e10 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/always.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/always.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/and.hpp b/src/third_party/boost-1.70.0/boost/mpl/and.hpp
index 454aaf2e969..454aaf2e969 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/apply.hpp
index 581eb6810e2..581eb6810e2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/apply_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/apply_fwd.hpp
index 5f5fa789160..5f5fa789160 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/apply_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/apply_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/apply_wrap.hpp b/src/third_party/boost-1.70.0/boost/mpl/apply_wrap.hpp
index b807779cfa1..b807779cfa1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/apply_wrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/apply_wrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/arg.hpp b/src/third_party/boost-1.70.0/boost/mpl/arg.hpp
index f51adfaeab9..f51adfaeab9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/arg_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/arg_fwd.hpp
index 7346dc35559..7346dc35559 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/arg_fwd.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/mpl/assert.hpp
index 7f220941a31..7f220941a31 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/assert.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/at.hpp b/src/third_party/boost-1.70.0/boost/mpl/at.hpp
index aa90e59c167..aa90e59c167 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/at.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/at.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/at_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/at_fwd.hpp
index 6aaae38351e..6aaae38351e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/at_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/at_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/O1_size_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/O1_size_impl.hpp
index 3bcbd0f787c..3bcbd0f787c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/O1_size_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/O1_size_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/adl_barrier.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/adl_barrier.hpp
index 3968c242adb..3968c242adb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/adl_barrier.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/adl_barrier.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_backward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/advance_backward.hpp
index df567932118..df567932118 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/advance_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_forward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/advance_forward.hpp
index 62b0101c67b..62b0101c67b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/advance_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/arg_typedef.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/arg_typedef.hpp
index 362db16006a..362db16006a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/arg_typedef.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/arg_typedef.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/arithmetic_op.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/arithmetic_op.hpp
index 0171db5db63..0171db5db63 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/arithmetic_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/arithmetic_op.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/arity.hpp
index d13ab4aded8..d13ab4aded8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/arity_spec.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/arity_spec.hpp
index 7c8221428d3..7c8221428d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/arity_spec.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/arity_spec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/at_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/at_impl.hpp
index 923937480ea..923937480ea 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/begin_end_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/begin_end_impl.hpp
index 58b70dd1018..58b70dd1018 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/begin_end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/begin_end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/clear_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/clear_impl.hpp
index 20b270c0cea..20b270c0cea 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/clear_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/clear_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/common_name_wknd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/common_name_wknd.hpp
index 00758b243ed..00758b243ed 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/common_name_wknd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/common_name_wknd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/comparison_op.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/comparison_op.hpp
index 2df72d300a7..2df72d300a7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/comparison_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/comparison_op.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/adl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/adl.hpp
index e9bdf1156b0..e9bdf1156b0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/adl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/adl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/arrays.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/arrays.hpp
index a9ea68ad678..a9ea68ad678 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/arrays.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/arrays.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bcc.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/bcc.hpp
index fe4941a5983..fe4941a5983 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/bcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/bind.hpp
index 10bcb94b8b4..10bcb94b8b4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/compiler.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/compiler.hpp
index 7d3e3b6622f..7d3e3b6622f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/compiler.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/compiler.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/ctps.hpp
index af78f47ffda..af78f47ffda 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dependent_nttp.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/dependent_nttp.hpp
index 5c2e24dbbd3..5c2e24dbbd3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dependent_nttp.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/dependent_nttp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
index 9f8ea8c67f7..9f8ea8c67f7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dtp.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/dtp.hpp
index 4379b6b2fcf..4379b6b2fcf 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dtp.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/dtp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/eti.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/eti.hpp
index 519d433d359..519d433d359 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/eti.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/eti.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/forwarding.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/forwarding.hpp
index b4296ad9612..b4296ad9612 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/forwarding.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/forwarding.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gcc.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/gcc.hpp
index 080495de17d..080495de17d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/gcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gpu.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/gpu.hpp
index 0e5ed784c45..0e5ed784c45 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gpu.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/gpu.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/has_apply.hpp
index 4dc01c66474..4dc01c66474 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/has_apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_xxx.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/has_xxx.hpp
index b0f2f8c23e0..b0f2f8c23e0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_xxx.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/has_xxx.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/integral.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/integral.hpp
index 144542d9c34..144542d9c34 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/integral.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/integral.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/intel.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/intel.hpp
index 5bd91591739..5bd91591739 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/intel.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/intel.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/lambda.hpp
index 93fbafe0713..93fbafe0713 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/msvc.hpp
index 8a6b9246277..8a6b9246277 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/msvc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc_typename.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/msvc_typename.hpp
index feedc16db87..feedc16db87 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc_typename.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/msvc_typename.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/nttp.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/nttp.hpp
index 11125a9bffc..11125a9bffc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/nttp.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/nttp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/operators.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/operators.hpp
index 3fb9db30572..3fb9db30572 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/overload_resolution.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/overload_resolution.hpp
index 61e4486e9bc..61e4486e9bc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/overload_resolution.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/overload_resolution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/pp_counter.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/pp_counter.hpp
index e7fb8d66c62..e7fb8d66c62 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/pp_counter.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/pp_counter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/preprocessor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/preprocessor.hpp
index 82ebc68fe0c..82ebc68fe0c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/preprocessor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/preprocessor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/static_constant.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/static_constant.hpp
index ece38fb0e99..ece38fb0e99 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/static_constant.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/static_constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ttp.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/ttp.hpp
index 3aff3f84df0..3aff3f84df0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ttp.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/ttp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/typeof.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/typeof.hpp
index cde6179c67c..cde6179c67c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/typeof.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/typeof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/use_preprocessed.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/use_preprocessed.hpp
index 8fd5c607559..8fd5c607559 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/use_preprocessed.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/use_preprocessed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/workaround.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/workaround.hpp
index 82c632982df..82c632982df 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/config/workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/config/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/contains_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/contains_impl.hpp
index b80caeafedc..b80caeafedc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/contains_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/contains_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/count_args.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/count_args.hpp
index b432d370eb9..b432d370eb9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/count_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/count_args.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/empty_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/empty_impl.hpp
index cfe55ae2524..cfe55ae2524 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/empty_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/empty_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/find_if_pred.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/find_if_pred.hpp
index c07d89d6c7f..c07d89d6c7f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/find_if_pred.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/find_if_pred.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/fold_impl.hpp
index 97c88c5b290..97c88c5b290 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl_body.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/fold_impl_body.hpp
index 02dd645f723..02dd645f723 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl_body.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/fold_impl_body.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/front_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/front_impl.hpp
index 9493c1c4e97..9493c1c4e97 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/front_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/front_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/full_lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/full_lambda.hpp
index 918aff5c09f..918aff5c09f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/full_lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/full_lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_apply.hpp
index 9c16a354982..9c16a354982 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_begin.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_begin.hpp
index 4ee415cbb99..4ee415cbb99 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_key_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_key_impl.hpp
index 7a0e9b55832..7a0e9b55832 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_key_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_key_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_rebind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_rebind.hpp
index eb4eda613c6..eb4eda613c6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_rebind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_rebind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_size.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_size.hpp
index ff29913f9ba..ff29913f9ba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_tag.hpp
index 3912a76af67..3912a76af67 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_type.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_type.hpp
index 6744ef5b062..6744ef5b062 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/has_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/has_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/include_preprocessed.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/include_preprocessed.hpp
index c13434c8ebb..c13434c8ebb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/include_preprocessed.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/include_preprocessed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/insert_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/insert_impl.hpp
index 03a304b580f..03a304b580f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/insert_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/insert_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/inserter_algorithm.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/inserter_algorithm.hpp
index 20ae8161c7d..20ae8161c7d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/inserter_algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/inserter_algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/integral_wrapper.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp
index 6bc05f7e96e..6bc05f7e96e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/integral_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/is_msvc_eti_arg.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/is_msvc_eti_arg.hpp
index 4989940bad9..4989940bad9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/is_msvc_eti_arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/is_msvc_eti_arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/iter_apply.hpp
index 41dfdfadd5e..41dfdfadd5e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/iter_apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_if_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/iter_fold_if_impl.hpp
index 6372e83de44..6372e83de44 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/iter_fold_impl.hpp
index b4d2922f51a..b4d2922f51a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_arity_param.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_arity_param.hpp
index 63cfcd4f171..63cfcd4f171 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_arity_param.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_arity_param.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_no_ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_no_ctps.hpp
index 9e0d0203a7b..9e0d0203a7b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_spec.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_spec.hpp
index 6ffacc0a6db..6ffacc0a6db 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_spec.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_spec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_support.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_support.hpp
index 5b2af585835..5b2af585835 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_support.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/lambda_support.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/largest_int.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/largest_int.hpp
index feaa1eca726..feaa1eca726 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/largest_int.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/largest_int.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/logical_op.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/logical_op.hpp
index 0ba2510262f..0ba2510262f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/logical_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/logical_op.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_dtw.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_dtw.hpp
index d595b231f3f..d595b231f3f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_dtw.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_dtw.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_eti_base.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_eti_base.hpp
index 0d8ace69644..0d8ace69644 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_eti_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_eti_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_is_class.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_is_class.hpp
index acd40e33077..acd40e33077 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_is_class.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_is_class.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_never_true.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_never_true.hpp
index 2df9b811728..2df9b811728 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_never_true.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_never_true.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_type.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_type.hpp
index bea244f319e..bea244f319e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/msvc_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/na.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/na.hpp
index f079c1e78cd..f079c1e78cd 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/na.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/na.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/na_assert.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/na_assert.hpp
index 1983c09061e..1983c09061e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/na_assert.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/na_assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/na_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/na_fwd.hpp
index 43882419397..43882419397 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/na_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/na_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/na_spec.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/na_spec.hpp
index d052fce18ea..d052fce18ea 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/na_spec.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/na_spec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/nested_type_wknd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/nested_type_wknd.hpp
index 4207abdbc54..4207abdbc54 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/nested_type_wknd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/nested_type_wknd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/nttp_decl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/nttp_decl.hpp
index 8c344d874d7..8c344d874d7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/nttp_decl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/nttp_decl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_cast_utils.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/numeric_cast_utils.hpp
index a7ac85a99d7..a7ac85a99d7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_cast_utils.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/numeric_cast_utils.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_op.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/numeric_op.hpp
index 54925570136..54925570136 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/numeric_op.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/overload_names.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/overload_names.hpp
index f9bbb3916b0..f9bbb3916b0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/overload_names.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/overload_names.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/and.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/and.hpp
index 010ad1fc849..010ad1fc849 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp
index e08eaccf03a..e08eaccf03a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp
index b2ed5d51301..b2ed5d51301 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp
index 34d51a1a587..34d51a1a587 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
index b0702324aaf..b0702324aaf 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp
index 0e9513a649a..0e9513a649a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
index 0bbf54ea26d..0bbf54ea26d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
index 55b31cb8a9c..55b31cb8a9c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
index ec1939151d0..ec1939151d0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp
index de67398a37c..de67398a37c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp
index 86f16826f79..86f16826f79 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
index 62c994589f4..62c994589f4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
index 9e7a29300d6..9e7a29300d6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp
index e3eef71b1ea..e3eef71b1ea 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp
index 14d8e08bff0..14d8e08bff0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
index 2603f9184a0..2603f9184a0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
index 00f31c42268..00f31c42268 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
index 805790e86d6..805790e86d6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
index 890a198a464..890a198a464 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/less.hpp
index 4fe3cd17c49..4fe3cd17c49 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
index ca2894f6f93..ca2894f6f93 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/list.hpp
index 4e8ad53d212..4e8ad53d212 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
index 0b48a7f8e11..0b48a7f8e11 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/map.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/map.hpp
index 837e0137718..837e0137718 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp
index 71d49137660..71d49137660 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
index 224b34930c9..224b34930c9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
index 98b21b1e22d..98b21b1e22d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/or.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/or.hpp
index 31e1aaa4e60..31e1aaa4e60 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/or.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp
index a9f6ee79a5c..a9f6ee79a5c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp
index 020f093965a..020f093965a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
index c468684c91e..c468684c91e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
index 658f92a7c38..658f92a7c38 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/set.hpp
index 5721922e111..5721922e111 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
index cbeb932c13d..cbeb932c13d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
index b5b181ce196..b5b181ce196 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
index f7a342e989a..f7a342e989a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
index daec4b8a8e1..daec4b8a8e1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/times.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/times.hpp
index cb97cc4e132..cb97cc4e132 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/times.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
index 2194ce9d11b..2194ce9d11b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp
index bfa9565a537..bfa9565a537 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
index 0f1560d7f13..0f1560d7f13 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
index 555c8001678..555c8001678 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
index 9838e799b57..9838e799b57 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
index 7de6dad088b..7de6dad088b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
index efa213dfedc..efa213dfedc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
index 254e5b8886c..254e5b8886c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
index 12062b425b7..12062b425b7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
index 020d6ba4c67..020d6ba4c67 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
index 04748776754..04748776754 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
index 42a9758bbdd..42a9758bbdd 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
index a0445d9dfdd..a0445d9dfdd 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
index 00636dcbf2d..00636dcbf2d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
index b14cdda3b96..b14cdda3b96 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
index 58066d81f61..58066d81f61 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
index bf818731eba..bf818731eba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
index 6fdf8badbe6..6fdf8badbe6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
index f848eef98c2..f848eef98c2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
index 233a1ec30c2..233a1ec30c2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
index 50ea754f2ec..50ea754f2ec 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
index 890a198a464..890a198a464 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
index 7fb35e10771..7fb35e10771 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
index 206ecdcf937..206ecdcf937 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
index e5ea456c9e2..e5ea456c9e2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
index ab25482f55d..ab25482f55d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
index 970e0b76028..970e0b76028 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
index 7b49450a554..7b49450a554 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
index 8badbab5b12..8badbab5b12 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
index d87d8cd11ed..d87d8cd11ed 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
index 3f7394e7ccd..3f7394e7ccd 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
index a55b24c4508..a55b24c4508 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
index b85880ffddb..b85880ffddb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
index 7a07414adff..7a07414adff 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
index 39a4057b77d..39a4057b77d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
index 95aaa5cbdfa..95aaa5cbdfa 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
index 1ff34f9032a..1ff34f9032a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
index d14a5e48860..d14a5e48860 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
index 08c4915ebd0..08c4915ebd0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
index 1164f0f8c27..1164f0f8c27 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
index fd773cc842b..fd773cc842b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
index 26533dd4236..26533dd4236 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
index a6c7b6219a6..a6c7b6219a6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
index c522d0826ff..c522d0826ff 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
index 010ad1fc849..010ad1fc849 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
index e08eaccf03a..e08eaccf03a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
index b2ed5d51301..b2ed5d51301 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
index 34d51a1a587..34d51a1a587 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
index 095b84dd9b1..095b84dd9b1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
index 28914408ab2..28914408ab2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
index 282771bce55..282771bce55 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
index bc9c1989db1..bc9c1989db1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
index 76ce540b4ee..76ce540b4ee 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
index de67398a37c..de67398a37c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
index 9bc7fb192a0..9bc7fb192a0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
index fa2dc4a25ac..fa2dc4a25ac 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
index 9e7a29300d6..9e7a29300d6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
index bf818731eba..bf818731eba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
index faa3f2ba9a1..faa3f2ba9a1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
index 392d142d920..392d142d920 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
index 00f31c42268..00f31c42268 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
index 805790e86d6..805790e86d6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
index 890a198a464..890a198a464 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
index 6451680fe80..6451680fe80 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
index 00ae0d3ecb5..00ae0d3ecb5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
index 4e8ad53d212..4e8ad53d212 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
index 0b48a7f8e11..0b48a7f8e11 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
index 837e0137718..837e0137718 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
index bb67c59a52b..bb67c59a52b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
index 6fd0cab37a5..6fd0cab37a5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
index 7c940a5b076..7c940a5b076 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
index 31e1aaa4e60..31e1aaa4e60 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
index cecead75abc..cecead75abc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
index e7a7f001961..e7a7f001961 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
index c468684c91e..c468684c91e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
index 658f92a7c38..658f92a7c38 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
index 5721922e111..5721922e111 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
index cbeb932c13d..cbeb932c13d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
index 7ef46725226..7ef46725226 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
index 91a98f7385b..91a98f7385b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
index 1164f0f8c27..1164f0f8c27 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
index d019b572479..d019b572479 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
index 2194ce9d11b..2194ce9d11b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
index bfa9565a537..bfa9565a537 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
index 0f1560d7f13..0f1560d7f13 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/and.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/and.hpp
index 163913f81a3..163913f81a3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply.hpp
index 89d9e4b4ea7..89d9e4b4ea7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
index b2ed5d51301..b2ed5d51301 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
index 34d51a1a587..34d51a1a587 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/arg.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
index b0702324aaf..b0702324aaf 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bind.hpp
index 0e9513a649a..0e9513a649a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp
index ee40fb3d3f7..ee40fb3d3f7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp
index 1e28d3b07eb..1e28d3b07eb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
index 2ba879d67b1..2ba879d67b1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/deque.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/deque.hpp
index de67398a37c..de67398a37c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/deque.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/deque.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/divides.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/divides.hpp
index f365d62dfaf..f365d62dfaf 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/divides.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/divides.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
index bbc6bf0dc1d..bbc6bf0dc1d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
index 9e7a29300d6..9e7a29300d6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
index bf818731eba..bf818731eba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/greater.hpp
index 38c8bb3add4..38c8bb3add4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
index 2aa8370f0ff..2aa8370f0ff 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp
index 8b34e718c34..8b34e718c34 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
index 805790e86d6..805790e86d6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
index f8f109c2bda..f8f109c2bda 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/less.hpp
index 928d0e3087e..928d0e3087e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
index 364cd967a7c..364cd967a7c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/list.hpp
index 4e8ad53d212..4e8ad53d212 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp
index 0b48a7f8e11..0b48a7f8e11 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/map.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/map.hpp
index 837e0137718..837e0137718 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/minus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/minus.hpp
index 0b8b5ceeb7d..0b8b5ceeb7d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/minus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/minus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp
index 6a64e49a81c..6a64e49a81c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
index c08d7f06d7e..c08d7f06d7e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/or.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/or.hpp
index 986b2e0ea4b..986b2e0ea4b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/or.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/plus.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/plus.hpp
index ed2e432dc88..ed2e432dc88 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/plus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/quote.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/quote.hpp
index d7d0420e4d8..d7d0420e4d8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/quote.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/quote.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
index c468684c91e..c468684c91e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
index 658f92a7c38..658f92a7c38 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/set.hpp
index 5721922e111..5721922e111 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp
index cbeb932c13d..cbeb932c13d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
index cf9c837d6a5..cf9c837d6a5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
index 477229f24e2..477229f24e2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
index a23fc238467..a23fc238467 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/times.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/times.hpp
index ca88d405f05..ca88d405f05 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/times.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
index 2194ce9d11b..2194ce9d11b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/vector.hpp
index bfa9565a537..bfa9565a537 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
index 0f1560d7f13..0f1560d7f13 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/add.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/add.hpp
index 53e646ef6ab..53e646ef6ab 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/add.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/add.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp
index cab3989d1c9..cab3989d1c9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/default_params.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/default_params.hpp
index c3548c6c9b6..c3548c6c9b6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/default_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/default_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/enum.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/enum.hpp
index 64c5e6a8f6b..64c5e6a8f6b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/ext_params.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/ext_params.hpp
index f5e6e502cd5..f5e6e502cd5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/ext_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/ext_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/filter_params.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/filter_params.hpp
index 7c0df4f7d51..7c0df4f7d51 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/filter_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/filter_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/is_seq.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/is_seq.hpp
index cb6dcb98c17..cb6dcb98c17 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/is_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/is_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/params.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/params.hpp
index acad321903f..acad321903f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/params.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
index de5535cea8f..de5535cea8f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/range.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/range.hpp
index d66eeb559c8..d66eeb559c8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/range.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/repeat.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/repeat.hpp
index 05113676658..05113676658 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/repeat.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/repeat.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/sub.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/sub.hpp
index c794c749fac..c794c749fac 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/sub.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/sub.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/token_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/token_equal.hpp
index ffdb20f9e43..ffdb20f9e43 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/token_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/token_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/tuple.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/tuple.hpp
index 755bbc58e47..755bbc58e47 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/preprocessor/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/ptr_to_ref.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/ptr_to_ref.hpp
index 8517b302942..8517b302942 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/ptr_to_ref.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/ptr_to_ref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/push_back_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/push_back_impl.hpp
index 27e7a604434..27e7a604434 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/push_back_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/push_back_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/push_front_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/push_front_impl.hpp
index 5b83ee76454..5b83ee76454 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/push_front_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/push_front_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_fold_impl.hpp
index a27a35fa139..a27a35fa139 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl_body.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_fold_impl_body.hpp
index 0f800106674..0f800106674 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl_body.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_fold_impl_body.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp
index 83182a2e904..83182a2e904 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/sequence_wrapper.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/sequence_wrapper.hpp
index 3f5e553039c..3f5e553039c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/sequence_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/sequence_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/size_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/size_impl.hpp
index 50f5ee91895..50f5ee91895 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/size_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/size_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/static_cast.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/static_cast.hpp
index f72d1c7c9b3..f72d1c7c9b3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/static_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/static_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/template_arity.hpp
index f0111598256..f0111598256 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/template_arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/template_arity_fwd.hpp
index 19d63a39616..19d63a39616 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/template_arity_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/traits_lambda_spec.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/traits_lambda_spec.hpp
index 4a7ff26b58e..4a7ff26b58e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/traits_lambda_spec.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/traits_lambda_spec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/type_wrapper.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/type_wrapper.hpp
index f3ac3079a9a..f3ac3079a9a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/type_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/type_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/unwrap.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/unwrap.hpp
index caeb97d7d37..caeb97d7d37 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/unwrap.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/unwrap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/value_wknd.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/value_wknd.hpp
index 23fefde0219..23fefde0219 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/value_wknd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/value_wknd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/aux_/yes_no.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/yes_no.hpp
index 21a18a21c28..21a18a21c28 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/aux_/yes_no.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/yes_no.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/back_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/back_fwd.hpp
index 119722c31ab..119722c31ab 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/back_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/back_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/back_inserter.hpp b/src/third_party/boost-1.70.0/boost/mpl/back_inserter.hpp
index 8fc4083c3a9..8fc4083c3a9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/back_inserter.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/back_inserter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/base.hpp b/src/third_party/boost-1.70.0/boost/mpl/base.hpp
index 8f438490ef8..8f438490ef8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/base.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/begin.hpp b/src/third_party/boost-1.70.0/boost/mpl/begin.hpp
index 15bdf7e3885..15bdf7e3885 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/begin_end.hpp b/src/third_party/boost-1.70.0/boost/mpl/begin_end.hpp
index b7074afd205..b7074afd205 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/begin_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/begin_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/begin_end_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/begin_end_fwd.hpp
index 70ef9efec43..70ef9efec43 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/begin_end_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/begin_end_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/bind.hpp b/src/third_party/boost-1.70.0/boost/mpl/bind.hpp
index 63ee3f27e2e..63ee3f27e2e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/bind.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/bind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/bind_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/bind_fwd.hpp
index 4746edd60b3..4746edd60b3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/bind_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/bind_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/bool.hpp b/src/third_party/boost-1.70.0/boost/mpl/bool.hpp
index 0a6180cedf0..0a6180cedf0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/bool_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/bool_fwd.hpp
index e6292528487..e6292528487 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/bool_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/bool_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/clear.hpp b/src/third_party/boost-1.70.0/boost/mpl/clear.hpp
index c6b95edf4b7..c6b95edf4b7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/clear.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/clear.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/clear_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/clear_fwd.hpp
index d14a1d2b248..d14a1d2b248 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/clear_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/clear_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/comparison.hpp b/src/third_party/boost-1.70.0/boost/mpl/comparison.hpp
index 99dca9dd809..99dca9dd809 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/comparison.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/contains.hpp b/src/third_party/boost-1.70.0/boost/mpl/contains.hpp
index 02c2aa4f8bc..02c2aa4f8bc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/contains.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/contains.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/contains_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/contains_fwd.hpp
index c7c667285df..c7c667285df 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/contains_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/contains_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/deref.hpp b/src/third_party/boost-1.70.0/boost/mpl/deref.hpp
index 1105ec9038d..1105ec9038d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/deref.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/deref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/distance.hpp b/src/third_party/boost-1.70.0/boost/mpl/distance.hpp
index 95f4f33510c..95f4f33510c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/distance.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/distance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/distance_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/distance_fwd.hpp
index a69a7c5140c..a69a7c5140c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/distance_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/distance_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/divides.hpp b/src/third_party/boost-1.70.0/boost/mpl/divides.hpp
index 55c8b0d10a7..55c8b0d10a7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/divides.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/divides.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/empty.hpp b/src/third_party/boost-1.70.0/boost/mpl/empty.hpp
index 1185324c1b6..1185324c1b6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/empty_base.hpp b/src/third_party/boost-1.70.0/boost/mpl/empty_base.hpp
index cb56ef676c3..cb56ef676c3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/empty_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/empty_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/empty_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/empty_fwd.hpp
index 551c9660aba..551c9660aba 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/empty_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/empty_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/end.hpp b/src/third_party/boost-1.70.0/boost/mpl/end.hpp
index cb8d525f51f..cb8d525f51f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/end.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/equal_to.hpp
index 5dfc87dbe2a..5dfc87dbe2a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/erase_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/erase_fwd.hpp
index 44e38eac287..44e38eac287 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/erase_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/erase_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/erase_key_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/erase_key_fwd.hpp
index 54265eef812..54265eef812 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/erase_key_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/erase_key_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/eval_if.hpp b/src/third_party/boost-1.70.0/boost/mpl/eval_if.hpp
index e892703fd86..e892703fd86 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/eval_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/eval_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/find.hpp b/src/third_party/boost-1.70.0/boost/mpl/find.hpp
index 31a8b0eb897..31a8b0eb897 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/find.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/find.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/find_if.hpp b/src/third_party/boost-1.70.0/boost/mpl/find_if.hpp
index 83a007e77e6..83a007e77e6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/find_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/find_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/fold.hpp b/src/third_party/boost-1.70.0/boost/mpl/fold.hpp
index 0bc67ef3d66..0bc67ef3d66 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/fold.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/fold.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/for_each.hpp b/src/third_party/boost-1.70.0/boost/mpl/for_each.hpp
index 6b40ce1663c..6b40ce1663c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/for_each.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/for_each.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/front.hpp b/src/third_party/boost-1.70.0/boost/mpl/front.hpp
index b222ff25418..b222ff25418 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/front_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/front_fwd.hpp
index f01282a77bb..f01282a77bb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/front_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/front_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/front_inserter.hpp b/src/third_party/boost-1.70.0/boost/mpl/front_inserter.hpp
index 0a6b197ef80..0a6b197ef80 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/front_inserter.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/front_inserter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/greater.hpp b/src/third_party/boost-1.70.0/boost/mpl/greater.hpp
index b1f0a2cf13b..b1f0a2cf13b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/greater_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/greater_equal.hpp
index 7a06a62e8e4..7a06a62e8e4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/has_key.hpp b/src/third_party/boost-1.70.0/boost/mpl/has_key.hpp
index ac3a5c7bb18..ac3a5c7bb18 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/has_key.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/has_key.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/has_key_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/has_key_fwd.hpp
index 54b7ed622dc..54b7ed622dc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/has_key_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/has_key_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/has_xxx.hpp b/src/third_party/boost-1.70.0/boost/mpl/has_xxx.hpp
index 82e67ddca4c..82e67ddca4c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/has_xxx.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/has_xxx.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/identity.hpp b/src/third_party/boost-1.70.0/boost/mpl/identity.hpp
index 190d2f53f6f..190d2f53f6f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/identity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/identity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/if.hpp b/src/third_party/boost-1.70.0/boost/mpl/if.hpp
index b6bdf6c6922..b6bdf6c6922 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/if.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/inherit.hpp b/src/third_party/boost-1.70.0/boost/mpl/inherit.hpp
index b5427371d95..b5427371d95 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/inherit.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/inherit.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/insert.hpp b/src/third_party/boost-1.70.0/boost/mpl/insert.hpp
index 5e379a49788..5e379a49788 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/insert.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/insert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/insert_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/insert_fwd.hpp
index ba6b1617603..ba6b1617603 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/insert_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/insert_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/insert_range_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/insert_range_fwd.hpp
index d9c946f2a9a..d9c946f2a9a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/insert_range_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/insert_range_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/inserter.hpp b/src/third_party/boost-1.70.0/boost/mpl/inserter.hpp
index 964df7f692a..964df7f692a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/inserter.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/inserter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/int.hpp b/src/third_party/boost-1.70.0/boost/mpl/int.hpp
index b7fa0a765f5..b7fa0a765f5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/int.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/int.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/int_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/int_fwd.hpp
index 03d20c1cd6f..03d20c1cd6f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/int_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/int_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/integral_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/integral_c.hpp
index 7a692dcab64..7a692dcab64 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/integral_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/integral_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/integral_c_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/integral_c_fwd.hpp
index 05e311daa18..05e311daa18 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/integral_c_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/integral_c_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/integral_c_tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/integral_c_tag.hpp
index b6046920f8f..b6046920f8f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/integral_c_tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/integral_c_tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/is_placeholder.hpp b/src/third_party/boost-1.70.0/boost/mpl/is_placeholder.hpp
index 9f79ef102ce..9f79ef102ce 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/is_placeholder.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/is_placeholder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/is_sequence.hpp b/src/third_party/boost-1.70.0/boost/mpl/is_sequence.hpp
index 68e036fa918..68e036fa918 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/is_sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/is_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/iter_fold.hpp b/src/third_party/boost-1.70.0/boost/mpl/iter_fold.hpp
index 1b56b790405..1b56b790405 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/iter_fold.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/iter_fold.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/iter_fold_if.hpp b/src/third_party/boost-1.70.0/boost/mpl/iter_fold_if.hpp
index 0115b7b2244..0115b7b2244 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/iter_fold_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/iter_fold_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/iterator_category.hpp b/src/third_party/boost-1.70.0/boost/mpl/iterator_category.hpp
index d5ea4afee34..d5ea4afee34 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/iterator_category.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/iterator_category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/iterator_range.hpp b/src/third_party/boost-1.70.0/boost/mpl/iterator_range.hpp
index a637e2241a4..a637e2241a4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/iterator_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/iterator_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/iterator_tags.hpp b/src/third_party/boost-1.70.0/boost/mpl/iterator_tags.hpp
index 7c3116ab45b..7c3116ab45b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/iterator_tags.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/iterator_tags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/key_type_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/key_type_fwd.hpp
index 1e86b782c5d..1e86b782c5d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/key_type_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/key_type_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/lambda.hpp b/src/third_party/boost-1.70.0/boost/mpl/lambda.hpp
index cc8f6075ce5..cc8f6075ce5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/lambda.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/lambda_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/lambda_fwd.hpp
index 57b04264107..57b04264107 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/lambda_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/lambda_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/less.hpp b/src/third_party/boost-1.70.0/boost/mpl/less.hpp
index 63da5aa4efa..63da5aa4efa 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/less_equal.hpp b/src/third_party/boost-1.70.0/boost/mpl/less_equal.hpp
index 3d668c27907..3d668c27907 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/limits/arity.hpp b/src/third_party/boost-1.70.0/boost/mpl/limits/arity.hpp
index 8c3eb362ce7..8c3eb362ce7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/limits/arity.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/limits/arity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/limits/list.hpp b/src/third_party/boost-1.70.0/boost/mpl/limits/list.hpp
index b22d6a7b813..b22d6a7b813 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/limits/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/limits/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/limits/unrolling.hpp b/src/third_party/boost-1.70.0/boost/mpl/limits/unrolling.hpp
index 6dba94222e8..6dba94222e8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/limits/unrolling.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/limits/unrolling.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/limits/vector.hpp b/src/third_party/boost-1.70.0/boost/mpl/limits/vector.hpp
index 9007589168c..9007589168c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/limits/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/limits/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list.hpp b/src/third_party/boost-1.70.0/boost/mpl/list.hpp
index cff8a4ddd8a..cff8a4ddd8a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/O1_size.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/O1_size.hpp
index ccbc3f1b320..ccbc3f1b320 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/O1_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/O1_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/begin_end.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/begin_end.hpp
index b568bee21c2..b568bee21c2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/begin_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/begin_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/clear.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/clear.hpp
index b16162f7c07..b16162f7c07 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/clear.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/clear.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/empty.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/empty.hpp
index 95f9243947c..95f9243947c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/front.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/front.hpp
index 9bea1fd3426..9bea1fd3426 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/include_preprocessed.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/include_preprocessed.hpp
index 4f7cab26091..4f7cab26091 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/include_preprocessed.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/include_preprocessed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/item.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/item.hpp
index 8505deb2848..8505deb2848 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/item.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/item.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/iterator.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/iterator.hpp
index 6b5ea786305..6b5ea786305 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/numbered.hpp
index 0cd49a6d36e..0cd49a6d36e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/numbered.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/numbered_c.hpp
index 0006fd6cfcd..0006fd6cfcd 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/numbered_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/pop_front.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/pop_front.hpp
index 46a04145692..46a04145692 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/pop_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/pop_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
index 99368d2c18a..99368d2c18a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
index 7133d712167..7133d712167 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
index 750e495f3fe..750e495f3fe 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
index 7f15acf3e96..7f15acf3e96 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
index 54591011961..54591011961 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
index 5393d792bdb..5393d792bdb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
index 68c67613648..68c67613648 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
index 0c51ba20956..0c51ba20956 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
index 4cc22da278c..4cc22da278c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
index 28c061d5bf3..28c061d5bf3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_back.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/push_back.hpp
index 8f3b73e430c..8f3b73e430c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/push_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_front.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/push_front.hpp
index fcfbe4ab3e3..fcfbe4ab3e3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/push_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/size.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/size.hpp
index f5e7feafda2..f5e7feafda2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/tag.hpp
index f5ed2bbfe62..f5ed2bbfe62 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/aux_/tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/aux_/tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list0.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list0.hpp
index 8e06b8d0885..8e06b8d0885 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list0.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list0.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list0_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list0_c.hpp
index 807ca1c2c9f..807ca1c2c9f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list0_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list0_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list10.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list10.hpp
index d32d0d8c77f..d32d0d8c77f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list10.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list10_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list10_c.hpp
index 25c8f9defb1..25c8f9defb1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list10_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list10_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list20.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list20.hpp
index 724cabd2373..724cabd2373 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list20.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list20_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list20_c.hpp
index 0026f695ac7..0026f695ac7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list20_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list20_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list30.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list30.hpp
index a9004c7376e..a9004c7376e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list30.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list30_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list30_c.hpp
index c9965747780..c9965747780 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list30_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list30_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list40.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list40.hpp
index 02f869efbe2..02f869efbe2 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list40.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list40_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list40_c.hpp
index 808d599dd9d..808d599dd9d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list40_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list40_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list50.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list50.hpp
index f16c68cebab..f16c68cebab 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list50.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/list/list50_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/list/list50_c.hpp
index 20692d898ef..20692d898ef 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/list/list50_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/list/list50_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/logical.hpp b/src/third_party/boost-1.70.0/boost/mpl/logical.hpp
index c8236b5fe8e..c8236b5fe8e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/logical.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/logical.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/long.hpp b/src/third_party/boost-1.70.0/boost/mpl/long.hpp
index c455267341d..c455267341d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/long.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/long.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/long_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/long_fwd.hpp
index 5f62f2b81ce..5f62f2b81ce 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/long_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/long_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/max.hpp b/src/third_party/boost-1.70.0/boost/mpl/max.hpp
index 4a4c8c1c086..4a4c8c1c086 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/max.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/max.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/min_max.hpp b/src/third_party/boost-1.70.0/boost/mpl/min_max.hpp
index 77545cd352c..77545cd352c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/min_max.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/min_max.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/minus.hpp b/src/third_party/boost-1.70.0/boost/mpl/minus.hpp
index 9f29f74b545..9f29f74b545 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/minus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/minus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/multiplies.hpp b/src/third_party/boost-1.70.0/boost/mpl/multiplies.hpp
index 53c39d98a49..53c39d98a49 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/multiplies.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/multiplies.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/negate.hpp b/src/third_party/boost-1.70.0/boost/mpl/negate.hpp
index d6aa0654596..d6aa0654596 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/negate.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/negate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/next.hpp b/src/third_party/boost-1.70.0/boost/mpl/next.hpp
index 954b2226c6b..954b2226c6b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/next.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/next.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/next_prior.hpp b/src/third_party/boost-1.70.0/boost/mpl/next_prior.hpp
index d45fa20eaad..d45fa20eaad 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/next_prior.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/next_prior.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/not.hpp b/src/third_party/boost-1.70.0/boost/mpl/not.hpp
index d5f6025579b..d5f6025579b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/not.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/not.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/mpl/not_equal_to.hpp
index 11ef3424c91..11ef3424c91 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/numeric_cast.hpp b/src/third_party/boost-1.70.0/boost/mpl/numeric_cast.hpp
index 6541470445c..6541470445c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/numeric_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/numeric_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/or.hpp b/src/third_party/boost-1.70.0/boost/mpl/or.hpp
index f9704d5166c..f9704d5166c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/or.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/pair.hpp b/src/third_party/boost-1.70.0/boost/mpl/pair.hpp
index 67c01d73ced..67c01d73ced 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/pair.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/pair.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/pair_view.hpp b/src/third_party/boost-1.70.0/boost/mpl/pair_view.hpp
index a72cf9287a4..a72cf9287a4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/pair_view.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/pair_view.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/placeholders.hpp b/src/third_party/boost-1.70.0/boost/mpl/placeholders.hpp
index df0373ca572..df0373ca572 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/placeholders.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/placeholders.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/plus.hpp b/src/third_party/boost-1.70.0/boost/mpl/plus.hpp
index 455920b5d11..455920b5d11 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/plus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/pop_back_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/pop_back_fwd.hpp
index 70957046cd6..70957046cd6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/pop_back_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/pop_back_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/pop_front_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/pop_front_fwd.hpp
index 719c8b218a7..719c8b218a7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/pop_front_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/pop_front_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/print.hpp b/src/third_party/boost-1.70.0/boost/mpl/print.hpp
index 36e25cd3e7d..36e25cd3e7d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/print.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/print.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/prior.hpp b/src/third_party/boost-1.70.0/boost/mpl/prior.hpp
index 849802cfa1e..849802cfa1e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/prior.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/prior.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/protect.hpp b/src/third_party/boost-1.70.0/boost/mpl/protect.hpp
index 80574c27501..80574c27501 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/protect.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/protect.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/push_back.hpp b/src/third_party/boost-1.70.0/boost/mpl/push_back.hpp
index 95a2587be6b..95a2587be6b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/push_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/push_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/push_back_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/push_back_fwd.hpp
index 7a4f7a754ac..7a4f7a754ac 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/push_back_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/push_back_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/push_front.hpp b/src/third_party/boost-1.70.0/boost/mpl/push_front.hpp
index e4d0dfb7fb9..e4d0dfb7fb9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/push_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/push_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/push_front_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/push_front_fwd.hpp
index d6ad5af572b..d6ad5af572b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/push_front_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/push_front_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/quote.hpp b/src/third_party/boost-1.70.0/boost/mpl/quote.hpp
index 242c2e7afb4..242c2e7afb4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/quote.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/quote.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/remove_if.hpp b/src/third_party/boost-1.70.0/boost/mpl/remove_if.hpp
index bbe6564b094..bbe6564b094 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/remove_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/remove_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/reverse_fold.hpp b/src/third_party/boost-1.70.0/boost/mpl/reverse_fold.hpp
index 87c26a9a845..87c26a9a845 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/reverse_fold.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/reverse_fold.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/reverse_iter_fold.hpp b/src/third_party/boost-1.70.0/boost/mpl/reverse_iter_fold.hpp
index 348f295ee79..348f295ee79 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/reverse_iter_fold.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/reverse_iter_fold.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/same_as.hpp b/src/third_party/boost-1.70.0/boost/mpl/same_as.hpp
index 4be20bc33e9..4be20bc33e9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/same_as.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/same_as.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/sequence_tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/sequence_tag.hpp
index f87d92b28b5..f87d92b28b5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/sequence_tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/sequence_tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/sequence_tag_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/sequence_tag_fwd.hpp
index 4b0ed6f6b70..4b0ed6f6b70 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/sequence_tag_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/sequence_tag_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/at_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/at_impl.hpp
index 89119c4a599..89119c4a599 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/at_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/at_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/begin_end_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/begin_end_impl.hpp
index 2595280532d..2595280532d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/begin_end_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/begin_end_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/clear_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/clear_impl.hpp
index 9c6c76030a6..9c6c76030a6 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/clear_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/clear_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/empty_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/empty_impl.hpp
index 997ff023a25..997ff023a25 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/empty_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/empty_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/erase_impl.hpp
index c4a95b4a85a..c4a95b4a85a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/erase_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_key_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/erase_key_impl.hpp
index f945d4fb3da..f945d4fb3da 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_key_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/erase_key_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/has_key_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/has_key_impl.hpp
index bdc3273181f..bdc3273181f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/has_key_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/has_key_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/insert_impl.hpp
index ff180acaa86..ff180acaa86 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/insert_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_range_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/insert_range_impl.hpp
index f7150a87146..f7150a87146 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_range_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/insert_range_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/item.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/item.hpp
index bd5bc953f4d..bd5bc953f4d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/item.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/item.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/iterator.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/iterator.hpp
index 9a58a25f2ee..9a58a25f2ee 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/key_type_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/key_type_impl.hpp
index 8e8a0905447..8e8a0905447 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/key_type_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/key_type_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/set0.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/set0.hpp
index 65f52a8170b..65f52a8170b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/set0.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/set0.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/size_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/size_impl.hpp
index e865596698b..e865596698b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/size_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/size_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/tag.hpp
index f11fc2bbebb..f11fc2bbebb 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/value_type_impl.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/value_type_impl.hpp
index 91cf0d00cf8..91cf0d00cf8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/aux_/value_type_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/aux_/value_type_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/set/set0.hpp b/src/third_party/boost-1.70.0/boost/mpl/set/set0.hpp
index 1c424e4646a..1c424e4646a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/set/set0.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/set/set0.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/size.hpp b/src/third_party/boost-1.70.0/boost/mpl/size.hpp
index 12ffefbb78c..12ffefbb78c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/size_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/size_fwd.hpp
index c72628dd1e8..c72628dd1e8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/size_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/size_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/size_t.hpp b/src/third_party/boost-1.70.0/boost/mpl/size_t.hpp
index 99e9b41d0d8..99e9b41d0d8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/size_t.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/size_t.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/size_t_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/size_t_fwd.hpp
index ffdf4b32dc4..ffdf4b32dc4 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/size_t_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/size_t_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/tag.hpp
index 858627753d8..858627753d8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/times.hpp b/src/third_party/boost-1.70.0/boost/mpl/times.hpp
index f309557c6b5..f309557c6b5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/times.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/transform.hpp b/src/third_party/boost-1.70.0/boost/mpl/transform.hpp
index 4d3e2a0497f..4d3e2a0497f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/transform.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/transform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/value_type_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/value_type_fwd.hpp
index d8635bfe414..d8635bfe414 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/value_type_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/value_type_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector.hpp
index 479983d5ce3..479983d5ce3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/O1_size.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/O1_size.hpp
index ac9e3cf8877..ac9e3cf8877 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/O1_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/O1_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/at.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/at.hpp
index 0a7583ccf1f..0a7583ccf1f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/at.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/at.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/back.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/back.hpp
index b66363ec115..b66363ec115 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/back.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/begin_end.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/begin_end.hpp
index aa344515669..aa344515669 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/begin_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/begin_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/clear.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/clear.hpp
index b06d8be7527..b06d8be7527 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/clear.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/clear.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/empty.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/empty.hpp
index 5490a5f72f8..5490a5f72f8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/front.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/front.hpp
index a358db52cf3..a358db52cf3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/include_preprocessed.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/include_preprocessed.hpp
index a676116f603..a676116f603 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/include_preprocessed.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/include_preprocessed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/item.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/item.hpp
index 71538ceb413..71538ceb413 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/item.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/item.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/iterator.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/iterator.hpp
index 32df3156961..32df3156961 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/numbered.hpp
index b3f03873bab..b3f03873bab 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/numbered.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/numbered_c.hpp
index 4c159f948c0..4c159f948c0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/numbered_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_back.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/pop_back.hpp
index 1d95e355c05..1d95e355c05 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/pop_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_front.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/pop_front.hpp
index c94b8711c47..c94b8711c47 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/pop_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
index c79a1ac6061..c79a1ac6061 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
index 8b36f6a3ed7..8b36f6a3ed7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
index eb92a7814c1..eb92a7814c1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
index 56ca53f4ea3..56ca53f4ea3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
index a685019b486..a685019b486 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
index 6251dbc5467..6251dbc5467 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
index 1ed648a9d0a..1ed648a9d0a 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
index ba0ffa88ee0..ba0ffa88ee0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
index 3da323a998f..3da323a998f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
index e07f2b3ad56..e07f2b3ad56 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
index 88bbd3b318d..88bbd3b318d 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
index 8b36f6a3ed7..8b36f6a3ed7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
index 8c6c8bbb97c..8c6c8bbb97c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
index 56ca53f4ea3..56ca53f4ea3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
index b7da8e76b6f..b7da8e76b6f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
index 6251dbc5467..6251dbc5467 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
index 7487be4b06b..7487be4b06b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
index ba0ffa88ee0..ba0ffa88ee0 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
index 5a4c6d75dfe..5a4c6d75dfe 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
index e07f2b3ad56..e07f2b3ad56 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
index e4c640709a1..e4c640709a1 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
index 18eabc64daa..18eabc64daa 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
index 78ccac4e91e..78ccac4e91e 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
index 4bf67423062..4bf67423062 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
index c4049906f3b..c4049906f3b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
index 5741bb4b654..5741bb4b654 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
index debcf7027da..debcf7027da 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
index 88d742e0a5c..88d742e0a5c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
index 8db06df4540..8db06df4540 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
index f56d6aff067..f56d6aff067 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_back.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/push_back.hpp
index 527828c9ba3..527828c9ba3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/push_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_front.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/push_front.hpp
index f315de58b7c..f315de58b7c 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/push_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/size.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/size.hpp
index c131e8866d8..c131e8866d8 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/tag.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/tag.hpp
index 90d16e38c08..90d16e38c08 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/vector0.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/vector0.hpp
index 402667360d3..402667360d3 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/vector0.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/aux_/vector0.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector0.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector0.hpp
index 39759ddc24b..39759ddc24b 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector0.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector0.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector0_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector0_c.hpp
index 0e60215ddde..0e60215ddde 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector0_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector0_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector10.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector10.hpp
index 53a2a163ae7..53a2a163ae7 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector10.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector10.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector10_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector10_c.hpp
index be52d2f7f35..be52d2f7f35 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector10_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector10_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector20.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector20.hpp
index 96d1b9f45cd..96d1b9f45cd 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector20.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector20.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector20_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector20_c.hpp
index 3913f260269..3913f260269 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector20_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector20_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector30.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector30.hpp
index b2f0a5eb05f..b2f0a5eb05f 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector30.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector30.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector30_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector30_c.hpp
index 94cdab465a9..94cdab465a9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector30_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector30_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector40.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector40.hpp
index 2d2ef8195cc..2d2ef8195cc 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector40.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector40.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector40_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector40_c.hpp
index 25e2ebf3d26..25e2ebf3d26 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector40_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector40_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector50.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector50.hpp
index dc2d5c20a41..dc2d5c20a41 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/vector/vector50_c.hpp b/src/third_party/boost-1.70.0/boost/mpl/vector/vector50_c.hpp
index 7388bf404b9..7388bf404b9 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/vector/vector50_c.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/vector/vector50_c.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/void.hpp b/src/third_party/boost-1.70.0/boost/mpl/void.hpp
index 3dcbdd1d0ea..3dcbdd1d0ea 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/void.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/void.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/void_fwd.hpp b/src/third_party/boost-1.70.0/boost/mpl/void_fwd.hpp
index 86078b5c9e5..86078b5c9e5 100644
--- a/src/third_party/boost-1.69.0/boost/mpl/void_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/void_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/composite_key.hpp b/src/third_party/boost-1.70.0/boost/multi_index/composite_key.hpp
index 787cdf83195..787cdf83195 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/composite_key.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/composite_key.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/access_specifier.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/access_specifier.hpp
index f3346e836d4..f3346e836d4 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/access_specifier.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/access_specifier.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/adl_swap.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/adl_swap.hpp
index 02b06442290..02b06442290 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/adl_swap.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/adl_swap.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/allocator_traits.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/allocator_traits.hpp
new file mode 100644
index 00000000000..63fce6a4d7d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/allocator_traits.hpp
@@ -0,0 +1,143 @@
+/* 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_DETAIL_ALLOCATOR_TRAITS_HPP
+#define BOOST_MULTI_INDEX_DETAIL_ALLOCATOR_TRAITS_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+#include <memory>
+#else
+#include <boost/detail/workaround.hpp>
+#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <new>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* poor man's replacement of std::allocator_traits */
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+
+template<typename Allocator>
+struct allocator_traits:std::allocator_traits<Allocator>
+{
+ /* wrap std::allocator_traits alias templates for use in C++03 codebase */
+
+ typedef std::allocator_traits<Allocator> super;
+
+ template<typename T>
+ struct rebind_alloc
+ {
+ typedef typename super::template rebind_alloc<T> type;
+ };
+
+ template<typename T>
+ struct rebind_traits
+ {
+ typedef typename super::template rebind_traits<T> type;
+ };
+};
+
+#else
+
+/* not a full std::allocator_traits rewrite (not needed) */
+
+template<typename Allocator>
+struct allocator_traits
+{
+ typedef Allocator allocator_type;
+ typedef typename Allocator::value_type value_type;
+ typedef typename Allocator::pointer pointer;
+ typedef typename Allocator::const_pointer const_pointer;
+
+ /* [const_]void_pointer not provided as boost::pointer_traits's
+ * rebind_to has been seen to fail with things like
+ * boost::interprocess::offset_ptr in relatively old environments.
+ */
+
+ typedef typename Allocator::difference_type difference_type;
+ typedef typename Allocator::size_type size_type;
+
+ template<typename T>
+ struct rebind_alloc
+ {
+ typedef typename Allocator::template rebind<T>::other type;
+ };
+
+ template<typename T>
+ struct rebind_traits
+ {
+ typedef allocator_traits<typename rebind_alloc<T>::type> type;
+ };
+
+ static pointer allocate(Allocator& a,size_type n){return a.allocate(n);}
+ static pointer allocate(Allocator& a,size_type n,const_pointer p)
+ /* should've been const_void_pointer p */
+ {return a.allocate(n,p);}
+ static void deallocate(Allocator& a,pointer p,size_type n)
+ {a.deallocate(p,n);}
+ template<typename T>
+ static void construct(Allocator&,T* p,const T& x)
+ {::new (static_cast<void*>(p)) T(x);}
+ template<typename T>
+ static void construct(Allocator&,T* p,BOOST_RV_REF(T) x)
+ {::new (static_cast<void*>(p)) T(boost::move(x));}
+
+ template<typename T,BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ static void construct(Allocator&,T* p,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ vartempl_placement_new(p,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
+/* MSVC issues spurious warnings about unreferencend formal parameters in
+ * destroy<T> when T is a class with trivial dtor.
+ */
+
+#pragma warning(push)
+#pragma warning(disable:4100)
+#endif
+
+ template<typename T>
+ static void destroy(Allocator&,T* p){p->~T();}
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
+#pragma warning(pop)
+#endif
+
+ static size_type max_size(Allocator& a)BOOST_NOEXCEPT{return a.max_size();}
+};
+
+#endif
+
+template<typename Allocator,typename T>
+struct rebind_alloc_for
+{
+ typedef typename allocator_traits<Allocator>::
+ template rebind_alloc<T>::type type;
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/archive_constructed.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/archive_constructed.hpp
index 0a7a26e0d4e..0a7a26e0d4e 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/archive_constructed.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/archive_constructed.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/auto_space.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/auto_space.hpp
new file mode 100644
index 00000000000..ca19b320ad5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/auto_space.hpp
@@ -0,0 +1,90 @@
+/* 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_DETAIL_AUTO_SPACE_HPP
+#define BOOST_MULTI_INDEX_DETAIL_AUTO_SPACE_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/multi_index/detail/adl_swap.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/noncopyable.hpp>
+#include <memory>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* auto_space provides uninitialized space suitably to store
+ * a given number of elements of a given type.
+ */
+
+/* NB: it is not clear whether using an allocator to handle
+ * zero-sized arrays of elements is conformant or not. GCC 3.3.1
+ * and prior fail here, other stdlibs handle the issue gracefully.
+ * To be on the safe side, the case n==0 is given special treatment.
+ * References:
+ * GCC Bugzilla, "standard allocator crashes when deallocating segment
+ * "of zero length", http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14176
+ * C++ Standard Library Defect Report List (Revision 28), issue 199
+ * "What does allocate(0) return?",
+ * http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199
+ */
+
+template<typename T,typename Allocator=std::allocator<T> >
+struct auto_space:private noncopyable
+{
+ typedef typename rebind_alloc_for<
+ Allocator,T>
+ ::type allocator;
+ typedef allocator_traits<allocator> alloc_traits;
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::size_type size_type;
+
+ explicit auto_space(const Allocator& al=Allocator(),size_type n=1):
+ al_(al),n_(n),data_(n_?alloc_traits::allocate(al_,n_):pointer(0))
+ {}
+
+ ~auto_space(){if(n_)alloc_traits::deallocate(al_,data_,n_);}
+
+ Allocator get_allocator()const{return al_;}
+
+ pointer data()const{return data_;}
+
+ void swap(auto_space& x)
+ {
+ if(al_!=x.al_)adl_swap(al_,x.al_);
+ std::swap(n_,x.n_);
+ std::swap(data_,x.data_);
+ }
+
+private:
+ allocator al_;
+ size_type n_;
+ pointer data_;
+};
+
+template<typename T,typename Allocator>
+void swap(auto_space<T,Allocator>& x,auto_space<T,Allocator>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/base_type.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/base_type.hpp
index 8c9b62b716a..8c9b62b716a 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/base_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/base_type.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/bidir_node_iterator.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/bidir_node_iterator.hpp
new file mode 100644
index 00000000000..adfb77de6d1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/bidir_node_iterator.hpp
@@ -0,0 +1,114 @@
+/* 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_DETAIL_BIDIR_NODE_ITERATOR_HPP
+#define BOOST_MULTI_INDEX_DETAIL_BIDIR_NODE_ITERATOR_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/operators.hpp>
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/split_member.hpp>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* Iterator class for node-based indices with bidirectional
+ * iterators (ordered and sequenced indices.)
+ */
+
+template<typename Node>
+class bidir_node_iterator:
+ public bidirectional_iterator_helper<
+ bidir_node_iterator<Node>,
+ typename Node::value_type,
+ typename Node::difference_type,
+ const typename Node::value_type*,
+ const typename Node::value_type&>
+{
+public:
+ /* coverity[uninit_ctor]: suppress warning */
+ bidir_node_iterator(){}
+ explicit bidir_node_iterator(Node* node_):node(node_){}
+
+ const typename Node::value_type& operator*()const
+ {
+ return node->value();
+ }
+
+ bidir_node_iterator& operator++()
+ {
+ Node::increment(node);
+ return *this;
+ }
+
+ bidir_node_iterator& operator--()
+ {
+ Node::decrement(node);
+ return *this;
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* Serialization. As for why the following is public,
+ * see explanation in safe_mode_iterator notes in safe_mode.hpp.
+ */
+
+ BOOST_SERIALIZATION_SPLIT_MEMBER()
+
+ typedef typename Node::base_type node_base_type;
+
+ template<class Archive>
+ void save(Archive& ar,const unsigned int)const
+ {
+ node_base_type* bnode=node;
+ ar<<serialization::make_nvp("pointer",bnode);
+ }
+
+ template<class Archive>
+ void load(Archive& ar,const unsigned int)
+ {
+ node_base_type* bnode;
+ ar>>serialization::make_nvp("pointer",bnode);
+ node=static_cast<Node*>(bnode);
+ }
+#endif
+
+ /* get_node is not to be used by the user */
+
+ typedef Node node_type;
+
+ Node* get_node()const{return node;}
+
+private:
+ Node* node;
+};
+
+template<typename Node>
+bool operator==(
+ const bidir_node_iterator<Node>& x,
+ const bidir_node_iterator<Node>& y)
+{
+ return x.get_node()==y.get_node();
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/bucket_array.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/bucket_array.hpp
new file mode 100644
index 00000000000..149addf55e2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/bucket_array.hpp
@@ -0,0 +1,247 @@
+/* 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_DETAIL_BUCKET_ARRAY_HPP
+#define BOOST_MULTI_INDEX_DETAIL_BUCKET_ARRAY_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/auto_space.hpp>
+#include <boost/multi_index/detail/hash_index_node.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <cstddef>
+#include <limits.h>
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/archive/archive_exception.hpp>
+#include <boost/serialization/access.hpp>
+#include <boost/throw_exception.hpp>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* bucket structure for use by hashed indices */
+
+#define BOOST_MULTI_INDEX_BA_SIZES_32BIT \
+(53ul)(97ul)(193ul)(389ul)(769ul) \
+(1543ul)(3079ul)(6151ul)(12289ul)(24593ul) \
+(49157ul)(98317ul)(196613ul)(393241ul)(786433ul) \
+(1572869ul)(3145739ul)(6291469ul)(12582917ul)(25165843ul) \
+(50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \
+(1610612741ul)(3221225473ul)
+
+#if ((((ULONG_MAX>>16)>>16)>>16)>>15)==0 /* unsigned long less than 64 bits */
+#define BOOST_MULTI_INDEX_BA_SIZES \
+BOOST_MULTI_INDEX_BA_SIZES_32BIT \
+(4294967291ul)
+#else
+ /* obtained with aid from
+ * http://javaboutique.internet.com/prime_numb/
+ * http://www.rsok.com/~jrm/next_ten_primes.html
+ * and verified with
+ * http://www.alpertron.com.ar/ECM.HTM
+ */
+
+#define BOOST_MULTI_INDEX_BA_SIZES \
+BOOST_MULTI_INDEX_BA_SIZES_32BIT \
+(6442450939ul)(12884901893ul)(25769803751ul)(51539607551ul) \
+(103079215111ul)(206158430209ul)(412316860441ul)(824633720831ul) \
+(1649267441651ul)(3298534883309ul)(6597069766657ul)(13194139533299ul) \
+(26388279066623ul)(52776558133303ul)(105553116266489ul)(211106232532969ul) \
+(422212465066001ul)(844424930131963ul)(1688849860263953ul) \
+(3377699720527861ul)(6755399441055731ul)(13510798882111483ul) \
+(27021597764222939ul)(54043195528445957ul)(108086391056891903ul) \
+(216172782113783843ul)(432345564227567621ul)(864691128455135207ul) \
+(1729382256910270481ul)(3458764513820540933ul)(6917529027641081903ul) \
+(13835058055282163729ul)(18446744073709551557ul)
+#endif
+
+template<bool _=true> /* templatized to have in-header static var defs */
+class bucket_array_base:private noncopyable
+{
+protected:
+ static const std::size_t sizes[
+ BOOST_PP_SEQ_SIZE(BOOST_MULTI_INDEX_BA_SIZES)];
+
+ static std::size_t size_index(std::size_t n)
+ {
+ const std::size_t *bound=std::lower_bound(sizes,sizes+sizes_length,n);
+ if(bound==sizes+sizes_length)--bound;
+ return bound-sizes;
+ }
+
+#define BOOST_MULTI_INDEX_BA_POSITION_CASE(z,n,_) \
+ case n:return hash%BOOST_PP_SEQ_ELEM(n,BOOST_MULTI_INDEX_BA_SIZES);
+
+ static std::size_t position(std::size_t hash,std::size_t size_index_)
+ {
+ /* Accelerate hash%sizes[size_index_] by replacing with a switch on
+ * hash%Ci expressions, each Ci a compile-time constant, which the
+ * compiler can implement without using integer division.
+ */
+
+ switch(size_index_){
+ default: /* never used */
+ BOOST_PP_REPEAT(
+ BOOST_PP_SEQ_SIZE(BOOST_MULTI_INDEX_BA_SIZES),
+ BOOST_MULTI_INDEX_BA_POSITION_CASE,~)
+ }
+ }
+
+private:
+ static const std::size_t sizes_length;
+};
+
+template<bool _>
+const std::size_t bucket_array_base<_>::sizes[]={
+ BOOST_PP_SEQ_ENUM(BOOST_MULTI_INDEX_BA_SIZES)
+};
+
+template<bool _>
+const std::size_t bucket_array_base<_>::sizes_length=
+ sizeof(bucket_array_base<_>::sizes)/
+ sizeof(bucket_array_base<_>::sizes[0]);
+
+#undef BOOST_MULTI_INDEX_BA_POSITION_CASE
+#undef BOOST_MULTI_INDEX_BA_SIZES
+#undef BOOST_MULTI_INDEX_BA_SIZES_32BIT
+
+template<typename Allocator>
+class bucket_array:bucket_array_base<>
+{
+ typedef bucket_array_base<> super;
+ typedef hashed_index_base_node_impl<
+ typename rebind_alloc_for<
+ Allocator,
+ char
+ >::type
+ > base_node_impl_type;
+
+public:
+ typedef typename base_node_impl_type::base_pointer base_pointer;
+ typedef typename base_node_impl_type::pointer pointer;
+
+ bucket_array(const Allocator& al,pointer end_,std::size_t size_):
+ size_index_(super::size_index(size_)),
+ spc(al,static_cast<auto_space_size_type>(super::sizes[size_index_]+1))
+ {
+ clear(end_);
+ }
+
+ std::size_t size()const
+ {
+ return super::sizes[size_index_];
+ }
+
+ std::size_t position(std::size_t hash)const
+ {
+ return super::position(hash,size_index_);
+ }
+
+ base_pointer begin()const{return buckets();}
+ base_pointer end()const{return buckets()+size();}
+ base_pointer at(std::size_t n)const{return buckets()+n;}
+
+ void clear(pointer end_)
+ {
+ for(base_pointer x=begin(),y=end();x!=y;++x)x->prior()=pointer(0);
+ end()->prior()=end_->prior()=end_;
+ end_->next()=end();
+ }
+
+ void swap(bucket_array& x)
+ {
+ std::swap(size_index_,x.size_index_);
+ spc.swap(x.spc);
+ }
+
+private:
+ typedef auto_space<base_node_impl_type,Allocator> auto_space_type;
+ typedef typename auto_space_type::size_type auto_space_size_type;
+
+ std::size_t size_index_;
+ auto_space_type spc;
+
+ base_pointer buckets()const
+ {
+ return spc.data();
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ friend class boost::serialization::access;
+
+ /* bucket_arrays do not emit any kind of serialization info. They are
+ * fed to Boost.Serialization as hashed index iterators need to track
+ * them during serialization.
+ */
+
+ template<class Archive>
+ void serialize(Archive&,const unsigned int)
+ {
+ }
+#endif
+};
+
+template<typename Allocator>
+void swap(bucket_array<Allocator>& x,bucket_array<Allocator>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+/* bucket_arrays never get constructed directly by Boost.Serialization,
+ * as archives are always fed pointers to previously existent
+ * arrays. So, if this is called it means we are dealing with a
+ * somehow invalid archive.
+ */
+
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
+namespace serialization{
+#else
+namespace multi_index{
+namespace detail{
+#endif
+
+template<class Archive,typename Allocator>
+inline void load_construct_data(
+ Archive&,boost::multi_index::detail::bucket_array<Allocator>*,
+ const unsigned int)
+{
+ throw_exception(
+ archive::archive_exception(archive::archive_exception::other_exception));
+}
+
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
+} /* namespace serialization */
+#else
+} /* namespace multi_index::detail */
+} /* namespace multi_index */
+#endif
+
+#endif
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/cons_stdtuple.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/cons_stdtuple.hpp
index 855c5e06aa9..855c5e06aa9 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/cons_stdtuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/cons_stdtuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/converter.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/converter.hpp
index 3e04a3e8295..3e04a3e8295 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/converter.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/converter.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/copy_map.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/copy_map.hpp
new file mode 100644
index 00000000000..d5806ad3e0c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/copy_map.hpp
@@ -0,0 +1,151 @@
+/* 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_DETAIL_COPY_MAP_HPP
+#define BOOST_MULTI_INDEX_DETAIL_COPY_MAP_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/auto_space.hpp>
+#include <boost/multi_index/detail/raw_ptr.hpp>
+#include <boost/noncopyable.hpp>
+#include <functional>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* copy_map is used as an auxiliary structure during copy_() operations.
+ * When a container with n nodes is replicated, node_map holds the pairings
+ * between original and copied nodes, and provides a fast way to find a
+ * copied node from an original one.
+ * The semantics of the class are not simple, and no attempt has been made
+ * to enforce it: multi_index_container handles it right. On the other hand,
+ * the const interface, which is the one provided to index implementations,
+ * only allows for:
+ * - Enumeration of pairs of (original,copied) nodes (excluding the headers),
+ * - fast retrieval of copied nodes (including the headers.)
+ */
+
+template <typename Node>
+struct copy_map_entry
+{
+ copy_map_entry(Node* f,Node* s):first(f),second(s){}
+
+ Node* first;
+ Node* second;
+
+ bool operator<(const copy_map_entry<Node>& x)const
+ {
+ return std::less<Node*>()(first,x.first);
+ }
+};
+
+template <typename Node,typename Allocator>
+class copy_map:private noncopyable
+{
+ typedef typename rebind_alloc_for<
+ Allocator,Node
+ >::type allocator_type;
+ typedef allocator_traits<allocator_type> alloc_traits;
+ typedef typename alloc_traits::pointer pointer;
+
+public:
+ typedef const copy_map_entry<Node>* const_iterator;
+ typedef typename alloc_traits::size_type size_type;
+
+ copy_map(
+ const Allocator& al,size_type size,Node* header_org,Node* header_cpy):
+ al_(al),size_(size),spc(al_,size_),n(0),
+ header_org_(header_org),header_cpy_(header_cpy),released(false)
+ {}
+
+ ~copy_map()
+ {
+ if(!released){
+ for(size_type i=0;i<n;++i){
+ alloc_traits::destroy(
+ al_,boost::addressof((spc.data()+i)->second->value()));
+ deallocate((spc.data()+i)->second);
+ }
+ }
+ }
+
+ const_iterator begin()const{return raw_ptr<const_iterator>(spc.data());}
+ const_iterator end()const{return raw_ptr<const_iterator>(spc.data()+n);}
+
+ void clone(Node* node)
+ {
+ (spc.data()+n)->first=node;
+ (spc.data()+n)->second=raw_ptr<Node*>(allocate());
+ BOOST_TRY{
+ alloc_traits::construct(
+ al_,boost::addressof((spc.data()+n)->second->value()),node->value());
+ }
+ BOOST_CATCH(...){
+ deallocate((spc.data()+n)->second);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ ++n;
+
+ if(n==size_){
+ std::sort(
+ raw_ptr<copy_map_entry<Node>*>(spc.data()),
+ raw_ptr<copy_map_entry<Node>*>(spc.data())+size_);
+ }
+ }
+
+ Node* find(Node* node)const
+ {
+ if(node==header_org_)return header_cpy_;
+ return std::lower_bound(
+ begin(),end(),copy_map_entry<Node>(node,0))->second;
+ }
+
+ void release()
+ {
+ released=true;
+ }
+
+private:
+ allocator_type al_;
+ size_type size_;
+ auto_space<copy_map_entry<Node>,Allocator> spc;
+ size_type n;
+ Node* header_org_;
+ Node* header_cpy_;
+ bool released;
+
+ pointer allocate()
+ {
+ return alloc_traits::allocate(al_,1);
+ }
+
+ void deallocate(Node* node)
+ {
+ alloc_traits::deallocate(al_,static_cast<pointer>(node),1);
+ }
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp
index f0fa7304253..f0fa7304253 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/duplicates_iterator.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/duplicates_iterator.hpp
new file mode 100644
index 00000000000..bfba2320c5a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/duplicates_iterator.hpp
@@ -0,0 +1,119 @@
+/* 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_DETAIL_DUPLICATES_ITERATOR_HPP
+#define BOOST_MULTI_INDEX_DETAIL_DUPLICATES_ITERATOR_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <iterator>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* duplicates_operator is given a range of ordered elements and
+ * passes only over those which are duplicated.
+ */
+
+template<typename Node,typename Predicate>
+class duplicates_iterator
+{
+public:
+ typedef typename Node::value_type value_type;
+ typedef typename Node::difference_type difference_type;
+ typedef const typename Node::value_type* pointer;
+ typedef const typename Node::value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ duplicates_iterator(Node* node_,Node* end_,Predicate pred_):
+ node(node_),begin_chunk(0),end(end_),pred(pred_)
+ {
+ advance();
+ }
+
+ duplicates_iterator(Node* end_,Predicate pred_):
+ node(end_),begin_chunk(end_),end(end_),pred(pred_)
+ {
+ }
+
+ reference operator*()const
+ {
+ return node->value();
+ }
+
+ pointer operator->()const
+ {
+ return &node->value();
+ }
+
+ duplicates_iterator& operator++()
+ {
+ Node::increment(node);
+ sync();
+ return *this;
+ }
+
+ duplicates_iterator operator++(int)
+ {
+ duplicates_iterator tmp(*this);
+ ++(*this);
+ return tmp;
+ }
+
+ Node* get_node()const{return node;}
+
+private:
+ void sync()
+ {
+ if(node!=end&&pred(begin_chunk->value(),node->value()))advance();
+ }
+
+ void advance()
+ {
+ for(Node* node2=node;node!=end;node=node2){
+ Node::increment(node2);
+ if(node2!=end&&!pred(node->value(),node2->value()))break;
+ }
+ begin_chunk=node;
+ }
+
+ Node* node;
+ Node* begin_chunk;
+ Node* end;
+ Predicate pred;
+};
+
+template<typename Node,typename Predicate>
+bool operator==(
+ const duplicates_iterator<Node,Predicate>& x,
+ const duplicates_iterator<Node,Predicate>& y)
+{
+ return x.get_node()==y.get_node();
+}
+
+template<typename Node,typename Predicate>
+bool operator!=(
+ const duplicates_iterator<Node,Predicate>& x,
+ const duplicates_iterator<Node,Predicate>& y)
+{
+ return !(x==y);
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/has_tag.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/has_tag.hpp
index 217b61143af..217b61143af 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/has_tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/has_tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_args.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_args.hpp
index 81902f5a4a5..81902f5a4a5 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_args.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_iterator.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_iterator.hpp
new file mode 100644
index 00000000000..b9c21fb3d34
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_iterator.hpp
@@ -0,0 +1,166 @@
+/* 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_DETAIL_HASH_INDEX_ITERATOR_HPP
+#define BOOST_MULTI_INDEX_DETAIL_HASH_INDEX_ITERATOR_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/operators.hpp>
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/split_member.hpp>
+#include <boost/serialization/version.hpp>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* Iterator class for hashed indices.
+ */
+
+struct hashed_index_global_iterator_tag{};
+struct hashed_index_local_iterator_tag{};
+
+template<typename Node,typename BucketArray,typename Category>
+class hashed_index_iterator:
+ public forward_iterator_helper<
+ hashed_index_iterator<Node,BucketArray,Category>,
+ typename Node::value_type,
+ typename Node::difference_type,
+ const typename Node::value_type*,
+ const typename Node::value_type&>
+{
+public:
+ /* coverity[uninit_ctor]: suppress warning */
+ hashed_index_iterator(){}
+ hashed_index_iterator(Node* node_):node(node_){}
+
+ const typename Node::value_type& operator*()const
+ {
+ return node->value();
+ }
+
+ hashed_index_iterator& operator++()
+ {
+ this->increment(Category());
+ return *this;
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* Serialization. As for why the following is public,
+ * see explanation in safe_mode_iterator notes in safe_mode.hpp.
+ */
+
+ BOOST_SERIALIZATION_SPLIT_MEMBER()
+
+ typedef typename Node::base_type node_base_type;
+
+ template<class Archive>
+ void save(Archive& ar,const unsigned int)const
+ {
+ node_base_type* bnode=node;
+ ar<<serialization::make_nvp("pointer",bnode);
+ }
+
+ template<class Archive>
+ void load(Archive& ar,const unsigned int version)
+ {
+ load(ar,version,Category());
+ }
+
+ template<class Archive>
+ void load(
+ Archive& ar,const unsigned int version,hashed_index_global_iterator_tag)
+ {
+ node_base_type* bnode;
+ ar>>serialization::make_nvp("pointer",bnode);
+ node=static_cast<Node*>(bnode);
+ if(version<1){
+ BucketArray* throw_away; /* consume unused ptr */
+ ar>>serialization::make_nvp("pointer",throw_away);
+ }
+ }
+
+ template<class Archive>
+ void load(
+ Archive& ar,const unsigned int version,hashed_index_local_iterator_tag)
+ {
+ node_base_type* bnode;
+ ar>>serialization::make_nvp("pointer",bnode);
+ node=static_cast<Node*>(bnode);
+ if(version<1){
+ BucketArray* buckets;
+ ar>>serialization::make_nvp("pointer",buckets);
+ if(buckets&&node&&node->impl()==buckets->end()->prior()){
+ /* end local_iterators used to point to end node, now they are null */
+ node=0;
+ }
+ }
+ }
+#endif
+
+ /* get_node is not to be used by the user */
+
+ typedef Node node_type;
+
+ Node* get_node()const{return node;}
+
+private:
+
+ void increment(hashed_index_global_iterator_tag)
+ {
+ Node::increment(node);
+ }
+
+ void increment(hashed_index_local_iterator_tag)
+ {
+ Node::increment_local(node);
+ }
+
+ Node* node;
+};
+
+template<typename Node,typename BucketArray,typename Category>
+bool operator==(
+ const hashed_index_iterator<Node,BucketArray,Category>& x,
+ const hashed_index_iterator<Node,BucketArray,Category>& y)
+{
+ return x.get_node()==y.get_node();
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+/* class version = 1 : hashed_index_iterator does no longer serialize a bucket
+ * array pointer.
+ */
+
+namespace serialization {
+template<typename Node,typename BucketArray,typename Category>
+struct version<
+ boost::multi_index::detail::hashed_index_iterator<Node,BucketArray,Category>
+>
+{
+ BOOST_STATIC_CONSTANT(int,value=1);
+};
+} /* namespace serialization */
+#endif
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_node.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_node.hpp
new file mode 100644
index 00000000000..c1d97ac7951
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/hash_index_node.hpp
@@ -0,0 +1,772 @@
+/* Copyright 2003-2019 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_DETAIL_HASH_INDEX_NODE_HPP
+#define BOOST_MULTI_INDEX_DETAIL_HASH_INDEX_NODE_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/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/raw_ptr.hpp>
+#include <utility>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* Certain C++ requirements on unordered associative containers (see LWG issue
+ * #579) imply a data structure where nodes are linked in a single list, which
+ * in its turn forces implementors to add additional overhed per node to
+ * associate each with its corresponding bucket. Others resort to storing hash
+ * values, we use an alternative structure providing unconditional O(1)
+ * manipulation, even in situations of unfair hash distribution, plus some
+ * lookup speedups. For unique indices we maintain a doubly linked list of
+ * nodes except that if N is the first node of a bucket its associated
+ * bucket node is embedded between N and the preceding node in the following
+ * manner:
+ *
+ * +---+ +---+ +---+ +---+
+ * <--+ |<--+ | <--+ |<--+ |
+ * ... | B0| | B1| ... | B1| | B2| ...
+ * | |-+ | +--> | |-+ | +-->
+ * +-+-+ | +---+ +-+-+ | +---+
+ * | ^ | ^
+ * | | | |
+ * | +-+ | +-+
+ * | | | |
+ * v | v |
+ * --+---+---+---+-- --+---+---+---+--
+ * ... | | B1| | ... | | B2| | ...
+ * --+---+---+---+-- --+---+---+---+--
+ *
+ *
+ * The fist and last nodes of buckets can be checked with
+ *
+ * first node of a bucket: Npn != N
+ * last node of a bucket: Nnp != N
+ *
+ * (n and p short for ->next(), ->prior(), bucket nodes have prior pointers
+ * only). Pure insert and erase (without lookup) can be unconditionally done
+ * in O(1).
+ * For non-unique indices we add the following additional complexity: when
+ * there is a group of 3 or more equivalent elements, they are linked as
+ * follows:
+ *
+ * +-----------------------+
+ * | v
+ * +---+ | +---+ +---+ +---+
+ * | | +-+ | | |<--+ |
+ * | F | | S | ... | P | | L |
+ * | +-->| | | +-+ | |
+ * +---+ +---+ +---+ | +---+
+ * ^ |
+ * +-----------------------+
+ *
+ * F, S, P and L are the first, second, penultimate and last node in the
+ * group, respectively (S and P can coincide if the group has size 3.) This
+ * arrangement is used to skip equivalent elements in O(1) when doing lookup,
+ * while preserving O(1) insert/erase. The following invariants identify
+ * special positions (some of the operations have to be carefully implemented
+ * as Xnn is not valid if Xn points to a bucket):
+ *
+ * first node of a bucket: Npnp == N
+ * last node of a bucket: Nnpp == N
+ * first node of a group: Nnp != N && Nnppn == N
+ * second node of a group: Npn != N && Nppnn == N
+ * n-1 node of a group: Nnp != N && Nnnpp == N
+ * last node of a group: Npn != N && Npnnp == N
+ *
+ * The memory overhead is one pointer per bucket plus two pointers per node,
+ * probably unbeatable. The resulting structure is bidirectonally traversable,
+ * though currently we are just providing forward iteration.
+ */
+
+template<typename Allocator>
+struct hashed_index_node_impl;
+
+/* half-header (only prior() pointer) to use for the bucket array */
+
+template<typename Allocator>
+struct hashed_index_base_node_impl
+{
+ typedef typename rebind_alloc_for<
+ Allocator,hashed_index_base_node_impl
+ >::type base_allocator;
+ typedef typename rebind_alloc_for<
+ Allocator,hashed_index_node_impl<Allocator>
+ >::type node_allocator;
+ typedef allocator_traits<base_allocator> base_alloc_traits;
+ typedef allocator_traits<node_allocator> node_alloc_traits;
+ typedef typename base_alloc_traits::pointer base_pointer;
+ typedef typename base_alloc_traits::const_pointer const_base_pointer;
+ typedef typename node_alloc_traits::pointer pointer;
+ typedef typename node_alloc_traits::const_pointer const_pointer;
+ typedef typename node_alloc_traits::difference_type difference_type;
+
+ pointer& prior(){return prior_;}
+ pointer prior()const{return prior_;}
+
+private:
+ pointer prior_;
+};
+
+/* full header (prior() and next()) for the nodes */
+
+template<typename Allocator>
+struct hashed_index_node_impl:hashed_index_base_node_impl<Allocator>
+{
+private:
+ typedef hashed_index_base_node_impl<Allocator> super;
+
+public:
+ typedef typename super::base_pointer base_pointer;
+ typedef typename super::const_base_pointer const_base_pointer;
+ typedef typename super::pointer pointer;
+ typedef typename super::const_pointer const_pointer;
+
+ base_pointer& next(){return next_;}
+ base_pointer next()const{return next_;}
+
+ static pointer pointer_from(base_pointer x)
+ {
+ return static_cast<pointer>(
+ static_cast<hashed_index_node_impl*>(
+ raw_ptr<super*>(x)));
+ }
+
+ static base_pointer base_pointer_from(pointer x)
+ {
+ return static_cast<base_pointer>(
+ raw_ptr<hashed_index_node_impl*>(x));
+ }
+
+private:
+ base_pointer next_;
+};
+
+/* Boost.MultiIndex requires machinery to reverse unlink operations. A simple
+ * way to make a pointer-manipulation function undoable is to templatize
+ * its internal pointer assignments with a functor that, besides doing the
+ * assignment, keeps track of the original pointer values and can later undo
+ * the operations in reverse order.
+ */
+
+struct default_assigner
+{
+ template<typename T> void operator()(T& x,const T& val){x=val;}
+};
+
+template<typename Node>
+struct unlink_undo_assigner
+{
+ typedef typename Node::base_pointer base_pointer;
+ typedef typename Node::pointer pointer;
+
+ unlink_undo_assigner():pointer_track_count(0),base_pointer_track_count(0){}
+
+ void operator()(pointer& x,pointer val)
+ {
+ pointer_tracks[pointer_track_count].x=&x;
+ pointer_tracks[pointer_track_count++].val=x;
+ x=val;
+ }
+
+ void operator()(base_pointer& x,base_pointer val)
+ {
+ base_pointer_tracks[base_pointer_track_count].x=&x;
+ base_pointer_tracks[base_pointer_track_count++].val=x;
+ x=val;
+ }
+
+ void operator()() /* undo op */
+ {
+ /* in the absence of aliasing, restitution order is immaterial */
+
+ while(pointer_track_count--){
+ *(pointer_tracks[pointer_track_count].x)=
+ pointer_tracks[pointer_track_count].val;
+ }
+ while(base_pointer_track_count--){
+ *(base_pointer_tracks[base_pointer_track_count].x)=
+ base_pointer_tracks[base_pointer_track_count].val;
+ }
+ }
+
+ struct pointer_track {pointer* x; pointer val;};
+ struct base_pointer_track{base_pointer* x; base_pointer val;};
+
+ /* We know the maximum number of pointer and base pointer assignments that
+ * the two unlink versions do, so we can statically reserve the needed
+ * storage.
+ */
+
+ pointer_track pointer_tracks[3];
+ int pointer_track_count;
+ base_pointer_track base_pointer_tracks[2];
+ int base_pointer_track_count;
+};
+
+/* algorithmic stuff for unique and non-unique variants */
+
+struct hashed_unique_tag{};
+struct hashed_non_unique_tag{};
+
+template<typename Node,typename Category>
+struct hashed_index_node_alg;
+
+template<typename Node>
+struct hashed_index_node_alg<Node,hashed_unique_tag>
+{
+ typedef typename Node::base_pointer base_pointer;
+ typedef typename Node::const_base_pointer const_base_pointer;
+ typedef typename Node::pointer pointer;
+ typedef typename Node::const_pointer const_pointer;
+
+ static bool is_first_of_bucket(pointer x)
+ {
+ return x->prior()->next()!=base_pointer_from(x);
+ }
+
+ static pointer after(pointer x)
+ {
+ return is_last_of_bucket(x)?x->next()->prior():pointer_from(x->next());
+ }
+
+ static pointer after_local(pointer x)
+ {
+ return is_last_of_bucket(x)?pointer(0):pointer_from(x->next());
+ }
+
+ static pointer next_to_inspect(pointer x)
+ {
+ return is_last_of_bucket(x)?pointer(0):pointer_from(x->next());
+ }
+
+ static void link(pointer x,base_pointer buc,pointer end)
+ {
+ if(buc->prior()==pointer(0)){ /* empty bucket */
+ x->prior()=end->prior();
+ x->next()=end->prior()->next();
+ x->prior()->next()=buc;
+ buc->prior()=x;
+ end->prior()=x;
+ }
+ else{
+ x->prior()=buc->prior()->prior();
+ x->next()=base_pointer_from(buc->prior());
+ buc->prior()=x;
+ x->next()->prior()=x;
+ }
+ }
+
+ static void unlink(pointer x)
+ {
+ default_assigner assign;
+ unlink(x,assign);
+ }
+
+ typedef unlink_undo_assigner<Node> unlink_undo;
+
+ template<typename Assigner>
+ static void unlink(pointer x,Assigner& assign)
+ {
+ if(is_first_of_bucket(x)){
+ if(is_last_of_bucket(x)){
+ assign(x->prior()->next()->prior(),pointer(0));
+ assign(x->prior()->next(),x->next());
+ assign(x->next()->prior()->prior(),x->prior());
+ }
+ else{
+ assign(x->prior()->next()->prior(),pointer_from(x->next()));
+ assign(x->next()->prior(),x->prior());
+ }
+ }
+ else if(is_last_of_bucket(x)){
+ assign(x->prior()->next(),x->next());
+ assign(x->next()->prior()->prior(),x->prior());
+ }
+ else{
+ assign(x->prior()->next(),x->next());
+ assign(x->next()->prior(),x->prior());
+ }
+ }
+
+ /* used only at rehashing */
+
+ static void append(pointer x,pointer end)
+ {
+ x->prior()=end->prior();
+ x->next()=end->prior()->next();
+ x->prior()->next()=base_pointer_from(x);
+ end->prior()=x;
+ }
+
+ static bool unlink_last(pointer end)
+ {
+ /* returns true iff bucket is emptied */
+
+ pointer x=end->prior();
+ if(x->prior()->next()==base_pointer_from(x)){
+ x->prior()->next()=x->next();
+ end->prior()=x->prior();
+ return false;
+ }
+ else{
+ x->prior()->next()->prior()=pointer(0);
+ x->prior()->next()=x->next();
+ end->prior()=x->prior();
+ return true;
+ }
+ }
+
+private:
+ static pointer pointer_from(base_pointer x)
+ {
+ return Node::pointer_from(x);
+ }
+
+ static base_pointer base_pointer_from(pointer x)
+ {
+ return Node::base_pointer_from(x);
+ }
+
+ static bool is_last_of_bucket(pointer x)
+ {
+ return x->next()->prior()!=x;
+ }
+};
+
+template<typename Node>
+struct hashed_index_node_alg<Node,hashed_non_unique_tag>
+{
+ typedef typename Node::base_pointer base_pointer;
+ typedef typename Node::const_base_pointer const_base_pointer;
+ typedef typename Node::pointer pointer;
+ typedef typename Node::const_pointer const_pointer;
+
+ static bool is_first_of_bucket(pointer x)
+ {
+ return x->prior()->next()->prior()==x;
+ }
+
+ static bool is_first_of_group(pointer x)
+ {
+ return
+ x->next()->prior()!=x&&
+ x->next()->prior()->prior()->next()==base_pointer_from(x);
+ }
+
+ static pointer after(pointer x)
+ {
+ if(x->next()->prior()==x)return pointer_from(x->next());
+ if(x->next()->prior()->prior()==x)return x->next()->prior();
+ if(x->next()->prior()->prior()->next()==base_pointer_from(x))
+ return pointer_from(x->next());
+ return pointer_from(x->next())->next()->prior();
+ }
+
+ static pointer after_local(pointer x)
+ {
+ if(x->next()->prior()==x)return pointer_from(x->next());
+ if(x->next()->prior()->prior()==x)return pointer(0);
+ if(x->next()->prior()->prior()->next()==base_pointer_from(x))
+ return pointer_from(x->next());
+ return pointer_from(x->next())->next()->prior();
+ }
+
+ static pointer next_to_inspect(pointer x)
+ {
+ if(x->next()->prior()==x)return pointer_from(x->next());
+ if(x->next()->prior()->prior()==x)return pointer(0);
+ if(x->next()->prior()->next()->prior()!=x->next()->prior())
+ return pointer(0);
+ return pointer_from(x->next()->prior()->next());
+ }
+
+ static void link(pointer x,base_pointer buc,pointer end)
+ {
+ if(buc->prior()==pointer(0)){ /* empty bucket */
+ x->prior()=end->prior();
+ x->next()=end->prior()->next();
+ x->prior()->next()=buc;
+ buc->prior()=x;
+ end->prior()=x;
+ }
+ else{
+ x->prior()=buc->prior()->prior();
+ x->next()=base_pointer_from(buc->prior());
+ buc->prior()=x;
+ x->next()->prior()=x;
+ }
+ }
+
+ static void link(pointer x,pointer first,pointer last)
+ {
+ x->prior()=first->prior();
+ x->next()=base_pointer_from(first);
+ if(is_first_of_bucket(first)){
+ x->prior()->next()->prior()=x;
+ }
+ else{
+ x->prior()->next()=base_pointer_from(x);
+ }
+
+ if(first==last){
+ last->prior()=x;
+ }
+ else if(first->next()==base_pointer_from(last)){
+ first->prior()=last;
+ first->next()=base_pointer_from(x);
+ }
+ else{
+ pointer second=pointer_from(first->next()),
+ lastbutone=last->prior();
+ second->prior()=first;
+ first->prior()=last;
+ lastbutone->next()=base_pointer_from(x);
+ }
+ }
+
+ static void unlink(pointer x)
+ {
+ default_assigner assign;
+ unlink(x,assign);
+ }
+
+ typedef unlink_undo_assigner<Node> unlink_undo;
+
+ template<typename Assigner>
+ static void unlink(pointer x,Assigner& assign)
+ {
+ if(x->prior()->next()==base_pointer_from(x)){
+ if(x->next()->prior()==x){
+ left_unlink(x,assign);
+ right_unlink(x,assign);
+ }
+ else if(x->next()->prior()->prior()==x){ /* last of bucket */
+ left_unlink(x,assign);
+ right_unlink_last_of_bucket(x,assign);
+ }
+ else if(x->next()->prior()->prior()->next()==
+ base_pointer_from(x)){ /* first of group size */
+ left_unlink(x,assign);
+ right_unlink_first_of_group(x,assign);
+ }
+ else{ /* n-1 of group */
+ unlink_last_but_one_of_group(x,assign);
+ }
+ }
+ else if(x->prior()->next()->prior()==x){ /* first of bucket */
+ if(x->next()->prior()==x){
+ left_unlink_first_of_bucket(x,assign);
+ right_unlink(x,assign);
+ }
+ else if(x->next()->prior()->prior()==x){ /* last of bucket */
+ assign(x->prior()->next()->prior(),pointer(0));
+ assign(x->prior()->next(),x->next());
+ assign(x->next()->prior()->prior(),x->prior());
+ }
+ else{ /* first of group */
+ left_unlink_first_of_bucket(x,assign);
+ right_unlink_first_of_group(x,assign);
+ }
+ }
+ else if(x->next()->prior()->prior()==x){ /* last of group and bucket */
+ left_unlink_last_of_group(x,assign);
+ right_unlink_last_of_bucket(x,assign);
+ }
+ else if(pointer_from(x->prior()->prior()->next())
+ ->next()==base_pointer_from(x)){ /* second of group */
+ unlink_second_of_group(x,assign);
+ }
+ else{ /* last of group, ~(last of bucket) */
+ left_unlink_last_of_group(x,assign);
+ right_unlink(x,assign);
+ }
+ }
+
+ /* used only at rehashing */
+
+ static void link_range(
+ pointer first,pointer last,base_pointer buc,pointer cend)
+ {
+ if(buc->prior()==pointer(0)){ /* empty bucket */
+ first->prior()=cend->prior();
+ last->next()=cend->prior()->next();
+ first->prior()->next()=buc;
+ buc->prior()=first;
+ cend->prior()=last;
+ }
+ else{
+ first->prior()=buc->prior()->prior();
+ last->next()=base_pointer_from(buc->prior());
+ buc->prior()=first;
+ last->next()->prior()=last;
+ }
+ }
+
+ static void append_range(pointer first,pointer last,pointer cend)
+ {
+ first->prior()=cend->prior();
+ last->next()=cend->prior()->next();
+ first->prior()->next()=base_pointer_from(first);
+ cend->prior()=last;
+ }
+
+ static std::pair<pointer,bool> unlink_last_group(pointer end)
+ {
+ /* returns first of group true iff bucket is emptied */
+
+ pointer x=end->prior();
+ if(x->prior()->next()==base_pointer_from(x)){
+ x->prior()->next()=x->next();
+ end->prior()=x->prior();
+ return std::make_pair(x,false);
+ }
+ else if(x->prior()->next()->prior()==x){
+ x->prior()->next()->prior()=pointer(0);
+ x->prior()->next()=x->next();
+ end->prior()=x->prior();
+ return std::make_pair(x,true);
+ }
+ else{
+ pointer y=pointer_from(x->prior()->next());
+
+ if(y->prior()->next()==base_pointer_from(y)){
+ y->prior()->next()=x->next();
+ end->prior()=y->prior();
+ return std::make_pair(y,false);
+ }
+ else{
+ y->prior()->next()->prior()=pointer(0);
+ y->prior()->next()=x->next();
+ end->prior()=y->prior();
+ return std::make_pair(y,true);
+ }
+ }
+ }
+
+ static void unlink_range(pointer first,pointer last)
+ {
+ if(is_first_of_bucket(first)){
+ if(is_last_of_bucket(last)){
+ first->prior()->next()->prior()=pointer(0);
+ first->prior()->next()=last->next();
+ last->next()->prior()->prior()=first->prior();
+ }
+ else{
+ first->prior()->next()->prior()=pointer_from(last->next());
+ last->next()->prior()=first->prior();
+ }
+ }
+ else if(is_last_of_bucket(last)){
+ first->prior()->next()=last->next();
+ last->next()->prior()->prior()=first->prior();
+ }
+ else{
+ first->prior()->next()=last->next();
+ last->next()->prior()=first->prior();
+ }
+ }
+
+private:
+ static pointer pointer_from(base_pointer x)
+ {
+ return Node::pointer_from(x);
+ }
+
+ static base_pointer base_pointer_from(pointer x)
+ {
+ return Node::base_pointer_from(x);
+ }
+
+ static bool is_last_of_bucket(pointer x)
+ {
+ return x->next()->prior()->prior()==x;
+ }
+
+ template<typename Assigner>
+ static void left_unlink(pointer x,Assigner& assign)
+ {
+ assign(x->prior()->next(),x->next());
+ }
+
+ template<typename Assigner>
+ static void right_unlink(pointer x,Assigner& assign)
+ {
+ assign(x->next()->prior(),x->prior());
+ }
+
+ template<typename Assigner>
+ static void left_unlink_first_of_bucket(pointer x,Assigner& assign)
+ {
+ assign(x->prior()->next()->prior(),pointer_from(x->next()));
+ }
+
+ template<typename Assigner>
+ static void right_unlink_last_of_bucket(pointer x,Assigner& assign)
+ {
+ assign(x->next()->prior()->prior(),x->prior());
+ }
+
+ template<typename Assigner>
+ static void right_unlink_first_of_group(pointer x,Assigner& assign)
+ {
+ pointer second=pointer_from(x->next()),
+ last=second->prior(),
+ lastbutone=last->prior();
+ if(second==lastbutone){
+ assign(second->next(),base_pointer_from(last));
+ assign(second->prior(),x->prior());
+ }
+ else{
+ assign(lastbutone->next(),base_pointer_from(second));
+ assign(second->next()->prior(),last);
+ assign(second->prior(),x->prior());
+ }
+ }
+
+ template<typename Assigner>
+ static void left_unlink_last_of_group(pointer x,Assigner& assign)
+ {
+ pointer lastbutone=x->prior(),
+ first=pointer_from(lastbutone->next()),
+ second=pointer_from(first->next());
+ if(lastbutone==second){
+ assign(lastbutone->prior(),first);
+ assign(lastbutone->next(),x->next());
+ }
+ else{
+ assign(second->prior(),lastbutone);
+ assign(lastbutone->prior()->next(),base_pointer_from(first));
+ assign(lastbutone->next(),x->next());
+ }
+ }
+
+ template<typename Assigner>
+ static void unlink_last_but_one_of_group(pointer x,Assigner& assign)
+ {
+ pointer first=pointer_from(x->next()),
+ second=pointer_from(first->next()),
+ last=second->prior();
+ if(second==x){
+ assign(last->prior(),first);
+ assign(first->next(),base_pointer_from(last));
+ }
+ else{
+ assign(last->prior(),x->prior());
+ assign(x->prior()->next(),base_pointer_from(first));
+ }
+ }
+
+ template<typename Assigner>
+ static void unlink_second_of_group(pointer x,Assigner& assign)
+ {
+ pointer last=x->prior(),
+ lastbutone=last->prior(),
+ first=pointer_from(lastbutone->next());
+ if(lastbutone==x){
+ assign(first->next(),base_pointer_from(last));
+ assign(last->prior(),first);
+ }
+ else{
+ assign(first->next(),x->next());
+ assign(x->next()->prior(),last);
+ }
+ }
+};
+
+template<typename Super>
+struct hashed_index_node_trampoline:
+ hashed_index_node_impl<
+ typename rebind_alloc_for<
+ typename Super::allocator_type,char
+ >::type
+ >
+{
+ typedef typename rebind_alloc_for<
+ typename Super::allocator_type,char
+ >::type impl_allocator_type;
+ typedef hashed_index_node_impl<impl_allocator_type> impl_type;
+};
+
+template<typename Super,typename Category>
+struct hashed_index_node:
+ Super,hashed_index_node_trampoline<Super>
+{
+private:
+ typedef hashed_index_node_trampoline<Super> trampoline;
+
+public:
+ typedef typename trampoline::impl_type impl_type;
+ typedef hashed_index_node_alg<
+ impl_type,Category> node_alg;
+ typedef typename trampoline::base_pointer impl_base_pointer;
+ typedef typename trampoline::const_base_pointer const_impl_base_pointer;
+ typedef typename trampoline::pointer impl_pointer;
+ typedef typename trampoline::const_pointer const_impl_pointer;
+ typedef typename trampoline::difference_type difference_type;
+
+ impl_pointer& prior(){return trampoline::prior();}
+ impl_pointer prior()const{return trampoline::prior();}
+ impl_base_pointer& next(){return trampoline::next();}
+ impl_base_pointer next()const{return trampoline::next();}
+
+ impl_pointer impl()
+ {
+ return static_cast<impl_pointer>(
+ static_cast<impl_type*>(static_cast<trampoline*>(this)));
+ }
+
+ const_impl_pointer impl()const
+ {
+ return static_cast<const_impl_pointer>(
+ static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
+ }
+
+ static hashed_index_node* from_impl(impl_pointer x)
+ {
+ return
+ static_cast<hashed_index_node*>(
+ static_cast<trampoline*>(
+ raw_ptr<impl_type*>(x)));
+ }
+
+ static const hashed_index_node* from_impl(const_impl_pointer x)
+ {
+ return
+ static_cast<const hashed_index_node*>(
+ static_cast<const trampoline*>(
+ raw_ptr<const impl_type*>(x)));
+ }
+
+ /* interoperability with hashed_index_iterator */
+
+ static void increment(hashed_index_node*& x)
+ {
+ x=from_impl(node_alg::after(x->impl()));
+ }
+
+ static void increment_local(hashed_index_node*& x)
+ {
+ x=from_impl(node_alg::after_local(x->impl()));
+ }
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/header_holder.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/header_holder.hpp
index ca8a9b2edb1..ca8a9b2edb1 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/header_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/header_holder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
index ae398456d1f..ae398456d1f 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/index_base.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_base.hpp
new file mode 100644
index 00000000000..1748a8f86ec
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_base.hpp
@@ -0,0 +1,289 @@
+/* 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_DETAIL_INDEX_BASE_HPP
+#define BOOST_MULTI_INDEX_DETAIL_INDEX_BASE_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/copy_map.hpp>
+#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
+#include <boost/multi_index/detail/node_type.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <boost/multi_index_container_fwd.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <utility>
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/multi_index/detail/index_loader.hpp>
+#include <boost/multi_index/detail/index_saver.hpp>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* The role of this class is threefold:
+ * - tops the linear hierarchy of indices.
+ * - terminates some cascading backbone function calls (insert_, etc.),
+ * - grants access to the backbone functions of the final
+ * multi_index_container class (for access restriction reasons, these
+ * cannot be called directly from the index classes.)
+ */
+
+struct lvalue_tag{};
+struct rvalue_tag{};
+struct emplaced_tag{};
+
+template<typename Value,typename IndexSpecifierList,typename Allocator>
+class index_base
+{
+protected:
+ typedef index_node_base<Value,Allocator> node_type;
+ typedef typename multi_index_node_type<
+ Value,IndexSpecifierList,Allocator>::type final_node_type;
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> final_type;
+ typedef tuples::null_type ctor_args_list;
+ typedef typename rebind_alloc_for<
+ Allocator,typename Allocator::value_type
+ >::type final_allocator_type;
+ typedef mpl::vector0<> index_type_list;
+ typedef mpl::vector0<> iterator_type_list;
+ typedef mpl::vector0<> const_iterator_type_list;
+ typedef copy_map<
+ final_node_type,
+ final_allocator_type> copy_map_type;
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ typedef index_saver<
+ node_type,
+ final_allocator_type> index_saver_type;
+ typedef index_loader<
+ node_type,
+ final_node_type,
+ final_allocator_type> index_loader_type;
+#endif
+
+private:
+ typedef Value value_type;
+ typedef allocator_traits<Allocator> alloc_traits;
+ typedef typename alloc_traits::size_type size_type;
+
+protected:
+ explicit index_base(const ctor_args_list&,const Allocator&){}
+
+ index_base(
+ const index_base<Value,IndexSpecifierList,Allocator>&,
+ do_not_copy_elements_tag)
+ {}
+
+ void copy_(
+ const index_base<Value,IndexSpecifierList,Allocator>&,const copy_map_type&)
+ {}
+
+ final_node_type* insert_(const value_type& v,final_node_type*& x,lvalue_tag)
+ {
+ x=final().allocate_node();
+ BOOST_TRY{
+ final().construct_value(x,v);
+ }
+ BOOST_CATCH(...){
+ final().deallocate_node(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return x;
+ }
+
+ final_node_type* insert_(const value_type& v,final_node_type*& x,rvalue_tag)
+ {
+ x=final().allocate_node();
+ BOOST_TRY{
+ final().construct_value(x,boost::move(const_cast<value_type&>(v)));
+ }
+ BOOST_CATCH(...){
+ final().deallocate_node(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return x;
+ }
+
+ final_node_type* insert_(const value_type&,final_node_type*& x,emplaced_tag)
+ {
+ return x;
+ }
+
+ final_node_type* insert_(
+ const value_type& v,node_type*,final_node_type*& x,lvalue_tag)
+ {
+ return insert_(v,x,lvalue_tag());
+ }
+
+ final_node_type* insert_(
+ const value_type& v,node_type*,final_node_type*& x,rvalue_tag)
+ {
+ return insert_(v,x,rvalue_tag());
+ }
+
+ final_node_type* insert_(
+ const value_type&,node_type*,final_node_type*& x,emplaced_tag)
+ {
+ return x;
+ }
+
+ void erase_(node_type* x)
+ {
+ final().destroy_value(static_cast<final_node_type*>(x));
+ }
+
+ void delete_node_(node_type* x)
+ {
+ final().destroy_value(static_cast<final_node_type*>(x));
+ }
+
+ void clear_(){}
+
+ void swap_(index_base<Value,IndexSpecifierList,Allocator>&){}
+
+ void swap_elements_(index_base<Value,IndexSpecifierList,Allocator>&){}
+
+ bool replace_(const value_type& v,node_type* x,lvalue_tag)
+ {
+ x->value()=v;
+ return true;
+ }
+
+ bool replace_(const value_type& v,node_type* x,rvalue_tag)
+ {
+ x->value()=boost::move(const_cast<value_type&>(v));
+ return true;
+ }
+
+ bool modify_(node_type*){return true;}
+
+ bool modify_rollback_(node_type*){return true;}
+
+ bool check_rollback_(node_type*)const{return true;}
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* serialization */
+
+ template<typename Archive>
+ void save_(Archive&,const unsigned int,const index_saver_type&)const{}
+
+ template<typename Archive>
+ void load_(Archive&,const unsigned int,const index_loader_type&){}
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ bool invariant_()const{return true;}
+#endif
+
+ /* access to backbone memfuns of Final class */
+
+ final_type& final(){return *static_cast<final_type*>(this);}
+ const final_type& final()const{return *static_cast<const final_type*>(this);}
+
+ final_node_type* final_header()const{return final().header();}
+
+ bool final_empty_()const{return final().empty_();}
+ size_type final_size_()const{return final().size_();}
+ size_type final_max_size_()const{return final().max_size_();}
+
+ std::pair<final_node_type*,bool> final_insert_(const value_type& x)
+ {return final().insert_(x);}
+ std::pair<final_node_type*,bool> final_insert_rv_(const value_type& x)
+ {return final().insert_rv_(x);}
+ template<typename T>
+ std::pair<final_node_type*,bool> final_insert_ref_(const T& t)
+ {return final().insert_ref_(t);}
+ template<typename T>
+ std::pair<final_node_type*,bool> final_insert_ref_(T& t)
+ {return final().insert_ref_(t);}
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<final_node_type*,bool> final_emplace_(
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ return final().emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ std::pair<final_node_type*,bool> final_insert_(
+ const value_type& x,final_node_type* position)
+ {return final().insert_(x,position);}
+ std::pair<final_node_type*,bool> final_insert_rv_(
+ const value_type& x,final_node_type* position)
+ {return final().insert_rv_(x,position);}
+ template<typename T>
+ std::pair<final_node_type*,bool> final_insert_ref_(
+ const T& t,final_node_type* position)
+ {return final().insert_ref_(t,position);}
+ template<typename T>
+ std::pair<final_node_type*,bool> final_insert_ref_(
+ T& t,final_node_type* position)
+ {return final().insert_ref_(t,position);}
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<final_node_type*,bool> final_emplace_hint_(
+ final_node_type* position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ return final().emplace_hint_(
+ position,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ void final_erase_(final_node_type* x){final().erase_(x);}
+
+ void final_delete_node_(final_node_type* x){final().delete_node_(x);}
+ void final_delete_all_nodes_(){final().delete_all_nodes_();}
+ void final_clear_(){final().clear_();}
+
+ void final_swap_(final_type& x){final().swap_(x);}
+
+ bool final_replace_(
+ const value_type& k,final_node_type* x)
+ {return final().replace_(k,x);}
+ bool final_replace_rv_(
+ const value_type& k,final_node_type* x)
+ {return final().replace_rv_(k,x);}
+
+ template<typename Modifier>
+ bool final_modify_(Modifier& mod,final_node_type* x)
+ {return final().modify_(mod,x);}
+
+ template<typename Modifier,typename Rollback>
+ bool final_modify_(Modifier& mod,Rollback& back,final_node_type* x)
+ {return final().modify_(mod,back,x);}
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ void final_check_invariant_()const{final().check_invariant_();}
+#endif
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_loader.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_loader.hpp
index 71418a10e19..71418a10e19 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_loader.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_loader.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_matcher.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_matcher.hpp
index 34d1f9d5a8d..34d1f9d5a8d 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_matcher.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_matcher.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_node_base.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_node_base.hpp
index 1a1f0cae4be..1a1f0cae4be 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_node_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_node_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_saver.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_saver.hpp
index ae09d4eba4f..ae09d4eba4f 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/index_saver.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/index_saver.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/invariant_assert.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/invariant_assert.hpp
index c6c547c7c33..c6c547c7c33 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/invariant_assert.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/invariant_assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/is_index_list.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/is_index_list.hpp
index f6a24218b81..f6a24218b81 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/is_index_list.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/is_index_list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/is_transparent.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/is_transparent.hpp
index 72036d257e2..72036d257e2 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/is_transparent.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/is_transparent.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/iter_adaptor.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/iter_adaptor.hpp
index 7a032350b36..7a032350b36 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/iter_adaptor.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/iter_adaptor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/modify_key_adaptor.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/modify_key_adaptor.hpp
index 6df89b18386..6df89b18386 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/modify_key_adaptor.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/modify_key_adaptor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/no_duplicate_tags.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/no_duplicate_tags.hpp
index ba216ed82cf..ba216ed82cf 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/no_duplicate_tags.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/no_duplicate_tags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/node_type.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/node_type.hpp
index 7fe85cf968b..7fe85cf968b 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/node_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/node_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_args.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_args.hpp
index 3e2641f2f4d..3e2641f2f4d 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_args.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_args.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl.hpp
new file mode 100644
index 00000000000..23adeeb03ac
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl.hpp
@@ -0,0 +1,1578 @@
+/* Copyright 2003-2019 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.
+ *
+ * The internal implementation of red-black trees is based on that of SGI STL
+ * stl_tree.h file:
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_IMPL_HPP
+#define BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_IMPL_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/call_traits.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/foreach_fwd.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+#include <boost/move/core.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/multi_index/detail/access_specifier.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/bidir_node_iterator.hpp>
+#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
+#include <boost/multi_index/detail/index_node_base.hpp>
+#include <boost/multi_index/detail/modify_key_adaptor.hpp>
+#include <boost/multi_index/detail/ord_index_node.hpp>
+#include <boost/multi_index/detail/ord_index_ops.hpp>
+#include <boost/multi_index/detail/safe_mode.hpp>
+#include <boost/multi_index/detail/scope_guard.hpp>
+#include <boost/multi_index/detail/unbounded.hpp>
+#include <boost/multi_index/detail/value_compare.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <boost/multi_index/detail/ord_index_impl_fwd.hpp>
+#include <boost/ref.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <utility>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/archive/archive_exception.hpp>
+#include <boost/bind.hpp>
+#include <boost/multi_index/detail/duplicates_iterator.hpp>
+#include <boost/throw_exception.hpp>
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(x) \
+ detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
+ detail::make_obj_guard(x,&ordered_index_impl::check_invariant_); \
+ BOOST_JOIN(check_invariant_,__LINE__).touch();
+#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT \
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(*this)
+#else
+#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(x)
+#define BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* ordered_index adds a layer of ordered indexing to a given Super and accepts
+ * an augmenting policy for optional addition of order statistics.
+ */
+
+/* Most of the implementation of unique and non-unique indices is
+ * shared. We tell from one another on instantiation time by using
+ * these tags.
+ */
+
+struct ordered_unique_tag{};
+struct ordered_non_unique_tag{};
+
+template<
+ typename KeyFromValue,typename Compare,
+ typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
+>
+class ordered_index;
+
+template<
+ typename KeyFromValue,typename Compare,
+ typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
+>
+class ordered_index_impl:
+ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ ,public safe_mode::safe_container<
+ ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy> >
+#endif
+
+{
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
+ * lifetime of const references bound to temporaries --precisely what
+ * scopeguards are.
+ */
+
+#pragma parse_mfunc_templ off
+#endif
+
+ typedef typename SuperMeta::type super;
+
+protected:
+ typedef ordered_index_node<
+ AugmentPolicy,typename super::node_type> node_type;
+
+protected: /* for the benefit of AugmentPolicy::augmented_interface */
+ typedef typename node_type::impl_type node_impl_type;
+ typedef typename node_impl_type::pointer node_impl_pointer;
+
+public:
+ /* types */
+
+ typedef typename KeyFromValue::result_type key_type;
+ typedef typename node_type::value_type value_type;
+ typedef KeyFromValue key_from_value;
+ typedef Compare key_compare;
+ typedef value_comparison<
+ value_type,KeyFromValue,Compare> value_compare;
+ typedef tuple<key_from_value,key_compare> ctor_args;
+ typedef typename super::final_allocator_type allocator_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_iterator<
+ bidir_node_iterator<node_type>,
+ ordered_index_impl> iterator;
+#else
+ typedef bidir_node_iterator<node_type> iterator;
+#endif
+
+ typedef iterator const_iterator;
+
+private:
+ typedef allocator_traits<allocator_type> alloc_traits;
+
+public:
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::difference_type difference_type;
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::const_pointer const_pointer;
+ typedef typename
+ boost::reverse_iterator<iterator> reverse_iterator;
+ typedef typename
+ boost::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef TagList tag_list;
+
+protected:
+ typedef typename super::final_node_type final_node_type;
+ typedef tuples::cons<
+ ctor_args,
+ typename super::ctor_args_list> ctor_args_list;
+ typedef typename mpl::push_front<
+ typename super::index_type_list,
+ ordered_index<
+ KeyFromValue,Compare,
+ SuperMeta,TagList,Category,AugmentPolicy
+ > >::type index_type_list;
+ typedef typename mpl::push_front<
+ typename super::iterator_type_list,
+ iterator>::type iterator_type_list;
+ typedef typename mpl::push_front<
+ typename super::const_iterator_type_list,
+ const_iterator>::type const_iterator_type_list;
+ typedef typename super::copy_map_type copy_map_type;
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ typedef typename super::index_saver_type index_saver_type;
+ typedef typename super::index_loader_type index_loader_type;
+#endif
+
+protected:
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_container<
+ ordered_index_impl> safe_super;
+#endif
+
+ typedef typename call_traits<
+ value_type>::param_type value_param_type;
+ typedef typename call_traits<
+ key_type>::param_type key_param_type;
+
+ /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
+ * expansion.
+ */
+
+ typedef std::pair<iterator,bool> emplace_return_type;
+
+public:
+
+ /* construct/copy/destroy
+ * Default and copy ctors are in the protected section as indices are
+ * not supposed to be created on their own. No range ctor either.
+ * Assignment operators defined at ordered_index rather than here.
+ */
+
+ allocator_type get_allocator()const BOOST_NOEXCEPT
+ {
+ return this->final().get_allocator();
+ }
+
+ /* iterators */
+
+ iterator
+ begin()BOOST_NOEXCEPT{return make_iterator(leftmost());}
+ const_iterator
+ begin()const BOOST_NOEXCEPT{return make_iterator(leftmost());}
+ iterator
+ end()BOOST_NOEXCEPT{return make_iterator(header());}
+ const_iterator
+ end()const BOOST_NOEXCEPT{return make_iterator(header());}
+ reverse_iterator
+ rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+ const_reverse_iterator
+ rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+ reverse_iterator
+ rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+ const_reverse_iterator
+ rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+ const_iterator
+ cbegin()const BOOST_NOEXCEPT{return begin();}
+ const_iterator
+ cend()const BOOST_NOEXCEPT{return end();}
+ const_reverse_iterator
+ crbegin()const BOOST_NOEXCEPT{return rbegin();}
+ const_reverse_iterator
+ crend()const BOOST_NOEXCEPT{return rend();}
+
+ iterator iterator_to(const value_type& x)
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ const_iterator iterator_to(const value_type& x)const
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ /* capacity */
+
+ bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
+ size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
+ size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
+
+ /* modifiers */
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
+ emplace_return_type,emplace,emplace_impl)
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
+ iterator,emplace_hint,emplace_hint_impl,iterator,position)
+
+ std::pair<iterator,bool> insert(const value_type& x)
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_(x);
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ iterator insert(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ return make_iterator(p.first);
+ }
+
+ iterator insert(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_rv_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ return make_iterator(p.first);
+ }
+
+ template<typename InputIterator>
+ void insert(InputIterator first,InputIterator last)
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ node_type* hint=header(); /* end() */
+ for(;first!=last;++first){
+ hint=this->final_insert_ref_(
+ *first,static_cast<final_node_type*>(hint)).first;
+ node_type::increment(hint);
+ }
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ void insert(std::initializer_list<value_type> list)
+ {
+ insert(list.begin(),list.end());
+ }
+#endif
+
+ iterator erase(iterator position)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
+ return position;
+ }
+
+ size_type erase(key_param_type x)
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<iterator,iterator> p=equal_range(x);
+ size_type s=0;
+ while(p.first!=p.second){
+ p.first=erase(p.first);
+ ++s;
+ }
+ return s;
+ }
+
+ iterator erase(iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ while(first!=last){
+ first=erase(first);
+ }
+ return first;
+ }
+
+ bool replace(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ return this->final_replace_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ bool replace(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ return this->final_replace_rv_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier>
+ bool modify(iterator position,Modifier mod)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify(iterator position,Modifier mod,Rollback back_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,back_,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier>
+ bool modify_key(iterator position,Modifier mod)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ return modify(
+ position,modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key));
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify_key(iterator position,Modifier mod,Rollback back_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ return modify(
+ position,
+ modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key),
+ modify_key_adaptor<Rollback,value_type,KeyFromValue>(back_,key));
+ }
+
+ void swap(
+ ordered_index<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x)
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF(x);
+ this->final_swap_(x.final());
+ }
+
+ void clear()BOOST_NOEXCEPT
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ this->final_clear_();
+ }
+
+ /* observers */
+
+ key_from_value key_extractor()const{return key;}
+ key_compare key_comp()const{return comp_;}
+ value_compare value_comp()const{return value_compare(key,comp_);}
+
+ /* set operations */
+
+ /* Internally, these ops rely on const_iterator being the same
+ * type as iterator.
+ */
+
+ template<typename CompatibleKey>
+ iterator find(const CompatibleKey& x)const
+ {
+ return make_iterator(ordered_index_find(root(),header(),key,x,comp_));
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ iterator find(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return make_iterator(ordered_index_find(root(),header(),key,x,comp));
+ }
+
+ template<typename CompatibleKey>
+ size_type count(const CompatibleKey& x)const
+ {
+ return count(x,comp_);
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ std::pair<iterator,iterator> p=equal_range(x,comp);
+ size_type n=static_cast<size_type>(std::distance(p.first,p.second));
+ return n;
+ }
+
+ template<typename CompatibleKey>
+ iterator lower_bound(const CompatibleKey& x)const
+ {
+ return make_iterator(
+ ordered_index_lower_bound(root(),header(),key,x,comp_));
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ iterator lower_bound(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return make_iterator(
+ ordered_index_lower_bound(root(),header(),key,x,comp));
+ }
+
+ template<typename CompatibleKey>
+ iterator upper_bound(const CompatibleKey& x)const
+ {
+ return make_iterator(
+ ordered_index_upper_bound(root(),header(),key,x,comp_));
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ iterator upper_bound(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return make_iterator(
+ ordered_index_upper_bound(root(),header(),key,x,comp));
+ }
+
+ template<typename CompatibleKey>
+ std::pair<iterator,iterator> equal_range(
+ const CompatibleKey& x)const
+ {
+ std::pair<node_type*,node_type*> p=
+ ordered_index_equal_range(root(),header(),key,x,comp_);
+ return std::pair<iterator,iterator>(
+ make_iterator(p.first),make_iterator(p.second));
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ std::pair<iterator,iterator> equal_range(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ std::pair<node_type*,node_type*> p=
+ ordered_index_equal_range(root(),header(),key,x,comp);
+ return std::pair<iterator,iterator>(
+ make_iterator(p.first),make_iterator(p.second));
+ }
+
+ /* range */
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<iterator,iterator>
+ range(LowerBounder lower,UpperBounder upper)const
+ {
+ typedef typename mpl::if_<
+ is_same<LowerBounder,unbounded_type>,
+ BOOST_DEDUCED_TYPENAME mpl::if_<
+ is_same<UpperBounder,unbounded_type>,
+ both_unbounded_tag,
+ lower_unbounded_tag
+ >::type,
+ BOOST_DEDUCED_TYPENAME mpl::if_<
+ is_same<UpperBounder,unbounded_type>,
+ upper_unbounded_tag,
+ none_unbounded_tag
+ >::type
+ >::type dispatch;
+
+ return range(lower,upper,dispatch());
+ }
+
+BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
+ ordered_index_impl(const ctor_args_list& args_list,const allocator_type& al):
+ super(args_list.get_tail(),al),
+ key(tuples::get<0>(args_list.get_head())),
+ comp_(tuples::get<1>(args_list.get_head()))
+ {
+ empty_initialize();
+ }
+
+ ordered_index_impl(
+ const ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x):
+ super(x),
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super(),
+#endif
+
+ key(x.key),
+ comp_(x.comp_)
+ {
+ /* Copy ctor just takes the key and compare objects from x. The rest is
+ * done in a subsequent call to copy_().
+ */
+ }
+
+ ordered_index_impl(
+ const ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x,
+ do_not_copy_elements_tag):
+ super(x,do_not_copy_elements_tag()),
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super(),
+#endif
+
+ key(x.key),
+ comp_(x.comp_)
+ {
+ empty_initialize();
+ }
+
+ ~ordered_index_impl()
+ {
+ /* the container is guaranteed to be empty by now */
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ iterator make_iterator(node_type* node){return iterator(node,this);}
+ const_iterator make_iterator(node_type* node)const
+ {return const_iterator(node,const_cast<ordered_index_impl*>(this));}
+#else
+ iterator make_iterator(node_type* node){return iterator(node);}
+ const_iterator make_iterator(node_type* node)const
+ {return const_iterator(node);}
+#endif
+
+ void copy_(
+ const ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x,
+ const copy_map_type& map)
+ {
+ if(!x.root()){
+ empty_initialize();
+ }
+ else{
+ header()->color()=x.header()->color();
+ AugmentPolicy::copy(x.header()->impl(),header()->impl());
+
+ node_type* root_cpy=map.find(static_cast<final_node_type*>(x.root()));
+ header()->parent()=root_cpy->impl();
+
+ node_type* leftmost_cpy=map.find(
+ static_cast<final_node_type*>(x.leftmost()));
+ header()->left()=leftmost_cpy->impl();
+
+ node_type* rightmost_cpy=map.find(
+ static_cast<final_node_type*>(x.rightmost()));
+ header()->right()=rightmost_cpy->impl();
+
+ typedef typename copy_map_type::const_iterator copy_map_iterator;
+ for(copy_map_iterator it=map.begin(),it_end=map.end();it!=it_end;++it){
+ node_type* org=it->first;
+ node_type* cpy=it->second;
+
+ cpy->color()=org->color();
+ AugmentPolicy::copy(org->impl(),cpy->impl());
+
+ node_impl_pointer parent_org=org->parent();
+ if(parent_org==node_impl_pointer(0))cpy->parent()=node_impl_pointer(0);
+ else{
+ node_type* parent_cpy=map.find(
+ static_cast<final_node_type*>(node_type::from_impl(parent_org)));
+ cpy->parent()=parent_cpy->impl();
+ if(parent_org->left()==org->impl()){
+ parent_cpy->left()=cpy->impl();
+ }
+ else if(parent_org->right()==org->impl()){
+ /* header() does not satisfy this nor the previous check */
+ parent_cpy->right()=cpy->impl();
+ }
+ }
+
+ if(org->left()==node_impl_pointer(0))
+ cpy->left()=node_impl_pointer(0);
+ if(org->right()==node_impl_pointer(0))
+ cpy->right()=node_impl_pointer(0);
+ }
+ }
+
+ super::copy_(x,map);
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,final_node_type*& x,Variant variant)
+ {
+ link_info inf;
+ if(!link_point(key(v),inf,Category())){
+ return static_cast<final_node_type*>(node_type::from_impl(inf.pos));
+ }
+
+ final_node_type* res=super::insert_(v,x,variant);
+ if(res==x){
+ node_impl_type::link(
+ static_cast<node_type*>(x)->impl(),inf.side,inf.pos,header()->impl());
+ }
+ return res;
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,node_type* position,final_node_type*& x,Variant variant)
+ {
+ link_info inf;
+ if(!hinted_link_point(key(v),position,inf,Category())){
+ return static_cast<final_node_type*>(node_type::from_impl(inf.pos));
+ }
+
+ final_node_type* res=super::insert_(v,position,x,variant);
+ if(res==x){
+ node_impl_type::link(
+ static_cast<node_type*>(x)->impl(),inf.side,inf.pos,header()->impl());
+ }
+ return res;
+ }
+
+ void erase_(node_type* x)
+ {
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ }
+
+ void delete_all_nodes_()
+ {
+ delete_all_nodes(root());
+ }
+
+ void clear_()
+ {
+ super::clear_();
+ empty_initialize();
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::detach_dereferenceable_iterators();
+#endif
+ }
+
+ void swap_(
+ ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x)
+ {
+ std::swap(key,x.key);
+ std::swap(comp_,x.comp_);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_(x);
+ }
+
+ void swap_elements_(
+ ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x)
+ {
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_elements_(x);
+ }
+
+ template<typename Variant>
+ bool replace_(value_param_type v,node_type* x,Variant variant)
+ {
+ if(in_place(v,x,Category())){
+ return super::replace_(v,x,variant);
+ }
+
+ node_type* next=x;
+ node_type::increment(next);
+
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+
+ BOOST_TRY{
+ link_info inf;
+ if(link_point(key(v),inf,Category())&&super::replace_(v,x,variant)){
+ node_impl_type::link(x->impl(),inf.side,inf.pos,header()->impl());
+ return true;
+ }
+ node_impl_type::restore(x->impl(),next->impl(),header()->impl());
+ return false;
+ }
+ BOOST_CATCH(...){
+ node_impl_type::restore(x->impl(),next->impl(),header()->impl());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool modify_(node_type* x)
+ {
+ bool b;
+ BOOST_TRY{
+ b=in_place(x->value(),x,Category());
+ }
+ BOOST_CATCH(...){
+ erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ if(!b){
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+ BOOST_TRY{
+ link_info inf;
+ if(!link_point(key(x->value()),inf,Category())){
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ return false;
+ }
+ node_impl_type::link(x->impl(),inf.side,inf.pos,header()->impl());
+ }
+ BOOST_CATCH(...){
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ BOOST_TRY{
+ if(!super::modify_(x)){
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ return false;
+ }
+ else return true;
+ }
+ BOOST_CATCH(...){
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool modify_rollback_(node_type* x)
+ {
+ if(in_place(x->value(),x,Category())){
+ return super::modify_rollback_(x);
+ }
+
+ node_type* next=x;
+ node_type::increment(next);
+
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+
+ BOOST_TRY{
+ link_info inf;
+ if(link_point(key(x->value()),inf,Category())&&
+ super::modify_rollback_(x)){
+ node_impl_type::link(x->impl(),inf.side,inf.pos,header()->impl());
+ return true;
+ }
+ node_impl_type::restore(x->impl(),next->impl(),header()->impl());
+ return false;
+ }
+ BOOST_CATCH(...){
+ node_impl_type::restore(x->impl(),next->impl(),header()->impl());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool check_rollback_(node_type* x)const
+ {
+ return in_place(x->value(),x,Category())&&super::check_rollback_(x);
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* serialization */
+
+ template<typename Archive>
+ void save_(
+ Archive& ar,const unsigned int version,const index_saver_type& sm)const
+ {
+ save_(ar,version,sm,Category());
+ }
+
+ template<typename Archive>
+ void load_(Archive& ar,const unsigned int version,const index_loader_type& lm)
+ {
+ load_(ar,version,lm,Category());
+ }
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ bool invariant_()const
+ {
+ if(size()==0||begin()==end()){
+ if(size()!=0||begin()!=end()||
+ header()->left()!=header()->impl()||
+ header()->right()!=header()->impl())return false;
+ }
+ else{
+ if((size_type)std::distance(begin(),end())!=size())return false;
+
+ std::size_t len=node_impl_type::black_count(
+ leftmost()->impl(),root()->impl());
+ for(const_iterator it=begin(),it_end=end();it!=it_end;++it){
+ node_type* x=it.get_node();
+ node_type* left_x=node_type::from_impl(x->left());
+ node_type* right_x=node_type::from_impl(x->right());
+
+ if(x->color()==red){
+ if((left_x&&left_x->color()==red)||
+ (right_x&&right_x->color()==red))return false;
+ }
+ if(left_x&&comp_(key(x->value()),key(left_x->value())))return false;
+ if(right_x&&comp_(key(right_x->value()),key(x->value())))return false;
+ if(!left_x&&!right_x&&
+ node_impl_type::black_count(x->impl(),root()->impl())!=len)
+ return false;
+ if(!AugmentPolicy::invariant(x->impl()))return false;
+ }
+
+ if(leftmost()->impl()!=node_impl_type::minimum(root()->impl()))
+ return false;
+ if(rightmost()->impl()!=node_impl_type::maximum(root()->impl()))
+ return false;
+ }
+
+ return super::invariant_();
+ }
+
+
+ /* This forwarding function eases things for the boost::mem_fn construct
+ * in BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT. Actually,
+ * final_check_invariant is already an inherited member function of
+ * ordered_index_impl.
+ */
+ void check_invariant_()const{this->final_check_invariant_();}
+#endif
+
+protected: /* for the benefit of AugmentPolicy::augmented_interface */
+ node_type* header()const{return this->final_header();}
+ node_type* root()const{return node_type::from_impl(header()->parent());}
+ node_type* leftmost()const{return node_type::from_impl(header()->left());}
+ node_type* rightmost()const{return node_type::from_impl(header()->right());}
+
+private:
+ void empty_initialize()
+ {
+ header()->color()=red;
+ /* used to distinguish header() from root, in iterator.operator++ */
+
+ header()->parent()=node_impl_pointer(0);
+ header()->left()=header()->impl();
+ header()->right()=header()->impl();
+ }
+
+ struct link_info
+ {
+ /* coverity[uninit_ctor]: suppress warning */
+ link_info():side(to_left){}
+
+ ordered_index_side side;
+ node_impl_pointer pos;
+ };
+
+ bool link_point(key_param_type k,link_info& inf,ordered_unique_tag)
+ {
+ node_type* y=header();
+ node_type* x=root();
+ bool c=true;
+ while(x){
+ y=x;
+ c=comp_(k,key(x->value()));
+ x=node_type::from_impl(c?x->left():x->right());
+ }
+ node_type* yy=y;
+ if(c){
+ if(yy==leftmost()){
+ inf.side=to_left;
+ inf.pos=y->impl();
+ return true;
+ }
+ else node_type::decrement(yy);
+ }
+
+ if(comp_(key(yy->value()),k)){
+ inf.side=c?to_left:to_right;
+ inf.pos=y->impl();
+ return true;
+ }
+ else{
+ inf.pos=yy->impl();
+ return false;
+ }
+ }
+
+ bool link_point(key_param_type k,link_info& inf,ordered_non_unique_tag)
+ {
+ node_type* y=header();
+ node_type* x=root();
+ bool c=true;
+ while (x){
+ y=x;
+ c=comp_(k,key(x->value()));
+ x=node_type::from_impl(c?x->left():x->right());
+ }
+ inf.side=c?to_left:to_right;
+ inf.pos=y->impl();
+ return true;
+ }
+
+ bool lower_link_point(key_param_type k,link_info& inf,ordered_non_unique_tag)
+ {
+ node_type* y=header();
+ node_type* x=root();
+ bool c=false;
+ while (x){
+ y=x;
+ c=comp_(key(x->value()),k);
+ x=node_type::from_impl(c?x->right():x->left());
+ }
+ inf.side=c?to_right:to_left;
+ inf.pos=y->impl();
+ return true;
+ }
+
+ bool hinted_link_point(
+ key_param_type k,node_type* position,link_info& inf,ordered_unique_tag)
+ {
+ if(position->impl()==header()->left()){
+ if(size()>0&&comp_(k,key(position->value()))){
+ inf.side=to_left;
+ inf.pos=position->impl();
+ return true;
+ }
+ else return link_point(k,inf,ordered_unique_tag());
+ }
+ else if(position==header()){
+ if(comp_(key(rightmost()->value()),k)){
+ inf.side=to_right;
+ inf.pos=rightmost()->impl();
+ return true;
+ }
+ else return link_point(k,inf,ordered_unique_tag());
+ }
+ else{
+ node_type* before=position;
+ node_type::decrement(before);
+ if(comp_(key(before->value()),k)&&comp_(k,key(position->value()))){
+ if(before->right()==node_impl_pointer(0)){
+ inf.side=to_right;
+ inf.pos=before->impl();
+ return true;
+ }
+ else{
+ inf.side=to_left;
+ inf.pos=position->impl();
+ return true;
+ }
+ }
+ else return link_point(k,inf,ordered_unique_tag());
+ }
+ }
+
+ bool hinted_link_point(
+ key_param_type k,node_type* position,link_info& inf,ordered_non_unique_tag)
+ {
+ if(position->impl()==header()->left()){
+ if(size()>0&&!comp_(key(position->value()),k)){
+ inf.side=to_left;
+ inf.pos=position->impl();
+ return true;
+ }
+ else return lower_link_point(k,inf,ordered_non_unique_tag());
+ }
+ else if(position==header()){
+ if(!comp_(k,key(rightmost()->value()))){
+ inf.side=to_right;
+ inf.pos=rightmost()->impl();
+ return true;
+ }
+ else return link_point(k,inf,ordered_non_unique_tag());
+ }
+ else{
+ node_type* before=position;
+ node_type::decrement(before);
+ if(!comp_(k,key(before->value()))){
+ if(!comp_(key(position->value()),k)){
+ if(before->right()==node_impl_pointer(0)){
+ inf.side=to_right;
+ inf.pos=before->impl();
+ return true;
+ }
+ else{
+ inf.side=to_left;
+ inf.pos=position->impl();
+ return true;
+ }
+ }
+ else return lower_link_point(k,inf,ordered_non_unique_tag());
+ }
+ else return link_point(k,inf,ordered_non_unique_tag());
+ }
+ }
+
+ void delete_all_nodes(node_type* x)
+ {
+ if(!x)return;
+
+ delete_all_nodes(node_type::from_impl(x->left()));
+ delete_all_nodes(node_type::from_impl(x->right()));
+ this->final_delete_node_(static_cast<final_node_type*>(x));
+ }
+
+ bool in_place(value_param_type v,node_type* x,ordered_unique_tag)const
+ {
+ node_type* y;
+ if(x!=leftmost()){
+ y=x;
+ node_type::decrement(y);
+ if(!comp_(key(y->value()),key(v)))return false;
+ }
+
+ y=x;
+ node_type::increment(y);
+ return y==header()||comp_(key(v),key(y->value()));
+ }
+
+ bool in_place(value_param_type v,node_type* x,ordered_non_unique_tag)const
+ {
+ node_type* y;
+ if(x!=leftmost()){
+ y=x;
+ node_type::decrement(y);
+ if(comp_(key(v),key(y->value())))return false;
+ }
+
+ y=x;
+ node_type::increment(y);
+ return y==header()||!comp_(key(y->value()),key(v));
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ void detach_iterators(node_type* x)
+ {
+ iterator it=make_iterator(x);
+ safe_mode::detach_equivalent_iterators(it);
+ }
+#endif
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_impl(BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool>p=
+ this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ iterator emplace_hint_impl(
+ iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool>p=
+ this->final_emplace_hint_(
+ static_cast<final_node_type*>(position.get_node()),
+ BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ return make_iterator(p.first);
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<iterator,iterator>
+ range(LowerBounder lower,UpperBounder upper,none_unbounded_tag)const
+ {
+ node_type* y=header();
+ node_type* z=root();
+
+ while(z){
+ if(!lower(key(z->value()))){
+ z=node_type::from_impl(z->right());
+ }
+ else if(!upper(key(z->value()))){
+ y=z;
+ z=node_type::from_impl(z->left());
+ }
+ else{
+ return std::pair<iterator,iterator>(
+ make_iterator(
+ lower_range(node_type::from_impl(z->left()),z,lower)),
+ make_iterator(
+ upper_range(node_type::from_impl(z->right()),y,upper)));
+ }
+ }
+
+ return std::pair<iterator,iterator>(make_iterator(y),make_iterator(y));
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<iterator,iterator>
+ range(LowerBounder,UpperBounder upper,lower_unbounded_tag)const
+ {
+ return std::pair<iterator,iterator>(
+ begin(),
+ make_iterator(upper_range(root(),header(),upper)));
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<iterator,iterator>
+ range(LowerBounder lower,UpperBounder,upper_unbounded_tag)const
+ {
+ return std::pair<iterator,iterator>(
+ make_iterator(lower_range(root(),header(),lower)),
+ end());
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<iterator,iterator>
+ range(LowerBounder,UpperBounder,both_unbounded_tag)const
+ {
+ return std::pair<iterator,iterator>(begin(),end());
+ }
+
+ template<typename LowerBounder>
+ node_type * lower_range(node_type* top,node_type* y,LowerBounder lower)const
+ {
+ while(top){
+ if(lower(key(top->value()))){
+ y=top;
+ top=node_type::from_impl(top->left());
+ }
+ else top=node_type::from_impl(top->right());
+ }
+
+ return y;
+ }
+
+ template<typename UpperBounder>
+ node_type * upper_range(node_type* top,node_type* y,UpperBounder upper)const
+ {
+ while(top){
+ if(!upper(key(top->value()))){
+ y=top;
+ top=node_type::from_impl(top->left());
+ }
+ else top=node_type::from_impl(top->right());
+ }
+
+ return y;
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ template<typename Archive>
+ void save_(
+ Archive& ar,const unsigned int version,const index_saver_type& sm,
+ ordered_unique_tag)const
+ {
+ super::save_(ar,version,sm);
+ }
+
+ template<typename Archive>
+ void load_(
+ Archive& ar,const unsigned int version,const index_loader_type& lm,
+ ordered_unique_tag)
+ {
+ super::load_(ar,version,lm);
+ }
+
+ template<typename Archive>
+ void save_(
+ Archive& ar,const unsigned int version,const index_saver_type& sm,
+ ordered_non_unique_tag)const
+ {
+ typedef duplicates_iterator<node_type,value_compare> dup_iterator;
+
+ sm.save(
+ dup_iterator(begin().get_node(),end().get_node(),value_comp()),
+ dup_iterator(end().get_node(),value_comp()),
+ ar,version);
+ super::save_(ar,version,sm);
+ }
+
+ template<typename Archive>
+ void load_(
+ Archive& ar,const unsigned int version,const index_loader_type& lm,
+ ordered_non_unique_tag)
+ {
+ lm.load(
+ ::boost::bind(
+ &ordered_index_impl::rearranger,this,
+ ::boost::arg<1>(),::boost::arg<2>()),
+ ar,version);
+ super::load_(ar,version,lm);
+ }
+
+ void rearranger(node_type* position,node_type *x)
+ {
+ if(!position||comp_(key(position->value()),key(x->value()))){
+ position=lower_bound(key(x->value())).get_node();
+ }
+ else if(comp_(key(x->value()),key(position->value()))){
+ /* inconsistent rearrangement */
+ throw_exception(
+ archive::archive_exception(
+ archive::archive_exception::other_exception));
+ }
+ else node_type::increment(position);
+
+ if(position!=x){
+ node_impl_type::rebalance_for_erase(
+ x->impl(),header()->parent(),header()->left(),header()->right());
+ node_impl_type::restore(
+ x->impl(),position->impl(),header()->impl());
+ }
+ }
+#endif /* serialization */
+
+protected: /* for the benefit of AugmentPolicy::augmented_interface */
+ key_from_value key;
+ key_compare comp_;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+#pragma parse_mfunc_templ reset
+#endif
+};
+
+template<
+ typename KeyFromValue,typename Compare,
+ typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
+>
+class ordered_index:
+ public AugmentPolicy::template augmented_interface<
+ ordered_index_impl<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy
+ >
+ >::type
+{
+ typedef typename AugmentPolicy::template
+ augmented_interface<
+ ordered_index_impl<
+ KeyFromValue,Compare,
+ SuperMeta,TagList,Category,AugmentPolicy
+ >
+ >::type super;
+public:
+ typedef typename super::ctor_args_list ctor_args_list;
+ typedef typename super::allocator_type allocator_type;
+ typedef typename super::iterator iterator;
+
+ /* construct/copy/destroy
+ * Default and copy ctors are in the protected section as indices are
+ * not supposed to be created on their own. No range ctor either.
+ */
+
+ ordered_index& operator=(const ordered_index& x)
+ {
+ this->final()=x.final();
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ ordered_index& operator=(
+ std::initializer_list<BOOST_DEDUCED_TYPENAME super::value_type> list)
+ {
+ this->final()=list;
+ return *this;
+ }
+#endif
+
+protected:
+ ordered_index(
+ const ctor_args_list& args_list,const allocator_type& al):
+ super(args_list,al){}
+
+ ordered_index(const ordered_index& x):super(x){}
+
+ ordered_index(const ordered_index& x,do_not_copy_elements_tag):
+ super(x,do_not_copy_elements_tag()){}
+};
+
+/* comparison */
+
+template<
+ typename KeyFromValue1,typename Compare1,
+ typename SuperMeta1,typename TagList1,typename Category1,
+ typename AugmentPolicy1,
+ typename KeyFromValue2,typename Compare2,
+ typename SuperMeta2,typename TagList2,typename Category2,
+ typename AugmentPolicy2
+>
+bool operator==(
+ const ordered_index<
+ KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
+ const ordered_index<
+ KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
+{
+ return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
+}
+
+template<
+ typename KeyFromValue1,typename Compare1,
+ typename SuperMeta1,typename TagList1,typename Category1,
+ typename AugmentPolicy1,
+ typename KeyFromValue2,typename Compare2,
+ typename SuperMeta2,typename TagList2,typename Category2,
+ typename AugmentPolicy2
+>
+bool operator<(
+ const ordered_index<
+ KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
+ const ordered_index<
+ KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
+{
+ return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+}
+
+template<
+ typename KeyFromValue1,typename Compare1,
+ typename SuperMeta1,typename TagList1,typename Category1,
+ typename AugmentPolicy1,
+ typename KeyFromValue2,typename Compare2,
+ typename SuperMeta2,typename TagList2,typename Category2,
+ typename AugmentPolicy2
+>
+bool operator!=(
+ const ordered_index<
+ KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
+ const ordered_index<
+ KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
+{
+ return !(x==y);
+}
+
+template<
+ typename KeyFromValue1,typename Compare1,
+ typename SuperMeta1,typename TagList1,typename Category1,
+ typename AugmentPolicy1,
+ typename KeyFromValue2,typename Compare2,
+ typename SuperMeta2,typename TagList2,typename Category2,
+ typename AugmentPolicy2
+>
+bool operator>(
+ const ordered_index<
+ KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
+ const ordered_index<
+ KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
+{
+ return y<x;
+}
+
+template<
+ typename KeyFromValue1,typename Compare1,
+ typename SuperMeta1,typename TagList1,typename Category1,
+ typename AugmentPolicy1,
+ typename KeyFromValue2,typename Compare2,
+ typename SuperMeta2,typename TagList2,typename Category2,
+ typename AugmentPolicy2
+>
+bool operator>=(
+ const ordered_index<
+ KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
+ const ordered_index<
+ KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
+{
+ return !(x<y);
+}
+
+template<
+ typename KeyFromValue1,typename Compare1,
+ typename SuperMeta1,typename TagList1,typename Category1,
+ typename AugmentPolicy1,
+ typename KeyFromValue2,typename Compare2,
+ typename SuperMeta2,typename TagList2,typename Category2,
+ typename AugmentPolicy2
+>
+bool operator<=(
+ const ordered_index<
+ KeyFromValue1,Compare1,SuperMeta1,TagList1,Category1,AugmentPolicy1>& x,
+ const ordered_index<
+ KeyFromValue2,Compare2,SuperMeta2,TagList2,Category2,AugmentPolicy2>& y)
+{
+ return !(x>y);
+}
+
+/* specialized algorithms */
+
+template<
+ typename KeyFromValue,typename Compare,
+ typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
+>
+void swap(
+ ordered_index<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& x,
+ ordered_index<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+/* Boost.Foreach compatibility */
+
+template<
+ typename KeyFromValue,typename Compare,
+ typename SuperMeta,typename TagList,typename Category,typename AugmentPolicy
+>
+inline boost::mpl::true_* boost_foreach_is_noncopyable(
+ boost::multi_index::detail::ordered_index<
+ KeyFromValue,Compare,SuperMeta,TagList,Category,AugmentPolicy>*&,
+ boost_foreach_argument_dependent_lookup_hack)
+{
+ return 0;
+}
+
+#undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT
+#undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT_OF
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl_fwd.hpp
index 6590ef05fdd..6590ef05fdd 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_impl_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_node.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_node.hpp
new file mode 100644
index 00000000000..0a816c5faad
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_node.hpp
@@ -0,0 +1,674 @@
+/* Copyright 2003-2019 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.
+ *
+ * The internal implementation of red-black trees is based on that of SGI STL
+ * stl_tree.h file:
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_NODE_HPP
+#define BOOST_MULTI_INDEX_DETAIL_ORD_INDEX_NODE_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <cstddef>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/raw_ptr.hpp>
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES)
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/multi_index/detail/uintptr_type.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/is_same.hpp>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* definition of red-black nodes for ordered_index */
+
+enum ordered_index_color{red=false,black=true};
+enum ordered_index_side{to_left=false,to_right=true};
+
+template<typename AugmentPolicy,typename Allocator>
+struct ordered_index_node_impl; /* fwd decl. */
+
+template<typename AugmentPolicy,typename Allocator>
+struct ordered_index_node_traits
+{
+ typedef typename rebind_alloc_for<
+ Allocator,
+ ordered_index_node_impl<AugmentPolicy,Allocator>
+ >::type allocator;
+ typedef allocator_traits<allocator> alloc_traits;
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::const_pointer const_pointer;
+ typedef typename alloc_traits::difference_type difference_type;
+ typedef typename alloc_traits::size_type size_type;
+};
+
+template<typename AugmentPolicy,typename Allocator>
+struct ordered_index_node_std_base
+{
+ typedef ordered_index_node_traits<
+ AugmentPolicy,Allocator> node_traits;
+ typedef typename node_traits::allocator node_allocator;
+ typedef typename node_traits::pointer pointer;
+ typedef typename node_traits::const_pointer const_pointer;
+ typedef typename node_traits::difference_type difference_type;
+ typedef typename node_traits::size_type size_type;
+ typedef ordered_index_color& color_ref;
+ typedef pointer& parent_ref;
+
+ ordered_index_color& color(){return color_;}
+ ordered_index_color color()const{return color_;}
+ pointer& parent(){return parent_;}
+ pointer parent()const{return parent_;}
+ pointer& left(){return left_;}
+ pointer left()const{return left_;}
+ pointer& right(){return right_;}
+ pointer right()const{return right_;}
+
+private:
+ ordered_index_color color_;
+ pointer parent_;
+ pointer left_;
+ pointer right_;
+};
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES)
+/* If ordered_index_node_impl has even alignment, we can use the least
+ * significant bit of one of the ordered_index_node_impl pointers to
+ * store color information. This typically reduces the size of
+ * ordered_index_node_impl by 25%.
+ */
+
+#if defined(BOOST_MSVC)
+/* This code casts pointers to an integer type that has been computed
+ * to be large enough to hold the pointer, however the metaprogramming
+ * logic is not always spotted by the VC++ code analyser that issues a
+ * long list of warnings.
+ */
+
+#pragma warning(push)
+#pragma warning(disable:4312 4311)
+#endif
+
+template<typename AugmentPolicy,typename Allocator>
+struct ordered_index_node_compressed_base
+{
+ typedef ordered_index_node_traits<
+ AugmentPolicy,Allocator> node_traits;
+ typedef ordered_index_node_impl<
+ AugmentPolicy,Allocator>* pointer;
+ typedef const ordered_index_node_impl<
+ AugmentPolicy,Allocator>* const_pointer;
+ typedef typename node_traits::difference_type difference_type;
+ typedef typename node_traits::size_type size_type;
+
+ struct color_ref
+ {
+ color_ref(uintptr_type* r_):r(r_){}
+ color_ref(const color_ref& x):r(x.r){}
+
+ operator ordered_index_color()const
+ {
+ return ordered_index_color(*r&uintptr_type(1));
+ }
+
+ color_ref& operator=(ordered_index_color c)
+ {
+ *r&=~uintptr_type(1);
+ *r|=uintptr_type(c);
+ return *this;
+ }
+
+ color_ref& operator=(const color_ref& x)
+ {
+ return operator=(x.operator ordered_index_color());
+ }
+
+ private:
+ uintptr_type* r;
+ };
+
+ struct parent_ref
+ {
+ parent_ref(uintptr_type* r_):r(r_){}
+ parent_ref(const parent_ref& x):r(x.r){}
+
+ operator pointer()const
+ {
+ return (pointer)(void*)(*r&~uintptr_type(1));
+ }
+
+ parent_ref& operator=(pointer p)
+ {
+ *r=((uintptr_type)(void*)p)|(*r&uintptr_type(1));
+ return *this;
+ }
+
+ parent_ref& operator=(const parent_ref& x)
+ {
+ return operator=(x.operator pointer());
+ }
+
+ pointer operator->()const
+ {
+ return operator pointer();
+ }
+
+ private:
+ uintptr_type* r;
+ };
+
+ color_ref color(){return color_ref(&parentcolor_);}
+ ordered_index_color color()const
+ {
+ return ordered_index_color(parentcolor_&uintptr_type(1));
+ }
+
+ parent_ref parent(){return parent_ref(&parentcolor_);}
+ pointer parent()const
+ {
+ return (pointer)(void*)(parentcolor_&~uintptr_type(1));
+ }
+
+ pointer& left(){return left_;}
+ pointer left()const{return left_;}
+ pointer& right(){return right_;}
+ pointer right()const{return right_;}
+
+private:
+ uintptr_type parentcolor_;
+ pointer left_;
+ pointer right_;
+};
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+#endif
+
+template<typename AugmentPolicy,typename Allocator>
+struct ordered_index_node_impl_base:
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES)
+ AugmentPolicy::template augmented_node<
+ typename mpl::if_c<
+ !(has_uintptr_type::value)||
+ (alignment_of<
+ ordered_index_node_compressed_base<AugmentPolicy,Allocator>
+ >::value%2)||
+ !(is_same<
+ typename ordered_index_node_traits<AugmentPolicy,Allocator>::pointer,
+ ordered_index_node_impl<AugmentPolicy,Allocator>*>::value),
+ ordered_index_node_std_base<AugmentPolicy,Allocator>,
+ ordered_index_node_compressed_base<AugmentPolicy,Allocator>
+ >::type
+ >::type
+#else
+ AugmentPolicy::template augmented_node<
+ ordered_index_node_std_base<AugmentPolicy,Allocator>
+ >::type
+#endif
+
+{};
+
+template<typename AugmentPolicy,typename Allocator>
+struct ordered_index_node_impl:
+ ordered_index_node_impl_base<AugmentPolicy,Allocator>
+{
+private:
+ typedef ordered_index_node_impl_base<AugmentPolicy,Allocator> super;
+
+public:
+ typedef typename super::color_ref color_ref;
+ typedef typename super::parent_ref parent_ref;
+ typedef typename super::pointer pointer;
+ typedef typename super::const_pointer const_pointer;
+
+ /* interoperability with bidir_node_iterator */
+
+ static void increment(pointer& x)
+ {
+ if(x->right()!=pointer(0)){
+ x=x->right();
+ while(x->left()!=pointer(0))x=x->left();
+ }
+ else{
+ pointer y=x->parent();
+ while(x==y->right()){
+ x=y;
+ y=y->parent();
+ }
+ if(x->right()!=y)x=y;
+ }
+ }
+
+ static void decrement(pointer& x)
+ {
+ if(x->color()==red&&x->parent()->parent()==x){
+ x=x->right();
+ }
+ else if(x->left()!=pointer(0)){
+ pointer y=x->left();
+ while(y->right()!=pointer(0))y=y->right();
+ x=y;
+ }else{
+ pointer y=x->parent();
+ while(x==y->left()){
+ x=y;
+ y=y->parent();
+ }
+ x=y;
+ }
+ }
+
+ /* algorithmic stuff */
+
+ static void rotate_left(pointer x,parent_ref root)
+ {
+ pointer y=x->right();
+ x->right()=y->left();
+ if(y->left()!=pointer(0))y->left()->parent()=x;
+ y->parent()=x->parent();
+
+ if(x==root) root=y;
+ else if(x==x->parent()->left())x->parent()->left()=y;
+ else x->parent()->right()=y;
+ y->left()=x;
+ x->parent()=y;
+ AugmentPolicy::rotate_left(x,y);
+ }
+
+ static pointer minimum(pointer x)
+ {
+ while(x->left()!=pointer(0))x=x->left();
+ return x;
+ }
+
+ static pointer maximum(pointer x)
+ {
+ while(x->right()!=pointer(0))x=x->right();
+ return x;
+ }
+
+ static void rotate_right(pointer x,parent_ref root)
+ {
+ pointer y=x->left();
+ x->left()=y->right();
+ if(y->right()!=pointer(0))y->right()->parent()=x;
+ y->parent()=x->parent();
+
+ if(x==root) root=y;
+ else if(x==x->parent()->right())x->parent()->right()=y;
+ else x->parent()->left()=y;
+ y->right()=x;
+ x->parent()=y;
+ AugmentPolicy::rotate_right(x,y);
+ }
+
+ static void rebalance(pointer x,parent_ref root)
+ {
+ x->color()=red;
+ while(x!=root&&x->parent()->color()==red){
+ if(x->parent()==x->parent()->parent()->left()){
+ pointer y=x->parent()->parent()->right();
+ if(y!=pointer(0)&&y->color()==red){
+ x->parent()->color()=black;
+ y->color()=black;
+ x->parent()->parent()->color()=red;
+ x=x->parent()->parent();
+ }
+ else{
+ if(x==x->parent()->right()){
+ x=x->parent();
+ rotate_left(x,root);
+ }
+ x->parent()->color()=black;
+ x->parent()->parent()->color()=red;
+ rotate_right(x->parent()->parent(),root);
+ }
+ }
+ else{
+ pointer y=x->parent()->parent()->left();
+ if(y!=pointer(0)&&y->color()==red){
+ x->parent()->color()=black;
+ y->color()=black;
+ x->parent()->parent()->color()=red;
+ x=x->parent()->parent();
+ }
+ else{
+ if(x==x->parent()->left()){
+ x=x->parent();
+ rotate_right(x,root);
+ }
+ x->parent()->color()=black;
+ x->parent()->parent()->color()=red;
+ rotate_left(x->parent()->parent(),root);
+ }
+ }
+ }
+ root->color()=black;
+ }
+
+ static void link(
+ pointer x,ordered_index_side side,pointer position,pointer header)
+ {
+ if(side==to_left){
+ position->left()=x; /* also makes leftmost=x when parent==header */
+ if(position==header){
+ header->parent()=x;
+ header->right()=x;
+ }
+ else if(position==header->left()){
+ header->left()=x; /* maintain leftmost pointing to min node */
+ }
+ }
+ else{
+ position->right()=x;
+ if(position==header->right()){
+ header->right()=x; /* maintain rightmost pointing to max node */
+ }
+ }
+ x->parent()=position;
+ x->left()=pointer(0);
+ x->right()=pointer(0);
+ AugmentPolicy::add(x,pointer(header->parent()));
+ ordered_index_node_impl::rebalance(x,header->parent());
+ }
+
+ static pointer rebalance_for_erase(
+ pointer z,parent_ref root,pointer& leftmost,pointer& rightmost)
+ {
+ pointer y=z;
+ pointer x=pointer(0);
+ pointer x_parent=pointer(0);
+ if(y->left()==pointer(0)){ /* z has at most one non-null child. y==z. */
+ x=y->right(); /* x might be null */
+ }
+ else{
+ if(y->right()==pointer(0)){ /* z has exactly one non-null child. y==z. */
+ x=y->left(); /* x is not null */
+ }
+ else{ /* z has two non-null children. Set y to */
+ y=y->right(); /* z's successor. x might be null. */
+ while(y->left()!=pointer(0))y=y->left();
+ x=y->right();
+ }
+ }
+ AugmentPolicy::remove(y,pointer(root));
+ if(y!=z){
+ AugmentPolicy::copy(z,y);
+ z->left()->parent()=y; /* relink y in place of z. y is z's successor */
+ y->left()=z->left();
+ if(y!=z->right()){
+ x_parent=y->parent();
+ if(x!=pointer(0))x->parent()=y->parent();
+ y->parent()->left()=x; /* y must be a child of left */
+ y->right()=z->right();
+ z->right()->parent()=y;
+ }
+ else{
+ x_parent=y;
+ }
+
+ if(root==z) root=y;
+ else if(z->parent()->left()==z)z->parent()->left()=y;
+ else z->parent()->right()=y;
+ y->parent()=z->parent();
+ ordered_index_color c=y->color();
+ y->color()=z->color();
+ z->color()=c;
+ y=z; /* y now points to node to be actually deleted */
+ }
+ else{ /* y==z */
+ x_parent=y->parent();
+ if(x!=pointer(0))x->parent()=y->parent();
+ if(root==z){
+ root=x;
+ }
+ else{
+ if(z->parent()->left()==z)z->parent()->left()=x;
+ else z->parent()->right()=x;
+ }
+ if(leftmost==z){
+ if(z->right()==pointer(0)){ /* z->left() must be null also */
+ leftmost=z->parent();
+ }
+ else{
+ leftmost=minimum(x); /* makes leftmost==header if z==root */
+ }
+ }
+ if(rightmost==z){
+ if(z->left()==pointer(0)){ /* z->right() must be null also */
+ rightmost=z->parent();
+ }
+ else{ /* x==z->left() */
+ rightmost=maximum(x); /* makes rightmost==header if z==root */
+ }
+ }
+ }
+ if(y->color()!=red){
+ while(x!=root&&(x==pointer(0)|| x->color()==black)){
+ if(x==x_parent->left()){
+ pointer w=x_parent->right();
+ if(w->color()==red){
+ w->color()=black;
+ x_parent->color()=red;
+ rotate_left(x_parent,root);
+ w=x_parent->right();
+ }
+ if((w->left()==pointer(0)||w->left()->color()==black) &&
+ (w->right()==pointer(0)||w->right()->color()==black)){
+ w->color()=red;
+ x=x_parent;
+ x_parent=x_parent->parent();
+ }
+ else{
+ if(w->right()==pointer(0 )
+ || w->right()->color()==black){
+ if(w->left()!=pointer(0)) w->left()->color()=black;
+ w->color()=red;
+ rotate_right(w,root);
+ w=x_parent->right();
+ }
+ w->color()=x_parent->color();
+ x_parent->color()=black;
+ if(w->right()!=pointer(0))w->right()->color()=black;
+ rotate_left(x_parent,root);
+ break;
+ }
+ }
+ else{ /* same as above,with right <-> left */
+ pointer w=x_parent->left();
+ if(w->color()==red){
+ w->color()=black;
+ x_parent->color()=red;
+ rotate_right(x_parent,root);
+ w=x_parent->left();
+ }
+ if((w->right()==pointer(0)||w->right()->color()==black) &&
+ (w->left()==pointer(0)||w->left()->color()==black)){
+ w->color()=red;
+ x=x_parent;
+ x_parent=x_parent->parent();
+ }
+ else{
+ if(w->left()==pointer(0)||w->left()->color()==black){
+ if(w->right()!=pointer(0))w->right()->color()=black;
+ w->color()=red;
+ rotate_left(w,root);
+ w=x_parent->left();
+ }
+ w->color()=x_parent->color();
+ x_parent->color()=black;
+ if(w->left()!=pointer(0))w->left()->color()=black;
+ rotate_right(x_parent,root);
+ break;
+ }
+ }
+ }
+ if(x!=pointer(0))x->color()=black;
+ }
+ return y;
+ }
+
+ static void restore(pointer x,pointer position,pointer header)
+ {
+ if(position->left()==pointer(0)||position->left()==header){
+ link(x,to_left,position,header);
+ }
+ else{
+ decrement(position);
+ link(x,to_right,position,header);
+ }
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ static std::size_t black_count(pointer node,pointer root)
+ {
+ if(node==pointer(0))return 0;
+ std::size_t sum=0;
+ for(;;){
+ if(node->color()==black)++sum;
+ if(node==root)break;
+ node=node->parent();
+ }
+ return sum;
+ }
+#endif
+};
+
+template<typename AugmentPolicy,typename Super>
+struct ordered_index_node_trampoline:
+ ordered_index_node_impl<
+ AugmentPolicy,
+ typename rebind_alloc_for<
+ typename Super::allocator_type,
+ char
+ >::type
+ >
+{
+ typedef ordered_index_node_impl<
+ AugmentPolicy,
+ typename rebind_alloc_for<
+ typename Super::allocator_type,
+ char
+ >::type
+ > impl_type;
+};
+
+template<typename AugmentPolicy,typename Super>
+struct ordered_index_node:
+ Super,ordered_index_node_trampoline<AugmentPolicy,Super>
+{
+private:
+ typedef ordered_index_node_trampoline<AugmentPolicy,Super> trampoline;
+
+public:
+ typedef typename trampoline::impl_type impl_type;
+ typedef typename trampoline::color_ref impl_color_ref;
+ typedef typename trampoline::parent_ref impl_parent_ref;
+ typedef typename trampoline::pointer impl_pointer;
+ typedef typename trampoline::const_pointer const_impl_pointer;
+ typedef typename trampoline::difference_type difference_type;
+ typedef typename trampoline::size_type size_type;
+
+ impl_color_ref color(){return trampoline::color();}
+ ordered_index_color color()const{return trampoline::color();}
+ impl_parent_ref parent(){return trampoline::parent();}
+ impl_pointer parent()const{return trampoline::parent();}
+ impl_pointer& left(){return trampoline::left();}
+ impl_pointer left()const{return trampoline::left();}
+ impl_pointer& right(){return trampoline::right();}
+ impl_pointer right()const{return trampoline::right();}
+
+ impl_pointer impl()
+ {
+ return static_cast<impl_pointer>(
+ static_cast<impl_type*>(static_cast<trampoline*>(this)));
+ }
+
+ const_impl_pointer impl()const
+ {
+ return static_cast<const_impl_pointer>(
+ static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
+ }
+
+ static ordered_index_node* from_impl(impl_pointer x)
+ {
+ return
+ static_cast<ordered_index_node*>(
+ static_cast<trampoline*>(
+ raw_ptr<impl_type*>(x)));
+ }
+
+ static const ordered_index_node* from_impl(const_impl_pointer x)
+ {
+ return
+ static_cast<const ordered_index_node*>(
+ static_cast<const trampoline*>(
+ raw_ptr<const impl_type*>(x)));
+ }
+
+ /* interoperability with bidir_node_iterator */
+
+ static void increment(ordered_index_node*& x)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::increment(xi);
+ x=from_impl(xi);
+ }
+
+ static void decrement(ordered_index_node*& x)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::decrement(xi);
+ x=from_impl(xi);
+ }
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_ops.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_ops.hpp
index 84d5cacae19..84d5cacae19 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/ord_index_ops.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/promotes_arg.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/promotes_arg.hpp
index 7a11b6e9fbe..7a11b6e9fbe 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/promotes_arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/promotes_arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/raw_ptr.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/raw_ptr.hpp
index c32007435c0..c32007435c0 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/raw_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/raw_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp
index ee2c799d5a8..ee2c799d5a8 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_loader.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_loader.hpp
new file mode 100644
index 00000000000..99cf8d2434d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_loader.hpp
@@ -0,0 +1,175 @@
+/* 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_DETAIL_RND_INDEX_LOADER_HPP
+#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_LOADER_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/auto_space.hpp>
+#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* This class implements a serialization rearranger for random access
+ * indices. In order to achieve O(n) performance, the following strategy
+ * is followed: the nodes of the index are handled as if in a bidirectional
+ * list, where the next pointers are stored in the original
+ * random_access_index_ptr_array and the prev pointers are stored in
+ * an auxiliary array. Rearranging of nodes in such a bidirectional list
+ * is constant time. Once all the arrangements are performed (on destruction
+ * time) the list is traversed in reverse order and
+ * pointers are swapped and set accordingly so that they recover its
+ * original semantics ( *(node->up())==node ) while retaining the
+ * new order.
+ */
+
+template<typename Allocator>
+class random_access_index_loader_base:private noncopyable
+{
+protected:
+ typedef random_access_index_node_impl<
+ typename rebind_alloc_for<
+ Allocator,
+ char
+ >::type
+ > node_impl_type;
+ typedef typename node_impl_type::pointer node_impl_pointer;
+ typedef random_access_index_ptr_array<Allocator> ptr_array;
+
+ random_access_index_loader_base(const Allocator& al_,ptr_array& ptrs_):
+ al(al_),
+ ptrs(ptrs_),
+ header(*ptrs.end()),
+ prev_spc(al,0),
+ preprocessed(false)
+ {}
+
+ ~random_access_index_loader_base()
+ {
+ if(preprocessed)
+ {
+ node_impl_pointer n=header;
+ next(n)=n;
+
+ for(size_type i=ptrs.size();i--;){
+ n=prev(n);
+ size_type d=position(n);
+ if(d!=i){
+ node_impl_pointer m=prev(next_at(i));
+ std::swap(m->up(),n->up());
+ next_at(d)=next_at(i);
+ std::swap(prev_at(d),prev_at(i));
+ }
+ next(n)=n;
+ }
+ }
+ }
+
+ void rearrange(node_impl_pointer position_,node_impl_pointer x)
+ {
+ preprocess(); /* only incur this penalty if rearrange() is ever called */
+ if(position_==node_impl_pointer(0))position_=header;
+ next(prev(x))=next(x);
+ prev(next(x))=prev(x);
+ prev(x)=position_;
+ next(x)=next(position_);
+ next(prev(x))=prev(next(x))=x;
+ }
+
+private:
+ typedef allocator_traits<Allocator> alloc_traits;
+ typedef typename alloc_traits::size_type size_type;
+
+ void preprocess()
+ {
+ if(!preprocessed){
+ /* get space for the auxiliary prev array */
+ auto_space<node_impl_pointer,Allocator> tmp(al,ptrs.size()+1);
+ prev_spc.swap(tmp);
+
+ /* prev_spc elements point to the prev nodes */
+ std::rotate_copy(
+ &*ptrs.begin(),&*ptrs.end(),&*ptrs.end()+1,&*prev_spc.data());
+
+ /* ptrs elements point to the next nodes */
+ std::rotate(&*ptrs.begin(),&*ptrs.begin()+1,&*ptrs.end()+1);
+
+ preprocessed=true;
+ }
+ }
+
+ size_type position(node_impl_pointer x)const
+ {
+ return (size_type)(x->up()-ptrs.begin());
+ }
+
+ node_impl_pointer& next_at(size_type n)const
+ {
+ return *ptrs.at(n);
+ }
+
+ node_impl_pointer& prev_at(size_type n)const
+ {
+ return *(prev_spc.data()+n);
+ }
+
+ node_impl_pointer& next(node_impl_pointer x)const
+ {
+ return *(x->up());
+ }
+
+ node_impl_pointer& prev(node_impl_pointer x)const
+ {
+ return prev_at(position(x));
+ }
+
+ Allocator al;
+ ptr_array& ptrs;
+ node_impl_pointer header;
+ auto_space<node_impl_pointer,Allocator> prev_spc;
+ bool preprocessed;
+};
+
+template<typename Node,typename Allocator>
+class random_access_index_loader:
+ private random_access_index_loader_base<Allocator>
+{
+ typedef random_access_index_loader_base<Allocator> super;
+ typedef typename super::node_impl_pointer node_impl_pointer;
+ typedef typename super::ptr_array ptr_array;
+
+public:
+ random_access_index_loader(const Allocator& al_,ptr_array& ptrs_):
+ super(al_,ptrs_)
+ {}
+
+ void rearrange(Node* position_,Node *x)
+ {
+ super::rearrange(
+ position_?position_->impl():node_impl_pointer(0),x->impl());
+ }
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_node.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_node.hpp
new file mode 100644
index 00000000000..782fdd8067e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_node.hpp
@@ -0,0 +1,274 @@
+/* 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_DETAIL_RND_INDEX_NODE_HPP
+#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_NODE_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/integer/common_factor_rt.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/raw_ptr.hpp>
+#include <cstddef>
+#include <functional>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+template<typename Allocator>
+struct random_access_index_node_impl
+{
+ typedef typename rebind_alloc_for<
+ Allocator,random_access_index_node_impl
+ >::type node_allocator;
+ typedef allocator_traits<node_allocator> node_alloc_traits;
+ typedef typename node_alloc_traits::pointer pointer;
+ typedef typename node_alloc_traits::const_pointer const_pointer;
+ typedef typename node_alloc_traits::difference_type difference_type;
+ typedef typename rebind_alloc_for<
+ Allocator,pointer
+ >::type ptr_allocator;
+ typedef allocator_traits<ptr_allocator> ptr_alloc_traits;
+ typedef typename ptr_alloc_traits::pointer ptr_pointer;
+
+ ptr_pointer& up(){return up_;}
+ ptr_pointer up()const{return up_;}
+
+ /* interoperability with rnd_node_iterator */
+
+ static void increment(pointer& x)
+ {
+ x=*(x->up()+1);
+ }
+
+ static void decrement(pointer& x)
+ {
+ x=*(x->up()-1);
+ }
+
+ static void advance(pointer& x,difference_type n)
+ {
+ x=*(x->up()+n);
+ }
+
+ static difference_type distance(pointer x,pointer y)
+ {
+ return static_cast<difference_type>(y->up()-x->up());
+ }
+
+ /* algorithmic stuff */
+
+ static void relocate(ptr_pointer pos,ptr_pointer x)
+ {
+ pointer n=*x;
+ if(x<pos){
+ extract(x,pos);
+ *(pos-1)=n;
+ n->up()=pos-1;
+ }
+ else{
+ while(x!=pos){
+ *x=*(x-1);
+ (*x)->up()=x;
+ --x;
+ }
+ *pos=n;
+ n->up()=pos;
+ }
+ };
+
+ static void relocate(ptr_pointer pos,ptr_pointer first,ptr_pointer last)
+ {
+ ptr_pointer begin,middle,end;
+ if(pos<first){
+ begin=pos;
+ middle=first;
+ end=last;
+ }
+ else{
+ begin=first;
+ middle=last;
+ end=pos;
+ }
+
+ std::ptrdiff_t n=end-begin;
+ std::ptrdiff_t m=middle-begin;
+ std::ptrdiff_t n_m=n-m;
+ std::ptrdiff_t p=integer::gcd(n,m);
+
+ for(std::ptrdiff_t i=0;i<p;++i){
+ pointer tmp=begin[i];
+ for(std::ptrdiff_t j=i,k;;){
+ if(j<n_m)k=j+m;
+ else k=j-n_m;
+ if(k==i){
+ *(begin+j)=tmp;
+ (*(begin+j))->up()=begin+j;
+ break;
+ }
+ else{
+ *(begin+j)=*(begin+k);
+ (*(begin+j))->up()=begin+j;
+ }
+
+ if(k<n_m)j=k+m;
+ else j=k-n_m;
+ if(j==i){
+ *(begin+k)=tmp;
+ (*(begin+k))->up()=begin+k;
+ break;
+ }
+ else{
+ *(begin+k)=*(begin+j);
+ (*(begin+k))->up()=begin+k;
+ }
+ }
+ }
+ };
+
+ static void extract(ptr_pointer x,ptr_pointer pend)
+ {
+ --pend;
+ while(x!=pend){
+ *x=*(x+1);
+ (*x)->up()=x;
+ ++x;
+ }
+ }
+
+ static void transfer(
+ ptr_pointer pbegin0,ptr_pointer pend0,ptr_pointer pbegin1)
+ {
+ while(pbegin0!=pend0){
+ *pbegin1=*pbegin0++;
+ (*pbegin1)->up()=pbegin1;
+ ++pbegin1;
+ }
+ }
+
+ static void reverse(ptr_pointer pbegin,ptr_pointer pend)
+ {
+ std::ptrdiff_t d=(pend-pbegin)/2;
+ for(std::ptrdiff_t i=0;i<d;++i){
+ std::swap(*pbegin,*--pend);
+ (*pbegin)->up()=pbegin;
+ (*pend)->up()=pend;
+ ++pbegin;
+ }
+ }
+
+private:
+ ptr_pointer up_;
+};
+
+template<typename Super>
+struct random_access_index_node_trampoline:
+ random_access_index_node_impl<
+ typename rebind_alloc_for<
+ typename Super::allocator_type,
+ char
+ >::type
+ >
+{
+ typedef random_access_index_node_impl<
+ typename rebind_alloc_for<
+ typename Super::allocator_type,
+ char
+ >::type
+ > impl_type;
+};
+
+template<typename Super>
+struct random_access_index_node:
+ Super,random_access_index_node_trampoline<Super>
+{
+private:
+ typedef random_access_index_node_trampoline<Super> trampoline;
+
+public:
+ typedef typename trampoline::impl_type impl_type;
+ typedef typename trampoline::pointer impl_pointer;
+ typedef typename trampoline::const_pointer const_impl_pointer;
+ typedef typename trampoline::difference_type difference_type;
+ typedef typename trampoline::ptr_pointer impl_ptr_pointer;
+
+ impl_ptr_pointer& up(){return trampoline::up();}
+ impl_ptr_pointer up()const{return trampoline::up();}
+
+ impl_pointer impl()
+ {
+ return static_cast<impl_pointer>(
+ static_cast<impl_type*>(static_cast<trampoline*>(this)));
+ }
+
+ const_impl_pointer impl()const
+ {
+ return static_cast<const_impl_pointer>(
+ static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
+ }
+
+ static random_access_index_node* from_impl(impl_pointer x)
+ {
+ return
+ static_cast<random_access_index_node*>(
+ static_cast<trampoline*>(
+ raw_ptr<impl_type*>(x)));
+ }
+
+ static const random_access_index_node* from_impl(const_impl_pointer x)
+ {
+ return
+ static_cast<const random_access_index_node*>(
+ static_cast<const trampoline*>(
+ raw_ptr<const impl_type*>(x)));
+ }
+
+ /* interoperability with rnd_node_iterator */
+
+ static void increment(random_access_index_node*& x)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::increment(xi);
+ x=from_impl(xi);
+ }
+
+ static void decrement(random_access_index_node*& x)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::decrement(xi);
+ x=from_impl(xi);
+ }
+
+ static void advance(random_access_index_node*& x,difference_type n)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::advance(xi,n);
+ x=from_impl(xi);
+ }
+
+ static difference_type distance(
+ random_access_index_node* x,random_access_index_node* y)
+ {
+ return trampoline::distance(x->impl(),y->impl());
+ }
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ops.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ops.hpp
index f5e76e4441f..f5e76e4441f 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ops.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ptr_array.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ptr_array.hpp
new file mode 100644
index 00000000000..495bad82dde
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_index_ptr_array.hpp
@@ -0,0 +1,146 @@
+/* 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_DETAIL_RND_INDEX_PTR_ARRAY_HPP
+#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_PTR_ARRAY_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/auto_space.hpp>
+#include <boost/multi_index/detail/rnd_index_node.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* pointer structure for use by random access indices */
+
+template<typename Allocator>
+class random_access_index_ptr_array:private noncopyable
+{
+ typedef random_access_index_node_impl<
+ typename rebind_alloc_for<
+ Allocator,
+ char
+ >::type
+ > node_impl_type;
+
+public:
+ typedef typename node_impl_type::pointer value_type;
+ typedef typename rebind_alloc_for<
+ Allocator,value_type
+ >::type value_allocator;
+ typedef allocator_traits<value_allocator> alloc_traits;
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::size_type size_type;
+
+ random_access_index_ptr_array(
+ const Allocator& al,value_type end_,size_type sz):
+ size_(sz),
+ capacity_(sz),
+ spc(al,capacity_+1)
+ {
+ *end()=end_;
+ end_->up()=end();
+ }
+
+ size_type size()const{return size_;}
+ size_type capacity()const{return capacity_;}
+
+ void room_for_one()
+ {
+ if(size_==capacity_){
+ reserve(capacity_<=10?15:capacity_+capacity_/2);
+ }
+ }
+
+ void reserve(size_type c)
+ {
+ if(c>capacity_)set_capacity(c);
+ }
+
+ void shrink_to_fit()
+ {
+ if(capacity_>size_)set_capacity(size_);
+ }
+
+ pointer begin()const{return ptrs();}
+ pointer end()const{return ptrs()+size_;}
+ pointer at(size_type n)const{return ptrs()+n;}
+
+ void push_back(value_type x)
+ {
+ *(end()+1)=*end();
+ (*(end()+1))->up()=end()+1;
+ *end()=x;
+ (*end())->up()=end();
+ ++size_;
+ }
+
+ void erase(value_type x)
+ {
+ node_impl_type::extract(x->up(),end()+1);
+ --size_;
+ }
+
+ void clear()
+ {
+ *begin()=*end();
+ (*begin())->up()=begin();
+ size_=0;
+ }
+
+ void swap(random_access_index_ptr_array& x)
+ {
+ std::swap(size_,x.size_);
+ std::swap(capacity_,x.capacity_);
+ spc.swap(x.spc);
+ }
+
+private:
+ size_type size_;
+ size_type capacity_;
+ auto_space<value_type,Allocator> spc;
+
+ pointer ptrs()const
+ {
+ return spc.data();
+ }
+
+ void set_capacity(size_type c)
+ {
+ auto_space<value_type,Allocator> spc1(spc.get_allocator(),c+1);
+ node_impl_type::transfer(begin(),end()+1,spc1.data());
+ spc.swap(spc1);
+ capacity_=c;
+ }
+};
+
+template<typename Allocator>
+void swap(
+ random_access_index_ptr_array<Allocator>& x,
+ random_access_index_ptr_array<Allocator>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_node_iterator.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_node_iterator.hpp
new file mode 100644
index 00000000000..49fc4220e36
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnd_node_iterator.hpp
@@ -0,0 +1,140 @@
+/* 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_DETAIL_RND_NODE_ITERATOR_HPP
+#define BOOST_MULTI_INDEX_DETAIL_RND_NODE_ITERATOR_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/operators.hpp>
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/split_member.hpp>
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* Iterator class for node-based indices with random access iterators. */
+
+template<typename Node>
+class rnd_node_iterator:
+ public random_access_iterator_helper<
+ rnd_node_iterator<Node>,
+ typename Node::value_type,
+ typename Node::difference_type,
+ const typename Node::value_type*,
+ const typename Node::value_type&>
+{
+public:
+ /* coverity[uninit_ctor]: suppress warning */
+ rnd_node_iterator(){}
+ explicit rnd_node_iterator(Node* node_):node(node_){}
+
+ const typename Node::value_type& operator*()const
+ {
+ return node->value();
+ }
+
+ rnd_node_iterator& operator++()
+ {
+ Node::increment(node);
+ return *this;
+ }
+
+ rnd_node_iterator& operator--()
+ {
+ Node::decrement(node);
+ return *this;
+ }
+
+ rnd_node_iterator& operator+=(typename Node::difference_type n)
+ {
+ Node::advance(node,n);
+ return *this;
+ }
+
+ rnd_node_iterator& operator-=(typename Node::difference_type n)
+ {
+ Node::advance(node,-n);
+ return *this;
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* Serialization. As for why the following is public,
+ * see explanation in safe_mode_iterator notes in safe_mode.hpp.
+ */
+
+ BOOST_SERIALIZATION_SPLIT_MEMBER()
+
+ typedef typename Node::base_type node_base_type;
+
+ template<class Archive>
+ void save(Archive& ar,const unsigned int)const
+ {
+ node_base_type* bnode=node;
+ ar<<serialization::make_nvp("pointer",bnode);
+ }
+
+ template<class Archive>
+ void load(Archive& ar,const unsigned int)
+ {
+ node_base_type* bnode;
+ ar>>serialization::make_nvp("pointer",bnode);
+ node=static_cast<Node*>(bnode);
+ }
+#endif
+
+ /* get_node is not to be used by the user */
+
+ typedef Node node_type;
+
+ Node* get_node()const{return node;}
+
+private:
+ Node* node;
+};
+
+template<typename Node>
+bool operator==(
+ const rnd_node_iterator<Node>& x,
+ const rnd_node_iterator<Node>& y)
+{
+ return x.get_node()==y.get_node();
+}
+
+template<typename Node>
+bool operator<(
+ const rnd_node_iterator<Node>& x,
+ const rnd_node_iterator<Node>& y)
+{
+ return Node::distance(x.get_node(),y.get_node())>0;
+}
+
+template<typename Node>
+typename Node::difference_type operator-(
+ const rnd_node_iterator<Node>& x,
+ const rnd_node_iterator<Node>& y)
+{
+ return Node::distance(y.get_node(),x.get_node());
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/rnk_index_ops.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnk_index_ops.hpp
new file mode 100644
index 00000000000..2e545ba74cb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/rnk_index_ops.hpp
@@ -0,0 +1,325 @@
+/* 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_DETAIL_RNK_INDEX_OPS_HPP
+#define BOOST_MULTI_INDEX_DETAIL_RNK_INDEX_OPS_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/core/pointer_traits.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/multi_index/detail/promotes_arg.hpp>
+#include <utility>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* Common code for ranked_index memfuns having templatized and
+ * non-templatized versions.
+ */
+
+template<typename Pointer>
+struct ranked_node_size_type
+{
+ typedef typename boost::pointer_traits<Pointer>::
+ element_type::size_type type;
+};
+
+template<typename Pointer>
+inline typename ranked_node_size_type<Pointer>::type
+ranked_node_size(Pointer x)
+{
+ return x!=Pointer(0)?x->size:0;
+}
+
+template<typename Pointer>
+inline Pointer ranked_index_nth(
+ BOOST_DEDUCED_TYPENAME ranked_node_size_type<Pointer>::type n,Pointer end_)
+{
+ typedef typename ranked_node_size_type<Pointer>::type size_type;
+
+ Pointer top=end_->parent();
+ if(top==Pointer(0)||n>=top->size)return end_;
+
+ for(;;){
+ size_type s=ranked_node_size(top->left());
+ if(n==s)return top;
+ if(n<s)top=top->left();
+ else{
+ top=top->right();
+ n-=s+1;
+ }
+ }
+}
+
+template<typename Pointer>
+inline typename ranked_node_size_type<Pointer>::type
+ranked_index_rank(Pointer x,Pointer end_)
+{
+ typedef typename ranked_node_size_type<Pointer>::type size_type;
+
+ Pointer top=end_->parent();
+ if(top==Pointer(0))return 0;
+ if(x==end_)return top->size;
+
+ size_type s=ranked_node_size(x->left());
+ while(x!=top){
+ Pointer z=x->parent();
+ if(x==z->right()){
+ s+=ranked_node_size(z->left())+1;
+ }
+ x=z;
+ }
+ return s;
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_find_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp)
+{
+ typedef typename KeyFromValue::result_type key_type;
+
+ return ranked_index_find_rank(
+ top,y,key,x,comp,
+ mpl::and_<
+ promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
+ promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_find_rank(
+ Node* top,Node* y,const KeyFromValue& key,
+ const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
+ const CompatibleCompare& comp,mpl::true_)
+{
+ return ranked_index_find_rank(top,y,key,x,comp,mpl::false_());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_find_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp,mpl::false_)
+{
+ typedef typename Node::size_type size_type;
+
+ if(!top)return 0;
+
+ size_type s=top->impl()->size,
+ s0=s;
+ Node* y0=y;
+
+ do{
+ if(!comp(key(top->value()),x)){
+ y=top;
+ s-=ranked_node_size(y->right())+1;
+ top=Node::from_impl(top->left());
+ }
+ else top=Node::from_impl(top->right());
+ }while(top);
+
+ return (y==y0||comp(x,key(y->value())))?s0:s;
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_lower_bound_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp)
+{
+ typedef typename KeyFromValue::result_type key_type;
+
+ return ranked_index_lower_bound_rank(
+ top,y,key,x,comp,
+ promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey>());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_lower_bound_rank(
+ Node* top,Node* y,const KeyFromValue& key,
+ const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
+ const CompatibleCompare& comp,mpl::true_)
+{
+ return ranked_index_lower_bound_rank(top,y,key,x,comp,mpl::false_());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_lower_bound_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp,mpl::false_)
+{
+ typedef typename Node::size_type size_type;
+
+ if(!top)return 0;
+
+ size_type s=top->impl()->size;
+
+ do{
+ if(!comp(key(top->value()),x)){
+ y=top;
+ s-=ranked_node_size(y->right())+1;
+ top=Node::from_impl(top->left());
+ }
+ else top=Node::from_impl(top->right());
+ }while(top);
+
+ return s;
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_upper_bound_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp)
+{
+ typedef typename KeyFromValue::result_type key_type;
+
+ return ranked_index_upper_bound_rank(
+ top,y,key,x,comp,
+ promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_upper_bound_rank(
+ Node* top,Node* y,const KeyFromValue& key,
+ const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
+ const CompatibleCompare& comp,mpl::true_)
+{
+ return ranked_index_upper_bound_rank(top,y,key,x,comp,mpl::false_());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline typename Node::size_type ranked_index_upper_bound_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp,mpl::false_)
+{
+ typedef typename Node::size_type size_type;
+
+ if(!top)return 0;
+
+ size_type s=top->impl()->size;
+
+ do{
+ if(comp(x,key(top->value()))){
+ y=top;
+ s-=ranked_node_size(y->right())+1;
+ top=Node::from_impl(top->left());
+ }
+ else top=Node::from_impl(top->right());
+ }while(top);
+
+ return s;
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline std::pair<typename Node::size_type,typename Node::size_type>
+ranked_index_equal_range_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp)
+{
+ typedef typename KeyFromValue::result_type key_type;
+
+ return ranked_index_equal_range_rank(
+ top,y,key,x,comp,
+ mpl::and_<
+ promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
+ promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleCompare
+>
+inline std::pair<typename Node::size_type,typename Node::size_type>
+ranked_index_equal_range_rank(
+ Node* top,Node* y,const KeyFromValue& key,
+ const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
+ const CompatibleCompare& comp,mpl::true_)
+{
+ return ranked_index_equal_range_rank(top,y,key,x,comp,mpl::false_());
+}
+
+template<
+ typename Node,typename KeyFromValue,
+ typename CompatibleKey,typename CompatibleCompare
+>
+inline std::pair<typename Node::size_type,typename Node::size_type>
+ranked_index_equal_range_rank(
+ Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
+ const CompatibleCompare& comp,mpl::false_)
+{
+ typedef typename Node::size_type size_type;
+
+ if(!top)return std::pair<size_type,size_type>(0,0);
+
+ size_type s=top->impl()->size;
+
+ do{
+ if(comp(key(top->value()),x)){
+ top=Node::from_impl(top->right());
+ }
+ else if(comp(x,key(top->value()))){
+ y=top;
+ s-=ranked_node_size(y->right())+1;
+ top=Node::from_impl(top->left());
+ }
+ else{
+ return std::pair<size_type,size_type>(
+ s-top->impl()->size+
+ ranked_index_lower_bound_rank(
+ Node::from_impl(top->left()),top,key,x,comp,mpl::false_()),
+ s-ranked_node_size(top->right())+
+ ranked_index_upper_bound_rank(
+ Node::from_impl(top->right()),y,key,x,comp,mpl::false_()));
+ }
+ }while(top);
+
+ return std::pair<size_type,size_type>(s,s);
+}
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/safe_mode.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/safe_mode.hpp
index 905270e9fb3..905270e9fb3 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/safe_mode.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/safe_mode.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/scope_guard.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/scope_guard.hpp
index 116f8f50415..116f8f50415 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/scope_guard.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/scope_guard.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_node.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_node.hpp
new file mode 100644
index 00000000000..626d8d6dcd2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_node.hpp
@@ -0,0 +1,217 @@
+/* Copyright 2003-2019 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_DETAIL_SEQ_INDEX_NODE_HPP
+#define BOOST_MULTI_INDEX_DETAIL_SEQ_INDEX_NODE_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/raw_ptr.hpp>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* doubly-linked node for use by sequenced_index */
+
+template<typename Allocator>
+struct sequenced_index_node_impl
+{
+ typedef typename rebind_alloc_for<
+ Allocator,sequenced_index_node_impl
+ >::type node_allocator;
+ typedef allocator_traits<node_allocator> alloc_traits;
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::const_pointer const_pointer;
+ typedef typename alloc_traits::difference_type difference_type;
+
+ pointer& prior(){return prior_;}
+ pointer prior()const{return prior_;}
+ pointer& next(){return next_;}
+ pointer next()const{return next_;}
+
+ /* interoperability with bidir_node_iterator */
+
+ static void increment(pointer& x){x=x->next();}
+ static void decrement(pointer& x){x=x->prior();}
+
+ /* algorithmic stuff */
+
+ static void link(pointer x,pointer header)
+ {
+ x->prior()=header->prior();
+ x->next()=header;
+ x->prior()->next()=x->next()->prior()=x;
+ }
+
+ static void unlink(pointer x)
+ {
+ x->prior()->next()=x->next();
+ x->next()->prior()=x->prior();
+ }
+
+ static void relink(pointer position,pointer x)
+ {
+ unlink(x);
+ x->prior()=position->prior();
+ x->next()=position;
+ x->prior()->next()=x->next()->prior()=x;
+ }
+
+ static void relink(pointer position,pointer x,pointer y)
+ {
+ /* position is assumed not to be in [x,y) */
+
+ if(x!=y){
+ pointer z=y->prior();
+ x->prior()->next()=y;
+ y->prior()=x->prior();
+ x->prior()=position->prior();
+ z->next()=position;
+ x->prior()->next()=x;
+ z->next()->prior()=z;
+ }
+ }
+
+ static void reverse(pointer header)
+ {
+ pointer x=header;
+ do{
+ pointer y=x->next();
+ std::swap(x->prior(),x->next());
+ x=y;
+ }while(x!=header);
+ }
+
+ static void swap(pointer x,pointer y)
+ {
+ /* This swap function does not exchange the header nodes,
+ * but rather their pointers. This is *not* used for implementing
+ * sequenced_index::swap.
+ */
+
+ if(x->next()!=x){
+ if(y->next()!=y){
+ std::swap(x->next(),y->next());
+ std::swap(x->prior(),y->prior());
+ x->next()->prior()=x->prior()->next()=x;
+ y->next()->prior()=y->prior()->next()=y;
+ }
+ else{
+ y->next()=x->next();
+ y->prior()=x->prior();
+ x->next()=x->prior()=x;
+ y->next()->prior()=y->prior()->next()=y;
+ }
+ }
+ else if(y->next()!=y){
+ x->next()=y->next();
+ x->prior()=y->prior();
+ y->next()=y->prior()=y;
+ x->next()->prior()=x->prior()->next()=x;
+ }
+ }
+
+private:
+ pointer prior_;
+ pointer next_;
+};
+
+template<typename Super>
+struct sequenced_index_node_trampoline:
+ sequenced_index_node_impl<
+ typename rebind_alloc_for<
+ typename Super::allocator_type,
+ char
+ >::type
+ >
+{
+ typedef sequenced_index_node_impl<
+ typename rebind_alloc_for<
+ typename Super::allocator_type,
+ char
+ >::type
+ > impl_type;
+};
+
+template<typename Super>
+struct sequenced_index_node:Super,sequenced_index_node_trampoline<Super>
+{
+private:
+ typedef sequenced_index_node_trampoline<Super> trampoline;
+
+public:
+ typedef typename trampoline::impl_type impl_type;
+ typedef typename trampoline::pointer impl_pointer;
+ typedef typename trampoline::const_pointer const_impl_pointer;
+ typedef typename trampoline::difference_type difference_type;
+
+ impl_pointer& prior(){return trampoline::prior();}
+ impl_pointer prior()const{return trampoline::prior();}
+ impl_pointer& next(){return trampoline::next();}
+ impl_pointer next()const{return trampoline::next();}
+
+ impl_pointer impl()
+ {
+ return static_cast<impl_pointer>(
+ static_cast<impl_type*>(static_cast<trampoline*>(this)));
+ }
+
+ const_impl_pointer impl()const
+ {
+ return static_cast<const_impl_pointer>(
+ static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
+ }
+
+ static sequenced_index_node* from_impl(impl_pointer x)
+ {
+ return
+ static_cast<sequenced_index_node*>(
+ static_cast<trampoline*>(
+ raw_ptr<impl_type*>(x)));
+ }
+
+ static const sequenced_index_node* from_impl(const_impl_pointer x)
+ {
+ return
+ static_cast<const sequenced_index_node*>(
+ static_cast<const trampoline*>(
+ raw_ptr<const impl_type*>(x)));
+ }
+
+ /* interoperability with bidir_node_iterator */
+
+ static void increment(sequenced_index_node*& x)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::increment(xi);
+ x=from_impl(xi);
+ }
+
+ static void decrement(sequenced_index_node*& x)
+ {
+ impl_pointer xi=x->impl();
+ trampoline::decrement(xi);
+ x=from_impl(xi);
+ }
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_ops.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_ops.hpp
index 142bdd9dd9a..142bdd9dd9a 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/seq_index_ops.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/serialization_version.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/serialization_version.hpp
index ccd8bb4f791..ccd8bb4f791 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/serialization_version.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/serialization_version.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/uintptr_type.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/uintptr_type.hpp
index 9c92d01d4de..9c92d01d4de 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/uintptr_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/uintptr_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/unbounded.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/unbounded.hpp
index dc09be1770d..dc09be1770d 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/unbounded.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/unbounded.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/value_compare.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/value_compare.hpp
index ac42e8779aa..ac42e8779aa 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/value_compare.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/value_compare.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/detail/vartempl_support.hpp b/src/third_party/boost-1.70.0/boost/multi_index/detail/vartempl_support.hpp
index 06ff430f4be..06ff430f4be 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/detail/vartempl_support.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/detail/vartempl_support.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/global_fun.hpp b/src/third_party/boost-1.70.0/boost/multi_index/global_fun.hpp
index 2c13769100c..2c13769100c 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/global_fun.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/global_fun.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/hashed_index.hpp b/src/third_party/boost-1.70.0/boost/multi_index/hashed_index.hpp
new file mode 100644
index 00000000000..536303f0ea8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/hashed_index.hpp
@@ -0,0 +1,1743 @@
+/* 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_HASHED_INDEX_HPP
+#define BOOST_MULTI_INDEX_HASHED_INDEX_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/call_traits.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/foreach_fwd.hpp>
+#include <boost/limits.hpp>
+#include <boost/move/core.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/multi_index/detail/access_specifier.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/auto_space.hpp>
+#include <boost/multi_index/detail/bucket_array.hpp>
+#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
+#include <boost/multi_index/detail/hash_index_iterator.hpp>
+#include <boost/multi_index/detail/index_node_base.hpp>
+#include <boost/multi_index/detail/modify_key_adaptor.hpp>
+#include <boost/multi_index/detail/promotes_arg.hpp>
+#include <boost/multi_index/detail/safe_mode.hpp>
+#include <boost/multi_index/detail/scope_guard.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <boost/multi_index/hashed_index_fwd.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <cmath>
+#include <cstddef>
+#include <functional>
+#include <iterator>
+#include <utility>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/serialization/nvp.hpp>
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(x) \
+ detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
+ detail::make_obj_guard(x,&hashed_index::check_invariant_); \
+ BOOST_JOIN(check_invariant_,__LINE__).touch();
+#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT \
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(*this)
+#else
+#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(x)
+#define BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* hashed_index adds a layer of hashed indexing to a given Super */
+
+/* Most of the implementation of unique and non-unique indices is
+ * shared. We tell from one another on instantiation time by using
+ * Category tags defined in hash_index_node.hpp.
+ */
+
+template<
+ typename KeyFromValue,typename Hash,typename Pred,
+ typename SuperMeta,typename TagList,typename Category
+>
+class hashed_index:
+ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ ,public safe_mode::safe_container<
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category> >
+#endif
+
+{
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
+ * lifetime of const references bound to temporaries --precisely what
+ * scopeguards are.
+ */
+
+#pragma parse_mfunc_templ off
+#endif
+
+ typedef typename SuperMeta::type super;
+
+protected:
+ typedef hashed_index_node<
+ typename super::node_type,Category> node_type;
+
+private:
+ typedef typename node_type::node_alg node_alg;
+ typedef typename node_type::impl_type node_impl_type;
+ typedef typename node_impl_type::pointer node_impl_pointer;
+ typedef typename node_impl_type::base_pointer node_impl_base_pointer;
+ typedef bucket_array<
+ typename super::final_allocator_type> bucket_array_type;
+
+public:
+ /* types */
+
+ typedef typename KeyFromValue::result_type key_type;
+ typedef typename node_type::value_type value_type;
+ typedef KeyFromValue key_from_value;
+ typedef Hash hasher;
+ typedef Pred key_equal;
+ typedef typename super::final_allocator_type allocator_type;
+
+private:
+ typedef allocator_traits<allocator_type> alloc_traits;
+
+public:
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::const_pointer const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::difference_type difference_type;
+ typedef tuple<size_type,
+ key_from_value,hasher,key_equal> ctor_args;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_iterator<
+ hashed_index_iterator<
+ node_type,bucket_array_type,
+ hashed_index_global_iterator_tag>,
+ hashed_index> iterator;
+#else
+ typedef hashed_index_iterator<
+ node_type,bucket_array_type,
+ hashed_index_global_iterator_tag> iterator;
+#endif
+
+ typedef iterator const_iterator;
+
+ typedef hashed_index_iterator<
+ node_type,bucket_array_type,
+ hashed_index_local_iterator_tag> local_iterator;
+ typedef local_iterator const_local_iterator;
+
+ typedef TagList tag_list;
+
+protected:
+ typedef typename super::final_node_type final_node_type;
+ typedef tuples::cons<
+ ctor_args,
+ typename super::ctor_args_list> ctor_args_list;
+ typedef typename mpl::push_front<
+ typename super::index_type_list,
+ hashed_index>::type index_type_list;
+ typedef typename mpl::push_front<
+ typename super::iterator_type_list,
+ iterator>::type iterator_type_list;
+ typedef typename mpl::push_front<
+ typename super::const_iterator_type_list,
+ const_iterator>::type const_iterator_type_list;
+ typedef typename super::copy_map_type copy_map_type;
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ typedef typename super::index_saver_type index_saver_type;
+ typedef typename super::index_loader_type index_loader_type;
+#endif
+
+private:
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_container<
+ hashed_index> safe_super;
+#endif
+
+ typedef typename call_traits<value_type>::param_type value_param_type;
+ typedef typename call_traits<
+ key_type>::param_type key_param_type;
+
+ /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
+ * expansion.
+ */
+
+ typedef std::pair<iterator,bool> emplace_return_type;
+
+public:
+
+ /* construct/destroy/copy
+ * Default and copy ctors are in the protected section as indices are
+ * not supposed to be created on their own. No range ctor either.
+ */
+
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& operator=(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
+ {
+ this->final()=x.final();
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& operator=(
+ std::initializer_list<value_type> list)
+ {
+ this->final()=list;
+ return *this;
+ }
+#endif
+
+ allocator_type get_allocator()const BOOST_NOEXCEPT
+ {
+ return this->final().get_allocator();
+ }
+
+ /* size and capacity */
+
+ bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
+ size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
+ size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
+
+ /* iterators */
+
+ iterator begin()BOOST_NOEXCEPT
+ {return make_iterator(node_type::from_impl(header()->next()->prior()));}
+ const_iterator begin()const BOOST_NOEXCEPT
+ {return make_iterator(node_type::from_impl(header()->next()->prior()));}
+ iterator end()BOOST_NOEXCEPT{return make_iterator(header());}
+ const_iterator end()const BOOST_NOEXCEPT{return make_iterator(header());}
+ const_iterator cbegin()const BOOST_NOEXCEPT{return begin();}
+ const_iterator cend()const BOOST_NOEXCEPT{return end();}
+
+ iterator iterator_to(const value_type& x)
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ const_iterator iterator_to(const value_type& x)const
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ /* modifiers */
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
+ emplace_return_type,emplace,emplace_impl)
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
+ iterator,emplace_hint,emplace_hint_impl,iterator,position)
+
+ std::pair<iterator,bool> insert(const value_type& x)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_(x);
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ iterator insert(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ return make_iterator(p.first);
+ }
+
+ iterator insert(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_rv_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ return make_iterator(p.first);
+ }
+
+ template<typename InputIterator>
+ void insert(InputIterator first,InputIterator last)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ for(;first!=last;++first)this->final_insert_ref_(*first);
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ void insert(std::initializer_list<value_type> list)
+ {
+ insert(list.begin(),list.end());
+ }
+#endif
+
+ iterator erase(iterator position)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
+ return position;
+ }
+
+ size_type erase(key_param_type k)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+
+ std::size_t buc=buckets.position(hash_(k));
+ for(node_impl_pointer x=buckets.at(buc)->prior();
+ x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
+ if(eq_(k,key(node_type::from_impl(x)->value()))){
+ node_impl_pointer y=end_of_range(x);
+ size_type s=0;
+ do{
+ node_impl_pointer z=node_alg::after(x);
+ this->final_erase_(
+ static_cast<final_node_type*>(node_type::from_impl(x)));
+ x=z;
+ ++s;
+ }while(x!=y);
+ return s;
+ }
+ }
+ return 0;
+ }
+
+ iterator erase(iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ while(first!=last){
+ first=erase(first);
+ }
+ return first;
+ }
+
+ bool replace(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ return this->final_replace_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ bool replace(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ return this->final_replace_rv_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier>
+ bool modify(iterator position,Modifier mod)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify(iterator position,Modifier mod,Rollback back_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,back_,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier>
+ bool modify_key(iterator position,Modifier mod)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ return modify(
+ position,modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key));
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify_key(iterator position,Modifier mod,Rollback back_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ return modify(
+ position,
+ modify_key_adaptor<Modifier,value_type,KeyFromValue>(mod,key),
+ modify_key_adaptor<Rollback,value_type,KeyFromValue>(back_,key));
+ }
+
+ void clear()BOOST_NOEXCEPT
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ this->final_clear_();
+ }
+
+ void swap(hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF(x);
+ this->final_swap_(x.final());
+ }
+
+ /* observers */
+
+ key_from_value key_extractor()const{return key;}
+ hasher hash_function()const{return hash_;}
+ key_equal key_eq()const{return eq_;}
+
+ /* lookup */
+
+ /* Internally, these ops rely on const_iterator being the same
+ * type as iterator.
+ */
+
+ /* Implementation note: When CompatibleKey is consistently promoted to
+ * KeyFromValue::result_type for equality comparison, the promotion is made
+ * once in advance to increase efficiency.
+ */
+
+ template<typename CompatibleKey>
+ iterator find(const CompatibleKey& k)const
+ {
+ return find(k,hash_,eq_);
+ }
+
+ template<
+ typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
+ >
+ iterator find(
+ const CompatibleKey& k,
+ const CompatibleHash& hash,const CompatiblePred& eq)const
+ {
+ return find(
+ k,hash,eq,promotes_1st_arg<CompatiblePred,CompatibleKey,key_type>());
+ }
+
+ template<typename CompatibleKey>
+ size_type count(const CompatibleKey& k)const
+ {
+ return count(k,hash_,eq_);
+ }
+
+ template<
+ typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
+ >
+ size_type count(
+ const CompatibleKey& k,
+ const CompatibleHash& hash,const CompatiblePred& eq)const
+ {
+ return count(
+ k,hash,eq,promotes_1st_arg<CompatiblePred,CompatibleKey,key_type>());
+ }
+
+ template<typename CompatibleKey>
+ std::pair<iterator,iterator> equal_range(const CompatibleKey& k)const
+ {
+ return equal_range(k,hash_,eq_);
+ }
+
+ template<
+ typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
+ >
+ std::pair<iterator,iterator> equal_range(
+ const CompatibleKey& k,
+ const CompatibleHash& hash,const CompatiblePred& eq)const
+ {
+ return equal_range(
+ k,hash,eq,promotes_1st_arg<CompatiblePred,CompatibleKey,key_type>());
+ }
+
+ /* bucket interface */
+
+ size_type bucket_count()const BOOST_NOEXCEPT
+ {
+ return static_cast<size_type>(buckets.size());
+ }
+
+ size_type max_bucket_count()const BOOST_NOEXCEPT{return static_cast<size_type>(-1);}
+
+ size_type bucket_size(size_type n)const
+ {
+ size_type res=0;
+ for(node_impl_pointer x=buckets.at(n)->prior();
+ x!=node_impl_pointer(0);x=node_alg::after_local(x)){
+ ++res;
+ }
+ return res;
+ }
+
+ size_type bucket(key_param_type k)const
+ {
+ return static_cast<size_type>(buckets.position(hash_(k)));
+ }
+
+ local_iterator begin(size_type n)
+ {
+ return const_cast<const hashed_index*>(this)->begin(n);
+ }
+
+ const_local_iterator begin(size_type n)const
+ {
+ node_impl_pointer x=buckets.at(n)->prior();
+ if(x==node_impl_pointer(0))return end(n);
+ return make_local_iterator(node_type::from_impl(x));
+ }
+
+ local_iterator end(size_type n)
+ {
+ return const_cast<const hashed_index*>(this)->end(n);
+ }
+
+ const_local_iterator end(size_type)const
+ {
+ return make_local_iterator(0);
+ }
+
+ const_local_iterator cbegin(size_type n)const{return begin(n);}
+ const_local_iterator cend(size_type n)const{return end(n);}
+
+ local_iterator local_iterator_to(const value_type& x)
+ {
+ return make_local_iterator(
+ node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ const_local_iterator local_iterator_to(const value_type& x)const
+ {
+ return make_local_iterator(
+ node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ /* hash policy */
+
+ float load_factor()const BOOST_NOEXCEPT
+ {return static_cast<float>(size())/bucket_count();}
+ float max_load_factor()const BOOST_NOEXCEPT{return mlf;}
+ void max_load_factor(float z){mlf=z;calculate_max_load();}
+
+ void rehash(size_type n)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ if(size()<=max_load&&n<=bucket_count())return;
+
+ size_type bc =(std::numeric_limits<size_type>::max)();
+ float fbc=1.0f+static_cast<float>(size())/mlf;
+ if(bc>fbc){
+ bc=static_cast<size_type>(fbc);
+ if(bc<n)bc=n;
+ }
+ unchecked_rehash(bc);
+ }
+
+ void reserve(size_type n)
+ {
+ rehash(static_cast<size_type>(std::ceil(static_cast<float>(n)/mlf)));
+ }
+
+BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
+ hashed_index(const ctor_args_list& args_list,const allocator_type& al):
+ super(args_list.get_tail(),al),
+ key(tuples::get<1>(args_list.get_head())),
+ hash_(tuples::get<2>(args_list.get_head())),
+ eq_(tuples::get<3>(args_list.get_head())),
+ buckets(al,header()->impl(),tuples::get<0>(args_list.get_head())),
+ mlf(1.0f)
+ {
+ calculate_max_load();
+ }
+
+ hashed_index(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x):
+ super(x),
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super(),
+#endif
+
+ key(x.key),
+ hash_(x.hash_),
+ eq_(x.eq_),
+ buckets(x.get_allocator(),header()->impl(),x.buckets.size()),
+ mlf(x.mlf),
+ max_load(x.max_load)
+ {
+ /* Copy ctor just takes the internal configuration objects from x. The rest
+ * is done in subsequent call to copy_().
+ */
+ }
+
+ hashed_index(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ do_not_copy_elements_tag):
+ super(x,do_not_copy_elements_tag()),
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super(),
+#endif
+
+ key(x.key),
+ hash_(x.hash_),
+ eq_(x.eq_),
+ buckets(x.get_allocator(),header()->impl(),0),
+ mlf(1.0f)
+ {
+ calculate_max_load();
+ }
+
+ ~hashed_index()
+ {
+ /* the container is guaranteed to be empty by now */
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ iterator make_iterator(node_type* node)
+ {
+ return iterator(node,this);
+ }
+
+ const_iterator make_iterator(node_type* node)const
+ {
+ return const_iterator(node,const_cast<hashed_index*>(this));
+ }
+#else
+ iterator make_iterator(node_type* node)
+ {
+ return iterator(node);
+ }
+
+ const_iterator make_iterator(node_type* node)const
+ {
+ return const_iterator(node);
+ }
+#endif
+
+ local_iterator make_local_iterator(node_type* node)
+ {
+ return local_iterator(node);
+ }
+
+ const_local_iterator make_local_iterator(node_type* node)const
+ {
+ return const_local_iterator(node);
+ }
+
+ void copy_(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ const copy_map_type& map)
+ {
+ copy_(x,map,Category());
+ }
+
+ void copy_(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ const copy_map_type& map,hashed_unique_tag)
+ {
+ if(x.size()!=0){
+ node_impl_pointer end_org=x.header()->impl(),
+ org=end_org,
+ cpy=header()->impl();
+ do{
+ node_impl_pointer prev_org=org->prior(),
+ prev_cpy=
+ static_cast<node_type*>(map.find(static_cast<final_node_type*>(
+ node_type::from_impl(prev_org))))->impl();
+ cpy->prior()=prev_cpy;
+ if(node_alg::is_first_of_bucket(org)){
+ node_impl_base_pointer buc_org=prev_org->next(),
+ buc_cpy=
+ buckets.begin()+(buc_org-x.buckets.begin());
+ prev_cpy->next()=buc_cpy;
+ buc_cpy->prior()=cpy;
+ }
+ else{
+ prev_cpy->next()=node_impl_type::base_pointer_from(cpy);
+ }
+ org=prev_org;
+ cpy=prev_cpy;
+ }while(org!=end_org);
+ }
+
+ super::copy_(x,map);
+ }
+
+ void copy_(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ const copy_map_type& map,hashed_non_unique_tag)
+ {
+ if(x.size()!=0){
+ node_impl_pointer end_org=x.header()->impl(),
+ org=end_org,
+ cpy=header()->impl();
+ do{
+ node_impl_pointer next_org=node_alg::after(org),
+ next_cpy=
+ static_cast<node_type*>(map.find(static_cast<final_node_type*>(
+ node_type::from_impl(next_org))))->impl();
+ if(node_alg::is_first_of_bucket(next_org)){
+ node_impl_base_pointer buc_org=org->next(),
+ buc_cpy=
+ buckets.begin()+(buc_org-x.buckets.begin());
+ cpy->next()=buc_cpy;
+ buc_cpy->prior()=next_cpy;
+ next_cpy->prior()=cpy;
+ }
+ else{
+ if(org->next()==node_impl_type::base_pointer_from(next_org)){
+ cpy->next()=node_impl_type::base_pointer_from(next_cpy);
+ }
+ else{
+ cpy->next()=
+ node_impl_type::base_pointer_from(
+ static_cast<node_type*>(map.find(static_cast<final_node_type*>(
+ node_type::from_impl(
+ node_impl_type::pointer_from(org->next())))))->impl());
+ }
+
+ if(next_org->prior()!=org){
+ next_cpy->prior()=
+ static_cast<node_type*>(map.find(static_cast<final_node_type*>(
+ node_type::from_impl(next_org->prior()))))->impl();
+ }
+ else{
+ next_cpy->prior()=cpy;
+ }
+ }
+ org=next_org;
+ cpy=next_cpy;
+ }while(org!=end_org);
+ }
+
+ super::copy_(x,map);
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,final_node_type*& x,Variant variant)
+ {
+ reserve_for_insert(size()+1);
+
+ std::size_t buc=find_bucket(v);
+ link_info pos(buckets.at(buc));
+ if(!link_point(v,pos)){
+ return static_cast<final_node_type*>(
+ node_type::from_impl(node_impl_type::pointer_from(pos)));
+ }
+
+ final_node_type* res=super::insert_(v,x,variant);
+ if(res==x)link(static_cast<node_type*>(x),pos);
+ return res;
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,node_type* position,final_node_type*& x,Variant variant)
+ {
+ reserve_for_insert(size()+1);
+
+ std::size_t buc=find_bucket(v);
+ link_info pos(buckets.at(buc));
+ if(!link_point(v,pos)){
+ return static_cast<final_node_type*>(
+ node_type::from_impl(node_impl_type::pointer_from(pos)));
+ }
+
+ final_node_type* res=super::insert_(v,position,x,variant);
+ if(res==x)link(static_cast<node_type*>(x),pos);
+ return res;
+ }
+
+ void erase_(node_type* x)
+ {
+ unlink(x);
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ }
+
+ void delete_all_nodes_()
+ {
+ delete_all_nodes_(Category());
+ }
+
+ void delete_all_nodes_(hashed_unique_tag)
+ {
+ for(node_impl_pointer x_end=header()->impl(),x=x_end->prior();x!=x_end;){
+ node_impl_pointer y=x->prior();
+ this->final_delete_node_(
+ static_cast<final_node_type*>(node_type::from_impl(x)));
+ x=y;
+ }
+ }
+
+ void delete_all_nodes_(hashed_non_unique_tag)
+ {
+ for(node_impl_pointer x_end=header()->impl(),x=x_end->prior();x!=x_end;){
+ node_impl_pointer y=x->prior();
+ if(y->next()!=node_impl_type::base_pointer_from(x)&&
+ y->next()->prior()!=x){ /* n-1 of group */
+ /* Make the second node prior() pointer back-linked so that it won't
+ * refer to a deleted node when the time for its own destruction comes.
+ */
+
+ node_impl_pointer first=node_impl_type::pointer_from(y->next());
+ first->next()->prior()=first;
+ }
+ this->final_delete_node_(
+ static_cast<final_node_type*>(node_type::from_impl(x)));
+ x=y;
+ }
+ }
+
+ void clear_()
+ {
+ super::clear_();
+ buckets.clear(header()->impl());
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::detach_dereferenceable_iterators();
+#endif
+ }
+
+ void swap_(
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
+ {
+ std::swap(key,x.key);
+ std::swap(hash_,x.hash_);
+ std::swap(eq_,x.eq_);
+ buckets.swap(x.buckets);
+ std::swap(mlf,x.mlf);
+ std::swap(max_load,x.max_load);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_(x);
+ }
+
+ void swap_elements_(
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
+ {
+ buckets.swap(x.buckets);
+ std::swap(mlf,x.mlf);
+ std::swap(max_load,x.max_load);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_elements_(x);
+ }
+
+ template<typename Variant>
+ bool replace_(value_param_type v,node_type* x,Variant variant)
+ {
+ if(eq_(key(v),key(x->value()))){
+ return super::replace_(v,x,variant);
+ }
+
+ unlink_undo undo;
+ unlink(x,undo);
+
+ BOOST_TRY{
+ std::size_t buc=find_bucket(v);
+ link_info pos(buckets.at(buc));
+ if(link_point(v,pos)&&super::replace_(v,x,variant)){
+ link(x,pos);
+ return true;
+ }
+ undo();
+ return false;
+ }
+ BOOST_CATCH(...){
+ undo();
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool modify_(node_type* x)
+ {
+ std::size_t buc;
+ bool b;
+ BOOST_TRY{
+ buc=find_bucket(x->value());
+ b=in_place(x->impl(),key(x->value()),buc);
+ }
+ BOOST_CATCH(...){
+ erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ if(!b){
+ unlink(x);
+ BOOST_TRY{
+ link_info pos(buckets.at(buc));
+ if(!link_point(x->value(),pos)){
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ return false;
+ }
+ link(x,pos);
+ }
+ BOOST_CATCH(...){
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ BOOST_TRY{
+ if(!super::modify_(x)){
+ unlink(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ return false;
+ }
+ else return true;
+ }
+ BOOST_CATCH(...){
+ unlink(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool modify_rollback_(node_type* x)
+ {
+ std::size_t buc=find_bucket(x->value());
+ if(in_place(x->impl(),key(x->value()),buc)){
+ return super::modify_rollback_(x);
+ }
+
+ unlink_undo undo;
+ unlink(x,undo);
+
+ BOOST_TRY{
+ link_info pos(buckets.at(buc));
+ if(link_point(x->value(),pos)&&super::modify_rollback_(x)){
+ link(x,pos);
+ return true;
+ }
+ undo();
+ return false;
+ }
+ BOOST_CATCH(...){
+ undo();
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool check_rollback_(node_type* x)const
+ {
+ std::size_t buc=find_bucket(x->value());
+ return in_place(x->impl(),key(x->value()),buc)&&super::check_rollback_(x);
+ }
+
+ /* comparison */
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
+ /* defect macro refers to class, not function, templates, but anyway */
+
+ template<typename K,typename H,typename P,typename S,typename T,typename C>
+ friend bool operator==(
+ const hashed_index<K,H,P,S,T,C>&,const hashed_index<K,H,P,S,T,C>& y);
+#endif
+
+ bool equals(const hashed_index& x)const{return equals(x,Category());}
+
+ bool equals(const hashed_index& x,hashed_unique_tag)const
+ {
+ if(size()!=x.size())return false;
+ for(const_iterator it=begin(),it_end=end(),it2_end=x.end();
+ it!=it_end;++it){
+ const_iterator it2=x.find(key(*it));
+ if(it2==it2_end||!(*it==*it2))return false;
+ }
+ return true;
+ }
+
+ bool equals(const hashed_index& x,hashed_non_unique_tag)const
+ {
+ if(size()!=x.size())return false;
+ for(const_iterator it=begin(),it_end=end();it!=it_end;){
+ const_iterator it2,it2_last;
+ boost::tie(it2,it2_last)=x.equal_range(key(*it));
+ if(it2==it2_last)return false;
+
+ const_iterator it_last=make_iterator(
+ node_type::from_impl(end_of_range(it.get_node()->impl())));
+ if(std::distance(it,it_last)!=std::distance(it2,it2_last))return false;
+
+ /* From is_permutation code in
+ * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3068.pdf
+ */
+
+ for(;it!=it_last;++it,++it2){
+ if(!(*it==*it2))break;
+ }
+ if(it!=it_last){
+ for(const_iterator scan=it;scan!=it_last;++scan){
+ if(std::find(it,scan,*scan)!=scan)continue;
+ difference_type matches=std::count(it2,it2_last,*scan);
+ if(matches==0||matches!=std::count(scan,it_last,*scan))return false;
+ }
+ it=it_last;
+ }
+ }
+ return true;
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* serialization */
+
+ template<typename Archive>
+ void save_(
+ Archive& ar,const unsigned int version,const index_saver_type& sm)const
+ {
+ ar<<serialization::make_nvp("position",buckets);
+ super::save_(ar,version,sm);
+ }
+
+ template<typename Archive>
+ void load_(Archive& ar,const unsigned int version,const index_loader_type& lm)
+ {
+ ar>>serialization::make_nvp("position",buckets);
+ super::load_(ar,version,lm);
+ }
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ bool invariant_()const
+ {
+ if(size()==0||begin()==end()){
+ if(size()!=0||begin()!=end())return false;
+ }
+ else{
+ size_type s0=0;
+ for(const_iterator it=begin(),it_end=end();it!=it_end;++it,++s0){}
+ if(s0!=size())return false;
+
+ size_type s1=0;
+ for(size_type buc=0;buc<bucket_count();++buc){
+ size_type ss1=0;
+ for(const_local_iterator it=begin(buc),it_end=end(buc);
+ it!=it_end;++it,++ss1){
+ if(find_bucket(*it)!=buc)return false;
+ }
+ if(ss1!=bucket_size(buc))return false;
+ s1+=ss1;
+ }
+ if(s1!=size())return false;
+ }
+
+ return super::invariant_();
+ }
+
+ /* This forwarding function eases things for the boost::mem_fn construct
+ * in BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT. Actually,
+ * final_check_invariant is already an inherited member function of index.
+ */
+ void check_invariant_()const{this->final_check_invariant_();}
+#endif
+
+private:
+ node_type* header()const{return this->final_header();}
+
+ std::size_t find_bucket(value_param_type v)const
+ {
+ return bucket(key(v));
+ }
+
+ struct link_info_non_unique
+ {
+ link_info_non_unique(node_impl_base_pointer pos):
+ first(pos),last(node_impl_base_pointer(0)){}
+
+ operator const node_impl_base_pointer&()const{return this->first;}
+
+ node_impl_base_pointer first,last;
+ };
+
+ typedef typename mpl::if_<
+ is_same<Category,hashed_unique_tag>,
+ node_impl_base_pointer,
+ link_info_non_unique
+ >::type link_info;
+
+ bool link_point(value_param_type v,link_info& pos)
+ {
+ return link_point(v,pos,Category());
+ }
+
+ bool link_point(
+ value_param_type v,node_impl_base_pointer& pos,hashed_unique_tag)
+ {
+ for(node_impl_pointer x=pos->prior();x!=node_impl_pointer(0);
+ x=node_alg::after_local(x)){
+ if(eq_(key(v),key(node_type::from_impl(x)->value()))){
+ pos=node_impl_type::base_pointer_from(x);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ bool link_point(
+ value_param_type v,link_info_non_unique& pos,hashed_non_unique_tag)
+ {
+ for(node_impl_pointer x=pos.first->prior();x!=node_impl_pointer(0);
+ x=node_alg::next_to_inspect(x)){
+ if(eq_(key(v),key(node_type::from_impl(x)->value()))){
+ pos.first=node_impl_type::base_pointer_from(x);
+ pos.last=node_impl_type::base_pointer_from(last_of_range(x));
+ return true;
+ }
+ }
+ return true;
+ }
+
+ node_impl_pointer last_of_range(node_impl_pointer x)const
+ {
+ return last_of_range(x,Category());
+ }
+
+ node_impl_pointer last_of_range(node_impl_pointer x,hashed_unique_tag)const
+ {
+ return x;
+ }
+
+ node_impl_pointer last_of_range(
+ node_impl_pointer x,hashed_non_unique_tag)const
+ {
+ node_impl_base_pointer y=x->next();
+ node_impl_pointer z=y->prior();
+ if(z==x){ /* range of size 1 or 2 */
+ node_impl_pointer yy=node_impl_type::pointer_from(y);
+ return
+ eq_(
+ key(node_type::from_impl(x)->value()),
+ key(node_type::from_impl(yy)->value()))?yy:x;
+ }
+ else if(z->prior()==x) /* last of bucket */
+ return x;
+ else /* group of size>2 */
+ return z;
+ }
+
+ node_impl_pointer end_of_range(node_impl_pointer x)const
+ {
+ return end_of_range(x,Category());
+ }
+
+ node_impl_pointer end_of_range(node_impl_pointer x,hashed_unique_tag)const
+ {
+ return node_alg::after(last_of_range(x));
+ }
+
+ node_impl_pointer end_of_range(
+ node_impl_pointer x,hashed_non_unique_tag)const
+ {
+ node_impl_base_pointer y=x->next();
+ node_impl_pointer z=y->prior();
+ if(z==x){ /* range of size 1 or 2 */
+ node_impl_pointer yy=node_impl_type::pointer_from(y);
+ if(!eq_(
+ key(node_type::from_impl(x)->value()),
+ key(node_type::from_impl(yy)->value())))yy=x;
+ return yy->next()->prior()==yy?
+ node_impl_type::pointer_from(yy->next()):
+ yy->next()->prior();
+ }
+ else if(z->prior()==x) /* last of bucket */
+ return z;
+ else /* group of size>2 */
+ return z->next()->prior()==z?
+ node_impl_type::pointer_from(z->next()):
+ z->next()->prior();
+ }
+
+ void link(node_type* x,const link_info& pos)
+ {
+ link(x,pos,Category());
+ }
+
+ void link(node_type* x,node_impl_base_pointer pos,hashed_unique_tag)
+ {
+ node_alg::link(x->impl(),pos,header()->impl());
+ }
+
+ void link(node_type* x,const link_info_non_unique& pos,hashed_non_unique_tag)
+ {
+ if(pos.last==node_impl_base_pointer(0)){
+ node_alg::link(x->impl(),pos.first,header()->impl());
+ }
+ else{
+ node_alg::link(
+ x->impl(),
+ node_impl_type::pointer_from(pos.first),
+ node_impl_type::pointer_from(pos.last));
+ }
+ }
+
+ void unlink(node_type* x)
+ {
+ node_alg::unlink(x->impl());
+ }
+
+ typedef typename node_alg::unlink_undo unlink_undo;
+
+ void unlink(node_type* x,unlink_undo& undo)
+ {
+ node_alg::unlink(x->impl(),undo);
+ }
+
+ void calculate_max_load()
+ {
+ float fml=mlf*static_cast<float>(bucket_count());
+ max_load=(std::numeric_limits<size_type>::max)();
+ if(max_load>fml)max_load=static_cast<size_type>(fml);
+ }
+
+ void reserve_for_insert(size_type n)
+ {
+ if(n>max_load){
+ size_type bc =(std::numeric_limits<size_type>::max)();
+ float fbc=1.0f+static_cast<float>(n)/mlf;
+ if(bc>fbc)bc =static_cast<size_type>(fbc);
+ unchecked_rehash(bc);
+ }
+ }
+
+ void unchecked_rehash(size_type n){unchecked_rehash(n,Category());}
+
+ void unchecked_rehash(size_type n,hashed_unique_tag)
+ {
+ node_impl_type cpy_end_node;
+ node_impl_pointer cpy_end=node_impl_pointer(&cpy_end_node),
+ end_=header()->impl();
+ bucket_array_type buckets_cpy(get_allocator(),cpy_end,n);
+
+ if(size()!=0){
+ auto_space<
+ std::size_t,allocator_type> hashes(get_allocator(),size());
+ auto_space<
+ node_impl_pointer,allocator_type> node_ptrs(get_allocator(),size());
+ std::size_t i=0,size_=size();
+ bool within_bucket=false;
+ BOOST_TRY{
+ for(;i!=size_;++i){
+ node_impl_pointer x=end_->prior();
+
+ /* only this can possibly throw */
+ std::size_t h=hash_(key(node_type::from_impl(x)->value()));
+
+ hashes.data()[i]=h;
+ node_ptrs.data()[i]=x;
+ within_bucket=!node_alg::unlink_last(end_);
+ node_alg::link(x,buckets_cpy.at(buckets_cpy.position(h)),cpy_end);
+ }
+ }
+ BOOST_CATCH(...){
+ if(i!=0){
+ std::size_t prev_buc=buckets.position(hashes.data()[i-1]);
+ if(!within_bucket)prev_buc=~prev_buc;
+
+ for(std::size_t j=i;j--;){
+ std::size_t buc=buckets.position(hashes.data()[j]);
+ node_impl_pointer x=node_ptrs.data()[j];
+ if(buc==prev_buc)node_alg::append(x,end_);
+ else node_alg::link(x,buckets.at(buc),end_);
+ prev_buc=buc;
+ }
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ end_->prior()=cpy_end->prior()!=cpy_end?cpy_end->prior():end_;
+ end_->next()=cpy_end->next();
+ end_->prior()->next()->prior()=end_->next()->prior()->prior()=end_;
+ buckets.swap(buckets_cpy);
+ calculate_max_load();
+ }
+
+ void unchecked_rehash(size_type n,hashed_non_unique_tag)
+ {
+ node_impl_type cpy_end_node;
+ node_impl_pointer cpy_end=node_impl_pointer(&cpy_end_node),
+ end_=header()->impl();
+ bucket_array_type buckets_cpy(get_allocator(),cpy_end,n);
+
+ if(size()!=0){
+ auto_space<
+ std::size_t,allocator_type> hashes(get_allocator(),size());
+ auto_space<
+ node_impl_pointer,allocator_type> node_ptrs(get_allocator(),size());
+ std::size_t i=0;
+ bool within_bucket=false;
+ BOOST_TRY{
+ for(;;++i){
+ node_impl_pointer x=end_->prior();
+ if(x==end_)break;
+
+ /* only this can possibly throw */
+ std::size_t h=hash_(key(node_type::from_impl(x)->value()));
+
+ hashes.data()[i]=h;
+ node_ptrs.data()[i]=x;
+ std::pair<node_impl_pointer,bool> p=
+ node_alg::unlink_last_group(end_);
+ node_alg::link_range(
+ p.first,x,buckets_cpy.at(buckets_cpy.position(h)),cpy_end);
+ within_bucket=!(p.second);
+ }
+ }
+ BOOST_CATCH(...){
+ if(i!=0){
+ std::size_t prev_buc=buckets.position(hashes.data()[i-1]);
+ if(!within_bucket)prev_buc=~prev_buc;
+
+ for(std::size_t j=i;j--;){
+ std::size_t buc=buckets.position(hashes.data()[j]);
+ node_impl_pointer x=node_ptrs.data()[j],
+ y=
+ x->prior()->next()!=node_impl_type::base_pointer_from(x)&&
+ x->prior()->next()->prior()!=x?
+ node_impl_type::pointer_from(x->prior()->next()):x;
+ node_alg::unlink_range(y,x);
+ if(buc==prev_buc)node_alg::append_range(y,x,end_);
+ else node_alg::link_range(y,x,buckets.at(buc),end_);
+ prev_buc=buc;
+ }
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ end_->prior()=cpy_end->prior()!=cpy_end?cpy_end->prior():end_;
+ end_->next()=cpy_end->next();
+ end_->prior()->next()->prior()=end_->next()->prior()->prior()=end_;
+ buckets.swap(buckets_cpy);
+ calculate_max_load();
+ }
+
+ bool in_place(node_impl_pointer x,key_param_type k,std::size_t buc)const
+ {
+ return in_place(x,k,buc,Category());
+ }
+
+ bool in_place(
+ node_impl_pointer x,key_param_type k,std::size_t buc,
+ hashed_unique_tag)const
+ {
+ bool found=false;
+ for(node_impl_pointer y=buckets.at(buc)->prior();
+ y!=node_impl_pointer(0);y=node_alg::after_local(y)){
+ if(y==x)found=true;
+ else if(eq_(k,key(node_type::from_impl(y)->value())))return false;
+ }
+ return found;
+ }
+
+ bool in_place(
+ node_impl_pointer x,key_param_type k,std::size_t buc,
+ hashed_non_unique_tag)const
+ {
+ bool found=false;
+ int range_size=0;
+ for(node_impl_pointer y=buckets.at(buc)->prior();y!=node_impl_pointer(0);){
+ if(node_alg::is_first_of_group(y)){ /* group of 3 or more */
+ if(y==x){
+ /* in place <-> equal to some other member of the group */
+ return eq_(
+ k,
+ key(node_type::from_impl(
+ node_impl_type::pointer_from(y->next()))->value()));
+ }
+ else{
+ node_impl_pointer z=
+ node_alg::after_local(y->next()->prior()); /* end of range */
+ if(eq_(k,key(node_type::from_impl(y)->value()))){
+ if(found)return false; /* x lies outside */
+ do{
+ if(y==x)return true;
+ y=node_alg::after_local(y);
+ }while(y!=z);
+ return false; /* x not found */
+ }
+ else{
+ if(range_size==1&&!found)return false;
+ if(range_size==2)return found;
+ range_size=0;
+ y=z; /* skip range (and potentially x, too, which is fine) */
+ }
+ }
+ }
+ else{ /* group of 1 or 2 */
+ if(y==x){
+ if(range_size==1)return true;
+ range_size=1;
+ found=true;
+ }
+ else if(eq_(k,key(node_type::from_impl(y)->value()))){
+ if(range_size==0&&found)return false;
+ if(range_size==1&&!found)return false;
+ if(range_size==2)return false;
+ ++range_size;
+ }
+ else{
+ if(range_size==1&&!found)return false;
+ if(range_size==2)return found;
+ range_size=0;
+ }
+ y=node_alg::after_local(y);
+ }
+ }
+ return found;
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ void detach_iterators(node_type* x)
+ {
+ iterator it=make_iterator(x);
+ safe_mode::detach_equivalent_iterators(it);
+ }
+#endif
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_impl(BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool>p=
+ this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ iterator emplace_hint_impl(
+ iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool>p=
+ this->final_emplace_hint_(
+ static_cast<final_node_type*>(position.get_node()),
+ BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ return make_iterator(p.first);
+ }
+
+ template<
+ typename CompatibleHash,typename CompatiblePred
+ >
+ iterator find(
+ const key_type& k,
+ const CompatibleHash& hash,const CompatiblePred& eq,mpl::true_)const
+ {
+ return find(k,hash,eq,mpl::false_());
+ }
+
+ template<
+ typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
+ >
+ iterator find(
+ const CompatibleKey& k,
+ const CompatibleHash& hash,const CompatiblePred& eq,mpl::false_)const
+ {
+ std::size_t buc=buckets.position(hash(k));
+ for(node_impl_pointer x=buckets.at(buc)->prior();
+ x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
+ if(eq(k,key(node_type::from_impl(x)->value()))){
+ return make_iterator(node_type::from_impl(x));
+ }
+ }
+ return end();
+ }
+
+ template<
+ typename CompatibleHash,typename CompatiblePred
+ >
+ size_type count(
+ const key_type& k,
+ const CompatibleHash& hash,const CompatiblePred& eq,mpl::true_)const
+ {
+ return count(k,hash,eq,mpl::false_());
+ }
+
+ template<
+ typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
+ >
+ size_type count(
+ const CompatibleKey& k,
+ const CompatibleHash& hash,const CompatiblePred& eq,mpl::false_)const
+ {
+ std::size_t buc=buckets.position(hash(k));
+ for(node_impl_pointer x=buckets.at(buc)->prior();
+ x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
+ if(eq(k,key(node_type::from_impl(x)->value()))){
+ size_type res=0;
+ node_impl_pointer y=end_of_range(x);
+ do{
+ ++res;
+ x=node_alg::after(x);
+ }while(x!=y);
+ return res;
+ }
+ }
+ return 0;
+ }
+
+ template<
+ typename CompatibleHash,typename CompatiblePred
+ >
+ std::pair<iterator,iterator> equal_range(
+ const key_type& k,
+ const CompatibleHash& hash,const CompatiblePred& eq,mpl::true_)const
+ {
+ return equal_range(k,hash,eq,mpl::false_());
+ }
+
+ template<
+ typename CompatibleKey,typename CompatibleHash,typename CompatiblePred
+ >
+ std::pair<iterator,iterator> equal_range(
+ const CompatibleKey& k,
+ const CompatibleHash& hash,const CompatiblePred& eq,mpl::false_)const
+ {
+ std::size_t buc=buckets.position(hash(k));
+ for(node_impl_pointer x=buckets.at(buc)->prior();
+ x!=node_impl_pointer(0);x=node_alg::next_to_inspect(x)){
+ if(eq(k,key(node_type::from_impl(x)->value()))){
+ return std::pair<iterator,iterator>(
+ make_iterator(node_type::from_impl(x)),
+ make_iterator(node_type::from_impl(end_of_range(x))));
+ }
+ }
+ return std::pair<iterator,iterator>(end(),end());
+ }
+
+ key_from_value key;
+ hasher hash_;
+ key_equal eq_;
+ bucket_array_type buckets;
+ float mlf;
+ size_type max_load;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+#pragma parse_mfunc_templ reset
+#endif
+};
+
+/* comparison */
+
+template<
+ typename KeyFromValue,typename Hash,typename Pred,
+ typename SuperMeta,typename TagList,typename Category
+>
+bool operator==(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& y)
+{
+ return x.equals(y);
+}
+
+template<
+ typename KeyFromValue,typename Hash,typename Pred,
+ typename SuperMeta,typename TagList,typename Category
+>
+bool operator!=(
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ const hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& y)
+{
+ return !(x==y);
+}
+
+/* specialized algorithms */
+
+template<
+ typename KeyFromValue,typename Hash,typename Pred,
+ typename SuperMeta,typename TagList,typename Category
+>
+void swap(
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x,
+ hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+/* hashed index specifiers */
+
+template<typename Arg1,typename Arg2,typename Arg3,typename Arg4>
+struct hashed_unique
+{
+ typedef typename detail::hashed_index_args<
+ Arg1,Arg2,Arg3,Arg4> index_args;
+ typedef typename index_args::tag_list_type::type tag_list_type;
+ typedef typename index_args::key_from_value_type key_from_value_type;
+ typedef typename index_args::hash_type hash_type;
+ typedef typename index_args::pred_type pred_type;
+
+ template<typename Super>
+ struct node_class
+ {
+ typedef detail::hashed_index_node<Super,detail::hashed_unique_tag> type;
+ };
+
+ template<typename SuperMeta>
+ struct index_class
+ {
+ typedef detail::hashed_index<
+ key_from_value_type,hash_type,pred_type,
+ SuperMeta,tag_list_type,detail::hashed_unique_tag> type;
+ };
+};
+
+template<typename Arg1,typename Arg2,typename Arg3,typename Arg4>
+struct hashed_non_unique
+{
+ typedef typename detail::hashed_index_args<
+ Arg1,Arg2,Arg3,Arg4> index_args;
+ typedef typename index_args::tag_list_type::type tag_list_type;
+ typedef typename index_args::key_from_value_type key_from_value_type;
+ typedef typename index_args::hash_type hash_type;
+ typedef typename index_args::pred_type pred_type;
+
+ template<typename Super>
+ struct node_class
+ {
+ typedef detail::hashed_index_node<
+ Super,detail::hashed_non_unique_tag> type;
+ };
+
+ template<typename SuperMeta>
+ struct index_class
+ {
+ typedef detail::hashed_index<
+ key_from_value_type,hash_type,pred_type,
+ SuperMeta,tag_list_type,detail::hashed_non_unique_tag> type;
+ };
+};
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+/* Boost.Foreach compatibility */
+
+template<
+ typename KeyFromValue,typename Hash,typename Pred,
+ typename SuperMeta,typename TagList,typename Category
+>
+inline boost::mpl::true_* boost_foreach_is_noncopyable(
+ boost::multi_index::detail::hashed_index<
+ KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>*&,
+ boost_foreach_argument_dependent_lookup_hack)
+{
+ return 0;
+}
+
+#undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT
+#undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT_OF
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/hashed_index_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/hashed_index_fwd.hpp
index d77e36c321b..d77e36c321b 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/hashed_index_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/hashed_index_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/identity.hpp b/src/third_party/boost-1.70.0/boost/multi_index/identity.hpp
index 6c832ce1562..6c832ce1562 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/identity.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/identity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/identity_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/identity_fwd.hpp
index af6bd55ef5f..af6bd55ef5f 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/identity_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/identity_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/indexed_by.hpp b/src/third_party/boost-1.70.0/boost/multi_index/indexed_by.hpp
index d2217e39166..d2217e39166 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/indexed_by.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multi_index/key.hpp
index 48a418ac537..48a418ac537 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/key.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/key.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/key_extractors.hpp b/src/third_party/boost-1.70.0/boost/multi_index/key_extractors.hpp
index 60179ba2339..60179ba2339 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/key_extractors.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/key_extractors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/mem_fun.hpp b/src/third_party/boost-1.70.0/boost/multi_index/mem_fun.hpp
index 111c386c5f5..111c386c5f5 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/mem_fun.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/mem_fun.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/member.hpp b/src/third_party/boost-1.70.0/boost/multi_index/member.hpp
index a8e645074a2..a8e645074a2 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/member.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/member.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/ordered_index.hpp b/src/third_party/boost-1.70.0/boost/multi_index/ordered_index.hpp
index 5bcd69de8c9..5bcd69de8c9 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/ordered_index.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/ordered_index.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/ordered_index_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/ordered_index_fwd.hpp
index fe44aaf860d..fe44aaf860d 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/ordered_index_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/ordered_index_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/random_access_index.hpp b/src/third_party/boost-1.70.0/boost/multi_index/random_access_index.hpp
new file mode 100644
index 00000000000..8f5e90b9284
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/random_access_index.hpp
@@ -0,0 +1,1177 @@
+/* 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_RANDOM_ACCESS_INDEX_HPP
+#define BOOST_MULTI_INDEX_RANDOM_ACCESS_INDEX_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/bind.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/foreach_fwd.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/multi_index/detail/access_specifier.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
+#include <boost/multi_index/detail/index_node_base.hpp>
+#include <boost/multi_index/detail/rnd_node_iterator.hpp>
+#include <boost/multi_index/detail/rnd_index_node.hpp>
+#include <boost/multi_index/detail/rnd_index_ops.hpp>
+#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
+#include <boost/multi_index/detail/safe_mode.hpp>
+#include <boost/multi_index/detail/scope_guard.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <boost/multi_index/random_access_index_fwd.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <functional>
+#include <stdexcept>
+#include <utility>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include<initializer_list>
+#endif
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/multi_index/detail/rnd_index_loader.hpp>
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x) \
+ detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
+ detail::make_obj_guard(x,&random_access_index::check_invariant_); \
+ BOOST_JOIN(check_invariant_,__LINE__).touch();
+#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT \
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(*this)
+#else
+#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x)
+#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* random_access_index adds a layer of random access indexing
+ * to a given Super
+ */
+
+template<typename SuperMeta,typename TagList>
+class random_access_index:
+ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ ,public safe_mode::safe_container<
+ random_access_index<SuperMeta,TagList> >
+#endif
+
+{
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
+ * lifetime of const references bound to temporaries --precisely what
+ * scopeguards are.
+ */
+
+#pragma parse_mfunc_templ off
+#endif
+
+ typedef typename SuperMeta::type super;
+
+protected:
+ typedef random_access_index_node<
+ typename super::node_type> node_type;
+
+private:
+ typedef typename node_type::impl_type node_impl_type;
+ typedef random_access_index_ptr_array<
+ typename super::final_allocator_type> ptr_array;
+ typedef typename ptr_array::pointer node_impl_ptr_pointer;
+
+public:
+ /* types */
+
+ typedef typename node_type::value_type value_type;
+ typedef tuples::null_type ctor_args;
+ typedef typename super::final_allocator_type allocator_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_iterator<
+ rnd_node_iterator<node_type>,
+ random_access_index> iterator;
+#else
+ typedef rnd_node_iterator<node_type> iterator;
+#endif
+
+ typedef iterator const_iterator;
+
+private:
+ typedef allocator_traits<allocator_type> alloc_traits;
+
+public:
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::const_pointer const_pointer;
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::difference_type difference_type;
+ typedef typename
+ boost::reverse_iterator<iterator> reverse_iterator;
+ typedef typename
+ boost::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef TagList tag_list;
+
+protected:
+ typedef typename super::final_node_type final_node_type;
+ typedef tuples::cons<
+ ctor_args,
+ typename super::ctor_args_list> ctor_args_list;
+ typedef typename mpl::push_front<
+ typename super::index_type_list,
+ random_access_index>::type index_type_list;
+ typedef typename mpl::push_front<
+ typename super::iterator_type_list,
+ iterator>::type iterator_type_list;
+ typedef typename mpl::push_front<
+ typename super::const_iterator_type_list,
+ const_iterator>::type const_iterator_type_list;
+ typedef typename super::copy_map_type copy_map_type;
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ typedef typename super::index_saver_type index_saver_type;
+ typedef typename super::index_loader_type index_loader_type;
+#endif
+
+private:
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_container<
+ random_access_index> safe_super;
+#endif
+
+ typedef typename call_traits<
+ value_type>::param_type value_param_type;
+
+ /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
+ * expansion.
+ */
+
+ typedef std::pair<iterator,bool> emplace_return_type;
+
+public:
+
+ /* construct/copy/destroy
+ * Default and copy ctors are in the protected section as indices are
+ * not supposed to be created on their own. No range ctor either.
+ */
+
+ random_access_index<SuperMeta,TagList>& operator=(
+ const random_access_index<SuperMeta,TagList>& x)
+ {
+ this->final()=x.final();
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ random_access_index<SuperMeta,TagList>& operator=(
+ std::initializer_list<value_type> list)
+ {
+ this->final()=list;
+ return *this;
+ }
+#endif
+
+ template <class InputIterator>
+ void assign(InputIterator first,InputIterator last)
+ {
+ assign_iter(first,last,mpl::not_<is_integral<InputIterator> >());
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ void assign(std::initializer_list<value_type> list)
+ {
+ assign(list.begin(),list.end());
+ }
+#endif
+
+ void assign(size_type n,value_param_type value)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ clear();
+ for(size_type i=0;i<n;++i)push_back(value);
+ }
+
+ allocator_type get_allocator()const BOOST_NOEXCEPT
+ {
+ return this->final().get_allocator();
+ }
+
+ /* iterators */
+
+ iterator begin()BOOST_NOEXCEPT
+ {return make_iterator(node_type::from_impl(*ptrs.begin()));}
+ const_iterator begin()const BOOST_NOEXCEPT
+ {return make_iterator(node_type::from_impl(*ptrs.begin()));}
+ iterator
+ end()BOOST_NOEXCEPT{return make_iterator(header());}
+ const_iterator
+ end()const BOOST_NOEXCEPT{return make_iterator(header());}
+ reverse_iterator
+ rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+ const_reverse_iterator
+ rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+ reverse_iterator
+ rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+ const_reverse_iterator
+ rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+ const_iterator
+ cbegin()const BOOST_NOEXCEPT{return begin();}
+ const_iterator
+ cend()const BOOST_NOEXCEPT{return end();}
+ const_reverse_iterator
+ crbegin()const BOOST_NOEXCEPT{return rbegin();}
+ const_reverse_iterator
+ crend()const BOOST_NOEXCEPT{return rend();}
+
+ iterator iterator_to(const value_type& x)
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ const_iterator iterator_to(const value_type& x)const
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ /* capacity */
+
+ bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
+ size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
+ size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
+ size_type capacity()const BOOST_NOEXCEPT{return ptrs.capacity();}
+
+ void reserve(size_type n)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ ptrs.reserve(n);
+ }
+
+ void shrink_to_fit()
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ ptrs.shrink_to_fit();
+ }
+
+ void resize(size_type n)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ if(n>size())
+ for(size_type m=n-size();m--;)
+ this->final_emplace_(BOOST_MULTI_INDEX_NULL_PARAM_PACK);
+ else if(n<size())erase(begin()+n,end());
+ }
+
+ void resize(size_type n,value_param_type x)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ if(n>size())for(size_type m=n-size();m--;)this->final_insert_(x);
+ else if(n<size())erase(begin()+n,end());
+ }
+
+ /* access: no non-const versions provided as random_access_index
+ * handles const elements.
+ */
+
+ const_reference operator[](size_type n)const
+ {
+ BOOST_MULTI_INDEX_SAFE_MODE_ASSERT(n<size(),safe_mode::out_of_bounds);
+ return node_type::from_impl(*ptrs.at(n))->value();
+ }
+
+ const_reference at(size_type n)const
+ {
+ if(n>=size())throw_exception(std::out_of_range("random access index"));
+ return node_type::from_impl(*ptrs.at(n))->value();
+ }
+
+ const_reference front()const{return operator[](0);}
+ const_reference back()const{return operator[](size()-1);}
+
+ /* modifiers */
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
+ emplace_return_type,emplace_front,emplace_front_impl)
+
+ std::pair<iterator,bool> push_front(const value_type& x)
+ {return insert(begin(),x);}
+ std::pair<iterator,bool> push_front(BOOST_RV_REF(value_type) x)
+ {return insert(begin(),boost::move(x));}
+ void pop_front(){erase(begin());}
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
+ emplace_return_type,emplace_back,emplace_back_impl)
+
+ std::pair<iterator,bool> push_back(const value_type& x)
+ {return insert(end(),x);}
+ std::pair<iterator,bool> push_back(BOOST_RV_REF(value_type) x)
+ {return insert(end(),boost::move(x));}
+ void pop_back(){erase(--end());}
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
+ emplace_return_type,emplace,emplace_impl,iterator,position)
+
+ std::pair<iterator,bool> insert(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_(x);
+ if(p.second&&position.get_node()!=header()){
+ relocate(position.get_node(),p.first);
+ }
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ std::pair<iterator,bool> insert(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
+ if(p.second&&position.get_node()!=header()){
+ relocate(position.get_node(),p.first);
+ }
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ void insert(iterator position,size_type n,value_param_type x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ size_type s=0;
+ BOOST_TRY{
+ while(n--){
+ if(push_back(x).second)++s;
+ }
+ }
+ BOOST_CATCH(...){
+ relocate(position,end()-s,end());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ relocate(position,end()-s,end());
+ }
+
+ template<typename InputIterator>
+ void insert(iterator position,InputIterator first,InputIterator last)
+ {
+ insert_iter(position,first,last,mpl::not_<is_integral<InputIterator> >());
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ void insert(iterator position,std::initializer_list<value_type> list)
+ {
+ insert(position,list.begin(),list.end());
+ }
+#endif
+
+ iterator erase(iterator position)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
+ return position;
+ }
+
+ iterator erase(iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ difference_type n=static_cast<difference_type>(last-first);
+ relocate(end(),first,last);
+ while(n--)pop_back();
+ return last;
+ }
+
+ bool replace(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ return this->final_replace_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ bool replace(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ return this->final_replace_rv_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier>
+ bool modify(iterator position,Modifier mod)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify(iterator position,Modifier mod,Rollback back_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,back_,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ void swap(random_access_index<SuperMeta,TagList>& x)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x);
+ this->final_swap_(x.final());
+ }
+
+ void clear()BOOST_NOEXCEPT
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ this->final_clear_();
+ }
+
+ /* list operations */
+
+ void splice(iterator position,random_access_index<SuperMeta,TagList>& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_DIFFERENT_CONTAINER(*this,x);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ iterator first=x.begin(),last=x.end();
+ size_type n=0;
+ BOOST_TRY{
+ while(first!=last){
+ if(push_back(*first).second){
+ first=x.erase(first);
+ ++n;
+ }
+ else ++first;
+ }
+ }
+ BOOST_CATCH(...){
+ relocate(position,end()-n,end());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ relocate(position,end()-n,end());
+ }
+
+ void splice(
+ iterator position,random_access_index<SuperMeta,TagList>& x,iterator i)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,x);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ if(&x==this)relocate(position,i);
+ else{
+ if(insert(position,*i).second){
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer has a hard time with safe mode, and the following
+ * workaround is needed. Left it for all compilers as it does no
+ * harm.
+ */
+ i.detach();
+ x.erase(x.make_iterator(i.get_node()));
+#else
+ x.erase(i);
+#endif
+
+ }
+ }
+ }
+
+ void splice(
+ iterator position,random_access_index<SuperMeta,TagList>& x,
+ iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,x);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,x);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ if(&x==this)relocate(position,first,last);
+ else{
+ size_type n=0;
+ BOOST_TRY{
+ while(first!=last){
+ if(push_back(*first).second){
+ first=x.erase(first);
+ ++n;
+ }
+ else ++first;
+ }
+ }
+ BOOST_CATCH(...){
+ relocate(position,end()-n,end());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ relocate(position,end()-n,end());
+ }
+ }
+
+ void remove(value_param_type value)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ difference_type n=
+ end()-make_iterator(
+ random_access_index_remove<node_type>(
+ ptrs,
+ ::boost::bind(std::equal_to<value_type>(),::boost::arg<1>(),value)));
+ while(n--)pop_back();
+ }
+
+ template<typename Predicate>
+ void remove_if(Predicate pred)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ difference_type n=
+ end()-make_iterator(random_access_index_remove<node_type>(ptrs,pred));
+ while(n--)pop_back();
+ }
+
+ void unique()
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ difference_type n=
+ end()-make_iterator(
+ random_access_index_unique<node_type>(
+ ptrs,std::equal_to<value_type>()));
+ while(n--)pop_back();
+ }
+
+ template <class BinaryPredicate>
+ void unique(BinaryPredicate binary_pred)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ difference_type n=
+ end()-make_iterator(
+ random_access_index_unique<node_type>(ptrs,binary_pred));
+ while(n--)pop_back();
+ }
+
+ void merge(random_access_index<SuperMeta,TagList>& x)
+ {
+ if(this!=&x){
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ size_type s=size();
+ splice(end(),x);
+ random_access_index_inplace_merge<node_type>(
+ get_allocator(),ptrs,ptrs.at(s),std::less<value_type>());
+ }
+ }
+
+ template <typename Compare>
+ void merge(random_access_index<SuperMeta,TagList>& x,Compare comp)
+ {
+ if(this!=&x){
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ size_type s=size();
+ splice(end(),x);
+ random_access_index_inplace_merge<node_type>(
+ get_allocator(),ptrs,ptrs.at(s),comp);
+ }
+ }
+
+ void sort()
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ random_access_index_sort<node_type>(
+ get_allocator(),ptrs,std::less<value_type>());
+ }
+
+ template <typename Compare>
+ void sort(Compare comp)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ random_access_index_sort<node_type>(
+ get_allocator(),ptrs,comp);
+ }
+
+ void reverse()BOOST_NOEXCEPT
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ node_impl_type::reverse(ptrs.begin(),ptrs.end());
+ }
+
+ /* rearrange operations */
+
+ void relocate(iterator position,iterator i)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ if(position!=i)relocate(position.get_node(),i.get_node());
+ }
+
+ void relocate(iterator position,iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ if(position!=last)relocate(
+ position.get_node(),first.get_node(),last.get_node());
+ }
+
+ template<typename InputIterator>
+ void rearrange(InputIterator first)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ for(node_impl_ptr_pointer p0=ptrs.begin(),p0_end=ptrs.end();
+ p0!=p0_end;++first,++p0){
+ const value_type& v1=*first;
+ node_impl_ptr_pointer p1=node_from_value<node_type>(&v1)->up();
+
+ std::swap(*p0,*p1);
+ (*p0)->up()=p0;
+ (*p1)->up()=p1;
+ }
+ }
+
+BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
+ random_access_index(
+ const ctor_args_list& args_list,const allocator_type& al):
+ super(args_list.get_tail(),al),
+ ptrs(al,header()->impl(),0)
+ {
+ }
+
+ random_access_index(const random_access_index<SuperMeta,TagList>& x):
+ super(x),
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super(),
+#endif
+
+ ptrs(x.get_allocator(),header()->impl(),x.size())
+ {
+ /* The actual copying takes place in subsequent call to copy_().
+ */
+ }
+
+ random_access_index(
+ const random_access_index<SuperMeta,TagList>& x,do_not_copy_elements_tag):
+ super(x,do_not_copy_elements_tag()),
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super(),
+#endif
+
+ ptrs(x.get_allocator(),header()->impl(),0)
+ {
+ }
+
+ ~random_access_index()
+ {
+ /* the container is guaranteed to be empty by now */
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ iterator make_iterator(node_type* node){return iterator(node,this);}
+ const_iterator make_iterator(node_type* node)const
+ {return const_iterator(node,const_cast<random_access_index*>(this));}
+#else
+ iterator make_iterator(node_type* node){return iterator(node);}
+ const_iterator make_iterator(node_type* node)const
+ {return const_iterator(node);}
+#endif
+
+ void copy_(
+ const random_access_index<SuperMeta,TagList>& x,const copy_map_type& map)
+ {
+ for(node_impl_ptr_pointer begin_org=x.ptrs.begin(),
+ begin_cpy=ptrs.begin(),
+ end_org=x.ptrs.end();
+ begin_org!=end_org;++begin_org,++begin_cpy){
+ *begin_cpy=
+ static_cast<node_type*>(
+ map.find(
+ static_cast<final_node_type*>(
+ node_type::from_impl(*begin_org))))->impl();
+ (*begin_cpy)->up()=begin_cpy;
+ }
+
+ super::copy_(x,map);
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,final_node_type*& x,Variant variant)
+ {
+ ptrs.room_for_one();
+ final_node_type* res=super::insert_(v,x,variant);
+ if(res==x)ptrs.push_back(static_cast<node_type*>(x)->impl());
+ return res;
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,node_type* position,final_node_type*& x,Variant variant)
+ {
+ ptrs.room_for_one();
+ final_node_type* res=super::insert_(v,position,x,variant);
+ if(res==x)ptrs.push_back(static_cast<node_type*>(x)->impl());
+ return res;
+ }
+
+ void erase_(node_type* x)
+ {
+ ptrs.erase(x->impl());
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ }
+
+ void delete_all_nodes_()
+ {
+ for(node_impl_ptr_pointer x=ptrs.begin(),x_end=ptrs.end();x!=x_end;++x){
+ this->final_delete_node_(
+ static_cast<final_node_type*>(node_type::from_impl(*x)));
+ }
+ }
+
+ void clear_()
+ {
+ super::clear_();
+ ptrs.clear();
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::detach_dereferenceable_iterators();
+#endif
+ }
+
+ void swap_(random_access_index<SuperMeta,TagList>& x)
+ {
+ ptrs.swap(x.ptrs);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_(x);
+ }
+
+ void swap_elements_(random_access_index<SuperMeta,TagList>& x)
+ {
+ ptrs.swap(x.ptrs);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_elements_(x);
+ }
+
+ template<typename Variant>
+ bool replace_(value_param_type v,node_type* x,Variant variant)
+ {
+ return super::replace_(v,x,variant);
+ }
+
+ bool modify_(node_type* x)
+ {
+ BOOST_TRY{
+ if(!super::modify_(x)){
+ ptrs.erase(x->impl());
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ return false;
+ }
+ else return true;
+ }
+ BOOST_CATCH(...){
+ ptrs.erase(x->impl());
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool modify_rollback_(node_type* x)
+ {
+ return super::modify_rollback_(x);
+ }
+
+ bool check_rollback_(node_type* x)const
+ {
+ return super::check_rollback_(x);
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* serialization */
+
+ template<typename Archive>
+ void save_(
+ Archive& ar,const unsigned int version,const index_saver_type& sm)const
+ {
+ sm.save(begin(),end(),ar,version);
+ super::save_(ar,version,sm);
+ }
+
+ template<typename Archive>
+ void load_(
+ Archive& ar,const unsigned int version,const index_loader_type& lm)
+ {
+ {
+ typedef random_access_index_loader<node_type,allocator_type> loader;
+
+ loader ld(get_allocator(),ptrs);
+ lm.load(
+ ::boost::bind(
+ &loader::rearrange,&ld,::boost::arg<1>(),::boost::arg<2>()),
+ ar,version);
+ } /* exit scope so that ld frees its resources */
+ super::load_(ar,version,lm);
+ }
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ bool invariant_()const
+ {
+ if(size()>capacity())return false;
+ if(size()==0||begin()==end()){
+ if(size()!=0||begin()!=end())return false;
+ }
+ else{
+ size_type s=0;
+ for(const_iterator it=begin(),it_end=end();;++it,++s){
+ if(*(it.get_node()->up())!=it.get_node()->impl())return false;
+ if(it==it_end)break;
+ }
+ if(s!=size())return false;
+ }
+
+ return super::invariant_();
+ }
+
+ /* This forwarding function eases things for the boost::mem_fn construct
+ * in BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT. Actually,
+ * final_check_invariant is already an inherited member function of index.
+ */
+ void check_invariant_()const{this->final_check_invariant_();}
+#endif
+
+private:
+ node_type* header()const{return this->final_header();}
+
+ static void relocate(node_type* position,node_type* x)
+ {
+ node_impl_type::relocate(position->up(),x->up());
+ }
+
+ static void relocate(node_type* position,node_type* first,node_type* last)
+ {
+ node_impl_type::relocate(
+ position->up(),first->up(),last->up());
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ void detach_iterators(node_type* x)
+ {
+ iterator it=make_iterator(x);
+ safe_mode::detach_equivalent_iterators(it);
+ }
+#endif
+
+ template <class InputIterator>
+ void assign_iter(InputIterator first,InputIterator last,mpl::true_)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ clear();
+ for(;first!=last;++first)this->final_insert_ref_(*first);
+ }
+
+ void assign_iter(size_type n,value_param_type value,mpl::false_)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ clear();
+ for(size_type i=0;i<n;++i)push_back(value);
+ }
+
+ template<typename InputIterator>
+ void insert_iter(
+ iterator position,InputIterator first,InputIterator last,mpl::true_)
+ {
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ size_type s=0;
+ BOOST_TRY{
+ for(;first!=last;++first){
+ if(this->final_insert_ref_(*first).second)++s;
+ }
+ }
+ BOOST_CATCH(...){
+ relocate(position,end()-s,end());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ relocate(position,end()-s,end());
+ }
+
+ void insert_iter(
+ iterator position,size_type n,value_param_type x,mpl::false_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ size_type s=0;
+ BOOST_TRY{
+ while(n--){
+ if(push_back(x).second)++s;
+ }
+ }
+ BOOST_CATCH(...){
+ relocate(position,end()-s,end());
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ relocate(position,end()-s,end());
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_front_impl(
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ return emplace_impl(begin(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_back_impl(
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ return emplace_impl(end(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_impl(
+ iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=
+ this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ if(p.second&&position.get_node()!=header()){
+ relocate(position.get_node(),p.first);
+ }
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ ptr_array ptrs;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+#pragma parse_mfunc_templ reset
+#endif
+};
+
+/* comparison */
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator==(
+ const random_access_index<SuperMeta1,TagList1>& x,
+ const random_access_index<SuperMeta2,TagList2>& y)
+{
+ return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator<(
+ const random_access_index<SuperMeta1,TagList1>& x,
+ const random_access_index<SuperMeta2,TagList2>& y)
+{
+ return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator!=(
+ const random_access_index<SuperMeta1,TagList1>& x,
+ const random_access_index<SuperMeta2,TagList2>& y)
+{
+ return !(x==y);
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator>(
+ const random_access_index<SuperMeta1,TagList1>& x,
+ const random_access_index<SuperMeta2,TagList2>& y)
+{
+ return y<x;
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator>=(
+ const random_access_index<SuperMeta1,TagList1>& x,
+ const random_access_index<SuperMeta2,TagList2>& y)
+{
+ return !(x<y);
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator<=(
+ const random_access_index<SuperMeta1,TagList1>& x,
+ const random_access_index<SuperMeta2,TagList2>& y)
+{
+ return !(x>y);
+}
+
+/* specialized algorithms */
+
+template<typename SuperMeta,typename TagList>
+void swap(
+ random_access_index<SuperMeta,TagList>& x,
+ random_access_index<SuperMeta,TagList>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+/* random access index specifier */
+
+template <typename TagList>
+struct random_access
+{
+ BOOST_STATIC_ASSERT(detail::is_tag<TagList>::value);
+
+ template<typename Super>
+ struct node_class
+ {
+ typedef detail::random_access_index_node<Super> type;
+ };
+
+ template<typename SuperMeta>
+ struct index_class
+ {
+ typedef detail::random_access_index<
+ SuperMeta,typename TagList::type> type;
+ };
+};
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+/* Boost.Foreach compatibility */
+
+template<typename SuperMeta,typename TagList>
+inline boost::mpl::true_* boost_foreach_is_noncopyable(
+ boost::multi_index::detail::random_access_index<SuperMeta,TagList>*&,
+ boost_foreach_argument_dependent_lookup_hack)
+{
+ return 0;
+}
+
+#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
+#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/random_access_index_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/random_access_index_fwd.hpp
index 2ea19295426..2ea19295426 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/random_access_index_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/random_access_index_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/ranked_index.hpp b/src/third_party/boost-1.70.0/boost/multi_index/ranked_index.hpp
new file mode 100644
index 00000000000..e8955ef8058
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/ranked_index.hpp
@@ -0,0 +1,385 @@
+/* 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_RANKED_INDEX_HPP
+#define BOOST_MULTI_INDEX_RANKED_INDEX_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/detail/ord_index_impl.hpp>
+#include <boost/multi_index/detail/rnk_index_ops.hpp>
+#include <boost/multi_index/ranked_index_fwd.hpp>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* ranked_index augments a given ordered index to provide rank operations */
+
+template<typename OrderedIndexNodeImpl>
+struct ranked_node:OrderedIndexNodeImpl
+{
+ typedef typename OrderedIndexNodeImpl::size_type size_type;
+
+ size_type size;
+};
+
+template<typename OrderedIndexImpl>
+class ranked_index:public OrderedIndexImpl
+{
+ typedef OrderedIndexImpl super;
+
+protected:
+ typedef typename super::node_type node_type;
+ typedef typename super::node_impl_pointer node_impl_pointer;
+
+public:
+ typedef typename super::ctor_args_list ctor_args_list;
+ typedef typename super::allocator_type allocator_type;
+ typedef typename super::iterator iterator;
+ typedef typename super::size_type size_type;
+
+ /* rank operations */
+
+ iterator nth(size_type n)const
+ {
+ return this->make_iterator(node_type::from_impl(
+ ranked_index_nth(n,this->header()->impl())));
+ }
+
+ size_type rank(iterator position)const
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+
+ return ranked_index_rank(
+ position.get_node()->impl(),this->header()->impl());
+ }
+
+ template<typename CompatibleKey>
+ size_type find_rank(const CompatibleKey& x)const
+ {
+ return ranked_index_find_rank(
+ this->root(),this->header(),this->key,x,this->comp_);
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ size_type find_rank(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return ranked_index_find_rank(
+ this->root(),this->header(),this->key,x,comp);
+ }
+
+ template<typename CompatibleKey>
+ size_type lower_bound_rank(const CompatibleKey& x)const
+ {
+ return ranked_index_lower_bound_rank(
+ this->root(),this->header(),this->key,x,this->comp_);
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ size_type lower_bound_rank(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return ranked_index_lower_bound_rank(
+ this->root(),this->header(),this->key,x,comp);
+ }
+
+ template<typename CompatibleKey>
+ size_type upper_bound_rank(const CompatibleKey& x)const
+ {
+ return ranked_index_upper_bound_rank(
+ this->root(),this->header(),this->key,x,this->comp_);
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ size_type upper_bound_rank(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return ranked_index_upper_bound_rank(
+ this->root(),this->header(),this->key,x,comp);
+ }
+
+ template<typename CompatibleKey>
+ std::pair<size_type,size_type> equal_range_rank(
+ const CompatibleKey& x)const
+ {
+ return ranked_index_equal_range_rank(
+ this->root(),this->header(),this->key,x,this->comp_);
+ }
+
+ template<typename CompatibleKey,typename CompatibleCompare>
+ std::pair<size_type,size_type> equal_range_rank(
+ const CompatibleKey& x,const CompatibleCompare& comp)const
+ {
+ return ranked_index_equal_range_rank(
+ this->root(),this->header(),this->key,x,comp);
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<size_type,size_type>
+ range_rank(LowerBounder lower,UpperBounder upper)const
+ {
+ typedef typename mpl::if_<
+ is_same<LowerBounder,unbounded_type>,
+ BOOST_DEDUCED_TYPENAME mpl::if_<
+ is_same<UpperBounder,unbounded_type>,
+ both_unbounded_tag,
+ lower_unbounded_tag
+ >::type,
+ BOOST_DEDUCED_TYPENAME mpl::if_<
+ is_same<UpperBounder,unbounded_type>,
+ upper_unbounded_tag,
+ none_unbounded_tag
+ >::type
+ >::type dispatch;
+
+ return range_rank(lower,upper,dispatch());
+ }
+
+protected:
+ ranked_index(const ranked_index& x):super(x){};
+
+ ranked_index(const ranked_index& x,do_not_copy_elements_tag):
+ super(x,do_not_copy_elements_tag()){};
+
+ ranked_index(
+ const ctor_args_list& args_list,const allocator_type& al):
+ super(args_list,al){}
+
+private:
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<size_type,size_type>
+ range_rank(LowerBounder lower,UpperBounder upper,none_unbounded_tag)const
+ {
+ node_type* y=this->header();
+ node_type* z=this->root();
+
+ if(!z)return std::pair<size_type,size_type>(0,0);
+
+ size_type s=z->impl()->size;
+
+ do{
+ if(!lower(this->key(z->value()))){
+ z=node_type::from_impl(z->right());
+ }
+ else if(!upper(this->key(z->value()))){
+ y=z;
+ s-=ranked_node_size(y->right())+1;
+ z=node_type::from_impl(z->left());
+ }
+ else{
+ return std::pair<size_type,size_type>(
+ s-z->impl()->size+
+ lower_range_rank(node_type::from_impl(z->left()),z,lower),
+ s-ranked_node_size(z->right())+
+ upper_range_rank(node_type::from_impl(z->right()),y,upper));
+ }
+ }while(z);
+
+ return std::pair<size_type,size_type>(s,s);
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<size_type,size_type>
+ range_rank(LowerBounder,UpperBounder upper,lower_unbounded_tag)const
+ {
+ return std::pair<size_type,size_type>(
+ 0,
+ upper_range_rank(this->root(),this->header(),upper));
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<size_type,size_type>
+ range_rank(LowerBounder lower,UpperBounder,upper_unbounded_tag)const
+ {
+ return std::pair<size_type,size_type>(
+ lower_range_rank(this->root(),this->header(),lower),
+ this->size());
+ }
+
+ template<typename LowerBounder,typename UpperBounder>
+ std::pair<size_type,size_type>
+ range_rank(LowerBounder,UpperBounder,both_unbounded_tag)const
+ {
+ return std::pair<size_type,size_type>(0,this->size());
+ }
+
+ template<typename LowerBounder>
+ size_type
+ lower_range_rank(node_type* top,node_type* y,LowerBounder lower)const
+ {
+ if(!top)return 0;
+
+ size_type s=top->impl()->size;
+
+ do{
+ if(lower(this->key(top->value()))){
+ y=top;
+ s-=ranked_node_size(y->right())+1;
+ top=node_type::from_impl(top->left());
+ }
+ else top=node_type::from_impl(top->right());
+ }while(top);
+
+ return s;
+ }
+
+ template<typename UpperBounder>
+ size_type
+ upper_range_rank(node_type* top,node_type* y,UpperBounder upper)const
+ {
+ if(!top)return 0;
+
+ size_type s=top->impl()->size;
+
+ do{
+ if(!upper(this->key(top->value()))){
+ y=top;
+ s-=ranked_node_size(y->right())+1;
+ top=node_type::from_impl(top->left());
+ }
+ else top=node_type::from_impl(top->right());
+ }while(top);
+
+ return s;
+ }
+};
+
+/* augmenting policy for ordered_index */
+
+struct rank_policy
+{
+ template<typename OrderedIndexNodeImpl>
+ struct augmented_node
+ {
+ typedef ranked_node<OrderedIndexNodeImpl> type;
+ };
+
+ template<typename OrderedIndexImpl>
+ struct augmented_interface
+ {
+ typedef ranked_index<OrderedIndexImpl> type;
+ };
+
+ /* algorithmic stuff */
+
+ template<typename Pointer>
+ static void add(Pointer x,Pointer root)
+ {
+ x->size=1;
+ while(x!=root){
+ x=x->parent();
+ ++(x->size);
+ }
+ }
+
+ template<typename Pointer>
+ static void remove(Pointer x,Pointer root)
+ {
+ while(x!=root){
+ x=x->parent();
+ --(x->size);
+ }
+ }
+
+ template<typename Pointer>
+ static void copy(Pointer x,Pointer y)
+ {
+ y->size=x->size;
+ }
+
+ template<typename Pointer>
+ static void rotate_left(Pointer x,Pointer y) /* in: x==y->left() */
+ {
+ y->size=x->size;
+ x->size=ranked_node_size(x->left())+ranked_node_size(x->right())+1;
+ }
+
+ template<typename Pointer>
+ static void rotate_right(Pointer x,Pointer y) /* in: x==y->right() */
+ {
+ rotate_left(x,y);
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ template<typename Pointer>
+ static bool invariant(Pointer x)
+ {
+ return x->size==ranked_node_size(x->left())+ranked_node_size(x->right())+1;
+ }
+#endif
+};
+
+} /* namespace multi_index::detail */
+
+/* ranked_index specifiers */
+
+template<typename Arg1,typename Arg2,typename Arg3>
+struct ranked_unique
+{
+ typedef typename detail::ordered_index_args<
+ Arg1,Arg2,Arg3> index_args;
+ typedef typename index_args::tag_list_type::type tag_list_type;
+ typedef typename index_args::key_from_value_type key_from_value_type;
+ typedef typename index_args::compare_type compare_type;
+
+ template<typename Super>
+ struct node_class
+ {
+ typedef detail::ordered_index_node<detail::rank_policy,Super> type;
+ };
+
+ template<typename SuperMeta>
+ struct index_class
+ {
+ typedef detail::ordered_index<
+ key_from_value_type,compare_type,
+ SuperMeta,tag_list_type,detail::ordered_unique_tag,
+ detail::rank_policy> type;
+ };
+};
+
+template<typename Arg1,typename Arg2,typename Arg3>
+struct ranked_non_unique
+{
+ typedef detail::ordered_index_args<
+ Arg1,Arg2,Arg3> index_args;
+ typedef typename index_args::tag_list_type::type tag_list_type;
+ typedef typename index_args::key_from_value_type key_from_value_type;
+ typedef typename index_args::compare_type compare_type;
+
+ template<typename Super>
+ struct node_class
+ {
+ typedef detail::ordered_index_node<detail::rank_policy,Super> type;
+ };
+
+ template<typename SuperMeta>
+ struct index_class
+ {
+ typedef detail::ordered_index<
+ key_from_value_type,compare_type,
+ SuperMeta,tag_list_type,detail::ordered_non_unique_tag,
+ detail::rank_policy> type;
+ };
+};
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/ranked_index_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/ranked_index_fwd.hpp
index 380d3480736..380d3480736 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/ranked_index_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/ranked_index_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/safe_mode_errors.hpp b/src/third_party/boost-1.70.0/boost/multi_index/safe_mode_errors.hpp
index 1904706edec..1904706edec 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/safe_mode_errors.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/safe_mode_errors.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index/sequenced_index.hpp b/src/third_party/boost-1.70.0/boost/multi_index/sequenced_index.hpp
new file mode 100644
index 00000000000..6db2f241a8a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index/sequenced_index.hpp
@@ -0,0 +1,1071 @@
+/* Copyright 2003-2019 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_SEQUENCED_INDEX_HPP
+#define BOOST_MULTI_INDEX_SEQUENCED_INDEX_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/bind.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/foreach_fwd.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/multi_index/detail/access_specifier.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/bidir_node_iterator.hpp>
+#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
+#include <boost/multi_index/detail/index_node_base.hpp>
+#include <boost/multi_index/detail/safe_mode.hpp>
+#include <boost/multi_index/detail/scope_guard.hpp>
+#include <boost/multi_index/detail/seq_index_node.hpp>
+#include <boost/multi_index/detail/seq_index_ops.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <boost/multi_index/sequenced_index_fwd.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <functional>
+#include <utility>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include<initializer_list>
+#endif
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/bind.hpp>
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(x) \
+ detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
+ detail::make_obj_guard(x,&sequenced_index::check_invariant_); \
+ BOOST_JOIN(check_invariant_,__LINE__).touch();
+#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT \
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(*this)
+#else
+#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(x)
+#define BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* sequenced_index adds a layer of sequenced indexing to a given Super */
+
+template<typename SuperMeta,typename TagList>
+class sequenced_index:
+ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ ,public safe_mode::safe_container<
+ sequenced_index<SuperMeta,TagList> >
+#endif
+
+{
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
+ * lifetime of const references bound to temporaries --precisely what
+ * scopeguards are.
+ */
+
+#pragma parse_mfunc_templ off
+#endif
+
+ typedef typename SuperMeta::type super;
+
+protected:
+ typedef sequenced_index_node<
+ typename super::node_type> node_type;
+
+private:
+ typedef typename node_type::impl_type node_impl_type;
+
+public:
+ /* types */
+
+ typedef typename node_type::value_type value_type;
+ typedef tuples::null_type ctor_args;
+ typedef typename super::final_allocator_type allocator_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_iterator<
+ bidir_node_iterator<node_type>,
+ sequenced_index> iterator;
+#else
+ typedef bidir_node_iterator<node_type> iterator;
+#endif
+
+ typedef iterator const_iterator;
+
+private:
+ typedef allocator_traits<allocator_type> alloc_traits;
+
+public:
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::const_pointer const_pointer;
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::difference_type difference_type;
+ typedef typename
+ boost::reverse_iterator<iterator> reverse_iterator;
+ typedef typename
+ boost::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef TagList tag_list;
+
+protected:
+ typedef typename super::final_node_type final_node_type;
+ typedef tuples::cons<
+ ctor_args,
+ typename super::ctor_args_list> ctor_args_list;
+ typedef typename mpl::push_front<
+ typename super::index_type_list,
+ sequenced_index>::type index_type_list;
+ typedef typename mpl::push_front<
+ typename super::iterator_type_list,
+ iterator>::type iterator_type_list;
+ typedef typename mpl::push_front<
+ typename super::const_iterator_type_list,
+ const_iterator>::type const_iterator_type_list;
+ typedef typename super::copy_map_type copy_map_type;
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ typedef typename super::index_saver_type index_saver_type;
+ typedef typename super::index_loader_type index_loader_type;
+#endif
+
+private:
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef safe_mode::safe_container<
+ sequenced_index> safe_super;
+#endif
+
+ typedef typename call_traits<value_type>::param_type value_param_type;
+
+ /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
+ * expansion.
+ */
+
+ typedef std::pair<iterator,bool> emplace_return_type;
+
+public:
+
+ /* construct/copy/destroy
+ * Default and copy ctors are in the protected section as indices are
+ * not supposed to be created on their own. No range ctor either.
+ */
+
+ sequenced_index<SuperMeta,TagList>& operator=(
+ const sequenced_index<SuperMeta,TagList>& x)
+ {
+ this->final()=x.final();
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ sequenced_index<SuperMeta,TagList>& operator=(
+ std::initializer_list<value_type> list)
+ {
+ this->final()=list;
+ return *this;
+ }
+#endif
+
+ template <class InputIterator>
+ void assign(InputIterator first,InputIterator last)
+ {
+ assign_iter(first,last,mpl::not_<is_integral<InputIterator> >());
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ void assign(std::initializer_list<value_type> list)
+ {
+ assign(list.begin(),list.end());
+ }
+#endif
+
+ void assign(size_type n,value_param_type value)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ clear();
+ for(size_type i=0;i<n;++i)push_back(value);
+ }
+
+ allocator_type get_allocator()const BOOST_NOEXCEPT
+ {
+ return this->final().get_allocator();
+ }
+
+ /* iterators */
+
+ iterator begin()BOOST_NOEXCEPT
+ {return make_iterator(node_type::from_impl(header()->next()));}
+ const_iterator begin()const BOOST_NOEXCEPT
+ {return make_iterator(node_type::from_impl(header()->next()));}
+ iterator
+ end()BOOST_NOEXCEPT{return make_iterator(header());}
+ const_iterator
+ end()const BOOST_NOEXCEPT{return make_iterator(header());}
+ reverse_iterator
+ rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+ const_reverse_iterator
+ rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+ reverse_iterator
+ rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+ const_reverse_iterator
+ rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+ const_iterator
+ cbegin()const BOOST_NOEXCEPT{return begin();}
+ const_iterator
+ cend()const BOOST_NOEXCEPT{return end();}
+ const_reverse_iterator
+ crbegin()const BOOST_NOEXCEPT{return rbegin();}
+ const_reverse_iterator
+ crend()const BOOST_NOEXCEPT{return rend();}
+
+ iterator iterator_to(const value_type& x)
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ const_iterator iterator_to(const value_type& x)const
+ {
+ return make_iterator(node_from_value<node_type>(boost::addressof(x)));
+ }
+
+ /* capacity */
+
+ bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
+ size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
+ size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
+
+ void resize(size_type n)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ if(n>size()){
+ for(size_type m=n-size();m--;)
+ this->final_emplace_(BOOST_MULTI_INDEX_NULL_PARAM_PACK);
+ }
+ else if(n<size()){for(size_type m=size()-n;m--;)pop_back();}
+ }
+
+ void resize(size_type n,value_param_type x)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ if(n>size())insert(end(),static_cast<size_type>(n-size()),x);
+ else if(n<size())for(size_type m=size()-n;m--;)pop_back();
+ }
+
+ /* access: no non-const versions provided as sequenced_index
+ * handles const elements.
+ */
+
+ const_reference front()const{return *begin();}
+ const_reference back()const{return *--end();}
+
+ /* modifiers */
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
+ emplace_return_type,emplace_front,emplace_front_impl)
+
+ std::pair<iterator,bool> push_front(const value_type& x)
+ {return insert(begin(),x);}
+ std::pair<iterator,bool> push_front(BOOST_RV_REF(value_type) x)
+ {return insert(begin(),boost::move(x));}
+ void pop_front(){erase(begin());}
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
+ emplace_return_type,emplace_back,emplace_back_impl)
+
+ std::pair<iterator,bool> push_back(const value_type& x)
+ {return insert(end(),x);}
+ std::pair<iterator,bool> push_back(BOOST_RV_REF(value_type) x)
+ {return insert(end(),boost::move(x));}
+ void pop_back(){erase(--end());}
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
+ emplace_return_type,emplace,emplace_impl,iterator,position)
+
+ std::pair<iterator,bool> insert(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_(x);
+ if(p.second&&position.get_node()!=header()){
+ relink(position.get_node(),p.first);
+ }
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ std::pair<iterator,bool> insert(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
+ if(p.second&&position.get_node()!=header()){
+ relink(position.get_node(),p.first);
+ }
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+ void insert(iterator position,size_type n,value_param_type x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ for(size_type i=0;i<n;++i)insert(position,x);
+ }
+
+ template<typename InputIterator>
+ void insert(iterator position,InputIterator first,InputIterator last)
+ {
+ insert_iter(position,first,last,mpl::not_<is_integral<InputIterator> >());
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ void insert(iterator position,std::initializer_list<value_type> list)
+ {
+ insert(position,list.begin(),list.end());
+ }
+#endif
+
+ iterator erase(iterator position)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
+ return position;
+ }
+
+ iterator erase(iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ while(first!=last){
+ first=erase(first);
+ }
+ return first;
+ }
+
+ bool replace(iterator position,const value_type& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ return this->final_replace_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ bool replace(iterator position,BOOST_RV_REF(value_type) x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ return this->final_replace_rv_(
+ x,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier>
+ bool modify(iterator position,Modifier mod)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify(iterator position,Modifier mod,Rollback back_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer on safe mode code chokes if this
+ * this is not added. Left it for all compilers as it does no
+ * harm.
+ */
+
+ position.detach();
+#endif
+
+ return this->final_modify_(
+ mod,back_,static_cast<final_node_type*>(position.get_node()));
+ }
+
+ void swap(sequenced_index<SuperMeta,TagList>& x)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF(x);
+ this->final_swap_(x.final());
+ }
+
+ void clear()BOOST_NOEXCEPT
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ this->final_clear_();
+ }
+
+ /* list operations */
+
+ void splice(iterator position,sequenced_index<SuperMeta,TagList>& x)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_DIFFERENT_CONTAINER(*this,x);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ iterator first=x.begin(),last=x.end();
+ while(first!=last){
+ if(insert(position,*first).second)first=x.erase(first);
+ else ++first;
+ }
+ }
+
+ void splice(iterator position,sequenced_index<SuperMeta,TagList>& x,iterator i)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,x);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ if(&x==this){
+ if(position!=i)relink(position.get_node(),i.get_node());
+ }
+ else{
+ if(insert(position,*i).second){
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ /* MSVC++ 6.0 optimizer has a hard time with safe mode, and the following
+ * workaround is needed. Left it for all compilers as it does no
+ * harm.
+ */
+ i.detach();
+ x.erase(x.make_iterator(i.get_node()));
+#else
+ x.erase(i);
+#endif
+
+ }
+ }
+ }
+
+ void splice(
+ iterator position,sequenced_index<SuperMeta,TagList>& x,
+ iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,x);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,x);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ if(&x==this){
+ BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
+ if(position!=last)relink(
+ position.get_node(),first.get_node(),last.get_node());
+ }
+ else{
+ while(first!=last){
+ if(insert(position,*first).second)first=x.erase(first);
+ else ++first;
+ }
+ }
+ }
+
+ void remove(value_param_type value)
+ {
+ sequenced_index_remove(
+ *this,
+ ::boost::bind(std::equal_to<value_type>(),::boost::arg<1>(),value));
+ }
+
+ template<typename Predicate>
+ void remove_if(Predicate pred)
+ {
+ sequenced_index_remove(*this,pred);
+ }
+
+ void unique()
+ {
+ sequenced_index_unique(*this,std::equal_to<value_type>());
+ }
+
+ template <class BinaryPredicate>
+ void unique(BinaryPredicate binary_pred)
+ {
+ sequenced_index_unique(*this,binary_pred);
+ }
+
+ void merge(sequenced_index<SuperMeta,TagList>& x)
+ {
+ sequenced_index_merge(*this,x,std::less<value_type>());
+ }
+
+ template <typename Compare>
+ void merge(sequenced_index<SuperMeta,TagList>& x,Compare comp)
+ {
+ sequenced_index_merge(*this,x,comp);
+ }
+
+ void sort()
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ sequenced_index_sort(header(),std::less<value_type>());
+ }
+
+ template <typename Compare>
+ void sort(Compare comp)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ sequenced_index_sort(header(),comp);
+ }
+
+ void reverse()BOOST_NOEXCEPT
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ node_impl_type::reverse(header()->impl());
+ }
+
+ /* rearrange operations */
+
+ void relocate(iterator position,iterator i)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ if(position!=i)relink(position.get_node(),i.get_node());
+ }
+
+ void relocate(iterator position,iterator first,iterator last)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
+ BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
+ BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ if(position!=last)relink(
+ position.get_node(),first.get_node(),last.get_node());
+ }
+
+ template<typename InputIterator>
+ void rearrange(InputIterator first)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ node_type* pos=header();
+ for(size_type s=size();s--;){
+ const value_type& v=*first++;
+ relink(pos,node_from_value<node_type>(&v));
+ }
+ }
+
+BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
+ sequenced_index(const ctor_args_list& args_list,const allocator_type& al):
+ super(args_list.get_tail(),al)
+ {
+ empty_initialize();
+ }
+
+ sequenced_index(const sequenced_index<SuperMeta,TagList>& x):
+ super(x)
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ ,safe_super()
+#endif
+
+ {
+ /* the actual copying takes place in subsequent call to copy_() */
+ }
+
+ sequenced_index(
+ const sequenced_index<SuperMeta,TagList>& x,do_not_copy_elements_tag):
+ super(x,do_not_copy_elements_tag())
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ ,safe_super()
+#endif
+
+ {
+ empty_initialize();
+ }
+
+ ~sequenced_index()
+ {
+ /* the container is guaranteed to be empty by now */
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ iterator make_iterator(node_type* node){return iterator(node,this);}
+ const_iterator make_iterator(node_type* node)const
+ {return const_iterator(node,const_cast<sequenced_index*>(this));}
+#else
+ iterator make_iterator(node_type* node){return iterator(node);}
+ const_iterator make_iterator(node_type* node)const
+ {return const_iterator(node);}
+#endif
+
+ void copy_(
+ const sequenced_index<SuperMeta,TagList>& x,const copy_map_type& map)
+ {
+ node_type* org=x.header();
+ node_type* cpy=header();
+ do{
+ node_type* next_org=node_type::from_impl(org->next());
+ node_type* next_cpy=map.find(static_cast<final_node_type*>(next_org));
+ cpy->next()=next_cpy->impl();
+ next_cpy->prior()=cpy->impl();
+ org=next_org;
+ cpy=next_cpy;
+ }while(org!=x.header());
+
+ super::copy_(x,map);
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,final_node_type*& x,Variant variant)
+ {
+ final_node_type* res=super::insert_(v,x,variant);
+ if(res==x)link(static_cast<node_type*>(x));
+ return res;
+ }
+
+ template<typename Variant>
+ final_node_type* insert_(
+ value_param_type v,node_type* position,final_node_type*& x,Variant variant)
+ {
+ final_node_type* res=super::insert_(v,position,x,variant);
+ if(res==x)link(static_cast<node_type*>(x));
+ return res;
+ }
+
+ void erase_(node_type* x)
+ {
+ unlink(x);
+ super::erase_(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+ }
+
+ void delete_all_nodes_()
+ {
+ for(node_type* x=node_type::from_impl(header()->next());x!=header();){
+ node_type* y=node_type::from_impl(x->next());
+ this->final_delete_node_(static_cast<final_node_type*>(x));
+ x=y;
+ }
+ }
+
+ void clear_()
+ {
+ super::clear_();
+ empty_initialize();
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::detach_dereferenceable_iterators();
+#endif
+ }
+
+ void swap_(sequenced_index<SuperMeta,TagList>& x)
+ {
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_(x);
+ }
+
+ void swap_elements_(sequenced_index<SuperMeta,TagList>& x)
+ {
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ safe_super::swap(x);
+#endif
+
+ super::swap_elements_(x);
+ }
+
+ template<typename Variant>
+ bool replace_(value_param_type v,node_type* x,Variant variant)
+ {
+ return super::replace_(v,x,variant);
+ }
+
+ bool modify_(node_type* x)
+ {
+ BOOST_TRY{
+ if(!super::modify_(x)){
+ unlink(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ return false;
+ }
+ else return true;
+ }
+ BOOST_CATCH(...){
+ unlink(x);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ detach_iterators(x);
+#endif
+
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ bool modify_rollback_(node_type* x)
+ {
+ return super::modify_rollback_(x);
+ }
+
+ bool check_rollback_(node_type* x)const
+ {
+ return super::check_rollback_(x);
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* serialization */
+
+ template<typename Archive>
+ void save_(
+ Archive& ar,const unsigned int version,const index_saver_type& sm)const
+ {
+ sm.save(begin(),end(),ar,version);
+ super::save_(ar,version,sm);
+ }
+
+ template<typename Archive>
+ void load_(
+ Archive& ar,const unsigned int version,const index_loader_type& lm)
+ {
+ lm.load(
+ ::boost::bind(
+ &sequenced_index::rearranger,this,::boost::arg<1>(),::boost::arg<2>()),
+ ar,version);
+ super::load_(ar,version,lm);
+ }
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ bool invariant_()const
+ {
+ if(size()==0||begin()==end()){
+ if(size()!=0||begin()!=end()||
+ header()->next()!=header()->impl()||
+ header()->prior()!=header()->impl())return false;
+ }
+ else{
+ size_type s=0;
+ for(const_iterator it=begin(),it_end=end();it!=it_end;++it,++s){
+ if(it.get_node()->next()->prior()!=it.get_node()->impl())return false;
+ if(it.get_node()->prior()->next()!=it.get_node()->impl())return false;
+ }
+ if(s!=size())return false;
+ }
+
+ return super::invariant_();
+ }
+
+ /* This forwarding function eases things for the boost::mem_fn construct
+ * in BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT. Actually,
+ * final_check_invariant is already an inherited member function of index.
+ */
+ void check_invariant_()const{this->final_check_invariant_();}
+#endif
+
+private:
+ node_type* header()const{return this->final_header();}
+
+ void empty_initialize()
+ {
+ header()->prior()=header()->next()=header()->impl();
+ }
+
+ void link(node_type* x)
+ {
+ node_impl_type::link(x->impl(),header()->impl());
+ }
+
+ static void unlink(node_type* x)
+ {
+ node_impl_type::unlink(x->impl());
+ }
+
+ static void relink(node_type* position,node_type* x)
+ {
+ node_impl_type::relink(position->impl(),x->impl());
+ }
+
+ static void relink(node_type* position,node_type* first,node_type* last)
+ {
+ node_impl_type::relink(
+ position->impl(),first->impl(),last->impl());
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ void rearranger(node_type* position,node_type *x)
+ {
+ if(!position)position=header();
+ node_type::increment(position);
+ if(position!=x)relink(position,x);
+ }
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ void detach_iterators(node_type* x)
+ {
+ iterator it=make_iterator(x);
+ safe_mode::detach_equivalent_iterators(it);
+ }
+#endif
+
+ template <class InputIterator>
+ void assign_iter(InputIterator first,InputIterator last,mpl::true_)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ clear();
+ for(;first!=last;++first)this->final_insert_ref_(*first);
+ }
+
+ void assign_iter(size_type n,value_param_type value,mpl::false_)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ clear();
+ for(size_type i=0;i<n;++i)push_back(value);
+ }
+
+ template<typename InputIterator>
+ void insert_iter(
+ iterator position,InputIterator first,InputIterator last,mpl::true_)
+ {
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ for(;first!=last;++first){
+ std::pair<final_node_type*,bool> p=
+ this->final_insert_ref_(*first);
+ if(p.second&&position.get_node()!=header()){
+ relink(position.get_node(),p.first);
+ }
+ }
+ }
+
+ void insert_iter(
+ iterator position,size_type n,value_param_type x,mpl::false_)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ for(size_type i=0;i<n;++i)insert(position,x);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_front_impl(
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ return emplace_impl(begin(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_back_impl(
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ return emplace_impl(end(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<iterator,bool> emplace_impl(
+ iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
+ BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
+ std::pair<final_node_type*,bool> p=
+ this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ if(p.second&&position.get_node()!=header()){
+ relink(position.get_node(),p.first);
+ }
+ return std::pair<iterator,bool>(make_iterator(p.first),p.second);
+ }
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+#pragma parse_mfunc_templ reset
+#endif
+};
+
+/* comparison */
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator==(
+ const sequenced_index<SuperMeta1,TagList1>& x,
+ const sequenced_index<SuperMeta2,TagList2>& y)
+{
+ return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator<(
+ const sequenced_index<SuperMeta1,TagList1>& x,
+ const sequenced_index<SuperMeta2,TagList2>& y)
+{
+ return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator!=(
+ const sequenced_index<SuperMeta1,TagList1>& x,
+ const sequenced_index<SuperMeta2,TagList2>& y)
+{
+ return !(x==y);
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator>(
+ const sequenced_index<SuperMeta1,TagList1>& x,
+ const sequenced_index<SuperMeta2,TagList2>& y)
+{
+ return y<x;
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator>=(
+ const sequenced_index<SuperMeta1,TagList1>& x,
+ const sequenced_index<SuperMeta2,TagList2>& y)
+{
+ return !(x<y);
+}
+
+template<
+ typename SuperMeta1,typename TagList1,
+ typename SuperMeta2,typename TagList2
+>
+bool operator<=(
+ const sequenced_index<SuperMeta1,TagList1>& x,
+ const sequenced_index<SuperMeta2,TagList2>& y)
+{
+ return !(x>y);
+}
+
+/* specialized algorithms */
+
+template<typename SuperMeta,typename TagList>
+void swap(
+ sequenced_index<SuperMeta,TagList>& x,
+ sequenced_index<SuperMeta,TagList>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index::detail */
+
+/* sequenced index specifier */
+
+template <typename TagList>
+struct sequenced
+{
+ BOOST_STATIC_ASSERT(detail::is_tag<TagList>::value);
+
+ template<typename Super>
+ struct node_class
+ {
+ typedef detail::sequenced_index_node<Super> type;
+ };
+
+ template<typename SuperMeta>
+ struct index_class
+ {
+ typedef detail::sequenced_index<SuperMeta,typename TagList::type> type;
+ };
+};
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+/* Boost.Foreach compatibility */
+
+template<typename SuperMeta,typename TagList>
+inline boost::mpl::true_* boost_foreach_is_noncopyable(
+ boost::multi_index::detail::sequenced_index<SuperMeta,TagList>*&,
+ boost_foreach_argument_dependent_lookup_hack)
+{
+ return 0;
+}
+
+#undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT
+#undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT_OF
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index/sequenced_index_fwd.hpp
index a019f2a6d2f..a019f2a6d2f 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/sequenced_index_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/tag.hpp b/src/third_party/boost-1.70.0/boost/multi_index/tag.hpp
index ce51f8241ee..ce51f8241ee 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index/tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index/tag.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multi_index_container.hpp b/src/third_party/boost-1.70.0/boost/multi_index_container.hpp
new file mode 100644
index 00000000000..72e42332d9c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multi_index_container.hpp
@@ -0,0 +1,1419 @@
+/* Multiply indexed container.
+ *
+ * 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_HPP
+#define BOOST_MULTI_INDEX_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <algorithm>
+#include <boost/core/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/contains.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/multi_index_container_fwd.hpp>
+#include <boost/multi_index/detail/access_specifier.hpp>
+#include <boost/multi_index/detail/adl_swap.hpp>
+#include <boost/multi_index/detail/allocator_traits.hpp>
+#include <boost/multi_index/detail/base_type.hpp>
+#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
+#include <boost/multi_index/detail/converter.hpp>
+#include <boost/multi_index/detail/header_holder.hpp>
+#include <boost/multi_index/detail/has_tag.hpp>
+#include <boost/multi_index/detail/no_duplicate_tags.hpp>
+#include <boost/multi_index/detail/safe_mode.hpp>
+#include <boost/multi_index/detail/scope_guard.hpp>
+#include <boost/multi_index/detail/vartempl_support.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/base_from_member.hpp>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+#include <boost/multi_index/detail/archive_constructed.hpp>
+#include <boost/multi_index/detail/serialization_version.hpp>
+#include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/split_member.hpp>
+#include <boost/serialization/version.hpp>
+#include <boost/throw_exception.hpp>
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+#include <boost/multi_index/detail/invariant_assert.hpp>
+#define BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x) \
+ detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
+ detail::make_obj_guard(x,&multi_index_container::check_invariant_); \
+ BOOST_JOIN(check_invariant_,__LINE__).touch();
+#define BOOST_MULTI_INDEX_CHECK_INVARIANT \
+ BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(*this)
+#else
+#define BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x)
+#define BOOST_MULTI_INDEX_CHECK_INVARIANT
+#endif
+
+namespace boost{
+
+namespace multi_index{
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
+#pragma warning(push)
+#pragma warning(disable:4522) /* spurious warning on multiple operator=()'s */
+#endif
+
+template<typename Value,typename IndexSpecifierList,typename Allocator>
+class multi_index_container:
+ private ::boost::base_from_member<
+ typename detail::rebind_alloc_for<
+ Allocator,
+ typename detail::multi_index_node_type<
+ Value,IndexSpecifierList,Allocator>::type
+ >::type
+ >,
+ BOOST_MULTI_INDEX_PRIVATE_IF_MEMBER_TEMPLATE_FRIENDS detail::header_holder<
+ typename detail::allocator_traits<
+ typename detail::rebind_alloc_for<
+ Allocator,
+ typename detail::multi_index_node_type<
+ Value,IndexSpecifierList,Allocator>::type
+ >::type
+ >::pointer,
+ multi_index_container<Value,IndexSpecifierList,Allocator> >,
+ public detail::multi_index_base_type<
+ Value,IndexSpecifierList,Allocator>::type
+{
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
+ * lifetime of const references bound to temporaries --precisely what
+ * scopeguards are.
+ */
+
+#pragma parse_mfunc_templ off
+#endif
+
+private:
+ BOOST_COPYABLE_AND_MOVABLE(multi_index_container)
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
+ template <typename,typename,typename> friend class detail::index_base;
+ template <typename,typename> friend struct detail::header_holder;
+ template <typename,typename> friend struct detail::converter;
+#endif
+
+ typedef typename detail::multi_index_base_type<
+ Value,IndexSpecifierList,Allocator>::type super;
+ typedef typename detail::rebind_alloc_for<
+ Allocator,
+ typename super::node_type
+ >::type node_allocator;
+ typedef detail::allocator_traits<node_allocator> node_alloc_traits;
+ typedef typename node_alloc_traits::pointer node_pointer;
+ typedef ::boost::base_from_member<
+ node_allocator> bfm_allocator;
+ typedef detail::header_holder<
+ node_pointer,
+ multi_index_container> bfm_header;
+
+public:
+ /* All types are inherited from super, a few are explicitly
+ * brought forward here to save us some typename's.
+ */
+
+ typedef typename super::ctor_args_list ctor_args_list;
+ typedef IndexSpecifierList index_specifier_type_list;
+
+ typedef typename super::index_type_list index_type_list;
+
+ typedef typename super::iterator_type_list iterator_type_list;
+ typedef typename super::const_iterator_type_list const_iterator_type_list;
+ typedef typename super::value_type value_type;
+ typedef typename super::final_allocator_type allocator_type;
+ typedef typename super::size_type size_type;
+ typedef typename super::iterator iterator;
+ typedef typename super::const_iterator const_iterator;
+
+ BOOST_STATIC_ASSERT(
+ detail::no_duplicate_tags_in_index_list<index_type_list>::value);
+
+ /* global project() needs to see this publicly */
+
+ typedef typename super::node_type node_type;
+
+ /* construct/copy/destroy */
+
+ multi_index_container():
+ bfm_allocator(allocator_type()),
+ super(ctor_args_list(),bfm_allocator::member),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ }
+
+ explicit multi_index_container(
+ const ctor_args_list& args_list,
+
+#if BOOST_WORKAROUND(__IBMCPP__,<=600)
+ /* VisualAge seems to have an ETI issue with the default value for
+ * argument al.
+ */
+
+ const allocator_type& al=
+ typename mpl::identity<multi_index_container>::type::
+ allocator_type()):
+#else
+ const allocator_type& al=allocator_type()):
+#endif
+
+ bfm_allocator(al),
+ super(args_list,bfm_allocator::member),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ }
+
+ explicit multi_index_container(const allocator_type& al):
+ bfm_allocator(al),
+ super(ctor_args_list(),bfm_allocator::member),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ }
+
+ template<typename InputIterator>
+ multi_index_container(
+ InputIterator first,InputIterator last,
+
+#if BOOST_WORKAROUND(__IBMCPP__,<=600)
+ /* VisualAge seems to have an ETI issue with the default values
+ * for arguments args_list and al.
+ */
+
+ const ctor_args_list& args_list=
+ typename mpl::identity<multi_index_container>::type::
+ ctor_args_list(),
+ const allocator_type& al=
+ typename mpl::identity<multi_index_container>::type::
+ allocator_type()):
+#else
+ const ctor_args_list& args_list=ctor_args_list(),
+ const allocator_type& al=allocator_type()):
+#endif
+
+ bfm_allocator(al),
+ super(args_list,bfm_allocator::member),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ BOOST_TRY{
+ iterator hint=super::end();
+ for(;first!=last;++first){
+ hint=super::make_iterator(
+ insert_ref_(*first,hint.get_node()).first);
+ ++hint;
+ }
+ }
+ BOOST_CATCH(...){
+ clear_();
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ multi_index_container(
+ std::initializer_list<Value> list,
+ const ctor_args_list& args_list=ctor_args_list(),
+ const allocator_type& al=allocator_type()):
+ bfm_allocator(al),
+ super(args_list,bfm_allocator::member),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ BOOST_TRY{
+ typedef const Value* init_iterator;
+
+ iterator hint=super::end();
+ for(init_iterator first=list.begin(),last=list.end();
+ first!=last;++first){
+ hint=super::make_iterator(insert_(*first,hint.get_node()).first);
+ ++hint;
+ }
+ }
+ BOOST_CATCH(...){
+ clear_();
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+#endif
+
+ multi_index_container(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& x):
+ bfm_allocator(x.bfm_allocator::member),
+ bfm_header(),
+ super(x),
+ node_count(0)
+ {
+ copy_map_type map(bfm_allocator::member,x.size(),x.header(),header());
+ for(const_iterator it=x.begin(),it_end=x.end();it!=it_end;++it){
+ map.clone(it.get_node());
+ }
+ super::copy_(x,map);
+ map.release();
+ node_count=x.size();
+
+ /* Not until this point are the indices required to be consistent,
+ * hence the position of the invariant checker.
+ */
+
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ }
+
+ multi_index_container(BOOST_RV_REF(multi_index_container) x):
+ bfm_allocator(x.bfm_allocator::member),
+ bfm_header(),
+ super(x,detail::do_not_copy_elements_tag()),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x);
+ swap_elements_(x);
+ }
+
+ ~multi_index_container()
+ {
+ delete_all_nodes_();
+ }
+
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ /* As per http://www.boost.org/doc/html/move/emulation_limitations.html
+ * #move.emulation_limitations.assignment_operator
+ */
+
+ multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& x)
+ {
+ multi_index_container y(x);
+ this->swap(y);
+ return *this;
+ }
+#endif
+
+ multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
+ BOOST_COPY_ASSIGN_REF(multi_index_container) x)
+ {
+ multi_index_container y(x);
+ this->swap(y);
+ return *this;
+ }
+
+ multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
+ BOOST_RV_REF(multi_index_container) x)
+ {
+ this->swap(x);
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ multi_index_container<Value,IndexSpecifierList,Allocator>& operator=(
+ std::initializer_list<Value> list)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ typedef const Value* init_iterator;
+
+ multi_index_container x(*this,detail::do_not_copy_elements_tag());
+ iterator hint=x.end();
+ for(init_iterator first=list.begin(),last=list.end();
+ first!=last;++first){
+ hint=x.make_iterator(x.insert_(*first,hint.get_node()).first);
+ ++hint;
+ }
+ x.swap_elements_(*this);
+ return*this;
+ }
+#endif
+
+ allocator_type get_allocator()const BOOST_NOEXCEPT
+ {
+ return allocator_type(bfm_allocator::member);
+ }
+
+ /* retrieval of indices by number */
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATES)
+ template<int N>
+ struct nth_index
+ {
+ BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
+ typedef typename mpl::at_c<index_type_list,N>::type type;
+ };
+
+ template<int N>
+ typename nth_index<N>::type& get()BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
+ return *this;
+ }
+
+ template<int N>
+ const typename nth_index<N>::type& get()const BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
+ return *this;
+ }
+#endif
+
+ /* retrieval of indices by tag */
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATES)
+ template<typename Tag>
+ struct index
+ {
+ typedef typename mpl::find_if<
+ index_type_list,
+ detail::has_tag<Tag>
+ >::type iter;
+
+ BOOST_STATIC_CONSTANT(
+ bool,index_found=!(is_same<iter,typename mpl::end<index_type_list>::type >::value));
+ BOOST_STATIC_ASSERT(index_found);
+
+ typedef typename mpl::deref<iter>::type type;
+ };
+
+ template<typename Tag>
+ typename index<Tag>::type& get()BOOST_NOEXCEPT
+ {
+ return *this;
+ }
+
+ template<typename Tag>
+ const typename index<Tag>::type& get()const BOOST_NOEXCEPT
+ {
+ return *this;
+ }
+#endif
+
+ /* projection of iterators by number */
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATES)
+ template<int N>
+ struct nth_index_iterator
+ {
+ typedef typename nth_index<N>::type::iterator type;
+ };
+
+ template<int N>
+ struct nth_index_const_iterator
+ {
+ typedef typename nth_index<N>::type::const_iterator type;
+ };
+
+ template<int N,typename IteratorType>
+ typename nth_index_iterator<N>::type project(IteratorType it)
+ {
+ typedef typename nth_index<N>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
+ BOOST_STATIC_ASSERT(
+ (mpl::contains<iterator_type_list,IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(
+ it,static_cast<typename IteratorType::container_type&>(*this));
+
+ return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
+ }
+
+ template<int N,typename IteratorType>
+ typename nth_index_const_iterator<N>::type project(IteratorType it)const
+ {
+ typedef typename nth_index<N>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
+ BOOST_STATIC_ASSERT((
+ mpl::contains<iterator_type_list,IteratorType>::value||
+ mpl::contains<const_iterator_type_list,IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(
+ it,static_cast<const typename IteratorType::container_type&>(*this));
+ return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
+ }
+#endif
+
+ /* projection of iterators by tag */
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATES)
+ template<typename Tag>
+ struct index_iterator
+ {
+ typedef typename index<Tag>::type::iterator type;
+ };
+
+ template<typename Tag>
+ struct index_const_iterator
+ {
+ typedef typename index<Tag>::type::const_iterator type;
+ };
+
+ template<typename Tag,typename IteratorType>
+ typename index_iterator<Tag>::type project(IteratorType it)
+ {
+ typedef typename index<Tag>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
+ BOOST_STATIC_ASSERT(
+ (mpl::contains<iterator_type_list,IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(
+ it,static_cast<typename IteratorType::container_type&>(*this));
+ return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
+ }
+
+ template<typename Tag,typename IteratorType>
+ typename index_const_iterator<Tag>::type project(IteratorType it)const
+ {
+ typedef typename index<Tag>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
+ BOOST_STATIC_ASSERT((
+ mpl::contains<iterator_type_list,IteratorType>::value||
+ mpl::contains<const_iterator_type_list,IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(
+ it,static_cast<const typename IteratorType::container_type&>(*this));
+ return index_type::make_iterator(static_cast<node_type*>(it.get_node()));
+ }
+#endif
+
+BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
+ typedef typename super::copy_map_type copy_map_type;
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ multi_index_container(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& x,
+ detail::do_not_copy_elements_tag):
+ bfm_allocator(x.bfm_allocator::member),
+ bfm_header(),
+ super(x,detail::do_not_copy_elements_tag()),
+ node_count(0)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+ }
+#endif
+
+ node_type* header()const
+ {
+ return &*bfm_header::member;
+ }
+
+ node_type* allocate_node()
+ {
+ return &*node_alloc_traits::allocate(bfm_allocator::member,1);
+ }
+
+ void deallocate_node(node_type* x)
+ {
+ node_alloc_traits::deallocate(
+ bfm_allocator::member,static_cast<node_pointer>(x),1);
+ }
+
+ void construct_value(node_type* x,const Value& v)
+ {
+ node_alloc_traits::construct(
+ bfm_allocator::member,boost::addressof(x->value()),v);
+ }
+
+ void construct_value(node_type* x,BOOST_RV_REF(Value) v)
+ {
+ node_alloc_traits::construct(
+ bfm_allocator::member,boost::addressof(x->value()),boost::move(v));
+ }
+
+ BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
+ void,construct_value,vartempl_construct_value_impl,node_type*,x)
+
+ void destroy_value(node_type* x)
+ {
+ node_alloc_traits::destroy(
+ bfm_allocator::member,boost::addressof(x->value()));
+ }
+
+ bool empty_()const
+ {
+ return node_count==0;
+ }
+
+ size_type size_()const
+ {
+ return node_count;
+ }
+
+ size_type max_size_()const
+ {
+ return static_cast<size_type>(-1);
+ }
+
+ template<typename Variant>
+ std::pair<node_type*,bool> insert_(const Value& v,Variant variant)
+ {
+ node_type* x=0;
+ node_type* res=super::insert_(v,x,variant);
+ if(res==x){
+ ++node_count;
+ return std::pair<node_type*,bool>(res,true);
+ }
+ else{
+ return std::pair<node_type*,bool>(res,false);
+ }
+ }
+
+ std::pair<node_type*,bool> insert_(const Value& v)
+ {
+ return insert_(v,detail::lvalue_tag());
+ }
+
+ std::pair<node_type*,bool> insert_rv_(const Value& v)
+ {
+ return insert_(v,detail::rvalue_tag());
+ }
+
+ template<typename T>
+ std::pair<node_type*,bool> insert_ref_(T& t)
+ {
+ node_type* x=allocate_node();
+ BOOST_TRY{
+ construct_value(x,t);
+ BOOST_TRY{
+ node_type* res=super::insert_(x->value(),x,detail::emplaced_tag());
+ if(res==x){
+ ++node_count;
+ return std::pair<node_type*,bool>(res,true);
+ }
+ else{
+ destroy_value(x);
+ deallocate_node(x);
+ return std::pair<node_type*,bool>(res,false);
+ }
+ }
+ BOOST_CATCH(...){
+ destroy_value(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ BOOST_CATCH(...){
+ deallocate_node(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ std::pair<node_type*,bool> insert_ref_(const value_type& x)
+ {
+ return insert_(x);
+ }
+
+ std::pair<node_type*,bool> insert_ref_(value_type& x)
+ {
+ return insert_(x);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<node_type*,bool> emplace_(
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ node_type* x=allocate_node();
+ BOOST_TRY{
+ construct_value(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ BOOST_TRY{
+ node_type* res=super::insert_(x->value(),x,detail::emplaced_tag());
+ if(res==x){
+ ++node_count;
+ return std::pair<node_type*,bool>(res,true);
+ }
+ else{
+ destroy_value(x);
+ deallocate_node(x);
+ return std::pair<node_type*,bool>(res,false);
+ }
+ }
+ BOOST_CATCH(...){
+ destroy_value(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ BOOST_CATCH(...){
+ deallocate_node(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ template<typename Variant>
+ std::pair<node_type*,bool> insert_(
+ const Value& v,node_type* position,Variant variant)
+ {
+ node_type* x=0;
+ node_type* res=super::insert_(v,position,x,variant);
+ if(res==x){
+ ++node_count;
+ return std::pair<node_type*,bool>(res,true);
+ }
+ else{
+ return std::pair<node_type*,bool>(res,false);
+ }
+ }
+
+ std::pair<node_type*,bool> insert_(const Value& v,node_type* position)
+ {
+ return insert_(v,position,detail::lvalue_tag());
+ }
+
+ std::pair<node_type*,bool> insert_rv_(const Value& v,node_type* position)
+ {
+ return insert_(v,position,detail::rvalue_tag());
+ }
+
+ template<typename T>
+ std::pair<node_type*,bool> insert_ref_(
+ T& t,node_type* position)
+ {
+ node_type* x=allocate_node();
+ BOOST_TRY{
+ construct_value(x,t);
+ BOOST_TRY{
+ node_type* res=super::insert_(
+ x->value(),position,x,detail::emplaced_tag());
+ if(res==x){
+ ++node_count;
+ return std::pair<node_type*,bool>(res,true);
+ }
+ else{
+ destroy_value(x);
+ deallocate_node(x);
+ return std::pair<node_type*,bool>(res,false);
+ }
+ }
+ BOOST_CATCH(...){
+ destroy_value(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ BOOST_CATCH(...){
+ deallocate_node(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ std::pair<node_type*,bool> insert_ref_(
+ const value_type& x,node_type* position)
+ {
+ return insert_(x,position);
+ }
+
+ std::pair<node_type*,bool> insert_ref_(
+ value_type& x,node_type* position)
+ {
+ return insert_(x,position);
+ }
+
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ std::pair<node_type*,bool> emplace_hint_(
+ node_type* position,
+ BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ node_type* x=allocate_node();
+ BOOST_TRY{
+ construct_value(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ BOOST_TRY{
+ node_type* res=super::insert_(
+ x->value(),position,x,detail::emplaced_tag());
+ if(res==x){
+ ++node_count;
+ return std::pair<node_type*,bool>(res,true);
+ }
+ else{
+ destroy_value(x);
+ deallocate_node(x);
+ return std::pair<node_type*,bool>(res,false);
+ }
+ }
+ BOOST_CATCH(...){
+ destroy_value(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ BOOST_CATCH(...){
+ deallocate_node(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ void erase_(node_type* x)
+ {
+ --node_count;
+ super::erase_(x);
+ deallocate_node(x);
+ }
+
+ void delete_node_(node_type* x)
+ {
+ super::delete_node_(x);
+ deallocate_node(x);
+ }
+
+ void delete_all_nodes_()
+ {
+ super::delete_all_nodes_();
+ }
+
+ void clear_()
+ {
+ delete_all_nodes_();
+ super::clear_();
+ node_count=0;
+ }
+
+ void swap_(multi_index_container<Value,IndexSpecifierList,Allocator>& x)
+ {
+ if(bfm_allocator::member!=x.bfm_allocator::member){
+ detail::adl_swap(bfm_allocator::member,x.bfm_allocator::member);
+ }
+ std::swap(bfm_header::member,x.bfm_header::member);
+ super::swap_(x);
+ std::swap(node_count,x.node_count);
+ }
+
+ void swap_elements_(
+ multi_index_container<Value,IndexSpecifierList,Allocator>& x)
+ {
+ std::swap(bfm_header::member,x.bfm_header::member);
+ super::swap_elements_(x);
+ std::swap(node_count,x.node_count);
+ }
+
+ bool replace_(const Value& k,node_type* x)
+ {
+ return super::replace_(k,x,detail::lvalue_tag());
+ }
+
+ bool replace_rv_(const Value& k,node_type* x)
+ {
+ return super::replace_(k,x,detail::rvalue_tag());
+ }
+
+ template<typename Modifier>
+ bool modify_(Modifier& mod,node_type* x)
+ {
+ BOOST_TRY{
+ mod(const_cast<value_type&>(x->value()));
+ }
+ BOOST_CATCH(...){
+ this->erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+
+ BOOST_TRY{
+ if(!super::modify_(x)){
+ deallocate_node(x);
+ --node_count;
+ return false;
+ }
+ else return true;
+ }
+ BOOST_CATCH(...){
+ deallocate_node(x);
+ --node_count;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ template<typename Modifier,typename Rollback>
+ bool modify_(Modifier& mod,Rollback& back_,node_type* x)
+ {
+ BOOST_TRY{
+ mod(const_cast<value_type&>(x->value()));
+ }
+ BOOST_CATCH(...){
+ this->erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+
+ bool b;
+ BOOST_TRY{
+ b=super::modify_rollback_(x);
+ }
+ BOOST_CATCH(...){
+ BOOST_TRY{
+ back_(const_cast<value_type&>(x->value()));
+ if(!super::check_rollback_(x))this->erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH(...){
+ this->erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ BOOST_CATCH_END
+
+ BOOST_TRY{
+ if(!b){
+ back_(const_cast<value_type&>(x->value()));
+ if(!super::check_rollback_(x))this->erase_(x);
+ return false;
+ }
+ else return true;
+ }
+ BOOST_CATCH(...){
+ this->erase_(x);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+ /* serialization */
+
+ friend class boost::serialization::access;
+
+ BOOST_SERIALIZATION_SPLIT_MEMBER()
+
+ typedef typename super::index_saver_type index_saver_type;
+ typedef typename super::index_loader_type index_loader_type;
+
+ template<class Archive>
+ void save(Archive& ar,const unsigned int version)const
+ {
+ const serialization::collection_size_type s(size_());
+ const detail::serialization_version<value_type> value_version;
+ ar<<serialization::make_nvp("count",s);
+ ar<<serialization::make_nvp("value_version",value_version);
+
+ index_saver_type sm(bfm_allocator::member,s);
+
+ for(iterator it=super::begin(),it_end=super::end();it!=it_end;++it){
+ serialization::save_construct_data_adl(
+ ar,boost::addressof(*it),value_version);
+ ar<<serialization::make_nvp("item",*it);
+ sm.add(it.get_node(),ar,version);
+ }
+ sm.add_track(header(),ar,version);
+
+ super::save_(ar,version,sm);
+ }
+
+ template<class Archive>
+ void load(Archive& ar,const unsigned int version)
+ {
+ BOOST_MULTI_INDEX_CHECK_INVARIANT;
+
+ clear_();
+ serialization::collection_size_type s;
+ detail::serialization_version<value_type> value_version;
+ if(version<1){
+ std::size_t sz;
+ ar>>serialization::make_nvp("count",sz);
+ s=static_cast<serialization::collection_size_type>(sz);
+ }
+ else{
+ ar>>serialization::make_nvp("count",s);
+ }
+ if(version<2){
+ value_version=0;
+ }
+ else{
+ ar>>serialization::make_nvp("value_version",value_version);
+ }
+
+ index_loader_type lm(bfm_allocator::member,s);
+
+ for(std::size_t n=0;n<s;++n){
+ detail::archive_constructed<Value> value("item",ar,value_version);
+ std::pair<node_type*,bool> p=insert_rv_(
+ value.get(),super::end().get_node());
+ if(!p.second)throw_exception(
+ archive::archive_exception(
+ archive::archive_exception::other_exception));
+ ar.reset_object_address(
+ boost::addressof(p.first->value()),boost::addressof(value.get()));
+ lm.add(p.first,ar,version);
+ }
+ lm.add_track(header(),ar,version);
+
+ super::load_(ar,version,lm);
+ }
+#endif
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
+ /* invariant stuff */
+
+ bool invariant_()const
+ {
+ return super::invariant_();
+ }
+
+ void check_invariant_()const
+ {
+ BOOST_MULTI_INDEX_INVARIANT_ASSERT(invariant_());
+ }
+#endif
+
+private:
+ template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
+ void vartempl_construct_value_impl(
+ node_type* x,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
+ {
+ node_alloc_traits::construct(
+ bfm_allocator::member,boost::addressof(x->value()),
+ BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
+ }
+
+ size_type node_count;
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
+ BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+#pragma parse_mfunc_templ reset
+#endif
+};
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
+#pragma warning(pop) /* C4522 */
+#endif
+
+/* retrieval of indices by number */
+
+template<typename MultiIndexContainer,int N>
+struct nth_index
+{
+ BOOST_STATIC_CONSTANT(
+ int,
+ M=mpl::size<typename MultiIndexContainer::index_type_list>::type::value);
+ BOOST_STATIC_ASSERT(N>=0&&N<M);
+ typedef typename mpl::at_c<
+ typename MultiIndexContainer::index_type_list,N>::type type;
+};
+
+template<int N,typename Value,typename IndexSpecifierList,typename Allocator>
+typename nth_index<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type&
+get(
+ multi_index_container<Value,IndexSpecifierList,Allocator>& m)BOOST_NOEXCEPT
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename nth_index<
+ multi_index_container<
+ Value,IndexSpecifierList,Allocator>,
+ N
+ >::type index_type;
+
+ BOOST_STATIC_ASSERT(N>=0&&
+ N<
+ mpl::size<
+ BOOST_DEDUCED_TYPENAME multi_index_type::index_type_list
+ >::type::value);
+
+ return detail::converter<multi_index_type,index_type>::index(m);
+}
+
+template<int N,typename Value,typename IndexSpecifierList,typename Allocator>
+const typename nth_index<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type&
+get(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& m
+)BOOST_NOEXCEPT
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename nth_index<
+ multi_index_container<
+ Value,IndexSpecifierList,Allocator>,
+ N
+ >::type index_type;
+
+ BOOST_STATIC_ASSERT(N>=0&&
+ N<
+ mpl::size<
+ BOOST_DEDUCED_TYPENAME multi_index_type::index_type_list
+ >::type::value);
+
+ return detail::converter<multi_index_type,index_type>::index(m);
+}
+
+/* retrieval of indices by tag */
+
+template<typename MultiIndexContainer,typename Tag>
+struct index
+{
+ typedef typename MultiIndexContainer::index_type_list index_type_list;
+
+ typedef typename mpl::find_if<
+ index_type_list,
+ detail::has_tag<Tag>
+ >::type iter;
+
+ BOOST_STATIC_CONSTANT(
+ bool,index_found=!(is_same<iter,typename mpl::end<index_type_list>::type >::value));
+ BOOST_STATIC_ASSERT(index_found);
+
+ typedef typename mpl::deref<iter>::type type;
+};
+
+template<
+ typename Tag,typename Value,typename IndexSpecifierList,typename Allocator
+>
+typename ::boost::multi_index::index<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type&
+get(
+ multi_index_container<Value,IndexSpecifierList,Allocator>& m)BOOST_NOEXCEPT
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename ::boost::multi_index::index<
+ multi_index_container<
+ Value,IndexSpecifierList,Allocator>,
+ Tag
+ >::type index_type;
+
+ return detail::converter<multi_index_type,index_type>::index(m);
+}
+
+template<
+ typename Tag,typename Value,typename IndexSpecifierList,typename Allocator
+>
+const typename ::boost::multi_index::index<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type&
+get(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& m
+)BOOST_NOEXCEPT
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename ::boost::multi_index::index<
+ multi_index_container<
+ Value,IndexSpecifierList,Allocator>,
+ Tag
+ >::type index_type;
+
+ return detail::converter<multi_index_type,index_type>::index(m);
+}
+
+/* projection of iterators by number */
+
+template<typename MultiIndexContainer,int N>
+struct nth_index_iterator
+{
+ typedef typename nth_index<MultiIndexContainer,N>::type::iterator type;
+};
+
+template<typename MultiIndexContainer,int N>
+struct nth_index_const_iterator
+{
+ typedef typename nth_index<MultiIndexContainer,N>::type::const_iterator type;
+};
+
+template<
+ int N,typename IteratorType,
+ typename Value,typename IndexSpecifierList,typename Allocator>
+typename nth_index_iterator<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type
+project(
+ multi_index_container<Value,IndexSpecifierList,Allocator>& m,
+ IteratorType it)
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename nth_index<multi_index_type,N>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
+ BOOST_STATIC_ASSERT((
+ mpl::contains<
+ BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
+ IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef detail::converter<
+ multi_index_type,
+ BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
+#endif
+
+ return detail::converter<multi_index_type,index_type>::iterator(
+ m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
+}
+
+template<
+ int N,typename IteratorType,
+ typename Value,typename IndexSpecifierList,typename Allocator>
+typename nth_index_const_iterator<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,N>::type
+project(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& m,
+ IteratorType it)
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename nth_index<multi_index_type,N>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
+ BOOST_STATIC_ASSERT((
+ mpl::contains<
+ BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
+ IteratorType>::value||
+ mpl::contains<
+ BOOST_DEDUCED_TYPENAME multi_index_type::const_iterator_type_list,
+ IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef detail::converter<
+ multi_index_type,
+ BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
+#endif
+
+ return detail::converter<multi_index_type,index_type>::const_iterator(
+ m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
+}
+
+/* projection of iterators by tag */
+
+template<typename MultiIndexContainer,typename Tag>
+struct index_iterator
+{
+ typedef typename ::boost::multi_index::index<
+ MultiIndexContainer,Tag>::type::iterator type;
+};
+
+template<typename MultiIndexContainer,typename Tag>
+struct index_const_iterator
+{
+ typedef typename ::boost::multi_index::index<
+ MultiIndexContainer,Tag>::type::const_iterator type;
+};
+
+template<
+ typename Tag,typename IteratorType,
+ typename Value,typename IndexSpecifierList,typename Allocator>
+typename index_iterator<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type
+project(
+ multi_index_container<Value,IndexSpecifierList,Allocator>& m,
+ IteratorType it)
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename ::boost::multi_index::index<
+ multi_index_type,Tag>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
+ BOOST_STATIC_ASSERT((
+ mpl::contains<
+ BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
+ IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef detail::converter<
+ multi_index_type,
+ BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
+#endif
+
+ return detail::converter<multi_index_type,index_type>::iterator(
+ m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
+}
+
+template<
+ typename Tag,typename IteratorType,
+ typename Value,typename IndexSpecifierList,typename Allocator>
+typename index_const_iterator<
+ multi_index_container<Value,IndexSpecifierList,Allocator>,Tag>::type
+project(
+ const multi_index_container<Value,IndexSpecifierList,Allocator>& m,
+ IteratorType it)
+{
+ typedef multi_index_container<
+ Value,IndexSpecifierList,Allocator> multi_index_type;
+ typedef typename ::boost::multi_index::index<
+ multi_index_type,Tag>::type index_type;
+
+#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */
+ BOOST_STATIC_ASSERT((
+ mpl::contains<
+ BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list,
+ IteratorType>::value||
+ mpl::contains<
+ BOOST_DEDUCED_TYPENAME multi_index_type::const_iterator_type_list,
+ IteratorType>::value));
+#endif
+
+ BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
+
+#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
+ typedef detail::converter<
+ multi_index_type,
+ BOOST_DEDUCED_TYPENAME IteratorType::container_type> converter;
+ BOOST_MULTI_INDEX_CHECK_IS_OWNER(it,converter::index(m));
+#endif
+
+ return detail::converter<multi_index_type,index_type>::const_iterator(
+ m,static_cast<typename multi_index_type::node_type*>(it.get_node()));
+}
+
+/* Comparison. Simple forward to first index. */
+
+template<
+ typename Value1,typename IndexSpecifierList1,typename Allocator1,
+ typename Value2,typename IndexSpecifierList2,typename Allocator2
+>
+bool operator==(
+ const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
+ const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
+{
+ return get<0>(x)==get<0>(y);
+}
+
+template<
+ typename Value1,typename IndexSpecifierList1,typename Allocator1,
+ typename Value2,typename IndexSpecifierList2,typename Allocator2
+>
+bool operator<(
+ const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
+ const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
+{
+ return get<0>(x)<get<0>(y);
+}
+
+template<
+ typename Value1,typename IndexSpecifierList1,typename Allocator1,
+ typename Value2,typename IndexSpecifierList2,typename Allocator2
+>
+bool operator!=(
+ const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
+ const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
+{
+ return get<0>(x)!=get<0>(y);
+}
+
+template<
+ typename Value1,typename IndexSpecifierList1,typename Allocator1,
+ typename Value2,typename IndexSpecifierList2,typename Allocator2
+>
+bool operator>(
+ const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
+ const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
+{
+ return get<0>(x)>get<0>(y);
+}
+
+template<
+ typename Value1,typename IndexSpecifierList1,typename Allocator1,
+ typename Value2,typename IndexSpecifierList2,typename Allocator2
+>
+bool operator>=(
+ const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
+ const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
+{
+ return get<0>(x)>=get<0>(y);
+}
+
+template<
+ typename Value1,typename IndexSpecifierList1,typename Allocator1,
+ typename Value2,typename IndexSpecifierList2,typename Allocator2
+>
+bool operator<=(
+ const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
+ const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y)
+{
+ return get<0>(x)<=get<0>(y);
+}
+
+/* specialized algorithms */
+
+template<typename Value,typename IndexSpecifierList,typename Allocator>
+void swap(
+ multi_index_container<Value,IndexSpecifierList,Allocator>& x,
+ multi_index_container<Value,IndexSpecifierList,Allocator>& y)
+{
+ x.swap(y);
+}
+
+} /* namespace multi_index */
+
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
+/* class version = 1 : we now serialize the size through
+ * boost::serialization::collection_size_type.
+ * class version = 2 : proper use of {save|load}_construct_data.
+ */
+
+namespace serialization {
+template<typename Value,typename IndexSpecifierList,typename Allocator>
+struct version<
+ boost::multi_index_container<Value,IndexSpecifierList,Allocator>
+>
+{
+ BOOST_STATIC_CONSTANT(int,value=2);
+};
+} /* namespace serialization */
+#endif
+
+/* Associated global functions are promoted to namespace boost, except
+ * comparison operators and swap, which are meant to be Koenig looked-up.
+ */
+
+using multi_index::get;
+using multi_index::project;
+
+} /* namespace boost */
+
+#undef BOOST_MULTI_INDEX_CHECK_INVARIANT
+#undef BOOST_MULTI_INDEX_CHECK_INVARIANT_OF
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multi_index_container_fwd.hpp b/src/third_party/boost-1.70.0/boost/multi_index_container_fwd.hpp
index b35acad407a..b35acad407a 100644
--- a/src/third_party/boost-1.69.0/boost/multi_index_container_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/multi_index_container_fwd.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float.hpp
new file mode 100644
index 00000000000..3d8369500de
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float.hpp
@@ -0,0 +1,2047 @@
+///////////////////////////////////////////////////////////////
+// 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 <class Float, int, bool = number_category<Float>::value == number_kind_floating_point>
+struct is_cpp_bin_float_implicitly_constructible_from_type
+{
+ static const bool value = false;
+};
+
+template <class Float, int bit_count>
+struct is_cpp_bin_float_implicitly_constructible_from_type<Float, bit_count, true>
+{
+ static const bool value = (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
+ && (is_floating_point<Float>::value || is_number<Float>::value)
+ ;
+};
+
+template <class Float, int, bool = number_category<Float>::value == number_kind_floating_point>
+struct is_cpp_bin_float_explicitly_constructible_from_type
+{
+ static const bool value = false;
+};
+
+template <class Float, int bit_count>
+struct is_cpp_bin_float_explicitly_constructible_from_type<Float, bit_count, true>
+{
+ static const bool value = (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
+ ;
+};
+
+}
+
+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<detail::is_cpp_bin_float_implicitly_constructible_from_type<Float, bit_count>::value>::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<detail::is_cpp_bin_float_explicitly_constructible_from_type<Float, bit_count>::value>::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
+ && is_number<Float>::value,
+ 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 & boost::serialization::make_nvp("data", m_data);
+ ar & boost::serialization::make_nvp("exponent", m_exponent);
+ ar & boost::serialization::make_nvp("sign", 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.69.0/boost/multiprecision/cpp_bin_float/io.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/io.hpp
index 8a3faaa4ff6..8a3faaa4ff6 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/io.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/io.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/transcendental.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
new file mode 100644
index 00000000000..5c1842dc7ee
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////
+// 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_MULTIPRECISION_CPP_BIN_FLOAT_TRANSCENDENTAL_HPP
+#define BOOST_MULTIPRECISION_CPP_BIN_FLOAT_TRANSCENDENTAL_HPP
+
+namespace boost{ namespace multiprecision{ namespace backends{
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+void eval_exp_taylor(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ static const int bits = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count;
+ //
+ // Taylor series for small argument, note returns exp(x) - 1:
+ //
+ res = limb_type(0);
+ cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> num(arg), denom, t;
+ denom = limb_type(1);
+ eval_add(res, num);
+
+ for(unsigned k = 2; ; ++k)
+ {
+ eval_multiply(denom, k);
+ eval_multiply(num, arg);
+ eval_divide(t, num, denom);
+ eval_add(res, t);
+ if(eval_is_zero(t) || (res.exponent() - bits > t.exponent()))
+ break;
+ }
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+void eval_exp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ //
+ // This is based on MPFR's method, let:
+ //
+ // n = floor(x / ln(2))
+ //
+ // Then:
+ //
+ // r = x - n ln(2) : 0 <= r < ln(2)
+ //
+ // We can reduce r further by dividing by 2^k, with k ~ sqrt(n),
+ // so if:
+ //
+ // e0 = exp(r / 2^k) - 1
+ //
+ // With e0 evaluated by taylor series for small arguments, then:
+ //
+ // exp(x) = 2^n (1 + e0)^2^k
+ //
+ // Note that to preserve precision we actually square (1 + e0) k times, calculating
+ // the result less one each time, i.e.
+ //
+ // (1 + e0)^2 - 1 = e0^2 + 2e0
+ //
+ // Then add the final 1 at the end, given that e0 is small, this effectively wipes
+ // out the error in the last step.
+ //
+ using default_ops::eval_multiply;
+ using default_ops::eval_subtract;
+ using default_ops::eval_add;
+ using default_ops::eval_convert_to;
+ using default_ops::eval_increment;
+
+ int type = eval_fpclassify(arg);
+ bool isneg = eval_get_sign(arg) < 0;
+ if(type == (int)FP_NAN)
+ {
+ res = arg;
+ errno = EDOM;
+ return;
+ }
+ else if(type == (int)FP_INFINITE)
+ {
+ res = arg;
+ if(isneg)
+ res = limb_type(0u);
+ else
+ res = arg;
+ return;
+ }
+ else if(type == (int)FP_ZERO)
+ {
+ res = limb_type(1);
+ return;
+ }
+ cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> t, n;
+ if(isneg)
+ {
+ t = arg;
+ t.negate();
+ eval_exp(res, t);
+ t.swap(res);
+ res = limb_type(1);
+ eval_divide(res, t);
+ return;
+ }
+
+ eval_divide(n, arg, default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >());
+ eval_floor(n, n);
+ eval_multiply(t, n, default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >());
+ eval_subtract(t, arg);
+ t.negate();
+ if (t.compare(default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >()) > 0)
+ {
+ // There are some rare cases where the multiply rounds down leaving a remainder > ln2
+ // See https://github.com/boostorg/multiprecision/issues/120
+ eval_increment(n);
+ t = limb_type(0);
+ }
+ if(eval_get_sign(t) < 0)
+ {
+ // There are some very rare cases where arg/ln2 is an integer, and the subsequent multiply
+ // rounds up, in that situation t ends up negative at this point which breaks our invariants below:
+ t = limb_type(0);
+ }
+
+ Exponent k, nn;
+ eval_convert_to(&nn, n);
+
+ if (nn == (std::numeric_limits<Exponent>::max)())
+ {
+ // The result will necessarily oveflow:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
+ return;
+ }
+
+ BOOST_ASSERT(t.compare(default_ops::get_constant_ln2<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >()) < 0);
+
+ k = nn ? Exponent(1) << (msb(nn) / 2) : 0;
+ k = (std::min)(k, (Exponent)(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count / 4));
+ eval_ldexp(t, t, -k);
+
+ eval_exp_taylor(res, t);
+ //
+ // Square 1 + res k times:
+ //
+ for(Exponent s = 0; s < k; ++s)
+ {
+ t.swap(res);
+ eval_multiply(res, t, t);
+ eval_ldexp(t, t, 1);
+ eval_add(res, t);
+ }
+ eval_add(res, limb_type(1));
+ eval_ldexp(res, res, nn);
+}
+
+}}} // namespaces
+
+#endif
+
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int.hpp
new file mode 100644
index 00000000000..6af30fd9ec6
--- /dev/null
+++ b/src/third_party/boost-1.70.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.69.0/boost/multiprecision/cpp_int/add.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/add.hpp
index 3b769cd8b62..3b769cd8b62 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/add.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multiprecision/cpp_int/bitwise.hpp
index bb0eb59e66e..bb0eb59e66e 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/bitwise.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/bitwise.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/checked.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/checked.hpp
index cafe50ea496..cafe50ea496 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/checked.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/checked.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/comparison.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/comparison.hpp
index 48a66fc2b27..48a66fc2b27 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/comparison.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/cpp_int_config.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/cpp_int_config.hpp
index eb88f3da804..eb88f3da804 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/cpp_int_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/cpp_int_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/divide.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/divide.hpp
index 81583ec384a..81583ec384a 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/divide.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multiprecision/cpp_int/import_export.hpp
index 7bb916d4ce3..7bb916d4ce3 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/import_export.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/import_export.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/limits.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/limits.hpp
index b19e1ebbe64..b19e1ebbe64 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/limits.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/literals.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/literals.hpp
index ce30fd84847..ce30fd84847 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/literals.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/literals.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/misc.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/misc.hpp
index 0985c73f42f..0985c73f42f 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/misc.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multiprecision/cpp_int/multiply.hpp
index ac01812b5c6..ac01812b5c6 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/multiply.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/multiply.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/serialize.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/serialize.hpp
new file mode 100644
index 00000000000..ad0031b9de5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/serialize.hpp
@@ -0,0 +1,203 @@
+///////////////////////////////////////////////////////////////
+// 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_MP_CPP_INT_SERIALIZE_HPP
+#define BOOST_MP_CPP_INT_SERIALIZE_HPP
+
+namespace boost {
+
+namespace archive{
+
+class binary_oarchive;
+class binary_iarchive;
+
+}
+
+namespace serialization {
+
+namespace mp = boost::multiprecision;
+
+namespace cpp_int_detail{
+
+using namespace boost::multiprecision;
+using namespace boost::multiprecision::backends;
+
+template <class T>
+struct is_binary_archive : public mpl::false_ {};
+template <>
+struct is_binary_archive<boost::archive::binary_oarchive> : public mpl::true_ {};
+template <>
+struct is_binary_archive<boost::archive::binary_iarchive> : public mpl::true_ {};
+
+//
+// We have 8 serialization methods to fill out (and test), they are all permutations of:
+// Load vs Store.
+// Trivial or non-trivial cpp_int type.
+// Binary or not archive.
+//
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::false_ const&)
+{
+ // Load.
+ // Non-trivial.
+ // Non binary.
+
+ using boost::serialization::make_nvp;
+ bool s;
+ ar & make_nvp("sign", s);
+ std::size_t limb_count;
+ std::size_t byte_count;
+ ar & make_nvp("byte-count", byte_count);
+ limb_count = byte_count / sizeof(limb_type) + ((byte_count % sizeof(limb_type)) ? 1 : 0);
+ val.resize(limb_count, limb_count);
+ limb_type* pl = val.limbs();
+ for(std::size_t i = 0; i < limb_count; ++i)
+ {
+ pl[i] = 0;
+ for(std::size_t j = 0; (j < sizeof(limb_type)) && byte_count; ++j)
+ {
+ unsigned char byte;
+ ar & make_nvp("byte", byte);
+ pl[i] |= static_cast<limb_type>(byte) << (j * CHAR_BIT);
+ --byte_count;
+ }
+ }
+ if(s != val.sign())
+ val.negate();
+ val.normalize();
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::false_ const&)
+{
+ // Store.
+ // Non-trivial.
+ // Non binary.
+
+ using boost::serialization::make_nvp;
+ bool s = val.sign();
+ ar & make_nvp("sign", s);
+ limb_type* pl = val.limbs();
+ std::size_t limb_count = val.size();
+ std::size_t byte_count = limb_count * sizeof(limb_type);
+ ar & make_nvp("byte-count", byte_count);
+
+ for(std::size_t i = 0; i < limb_count; ++i)
+ {
+ limb_type l = pl[i];
+ for(std::size_t j = 0; j < sizeof(limb_type); ++j)
+ {
+ unsigned char byte = static_cast<unsigned char>((l >> (j * CHAR_BIT)) & ((1u << CHAR_BIT) - 1));
+ ar & make_nvp("byte", byte);
+ }
+ }
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::false_ const&)
+{
+ // Load.
+ // Trivial.
+ // Non binary.
+ using boost::serialization::make_nvp;
+ bool s;
+ typename Int::local_limb_type l = 0;
+ ar & make_nvp("sign", s);
+ std::size_t byte_count;
+ ar & make_nvp("byte-count", byte_count);
+ for(std::size_t i = 0; i < byte_count; ++i)
+ {
+ unsigned char b;
+ ar & make_nvp("byte", b);
+ l |= static_cast<typename Int::local_limb_type>(b) << (i * CHAR_BIT);
+ }
+ *val.limbs() = l;
+ if(s != val.sign())
+ val.negate();
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::false_ const&)
+{
+ // Store.
+ // Trivial.
+ // Non binary.
+ using boost::serialization::make_nvp;
+ bool s = val.sign();
+ typename Int::local_limb_type l = *val.limbs();
+ ar & make_nvp("sign", s);
+ std::size_t limb_count = sizeof(l);
+ ar & make_nvp("byte-count", limb_count);
+ for(std::size_t i = 0; i < limb_count; ++i)
+ {
+ unsigned char b = static_cast<unsigned char>(static_cast<typename Int::local_limb_type>(l >> (i * CHAR_BIT)) & static_cast<typename Int::local_limb_type>((1u << CHAR_BIT) - 1));
+ ar & make_nvp("byte", b);
+ }
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::true_ const&)
+{
+ // Load.
+ // Non-trivial.
+ // Binary.
+ bool s;
+ std::size_t c;
+ ar & s;
+ ar & c;
+ val.resize(c, c);
+ ar.load_binary(val.limbs(), c * sizeof(limb_type));
+ if(s != val.sign())
+ val.negate();
+ val.normalize();
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::true_ const&)
+{
+ // Store.
+ // Non-trivial.
+ // Binary.
+ bool s = val.sign();
+ std::size_t c = val.size();
+ ar & s;
+ ar & c;
+ ar.save_binary(val.limbs(), c * sizeof(limb_type));
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::true_ const&)
+{
+ // Load.
+ // Trivial.
+ // Binary.
+ bool s;
+ ar & s;
+ ar.load_binary(val.limbs(), sizeof(*val.limbs()));
+ if(s != val.sign())
+ val.negate();
+}
+template <class Archive, class Int>
+void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::true_ const&)
+{
+ // Store.
+ // Trivial.
+ // Binary.
+ bool s = val.sign();
+ ar & s;
+ ar.save_binary(val.limbs(), sizeof(*val.limbs()));
+}
+
+}
+
+template<class Archive, unsigned MinBits, unsigned MaxBits, mp::cpp_integer_type SignType, mp::cpp_int_check_type Checked, class Allocator>
+void serialize(Archive & ar, mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& val, const unsigned int /*version*/)
+{
+ typedef typename Archive::is_saving save_tag;
+ typedef mpl::bool_<mp::backends::is_trivial_cpp_int<mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> trivial_tag;
+ typedef typename cpp_int_detail::is_binary_archive<Archive>::type binary_tag;
+
+ // Just dispatch to the correct method:
+ cpp_int_detail::do_serialize(ar, val, save_tag(), trivial_tag(), binary_tag());
+}
+
+}} // namespaces
+
+#endif // BOOST_MP_CPP_INT_SERIALIZE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/value_pack.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/value_pack.hpp
index 29d9562e04a..29d9562e04a 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/value_pack.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/cpp_int/value_pack.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/debug_adaptor.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/debug_adaptor.hpp
new file mode 100644
index 00000000000..505bea1df17
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/debug_adaptor.hpp
@@ -0,0 +1,525 @@
+///////////////////////////////////////////////////////////////
+// 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_MATH_DEBUG_ADAPTER_HPP
+#define BOOST_MATH_DEBUG_ADAPTER_HPP
+
+#include <boost/multiprecision/traits/extract_exponent_type.hpp>
+#include <boost/multiprecision/detail/integer_ops.hpp>
+
+namespace boost{
+namespace multiprecision{
+namespace backends{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+ template <class Backend>
+struct debug_adaptor
+{
+ typedef typename Backend::signed_types signed_types;
+ typedef typename Backend::unsigned_types unsigned_types;
+ typedef typename Backend::float_types float_types;
+ typedef typename extract_exponent_type<
+ Backend, number_category<Backend>::value>::type exponent_type;
+
+private:
+ std::string debug_value;
+ Backend m_value;
+public:
+ void update_view()
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ debug_value = m_value.str(0, static_cast<std::ios_base::fmtflags>(0));
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(const std::exception& e)
+ {
+ debug_value = "String conversion failed with message: \"";
+ debug_value += e.what();
+ debug_value += "\"";
+ }
+#endif
+ }
+ debug_adaptor()
+ {
+ update_view();
+ }
+ debug_adaptor(const debug_adaptor& o) : debug_value(o.debug_value), m_value(o.m_value)
+ {
+ }
+ debug_adaptor& operator = (const debug_adaptor& o)
+ {
+ debug_value = o.debug_value;
+ m_value = o.m_value;
+ return *this;
+ }
+ template <class T>
+ debug_adaptor(const T& i, const typename enable_if_c<is_convertible<T, Backend>::value>::type* = 0)
+ : m_value(i)
+ {
+ update_view();
+ }
+ template <class T>
+ debug_adaptor(const T& i, const T& j)
+ : m_value(i, j)
+ {
+ update_view();
+ }
+ template <class T>
+ typename enable_if_c<is_arithmetic<T>::value || is_convertible<T, Backend>::value, debug_adaptor&>::type operator = (const T& i)
+ {
+ m_value = i;
+ update_view();
+ return *this;
+ }
+ debug_adaptor& operator = (const char* s)
+ {
+ m_value = s;
+ update_view();
+ return *this;
+ }
+ void swap(debug_adaptor& o)
+ {
+ std::swap(m_value, o.value());
+ std::swap(debug_value, o.debug_value);
+ }
+ std::string str(std::streamsize digits, std::ios_base::fmtflags f)const
+ {
+ return m_value.str(digits, f);
+ }
+ void negate()
+ {
+ m_value.negate();
+ update_view();
+ }
+ int compare(const debug_adaptor& o)const
+ {
+ return m_value.compare(o.value());
+ }
+ template <class T>
+ int compare(const T& i)const
+ {
+ return m_value.compare(i);
+ }
+ Backend& value()
+ {
+ return m_value;
+ }
+ const Backend& value()const
+ {
+ return m_value;
+ }
+ template <class Archive>
+ void serialize(Archive& ar, const unsigned int /*version*/)
+ {
+ ar & boost::serialization::make_nvp("value", m_value);
+ typedef typename Archive::is_loading tag;
+ if(tag::value)
+ update_view();
+ }
+ static unsigned default_precision() BOOST_NOEXCEPT
+ {
+ return Backend::default_precision();
+ }
+ static void default_precision(unsigned v) BOOST_NOEXCEPT
+ {
+ Backend::default_precision(v);
+ }
+ unsigned precision()const BOOST_NOEXCEPT
+ {
+ return value().precision();
+ }
+ void precision(unsigned digits10) BOOST_NOEXCEPT
+ {
+ value().precision(digits10);
+ }
+};
+
+template <class Backend>
+inline Backend const& unwrap_debug_type(debug_adaptor<Backend> const& val)
+{
+ return val.value();
+}
+template <class T>
+inline const T& unwrap_debug_type(const T& val)
+{
+ return val;
+}
+
+#define NON_MEMBER_OP1(name, str) \
+ template <class Backend>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value());\
+ result.update_view();\
+ }
+
+#define NON_MEMBER_OP2(name, str) \
+ template <class Backend, class T>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a));\
+ result.update_view();\
+ }\
+ template <class Backend>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a));\
+ result.update_view();\
+ }
+
+#define NON_MEMBER_OP3(name, str) \
+ template <class Backend, class T, class U>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const U& b)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
+ result.update_view();\
+ }\
+ template <class Backend, class T>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const T& b)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
+ result.update_view();\
+ }\
+ template <class Backend, class T>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const debug_adaptor<Backend>& b)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
+ result.update_view();\
+ }\
+ template <class Backend>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const debug_adaptor<Backend>& b)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b));\
+ result.update_view();\
+ }
+
+#define NON_MEMBER_OP4(name, str) \
+ template <class Backend, class T, class U, class V>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const U& b, const V& c)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
+ result.update_view();\
+ }\
+ template <class Backend, class T>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const debug_adaptor<Backend>& b, const T& c)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
+ result.update_view();\
+ }\
+ template <class Backend, class T>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const T& b, const debug_adaptor<Backend>& c)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
+ result.update_view();\
+ }\
+ template <class Backend, class T>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const T& a, const debug_adaptor<Backend>& b, const debug_adaptor<Backend>& c)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
+ result.update_view();\
+ }\
+ template <class Backend>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const debug_adaptor<Backend>& b, const debug_adaptor<Backend>& c)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
+ result.update_view();\
+ }\
+ template <class Backend, class T, class U>\
+ inline void BOOST_JOIN(eval_, name)(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& a, const T& b, const U& c)\
+ {\
+ using default_ops::BOOST_JOIN(eval_, name);\
+ BOOST_JOIN(eval_, name)(result.value(), unwrap_debug_type(a), unwrap_debug_type(b), unwrap_debug_type(c));\
+ result.update_view();\
+ }\
+
+NON_MEMBER_OP2(add, "+=")
+NON_MEMBER_OP2(subtract, "-=")
+NON_MEMBER_OP2(multiply, "*=")
+NON_MEMBER_OP2(divide, "/=")
+
+template <class Backend, class R>
+inline void eval_convert_to(R* result, const debug_adaptor<Backend>& val)
+{
+ using default_ops::eval_convert_to;
+ eval_convert_to(result, val.value());
+}
+
+template <class Backend, class Exp>
+inline void eval_frexp(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& arg, Exp* exp)
+{
+ eval_frexp(result.value(), arg.value(), exp);
+ result.update_view();
+}
+
+template <class Backend, class Exp>
+inline void eval_ldexp(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& arg, Exp exp)
+{
+ eval_ldexp(result.value(), arg.value(), exp);
+ result.update_view();
+}
+
+template <class Backend, class Exp>
+inline void eval_scalbn(debug_adaptor<Backend>& result, const debug_adaptor<Backend>& arg, Exp exp)
+{
+ using default_ops::eval_scalbn;
+ eval_scalbn(result.value(), arg.value(), exp);
+ result.update_view();
+}
+
+template <class Backend>
+inline typename Backend::exponent_type eval_ilogb(const debug_adaptor<Backend>& arg)
+{
+ using default_ops::eval_ilogb;
+ return eval_ilogb(arg.value());
+}
+
+NON_MEMBER_OP2(floor, "floor")
+NON_MEMBER_OP2(ceil, "ceil")
+NON_MEMBER_OP2(sqrt, "sqrt")
+NON_MEMBER_OP2(logb, "logb")
+
+template <class Backend>
+inline int eval_fpclassify(const debug_adaptor<Backend>& arg)
+{
+ using default_ops::eval_fpclassify;
+ return eval_fpclassify(arg.value());
+}
+
+/*********************************************************************
+*
+* Optional arithmetic operations come next:
+*
+*********************************************************************/
+
+NON_MEMBER_OP3(add, "+")
+NON_MEMBER_OP3(subtract, "-")
+NON_MEMBER_OP3(multiply, "*")
+NON_MEMBER_OP3(divide, "/")
+NON_MEMBER_OP3(multiply_add, "fused-multiply-add")
+NON_MEMBER_OP3(multiply_subtract, "fused-multiply-subtract")
+NON_MEMBER_OP4(multiply_add, "fused-multiply-add")
+NON_MEMBER_OP4(multiply_subtract, "fused-multiply-subtract")
+
+NON_MEMBER_OP1(increment, "increment")
+NON_MEMBER_OP1(decrement, "decrement")
+
+/*********************************************************************
+*
+* Optional integer operations come next:
+*
+*********************************************************************/
+
+NON_MEMBER_OP2(modulus, "%=")
+NON_MEMBER_OP3(modulus, "%")
+NON_MEMBER_OP2(bitwise_or, "|=")
+NON_MEMBER_OP3(bitwise_or, "|")
+NON_MEMBER_OP2(bitwise_and, "&=")
+NON_MEMBER_OP3(bitwise_and, "&")
+NON_MEMBER_OP2(bitwise_xor, "^=")
+NON_MEMBER_OP3(bitwise_xor, "^")
+NON_MEMBER_OP4(qr, "quotient-and-remainder")
+NON_MEMBER_OP2(complement, "~")
+
+template <class Backend>
+inline void eval_left_shift(debug_adaptor<Backend>& arg, std::size_t a)
+{
+ using default_ops::eval_left_shift;
+ eval_left_shift(arg.value(), a);
+ arg.update_view();\
+}
+template <class Backend>
+inline void eval_left_shift(debug_adaptor<Backend>& arg, const debug_adaptor<Backend>& a, std::size_t b)
+{
+ using default_ops::eval_left_shift;
+ eval_left_shift(arg.value(), a.value(), b);
+ arg.update_view();\
+}
+template <class Backend>
+inline void eval_right_shift(debug_adaptor<Backend>& arg, std::size_t a)
+{
+ using default_ops::eval_right_shift;
+ eval_right_shift(arg.value(), a);
+ arg.update_view();\
+}
+template <class Backend>
+inline void eval_right_shift(debug_adaptor<Backend>& arg, const debug_adaptor<Backend>& a, std::size_t b)
+{
+ using default_ops::eval_right_shift;
+ eval_right_shift(arg.value(), a.value(), b);
+ arg.update_view();\
+}
+
+template <class Backend, class T>
+inline unsigned eval_integer_modulus(const debug_adaptor<Backend>& arg, const T& a)
+{
+ using default_ops::eval_integer_modulus;
+ return eval_integer_modulus(arg.value(), a);
+}
+
+template <class Backend>
+inline unsigned eval_lsb(const debug_adaptor<Backend>& arg)
+{
+ using default_ops::eval_lsb;
+ return eval_lsb(arg.value());
+}
+
+template <class Backend>
+inline unsigned eval_msb(const debug_adaptor<Backend>& arg)
+{
+ using default_ops::eval_msb;
+ return eval_msb(arg.value());
+}
+
+template <class Backend>
+inline bool eval_bit_test(const debug_adaptor<Backend>& arg, unsigned a)
+{
+ using default_ops::eval_bit_test;
+ return eval_bit_test(arg.value(), a);
+}
+
+template <class Backend>
+inline void eval_bit_set(const debug_adaptor<Backend>& arg, unsigned a)
+{
+ using default_ops::eval_bit_set;
+ eval_bit_set(arg.value(), a);
+ arg.update_view();\
+}
+template <class Backend>
+inline void eval_bit_unset(const debug_adaptor<Backend>& arg, unsigned a)
+{
+ using default_ops::eval_bit_unset;
+ eval_bit_unset(arg.value(), a);
+ arg.update_view();\
+}
+template <class Backend>
+inline void eval_bit_flip(const debug_adaptor<Backend>& arg, unsigned a)
+{
+ using default_ops::eval_bit_flip;
+ eval_bit_flip(arg.value(), a);
+ arg.update_view();\
+}
+
+NON_MEMBER_OP3(gcd, "gcd")
+NON_MEMBER_OP3(lcm, "lcm")
+NON_MEMBER_OP4(powm, "powm");
+
+/*********************************************************************
+*
+* abs/fabs:
+*
+*********************************************************************/
+
+NON_MEMBER_OP2(abs, "abs")
+NON_MEMBER_OP2(fabs, "fabs")
+
+/*********************************************************************
+*
+* Floating point functions:
+*
+*********************************************************************/
+
+NON_MEMBER_OP2(trunc, "trunc")
+NON_MEMBER_OP2(round, "round")
+NON_MEMBER_OP2(exp, "exp")
+NON_MEMBER_OP2(log, "log")
+NON_MEMBER_OP2(log10, "log10")
+NON_MEMBER_OP2(sin, "sin")
+NON_MEMBER_OP2(cos, "cos")
+NON_MEMBER_OP2(tan, "tan")
+NON_MEMBER_OP2(asin, "asin")
+NON_MEMBER_OP2(acos, "acos")
+NON_MEMBER_OP2(atan, "atan")
+NON_MEMBER_OP2(sinh, "sinh")
+NON_MEMBER_OP2(cosh, "cosh")
+NON_MEMBER_OP2(tanh, "tanh")
+NON_MEMBER_OP3(fmod, "fmod")
+NON_MEMBER_OP3(pow, "pow")
+NON_MEMBER_OP3(atan2, "atan2")
+
+template <class Backend>
+int eval_signbit(const debug_adaptor<Backend>& val)
+{
+ return eval_signbit(val.value());
+}
+
+template <class Backend>
+std::size_t hash_value(const debug_adaptor<Backend>& val)
+{
+ return hash_value(val.value());
+}
+
+} // namespace backends
+
+using backends::debug_adaptor;
+
+template<class Backend>
+struct number_category<backends::debug_adaptor<Backend> > : public number_category<Backend> {};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}} // namespaces
+
+namespace std{
+
+template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
+class numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::debug_adaptor<Backend>, ExpressionTemplates> >
+ : public std::numeric_limits<boost::multiprecision::number<Backend, ExpressionTemplates> >
+{
+ typedef std::numeric_limits<boost::multiprecision::number<Backend, ExpressionTemplates> > base_type;
+ typedef boost::multiprecision::number<boost::multiprecision::backends::debug_adaptor<Backend>, ExpressionTemplates> number_type;
+public:
+ static number_type (min)() BOOST_NOEXCEPT { return (base_type::min)(); }
+ static number_type (max)() BOOST_NOEXCEPT { return (base_type::max)(); }
+ static number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
+ static number_type epsilon() BOOST_NOEXCEPT { return base_type::epsilon(); }
+ static number_type round_error() BOOST_NOEXCEPT { return epsilon() / 2; }
+ static number_type infinity() BOOST_NOEXCEPT { return base_type::infinity(); }
+ static number_type quiet_NaN() BOOST_NOEXCEPT { return base_type::quiet_NaN(); }
+ static number_type signaling_NaN() BOOST_NOEXCEPT { return base_type::signaling_NaN(); }
+ static number_type denorm_min() BOOST_NOEXCEPT { return base_type::denorm_min(); }
+};
+
+} // namespace std
+
+namespace boost{ namespace math{
+
+namespace policies{
+
+template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates, class Policy>
+struct precision< boost::multiprecision::number<boost::multiprecision::debug_adaptor<Backend>, ExpressionTemplates>, Policy>
+ : public precision<boost::multiprecision::number<Backend, ExpressionTemplates>, Policy>
+{};
+
+#undef NON_MEMBER_OP1
+#undef NON_MEMBER_OP2
+#undef NON_MEMBER_OP3
+#undef NON_MEMBER_OP4
+
+} // namespace policies
+
+}} // namespaces boost::math
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/bitscan.hpp
index e6fd74ac37d..e6fd74ac37d 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/bitscan.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/default_ops.hpp
index 145ecc6729e..145ecc6729e 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/default_ops.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/detail/digits.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/digits.hpp
new file mode 100644
index 00000000000..8752f5b5b06
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/digits.hpp
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////
+// 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_DIGITS_HPP
+#define BOOST_MP_DIGITS_HPP
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+inline unsigned long digits10_2_2(unsigned long d10)
+{
+ return (d10 * 1000uL) / 301uL + ((d10 * 1000uL) % 301 ? 2u : 1u);
+}
+
+inline unsigned long digits2_2_10(unsigned long d2)
+{
+ return (d2 * 301uL) / 1000uL;
+}
+
+}}} // namespaces
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/et_ops.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/et_ops.hpp
index 3778e01029d..3778e01029d 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/et_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/et_ops.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/float_string_cvt.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/float_string_cvt.hpp
index 9b5774f1afe..9b5774f1afe 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/float_string_cvt.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multiprecision/detail/functions/constants.hpp
index a9c83f98484..a9c83f98484 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/constants.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/constants.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/pow.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/pow.hpp
new file mode 100644
index 00000000000..8fd6f1f953d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/pow.hpp
@@ -0,0 +1,910 @@
+
+// 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..
+ }
+ BOOST_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.69.0/boost/multiprecision/detail/functions/trig.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/trig.hpp
index c001f955c9f..c001f955c9f 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/trig.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/functions/trig.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/detail/generic_interconvert.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/generic_interconvert.hpp
new file mode 100644
index 00000000000..783ddca6e2e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/generic_interconvert.hpp
@@ -0,0 +1,598 @@
+///////////////////////////////////////////////////////////////////////////////
+// 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_MP_GENERIC_INTERCONVERT_HPP
+#define BOOST_MP_GENERIC_INTERCONVERT_HPP
+
+#include <boost/multiprecision/detail/default_ops.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127 6326)
+#endif
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+template <class To, class From>
+inline To do_cast(const From & from)
+{
+ return static_cast<To>(from);
+}
+template <class To, class B, ::boost::multiprecision::expression_template_option et>
+inline To do_cast(const number<B, et>& from)
+{
+ return from.template convert_to<To>();
+}
+
+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*/)
+{
+ using default_ops::eval_get_sign;
+ using default_ops::eval_bitwise_and;
+ using default_ops::eval_convert_to;
+ using default_ops::eval_right_shift;
+ using default_ops::eval_ldexp;
+ using default_ops::eval_add;
+ using default_ops::eval_is_zero;
+ // smallest unsigned type handled natively by "From" is likely to be it's limb_type:
+ typedef typename canonical<unsigned char, From>::type l_limb_type;
+ // get the corresponding type that we can assign to "To":
+ typedef typename canonical<l_limb_type, To>::type to_type;
+ From t(from);
+ bool is_neg = eval_get_sign(t) < 0;
+ if(is_neg)
+ t.negate();
+ // Pick off the first limb:
+ l_limb_type limb;
+ l_limb_type mask = static_cast<l_limb_type>(~static_cast<l_limb_type>(0));
+ From fl;
+ eval_bitwise_and(fl, t, mask);
+ eval_convert_to(&limb, fl);
+ to = static_cast<to_type>(limb);
+ eval_right_shift(t, std::numeric_limits<l_limb_type>::digits);
+ //
+ // Then keep picking off more limbs until "t" is zero:
+ //
+ To l;
+ unsigned shift = std::numeric_limits<l_limb_type>::digits;
+ while(!eval_is_zero(t))
+ {
+ eval_bitwise_and(fl, t, mask);
+ eval_convert_to(&limb, fl);
+ l = static_cast<to_type>(limb);
+ eval_right_shift(t, std::numeric_limits<l_limb_type>::digits);
+ eval_ldexp(l, l, shift);
+ eval_add(to, l);
+ shift += std::numeric_limits<l_limb_type>::digits;
+ }
+ //
+ // Finish off by setting the sign:
+ //
+ if(is_neg)
+ to.negate();
+}
+
+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*/)
+{
+ using default_ops::eval_get_sign;
+ using default_ops::eval_bitwise_and;
+ using default_ops::eval_convert_to;
+ using default_ops::eval_right_shift;
+ using default_ops::eval_left_shift;
+ using default_ops::eval_bitwise_or;
+ using default_ops::eval_is_zero;
+ // smallest unsigned type handled natively by "From" is likely to be it's limb_type:
+ typedef typename canonical<unsigned char, From>::type limb_type;
+ // get the corresponding type that we can assign to "To":
+ typedef typename canonical<limb_type, To>::type to_type;
+ From t(from);
+ bool is_neg = eval_get_sign(t) < 0;
+ if(is_neg)
+ t.negate();
+ // Pick off the first limb:
+ limb_type limb;
+ limb_type mask = static_cast<limb_type>(~static_cast<limb_type>(0));
+ From fl;
+ eval_bitwise_and(fl, t, mask);
+ eval_convert_to(&limb, fl);
+ to = static_cast<to_type>(limb);
+ eval_right_shift(t, std::numeric_limits<limb_type>::digits);
+ //
+ // Then keep picking off more limbs until "t" is zero:
+ //
+ To l;
+ unsigned shift = std::numeric_limits<limb_type>::digits;
+ while(!eval_is_zero(t))
+ {
+ eval_bitwise_and(fl, t, mask);
+ eval_convert_to(&limb, fl);
+ l = static_cast<to_type>(limb);
+ eval_right_shift(t, std::numeric_limits<limb_type>::digits);
+ eval_left_shift(l, shift);
+ eval_bitwise_or(to, l);
+ shift += std::numeric_limits<limb_type>::digits;
+ }
+ //
+ // Finish off by setting the sign:
+ //
+ if(is_neg)
+ to.negate();
+}
+
+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*/)
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+ //
+ // The code here only works when the radix of "From" is 2, we could try shifting by other
+ // radixes but it would complicate things.... use a string conversion when the radix is other
+ // than 2:
+ //
+ if(std::numeric_limits<number<From> >::radix != 2)
+ {
+ to = from.str(0, std::ios_base::fmtflags()).c_str();
+ return;
+ }
+
+
+ typedef typename canonical<unsigned char, To>::type ui_type;
+
+ using default_ops::eval_fpclassify;
+ using default_ops::eval_add;
+ using default_ops::eval_subtract;
+ using default_ops::eval_convert_to;
+ using default_ops::eval_get_sign;
+ using default_ops::eval_is_zero;
+
+ //
+ // First classify the input, then handle the special cases:
+ //
+ int c = eval_fpclassify(from);
+
+ if(c == (int)FP_ZERO)
+ {
+ to = ui_type(0);
+ return;
+ }
+ else if(c == (int)FP_NAN)
+ {
+ to = static_cast<const char*>("nan");
+ return;
+ }
+ else if(c == (int)FP_INFINITE)
+ {
+ to = static_cast<const char*>("inf");
+ if(eval_get_sign(from) < 0)
+ to.negate();
+ return;
+ }
+
+ typename From::exponent_type e;
+ From f, term;
+ to = ui_type(0);
+
+ eval_frexp(f, from, &e);
+
+ static const int shift = std::numeric_limits<boost::intmax_t>::digits - 1;
+
+ while(!eval_is_zero(f))
+ {
+ // extract int sized bits from f:
+ eval_ldexp(f, f, shift);
+ eval_floor(term, f);
+ e -= shift;
+ eval_ldexp(to, to, shift);
+ typename boost::multiprecision::detail::canonical<boost::intmax_t, To>::type ll;
+ eval_convert_to(&ll, term);
+ eval_add(to, ll);
+ eval_subtract(f, term);
+ }
+ typedef typename To::exponent_type to_exponent;
+ if((e > (std::numeric_limits<to_exponent>::max)()) || (e < (std::numeric_limits<to_exponent>::min)()))
+ {
+ to = static_cast<const char*>("inf");
+ if(eval_get_sign(from) < 0)
+ to.negate();
+ return;
+ }
+ eval_ldexp(to, to, static_cast<to_exponent>(e));
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+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*/)
+{
+ typedef typename component_type<number<To> >::type to_component_type;
+
+ number<From> t(from);
+ to_component_type n(numerator(t)), d(denominator(t));
+ using default_ops::assign_components;
+ assign_components(to, n.backend(), d.backend());
+}
+
+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*/)
+{
+ typedef typename component_type<number<To> >::type to_component_type;
+
+ number<From> t(from);
+ to_component_type n(t), d(1);
+ using default_ops::assign_components;
+ assign_components(to, n.backend(), d.backend());
+}
+
+template <class R, class LargeInteger>
+R safe_convert_to_float(const LargeInteger& i)
+{
+ using std::ldexp;
+ if(!i)
+ return R(0);
+ if(std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::max_exponent)
+ {
+ LargeInteger val(i);
+ if(val.sign() < 0)
+ val = -val;
+ unsigned mb = msb(val);
+ if(mb >= std::numeric_limits<R>::max_exponent)
+ {
+ int scale_factor = (int)mb + 1 - std::numeric_limits<R>::max_exponent;
+ BOOST_ASSERT(scale_factor >= 1);
+ val >>= scale_factor;
+ R result = val.template convert_to<R>();
+ if(std::numeric_limits<R>::digits == 0 || std::numeric_limits<R>::digits >= std::numeric_limits<R>::max_exponent)
+ {
+ //
+ // Calculate and add on the remainder, only if there are more
+ // digits in the mantissa that the size of the exponent, in
+ // other words if we are dropping digits in the conversion
+ // otherwise:
+ //
+ LargeInteger remainder(i);
+ remainder &= (LargeInteger(1) << scale_factor) - 1;
+ result += ldexp(safe_convert_to_float<R>(remainder), -scale_factor);
+ }
+ return i.sign() < 0 ? static_cast<R>(-result) : result;
+ }
+ }
+ return i.template convert_to<R>();
+}
+
+template <class To, class Integer>
+inline typename disable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
+ generic_convert_rational_to_float_imp(To& result, const Integer& n, const Integer& d, const mpl::true_&)
+{
+ //
+ // If we get here, then there's something about one type or the other
+ // that prevents an exactly rounded result from being calculated
+ // (or at least it's not clear how to implement such a thing).
+ //
+ using default_ops::eval_divide;
+ number<To> fn(safe_convert_to_float<number<To> >(n)), fd(safe_convert_to_float<number<To> >(d));
+ eval_divide(result, fn.backend(), fd.backend());
+}
+template <class To, class Integer>
+inline typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
+ generic_convert_rational_to_float_imp(To& result, const Integer& n, const Integer& d, const mpl::true_&)
+{
+ //
+ // If we get here, then there's something about one type or the other
+ // that prevents an exactly rounded result from being calculated
+ // (or at least it's not clear how to implement such a thing).
+ //
+ To fd(safe_convert_to_float<To>(d));
+ result = safe_convert_to_float<To>(n);
+ result /= fd;
+}
+
+template <class To, class Integer>
+typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
+ generic_convert_rational_to_float_imp(To& result, Integer& num, Integer& denom, const mpl::false_&)
+{
+ //
+ // If we get here, then the precision of type To is known, and the integer type is unbounded
+ // so we can use integer division plus manipulation of the remainder to get an exactly
+ // rounded result.
+ //
+ if(num == 0)
+ {
+ result = 0;
+ return;
+ }
+ bool s = false;
+ if(num < 0)
+ {
+ s = true;
+ num = -num;
+ }
+ int denom_bits = msb(denom);
+ int shift = std::numeric_limits<To>::digits + denom_bits - msb(num);
+ if(shift > 0)
+ num <<= shift;
+ else if(shift < 0)
+ denom <<= boost::multiprecision::detail::unsigned_abs(shift);
+ Integer q, r;
+ divide_qr(num, denom, q, r);
+ int q_bits = msb(q);
+ if(q_bits == std::numeric_limits<To>::digits - 1)
+ {
+ //
+ // Round up if 2 * r > denom:
+ //
+ r <<= 1;
+ int c = r.compare(denom);
+ if(c > 0)
+ ++q;
+ else if((c == 0) && (q & 1u))
+ {
+ ++q;
+ }
+ }
+ else
+ {
+ BOOST_ASSERT(q_bits == std::numeric_limits<To>::digits);
+ //
+ // We basically already have the rounding info:
+ //
+ if(q & 1u)
+ {
+ if(r || (q & 2u))
+ ++q;
+ }
+ }
+ using std::ldexp;
+ result = do_cast<To>(q);
+ result = ldexp(result, -shift);
+ if(s)
+ result = -result;
+}
+template <class To, class Integer>
+inline typename disable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
+ generic_convert_rational_to_float_imp(To& result, Integer& num, Integer& denom, const mpl::false_& tag)
+{
+ number<To> t;
+ generic_convert_rational_to_float_imp(t, num, denom, tag);
+ result = t.backend();
+}
+
+template <class To, class From>
+inline void generic_convert_rational_to_float(To& result, const From& f)
+{
+ //
+ // Type From is always a Backend to number<>, or an
+ // instance of number<>, but we allow
+ // To to be either a Backend type, or a real number type,
+ // that way we can call this from generic conversions, and
+ // from specific conversions to built in types.
+ //
+ typedef typename mpl::if_c<is_number<From>::value, From, number<From> >::type actual_from_type;
+ typedef typename mpl::if_c<is_number<To>::value || is_floating_point<To>::value, To, number<To> >::type actual_to_type;
+ typedef typename component_type<actual_from_type>::type integer_type;
+ typedef mpl::bool_<!std::numeric_limits<integer_type>::is_specialized
+ || std::numeric_limits<integer_type>::is_bounded
+ || !std::numeric_limits<actual_to_type>::is_specialized
+ || !std::numeric_limits<actual_to_type>::is_bounded
+ || (std::numeric_limits<actual_to_type>::radix != 2)> dispatch_tag;
+
+ integer_type n(numerator(static_cast<actual_from_type>(f))), d(denominator(static_cast<actual_from_type>(f)));
+ generic_convert_rational_to_float_imp(result, n, d, dispatch_tag());
+}
+
+template <class To, class From>
+inline void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/)
+{
+ generic_convert_rational_to_float(to, from);
+}
+
+template <class To, class From>
+void generic_interconvert_float2rational(To& to, const From& from, const mpl::int_<2>& /*radix*/)
+{
+ typedef typename mpl::front<typename To::unsigned_types>::type ui_type;
+ static const int shift = std::numeric_limits<boost::long_long_type>::digits;
+ typename From::exponent_type e;
+ typename component_type<number<To> >::type num, denom;
+ number<From> val(from);
+ val = frexp(val, &e);
+ while(val)
+ {
+ val = ldexp(val, shift);
+ e -= shift;
+ boost::long_long_type ll = boost::math::lltrunc(val);
+ val -= ll;
+ num <<= shift;
+ num += ll;
+ }
+ denom = ui_type(1u);
+ if(e < 0)
+ denom <<= -e;
+ else if(e > 0)
+ num <<= e;
+ assign_components(to, num.backend(), denom.backend());
+}
+
+template <class To, class From, int Radix>
+void generic_interconvert_float2rational(To& to, const From& from, const mpl::int_<Radix>& /*radix*/)
+{
+ //
+ // This is almost the same as the binary case above, but we have to use
+ // scalbn and ilogb rather than ldexp and frexp, we also only extract
+ // one Radix digit at a time which is terribly inefficient!
+ //
+ typedef typename mpl::front<typename To::unsigned_types>::type ui_type;
+ typename From::exponent_type e;
+ typename component_type<number<To> >::type num, denom;
+ number<From> val(from);
+
+ if (!val)
+ {
+ to = ui_type(0u);
+ return;
+ }
+
+ e = ilogb(val);
+ val = scalbn(val, -e);
+ while(val)
+ {
+ boost::long_long_type ll = boost::math::lltrunc(val);
+ val -= ll;
+ val = scalbn(val, 1);
+ num *= Radix;
+ num += ll;
+ --e;
+ }
+ ++e;
+ denom = ui_type(Radix);
+ denom = pow(denom, abs(e));
+ if(e > 0)
+ {
+ num *= denom;
+ denom = 1;
+ }
+ assign_components(to, num.backend(), denom.backend());
+}
+
+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_floating_point>& /*from_type*/)
+{
+ generic_interconvert_float2rational(to, from, mpl::int_<std::numeric_limits<number<From> >::radix>());
+}
+
+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_rational>& /*from_type*/)
+{
+ number<From> t(from);
+ number<To> result(numerator(t) / denominator(t));
+ to = result.backend();
+}
+
+template <class To, class From>
+void generic_interconvert_float2int(To& to, const From& from, const mpl::int_<2>& /*radix*/)
+{
+ typedef typename From::exponent_type exponent_type;
+ static const exponent_type shift = std::numeric_limits<boost::long_long_type>::digits;
+ exponent_type e;
+ number<To> num(0u);
+ number<From> val(from);
+ val = frexp(val, &e);
+ bool neg = false;
+ if (val.sign() < 0)
+ {
+ val.backend().negate();
+ neg = true;
+ }
+ while(e > 0)
+ {
+ exponent_type s = (std::min)(e, shift);
+ val = ldexp(val, s);
+ e -= s;
+ boost::long_long_type ll = boost::math::lltrunc(val);
+ val -= ll;
+ num <<= s;
+ num += ll;
+ }
+ to = num.backend();
+ if (neg)
+ to.negate();
+}
+
+template <class To, class From, int Radix>
+void generic_interconvert_float2int(To& to, const From& from, const mpl::int_<Radix>& /*radix*/)
+{
+ //
+ // This is almost the same as the binary case above, but we have to use
+ // scalbn and ilogb rather than ldexp and frexp, we also only extract
+ // one Radix digit at a time which is terribly inefficient!
+ //
+ typename From::exponent_type e;
+ number<To> num(0u);
+ number<From> val(from);
+ e = ilogb(val);
+ val = scalbn(val, -e);
+ while(e >= 0)
+ {
+ boost::long_long_type ll = boost::math::lltrunc(val);
+ val -= ll;
+ val = scalbn(val, 1);
+ num *= Radix;
+ num += ll;
+ --e;
+ }
+ to = num.backend();
+}
+
+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_floating_point>& /*from_type*/)
+{
+ generic_interconvert_float2int(to, from, mpl::int_<std::numeric_limits<number<From> >::radix>());
+}
+
+template <class To, class From, class tag>
+void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::true_&, const tag&)
+{
+ // We just want the real part, and "to" is the correct type already:
+ eval_real(to, from);
+
+ To im;
+ eval_imag(im, from);
+ if(!eval_is_zero(im))
+ BOOST_THROW_EXCEPTION(std::runtime_error("Could not convert imaginary number to scalar."));
+}
+template <class To, class From>
+void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::false_&, const mpl::true_&)
+{
+ typedef typename component_type<number<From> >::type component_number;
+ typedef typename component_number::backend_type component_backend;
+ //
+ // Get the real part and copy-construct the result from it:
+ //
+ component_backend r;
+ generic_interconvert_complex_to_scalar(r, from, mpl::true_(), mpl::true_());
+ to = r;
+}
+template <class To, class From>
+void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::false_&, const mpl::false_&)
+{
+ typedef typename component_type<number<From> >::type component_number;
+ typedef typename component_number::backend_type component_backend;
+ //
+ // Get the real part and use a generic_interconvert to type To:
+ //
+ component_backend r;
+ generic_interconvert_complex_to_scalar(r, from, mpl::true_(), mpl::true_());
+ generic_interconvert(to, r, mpl::int_<number_category<To>::value>(), mpl::int_<number_category<To>::value>());
+}
+
+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_complex>& /*from_type*/)
+{
+ typedef typename component_type<number<From> >::type component_number;
+ typedef typename component_number::backend_type component_backend;
+
+ generic_interconvert_complex_to_scalar(to, from, mpl::bool_<boost::is_same<component_backend, To>::value>(), mpl::bool_<boost::is_constructible<To, const component_backend&>::value>());
+}
+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_complex>& /*from_type*/)
+{
+ typedef typename component_type<number<From> >::type component_number;
+ typedef typename component_number::backend_type component_backend;
+
+ generic_interconvert_complex_to_scalar(to, from, mpl::bool_<boost::is_same<component_backend, To>::value>(), mpl::bool_<boost::is_constructible<To, const component_backend&>::value>());
+}
+
+}
+}
+} // namespaces
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MP_GENERIC_INTERCONVERT_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/integer_ops.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/integer_ops.hpp
index 4b1a9d8baed..4b1a9d8baed 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/integer_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/integer_ops.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/min_max.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/min_max.hpp
index 56ac5346cfe..56ac5346cfe 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/min_max.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multiprecision/detail/no_et_ops.hpp
index 7058e387e69..7058e387e69 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/no_et_ops.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/no_et_ops.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/detail/number_base.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/number_base.hpp
new file mode 100644
index 00000000000..cb29515706e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/number_base.hpp
@@ -0,0 +1,1650 @@
+///////////////////////////////////////////////////////////////////////////////
+// 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 serialization
+ {
+ template <class T>
+ struct nvp;
+ template<class T>
+ const nvp< T > make_nvp(const char * name, T & t);
+ }
+
+ 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, bool, bool>
+struct number_category_base : public mpl::int_<number_kind_unknown> {};
+template <class Num>
+struct number_category_base<Num, true, false> : 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 Num>
+struct number_category : public number_category_base<Num, boost::is_class<Num>::value || boost::is_arithmetic<Num>::value, boost::is_abstract<Num>::value> {};
+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<boost::int128_type> : public mpl::int_<number_kind_integer> {};
+template <>
+struct number_category<boost::uint128_type> : 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.69.0/boost/multiprecision/detail/number_compare.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/number_compare.hpp
index 0c9618484a0..0c9618484a0 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_compare.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/number_compare.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/detail/precision.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/precision.hpp
new file mode 100644
index 00000000000..c5d373a33dd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/precision.hpp
@@ -0,0 +1,190 @@
+///////////////////////////////////////////////////////////////////////////////
+// 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>
+#include <boost/multiprecision/detail/digits.hpp>
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+ template <class B, boost::multiprecision::expression_template_option ET>
+ inline BOOST_CONSTEXPR unsigned current_precision_of_last_chance_imp(const boost::multiprecision::number<B, ET>&, const mpl::false_&)
+ {
+ return std::numeric_limits<boost::multiprecision::number<B, ET> >::digits10;
+ }
+ template <class B, boost::multiprecision::expression_template_option ET>
+ inline unsigned current_precision_of_last_chance_imp(const boost::multiprecision::number<B, ET>& val, const mpl::true_&)
+ {
+ //
+ // We have an arbitrary precision integer, take it's "precision" as the
+ // location of the most-significant-bit less the location of the
+ // least-significant-bit, ie the number of bits required to represent the
+ // the value assuming we will have an exponent to shift things by:
+ //
+ return val.is_zero() ? 1 : digits2_2_10(msb(abs(val)) - lsb(abs(val)) + 1);
+ }
+
+
+ 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>& val, const mpl::false_&)
+ {
+ return current_precision_of_last_chance_imp(val,
+ mpl::bool_<
+ std::numeric_limits<boost::multiprecision::number<B, ET> >::is_specialized
+ && std::numeric_limits<boost::multiprecision::number<B, ET> >::is_integer
+ && std::numeric_limits<boost::multiprecision::number<B, ET> >::is_exact
+ && !std::numeric_limits<boost::multiprecision::number<B, ET> >::is_modulo>());
+ }
+
+ 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()));
+ }
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4130)
+#endif
+
+ template <class R, bool = boost::multiprecision::detail::is_variable_precision<R>::value>
+ struct scoped_default_precision
+ {
+ template <class T>
+ BOOST_CONSTEXPR scoped_default_precision(const T&) {}
+ template <class T, class U>
+ BOOST_CONSTEXPR scoped_default_precision(const T&, const U&) {}
+ template <class T, class U, class V>
+ BOOST_CONSTEXPR scoped_default_precision(const T&, const U&, const V&) {}
+
+ //
+ // This function is never called: in C++17 it won't be compiled either:
+ //
+ unsigned precision()const
+ {
+ BOOST_ASSERT("This function should never be called!!" == 0);
+ return 0;
+ }
+ };
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+ template <class R>
+ struct scoped_default_precision<R, true>
+ {
+ template <class T>
+ BOOST_CXX14_CONSTEXPR scoped_default_precision(const T& a)
+ {
+ init(current_precision_of(a));
+ }
+ template <class T, class U>
+ BOOST_CXX14_CONSTEXPR 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>
+ BOOST_CXX14_CONSTEXPR 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_old_prec);
+ }
+ BOOST_CXX14_CONSTEXPR unsigned precision()const
+ {
+ return m_new_prec;
+ }
+ private:
+ BOOST_CXX14_CONSTEXPR void init(unsigned p)
+ {
+ m_old_prec = R::default_precision();
+ if (p)
+ {
+ R::default_precision(p);
+ m_new_prec = p;
+ }
+ else
+ m_new_prec = m_old_prec;
+ }
+ unsigned m_old_prec, m_new_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.70.0/boost/multiprecision/detail/rebind.hpp
index 1ad0f7dec07..1ad0f7dec07 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/rebind.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/rebind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/ublas_interop.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/detail/ublas_interop.hpp
index cf56dc9fb8c..cf56dc9fb8c 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/detail/ublas_interop.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/detail/ublas_interop.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/integer.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/integer.hpp
index e4c8bf8b6cb..e4c8bf8b6cb 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/integer.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/integer.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/number.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/number.hpp
new file mode 100644
index 00000000000..892996b397f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/number.hpp
@@ -0,0 +1,2252 @@
+///////////////////////////////////////////////////////////////////////////////
+// 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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)
+ {
+ //
+ // No preicsion guard here, we already have one in operator=
+ //
+ *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)
+ {
+ //
+ // No precision guard as assign has one already:
+ //
+ 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 (precision_guard.precision() != 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 & boost::serialization::make_nvp("backend", 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.70.0/boost/multiprecision/rational_adaptor.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/rational_adaptor.hpp
new file mode 100644
index 00000000000..860a43bfa8e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/rational_adaptor.hpp
@@ -0,0 +1,367 @@
+///////////////////////////////////////////////////////////////
+// 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_
+
+#ifndef BOOST_MATH_RATIONAL_ADAPTER_HPP
+#define BOOST_MATH_RATIONAL_ADAPTER_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <boost/cstdint.hpp>
+#include <boost/functional/hash_fwd.hpp>
+#include <boost/multiprecision/number.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4512 4127)
+#endif
+#include <boost/rational.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+namespace boost{
+namespace multiprecision{
+namespace backends{
+
+template <class IntBackend>
+struct rational_adaptor
+{
+ typedef number<IntBackend> integer_type;
+ typedef boost::rational<integer_type> rational_type;
+
+ typedef typename IntBackend::signed_types signed_types;
+ typedef typename IntBackend::unsigned_types unsigned_types;
+ typedef typename IntBackend::float_types float_types;
+
+ rational_adaptor() BOOST_MP_NOEXCEPT_IF(noexcept(rational_type())) {}
+ rational_adaptor(const rational_adaptor& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<rational_type&>() = std::declval<const rational_type&>()))
+ {
+ m_value = o.m_value;
+ }
+ rational_adaptor(const IntBackend& o) BOOST_MP_NOEXCEPT_IF(noexcept(rational_type(std::declval<const IntBackend&>()))) : m_value(o) {}
+
+ template <class U>
+ rational_adaptor(const U& u, typename enable_if_c<is_convertible<U, IntBackend>::value>::type* = 0)
+ : m_value(static_cast<integer_type>(u)){}
+ template <class U>
+ explicit rational_adaptor(const U& u,
+ typename enable_if_c<
+ boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_convertible<U, IntBackend>::value
+ >::type* = 0)
+ : m_value(IntBackend(u)){}
+ template <class U>
+ typename enable_if_c<(boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_arithmetic<U>::value), rational_adaptor&>::type operator = (const U& u)
+ {
+ m_value = IntBackend(u);
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ rational_adaptor(rational_adaptor&& o) BOOST_MP_NOEXCEPT_IF(noexcept(rational_type(std::declval<rational_type>()))) : m_value(static_cast<rational_type&&>(o.m_value)) {}
+ rational_adaptor(IntBackend&& o) BOOST_MP_NOEXCEPT_IF(noexcept(rational_type(std::declval<IntBackend>()))) : m_value(static_cast<IntBackend&&>(o)) {}
+ rational_adaptor& operator = (rational_adaptor&& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<rational_type&>() = std::declval<rational_type>()))
+ {
+ m_value = static_cast<rational_type&&>(o.m_value);
+ return *this;
+ }
+#endif
+ rational_adaptor& operator = (const rational_adaptor& o)
+ {
+ m_value = o.m_value;
+ return *this;
+ }
+ rational_adaptor& operator = (const IntBackend& o)
+ {
+ m_value = o;
+ return *this;
+ }
+ template <class Int>
+ typename enable_if<is_integral<Int>, rational_adaptor&>::type operator = (Int i)
+ {
+ m_value = i;
+ return *this;
+ }
+ template <class Float>
+ typename enable_if<is_floating_point<Float>, rational_adaptor&>::type operator = (Float i)
+ {
+ int e;
+ Float f = std::frexp(i, &e);
+ f = std::ldexp(f, std::numeric_limits<Float>::digits);
+ e -= std::numeric_limits<Float>::digits;
+ integer_type num(f);
+ integer_type denom(1u);
+ if(e > 0)
+ {
+ num <<= e;
+ }
+ else if(e < 0)
+ {
+ denom <<= -e;
+ }
+ m_value.assign(num, denom);
+ return *this;
+ }
+ rational_adaptor& operator = (const char* s)
+ {
+ std::string s1;
+ multiprecision::number<IntBackend> v1, v2;
+ char c;
+ bool have_hex = false;
+ const char* p = s; // saved for later
+
+ while((0 != (c = *s)) && (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);
+ ++s;
+ }
+ v1.assign(s1);
+ s1.erase();
+ if(c == '/')
+ {
+ ++s;
+ while((0 != (c = *s)) && (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);
+ ++s;
+ }
+ v2.assign(s1);
+ }
+ else
+ v2 = 1;
+ if(*s)
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error(std::string("Could not parse the string \"") + p + std::string("\" as a valid rational number.")));
+ }
+ data().assign(v1, v2);
+ return *this;
+ }
+ void swap(rational_adaptor& o)
+ {
+ std::swap(m_value, o.m_value);
+ }
+ std::string str(std::streamsize digits, std::ios_base::fmtflags f)const
+ {
+ //
+ // We format the string ourselves so we can match what GMP's mpq type does:
+ //
+ std::string result = data().numerator().str(digits, f);
+ if(data().denominator() != 1)
+ {
+ result.append(1, '/');
+ result.append(data().denominator().str(digits, f));
+ }
+ return result;
+ }
+ void negate()
+ {
+ m_value = -m_value;
+ }
+ int compare(const rational_adaptor& o)const
+ {
+ return m_value > o.m_value ? 1 : (m_value < o.m_value ? -1 : 0);
+ }
+ template <class Arithmatic>
+ typename enable_if_c<is_arithmetic<Arithmatic>::value && !is_floating_point<Arithmatic>::value, int>::type compare(Arithmatic i)const
+ {
+ return m_value > i ? 1 : (m_value < i ? -1 : 0);
+ }
+ template <class Arithmatic>
+ typename enable_if_c<is_floating_point<Arithmatic>::value, int>::type compare(Arithmatic i)const
+ {
+ rational_adaptor r;
+ r = i;
+ return this->compare(r);
+ }
+ rational_type& data() { return m_value; }
+ const rational_type& data()const { return m_value; }
+
+ template <class Archive>
+ void serialize(Archive& ar, const mpl::true_&)
+ {
+ // Saving
+ integer_type n(m_value.numerator()), d(m_value.denominator());
+ ar & boost::serialization::make_nvp("numerator", n);
+ ar & boost::serialization::make_nvp("denominator", d);
+ }
+ template <class Archive>
+ void serialize(Archive& ar, const mpl::false_&)
+ {
+ // Loading
+ integer_type n, d;
+ ar & boost::serialization::make_nvp("numerator", n);
+ ar & boost::serialization::make_nvp("denominator", d);
+ m_value.assign(n, d);
+ }
+ template <class Archive>
+ void serialize(Archive& ar, const unsigned int /*version*/)
+ {
+ typedef typename Archive::is_saving tag;
+ serialize(ar, tag());
+ }
+private:
+ rational_type m_value;
+};
+
+template <class IntBackend>
+inline void eval_add(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
+{
+ result.data() += o.data();
+}
+template <class IntBackend>
+inline void eval_subtract(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
+{
+ result.data() -= o.data();
+}
+template <class IntBackend>
+inline void eval_multiply(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
+{
+ result.data() *= o.data();
+}
+template <class IntBackend>
+inline void eval_divide(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o)
+{
+ using default_ops::eval_is_zero;
+ if(eval_is_zero(o))
+ {
+ BOOST_THROW_EXCEPTION(std::overflow_error("Divide by zero."));
+ }
+ result.data() /= o.data();
+}
+
+template <class R, class IntBackend>
+inline typename enable_if_c<number_category<R>::value == number_kind_floating_point>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend)
+{
+ //
+ // The generic conversion is as good as anything we can write here:
+ //
+ ::boost::multiprecision::detail::generic_convert_rational_to_float(*result, backend);
+}
+
+template <class R, class IntBackend>
+inline typename enable_if_c<(number_category<R>::value != number_kind_integer) && (number_category<R>::value != number_kind_floating_point)>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend)
+{
+ typedef typename component_type<number<rational_adaptor<IntBackend> > >::type comp_t;
+ comp_t num(backend.data().numerator());
+ comp_t denom(backend.data().denominator());
+ *result = num.template convert_to<R>();
+ *result /= denom.template convert_to<R>();
+}
+
+template <class R, class IntBackend>
+inline typename enable_if_c<number_category<R>::value == number_kind_integer>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend)
+{
+ typedef typename component_type<number<rational_adaptor<IntBackend> > >::type comp_t;
+ comp_t t = backend.data().numerator();
+ t /= backend.data().denominator();
+ *result = t.template convert_to<R>();
+}
+
+template <class IntBackend>
+inline bool eval_is_zero(const rational_adaptor<IntBackend>& val)
+{
+ using default_ops::eval_is_zero;
+ return eval_is_zero(val.data().numerator().backend());
+}
+template <class IntBackend>
+inline int eval_get_sign(const rational_adaptor<IntBackend>& val)
+{
+ using default_ops::eval_get_sign;
+ return eval_get_sign(val.data().numerator().backend());
+}
+
+template<class IntBackend, class V>
+inline void assign_components(rational_adaptor<IntBackend>& result, const V& v1, const V& v2)
+{
+ result.data().assign(v1, v2);
+}
+
+template <class IntBackend>
+inline std::size_t hash_value(const rational_adaptor<IntBackend>& val)
+{
+ std::size_t result = hash_value(val.data().numerator());
+ boost::hash_combine(result, val.data().denominator());
+ return result;
+}
+
+
+} // namespace backends
+
+template<class IntBackend>
+struct expression_template_default<backends::rational_adaptor<IntBackend> > : public expression_template_default<IntBackend> {};
+
+template<class IntBackend>
+struct number_category<backends::rational_adaptor<IntBackend> > : public mpl::int_<number_kind_rational>{};
+
+using boost::multiprecision::backends::rational_adaptor;
+
+template <class Backend, expression_template_option ExpressionTemplates>
+struct component_type<number<backends::rational_adaptor<Backend>, ExpressionTemplates> >
+{
+ typedef number<Backend, ExpressionTemplates> type;
+};
+
+template <class IntBackend, expression_template_option ET>
+inline number<IntBackend, ET> numerator(const number<rational_adaptor<IntBackend>, ET>& val)
+{
+ return val.backend().data().numerator();
+}
+template <class IntBackend, expression_template_option ET>
+inline number<IntBackend, ET> denominator(const number<rational_adaptor<IntBackend>, ET>& val)
+{
+ return val.backend().data().denominator();
+}
+
+#ifdef BOOST_NO_SFINAE_EXPR
+
+namespace detail{
+
+template<class U, class IntBackend>
+struct is_explicitly_convertible<U, rational_adaptor<IntBackend> > : public is_explicitly_convertible<U, IntBackend> {};
+
+}
+
+#endif
+
+}} // namespaces
+
+
+namespace std{
+
+template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates>
+class numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> > : public std::numeric_limits<boost::multiprecision::number<IntBackend, ExpressionTemplates> >
+{
+ typedef std::numeric_limits<boost::multiprecision::number<IntBackend> > base_type;
+ typedef boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend> > number_type;
+public:
+ BOOST_STATIC_CONSTEXPR bool is_integer = false;
+ BOOST_STATIC_CONSTEXPR bool is_exact = true;
+ BOOST_STATIC_CONSTEXPR number_type (min)() { return (base_type::min)(); }
+ BOOST_STATIC_CONSTEXPR number_type (max)() { return (base_type::max)(); }
+ BOOST_STATIC_CONSTEXPR number_type lowest() { return -(max)(); }
+ BOOST_STATIC_CONSTEXPR number_type epsilon() { return base_type::epsilon(); }
+ BOOST_STATIC_CONSTEXPR number_type round_error() { return epsilon() / 2; }
+ BOOST_STATIC_CONSTEXPR number_type infinity() { return base_type::infinity(); }
+ BOOST_STATIC_CONSTEXPR number_type quiet_NaN() { return base_type::quiet_NaN(); }
+ BOOST_STATIC_CONSTEXPR number_type signaling_NaN() { return base_type::signaling_NaN(); }
+ BOOST_STATIC_CONSTEXPR number_type denorm_min() { return base_type::denorm_min(); }
+};
+
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+
+template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> >::is_integer;
+template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> >::is_exact;
+
+#endif
+
+
+}
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/traits/explicit_conversion.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/traits/explicit_conversion.hpp
new file mode 100644
index 00000000000..9ebec6a93b6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/traits/explicit_conversion.hpp
@@ -0,0 +1,99 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright Vicente J. Botet Escriba 2009-2011
+// 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_EXPLICIT_CONVERTIBLE_HPP
+#define BOOST_MP_EXPLICIT_CONVERTIBLE_HPP
+
+#include <boost/config.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/multiprecision/detail/number_base.hpp> // number_category
+
+namespace boost {
+ namespace multiprecision {
+ namespace detail {
+
+ template <unsigned int N>
+ struct dummy_size {};
+
+ template<typename S, typename T>
+ struct has_generic_interconversion
+ {
+ typedef typename boost::conditional <
+ is_number<S>::value && is_number<T>::value,
+ typename boost::conditional <
+ number_category<S>::value == number_kind_integer,
+ typename boost::conditional<
+ number_category<T>::value == number_kind_integer
+ || number_category<T>::value == number_kind_floating_point
+ || number_category<T>::value == number_kind_rational
+ || number_category<T>::value == number_kind_fixed_point,
+ boost::true_type,
+ boost::false_type
+ >::type,
+ typename boost::conditional<
+ number_category<S>::value == number_kind_rational,
+ typename boost::conditional<
+ number_category<T>::value == number_kind_rational
+ || number_category<T>::value == number_kind_rational,
+ boost::true_type,
+ boost::false_type
+ >::type,
+ typename boost::conditional<
+ number_category<T>::value == number_kind_floating_point,
+ boost::true_type,
+ boost::false_type
+ >::type
+ >::type
+ > ::type,
+ boost::false_type
+ > ::type type;
+ };
+
+ template<typename S, typename T>
+ struct is_explicitly_convertible_imp
+ {
+#ifndef BOOST_NO_SFINAE_EXPR
+ template<typename S1, typename T1>
+ static type_traits::yes_type selector(dummy_size<sizeof(new T1(boost::declval<
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ S1
+#else
+ S1 const&
+#endif
+ >()))>*);
+
+ template<typename S1, typename T1>
+ static type_traits::no_type selector(...);
+
+ static const bool value = sizeof(selector<S, T>(0)) == sizeof(type_traits::yes_type);
+
+ typedef boost::integral_constant<bool, value> type;
+#else
+ typedef typename has_generic_interconversion<S, T>::type gen_type;
+ typedef boost::integral_constant<bool, boost::is_convertible<S, T>::value || gen_type::value> type;
+#endif
+ };
+
+template<typename From, typename To>
+struct is_explicitly_convertible : public is_explicitly_convertible_imp<From, To>::type
+{
+};
+
+#ifdef BOOST_NO_SFINAE_EXPR
+template<class Backend1, expression_template_option ExpressionTemplates1, class Backend2, expression_template_option ExpressionTemplates2>
+struct is_explicitly_convertible<number<Backend1, ExpressionTemplates1>, number<Backend2, ExpressionTemplates2> >
+ : public is_explicitly_convertible<Backend1, Backend2>
+{
+};
+#endif
+
+}}} // namespaces
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/traits/extract_exponent_type.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/traits/extract_exponent_type.hpp
index adb30d54367..adb30d54367 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/traits/extract_exponent_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/traits/extract_exponent_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_backend.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_backend.hpp
index 2a26b19df01..2a26b19df01 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_backend.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_backend.hpp
diff --git a/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_byte_container.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_byte_container.hpp
new file mode 100644
index 00000000000..64999800a7f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_byte_container.hpp
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////
+// 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_0.txt)
+
+#ifndef BOOST_IS_BYTE_CONTAINER_HPP
+#define BOOST_IS_BYTE_CONTAINER_HPP
+
+#include <iterator>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_const_iterator, const_iterator, false)
+
+ template <class C, bool b>
+ struct is_byte_container_imp
+ {
+ // Note: Don't use C::value_type as this is a rather widespread typedef, even for non-range types
+ typedef typename boost::remove_cv<typename std::iterator_traits<typename C::const_iterator>::value_type>::type container_value_type;
+ static const bool value = boost::is_integral<container_value_type>::value && (sizeof(container_value_type) == 1);
+ };
+
+ template <class C>
+ struct is_byte_container_imp<C, false> : public boost::false_type {};
+
+ template <class C>
+ struct is_byte_container : public is_byte_container_imp<C, has_member_const_iterator<C>::value> {};
+
+
+}}} // namespaces
+
+#endif // BOOST_IS_BYTE_CONTAINER_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_restricted_conversion.hpp b/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_restricted_conversion.hpp
index ff8f7f63cbe..ff8f7f63cbe 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_restricted_conversion.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/multiprecision/traits/is_variable_precision.hpp
index c76f512331f..c76f512331f 100644
--- a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_variable_precision.hpp
+++ b/src/third_party/boost-1.70.0/boost/multiprecision/traits/is_variable_precision.hpp
diff --git a/src/third_party/boost-1.69.0/boost/next_prior.hpp b/src/third_party/boost-1.70.0/boost/next_prior.hpp
index 5de705f591b..5de705f591b 100644
--- a/src/third_party/boost-1.69.0/boost/next_prior.hpp
+++ b/src/third_party/boost-1.70.0/boost/next_prior.hpp
diff --git a/src/third_party/boost-1.69.0/boost/non_type.hpp b/src/third_party/boost-1.70.0/boost/non_type.hpp
index 896aed4d34b..896aed4d34b 100644
--- a/src/third_party/boost-1.69.0/boost/non_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/non_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/noncopyable.hpp b/src/third_party/boost-1.70.0/boost/noncopyable.hpp
index e998ee864a8..e998ee864a8 100644
--- a/src/third_party/boost-1.69.0/boost/noncopyable.hpp
+++ b/src/third_party/boost-1.70.0/boost/noncopyable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/none.hpp b/src/third_party/boost-1.70.0/boost/none.hpp
index a37c45c5143..a37c45c5143 100644
--- a/src/third_party/boost-1.69.0/boost/none.hpp
+++ b/src/third_party/boost-1.70.0/boost/none.hpp
diff --git a/src/third_party/boost-1.69.0/boost/none_t.hpp b/src/third_party/boost-1.70.0/boost/none_t.hpp
index 008f369d1cd..008f369d1cd 100644
--- a/src/third_party/boost-1.69.0/boost/none_t.hpp
+++ b/src/third_party/boost-1.70.0/boost/none_t.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/bounds.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/bounds.hpp
index e4c7c7deee8..e4c7c7deee8 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/bounds.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/bounds.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/cast.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/cast.hpp
index 61286c13119..61286c13119 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/conversion_traits.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/conversion_traits.hpp
index 23e0eb8c9ab..23e0eb8c9ab 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/conversion_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/conversion_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/converter.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/converter.hpp
index 331caddea54..331caddea54 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/converter.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/converter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/converter_policies.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/converter_policies.hpp
index e7a5e67ce9e..e7a5e67ce9e 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/converter_policies.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/converter_policies.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/bounds.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/bounds.hpp
index 67342b8e570..67342b8e570 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/bounds.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/bounds.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/conversion_traits.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/conversion_traits.hpp
index ed25349c671..ed25349c671 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/conversion_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/conversion_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/converter.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/converter.hpp
index f7bf7b4436a..f7bf7b4436a 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/converter.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/converter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/int_float_mixture.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/int_float_mixture.hpp
index 464e52753fe..464e52753fe 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/int_float_mixture.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/int_float_mixture.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/is_subranged.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/is_subranged.hpp
index b5e7fe8f1e8..b5e7fe8f1e8 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/is_subranged.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/is_subranged.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/meta.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/meta.hpp
index 246a1b4702d..246a1b4702d 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/meta.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/meta.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp
index 150490d935f..150490d935f 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/old_numeric_cast.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/old_numeric_cast.hpp
index 9901ed2ae34..9901ed2ae34 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/old_numeric_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/old_numeric_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
index 01dc9321b3c..01dc9321b3c 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
index b358b9c41f5..b358b9c41f5 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/sign_mixture.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/sign_mixture.hpp
index c7f9e42afe8..c7f9e42afe8 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/sign_mixture.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/sign_mixture.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
index 36dbc491b5e..36dbc491b5e 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/int_float_mixture_enum.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/int_float_mixture_enum.hpp
index d0c2daacfc8..d0c2daacfc8 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/int_float_mixture_enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/int_float_mixture_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/numeric_cast_traits.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/numeric_cast_traits.hpp
index e24296bc7ec..e24296bc7ec 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/numeric_cast_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/numeric_cast_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/sign_mixture_enum.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/sign_mixture_enum.hpp
index 1525f8d33ce..1525f8d33ce 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/sign_mixture_enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/sign_mixture_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp b/src/third_party/boost-1.70.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
index 2540e806308..2540e806308 100644
--- a/src/third_party/boost-1.69.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/operators.hpp b/src/third_party/boost-1.70.0/boost/operators.hpp
index 156571c1a93..156571c1a93 100644
--- a/src/third_party/boost-1.69.0/boost/operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional.hpp b/src/third_party/boost-1.70.0/boost/optional.hpp
index 40cf12e6560..40cf12e6560 100644
--- a/src/third_party/boost-1.69.0/boost/optional.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/bad_optional_access.hpp b/src/third_party/boost-1.70.0/boost/optional/bad_optional_access.hpp
index cabf43fbace..cabf43fbace 100644
--- a/src/third_party/boost-1.69.0/boost/optional/bad_optional_access.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/bad_optional_access.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/experimental_traits.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/experimental_traits.hpp
index b51f5f10449..b51f5f10449 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/experimental_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/optional/detail/old_optional_implementation.hpp
index f8dc260d52c..f8dc260d52c 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/old_optional_implementation.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/old_optional_implementation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_aligned_storage.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/optional_aligned_storage.hpp
index 2937349f525..2937349f525 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_aligned_storage.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/optional_aligned_storage.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_config.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/optional_config.hpp
index bb7e12f9fc1..bb7e12f9fc1 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/optional_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_factory_support.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/optional_factory_support.hpp
index efff92a5032..efff92a5032 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_factory_support.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/optional_factory_support.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_reference_spec.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/optional_reference_spec.hpp
index 4be140c283b..4be140c283b 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_reference_spec.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/optional_reference_spec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_relops.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/optional_relops.hpp
index 2c17f2b7273..2c17f2b7273 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_relops.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/optional_relops.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_swap.hpp b/src/third_party/boost-1.70.0/boost/optional/detail/optional_swap.hpp
index 2a7059e7014..2a7059e7014 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_swap.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/optional/detail/optional_trivially_copyable_base.hpp
index 5a37eacfec3..5a37eacfec3 100644
--- a/src/third_party/boost-1.69.0/boost/optional/detail/optional_trivially_copyable_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/detail/optional_trivially_copyable_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/optional.hpp b/src/third_party/boost-1.70.0/boost/optional/optional.hpp
index 90acd40a172..90acd40a172 100644
--- a/src/third_party/boost-1.69.0/boost/optional/optional.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/optional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/optional_fwd.hpp b/src/third_party/boost-1.70.0/boost/optional/optional_fwd.hpp
index faee253e55b..faee253e55b 100644
--- a/src/third_party/boost-1.69.0/boost/optional/optional_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/optional_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/optional_io.hpp b/src/third_party/boost-1.70.0/boost/optional/optional_io.hpp
index ce81b68f8e4..ce81b68f8e4 100644
--- a/src/third_party/boost-1.69.0/boost/optional/optional_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/optional/optional_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/pointee.hpp b/src/third_party/boost-1.70.0/boost/pointee.hpp
index f3bcf446b4b..f3bcf446b4b 100644
--- a/src/third_party/boost-1.69.0/boost/pointee.hpp
+++ b/src/third_party/boost-1.70.0/boost/pointee.hpp
diff --git a/src/third_party/boost-1.69.0/boost/pointer_cast.hpp b/src/third_party/boost-1.70.0/boost/pointer_cast.hpp
index d47327bc700..d47327bc700 100644
--- a/src/third_party/boost-1.69.0/boost/pointer_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/pointer_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/pointer_to_other.hpp b/src/third_party/boost-1.70.0/boost/pointer_to_other.hpp
index d7d455dc6e3..d7d455dc6e3 100644
--- a/src/third_party/boost-1.69.0/boost/pointer_to_other.hpp
+++ b/src/third_party/boost-1.70.0/boost/pointer_to_other.hpp
diff --git a/src/third_party/boost-1.69.0/boost/predef.h b/src/third_party/boost-1.70.0/boost/predef.h
index 4965337875d..4965337875d 100644
--- a/src/third_party/boost-1.69.0/boost/predef.h
+++ b/src/third_party/boost-1.70.0/boost/predef.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture.h b/src/third_party/boost-1.70.0/boost/predef/architecture.h
index 120d557963b..120d557963b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/alpha.h b/src/third_party/boost-1.70.0/boost/predef/architecture/alpha.h
index 5bcade18b17..5bcade18b17 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/alpha.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/alpha.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/architecture/arm.h b/src/third_party/boost-1.70.0/boost/predef/architecture/arm.h
new file mode 100644
index 00000000000..45a0a8e306c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/arm.h
@@ -0,0 +1,133 @@
+/*
+Copyright Rene Rivera 2008-2019
+Copyright Franz Detro 2014
+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_PREDEF_ARCHITECTURE_ARM_H
+#define BOOST_PREDEF_ARCHITECTURE_ARM_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_ARCH_ARM`]
+
+[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__ARM_ARCH`] [__predef_detection__]]
+ [[`__TARGET_ARCH_ARM`] [__predef_detection__]]
+ [[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
+ [[`_M_ARM`] [__predef_detection__]]
+ [[`__arm__`] [__predef_detection__]]
+ [[`__arm64`] [__predef_detection__]]
+ [[`__thumb__`] [__predef_detection__]]
+ [[`_M_ARM64`] [__predef_detection__]]
+ [[`__aarch64__`] [__predef_detection__]]
+ [[`__AARCH64EL__`] [__predef_detection__]]
+ [[`__ARM_ARCH_7__`] [__predef_detection__]]
+ [[`__ARM_ARCH_7A__`] [__predef_detection__]]
+ [[`__ARM_ARCH_7R__`] [__predef_detection__]]
+ [[`__ARM_ARCH_7M__`] [__predef_detection__]]
+ [[`__ARM_ARCH_6K__`] [__predef_detection__]]
+ [[`__ARM_ARCH_6Z__`] [__predef_detection__]]
+ [[`__ARM_ARCH_6KZ__`] [__predef_detection__]]
+ [[`__ARM_ARCH_6T2__`] [__predef_detection__]]
+ [[`__ARM_ARCH_5TE__`] [__predef_detection__]]
+ [[`__ARM_ARCH_5TEJ__`] [__predef_detection__]]
+ [[`__ARM_ARCH_4T__`] [__predef_detection__]]
+ [[`__ARM_ARCH_4__`] [__predef_detection__]]
+
+ [[`__ARM_ARCH`] [V.0.0]]
+ [[`__TARGET_ARCH_ARM`] [V.0.0]]
+ [[`__TARGET_ARCH_THUMB`] [V.0.0]]
+ [[`_M_ARM`] [V.0.0]]
+ [[`__arm64`] [8.0.0]]
+ [[`_M_ARM64`] [8.0.0]]
+ [[`__aarch64__`] [8.0.0]]
+ [[`__AARCH64EL__`] [8.0.0]]
+ [[`__ARM_ARCH_7__`] [7.0.0]]
+ [[`__ARM_ARCH_7A__`] [7.0.0]]
+ [[`__ARM_ARCH_7R__`] [7.0.0]]
+ [[`__ARM_ARCH_7M__`] [7.0.0]]
+ [[`__ARM_ARCH_6K__`] [6.0.0]]
+ [[`__ARM_ARCH_6Z__`] [6.0.0]]
+ [[`__ARM_ARCH_6KZ__`] [6.0.0]]
+ [[`__ARM_ARCH_6T2__`] [6.0.0]]
+ [[`__ARM_ARCH_5TE__`] [5.0.0]]
+ [[`__ARM_ARCH_5TEJ__`] [5.0.0]]
+ [[`__ARM_ARCH_4T__`] [4.0.0]]
+ [[`__ARM_ARCH_4__`] [4.0.0]]
+ ]
+ */
+
+#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if \
+ defined(__ARM_ARCH) || defined(__TARGET_ARCH_ARM) || \
+ defined(__TARGET_ARCH_THUMB) || defined(_M_ARM) || \
+ defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
+ defined(_M_ARM64) || defined(__aarch64__) || defined(__AARCH64EL__) || \
+ defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
+ defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
+ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
+ defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) || \
+ defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) || \
+ defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__)
+# undef BOOST_ARCH_ARM
+# if !defined(BOOST_ARCH_ARM) && defined(__ARM_ARCH)
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__ARM_ARCH,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && ( \
+ defined(__arm64) || defined(_M_ARM64) || defined(__aarch64__) || \
+ defined(__AARCH64EL__) )
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && ( \
+ defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
+ defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) )
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(7,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && ( \
+ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
+ defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) )
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(6,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && ( \
+ defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) )
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(5,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM) && ( \
+ defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__) )
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(4,0,0)
+# endif
+# if !defined(BOOST_ARCH_ARM)
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+#endif
+
+#if BOOST_ARCH_ARM
+# define BOOST_ARCH_ARM_AVAILABLE
+#endif
+
+#define BOOST_ARCH_ARM_NAME "ARM"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/blackfin.h b/src/third_party/boost-1.70.0/boost/predef/architecture/blackfin.h
index 84c58a25e9f..84c58a25e9f 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/blackfin.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/blackfin.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/convex.h b/src/third_party/boost-1.70.0/boost/predef/architecture/convex.h
index ac783a9cc1a..ac783a9cc1a 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/convex.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/convex.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/ia64.h b/src/third_party/boost-1.70.0/boost/predef/architecture/ia64.h
index 9b1972bd398..9b1972bd398 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/ia64.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/ia64.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/m68k.h b/src/third_party/boost-1.70.0/boost/predef/architecture/m68k.h
index 63ed5f8479b..63ed5f8479b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/m68k.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/m68k.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/mips.h b/src/third_party/boost-1.70.0/boost/predef/architecture/mips.h
index 0189d7dbd65..0189d7dbd65 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/mips.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/mips.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/parisc.h b/src/third_party/boost-1.70.0/boost/predef/architecture/parisc.h
index c75a1f38892..c75a1f38892 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/parisc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/parisc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/ppc.h b/src/third_party/boost-1.70.0/boost/predef/architecture/ppc.h
index e8c57c91f2c..e8c57c91f2c 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/ppc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/ppc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/ptx.h b/src/third_party/boost-1.70.0/boost/predef/architecture/ptx.h
index 335517b276e..335517b276e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/ptx.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/ptx.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/pyramid.h b/src/third_party/boost-1.70.0/boost/predef/architecture/pyramid.h
index 4f13253807a..4f13253807a 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/pyramid.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/pyramid.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/rs6k.h b/src/third_party/boost-1.70.0/boost/predef/architecture/rs6k.h
index 8a6e9b6b534..8a6e9b6b534 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/rs6k.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/rs6k.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/sparc.h b/src/third_party/boost-1.70.0/boost/predef/architecture/sparc.h
index a89a5100b8f..a89a5100b8f 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/sparc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/sparc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/superh.h b/src/third_party/boost-1.70.0/boost/predef/architecture/superh.h
index da0529e5e03..da0529e5e03 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/superh.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/superh.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/sys370.h b/src/third_party/boost-1.70.0/boost/predef/architecture/sys370.h
index cfd85dc803b..cfd85dc803b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/sys370.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/sys370.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/sys390.h b/src/third_party/boost-1.70.0/boost/predef/architecture/sys390.h
index 47aff6acd63..47aff6acd63 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/sys390.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/sys390.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/x86.h b/src/third_party/boost-1.70.0/boost/predef/architecture/x86.h
index 0ef3ef45efd..0ef3ef45efd 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/x86.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/x86.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/x86/32.h b/src/third_party/boost-1.70.0/boost/predef/architecture/x86/32.h
index 17fbff554a8..17fbff554a8 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/x86/32.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/x86/32.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/x86/64.h b/src/third_party/boost-1.70.0/boost/predef/architecture/x86/64.h
index f761c92596c..f761c92596c 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/x86/64.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/x86/64.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/architecture/z.h b/src/third_party/boost-1.70.0/boost/predef/architecture/z.h
index 3d218aa2644..3d218aa2644 100644
--- a/src/third_party/boost-1.69.0/boost/predef/architecture/z.h
+++ b/src/third_party/boost-1.70.0/boost/predef/architecture/z.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler.h b/src/third_party/boost-1.70.0/boost/predef/compiler.h
index de1b4ab573a..de1b4ab573a 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/borland.h b/src/third_party/boost-1.70.0/boost/predef/compiler/borland.h
index 3677cca7fda..3677cca7fda 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/borland.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/borland.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/clang.h b/src/third_party/boost-1.70.0/boost/predef/compiler/clang.h
index 56678fe6a5e..56678fe6a5e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/clang.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/clang.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/comeau.h b/src/third_party/boost-1.70.0/boost/predef/compiler/comeau.h
index 15a45648961..15a45648961 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/comeau.h
+++ b/src/third_party/boost-1.70.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.70.0/boost/predef/compiler/compaq.h
index c6a83ffd0d5..c6a83ffd0d5 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/compaq.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/compaq.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/diab.h b/src/third_party/boost-1.70.0/boost/predef/compiler/diab.h
index f5a37de7d3f..f5a37de7d3f 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/diab.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/diab.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/digitalmars.h b/src/third_party/boost-1.70.0/boost/predef/compiler/digitalmars.h
index 9bd58502e0f..9bd58502e0f 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/digitalmars.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/digitalmars.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/dignus.h b/src/third_party/boost-1.70.0/boost/predef/compiler/dignus.h
index c65d3dc7648..c65d3dc7648 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/dignus.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/dignus.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/edg.h b/src/third_party/boost-1.70.0/boost/predef/compiler/edg.h
index 2ffb9b0a6d3..2ffb9b0a6d3 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/edg.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/edg.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/ekopath.h b/src/third_party/boost-1.70.0/boost/predef/compiler/ekopath.h
index e5cde36752c..e5cde36752c 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/ekopath.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/ekopath.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/gcc.h b/src/third_party/boost-1.70.0/boost/predef/compiler/gcc.h
index c2d7fff178b..c2d7fff178b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/gcc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/gcc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/gcc_xml.h b/src/third_party/boost-1.70.0/boost/predef/compiler/gcc_xml.h
index acae600c812..acae600c812 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/gcc_xml.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/gcc_xml.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/greenhills.h b/src/third_party/boost-1.70.0/boost/predef/compiler/greenhills.h
index 23b8f017d8b..23b8f017d8b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/greenhills.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/greenhills.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/hp_acc.h b/src/third_party/boost-1.70.0/boost/predef/compiler/hp_acc.h
index 7b3ffe9068a..7b3ffe9068a 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/hp_acc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/hp_acc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/iar.h b/src/third_party/boost-1.70.0/boost/predef/compiler/iar.h
index 237f492e291..237f492e291 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/iar.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/iar.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/ibm.h b/src/third_party/boost-1.70.0/boost/predef/compiler/ibm.h
index 6931ebd8840..6931ebd8840 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/ibm.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/ibm.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/intel.h b/src/third_party/boost-1.70.0/boost/predef/compiler/intel.h
index f8a17ef437e..f8a17ef437e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/intel.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/intel.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/kai.h b/src/third_party/boost-1.70.0/boost/predef/compiler/kai.h
index 68ce84e1466..68ce84e1466 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/kai.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/kai.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/llvm.h b/src/third_party/boost-1.70.0/boost/predef/compiler/llvm.h
index de654eb8cec..de654eb8cec 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/llvm.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/llvm.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/metaware.h b/src/third_party/boost-1.70.0/boost/predef/compiler/metaware.h
index 1a32039cef5..1a32039cef5 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/metaware.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/metaware.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/metrowerks.h b/src/third_party/boost-1.70.0/boost/predef/compiler/metrowerks.h
index f2d739b958b..f2d739b958b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/metrowerks.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/metrowerks.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/microtec.h b/src/third_party/boost-1.70.0/boost/predef/compiler/microtec.h
index 066a6d2ad9e..066a6d2ad9e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/microtec.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/microtec.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/mpw.h b/src/third_party/boost-1.70.0/boost/predef/compiler/mpw.h
index 118330646e0..118330646e0 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/mpw.h
+++ b/src/third_party/boost-1.70.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.70.0/boost/predef/compiler/nvcc.h
index 4130539958d..4130539958d 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/nvcc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/nvcc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/palm.h b/src/third_party/boost-1.70.0/boost/predef/compiler/palm.h
index 707925a6511..707925a6511 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/palm.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/palm.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/pgi.h b/src/third_party/boost-1.70.0/boost/predef/compiler/pgi.h
index e016aeb0806..e016aeb0806 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/pgi.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/pgi.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/sgi_mipspro.h b/src/third_party/boost-1.70.0/boost/predef/compiler/sgi_mipspro.h
index 00739f0c3c8..00739f0c3c8 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/sgi_mipspro.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/sgi_mipspro.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/sunpro.h b/src/third_party/boost-1.70.0/boost/predef/compiler/sunpro.h
index 92c39260136..92c39260136 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/sunpro.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/sunpro.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/tendra.h b/src/third_party/boost-1.70.0/boost/predef/compiler/tendra.h
index c2bc5e4ef56..c2bc5e4ef56 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/tendra.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/tendra.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/visualc.h b/src/third_party/boost-1.70.0/boost/predef/compiler/visualc.h
index f81e61ed522..f81e61ed522 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/visualc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/visualc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/watcom.h b/src/third_party/boost-1.70.0/boost/predef/compiler/watcom.h
index b0e7776d064..b0e7776d064 100644
--- a/src/third_party/boost-1.69.0/boost/predef/compiler/watcom.h
+++ b/src/third_party/boost-1.70.0/boost/predef/compiler/watcom.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/_cassert.h b/src/third_party/boost-1.70.0/boost/predef/detail/_cassert.h
index 940e944e2bb..940e944e2bb 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/_cassert.h
+++ b/src/third_party/boost-1.70.0/boost/predef/detail/_cassert.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/_exception.h b/src/third_party/boost-1.70.0/boost/predef/detail/_exception.h
index f5a6687a9fa..f5a6687a9fa 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/_exception.h
+++ b/src/third_party/boost-1.70.0/boost/predef/detail/_exception.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/comp_detected.h b/src/third_party/boost-1.70.0/boost/predef/detail/comp_detected.h
index fda1801b657..fda1801b657 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/comp_detected.h
+++ b/src/third_party/boost-1.70.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.70.0/boost/predef/detail/endian_compat.h
index 421064ef39d..421064ef39d 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/endian_compat.h
+++ b/src/third_party/boost-1.70.0/boost/predef/detail/endian_compat.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/os_detected.h b/src/third_party/boost-1.70.0/boost/predef/detail/os_detected.h
index 08e10f993af..08e10f993af 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/os_detected.h
+++ b/src/third_party/boost-1.70.0/boost/predef/detail/os_detected.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/platform_detected.h b/src/third_party/boost-1.70.0/boost/predef/detail/platform_detected.h
index 4faf6938d88..4faf6938d88 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/platform_detected.h
+++ b/src/third_party/boost-1.70.0/boost/predef/detail/platform_detected.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/test.h b/src/third_party/boost-1.70.0/boost/predef/detail/test.h
index 546a9e407d3..546a9e407d3 100644
--- a/src/third_party/boost-1.69.0/boost/predef/detail/test.h
+++ b/src/third_party/boost-1.70.0/boost/predef/detail/test.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware.h b/src/third_party/boost-1.70.0/boost/predef/hardware.h
index 972b73af68a..972b73af68a 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd.h
index ac5c9da2cab..ac5c9da2cab 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/arm.h
index 3b3fc3fa366..3b3fc3fa366 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/arm.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm/versions.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/arm/versions.h
index 8425b318628..8425b318628 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm/versions.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/arm/versions.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/ppc.h
index eef25c2d269..eef25c2d269 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/ppc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc/versions.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/ppc/versions.h
index ffe3f0b1e5a..ffe3f0b1e5a 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc/versions.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/ppc/versions.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86.h
index 88bd81e362b..88bd81e362b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86/versions.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86/versions.h
index 0c7a4d38132..0c7a4d38132 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86/versions.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86/versions.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86_amd.h
index c80d1ce2b77..c80d1ce2b77 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86_amd.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd/versions.h b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86_amd/versions.h
index 1f9e96c500c..1f9e96c500c 100644
--- a/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd/versions.h
+++ b/src/third_party/boost-1.70.0/boost/predef/hardware/simd/x86_amd/versions.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/language.h b/src/third_party/boost-1.70.0/boost/predef/language.h
index 9ce3cc98b4b..9ce3cc98b4b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/language.h
+++ b/src/third_party/boost-1.70.0/boost/predef/language.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/language/cuda.h b/src/third_party/boost-1.70.0/boost/predef/language/cuda.h
index 5c5fed30810..5c5fed30810 100644
--- a/src/third_party/boost-1.69.0/boost/predef/language/cuda.h
+++ b/src/third_party/boost-1.70.0/boost/predef/language/cuda.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/language/objc.h b/src/third_party/boost-1.70.0/boost/predef/language/objc.h
index 24e3ad3c5c0..24e3ad3c5c0 100644
--- a/src/third_party/boost-1.69.0/boost/predef/language/objc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/language/objc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/language/stdc.h b/src/third_party/boost-1.70.0/boost/predef/language/stdc.h
index db25c12dc08..db25c12dc08 100644
--- a/src/third_party/boost-1.69.0/boost/predef/language/stdc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/language/stdc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/language/stdcpp.h b/src/third_party/boost-1.70.0/boost/predef/language/stdcpp.h
index 34dc8c7deb7..34dc8c7deb7 100644
--- a/src/third_party/boost-1.69.0/boost/predef/language/stdcpp.h
+++ b/src/third_party/boost-1.70.0/boost/predef/language/stdcpp.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library.h b/src/third_party/boost-1.70.0/boost/predef/library.h
index 40518a90d80..40518a90d80 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c.h b/src/third_party/boost-1.70.0/boost/predef/library/c.h
index 7ca84cc0799..7ca84cc0799 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c/_prefix.h b/src/third_party/boost-1.70.0/boost/predef/library/c/_prefix.h
index 12bcb0fb3fb..12bcb0fb3fb 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c/_prefix.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c/_prefix.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c/cloudabi.h b/src/third_party/boost-1.70.0/boost/predef/library/c/cloudabi.h
index e6acaee65d3..e6acaee65d3 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c/cloudabi.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c/cloudabi.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c/gnu.h b/src/third_party/boost-1.70.0/boost/predef/library/c/gnu.h
index 9e4ca89d642..9e4ca89d642 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c/gnu.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c/gnu.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c/uc.h b/src/third_party/boost-1.70.0/boost/predef/library/c/uc.h
index 03081e94c62..03081e94c62 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c/uc.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c/uc.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c/vms.h b/src/third_party/boost-1.70.0/boost/predef/library/c/vms.h
index 685f1a77d6c..685f1a77d6c 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c/vms.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c/vms.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/c/zos.h b/src/third_party/boost-1.70.0/boost/predef/library/c/zos.h
index 222d35539f5..222d35539f5 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/c/zos.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/c/zos.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std.h b/src/third_party/boost-1.70.0/boost/predef/library/std.h
index 403b6ff37af..403b6ff37af 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/_prefix.h b/src/third_party/boost-1.70.0/boost/predef/library/std/_prefix.h
index 932b8557b18..932b8557b18 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/_prefix.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/_prefix.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/cxx.h b/src/third_party/boost-1.70.0/boost/predef/library/std/cxx.h
index 07b52cd6af8..07b52cd6af8 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/cxx.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/cxx.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/dinkumware.h b/src/third_party/boost-1.70.0/boost/predef/library/std/dinkumware.h
index 0fc077605d6..0fc077605d6 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/dinkumware.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/dinkumware.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/libcomo.h b/src/third_party/boost-1.70.0/boost/predef/library/std/libcomo.h
index 97d4a53d6f6..97d4a53d6f6 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/libcomo.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/libcomo.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/modena.h b/src/third_party/boost-1.70.0/boost/predef/library/std/modena.h
index b67ac62f17b..b67ac62f17b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/modena.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/modena.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/msl.h b/src/third_party/boost-1.70.0/boost/predef/library/std/msl.h
index d73c74c6d84..d73c74c6d84 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/msl.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/msl.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/roguewave.h b/src/third_party/boost-1.70.0/boost/predef/library/std/roguewave.h
index 9c3f288b6f9..9c3f288b6f9 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/roguewave.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/roguewave.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/sgi.h b/src/third_party/boost-1.70.0/boost/predef/library/std/sgi.h
index 5d19bbac4d9..5d19bbac4d9 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/sgi.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/sgi.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/stdcpp3.h b/src/third_party/boost-1.70.0/boost/predef/library/std/stdcpp3.h
index c9802924a7b..c9802924a7b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/stdcpp3.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/stdcpp3.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/stlport.h b/src/third_party/boost-1.70.0/boost/predef/library/std/stlport.h
index c09483bd9fa..c09483bd9fa 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/stlport.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/stlport.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/library/std/vacpp.h b/src/third_party/boost-1.70.0/boost/predef/library/std/vacpp.h
index 632f846c201..632f846c201 100644
--- a/src/third_party/boost-1.69.0/boost/predef/library/std/vacpp.h
+++ b/src/third_party/boost-1.70.0/boost/predef/library/std/vacpp.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/make.h b/src/third_party/boost-1.70.0/boost/predef/make.h
index fccd2d3cc94..fccd2d3cc94 100644
--- a/src/third_party/boost-1.69.0/boost/predef/make.h
+++ b/src/third_party/boost-1.70.0/boost/predef/make.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/os.h b/src/third_party/boost-1.70.0/boost/predef/os.h
new file mode 100644
index 00000000000..9a9f9c68aba
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/os.h
@@ -0,0 +1,34 @@
+/*
+Copyright Rene Rivera 2008-2015
+Copyright Franz Detro 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)
+*/
+
+#if !defined(BOOST_PREDEF_OS_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS)
+#ifndef BOOST_PREDEF_OS_H
+#define BOOST_PREDEF_OS_H
+#endif
+
+#include <boost/predef/os/aix.h>
+#include <boost/predef/os/amigaos.h>
+#include <boost/predef/os/beos.h>
+#include <boost/predef/os/bsd.h>
+#include <boost/predef/os/cygwin.h>
+#include <boost/predef/os/haiku.h>
+#include <boost/predef/os/hpux.h>
+#include <boost/predef/os/irix.h>
+#include <boost/predef/os/ios.h>
+#include <boost/predef/os/linux.h>
+#include <boost/predef/os/macos.h>
+#include <boost/predef/os/os400.h>
+#include <boost/predef/os/qnxnto.h>
+#include <boost/predef/os/solaris.h>
+#include <boost/predef/os/unix.h>
+#include <boost/predef/os/vms.h>
+#include <boost/predef/os/windows.h>
+
+#include <boost/predef/os/android.h>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/aix.h b/src/third_party/boost-1.70.0/boost/predef/os/aix.h
index 3e5a953f1bd..3e5a953f1bd 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/aix.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/aix.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/amigaos.h b/src/third_party/boost-1.70.0/boost/predef/os/amigaos.h
index 7b32ddf59ca..7b32ddf59ca 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/amigaos.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/amigaos.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/os/android.h b/src/third_party/boost-1.70.0/boost/predef/os/android.h
new file mode 100644
index 00000000000..564423f3696
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/os/android.h
@@ -0,0 +1,48 @@
+/*
+Copyright Rene Rivera 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_ANDROID_H
+#define BOOST_PREDEF_OS_ANDROID_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_OS_ANDROID`]
+
+NOTE: `BOOST_OS_ANDROID` is deprecated, and will be removed in a following release.
+Please use `BOOST_PLAT_ANDROID` instead.
+
+[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__ANDROID__`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
+ defined(__ANDROID__) \
+ )
+# undef BOOST_OS_ANDROID
+# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
+#endif
+
+#if BOOST_OS_ANDROID
+# define BOOST_OS_ANDROID_AVAILABLE
+# include <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_ANDROID_NAME "Android"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_ANDROID,BOOST_OS_ANDROID_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/beos.h b/src/third_party/boost-1.70.0/boost/predef/os/beos.h
index 19f4cb71e3f..19f4cb71e3f 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/beos.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/beos.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/os/bsd.h b/src/third_party/boost-1.70.0/boost/predef/os/bsd.h
new file mode 100644
index 00000000000..81d2c08bf49
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/os/bsd.h
@@ -0,0 +1,101 @@
+/*
+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_BSD_H
+#define BOOST_PREDEF_OS_BSD_H
+
+/* Special case: OSX will define BSD predefs if the sys/param.h
+ * header is included. We can guard against that, but only if we
+ * detect OSX first. Hence we will force include OSX detection
+ * before doing any BSD detection.
+ */
+#include <boost/predef/os/macos.h>
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_OS_BSD`]
+
+[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system.
+
+BSD has various branch operating systems possible and each detected
+individually. This detects the following variations and sets a specific
+version number macro to match:
+
+* `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD]
+* `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD]
+* `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS]
+* `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD]
+* `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD]
+
+[note The general `BOOST_OS_BSD` is set in all cases to indicate some form
+of BSD. If the above variants is detected the corresponding macro is also set.]
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`BSD`] [__predef_detection__]]
+ [[`_SYSTYPE_BSD`] [__predef_detection__]]
+
+ [[`BSD4_2`] [4.2.0]]
+ [[`BSD4_3`] [4.3.0]]
+ [[`BSD4_4`] [4.4.0]]
+ [[`BSD`] [V.R.0]]
+ ]
+ */
+
+#include <boost/predef/os/bsd/bsdi.h>
+#include <boost/predef/os/bsd/dragonfly.h>
+#include <boost/predef/os/bsd/free.h>
+#include <boost/predef/os/bsd/open.h>
+#include <boost/predef/os/bsd/net.h>
+
+#ifndef BOOST_OS_BSD
+#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE
+#endif
+
+#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
+ defined(BSD) || \
+ defined(_SYSTYPE_BSD) \
+ )
+# undef BOOST_OS_BSD
+# include <sys/param.h>
+# if !defined(BOOST_OS_BSD) && defined(BSD4_4)
+# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0)
+# endif
+# if !defined(BOOST_OS_BSD) && defined(BSD4_3)
+# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0)
+# endif
+# if !defined(BOOST_OS_BSD) && defined(BSD4_2)
+# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0)
+# endif
+# if !defined(BOOST_OS_BSD) && defined(BSD)
+# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD)
+# endif
+# if !defined(BOOST_OS_BSD)
+# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+#endif
+
+#if BOOST_OS_BSD
+# define BOOST_OS_BSD_AVAILABLE
+# include <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_NAME "BSD"
+
+#endif
+
+#include <boost/predef/os/bsd/bsdi.h>
+#include <boost/predef/os/bsd/dragonfly.h>
+#include <boost/predef/os/bsd/free.h>
+#include <boost/predef/os/bsd/open.h>
+#include <boost/predef/os/bsd/net.h>
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/bsd/bsdi.h b/src/third_party/boost-1.70.0/boost/predef/os/bsd/bsdi.h
index afdcd3eb7c4..afdcd3eb7c4 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/bsd/bsdi.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/bsd/bsdi.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/bsd/dragonfly.h b/src/third_party/boost-1.70.0/boost/predef/os/bsd/dragonfly.h
index 1d075798a1e..1d075798a1e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/bsd/dragonfly.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/bsd/dragonfly.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/bsd/free.h b/src/third_party/boost-1.70.0/boost/predef/os/bsd/free.h
index 81c002109dc..81c002109dc 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/bsd/free.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/bsd/free.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/os/bsd/net.h b/src/third_party/boost-1.70.0/boost/predef/os/bsd/net.h
new file mode 100644
index 00000000000..3fe5589e7f2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/os/bsd/net.h
@@ -0,0 +1,84 @@
+/*
+Copyright Rene Rivera 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)
+*/
+
+#ifndef BOOST_PREDEF_OS_BSD_NET_H
+#define BOOST_PREDEF_OS_BSD_NET_H
+
+#include <boost/predef/os/bsd.h>
+
+/*`
+[heading `BOOST_OS_BSD_NET`]
+
+[@http://en.wikipedia.org/wiki/Netbsd NetBSD] operating system.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__NETBSD__`] [__predef_detection__]]
+ [[`__NetBSD__`] [__predef_detection__]]
+
+ [[`__NETBSD_version`] [V.R.P]]
+ [[`NetBSD0_8`] [0.8.0]]
+ [[`NetBSD0_9`] [0.9.0]]
+ [[`NetBSD1_0`] [1.0.0]]
+ [[`__NetBSD_Version`] [V.R.P]]
+ ]
+ */
+
+#define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
+ defined(__NETBSD__) || defined(__NetBSD__) \
+ )
+# ifndef BOOST_OS_BSD_AVAILABLE
+# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
+# define BOOST_OS_BSD_AVAILABLE
+# endif
+# undef BOOST_OS_BSD_NET
+# if defined(__NETBSD__)
+# if defined(__NETBSD_version)
+# if __NETBSD_version < 500000
+# define BOOST_OS_BSD_NET \
+ BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version)
+# else
+# define BOOST_OS_BSD_NET \
+ BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version)
+# endif
+# else
+# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+# elif defined(__NetBSD__)
+# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8)
+# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0)
+# endif
+# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9)
+# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0)
+# endif
+# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0)
+# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0)
+# endif
+# if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version)
+# define BOOST_OS_BSD_NET \
+ BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version)
+# endif
+# if !defined(BOOST_OS_BSD_NET)
+# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+# endif
+#endif
+
+#if BOOST_OS_BSD_NET
+# define BOOST_OS_BSD_NET_AVAILABLE
+# include <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_NET_NAME "NetBSD"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/bsd/open.h b/src/third_party/boost-1.70.0/boost/predef/os/bsd/open.h
index f6ccd24a9b7..f6ccd24a9b7 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/bsd/open.h
+++ b/src/third_party/boost-1.70.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.70.0/boost/predef/os/cygwin.h
index 207809c0ea8..207809c0ea8 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/cygwin.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/cygwin.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/haiku.h b/src/third_party/boost-1.70.0/boost/predef/os/haiku.h
index d79dbeac88d..d79dbeac88d 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/haiku.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/haiku.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/hpux.h b/src/third_party/boost-1.70.0/boost/predef/os/hpux.h
index 29243f48790..29243f48790 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/hpux.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/hpux.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/ios.h b/src/third_party/boost-1.70.0/boost/predef/os/ios.h
index f853815a6d1..f853815a6d1 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/ios.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/ios.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/irix.h b/src/third_party/boost-1.70.0/boost/predef/os/irix.h
index fa6ac41dcdd..fa6ac41dcdd 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/irix.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/irix.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/os/linux.h b/src/third_party/boost-1.70.0/boost/predef/os/linux.h
new file mode 100644
index 00000000000..f945f01ea30
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/os/linux.h
@@ -0,0 +1,49 @@
+/*
+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_LINUX_H
+#define BOOST_PREDEF_OS_LINUX_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_OS_LINUX`]
+
+[@http://en.wikipedia.org/wiki/Linux Linux] operating system.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`linux`] [__predef_detection__]]
+ [[`__linux`] [__predef_detection__]]
+ [[`__linux__`] [__predef_detection__]]
+ [[`__gnu_linux__`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
+ defined(linux) || defined(__linux) || \
+ defined(__linux__) || defined(__gnu_linux__) \
+ )
+# undef BOOST_OS_LINUX
+# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE
+#endif
+
+#if BOOST_OS_LINUX
+# define BOOST_OS_LINUX_AVAILABLE
+# include <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_LINUX_NAME "Linux"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_LINUX,BOOST_OS_LINUX_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/macos.h b/src/third_party/boost-1.70.0/boost/predef/os/macos.h
index 4afb30d0879..4afb30d0879 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/macos.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/macos.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/os400.h b/src/third_party/boost-1.70.0/boost/predef/os/os400.h
index b3446c26c93..b3446c26c93 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/os400.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/os400.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/qnxnto.h b/src/third_party/boost-1.70.0/boost/predef/os/qnxnto.h
index e76fbf27816..e76fbf27816 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/qnxnto.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/qnxnto.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/solaris.h b/src/third_party/boost-1.70.0/boost/predef/os/solaris.h
index 75ddc91dae5..75ddc91dae5 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/solaris.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/solaris.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/unix.h b/src/third_party/boost-1.70.0/boost/predef/os/unix.h
index a60710427a3..a60710427a3 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/unix.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/unix.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/vms.h b/src/third_party/boost-1.70.0/boost/predef/os/vms.h
index 2f8f786d4ee..2f8f786d4ee 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/vms.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/vms.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/windows.h b/src/third_party/boost-1.70.0/boost/predef/os/windows.h
index 9db43909505..9db43909505 100644
--- a/src/third_party/boost-1.69.0/boost/predef/os/windows.h
+++ b/src/third_party/boost-1.70.0/boost/predef/os/windows.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/other.h b/src/third_party/boost-1.70.0/boost/predef/other.h
index c09ad4945fe..c09ad4945fe 100644
--- a/src/third_party/boost-1.69.0/boost/predef/other.h
+++ b/src/third_party/boost-1.70.0/boost/predef/other.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/other/endian.h b/src/third_party/boost-1.70.0/boost/predef/other/endian.h
index b42da53803d..b42da53803d 100644
--- a/src/third_party/boost-1.69.0/boost/predef/other/endian.h
+++ b/src/third_party/boost-1.70.0/boost/predef/other/endian.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/platform.h b/src/third_party/boost-1.70.0/boost/predef/platform.h
new file mode 100644
index 00000000000..65a0e2ac008
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/platform.h
@@ -0,0 +1,29 @@
+/*
+Copyright Rene Rivera 2013-2015
+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)
+*/
+
+#if !defined(BOOST_PREDEF_PLATFORM_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS)
+#ifndef BOOST_PREDEF_PLATFORM_H
+#define BOOST_PREDEF_PLATFORM_H
+#endif
+
+#include <boost/predef/platform/android.h>
+#include <boost/predef/platform/cloudabi.h>
+#include <boost/predef/platform/mingw.h>
+#include <boost/predef/platform/mingw32.h>
+#include <boost/predef/platform/mingw64.h>
+#include <boost/predef/platform/windows_uwp.h>
+#include <boost/predef/platform/windows_desktop.h>
+#include <boost/predef/platform/windows_phone.h>
+#include <boost/predef/platform/windows_server.h>
+#include <boost/predef/platform/windows_store.h>
+#include <boost/predef/platform/windows_system.h>
+#include <boost/predef/platform/windows_runtime.h> // deprecated
+#include <boost/predef/platform/ios.h>
+/*#include <boost/predef/platform/.h>*/
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/predef/platform/android.h b/src/third_party/boost-1.70.0/boost/predef/platform/android.h
new file mode 100644
index 00000000000..485382f6a94
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/android.h
@@ -0,0 +1,43 @@
+/*
+Copyright Rene Rivera 2015-2019
+Distributed under the 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_PLAT_ANDROID_H
+#define BOOST_PREDEF_PLAT_ANDROID_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_PLAT_ANDROID`]
+
+[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] platform.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__ANDROID__`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_PLAT_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if defined(__ANDROID__)
+# undef BOOST_PLAT_ANDROID
+# define BOOST_PLAT_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
+#endif
+
+#if BOOST_PLAT_ANDROID
+# define BOOST_PLAT_ANDROID_AVAILABLE
+# include <boost/predef/detail/platform_detected.h>
+#endif
+
+#define BOOST_PLAT_ANDROID_NAME "Android"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_ANDROID,BOOST_PLAT_ANDROID_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/cloudabi.h b/src/third_party/boost-1.70.0/boost/predef/platform/cloudabi.h
index c44f689454d..c44f689454d 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/cloudabi.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/cloudabi.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/platform/ios.h b/src/third_party/boost-1.70.0/boost/predef/platform/ios.h
new file mode 100644
index 00000000000..83ba3c40e2a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/ios.h
@@ -0,0 +1,62 @@
+/*
+Copyright Ruslan Baratov 2017
+Copyright Rene Rivera 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)
+*/
+
+#ifndef BOOST_PREDEF_PLAT_IOS_H
+#define BOOST_PREDEF_PLAT_IOS_H
+
+#include <boost/predef/os/ios.h> // BOOST_OS_IOS
+#include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+/*`
+[heading `BOOST_PLAT_IOS_DEVICE`]
+[heading `BOOST_PLAT_IOS_SIMULATOR`]
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
+ [[`TARGET_OS_SIMULATOR`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE
+#define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
+#if BOOST_OS_IOS
+# include <TargetConditionals.h>
+# if defined(TARGET_OS_SIMULATOR) && (TARGET_OS_SIMULATOR == 1)
+# undef BOOST_PLAT_IOS_SIMULATOR
+# define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
+# elif defined(TARGET_IPHONE_SIMULATOR) && (TARGET_IPHONE_SIMULATOR == 1)
+# undef BOOST_PLAT_IOS_SIMULATOR
+# define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
+# else
+# undef BOOST_PLAT_IOS_DEVICE
+# define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+#endif
+
+#if BOOST_PLAT_IOS_SIMULATOR
+# define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
+# include <boost/predef/detail/platform_detected.h>
+#endif
+
+#if BOOST_PLAT_IOS_DEVICE
+# define BOOST_PLAT_IOS_DEVICE_AVAILABLE
+# include <boost/predef/detail/platform_detected.h>
+#endif
+
+#define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
+#define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
+
+#endif // BOOST_PREDEF_PLAT_IOS_H
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME)
+BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME)
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/mingw.h b/src/third_party/boost-1.70.0/boost/predef/platform/mingw.h
index c52827d7d8b..c52827d7d8b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/mingw.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/mingw.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/mingw32.h b/src/third_party/boost-1.70.0/boost/predef/platform/mingw32.h
index ff90038b4c4..ff90038b4c4 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/mingw32.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/mingw32.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/mingw64.h b/src/third_party/boost-1.70.0/boost/predef/platform/mingw64.h
index a35dd3e016e..a35dd3e016e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/mingw64.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/mingw64.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_desktop.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_desktop.h
index afb39079a61..afb39079a61 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_desktop.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_desktop.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_phone.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_phone.h
index 0ebc76d2769..0ebc76d2769 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_phone.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_phone.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_runtime.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_runtime.h
index e7978d7525e..e7978d7525e 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_runtime.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_runtime.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_server.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_server.h
index 7bd629da34b..7bd629da34b 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_server.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_server.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_store.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_store.h
index 3a3fd8e982d..3a3fd8e982d 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_store.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_store.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_system.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_system.h
index 92f424fe7f5..92f424fe7f5 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_system.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_system.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/platform/windows_uwp.h b/src/third_party/boost-1.70.0/boost/predef/platform/windows_uwp.h
index e4c6647f413..e4c6647f413 100644
--- a/src/third_party/boost-1.69.0/boost/predef/platform/windows_uwp.h
+++ b/src/third_party/boost-1.70.0/boost/predef/platform/windows_uwp.h
diff --git a/src/third_party/boost-1.70.0/boost/predef/version.h b/src/third_party/boost-1.70.0/boost/predef/version.h
new file mode 100644
index 00000000000..6406d795fec
--- /dev/null
+++ b/src/third_party/boost-1.70.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,10,0)
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/predef/version_number.h b/src/third_party/boost-1.70.0/boost/predef/version_number.h
index 44942709c7f..44942709c7f 100644
--- a/src/third_party/boost-1.69.0/boost/predef/version_number.h
+++ b/src/third_party/boost-1.70.0/boost/predef/version_number.h
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/add.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/add.hpp
index 5a29f554f57..5a29f554f57 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/add.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/add.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/dec.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/dec.hpp
index 23dd0a35a1e..23dd0a35a1e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/dec.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/dec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/detail/div_base.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/detail/div_base.hpp
index 106632a3dee..106632a3dee 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/detail/div_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/detail/div_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/inc.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/inc.hpp
index 1597ab85c33..1597ab85c33 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/inc.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/inc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/mod.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/mod.hpp
index 62489d1dbdd..62489d1dbdd 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/mod.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/mod.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/sub.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/sub.hpp
index 5262cdaff8c..5262cdaff8c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/sub.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/arithmetic/sub.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/array/data.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/array/data.hpp
index 10c926a750e..10c926a750e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/array/data.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/array/data.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/array/elem.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/array/elem.hpp
index 105ba24e31d..105ba24e31d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/array/elem.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/array/elem.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/array/size.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/array/size.hpp
index 3f370ee41b8..3f370ee41b8 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/array/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/array/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/cat.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/cat.hpp
index 52a389270c2..52a389270c2 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/cat.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/cat.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/comma_if.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/comma_if.hpp
index 9ceb0795558..9ceb0795558 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/comma_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/comma_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/equal.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/equal.hpp
index d299efe5869..d299efe5869 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/greater.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/greater.hpp
index 83d2fcf2376..83d2fcf2376 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/less.hpp
index d91ea3d02e1..d91ea3d02e1 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less_equal.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/less_equal.hpp
index 1302d5470aa..1302d5470aa 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/not_equal.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/comparison/not_equal.hpp
index b4b0eae129d..b4b0eae129d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/comparison/not_equal.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/preprocessor/config/config.hpp
index 2c1e72f907b..2c1e72f907b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/config/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/config/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/deduce_d.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/deduce_d.hpp
index a0276b0f19e..a0276b0f19e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/deduce_d.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/deduce_d.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/edg/while.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/detail/edg/while.hpp
index ce28eb22e1d..ce28eb22e1d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/edg/while.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/detail/edg/while.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/msvc/while.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/detail/msvc/while.hpp
index e543e41b71a..e543e41b71a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/msvc/while.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/detail/msvc/while.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/while.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/detail/while.hpp
index 7315e1de9d5..7315e1de9d5 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/while.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/detail/while.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_if.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/expr_if.hpp
index 0e1ab512fbf..0e1ab512fbf 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/expr_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_iif.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/expr_iif.hpp
index 58f45a48f5e..58f45a48f5e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_iif.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/expr_iif.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/if.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/if.hpp
index 52cfc3dabb1..52cfc3dabb1 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/if.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/iif.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/iif.hpp
index fd0781793fa..fd0781793fa 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/iif.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/iif.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/control/while.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/control/while.hpp
index e8a65fffc73..e8a65fffc73 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/control/while.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/control/while.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/debug/error.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/debug/error.hpp
index c8ae5e75056..c8ae5e75056 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/debug/error.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/debug/error.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/dec.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/dec.hpp
index d57206470b9..d57206470b9 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/dec.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/dec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/detail/auto_rec.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/detail/auto_rec.hpp
index 39de1d00285..39de1d00285 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/detail/auto_rec.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/detail/auto_rec.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/detail/check.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/detail/check.hpp
index 63f8ff91665..63f8ff91665 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/detail/check.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/detail/check.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_binary.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/detail/is_binary.hpp
index 3428833d649..3428833d649 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_binary.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/detail/is_binary.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_unary.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/detail/is_unary.hpp
index e73cdfb76a4..e73cdfb76a4 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_unary.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/detail/is_unary.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/detail/split.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/detail/split.hpp
index f28a72375d8..f28a72375d8 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/detail/split.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/detail/split.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/empty.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/empty.hpp
index 116ef744e04..116ef744e04 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/enum.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/enum.hpp
index ae05bb0c180..ae05bb0c180 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/enum_params.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/enum_params.hpp
index 414f8aa6a2b..414f8aa6a2b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/enum_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/enum_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_a_default.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/enum_params_with_a_default.hpp
index fd1ad4ccaa3..fd1ad4ccaa3 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_a_default.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/enum_params_with_a_default.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_defaults.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/enum_params_with_defaults.hpp
index e58fa3e3c08..e58fa3e3c08 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_defaults.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/enum_params_with_defaults.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/enum_shifted_params.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/enum_shifted_params.hpp
index 462c6424eb9..462c6424eb9 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/enum_shifted_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/enum_shifted_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/expr_if.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/expr_if.hpp
index f93e29bc61c..f93e29bc61c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/expr_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/expr_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/detail/is_empty.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/detail/is_empty.hpp
index e0449701e82..e0449701e82 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/detail/is_empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/detail/is_empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/empty.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/empty.hpp
index 6f215dc5112..6f215dc5112 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/expand.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/expand.hpp
index c8661a1c221..c8661a1c221 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/expand.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/expand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/identity.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/identity.hpp
index 8a7834d4a50..8a7834d4a50 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/identity.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/identity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/intercept.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/intercept.hpp
index 41dcc6a9801..41dcc6a9801 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/intercept.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/intercept.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_1.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_1.hpp
index f286dcdd19b..f286dcdd19b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_1.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_empty.hpp
index 46aadd3529c..46aadd3529c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty_variadic.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_empty_variadic.hpp
index eee4062d792..eee4062d792 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty_variadic.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/is_empty_variadic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/overload.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/overload.hpp
index 1576316d7f0..1576316d7f0 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/facilities/overload.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/facilities/overload.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/identity.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/identity.hpp
index 847dd13296b..847dd13296b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/identity.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/identity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/if.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/if.hpp
index f1783f717ee..f1783f717ee 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/if.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/inc.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/inc.hpp
index b98d3a67c5e..b98d3a67c5e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/inc.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/inc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iterate.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iterate.hpp
index e720ec8a846..e720ec8a846 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iterate.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iterate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp
index 6694d0ba0b7..6694d0ba0b7 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp
index ece21fc810e..ece21fc810e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp
index 8429eac7a10..8429eac7a10 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp
index ba0832f284a..ba0832f284a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp
index f4888c7b57d..f4888c7b57d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp
index 50d0fcfa32a..50d0fcfa32a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp
index faef6f49e33..faef6f49e33 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp
index 38d9adec460..38d9adec460 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp
index 7f771c2ce7a..7f771c2ce7a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp
index 9f27d5884d4..9f27d5884d4 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/finish.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/finish.hpp
index 0236944cac2..0236944cac2 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/finish.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/finish.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward1.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward1.hpp
index 3c6a45802fd..3c6a45802fd 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward1.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward2.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward2.hpp
index e61a329d33d..e61a329d33d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward2.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward3.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward3.hpp
index e68966f757a..e68966f757a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward3.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward4.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward4.hpp
index 1b4f58874c8..1b4f58874c8 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward4.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward5.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward5.hpp
index 7617607c6c9..7617607c6c9 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward5.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/forward5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp
index bf88d2f3a79..bf88d2f3a79 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp
index 521bd249bea..521bd249bea 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp
index 0a655149c9c..0a655149c9c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp
index 3bcfba04e0c..3bcfba04e0c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp
index 225a557f894..225a557f894 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/local.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/local.hpp
index ccddd5e0f0a..ccddd5e0f0a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/local.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/local.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/rlocal.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/rlocal.hpp
index 413afa09d1b..413afa09d1b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/rlocal.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/rlocal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/self.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/self.hpp
index 757185c1f27..757185c1f27 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/self.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/self.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/start.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/start.hpp
index cbf03818480..cbf03818480 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/start.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/detail/start.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/iterate.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/iterate.hpp
index 8f861e71f65..8f861e71f65 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/iterate.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/iterate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/local.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/local.hpp
index 289fb1aff7c..289fb1aff7c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/local.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/local.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/self.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/self.hpp
index 6e0464c976c..6e0464c976c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/iteration/self.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/iteration/self.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/adt.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/adt.hpp
index b4f12bab63d..b4f12bab63d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/adt.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/adt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/at.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/at.hpp
index 125669b38af..125669b38af 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/at.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/at.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_left.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/edg/fold_left.hpp
index ae9524f979b..ae9524f979b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/edg/fold_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_right.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/edg/fold_right.hpp
index d372d2e6d58..d372d2e6d58 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/edg/fold_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_left.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/fold_left.hpp
index f5fcab73359..f5fcab73359 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/fold_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_right.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/fold_right.hpp
index 29146d504b4..29146d504b4 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/detail/fold_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_left.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/fold_left.hpp
index f235aec8e79..f235aec8e79 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/fold_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_right.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/fold_right.hpp
index ce18afef280..ce18afef280 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/fold_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/for_each_i.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/for_each_i.hpp
index 8f02e2e3179..8f02e2e3179 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/for_each_i.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/for_each_i.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/rest_n.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/rest_n.hpp
index b42ee5fe421..b42ee5fe421 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/rest_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/rest_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/list/reverse.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/list/reverse.hpp
index 651da057110..651da057110 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/list/reverse.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/list/reverse.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/and.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/and.hpp
index 8590365e58c..8590365e58c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/and.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitand.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/bitand.hpp
index 74e9527f20e..74e9527f20e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitand.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/bitand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitor.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/bitor.hpp
index c0bc2c66ae3..c0bc2c66ae3 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/bitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/bool.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/bool.hpp
index fc01b5ba50d..fc01b5ba50d 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/compl.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/compl.hpp
index ad4c7a4ca6b..ad4c7a4ca6b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/compl.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/compl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/not.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/not.hpp
index b509d3fca6c..b509d3fca6c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/not.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/not.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/logical/or.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/logical/or.hpp
index 88d52071a00..88d52071a00 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/logical/or.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/logical/or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/comma.hpp
index 38c2e0e7e7a..38c2e0e7e7a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/comma.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma_if.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/comma_if.hpp
index c711f366a43..c711f366a43 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/comma_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp
index c94ccf3c6fb..c94ccf3c6fb 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/is_begin_parens.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/is_begin_parens.hpp
index 20b32bc2bec..20b32bc2bec 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/is_begin_parens.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/is_begin_parens.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/paren.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/paren.hpp
index 28c18cb8beb..28c18cb8beb 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/paren.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/punctuation/paren.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repeat.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repeat.hpp
index 7c47ee8b01e..7c47ee8b01e 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repeat.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repeat.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repeat_2nd.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repeat_2nd.hpp
index 030c4324c2c..030c4324c2c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repeat_2nd.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repeat_2nd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repeat_from_to.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repeat_from_to.hpp
index 4ddc3be04b2..4ddc3be04b2 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repeat_from_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repeat_from_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/edg/for.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/edg/for.hpp
index 212921a63c8..212921a63c8 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/edg/for.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/edg/for.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/for.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/for.hpp
index 2770f2c1ea3..2770f2c1ea3 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/for.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/for.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/msvc/for.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/msvc/for.hpp
index 35c1996c786..35c1996c786 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/msvc/for.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/detail/msvc/for.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum.hpp
index 0198cd9b395..0198cd9b395 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_binary_params.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_binary_params.hpp
index a2c1048e183..a2c1048e183 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_binary_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_binary_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params.hpp
index 65a2369d4a7..65a2369d4a7 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp
index 7496df62f20..7496df62f20 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp
index fa0106f7750..fa0106f7750 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_shifted.hpp
index d5b006f4d0f..d5b006f4d0f 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_shifted.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted_params.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_shifted_params.hpp
index 88b2bf4c32c..88b2bf4c32c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_shifted_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_trailing.hpp
index 20af2d54b0b..20af2d54b0b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_trailing.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing_params.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_trailing_params.hpp
index f7520dbdeff..f7520dbdeff 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/enum_trailing_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/for.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/for.hpp
index c38946bb555..c38946bb555 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/for.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/for.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/repeat.hpp
index 0172738e0c6..0172738e0c6 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/repeat.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat_from_to.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/repeat_from_to.hpp
index efe539e1ded..efe539e1ded 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat_from_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/repetition/repeat_from_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq.hpp
index cde208ce1f0..cde208ce1f0 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/cat.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/cat.hpp
index b6b09ff32a0..b6b09ff32a0 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/cat.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/cat.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/binary_transform.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/binary_transform.hpp
index 08b5f9de4dc..08b5f9de4dc 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/binary_transform.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/binary_transform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/is_empty.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/is_empty.hpp
index 1a80a2f6117..1a80a2f6117 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/is_empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/is_empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/split.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/split.hpp
index 7c339319186..7c339319186 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/split.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/split.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/to_list_msvc.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/to_list_msvc.hpp
index 2599c0014ac..2599c0014ac 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/to_list_msvc.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/detail/to_list_msvc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/elem.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/elem.hpp
index 9c7a4b27665..9c7a4b27665 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/elem.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/elem.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/enum.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/enum.hpp
index b63b2425bda..b63b2425bda 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/filter.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/filter.hpp
index 4596bfe59b4..4596bfe59b4 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/filter.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/filter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/first_n.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/first_n.hpp
index c3c0716ee79..c3c0716ee79 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/first_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/first_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_left.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/fold_left.hpp
index ab051b69d9b..ab051b69d9b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_left.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/fold_left.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_right.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/fold_right.hpp
index c2c365b29ad..c2c365b29ad 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_right.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/fold_right.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each.hpp
index 3f9c0d781b9..3f9c0d781b9 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_i.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each_i.hpp
index 81028d77de7..81028d77de7 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_i.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each_i.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_product.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each_product.hpp
index baf22df4809..baf22df4809 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_product.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/for_each_product.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/insert.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/insert.hpp
index 59ce2f4d186..59ce2f4d186 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/insert.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/insert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_back.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/pop_back.hpp
index 54200d61858..54200d61858 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/pop_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_front.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/pop_front.hpp
index 7d94eea9161..7d94eea9161 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/pop_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_back.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/push_back.hpp
index 1938d0be644..1938d0be644 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_back.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/push_back.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_front.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/push_front.hpp
index 2ce73ad1a3f..2ce73ad1a3f 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_front.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/push_front.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/remove.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/remove.hpp
index d2f77b0c61b..d2f77b0c61b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/remove.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/remove.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/replace.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/replace.hpp
index 0cf6b775540..0cf6b775540 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/replace.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/replace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/rest_n.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/rest_n.hpp
index 4aefba4fa1f..4aefba4fa1f 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/rest_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/rest_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/reverse.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/reverse.hpp
index 338d777d77b..338d777d77b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/reverse.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/reverse.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/seq.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/seq.hpp
index f5ca84c6f39..f5ca84c6f39 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/size.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/size.hpp
index b5c8d9d051f..b5c8d9d051f 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/subseq.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/subseq.hpp
index fb242f1e69c..fb242f1e69c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/subseq.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/subseq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_array.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/to_array.hpp
index d8a8040f8d8..d8a8040f8d8 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/to_array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_list.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/to_list.hpp
index ed8948dbd40..ed8948dbd40 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_list.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/to_list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_tuple.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/to_tuple.hpp
index ab38eb97fae..ab38eb97fae 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/to_tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/transform.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/transform.hpp
index 79d8108d362..79d8108d362 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/transform.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/transform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp
index f94a2bfd1f3..f94a2bfd1f3 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/counter.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/counter.hpp
index a1c0df1759a..a1c0df1759a 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/counter.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/counter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/def.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/def.hpp
index 885099e5512..885099e5512 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/def.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/def.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/shared.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/shared.hpp
index c97ac54cf91..c97ac54cf91 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/shared.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/shared.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot1.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot1.hpp
index b22748e6ac4..b22748e6ac4 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot1.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot2.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot2.hpp
index 5d5258c2258..5d5258c2258 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot2.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot3.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot3.hpp
index 005cf219005..005cf219005 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot3.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot3.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot4.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot4.hpp
index 9aa4d8ab8d9..9aa4d8ab8d9 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot4.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot4.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot5.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot5.hpp
index d17535daf4b..d17535daf4b 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot5.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/slot/detail/slot5.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/slot/slot.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/slot/slot.hpp
index 147b097ca9c..147b097ca9c 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/slot/slot.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/preprocessor/stringize.hpp
index e072dbd5330..e072dbd5330 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/stringize.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/stringize.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/detail/is_single_return.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/detail/is_single_return.hpp
index 02a4fb207c5..02a4fb207c5 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/detail/is_single_return.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/detail/is_single_return.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/eat.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/eat.hpp
index 7e8a1006758..7e8a1006758 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/eat.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/eat.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/elem.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/elem.hpp
index 88044d3c7e7..88044d3c7e7 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/elem.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/elem.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/rem.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/rem.hpp
index c934447d5ad..c934447d5ad 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/rem.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/rem.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/size.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/size.hpp
index 675c0651663..675c0651663 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_list.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/to_list.hpp
index da7828f7d09..da7828f7d09 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_list.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/to_list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_seq.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/to_seq.hpp
index a53f5a00e67..a53f5a00e67 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/tuple/to_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/detail/is_single_return.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/detail/is_single_return.hpp
index 5c9502932c4..5c9502932c4 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/detail/is_single_return.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/detail/is_single_return.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/elem.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/elem.hpp
index be38a9429bd..be38a9429bd 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/elem.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/elem.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/size.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/size.hpp
index b92a5ffe068..b92a5ffe068 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/to_seq.hpp b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/to_seq.hpp
index 255af4f38cb..255af4f38cb 100644
--- a/src/third_party/boost-1.69.0/boost/preprocessor/variadic/to_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/preprocessor/variadic/to_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options.hpp b/src/third_party/boost-1.70.0/boost/program_options.hpp
index dc350119573..dc350119573 100644
--- a/src/third_party/boost-1.69.0/boost/program_options.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/cmdline.hpp b/src/third_party/boost-1.70.0/boost/program_options/cmdline.hpp
index 8705e60f210..8705e60f210 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/cmdline.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/cmdline.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/config.hpp b/src/third_party/boost-1.70.0/boost/program_options/config.hpp
index 8b70521741a..8b70521741a 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/detail/cmdline.hpp b/src/third_party/boost-1.70.0/boost/program_options/detail/cmdline.hpp
index dce407c0b3e..dce407c0b3e 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/detail/cmdline.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/detail/cmdline.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/detail/config_file.hpp b/src/third_party/boost-1.70.0/boost/program_options/detail/config_file.hpp
index be6bba14476..be6bba14476 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/detail/config_file.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/detail/config_file.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/detail/convert.hpp b/src/third_party/boost-1.70.0/boost/program_options/detail/convert.hpp
index a22dd6f37c5..a22dd6f37c5 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/detail/convert.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/detail/convert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/detail/parsers.hpp b/src/third_party/boost-1.70.0/boost/program_options/detail/parsers.hpp
index b644aaa1763..b644aaa1763 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/detail/parsers.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/detail/parsers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.70.0/boost/program_options/detail/utf8_codecvt_facet.hpp
index b77b5515fa5..b77b5515fa5 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/detail/utf8_codecvt_facet.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/detail/value_semantic.hpp b/src/third_party/boost-1.70.0/boost/program_options/detail/value_semantic.hpp
index 9531339a34e..9531339a34e 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/detail/value_semantic.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/detail/value_semantic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/environment_iterator.hpp b/src/third_party/boost-1.70.0/boost/program_options/environment_iterator.hpp
index 933919d15d8..933919d15d8 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/environment_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/environment_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/eof_iterator.hpp b/src/third_party/boost-1.70.0/boost/program_options/eof_iterator.hpp
index 5e53df5b812..5e53df5b812 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/eof_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/eof_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/errors.hpp b/src/third_party/boost-1.70.0/boost/program_options/errors.hpp
index ba0f404e2ef..ba0f404e2ef 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/errors.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/errors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/option.hpp b/src/third_party/boost-1.70.0/boost/program_options/option.hpp
index 427678fa786..427678fa786 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/option.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/option.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/options_description.hpp b/src/third_party/boost-1.70.0/boost/program_options/options_description.hpp
index 90d913d3e3a..90d913d3e3a 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/options_description.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/options_description.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/parsers.hpp b/src/third_party/boost-1.70.0/boost/program_options/parsers.hpp
index 0576469278c..0576469278c 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/parsers.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/parsers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/positional_options.hpp b/src/third_party/boost-1.70.0/boost/program_options/positional_options.hpp
index ac2a3122d51..ac2a3122d51 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/positional_options.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/positional_options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/value_semantic.hpp b/src/third_party/boost-1.70.0/boost/program_options/value_semantic.hpp
index ac9dbc663b5..ac9dbc663b5 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/value_semantic.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/value_semantic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/variables_map.hpp b/src/third_party/boost-1.70.0/boost/program_options/variables_map.hpp
index 362dedf2833..362dedf2833 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/variables_map.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/variables_map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/program_options/version.hpp b/src/third_party/boost-1.70.0/boost/program_options/version.hpp
index aa27568bb86..aa27568bb86 100644
--- a/src/third_party/boost-1.69.0/boost/program_options/version.hpp
+++ b/src/third_party/boost-1.70.0/boost/program_options/version.hpp
diff --git a/src/third_party/boost-1.70.0/boost/progress.hpp b/src/third_party/boost-1.70.0/boost/progress.hpp
new file mode 100644
index 00000000000..95c2d0b6be2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/progress.hpp
@@ -0,0 +1,145 @@
+// boost progress.hpp header file ------------------------------------------//
+
+// Copyright Beman Dawes 1994-99. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/timer for documentation.
+
+// Revision History
+// 1 Dec 01 Add leading progress display strings (suggested by Toon Knapen)
+// 20 May 01 Introduce several static_casts<> to eliminate warning messages
+// (Fixed by Beman, reported by Herve Bronnimann)
+// 12 Jan 01 Change to inline implementation to allow use without library
+// builds. See docs for more rationale. (Beman Dawes)
+// 22 Jul 99 Name changed to .hpp
+// 16 Jul 99 Second beta
+// 6 Jul 99 Initial boost version
+
+#ifndef BOOST_PROGRESS_HPP
+#define BOOST_PROGRESS_HPP
+
+#include <boost/config/header_deprecated.hpp>
+BOOST_HEADER_DEPRECATED( "the facilities in <boost/timer/timer.hpp>" )
+
+#include <boost/timer.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/cstdint.hpp> // for uintmax_t
+#include <iostream> // for ostream, cout, etc
+#include <string> // for string
+
+namespace boost {
+
+// progress_timer ----------------------------------------------------------//
+
+// A progress_timer behaves like a timer except that the destructor displays
+// an elapsed time message at an appropriate place in an appropriate form.
+
+class progress_timer : public timer, private noncopyable
+{
+
+ public:
+ explicit progress_timer( std::ostream & os = std::cout )
+ // os is hint; implementation may ignore, particularly in embedded systems
+ : timer(), noncopyable(), m_os(os) {}
+ ~progress_timer()
+ {
+ // A) Throwing an exception from a destructor is a Bad Thing.
+ // B) The progress_timer destructor does output which may throw.
+ // C) A progress_timer is usually not critical to the application.
+ // Therefore, wrap the I/O in a try block, catch and ignore all exceptions.
+ try
+ {
+ // use istream instead of ios_base to workaround GNU problem (Greg Chicares)
+ std::istream::fmtflags old_flags = m_os.setf( std::istream::fixed,
+ std::istream::floatfield );
+ std::streamsize old_prec = m_os.precision( 2 );
+ m_os << elapsed() << " s\n" // "s" is System International d'Unites std
+ << std::endl;
+ m_os.flags( old_flags );
+ m_os.precision( old_prec );
+ }
+
+ catch (...) {} // eat any exceptions
+ } // ~progress_timer
+
+ private:
+ std::ostream & m_os;
+};
+
+
+// progress_display --------------------------------------------------------//
+
+// progress_display displays an appropriate indication of
+// progress at an appropriate place in an appropriate form.
+
+// NOTE: (Jan 12, 2001) Tried to change unsigned long to boost::uintmax_t, but
+// found some compilers couldn't handle the required conversion to double.
+// Reverted to unsigned long until the compilers catch up.
+
+class progress_display : private noncopyable
+{
+ public:
+ explicit progress_display( unsigned long expected_count_,
+ std::ostream & os = std::cout,
+ const std::string & s1 = "\n", //leading strings
+ const std::string & s2 = "",
+ const std::string & s3 = "" )
+ // os is hint; implementation may ignore, particularly in embedded systems
+ : noncopyable(), m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count_); }
+
+ void restart( unsigned long expected_count_ )
+ // Effects: display appropriate scale
+ // Postconditions: count()==0, expected_count()==expected_count_
+ {
+ _count = _next_tic_count = _tic = 0;
+ _expected_count = expected_count_;
+
+ m_os << m_s1 << "0% 10 20 30 40 50 60 70 80 90 100%\n"
+ << m_s2 << "|----|----|----|----|----|----|----|----|----|----|"
+ << std::endl // endl implies flush, which ensures display
+ << m_s3;
+ if ( !_expected_count ) _expected_count = 1; // prevent divide by zero
+ } // restart
+
+ unsigned long operator+=( unsigned long increment )
+ // Effects: Display appropriate progress tic if needed.
+ // Postconditions: count()== original count() + increment
+ // Returns: count().
+ {
+ if ( (_count += increment) >= _next_tic_count ) { display_tic(); }
+ return _count;
+ }
+
+ unsigned long operator++() { return operator+=( 1 ); }
+ unsigned long count() const { return _count; }
+ unsigned long expected_count() const { return _expected_count; }
+
+ private:
+ std::ostream & m_os; // may not be present in all imps
+ const std::string m_s1; // string is more general, safer than
+ const std::string m_s2; // const char *, and efficiency or size are
+ const std::string m_s3; // not issues
+
+ unsigned long _count, _expected_count, _next_tic_count;
+ unsigned int _tic;
+ void display_tic()
+ {
+ // 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>(_count)
+ / static_cast<double>(_expected_count)) * 50.0);
+ do { m_os << '*' << std::flush; } while ( ++_tic < tics_needed );
+ _next_tic_count =
+ static_cast<unsigned long>((_tic/50.0) * static_cast<double>(_expected_count));
+ if ( _count == _expected_count ) {
+ if ( _tic < 51 ) m_os << '*';
+ m_os << std::endl;
+ }
+ } // display_tic
+};
+
+} // namespace boost
+
+#endif // BOOST_PROGRESS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/random.hpp b/src/third_party/boost-1.70.0/boost/random.hpp
index a164e7eb1ae..a164e7eb1ae 100644
--- a/src/third_party/boost-1.69.0/boost/random.hpp
+++ b/src/third_party/boost-1.70.0/boost/random.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/additive_combine.hpp b/src/third_party/boost-1.70.0/boost/random/additive_combine.hpp
index d786e18473a..d786e18473a 100644
--- a/src/third_party/boost-1.69.0/boost/random/additive_combine.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/additive_combine.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/bernoulli_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/bernoulli_distribution.hpp
index d66bae4389d..d66bae4389d 100644
--- a/src/third_party/boost-1.69.0/boost/random/bernoulli_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/bernoulli_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/beta_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/beta_distribution.hpp
index dabb72bfe2d..dabb72bfe2d 100644
--- a/src/third_party/boost-1.69.0/boost/random/beta_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/beta_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/binomial_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/binomial_distribution.hpp
index 78d1a123a47..78d1a123a47 100644
--- a/src/third_party/boost-1.69.0/boost/random/binomial_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/binomial_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/cauchy_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/cauchy_distribution.hpp
index 998e523447b..998e523447b 100644
--- a/src/third_party/boost-1.69.0/boost/random/cauchy_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/cauchy_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/chi_squared_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/chi_squared_distribution.hpp
index f0fcce5c5dd..f0fcce5c5dd 100644
--- a/src/third_party/boost-1.69.0/boost/random/chi_squared_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/chi_squared_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/auto_link.hpp b/src/third_party/boost-1.70.0/boost/random/detail/auto_link.hpp
index acbebdd4f01..acbebdd4f01 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/auto_link.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/auto_link.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/config.hpp b/src/third_party/boost-1.70.0/boost/random/detail/config.hpp
index 724ab194520..724ab194520 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/const_mod.hpp b/src/third_party/boost-1.70.0/boost/random/detail/const_mod.hpp
index e0a43ab2499..e0a43ab2499 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/const_mod.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/const_mod.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/disable_warnings.hpp b/src/third_party/boost-1.70.0/boost/random/detail/disable_warnings.hpp
index 4582dcb1a7d..4582dcb1a7d 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/disable_warnings.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/disable_warnings.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/enable_warnings.hpp b/src/third_party/boost-1.70.0/boost/random/detail/enable_warnings.hpp
index 24f3bb3f583..24f3bb3f583 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/enable_warnings.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/enable_warnings.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/generator_bits.hpp b/src/third_party/boost-1.70.0/boost/random/detail/generator_bits.hpp
index 05276142cbc..05276142cbc 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/generator_bits.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/generator_bits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/generator_seed_seq.hpp b/src/third_party/boost-1.70.0/boost/random/detail/generator_seed_seq.hpp
index 7e134834649..7e134834649 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/generator_seed_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/generator_seed_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/gray_coded_qrng.hpp b/src/third_party/boost-1.70.0/boost/random/detail/gray_coded_qrng.hpp
index 643ec38d9dc..643ec38d9dc 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/gray_coded_qrng.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/gray_coded_qrng.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/int_float_pair.hpp b/src/third_party/boost-1.70.0/boost/random/detail/int_float_pair.hpp
index de253a0ecbf..de253a0ecbf 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/int_float_pair.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/int_float_pair.hpp
diff --git a/src/third_party/boost-1.70.0/boost/random/detail/integer_log2.hpp b/src/third_party/boost-1.70.0/boost/random/detail/integer_log2.hpp
new file mode 100644
index 00000000000..2e49f281fc5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/random/detail/integer_log2.hpp
@@ -0,0 +1,84 @@
+/* boost random/detail/integer_log2.hpp header file
+ *
+ * Copyright Steven Watanabe 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 including documentation.
+ *
+ * $Id$
+ *
+ */
+
+#ifndef BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP
+#define BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP
+
+#include <boost/config.hpp>
+#include <boost/limits.hpp>
+#include <boost/integer/integer_log2.hpp>
+
+namespace boost {
+namespace random {
+namespace detail {
+
+#if !defined(BOOST_NO_CXX11_CONSTEXPR)
+#define BOOST_RANDOM_DETAIL_CONSTEXPR constexpr
+#elif defined(BOOST_MSVC)
+#define BOOST_RANDOM_DETAIL_CONSTEXPR __forceinline
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define BOOST_RANDOM_DETAIL_CONSTEXPR inline __attribute__((__const__)) __attribute__((__always_inline__))
+#else
+#define BOOST_RANDOM_DETAIL_CONSTEXPR inline
+#endif
+
+template<int Shift>
+struct integer_log2_impl
+{
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
+ template<class T>
+ BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum)
+ {
+ int update = ((t >> Shift) != 0) * Shift;
+ return integer_log2_impl<Shift / 2>::apply(t >> update, accum + update);
+ }
+#else
+ template<class T>
+ BOOST_RANDOM_DETAIL_CONSTEXPR static int apply2(T t, int accum, int update)
+ {
+ return integer_log2_impl<Shift / 2>::apply(t >> update, accum + update);
+ }
+
+ template<class T>
+ BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum)
+ {
+ return apply2(t, accum, ((t >> Shift) != 0) * Shift);
+ }
+#endif
+};
+
+template<>
+struct integer_log2_impl<1>
+{
+ template<class T>
+ BOOST_RANDOM_DETAIL_CONSTEXPR static int apply(T t, int accum)
+ {
+ return int(t >> 1) + accum;
+ }
+};
+
+template<class T>
+BOOST_RANDOM_DETAIL_CONSTEXPR int integer_log2(T t)
+{
+ return integer_log2_impl<
+ ::boost::detail::max_pow2_less<
+ ::std::numeric_limits<T>::digits, 4
+ >::value
+ >::apply(t, 0);
+}
+
+} // namespace detail
+} // namespace random
+} // namespace boost
+
+#endif // BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/iterator_mixin.hpp b/src/third_party/boost-1.70.0/boost/random/detail/iterator_mixin.hpp
index 57ff75cecab..57ff75cecab 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/iterator_mixin.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/iterator_mixin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/large_arithmetic.hpp b/src/third_party/boost-1.70.0/boost/random/detail/large_arithmetic.hpp
index 66f6b4e6156..66f6b4e6156 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/large_arithmetic.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/large_arithmetic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/niederreiter_base2_table.hpp b/src/third_party/boost-1.70.0/boost/random/detail/niederreiter_base2_table.hpp
index 68bace33247..68bace33247 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/niederreiter_base2_table.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/niederreiter_base2_table.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/operators.hpp b/src/third_party/boost-1.70.0/boost/random/detail/operators.hpp
index 597343c9070..597343c9070 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/polynomial.hpp b/src/third_party/boost-1.70.0/boost/random/detail/polynomial.hpp
index a8c4b269f1f..a8c4b269f1f 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/polynomial.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/polynomial.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/ptr_helper.hpp b/src/third_party/boost-1.70.0/boost/random/detail/ptr_helper.hpp
index f1b983d9367..f1b983d9367 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/ptr_helper.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/ptr_helper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/qrng_base.hpp b/src/third_party/boost-1.70.0/boost/random/detail/qrng_base.hpp
index aa95a1e8370..aa95a1e8370 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/qrng_base.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/qrng_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/seed.hpp b/src/third_party/boost-1.70.0/boost/random/detail/seed.hpp
index 557482ad4b1..557482ad4b1 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/seed.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/seed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/seed_impl.hpp b/src/third_party/boost-1.70.0/boost/random/detail/seed_impl.hpp
index 918a2944579..918a2944579 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/seed_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/seed_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/signed_unsigned_tools.hpp b/src/third_party/boost-1.70.0/boost/random/detail/signed_unsigned_tools.hpp
index 1979908a312..1979908a312 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/signed_unsigned_tools.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/signed_unsigned_tools.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/sobol_table.hpp b/src/third_party/boost-1.70.0/boost/random/detail/sobol_table.hpp
index f4b368b9c66..f4b368b9c66 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/sobol_table.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/sobol_table.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/uniform_int_float.hpp b/src/third_party/boost-1.70.0/boost/random/detail/uniform_int_float.hpp
index 393c455bcde..393c455bcde 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/uniform_int_float.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/uniform_int_float.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/detail/vector_io.hpp b/src/third_party/boost-1.70.0/boost/random/detail/vector_io.hpp
index fe3869abb54..fe3869abb54 100644
--- a/src/third_party/boost-1.69.0/boost/random/detail/vector_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/detail/vector_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/discard_block.hpp b/src/third_party/boost-1.70.0/boost/random/discard_block.hpp
index f3c6b82b87f..f3c6b82b87f 100644
--- a/src/third_party/boost-1.69.0/boost/random/discard_block.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/discard_block.hpp
diff --git a/src/third_party/boost-1.70.0/boost/random/discrete_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/discrete_distribution.hpp
new file mode 100644
index 00000000000..c6c25fe8220
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/random/discrete_distribution.hpp
@@ -0,0 +1,640 @@
+/* boost random/discrete_distribution.hpp header file
+ *
+ * Copyright Steven Watanabe 2009-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 including documentation.
+ *
+ * $Id$
+ */
+
+#ifndef BOOST_RANDOM_DISCRETE_DISTRIBUTION_HPP_INCLUDED
+#define BOOST_RANDOM_DISCRETE_DISTRIBUTION_HPP_INCLUDED
+
+#include <vector>
+#include <limits>
+#include <numeric>
+#include <utility>
+#include <iterator>
+#include <boost/assert.hpp>
+#include <boost/random/uniform_01.hpp>
+#include <boost/random/uniform_int_distribution.hpp>
+#include <boost/random/detail/config.hpp>
+#include <boost/random/detail/operators.hpp>
+#include <boost/random/detail/vector_io.hpp>
+
+#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+#include <boost/random/detail/disable_warnings.hpp>
+
+namespace boost {
+namespace random {
+namespace detail {
+
+template<class IntType, class WeightType>
+struct integer_alias_table {
+ WeightType get_weight(IntType bin) const {
+ WeightType result = _average;
+ if(bin < _excess) ++result;
+ return result;
+ }
+ template<class Iter>
+ WeightType init_average(Iter begin, Iter end) {
+ WeightType weight_average = 0;
+ IntType excess = 0;
+ IntType n = 0;
+ // weight_average * n + excess == current partial sum
+ // This is a bit messy, but it's guaranteed not to overflow
+ for(Iter iter = begin; iter != end; ++iter) {
+ ++n;
+ if(*iter < weight_average) {
+ WeightType diff = weight_average - *iter;
+ weight_average -= diff / n;
+ if(diff % n > excess) {
+ --weight_average;
+ excess += n - diff % n;
+ } else {
+ excess -= diff % n;
+ }
+ } else {
+ WeightType diff = *iter - weight_average;
+ weight_average += diff / n;
+ if(diff % n < n - excess) {
+ excess += diff % n;
+ } else {
+ ++weight_average;
+ excess -= n - diff % n;
+ }
+ }
+ }
+ _alias_table.resize(static_cast<std::size_t>(n));
+ _average = weight_average;
+ _excess = excess;
+ return weight_average;
+ }
+ void init_empty()
+ {
+ _alias_table.clear();
+ _alias_table.push_back(std::make_pair(static_cast<WeightType>(1),
+ static_cast<IntType>(0)));
+ _average = static_cast<WeightType>(1);
+ _excess = static_cast<IntType>(0);
+ }
+ bool operator==(const integer_alias_table& other) const
+ {
+ return _alias_table == other._alias_table &&
+ _average == other._average && _excess == other._excess;
+ }
+ static WeightType normalize(WeightType val, WeightType /* average */)
+ {
+ return val;
+ }
+ static void normalize(std::vector<WeightType>&) {}
+ template<class URNG>
+ WeightType test(URNG &urng) const
+ {
+ return uniform_int_distribution<WeightType>(0, _average)(urng);
+ }
+ bool accept(IntType result, WeightType val) const
+ {
+ return result < _excess || val < _average;
+ }
+ static WeightType try_get_sum(const std::vector<WeightType>& weights)
+ {
+ WeightType result = static_cast<WeightType>(0);
+ for(typename std::vector<WeightType>::const_iterator
+ iter = weights.begin(), end = weights.end();
+ iter != end; ++iter)
+ {
+ if((std::numeric_limits<WeightType>::max)() - result > *iter) {
+ return static_cast<WeightType>(0);
+ }
+ result += *iter;
+ }
+ return result;
+ }
+ template<class URNG>
+ static WeightType generate_in_range(URNG &urng, WeightType max)
+ {
+ return uniform_int_distribution<WeightType>(
+ static_cast<WeightType>(0), max-1)(urng);
+ }
+ typedef std::vector<std::pair<WeightType, IntType> > alias_table_t;
+ alias_table_t _alias_table;
+ WeightType _average;
+ IntType _excess;
+};
+
+template<class IntType, class WeightType>
+struct real_alias_table {
+ WeightType get_weight(IntType) const
+ {
+ return WeightType(1.0);
+ }
+ template<class Iter>
+ WeightType init_average(Iter first, Iter last)
+ {
+ std::size_t size = std::distance(first, last);
+ WeightType weight_sum =
+ std::accumulate(first, last, static_cast<WeightType>(0));
+ _alias_table.resize(size);
+ return weight_sum / size;
+ }
+ void init_empty()
+ {
+ _alias_table.clear();
+ _alias_table.push_back(std::make_pair(static_cast<WeightType>(1),
+ static_cast<IntType>(0)));
+ }
+ bool operator==(const real_alias_table& other) const
+ {
+ return _alias_table == other._alias_table;
+ }
+ static WeightType normalize(WeightType val, WeightType average)
+ {
+ return val / average;
+ }
+ static void normalize(std::vector<WeightType>& weights)
+ {
+ WeightType sum =
+ std::accumulate(weights.begin(), weights.end(),
+ static_cast<WeightType>(0));
+ for(typename std::vector<WeightType>::iterator
+ iter = weights.begin(),
+ end = weights.end();
+ iter != end; ++iter)
+ {
+ *iter /= sum;
+ }
+ }
+ template<class URNG>
+ WeightType test(URNG &urng) const
+ {
+ return uniform_01<WeightType>()(urng);
+ }
+ bool accept(IntType, WeightType) const
+ {
+ return true;
+ }
+ static WeightType try_get_sum(const std::vector<WeightType>& /* weights */)
+ {
+ return static_cast<WeightType>(1);
+ }
+ template<class URNG>
+ static WeightType generate_in_range(URNG &urng, WeightType)
+ {
+ return uniform_01<WeightType>()(urng);
+ }
+ typedef std::vector<std::pair<WeightType, IntType> > alias_table_t;
+ alias_table_t _alias_table;
+};
+
+template<bool IsIntegral>
+struct select_alias_table;
+
+template<>
+struct select_alias_table<true> {
+ template<class IntType, class WeightType>
+ struct apply {
+ typedef integer_alias_table<IntType, WeightType> type;
+ };
+};
+
+template<>
+struct select_alias_table<false> {
+ template<class IntType, class WeightType>
+ struct apply {
+ typedef real_alias_table<IntType, WeightType> type;
+ };
+};
+
+}
+
+/**
+ * The class @c discrete_distribution models a \random_distribution.
+ * It produces integers in the range [0, n) with the probability
+ * of producing each value is specified by the parameters of the
+ * distribution.
+ */
+template<class IntType = int, class WeightType = double>
+class discrete_distribution {
+public:
+ typedef WeightType input_type;
+ typedef IntType result_type;
+
+ class param_type {
+ public:
+
+ typedef discrete_distribution distribution_type;
+
+ /**
+ * Constructs a @c param_type object, representing a distribution
+ * with \f$p(0) = 1\f$ and \f$p(k|k>0) = 0\f$.
+ */
+ param_type() : _probabilities(1, static_cast<WeightType>(1)) {}
+ /**
+ * If @c first == @c last, equivalent to the default constructor.
+ * Otherwise, the values of the range represent weights for the
+ * possible values of the distribution.
+ */
+ template<class Iter>
+ param_type(Iter first, Iter last) : _probabilities(first, last)
+ {
+ normalize();
+ }
+#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ /**
+ * If wl.size() == 0, equivalent to the default constructor.
+ * Otherwise, the values of the @c initializer_list represent
+ * weights for the possible values of the distribution.
+ */
+ param_type(const std::initializer_list<WeightType>& wl)
+ : _probabilities(wl)
+ {
+ normalize();
+ }
+#endif
+ /**
+ * If the range is empty, equivalent to the default constructor.
+ * Otherwise, the elements of the range represent
+ * weights for the possible values of the distribution.
+ */
+ template<class Range>
+ explicit param_type(const Range& range)
+ : _probabilities(boost::begin(range), boost::end(range))
+ {
+ normalize();
+ }
+
+ /**
+ * If nw is zero, equivalent to the default constructor.
+ * Otherwise, the range of the distribution is [0, nw),
+ * and the weights are found by calling fw with values
+ * evenly distributed between \f$\mbox{xmin} + \delta/2\f$ and
+ * \f$\mbox{xmax} - \delta/2\f$, where
+ * \f$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}\f$.
+ */
+ template<class Func>
+ param_type(std::size_t nw, double xmin, double xmax, Func fw)
+ {
+ std::size_t n = (nw == 0) ? 1 : nw;
+ double delta = (xmax - xmin) / n;
+ BOOST_ASSERT(delta > 0);
+ for(std::size_t k = 0; k < n; ++k) {
+ _probabilities.push_back(fw(xmin + k*delta + delta/2));
+ }
+ normalize();
+ }
+
+ /**
+ * Returns a vector containing the probabilities of each possible
+ * value of the distribution.
+ */
+ std::vector<WeightType> probabilities() const
+ {
+ return _probabilities;
+ }
+
+ /** Writes the parameters to a @c std::ostream. */
+ BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm)
+ {
+ detail::print_vector(os, parm._probabilities);
+ return os;
+ }
+
+ /** Reads the parameters from a @c std::istream. */
+ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm)
+ {
+ std::vector<WeightType> temp;
+ detail::read_vector(is, temp);
+ if(is) {
+ parm._probabilities.swap(temp);
+ }
+ return is;
+ }
+
+ /** Returns true if the two sets of parameters are the same. */
+ BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
+ {
+ return lhs._probabilities == rhs._probabilities;
+ }
+ /** Returns true if the two sets of parameters are different. */
+ BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)
+ private:
+ /// @cond show_private
+ friend class discrete_distribution;
+ explicit param_type(const discrete_distribution& dist)
+ : _probabilities(dist.probabilities())
+ {}
+ void normalize()
+ {
+ impl_type::normalize(_probabilities);
+ }
+ std::vector<WeightType> _probabilities;
+ /// @endcond
+ };
+
+ /**
+ * Creates a new @c discrete_distribution object that has
+ * \f$p(0) = 1\f$ and \f$p(i|i>0) = 0\f$.
+ */
+ discrete_distribution()
+ {
+ _impl.init_empty();
+ }
+ /**
+ * Constructs a discrete_distribution from an iterator range.
+ * If @c first == @c last, equivalent to the default constructor.
+ * Otherwise, the values of the range represent weights for the
+ * possible values of the distribution.
+ */
+ template<class Iter>
+ discrete_distribution(Iter first, Iter last)
+ {
+ init(first, last);
+ }
+#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ /**
+ * Constructs a @c discrete_distribution from a @c std::initializer_list.
+ * If the @c initializer_list is empty, equivalent to the default
+ * constructor. Otherwise, the values of the @c initializer_list
+ * represent weights for the possible values of the distribution.
+ * For example, given the distribution
+ *
+ * @code
+ * discrete_distribution<> dist{1, 4, 5};
+ * @endcode
+ *
+ * The probability of a 0 is 1/10, the probability of a 1 is 2/5,
+ * the probability of a 2 is 1/2, and no other values are possible.
+ */
+ discrete_distribution(std::initializer_list<WeightType> wl)
+ {
+ init(wl.begin(), wl.end());
+ }
+#endif
+ /**
+ * Constructs a discrete_distribution from a Boost.Range range.
+ * If the range is empty, equivalent to the default constructor.
+ * Otherwise, the values of the range represent weights for the
+ * possible values of the distribution.
+ */
+ template<class Range>
+ explicit discrete_distribution(const Range& range)
+ {
+ init(boost::begin(range), boost::end(range));
+ }
+ /**
+ * Constructs a discrete_distribution that approximates a function.
+ * If nw is zero, equivalent to the default constructor.
+ * Otherwise, the range of the distribution is [0, nw),
+ * and the weights are found by calling fw with values
+ * evenly distributed between \f$\mbox{xmin} + \delta/2\f$ and
+ * \f$\mbox{xmax} - \delta/2\f$, where
+ * \f$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}\f$.
+ */
+ template<class Func>
+ discrete_distribution(std::size_t nw, double xmin, double xmax, Func fw)
+ {
+ std::size_t n = (nw == 0) ? 1 : nw;
+ double delta = (xmax - xmin) / n;
+ BOOST_ASSERT(delta > 0);
+ std::vector<WeightType> weights;
+ for(std::size_t k = 0; k < n; ++k) {
+ weights.push_back(fw(xmin + k*delta + delta/2));
+ }
+ init(weights.begin(), weights.end());
+ }
+ /**
+ * Constructs a discrete_distribution from its parameters.
+ */
+ explicit discrete_distribution(const param_type& parm)
+ {
+ param(parm);
+ }
+
+ /**
+ * Returns a value distributed according to the parameters of the
+ * discrete_distribution.
+ */
+ template<class URNG>
+ IntType operator()(URNG& urng) const
+ {
+ BOOST_ASSERT(!_impl._alias_table.empty());
+ IntType result;
+ WeightType test;
+ do {
+ result = uniform_int_distribution<IntType>((min)(), (max)())(urng);
+ test = _impl.test(urng);
+ } while(!_impl.accept(result, test));
+ if(test < _impl._alias_table[static_cast<std::size_t>(result)].first) {
+ return result;
+ } else {
+ return(_impl._alias_table[static_cast<std::size_t>(result)].second);
+ }
+ }
+
+ /**
+ * Returns a value distributed according to the parameters
+ * specified by param.
+ */
+ template<class URNG>
+ IntType operator()(URNG& urng, const param_type& parm) const
+ {
+ if(WeightType limit = impl_type::try_get_sum(parm._probabilities)) {
+ WeightType val = impl_type::generate_in_range(urng, limit);
+ WeightType sum = 0;
+ std::size_t result = 0;
+ for(typename std::vector<WeightType>::const_iterator
+ iter = parm._probabilities.begin(),
+ end = parm._probabilities.end();
+ iter != end; ++iter, ++result)
+ {
+ sum += *iter;
+ if(sum > val) {
+ return result;
+ }
+ }
+ // This shouldn't be reachable, but round-off error
+ // can prevent any match from being found when val is
+ // very close to 1.
+ return static_cast<IntType>(parm._probabilities.size() - 1);
+ } else {
+ // WeightType is integral and sum(parm._probabilities)
+ // would overflow. Just use the easy solution.
+ return discrete_distribution(parm)(urng);
+ }
+ }
+
+ /** Returns the smallest value that the distribution can produce. */
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; }
+ /** Returns the largest value that the distribution can produce. */
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ { return static_cast<result_type>(_impl._alias_table.size() - 1); }
+
+ /**
+ * Returns a vector containing the probabilities of each
+ * value of the distribution. For example, given
+ *
+ * @code
+ * discrete_distribution<> dist = { 1, 4, 5 };
+ * std::vector<double> p = dist.param();
+ * @endcode
+ *
+ * the vector, p will contain {0.1, 0.4, 0.5}.
+ *
+ * If @c WeightType is integral, then the weights
+ * will be returned unchanged.
+ */
+ std::vector<WeightType> probabilities() const
+ {
+ std::vector<WeightType> result(_impl._alias_table.size(), static_cast<WeightType>(0));
+ std::size_t i = 0;
+ for(typename impl_type::alias_table_t::const_iterator
+ iter = _impl._alias_table.begin(),
+ end = _impl._alias_table.end();
+ iter != end; ++iter, ++i)
+ {
+ WeightType val = iter->first;
+ result[i] += val;
+ result[static_cast<std::size_t>(iter->second)] += _impl.get_weight(i) - val;
+ }
+ impl_type::normalize(result);
+ return(result);
+ }
+
+ /** Returns the parameters of the distribution. */
+ param_type param() const
+ {
+ return param_type(*this);
+ }
+ /** Sets the parameters of the distribution. */
+ void param(const param_type& parm)
+ {
+ init(parm._probabilities.begin(), parm._probabilities.end());
+ }
+
+ /**
+ * Effects: Subsequent uses of the distribution do not depend
+ * on values produced by any engine prior to invoking reset.
+ */
+ void reset() {}
+
+ /** Writes a distribution to a @c std::ostream. */
+ BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, discrete_distribution, dd)
+ {
+ os << dd.param();
+ return os;
+ }
+
+ /** Reads a distribution from a @c std::istream */
+ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, discrete_distribution, dd)
+ {
+ param_type parm;
+ if(is >> parm) {
+ dd.param(parm);
+ }
+ return is;
+ }
+
+ /**
+ * Returns true if the two distributions will return the
+ * same sequence of values, when passed equal generators.
+ */
+ BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(discrete_distribution, lhs, rhs)
+ {
+ return lhs._impl == rhs._impl;
+ }
+ /**
+ * Returns true if the two distributions may return different
+ * sequences of values, when passed equal generators.
+ */
+ BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(discrete_distribution)
+
+private:
+
+ /// @cond show_private
+
+ template<class Iter>
+ void init(Iter first, Iter last, std::input_iterator_tag)
+ {
+ std::vector<WeightType> temp(first, last);
+ init(temp.begin(), temp.end());
+ }
+ template<class Iter>
+ void init(Iter first, Iter last, std::forward_iterator_tag)
+ {
+ size_t input_size = std::distance(first, last);
+ std::vector<std::pair<WeightType, IntType> > below_average;
+ std::vector<std::pair<WeightType, IntType> > above_average;
+ below_average.reserve(input_size);
+ above_average.reserve(input_size);
+
+ WeightType weight_average = _impl.init_average(first, last);
+ WeightType normalized_average = _impl.get_weight(0);
+ std::size_t i = 0;
+ for(; first != last; ++first, ++i) {
+ WeightType val = impl_type::normalize(*first, weight_average);
+ std::pair<WeightType, IntType> elem(val, static_cast<IntType>(i));
+ if(val < normalized_average) {
+ below_average.push_back(elem);
+ } else {
+ above_average.push_back(elem);
+ }
+ }
+
+ typename impl_type::alias_table_t::iterator
+ b_iter = below_average.begin(),
+ b_end = below_average.end(),
+ a_iter = above_average.begin(),
+ a_end = above_average.end()
+ ;
+ while(b_iter != b_end && a_iter != a_end) {
+ _impl._alias_table[static_cast<std::size_t>(b_iter->second)] =
+ std::make_pair(b_iter->first, a_iter->second);
+ a_iter->first -= (_impl.get_weight(b_iter->second) - b_iter->first);
+ if(a_iter->first < normalized_average) {
+ *b_iter = *a_iter++;
+ } else {
+ ++b_iter;
+ }
+ }
+ for(; b_iter != b_end; ++b_iter) {
+ _impl._alias_table[static_cast<std::size_t>(b_iter->second)].first =
+ _impl.get_weight(b_iter->second);
+ }
+ for(; a_iter != a_end; ++a_iter) {
+ _impl._alias_table[static_cast<std::size_t>(a_iter->second)].first =
+ _impl.get_weight(a_iter->second);
+ }
+ }
+ template<class Iter>
+ void init(Iter first, Iter last)
+ {
+ if(first == last) {
+ _impl.init_empty();
+ } else {
+ typename std::iterator_traits<Iter>::iterator_category category;
+ init(first, last, category);
+ }
+ }
+ typedef typename detail::select_alias_table<
+ (::boost::is_integral<WeightType>::value)
+ >::template apply<IntType, WeightType>::type impl_type;
+ impl_type _impl;
+ /// @endcond
+};
+
+}
+}
+
+#include <boost/random/detail/enable_warnings.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/random/exponential_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/exponential_distribution.hpp
index b4b95c5472b..b4b95c5472b 100644
--- a/src/third_party/boost-1.69.0/boost/random/exponential_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/exponential_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/extreme_value_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/extreme_value_distribution.hpp
index 419c3da651d..419c3da651d 100644
--- a/src/third_party/boost-1.69.0/boost/random/extreme_value_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/extreme_value_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/faure.hpp b/src/third_party/boost-1.70.0/boost/random/faure.hpp
index 4301c301b5f..4301c301b5f 100644
--- a/src/third_party/boost-1.69.0/boost/random/faure.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/faure.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/fisher_f_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/fisher_f_distribution.hpp
index cdf14da8f6c..cdf14da8f6c 100644
--- a/src/third_party/boost-1.69.0/boost/random/fisher_f_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/fisher_f_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/gamma_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/gamma_distribution.hpp
index c9bda4ca9d3..c9bda4ca9d3 100644
--- a/src/third_party/boost-1.69.0/boost/random/gamma_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/gamma_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/generate_canonical.hpp b/src/third_party/boost-1.70.0/boost/random/generate_canonical.hpp
index 112784742b1..112784742b1 100644
--- a/src/third_party/boost-1.69.0/boost/random/generate_canonical.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/generate_canonical.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/geometric_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/geometric_distribution.hpp
index 90374cff71b..90374cff71b 100644
--- a/src/third_party/boost-1.69.0/boost/random/geometric_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/geometric_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/hyperexponential_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/hyperexponential_distribution.hpp
index a2833e8a9a3..a2833e8a9a3 100644
--- a/src/third_party/boost-1.69.0/boost/random/hyperexponential_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/hyperexponential_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/independent_bits.hpp b/src/third_party/boost-1.70.0/boost/random/independent_bits.hpp
index cd2dd1f2250..cd2dd1f2250 100644
--- a/src/third_party/boost-1.69.0/boost/random/independent_bits.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/independent_bits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/inversive_congruential.hpp b/src/third_party/boost-1.70.0/boost/random/inversive_congruential.hpp
index 2329c0db3a9..2329c0db3a9 100644
--- a/src/third_party/boost-1.69.0/boost/random/inversive_congruential.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/inversive_congruential.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/lagged_fibonacci.hpp b/src/third_party/boost-1.70.0/boost/random/lagged_fibonacci.hpp
index 5a809f3e494..5a809f3e494 100644
--- a/src/third_party/boost-1.69.0/boost/random/lagged_fibonacci.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/lagged_fibonacci.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/laplace_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/laplace_distribution.hpp
index ec176a59c1f..ec176a59c1f 100644
--- a/src/third_party/boost-1.69.0/boost/random/laplace_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/laplace_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/linear_congruential.hpp b/src/third_party/boost-1.70.0/boost/random/linear_congruential.hpp
index 22ade3f3dbe..22ade3f3dbe 100644
--- a/src/third_party/boost-1.69.0/boost/random/linear_congruential.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/linear_congruential.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/linear_feedback_shift.hpp b/src/third_party/boost-1.70.0/boost/random/linear_feedback_shift.hpp
index a695dfde97f..a695dfde97f 100644
--- a/src/third_party/boost-1.69.0/boost/random/linear_feedback_shift.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/linear_feedback_shift.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/lognormal_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/lognormal_distribution.hpp
index 7ed1e13abf4..7ed1e13abf4 100644
--- a/src/third_party/boost-1.69.0/boost/random/lognormal_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/lognormal_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/mersenne_twister.hpp b/src/third_party/boost-1.70.0/boost/random/mersenne_twister.hpp
index ce73e6825f3..ce73e6825f3 100644
--- a/src/third_party/boost-1.69.0/boost/random/mersenne_twister.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/mersenne_twister.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/negative_binomial_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/negative_binomial_distribution.hpp
index cbe26fad25c..cbe26fad25c 100644
--- a/src/third_party/boost-1.69.0/boost/random/negative_binomial_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/negative_binomial_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/niederreiter_base2.hpp b/src/third_party/boost-1.70.0/boost/random/niederreiter_base2.hpp
index 149a4a4b4c5..149a4a4b4c5 100644
--- a/src/third_party/boost-1.69.0/boost/random/niederreiter_base2.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/niederreiter_base2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/non_central_chi_squared_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/non_central_chi_squared_distribution.hpp
index 28c9ff6d9a4..28c9ff6d9a4 100644
--- a/src/third_party/boost-1.69.0/boost/random/non_central_chi_squared_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/non_central_chi_squared_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/normal_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/normal_distribution.hpp
index b7ff3eba9b6..b7ff3eba9b6 100644
--- a/src/third_party/boost-1.69.0/boost/random/normal_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/normal_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/piecewise_constant_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/piecewise_constant_distribution.hpp
index 488f41c0e34..488f41c0e34 100644
--- a/src/third_party/boost-1.69.0/boost/random/piecewise_constant_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/piecewise_constant_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/piecewise_linear_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/piecewise_linear_distribution.hpp
index 541c57fb826..541c57fb826 100644
--- a/src/third_party/boost-1.69.0/boost/random/piecewise_linear_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/piecewise_linear_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/poisson_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/poisson_distribution.hpp
index 1281a7d859d..1281a7d859d 100644
--- a/src/third_party/boost-1.69.0/boost/random/poisson_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/poisson_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/random_device.hpp b/src/third_party/boost-1.70.0/boost/random/random_device.hpp
index 8f3903c953c..8f3903c953c 100644
--- a/src/third_party/boost-1.69.0/boost/random/random_device.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/random_device.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/random_number_generator.hpp b/src/third_party/boost-1.70.0/boost/random/random_number_generator.hpp
index ac975e32987..ac975e32987 100644
--- a/src/third_party/boost-1.69.0/boost/random/random_number_generator.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/random_number_generator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/ranlux.hpp b/src/third_party/boost-1.70.0/boost/random/ranlux.hpp
index 82a7ca66f12..82a7ca66f12 100644
--- a/src/third_party/boost-1.69.0/boost/random/ranlux.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/ranlux.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/seed_seq.hpp b/src/third_party/boost-1.70.0/boost/random/seed_seq.hpp
index b0b1de24e3b..b0b1de24e3b 100644
--- a/src/third_party/boost-1.69.0/boost/random/seed_seq.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/seed_seq.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/shuffle_order.hpp b/src/third_party/boost-1.70.0/boost/random/shuffle_order.hpp
index 54645303e80..54645303e80 100644
--- a/src/third_party/boost-1.69.0/boost/random/shuffle_order.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/shuffle_order.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/shuffle_output.hpp b/src/third_party/boost-1.70.0/boost/random/shuffle_output.hpp
index 478e1029bd8..478e1029bd8 100644
--- a/src/third_party/boost-1.69.0/boost/random/shuffle_output.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/shuffle_output.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/sobol.hpp b/src/third_party/boost-1.70.0/boost/random/sobol.hpp
index 2518b37e88c..2518b37e88c 100644
--- a/src/third_party/boost-1.69.0/boost/random/sobol.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/sobol.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/student_t_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/student_t_distribution.hpp
index e28b0e3bfb3..e28b0e3bfb3 100644
--- a/src/third_party/boost-1.69.0/boost/random/student_t_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/student_t_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/subtract_with_carry.hpp b/src/third_party/boost-1.70.0/boost/random/subtract_with_carry.hpp
index acaf69ac698..acaf69ac698 100644
--- a/src/third_party/boost-1.69.0/boost/random/subtract_with_carry.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/subtract_with_carry.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/taus88.hpp b/src/third_party/boost-1.70.0/boost/random/taus88.hpp
index 68214f3aed0..68214f3aed0 100644
--- a/src/third_party/boost-1.69.0/boost/random/taus88.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/taus88.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/traits.hpp b/src/third_party/boost-1.70.0/boost/random/traits.hpp
index 975421a4d0a..975421a4d0a 100644
--- a/src/third_party/boost-1.69.0/boost/random/traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/triangle_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/triangle_distribution.hpp
index 6d37e2bb926..6d37e2bb926 100644
--- a/src/third_party/boost-1.69.0/boost/random/triangle_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/triangle_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_01.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_01.hpp
index 37258f58064..37258f58064 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_01.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_01.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_int.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_int.hpp
index 4362652593d..4362652593d 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_int.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_int.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_int_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_int_distribution.hpp
index e0d3a9bebcd..e0d3a9bebcd 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_int_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_int_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_on_sphere.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_on_sphere.hpp
index ce2e35237e0..ce2e35237e0 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_on_sphere.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_on_sphere.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_real.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_real.hpp
index c98626e7792..c98626e7792 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_real.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_real.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_real_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_real_distribution.hpp
index 820fce9314c..820fce9314c 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_real_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_real_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/uniform_smallint.hpp b/src/third_party/boost-1.70.0/boost/random/uniform_smallint.hpp
index c1afd7fbcdf..c1afd7fbcdf 100644
--- a/src/third_party/boost-1.69.0/boost/random/uniform_smallint.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/uniform_smallint.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/variate_generator.hpp b/src/third_party/boost-1.70.0/boost/random/variate_generator.hpp
index 6d5aac4e472..6d5aac4e472 100644
--- a/src/third_party/boost-1.69.0/boost/random/variate_generator.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/variate_generator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/weibull_distribution.hpp b/src/third_party/boost-1.70.0/boost/random/weibull_distribution.hpp
index 55e3c04903a..55e3c04903a 100644
--- a/src/third_party/boost-1.69.0/boost/random/weibull_distribution.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/weibull_distribution.hpp
diff --git a/src/third_party/boost-1.69.0/boost/random/xor_combine.hpp b/src/third_party/boost-1.70.0/boost/random/xor_combine.hpp
index fe8a58b40f1..fe8a58b40f1 100644
--- a/src/third_party/boost-1.69.0/boost/random/xor_combine.hpp
+++ b/src/third_party/boost-1.70.0/boost/random/xor_combine.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range.hpp b/src/third_party/boost-1.70.0/boost/range.hpp
index 179ae224921..179ae224921 100644
--- a/src/third_party/boost-1.69.0/boost/range.hpp
+++ b/src/third_party/boost-1.70.0/boost/range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/adjacent_filtered.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/adjacent_filtered.hpp
index 405fe7bce7d..405fe7bce7d 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/adjacent_filtered.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/adjacent_filtered.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/argument_fwd.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/argument_fwd.hpp
index fbfd40c1dfe..fbfd40c1dfe 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/argument_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/argument_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/copied.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/copied.hpp
index f7dfbcd846c..f7dfbcd846c 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/copied.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/copied.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/filtered.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/filtered.hpp
index 1fb778e58d2..1fb778e58d2 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/filtered.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/filtered.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/formatted.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/formatted.hpp
index f31f1bceb25..f31f1bceb25 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/formatted.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/formatted.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/indexed.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/indexed.hpp
index a426bd6b661..a426bd6b661 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/indexed.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/indexed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/indirected.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/indirected.hpp
index e741f17f5e5..e741f17f5e5 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/indirected.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/indirected.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/map.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/map.hpp
index 2d922ea4d24..2d922ea4d24 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/replaced.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/replaced.hpp
index 42eb52a2c7e..42eb52a2c7e 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/replaced.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/replaced.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/replaced_if.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/replaced_if.hpp
index 83d3ec81b6e..83d3ec81b6e 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/replaced_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/replaced_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/reversed.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/reversed.hpp
index 944fbffcaed..944fbffcaed 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/reversed.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/reversed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/sliced.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/sliced.hpp
index f8d9612430b..f8d9612430b 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/sliced.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/sliced.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/strided.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/strided.hpp
index 560b8200c76..560b8200c76 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/strided.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/strided.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/tokenized.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/tokenized.hpp
index f0aa12eea5d..f0aa12eea5d 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/tokenized.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/tokenized.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/transformed.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/transformed.hpp
index 428ff4be755..428ff4be755 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/transformed.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/transformed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptor/uniqued.hpp b/src/third_party/boost-1.70.0/boost/range/adaptor/uniqued.hpp
index 29101d3260f..29101d3260f 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptor/uniqued.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptor/uniqued.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/adaptors.hpp b/src/third_party/boost-1.70.0/boost/range/adaptors.hpp
index 0530c4d36cc..0530c4d36cc 100644
--- a/src/third_party/boost-1.69.0/boost/range/adaptors.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/adaptors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm.hpp
index 30dc5836e93..30dc5836e93 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/adjacent_find.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/adjacent_find.hpp
index 1b88dae86e6..1b88dae86e6 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/adjacent_find.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/adjacent_find.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/binary_search.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/binary_search.hpp
index bb64ec8f16c..bb64ec8f16c 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/binary_search.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/binary_search.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/copy.hpp
index f15b31f9132..f15b31f9132 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/copy_backward.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/copy_backward.hpp
index c95c6f1f36c..c95c6f1f36c 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/copy_backward.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/copy_backward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/count.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/count.hpp
index 8316ce0f11b..8316ce0f11b 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/count.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/count.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/count_if.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/count_if.hpp
index ae17b0e3ae6..ae17b0e3ae6 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/count_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/count_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/equal.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/equal.hpp
index 2b44f3bca39..2b44f3bca39 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/equal_range.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/equal_range.hpp
index 4aa4a54dd73..4aa4a54dd73 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/equal_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/equal_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/fill.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/fill.hpp
index 95231a82f72..95231a82f72 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/fill.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/fill.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/fill_n.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/fill_n.hpp
index 02a0c2a362b..02a0c2a362b 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/fill_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/fill_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/find.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/find.hpp
index 72c5cf15ef7..72c5cf15ef7 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/find.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/find.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/find_end.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/find_end.hpp
index 757e9996c06..757e9996c06 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/find_end.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/find_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/find_first_of.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/find_first_of.hpp
index 4cb5989afa7..4cb5989afa7 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/find_first_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/find_first_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/find_if.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/find_if.hpp
index 2d1926dabb1..2d1926dabb1 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/find_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/find_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/for_each.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/for_each.hpp
index ea731b2fdd4..ea731b2fdd4 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/for_each.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/for_each.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/generate.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/generate.hpp
index 324412c4549..324412c4549 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/generate.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/generate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/heap_algorithm.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/heap_algorithm.hpp
index 584920d6558..584920d6558 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/heap_algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/heap_algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/inplace_merge.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/inplace_merge.hpp
index dfadbaa6f14..dfadbaa6f14 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/inplace_merge.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/inplace_merge.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/lexicographical_compare.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/lexicographical_compare.hpp
index c6e4bc8ef44..c6e4bc8ef44 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/lexicographical_compare.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/lexicographical_compare.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/lower_bound.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/lower_bound.hpp
index cb5e6392390..cb5e6392390 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/lower_bound.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/lower_bound.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/max_element.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/max_element.hpp
index dd2b9cb8b3f..dd2b9cb8b3f 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/max_element.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/max_element.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/merge.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/merge.hpp
index c81b8c78476..c81b8c78476 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/merge.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/merge.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/min_element.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/min_element.hpp
index 339f56a93c9..339f56a93c9 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/min_element.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/min_element.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/mismatch.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/mismatch.hpp
index 2819c333fee..2819c333fee 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/mismatch.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/mismatch.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/nth_element.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/nth_element.hpp
index a605595c024..a605595c024 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/nth_element.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/nth_element.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/partial_sort.hpp
index d7044cd6833..d7044cd6833 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/partial_sort.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort_copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/partial_sort_copy.hpp
index 912938904b6..912938904b6 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/partial_sort_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/partition.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/partition.hpp
index b814a2489e7..b814a2489e7 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/partition.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/partition.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/permutation.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/permutation.hpp
index 75388cc8764..75388cc8764 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/permutation.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/range/algorithm/random_shuffle.hpp
index 33e98e04be8..33e98e04be8 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/random_shuffle.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/random_shuffle.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/remove.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/remove.hpp
index 699a7cdb6fd..699a7cdb6fd 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/remove.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/remove.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/remove_copy.hpp
index b65747ed951..b65747ed951 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/remove_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy_if.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/remove_copy_if.hpp
index 8d9c37befc4..8d9c37befc4 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/remove_copy_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/remove_if.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/remove_if.hpp
index a965df0d6f9..a965df0d6f9 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/remove_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/remove_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/replace.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/replace.hpp
index 44d3e4ca341..44d3e4ca341 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/replace.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/replace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/replace_copy.hpp
index 0c02005a19f..0c02005a19f 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/replace_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy_if.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/replace_copy_if.hpp
index d313151208c..d313151208c 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/replace_copy_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/replace_if.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/replace_if.hpp
index 93d5a1f7f37..93d5a1f7f37 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/replace_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/replace_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/reverse.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/reverse.hpp
index 20a7eb1823d..20a7eb1823d 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/reverse.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/reverse.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/reverse_copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/reverse_copy.hpp
index f1990ada137..f1990ada137 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/reverse_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/reverse_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/rotate.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/rotate.hpp
index ca4b223914c..ca4b223914c 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/rotate.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/rotate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/rotate_copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/rotate_copy.hpp
index 0409ac5275f..0409ac5275f 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/rotate_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/rotate_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/search.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/search.hpp
index 28cc6e62166..28cc6e62166 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/search.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/search.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/search_n.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/search_n.hpp
index ccfb27ae532..ccfb27ae532 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/search_n.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/search_n.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/set_algorithm.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/set_algorithm.hpp
index 82ef8ecc154..82ef8ecc154 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/set_algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/set_algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/sort.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/sort.hpp
index 45eecde7f81..45eecde7f81 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/sort.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/sort.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/stable_partition.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/stable_partition.hpp
index 24febfc8857..24febfc8857 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/stable_partition.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/stable_partition.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/stable_sort.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/stable_sort.hpp
index d18da4de0f7..d18da4de0f7 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/stable_sort.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/stable_sort.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/transform.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/transform.hpp
index ade147a94c5..ade147a94c5 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/transform.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/transform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/unique.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/unique.hpp
index 8017a837ce6..8017a837ce6 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/unique.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/unique.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/unique_copy.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/unique_copy.hpp
index 0682d747ea7..0682d747ea7 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/unique_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/unique_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/upper_bound.hpp b/src/third_party/boost-1.70.0/boost/range/algorithm/upper_bound.hpp
index c8acbc66a74..c8acbc66a74 100644
--- a/src/third_party/boost-1.69.0/boost/range/algorithm/upper_bound.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/algorithm/upper_bound.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/as_literal.hpp b/src/third_party/boost-1.70.0/boost/range/as_literal.hpp
index 3bca1a831fa..3bca1a831fa 100644
--- a/src/third_party/boost-1.69.0/boost/range/as_literal.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/range/begin.hpp
index 4f53d4688cb..4f53d4688cb 100644
--- a/src/third_party/boost-1.69.0/boost/range/begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/category.hpp b/src/third_party/boost-1.70.0/boost/range/category.hpp
index f5431adf2ed..f5431adf2ed 100644
--- a/src/third_party/boost-1.69.0/boost/range/category.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/concepts.hpp b/src/third_party/boost-1.70.0/boost/range/concepts.hpp
index f6f9f41af41..f6f9f41af41 100644
--- a/src/third_party/boost-1.69.0/boost/range/concepts.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/concepts.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/config.hpp b/src/third_party/boost-1.70.0/boost/range/config.hpp
index 7600a5ff824..7600a5ff824 100644
--- a/src/third_party/boost-1.69.0/boost/range/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/const_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/const_iterator.hpp
index 727fdad0586..727fdad0586 100644
--- a/src/third_party/boost-1.69.0/boost/range/const_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/const_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/const_reverse_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/const_reverse_iterator.hpp
index bfe161561c2..bfe161561c2 100644
--- a/src/third_party/boost-1.69.0/boost/range/const_reverse_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/const_reverse_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/as_literal.hpp b/src/third_party/boost-1.70.0/boost/range/detail/as_literal.hpp
index 8b219ea2463..8b219ea2463 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/as_literal.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/as_literal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/begin.hpp b/src/third_party/boost-1.70.0/boost/range/detail/begin.hpp
index efadaa6b8ca..efadaa6b8ca 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/begin.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/begin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/common.hpp b/src/third_party/boost-1.70.0/boost/range/detail/common.hpp
index 2cbc55411dc..2cbc55411dc 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/common.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/default_constructible_unary_fn.hpp b/src/third_party/boost-1.70.0/boost/range/detail/default_constructible_unary_fn.hpp
index 9729e3cb809..9729e3cb809 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/default_constructible_unary_fn.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/default_constructible_unary_fn.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/detail_str.hpp b/src/third_party/boost-1.70.0/boost/range/detail/detail_str.hpp
index 5ef7a3450ea..5ef7a3450ea 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/detail_str.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/detail_str.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/end.hpp b/src/third_party/boost-1.70.0/boost/range/detail/end.hpp
index 76229216a52..76229216a52 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/end.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/extract_optional_type.hpp b/src/third_party/boost-1.70.0/boost/range/detail/extract_optional_type.hpp
index 0381434a859..0381434a859 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/extract_optional_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/extract_optional_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/has_member_size.hpp b/src/third_party/boost-1.70.0/boost/range/detail/has_member_size.hpp
index 0c639aa891f..0c639aa891f 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/has_member_size.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/has_member_size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/implementation_help.hpp b/src/third_party/boost-1.70.0/boost/range/detail/implementation_help.hpp
index 59a3ade8370..59a3ade8370 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/implementation_help.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/implementation_help.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/misc_concept.hpp b/src/third_party/boost-1.70.0/boost/range/detail/misc_concept.hpp
index 74cb919f27e..74cb919f27e 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/misc_concept.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/misc_concept.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/msvc_has_iterator_workaround.hpp b/src/third_party/boost-1.70.0/boost/range/detail/msvc_has_iterator_workaround.hpp
index 62b67fd5290..62b67fd5290 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/msvc_has_iterator_workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/msvc_has_iterator_workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/range_return.hpp b/src/third_party/boost-1.70.0/boost/range/detail/range_return.hpp
index 9b98e099c1f..9b98e099c1f 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/range_return.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/range_return.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/remove_extent.hpp b/src/third_party/boost-1.70.0/boost/range/detail/remove_extent.hpp
index 68e45972456..68e45972456 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/remove_extent.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/remove_extent.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/safe_bool.hpp b/src/third_party/boost-1.70.0/boost/range/detail/safe_bool.hpp
index 182e5104845..182e5104845 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/safe_bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/safe_bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/sfinae.hpp b/src/third_party/boost-1.70.0/boost/range/detail/sfinae.hpp
index 5b2c61e71ee..5b2c61e71ee 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/sfinae.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/sfinae.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/size_type.hpp b/src/third_party/boost-1.70.0/boost/range/detail/size_type.hpp
index 78a60a48e96..78a60a48e96 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/size_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/size_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/str_types.hpp b/src/third_party/boost-1.70.0/boost/range/detail/str_types.hpp
index f8cab190d53..f8cab190d53 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/str_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/str_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/detail/value_type.hpp b/src/third_party/boost-1.70.0/boost/range/detail/value_type.hpp
index 2784514c6a0..2784514c6a0 100644
--- a/src/third_party/boost-1.69.0/boost/range/detail/value_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/detail/value_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/difference_type.hpp b/src/third_party/boost-1.70.0/boost/range/difference_type.hpp
index 6bb3c5f5520..6bb3c5f5520 100644
--- a/src/third_party/boost-1.69.0/boost/range/difference_type.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/range/distance.hpp
index 5b82cf0cedb..5b82cf0cedb 100644
--- a/src/third_party/boost-1.69.0/boost/range/distance.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/distance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/empty.hpp b/src/third_party/boost-1.70.0/boost/range/empty.hpp
index d57a30ed017..d57a30ed017 100644
--- a/src/third_party/boost-1.69.0/boost/range/empty.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/range/end.hpp
index eab4fa9f5b5..eab4fa9f5b5 100644
--- a/src/third_party/boost-1.69.0/boost/range/end.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/functions.hpp b/src/third_party/boost-1.70.0/boost/range/functions.hpp
index 43c54b15b85..43c54b15b85 100644
--- a/src/third_party/boost-1.69.0/boost/range/functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/has_range_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/has_range_iterator.hpp
index 88d8664d165..88d8664d165 100644
--- a/src/third_party/boost-1.69.0/boost/range/has_range_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/has_range_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/iterator.hpp b/src/third_party/boost-1.70.0/boost/range/iterator.hpp
index 2956353ab5a..2956353ab5a 100644
--- a/src/third_party/boost-1.69.0/boost/range/iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/iterator_range.hpp b/src/third_party/boost-1.70.0/boost/range/iterator_range.hpp
index dfcd4d2f860..dfcd4d2f860 100644
--- a/src/third_party/boost-1.69.0/boost/range/iterator_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/iterator_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/iterator_range_core.hpp b/src/third_party/boost-1.70.0/boost/range/iterator_range_core.hpp
index 7f2dc3f9c89..7f2dc3f9c89 100644
--- a/src/third_party/boost-1.69.0/boost/range/iterator_range_core.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/iterator_range_core.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/iterator_range_io.hpp b/src/third_party/boost-1.70.0/boost/range/iterator_range_io.hpp
index 8c294008cd4..8c294008cd4 100644
--- a/src/third_party/boost-1.69.0/boost/range/iterator_range_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/iterator_range_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/metafunctions.hpp b/src/third_party/boost-1.70.0/boost/range/metafunctions.hpp
index 9dc59d0f7c5..9dc59d0f7c5 100644
--- a/src/third_party/boost-1.69.0/boost/range/metafunctions.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/metafunctions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/mutable_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/mutable_iterator.hpp
index b924666679a..b924666679a 100644
--- a/src/third_party/boost-1.69.0/boost/range/mutable_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/mutable_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/numeric.hpp b/src/third_party/boost-1.70.0/boost/range/numeric.hpp
index d1510cdef1a..d1510cdef1a 100644
--- a/src/third_party/boost-1.69.0/boost/range/numeric.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/numeric.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/pointer.hpp b/src/third_party/boost-1.70.0/boost/range/pointer.hpp
index b1e8dc5c5ec..b1e8dc5c5ec 100644
--- a/src/third_party/boost-1.69.0/boost/range/pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/range_fwd.hpp b/src/third_party/boost-1.70.0/boost/range/range_fwd.hpp
index 0e6e00f5531..0e6e00f5531 100644
--- a/src/third_party/boost-1.69.0/boost/range/range_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/range_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/rbegin.hpp b/src/third_party/boost-1.70.0/boost/range/rbegin.hpp
index 6d66de94b96..6d66de94b96 100644
--- a/src/third_party/boost-1.69.0/boost/range/rbegin.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/rbegin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/reference.hpp b/src/third_party/boost-1.70.0/boost/range/reference.hpp
index c664c38a660..c664c38a660 100644
--- a/src/third_party/boost-1.69.0/boost/range/reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/rend.hpp b/src/third_party/boost-1.70.0/boost/range/rend.hpp
index ef7040780cc..ef7040780cc 100644
--- a/src/third_party/boost-1.69.0/boost/range/rend.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/rend.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/result_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/result_iterator.hpp
index 54e343d1117..54e343d1117 100644
--- a/src/third_party/boost-1.69.0/boost/range/result_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/result_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/reverse_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/reverse_iterator.hpp
index 0aa0130af64..0aa0130af64 100644
--- a/src/third_party/boost-1.69.0/boost/range/reverse_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/reverse_result_iterator.hpp b/src/third_party/boost-1.70.0/boost/range/reverse_result_iterator.hpp
index d375cfd536f..d375cfd536f 100644
--- a/src/third_party/boost-1.69.0/boost/range/reverse_result_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/reverse_result_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/size.hpp b/src/third_party/boost-1.70.0/boost/range/size.hpp
index 7f38db8c1eb..7f38db8c1eb 100644
--- a/src/third_party/boost-1.69.0/boost/range/size.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/size.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/size_type.hpp b/src/third_party/boost-1.70.0/boost/range/size_type.hpp
index 0a2ea81bb98..0a2ea81bb98 100644
--- a/src/third_party/boost-1.69.0/boost/range/size_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/size_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/sub_range.hpp b/src/third_party/boost-1.70.0/boost/range/sub_range.hpp
index d1c3b99b0d0..d1c3b99b0d0 100644
--- a/src/third_party/boost-1.69.0/boost/range/sub_range.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/sub_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/traversal.hpp b/src/third_party/boost-1.70.0/boost/range/traversal.hpp
index 237b3e88e00..237b3e88e00 100644
--- a/src/third_party/boost-1.69.0/boost/range/traversal.hpp
+++ b/src/third_party/boost-1.70.0/boost/range/traversal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/value_type.hpp b/src/third_party/boost-1.70.0/boost/range/value_type.hpp
index 5a3187ec0e0..5a3187ec0e0 100644
--- a/src/third_party/boost-1.69.0/boost/range/value_type.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/ratio/config.hpp
index 3e4d581298f..3e4d581298f 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/abs.hpp b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/abs.hpp
index 91545888a9d..91545888a9d 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/abs.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/abs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/gcd.hpp b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/gcd.hpp
index 30ba1db91cd..30ba1db91cd 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/gcd.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/gcd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/lcm.hpp b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/lcm.hpp
index 1792660f06a..1792660f06a 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/lcm.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/lcm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/sign.hpp b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/sign.hpp
index fa1c555348e..fa1c555348e 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/sign.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/detail/mpl/sign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/detail/overflow_helpers.hpp b/src/third_party/boost-1.70.0/boost/ratio/detail/overflow_helpers.hpp
index ffaa603a65a..ffaa603a65a 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/detail/overflow_helpers.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/detail/overflow_helpers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/detail/ratio_io.hpp b/src/third_party/boost-1.70.0/boost/ratio/detail/ratio_io.hpp
index 636dbc22f84..636dbc22f84 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/detail/ratio_io.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/detail/ratio_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/mpl/rational_c_tag.hpp b/src/third_party/boost-1.70.0/boost/ratio/mpl/rational_c_tag.hpp
index 743766ffa0a..743766ffa0a 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/mpl/rational_c_tag.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/mpl/rational_c_tag.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/ratio.hpp b/src/third_party/boost-1.70.0/boost/ratio/ratio.hpp
index 824cbf01733..824cbf01733 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/ratio.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/ratio.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/ratio_fwd.hpp b/src/third_party/boost-1.70.0/boost/ratio/ratio_fwd.hpp
index cd9199f3939..cd9199f3939 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/ratio_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/ratio/ratio_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/ratio_io.hpp b/src/third_party/boost-1.70.0/boost/ratio/ratio_io.hpp
index e39cbaffa54..e39cbaffa54 100644
--- a/src/third_party/boost-1.69.0/boost/ratio/ratio_io.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/rational.hpp
index 8cd70b3e22e..8cd70b3e22e 100644
--- a/src/third_party/boost-1.69.0/boost/rational.hpp
+++ b/src/third_party/boost-1.70.0/boost/rational.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ref.hpp b/src/third_party/boost-1.70.0/boost/ref.hpp
index 17b56ec0078..17b56ec0078 100644
--- a/src/third_party/boost-1.69.0/boost/ref.hpp
+++ b/src/third_party/boost-1.70.0/boost/ref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex.hpp b/src/third_party/boost-1.70.0/boost/regex.hpp
index 6dc3dfbd427..6dc3dfbd427 100644
--- a/src/third_party/boost-1.69.0/boost/regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex.hpp
diff --git a/src/third_party/boost-1.70.0/boost/regex/config.hpp b/src/third_party/boost-1.70.0/boost/regex/config.hpp
new file mode 100644
index 00000000000..f01321c8281
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/regex/config.hpp
@@ -0,0 +1,491 @@
+/*
+ *
+ * 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
+#ifdef __CYGWIN__
+/* We get multiply defined symbols without this: */
+# 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.69.0/boost/regex/config/borland.hpp b/src/third_party/boost-1.70.0/boost/regex/config/borland.hpp
index 51c2126b8ec..51c2126b8ec 100644
--- a/src/third_party/boost-1.69.0/boost/regex/config/borland.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/config/borland.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/config/cwchar.hpp b/src/third_party/boost-1.70.0/boost/regex/config/cwchar.hpp
index a55089d0ab4..a55089d0ab4 100644
--- a/src/third_party/boost-1.69.0/boost/regex/config/cwchar.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/icu.hpp
index 1bf71cb4e3d..1bf71cb4e3d 100644
--- a/src/third_party/boost-1.69.0/boost/regex/icu.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/icu.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/pattern_except.hpp b/src/third_party/boost-1.70.0/boost/regex/pattern_except.hpp
index 004b67f3f25..004b67f3f25 100644
--- a/src/third_party/boost-1.69.0/boost/regex/pattern_except.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/pattern_except.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/pending/object_cache.hpp b/src/third_party/boost-1.70.0/boost/regex/pending/object_cache.hpp
index c47862f0e6f..c47862f0e6f 100644
--- a/src/third_party/boost-1.69.0/boost/regex/pending/object_cache.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/pending/object_cache.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/pending/static_mutex.hpp b/src/third_party/boost-1.70.0/boost/regex/pending/static_mutex.hpp
index 344926f6ab2..344926f6ab2 100644
--- a/src/third_party/boost-1.69.0/boost/regex/pending/static_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/pending/static_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/pending/unicode_iterator.hpp b/src/third_party/boost-1.70.0/boost/regex/pending/unicode_iterator.hpp
index becb17ad5fb..becb17ad5fb 100644
--- a/src/third_party/boost-1.69.0/boost/regex/pending/unicode_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/pending/unicode_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/regex_traits.hpp b/src/third_party/boost-1.70.0/boost/regex/regex_traits.hpp
index 730ba6e0d84..730ba6e0d84 100644
--- a/src/third_party/boost-1.69.0/boost/regex/regex_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/regex_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/user.hpp b/src/third_party/boost-1.70.0/boost/regex/user.hpp
index 33b1013648b..33b1013648b 100644
--- a/src/third_party/boost-1.69.0/boost/regex/user.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/basic_regex.hpp
index 1962372018d..1962372018d 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/basic_regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/basic_regex_creator.hpp
index 7c00652739c..7c00652739c 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/basic_regex_creator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/basic_regex_parser.hpp
index 6c7065f057b..6c7065f057b 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/basic_regex_parser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/c_regex_traits.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/c_regex_traits.hpp
index d99b0f341b8..d99b0f341b8 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/c_regex_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/c_regex_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/char_regex_traits.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/char_regex_traits.hpp
index e8a501ca006..e8a501ca006 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/char_regex_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/char_regex_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/cpp_regex_traits.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/cpp_regex_traits.hpp
index b7b32d8a5c3..b7b32d8a5c3 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/cpp_regex_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/cpp_regex_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/cregex.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/cregex.hpp
index 67abfbee194..67abfbee194 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/cregex.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/cregex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/error_type.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/error_type.hpp
index afcc71e3d84..afcc71e3d84 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/error_type.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/fileiter.hpp
index 7c865c63098..7c865c63098 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/fileiter.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/fileiter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/instances.hpp
index 0e423437c7e..0e423437c7e 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/instances.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/iterator_category.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/iterator_category.hpp
index 9e401423780..9e401423780 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/iterator_category.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/iterator_category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/iterator_traits.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/iterator_traits.hpp
index ae45ecb80c5..ae45ecb80c5 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/iterator_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/match_flags.hpp
index aa8fd532634..aa8fd532634 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/match_flags.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/match_flags.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/match_results.hpp
index d88a7b16bda..d88a7b16bda 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/match_results.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/mem_block_cache.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/mem_block_cache.hpp
index 50af421ea2f..50af421ea2f 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/mem_block_cache.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/perl_matcher.hpp
index 663e6188e23..663e6188e23 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_common.hpp
index 3c654e588e7..3c654e588e7 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_common.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_non_recursive.hpp
index db883f1e20a..db883f1e20a 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_non_recursive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_recursive.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_recursive.hpp
index 6c33ba477ff..6c33ba477ff 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_recursive.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/perl_matcher_recursive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/primary_transform.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/primary_transform.hpp
index 3e7cac549bd..3e7cac549bd 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/primary_transform.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/primary_transform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/protected_call.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/protected_call.hpp
index 9d47514f81c..9d47514f81c 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/protected_call.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/protected_call.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regbase.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regbase.hpp
index 2b737d5aba7..2b737d5aba7 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regbase.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regbase.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex.hpp
index 7cc260a3ac9..7cc260a3ac9 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/regex_format.hpp
index b65ffcc9ccd..b65ffcc9ccd 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_format.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_format.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_fwd.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_fwd.hpp
index 3076b069ace..3076b069ace 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_grep.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_grep.hpp
index c5cb054e58e..c5cb054e58e 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_grep.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/regex_iterator.hpp
index 380a9a71a43..380a9a71a43 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_match.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_match.hpp
index a50daa2aa5e..a50daa2aa5e 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_match.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_match.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_merge.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_merge.hpp
index 404ca775019..404ca775019 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_merge.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/regex_raw_buffer.hpp
index f1f4f50ae58..f1f4f50ae58 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_raw_buffer.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_raw_buffer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_replace.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_replace.hpp
index 415c58b634d..415c58b634d 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_replace.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_replace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_search.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_search.hpp
index 0725d3ec3fc..0725d3ec3fc 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_search.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/regex_split.hpp
index afa56598319..afa56598319 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_split.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_split.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_token_iterator.hpp
index fde51d74ebe..fde51d74ebe 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_token_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_traits.hpp
index 5d427706543..5d427706543 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/regex_traits_defaults.hpp
index e58d6bae23a..e58d6bae23a 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits_defaults.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_traits_defaults.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/regex_workaround.hpp
index 35eafc253ae..35eafc253ae 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/regex_workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/states.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/states.hpp
index b56d013476a..b56d013476a 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/states.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/states.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/sub_match.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/sub_match.hpp
index ff8a8e467ba..ff8a8e467ba 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/sub_match.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/sub_match.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/syntax_type.hpp b/src/third_party/boost-1.70.0/boost/regex/v4/syntax_type.hpp
index 3efdf0b0f93..3efdf0b0f93 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/syntax_type.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/regex/v4/u32regex_iterator.hpp
index f8763a8d6a8..f8763a8d6a8 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/u32regex_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.70.0/boost/regex/v4/u32regex_token_iterator.hpp
index 952f7c4135f..952f7c4135f 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_token_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/u32regex_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.70.0/boost/regex/v4/w32_regex_traits.hpp
index 378ee8565e1..378ee8565e1 100644
--- a/src/third_party/boost-1.69.0/boost/regex/v4/w32_regex_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex/v4/w32_regex_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex_fwd.hpp b/src/third_party/boost-1.70.0/boost/regex_fwd.hpp
index 2ee4a2495fe..2ee4a2495fe 100644
--- a/src/third_party/boost-1.69.0/boost/regex_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/regex_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/scoped_array.hpp b/src/third_party/boost-1.70.0/boost/scoped_array.hpp
index d91889b7cf1..d91889b7cf1 100644
--- a/src/third_party/boost-1.69.0/boost/scoped_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/scoped_array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/scoped_ptr.hpp b/src/third_party/boost-1.70.0/boost/scoped_ptr.hpp
index 334a22e2fe1..334a22e2fe1 100644
--- a/src/third_party/boost-1.69.0/boost/scoped_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/scoped_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/access.hpp b/src/third_party/boost-1.70.0/boost/serialization/access.hpp
index f6581accc91..f6581accc91 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/access.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/access.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/array_optimization.hpp b/src/third_party/boost-1.70.0/boost/serialization/array_optimization.hpp
index 40dffba871a..40dffba871a 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/array_optimization.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/array_optimization.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/array_wrapper.hpp b/src/third_party/boost-1.70.0/boost/serialization/array_wrapper.hpp
index adf436e15b4..adf436e15b4 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/array_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/array_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/assume_abstract.hpp b/src/third_party/boost-1.70.0/boost/serialization/assume_abstract.hpp
index 632f9312f5f..632f9312f5f 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/assume_abstract.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/assume_abstract.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/base_object.hpp b/src/third_party/boost-1.70.0/boost/serialization/base_object.hpp
index 1a82cecd4b5..1a82cecd4b5 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/base_object.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/base_object.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/collection_size_type.hpp b/src/third_party/boost-1.70.0/boost/serialization/collection_size_type.hpp
index 2dd8fa72584..2dd8fa72584 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/collection_size_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/collection_size_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/collection_traits.hpp b/src/third_party/boost-1.70.0/boost/serialization/collection_traits.hpp
index 3ec9401eff0..3ec9401eff0 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/collection_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/collection_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/collections_load_imp.hpp b/src/third_party/boost-1.70.0/boost/serialization/collections_load_imp.hpp
index e042c0c130d..e042c0c130d 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/collections_load_imp.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/collections_load_imp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/collections_save_imp.hpp b/src/third_party/boost-1.70.0/boost/serialization/collections_save_imp.hpp
index 5ada155e241..5ada155e241 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/collections_save_imp.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/collections_save_imp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/config.hpp b/src/third_party/boost-1.70.0/boost/serialization/config.hpp
index ea8cb9239ed..ea8cb9239ed 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/detail/is_default_constructible.hpp b/src/third_party/boost-1.70.0/boost/serialization/detail/is_default_constructible.hpp
index 4d20b13bf3e..4d20b13bf3e 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/detail/is_default_constructible.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/detail/is_default_constructible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/detail/stack_constructor.hpp b/src/third_party/boost-1.70.0/boost/serialization/detail/stack_constructor.hpp
index ae14832c6db..ae14832c6db 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/detail/stack_constructor.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/detail/stack_constructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/extended_type_info.hpp b/src/third_party/boost-1.70.0/boost/serialization/extended_type_info.hpp
index bb2a190d465..bb2a190d465 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/extended_type_info.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/extended_type_info.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_no_rtti.hpp b/src/third_party/boost-1.70.0/boost/serialization/extended_type_info_no_rtti.hpp
index aaa8b44459b..aaa8b44459b 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_no_rtti.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/extended_type_info_no_rtti.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_typeid.hpp b/src/third_party/boost-1.70.0/boost/serialization/extended_type_info_typeid.hpp
index 8ee591b3169..8ee591b3169 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_typeid.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/extended_type_info_typeid.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/factory.hpp b/src/third_party/boost-1.70.0/boost/serialization/factory.hpp
index 2db7e7e36c3..2db7e7e36c3 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/factory.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/factory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/force_include.hpp b/src/third_party/boost-1.70.0/boost/serialization/force_include.hpp
index 55ab79d0d58..55ab79d0d58 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/force_include.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/force_include.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/is_bitwise_serializable.hpp b/src/third_party/boost-1.70.0/boost/serialization/is_bitwise_serializable.hpp
index 7e24a2cb6d8..7e24a2cb6d8 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/is_bitwise_serializable.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/is_bitwise_serializable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/item_version_type.hpp b/src/third_party/boost-1.70.0/boost/serialization/item_version_type.hpp
index f3e5adac6f8..f3e5adac6f8 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/item_version_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/item_version_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/level.hpp b/src/third_party/boost-1.70.0/boost/serialization/level.hpp
index f6a84d10422..f6a84d10422 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/level.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/level.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/level_enum.hpp b/src/third_party/boost-1.70.0/boost/serialization/level_enum.hpp
index baf64e04f31..baf64e04f31 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/level_enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/level_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/list.hpp b/src/third_party/boost-1.70.0/boost/serialization/list.hpp
index 5fdc114d7ed..5fdc114d7ed 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/nvp.hpp b/src/third_party/boost-1.70.0/boost/serialization/nvp.hpp
index 066fe94d879..066fe94d879 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/nvp.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/nvp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/serialization.hpp b/src/third_party/boost-1.70.0/boost/serialization/serialization.hpp
index a4d04723c75..a4d04723c75 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/serialization.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/serialization.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/set.hpp b/src/third_party/boost-1.70.0/boost/serialization/set.hpp
index dd201267fad..dd201267fad 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/set.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/serialization/singleton.hpp
index a668100da20..a668100da20 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/singleton.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/singleton.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/smart_cast.hpp b/src/third_party/boost-1.70.0/boost/serialization/smart_cast.hpp
index 563f36aa20b..563f36aa20b 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/smart_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/smart_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/split_free.hpp b/src/third_party/boost-1.70.0/boost/serialization/split_free.hpp
index 85e2f590fe4..85e2f590fe4 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/split_free.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/split_free.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/split_member.hpp b/src/third_party/boost-1.70.0/boost/serialization/split_member.hpp
index 5f32520559e..5f32520559e 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/split_member.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/split_member.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/state_saver.hpp b/src/third_party/boost-1.70.0/boost/serialization/state_saver.hpp
index 248b8d91556..248b8d91556 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/state_saver.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/state_saver.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/static_warning.hpp b/src/third_party/boost-1.70.0/boost/serialization/static_warning.hpp
index 1d9238fc4d9..1d9238fc4d9 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/static_warning.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/static_warning.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/string.hpp b/src/third_party/boost-1.70.0/boost/serialization/string.hpp
index 76e695d4f3c..76e695d4f3c 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/string.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/string.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/strong_typedef.hpp b/src/third_party/boost-1.70.0/boost/serialization/strong_typedef.hpp
index fdd1b24c9cb..fdd1b24c9cb 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/strong_typedef.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/strong_typedef.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/throw_exception.hpp b/src/third_party/boost-1.70.0/boost/serialization/throw_exception.hpp
index b67618adc92..b67618adc92 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/throw_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/throw_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/tracking.hpp b/src/third_party/boost-1.70.0/boost/serialization/tracking.hpp
index d5c79b8409d..d5c79b8409d 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/tracking.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/tracking.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/tracking_enum.hpp b/src/third_party/boost-1.70.0/boost/serialization/tracking_enum.hpp
index 278051e1baf..278051e1baf 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/tracking_enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/tracking_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/traits.hpp b/src/third_party/boost-1.70.0/boost/serialization/traits.hpp
index 9e114fdd3df..9e114fdd3df 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/type_info_implementation.hpp b/src/third_party/boost-1.70.0/boost/serialization/type_info_implementation.hpp
index 24637a8dbb3..24637a8dbb3 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/type_info_implementation.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/type_info_implementation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/vector.hpp b/src/third_party/boost-1.70.0/boost/serialization/vector.hpp
index 9a114c00e20..9a114c00e20 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/version.hpp b/src/third_party/boost-1.70.0/boost/serialization/version.hpp
index 21a74d73daa..21a74d73daa 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/version.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/version.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/void_cast.hpp b/src/third_party/boost-1.70.0/boost/serialization/void_cast.hpp
index 97c5fe61ba7..97c5fe61ba7 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/void_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/void_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/void_cast_fwd.hpp b/src/third_party/boost-1.70.0/boost/serialization/void_cast_fwd.hpp
index def61d52bb7..def61d52bb7 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/void_cast_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/void_cast_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/wrapper.hpp b/src/third_party/boost-1.70.0/boost/serialization/wrapper.hpp
index 60d7910b17a..60d7910b17a 100644
--- a/src/third_party/boost-1.69.0/boost/serialization/wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/serialization/wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/shared_array.hpp b/src/third_party/boost-1.70.0/boost/shared_array.hpp
index 6804224c277..6804224c277 100644
--- a/src/third_party/boost-1.69.0/boost/shared_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/shared_array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/shared_ptr.hpp b/src/third_party/boost-1.70.0/boost/shared_ptr.hpp
index cb01b265881..cb01b265881 100644
--- a/src/third_party/boost-1.69.0/boost/shared_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/shared_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr.hpp
index 6fabfc5388f..6fabfc5388f 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/allocate_local_shared_array.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/allocate_local_shared_array.hpp
new file mode 100644
index 00000000000..c1c7373738d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/allocate_local_shared_array.hpp
@@ -0,0 +1,220 @@
+/*
+Copyright 2017-2019 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 {
+
+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 enable_if_<is_unbounded_array<T>::value,
+ local_shared_ptr<T> >::type
+allocate_local_shared(const A& allocator, std::size_t count)
+{
+ typedef typename remove_extent<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, scalar>::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 enable_if_<is_bounded_array<T>::value,
+ local_shared_ptr<T> >::type
+allocate_local_shared(const A& allocator)
+{
+ typedef typename remove_extent<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ enum {
+ size = detail::sp_array_count<T, scalar>::value
+ };
+ 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 enable_if_<is_unbounded_array<T>::value,
+ local_shared_ptr<T> >::type
+allocate_local_shared(const A& allocator, std::size_t count,
+ const typename remove_extent<T>::type& value)
+{
+ typedef typename remove_extent<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;
+ enum {
+ total = detail::sp_array_count<type, scalar>::value
+ };
+ std::size_t size = count * total;
+ 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), total, 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 enable_if_<is_bounded_array<T>::value,
+ local_shared_ptr<T> >::type
+allocate_local_shared(const A& allocator,
+ const typename remove_extent<T>::type& value)
+{
+ typedef typename remove_extent<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ enum {
+ size = detail::sp_array_count<T, scalar>::value
+ };
+ 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, scalar>::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 enable_if_<is_unbounded_array<T>::value,
+ local_shared_ptr<T> >::type
+allocate_local_shared_noinit(const A& allocator, std::size_t count)
+{
+ typedef typename remove_extent<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, scalar>::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 enable_if_<is_bounded_array<T>::value,
+ local_shared_ptr<T> >::type
+allocate_local_shared_noinit(const A& allocator)
+{
+ typedef typename remove_extent<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ enum {
+ size = detail::sp_array_count<T, scalar>::value
+ };
+ 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.70.0/boost/smart_ptr/allocate_shared_array.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/allocate_shared_array.hpp
new file mode 100644
index 00000000000..5aab81abdbc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/allocate_shared_array.hpp
@@ -0,0 +1,576 @@
+/*
+Copyright 2012-2019 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/enable_if.hpp>
+#include <boost/type_traits/is_bounded_array.hpp>
+#include <boost/type_traits/is_unbounded_array.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/remove_all_extents.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+
+namespace boost {
+namespace detail {
+
+template<class T>
+struct sp_array_scalar {
+ typedef typename boost::remove_cv<typename
+ boost::remove_all_extents<T>::type>::type type;
+};
+
+template<class T, class U>
+struct sp_array_count {
+ enum {
+ value = sizeof(T) / sizeof(U)
+ };
+};
+
+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 E, class A, class T>
+inline typename boost::enable_if_<!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 boost::enable_if_<!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 boost::enable_if_<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 boost::enable_if_<!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 boost::enable_if_<!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 boost::enable_if_<!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 boost::enable_if_<!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 boost::enable_if_<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 boost::enable_if_<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
+ boost::enable_if_<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
+ boost::enable_if_<!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() BOOST_SP_NOEXCEPT {
+ sp_array_destroy<E>(state_.allocator(),
+ sp_array_start<sp_array_base, type>(this), state_.size());
+ }
+
+ virtual void destroy() BOOST_SP_NOEXCEPT {
+ 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&) BOOST_SP_NOEXCEPT {
+ return 0;
+ }
+
+ virtual void* get_local_deleter(const sp_typeinfo&) BOOST_SP_NOEXCEPT {
+ return 0;
+ }
+
+ virtual void* get_untyped_deleter() BOOST_SP_NOEXCEPT {
+ 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 enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
+allocate_shared(const A& allocator, std::size_t count)
+{
+ typedef typename remove_extent<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, scalar>::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 enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
+allocate_shared(const A& allocator)
+{
+ typedef typename remove_extent<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ enum {
+ size = detail::sp_array_count<T, scalar>::value
+ };
+ 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 enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
+allocate_shared(const A& allocator, std::size_t count,
+ const typename remove_extent<T>::type& value)
+{
+ typedef typename remove_extent<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;
+ enum {
+ total = detail::sp_array_count<type, scalar>::value
+ };
+ std::size_t size = count * total;
+ 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), total, 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 enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
+allocate_shared(const A& allocator,
+ const typename remove_extent<T>::type& value)
+{
+ typedef typename remove_extent<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ enum {
+ size = detail::sp_array_count<T, scalar>::value
+ };
+ 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, scalar>::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 enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
+allocate_shared_noinit(const A& allocator, std::size_t count)
+{
+ typedef typename remove_extent<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, scalar>::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 enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
+allocate_shared_noinit(const A& allocator)
+{
+ typedef typename remove_extent<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ enum {
+ size = detail::sp_array_count<T, scalar>::value
+ };
+ 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.69.0/boost/smart_ptr/atomic_shared_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/atomic_shared_ptr.hpp
index 7c485070f83..7c485070f83 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/atomic_shared_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/atomic_shared_ptr.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/bad_weak_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/bad_weak_ptr.hpp
new file mode 100644
index 00000000000..e3e81f9f7ce
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/bad_weak_ptr.hpp
@@ -0,0 +1,70 @@
+#ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
+#define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// boost/smart_ptr/bad_weak_ptr.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the 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>
+#include <exception>
+
+#ifdef __BORLANDC__
+# pragma warn -8026 // Functions with excep. spec. are not expanded inline
+#endif
+
+namespace boost
+{
+
+// The standard library that comes with Borland C++ 5.5.1, 5.6.4
+// defines std::exception and its members as having C calling
+// convention (-pc). When the definition of bad_weak_ptr
+// is compiled with -ps, the compiler issues an error.
+// Hence, the temporary #pragma option -pc below.
+
+#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
+# pragma option push -pc
+#endif
+
+#if defined(BOOST_CLANG)
+// Intel C++ on Mac defines __clang__ but doesn't support the pragma
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+
+class bad_weak_ptr: public std::exception
+{
+public:
+
+ virtual char const * what() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ return "tr1::bad_weak_ptr";
+ }
+};
+
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic pop
+#endif
+
+#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
+# pragma option pop
+#endif
+
+} // namespace boost
+
+#ifdef __BORLANDC__
+# pragma warn .8026 // Functions with excep. spec. are not expanded inline
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count.hpp
index 6e4f71aa8e8..6e4f71aa8e8 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
index df7e32365f4..df7e32365f4 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp
index 5c44d7c1efa..5c44d7c1efa 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_nt.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_nt.hpp
index 3bbf1389135..3bbf1389135 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_nt.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_nt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_pt.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_pt.hpp
index f99b9108e3f..f99b9108e3f 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_pt.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_pt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_solaris.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_solaris.hpp
index a13bcfb4230..a13bcfb4230 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_solaris.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_solaris.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_spin.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_spin.hpp
index 8e623496bf0..8e623496bf0 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_spin.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_spin.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp
index 55b9998e52a..55b9998e52a 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_sync.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_sync.hpp
index b6359b5bcf0..b6359b5bcf0 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_sync.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_sync.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_win32.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_win32.hpp
index 633e73c3c0a..633e73c3c0a 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_win32.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/atomic_count_win32.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lightweight_mutex.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lightweight_mutex.hpp
index d46b1932c2b..d46b1932c2b 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lightweight_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lightweight_mutex.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/local_counted_base.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/local_counted_base.hpp
new file mode 100644
index 00000000000..405ef30ac35
--- /dev/null
+++ b/src/third_party/boost-1.70.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 ) BOOST_SP_NOEXCEPT: pn_( pn )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ explicit local_counted_impl( shared_count && pn ) BOOST_SP_NOEXCEPT: 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.70.0/boost/smart_ptr/detail/local_sp_deleter.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/local_sp_deleter.hpp
new file mode 100644
index 00000000000..9ede7e36cc7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/local_sp_deleter.hpp
@@ -0,0 +1,91 @@
+#ifndef BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/local_sp_deleter.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/local_counted_base.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+template<class D> class local_sp_deleter: public local_counted_impl_em
+{
+private:
+
+ D d_;
+
+public:
+
+ local_sp_deleter(): d_()
+ {
+ }
+
+ explicit local_sp_deleter( D const& d ) BOOST_SP_NOEXCEPT: d_( d )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ explicit local_sp_deleter( D&& d ) BOOST_SP_NOEXCEPT: d_( std::move(d) )
+ {
+ }
+
+#endif
+
+ D& deleter() BOOST_SP_NOEXCEPT
+ {
+ return d_;
+ }
+
+ template<class Y> void operator()( Y* p ) BOOST_SP_NOEXCEPT
+ {
+ d_( p );
+ }
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ void operator()( boost::detail::sp_nullptr_t p ) BOOST_SP_NOEXCEPT
+ {
+ d_( p );
+ }
+
+#endif
+};
+
+template<> class local_sp_deleter<void>
+{
+};
+
+template<class D> D * get_local_deleter( local_sp_deleter<D> * p ) BOOST_SP_NOEXCEPT
+{
+ return &p->deleter();
+}
+
+inline void * get_local_deleter( local_sp_deleter<void> * /*p*/ ) BOOST_SP_NOEXCEPT
+{
+ return 0;
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_nop.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_nop.hpp
index 521a88ec1cd..521a88ec1cd 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_nop.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_nop.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_pthreads.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_pthreads.hpp
index 8eda5182338..8eda5182338 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_pthreads.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_pthreads.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_win32_cs.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_win32_cs.hpp
index d8dccb0141b..d8dccb0141b 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_win32_cs.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/lwm_win32_cs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/operator_bool.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/operator_bool.hpp
index f9c5ef68036..f9c5ef68036 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/operator_bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/operator_bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/quick_allocator.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/quick_allocator.hpp
index 159bd5e7aa8..159bd5e7aa8 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/quick_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/quick_allocator.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/shared_count.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/shared_count.hpp
new file mode 100644
index 00000000000..1ce68e6b574
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/shared_count.hpp
@@ -0,0 +1,668 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/shared_count.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)
+//
+
+#ifdef __BORLANDC__
+# pragma warn -8027 // Functions containing try are not expanded inline
+#endif
+
+#include <boost/config.hpp>
+#include <boost/checked_delete.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/smart_ptr/bad_weak_ptr.hpp>
+#include <boost/smart_ptr/detail/sp_counted_base.hpp>
+#include <boost/smart_ptr/detail/sp_counted_impl.hpp>
+#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
+#include <boost/config/workaround.hpp>
+// In order to avoid circular dependencies with Boost.TR1
+// we make sure that our include of <memory> doesn't try to
+// pull in the TR1 headers: that's why we use this header
+// rather than including <memory> directly:
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
+#include <functional> // std::less
+
+#ifdef BOOST_NO_EXCEPTIONS
+# include <new> // std::bad_alloc
+#endif
+
+#include <boost/core/addressof.hpp>
+
+#if defined( BOOST_SP_DISABLE_DEPRECATED )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+namespace boost
+{
+
+namespace movelib
+{
+
+template< class T, class D > class unique_ptr;
+
+} // namespace movelib
+
+namespace detail
+{
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+int const shared_count_id = 0x2C35F101;
+int const weak_count_id = 0x298C38A4;
+
+#endif
+
+struct sp_nothrow_tag {};
+
+template< class D > struct sp_inplace_tag
+{
+};
+
+template< class T > class sp_reference_wrapper
+{
+public:
+
+ explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) )
+ {
+ }
+
+ template< class Y > void operator()( Y * p ) const
+ {
+ (*t_)( p );
+ }
+
+private:
+
+ T * t_;
+};
+
+template< class D > struct sp_convert_reference
+{
+ typedef D type;
+};
+
+template< class D > struct sp_convert_reference< D& >
+{
+ typedef sp_reference_wrapper< D > type;
+};
+
+class weak_count;
+
+class shared_count
+{
+private:
+
+ sp_counted_base * pi_;
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ int id_;
+#endif
+
+ friend class weak_count;
+
+public:
+
+ BOOST_CONSTEXPR shared_count() BOOST_SP_NOEXCEPT: pi_(0)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ }
+
+ BOOST_CONSTEXPR explicit shared_count( sp_counted_base * pi ) BOOST_SP_NOEXCEPT: pi_( pi )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ }
+
+ template<class Y> explicit shared_count( Y * p ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try
+ {
+ pi_ = new sp_counted_impl_p<Y>( p );
+ }
+ catch(...)
+ {
+ boost::checked_delete( p );
+ throw;
+ }
+
+#else
+
+ pi_ = new sp_counted_impl_p<Y>( p );
+
+ if( pi_ == 0 )
+ {
+ boost::checked_delete( p );
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif
+ }
+
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
+ template<class Y, class D> shared_count( Y * p, D d ): pi_(0)
+#else
+ template<class P, class D> shared_count( P p, D d ): pi_(0)
+#endif
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
+ typedef Y* P;
+#endif
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try
+ {
+ pi_ = new sp_counted_impl_pd<P, D>(p, d);
+ }
+ catch(...)
+ {
+ d(p); // delete p
+ throw;
+ }
+
+#else
+
+ pi_ = new sp_counted_impl_pd<P, D>(p, d);
+
+ if(pi_ == 0)
+ {
+ d(p); // delete p
+ boost::throw_exception(std::bad_alloc());
+ }
+
+#endif
+ }
+
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
+ template< class P, class D > shared_count( P p, sp_inplace_tag<D> ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try
+ {
+ pi_ = new sp_counted_impl_pd< P, D >( p );
+ }
+ catch( ... )
+ {
+ D::operator_fn( p ); // delete p
+ throw;
+ }
+
+#else
+
+ pi_ = new sp_counted_impl_pd< P, D >( p );
+
+ if( pi_ == 0 )
+ {
+ D::operator_fn( p ); // delete p
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif // #ifndef BOOST_NO_EXCEPTIONS
+ }
+
+#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
+ template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ typedef sp_counted_impl_pda<P, D, A> impl_type;
+
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ typedef typename std::allocator_traits<A>::template rebind_alloc< impl_type > A2;
+
+#else
+
+ typedef typename A::template rebind< impl_type >::other A2;
+
+#endif
+
+ A2 a2( a );
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try
+ {
+ pi_ = a2.allocate( 1 );
+ ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
+ }
+ catch(...)
+ {
+ d( p );
+
+ if( pi_ != 0 )
+ {
+ a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
+ }
+
+ throw;
+ }
+
+#else
+
+ pi_ = a2.allocate( 1 );
+
+ if( pi_ != 0 )
+ {
+ ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
+ }
+ else
+ {
+ d( p );
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif
+ }
+
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
+ template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ typedef sp_counted_impl_pda< P, D, A > impl_type;
+
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ typedef typename std::allocator_traits<A>::template rebind_alloc< impl_type > A2;
+
+#else
+
+ typedef typename A::template rebind< impl_type >::other A2;
+
+#endif
+
+ A2 a2( a );
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try
+ {
+ pi_ = a2.allocate( 1 );
+ ::new( static_cast< void* >( pi_ ) ) impl_type( p, a );
+ }
+ catch(...)
+ {
+ D::operator_fn( p );
+
+ if( pi_ != 0 )
+ {
+ a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
+ }
+
+ throw;
+ }
+
+#else
+
+ pi_ = a2.allocate( 1 );
+
+ if( pi_ != 0 )
+ {
+ ::new( static_cast< void* >( pi_ ) ) impl_type( p, a );
+ }
+ else
+ {
+ D::operator_fn( p );
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif // #ifndef BOOST_NO_EXCEPTIONS
+ }
+
+#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+
+#ifndef BOOST_NO_AUTO_PTR
+
+ // auto_ptr<Y> is special cased to provide the strong guarantee
+
+ template<class Y>
+ explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+#ifdef BOOST_NO_EXCEPTIONS
+
+ if( pi_ == 0 )
+ {
+ boost::throw_exception(std::bad_alloc());
+ }
+
+#endif
+
+ r.release();
+ }
+
+#endif
+
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+
+ template<class Y, class D>
+ explicit shared_count( std::unique_ptr<Y, D> & r ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ typedef typename sp_convert_reference<D>::type D2;
+
+ D2 d2( r.get_deleter() );
+ pi_ = new sp_counted_impl_pd< typename std::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 );
+
+#ifdef BOOST_NO_EXCEPTIONS
+
+ if( pi_ == 0 )
+ {
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif
+
+ r.release();
+ }
+
+#endif
+
+ template<class Y, class D>
+ explicit shared_count( boost::movelib::unique_ptr<Y, D> & r ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ typedef typename sp_convert_reference<D>::type D2;
+
+ D2 d2( r.get_deleter() );
+ pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 );
+
+#ifdef BOOST_NO_EXCEPTIONS
+
+ if( pi_ == 0 )
+ {
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif
+
+ r.release();
+ }
+
+ ~shared_count() /*BOOST_SP_NOEXCEPT*/
+ {
+ if( pi_ != 0 ) pi_->release();
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ id_ = 0;
+#endif
+ }
+
+ shared_count(shared_count const & r) BOOST_SP_NOEXCEPT: pi_(r.pi_)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ if( pi_ != 0 ) pi_->add_ref_copy();
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ shared_count(shared_count && r) BOOST_SP_NOEXCEPT: pi_(r.pi_)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ r.pi_ = 0;
+ }
+
+#endif
+
+ explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0
+ shared_count( weak_count const & r, sp_nothrow_tag ) BOOST_SP_NOEXCEPT; // constructs an empty *this when r.use_count() == 0
+
+ shared_count & operator= (shared_count const & r) BOOST_SP_NOEXCEPT
+ {
+ sp_counted_base * tmp = r.pi_;
+
+ if( tmp != pi_ )
+ {
+ if( tmp != 0 ) tmp->add_ref_copy();
+ if( pi_ != 0 ) pi_->release();
+ pi_ = tmp;
+ }
+
+ return *this;
+ }
+
+ void swap(shared_count & r) BOOST_SP_NOEXCEPT
+ {
+ sp_counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+
+ long use_count() const BOOST_SP_NOEXCEPT
+ {
+ return pi_ != 0? pi_->use_count(): 0;
+ }
+
+ bool unique() const BOOST_SP_NOEXCEPT
+ {
+ return use_count() == 1;
+ }
+
+ bool empty() const BOOST_SP_NOEXCEPT
+ {
+ return pi_ == 0;
+ }
+
+ friend inline bool operator==(shared_count const & a, shared_count const & b) BOOST_SP_NOEXCEPT
+ {
+ return a.pi_ == b.pi_;
+ }
+
+ friend inline bool operator<(shared_count const & a, shared_count const & b) BOOST_SP_NOEXCEPT
+ {
+ return std::less<sp_counted_base *>()( a.pi_, b.pi_ );
+ }
+
+ void * get_deleter( sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
+ {
+ return pi_? pi_->get_deleter( ti ): 0;
+ }
+
+ void * get_local_deleter( sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
+ {
+ return pi_? pi_->get_local_deleter( ti ): 0;
+ }
+
+ void * get_untyped_deleter() const BOOST_SP_NOEXCEPT
+ {
+ return pi_? pi_->get_untyped_deleter(): 0;
+ }
+};
+
+
+class weak_count
+{
+private:
+
+ sp_counted_base * pi_;
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ int id_;
+#endif
+
+ friend class shared_count;
+
+public:
+
+ BOOST_CONSTEXPR weak_count() BOOST_SP_NOEXCEPT: pi_(0)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(weak_count_id)
+#endif
+ {
+ }
+
+ weak_count(shared_count const & r) BOOST_SP_NOEXCEPT: pi_(r.pi_)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(weak_count_id)
+#endif
+ {
+ if(pi_ != 0) pi_->weak_add_ref();
+ }
+
+ weak_count(weak_count const & r) BOOST_SP_NOEXCEPT: pi_(r.pi_)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(weak_count_id)
+#endif
+ {
+ if(pi_ != 0) pi_->weak_add_ref();
+ }
+
+// Move support
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ weak_count(weak_count && r) BOOST_SP_NOEXCEPT: pi_(r.pi_)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(weak_count_id)
+#endif
+ {
+ r.pi_ = 0;
+ }
+
+#endif
+
+ ~weak_count() /*BOOST_SP_NOEXCEPT*/
+ {
+ if(pi_ != 0) pi_->weak_release();
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ id_ = 0;
+#endif
+ }
+
+ weak_count & operator= (shared_count const & r) BOOST_SP_NOEXCEPT
+ {
+ sp_counted_base * tmp = r.pi_;
+
+ if( tmp != pi_ )
+ {
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
+ pi_ = tmp;
+ }
+
+ return *this;
+ }
+
+ weak_count & operator= (weak_count const & r) BOOST_SP_NOEXCEPT
+ {
+ sp_counted_base * tmp = r.pi_;
+
+ if( tmp != pi_ )
+ {
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
+ pi_ = tmp;
+ }
+
+ return *this;
+ }
+
+ void swap(weak_count & r) BOOST_SP_NOEXCEPT
+ {
+ sp_counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+
+ long use_count() const BOOST_SP_NOEXCEPT
+ {
+ return pi_ != 0? pi_->use_count(): 0;
+ }
+
+ bool empty() const BOOST_SP_NOEXCEPT
+ {
+ return pi_ == 0;
+ }
+
+ friend inline bool operator==(weak_count const & a, weak_count const & b) BOOST_SP_NOEXCEPT
+ {
+ return a.pi_ == b.pi_;
+ }
+
+ friend inline bool operator<(weak_count const & a, weak_count const & b) BOOST_SP_NOEXCEPT
+ {
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);
+ }
+};
+
+inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+{
+ if( pi_ == 0 || !pi_->add_ref_lock() )
+ {
+ boost::throw_exception( boost::bad_weak_ptr() );
+ }
+}
+
+inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ) BOOST_SP_NOEXCEPT: pi_( r.pi_ )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+{
+ if( pi_ != 0 && !pi_->add_ref_lock() )
+ {
+ pi_ = 0;
+ }
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#if defined( BOOST_SP_DISABLE_DEPRECATED )
+#pragma GCC diagnostic pop
+#endif
+
+#ifdef __BORLANDC__
+# pragma warn .8027 // Functions containing try are not expanded inline
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_convertible.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_convertible.hpp
index 4bba9ed4441..4bba9ed4441 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_convertible.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_convertible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base.hpp
index 438613765b4..438613765b4 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
index aa7ea9a20a0..aa7ea9a20a0 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
index cbb642687e0..cbb642687e0 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
new file mode 100644
index 00000000000..90b6f224caa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
@@ -0,0 +1,152 @@
+#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/smart_ptr/detail/sp_noexcept.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 ) BOOST_SP_NOEXCEPT
+{
+ __c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED );
+}
+
+inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
+{
+ return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL );
+}
+
+inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
+{
+ // 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() BOOST_SP_NOEXCEPT
+ {
+ __c11_atomic_init( &use_count_, 1 );
+ __c11_atomic_init( &weak_count_, 1 );
+ }
+
+ virtual ~sp_counted_base() /*BOOST_SP_NOEXCEPT*/
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() BOOST_SP_NOEXCEPT = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() BOOST_SP_NOEXCEPT // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
+
+ void add_ref_copy() BOOST_SP_NOEXCEPT
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() BOOST_SP_NOEXCEPT // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() BOOST_SP_NOEXCEPT
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() BOOST_SP_NOEXCEPT
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() BOOST_SP_NOEXCEPT
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const BOOST_SP_NOEXCEPT
+ {
+ 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.70.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
index c43297e0e42..c43297e0e42 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
index ce34b4cbc4e..ce34b4cbc4e 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
index 32642df778a..32642df778a 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
index c4ce0537c96..c4ce0537c96 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
index 5cf5b3fa665..5cf5b3fa665 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
index 2f27b96e1e7..2f27b96e1e7 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
index ec44c7066f1..ec44c7066f1 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
new file mode 100644
index 00000000000..8d7b8e9cc81
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
@@ -0,0 +1,112 @@
+#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/smart_ptr/detail/sp_noexcept.hpp>
+#include <boost/config.hpp>
+#include <boost/cstdint.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 & );
+
+ boost::int_least32_t use_count_; // #shared
+ boost::int_least32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base() BOOST_SP_NOEXCEPT: use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() /*BOOST_SP_NOEXCEPT*/
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() BOOST_SP_NOEXCEPT = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() BOOST_SP_NOEXCEPT // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
+
+ void add_ref_copy() BOOST_SP_NOEXCEPT
+ {
+ ++use_count_;
+ }
+
+ bool add_ref_lock() BOOST_SP_NOEXCEPT // true on success
+ {
+ if( use_count_ == 0 ) return false;
+ ++use_count_;
+ return true;
+ }
+
+ void release() BOOST_SP_NOEXCEPT
+ {
+ if( --use_count_ == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() BOOST_SP_NOEXCEPT
+ {
+ ++weak_count_;
+ }
+
+ void weak_release() BOOST_SP_NOEXCEPT
+ {
+ if( --weak_count_ == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const BOOST_SP_NOEXCEPT
+ {
+ 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.70.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
new file mode 100644
index 00000000000..1aa6756122e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
@@ -0,0 +1,140 @@
+#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 <boost/cstdint.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 & );
+
+ boost::int_least32_t use_count_; // #shared
+ boost::int_least32_t 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 );
+ boost::int_least32_t 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 );
+ boost::int_least32_t 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 );
+ boost::int_least32_t 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.70.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
index 1b9979bfb56..1b9979bfb56 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
index c0d69dcdcbc..c0d69dcdcbc 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
index b9966260cba..b9966260cba 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
new file mode 100644
index 00000000000..2246dda4b6a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
@@ -0,0 +1,140 @@
+#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/smart_ptr/detail/sp_noexcept.hpp>
+#include <boost/config.hpp>
+#include <atomic>
+#include <cstdint>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( std::atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
+{
+ pw->fetch_add( 1, std::memory_order_relaxed );
+}
+
+inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
+{
+ return pw->fetch_sub( 1, std::memory_order_acq_rel );
+}
+
+inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
+{
+ // 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() BOOST_SP_NOEXCEPT: use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() /*BOOST_SP_NOEXCEPT*/
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() BOOST_SP_NOEXCEPT = 0;
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() BOOST_SP_NOEXCEPT
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
+
+ void add_ref_copy() BOOST_SP_NOEXCEPT
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() BOOST_SP_NOEXCEPT // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() BOOST_SP_NOEXCEPT
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() BOOST_SP_NOEXCEPT
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() BOOST_SP_NOEXCEPT
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const BOOST_SP_NOEXCEPT
+ {
+ 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.70.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
index 17128cc97e7..17128cc97e7 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
index 088ed63972e..088ed63972e 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
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.70.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
index 46bd4d15a91..46bd4d15a91 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_impl.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_impl.hpp
new file mode 100644
index 00000000000..29718b6b8c7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_counted_impl.hpp
@@ -0,0 +1,293 @@
+#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/smart_ptr/detail/sp_noexcept.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*/ ) BOOST_SP_NOEXCEPT
+{
+ return 0;
+}
+
+template<class D> D * get_local_deleter( local_sp_deleter<D> * p ) BOOST_SP_NOEXCEPT;
+
+//
+
+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() BOOST_SP_NOEXCEPT
+ {
+#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 & ) BOOST_SP_NOEXCEPT
+ {
+ return 0;
+ }
+
+ virtual void * get_local_deleter( sp_typeinfo const & ) BOOST_SP_NOEXCEPT
+ {
+ return 0;
+ }
+
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
+ {
+ 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() BOOST_SP_NOEXCEPT
+ {
+ del( ptr );
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
+ {
+ return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
+ }
+
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
+ {
+ return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
+ }
+
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
+ {
+ 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() BOOST_SP_NOEXCEPT
+ {
+ d_( p_ );
+ }
+
+ virtual void destroy() BOOST_SP_NOEXCEPT
+ {
+#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 ) BOOST_SP_NOEXCEPT
+ {
+ return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
+ }
+
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
+ {
+ return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
+ }
+
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
+ {
+ 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.69.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp
index f79bdf38a8d..f79bdf38a8d 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_forward.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_forward.hpp
index 8fdec65b7fa..8fdec65b7fa 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_forward.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_forward.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_has_sync.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_has_sync.hpp
index e1debf0cc9b..e1debf0cc9b 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_has_sync.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/smart_ptr/detail/sp_interlocked.hpp
index e181b8eeaed..e181b8eeaed 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_interlocked.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_interlocked.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_noexcept.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_noexcept.hpp
index 1287ba49525..1287ba49525 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_noexcept.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_noexcept.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_nullptr_t.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_nullptr_t.hpp
index 219ae8070a6..219ae8070a6 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_nullptr_t.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/sp_nullptr_t.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock.hpp
index 0b618dfc155..0b618dfc155 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
index 24d08a8815f..24d08a8815f 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_nt.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_nt.hpp
index 1f399d0dd41..1f399d0dd41 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_nt.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_nt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pool.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_pool.hpp
index 39cf180b242..39cf180b242 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pool.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_pool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pt.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_pt.hpp
index f9cabfc3a7c..f9cabfc3a7c 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pt.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_pt.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp
new file mode 100644
index 00000000000..b1d1eea74bc
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp
@@ -0,0 +1,84 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// Copyright (c) 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/smart_ptr/detail/yield_k.hpp>
+#include <boost/config.hpp>
+#include <atomic>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class spinlock
+{
+public:
+
+ std::atomic_flag v_;
+
+public:
+
+ bool try_lock() BOOST_NOEXCEPT
+ {
+ return !v_.test_and_set( std::memory_order_acquire );
+ }
+
+ void lock() BOOST_NOEXCEPT
+ {
+ for( unsigned k = 0; !try_lock(); ++k )
+ {
+ boost::detail::yield( k );
+ }
+ }
+
+ void unlock() BOOST_NOEXCEPT
+ {
+ v_ .clear( std::memory_order_release );
+ }
+
+public:
+
+ class scoped_lock
+ {
+ private:
+
+ spinlock & sp_;
+
+ scoped_lock( scoped_lock const & );
+ scoped_lock & operator=( scoped_lock const & );
+
+ public:
+
+ explicit scoped_lock( spinlock & sp ) BOOST_NOEXCEPT: sp_( sp )
+ {
+ sp.lock();
+ }
+
+ ~scoped_lock() /*BOOST_NOEXCEPT*/
+ {
+ sp_.unlock();
+ }
+ };
+};
+
+} // namespace detail
+} // namespace boost
+
+#define BOOST_DETAIL_SPINLOCK_INIT { ATOMIC_FLAG_INIT }
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_sync.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_sync.hpp
index a7145c5ac27..a7145c5ac27 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_sync.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_sync.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_w32.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_w32.hpp
index d34e4fc2b52..d34e4fc2b52 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_w32.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/spinlock_w32.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/detail/yield_k.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/yield_k.hpp
new file mode 100644
index 00000000000..e9c41b9581a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/detail/yield_k.hpp
@@ -0,0 +1,183 @@
+#ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// yield_k.hpp
+//
+// Copyright (c) 2008 Peter Dimov
+// Copyright (c) Microsoft Corporation 2014
+//
+// void yield( unsigned k );
+//
+// Typical use:
+//
+// for( unsigned k = 0; !try_lock(); ++k ) yield( k );
+//
+// Distributed under the 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>
+#include <boost/predef/platform/windows_runtime.h>
+
+#if BOOST_PLAT_WINDOWS_RUNTIME
+#include <thread>
+#endif
+
+// BOOST_SMT_PAUSE
+
+#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) && !defined(__c2__)
+
+extern "C" void _mm_pause();
+
+#define BOOST_SMT_PAUSE _mm_pause();
+
+#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )
+
+#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );
+
+#endif
+
+//
+
+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
+
+#if defined( BOOST_USE_WINDOWS_H )
+# include <windows.h>
+#endif
+
+namespace boost
+{
+
+namespace detail
+{
+
+#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME
+
+#if defined(__clang__) && defined(__x86_64__)
+// clang x64 warns that __stdcall is ignored
+# define BOOST_SP_STDCALL
+#else
+# define BOOST_SP_STDCALL __stdcall
+#endif
+
+#if defined(__LP64__) // Cygwin 64
+ extern "C" __declspec(dllimport) void BOOST_SP_STDCALL Sleep( unsigned int ms );
+#else
+ extern "C" __declspec(dllimport) void BOOST_SP_STDCALL Sleep( unsigned long ms );
+#endif
+
+#undef BOOST_SP_STDCALL
+
+#endif // !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME
+
+inline void yield( unsigned k ) BOOST_NOEXCEPT
+{
+ if( k < 4 )
+ {
+ }
+#if defined( BOOST_SMT_PAUSE )
+ else if( k < 16 )
+ {
+ BOOST_SMT_PAUSE
+ }
+#endif
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ else if( k < 32 )
+ {
+ Sleep( 0 );
+ }
+ else
+ {
+ Sleep( 1 );
+ }
+#else
+ else
+ {
+ // Sleep isn't supported on the Windows Runtime.
+ std::this_thread::yield();
+ }
+#endif
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#elif defined( BOOST_HAS_PTHREADS )
+
+#ifndef _AIX
+#include <sched.h>
+#else
+ // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var
+ extern "C" int sched_yield(void);
+#endif
+
+#include <time.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void yield( unsigned k )
+{
+ if( k < 4 )
+ {
+ }
+#if defined( BOOST_SMT_PAUSE )
+ else if( k < 16 )
+ {
+ BOOST_SMT_PAUSE
+ }
+#endif
+ else if( k < 32 || k & 1 )
+ {
+ sched_yield();
+ }
+ else
+ {
+ // g++ -Wextra warns on {} or {0}
+ struct timespec rqtp = { 0, 0 };
+
+ // POSIX says that timespec has tv_sec and tv_nsec
+ // But it doesn't guarantee order or placement
+
+ rqtp.tv_sec = 0;
+ rqtp.tv_nsec = 1000;
+
+ nanosleep( &rqtp, 0 );
+ }
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#else
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void yield( unsigned )
+{
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_raw.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/enable_shared_from_raw.hpp
index 5cd3574e7c4..5cd3574e7c4 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_raw.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/enable_shared_from_raw.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_this.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/enable_shared_from_this.hpp
index fc4de0b5712..fc4de0b5712 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_this.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/enable_shared_from_this.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/intrusive_ptr.hpp
index 0ab075d367b..0ab075d367b 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/intrusive_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ref_counter.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/intrusive_ref_counter.hpp
index c2f918d0a49..c2f918d0a49 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ref_counter.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/intrusive_ref_counter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/local_shared_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/local_shared_ptr.hpp
index 1bf1fdf1743..1bf1fdf1743 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/local_shared_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/local_shared_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared.hpp
index 23114fea268..23114fea268 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_array.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_array.hpp
new file mode 100644
index 00000000000..1d501028c29
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_array.hpp
@@ -0,0 +1,73 @@
+/*
+Copyright 2017 Peter Dimov
+Copyright 2017-2019 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_MAKE_LOCAL_SHARED_ARRAY_HPP
+#define BOOST_SMART_PTR_MAKE_LOCAL_SHARED_ARRAY_HPP
+
+#include <boost/smart_ptr/allocate_local_shared_array.hpp>
+
+namespace boost {
+
+template<class T>
+inline typename enable_if_<is_bounded_array<T>::value,
+ local_shared_ptr<T> >::type
+make_local_shared()
+{
+ return boost::allocate_local_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>());
+}
+
+template<class T>
+inline typename enable_if_<is_bounded_array<T>::value,
+ local_shared_ptr<T> >::type
+make_local_shared(const typename remove_extent<T>::type& value)
+{
+ return boost::allocate_local_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), value);
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value,
+ local_shared_ptr<T> >::type
+make_local_shared(std::size_t size)
+{
+ return boost::allocate_local_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), size);
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value,
+ local_shared_ptr<T> >::type
+make_local_shared(std::size_t size,
+ const typename remove_extent<T>::type& value)
+{
+ return boost::allocate_local_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), size, value);
+}
+
+template<class T>
+inline typename enable_if_<is_bounded_array<T>::value,
+ local_shared_ptr<T> >::type
+make_local_shared_noinit()
+{
+ return boost::allocate_local_shared_noinit<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>());
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value,
+ local_shared_ptr<T> >::type
+make_local_shared_noinit(std::size_t size)
+{
+ return boost::allocate_local_shared_noinit<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), size);
+}
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_object.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_object.hpp
new file mode 100644
index 00000000000..4545c5e0e5c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_local_shared_object.hpp
@@ -0,0 +1,202 @@
+#ifndef BOOST_SMART_PTR_MAKE_LOCAL_SHARED_OBJECT_HPP_INCLUDED
+#define BOOST_SMART_PTR_MAKE_LOCAL_SHARED_OBJECT_HPP_INCLUDED
+
+// make_local_shared_object.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/local_shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/config.hpp>
+#include <utility>
+#include <cstddef>
+
+namespace boost
+{
+
+namespace detail
+{
+
+// lsp_if_not_array
+
+template<class T> struct lsp_if_not_array
+{
+ typedef boost::local_shared_ptr<T> type;
+};
+
+template<class T> struct lsp_if_not_array<T[]>
+{
+};
+
+template<class T, std::size_t N> struct lsp_if_not_array<T[N]>
+{
+};
+
+// lsp_ms_deleter
+
+template<class T, class A> class lsp_ms_deleter: public local_counted_impl_em
+{
+private:
+
+ typedef typename sp_aligned_storage<sizeof(T), ::boost::alignment_of<T>::value>::type storage_type;
+
+ storage_type storage_;
+ A a_;
+ bool initialized_;
+
+private:
+
+ void destroy() BOOST_SP_NOEXCEPT
+ {
+ if( initialized_ )
+ {
+ T * p = reinterpret_cast< T* >( storage_.data_ );
+
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ std::allocator_traits<A>::destroy( a_, p );
+
+#else
+
+ p->~T();
+
+#endif
+
+ initialized_ = false;
+ }
+ }
+
+public:
+
+ explicit lsp_ms_deleter( A const & a ) BOOST_SP_NOEXCEPT : a_( a ), initialized_( false )
+ {
+ }
+
+ // optimization: do not copy storage_
+ lsp_ms_deleter( lsp_ms_deleter const & r ) BOOST_SP_NOEXCEPT : a_( r.a_), initialized_( false )
+ {
+ }
+
+ ~lsp_ms_deleter() BOOST_SP_NOEXCEPT
+ {
+ destroy();
+ }
+
+ void operator()( T * ) BOOST_SP_NOEXCEPT
+ {
+ destroy();
+ }
+
+ static void operator_fn( T* ) BOOST_SP_NOEXCEPT // operator() can't be static
+ {
+ }
+
+ void * address() BOOST_SP_NOEXCEPT
+ {
+ return storage_.data_;
+ }
+
+ void set_initialized() BOOST_SP_NOEXCEPT
+ {
+ initialized_ = true;
+ }
+};
+
+} // namespace detail
+
+template<class T, class A, class... Args> typename boost::detail::lsp_if_not_array<T>::type allocate_local_shared( A const & a, Args&&... args )
+{
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ typedef typename std::allocator_traits<A>::template rebind_alloc<T> A2;
+
+#else
+
+ typedef typename A::template rebind<T>::other A2;
+
+#endif
+
+ A2 a2( a );
+
+ typedef boost::detail::lsp_ms_deleter<T, A2> D;
+
+ boost::shared_ptr<T> pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag<D>(), a2 );
+
+ D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() );
+ void * pv = pd->address();
+
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ std::allocator_traits<A2>::construct( a2, static_cast< T* >( pv ), std::forward<Args>( args )... );
+
+#else
+
+ ::new( pv ) T( std::forward<Args>( args )... );
+
+#endif
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+
+ pd->pn_ = pt._internal_count();
+
+ return boost::local_shared_ptr<T>( boost::detail::lsp_internal_constructor_tag(), pt2, pd );
+}
+
+template<class T, class A> typename boost::detail::lsp_if_not_array<T>::type allocate_local_shared_noinit( A const & a )
+{
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ typedef typename std::allocator_traits<A>::template rebind_alloc<T> A2;
+
+#else
+
+ typedef typename A::template rebind<T>::other A2;
+
+#endif
+
+ A2 a2( a );
+
+ typedef boost::detail::lsp_ms_deleter< T, std::allocator<T> > D;
+
+ boost::shared_ptr<T> pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag<D>(), a2 );
+
+ D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() );
+ void * pv = pd->address();
+
+ ::new( pv ) T;
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+
+ pd->pn_ = pt._internal_count();
+
+ return boost::local_shared_ptr<T>( boost::detail::lsp_internal_constructor_tag(), pt2, pd );
+}
+
+template<class T, class... Args> typename boost::detail::lsp_if_not_array<T>::type make_local_shared( Args&&... args )
+{
+ typedef typename boost::remove_const<T>::type T2;
+ return boost::allocate_local_shared<T2>( std::allocator<T2>(), std::forward<Args>(args)... );
+}
+
+template<class T> typename boost::detail::lsp_if_not_array<T>::type make_local_shared_noinit()
+{
+ typedef typename boost::remove_const<T>::type T2;
+ return boost::allocate_shared_noinit<T2>( std::allocator<T2>() );
+}
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared.hpp
index dd9191c61d3..dd9191c61d3 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_array.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_array.hpp
new file mode 100644
index 00000000000..1b40c4d6a84
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_array.hpp
@@ -0,0 +1,65 @@
+/*
+Copyright 2012-2019 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_MAKE_SHARED_ARRAY_HPP
+#define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP
+
+#include <boost/smart_ptr/allocate_shared_array.hpp>
+
+namespace boost {
+
+template<class T>
+inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
+make_shared()
+{
+ return boost::allocate_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>());
+}
+
+template<class T>
+inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
+make_shared(const typename remove_extent<T>::type& value)
+{
+ return boost::allocate_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), value);
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
+make_shared(std::size_t size)
+{
+ return boost::allocate_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), size);
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
+make_shared(std::size_t size, const typename remove_extent<T>::type& value)
+{
+ return boost::allocate_shared<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), size, value);
+}
+
+template<class T>
+inline typename enable_if_<is_bounded_array<T>::value, shared_ptr<T> >::type
+make_shared_noinit()
+{
+ return boost::allocate_shared_noinit<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>());
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value, shared_ptr<T> >::type
+make_shared_noinit(std::size_t size)
+{
+ return boost::allocate_shared_noinit<T>(std::allocator<typename
+ detail::sp_array_scalar<T>::type>(), size);
+}
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_object.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_object.hpp
index c681602dca2..c681602dca2 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_object.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_shared_object.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/make_unique.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/make_unique.hpp
new file mode 100644
index 00000000000..18340078720
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/make_unique.hpp
@@ -0,0 +1,69 @@
+/*
+Copyright 2012-2019 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_MAKE_UNIQUE_HPP
+#define BOOST_SMART_PTR_MAKE_UNIQUE_HPP
+
+#include <boost/type_traits/enable_if.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_unbounded_array.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <memory>
+#include <utility>
+
+namespace boost {
+
+template<class T>
+inline typename enable_if_<!is_array<T>::value, std::unique_ptr<T> >::type
+make_unique()
+{
+ return std::unique_ptr<T>(new T());
+}
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+template<class T, class... Args>
+inline typename enable_if_<!is_array<T>::value, std::unique_ptr<T> >::type
+make_unique(Args&&... args)
+{
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+}
+#endif
+
+template<class T>
+inline typename enable_if_<!is_array<T>::value, std::unique_ptr<T> >::type
+make_unique(typename remove_reference<T>::type&& value)
+{
+ return std::unique_ptr<T>(new T(std::move(value)));
+}
+
+template<class T>
+inline typename enable_if_<!is_array<T>::value, std::unique_ptr<T> >::type
+make_unique_noinit()
+{
+ return std::unique_ptr<T>(new T);
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value,
+ std::unique_ptr<T> >::type
+make_unique(std::size_t size)
+{
+ return std::unique_ptr<T>(new typename remove_extent<T>::type[size]());
+}
+
+template<class T>
+inline typename enable_if_<is_unbounded_array<T>::value,
+ std::unique_ptr<T> >::type
+make_unique_noinit(std::size_t size)
+{
+ return std::unique_ptr<T>(new typename remove_extent<T>::type[size]);
+}
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/owner_less.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/owner_less.hpp
index 5f50aeb5b84..5f50aeb5b84 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/owner_less.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/owner_less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_array.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/scoped_array.hpp
index 05dd05aea8d..05dd05aea8d 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/scoped_array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/scoped_ptr.hpp
index 5325eba5ffe..5325eba5ffe 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/scoped_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/shared_array.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/shared_array.hpp
index 3ffa7426c30..3ffa7426c30 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/shared_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/shared_array.hpp
diff --git a/src/third_party/boost-1.70.0/boost/smart_ptr/shared_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/shared_ptr.hpp
new file mode 100644
index 00000000000..baafc499f78
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/shared_ptr.hpp
@@ -0,0 +1,1184 @@
+#ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED
+#define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED
+
+//
+// shared_ptr.hpp
+//
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+// Copyright (c) 2001-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)
+//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
+//
+
+#include <boost/config.hpp> // for broken compiler workarounds
+
+// In order to avoid circular dependencies with Boost.TR1
+// we make sure that our include of <memory> doesn't try to
+// pull in the TR1 headers: that's why we use this header
+// rather than including <memory> directly:
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
+
+#include <boost/assert.hpp>
+#include <boost/checked_delete.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/smart_ptr/detail/shared_count.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/smart_ptr/detail/sp_convertible.hpp>
+#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
+#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
+
+#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
+#include <boost/smart_ptr/detail/spinlock_pool.hpp>
+#endif
+
+#include <algorithm> // for std::swap
+#include <functional> // for std::less
+#include <typeinfo> // for std::bad_cast
+#include <cstddef> // for std::size_t
+
+#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_NO_IOSFWD)
+#include <iosfwd> // for std::basic_ostream
+#else
+#include <ostream>
+#endif
+#endif
+
+#if defined( BOOST_SP_DISABLE_DEPRECATED )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+namespace boost
+{
+
+template<class T> class shared_ptr;
+template<class T> class weak_ptr;
+template<class T> class enable_shared_from_this;
+class enable_shared_from_raw;
+
+namespace movelib
+{
+
+ template< class T, class D > class unique_ptr;
+
+} // namespace movelib
+
+namespace detail
+{
+
+// sp_element, element_type
+
+template< class T > struct sp_element
+{
+ typedef T type;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_element< T[] >
+{
+ typedef T type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_element< T[N] >
+{
+ typedef T type;
+};
+
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_dereference, return type of operator*
+
+template< class T > struct sp_dereference
+{
+ typedef T & type;
+};
+
+template<> struct sp_dereference< void >
+{
+ typedef void type;
+};
+
+#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
+
+template<> struct sp_dereference< void const >
+{
+ typedef void type;
+};
+
+template<> struct sp_dereference< void volatile >
+{
+ typedef void type;
+};
+
+template<> struct sp_dereference< void const volatile >
+{
+ typedef void type;
+};
+
+#endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_dereference< T[] >
+{
+ typedef void type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_dereference< T[N] >
+{
+ typedef void type;
+};
+
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_member_access, return type of operator->
+
+template< class T > struct sp_member_access
+{
+ typedef T * type;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_member_access< T[] >
+{
+ typedef void type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_member_access< T[N] >
+{
+ typedef void type;
+};
+
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_array_access, return type of operator[]
+
+template< class T > struct sp_array_access
+{
+ typedef void type;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_array_access< T[] >
+{
+ typedef T & type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_array_access< T[N] >
+{
+ typedef T & type;
+};
+
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_extent, for operator[] index check
+
+template< class T > struct sp_extent
+{
+ enum _vt { value = 0 };
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T, std::size_t N > struct sp_extent< T[N] >
+{
+ enum _vt { value = N };
+};
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// enable_shared_from_this support
+
+template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )
+{
+ if( pe != 0 )
+ {
+ pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
+ }
+}
+
+template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe );
+
+#ifdef _MANAGED
+
+// Avoid C4793, ... causes native code generation
+
+struct sp_any_pointer
+{
+ template<class T> sp_any_pointer( T* ) {}
+};
+
+inline void sp_enable_shared_from_this( sp_any_pointer, sp_any_pointer, sp_any_pointer )
+{
+}
+
+#else // _MANAGED
+
+inline void sp_enable_shared_from_this( ... )
+{
+}
+
+#endif // _MANAGED
+
+#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_AUTO_PTR )
+
+// rvalue auto_ptr support based on a technique by Dave Abrahams
+
+template< class T, class R > struct sp_enable_if_auto_ptr
+{
+};
+
+template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
+{
+ typedef R type;
+};
+
+#endif
+
+// sp_assert_convertible
+
+template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
+{
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ // static_assert( sp_convertible< Y, T >::value );
+ typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
+ (void)sizeof( tmp );
+
+#else
+
+ T* p = static_cast< Y* >( 0 );
+ (void)p;
+
+#endif
+}
+
+// pointer constructor helper
+
+template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn )
+{
+ boost::detail::shared_count( p ).swap( pn );
+ boost::detail::sp_enable_shared_from_this( ppx, p, p );
+}
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
+{
+ sp_assert_convertible< Y[], T[] >();
+ boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
+}
+
+template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
+{
+ sp_assert_convertible< Y[N], T[N] >();
+ boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
+}
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// deleter constructor helper
+
+template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p )
+{
+ boost::detail::sp_enable_shared_from_this( ppx, p, p );
+}
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ )
+{
+ sp_assert_convertible< Y[], T[] >();
+}
+
+template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ )
+{
+ sp_assert_convertible< Y[N], T[N] >();
+}
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+struct sp_internal_constructor_tag
+{
+};
+
+} // namespace detail
+
+
+//
+// shared_ptr
+//
+// An enhanced relative of scoped_ptr with reference counted copy semantics.
+// The object pointed to is deleted when the last shared_ptr pointing to it
+// is destroyed or reset.
+//
+
+template<class T> class shared_ptr
+{
+private:
+
+ // Borland 5.5.1 specific workaround
+ typedef shared_ptr<T> this_type;
+
+public:
+
+ typedef typename boost::detail::sp_element< T >::type element_type;
+
+ BOOST_CONSTEXPR shared_ptr() BOOST_SP_NOEXCEPT : px( 0 ), pn()
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ BOOST_CONSTEXPR shared_ptr( boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT : px( 0 ), pn()
+ {
+ }
+
+#endif
+
+ BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) BOOST_SP_NOEXCEPT : px( px_ ), pn( pn_ )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) BOOST_SP_NOEXCEPT : px( px_ ), pn( std::move( pn_ ) )
+ {
+ }
+
+#endif
+
+ template<class Y>
+ explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
+ {
+ boost::detail::sp_pointer_construct( this, p, pn );
+ }
+
+ //
+ // Requirements: D's copy constructor must not throw
+ //
+ // shared_ptr will release p by calling d(p)
+ //
+
+ template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, d )
+ {
+ boost::detail::sp_deleter_construct( this, p );
+ }
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ template<class D> shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d )
+ {
+ }
+
+#endif
+
+ // As above, but with allocator. A's copy constructor shall not throw.
+
+ template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
+ {
+ boost::detail::sp_deleter_construct( this, p );
+ }
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ template<class D, class A> shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a )
+ {
+ }
+
+#endif
+
+// generated copy constructor, destructor are fine...
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+// ... except in C++0x, move disables the implicit copy
+
+ shared_ptr( shared_ptr const & r ) BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
+ {
+ }
+
+#endif
+
+ template<class Y>
+ explicit shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) // may throw
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ // it is now safe to copy r.px, as pn(r.pn) did not throw
+ px = r.px;
+ }
+
+ template<class Y>
+ shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag )
+ BOOST_SP_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
+ {
+ if( !pn.empty() )
+ {
+ px = r.px;
+ }
+ }
+
+ template<class Y>
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
+
+#else
+
+ shared_ptr( shared_ptr<Y> const & r )
+
+#endif
+ BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+ }
+
+ // aliasing
+ template< class Y >
+ shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn( r.pn )
+ {
+ }
+
+#ifndef BOOST_NO_AUTO_PTR
+
+ template<class Y>
+ explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ Y * tmp = r.get();
+ pn = boost::detail::shared_count( r );
+
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template<class Y>
+ shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ Y * tmp = r.get();
+ pn = boost::detail::shared_count( r );
+
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
+
+#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+ template<class Ap>
+ explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()
+ {
+ typedef typename Ap::element_type Y;
+
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ Y * tmp = r.get();
+ pn = boost::detail::shared_count( r );
+
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
+
+#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_NO_AUTO_PTR
+
+#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template< class Y, class D >
+ shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn()
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ typename std::unique_ptr< Y, D >::pointer tmp = r.get();
+
+ if( tmp != 0 )
+ {
+ pn = boost::detail::shared_count( r );
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
+ }
+
+#endif
+
+ template< class Y, class D >
+ shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn()
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get();
+
+ if( tmp != 0 )
+ {
+ pn = boost::detail::shared_count( r );
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
+ }
+
+ // assignment
+
+ shared_ptr & operator=( shared_ptr const & r ) BOOST_SP_NOEXCEPT
+ {
+ this_type(r).swap(*this);
+ return *this;
+ }
+
+#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
+
+ template<class Y>
+ shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_SP_NOEXCEPT
+ {
+ this_type(r).swap(*this);
+ return *this;
+ }
+
+#endif
+
+#ifndef BOOST_NO_AUTO_PTR
+
+ template<class Y>
+ shared_ptr & operator=( std::auto_ptr<Y> & r )
+ {
+ this_type( r ).swap( *this );
+ return *this;
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template<class Y>
+ shared_ptr & operator=( std::auto_ptr<Y> && r )
+ {
+ this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );
+ return *this;
+ }
+
+#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+ template<class Ap>
+ typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
+ {
+ this_type( r ).swap( *this );
+ return *this;
+ }
+
+#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_NO_AUTO_PTR
+
+#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template<class Y, class D>
+ shared_ptr & operator=( std::unique_ptr<Y, D> && r )
+ {
+ this_type( static_cast< std::unique_ptr<Y, D> && >( r ) ).swap(*this);
+ return *this;
+ }
+
+#endif
+
+ template<class Y, class D>
+ shared_ptr & operator=( boost::movelib::unique_ptr<Y, D> r )
+ {
+ // this_type( static_cast< unique_ptr<Y, D> && >( r ) ).swap( *this );
+
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get();
+
+ shared_ptr tmp;
+
+ if( p != 0 )
+ {
+ tmp.px = p;
+ tmp.pn = boost::detail::shared_count( r );
+
+ boost::detail::sp_deleter_construct( &tmp, p );
+ }
+
+ tmp.swap( *this );
+
+ return *this;
+ }
+
+// Move support
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ shared_ptr( shared_ptr && r ) BOOST_SP_NOEXCEPT : px( r.px ), pn()
+ {
+ pn.swap( r.pn );
+ r.px = 0;
+ }
+
+ template<class Y>
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ shared_ptr( shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
+
+#else
+
+ shared_ptr( shared_ptr<Y> && r )
+
+#endif
+ BOOST_SP_NOEXCEPT : px( r.px ), pn()
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ pn.swap( r.pn );
+ r.px = 0;
+ }
+
+ shared_ptr & operator=( shared_ptr && r ) BOOST_SP_NOEXCEPT
+ {
+ this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
+ return *this;
+ }
+
+ template<class Y>
+ shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_SP_NOEXCEPT
+ {
+ this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
+ return *this;
+ }
+
+ // aliasing move
+ template<class Y>
+ shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn()
+ {
+ pn.swap( r.pn );
+ r.px = 0;
+ }
+
+#endif
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
+ {
+ this_type().swap(*this);
+ return *this;
+ }
+
+#endif
+
+ void reset() BOOST_SP_NOEXCEPT
+ {
+ this_type().swap(*this);
+ }
+
+ template<class Y> void reset( Y * p ) // Y must be complete
+ {
+ BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+ this_type( p ).swap( *this );
+ }
+
+ template<class Y, class D> void reset( Y * p, D d )
+ {
+ this_type( p, d ).swap( *this );
+ }
+
+ template<class Y, class D, class A> void reset( Y * p, D d, A a )
+ {
+ this_type( p, d, a ).swap( *this );
+ }
+
+ template<class Y> void reset( shared_ptr<Y> const & r, element_type * p ) BOOST_SP_NOEXCEPT
+ {
+ this_type( r, p ).swap( *this );
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template<class Y> void reset( shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT
+ {
+ this_type( static_cast< shared_ptr<Y> && >( r ), p ).swap( *this );
+ }
+
+#endif
+
+ typename boost::detail::sp_dereference< T >::type operator* () const BOOST_SP_NOEXCEPT_WITH_ASSERT
+ {
+ BOOST_ASSERT( px != 0 );
+ return *px;
+ }
+
+ typename boost::detail::sp_member_access< T >::type operator-> () const BOOST_SP_NOEXCEPT_WITH_ASSERT
+ {
+ BOOST_ASSERT( px != 0 );
+ return px;
+ }
+
+ typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const BOOST_SP_NOEXCEPT_WITH_ASSERT
+ {
+ BOOST_ASSERT( px != 0 );
+ BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) );
+
+ return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] );
+ }
+
+ element_type * get() const BOOST_SP_NOEXCEPT
+ {
+ return px;
+ }
+
+// implicit conversion to "bool"
+#include <boost/smart_ptr/detail/operator_bool.hpp>
+
+ bool unique() const BOOST_SP_NOEXCEPT
+ {
+ return pn.unique();
+ }
+
+ long use_count() const BOOST_SP_NOEXCEPT
+ {
+ return pn.use_count();
+ }
+
+ void swap( shared_ptr & other ) BOOST_SP_NOEXCEPT
+ {
+ std::swap(px, other.px);
+ pn.swap(other.pn);
+ }
+
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
+ {
+ return pn < rhs.pn;
+ }
+
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
+ {
+ return pn < rhs.pn;
+ }
+
+ void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
+ {
+ return pn.get_deleter( ti );
+ }
+
+ void * _internal_get_local_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
+ {
+ return pn.get_local_deleter( ti );
+ }
+
+ void * _internal_get_untyped_deleter() const BOOST_SP_NOEXCEPT
+ {
+ return pn.get_untyped_deleter();
+ }
+
+ bool _internal_equiv( shared_ptr const & r ) const BOOST_SP_NOEXCEPT
+ {
+ return px == r.px && pn == r.pn;
+ }
+
+ boost::detail::shared_count _internal_count() const BOOST_SP_NOEXCEPT
+ {
+ return pn;
+ }
+
+// Tasteless as this may seem, making all members public allows member templates
+// to work in the absence of member template friends. (Matthew Langston)
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+
+private:
+
+ template<class Y> friend class shared_ptr;
+ template<class Y> friend class weak_ptr;
+
+
+#endif
+
+ element_type * px; // contained pointer
+ boost::detail::shared_count pn; // reference counter
+
+}; // shared_ptr
+
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
+{
+ return a.get() == b.get();
+}
+
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
+{
+ return a.get() != b.get();
+}
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
+
+// Resolve the ambiguity between our op!= and the one in rel_ops
+
+template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_SP_NOEXCEPT
+{
+ return a.get() != b.get();
+}
+
+#endif
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+#endif
+
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
+{
+ return a.owner_before( b );
+}
+
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_SP_NOEXCEPT
+{
+ a.swap(b);
+}
+
+template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
+{
+ (void) static_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = static_cast< E* >( r.get() );
+ return shared_ptr<T>( r, p );
+}
+
+template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
+{
+ (void) const_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = const_cast< E* >( r.get() );
+ return shared_ptr<T>( r, p );
+}
+
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
+{
+ (void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = dynamic_cast< E* >( r.get() );
+ return p? shared_ptr<T>( r, p ): shared_ptr<T>();
+}
+
+template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
+{
+ (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = reinterpret_cast< E* >( r.get() );
+ return shared_ptr<T>( r, p );
+}
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) static_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = static_cast< E* >( r.get() );
+ return shared_ptr<T>( std::move(r), p );
+}
+
+template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) const_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = const_cast< E* >( r.get() );
+ return shared_ptr<T>( std::move(r), p );
+}
+
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = dynamic_cast< E* >( r.get() );
+ return p? shared_ptr<T>( std::move(r), p ): shared_ptr<T>();
+}
+
+template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = reinterpret_cast< E* >( r.get() );
+ return shared_ptr<T>( std::move(r), p );
+}
+
+#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+// get_pointer() enables boost::mem_fn to recognize shared_ptr
+
+template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_SP_NOEXCEPT
+{
+ return p.get();
+}
+
+// operator<<
+
+#if !defined(BOOST_NO_IOSTREAM)
+
+#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) )
+
+template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
+{
+ os << p.get();
+ return os;
+}
+
+#else
+
+// in STLport's no-iostreams mode no iostream symbols can be used
+#ifndef _STLP_NO_IOSTREAMS
+
+# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT)
+// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL
+using std::basic_ostream;
+template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p)
+# else
+template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
+# endif
+{
+ os << p.get();
+ return os;
+}
+
+#endif // _STLP_NO_IOSTREAMS
+
+#endif // __GNUC__ < 3
+
+#endif // !defined(BOOST_NO_IOSTREAM)
+
+// get_deleter
+
+namespace detail
+{
+
+template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) );
+}
+
+template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
+template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
+
+class esft2_deleter_wrapper
+{
+private:
+
+ shared_ptr<void const volatile> deleter_;
+
+public:
+
+ esft2_deleter_wrapper() BOOST_SP_NOEXCEPT
+ {
+ }
+
+ template< class T > void set_deleter( shared_ptr<T> const & deleter ) BOOST_SP_NOEXCEPT
+ {
+ deleter_ = deleter;
+ }
+
+ template<typename D> D* get_deleter() const BOOST_SP_NOEXCEPT
+ {
+ return boost::detail::basic_get_deleter<D>( deleter_ );
+ }
+
+ template< class T> void operator()( T* ) BOOST_SP_NOEXCEPT_WITH_ASSERT
+ {
+ BOOST_ASSERT( deleter_.use_count() <= 1 );
+ deleter_.reset();
+ }
+};
+
+} // namespace detail
+
+template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ D * d = boost::detail::basic_get_deleter<D>( p );
+
+ if( d == 0 )
+ {
+ d = boost::detail::basic_get_local_deleter( d, p );
+ }
+
+ if( d == 0 )
+ {
+ boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
+// The following get_deleter method call is fully qualified because
+// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter<D>()
+ if(del_wrapper) d = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
+ }
+
+ return d;
+}
+
+// atomic access
+
+#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
+
+template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_SP_NOEXCEPT
+{
+ return false;
+}
+
+template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p ) BOOST_SP_NOEXCEPT
+{
+ boost::detail::spinlock_pool<2>::scoped_lock lock( p );
+ return *p;
+}
+
+template<class T, class M> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, /*memory_order mo*/ M ) BOOST_SP_NOEXCEPT
+{
+ return atomic_load( p );
+}
+
+template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r ) BOOST_SP_NOEXCEPT
+{
+ boost::detail::spinlock_pool<2>::scoped_lock lock( p );
+ p->swap( r );
+}
+
+template<class T, class M> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ M ) BOOST_SP_NOEXCEPT
+{
+ atomic_store( p, r ); // std::move( r )
+}
+
+template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r ) BOOST_SP_NOEXCEPT
+{
+ boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
+
+ sp.lock();
+ p->swap( r );
+ sp.unlock();
+
+ return r; // return std::move( r )
+}
+
+template<class T, class M> shared_ptr<T> inline atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ M ) BOOST_SP_NOEXCEPT
+{
+ return atomic_exchange( p, r ); // std::move( r )
+}
+
+template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w ) BOOST_SP_NOEXCEPT
+{
+ boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
+
+ sp.lock();
+
+ if( p->_internal_equiv( *v ) )
+ {
+ p->swap( w );
+
+ sp.unlock();
+
+ return true;
+ }
+ else
+ {
+ shared_ptr<T> tmp( *p );
+
+ sp.unlock();
+
+ tmp.swap( *v );
+ return false;
+ }
+}
+
+template<class T, class M> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, /*memory_order success*/ M, /*memory_order failure*/ M ) BOOST_SP_NOEXCEPT
+{
+ return atomic_compare_exchange( p, v, w ); // std::move( w )
+}
+
+#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS)
+
+// hash_value
+
+template< class T > struct hash;
+
+template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return boost::hash< typename boost::shared_ptr<T>::element_type* >()( p.get() );
+}
+
+} // namespace boost
+
+#include <boost/smart_ptr/detail/local_sp_deleter.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
+}
+
+template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#if defined( BOOST_SP_DISABLE_DEPRECATED )
+#pragma GCC diagnostic pop
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/weak_ptr.hpp b/src/third_party/boost-1.70.0/boost/smart_ptr/weak_ptr.hpp
index 54d9ef37812..54d9ef37812 100644
--- a/src/third_party/boost-1.69.0/boost/smart_ptr/weak_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/smart_ptr/weak_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/assert.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/assert.hpp
index 47b1b39909d..47b1b39909d 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/assert.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/actions.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/actions.hpp
index 43b638d7fa8..43b638d7fa8 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/actions.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/actions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/alternative.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/alternative.hpp
index 5e472a9a640..5e472a9a640 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/alternative.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/alternative.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/composite.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/composite.hpp
index b156cab198f..b156cab198f 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/composite.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/composite.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/difference.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/difference.hpp
index 7d1cb1433d0..7d1cb1433d0 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/difference.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/difference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/directives.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/directives.hpp
index a66efa281ff..a66efa281ff 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/directives.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/directives.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp
index 69d4859b00e..69d4859b00e 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp
index 7a7599b85cc..7a7599b85cc 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/difference.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/difference.ipp
index f5df8c75282..f5df8c75282 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/difference.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/difference.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/directives.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/directives.ipp
index 96b2dd79c59..96b2dd79c59 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/directives.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/directives.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp
index 34831a7e9f8..34831a7e9f8 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp
index 2810586cd72..2810586cd72 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp
index 8c4f5135c06..8c4f5135c06 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/list.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/list.ipp
index cd7965adfd0..cd7965adfd0 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/list.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/list.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/optional.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/optional.ipp
index 629eac8336f..629eac8336f 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/optional.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/optional.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/positive.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/positive.ipp
index 9698e69e55c..9698e69e55c 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/positive.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/positive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp
index 283d420bc3a..283d420bc3a 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp
index 9f577a4f55c..9f577a4f55c 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp
index 521faf61ec2..521faf61ec2 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/intersection.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/intersection.hpp
index 867c20f330b..867c20f330b 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/intersection.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/intersection.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/kleene_star.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/kleene_star.hpp
index 9b6c73a0080..9b6c73a0080 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/kleene_star.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/kleene_star.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/list.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/list.hpp
index cdb879e14a2..cdb879e14a2 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/list.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/list.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/operators.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/operators.hpp
index 5732ef9ae75..5732ef9ae75 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/optional.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/optional.hpp
index 69e49f9a3a1..69e49f9a3a1 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/optional.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/optional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/positive.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/positive.hpp
index 7b494b45ca3..7b494b45ca3 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/positive.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/positive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequence.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequence.hpp
index 3ccd9ea7a84..3ccd9ea7a84 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequence.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_and.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequential_and.hpp
index da11f8729a5..da11f8729a5 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_and.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequential_and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_or.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequential_or.hpp
index b276f6c9c36..b276f6c9c36 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_or.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/composite/sequential_or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/config.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/config.hpp
index 57eca7f037e..57eca7f037e 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/match.ipp
index 0319dcf4e33..0319dcf4e33 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/match.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp
index 24d9a43791b..24d9a43791b 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/parser.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/parser.ipp
index d5abe692faf..d5abe692faf 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/parser.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/impl/parser.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/match.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/match.hpp
index c82baa14894..c82baa14894 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/match.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/match.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/nil.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/nil.hpp
index c94c064d6bb..c94c064d6bb 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/nil.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/nil.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
index 137694ef2f6..137694ef2f6 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp
index 2f7dd23e801..2f7dd23e801 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
index bc465dceaca..bc465dceaca 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/rule.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/rule.hpp
index 1d4336bcc94..1d4336bcc94 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/rule.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/non_terminal/rule.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/parser.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/parser.hpp
index 8f6bc6a3eeb..8f6bc6a3eeb 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/parser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
index 19586f1a10d..19586f1a10d 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
index cd92154bbf4..cd92154bbf4 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/numerics.hpp
index 20ea0911a16..20ea0911a16 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/numerics.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp
index b0f20d9aaaa..b0f20d9aaaa 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/primitives.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/primitives.hpp
index 4cbdd488cbf..4cbdd488cbf 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/primitives.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/primitives/primitives.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/safe_bool.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/safe_bool.hpp
index 73b6e7b64b5..73b6e7b64b5 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/safe_bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/safe_bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp
index 1f1de8f19b8..1f1de8f19b8 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp
diff --git a/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner.hpp
new file mode 100644
index 00000000000..48938dbeede
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner.hpp
@@ -0,0 +1,328 @@
+/*=============================================================================
+ Copyright (c) 1998-2002 Joel de Guzman
+ 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(BOOST_SPIRIT_SCANNER_HPP)
+#define BOOST_SPIRIT_SCANNER_HPP
+
+#include <iterator>
+#include <boost/config.hpp>
+#include <boost/spirit/home/classic/namespace.hpp>
+#include <boost/spirit/home/classic/core/match.hpp>
+#include <boost/spirit/home/classic/core/non_terminal/parser_id.hpp>
+
+#include <boost/spirit/home/classic/core/scanner/scanner_fwd.hpp>
+
+namespace boost { namespace spirit {
+
+BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // iteration_policy class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ struct iteration_policy
+ {
+ template <typename ScannerT>
+ void
+ advance(ScannerT const& scan) const
+ {
+ ++scan.first;
+ }
+
+ template <typename ScannerT>
+ bool at_end(ScannerT const& scan) const
+ {
+ return scan.first == scan.last;
+ }
+
+ template <typename T>
+ T filter(T ch) const
+ {
+ return ch;
+ }
+
+ template <typename ScannerT>
+ typename ScannerT::ref_t
+ get(ScannerT const& scan) const
+ {
+ return *scan.first;
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // match_policy class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ struct match_policy
+ {
+ template <typename T>
+ struct result { typedef match<T> type; };
+
+ const match<nil_t>
+ no_match() const
+ {
+ return match<nil_t>();
+ }
+
+ const match<nil_t>
+ empty_match() const
+ {
+ return match<nil_t>(0, nil_t());
+ }
+
+ template <typename AttrT, typename IteratorT>
+ match<AttrT>
+ create_match(
+ std::size_t length,
+ AttrT const& val,
+ IteratorT const& /*first*/,
+ IteratorT const& /*last*/) const
+ {
+ return match<AttrT>(length, val);
+ }
+
+ template <typename MatchT, typename IteratorT>
+ void group_match(
+ MatchT& /*m*/,
+ parser_id const& /*id*/,
+ IteratorT const& /*first*/,
+ IteratorT const& /*last*/) const {}
+
+ template <typename Match1T, typename Match2T>
+ void concat_match(Match1T& l, Match2T const& r) const
+ {
+ l.concat(r);
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // match_result class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename MatchPolicyT, typename T>
+ struct match_result
+ {
+ typedef typename MatchPolicyT::template result<T>::type type;
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // action_policy class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename AttrT>
+ struct attributed_action_policy
+ {
+ template <typename ActorT, typename IteratorT>
+ static void
+ call(
+ ActorT const& actor,
+ AttrT& val,
+ IteratorT const&,
+ IteratorT const&)
+ {
+ actor(val);
+ }
+ };
+
+ //////////////////////////////////
+ template <>
+ struct attributed_action_policy<nil_t>
+ {
+ template <typename ActorT, typename IteratorT>
+ static void
+ call(
+ ActorT const& actor,
+ nil_t,
+ IteratorT const& first,
+ IteratorT const& last)
+ {
+ actor(first, last);
+ }
+ };
+
+ //////////////////////////////////
+ struct action_policy
+ {
+ template <typename ActorT, typename AttrT, typename IteratorT>
+ void
+ do_action(
+ ActorT const& actor,
+ AttrT& val,
+ IteratorT const& first,
+ IteratorT const& last) const
+ {
+ attributed_action_policy<AttrT>::call(actor, val, first, last);
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // scanner_policies class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ template <
+ typename IterationPolicyT,
+ typename MatchPolicyT,
+ typename ActionPolicyT>
+ struct scanner_policies :
+ public IterationPolicyT,
+ public MatchPolicyT,
+ public ActionPolicyT
+ {
+ typedef IterationPolicyT iteration_policy_t;
+ typedef MatchPolicyT match_policy_t;
+ typedef ActionPolicyT action_policy_t;
+
+ scanner_policies(
+ IterationPolicyT const& i_policy = IterationPolicyT(),
+ MatchPolicyT const& m_policy = MatchPolicyT(),
+ ActionPolicyT const& a_policy = ActionPolicyT())
+ : IterationPolicyT(i_policy)
+ , MatchPolicyT(m_policy)
+ , ActionPolicyT(a_policy) {}
+
+ template <typename ScannerPoliciesT>
+ scanner_policies(ScannerPoliciesT const& policies)
+ : IterationPolicyT(policies)
+ , MatchPolicyT(policies)
+ , ActionPolicyT(policies) {}
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // scanner_policies_base class: the base class of all scanners
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ struct scanner_base {};
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // scanner class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ template <
+ typename IteratorT,
+ typename PoliciesT>
+ class scanner : public PoliciesT, public scanner_base
+ {
+ public:
+
+ typedef IteratorT iterator_t;
+ typedef PoliciesT policies_t;
+
+ typedef typename std::
+ iterator_traits<IteratorT>::value_type value_t;
+ typedef typename std::
+ iterator_traits<IteratorT>::reference ref_t;
+ typedef typename boost::
+ call_traits<IteratorT>::param_type iter_param_t;
+
+ scanner(
+ IteratorT& first_,
+ iter_param_t last_,
+ PoliciesT const& policies = PoliciesT())
+ : PoliciesT(policies), first(first_), last(last_)
+ {
+ at_end();
+ }
+
+ scanner(scanner const& other)
+ : PoliciesT(other), first(other.first), last(other.last) {}
+
+ scanner(scanner const& other, IteratorT& first_)
+ : PoliciesT(other), first(first_), last(other.last) {}
+
+ template <typename PoliciesT1>
+ scanner(scanner<IteratorT, PoliciesT1> const& other)
+ : PoliciesT(other), first(other.first), last(other.last) {}
+
+ bool
+ at_end() const
+ {
+ typedef typename PoliciesT::iteration_policy_t iteration_policy_type;
+ return iteration_policy_type::at_end(*this);
+ }
+
+ value_t
+ operator*() const
+ {
+ typedef typename PoliciesT::iteration_policy_t iteration_policy_type;
+ return iteration_policy_type::filter(iteration_policy_type::get(*this));
+ }
+
+ scanner const&
+ operator++() const
+ {
+ typedef typename PoliciesT::iteration_policy_t iteration_policy_type;
+ iteration_policy_type::advance(*this);
+ return *this;
+ }
+
+ template <typename PoliciesT2>
+ struct rebind_policies
+ {
+ typedef scanner<IteratorT, PoliciesT2> type;
+ };
+
+ template <typename PoliciesT2>
+ scanner<IteratorT, PoliciesT2>
+ change_policies(PoliciesT2 const& policies) const
+ {
+ return scanner<IteratorT, PoliciesT2>(first, last, policies);
+ }
+
+ template <typename IteratorT2>
+ struct rebind_iterator
+ {
+ typedef scanner<IteratorT2, PoliciesT> type;
+ };
+
+ template <typename IteratorT2>
+ scanner<IteratorT2, PoliciesT>
+ change_iterator(IteratorT2 const& first_, IteratorT2 const &last_) const
+ {
+ return scanner<IteratorT2, PoliciesT>(first_, last_, *this);
+ }
+
+ IteratorT& first;
+ IteratorT const last;
+
+ private:
+
+ scanner&
+ operator=(scanner const& other);
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // rebind_scanner_policies class
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename ScannerT, typename PoliciesT>
+ struct rebind_scanner_policies
+ {
+ typedef typename ScannerT::template
+ rebind_policies<PoliciesT>::type type;
+ };
+
+ //////////////////////////////////
+ template <typename ScannerT, typename IteratorT>
+ struct rebind_scanner_iterator
+ {
+ typedef typename ScannerT::template
+ rebind_iterator<IteratorT>::type type;
+ };
+
+BOOST_SPIRIT_CLASSIC_NAMESPACE_END
+
+}}
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp
index efd78cfa544..efd78cfa544 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/skipper.hpp
index 4e655aeafef..4e655aeafef 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/skipper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp
index 228e618bace..228e618bace 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/debug.hpp
index 9737b35beee..9737b35beee 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/debug.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/debug_node.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/debug/debug_node.hpp
index adc1f91f222..adc1f91f222 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/debug_node.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/debug/debug_node.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/minimal.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/debug/minimal.hpp
index 0cb42644aaf..0cb42644aaf 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/minimal.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/debug/minimal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/meta/as_parser.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/meta/as_parser.hpp
index c5cc82d6434..c5cc82d6434 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/meta/as_parser.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/meta/as_parser.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/namespace.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/namespace.hpp
index f64fc81bb65..f64fc81bb65 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/namespace.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/namespace.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/chset.hpp
index 36354564243..36354564243 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/chset.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset_operators.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/chset_operators.hpp
index d42b5faae48..d42b5faae48 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset_operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/chset_operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset.ipp
index f6da6f2f3fa..f6da6f2f3fa 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp
index ace650166fe..ace650166fe 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp
index e7d92723454..e7d92723454 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp
index 579bcaec708..579bcaec708 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp
index ede15673fca..ede15673fca 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp
index 842a679d6db..842a679d6db 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp
diff --git a/src/third_party/boost-1.70.0/boost/spirit/home/classic/version.hpp b/src/third_party/boost-1.70.0/boost/spirit/home/classic/version.hpp
new file mode 100644
index 00000000000..fa8ec231f20
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/spirit/home/classic/version.hpp
@@ -0,0 +1,19 @@
+/*=============================================================================
+ 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 is the version of the current Spirit distribution
+//
+///////////////////////////////////////////////////////////////////////////////
+#define SPIRIT_VERSION 0x1811
+#define SPIRIT_PIZZA_VERSION SPIRIT_MEGA_VEGGI // :-)
+
+#endif // defined(SPIRIT_VERSION_HPP)
diff --git a/src/third_party/boost-1.69.0/boost/spirit/include/classic_actions.hpp b/src/third_party/boost-1.70.0/boost/spirit/include/classic_actions.hpp
index a37d631b564..a37d631b564 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/include/classic_actions.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/include/classic_actions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/include/classic_chset.hpp b/src/third_party/boost-1.70.0/boost/spirit/include/classic_chset.hpp
index 2f8df490da6..2f8df490da6 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/include/classic_chset.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/include/classic_chset.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/include/classic_numerics.hpp b/src/third_party/boost-1.70.0/boost/spirit/include/classic_numerics.hpp
index 75f7c053b5c..75f7c053b5c 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/include/classic_numerics.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/include/classic_numerics.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/include/classic_operators.hpp b/src/third_party/boost-1.70.0/boost/spirit/include/classic_operators.hpp
index c05d947796b..c05d947796b 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/include/classic_operators.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/include/classic_operators.hpp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/include/classic_rule.hpp b/src/third_party/boost-1.70.0/boost/spirit/include/classic_rule.hpp
index c2e0df1d346..c2e0df1d346 100644
--- a/src/third_party/boost-1.69.0/boost/spirit/include/classic_rule.hpp
+++ b/src/third_party/boost-1.70.0/boost/spirit/include/classic_rule.hpp
diff --git a/src/third_party/boost-1.70.0/boost/static_assert.hpp b/src/third_party/boost-1.70.0/boost/static_assert.hpp
new file mode 100644
index 00000000000..fd7b2245542
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/static_assert.hpp
@@ -0,0 +1,180 @@
+// (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/static_assert for documentation.
+
+/*
+ Revision history:
+ 02 August 2000
+ Initial version.
+*/
+
+#ifndef BOOST_STATIC_ASSERT_HPP
+#define BOOST_STATIC_ASSERT_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.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
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
+# else
+# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg )
+# endif
+#else
+# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
+#endif
+
+#ifdef __BORLANDC__
+//
+// workaround for buggy integral-constant expression support:
+#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4))
+// gcc 3.3 and 3.4 don't produce good error messages with the default version:
+# define BOOST_SA_GCC_WORKAROUND
+#endif
+
+//
+// If the compiler issues warnings about old C style casts,
+// then enable this:
+//
+#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)))
+# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) != 0)
+# else
+# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) != 0)
+# endif
+#else
+# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__)
+# else
+# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
+# endif
+#endif
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
+# else
+# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
+# endif
+#else
+
+namespace boost{
+
+// HP aCC cannot deal with missing names for template value parameters
+template <bool x> struct STATIC_ASSERTION_FAILURE;
+
+template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
+
+// HP aCC cannot deal with missing names for template value parameters
+template<int x> struct static_assert_test{};
+
+}
+
+//
+// Implicit instantiation requires that all member declarations be
+// instantiated, but that the definitions are *not* instantiated.
+//
+// It's not particularly clear how this applies to enum's or typedefs;
+// both are described as declarations [7.1.3] and [7.2] in the standard,
+// however some compilers use "delayed evaluation" of one or more of
+// these when implicitly instantiating templates. We use typedef declarations
+// by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum
+// version gets better results from your compiler...
+//
+// Implementation:
+// Both of these versions rely on sizeof(incomplete_type) generating an error
+// message containing the name of the incomplete type. We use
+// "STATIC_ASSERTION_FAILURE" as the type name here to generate
+// an eye catching error message. The result of the sizeof expression is either
+// used as an enum initialiser, or as a template argument depending which version
+// is in use...
+// Note that the argument to the assert is explicitly cast to bool using old-
+// style casts: too many compilers currently have problems with static_cast
+// when used inside integral constant expressions.
+//
+#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS)
+
+#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
+#define BOOST_STATIC_ASSERT( B ) \
+ typedef ::boost::static_assert_test<\
+ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\
+ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
+#elif defined(BOOST_MSVC)
+#define BOOST_STATIC_ASSERT(...) \
+ typedef ::boost::static_assert_test<\
+ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\
+ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
+#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
+// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
+// instead of warning in case of failure
+# define BOOST_STATIC_ASSERT( B ) \
+ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
+ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ]
+#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS)
+// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
+// instead of warning in case of failure
+# define BOOST_STATIC_ASSERT(...) \
+ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
+ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ]
+#elif defined(__sgi)
+// special version for SGI MIPSpro compiler
+#define BOOST_STATIC_ASSERT( B ) \
+ BOOST_STATIC_CONSTANT(bool, \
+ BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \
+ typedef ::boost::static_assert_test<\
+ sizeof(::boost::STATIC_ASSERTION_FAILURE< \
+ BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\
+ BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
+#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
+// special version for CodeWarrior <= 8.x
+#define BOOST_STATIC_ASSERT( B ) \
+ BOOST_STATIC_CONSTANT(int, \
+ BOOST_JOIN(boost_static_assert_test_, __LINE__) = \
+ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) )
+#else
+// generic version
+# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_STATIC_ASSERT( ... ) \
+ typedef ::boost::static_assert_test<\
+ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\
+ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
+# else
+# define BOOST_STATIC_ASSERT( B ) \
+ typedef ::boost::static_assert_test<\
+ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\
+ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
+# endif
+#endif
+
+#else
+// alternative enum based implementation:
+# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_STATIC_ASSERT( ... ) \
+ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
+ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) }
+# else
+# define BOOST_STATIC_ASSERT(B) \
+ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
+ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
+# endif
+#endif
+#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
+
+#endif // BOOST_STATIC_ASSERT_HPP
+
+
diff --git a/src/third_party/boost-1.69.0/boost/swap.hpp b/src/third_party/boost-1.70.0/boost/swap.hpp
index 55cafa4fdd8..55cafa4fdd8 100644
--- a/src/third_party/boost-1.69.0/boost/swap.hpp
+++ b/src/third_party/boost-1.70.0/boost/swap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/system/api_config.hpp b/src/third_party/boost-1.70.0/boost/system/api_config.hpp
index 28b8bece4cc..28b8bece4cc 100644
--- a/src/third_party/boost-1.69.0/boost/system/api_config.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/system/config.hpp
index 1e5f6865114..1e5f6865114 100644
--- a/src/third_party/boost-1.69.0/boost/system/config.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/system/detail/config.hpp
index 2ad8201476e..2ad8201476e 100644
--- a/src/third_party/boost-1.69.0/boost/system/detail/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/system/detail/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp b/src/third_party/boost-1.70.0/boost/system/detail/generic_category.hpp
index 35175f8bcc7..35175f8bcc7 100644
--- a/src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp
+++ b/src/third_party/boost-1.70.0/boost/system/detail/generic_category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp b/src/third_party/boost-1.70.0/boost/system/detail/std_interoperability.hpp
index b1b41d39b48..b1b41d39b48 100644
--- a/src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp
+++ b/src/third_party/boost-1.70.0/boost/system/detail/std_interoperability.hpp
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp b/src/third_party/boost-1.70.0/boost/system/detail/system_category_posix.hpp
index 9a40623d386..9a40623d386 100644
--- a/src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp
+++ b/src/third_party/boost-1.70.0/boost/system/detail/system_category_posix.hpp
diff --git a/src/third_party/boost-1.70.0/boost/system/detail/system_category_win32.hpp b/src/third_party/boost-1.70.0/boost/system/detail/system_category_win32.hpp
new file mode 100644
index 00000000000..a46c8b2e227
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/system/detail/system_category_win32.hpp
@@ -0,0 +1,340 @@
+// 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;
+ }
+
+ boost::winapi::UINT_ const code_page = message_cp_win32();
+
+ int r = 0;
+
+#if !defined(BOOST_NO_ANSI_APIS)
+
+ if( code_page == boost::winapi::CP_ACP_ )
+ {
+ using namespace boost::winapi;
+
+ DWORD_ retval = boost::winapi::FormatMessageA(
+ FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
+ NULL,
+ ev,
+ MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
+ buffer,
+ static_cast<DWORD_>( len ),
+ NULL
+ );
+
+ r = static_cast<int>( retval );
+ }
+ else
+
+#endif
+
+ {
+ 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 )
+ {
+ r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, buffer, static_cast<int>( len ), NULL, NULL );
+ boost::winapi::LocalFree( lpMsgBuf );
+ if ( r != 0 ) --r; // exclude null terminator
+ }
+ }
+
+ if( r == 0 )
+ {
+ return unknown_message_win32( ev, buffer, len );
+ }
+
+ 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.70.0/boost/system/error_code.hpp b/src/third_party/boost-1.70.0/boost/system/error_code.hpp
new file mode 100644
index 00000000000..f1d7ddb745d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/system/error_code.hpp
@@ -0,0 +1,964 @@
+#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
+#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
+#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
+
+#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
+#pragma GCC diagnostic pop
+#endif
+
+// 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 val_ != 0;
+ }
+
+#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 val_ != 0? unspecified_bool_true: 0;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
+ {
+ return 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_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 val_ != 0;
+ }
+
+#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 val_ != 0? unspecified_bool_true: 0;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
+ {
+ return 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_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.70.0/boost/system/system_error.hpp
index 116fd38b50d..116fd38b50d 100644
--- a/src/third_party/boost-1.69.0/boost/system/system_error.hpp
+++ b/src/third_party/boost-1.70.0/boost/system/system_error.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/debug.hpp b/src/third_party/boost-1.70.0/boost/test/debug.hpp
index a8ccae0b970..a8ccae0b970 100644
--- a/src/third_party/boost-1.69.0/boost/test/debug.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/debug.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/debug_config.hpp b/src/third_party/boost-1.70.0/boost/test/debug_config.hpp
index 894d78e65ab..894d78e65ab 100644
--- a/src/third_party/boost-1.69.0/boost/test/debug_config.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/debug_config.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/detail/config.hpp b/src/third_party/boost-1.70.0/boost/test/detail/config.hpp
new file mode 100644
index 00000000000..bcdd8576137
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/detail/config.hpp
@@ -0,0 +1,144 @@
+// (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 a central place for global configuration switches
+// ***************************************************************************
+
+#ifndef BOOST_TEST_CONFIG_HPP_071894GER
+#define BOOST_TEST_CONFIG_HPP_071894GER
+
+// Boost
+#include <boost/config.hpp> // compilers workarounds
+#include <boost/detail/workaround.hpp>
+
+#if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) && \
+ (!defined(__COMO__) && !defined(__MWERKS__) && !defined(__GNUC__) || \
+ BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
+# define BOOST_SEH_BASED_SIGNAL_HANDLING
+#endif
+
+#if defined(__COMO__) && defined(_MSC_VER)
+// eh.h uses type_info without declaring it.
+class type_info;
+# define BOOST_SEH_BASED_SIGNAL_HANDLING
+#endif
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) || \
+ BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
+ (defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
+# define BOOST_TEST_SHIFTED_LINE
+#endif
+
+//____________________________________________________________________________//
+
+#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
+# define BOOST_TEST_CALL_DECL __cdecl
+#else
+# define BOOST_TEST_CALL_DECL /**/
+#endif
+
+//____________________________________________________________________________//
+
+#if !defined(BOOST_NO_STD_LOCALE) && !defined(__MWERKS__)
+# define BOOST_TEST_USE_STD_LOCALE 1
+#endif
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x570) || \
+ BOOST_WORKAROUND( __COMO__, <= 0x433 ) || \
+ BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 ) || \
+ defined(__sgi) && _COMPILER_VERSION <= 730 || \
+ BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
+ defined(__DECCXX) || \
+ defined(__DMC__)
+# define BOOST_TEST_NO_PROTECTED_USING
+#endif
+
+//____________________________________________________________________________//
+
+#if defined(__GNUC__) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+#define BOOST_TEST_PROTECTED_VIRTUAL virtual
+#else
+#define BOOST_TEST_PROTECTED_VIRTUAL
+#endif
+
+//____________________________________________________________________________//
+
+#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
+#define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
+#endif
+
+//____________________________________________________________________________//
+
+// Sun compiler does not support visibility on enums
+#if defined(__SUNPRO_CC)
+#define BOOST_TEST_ENUM_SYMBOL_VISIBLE
+#else
+#define BOOST_TEST_ENUM_SYMBOL_VISIBLE BOOST_SYMBOL_VISIBLE
+#endif
+
+//____________________________________________________________________________//
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
+# define BOOST_TEST_DYN_LINK
+#endif
+
+// in case any of the define from cmake/b2 is set
+#if !defined(BOOST_TEST_DYN_LINK) \
+ && (defined(BOOST_UNIT_TEST_FRAMEWORK_DYN_LINK) \
+ || defined(BOOST_TEST_EXEC_MONITOR_DYN_LINK) \
+ || defined(BOOST_PRG_EXEC_MONITOR_DYN_LINK) )
+# define BOOST_TEST_DYN_LINK
+#endif
+
+#if defined(BOOST_TEST_INCLUDED)
+# undef BOOST_TEST_DYN_LINK
+#endif
+
+#if defined(BOOST_TEST_DYN_LINK)
+# define BOOST_TEST_ALTERNATIVE_INIT_API
+
+# ifdef BOOST_TEST_SOURCE
+# define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT BOOST_SYMBOL_VISIBLE
+# else
+# define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT BOOST_SYMBOL_VISIBLE
+# endif // BOOST_TEST_SOURCE
+#else
+# define BOOST_TEST_DECL BOOST_SYMBOL_VISIBLE
+#endif
+
+#if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
+#define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
+#endif
+
+#if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
+#define BOOST_TEST_MAIN BOOST_TEST_MODULE
+#endif
+
+
+
+#ifndef BOOST_PP_VARIADICS /* we can change this only if not already defined) */
+
+#ifdef __PGI
+#define BOOST_PP_VARIADICS 1
+#endif
+
+#if BOOST_CLANG
+#define BOOST_PP_VARIADICS 1
+#endif
+
+#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 8 * 100)
+#define BOOST_PP_VARIADICS 1
+#endif
+
+#endif /* ifndef BOOST_PP_VARIADICS */
+
+#endif // BOOST_TEST_CONFIG_HPP_071894GER
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp b/src/third_party/boost-1.70.0/boost/test/detail/enable_warnings.hpp
index d61c7dc5923..d61c7dc5923 100644
--- a/src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/detail/enable_warnings.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/detail/fwd_decl.hpp b/src/third_party/boost-1.70.0/boost/test/detail/fwd_decl.hpp
new file mode 100644
index 00000000000..3d6b55a1398
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/detail/fwd_decl.hpp
@@ -0,0 +1,47 @@
+// (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 forward eclarations for Boost.Test data types
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FWD_DECL_HPP_011605GER
+#define BOOST_TEST_FWD_DECL_HPP_011605GER
+
+namespace boost {
+
+class execution_monitor;
+class execution_exception;
+
+namespace unit_test {
+
+class test_unit;
+class test_case;
+class test_suite;
+class master_test_suite_t;
+
+class test_tree_visitor;
+class test_observer;
+class test_unit_fixture;
+class global_fixture;
+
+// singletons
+class unit_test_monitor_t;
+class unit_test_log_t;
+
+class unit_test_log_formatter;
+struct log_entry_data;
+struct log_checkpoint_data;
+
+class lazy_ostream;
+
+} // namespace unit_test
+
+} // namespace boost
+
+#endif // BOOST_TEST_FWD_DECL_HPP_011605GER
+
diff --git a/src/third_party/boost-1.70.0/boost/test/detail/global_typedef.hpp b/src/third_party/boost-1.70.0/boost/test/detail/global_typedef.hpp
new file mode 100644
index 00000000000..5e6f9607376
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/detail/global_typedef.hpp
@@ -0,0 +1,149 @@
+// (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>
+
+#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_NO_CTOR( type ) \
+public: \
+ static type& instance(); \
+private: \
+ BOOST_DELETED_FUNCTION(type(type const&)) \
+ BOOST_DELETED_FUNCTION(type& operator=(type const&)) \
+ BOOST_DEFAULTED_FUNCTION(~type(), {}) \
+/**/
+
+#define BOOST_TEST_SINGLETON_CONS( type ) \
+ BOOST_TEST_SINGLETON_CONS_NO_CTOR(type) \
+private: \
+ 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_ATTRIBUTE_UNUSED = BOOST_JOIN (inst, _t)::instance();
+
+#else
+
+#define BOOST_TEST_SINGLETON_INST( inst ) \
+namespace { BOOST_JOIN( inst, _t)& inst BOOST_ATTRIBUTE_UNUSED = 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.70.0/boost/test/detail/log_level.hpp b/src/third_party/boost-1.70.0/boost/test/detail/log_level.hpp
new file mode 100644
index 00000000000..d391e103d18
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/detail/log_level.hpp
@@ -0,0 +1,42 @@
+// (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 shared definition for unit test log levels
+// ***************************************************************************
+
+#ifndef BOOST_TEST_LOG_LEVEL_HPP_011605GER
+#define BOOST_TEST_LOG_LEVEL_HPP_011605GER
+
+#include <boost/test/detail/config.hpp>
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** log levels ************** //
+// ************************************************************************** //
+
+// each log level includes all subsequent higher loging levels
+enum BOOST_TEST_ENUM_SYMBOL_VISIBLE log_level {
+ invalid_log_level = -1,
+ log_successful_tests = 0,
+ log_test_units = 1,
+ log_messages = 2,
+ log_warnings = 3,
+ log_all_errors = 4, // reported by unit test macros
+ log_cpp_exception_errors = 5, // uncaught C++ exceptions
+ log_system_errors = 6, // including timeouts, signals, traps
+ log_fatal_errors = 7, // including unit test macros or
+ // fatal system errors
+ log_nothing = 8
+};
+
+} // namespace unit_test
+} // namespace boost
+
+#endif // BOOST_TEST_LOG_LEVEL_HPP_011605GER
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/pp_variadic.hpp b/src/third_party/boost-1.70.0/boost/test/detail/pp_variadic.hpp
index a443744daaa..a443744daaa 100644
--- a/src/third_party/boost-1.69.0/boost/test/detail/pp_variadic.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/detail/suppress_warnings.hpp
index 4f8de3dd874..4f8de3dd874 100644
--- a/src/third_party/boost-1.69.0/boost/test/detail/suppress_warnings.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/detail/suppress_warnings.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp b/src/third_party/boost-1.70.0/boost/test/detail/throw_exception.hpp
index 19b50ba49cb..19b50ba49cb 100644
--- a/src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/detail/throw_exception.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/execution_monitor.hpp b/src/third_party/boost-1.70.0/boost/test/execution_monitor.hpp
new file mode 100644
index 00000000000..25e0129edd6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/execution_monitor.hpp
@@ -0,0 +1,584 @@
+// (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 microseconds) for monitored function execution. Use this parameter to monitor code with possible deadlocks
+ /// or infinite loops. This feature is only available for some operating systems (not yet Microsoft Windows).
+ unit_test::readwrite_property<unsigned long int> 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.69.0/boost/test/floating_point_comparison.hpp b/src/third_party/boost-1.70.0/boost/test/floating_point_comparison.hpp
index e8892744773..e8892744773 100644
--- a/src/third_party/boost-1.69.0/boost/test/floating_point_comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/floating_point_comparison.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/framework.hpp b/src/third_party/boost-1.70.0/boost/test/framework.hpp
new file mode 100644
index 00000000000..dd0756f9d4d
--- /dev/null
+++ b/src/third_party/boost-1.70.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( global_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( global_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.70.0/boost/test/impl/compiler_log_formatter.ipp b/src/third_party/boost-1.70.0/boost/test/impl/compiler_log_formatter.ipp
new file mode 100644
index 00000000000..1b2645ba12f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/compiler_log_formatter.ipp
@@ -0,0 +1,295 @@
+// (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, bool log_build_info )
+{
+ if(log_build_info) {
+ 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.69.0/boost/test/impl/cpp_main.ipp b/src/third_party/boost-1.70.0/boost/test/impl/cpp_main.ipp
index aaa5cabfc51..aaa5cabfc51 100644
--- a/src/third_party/boost-1.69.0/boost/test/impl/cpp_main.ipp
+++ b/src/third_party/boost-1.70.0/boost/test/impl/cpp_main.ipp
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/debug.ipp b/src/third_party/boost-1.70.0/boost/test/impl/debug.ipp
new file mode 100644
index 00000000000..bee956c1cbb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/debug.ipp
@@ -0,0 +1,1009 @@
+// (C) Copyright Gennadiy Rozental 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 : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : debug interfaces implementation
+// ***************************************************************************
+
+#ifndef BOOST_TEST_DEBUG_API_IPP_112006GER
+#define BOOST_TEST_DEBUG_API_IPP_112006GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+
+#include <boost/test/debug.hpp>
+#include <boost/test/debug_config.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+// Implementation on Windows
+#if defined(_WIN32) && !defined(UNDER_CE) && !defined(BOOST_DISABLE_WIN32) // ******* WIN32
+
+# define BOOST_WIN32_BASED_DEBUG
+
+// SYSTEM API
+# include <windows.h>
+# include <winreg.h>
+# include <cstdio>
+# include <cstring>
+
+# if !defined(NDEBUG) && defined(_MSC_VER)
+# define BOOST_MS_CRT_BASED_DEBUG
+# include <crtdbg.h>
+# endif
+
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::memset; using ::sprintf; }
+# endif
+
+#elif defined(unix) || defined(__unix) // ********************* UNIX
+
+# define BOOST_UNIX_BASED_DEBUG
+
+// Boost.Test
+#include <boost/test/utils/class_properties.hpp>
+#include <boost/test/utils/algorithm.hpp>
+
+// STL
+#include <cstring> // std::memcpy
+#include <map>
+#include <cstdio>
+#include <stdarg.h> // !! ?? cstdarg
+
+// SYSTEM API
+# include <unistd.h>
+# include <signal.h>
+# include <fcntl.h>
+
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <sys/wait.h>
+# include <sys/time.h>
+# include <stdio.h>
+# include <stdlib.h>
+
+# if defined(sun) || defined(__sun)
+
+# define BOOST_SUN_BASED_DEBUG
+
+# ifndef BOOST_TEST_DBG_LIST
+# define BOOST_TEST_DBG_LIST dbx;gdb
+# endif
+
+# define BOOST_TEST_CNL_DBG dbx
+# define BOOST_TEST_GUI_DBG dbx-ddd
+
+# include <procfs.h>
+
+# elif defined(linux) || defined(__linux)
+
+# define BOOST_LINUX_BASED_DEBUG
+
+# include <sys/ptrace.h>
+
+# ifndef BOOST_TEST_STAT_LINE_MAX
+# define BOOST_TEST_STAT_LINE_MAX 500
+# endif
+
+# ifndef BOOST_TEST_DBG_LIST
+# define BOOST_TEST_DBG_LIST gdb
+# endif
+
+# define BOOST_TEST_CNL_DBG gdb
+# define BOOST_TEST_GUI_DBG gdb-xterm
+
+# endif
+
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace debug {
+
+using unit_test::const_string;
+
+// ************************************************************************** //
+// ************** debug::info_t ************** //
+// ************************************************************************** //
+
+namespace {
+
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+template<typename T>
+inline void
+dyn_symbol( T& res, char const* module_name, char const* symbol_name )
+{
+ HMODULE m = ::GetModuleHandleA( module_name );
+
+ if( !m )
+ m = ::LoadLibraryA( module_name );
+
+ res = reinterpret_cast<T>( ::GetProcAddress( m, symbol_name ) );
+}
+
+//____________________________________________________________________________//
+
+static struct info_t {
+ typedef BOOL (WINAPI* IsDebuggerPresentT)();
+ typedef LONG (WINAPI* RegQueryValueExT)( HKEY, char const* /*LPTSTR*/, LPDWORD, LPDWORD, LPBYTE, LPDWORD );
+ typedef LONG (WINAPI* RegOpenKeyT)( HKEY, char const* /*LPCTSTR*/, PHKEY );
+ typedef LONG (WINAPI* RegCloseKeyT)( HKEY );
+
+ info_t();
+
+ IsDebuggerPresentT m_is_debugger_present;
+ RegOpenKeyT m_reg_open_key;
+ RegQueryValueExT m_reg_query_value;
+ RegCloseKeyT m_reg_close_key;
+
+} s_info;
+
+//____________________________________________________________________________//
+
+info_t::info_t()
+{
+ dyn_symbol( m_is_debugger_present, "kernel32", "IsDebuggerPresent" );
+ dyn_symbol( m_reg_open_key, "advapi32", "RegOpenKeyA" );
+ dyn_symbol( m_reg_query_value, "advapi32", "RegQueryValueExA" );
+ dyn_symbol( m_reg_close_key, "advapi32", "RegCloseKey" );
+}
+
+//____________________________________________________________________________//
+
+#elif defined(BOOST_UNIX_BASED_DEBUG)
+
+// ************************************************************************** //
+// ************** fd_holder ************** //
+// ************************************************************************** //
+
+struct fd_holder {
+ explicit fd_holder( int fd ) : m_fd( fd ) {}
+ ~fd_holder()
+ {
+ if( m_fd != -1 )
+ ::close( m_fd );
+ }
+
+ operator int() { return m_fd; }
+
+private:
+ // Data members
+ int m_fd;
+};
+
+
+// ************************************************************************** //
+// ************** process_info ************** //
+// ************************************************************************** //
+
+struct process_info {
+ // Constructor
+ explicit process_info( int pid );
+
+ // access methods
+ int parent_pid() const { return m_parent_pid; }
+ const_string binary_name() const { return m_binary_name; }
+ const_string binary_path() const { return m_binary_path; }
+
+private:
+ // Data members
+ int m_parent_pid;
+ const_string m_binary_name;
+ const_string m_binary_path;
+
+#if defined(BOOST_SUN_BASED_DEBUG)
+ struct psinfo m_psi;
+ char m_binary_path_buff[500+1]; // !! ??
+#elif defined(BOOST_LINUX_BASED_DEBUG)
+ char m_stat_line[BOOST_TEST_STAT_LINE_MAX+1];
+ char m_binary_path_buff[500+1]; // !! ??
+#endif
+};
+
+//____________________________________________________________________________//
+
+process_info::process_info( int pid )
+: m_parent_pid( 0 )
+{
+#if defined(BOOST_SUN_BASED_DEBUG)
+ char fname_buff[30];
+
+ ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/psinfo", pid );
+
+ fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) );
+
+ if( psinfo_fd == -1 )
+ return;
+
+ if( ::read( psinfo_fd, &m_psi, sizeof(m_psi) ) == -1 )
+ return;
+
+ m_parent_pid = m_psi.pr_ppid;
+
+ m_binary_name.assign( m_psi.pr_fname );
+
+ //-------------------------- //
+
+ ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/as", pid );
+
+ fd_holder as_fd( ::open( fname_buff, O_RDONLY ) );
+ uintptr_t binary_name_pos;
+
+ // !! ?? could we avoid reading whole m_binary_path_buff?
+ if( as_fd == -1 ||
+ ::lseek( as_fd, m_psi.pr_argv, SEEK_SET ) == -1 ||
+ ::read ( as_fd, &binary_name_pos, sizeof(binary_name_pos) ) == -1 ||
+ ::lseek( as_fd, binary_name_pos, SEEK_SET ) == -1 ||
+ ::read ( as_fd, m_binary_path_buff, sizeof(m_binary_path_buff) ) == -1 )
+ return;
+
+ m_binary_path.assign( m_binary_path_buff );
+
+#elif defined(BOOST_LINUX_BASED_DEBUG)
+ char fname_buff[30];
+
+ ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/stat", pid );
+
+ fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) );
+
+ if( psinfo_fd == -1 )
+ return;
+
+ ssize_t num_read = ::read( psinfo_fd, m_stat_line, sizeof(m_stat_line)-1 );
+ if( num_read == -1 )
+ return;
+
+ m_stat_line[num_read] = 0;
+
+ char const* name_beg = m_stat_line;
+ while( *name_beg && *name_beg != '(' )
+ ++name_beg;
+
+ char const* name_end = name_beg+1;
+ while( *name_end && *name_end != ')' )
+ ++name_end;
+
+ std::sscanf( name_end+1, "%*s%d", &m_parent_pid );
+
+ m_binary_name.assign( name_beg+1, name_end );
+
+ ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/exe", pid );
+ num_read = ::readlink( fname_buff, m_binary_path_buff, sizeof(m_binary_path_buff)-1 );
+
+ if( num_read == -1 )
+ return;
+
+ m_binary_path_buff[num_read] = 0;
+ m_binary_path.assign( m_binary_path_buff, num_read );
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** prepare_window_title ************** //
+// ************************************************************************** //
+
+static char*
+prepare_window_title( dbg_startup_info const& dsi )
+{
+ typedef unit_test::const_string str_t;
+
+ static char title_str[50];
+
+ str_t path_sep( "\\/" );
+
+ str_t::iterator it = unit_test::utils::find_last_of( dsi.binary_path.begin(), dsi.binary_path.end(),
+ path_sep.begin(), path_sep.end() );
+
+ if( it == dsi.binary_path.end() )
+ it = dsi.binary_path.begin();
+ else
+ ++it;
+
+ ::snprintf( title_str, sizeof(title_str), "%*s %ld", (int)(dsi.binary_path.end()-it), it, dsi.pid );
+
+ return title_str;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** save_execlp ************** //
+// ************************************************************************** //
+
+typedef unit_test::basic_cstring<char> mbuffer;
+
+inline char*
+copy_arg( mbuffer& dest, const_string arg )
+{
+ if( dest.size() < arg.size()+1 )
+ return 0;
+
+ char* res = dest.begin();
+
+ std::memcpy( res, arg.begin(), arg.size()+1 );
+
+ dest.trim_left( arg.size()+1 );
+
+ return res;
+}
+
+//____________________________________________________________________________//
+
+bool
+safe_execlp( char const* file, ... )
+{
+ static char* argv_buff[200];
+
+ va_list args;
+ char const* arg;
+
+ // first calculate actual number of arguments
+ int num_args = 2; // file name and 0 at least
+
+ va_start( args, file );
+ while( !!(arg = va_arg( args, char const* )) )
+ num_args++;
+ va_end( args );
+
+ // reserve space for the argument pointers array
+ char** argv_it = argv_buff;
+ mbuffer work_buff( reinterpret_cast<char*>(argv_buff), sizeof(argv_buff) );
+ work_buff.trim_left( num_args * sizeof(char*) );
+
+ // copy all the argument values into local storage
+ if( !(*argv_it++ = copy_arg( work_buff, file )) )
+ return false;
+
+ printf( "!! %s\n", file );
+
+ va_start( args, file );
+ while( !!(arg = va_arg( args, char const* )) ) {
+ printf( "!! %s\n", arg );
+ if( !(*argv_it++ = copy_arg( work_buff, arg )) ) {
+ va_end( args );
+ return false;
+ }
+ }
+ va_end( args );
+
+ *argv_it = 0;
+
+ return ::execvp( file, argv_buff ) != -1;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** start_debugger_in_emacs ************** //
+// ************************************************************************** //
+
+static void
+start_debugger_in_emacs( dbg_startup_info const& dsi, char const* emacs_name, char const* dbg_command )
+{
+ char const* title = prepare_window_title( dsi );
+
+ if( !title )
+ return;
+
+ dsi.display.is_empty()
+ ? safe_execlp( emacs_name, "-title", title, "--eval", dbg_command, 0 )
+ : safe_execlp( emacs_name, "-title", title, "-display", dsi.display.begin(), "--eval", dbg_command, 0 );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** gdb starters ************** //
+// ************************************************************************** //
+
+static char const*
+prepare_gdb_cmnd_file( dbg_startup_info const& dsi )
+{
+ // prepare pid value
+ char pid_buff[16];
+ ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+ unit_test::const_string pid_str( pid_buff );
+
+ static char cmd_file_name[] = "/tmp/btl_gdb_cmd_XXXXXX"; // !! ??
+
+ // prepare commands
+ fd_holder cmd_fd( ::mkstemp( cmd_file_name ) );
+
+ if( cmd_fd == -1 )
+ return 0;
+
+#define WRITE_STR( str ) if( ::write( cmd_fd, str.begin(), str.size() ) == -1 ) return 0;
+#define WRITE_CSTR( str ) if( ::write( cmd_fd, str, sizeof( str )-1 ) == -1 ) return 0;
+
+ WRITE_CSTR( "file " );
+ WRITE_STR( dsi.binary_path );
+ WRITE_CSTR( "\nattach " );
+ WRITE_STR( pid_str );
+ WRITE_CSTR( "\nshell unlink " );
+ WRITE_STR( dsi.init_done_lock );
+ WRITE_CSTR( "\ncont" );
+ if( dsi.break_or_continue )
+ WRITE_CSTR( "\nup 4" );
+
+ WRITE_CSTR( "\necho \\n" ); // !! ??
+ WRITE_CSTR( "\nlist -" );
+ WRITE_CSTR( "\nlist" );
+ WRITE_CSTR( "\nshell unlink " );
+ WRITE_CSTR( cmd_file_name );
+
+ return cmd_file_name;
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_console( dbg_startup_info const& dsi )
+{
+ char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
+
+ if( !cmnd_file_name )
+ return;
+
+ safe_execlp( "gdb", "-q", "-x", cmnd_file_name, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_xterm( dbg_startup_info const& dsi )
+{
+ char const* title = prepare_window_title( dsi );
+ char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
+
+ if( !title || !cmnd_file_name )
+ return;
+
+ safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(),
+ "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e",
+ "gdb", "-q", "-x", cmnd_file_name, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_emacs( dbg_startup_info const& dsi )
+{
+ char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
+ if( !cmnd_file_name )
+ return;
+
+ char dbg_cmd_buff[500]; // !! ??
+ ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (gdb \"gdb -q -x %s\"))", cmnd_file_name );
+
+ start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_xemacs( dbg_startup_info const& )
+{
+ // !! ??
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** dbx starters ************** //
+// ************************************************************************** //
+
+static char const*
+prepare_dbx_cmd_line( dbg_startup_info const& dsi, bool list_source = true )
+{
+ static char cmd_line_buff[500]; // !! ??
+
+ ::snprintf( cmd_line_buff, sizeof(cmd_line_buff), "unlink %s;cont;%s%s",
+ dsi.init_done_lock.begin(),
+ dsi.break_or_continue ? "up 2;": "",
+ list_source ? "echo \" \";list -w3;" : "" );
+
+ return cmd_line_buff;
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_console( dbg_startup_info const& dsi )
+{
+ char pid_buff[16];
+ ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+
+ safe_execlp( "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_xterm( dbg_startup_info const& dsi )
+{
+ char const* title = prepare_window_title( dsi );
+ if( !title )
+ return;
+
+ char pid_buff[16]; // !! ??
+ ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+
+ safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(),
+ "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e",
+ "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_emacs( dbg_startup_info const& /*dsi*/ )
+{
+// char dbg_cmd_buff[500]; // !! ??
+//
+// ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (dbx \"dbx -q -c cont %s %ld\"))", dsi.binary_path.begin(), dsi.pid );
+
+// start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_xemacs( dbg_startup_info const& )
+{
+ // !! ??
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_ddd( dbg_startup_info const& dsi )
+{
+ char const* title = prepare_window_title( dsi );
+ if( !title )
+ return;
+
+ char pid_buff[16]; // !! ??
+ ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+
+ safe_execlp( "ddd", "-display", dsi.display.begin(),
+ "--dbx", "-q", "-c", prepare_dbx_cmd_line( dsi, false ), dsi.binary_path.begin(), pid_buff, 0 );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** debug::info_t ************** //
+// ************************************************************************** //
+
+static struct info_t {
+ // Constructor
+ info_t();
+
+ // Public properties
+ unit_test::readwrite_property<std::string> p_dbg;
+
+ // Data members
+ std::map<std::string,dbg_starter> m_dbg_starter_reg;
+} s_info;
+
+//____________________________________________________________________________//
+
+info_t::info_t()
+{
+ p_dbg.value = ::getenv( "DISPLAY" )
+ ? std::string( BOOST_STRINGIZE( BOOST_TEST_GUI_DBG ) )
+ : std::string( BOOST_STRINGIZE( BOOST_TEST_CNL_DBG ) );
+
+ m_dbg_starter_reg[std::string("gdb")] = &start_gdb_in_console;
+ m_dbg_starter_reg[std::string("gdb-emacs")] = &start_gdb_in_emacs;
+ m_dbg_starter_reg[std::string("gdb-xterm")] = &start_gdb_in_xterm;
+ m_dbg_starter_reg[std::string("gdb-xemacs")] = &start_gdb_in_xemacs;
+
+ m_dbg_starter_reg[std::string("dbx")] = &start_dbx_in_console;
+ m_dbg_starter_reg[std::string("dbx-emacs")] = &start_dbx_in_emacs;
+ m_dbg_starter_reg[std::string("dbx-xterm")] = &start_dbx_in_xterm;
+ m_dbg_starter_reg[std::string("dbx-xemacs")] = &start_dbx_in_xemacs;
+ m_dbg_starter_reg[std::string("dbx-ddd")] = &start_dbx_in_ddd;
+}
+
+//____________________________________________________________________________//
+
+#endif
+
+} // local namespace
+
+// ************************************************************************** //
+// ************** check if program is running under debugger ************** //
+// ************************************************************************** //
+
+bool
+under_debugger()
+{
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+ return !!s_info.m_is_debugger_present && s_info.m_is_debugger_present();
+
+#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+
+ // !! ?? could/should we cache the result somehow?
+ const_string dbg_list = BOOST_TEST_STRINGIZE( BOOST_TEST_DBG_LIST );
+
+ pid_t pid = ::getpid();
+
+ while( pid != 0 ) {
+ process_info pi( pid );
+
+ // !! ?? should we use tokenizer here instead?
+ if( dbg_list.find( pi.binary_name() ) != const_string::npos )
+ return true;
+
+ pid = (pi.parent_pid() == pid ? 0 : pi.parent_pid());
+ }
+
+ return false;
+
+#else // ****************************************************** default
+
+ return false;
+
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** cause program to break execution ************** //
+// ************** in debugger at call point ************** //
+// ************************************************************************** //
+
+void
+debugger_break()
+{
+ // !! ?? auto-start debugger?
+
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+#if defined(__GNUC__) && !defined(__MINGW32__) || \
+ defined(__INTEL_COMPILER)
+# define BOOST_DEBUG_BREAK __debugbreak
+#else
+# define BOOST_DEBUG_BREAK DebugBreak
+#endif
+
+#ifndef __MINGW32__
+ if( !under_debugger() ) {
+ __try {
+ __try {
+ BOOST_DEBUG_BREAK();
+ }
+ __except( UnhandledExceptionFilter(GetExceptionInformation()) )
+ {
+ // User opted to ignore the breakpoint
+ return;
+ }
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER)
+ {
+ // If we got here, the user has pushed Debug. Debugger is already attached to our process and we
+ // continue to let the another BOOST_DEBUG_BREAK to be called.
+ }
+ }
+#endif
+
+ BOOST_DEBUG_BREAK();
+
+#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+
+ ::kill( ::getpid(), SIGTRAP );
+
+#else // ****************************************************** default
+
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** console debugger setup ************** //
+// ************************************************************************** //
+
+#if defined(BOOST_UNIX_BASED_DEBUG) // ************************ UNIX
+
+std::string
+set_debugger( unit_test::const_string dbg_id, dbg_starter s )
+{
+ std::string old = s_info.p_dbg;
+
+ assign_op( s_info.p_dbg.value, dbg_id, 0 );
+
+ if( !!s )
+ s_info.m_dbg_starter_reg[s_info.p_dbg.get()] = s;
+
+ return old;
+}
+
+#else // ***************************************************** default
+
+std::string
+set_debugger( unit_test::const_string, dbg_starter )
+{
+ return std::string();
+}
+
+#endif
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** attach debugger to the current process ************** //
+// ************************************************************************** //
+
+#if defined(BOOST_WIN32_BASED_DEBUG)
+
+struct safe_handle_helper
+{
+ HANDLE& handle;
+ safe_handle_helper(HANDLE &handle_) : handle(handle_) {}
+
+ void close_handle()
+ {
+ if( handle != INVALID_HANDLE_VALUE )
+ {
+ ::CloseHandle( handle );
+ handle = INVALID_HANDLE_VALUE;
+ }
+ }
+
+ ~safe_handle_helper()
+ {
+ close_handle();
+ }
+};
+#endif
+
+bool
+attach_debugger( bool break_or_continue )
+{
+ if( under_debugger() )
+ return false;
+
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+ const int MAX_CMD_LINE = 200;
+
+ // *************************************************** //
+ // Debugger "ready" event
+
+ SECURITY_ATTRIBUTES attr;
+ attr.nLength = sizeof(attr);
+ attr.lpSecurityDescriptor = NULL;
+ attr.bInheritHandle = true;
+
+ // manual resettable, initially non signaled, unnamed event,
+ // that will signal me that debugger initialization is done
+ HANDLE dbg_init_done_ev = ::CreateEvent(
+ &attr, // pointer to security attributes
+ true, // flag for manual-reset event
+ false, // flag for initial state
+ NULL // pointer to event-object name
+ );
+
+ if( !dbg_init_done_ev )
+ return false;
+
+ safe_handle_helper safe_handle_obj( dbg_init_done_ev );
+
+ // *************************************************** //
+ // Debugger command line format
+
+ HKEY reg_key;
+
+ if( !s_info.m_reg_open_key || (*s_info.m_reg_open_key)(
+ HKEY_LOCAL_MACHINE, // handle of open key
+ "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", // name of subkey to open
+ &reg_key ) != ERROR_SUCCESS ) // address of handle of open key
+ return false;
+
+ char format[MAX_CMD_LINE];
+ DWORD format_size = MAX_CMD_LINE;
+ DWORD type = REG_SZ;
+
+ bool b_read_key = s_info.m_reg_query_value &&
+ ((*s_info.m_reg_query_value)(
+ reg_key, // handle of open key
+ "Debugger", // name of subkey to query
+ 0, // reserved
+ &type, // value type
+ (LPBYTE)format, // buffer for returned string
+ &format_size ) == ERROR_SUCCESS ); // in: buffer size; out: actual size of returned string
+
+ if( !s_info.m_reg_close_key || (*s_info.m_reg_close_key)( reg_key ) != ERROR_SUCCESS )
+ return false;
+
+ if( !b_read_key )
+ return false;
+
+ // *************************************************** //
+ // Debugger command line
+
+ char cmd_line[MAX_CMD_LINE];
+ std::sprintf( cmd_line, format, ::GetCurrentProcessId(), dbg_init_done_ev );
+
+ // *************************************************** //
+ // Debugger window parameters
+
+ STARTUPINFOA startup_info;
+ std::memset( &startup_info, 0, sizeof(startup_info) );
+
+ startup_info.cb = sizeof(startup_info);
+ startup_info.dwFlags = STARTF_USESHOWWINDOW;
+ startup_info.wShowWindow = SW_SHOWNORMAL;
+
+ // debugger process s_info
+ PROCESS_INFORMATION debugger_info;
+
+ bool created = !!::CreateProcessA(
+ NULL, // pointer to name of executable module; NULL - use the one in command line
+ cmd_line, // pointer to command line string
+ NULL, // pointer to process security attributes; NULL - debugger's handle can't be inherited
+ NULL, // pointer to thread security attributes; NULL - debugger's handle can't be inherited
+ true, // debugger inherit opened handles
+ 0, // priority flags; 0 - normal priority
+ NULL, // pointer to new environment block; NULL - use this process environment
+ NULL, // pointer to current directory name; NULL - use this process correct directory
+ &startup_info, // pointer to STARTUPINFO that specifies main window appearance
+ &debugger_info // pointer to PROCESS_INFORMATION that will contain the new process identification
+ );
+
+ bool debugger_run_ok = false;
+ if( created )
+ {
+ DWORD ret_code = ::WaitForSingleObject( dbg_init_done_ev, INFINITE );
+ debugger_run_ok = ( ret_code == WAIT_OBJECT_0 );
+ }
+
+ safe_handle_obj.close_handle();
+
+ if( !created || !debugger_run_ok )
+ return false;
+
+ if( break_or_continue )
+ debugger_break();
+
+ return true;
+
+#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+
+ char init_done_lock_fn[] = "/tmp/btl_dbg_init_done_XXXXXX";
+ fd_holder init_done_lock_fd( ::mkstemp( init_done_lock_fn ) );
+
+ if( init_done_lock_fd == -1 )
+ return false;
+
+ pid_t child_pid = fork();
+
+ if( child_pid == -1 )
+ return false;
+
+ if( child_pid != 0 ) { // parent process - here we will start the debugger
+ dbg_startup_info dsi;
+
+ process_info pi( child_pid );
+ if( pi.binary_path().is_empty() )
+ ::exit( -1 );
+
+ dsi.pid = child_pid;
+ dsi.break_or_continue = break_or_continue;
+ dsi.binary_path = pi.binary_path();
+ dsi.display = ::getenv( "DISPLAY" );
+ dsi.init_done_lock = init_done_lock_fn;
+
+ dbg_starter starter = s_info.m_dbg_starter_reg[s_info.p_dbg];
+ if( !!starter )
+ starter( dsi );
+
+ ::perror( "Boost.Test execution monitor failed to start a debugger:" );
+
+ ::exit( -1 );
+ }
+
+ // child process - here we will continue our test module execution ; // !! ?? should it be vice versa
+
+ while( ::access( init_done_lock_fn, F_OK ) == 0 ) {
+ struct timeval to = { 0, 100 };
+
+ ::select( 0, 0, 0, 0, &to );
+ }
+
+// char dummy;
+// while( ::read( init_done_lock_fd, &dummy, sizeof(char) ) == 0 );
+
+ if( break_or_continue )
+ debugger_break();
+
+ return true;
+
+#else // ****************************************************** default
+ (void) break_or_continue; // silence 'unused variable' warning
+ return false;
+
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** switch on/off detect memory leaks feature ************** //
+// ************************************************************************** //
+
+void
+detect_memory_leaks( bool on_off, unit_test::const_string report_file )
+{
+ boost::ignore_unused( on_off );
+
+#ifdef BOOST_MS_CRT_BASED_DEBUG
+ int flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
+
+ if( !on_off )
+ flags &= ~_CRTDBG_LEAK_CHECK_DF;
+ else {
+ flags |= _CRTDBG_LEAK_CHECK_DF;
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+
+ if( report_file.is_empty() )
+ _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+ else {
+ HANDLE hreport_f = ::CreateFileA( report_file.begin(),
+ GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+ _CrtSetReportFile(_CRT_WARN, hreport_f );
+ }
+ }
+
+ _CrtSetDbgFlag ( flags );
+#else
+ boost::ignore_unused( report_file );
+#endif // BOOST_MS_CRT_BASED_DEBUG
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** cause program to break execution in ************** //
+// ************** debugger at specific allocation point ************** //
+// ************************************************************************** //
+
+void
+break_memory_alloc( long mem_alloc_order_num )
+{
+ boost::ignore_unused( mem_alloc_order_num );
+
+#ifdef BOOST_MS_CRT_BASED_DEBUG
+ // only set the value if one was supplied (do not use default used by UTF just as a indicator to enable leak detection)
+ if( mem_alloc_order_num > 1 )
+ _CrtSetBreakAlloc( mem_alloc_order_num );
+#endif // BOOST_MS_CRT_BASED_DEBUG
+}
+
+//____________________________________________________________________________//
+
+} // namespace debug
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_DEBUG_API_IPP_112006GER
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/decorator.ipp b/src/third_party/boost-1.70.0/boost/test/impl/decorator.ipp
new file mode 100644
index 00000000000..ac6cc7e2782
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/decorator.ipp
@@ -0,0 +1,244 @@
+// (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.
+//
+// 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_stack.begin()->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_stack.begin()->begin(),
+ m_tu_decorators_stack.begin()->end() );
+}
+
+//____________________________________________________________________________//
+
+void
+collector_t::reset()
+{
+ if(m_tu_decorators_stack.size() > 1) {
+ m_tu_decorators_stack.erase(m_tu_decorators_stack.begin());
+ }
+ else {
+ assert(m_tu_decorators_stack.size() == 1);
+ m_tu_decorators_stack.begin()->clear();
+ }
+}
+
+void
+collector_t::stack()
+{
+ assert(m_tu_decorators_stack.size() >= 1);
+ m_tu_decorators_stack.insert(m_tu_decorators_stack.begin(), std::vector<base_ptr>());
+}
+
+//____________________________________________________________________________//
+
+std::vector<base_ptr>
+collector_t::get_lazy_decorators() const
+{
+ return *m_tu_decorators_stack.begin();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::base ************** //
+// ************************************************************************** //
+
+collector_t&
+base::operator*() const
+{
+ return collector_t::instance() * *this;
+}
+
+// ************************************************************************** //
+// ************** decorator::stack_decorator ************** //
+// ************************************************************************** //
+
+collector_t&
+stack_decorator::operator*() const
+{
+ collector_t& instance = collector_t::instance();
+ instance.stack();
+ return instance * *this;
+}
+
+void
+stack_decorator::apply( test_unit& tu )
+{
+ // does nothing by definition
+}
+
+// ************************************************************************** //
+// ************** 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.70.0/boost/test/impl/execution_monitor.ipp b/src/third_party/boost-1.70.0/boost/test/impl/execution_monitor.ipp
new file mode 100644
index 00000000000..2c2cd3871f0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/execution_monitor.ipp
@@ -0,0 +1,1506 @@
+// (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/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 <stdio.h>
+#include <cstdarg> // for varargs
+#include <stdarg.h>
+#include <cmath> // for ceil
+
+#include <iostream> // for varargs
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::strerror; using ::strlen; using ::strncat; using ::ceil; }
+#endif
+
+// to use vsnprintf
+#if defined(__SUNPRO_CC) || defined(__SunOS) || defined(__QNXNTO__) || defined(__VXWORKS__)
+using std::va_list;
+#endif
+
+#if defined(__VXWORKS__)
+# define BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#endif
+
+#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
+
+# if !defined(_WIN32_WINNT) // WinXP
+# define _WIN32_WINNT 0x0501
+# endif
+
+# 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 defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) /* WinXP */
+# define BOOST_TEST_WIN32_WAITABLE_TIMERS
+# 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) || \
+ (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
+# 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_microseconds, 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_microseconds;
+
+ // 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_microseconds, bool attach_dbg, char* alt_stack )
+: m_prev_handler( s_active_handler )
+, m_timeout_microseconds( timeout_microseconds )
+, 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_microseconds > 0, attach_dbg, alt_stack )
+{
+ s_active_handler = this;
+
+ if( m_timeout_microseconds > 0 ) {
+ ::alarm( 0 );
+ ::alarm( static_cast<unsigned int>(std::ceil(timeout_microseconds / 1E6) )); // alarm has a precision to the seconds
+ }
+
+#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_microseconds > 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 )
+ , m_timeout( false )
+ {}
+
+ void set_timed_out();
+ 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;
+ bool m_timeout;
+};
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+static void
+seh_catch_preventer( unsigned /* id */, _EXCEPTION_POINTERS* /* exps */ )
+{
+ throw;
+}
+#endif
+
+//____________________________________________________________________________//
+
+void
+system_signal_exception::set_timed_out()
+{
+ m_timeout = true;
+}
+
+//____________________________________________________________________________//
+
+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:
+ if( m_timeout ) {
+ detail::report_error(execution_exception::timeout_error, "timeout while executing function");
+ }
+ else {
+ 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
+ }
+
+#if defined(BOOST_TEST_WIN32_WAITABLE_TIMERS)
+ HANDLE htimer = INVALID_HANDLE_VALUE;
+ BOOL bTimerSuccess = FALSE;
+
+ if( p_timeout ) {
+ htimer = ::CreateWaitableTimer(
+ NULL,
+ TRUE,
+ TEXT("Boost.Test timer"));
+
+ if( htimer != INVALID_HANDLE_VALUE ) {
+ LARGE_INTEGER liDueTime;
+ liDueTime.QuadPart = - static_cast<signed long int>(p_timeout) * 10; // resolution of 100 ns
+
+ bTimerSuccess = ::SetWaitableTimer(
+ htimer,
+ &liDueTime,
+ 0,
+ 0,
+ 0,
+ FALSE); // Do not restore a suspended system
+ }
+ }
+#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;
+ }
+
+ // we check for time outs: we do not have any signaling facility on Win32
+ // however, we signal a timeout as a hard error as for the other operating systems
+ // and throw the signal error handler
+ if( bTimerSuccess && htimer != INVALID_HANDLE_VALUE) {
+ if (::WaitForSingleObject(htimer, 0) == WAIT_OBJECT_0) {
+ SSE.set_timed_out();
+ throw SSE;
+ }
+ }
+
+ }
+ __finally {
+
+#if defined(BOOST_TEST_WIN32_WAITABLE_TIMERS)
+ if( htimer != INVALID_HANDLE_VALUE ) {
+ ::CloseHandle(htimer);
+ }
+#endif
+
+ 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 );
+ boost::ignore_unused( 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 )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_cast )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_typeid )
+ 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.70.0/boost/test/impl/framework.ipp b/src/third_party/boost-1.70.0/boost/test/impl/framework.ipp
new file mode 100644
index 00000000000..c35469eeb37
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/framework.ipp
@@ -0,0 +1,1782 @@
+// (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>
+#include <boost/test/tree/global_fixture.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/test/utils/timer.hpp>
+#include <boost/bind.hpp>
+
+// STL
+#include <limits>
+#include <map>
+#include <set>
+#include <cstdlib>
+#include <ctime>
+#include <numeric>
+#include <cmath>
+#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 long int const TIMEOUT_EXCEEDED = static_cast<unsigned long int>( -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 long int timeout_microseconds = 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_microseconds == 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_microseconds == 0 || (tu.p_timeout > 0 && timeout_microseconds > (tu.p_timeout * 1000000) ) ) // deduce timeout for this test unit
+ timeout_microseconds = tu.p_timeout * 1000000;
+
+
+ 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 (in microseconds
+ // as expected by test_observer::test_unit_finish)
+ unsigned long elapsed_microseconds = 0;
+
+ if( result == unit_test_monitor_t::test_ok ) {
+ // 40. We are going to time the execution
+ boost::unit_test::timer::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 ) {
+ // tu_timer.elapsed() returns nanosec, timeout and child_timeout in microsec
+ unsigned long int chld_timeout = child_timeout(
+ timeout_microseconds,
+ static_cast<unsigned long int>( microsecond_wall_time(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;
+
+ // we check for the time elapsed. If this is too high, we fail the current suite and return from here
+ elapsed_microseconds = static_cast<unsigned long int>( microsecond_wall_time(tu_timer.elapsed()) );
+
+ if( (timeout_microseconds > 0) && (elapsed_microseconds > timeout_microseconds) && (timeout_microseconds != TIMEOUT_EXCEEDED ) ) {
+ BOOST_TEST_FOREACH( test_observer*, to, m_observers ) {
+ to->test_unit_timed_out(tu);
+ }
+ result = (std::min)( result, unit_test_monitor_t::os_timeout );
+ timeout_microseconds = TIMEOUT_EXCEEDED;
+ //break;
+ // we continue to explore the children, such that we can at least update their
+ // status to skipped
+ }
+ }
+ }
+ 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 long int chld_timeout = child_timeout(
+ timeout_microseconds,
+ static_cast<unsigned long int>(microsecond_wall_time(tu_timer.elapsed())) );
+
+ result = (std::min)( result, execute_test_tree( chld, chld_timeout, &rand_gen ) );
+
+ if( unit_test_monitor.is_critical_error( result ) )
+ break;
+
+ // we check for the time elapsed. If this is too high, we fail the current suite and return from here
+ elapsed_microseconds = static_cast<unsigned long int>( microsecond_wall_time(tu_timer.elapsed()) );
+ if( (timeout_microseconds > 0) && (elapsed_microseconds > timeout_microseconds) && (timeout_microseconds != TIMEOUT_EXCEEDED ) ) {
+ BOOST_TEST_FOREACH( test_observer*, to, m_observers ) {
+ to->test_unit_timed_out(tu);
+ }
+ result = (std::min)( result, unit_test_monitor_t::os_timeout );
+ timeout_microseconds = TIMEOUT_EXCEEDED;
+ //break;
+ // we continue to explore the children, such that we can at least update their
+ // status to skipped
+ }
+ }
+ }
+ }
+ }
+ 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, transforms the time out to seconds
+ result = unit_test_monitor.execute_and_translate( tc.p_test_func, timeout_microseconds );
+ elapsed_microseconds = static_cast<unsigned long int>( microsecond_wall_time(tu_timer.elapsed()) );
+
+ // 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_microseconds );
+
+ return result;
+ }
+
+ //////////////////////////////////////////////////////////////////
+
+ unsigned long int child_timeout( unsigned long tu_timeout_microseconds, unsigned long elpsed_microsec )
+ {
+ if( tu_timeout_microseconds == 0UL || tu_timeout_microseconds == TIMEOUT_EXCEEDED)
+ return tu_timeout_microseconds;
+
+ return tu_timeout_microseconds > elpsed_microsec ?
+ tu_timeout_microseconds - elpsed_microsec
+ : 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<global_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
+unregister_global_fixture_and_configuration()
+{
+ // we make a copy as the set will change in the iteration
+ std::set<global_fixture*> gfixture_copy(s_frk_state().m_global_fixtures);
+ BOOST_TEST_FOREACH( global_fixture*, tuf, gfixture_copy ) {
+ tuf->unregister_from_framework();
+ }
+ s_frk_state().m_global_fixtures.clear();
+
+ state::observer_store gobserver_copy(s_frk_state().m_observers);
+ BOOST_TEST_FOREACH( test_observer*, to, gobserver_copy ) {
+ framework::deregister_observer( *to );
+ }
+ s_frk_state().m_observers.clear();
+}
+
+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()
+{
+ // shuts down the loggers singleton to avoid any further reference to the
+ // framework during the destruction of those
+ impl::shutdown_loggers_and_reports();
+
+ // unregisters any global fixture and configuration object
+ impl::unregister_global_fixture_and_configuration();
+
+ // 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( global_fixture& tuf )
+{
+ impl::s_frk_state().m_global_fixtures.insert( &tuf );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** deregister_global_fixture ************** //
+// ************************************************************************** //
+
+void
+deregister_global_fixture( global_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.70.0/boost/test/impl/junit_log_formatter.ipp b/src/third_party/boost-1.70.0/boost/test/impl/junit_log_formatter.ipp
new file mode 100644
index 00000000000..56b2127b09d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/junit_log_formatter.ipp
@@ -0,0 +1,879 @@
+// (C) Copyright 2016 Raffi Enficiaud.
+// Distributed under the Boost Software License, Version 1.0.
+// (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 the implementatoin of the Junit log formatter (OF_JUNIT)
+// ***************************************************************************
+
+#ifndef BOOST_TEST_JUNIT_LOG_FORMATTER_IPP__
+#define BOOST_TEST_JUNIT_LOG_FORMATTER_IPP__
+
+// Boost.Test
+#include <boost/test/output/junit_log_formatter.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/xml_printer.hpp>
+#include <boost/test/utils/string_cast.hpp>
+#include <boost/test/framework.hpp>
+
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+#include <boost/test/tree/traverse.hpp>
+#include <boost/test/results_collector.hpp>
+
+#include <boost/test/utils/algorithm.hpp>
+#include <boost/test/utils/string_cast.hpp>
+
+//#include <boost/test/results_reporter.hpp>
+
+
+// Boost
+#include <boost/version.hpp>
+#include <boost/core/ignore_unused.hpp>
+
+// STL
+#include <iostream>
+#include <fstream>
+#include <set>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+
+struct s_replace_chars {
+ template <class T>
+ void operator()(T& to_replace)
+ {
+ if(to_replace == '/')
+ to_replace = '.';
+ else if(to_replace == ' ')
+ to_replace = '_';
+ }
+};
+
+inline std::string tu_name_normalize(std::string full_name)
+{
+ // maybe directly using normalize_test_case_name instead?
+ std::for_each(full_name.begin(), full_name.end(), s_replace_chars());
+ return full_name;
+}
+
+inline std::string tu_name_remove_newlines(std::string full_name)
+{
+ full_name.erase(std::remove(full_name.begin(), full_name.end(), '\n'), full_name.end());
+ return full_name;
+}
+
+const_string file_basename(const_string filename) {
+
+ const_string path_sep( "\\/" );
+ const_string::iterator it = unit_test::utils::find_last_of( filename.begin(), filename.end(),
+ path_sep.begin(), path_sep.end() );
+ if( it != filename.end() )
+ filename.trim_left( it + 1 );
+
+ return filename;
+
+}
+
+// ************************************************************************** //
+// ************** junit_log_formatter ************** //
+// ************************************************************************** //
+
+void
+junit_log_formatter::log_start( std::ostream& /*ostr*/, counter_t /*test_cases_amount*/)
+{
+ map_tests.clear();
+ list_path_to_root.clear();
+ runner_log_entry.clear();
+}
+
+//____________________________________________________________________________//
+
+class junit_result_helper : public test_tree_visitor {
+private:
+ typedef junit_impl::junit_log_helper::assertion_entry assertion_entry;
+ typedef std::vector< assertion_entry >::const_iterator vect_assertion_entry_citerator;
+ typedef std::list<std::string>::const_iterator list_str_citerator;
+
+public:
+ explicit junit_result_helper(
+ std::ostream& stream,
+ test_unit const& ts,
+ junit_log_formatter::map_trace_t const& mt,
+ junit_impl::junit_log_helper const& runner_log_,
+ bool display_build_info )
+ : m_stream(stream)
+ , m_ts( ts )
+ , m_map_test( mt )
+ , runner_log( runner_log_ )
+ , m_id( 0 )
+ , m_display_build_info(display_build_info)
+ { }
+
+ void add_log_entry(assertion_entry const& log) const
+ {
+ std::string entry_type;
+ if( log.log_entry == assertion_entry::log_entry_failure ) {
+ entry_type = "failure";
+ }
+ else if( log.log_entry == assertion_entry::log_entry_error ) {
+ entry_type = "error";
+ }
+ else {
+ return;
+ }
+
+ m_stream
+ << "<" << entry_type
+ << " message" << utils::attr_value() << log.logentry_message
+ << " type" << utils::attr_value() << log.logentry_type
+ << ">";
+
+ if(!log.output.empty()) {
+ m_stream << utils::cdata() << "\n" + log.output;
+ }
+
+ m_stream << "</" << entry_type << ">";
+ }
+
+ struct conditional_cdata_helper {
+ std::ostream &ostr;
+ std::string const field;
+ bool empty;
+
+ conditional_cdata_helper(std::ostream &ostr_, std::string field_)
+ : ostr(ostr_)
+ , field(field_)
+ , empty(true)
+ {}
+
+ ~conditional_cdata_helper() {
+ if(!empty) {
+ ostr << BOOST_TEST_L( "]]>" ) << "</" << field << '>' << std::endl;
+ }
+ }
+
+ void operator()(const std::string& s) {
+ bool current_empty = s.empty();
+ if(empty) {
+ if(!current_empty) {
+ empty = false;
+ ostr << '<' << field << '>' << BOOST_TEST_L( "<![CDATA[" );
+ }
+ }
+ if(!current_empty) {
+ ostr << s;
+ }
+ }
+ };
+
+ std::list<std::string> build_skipping_chain(test_unit const & tu) const
+ {
+ // we enter here because we know that the tu has been skipped.
+ // either junit has not seen this tu, or it is indicated as disabled
+ assert(m_map_test.count(tu.p_id) == 0 || results_collector.results( tu.p_id ).p_skipped);
+
+ std::list<std::string> out;
+
+ test_unit_id id(tu.p_id);
+ while( id != m_ts.p_id && id != INV_TEST_UNIT_ID) {
+ test_unit const& tu_hierarchy = boost::unit_test::framework::get( id, TUT_ANY );
+ out.push_back("- disabled test unit: '" + tu_name_remove_newlines(tu_hierarchy.full_name()) + "'\n");
+ if(m_map_test.count(id) > 0)
+ {
+ // junit has seen the reason: this is enough for constructing the chain
+ break;
+ }
+ id = tu_hierarchy.p_parent_id;
+ }
+ junit_log_formatter::map_trace_t::const_iterator it_element_stack(m_map_test.find(id));
+ if( it_element_stack != m_map_test.end() )
+ {
+ out.push_back("- reason: '" + it_element_stack->second.skipping_reason + "'");
+ out.push_front("Test case disabled because of the following chain of decision:\n");
+ }
+
+ return out;
+ }
+
+ std::string get_class_name(test_unit const & tu_class) const {
+ std::string classname;
+ test_unit_id id(tu_class.p_parent_id);
+ while( id != m_ts.p_id && id != INV_TEST_UNIT_ID ) {
+ test_unit const& tu = boost::unit_test::framework::get( id, TUT_ANY );
+ classname = tu_name_normalize(tu.p_name) + "." + classname;
+ id = tu.p_parent_id;
+ }
+
+ // removes the trailing dot
+ if(!classname.empty() && *classname.rbegin() == '.') {
+ classname.erase(classname.size()-1);
+ }
+
+ return classname;
+ }
+
+ void write_testcase_header(test_unit const & tu,
+ test_results const *tr,
+ int nb_assertions) const
+ {
+ std::string name;
+ std::string classname;
+
+ if(tu.p_id == m_ts.p_id ) {
+ name = "boost_test";
+ }
+ else {
+ classname = get_class_name(tu);
+ name = tu_name_normalize(tu.p_name);
+ }
+
+ if( tu.p_type == TUT_SUITE ) {
+ if(tr->p_timed_out)
+ name += "-timed-execution";
+ else
+ name += "-setup-teardown";
+ }
+
+ m_stream << "<testcase assertions" << utils::attr_value() << nb_assertions;
+ if(!classname.empty())
+ m_stream << " classname" << utils::attr_value() << classname;
+
+ // test case name and time taken
+ m_stream
+ << " name" << utils::attr_value() << name
+ << " time" << utils::attr_value() << double(tr->p_duration_microseconds) * 1E-6
+ << ">" << std::endl;
+ }
+
+ void write_testcase_system_out(junit_impl::junit_log_helper const &detailed_log,
+ test_unit const * tu,
+ bool skipped) const
+ {
+ // system-out + all info/messages, the object skips the empty entries
+ conditional_cdata_helper system_out_helper(m_stream, "system-out");
+
+ // indicate why the test has been skipped first
+ if( skipped ) {
+ std::list<std::string> skipping_decision_chain = build_skipping_chain(*tu);
+ for(list_str_citerator it(skipping_decision_chain.begin()), ite(skipping_decision_chain.end());
+ it != ite;
+ ++it)
+ {
+ system_out_helper(*it);
+ }
+ }
+
+ // stdout
+ for(list_str_citerator it(detailed_log.system_out.begin()), ite(detailed_log.system_out.end());
+ it != ite;
+ ++it)
+ {
+ system_out_helper(*it);
+ }
+
+ // warning/info message last
+ for(vect_assertion_entry_citerator it(detailed_log.assertion_entries.begin());
+ it != detailed_log.assertion_entries.end();
+ ++it)
+ {
+ if(it->log_entry != assertion_entry::log_entry_info)
+ continue;
+ system_out_helper(it->output);
+ }
+ }
+
+ void write_testcase_system_err(junit_impl::junit_log_helper const &detailed_log,
+ test_unit const * tu,
+ test_results const *tr) const
+ {
+ // system-err output + test case informations
+ bool has_failed = (tr != 0) ? !tr->p_skipped && !tr->passed() : false;
+ if(!detailed_log.system_err.empty() || has_failed)
+ {
+ std::ostringstream o;
+ if(has_failed) {
+ o << "Failures detected in:" << std::endl;
+ }
+ else {
+ o << "ERROR STREAM:" << std::endl;
+ }
+
+ if(tu->p_type == TUT_SUITE) {
+ if( tu->p_id == m_ts.p_id ) {
+ o << " boost.test global setup/teardown" << std::endl;
+ } else {
+ o << "- test suite: " << tu_name_remove_newlines(tu->full_name()) << std::endl;
+ }
+ }
+ else {
+ o << "- test case: " << tu_name_remove_newlines(tu->full_name());
+ if(!tu->p_description.value.empty())
+ o << " '" << tu->p_description << "'";
+
+ o << std::endl
+ << "- file: " << file_basename(tu->p_file_name) << std::endl
+ << "- line: " << tu->p_line_num << std::endl
+ ;
+ }
+
+ if(!detailed_log.system_err.empty())
+ o << std::endl << "STDERR BEGIN: ------------" << std::endl;
+
+ for(list_str_citerator it(detailed_log.system_err.begin()), ite(detailed_log.system_err.end());
+ it != ite;
+ ++it)
+ {
+ o << *it;
+ }
+
+ if(!detailed_log.system_err.empty())
+ o << std::endl << "STDERR END ------------" << std::endl;
+
+ conditional_cdata_helper system_err_helper(m_stream, "system-err");
+ system_err_helper(o.str());
+ }
+ }
+
+ int get_nb_assertions(junit_impl::junit_log_helper const &detailed_log,
+ test_unit const & tu,
+ test_results const *tr) const {
+ int nb_assertions(-1);
+ if( tu.p_type == TUT_SUITE ) {
+ nb_assertions = 0;
+ for(vect_assertion_entry_citerator it(detailed_log.assertion_entries.begin());
+ it != detailed_log.assertion_entries.end();
+ ++it)
+ {
+ if(it->log_entry != assertion_entry::log_entry_info)
+ nb_assertions++;
+ }
+ }
+ else {
+ nb_assertions = static_cast<int>(tr->p_assertions_passed + tr->p_assertions_failed);
+ }
+
+ return nb_assertions;
+ }
+
+ void output_detailed_logs(junit_impl::junit_log_helper const &detailed_log,
+ test_unit const & tu,
+ bool skipped,
+ test_results const *tr) const
+ {
+ int nb_assertions = get_nb_assertions(detailed_log, tu, tr);
+ if(!nb_assertions && tu.p_type == TUT_SUITE)
+ return;
+
+ write_testcase_header(tu, tr, nb_assertions);
+
+ if( skipped ) {
+ m_stream << "<skipped/>" << std::endl;
+ }
+ else {
+
+ for(vect_assertion_entry_citerator it(detailed_log.assertion_entries.begin());
+ it != detailed_log.assertion_entries.end();
+ ++it)
+ {
+ add_log_entry(*it);
+ }
+ }
+
+ write_testcase_system_out(detailed_log, &tu, skipped);
+ write_testcase_system_err(detailed_log, &tu, tr);
+ m_stream << "</testcase>" << std::endl;
+ }
+
+ void visit( test_case const& tc )
+ {
+
+ test_results const& tr = results_collector.results( tc.p_id );
+ junit_log_formatter::map_trace_t::const_iterator it_find = m_map_test.find(tc.p_id);
+ if(it_find == m_map_test.end())
+ {
+ // test has been skipped and not seen by the logger
+ output_detailed_logs(junit_impl::junit_log_helper(), tc, true, &tr);
+ }
+ else {
+ output_detailed_logs(it_find->second, tc, tr.p_skipped, &tr);
+ }
+ }
+
+ bool test_suite_start( test_suite const& ts )
+ {
+ test_results const& tr = results_collector.results( ts.p_id );
+
+ // unique test suite, without s, nesting not supported in CI
+ if( m_ts.p_id == ts.p_id ) {
+ m_stream << "<testsuite";
+
+ // think about: maybe we should add the number of fixtures of a test_suite as
+ // independant tests (field p_fixtures).
+ // same goes for the timed-execution: we can think of that as a separate test-unit
+ // in the suite.
+ // see https://llg.cubic.org/docs/junit/ and
+ // http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java?view=markup
+ m_stream
+ // << "disabled=\"" << tr.p_test_cases_skipped << "\" "
+ << " tests" << utils::attr_value()
+ << tr.p_test_cases_passed
+ + tr.p_test_cases_failed
+ // + tr.p_test_cases_aborted // aborted is also failed, we avoid counting it twice
+ << " skipped" << utils::attr_value() << tr.p_test_cases_skipped
+ << " errors" << utils::attr_value() << tr.p_test_cases_aborted
+ << " failures" << utils::attr_value()
+ << tr.p_test_cases_failed
+ + tr.p_test_suites_timed_out
+ + tr.p_test_cases_timed_out
+ - tr.p_test_cases_aborted // failed is not aborted in the Junit sense
+ << " id" << utils::attr_value() << m_id++
+ << " name" << utils::attr_value() << tu_name_normalize(ts.p_name)
+ << " time" << utils::attr_value() << (tr.p_duration_microseconds * 1E-6)
+ << ">" << std::endl;
+
+ if(m_display_build_info)
+ {
+ m_stream << "<properties>" << std::endl;
+ m_stream << "<property name=\"platform\" value" << utils::attr_value() << BOOST_PLATFORM << " />" << std::endl;
+ m_stream << "<property name=\"compiler\" value" << utils::attr_value() << BOOST_COMPILER << " />" << std::endl;
+ m_stream << "<property name=\"stl\" value" << utils::attr_value() << BOOST_STDLIB << " />" << std::endl;
+
+ std::ostringstream o;
+ o << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
+ m_stream << "<property name=\"boost\" value" << utils::attr_value() << o.str() << " />" << std::endl;
+ m_stream << "</properties>" << std::endl;
+ }
+ }
+
+ if( !tr.p_skipped ) {
+ // if we land here, then this is a chance that we are logging the fixture setup/teardown of a test-suite.
+ // the setup/teardown logging of a test-case is part of the test case.
+ // we do not care about the test-suite that were skipped (really??)
+ junit_log_formatter::map_trace_t::const_iterator it_find = m_map_test.find(ts.p_id);
+ if(it_find != m_map_test.end()) {
+ output_detailed_logs(it_find->second, ts, false, &tr);
+ }
+ }
+
+ return true; // indicates that the children should also be parsed
+ }
+
+ virtual void test_suite_finish( test_suite const& ts )
+ {
+ if( m_ts.p_id == ts.p_id ) {
+ write_testcase_system_out(runner_log, 0, false);
+ write_testcase_system_err(runner_log, 0, 0);
+
+ m_stream << "</testsuite>";
+ return;
+ }
+ }
+
+private:
+ // Data members
+ std::ostream& m_stream;
+ test_unit const& m_ts;
+ junit_log_formatter::map_trace_t const& m_map_test;
+ junit_impl::junit_log_helper const& runner_log;
+ size_t m_id;
+ bool m_display_build_info;
+};
+
+
+
+void
+junit_log_formatter::log_finish( std::ostream& ostr )
+{
+ ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
+
+ // getting the root test suite
+ if(!map_tests.empty()) {
+ test_unit* root = &boost::unit_test::framework::get( map_tests.begin()->first, TUT_ANY );
+
+ // looking for the root of the SUBtree (we stay in the subtree)
+ while(root->p_parent_id != INV_TEST_UNIT_ID && map_tests.count(root->p_parent_id) > 0) {
+ root = &boost::unit_test::framework::get( root->p_parent_id, TUT_ANY );
+ }
+ junit_result_helper ch( ostr, *root, map_tests, this->runner_log_entry, m_display_build_info );
+ traverse_test_tree( root->p_id, ch, true ); // last is to ignore disabled suite special handling
+ }
+ else {
+ ostr << "<testsuites errors=\"1\">";
+ ostr << "<testsuite errors=\"1\" name=\"boost-test-framework\">";
+ ostr << "<testcase assertions=\"1\" name=\"test-setup\">";
+ ostr << "<system-out>Incorrect setup: no test case executed</system-out>";
+ ostr << "</testcase></testsuite></testsuites>";
+ }
+ return;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_build_info( std::ostream& /*ostr*/, bool log_build_info )
+{
+ m_display_build_info = log_build_info;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::test_unit_start( std::ostream& /*ostr*/, test_unit const& tu )
+{
+ list_path_to_root.push_back( tu.p_id );
+ map_tests.insert(std::make_pair(tu.p_id, junit_impl::junit_log_helper())); // current_test_case_id not working here
+}
+
+
+
+//____________________________________________________________________________//
+
+
+void
+junit_log_formatter::test_unit_finish( std::ostream& /*ostr*/, test_unit const& tu, unsigned long /*elapsed*/ )
+{
+ // the time is already stored in the result_reporter
+ boost::ignore_unused( tu );
+ assert( tu.p_id == list_path_to_root.back() );
+ list_path_to_root.pop_back();
+}
+
+void
+junit_log_formatter::test_unit_aborted( std::ostream& /*ostr*/, test_unit const& tu )
+{
+ boost::ignore_unused( tu );
+ assert( tu.p_id == list_path_to_root.back() );
+ //list_path_to_root.pop_back();
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::test_unit_timed_out( std::ostream& /*os*/, test_unit const& tu)
+{
+ if(tu.p_type == TUT_SUITE)
+ {
+ // if we reach this call, it means that the test has already started and
+ // test_unit_start has already been called on the tu.
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ junit_impl::junit_log_helper::assertion_entry entry;
+ entry.logentry_message = "test-suite time out";
+ entry.logentry_type = "execution timeout";
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_error;
+ entry.output = "the current suite exceeded the allocated execution time";
+ last_entry.assertion_entries.push_back(entry);
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::test_unit_skipped( std::ostream& /*ostr*/, test_unit const& tu, const_string reason )
+{
+ // if a test unit is skipped, then the start of this TU has not been called yet.
+ // we cannot use get_current_log_entry here, but the TU id should appear in the map.
+ // The "skip" boolean is given by the boost.test framework
+ junit_impl::junit_log_helper& v = map_tests[tu.p_id]; // not sure if we can use get_current_log_entry()
+ v.skipping_reason.assign(reason.begin(), reason.end());
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_exception_start( std::ostream& /*ostr*/, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
+{
+ std::ostringstream o;
+ execution_exception::location const& loc = ex.where();
+
+ m_is_last_assertion_or_error = false;
+
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+
+ junit_impl::junit_log_helper::assertion_entry entry;
+
+ entry.logentry_message = "unexpected exception";
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_error;
+
+ switch(ex.code())
+ {
+ case execution_exception::cpp_exception_error:
+ entry.logentry_type = "uncaught exception";
+ break;
+ case execution_exception::timeout_error:
+ entry.logentry_type = "execution timeout";
+ break;
+ case execution_exception::user_error:
+ entry.logentry_type = "user, assert() or CRT error";
+ break;
+ case execution_exception::user_fatal_error:
+ // Looks like never used
+ entry.logentry_type = "user fatal error";
+ break;
+ case execution_exception::system_error:
+ entry.logentry_type = "system error";
+ break;
+ case execution_exception::system_fatal_error:
+ entry.logentry_type = "system fatal error";
+ break;
+ default:
+ entry.logentry_type = "no error"; // not sure how to handle this one
+ break;
+ }
+
+ o << "UNCAUGHT EXCEPTION:" << std::endl;
+ if( !loc.m_function.is_empty() )
+ o << "- function: \"" << loc.m_function << "\"" << std::endl;
+
+ o << "- file: " << file_basename(loc.m_file_name) << std::endl
+ << "- line: " << loc.m_line_num << std::endl
+ << std::endl;
+
+ o << "\nEXCEPTION STACK TRACE: --------------\n" << ex.what()
+ << "\n-------------------------------------";
+
+ if( !checkpoint_data.m_file_name.is_empty() ) {
+ o << std::endl << std::endl
+ << "Last checkpoint:" << std::endl
+ << "- message: \"" << checkpoint_data.m_message << "\"" << std::endl
+ << "- file: " << file_basename(checkpoint_data.m_file_name) << std::endl
+ << "- line: " << checkpoint_data.m_line_num << std::endl
+ ;
+ }
+
+ entry.output = o.str();
+
+ last_entry.assertion_entries.push_back(entry);
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_exception_finish( std::ostream& /*ostr*/ )
+{
+ // sealing the last entry
+ assert(!get_current_log_entry().assertion_entries.back().sealed);
+ get_current_log_entry().assertion_entries.back().sealed = true;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_start( std::ostream& /*ostr*/, log_entry_data const& entry_data, log_entry_types let )
+{
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ last_entry.skipping = false;
+ m_is_last_assertion_or_error = true;
+ switch(let)
+ {
+ case unit_test_log_formatter::BOOST_UTL_ET_INFO:
+ {
+ if(m_log_level_internal > log_successful_tests) {
+ last_entry.skipping = true;
+ break;
+ }
+ BOOST_FALLTHROUGH;
+ }
+ case unit_test_log_formatter::BOOST_UTL_ET_MESSAGE:
+ {
+ if(m_log_level_internal > log_messages) {
+ last_entry.skipping = true;
+ break;
+ }
+ BOOST_FALLTHROUGH;
+ }
+ case unit_test_log_formatter::BOOST_UTL_ET_WARNING:
+ {
+ if(m_log_level_internal > log_warnings) {
+ last_entry.skipping = true;
+ break;
+ }
+ std::ostringstream o;
+ junit_impl::junit_log_helper::assertion_entry entry;
+
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_info;
+ entry.logentry_message = "info";
+ entry.logentry_type = "message";
+
+ o << (let == unit_test_log_formatter::BOOST_UTL_ET_WARNING ?
+ "WARNING:" : (let == unit_test_log_formatter::BOOST_UTL_ET_MESSAGE ?
+ "MESSAGE:" : "INFO:"))
+ << std::endl
+ << "- file : " << file_basename(entry_data.m_file_name) << std::endl
+ << "- line : " << entry_data.m_line_num << std::endl
+ << "- message: "; // no CR
+
+ entry.output += o.str();
+ last_entry.assertion_entries.push_back(entry);
+ break;
+ }
+ default:
+ case unit_test_log_formatter::BOOST_UTL_ET_ERROR:
+ case unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR:
+ {
+ std::ostringstream o;
+ junit_impl::junit_log_helper::assertion_entry entry;
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_failure;
+ entry.logentry_message = "failure";
+ entry.logentry_type = (let == unit_test_log_formatter::BOOST_UTL_ET_ERROR ? "assertion error" : "fatal error");
+
+ o << "ASSERTION FAILURE:" << std::endl
+ << "- file : " << file_basename(entry_data.m_file_name) << std::endl
+ << "- line : " << entry_data.m_line_num << std::endl
+ << "- message: " ; // no CR
+
+ entry.output += o.str();
+ last_entry.assertion_entries.push_back(entry);
+ break;
+ }
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_value( std::ostream& /*ostr*/, const_string value )
+{
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ if(last_entry.skipping)
+ return;
+
+ assert(last_entry.assertion_entries.empty() || !last_entry.assertion_entries.back().sealed);
+
+ if(!last_entry.assertion_entries.empty())
+ {
+ junit_impl::junit_log_helper::assertion_entry& log_entry = last_entry.assertion_entries.back();
+ log_entry.output += value;
+ }
+ else
+ {
+ // this may be a message coming from another observer
+ // the prefix is set in the log_entry_start
+ last_entry.system_out.push_back(std::string(value.begin(), value.end()));
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_finish( std::ostream& /*ostr*/ )
+{
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ if(!last_entry.skipping)
+ {
+ assert(last_entry.assertion_entries.empty() || !last_entry.assertion_entries.back().sealed);
+
+ if(!last_entry.assertion_entries.empty()) {
+ junit_impl::junit_log_helper::assertion_entry& log_entry = last_entry.assertion_entries.back();
+ log_entry.output += "\n\n"; // quote end, CR
+ log_entry.sealed = true;
+ }
+ else {
+ last_entry.system_out.push_back("\n\n"); // quote end, CR
+ }
+ }
+
+ last_entry.skipping = false;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::entry_context_start( std::ostream& /*ostr*/, log_level )
+{
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ if(last_entry.skipping)
+ return;
+
+ std::vector< junit_impl::junit_log_helper::assertion_entry > &v_failure_or_error = last_entry.assertion_entries;
+ assert(!v_failure_or_error.back().sealed);
+
+ junit_impl::junit_log_helper::assertion_entry& last_log_entry = v_failure_or_error.back();
+ if(m_is_last_assertion_or_error)
+ {
+ last_log_entry.output += "\n- context:\n";
+ }
+ else
+ {
+ last_log_entry.output += "\n\nCONTEXT:\n";
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::entry_context_finish( std::ostream& /*ostr*/, log_level )
+{
+ // no op, may be removed
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ if(last_entry.skipping)
+ return;
+ assert(!get_current_log_entry().assertion_entries.back().sealed);
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_context( std::ostream& /*ostr*/, log_level , const_string context_descr )
+{
+ junit_impl::junit_log_helper& last_entry = get_current_log_entry();
+ if(last_entry.skipping)
+ return;
+
+ assert(!last_entry.assertion_entries.back().sealed);
+ junit_impl::junit_log_helper::assertion_entry& last_log_entry = get_current_log_entry().assertion_entries.back();
+
+ last_log_entry.output +=
+ (m_is_last_assertion_or_error ? " - '": "- '") + std::string(context_descr.begin(), context_descr.end()) + "'\n"; // quote end
+}
+
+//____________________________________________________________________________//
+
+
+std::string
+junit_log_formatter::get_default_stream_description() const {
+ std::string name = framework::master_test_suite().p_name.value;
+
+ static const std::string to_replace[] = { " ", "\"", "/", "\\", ":"};
+ static const std::string replacement[] = { "_", "_" , "_", "_" , "_"};
+
+ name = unit_test::utils::replace_all_occurrences_of(
+ name,
+ to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0]),
+ replacement, replacement + sizeof(replacement)/sizeof(replacement[0]));
+
+ std::ifstream check_init((name + ".xml").c_str());
+ if(!check_init)
+ return name + ".xml";
+
+ int index = 0;
+ for(; index < 100; index++) {
+ std::string candidate = name + "_" + utils::string_cast(index) + ".xml";
+ std::ifstream file(candidate.c_str());
+ if(!file)
+ return candidate;
+ }
+
+ return name + ".xml";
+}
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_junit_log_formatter_IPP_020105GER
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/plain_report_formatter.ipp b/src/third_party/boost-1.70.0/boost/test/impl/plain_report_formatter.ipp
new file mode 100644
index 00000000000..c69b895a8fd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/plain_report_formatter.ipp
@@ -0,0 +1,218 @@
+// (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 : plain report formatter definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+#define BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <boost/test/output/plain_report_formatter.hpp>
+#include <boost/test/utils/custom_manip.hpp>
+#include <boost/test/results_collector.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/setcolor.hpp>
+
+// STL
+#include <iomanip>
+#include <boost/config/no_tr1/cmath.hpp>
+#include <iostream>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::log10; }
+# endif
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+namespace {
+
+typedef utils::custom_manip<struct quote_t> quote;
+
+template<typename T>
+inline std::ostream&
+operator<<( utils::custom_printer<quote> const& p, T const& value )
+{
+ *p << '"' << value << '"';
+
+ return *p;
+}
+
+//____________________________________________________________________________//
+
+void
+print_stat_value( std::ostream& ostr, counter_t v, counter_t indent, counter_t total, const_string name, const_string res )
+{
+ if( v == 0 )
+ return;
+
+ if( total > 0 )
+ ostr << std::setw( static_cast<int>(indent) ) << "" << v << ' ' << name << ( v != 1 ? "s" : "" )
+ << " out of " << total << ' ' << res << '\n';
+ else
+ ostr << std::setw( static_cast<int>(indent) ) << "" << v << ' ' << res << ' ' << name << ( v != 1 ? "s" : "" ) << '\n';
+}
+
+//____________________________________________________________________________//
+
+} // local namespace
+
+// ************************************************************************** //
+// ************** plain_report_formatter ************** //
+// ************************************************************************** //
+
+void
+plain_report_formatter::results_report_start( std::ostream& ostr )
+{
+ m_indent = 0;
+ m_color_output = runtime_config::get<bool>( runtime_config::btrt_color_output );
+ ostr << '\n';
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::results_report_finish( std::ostream& ostr )
+{
+ ostr.flush();
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )
+{
+ test_results const& tr = results_collector.results( tu.p_id );
+
+ const_string descr;
+
+ if( tr.passed() )
+ descr = "has passed";
+ else if( tr.p_skipped )
+ descr = "was skipped";
+ else if( tr.p_timed_out )
+ descr = "has timed out";
+ else if( tr.p_aborted )
+ descr = "was aborted";
+ else
+ descr = "has failed";
+
+ ostr << std::setw( static_cast<int>(m_indent) ) << ""
+ << "Test " << tu.p_type_name << ' ' << quote() << tu.full_name() << ' ' << descr;
+
+ if( tr.p_skipped ) {
+ ostr << "\n";
+ m_indent += 2;
+ return;
+ }
+
+ // aborted test case within failed ones, timed-out TC exclusive with failed/aborted
+ counter_t total_assertions = tr.p_assertions_passed + tr.p_assertions_failed;
+ counter_t total_tc = tr.p_test_cases_passed + tr.p_test_cases_warned + tr.p_test_cases_failed + tr.p_test_cases_skipped + tr.p_test_cases_timed_out;
+
+ if( total_assertions > 0 || total_tc > 0 || tr.p_warnings_failed > 0)
+ ostr << " with:";
+
+ ostr << '\n';
+ m_indent += 2;
+
+ print_stat_value( ostr, tr.p_test_cases_passed , m_indent, total_tc , "test case", "passed" );
+ print_stat_value( ostr, tr.p_test_cases_warned , m_indent, total_tc , "test case", "passed with warnings" );
+ print_stat_value( ostr, tr.p_test_cases_failed , m_indent, total_tc , "test case", "failed" );
+ print_stat_value( ostr, tr.p_test_cases_timed_out, m_indent, total_tc , "test case", "timed-out" );
+ print_stat_value( ostr, tr.p_test_suites_timed_out, m_indent, tr.p_test_suites, "test suite", "timed-out" );
+ print_stat_value( ostr, tr.p_test_cases_skipped, m_indent, total_tc , "test case", "skipped" );
+ print_stat_value( ostr, tr.p_test_cases_aborted, m_indent, total_tc , "test case", "aborted" );
+ print_stat_value( ostr, tr.p_assertions_passed , m_indent, total_assertions, "assertion", "passed" );
+ print_stat_value( ostr, tr.p_assertions_failed , m_indent, total_assertions, "assertion", "failed" );
+ print_stat_value( ostr, tr.p_warnings_failed , m_indent, 0 , "warning" , "failed" );
+ print_stat_value( ostr, tr.p_expected_failures , m_indent, 0 , "failure" , "expected" );
+
+ ostr << '\n';
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::test_unit_report_finish( test_unit const&, std::ostream& )
+{
+ m_indent -= 2;
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::do_confirmation_report( test_unit const& tu, std::ostream& ostr )
+{
+ test_results const& tr = results_collector.results( tu.p_id );
+
+ if( tr.passed() ) {
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, ostr, term_attr::BRIGHT, term_color::GREEN );
+
+ ostr << "*** No errors detected\n";
+ return;
+ }
+
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, ostr, term_attr::BRIGHT, term_color::RED );
+
+ if( tr.p_skipped ) {
+ ostr << "*** The test " << tu.p_type_name << ' ' << quote() << tu.full_name() << " was skipped"
+ << "; see standard output for details\n";
+ return;
+ }
+
+ if( tr.p_timed_out ) {
+ ostr << "*** The test " << tu.p_type_name << ' ' << quote() << tu.full_name() << " has timed out"
+ << "; see standard output for details\n";
+ return;
+ }
+
+ if( tr.p_aborted ) {
+ ostr << "*** The test " << tu.p_type_name << ' ' << quote() << tu.full_name() << " was aborted"
+ << "; see standard output for details\n";
+ }
+
+ if( tr.p_assertions_failed == 0 ) {
+ if( !tr.p_aborted )
+ ostr << "*** Errors were detected in the test " << tu.p_type_name << ' ' << quote() << tu.full_name()
+ << "; see standard output for details\n";
+ return;
+ }
+
+ counter_t num_failures = tr.p_assertions_failed;
+
+ ostr << "*** " << num_failures << " failure" << ( num_failures != 1 ? "s are" : " is" ) << " detected";
+
+ if( tr.p_expected_failures > 0 )
+ ostr << " (" << tr.p_expected_failures << " failure" << ( tr.p_expected_failures != 1 ? "s are" : " is" ) << " expected)";
+
+ ostr << " in the test " << tu.p_type_name << " " << quote() << tu.full_name() << "\n";
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp b/src/third_party/boost-1.70.0/boost/test/impl/progress_monitor.ipp
index 998aa26b287..998aa26b287 100644
--- a/src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp
+++ b/src/third_party/boost-1.70.0/boost/test/impl/progress_monitor.ipp
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/results_collector.ipp b/src/third_party/boost-1.70.0/boost/test/impl/results_collector.ipp
new file mode 100644
index 00000000000..bda11f2d967
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/results_collector.ipp
@@ -0,0 +1,328 @@
+// (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/execution_monitor.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_timed_out &&
+ p_test_cases_timed_out == 0 &&
+ !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 || p_timed_out || p_test_cases_timed_out )
+ ? exit_test_failure
+ : exit_exception_failure );
+}
+
+//____________________________________________________________________________//
+
+void
+test_results::operator+=( test_results const& tr )
+{
+ p_test_suites.value += tr.p_test_suites;
+ 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_test_cases_timed_out.value += tr.p_test_cases_timed_out;
+ p_test_suites_timed_out.value += tr.p_test_suites_timed_out;
+ p_duration_microseconds.value += tr.p_duration_microseconds;
+}
+
+//____________________________________________________________________________//
+
+void
+test_results::clear()
+{
+ p_test_suites.value = 0;
+ 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_test_cases_timed_out.value = 0;
+ p_test_suites_timed_out.value = 0;
+ p_duration_microseconds.value= 0;
+ p_aborted.value = false;
+ p_skipped.value = false;
+ p_timed_out.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_timed_out )
+ m_tr.p_test_cases_timed_out.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 );
+ m_tr.p_test_suites.value++;
+
+ if( results_collector.results( ts.p_id ).p_timed_out )
+ m_tr.p_test_suites_timed_out.value++;
+ 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 );
+
+ s_rc_impl().m_results_store[tu.p_id].p_duration_microseconds.value = elapsed_in_microseconds;
+ }
+ 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::test_unit_timed_out(test_unit const& tu)
+{
+ test_results& tr = s_rc_impl().m_results_store[tu.p_id];
+ tr.p_timed_out.value = true;
+}
+
+//____________________________________________________________________________//
+
+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& ex)
+{
+ test_results& tr = s_rc_impl().m_results_store[framework::current_test_case_id()];
+
+ tr.p_assertions_failed.value++;
+ if( ex.code() == execution_exception::timeout_error ) {
+ tr.p_timed_out.value = true;
+ }
+}
+
+//____________________________________________________________________________//
+
+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.69.0/boost/test/impl/results_reporter.ipp b/src/third_party/boost-1.70.0/boost/test/impl/results_reporter.ipp
index 87c1172e127..87c1172e127 100644
--- a/src/third_party/boost-1.69.0/boost/test/impl/results_reporter.ipp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/impl/test_framework_init_observer.ipp
index a44382eed50..a44382eed50 100644
--- a/src/third_party/boost-1.69.0/boost/test/impl/test_framework_init_observer.ipp
+++ b/src/third_party/boost-1.70.0/boost/test/impl/test_framework_init_observer.ipp
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/test_main.ipp b/src/third_party/boost-1.70.0/boost/test/impl/test_main.ipp
index 6adc5bb9c23..6adc5bb9c23 100644
--- a/src/third_party/boost-1.69.0/boost/test/impl/test_main.ipp
+++ b/src/third_party/boost-1.70.0/boost/test/impl/test_main.ipp
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/test_tools.ipp b/src/third_party/boost-1.70.0/boost/test/impl/test_tools.ipp
new file mode 100644
index 00000000000..14934691cb2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/test_tools.ipp
@@ -0,0 +1,833 @@
+// (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 : supplies offline implementation for the Test Tools
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TEST_TOOLS_IPP_012205GER
+#define BOOST_TEST_TEST_TOOLS_IPP_012205GER
+
+// Boost.Test
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test_log.hpp>
+#include <boost/test/tools/context.hpp>
+#include <boost/test/tools/output_test_stream.hpp>
+
+#include <boost/test/tools/detail/fwd.hpp>
+#include <boost/test/tools/detail/print_helper.hpp>
+
+#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/execution_monitor.hpp> // execution_aborted
+
+#include <boost/test/detail/throw_exception.hpp>
+
+#include <boost/test/utils/algorithm.hpp>
+
+// Boost
+#include <boost/config.hpp>
+
+// STL
+#include <fstream>
+#include <string>
+#include <cstring>
+#include <cctype>
+#include <cwchar>
+#include <stdexcept>
+#include <vector>
+#include <utility>
+#include <ios>
+
+// !! should we use #include <cstdarg>
+#include <stdarg.h>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::strcmp; using ::strlen; using ::isprint; }
+#if !defined( BOOST_NO_CWCHAR )
+namespace std { using ::wcscmp; }
+#endif
+# endif
+
+
+namespace boost {
+namespace unit_test {
+ // local static variable, needed here for visibility reasons
+ lazy_ostream lazy_ostream::inst = lazy_ostream();
+}}
+
+namespace boost {
+namespace test_tools {
+namespace tt_detail {
+
+// ************************************************************************** //
+// ************** print_log_value ************** //
+// ************************************************************************** //
+
+void
+print_log_value<bool>::operator()( std::ostream& ostr, bool t )
+{
+ ostr << std::boolalpha << t;
+}
+
+void
+print_log_value<char>::operator()( std::ostream& ostr, char t )
+{
+ if( (std::isprint)( static_cast<unsigned char>(t) ) )
+ ostr << '\'' << t << '\'';
+ else
+ ostr << std::hex
+#if BOOST_TEST_USE_STD_LOCALE
+ << std::showbase
+#else
+ << "0x"
+#endif
+ << static_cast<int>(t);
+}
+
+//____________________________________________________________________________//
+
+void
+print_log_value<unsigned char>::operator()( std::ostream& ostr, unsigned char t )
+{
+ ostr << std::hex
+ // showbase is only available for new style streams:
+#if BOOST_TEST_USE_STD_LOCALE
+ << std::showbase
+#else
+ << "0x"
+#endif
+ << static_cast<int>(t);
+}
+
+//____________________________________________________________________________//
+
+void
+print_log_value<char const*>::operator()( std::ostream& ostr, char const* t )
+{
+ ostr << ( t ? t : "null string" );
+}
+
+//____________________________________________________________________________//
+
+void
+print_log_value<wchar_t const*>::operator()( std::ostream& ostr, wchar_t const* t )
+{
+ ostr << ( t ? t : L"null string" );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** TOOL BOX Implementation ************** //
+// ************************************************************************** //
+
+using ::boost::unit_test::lazy_ostream;
+
+static char const* check_str [] = { " == ", " != ", " < " , " <= ", " > " , " >= " };
+static char const* rever_str [] = { " != ", " == ", " >= ", " > " , " <= ", " < " };
+
+template<typename OutStream>
+void
+format_report( OutStream& os, assertion_result const& pr, unit_test::lazy_ostream const& assertion_descr,
+ tool_level tl, check_type ct,
+ std::size_t num_args, va_list args,
+ char const* prefix, char const* suffix )
+{
+ using namespace unit_test;
+
+ switch( ct ) {
+ case CHECK_PRED:
+ os << prefix << assertion_descr << suffix;
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+
+ case CHECK_BUILT_ASSERTION: {
+ os << prefix << assertion_descr << suffix;
+
+ if( tl != PASS ) {
+ const_string details_message = pr.message();
+
+ if( !details_message.is_empty() ) {
+ os << details_message;
+ }
+ }
+ break;
+ }
+
+ case CHECK_MSG:
+ if( tl == PASS )
+ os << prefix << "'" << assertion_descr << "'" << suffix;
+ else
+ os << assertion_descr;
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+
+ case CHECK_EQUAL:
+ case CHECK_NE:
+ case CHECK_LT:
+ case CHECK_LE:
+ case CHECK_GT:
+ case CHECK_GE: {
+ char const* arg1_descr = va_arg( args, char const* );
+ lazy_ostream const* arg1_val = va_arg( args, lazy_ostream const* );
+ char const* arg2_descr = va_arg( args, char const* );
+ lazy_ostream const* arg2_val = va_arg( args, lazy_ostream const* );
+
+ os << prefix << arg1_descr << check_str[ct-CHECK_EQUAL] << arg2_descr << suffix;
+
+ if( tl != PASS )
+ os << " [" << *arg1_val << rever_str[ct-CHECK_EQUAL] << *arg2_val << "]" ;
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+ }
+
+ case CHECK_CLOSE:
+ case CHECK_CLOSE_FRACTION: {
+ char const* arg1_descr = va_arg( args, char const* );
+ lazy_ostream const* arg1_val = va_arg( args, lazy_ostream const* );
+ char const* arg2_descr = va_arg( args, char const* );
+ lazy_ostream const* arg2_val = va_arg( args, lazy_ostream const* );
+ /* toler_descr = */ va_arg( args, char const* );
+ lazy_ostream const* toler_val = va_arg( args, lazy_ostream const* );
+
+ os << "difference{" << pr.message()
+ << "} between " << arg1_descr << "{" << *arg1_val
+ << "} and " << arg2_descr << "{" << *arg2_val
+ << ( tl == PASS ? "} doesn't exceed " : "} exceeds " )
+ << *toler_val;
+ if( ct == CHECK_CLOSE )
+ os << "%";
+ break;
+ }
+ case CHECK_SMALL: {
+ char const* arg1_descr = va_arg( args, char const* );
+ lazy_ostream const* arg1_val = va_arg( args, lazy_ostream const* );
+ /* toler_descr = */ va_arg( args, char const* );
+ lazy_ostream const* toler_val = va_arg( args, lazy_ostream const* );
+
+ os << "absolute value of " << arg1_descr << "{" << *arg1_val << "}"
+ << ( tl == PASS ? " doesn't exceed " : " exceeds " )
+ << *toler_val;
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+ }
+
+ case CHECK_PRED_WITH_ARGS: {
+ std::vector< std::pair<char const*, lazy_ostream const*> > args_copy;
+ args_copy.reserve( num_args );
+ for( std::size_t i = 0; i < num_args; ++i ) {
+ char const* desc = va_arg( args, char const* );
+ lazy_ostream const* value = va_arg( args, lazy_ostream const* );
+ args_copy.push_back( std::make_pair( desc, value ) );
+ }
+
+ os << prefix << assertion_descr;
+
+ // print predicate call description
+ os << "( ";
+ for( std::size_t i = 0; i < num_args; ++i ) {
+ os << args_copy[i].first;
+
+ if( i != num_args-1 )
+ os << ", ";
+ }
+ os << " )" << suffix;
+
+ if( tl != PASS ) {
+ os << " for ( ";
+ for( std::size_t i = 0; i < num_args; ++i ) {
+ os << *args_copy[i].second;
+
+ if( i != num_args-1 )
+ os << ", ";
+ }
+ os << " )";
+ }
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+ }
+
+ case CHECK_EQUAL_COLL: {
+ char const* left_begin_descr = va_arg( args, char const* );
+ char const* left_end_descr = va_arg( args, char const* );
+ char const* right_begin_descr = va_arg( args, char const* );
+ char const* right_end_descr = va_arg( args, char const* );
+
+ os << prefix << "{ " << left_begin_descr << ", " << left_end_descr << " } == { "
+ << right_begin_descr << ", " << right_end_descr << " }"
+ << suffix;
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+ }
+
+ case CHECK_BITWISE_EQUAL: {
+ char const* left_descr = va_arg( args, char const* );
+ char const* right_descr = va_arg( args, char const* );
+
+ os << prefix << left_descr << " =.= " << right_descr << suffix;
+
+ if( !pr.has_empty_message() )
+ os << ". " << pr.message();
+ break;
+ }
+ }
+}
+
+//____________________________________________________________________________//
+
+bool
+report_assertion( assertion_result const& ar,
+ lazy_ostream const& assertion_descr,
+ const_string file_name,
+ std::size_t line_num,
+ tool_level tl,
+ check_type ct,
+ std::size_t num_args, ... )
+{
+ using namespace unit_test;
+
+ if( !framework::test_in_progress() ) {
+ // in case no test is in progress, we do not throw anything:
+ // raising an exception here may result in raising an exception in a destructor of a global fixture
+ // which will abort the process
+ // We flag this as aborted instead
+
+ //BOOST_TEST_I_ASSRT( framework::current_test_case_id() != INV_TEST_UNIT_ID,
+ // std::runtime_error( "Can't use testing tools outside of test case implementation." ) );
+
+ framework::test_aborted();
+ return false;
+ }
+
+
+ if( !!ar )
+ tl = PASS;
+
+ log_level ll;
+ char const* prefix;
+ char const* suffix;
+
+ switch( tl ) {
+ case PASS:
+ ll = log_successful_tests;
+ prefix = "check ";
+ suffix = " has passed";
+ break;
+ case WARN:
+ ll = log_warnings;
+ prefix = "condition ";
+ suffix = " is not satisfied";
+ break;
+ case CHECK:
+ ll = log_all_errors;
+ prefix = "check ";
+ suffix = " has failed";
+ break;
+ case REQUIRE:
+ ll = log_fatal_errors;
+ prefix = "critical check ";
+ suffix = " has failed";
+ break;
+ default:
+ return true;
+ }
+
+ unit_test_log << unit_test::log::begin( file_name, line_num ) << ll;
+ va_list args;
+ va_start( args, num_args );
+
+ format_report( unit_test_log, ar, assertion_descr, tl, ct, num_args, args, prefix, suffix );
+
+ va_end( args );
+ unit_test_log << unit_test::log::end();
+
+ switch( tl ) {
+ case PASS:
+ framework::assertion_result( AR_PASSED );
+ return true;
+
+ case WARN:
+ framework::assertion_result( AR_TRIGGERED );
+ return false;
+
+ case CHECK:
+ framework::assertion_result( AR_FAILED );
+ return false;
+
+ case REQUIRE:
+ framework::assertion_result( AR_FAILED );
+ framework::test_unit_aborted( framework::current_test_unit() );
+ BOOST_TEST_I_THROW( execution_aborted() );
+ // the previous line either throws or aborts and the return below is not reached
+ // return false;
+ BOOST_UNREACHABLE_RETURN(false);
+ }
+
+ return true;
+}
+
+//____________________________________________________________________________//
+
+assertion_result
+format_assertion_result( const_string expr_val, const_string details )
+{
+ assertion_result res(false);
+
+ bool starts_new_line = first_char( expr_val ) == '\n';
+
+ if( !starts_new_line && !expr_val.is_empty() )
+ res.message().stream() << " [" << expr_val << "]";
+
+ if( !details.is_empty() ) {
+ if( first_char(details) != '[' )
+ res.message().stream() << ". ";
+ else
+ res.message().stream() << " ";
+
+ res.message().stream() << details;
+ }
+
+ if( starts_new_line )
+ res.message().stream() << "." << expr_val;
+
+ return res;
+}
+
+//____________________________________________________________________________//
+
+BOOST_TEST_DECL std::string
+prod_report_format( assertion_result const& ar, unit_test::lazy_ostream const& assertion_descr, check_type ct, std::size_t num_args, ... )
+{
+ std::ostringstream msg_buff;
+
+ va_list args;
+ va_start( args, num_args );
+
+ format_report( msg_buff, ar, assertion_descr, CHECK, ct, num_args, args, "assertion ", " failed" );
+
+ va_end( args );
+
+ return msg_buff.str();
+}
+
+//____________________________________________________________________________//
+
+assertion_result
+equal_impl( char const* left, char const* right )
+{
+ return (left && right) ? std::strcmp( left, right ) == 0 : (left == right);
+}
+
+//____________________________________________________________________________//
+
+#if !defined( BOOST_NO_CWCHAR )
+
+assertion_result
+equal_impl( wchar_t const* left, wchar_t const* right )
+{
+ return (left && right) ? std::wcscmp( left, right ) == 0 : (left == right);
+}
+
+#endif // !defined( BOOST_NO_CWCHAR )
+
+//____________________________________________________________________________//
+
+bool
+is_defined_impl( const_string symbol_name, const_string symbol_value )
+{
+ symbol_value.trim_left( 2 );
+ return symbol_name != symbol_value;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** context_frame ************** //
+// ************************************************************************** //
+
+context_frame::context_frame( ::boost::unit_test::lazy_ostream const& context_descr )
+: m_frame_id( unit_test::framework::add_context( context_descr, true ) )
+{
+}
+
+//____________________________________________________________________________//
+
+context_frame::~context_frame()
+{
+ unit_test::framework::clear_context( m_frame_id );
+}
+
+//____________________________________________________________________________//
+
+context_frame::operator bool()
+{
+ return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace tt_detail
+
+// ************************************************************************** //
+// ************** output_test_stream ************** //
+// ************************************************************************** //
+
+struct output_test_stream::Impl
+{
+ std::fstream m_pattern;
+ bool m_match_or_save;
+ bool m_text_or_binary;
+ std::string m_synced_string;
+
+ char get_char()
+ {
+ char res = 0;
+ do {
+ m_pattern.get( res );
+ } while( m_text_or_binary && res == '\r' && !m_pattern.fail() && !m_pattern.eof() );
+
+ return res;
+ }
+
+ void check_and_fill( assertion_result& res )
+ {
+ if( !res.p_predicate_value )
+ res.message() << "Output content: \"" << m_synced_string << '\"';
+ }
+};
+
+//____________________________________________________________________________//
+
+output_test_stream::output_test_stream( const_string pattern_file_name, bool match_or_save, bool text_or_binary )
+: m_pimpl( new Impl )
+{
+ if( !pattern_file_name.is_empty() ) {
+ std::ios::openmode m = match_or_save ? std::ios::in : std::ios::out;
+ if( !text_or_binary )
+ m |= std::ios::binary;
+
+ m_pimpl->m_pattern.open( pattern_file_name.begin(), m );
+
+ if( !m_pimpl->m_pattern.is_open() )
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Can't open pattern file " << pattern_file_name << " for " << (match_or_save ? "reading" : "writing") );
+ }
+
+ m_pimpl->m_match_or_save = match_or_save;
+ m_pimpl->m_text_or_binary = text_or_binary;
+}
+
+//____________________________________________________________________________//
+
+output_test_stream::~output_test_stream()
+{
+ delete m_pimpl;
+}
+
+//____________________________________________________________________________//
+
+assertion_result
+output_test_stream::is_empty( bool flush_stream )
+{
+ sync();
+
+ assertion_result res( m_pimpl->m_synced_string.empty() );
+
+ m_pimpl->check_and_fill( res );
+
+ if( flush_stream )
+ flush();
+
+ return res;
+}
+
+//____________________________________________________________________________//
+
+assertion_result
+output_test_stream::check_length( std::size_t length_, bool flush_stream )
+{
+ sync();
+
+ assertion_result res( m_pimpl->m_synced_string.length() == length_ );
+
+ m_pimpl->check_and_fill( res );
+
+ if( flush_stream )
+ flush();
+
+ return res;
+}
+
+//____________________________________________________________________________//
+
+assertion_result
+output_test_stream::is_equal( const_string arg, bool flush_stream )
+{
+ sync();
+
+ assertion_result res( const_string( m_pimpl->m_synced_string ) == arg );
+
+ m_pimpl->check_and_fill( res );
+
+ if( flush_stream )
+ flush();
+
+ return res;
+}
+
+//____________________________________________________________________________//
+
+std::string pretty_print_log(std::string str) {
+
+ static const std::string to_replace[] = { "\r", "\n" };
+ static const std::string replacement[] = { "\\r", "\\n" };
+
+ return unit_test::utils::replace_all_occurrences_of(
+ str,
+ to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0]),
+ replacement, replacement + sizeof(replacement)/sizeof(replacement[0]));
+}
+
+assertion_result
+output_test_stream::match_pattern( bool flush_stream )
+{
+ const std::string::size_type n_chars_presuffix = 10;
+ sync();
+
+ assertion_result result( true );
+
+ const std::string stream_string_repr = get_stream_string_representation();
+
+ if( !m_pimpl->m_pattern.is_open() ) {
+ result = false;
+ result.message() << "Pattern file can't be opened!";
+ }
+ else {
+ if( m_pimpl->m_match_or_save ) {
+
+ int offset = 0;
+ std::vector<char> last_elements;
+ for ( std::string::size_type i = 0; static_cast<int>(i + offset) < static_cast<int>(stream_string_repr.length()); ++i ) {
+
+ char c = m_pimpl->get_char();
+
+ if( last_elements.size() <= n_chars_presuffix ) {
+ last_elements.push_back( c );
+ }
+ else {
+ last_elements[ i % last_elements.size() ] = c;
+ }
+
+ bool is_same = !m_pimpl->m_pattern.fail() &&
+ !m_pimpl->m_pattern.eof() &&
+ (stream_string_repr[i+offset] == c);
+
+ if( !is_same ) {
+
+ result = false;
+
+ std::string::size_type prefix_size = (std::min)( i + offset, n_chars_presuffix );
+
+ std::string::size_type suffix_size = (std::min)( stream_string_repr.length() - i - offset,
+ n_chars_presuffix );
+
+ // try to log area around the mismatch
+ std::string substr = stream_string_repr.substr(0, i+offset);
+ std::size_t line = std::count(substr.begin(), substr.end(), '\n');
+ std::size_t column = i + offset - substr.rfind('\n');
+
+ result.message()
+ << "Mismatch at position " << i
+ << " (line " << line
+ << ", column " << column
+ << "): '" << pretty_print_log(std::string(1, stream_string_repr[i+offset])) << "' != '" << pretty_print_log(std::string(1, c)) << "' :\n";
+
+ // we already escape this substring because we need its actual size for the pretty print
+ // of the difference location.
+ std::string sub_str_prefix(pretty_print_log(stream_string_repr.substr( i + offset - prefix_size, prefix_size )));
+
+ // we need this substring as is because we compute the best matching substrings on it.
+ std::string sub_str_suffix(stream_string_repr.substr( i + offset, suffix_size));
+ result.message() << "... " << sub_str_prefix + pretty_print_log(sub_str_suffix) << " ..." << '\n';
+
+ result.message() << "... ";
+ for( std::size_t j = 0; j < last_elements.size() ; j++ )
+ result.message() << pretty_print_log(std::string(1, last_elements[(i + j + 1) % last_elements.size()]));
+
+ std::vector<char> last_elements_ordered;
+ last_elements_ordered.push_back(c);
+ for( std::string::size_type counter = 0; counter < suffix_size - 1 ; counter++ ) {
+ char c2 = m_pimpl->get_char();
+
+ if( m_pimpl->m_pattern.fail() || m_pimpl->m_pattern.eof() )
+ break;
+
+ result.message() << pretty_print_log(std::string(1, c2));
+
+ last_elements_ordered.push_back(c2);
+ }
+
+ // tries to find the best substring matching in the remainder of the
+ // two strings
+ std::size_t max_nb_char_in_common = 0;
+ std::size_t best_pattern_start_index = 0;
+ std::size_t best_stream_start_index = 0;
+ for( std::size_t pattern_start_index = best_pattern_start_index;
+ pattern_start_index < last_elements_ordered.size();
+ pattern_start_index++ ) {
+ for( std::size_t stream_start_index = best_stream_start_index;
+ stream_start_index < sub_str_suffix.size();
+ stream_start_index++ ) {
+
+ std::size_t max_size = (std::min)( last_elements_ordered.size() - pattern_start_index, sub_str_suffix.size() - stream_start_index );
+ if( max_nb_char_in_common > max_size )
+ break; // safely break to go to the outer loop
+
+ std::size_t nb_char_in_common = 0;
+ for( std::size_t k = 0; k < max_size; k++) {
+ if( last_elements_ordered[pattern_start_index + k] == sub_str_suffix[stream_start_index + k] )
+ nb_char_in_common ++;
+ else
+ break; // we take fully matching substring only
+ }
+
+ if( nb_char_in_common > max_nb_char_in_common ) {
+ max_nb_char_in_common = nb_char_in_common;
+ best_pattern_start_index = pattern_start_index;
+ best_stream_start_index = stream_start_index;
+ }
+ }
+ }
+
+ // indicates with more precision the location of the mismatchs in "ascii arts" ...
+ result.message() << " ...\n... ";
+ for( std::string::size_type j = 0; j < sub_str_prefix.size(); j++) {
+ result.message() << ' ';
+ }
+
+ result.message() << '~'; // places the first tilde at the current char that mismatches
+
+ for( std::size_t k = 1; k < (std::max)(best_pattern_start_index, best_stream_start_index); k++ ) { // 1 is for the current char c
+ std::string s1(pretty_print_log(std::string(1, last_elements_ordered[(std::min)(k, best_pattern_start_index)])));
+ std::string s2(pretty_print_log(std::string(1, sub_str_suffix[(std::min)(k, best_stream_start_index)])));
+ for( int h = (std::max)(s1.size(), s2.size()); h > 0; h--)
+ result.message() << "~";
+ }
+
+ if( m_pimpl->m_pattern.eof() ) {
+ result.message() << " (reference string shorter than current stream)";
+ }
+
+ result.message() << "\n";
+
+ // no need to continue if the EOF is reached
+ if( m_pimpl->m_pattern.eof() ) {
+ break;
+ }
+
+ // first char is a replicat of c, so we do not copy it.
+ for(std::string::size_type counter = 0; counter < last_elements_ordered.size() - 1 ; counter++)
+ last_elements[ (i + 1 + counter) % last_elements.size() ] = last_elements_ordered[counter + 1];
+
+ i += last_elements_ordered.size()-1;
+ offset += best_stream_start_index - best_pattern_start_index;
+
+ }
+
+ }
+
+ // not needed anymore
+ /*
+ if(offset > 0 && false) {
+ m_pimpl->m_pattern.ignore(
+ static_cast<std::streamsize>( offset ));
+ }
+ */
+ }
+ else {
+ m_pimpl->m_pattern.write( stream_string_repr.c_str(),
+ static_cast<std::streamsize>( stream_string_repr.length() ) );
+ m_pimpl->m_pattern.flush();
+ }
+ }
+
+ if( flush_stream )
+ flush();
+
+ return result;
+}
+
+//____________________________________________________________________________//
+
+void
+output_test_stream::flush()
+{
+ m_pimpl->m_synced_string.erase();
+
+#ifndef BOOST_NO_STRINGSTREAM
+ str( std::string() );
+#else
+ seekp( 0, std::ios::beg );
+#endif
+}
+
+
+std::string
+output_test_stream::get_stream_string_representation() const {
+ return m_pimpl->m_synced_string;
+}
+
+//____________________________________________________________________________//
+
+std::size_t
+output_test_stream::length()
+{
+ sync();
+
+ return m_pimpl->m_synced_string.length();
+}
+
+//____________________________________________________________________________//
+
+void
+output_test_stream::sync()
+{
+#ifdef BOOST_NO_STRINGSTREAM
+ m_pimpl->m_synced_string.assign( str(), pcount() );
+ freeze( false );
+#else
+ m_pimpl->m_synced_string = str();
+#endif
+}
+
+//____________________________________________________________________________//
+
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TEST_TOOLS_IPP_012205GER
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/test_tree.ipp b/src/third_party/boost-1.70.0/boost/test/impl/test_tree.ipp
new file mode 100644
index 00000000000..d050735ad7f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/test_tree.ipp
@@ -0,0 +1,584 @@
+// (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>
+
+// 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(): registered(false)
+{
+ framework::register_global_fixture( *this );
+ registered = true;
+}
+
+void global_fixture::unregister_from_framework() {
+ // not accessing the framework singleton after deregistering -> release
+ // of the observer from the framework
+ if(registered) {
+ framework::deregister_global_fixture( *this );
+ }
+ registered = false;
+}
+
+global_fixture::~global_fixture()
+{
+ this->unregister_from_framework();
+}
+
+// ************************************************************************** //
+// ************** global_configuration ************** //
+// ************************************************************************** //
+
+global_configuration::global_configuration(): registered(false)
+{
+ framework::register_observer( *this );
+ registered = true;
+}
+
+void global_configuration::unregister_from_framework()
+{
+ // not accessing the framework singleton after deregistering -> release
+ // of the observer from the framework
+ if(registered) {
+ framework::deregister_observer( *this );
+ }
+ registered = false;
+}
+
+global_configuration::~global_configuration()
+{
+ this->unregister_from_framework();
+}
+
+//____________________________________________________________________________//
+
+} // 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.70.0/boost/test/impl/unit_test_log.ipp b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_log.ipp
new file mode 100644
index 00000000000..c5abfcb3048
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_log.ipp
@@ -0,0 +1,710 @@
+// (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 );
+
+ current_logger_data.m_log_formatter->log_build_info(
+ current_logger_data.stream(),
+ runtime_config::get<bool>( runtime_config::btrt_build_info ));
+
+ //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::test_unit_timed_out( 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_timed_out(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.70.0/boost/test/impl/unit_test_main.ipp b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_main.ipp
new file mode 100644
index 00000000000..c553c45121c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_main.ipp
@@ -0,0 +1,313 @@
+// (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 : main function implementation for Unit Test Framework
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+
+// Boost.Test
+#include <boost/test/framework.hpp>
+#include <boost/test/results_collector.hpp>
+#include <boost/test/results_reporter.hpp>
+
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/traverse.hpp>
+
+#include <boost/test/unit_test_parameters.hpp>
+
+#include <boost/test/utils/foreach.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+
+// Boost
+#include <boost/cstdlib.hpp>
+
+// STL
+#include <cstdio>
+#include <stdexcept>
+#include <iostream>
+#include <iomanip>
+#include <iterator>
+#include <set>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+namespace ut_detail {
+
+// ************************************************************************** //
+// ************** hrf_content_reporter ************** //
+// ************************************************************************** //
+
+struct hrf_content_reporter : test_tree_visitor {
+ explicit hrf_content_reporter( std::ostream& os ) : m_os( os ), m_indent( -4 ) {} // skip master test suite
+
+private:
+ void report_test_unit( test_unit const& tu )
+ {
+ m_os << std::setw( m_indent ) << "" << tu.p_name;
+ m_os << (tu.p_default_status == test_unit::RS_ENABLED ? "*" : " ");
+ //m_os << '[' << tu.p_sibling_rank << ']';
+ if( !tu.p_description->empty() )
+ m_os << ": " << tu.p_description;
+
+ m_os << "\n";
+ }
+ virtual void visit( test_case const& tc ) { report_test_unit( tc ); }
+ virtual bool test_suite_start( test_suite const& ts )
+ {
+ if( m_indent >= 0 )
+ report_test_unit( ts );
+ m_indent += 4;
+ return true;
+ }
+ virtual void test_suite_finish( test_suite const& )
+ {
+ m_indent -= 4;
+ }
+
+ // Data members
+ std::ostream& m_os;
+ int m_indent;
+};
+
+// ************************************************************************** //
+// ************** dot_content_reporter ************** //
+// ************************************************************************** //
+
+struct dot_content_reporter : test_tree_visitor {
+ explicit dot_content_reporter( std::ostream& os ) : m_os( os ) {}
+
+private:
+ void report_test_unit( test_unit const& tu )
+ {
+ bool master_ts = tu.p_parent_id == INV_TEST_UNIT_ID;
+
+ m_os << "tu" << tu.p_id;
+
+ m_os << (master_ts ? "[shape=ellipse,peripheries=2" : "[shape=Mrecord" );
+
+ m_os << ",fontname=Helvetica";
+
+ m_os << (tu.p_default_status == test_unit::RS_ENABLED ? ",color=green" : ",color=yellow");
+
+ if( master_ts )
+ m_os << ",label=\"" << tu.p_name << "\"];\n";
+ else {
+ m_os << ",label=\"" << tu.p_name << "|" << tu.p_file_name << "(" << tu.p_line_num << ")";
+ if( tu.p_timeout > 0 )
+ m_os << "|timeout=" << tu.p_timeout;
+ if( tu.p_expected_failures != 0 )
+ m_os << "|expected failures=" << tu.p_expected_failures;
+ if( !tu.p_labels->empty() ) {
+ m_os << "|labels:";
+
+ BOOST_TEST_FOREACH( std::string const&, l, tu.p_labels.get() )
+ m_os << " @" << l;
+ }
+ m_os << "\"];\n";
+ }
+
+ if( !master_ts )
+ m_os << "tu" << tu.p_parent_id << " -> " << "tu" << tu.p_id << ";\n";
+
+ BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() ) {
+ test_unit const& dep = framework::get( dep_id, TUT_ANY );
+
+ m_os << "tu" << tu.p_id << " -> " << "tu" << dep.p_id << "[color=red,style=dotted,constraint=false];\n";
+ }
+
+ }
+ virtual void visit( test_case const& tc )
+ {
+ report_test_unit( tc );
+ }
+ virtual bool test_suite_start( test_suite const& ts )
+ {
+ if( ts.p_parent_id == INV_TEST_UNIT_ID )
+ m_os << "digraph G {rankdir=LR;\n";
+
+ report_test_unit( ts );
+
+ m_os << "{\n";
+
+ return true;
+ }
+ virtual void test_suite_finish( test_suite const& ts )
+ {
+ m_os << "}\n";
+ if( ts.p_parent_id == INV_TEST_UNIT_ID )
+ m_os << "}\n";
+ }
+
+ std::ostream& m_os;
+};
+
+// ************************************************************************** //
+// ************** labels_collector ************** //
+// ************************************************************************** //
+
+struct labels_collector : test_tree_visitor {
+ std::set<std::string> const& labels() const { return m_labels; }
+
+private:
+ virtual bool visit( test_unit const& tu )
+ {
+ m_labels.insert( tu.p_labels->begin(), tu.p_labels->end() );
+ return true;
+ }
+
+ // Data members
+ std::set<std::string> m_labels;
+};
+
+struct framework_shutdown_helper {
+ ~framework_shutdown_helper() {
+ try {
+ framework::shutdown();
+ }
+ catch(...) {
+ std::cerr << "Boost.Test shutdown exception caught" << std::endl;
+ }
+ }
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// ************** unit_test_main ************** //
+// ************************************************************************** //
+
+
+
+int BOOST_TEST_DECL
+unit_test_main( init_unit_test_func init_func, int argc, char* argv[] )
+{
+ int result_code = 0;
+
+ ut_detail::framework_shutdown_helper shutdown_helper;
+
+ BOOST_TEST_I_TRY {
+
+ framework::init( init_func, argc, argv );
+
+ if( runtime_config::get<bool>( runtime_config::btrt_wait_for_debugger ) ) {
+ results_reporter::get_stream() << "Press any key to continue..." << std::endl;
+
+ // getchar is defined as a macro in uClibc. Use parenthesis to fix
+ // gcc bug 58952 for gcc <= 4.8.2.
+ (std::getchar)();
+ results_reporter::get_stream() << "Continuing..." << std::endl;
+ }
+
+ framework::finalize_setup_phase();
+
+ output_format list_cont = runtime_config::get<output_format>( runtime_config::btrt_list_content );
+ if( list_cont != unit_test::OF_INVALID ) {
+ if( list_cont == unit_test::OF_DOT ) {
+ ut_detail::dot_content_reporter reporter( results_reporter::get_stream() );
+
+ traverse_test_tree( framework::master_test_suite().p_id, reporter, true );
+ }
+ else {
+ ut_detail::hrf_content_reporter reporter( results_reporter::get_stream() );
+
+ traverse_test_tree( framework::master_test_suite().p_id, reporter, true );
+ }
+
+ return boost::exit_success;
+ }
+
+ if( runtime_config::get<bool>( runtime_config::btrt_list_labels ) ) {
+ ut_detail::labels_collector collector;
+
+ traverse_test_tree( framework::master_test_suite().p_id, collector, true );
+
+ results_reporter::get_stream() << "Available labels:\n ";
+ std::copy( collector.labels().begin(), collector.labels().end(),
+ std::ostream_iterator<std::string>( results_reporter::get_stream(), "\n " ) );
+ results_reporter::get_stream() << "\n";
+
+ return boost::exit_success;
+ }
+
+ framework::run();
+
+ result_code = !runtime_config::get<bool>( runtime_config::btrt_result_code )
+ ? boost::exit_success
+ : results_collector.results( framework::master_test_suite().p_id ).result_code();
+ }
+ BOOST_TEST_I_CATCH( framework::nothing_to_test, ex ) {
+ result_code = ex.m_result_code;
+ }
+ BOOST_TEST_I_CATCH( framework::internal_error, ex ) {
+ results_reporter::get_stream() << "Boost.Test framework internal error: " << ex.what() << std::endl;
+
+ result_code = boost::exit_exception_failure;
+ }
+ BOOST_TEST_I_CATCH( framework::setup_error, ex ) {
+ results_reporter::get_stream() << "Test setup error: " << ex.what() << std::endl;
+
+ result_code = boost::exit_exception_failure;
+ }
+ BOOST_TEST_I_CATCH( std::logic_error, ex ) {
+ results_reporter::get_stream() << "Test setup error: " << ex.what() << std::endl;
+
+ result_code = boost::exit_exception_failure;
+ }
+ BOOST_TEST_I_CATCHALL() {
+ results_reporter::get_stream() << "Boost.Test framework internal error: unknown reason" << std::endl;
+
+ result_code = boost::exit_exception_failure;
+ }
+
+ return result_code;
+}
+
+} // namespace unit_test
+} // namespace boost
+
+#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
+
+// ************************************************************************** //
+// ************** main function for tests using lib ************** //
+// ************************************************************************** //
+
+int BOOST_TEST_CALL_DECL
+main( int argc, char* argv[] )
+{
+ // prototype for user's unit test init function
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+ extern bool init_unit_test();
+
+ boost::unit_test::init_unit_test_func init_func = &init_unit_test;
+#else
+ extern ::boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] );
+
+ boost::unit_test::init_unit_test_func init_func = &init_unit_test_suite;
+#endif
+
+ return ::boost::unit_test::unit_test_main( init_func, argc, argv );
+}
+
+#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/unit_test_monitor.ipp b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_monitor.ipp
new file mode 100644
index 00000000000..63a04c8f4f1
--- /dev/null
+++ b/src/third_party/boost-1.70.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 long int timeout_microseconds )
+{
+ BOOST_TEST_I_TRY {
+ p_catch_system_errors.value = runtime_config::get<bool>( runtime_config::btrt_catch_sys_errors );
+ p_timeout.value = timeout_microseconds;
+ 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.69.0/boost/test/impl/unit_test_parameters.ipp b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_parameters.ipp
index fec7bb94caf..fec7bb94caf 100644
--- a/src/third_party/boost-1.69.0/boost/test/impl/unit_test_parameters.ipp
+++ b/src/third_party/boost-1.70.0/boost/test/impl/unit_test_parameters.ipp
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/xml_log_formatter.ipp b/src/third_party/boost-1.70.0/boost/test/impl/xml_log_formatter.ipp
new file mode 100644
index 00000000000..e297d71fda9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/xml_log_formatter.ipp
@@ -0,0 +1,225 @@
+// (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 OF_XML Log formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+#define BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <boost/test/output/xml_log_formatter.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/xml_printer.hpp>
+
+// Boost
+#include <boost/version.hpp>
+
+// STL
+#include <iostream>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+static const_string tu_type_name( test_unit const& tu )
+{
+ return tu.p_type == TUT_CASE ? "TestCase" : "TestSuite";
+}
+
+// ************************************************************************** //
+// ************** xml_log_formatter ************** //
+// ************************************************************************** //
+
+void
+xml_log_formatter::log_start( std::ostream& ostr, counter_t )
+{
+ ostr << "<TestLog>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_finish( std::ostream& ostr )
+{
+ ostr << "</TestLog>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_build_info( std::ostream& ostr, bool log_build_info )
+{
+ if( log_build_info ) {
+ ostr << "<BuildInfo"
+ << " platform" << utils::attr_value() << BOOST_PLATFORM
+ << " compiler" << utils::attr_value() << BOOST_COMPILER
+ << " stl" << utils::attr_value() << BOOST_STDLIB
+ << " boost=\"" << BOOST_VERSION/100000 << "."
+ << BOOST_VERSION/100 % 1000 << "."
+ << BOOST_VERSION % 100 << '\"'
+ << "/>";
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::test_unit_start( std::ostream& ostr, test_unit const& tu )
+{
+ ostr << "<" << tu_type_name( tu ) << " name" << utils::attr_value() << tu.p_name.get();
+
+ if( !tu.p_file_name.empty() )
+ ostr << BOOST_TEST_L( " file" ) << utils::attr_value() << tu.p_file_name
+ << BOOST_TEST_L( " line" ) << utils::attr_value() << tu.p_line_num;
+
+ ostr << ">";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::test_unit_finish( std::ostream& ostr, test_unit const& tu, unsigned long elapsed )
+{
+ if( tu.p_type == TUT_CASE )
+ ostr << "<TestingTime>" << elapsed << "</TestingTime>";
+
+ ostr << "</" << tu_type_name( tu ) << ">";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::test_unit_skipped( std::ostream& ostr, test_unit const& tu, const_string reason )
+{
+ ostr << "<" << tu_type_name( tu )
+ << " name" << utils::attr_value() << tu.p_name
+ << " skipped" << utils::attr_value() << "yes"
+ << " reason" << utils::attr_value() << reason
+ << "/>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_exception_start( std::ostream& ostr, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
+{
+ execution_exception::location const& loc = ex.where();
+
+ ostr << "<Exception file" << utils::attr_value() << loc.m_file_name
+ << " line" << utils::attr_value() << loc.m_line_num;
+
+ if( !loc.m_function.is_empty() )
+ ostr << " function" << utils::attr_value() << loc.m_function;
+
+ ostr << ">" << utils::cdata() << ex.what();
+
+ if( !checkpoint_data.m_file_name.is_empty() ) {
+ ostr << "<LastCheckpoint file" << utils::attr_value() << checkpoint_data.m_file_name
+ << " line" << utils::attr_value() << checkpoint_data.m_line_num
+ << ">"
+ << utils::cdata() << checkpoint_data.m_message
+ << "</LastCheckpoint>";
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_exception_finish( std::ostream& ostr )
+{
+ ostr << "</Exception>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_start( std::ostream& ostr, log_entry_data const& entry_data, log_entry_types let )
+{
+ static literal_string xml_tags[] = { "Info", "Message", "Warning", "Error", "FatalError" };
+
+ m_curr_tag = xml_tags[let];
+ ostr << '<' << m_curr_tag
+ << BOOST_TEST_L( " file" ) << utils::attr_value() << entry_data.m_file_name
+ << BOOST_TEST_L( " line" ) << utils::attr_value() << entry_data.m_line_num
+ << BOOST_TEST_L( "><![CDATA[" );
+
+ m_value_closed = false;
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_value( std::ostream& ostr, const_string value )
+{
+ utils::print_escaped_cdata( ostr, value );
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_finish( std::ostream& ostr )
+{
+ if( !m_value_closed ) {
+ ostr << BOOST_TEST_L( "]]>" );
+ m_value_closed = true;
+ }
+
+ ostr << BOOST_TEST_L( "</" ) << m_curr_tag << BOOST_TEST_L( ">" );
+
+ m_curr_tag.clear();
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::entry_context_start( std::ostream& ostr, log_level )
+{
+ if( !m_value_closed ) {
+ ostr << BOOST_TEST_L( "]]>" );
+ m_value_closed = true;
+ }
+
+ ostr << BOOST_TEST_L( "<Context>" );
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::entry_context_finish( std::ostream& ostr, log_level )
+{
+ ostr << BOOST_TEST_L( "</Context>" );
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_context( std::ostream& ostr, log_level, const_string context_descr )
+{
+ ostr << BOOST_TEST_L( "<Frame>" ) << utils::cdata() << context_descr << BOOST_TEST_L( "</Frame>" );
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.70.0/boost/test/impl/xml_report_formatter.ipp b/src/third_party/boost-1.70.0/boost/test/impl/xml_report_formatter.ipp
new file mode 100644
index 00000000000..2718895b80d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/impl/xml_report_formatter.ipp
@@ -0,0 +1,117 @@
+// (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 : OF_XML report formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+#define BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <boost/test/results_collector.hpp>
+#include <boost/test/output/xml_report_formatter.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/utils/xml_printer.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+void
+xml_report_formatter::results_report_start( std::ostream& ostr )
+{
+ ostr << "<TestResult>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::results_report_finish( std::ostream& ostr )
+{
+ ostr << "</TestResult>";
+}
+
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )
+{
+ test_results const& tr = results_collector.results( tu.p_id );
+
+ const_string descr;
+
+ if( tr.passed() )
+ descr = "passed";
+ else if( tr.p_skipped )
+ descr = "skipped";
+ else if( tr.p_timed_out )
+ descr = "timed-out";
+ else if( tr.p_aborted )
+ descr = "aborted";
+ else
+ descr = "failed";
+
+ ostr << '<' << ( tu.p_type == TUT_CASE ? "TestCase" : "TestSuite" )
+ << " name" << utils::attr_value() << tu.p_name.get()
+ << " result" << utils::attr_value() << descr
+ << " assertions_passed" << utils::attr_value() << tr.p_assertions_passed
+ << " assertions_failed" << utils::attr_value() << tr.p_assertions_failed
+ << " warnings_failed" << utils::attr_value() << tr.p_warnings_failed
+ << " expected_failures" << utils::attr_value() << tr.p_expected_failures
+ ;
+
+ if( tu.p_type == TUT_SUITE ) {
+ ostr << " test_cases_passed" << utils::attr_value() << tr.p_test_cases_passed
+ << " test_cases_passed_with_warnings" << utils::attr_value() << tr.p_test_cases_warned
+ << " test_cases_failed" << utils::attr_value() << tr.p_test_cases_failed
+ << " test_cases_skipped" << utils::attr_value() << tr.p_test_cases_skipped
+ << " test_cases_aborted" << utils::attr_value() << tr.p_test_cases_aborted
+ << " test_cases_timed_out" << utils::attr_value() << tr.p_test_cases_timed_out
+ << " test_suites_timed_out"<< utils::attr_value() << tr.p_test_suites_timed_out
+ ;
+ }
+
+ ostr << '>';
+}
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::test_unit_report_finish( test_unit const& tu, std::ostream& ostr )
+{
+ ostr << "</" << ( tu.p_type == TUT_CASE ? "TestCase" : "TestSuite" ) << '>';
+}
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::do_confirmation_report( test_unit const& tu, std::ostream& ostr )
+{
+ test_unit_report_start( tu, ostr );
+ test_unit_report_finish( tu, ostr );
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/included/prg_exec_monitor.hpp b/src/third_party/boost-1.70.0/boost/test/included/prg_exec_monitor.hpp
index ff48ce5594e..ff48ce5594e 100644
--- a/src/third_party/boost-1.69.0/boost/test/included/prg_exec_monitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/included/prg_exec_monitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/included/test_exec_monitor.hpp b/src/third_party/boost-1.70.0/boost/test/included/test_exec_monitor.hpp
index e75b4698f29..e75b4698f29 100644
--- a/src/third_party/boost-1.69.0/boost/test/included/test_exec_monitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/included/test_exec_monitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/included/unit_test.hpp b/src/third_party/boost-1.70.0/boost/test/included/unit_test.hpp
index 90882eb178e..90882eb178e 100644
--- a/src/third_party/boost-1.69.0/boost/test/included/unit_test.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/included/unit_test.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/output/compiler_log_formatter.hpp b/src/third_party/boost-1.70.0/boost/test/output/compiler_log_formatter.hpp
new file mode 100644
index 00000000000..5ab0fa43c60
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/output/compiler_log_formatter.hpp
@@ -0,0 +1,70 @@
+// (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 the formatter for the Human Readable Format (HRF)
+// ***************************************************************************
+
+#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
+#define BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+// ************************************************************************** //
+// ************** compiler_log_formatter ************** //
+// ************************************************************************** //
+
+//!@brief Log formatter for the Human Readable Format (HRF) log format
+class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter {
+public:
+ compiler_log_formatter() : m_color_output( false ) {}
+
+ // Formatter interface
+ void log_start( std::ostream&, counter_t test_cases_amount );
+ void log_finish( std::ostream& );
+ void log_build_info( std::ostream&, bool );
+
+ void test_unit_start( std::ostream&, test_unit const& tu );
+ void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
+ void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
+
+ void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
+ void log_exception_finish( std::ostream& );
+
+ void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
+ void log_entry_value( std::ostream&, const_string value );
+ void log_entry_value( std::ostream&, lazy_ostream const& value );
+ void log_entry_finish( std::ostream& );
+
+ void entry_context_start( std::ostream&, log_level );
+ void log_entry_context( std::ostream&, log_level l, const_string );
+ void entry_context_finish( std::ostream&, log_level l );
+
+protected:
+ virtual void print_prefix( std::ostream&, const_string file, std::size_t line );
+
+ // Data members
+ bool m_color_output;
+};
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
diff --git a/src/third_party/boost-1.70.0/boost/test/output/junit_log_formatter.hpp b/src/third_party/boost-1.70.0/boost/test/output/junit_log_formatter.hpp
new file mode 100644
index 00000000000..8ab3b099f29
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/output/junit_log_formatter.hpp
@@ -0,0 +1,168 @@
+// (C) Copyright 2016 Raffi Enficiaud.
+// Distributed under the Boost Software License, Version 1.0.
+// (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 the definition of the Junit log formatter (OF_JUNIT)
+// ***************************************************************************
+
+#ifndef BOOST_TEST_JUNIT_LOG_FORMATTER__
+#define BOOST_TEST_JUNIT_LOG_FORMATTER__
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
+#include <boost/test/tree/test_unit.hpp>
+
+//#include <boost/test/results_collector.hpp>
+
+// STL
+#include <cstddef> // std::size_t
+#include <map>
+#include <list>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+
+ namespace junit_impl {
+
+ // helper for the JUnit logger
+ struct junit_log_helper
+ {
+ struct assertion_entry {
+
+ enum log_entry_t {
+ log_entry_info,
+ log_entry_error,
+ log_entry_failure
+ };
+
+ assertion_entry() : sealed(false)
+ {}
+
+ std::string logentry_message; // the message associated to the JUnit error/entry
+ std::string logentry_type; // the one that will get expanded in the final junit (failure, error)
+ std::string output; // additional information/message generated by the assertion
+
+ log_entry_t log_entry; // the type associated to the assertion (or error)
+
+ bool sealed; // indicates if the entry can accept additional information
+ };
+
+ std::list<std::string> system_out; // sysout: additional information
+ std::list<std::string> system_err; // syserr: additional information
+ std::string skipping_reason;
+
+ // list of failure, errors and messages (assertions message and the full log)
+ std::vector< assertion_entry > assertion_entries;
+
+ bool skipping;
+
+ junit_log_helper(): skipping(false)
+ {}
+
+ void clear() {
+ assertion_entries.clear();
+ system_out.clear();
+ system_err.clear();
+ skipping_reason.clear();
+ skipping = false;
+ }
+
+ };
+ }
+
+// ************************************************************************** //
+// ************** junit_log_formatter ************** //
+// ************************************************************************** //
+
+/// JUnit logger class
+class junit_log_formatter : public unit_test_log_formatter {
+public:
+
+ junit_log_formatter() : m_display_build_info(false)
+ {
+ // we log everything from the logger singleton point of view
+ // because we need to know about all the messages/commands going to the logger
+ // we decide what we put inside the logs internally
+ this->m_log_level = log_successful_tests;
+ m_log_level_internal = log_messages;
+ }
+
+ // Formatter interface
+ void log_start( std::ostream&, counter_t test_cases_amount );
+ void log_finish( std::ostream& );
+ void log_build_info( std::ostream&, bool );
+
+ void test_unit_start( std::ostream&, test_unit const& tu );
+ void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
+ void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
+ void test_unit_aborted( std::ostream& os, test_unit const& tu );
+ void test_unit_timed_out( std::ostream& os, test_unit const& tu);
+
+ void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
+ void log_exception_finish( std::ostream& );
+
+ void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
+
+ using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set
+ void log_entry_value( std::ostream&, const_string value );
+ void log_entry_finish( std::ostream& );
+
+ void entry_context_start( std::ostream&, log_level );
+ void log_entry_context( std::ostream&, log_level, const_string );
+ void entry_context_finish( std::ostream&, log_level );
+
+ //! Discards changes in the log level
+ virtual void set_log_level(log_level ll)
+ {
+ if(ll > log_successful_tests && ll < log_messages)
+ ll = log_successful_tests;
+ else if (ll > log_all_errors)
+ ll = log_all_errors;
+
+ this->m_log_level_internal = ll;
+ }
+
+ //! Instead of a regular stream, returns a file name corresponding to
+ //! the current master test suite. If the file already exists, adds an index
+ //! to it.
+ virtual std::string get_default_stream_description() const;
+
+
+private:
+ typedef std::map<test_unit_id, junit_impl::junit_log_helper> map_trace_t;
+ map_trace_t map_tests;
+ junit_impl::junit_log_helper runner_log_entry;
+
+ junit_impl::junit_log_helper& get_current_log_entry() {
+ if(list_path_to_root.empty())
+ return runner_log_entry;
+ map_trace_t::iterator it = map_tests.find(list_path_to_root.back());
+ return (it == map_tests.end() ? runner_log_entry : it->second);
+ }
+
+ std::list<test_unit_id> list_path_to_root;
+ bool m_display_build_info;
+ bool m_is_last_assertion_or_error; // true if failure, false if error
+
+ log_level m_log_level_internal;
+ friend class junit_result_helper;
+};
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_JUNIT_LOG_FORMATTER__
diff --git a/src/third_party/boost-1.69.0/boost/test/output/plain_report_formatter.hpp b/src/third_party/boost-1.70.0/boost/test/output/plain_report_formatter.hpp
index 8c509645977..8c509645977 100644
--- a/src/third_party/boost-1.69.0/boost/test/output/plain_report_formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/output/plain_report_formatter.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/output/xml_log_formatter.hpp b/src/third_party/boost-1.70.0/boost/test/output/xml_log_formatter.hpp
new file mode 100644
index 00000000000..c348febc29d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/output/xml_log_formatter.hpp
@@ -0,0 +1,72 @@
+// (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 OF_XML Log formatter definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_LOG_FORMATTER_020105GER
+#define BOOST_TEST_XML_LOG_FORMATTER_020105GER
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
+
+// STL
+#include <cstddef> // std::size_t
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+// ************************************************************************** //
+// ************** xml_log_formatter ************** //
+// ************************************************************************** //
+
+class xml_log_formatter : public unit_test_log_formatter {
+public:
+ // Formatter interface
+ void log_start( std::ostream&, counter_t test_cases_amount );
+ void log_finish( std::ostream& );
+ void log_build_info( std::ostream&, bool );
+
+ void test_unit_start( std::ostream&, test_unit const& tu );
+ void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
+ void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
+
+ void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
+ void log_exception_finish( std::ostream& );
+
+ void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
+ using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set
+ void log_entry_value( std::ostream&, const_string value );
+ void log_entry_finish( std::ostream& );
+
+ void entry_context_start( std::ostream&, log_level );
+ void log_entry_context( std::ostream&, log_level, const_string );
+ void entry_context_finish( std::ostream&, log_level );
+
+private:
+ // Data members
+ const_string m_curr_tag;
+ bool m_value_closed;
+};
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_LOG_FORMATTER_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/output/xml_report_formatter.hpp b/src/third_party/boost-1.70.0/boost/test/output/xml_report_formatter.hpp
index ca5e47182f1..ca5e47182f1 100644
--- a/src/third_party/boost-1.69.0/boost/test/output/xml_report_formatter.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/output/xml_report_formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/prg_exec_monitor.hpp b/src/third_party/boost-1.70.0/boost/test/prg_exec_monitor.hpp
index f072e215dbe..f072e215dbe 100644
--- a/src/third_party/boost-1.69.0/boost/test/prg_exec_monitor.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/progress_monitor.hpp
index 49c0b014971..49c0b014971 100644
--- a/src/third_party/boost-1.69.0/boost/test/progress_monitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/progress_monitor.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/results_collector.hpp b/src/third_party/boost-1.70.0/boost/test/results_collector.hpp
new file mode 100644
index 00000000000..1c26a74a2a4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/results_collector.hpp
@@ -0,0 +1,153 @@
+// (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_test_suites; //!< Number of test suites
+ 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_test_cases_timed_out; //!< Number of timed out test cases
+ counter_prop p_test_suites_timed_out; //!< Number of timed out test suites
+ 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
+ bool_prop p_timed_out; //!< Indicates that the test unit has timed out
+
+ /// 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 test_unit_timed_out( 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.69.0/boost/test/results_reporter.hpp b/src/third_party/boost-1.70.0/boost/test/results_reporter.hpp
index 6f8d8f1105f..6f8d8f1105f 100644
--- a/src/third_party/boost-1.69.0/boost/test/results_reporter.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/results_reporter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/test_exec_monitor.hpp b/src/third_party/boost-1.70.0/boost/test/test_exec_monitor.hpp
index 04508093352..04508093352 100644
--- a/src/third_party/boost-1.69.0/boost/test/test_exec_monitor.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/test_framework_init_observer.hpp
index 8bf0bb99479..8bf0bb99479 100644
--- a/src/third_party/boost-1.69.0/boost/test/test_framework_init_observer.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/test_framework_init_observer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/test_tools.hpp b/src/third_party/boost-1.70.0/boost/test/test_tools.hpp
index a542d5fcdee..a542d5fcdee 100644
--- a/src/third_party/boost-1.69.0/boost/test/test_tools.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/tools/assertion.hpp
index 2a7d96ebb1c..2a7d96ebb1c 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/assertion.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/assertion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/assertion_result.hpp b/src/third_party/boost-1.70.0/boost/test/tools/assertion_result.hpp
index 85eea741f74..85eea741f74 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/assertion_result.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/tools/collection_comparison_op.hpp
index ff3b3761319..ff3b3761319 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/collection_comparison_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/collection_comparison_op.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tools/context.hpp b/src/third_party/boost-1.70.0/boost/test/tools/context.hpp
new file mode 100644
index 00000000000..e5d6625e125
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tools/context.hpp
@@ -0,0 +1,96 @@
+// (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 : test tools context interfaces
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_CONTEXT_HPP_111712GER
+#define BOOST_TEST_TOOLS_CONTEXT_HPP_111712GER
+
+// Boost.Test
+#include <boost/test/utils/lazy_ostream.hpp>
+#include <boost/test/detail/pp_variadic.hpp>
+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#include <boost/preprocessor/variadic/to_seq.hpp>
+#include <boost/preprocessor/variadic/size.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace test_tools {
+namespace tt_detail {
+
+// ************************************************************************** //
+// ************** context_frame ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL context_frame {
+ explicit context_frame( ::boost::unit_test::lazy_ostream const& context_descr );
+ ~context_frame();
+
+ operator bool();
+
+private:
+ // Data members
+ int m_frame_id;
+};
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_INFO( context_descr ) \
+ ::boost::unit_test::framework::add_context( BOOST_TEST_LAZY_MSG( context_descr ) , false ) \
+/**/
+
+#define BOOST_TEST_INFO_SCOPE( context_descr ) \
+ ::boost::test_tools::tt_detail::context_frame BOOST_JOIN( context_frame_, __LINE__ ) = \
+ ::boost::test_tools::tt_detail::context_frame(BOOST_TEST_LAZY_MSG( context_descr ) ) \
+/**/
+
+//____________________________________________________________________________//
+
+
+#define BOOST_CONTEXT_PARAM(r, ctx, i, context_descr) \
+ if( ::boost::test_tools::tt_detail::context_frame BOOST_PP_CAT(ctx, i) = \
+ ::boost::test_tools::tt_detail::context_frame(BOOST_TEST_LAZY_MSG( context_descr ) ) ) \
+/**/
+
+#define BOOST_CONTEXT_PARAMS( params ) \
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONTEXT_PARAM, \
+ BOOST_JOIN( context_frame_, __LINE__ ), \
+ params) \
+/**/
+
+#define BOOST_TEST_CONTEXT( ... ) \
+ BOOST_CONTEXT_PARAMS( BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__) ) \
+/**/
+
+
+//____________________________________________________________________________//
+
+} // namespace tt_detail
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_CONTEXT_HPP_111712GER
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/cstring_comparison_op.hpp b/src/third_party/boost-1.70.0/boost/test/tools/cstring_comparison_op.hpp
index 50f181d8581..50f181d8581 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/cstring_comparison_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/cstring_comparison_op.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/bitwise_manip.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/bitwise_manip.hpp
index f8c9685c107..f8c9685c107 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/bitwise_manip.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/bitwise_manip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/expression_holder.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/expression_holder.hpp
index 694a2d5f4ec..694a2d5f4ec 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/expression_holder.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/expression_holder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/fwd.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/fwd.hpp
index 339ab39eda8..339ab39eda8 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/indirections.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/indirections.hpp
index 836218d98d8..836218d98d8 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/indirections.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/indirections.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/it_pair.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/it_pair.hpp
index 4352fd464ff..4352fd464ff 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/it_pair.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/it_pair.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/lexicographic_manip.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/lexicographic_manip.hpp
index f6ffff7a34c..f6ffff7a34c 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/lexicographic_manip.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/lexicographic_manip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/per_element_manip.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/per_element_manip.hpp
index 4a9aebbaaac..4a9aebbaaac 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/per_element_manip.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/per_element_manip.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tools/detail/print_helper.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/print_helper.hpp
new file mode 100644
index 00000000000..2400e6e6ac5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tools/detail/print_helper.hpp
@@ -0,0 +1,247 @@
+// (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>
+
+// 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.69.0/boost/test/tools/detail/tolerance_manip.hpp b/src/third_party/boost-1.70.0/boost/test/tools/detail/tolerance_manip.hpp
index e07b0435913..e07b0435913 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/detail/tolerance_manip.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/tools/floating_point_comparison.hpp
index 810840e3459..810840e3459 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/floating_point_comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/floating_point_comparison.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tools/fpc_op.hpp b/src/third_party/boost-1.70.0/boost/test/tools/fpc_op.hpp
new file mode 100644
index 00000000000..18162e358a8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tools/fpc_op.hpp
@@ -0,0 +1,219 @@
+// (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/type_traits/is_arithmetic.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<FPT>( rhs, (op::EQ<Lhs,Rhs>*)0 );
+ }
+ else if( rhs == 0) {
+ return compare_fpv_near_zero<FPT>( 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<FPT>( rhs, (op::NE<Lhs,Rhs>*)0 );
+ }
+ else if( rhs == 0 ) {
+ return compare_fpv_near_zero<FPT>( 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) || \
+ (fpc::tolerance_based<Lhs>::value && \
+ boost::is_arithmetic<Rhs>::value) || \
+ (boost::is_arithmetic<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.69.0/boost/test/tools/fpc_tolerance.hpp b/src/third_party/boost-1.70.0/boost/test/tools/fpc_tolerance.hpp
index c862a17e75a..c862a17e75a 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/fpc_tolerance.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/fpc_tolerance.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/interface.hpp b/src/third_party/boost-1.70.0/boost/test/tools/interface.hpp
index 5e84f1c6d4e..5e84f1c6d4e 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/interface.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tools/interface.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tools/old/impl.hpp b/src/third_party/boost-1.70.0/boost/test/tools/old/impl.hpp
new file mode 100644
index 00000000000..0b8f888cbec
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tools/old/impl.hpp
@@ -0,0 +1,358 @@
+// (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 : implementation details for old toolbox
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_OLD_IMPL_HPP_012705GER
+#define BOOST_TEST_TOOLS_OLD_IMPL_HPP_012705GER
+
+// Boost.Test
+#include <boost/test/unit_test_log.hpp>
+#include <boost/test/tools/assertion_result.hpp>
+#include <boost/test/tools/floating_point_comparison.hpp>
+
+#include <boost/test/tools/detail/fwd.hpp>
+#include <boost/test/tools/detail/print_helper.hpp>
+
+// Boost
+#include <boost/limits.hpp>
+#include <boost/numeric/conversion/conversion_traits.hpp> // for numeric::conversion_traits
+#include <boost/type_traits/is_array.hpp>
+
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/arithmetic/add.hpp>
+
+// STL
+#include <cstddef> // for std::size_t
+#include <climits> // for CHAR_BIT
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace test_tools {
+namespace tt_detail {
+
+// ************************************************************************** //
+// ************** old TOOLBOX Implementation ************** //
+// ************************************************************************** //
+
+// This function adds level of indirection, but it makes sure we evaluate predicate
+// arguments only once
+
+#ifndef BOOST_TEST_PROD
+#define TEMPL_PARAMS( z, m, dummy ) , typename BOOST_JOIN( Arg, m )
+
+#define FUNC_PARAMS( z, m, dummy ) \
+ , BOOST_JOIN( Arg, m ) const& BOOST_JOIN( arg, m ) \
+ , char const* BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
+/**/
+
+#define PRED_PARAMS( z, m, dummy ) BOOST_PP_COMMA_IF( m ) BOOST_JOIN( arg, m )
+
+#define ARG_INFO( z, m, dummy ) \
+ , BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
+ , &static_cast<const unit_test::lazy_ostream&>(unit_test::lazy_ostream::instance() \
+ << ::boost::test_tools::tt_detail::print_helper( BOOST_JOIN( arg, m ) )) \
+/**/
+
+#define IMPL_FRWD( z, n, dummy ) \
+template<typename Pred \
+ BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), TEMPL_PARAMS, _ )> \
+inline bool \
+check_frwd( Pred P, unit_test::lazy_ostream const& assertion_descr, \
+ const_string file_name, std::size_t line_num, \
+ tool_level tl, check_type ct \
+ BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), FUNC_PARAMS, _ ) \
+) \
+{ \
+ return \
+ report_assertion( P( BOOST_PP_REPEAT_ ## z(BOOST_PP_ADD(n, 1), PRED_PARAMS,_) ),\
+ assertion_descr, file_name, line_num, tl, ct, \
+ BOOST_PP_ADD( n, 1 ) \
+ BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), ARG_INFO, _ ) \
+ ); \
+} \
+/**/
+
+#ifndef BOOST_TEST_MAX_PREDICATE_ARITY
+#define BOOST_TEST_MAX_PREDICATE_ARITY 5
+#endif
+
+BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
+
+#undef TEMPL_PARAMS
+#undef FUNC_PARAMS
+#undef PRED_INFO
+#undef ARG_INFO
+#undef IMPL_FRWD
+
+#endif
+
+//____________________________________________________________________________//
+
+template <class Left, class Right>
+inline assertion_result equal_impl( Left const& left, Right const& right )
+{
+ return left == right;
+}
+
+//____________________________________________________________________________//
+
+inline assertion_result equal_impl( char* left, char const* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
+inline assertion_result equal_impl( char const* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
+inline assertion_result equal_impl( char* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
+
+#if !defined( BOOST_NO_CWCHAR )
+BOOST_TEST_DECL assertion_result equal_impl( wchar_t const* left, wchar_t const* right );
+inline assertion_result equal_impl( wchar_t* left, wchar_t const* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
+inline assertion_result equal_impl( wchar_t const* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
+inline assertion_result equal_impl( wchar_t* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
+#endif
+
+//____________________________________________________________________________//
+
+struct equal_impl_frwd {
+ template <typename Left, typename Right>
+ inline assertion_result
+ call_impl( Left const& left, Right const& right, mpl::false_ ) const
+ {
+ return equal_impl( left, right );
+ }
+
+ template <typename Left, typename Right>
+ inline assertion_result
+ call_impl( Left const& left, Right const& right, mpl::true_ ) const
+ {
+ return (*this)( right, &left[0] );
+ }
+
+ template <typename Left, typename Right>
+ inline assertion_result
+ operator()( Left const& left, Right const& right ) const
+ {
+ typedef typename is_array<Left>::type left_is_array;
+ return call_impl( left, right, left_is_array() );
+ }
+};
+
+//____________________________________________________________________________//
+
+struct ne_impl {
+ template <class Left, class Right>
+ assertion_result operator()( Left const& left, Right const& right )
+ {
+ return !equal_impl_frwd()( left, right );
+ }
+};
+
+//____________________________________________________________________________//
+
+struct lt_impl {
+ template <class Left, class Right>
+ assertion_result operator()( Left const& left, Right const& right )
+ {
+ return left < right;
+ }
+};
+
+//____________________________________________________________________________//
+
+struct le_impl {
+ template <class Left, class Right>
+ assertion_result operator()( Left const& left, Right const& right )
+ {
+ return left <= right;
+ }
+};
+
+//____________________________________________________________________________//
+
+struct gt_impl {
+ template <class Left, class Right>
+ assertion_result operator()( Left const& left, Right const& right )
+ {
+ return left > right;
+ }
+};
+
+//____________________________________________________________________________//
+
+struct ge_impl {
+ template <class Left, class Right>
+ assertion_result operator()( Left const& left, Right const& right )
+ {
+ return left >= right;
+ }
+};
+
+//____________________________________________________________________________//
+
+struct equal_coll_impl {
+ template <typename Left, typename Right>
+ assertion_result operator()( Left left_begin, Left left_end, Right right_begin, Right right_end )
+ {
+ assertion_result pr( true );
+ std::size_t pos = 0;
+
+ for( ; left_begin != left_end && right_begin != right_end; ++left_begin, ++right_begin, ++pos ) {
+ if( *left_begin != *right_begin ) {
+ pr = false;
+ pr.message() << "\nMismatch at position " << pos << ": "
+ << ::boost::test_tools::tt_detail::print_helper(*left_begin)
+ << " != "
+ << ::boost::test_tools::tt_detail::print_helper(*right_begin);
+ }
+ }
+
+ if( left_begin != left_end ) {
+ std::size_t r_size = pos;
+ while( left_begin != left_end ) {
+ ++pos;
+ ++left_begin;
+ }
+
+ pr = false;
+ pr.message() << "\nCollections size mismatch: " << pos << " != " << r_size;
+ }
+
+ if( right_begin != right_end ) {
+ std::size_t l_size = pos;
+ while( right_begin != right_end ) {
+ ++pos;
+ ++right_begin;
+ }
+
+ pr = false;
+ pr.message() << "\nCollections size mismatch: " << l_size << " != " << pos;
+ }
+
+ return pr;
+ }
+};
+
+//____________________________________________________________________________//
+
+struct bitwise_equal_impl {
+ template <class Left, class Right>
+ assertion_result operator()( Left const& left, Right const& right )
+ {
+ assertion_result pr( true );
+
+ std::size_t left_bit_size = sizeof(Left)*CHAR_BIT;
+ std::size_t right_bit_size = sizeof(Right)*CHAR_BIT;
+
+ static Left const leftOne( 1 );
+ static Right const rightOne( 1 );
+
+ std::size_t total_bits = left_bit_size < right_bit_size ? left_bit_size : right_bit_size;
+
+ for( std::size_t counter = 0; counter < total_bits; ++counter ) {
+ if( ( left & ( leftOne << counter ) ) != ( right & ( rightOne << counter ) ) ) {
+ pr = false;
+ pr.message() << "\nMismatch at position " << counter;
+ }
+ }
+
+ if( left_bit_size != right_bit_size ) {
+ pr = false;
+ pr.message() << "\nOperands bit sizes mismatch: " << left_bit_size << " != " << right_bit_size;
+ }
+
+ return pr;
+ }
+};
+
+//____________________________________________________________________________//
+
+template<typename FPT1, typename FPT2>
+struct comp_supertype {
+ // deduce "better" type from types of arguments being compared
+ // if one type is floating and the second integral we use floating type and
+ // value of integral type is promoted to the floating. The same for float and double
+ // But we don't want to compare two values of integral types using this tool.
+ typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype type;
+ BOOST_STATIC_ASSERT_MSG( !is_integral<type>::value, "Only floating-point types can be compared!");
+};
+
+} // namespace tt_detail
+
+namespace fpc = math::fpc;
+
+// ************************************************************************** //
+// ************** check_is_close ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL check_is_close_t {
+ // Public typedefs
+ typedef assertion_result result_type;
+
+ template<typename FPT1, typename FPT2, typename ToleranceType>
+ assertion_result
+ operator()( FPT1 left, FPT2 right, ToleranceType tolerance ) const
+ {
+ fpc::close_at_tolerance<typename tt_detail::comp_supertype<FPT1,FPT2>::type> pred( tolerance, fpc::FPC_STRONG );
+
+ assertion_result ar( pred( left, right ) );
+
+ if( !ar )
+ ar.message() << pred.tested_rel_diff();
+
+ return ar;
+ }
+};
+
+//____________________________________________________________________________//
+
+template<typename FPT1, typename FPT2, typename ToleranceType>
+inline assertion_result
+check_is_close( FPT1 left, FPT2 right, ToleranceType tolerance )
+{
+ return check_is_close_t()( left, right, tolerance );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** check_is_small ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL check_is_small_t {
+ // Public typedefs
+ typedef bool result_type;
+
+ template<typename FPT>
+ bool
+ operator()( FPT fpv, FPT tolerance ) const
+ {
+ return fpc::is_small( fpv, tolerance );
+ }
+};
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+inline bool
+check_is_small( FPT fpv, FPT tolerance )
+{
+ return fpc::is_small( fpv, tolerance );
+}
+
+//____________________________________________________________________________//
+
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_OLD_IMPL_HPP_012705GER
diff --git a/src/third_party/boost-1.70.0/boost/test/tools/old/interface.hpp b/src/third_party/boost-1.70.0/boost/test/tools/old/interface.hpp
new file mode 100644
index 00000000000..1b23c291a3b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tools/old/interface.hpp
@@ -0,0 +1,284 @@
+// (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: 81247 $
+//
+// Description : contains definition for all test tools in old test toolbox
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_OLD_INTERFACE_HPP_111712GER
+#define BOOST_TEST_TOOLS_OLD_INTERFACE_HPP_111712GER
+
+// Boost
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/to_tuple.hpp>
+
+#include <boost/core/ignore_unused.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** TOOL BOX ************** //
+// ************************************************************************** //
+
+// In macros below following argument abbreviations are used:
+// P - predicate
+// M - message
+// S - statement
+// E - exception
+// L - left argument
+// R - right argument
+// TL - tool level
+// CT - check type
+// ARGS - arguments list (as PP sequence)
+
+// frwd_type:
+// 0 - args exists and need to be forwarded; call check_frwd
+// 1 - args exists, but do not need to be forwarded; call report_assertion directly
+// 2 - no arguments; call report_assertion directly
+
+#define BOOST_TEST_TOOL_PASS_PRED0( P, ARGS ) P
+#define BOOST_TEST_TOOL_PASS_PRED1( P, ARGS ) P BOOST_PP_SEQ_TO_TUPLE(ARGS)
+#define BOOST_TEST_TOOL_PASS_PRED2( P, ARGS ) P
+
+#define BOOST_TEST_TOOL_PASS_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg )
+#define BOOST_TEST_TOOL_PASS_ARG_DSCR( r, _, arg ) , BOOST_STRINGIZE( arg )
+
+#define BOOST_TEST_TOOL_PASS_ARGS0( ARGS ) \
+ BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG, _, ARGS )
+#define BOOST_TEST_TOOL_PASS_ARGS1( ARGS ) \
+ , BOOST_PP_SEQ_SIZE(ARGS) BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG_DSCR, _, ARGS )
+#define BOOST_TEST_TOOL_PASS_ARGS2( ARGS ) \
+ , 0
+
+#define BOOST_TEST_TOOL_IMPL( frwd_type, P, assertion_descr, TL, CT, ARGS ) \
+do { \
+ BOOST_TEST_PASSPOINT(); \
+ ::boost::test_tools::tt_detail:: \
+ BOOST_PP_IF( frwd_type, report_assertion, check_frwd ) ( \
+ BOOST_JOIN( BOOST_TEST_TOOL_PASS_PRED, frwd_type )( P, ARGS ), \
+ BOOST_TEST_LAZY_MSG( assertion_descr ), \
+ BOOST_TEST_L(__FILE__), \
+ static_cast<std::size_t>(__LINE__), \
+ ::boost::test_tools::tt_detail::TL, \
+ ::boost::test_tools::tt_detail::CT \
+ BOOST_JOIN( BOOST_TEST_TOOL_PASS_ARGS, frwd_type )( ARGS ) ); \
+} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN( P ) BOOST_TEST_TOOL_IMPL( 2, \
+ (P), BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED, _ )
+#define BOOST_CHECK( P ) BOOST_TEST_TOOL_IMPL( 2, \
+ (P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED, _ )
+#define BOOST_REQUIRE( P ) BOOST_TEST_TOOL_IMPL( 2, \
+ (P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED, _ )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, WARN, CHECK_MSG, _ )
+#define BOOST_CHECK_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, CHECK, CHECK_MSG, _ )
+#define BOOST_REQUIRE_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, REQUIRE, CHECK_MSG, _ )
+
+//____________________________________________________________________________//
+
+#define BOOST_ERROR( M ) BOOST_CHECK_MESSAGE( false, M )
+#define BOOST_FAIL( M ) BOOST_REQUIRE_MESSAGE( false, M )
+
+//____________________________________________________________________________//
+
+#define BOOST_CHECK_THROW_IMPL( S, E, P, postfix, TL ) \
+do { \
+ try { \
+ BOOST_TEST_PASSPOINT(); \
+ S; \
+ BOOST_TEST_TOOL_IMPL( 2, false, "exception " BOOST_STRINGIZE(E) " expected but not raised", \
+ TL, CHECK_MSG, _ ); \
+ } catch( E const& ex ) { \
+ boost::ignore_unused( ex ); \
+ BOOST_TEST_TOOL_IMPL( 2, P, \
+ "exception \"" BOOST_STRINGIZE( E )"\" raised as expected" postfix, \
+ TL, CHECK_MSG, _ ); \
+ } \
+} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_THROW( S, E ) BOOST_CHECK_THROW_IMPL( S, E, true, "", WARN )
+#define BOOST_CHECK_THROW( S, E ) BOOST_CHECK_THROW_IMPL( S, E, true, "", CHECK )
+#define BOOST_REQUIRE_THROW( S, E ) BOOST_CHECK_THROW_IMPL( S, E, true, "", REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_EXCEPTION( S, E, P ) BOOST_CHECK_THROW_IMPL( S, E, P( ex ), \
+ ": validation on the raised exception through predicate \"" BOOST_STRINGIZE(P) "\"", WARN )
+#define BOOST_CHECK_EXCEPTION( S, E, P ) BOOST_CHECK_THROW_IMPL( S, E, P( ex ), \
+ ": validation on the raised exception through predicate \"" BOOST_STRINGIZE(P) "\"", CHECK )
+#define BOOST_REQUIRE_EXCEPTION( S, E, P ) BOOST_CHECK_THROW_IMPL( S, E, P( ex ), \
+ ": validation on the raised exception through predicate \"" BOOST_STRINGIZE(P) "\"", REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_CHECK_NO_THROW_IMPL( S, TL ) \
+do { \
+ try { \
+ S; \
+ BOOST_TEST_TOOL_IMPL( 2, true, "no exceptions thrown by " BOOST_STRINGIZE( S ), \
+ TL, CHECK_MSG, _ ); \
+ } catch( ... ) { \
+ BOOST_TEST_TOOL_IMPL( 2, false, "unexpected exception thrown by " BOOST_STRINGIZE( S ), \
+ TL, CHECK_MSG, _ ); \
+ } \
+} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
+/**/
+
+#define BOOST_WARN_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, WARN )
+#define BOOST_CHECK_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, CHECK )
+#define BOOST_REQUIRE_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::equal_impl_frwd(), "", WARN, CHECK_EQUAL, (L)(R) )
+#define BOOST_CHECK_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK, CHECK_EQUAL, (L)(R) )
+#define BOOST_REQUIRE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::equal_impl_frwd(), "", REQUIRE, CHECK_EQUAL, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_NE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::ne_impl(), "", WARN, CHECK_NE, (L)(R) )
+#define BOOST_CHECK_NE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::ne_impl(), "", CHECK, CHECK_NE, (L)(R) )
+#define BOOST_REQUIRE_NE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::ne_impl(), "", REQUIRE, CHECK_NE, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_LT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::lt_impl(), "", WARN, CHECK_LT, (L)(R) )
+#define BOOST_CHECK_LT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::lt_impl(), "", CHECK, CHECK_LT, (L)(R) )
+#define BOOST_REQUIRE_LT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::lt_impl(), "", REQUIRE, CHECK_LT, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_LE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::le_impl(), "", WARN, CHECK_LE, (L)(R) )
+#define BOOST_CHECK_LE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::le_impl(), "", CHECK, CHECK_LE, (L)(R) )
+#define BOOST_REQUIRE_LE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::le_impl(), "", REQUIRE, CHECK_LE, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_GT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::gt_impl(), "", WARN, CHECK_GT, (L)(R) )
+#define BOOST_CHECK_GT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::gt_impl(), "", CHECK, CHECK_GT, (L)(R) )
+#define BOOST_REQUIRE_GT( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::gt_impl(), "", REQUIRE, CHECK_GT, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_GE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::ge_impl(), "", WARN, CHECK_GE, (L)(R) )
+#define BOOST_CHECK_GE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::ge_impl(), "", CHECK, CHECK_GE, (L)(R) )
+#define BOOST_REQUIRE_GE( L, R ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::tt_detail::ge_impl(), "", REQUIRE, CHECK_GE, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_CLOSE( L, R, T ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), "", WARN, CHECK_CLOSE, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
+#define BOOST_CHECK_CLOSE( L, R, T ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), "", CHECK, CHECK_CLOSE, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
+#define BOOST_REQUIRE_CLOSE( L, R, T ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), "", REQUIRE, CHECK_CLOSE, (L)(R)(::boost::math::fpc::percent_tolerance(T)) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_CLOSE_FRACTION(L, R, T) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), "", WARN, CHECK_CLOSE_FRACTION, (L)(R)(T) )
+#define BOOST_CHECK_CLOSE_FRACTION(L, R, T) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), "", CHECK, CHECK_CLOSE_FRACTION, (L)(R)(T) )
+#define BOOST_REQUIRE_CLOSE_FRACTION(L,R,T) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_close_t(), "", REQUIRE, CHECK_CLOSE_FRACTION, (L)(R)(T) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_SMALL( FPV, T ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_small_t(), "", WARN, CHECK_SMALL, (FPV)(T) )
+#define BOOST_CHECK_SMALL( FPV, T ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_small_t(), "", CHECK, CHECK_SMALL, (FPV)(T) )
+#define BOOST_REQUIRE_SMALL( FPV, T ) BOOST_TEST_TOOL_IMPL( 0, \
+ ::boost::test_tools::check_is_small_t(), "", REQUIRE, CHECK_SMALL, (FPV)(T) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_PREDICATE( P, ARGS ) BOOST_TEST_TOOL_IMPL( 0, \
+ P, BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED_WITH_ARGS, ARGS )
+#define BOOST_CHECK_PREDICATE( P, ARGS ) BOOST_TEST_TOOL_IMPL( 0, \
+ P, BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED_WITH_ARGS, ARGS )
+#define BOOST_REQUIRE_PREDICATE( P, ARGS ) BOOST_TEST_TOOL_IMPL( 0, \
+ P, BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED_WITH_ARGS, ARGS )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end ) \
+ BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::equal_coll_impl(), \
+ "", WARN, CHECK_EQUAL_COLL, (L_begin)(L_end)(R_begin)(R_end) ) \
+/**/
+#define BOOST_CHECK_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end ) \
+ BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::equal_coll_impl(), \
+ "", CHECK, CHECK_EQUAL_COLL, (L_begin)(L_end)(R_begin)(R_end) ) \
+/**/
+#define BOOST_REQUIRE_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end ) \
+ BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::equal_coll_impl(), \
+ "", REQUIRE, CHECK_EQUAL_COLL, (L_begin)(L_end)(R_begin)(R_end) ) \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_BITWISE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 1, \
+ ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", WARN, CHECK_BITWISE_EQUAL, (L)(R) )
+#define BOOST_CHECK_BITWISE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 1, \
+ ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", CHECK, CHECK_BITWISE_EQUAL, (L)(R) )
+#define BOOST_REQUIRE_BITWISE_EQUAL( L, R ) BOOST_TEST_TOOL_IMPL( 1, \
+ ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", REQUIRE, CHECK_BITWISE_EQUAL, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_IS_DEFINED( symb ) ::boost::test_tools::tt_detail::is_defined_impl( #symb, BOOST_STRINGIZE(= symb) )
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_TEST_NO_NEW_TOOLS
+
+#define BOOST_TEST_WARN( P ) BOOST_WARN( P )
+#define BOOST_TEST_CHECK( P ) BOOST_CHECK( P )
+#define BOOST_TEST_REQUIRE( P ) BOOST_REQUIRE( P )
+
+#define BOOST_TEST( P ) BOOST_CHECK( P )
+
+#endif
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_OLD_INTERFACE_HPP_111712GER
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/output_test_stream.hpp b/src/third_party/boost-1.70.0/boost/test/tools/output_test_stream.hpp
index 2abbf7b5219..2abbf7b5219 100644
--- a/src/third_party/boost-1.69.0/boost/test/tools/output_test_stream.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/tree/auto_registration.hpp
index e9510be2928..e9510be2928 100644
--- a/src/third_party/boost-1.69.0/boost/test/tree/auto_registration.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tree/auto_registration.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tree/decorator.hpp b/src/third_party/boost-1.70.0/boost/test/tree/decorator.hpp
new file mode 100644
index 00000000000..c9be22f6d02
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tree/decorator.hpp
@@ -0,0 +1,309 @@
+// (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();
+
+ void stack();
+
+ std::vector<base_ptr> get_lazy_decorators() const;
+
+ // singleton pattern without ctor
+ BOOST_TEST_SINGLETON_CONS_NO_CTOR( collector_t )
+
+private:
+ // Class invariant: minimal size is 1.
+ collector_t() : m_tu_decorators_stack(1) {}
+
+ // Data members
+ std::vector< std::vector<base_ptr> > m_tu_decorators_stack;
+};
+
+
+// ************************************************************************** //
+// ************** decorator::base ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL base {
+public:
+ // composition interface
+ virtual 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::stack_decorator ************** //
+// ************************************************************************** //
+
+//!@ A decorator that creates a new stack in the collector
+//!
+//! This decorator may be used in places where the currently accumulated decorators
+//! in the collector should be applied to lower levels of the hierarchy rather
+//! than the current one. This is for instance for dataset test cases, where the
+//! macro does not let the user specify decorators for the underlying generated tests
+//! (but rather on the main generator function), applying the stack_decorator at the
+//! parent level lets us consume the decorator at the underlying test cases level.
+class BOOST_TEST_DECL stack_decorator : public decorator::base {
+public:
+ explicit stack_decorator() {}
+
+ virtual collector_t& operator*() const;
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new stack_decorator()); }
+};
+
+// ************************************************************************** //
+// ************** 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.69.0/boost/test/tree/fixture.hpp b/src/third_party/boost-1.70.0/boost/test/tree/fixture.hpp
index 8e07b2aa1d0..8e07b2aa1d0 100644
--- a/src/third_party/boost-1.69.0/boost/test/tree/fixture.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tree/fixture.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tree/global_fixture.hpp b/src/third_party/boost-1.70.0/boost/test/tree/global_fixture.hpp
new file mode 100644
index 00000000000..f64ddeae2db
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tree/global_fixture.hpp
@@ -0,0 +1,139 @@
+// (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 global_fixture
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
+#define BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+
+#include <boost/test/tree/observer.hpp>
+#include <boost/test/tree/fixture.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** global_configuration ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL global_configuration : public test_observer {
+
+public:
+ // Constructor
+ global_configuration();
+
+ /// Unregisters the global fixture from the framework
+ ///
+ /// This is called by the framework at shutdown time
+ void unregister_from_framework();
+
+ // Dtor
+ virtual ~global_configuration();
+
+ // Happens after the framework global observer init has been done
+ virtual int priority() { return 1; }
+
+private:
+ bool registered;
+};
+
+
+
+// ************************************************************************** //
+// ************** global_fixture ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL global_fixture : public test_unit_fixture {
+
+public:
+ // Constructor
+ global_fixture();
+
+ /// Unregisters the global fixture from the framework
+ ///
+ /// This is called by the framework at shutdown time
+ void unregister_from_framework();
+
+ // Dtor
+ virtual ~global_fixture();
+
+private:
+ bool registered;
+};
+
+//____________________________________________________________________________//
+
+namespace ut_detail {
+
+template<typename F>
+struct global_configuration_impl : public global_configuration {
+ // Constructor
+ global_configuration_impl() : m_configuration_observer( 0 ) {
+ }
+
+ // test observer interface
+ virtual void test_start( counter_t ) {
+ m_configuration_observer = new F;
+ }
+
+ // test observer interface
+ virtual void test_finish() {
+ if(m_configuration_observer) {
+ delete m_configuration_observer;
+ m_configuration_observer = 0;
+ }
+ }
+private:
+ // Data members
+ F* m_configuration_observer;
+};
+
+template<typename F>
+struct global_fixture_impl : public global_fixture {
+ // Constructor
+ global_fixture_impl() : m_fixture( 0 ) {
+ }
+
+ // test fixture interface
+ virtual void setup() {
+ m_fixture = new F;
+ setup_conditional(*m_fixture);
+ }
+
+ // test fixture interface
+ virtual void teardown() {
+ if(m_fixture) {
+ teardown_conditional(*m_fixture);
+ }
+ delete m_fixture;
+ m_fixture = 0;
+ }
+
+private:
+ // Data members
+ F* m_fixture;
+};
+
+} // namespace ut_detail
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
+
diff --git a/src/third_party/boost-1.70.0/boost/test/tree/observer.hpp b/src/third_party/boost-1.70.0/boost/test/tree/observer.hpp
new file mode 100644
index 00000000000..46b26905e3f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tree/observer.hpp
@@ -0,0 +1,114 @@
+// (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 abstract interface for test observer
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TEST_OBSERVER_HPP_021005GER
+#define BOOST_TEST_TEST_OBSERVER_HPP_021005GER
+
+// Boost.Test
+#include <boost/test/detail/fwd_decl.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/config.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** test_observer ************** //
+// ************************************************************************** //
+
+/// @brief Generic test observer interface
+///
+/// This interface is used by observers in order to receive notifications from the
+/// Boost.Test framework on the current execution state.
+///
+/// Several observers can be running at the same time, and it is not unusual to
+/// have interactions among them. The @ref test_observer::priority member function allows the specification
+/// of a particular order among them (lowest priority executed first, except specified otherwise).
+///
+class BOOST_TEST_DECL test_observer {
+public:
+
+ //! Called before the framework starts executing the test cases
+ //!
+ //! @param[in] number_of_test_cases indicates the number of test cases. Only active
+ //! test cases are taken into account.
+ virtual void test_start( counter_t /* number_of_test_cases */ ) {}
+
+ //! Called after the framework ends executing the test cases
+ //!
+ //! @note The call is made with a reversed priority order.
+ virtual void test_finish() {}
+
+ //! Called when a critical error is detected
+ //!
+ //! The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework.
+ //! Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining
+ //! tests are discarded.
+ //!
+ //! @note may be called before test_observer::test_unit_finish()
+ virtual void test_aborted() {}
+
+ //! Called before the framework starts executing a test unit
+ //!
+ //! @param[in] test_unit the test being executed
+ virtual void test_unit_start( test_unit const& /* test */) {}
+
+ //! Called at each end of a test unit.
+ //!
+ //! @param elapsed duration of the test unit in microseconds.
+ virtual void test_unit_finish( test_unit const& /* test */, unsigned long /* elapsed */ ) {}
+ virtual void test_unit_skipped( test_unit const& tu, const_string ) { test_unit_skipped( tu ); }
+ virtual void test_unit_skipped( test_unit const& ) {} ///< backward compatibility
+
+ //! Called when the test timed out
+ //!
+ //! This function is called to signal that a test unit (case or suite) timed out.
+ //! A valid test unit is available through boost::unit_test::framework::current_test_unit
+ virtual void test_unit_timed_out( test_unit const& ) {}
+
+ //! Called when a test unit indicates a fatal error.
+ //!
+ //! A fatal error happens when
+ //! - a strong assertion (with @c REQUIRE) fails, which indicates that the test case cannot continue
+ //! - an unexpected exception is caught by the Boost.Test framework
+ virtual void test_unit_aborted( test_unit const& ) {}
+
+ virtual void assertion_result( unit_test::assertion_result /* ar */ )
+ {
+ }
+
+ //! Called when an exception is intercepted
+ //!
+ //! In case an exception is intercepted, this call happens before the call
+ //! to @ref test_unit_aborted in order to log
+ //! additional data about the exception.
+ virtual void exception_caught( execution_exception const& ) {}
+
+ //! The priority indicates the order at which this observer is initialized
+ //! and tore down in the UTF framework. The order is lowest to highest priority.
+ virtual int priority() { return 0; }
+
+protected:
+
+ BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
+};
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER
+
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/test_case_counter.hpp b/src/third_party/boost-1.70.0/boost/test/tree/test_case_counter.hpp
index a74f37f152e..a74f37f152e 100644
--- a/src/third_party/boost-1.69.0/boost/test/tree/test_case_counter.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tree/test_case_counter.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/tree/test_case_template.hpp b/src/third_party/boost-1.70.0/boost/test/tree/test_case_template.hpp
new file mode 100644
index 00000000000..6aa0bb7e3b3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/tree/test_case_template.hpp
@@ -0,0 +1,201 @@
+// (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/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/type_traits/is_volatile.hpp>
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/remove_reference.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_AUTO_DECLARATIONS)
+ #include <type_traits>
+ #include <boost/mpl/is_sequence.hpp>
+#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
+ typedef typename boost::remove_reference<TestType>::type TestTypewoRef;
+ if( boost::is_const<TestTypewoRef>::value )
+ full_name += "_const";
+ if( boost::is_volatile<TestTypewoRef>::value )
+ full_name += "_volatile";
+ if( boost::is_rvalue_reference<TestType>::value )
+ full_name += "_refref";
+ else if( boost::is_lvalue_reference<TestType>::value )
+ full_name += "_ref";
+
+ 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, typename enabler = void>
+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_AUTO_DECLARATIONS) && \
+ !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+template<typename TestCaseTemplate,
+ template <class ...> class C,
+ typename... parameter_pack>
+class template_test_case_gen<
+ TestCaseTemplate,
+ C<parameter_pack...>,
+ typename std::enable_if<!boost::mpl::is_sequence<C<parameter_pack...>>::value>::type >
+ : public template_test_case_gen_base {
+
+ template<typename F>
+ void for_each(F &f)
+ {
+ auto l = { (f(mpl::identity<parameter_pack>()), 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 this_type = template_test_case_gen<
+ TestCaseTemplate,
+ C<parameter_pack...>,
+ typename std::enable_if<!boost::mpl::is_sequence<C<parameter_pack...>>::value>::type>;
+ 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(op);
+ }
+};
+
+#endif /* C++11 variadic, 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.70.0/boost/test/tree/test_unit.hpp b/src/third_party/boost-1.70.0/boost/test/tree/test_unit.hpp
new file mode 100644
index 00000000000..45956f689df
--- /dev/null
+++ b/src/third_party/boost-1.70.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/framework.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;
+}
+
+// ************************************************************************** //
+// ************** 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 BOOST_TEST_DECL 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.69.0/boost/test/tree/traverse.hpp b/src/third_party/boost-1.70.0/boost/test/tree/traverse.hpp
index d27917cacea..d27917cacea 100644
--- a/src/third_party/boost-1.69.0/boost/test/tree/traverse.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tree/traverse.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/visitor.hpp b/src/third_party/boost-1.70.0/boost/test/tree/visitor.hpp
index 8f1bae5c92b..8f1bae5c92b 100644
--- a/src/third_party/boost-1.69.0/boost/test/tree/visitor.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/tree/visitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/unit_test.hpp b/src/third_party/boost-1.70.0/boost/test/unit_test.hpp
index e6a236a1b5b..e6a236a1b5b 100644
--- a/src/third_party/boost-1.69.0/boost/test/unit_test.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/unit_test.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/unit_test_log.hpp b/src/third_party/boost-1.70.0/boost/test/unit_test_log.hpp
new file mode 100644
index 00000000000..5de9f433402
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/unit_test_log.hpp
@@ -0,0 +1,281 @@
+// (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 test_unit_timed_out( 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.70.0/boost/test/unit_test_log_formatter.hpp b/src/third_party/boost-1.70.0/boost/test/unit_test_log_formatter.hpp
new file mode 100644
index 00000000000..e4648b4dabe
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/unit_test_log_formatter.hpp
@@ -0,0 +1,327 @@
+// (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 log formatter interface
+///
+/// You can define a class with implements this interface and use an instance of it
+/// as a Unit Test Framework log formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/log_level.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+
+// STL
+#include <iosfwd>
+#include <string> // for std::string
+#include <iostream>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+/// Collection of log entry attributes
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL log_entry_data {
+ log_entry_data()
+ {
+ m_file_name.reserve( 200 );
+ }
+
+ std::string m_file_name; ///< log entry file name
+ std::size_t m_line_num; ///< log entry line number
+ log_level m_level; ///< log entry level
+
+ void clear()
+ {
+ m_file_name.erase();
+ m_line_num = 0;
+ m_level = log_nothing;
+ }
+};
+
+// ************************************************************************** //
+/// Collection of log checkpoint attributes
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL log_checkpoint_data
+{
+ const_string m_file_name; ///< log checkpoint file name
+ std::size_t m_line_num; ///< log checkpoint file name
+ std::string m_message; ///< log checkpoint message
+
+ void clear()
+ {
+ m_file_name.clear();
+ m_line_num = 0;
+ m_message = std::string();
+ }
+};
+
+// ************************************************************************** //
+/// @brief Abstract Unit Test Framework log formatter interface
+///
+/// During the test module execution Unit Test Framework can report messages about success
+/// or failure of assertions, which test suites are being run and more (specifically which
+/// messages are reported depends on log level threshold selected by the user).
+///
+/// All these messages constitute Unit Test Framework log. There are many ways (formats) to present
+/// these messages to the user.
+///
+/// Boost.Test comes with three formats:
+/// - Compiler-like log format: intended for human consumption/diagnostic
+/// - XML based log format: intended for processing by automated regression test systems.
+/// - JUNIT based log format: intended for processing by automated regression test systems.
+///
+/// If you want to produce some other format you need to implement class with specific interface and use
+/// method @c unit_test_log_t::set_formatter during a test module initialization to set an active formatter.
+/// The class unit_test_log_formatter defines this interface.
+///
+/// This interface requires you to format all possible messages being produced in the log.
+/// These includes error messages about failed assertions, messages about caught exceptions and
+/// information messages about test units being started/ended. All the methods in this interface takes
+/// a reference to standard stream as a first argument. This is where final messages needs to be directed
+/// to. Also you are given all the information necessary to produce a message.
+///
+/// @par Since Boost 1.62:
+/// - Each formatter may indicate the default output stream. This is convenient for instance for streams intended
+/// for automated processing that indicate a file. See @c get_default_stream_description for more details.
+/// - Each formatter may manage its own log level through the getter/setter @c get_log_level and @c set_log_level .
+///
+/// @see
+/// - boost::unit_test::test_observer for an indication of the calls of the test observer interface
+class BOOST_TEST_DECL unit_test_log_formatter {
+public:
+ /// Types of log entries (messages written into a log)
+ enum log_entry_types { BOOST_UTL_ET_INFO, ///< Information message from the framework
+ BOOST_UTL_ET_MESSAGE, ///< Information message from the user
+ BOOST_UTL_ET_WARNING, ///< Warning (non error) condition notification message
+ BOOST_UTL_ET_ERROR, ///< Non fatal error notification message
+ BOOST_UTL_ET_FATAL_ERROR ///< Fatal error notification message
+ };
+
+ //! Constructor
+ unit_test_log_formatter()
+ : m_log_level(log_all_errors)
+ {}
+
+ // Destructor
+ virtual ~unit_test_log_formatter() {}
+
+ // @name Test start/finish
+
+ /// Invoked at the beginning of test module execution
+ ///
+ /// @param[in] os output stream to write a messages to
+ /// @param[in] test_cases_amount total test case amount to be run
+ /// @see log_finish
+ virtual void log_start( std::ostream& os, counter_t test_cases_amount ) = 0;
+
+ /// Invoked at the end of test module execution
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @see log_start
+ virtual void log_finish( std::ostream& os ) = 0;
+
+ /// Invoked when Unit Test Framework build information is requested
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] log_build_info indicates if build info should be logged or not
+ virtual void log_build_info( std::ostream& os, bool log_build_info = true ) = 0;
+ // @}
+
+ // @name Test unit start/finish
+
+ /// Invoked when test unit starts (either test suite or test case)
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] tu test unit being started
+ /// @see test_unit_finish
+ virtual void test_unit_start( std::ostream& os, test_unit const& tu ) = 0;
+
+ /// Invoked when test unit finishes
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] tu test unit being finished
+ /// @param[in] elapsed time in microseconds spend executing this test unit
+ /// @see test_unit_start
+ virtual void test_unit_finish( std::ostream& os, test_unit const& tu, unsigned long elapsed ) = 0;
+
+ /// Invoked if test unit skipped for any reason
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] tu skipped test unit
+ /// @param[in] reason explanation why was it skipped
+ virtual void test_unit_skipped( std::ostream& os, test_unit const& tu, const_string /* reason */)
+ {
+ test_unit_skipped( os, tu );
+ }
+
+ /// Deprecated version of this interface
+ virtual void test_unit_skipped( std::ostream& /* os */, test_unit const& /* tu */) {}
+
+ /// Invoked when a test unit is aborted
+ virtual void test_unit_aborted( std::ostream& /* os */, test_unit const& /* tu */) {}
+
+ /// Invoked when a test unit times-out
+ virtual void test_unit_timed_out( std::ostream& /* os */, test_unit const& /* tu */) {}
+
+
+ // @}
+
+ // @name Uncaught exception report
+
+ /// Invoked when Unit Test Framework detects uncaught exception
+ ///
+ /// The framwork calls this function when an uncaught exception it detected.
+ /// This call is followed by context information:
+ /// - one call to @c entry_context_start,
+ /// - as many calls to @c log_entry_context as there are context entries
+ /// - one call to @c entry_context_finish
+ ///
+ /// The logging of the exception information is finilized by a call to @c log_exception_finish.
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] lcd information about the last checkpoint before the exception was triggered
+ /// @param[in] ex information about the caught exception
+ /// @see log_exception_finish
+ virtual void log_exception_start( std::ostream& os, log_checkpoint_data const& lcd, execution_exception const& ex ) = 0;
+
+ /// Invoked when Unit Test Framework detects uncaught exception
+ ///
+ /// Call to this function finishes uncaught exception report.
+ /// @param[in] os output stream to write a messages into
+ /// @see log_exception_start
+ virtual void log_exception_finish( std::ostream& os ) = 0;
+ // @}
+
+ // @name Regular log entry
+
+ /// Invoked by Unit Test Framework to start new log entry
+
+ /// Call to this function starts new log entry. It is followed by series of log_entry_value calls and finally call to log_entry_finish.
+ /// A log entry may consist of one or more values being reported. Some of these values will be plain strings, while others can be complicated
+ /// expressions in a form of "lazy" expression template lazy_ostream.
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] led log entry attributes
+ /// @param[in] let log entry type log_entry_finish
+ /// @see log_entry_value, log_entry_finish
+ ///
+ /// @note call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the
+ /// framework might log errors raised during global initialization/shutdown.
+ virtual void log_entry_start( std::ostream& os, log_entry_data const& led, log_entry_types let ) = 0;
+
+ /// Invoked by Unit Test Framework to report a log entry content
+ ///
+ /// This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
+ /// @param[in] os output stream to write a messages into.
+ /// @param[in] value log entry string value
+ /// @see log_entry_start, log_entry_finish
+ virtual void log_entry_value( std::ostream& os, const_string value ) = 0;
+
+ /// Invoked by Unit Test Framework to report a log entry content
+
+ /// This is one of two overloaded methods to report log entry content. This one is used to report some complicated expression passed as
+ /// an expression template lazy_ostream. In most cases default implementation provided by the framework should work as is (it just converts
+ /// the lazy expression into a string.
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] value log entry "lazy" value
+ /// @see log_entry_start, log_entry_finish
+ virtual void log_entry_value( std::ostream& os, lazy_ostream const& value ); // there is a default impl
+
+ /// Invoked by Unit Test Framework to finish a log entry report
+
+ /// @param[in] os output stream to write a messages into
+ /// @see log_entry_start, log_entry_start
+ virtual void log_entry_finish( std::ostream& os ) = 0;
+ // @}
+
+ // @name Log entry context report
+
+ /// Invoked by Unit Test Framework to start log entry context report
+ //
+ /// Unit Test Framework logs for failed assertions and uncaught exceptions context if one was defined by a test module.
+ /// Context consists of multiple "scopes" identified by description messages assigned by the test module using
+ /// BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] l entry log_level, to be used to fine tune the message
+ /// @see log_entry_context, entry_context_finish
+ virtual void entry_context_start( std::ostream& os, log_level l ) = 0;
+
+ /// Invoked by Unit Test Framework to report log entry context "scope" description
+ //
+ /// Each "scope" description is reported by separate call to log_entry_context.
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] l entry log_level, to be used to fine tune the message
+ /// @param[in] value context "scope" description
+ /// @see log_entry_start, entry_context_finish
+ virtual void log_entry_context( std::ostream& os, log_level l, const_string value ) = 0;
+
+ /// Invoked by Unit Test Framework to finish log entry context report
+ ///
+ /// @param[in] os output stream to write a messages into
+ /// @param[in] l entry log_level, to be used to fine tune the message
+ /// @see log_entry_start, entry_context_context
+ virtual void entry_context_finish( std::ostream& os, log_level l ) = 0;
+ // @}
+
+ // @name Log level management
+
+ /// Sets the log level of the logger/formatter
+ ///
+ /// Some loggers need to manage the log level by their own. This
+ /// member function let the implementation decide of that.
+ /// @par Since Boost 1.62
+ virtual void set_log_level(log_level new_log_level);
+
+ /// Returns the log level of the logger/formatter
+ /// @par Since Boost 1.62
+ virtual log_level get_log_level() const;
+ // @}
+
+
+ // @name Stream management
+
+ /// Returns a default stream for this logger.
+ ///
+ /// The returned string describes the stream as if it was passed from
+ /// the command line @c "--log_sink" parameter. With that regards, @b stdout and @b stderr
+ /// have special meaning indicating the standard output or error stream respectively.
+ ///
+ /// @par Since Boost 1.62
+ virtual std::string get_default_stream_description() const
+ {
+ return "stdout";
+ }
+
+ // @}
+
+
+protected:
+ log_level m_log_level;
+
+};
+
+} // namespace unit_test
+} // namespace boost
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
+
diff --git a/src/third_party/boost-1.70.0/boost/test/unit_test_monitor.hpp b/src/third_party/boost-1.70.0/boost/test/unit_test_monitor.hpp
new file mode 100644
index 00000000000..3e7919a5aaa
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/unit_test_monitor.hpp
@@ -0,0 +1,62 @@
+// (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
+ // timeout is expressed in seconds
+ error_level execute_and_translate( boost::function<void ()> const& func, unsigned long int timeout_microseconds = 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.69.0/boost/test/unit_test_parameters.hpp b/src/third_party/boost-1.70.0/boost/test/unit_test_parameters.hpp
index e7e60d344f0..e7e60d344f0 100644
--- a/src/third_party/boost-1.69.0/boost/test/unit_test_parameters.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/unit_test_parameters.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/unit_test_suite.hpp b/src/third_party/boost-1.70.0/boost/test/unit_test_suite.hpp
new file mode 100644
index 00000000000..f55eff7291c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/unit_test_suite.hpp
@@ -0,0 +1,408 @@
+// (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 ctor"); \
+ test_name<TestType> 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"); \
+ } \
+}; \
+ \
+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) BOOST_ATTRIBUTE_UNUSED = 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 ) ) BOOST_ATTRIBUTE_UNUSED \
+/**/
+#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.69.0/boost/test/utils/algorithm.hpp b/src/third_party/boost-1.70.0/boost/test/utils/algorithm.hpp
index 7f16816c3a9..7f16816c3a9 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/algorithm.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/assign_op.hpp b/src/third_party/boost-1.70.0/boost/test/utils/assign_op.hpp
index 89d8bfa9568..89d8bfa9568 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/assign_op.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/assign_op.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring.hpp b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring.hpp
new file mode 100644
index 00000000000..3f33e826495
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring.hpp
@@ -0,0 +1,754 @@
+// (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 : class basic_cstring wraps C string and provide std_string like
+// interface
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_BASIC_CSTRING_HPP
+#define BOOST_TEST_UTILS_BASIC_CSTRING_HPP
+
+// Boost.Test
+#include <boost/test/utils/basic_cstring/basic_cstring_fwd.hpp>
+#include <boost/test/utils/basic_cstring/bcs_char_traits.hpp>
+
+// Boost
+#include <boost/type_traits/remove_cv.hpp>
+
+// STL
+#include <string>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** basic_cstring ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+class BOOST_SYMBOL_VISIBLE basic_cstring {
+ typedef basic_cstring<CharT> self_type;
+public:
+ // Subtypes
+ typedef ut_detail::bcs_char_traits<CharT> traits_type;
+ typedef typename traits_type::std_string std_string;
+
+ typedef CharT value_type;
+ typedef typename remove_cv<value_type>::type value_ret_type;
+ typedef value_type* pointer;
+ typedef value_type const* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ typedef value_type const* const_iterator;
+ typedef value_type* iterator;
+
+ // !! should also present reverse_iterator, const_reverse_iterator
+
+#if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) && !defined(__DCC__)
+ BOOST_STATIC_CONSTANT(size_type, npos = static_cast<size_type>(-1));
+#else
+ // IBM/VisualAge version 6 is not able to handle enums larger than 4 bytes.
+ // But size_type is 8 bytes in 64bit mode.
+ static const size_type npos = -1 ;
+#endif
+
+ static pointer null_str();
+
+ // Constructors; default copy constructor is generated by compiler
+ basic_cstring();
+ basic_cstring( basic_cstring const & );
+ basic_cstring( std_string const& s );
+ basic_cstring( pointer s );
+ template<typename LenType>
+ basic_cstring( pointer s, LenType len ) : m_begin( s ), m_end( m_begin + len ) {}
+ basic_cstring( pointer first, pointer last );
+
+ // data access methods
+ value_ret_type operator[]( size_type index ) const;
+ value_ret_type at( size_type index ) const;
+
+ // size operators
+ size_type size() const;
+ bool is_empty() const;
+ void clear();
+ void resize( size_type new_len );
+
+ // !! only for STL container conformance use is_empty instead
+ bool empty() const;
+
+ // Trimming
+ self_type& trim_right( size_type trim_size );
+ self_type& trim_left( size_type trim_size );
+ self_type& trim_right( iterator it );
+ self_type& trim_left( iterator it );
+#if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(800))
+ self_type& trim_left( self_type exclusions = self_type() ) ;
+ self_type& trim_right( self_type exclusions = self_type() ) ;
+ self_type& trim( self_type exclusions = self_type() ) ;
+#else
+ // VA C++/XL C++ v6 and v8 has in this case a problem with the default arguments.
+ self_type& trim_left( self_type exclusions );
+ self_type& trim_right( self_type exclusions );
+ self_type& trim( self_type exclusions );
+ self_type& trim_left() { return trim_left( self_type() ); }
+ self_type& trim_right() { return trim_right( self_type() ); }
+ self_type& trim() { return trim( self_type() ); }
+#endif
+
+ // Assignment operators
+ basic_cstring& operator=( self_type const& s );
+ basic_cstring& operator=( std_string const& s );
+ basic_cstring& operator=( pointer s );
+
+ template<typename CharT2>
+ basic_cstring& assign( basic_cstring<CharT2> const& s )
+ {
+ return *this = basic_cstring<CharT>( s.begin(), s.end() );
+ }
+ template<typename PosType, typename LenType>
+ basic_cstring& assign( self_type const& s, PosType pos, LenType len )
+ {
+ return *this = self_type( s.m_begin + pos, len );
+ }
+
+ basic_cstring& assign( std_string const& s );
+ template<typename PosType, typename LenType>
+ basic_cstring& assign( std_string const& s, PosType pos, LenType len )
+ {
+ return *this = self_type( s.c_str() + pos, len );
+ }
+ basic_cstring& assign( pointer s );
+ template<typename LenType>
+ basic_cstring& assign( pointer s, LenType len )
+ {
+ return *this = self_type( s, len );
+ }
+ basic_cstring& assign( pointer f, pointer l );
+
+ // swapping
+ void swap( self_type& s );
+
+ // Iterators
+ iterator begin();
+ const_iterator begin() const;
+ iterator end();
+ const_iterator end() const;
+
+ // !! should have rbegin, rend
+
+ // substring search operation
+ size_type find( basic_cstring ) const;
+ size_type rfind( basic_cstring ) const;
+ self_type substr( size_type beg_index, size_type end_index = npos ) const;
+
+private:
+ static self_type default_trim_ex();
+
+ // Data members
+ iterator m_begin;
+ iterator m_end;
+ static CharT null;
+};
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+CharT basic_cstring<CharT>::null = 0;
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::pointer
+basic_cstring<CharT>::null_str()
+{
+ return &null;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring()
+: m_begin( null_str() )
+, m_end( m_begin )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring(basic_cstring const & s)
+: m_begin( s.m_begin )
+, m_end( s.m_end )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( std_string const& s )
+: m_begin( s.c_str() )
+, m_end( m_begin + s.size() )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( pointer s )
+: m_begin( s ? s : null_str() )
+, m_end ( m_begin + (s ? traits_type::length( s ) : 0 ) )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( pointer first, pointer last )
+: m_begin( first )
+, m_end( last )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_ret_type
+basic_cstring<CharT>::operator[]( size_type index ) const
+{
+ return m_begin[index];
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_ret_type
+basic_cstring<CharT>::at( size_type index ) const
+{
+ if( m_begin + index >= m_end )
+ return static_cast<value_type>(0);
+
+ return m_begin[index];
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::size_type
+basic_cstring<CharT>::size() const
+{
+ return static_cast<size_type>(m_end - m_begin);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+basic_cstring<CharT>::is_empty() const
+{
+ return m_end == m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+basic_cstring<CharT>::empty() const
+{
+ return is_empty();
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline void
+basic_cstring<CharT>::clear()
+{
+ m_begin = m_end;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline void
+basic_cstring<CharT>::resize( size_type new_len )
+{
+ if( m_begin + new_len < m_end )
+ m_end = m_begin + new_len;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_left( size_type trim_size )
+{
+ m_begin += trim_size;
+ if( m_end <= m_begin )
+ clear();
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_left( iterator it )
+{
+ m_begin = it;
+ if( m_end <= m_begin )
+ clear();
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_left( basic_cstring exclusions )
+{
+ if( exclusions.is_empty() )
+ exclusions = default_trim_ex();
+
+ iterator it;
+ for( it = begin(); it != end(); ++it ) {
+ if( traits_type::find( exclusions.begin(), exclusions.size(), *it ) == reinterpret_cast<pointer>(0) )
+ break;
+ }
+
+ return trim_left( it );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_right( size_type trim_size )
+{
+ m_end -= trim_size;
+ if( m_end <= m_begin )
+ clear();
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_right( iterator it )
+{
+ m_end = it;
+ if( m_end <= m_begin )
+ clear();
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_right( basic_cstring exclusions )
+{
+ if( exclusions.is_empty() )
+ exclusions = default_trim_ex();
+
+ iterator it;
+
+ for( it = end()-1; it != begin()-1; --it ) {
+ if( self_type::traits_type::find( exclusions.begin(), exclusions.size(), *it ) == reinterpret_cast<pointer>(0) )
+ break;
+ }
+
+ return trim_right( it+1 );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim( basic_cstring exclusions )
+{
+ trim_left( exclusions );
+ trim_right( exclusions );
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::operator=( basic_cstring<CharT> const& s )
+{
+ m_begin = s.m_begin;
+ m_end = s.m_end;
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::operator=( std_string const& s )
+{
+ return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::operator=( pointer s )
+{
+ return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( std_string const& s )
+{
+ return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( pointer s )
+{
+ return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( pointer f, pointer l )
+{
+ return *this = self_type( f, l );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline void
+basic_cstring<CharT>::swap( basic_cstring<CharT>& s )
+{
+ // do not want to include alogrithm
+ pointer tmp1 = m_begin;
+ pointer tmp2 = m_end;
+
+ m_begin = s.m_begin;
+ m_end = s.m_end;
+
+ s.m_begin = tmp1;
+ s.m_end = tmp2;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::iterator
+basic_cstring<CharT>::begin()
+{
+ return m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::const_iterator
+basic_cstring<CharT>::begin() const
+{
+ return m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::iterator
+basic_cstring<CharT>::end()
+{
+ return m_end;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::const_iterator
+basic_cstring<CharT>::end() const
+{
+ return m_end;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::size_type
+basic_cstring<CharT>::find( basic_cstring<CharT> str ) const
+{
+ if( str.is_empty() || str.size() > size() )
+ return static_cast<size_type>(npos);
+
+ const_iterator it = begin();
+ const_iterator last = end() - str.size() + 1;
+
+ while( it != last ) {
+ if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
+ break;
+
+ ++it;
+ }
+
+ return it == last ? npos : static_cast<size_type>(it - begin());
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::size_type
+basic_cstring<CharT>::rfind( basic_cstring<CharT> str ) const
+{
+ if( str.is_empty() || str.size() > size() )
+ return static_cast<size_type>(npos);
+
+ const_iterator it = end() - str.size();
+ const_iterator last = begin()-1;
+
+ while( it != last ) {
+ if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
+ break;
+
+ --it;
+ }
+
+ return it == last ? static_cast<size_type>(npos) : static_cast<size_type>(it - begin());
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>
+basic_cstring<CharT>::substr( size_type beg_index, size_type end_index ) const
+{
+ return beg_index > size()
+ ? self_type()
+ : end_index > size()
+ ? self_type( m_begin + beg_index, m_end )
+ : self_type( m_begin + beg_index, m_begin + end_index );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>
+basic_cstring<CharT>::default_trim_ex()
+{
+ static CharT ws[3] = { CharT(' '), CharT('\t'), CharT('\n') }; // !! wide case
+
+ return self_type( ws, 3 );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** comparison operators ************** //
+// ************************************************************************** //
+
+template<typename CharT1,typename CharT2>
+inline bool
+operator==( basic_cstring<CharT1> const& s1, basic_cstring<CharT2> const& s2 )
+{
+ typedef typename basic_cstring<CharT1>::traits_type traits_type;
+ return s1.size() == s2.size() &&
+ traits_type::compare( s1.begin(), s2.begin(), s1.size() ) == 0;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1,typename CharT2>
+inline bool
+operator==( basic_cstring<CharT1> const& s1, CharT2* s2 )
+{
+#if !defined(__DMC__)
+ return s1 == basic_cstring<CharT2>( s2 );
+#else
+ return s1 == basic_cstring<CharT2 const>( s2 );
+#endif
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator==( basic_cstring<CharT> const& s1, typename basic_cstring<CharT>::std_string const& s2 )
+{
+ return s1 == basic_cstring<CharT>( s2 );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1,typename CharT2>
+inline bool
+operator==( CharT1* s2, basic_cstring<CharT2> const& s1 )
+{
+ return s1 == s2;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator==( typename basic_cstring<CharT>::std_string const& s2, basic_cstring<CharT> const& s1 )
+{
+ return s1 == s2;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( basic_cstring<CharT> const& s1, CharT* s2 )
+{
+ return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( CharT* s2, basic_cstring<CharT> const& s1 )
+{
+ return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( basic_cstring<CharT> const& s1, basic_cstring<CharT> const& s2 )
+{
+ return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( basic_cstring<CharT> const& s1, typename basic_cstring<CharT>::std_string const& s2 )
+{
+ return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( typename basic_cstring<CharT>::std_string const& s2, basic_cstring<CharT> const& s1 )
+{
+ return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** first_char ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_ret_type
+first_char( basic_cstring<CharT> source )
+{
+ typedef typename basic_cstring<CharT>::value_ret_type res_type;
+
+ return source.is_empty() ? static_cast<res_type>(0) : *source.begin();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** last_char ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_ret_type
+last_char( basic_cstring<CharT> source )
+{
+ typedef typename basic_cstring<CharT>::value_ret_type res_type;
+
+ return source.is_empty() ? static_cast<res_type>(0) : *(source.end()-1);
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** assign_op ************** //
+// ************************************************************************** //
+
+template<typename CharT1, typename CharT2>
+inline void
+assign_op( std::basic_string<CharT1>& target, basic_cstring<CharT2> src, int )
+{
+ target.assign( src.begin(), src.size() );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1, typename CharT2>
+inline std::basic_string<CharT1>&
+operator+=( std::basic_string<CharT1>& target, basic_cstring<CharT2> const& str )
+{
+ target.append( str.begin(), str.end() );
+ return target;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1, typename CharT2>
+inline std::basic_string<CharT1>
+operator+( std::basic_string<CharT1> const& lhs, basic_cstring<CharT2> const& rhs )
+{
+ std::basic_string<CharT1> res( lhs );
+
+ res.append( rhs.begin(), rhs.end() );
+ return res;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace boost
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_BASIC_CSTRING_HPP
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp
new file mode 100644
index 00000000000..88c34068965
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp
@@ -0,0 +1,39 @@
+// (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 : basic_cstring class wrap C string and provide std_string like
+// interface
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_BASIC_CSTRING_FWD_HPP
+#define BOOST_TEST_UTILS_BASIC_CSTRING_FWD_HPP
+
+#include <boost/test/detail/config.hpp>
+
+namespace boost {
+
+namespace unit_test {
+
+template<typename CharT> class BOOST_SYMBOL_VISIBLE basic_cstring;
+typedef basic_cstring<char const> const_string;
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590041))
+typedef const_string literal_string;
+#else
+typedef const_string const literal_string;
+#endif
+
+typedef char const* const c_literal_string;
+
+} // namespace unit_test
+
+} // namespace boost
+
+#endif // BOOST_TEST_UTILS_BASIC_CSTRING_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp
index eb77f474c75..eb77f474c75 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/compare.hpp b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/compare.hpp
index b6dc15ab77c..b6dc15ab77c 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/compare.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/compare.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/io.hpp b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/io.hpp
index 02ccb126f8c..02ccb126f8c 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/io.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/basic_cstring/io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/class_properties.hpp b/src/third_party/boost-1.70.0/boost/test/utils/class_properties.hpp
index d4f3db3f2d8..d4f3db3f2d8 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/class_properties.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/class_properties.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/custom_manip.hpp b/src/third_party/boost-1.70.0/boost/test/utils/custom_manip.hpp
index d5ddaf5c077..d5ddaf5c077 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/custom_manip.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/custom_manip.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/foreach.hpp b/src/third_party/boost-1.70.0/boost/test/utils/foreach.hpp
new file mode 100644
index 00000000000..ea1adc58cc1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/foreach.hpp
@@ -0,0 +1,315 @@
+// (C) Copyright Eric Niebler 2004-2005
+// (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 : this is an abridged version of an excelent BOOST_FOREACH facility
+// presented by Eric Niebler. I am so fond of it so I can't wait till it
+// going to be accepted into Boost. Also I need version with less number of dependencies
+// and more portable. This version doesn't support rvalues and will reeveluate it's
+// parameters, but should be good enough for my purposes.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_FOREACH_HPP
+#define BOOST_TEST_UTILS_FOREACH_HPP
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+
+// Boost
+#include <boost/type.hpp>
+#include <boost/mpl/bool.hpp>
+
+#include <boost/type_traits/is_const.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace for_each {
+
+// ************************************************************************** //
+// ************** static_any ************** //
+// ************************************************************************** //
+
+struct static_any_base
+{
+ operator bool() const { return false; }
+};
+
+//____________________________________________________________________________//
+
+template<typename Iter>
+struct static_any : static_any_base
+{
+ static_any( Iter const& t ) : m_it( t ) {}
+
+ mutable Iter m_it;
+};
+
+//____________________________________________________________________________//
+
+typedef static_any_base const& static_any_t;
+
+//____________________________________________________________________________//
+
+template<typename Iter>
+inline Iter&
+static_any_cast( static_any_t a, Iter* = 0 )
+{
+ return static_cast<Iter&>( static_cast<static_any<Iter> const&>( a ).m_it );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** is_const ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline is_const<C>
+is_const_coll( C& )
+{
+ return is_const<C>();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** begin ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::iterator>
+begin( C& t, mpl::false_ )
+{
+ return static_any<BOOST_DEDUCED_TYPENAME C::iterator>( t.begin() );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>
+begin( C const& t, mpl::true_ )
+{
+ return static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>( t.begin() );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** end ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::iterator>
+end( C& t, mpl::false_ )
+{
+ return static_any<BOOST_DEDUCED_TYPENAME C::iterator>( t.end() );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>
+end( C const& t, mpl::true_ )
+{
+ return static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>( t.end() );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** done ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline bool
+done( static_any_t cur, static_any_t end, C&, mpl::false_ )
+{
+ return static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur ) ==
+ static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( end );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline bool
+done( static_any_t cur, static_any_t end, C const&, mpl::true_ )
+{
+ return static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur ) ==
+ static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( end );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** next ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline void
+next( static_any_t cur, C&, mpl::false_ )
+{
+ ++static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline void
+next( static_any_t cur, C const&, mpl::true_ )
+{
+ ++static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** prev ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline void
+prev( static_any_t cur, C&, mpl::false_ )
+{
+ --static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline void
+prev( static_any_t cur, C const&, mpl::true_ )
+{
+ --static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** deref ************** //
+// ************************************************************************** //
+
+template<class RefType,typename C>
+inline RefType
+deref( static_any_t cur, C&, ::boost::type<RefType>, mpl::false_ )
+{
+ return *static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+template<class RefType,typename C>
+inline RefType
+deref( static_any_t cur, C const&, ::boost::type<RefType>, mpl::true_ )
+{
+ return *static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** BOOST_TEST_FOREACH ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_FE_ANY ::boost::unit_test::for_each::static_any_t
+#define BOOST_TEST_FE_IS_CONST( COL ) ::boost::unit_test::for_each::is_const_coll( COL )
+
+#define BOOST_TEST_FE_BEG( COL ) \
+ ::boost::unit_test::for_each::begin( \
+ COL, \
+ BOOST_TEST_FE_IS_CONST( COL ) ) \
+/**/
+
+#define BOOST_TEST_FE_END( COL ) \
+ ::boost::unit_test::for_each::end( \
+ COL, \
+ BOOST_TEST_FE_IS_CONST( COL ) ) \
+/**/
+
+#define BOOST_TEST_FE_DONE( COL ) \
+ ::boost::unit_test::for_each::done( \
+ BOOST_TEST_FE_CUR_VAR, \
+ BOOST_TEST_FE_END_VAR, \
+ COL, \
+ BOOST_TEST_FE_IS_CONST( COL ) ) \
+/**/
+
+#define BOOST_TEST_FE_NEXT( COL ) \
+ ::boost::unit_test::for_each::next( \
+ BOOST_TEST_FE_CUR_VAR, \
+ COL, \
+ BOOST_TEST_FE_IS_CONST( COL ) ) \
+/**/
+
+#define BOOST_TEST_FE_PREV( COL ) \
+ ::boost::unit_test::for_each::prev( \
+ BOOST_TEST_FE_CUR_VAR, \
+ COL, \
+ BOOST_TEST_FE_IS_CONST( COL ) ) \
+/**/
+
+#define BOOST_FOREACH_NOOP(COL) \
+ ((void)&(COL))
+
+#define BOOST_TEST_FE_DEREF( COL, RefType ) \
+ ::boost::unit_test::for_each::deref( \
+ BOOST_TEST_FE_CUR_VAR, \
+ COL, \
+ ::boost::type<RefType >(), \
+ BOOST_TEST_FE_IS_CONST( COL ) ) \
+/**/
+
+#if BOOST_WORKAROUND( BOOST_MSVC, == 1310 )
+#define BOOST_TEST_LINE_NUM
+#else
+#define BOOST_TEST_LINE_NUM __LINE__
+#endif
+
+#define BOOST_TEST_FE_CUR_VAR BOOST_JOIN( _fe_cur_, BOOST_TEST_LINE_NUM )
+#define BOOST_TEST_FE_END_VAR BOOST_JOIN( _fe_end_, BOOST_TEST_LINE_NUM )
+#define BOOST_TEST_FE_CON_VAR BOOST_JOIN( _fe_con_, BOOST_TEST_LINE_NUM )
+
+#define BOOST_TEST_FOREACH( RefType, var, COL ) \
+if( BOOST_TEST_FE_ANY BOOST_TEST_FE_CUR_VAR = BOOST_TEST_FE_BEG( COL ) ) {} else \
+if( BOOST_TEST_FE_ANY BOOST_TEST_FE_END_VAR = BOOST_TEST_FE_END( COL ) ) {} else \
+for( bool BOOST_TEST_FE_CON_VAR = true; \
+ BOOST_TEST_FE_CON_VAR && !BOOST_TEST_FE_DONE( COL ); \
+ BOOST_TEST_FE_CON_VAR ? BOOST_TEST_FE_NEXT( COL ) : BOOST_FOREACH_NOOP( COL )) \
+ \
+ if( (BOOST_TEST_FE_CON_VAR = false, false) ) {} else \
+ for( RefType var = BOOST_TEST_FE_DEREF( COL, RefType ); \
+ !BOOST_TEST_FE_CON_VAR; BOOST_TEST_FE_CON_VAR = true ) \
+/**/
+
+#define BOOST_TEST_REVERSE_FOREACH( RefType, var, COL ) \
+if( BOOST_TEST_FE_ANY BOOST_TEST_FE_CUR_VAR = BOOST_TEST_FE_END( COL ) ) {} else \
+if( BOOST_TEST_FE_ANY BOOST_TEST_FE_END_VAR = BOOST_TEST_FE_BEG( COL ) ) {} else \
+for( bool BOOST_TEST_FE_CON_VAR = true; \
+ BOOST_TEST_FE_CON_VAR && !BOOST_TEST_FE_DONE( COL ); ) \
+ \
+ if( (BOOST_TEST_FE_CON_VAR = false, false) ) {} else \
+ if( (BOOST_TEST_FE_PREV( COL ), false) ) {} else \
+ for( RefType var = BOOST_TEST_FE_DEREF( COL, RefType ); \
+ !BOOST_TEST_FE_CON_VAR; BOOST_TEST_FE_CON_VAR = true ) \
+/**/
+
+//____________________________________________________________________________//
+
+} // namespace for_each
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_FOREACH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/is_cstring.hpp b/src/third_party/boost-1.70.0/boost/test/utils/is_cstring.hpp
index 12326b04187..12326b04187 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/is_cstring.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/utils/is_forward_iterable.hpp
index d6d8dd8a85f..d6d8dd8a85f 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/is_forward_iterable.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/is_forward_iterable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/iterator/input_iterator_facade.hpp b/src/third_party/boost-1.70.0/boost/test/utils/iterator/input_iterator_facade.hpp
index d695ee3a87e..d695ee3a87e 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/iterator/input_iterator_facade.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/iterator/input_iterator_facade.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/iterator/token_iterator.hpp b/src/third_party/boost-1.70.0/boost/test/utils/iterator/token_iterator.hpp
index e3a923a2ee5..e3a923a2ee5 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/iterator/token_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/iterator/token_iterator.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/lazy_ostream.hpp b/src/third_party/boost-1.70.0/boost/test/utils/lazy_ostream.hpp
new file mode 100644
index 00000000000..37ad668d92f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/lazy_ostream.hpp
@@ -0,0 +1,129 @@
+// (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.
+//
+// Description : contains definition for all test tools in test toolbox
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_LAZY_OSTREAM_HPP
+#define BOOST_TEST_UTILS_LAZY_OSTREAM_HPP
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+
+// STL
+#include <iosfwd>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** lazy_ostream ************** //
+// ************************************************************************** //
+
+namespace boost {
+namespace unit_test {
+
+class BOOST_TEST_DECL lazy_ostream {
+public:
+ virtual ~lazy_ostream() {}
+
+ static lazy_ostream& instance() { return inst; }
+
+ friend std::ostream& operator<<( std::ostream& ostr, lazy_ostream const& o ) { return o( ostr ); }
+
+ // access method
+ bool empty() const { return m_empty; }
+
+ // actual printing interface; to be accessed only by this class and children
+ virtual std::ostream& operator()( std::ostream& ostr ) const { return ostr; }
+protected:
+ explicit lazy_ostream( bool p_empty = true ) : m_empty( p_empty ) {}
+
+private:
+ // Data members
+ bool m_empty;
+ static lazy_ostream inst;
+};
+
+//____________________________________________________________________________//
+
+template<typename PrevType, typename T, typename StorageT=T const&>
+class lazy_ostream_impl : public lazy_ostream {
+public:
+ lazy_ostream_impl( PrevType const& prev, T const& value )
+ : lazy_ostream( false )
+ , m_prev( prev )
+ , m_value( value )
+ {
+ }
+
+ virtual std::ostream& operator()( std::ostream& ostr ) const
+ {
+ return m_prev(ostr) << m_value;
+ }
+private:
+ // Data members
+ PrevType const& m_prev;
+ StorageT m_value;
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline lazy_ostream_impl<lazy_ostream,T>
+operator<<( lazy_ostream const& prev, T const& v )
+{
+ return lazy_ostream_impl<lazy_ostream,T>( prev, v );
+}
+
+//____________________________________________________________________________//
+
+template<typename PrevPrevType, typename TPrev, typename T>
+inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,T>
+operator<<( lazy_ostream_impl<PrevPrevType,TPrev> const& prev, T const& v )
+{
+ typedef lazy_ostream_impl<PrevPrevType,TPrev> PrevType;
+ return lazy_ostream_impl<PrevType,T>( prev, v );
+}
+
+//____________________________________________________________________________//
+
+#if BOOST_TEST_USE_STD_LOCALE
+
+template<typename R,typename S>
+inline lazy_ostream_impl<lazy_ostream,R& (BOOST_TEST_CALL_DECL *)(S&),R& (BOOST_TEST_CALL_DECL *)(S&)>
+operator<<( lazy_ostream const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
+{
+ typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
+
+ return lazy_ostream_impl<lazy_ostream,ManipType,ManipType>( prev, man );
+}
+
+//____________________________________________________________________________//
+
+template<typename PrevPrevType, typename TPrev,typename R,typename S>
+inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,R& (BOOST_TEST_CALL_DECL *)(S&),R& (BOOST_TEST_CALL_DECL *)(S&)>
+operator<<( lazy_ostream_impl<PrevPrevType,TPrev> const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
+{
+ typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
+
+ return lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,ManipType,ManipType>( prev, man );
+}
+
+//____________________________________________________________________________//
+
+#endif
+
+#define BOOST_TEST_LAZY_MSG( M ) (::boost::unit_test::lazy_ostream::instance() << M)
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_LAZY_OSTREAM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/named_params.hpp b/src/third_party/boost-1.70.0/boost/test/utils/named_params.hpp
index 50de5bfba03..50de5bfba03 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/named_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/named_params.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/rtti.hpp b/src/third_party/boost-1.70.0/boost/test/utils/rtti.hpp
new file mode 100644
index 00000000000..84225b09218
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/rtti.hpp
@@ -0,0 +1,64 @@
+// (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 facilities for accessing type information at runtime
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RTTI_HPP
+#define BOOST_TEST_UTILS_RTTI_HPP
+
+// C Runtime
+#include <cstddef>
+#include <boost/test/detail/config.hpp>
+
+namespace boost {
+namespace rtti {
+
+// ************************************************************************** //
+// ************** rtti::type_id ************** //
+// ************************************************************************** //
+
+typedef std::ptrdiff_t id_t;
+
+namespace rtti_detail {
+
+template<typename T>
+struct BOOST_TEST_DECL rttid_holder {
+ static id_t id() { return reinterpret_cast<id_t>( &inst() ); }
+
+private:
+ struct rttid {};
+
+ static rttid const& inst() { static rttid s_inst; return s_inst; }
+};
+
+} // namespace rtti_detail
+
+//____________________________________________________________________________//
+
+template<typename T>
+BOOST_TEST_DECL inline id_t
+type_id()
+{
+ return rtti_detail::rttid_holder<T>::id();
+}
+
+//____________________________________________________________________________//
+
+#define BOOST_RTTI_SWITCH( type_id_ ) if( ::boost::rtti::id_t switch_by_id = type_id_ )
+#define BOOST_RTTI_CASE( type ) if( switch_by_id == ::boost::rtti::type_id<type>() )
+
+//____________________________________________________________________________//
+
+} // namespace rtti
+} // namespace boost
+
+#endif // BOOST_TEST_UTILS_RTTI_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument.hpp b/src/third_party/boost-1.70.0/boost/test/utils/runtime/argument.hpp
index 879ee96f9f0..879ee96f9f0 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/utils/runtime/argument_factory.hpp
index e281cf93f7a..e281cf93f7a 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument_factory.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/test/utils/runtime/cla/argv_traverser.hpp
index d65c88e9205..d65c88e9205 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/argv_traverser.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/runtime/cla/argv_traverser.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/runtime/cla/parser.hpp b/src/third_party/boost-1.70.0/boost/test/utils/runtime/cla/parser.hpp
new file mode 100644
index 00000000000..9e8601f5178
--- /dev/null
+++ b/src/third_party/boost-1.70.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.69.0/boost/test/utils/runtime/env/fetch.hpp b/src/third_party/boost-1.70.0/boost/test/utils/runtime/env/fetch.hpp
index 97d54d4905f..97d54d4905f 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/env/fetch.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/runtime/env/fetch.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/runtime/errors.hpp b/src/third_party/boost-1.70.0/boost/test/utils/runtime/errors.hpp
new file mode 100644
index 00000000000..30c0389f7d9
--- /dev/null
+++ b/src/third_party/boost-1.70.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 BOOST_SYMBOL_VISIBLE 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 BOOST_SYMBOL_VISIBLE 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 BOOST_SYMBOL_VISIBLE 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.69.0/boost/test/utils/runtime/finalize.hpp b/src/third_party/boost-1.70.0/boost/test/utils/runtime/finalize.hpp
index 181428550c1..181428550c1 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/finalize.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/runtime/finalize.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/fwd.hpp b/src/third_party/boost-1.70.0/boost/test/utils/runtime/fwd.hpp
index 17ae8812226..17ae8812226 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/fwd.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/utils/runtime/modifier.hpp
index 78c8817e7c3..78c8817e7c3 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/modifier.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/test/utils/runtime/parameter.hpp
index 01e5457bfef..01e5457bfef 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/runtime/parameter.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/runtime/parameter.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/setcolor.hpp b/src/third_party/boost-1.70.0/boost/test/utils/setcolor.hpp
new file mode 100644
index 00000000000..ce3e9eee020
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/setcolor.hpp
@@ -0,0 +1,324 @@
+// (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>
+
+#include <boost/core/ignore_unused.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[%c;3%c;4%cm",
+ 0x1B,
+ static_cast<char>(attr + '0'),
+ static_cast<char>(fg + '0'),
+ static_cast<char>(bg + '0'));
+ }
+
+ 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); \
+ boost::ignore_unused( 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.69.0/boost/test/utils/string_cast.hpp b/src/third_party/boost-1.70.0/boost/test/utils/string_cast.hpp
index 3c069a84034..3c069a84034 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/string_cast.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/string_cast.hpp
diff --git a/src/third_party/boost-1.70.0/boost/test/utils/timer.hpp b/src/third_party/boost-1.70.0/boost/test/utils/timer.hpp
new file mode 100644
index 00000000000..035fb4fd138
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/test/utils/timer.hpp
@@ -0,0 +1,164 @@
+// (C) Copyright Raffi Enficiaud 2019.
+// Distributed under the Boost Software License, Version 1.0.
+// (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.
+//
+// Description : timer and elapsed types
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_TIMER_HPP
+#define BOOST_TEST_UTILS_TIMER_HPP
+
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
+#include <utility>
+#include <ctime>
+
+# if defined(_WIN32) || defined(__CYGWIN__)
+# define BOOST_TEST_TIMER_WINDOWS_API
+# elif defined(__MACH__)// && !defined(CLOCK_MONOTONIC)
+# // we compile for all macs the same, CLOCK_MONOTONIC introduced in 10.12
+# define BOOST_TEST_TIMER_MACH_API
+# else
+# define BOOST_TEST_TIMER_POSIX_API
+# if !defined(CLOCK_MONOTONIC)
+# error "CLOCK_MONOTONIC not defined"
+# endif
+# endif
+
+# if defined(BOOST_TEST_TIMER_WINDOWS_API)
+# include <windows.h>
+# elif defined(BOOST_TEST_TIMER_MACH_API)
+# include <mach/mach_time.h>
+//# include <mach/mach.h> /* host_get_clock_service, mach_... */
+# else
+# include <sys/time.h>
+# endif
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+ namespace std { using ::clock_t; using ::clock; }
+# endif
+
+namespace boost {
+namespace unit_test {
+namespace timer {
+
+ struct elapsed_time
+ {
+ typedef boost::int_least64_t nanosecond_type;
+
+ nanosecond_type wall;
+ nanosecond_type system;
+ void clear() {
+ wall = 0;
+ system = 0;
+ }
+ };
+
+ inline double
+ microsecond_wall_time( elapsed_time const& elapsed )
+ {
+ return elapsed.wall / 1E3;
+ }
+
+ inline double
+ second_wall_time( elapsed_time const& elapsed )
+ {
+ return elapsed.wall / 1E9;
+ }
+
+ namespace details {
+ #if defined(BOOST_TEST_TIMER_WINDOWS_API)
+ elapsed_time::nanosecond_type get_tick_freq() {
+ LARGE_INTEGER freq;
+ ::QueryPerformanceFrequency( &freq );
+ return static_cast<elapsed_time::nanosecond_type>(freq.QuadPart);
+ }
+ #elif defined(BOOST_TEST_TIMER_MACH_API)
+ std::pair<elapsed_time::nanosecond_type, elapsed_time::nanosecond_type> get_time_base() {
+ mach_timebase_info_data_t timebase;
+ if(mach_timebase_info(&timebase) == 0)
+ return std::pair<elapsed_time::nanosecond_type, elapsed_time::nanosecond_type>(timebase.numer, timebase.denom);
+ return std::pair<elapsed_time::nanosecond_type, elapsed_time::nanosecond_type>(0, 1);
+ }
+ #endif
+ }
+
+ //! Simple timing class
+ //!
+ //! This class measures the wall clock time.
+ class timer
+ {
+ public:
+ timer()
+ {
+ restart();
+ }
+ void restart()
+ {
+ _start_time_clock = std::clock();
+ #if defined(BOOST_TEST_TIMER_WINDOWS_API)
+ ::QueryPerformanceCounter(&_start_time_wall);
+ #elif defined(BOOST_TEST_TIMER_MACH_API)
+ _start_time_wall = mach_absolute_time();
+ #else
+ if( ::clock_gettime( CLOCK_MONOTONIC, &_start_time_wall ) != 0 )
+ {
+ _start_time_wall.tv_nsec = -1;
+ _start_time_wall.tv_sec = -1;
+ }
+ #endif
+ }
+
+ // return elapsed time in seconds
+ elapsed_time elapsed() const
+ {
+ typedef elapsed_time::nanosecond_type nanosecond_type;
+ static const double clock_to_nano_seconds = 1E9 / CLOCKS_PER_SEC;
+ elapsed_time return_value;
+
+ // processor / system time
+ return_value.system = static_cast<nanosecond_type>(double(std::clock() - _start_time_clock) * clock_to_nano_seconds);
+
+#if defined(BOOST_TEST_TIMER_WINDOWS_API)
+ static const nanosecond_type tick_per_sec = details::get_tick_freq();
+ LARGE_INTEGER end_time;
+ ::QueryPerformanceCounter(&end_time);
+ return_value.wall = static_cast<nanosecond_type>(((end_time.QuadPart - _start_time_wall.QuadPart) * 1E9) / tick_per_sec);
+#elif defined(BOOST_TEST_TIMER_MACH_API)
+ static std::pair<nanosecond_type, nanosecond_type> timebase = details::get_time_base();
+ nanosecond_type clock = mach_absolute_time() - _start_time_wall;
+ return_value.wall = static_cast<nanosecond_type>((clock * timebase.first) / timebase.second);
+#else
+ struct timespec end_time;
+ if( ::clock_gettime( CLOCK_MONOTONIC, &end_time ) == 0 )
+ {
+ return_value.wall = static_cast<nanosecond_type>((end_time.tv_sec - _start_time_wall.tv_sec) * 1E9 + (end_time.tv_nsec - _start_time_wall.tv_nsec));
+ }
+#endif
+
+ return return_value;
+ }
+
+ private:
+ std::clock_t _start_time_clock;
+ #if defined(BOOST_TEST_TIMER_WINDOWS_API)
+ LARGE_INTEGER _start_time_wall;
+ #elif defined(BOOST_TEST_TIMER_MACH_API)
+ elapsed_time::nanosecond_type _start_time_wall;
+ #else
+ struct timespec _start_time_wall;
+ #endif
+ };
+
+
+//____________________________________________________________________________//
+
+} // namespace timer
+} // namespace unit_test
+} // namespace boost
+
+#endif // BOOST_TEST_UTILS_TIMER_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/wrap_stringstream.hpp b/src/third_party/boost-1.70.0/boost/test/utils/wrap_stringstream.hpp
index 425d7ed75bf..425d7ed75bf 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/wrap_stringstream.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/test/utils/xml_printer.hpp
index 7892f9c4ce4..7892f9c4ce4 100644
--- a/src/third_party/boost-1.69.0/boost/test/utils/xml_printer.hpp
+++ b/src/third_party/boost-1.70.0/boost/test/utils/xml_printer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread.hpp b/src/third_party/boost-1.70.0/boost/thread.hpp
index 892bbb853bd..892bbb853bd 100644
--- a/src/third_party/boost-1.69.0/boost/thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/barrier.hpp b/src/third_party/boost-1.70.0/boost/thread/barrier.hpp
index 4c1b1b59a0d..4c1b1b59a0d 100644
--- a/src/third_party/boost-1.69.0/boost/thread/barrier.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/barrier.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp b/src/third_party/boost-1.70.0/boost/thread/condition_variable.hpp
index 8f8e9f2ed65..8f8e9f2ed65 100644
--- a/src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/condition_variable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/functional.hpp
index 7a7e928b70f..7a7e928b70f 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/functional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/allocator_arg.hpp
index 354cdaee885..354cdaee885 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/allocator_arg.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/allocator_traits.hpp
index 3737cd85def..3737cd85def 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/allocator_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/config.hpp
index 7b0596ac490..7b0596ac490 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/pointer_traits.hpp
index 320f8e9e774..320f8e9e774 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/pointer_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/scoped_allocator.hpp
index a92f3d85146..a92f3d85146 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/scoped_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/shared_ptr.hpp
index e9a9383723a..e9a9383723a 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/shared_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/unique_ptr.hpp
index 17abf54e92a..17abf54e92a 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/memory/unique_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/tuple.hpp
index 860229ebe0b..860229ebe0b 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp b/src/third_party/boost-1.70.0/boost/thread/csbl/vector.hpp
index c77a5b143bb..c77a5b143bb 100644
--- a/src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/csbl/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/cv_status.hpp b/src/third_party/boost-1.70.0/boost/thread/cv_status.hpp
index e52de4a5220..e52de4a5220 100644
--- a/src/third_party/boost-1.69.0/boost/thread/cv_status.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/cv_status.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/atomic_redef_macros.hpp
index dfd15f5c703..dfd15f5c703 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/atomic_redef_macros.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/atomic_undef_macros.hpp
index 18d840a7cc5..18d840a7cc5 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/atomic_undef_macros.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/detail/config.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/config.hpp
new file mode 100644
index 00000000000..ed46b1f67bd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/config.hpp
@@ -0,0 +1,539 @@
+// 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(BOOST_THREAD_PLATFORM_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
+
+#if ! defined BOOST_THREAD_PROVIDES_EXECUTORS \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_EXECUTORS
+#define BOOST_THREAD_PROVIDES_EXECUTORS
+#endif
+
+#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.70.0/boost/thread/detail/delete.hpp
index 8f8113f4e87..8f8113f4e87 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/delete.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/thread/detail/invoke.hpp
index e772da29ee9..e772da29ee9 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/invoke.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/invoke.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/invoker.hpp
index 9f38e9798dd..9f38e9798dd 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/invoker.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/is_convertible.hpp
index b77620cf179..b77620cf179 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/is_convertible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/lockable_wrapper.hpp
index 8dc5a6cc786..8dc5a6cc786 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/lockable_wrapper.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/make_tuple_indices.hpp
index 73d54f11f81..73d54f11f81 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/make_tuple_indices.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/memory.hpp
index 51ce84f40bc..51ce84f40bc 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/thread/detail/move.hpp
index 447247d590a..447247d590a 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/move.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/move.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/nullary_function.hpp
index 2950942f11c..2950942f11c 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/nullary_function.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/platform.hpp
index 172a601a022..172a601a022 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/platform.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/platform_time.hpp
index 2180f13c056..2180f13c056 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/platform_time.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/detail/thread.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/thread.hpp
new file mode 100644
index 00000000000..04223ed26c9
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/thread.hpp
@@ -0,0 +1,845 @@
+#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
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#include <boost/thread/interruption.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_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.70.0/boost/thread/detail/thread_group.hpp
index 4105c734688..4105c734688 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/thread_group.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/thread_group.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/thread_heap_alloc.hpp
index 2f9bfd5c0b6..2f9bfd5c0b6 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/thread_heap_alloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/thread_interruption.hpp
index 5d7d10fecdf..5d7d10fecdf 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/thread_interruption.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/thread_safety.hpp
index 4aa29a808be..4aa29a808be 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp
+++ b/src/third_party/boost-1.70.0/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.70.0/boost/thread/detail/tss_hooks.hpp
index 4429821e0e8..4429821e0e8 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/tss_hooks.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/tss_hooks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/variadic_footer.hpp
index 9ae25a847c3..9ae25a847c3 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/variadic_footer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp b/src/third_party/boost-1.70.0/boost/thread/detail/variadic_header.hpp
index 8015ae33cc2..8015ae33cc2 100644
--- a/src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/detail/variadic_header.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp b/src/third_party/boost-1.70.0/boost/thread/exceptional_ptr.hpp
index 49547923d92..49547923d92 100644
--- a/src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/exceptional_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/exceptions.hpp b/src/third_party/boost-1.70.0/boost/thread/exceptions.hpp
index 2a5094bd5ad..2a5094bd5ad 100644
--- a/src/third_party/boost-1.69.0/boost/thread/exceptions.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/exceptions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/executor.hpp b/src/third_party/boost-1.70.0/boost/thread/executor.hpp
index c2b85a0eabe..c2b85a0eabe 100644
--- a/src/third_party/boost-1.69.0/boost/thread/executor.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/executor.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/executors/executor.hpp b/src/third_party/boost-1.70.0/boost/thread/executors/executor.hpp
new file mode 100644
index 00000000000..62824a5e7b0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/executors/executor.hpp
@@ -0,0 +1,150 @@
+// 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>
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined BOOST_THREAD_PROVIDES_EXECUTORS && defined BOOST_THREAD_USES_MOVE
+
+#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
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/thread/executors/executor_adaptor.hpp b/src/third_party/boost-1.70.0/boost/thread/executors/executor_adaptor.hpp
new file mode 100644
index 00000000000..b1fd22296cd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/executors/executor_adaptor.hpp
@@ -0,0 +1,138 @@
+// 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>
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined BOOST_THREAD_PROVIDES_EXECUTORS && defined BOOST_THREAD_USES_MOVE
+
+#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
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/thread/executors/generic_executor_ref.hpp b/src/third_party/boost-1.70.0/boost/thread/executors/generic_executor_ref.hpp
new file mode 100644
index 00000000000..abe7da440d4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/executors/generic_executor_ref.hpp
@@ -0,0 +1,215 @@
+// 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>
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined BOOST_THREAD_PROVIDES_EXECUTORS && defined BOOST_THREAD_USES_MOVE
+
+#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
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/thread/executors/work.hpp b/src/third_party/boost-1.70.0/boost/thread/executors/work.hpp
new file mode 100644
index 00000000000..7d98e0734b5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/executors/work.hpp
@@ -0,0 +1,32 @@
+// (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>
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined BOOST_THREAD_PROVIDES_EXECUTORS && defined BOOST_THREAD_USES_MOVE
+
+#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
+#endif // BOOST_THREAD_EXECUTORS_WORK_HPP
diff --git a/src/third_party/boost-1.70.0/boost/thread/future.hpp b/src/third_party/boost-1.70.0/boost/thread/future.hpp
new file mode 100644
index 00000000000..3d1b29d4197
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/future.hpp
@@ -0,0 +1,5898 @@
+// (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;
+ }
+ using executors::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.70.0/boost/thread/futures/future_error.hpp
index 6212deece36..6212deece36 100644
--- a/src/third_party/boost-1.69.0/boost/thread/futures/future_error.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/future_error.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp b/src/third_party/boost-1.70.0/boost/thread/futures/future_error_code.hpp
index 7c8b6f2696a..7c8b6f2696a 100644
--- a/src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/future_error_code.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp b/src/third_party/boost-1.70.0/boost/thread/futures/future_status.hpp
index 383ac4673cf..383ac4673cf 100644
--- a/src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/future_status.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp b/src/third_party/boost-1.70.0/boost/thread/futures/is_future_type.hpp
index df7a680faae..df7a680faae 100644
--- a/src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/is_future_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp b/src/third_party/boost-1.70.0/boost/thread/futures/launch.hpp
index 329f40d8f34..329f40d8f34 100644
--- a/src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/launch.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp b/src/third_party/boost-1.70.0/boost/thread/futures/wait_for_all.hpp
index 398eb4adeee..398eb4adeee 100644
--- a/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/wait_for_all.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/futures/wait_for_any.hpp b/src/third_party/boost-1.70.0/boost/thread/futures/wait_for_any.hpp
new file mode 100644
index 00000000000..68ec0656187
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/futures/wait_for_any.hpp
@@ -0,0 +1,162 @@
+// (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/thread/condition_variable.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.70.0/boost/thread/interruption.hpp b/src/third_party/boost-1.70.0/boost/thread/interruption.hpp
new file mode 100644
index 00000000000..c91bb285725
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/interruption.hpp
@@ -0,0 +1,22 @@
+// (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_THREAD_INTERRUPTION_HPP
+#define BOOST_THREAD_INTERRUPTION_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+namespace boost
+{
+ namespace this_thread
+ {
+ void BOOST_THREAD_DECL interruption_point();
+ bool BOOST_THREAD_DECL interruption_enabled() BOOST_NOEXCEPT;
+ bool BOOST_THREAD_DECL interruption_requested() BOOST_NOEXCEPT;
+ }
+}
+
+#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.70.0/boost/thread/is_locked_by_this_thread.hpp
index 6344c0ff6dd..6344c0ff6dd 100644
--- a/src/third_party/boost-1.69.0/boost/thread/is_locked_by_this_thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/is_locked_by_this_thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp b/src/third_party/boost-1.70.0/boost/thread/lock_algorithms.hpp
index 7a55f92a289..7a55f92a289 100644
--- a/src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/lock_algorithms.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp b/src/third_party/boost-1.70.0/boost/thread/lock_guard.hpp
index 3f9ba9b1d0f..3f9ba9b1d0f 100644
--- a/src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/lock_guard.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_options.hpp b/src/third_party/boost-1.70.0/boost/thread/lock_options.hpp
index 68899ca89fe..68899ca89fe 100644
--- a/src/third_party/boost-1.69.0/boost/thread/lock_options.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/lock_options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_types.hpp b/src/third_party/boost-1.70.0/boost/thread/lock_types.hpp
index 9b8c57c49fb..9b8c57c49fb 100644
--- a/src/third_party/boost-1.69.0/boost/thread/lock_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/lock_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp b/src/third_party/boost-1.70.0/boost/thread/lockable_traits.hpp
index f46c8866291..f46c8866291 100644
--- a/src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/lockable_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/locks.hpp b/src/third_party/boost-1.70.0/boost/thread/locks.hpp
index 0905aec22a1..0905aec22a1 100644
--- a/src/third_party/boost-1.69.0/boost/thread/locks.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/locks.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/mutex.hpp
index 05c60941c46..05c60941c46 100644
--- a/src/third_party/boost-1.69.0/boost/thread/mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/once.hpp b/src/third_party/boost-1.70.0/boost/thread/once.hpp
index 22f95139aeb..22f95139aeb 100644
--- a/src/third_party/boost-1.69.0/boost/thread/once.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/once.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/pthread/condition_variable.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/condition_variable.hpp
new file mode 100644
index 00000000000..63f4183471c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/condition_variable.hpp
@@ -0,0 +1,496 @@
+#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/interruption.hpp>
+#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
+{
+ 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.70.0/boost/thread/pthread/condition_variable_fwd.hpp
index 08b15834635..08b15834635 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/condition_variable_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/mutex.hpp
index ecf80c28eb0..ecf80c28eb0 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/once.hpp
index 0bef0387de7..0bef0387de7 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/once.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/once_atomic.hpp
index c54a35c5413..c54a35c5413 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/once_atomic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/pthread_helpers.hpp
index c1ff0f92398..c1ff0f92398 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/pthread_helpers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
index dbbb0202ae4..dbbb0202ae4 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/recursive_mutex.hpp
index f349cacf7ed..f349cacf7ed 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/shared_mutex.hpp
index ed9a296f2e5..ed9a296f2e5 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/shared_mutex.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/pthread/thread_data.hpp b/src/third_party/boost-1.70.0/boost/thread/pthread/thread_data.hpp
new file mode 100644
index 00000000000..588e997f894
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/thread_data.hpp
@@ -0,0 +1,408 @@
+#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
+ {
+ typedef void(*cleanup_func_t)(void*);
+ typedef void(*cleanup_caller_t)(cleanup_func_t, void*);
+
+ cleanup_caller_t caller;
+ cleanup_func_t func;
+ void* value;
+
+ tss_data_node(cleanup_caller_t caller_,cleanup_func_t func_,void* value_):
+ caller(caller_),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.70.0/boost/thread/pthread/thread_heap_alloc.hpp
index dec7b661d75..dec7b661d75 100644
--- a/src/third_party/boost-1.69.0/boost/thread/pthread/thread_heap_alloc.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/pthread/thread_heap_alloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/recursive_mutex.hpp
index e716a190ffb..e716a190ffb 100644
--- a/src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp b/src/third_party/boost-1.70.0/boost/thread/shared_lock_guard.hpp
index 97a6397c1e6..97a6397c1e6 100644
--- a/src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/shared_lock_guard.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/shared_mutex.hpp
index 20a95d8c518..20a95d8c518 100644
--- a/src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/shared_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/thread.hpp b/src/third_party/boost-1.70.0/boost/thread/thread.hpp
index 3e63b42aaa1..3e63b42aaa1 100644
--- a/src/third_party/boost-1.69.0/boost/thread/thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/thread_only.hpp b/src/third_party/boost-1.70.0/boost/thread/thread_only.hpp
index d408344eefe..d408344eefe 100644
--- a/src/third_party/boost-1.69.0/boost/thread/thread_only.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/thread_only.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/thread_time.hpp b/src/third_party/boost-1.70.0/boost/thread/thread_time.hpp
index ffdcf850f73..ffdcf850f73 100644
--- a/src/third_party/boost-1.69.0/boost/thread/thread_time.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/thread_time.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/tss.hpp b/src/third_party/boost-1.70.0/boost/thread/tss.hpp
new file mode 100644
index 00000000000..bcfbdf0f9f7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/tss.hpp
@@ -0,0 +1,95 @@
+#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/type_traits/add_reference.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace thread
+ {
+ typedef void(*cleanup_func_t)(void*);
+ typedef void(*cleanup_caller_t)(cleanup_func_t, void*);
+ }
+
+ BOOST_THREAD_DECL void set_tss_data(void const* key,detail::thread::cleanup_caller_t caller,detail::thread::cleanup_func_t 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&);
+
+ typedef void(*original_cleanup_func_t)(T*);
+
+ static void default_deleter(T* data)
+ {
+ delete data;
+ }
+
+ static void cleanup_caller(detail::thread::cleanup_func_t cleanup_function,void* data)
+ {
+ reinterpret_cast<original_cleanup_func_t>(cleanup_function)(static_cast<T*>(data));
+ }
+
+
+ detail::thread::cleanup_func_t cleanup;
+
+ public:
+ typedef T element_type;
+
+ thread_specific_ptr():
+ cleanup(reinterpret_cast<detail::thread::cleanup_func_t>(&default_deleter))
+ {}
+ explicit thread_specific_ptr(void (*func_)(T*))
+ : cleanup(reinterpret_cast<detail::thread::cleanup_func_t>(func_))
+ {}
+ ~thread_specific_ptr()
+ {
+ detail::set_tss_data(this,0,0,0,true);
+ }
+
+ T* get() const
+ {
+ return static_cast<T*>(detail::get_tss_data(this));
+ }
+ T* operator->() const
+ {
+ return get();
+ }
+ typename add_reference<T>::type operator*() const
+ {
+ return *get();
+ }
+ T* release()
+ {
+ T* const temp=get();
+ detail::set_tss_data(this,0,0,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_caller,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.70.0/boost/thread/v2/shared_mutex.hpp
index e30a59e4132..e30a59e4132 100644
--- a/src/third_party/boost-1.69.0/boost/thread/v2/shared_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/v2/shared_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/basic_recursive_mutex.hpp
index 1fa05adabfb..1fa05adabfb 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/basic_recursive_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/basic_timed_mutex.hpp
index b332dab7520..b332dab7520 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/basic_timed_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/condition_variable.hpp
index 5cf975a5348..5cf975a5348 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/condition_variable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/interlocked_read.hpp
index e25c21eb1c3..e25c21eb1c3 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/interlocked_read.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/mutex.hpp
index 01544784b5b..01544784b5b 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/once.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/once.hpp
index 3c515bae7dc..3c515bae7dc 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/once.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/once.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/recursive_mutex.hpp
index 1f0f7f5e5fd..1f0f7f5e5fd 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.70.0/boost/thread/win32/shared_mutex.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/shared_mutex.hpp
new file mode 100644
index 00000000000..7f8d279001e
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/shared_mutex.hpp
@@ -0,0 +1,856 @@
+#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 <cstring>
+#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 std::memcmp(&lhs, &rhs, sizeof(lhs)) == 0;
+ }
+ };
+
+ static state_data interlocked_compare_exchange(state_data* target, state_data new_value, state_data comparand)
+ {
+ BOOST_STATIC_ASSERT(sizeof(state_data) == sizeof(long));
+ long new_val, comp;
+ std::memcpy(&new_val, &new_value, sizeof(new_value));
+ std::memcpy(&comp, &comparand, sizeof(comparand));
+ long const res=BOOST_INTERLOCKED_COMPARE_EXCHANGE(reinterpret_cast<long*>(target),
+ new_val,
+ comp);
+ state_data result;
+ std::memcpy(&result, &res, sizeof(result));
+ return result;
+ }
+
+ 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.70.0/boost/thread/win32/thread_data.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/thread_data.hpp
new file mode 100644
index 00000000000..b1a550af44c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/thread_data.hpp
@@ -0,0 +1,302 @@
+#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
+ {
+ typedef void(*cleanup_func_t)(void*);
+ typedef void(*cleanup_caller_t)(cleanup_func_t, void*);
+
+ cleanup_caller_t caller;
+ cleanup_func_t func;
+ void* value;
+
+ tss_data_node(cleanup_caller_t caller_,cleanup_func_t func_,void* value_):
+ caller(caller_),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.70.0/boost/thread/win32/thread_heap_alloc.hpp
index 176d269e059..176d269e059 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/thread_heap_alloc.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/thread_heap_alloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp b/src/third_party/boost-1.70.0/boost/thread/win32/thread_primitives.hpp
index e0751401d85..e0751401d85 100644
--- a/src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/win32/thread_primitives.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/xtime.hpp b/src/third_party/boost-1.70.0/boost/thread/xtime.hpp
index d04a0d9a379..d04a0d9a379 100644
--- a/src/third_party/boost-1.69.0/boost/thread/xtime.hpp
+++ b/src/third_party/boost-1.70.0/boost/thread/xtime.hpp
diff --git a/src/third_party/boost-1.69.0/boost/throw_exception.hpp b/src/third_party/boost-1.70.0/boost/throw_exception.hpp
index c6623e19650..c6623e19650 100644
--- a/src/third_party/boost-1.69.0/boost/throw_exception.hpp
+++ b/src/third_party/boost-1.70.0/boost/throw_exception.hpp
diff --git a/src/third_party/boost-1.70.0/boost/timer.hpp b/src/third_party/boost-1.70.0/boost/timer.hpp
new file mode 100644
index 00000000000..f3ddb41f6c1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/timer.hpp
@@ -0,0 +1,75 @@
+// boost timer.hpp header file ---------------------------------------------//
+
+// Copyright Beman Dawes 1994-99. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/timer for documentation.
+
+// Revision History
+// 01 Apr 01 Modified to use new <boost/limits.hpp> header. (JMaddock)
+// 12 Jan 01 Change to inline implementation to allow use without library
+// builds. See docs for more rationale. (Beman Dawes)
+// 25 Sep 99 elapsed_max() and elapsed_min() added (John Maddock)
+// 16 Jul 99 Second beta
+// 6 Jul 99 Initial boost version
+
+#ifndef BOOST_TIMER_HPP
+#define BOOST_TIMER_HPP
+
+#include <boost/config/header_deprecated.hpp>
+BOOST_HEADER_DEPRECATED( "the facilities in <boost/timer/timer.hpp>" )
+
+#include <boost/config.hpp>
+#include <ctime>
+#include <boost/limits.hpp>
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+ namespace std { using ::clock_t; using ::clock; }
+# endif
+
+
+namespace boost {
+
+// timer -------------------------------------------------------------------//
+
+// A timer object measures elapsed time.
+
+// It is recommended that implementations measure wall clock rather than CPU
+// time since the intended use is performance measurement on systems where
+// total elapsed time is more important than just process or CPU time.
+
+// Warnings: The maximum measurable elapsed time may well be only 596.5+ hours
+// due to implementation limitations. The accuracy of timings depends on the
+// accuracy of timing information provided by the underlying platform, and
+// this varies a great deal from platform to platform.
+
+class timer
+{
+ public:
+ timer() { _start_time = std::clock(); } // postcondition: elapsed()==0
+// timer( const timer& src ); // post: elapsed()==src.elapsed()
+// ~timer(){}
+// timer& operator=( const timer& src ); // post: elapsed()==src.elapsed()
+ void restart() { _start_time = std::clock(); } // post: elapsed()==0
+ double elapsed() const // return elapsed time in seconds
+ { return double(std::clock() - _start_time) / CLOCKS_PER_SEC; }
+
+ double elapsed_max() const // return estimated maximum value for elapsed()
+ // Portability warning: elapsed_max() may return too high a value on systems
+ // where std::clock_t overflows or resets at surprising values.
+ {
+ return (double((std::numeric_limits<std::clock_t>::max)())
+ - double(_start_time)) / double(CLOCKS_PER_SEC);
+ }
+
+ double elapsed_min() const // return minimum value for elapsed()
+ { return double(1)/double(CLOCKS_PER_SEC); }
+
+ private:
+ std::clock_t _start_time;
+}; // timer
+
+} // namespace boost
+
+#endif // BOOST_TIMER_HPP
diff --git a/src/third_party/boost-1.70.0/boost/timer/config.hpp b/src/third_party/boost-1.70.0/boost/timer/config.hpp
new file mode 100644
index 00000000000..a7c3d9d20e8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/timer/config.hpp
@@ -0,0 +1,69 @@
+// boost/timer/config.hpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 2003, 2006, 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/timer for documentation.
+
+#ifndef BOOST_TIMER_CONFIG_HPP
+#define BOOST_TIMER_CONFIG_HPP
+
+#include <boost/config.hpp>
+
+#include <boost/system/api_config.hpp>
+
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+
+// enable dynamic or static linking as requested --------------------------------------//
+
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TIMER_DYN_LINK)
+# if defined(BOOST_TIMER_SOURCE)
+# define BOOST_TIMER_DECL BOOST_SYMBOL_EXPORT
+# else
+# define BOOST_TIMER_DECL BOOST_SYMBOL_IMPORT
+# endif
+#else
+# define BOOST_TIMER_DECL
+#endif
+
+// enable automatic library variant selection ----------------------------------------//
+
+#if !defined(BOOST_TIMER_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TIMER_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_timer
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TIMER_DYN_LINK)
+# define BOOST_DYN_LINK
+#endif
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+
+// We also need to autolink to the Chrono library; even though
+// it's not used in the interface, and no Chrono header is included,
+// it's used in the implementation and is necessary in order to link
+
+#if !defined(BOOST_CHRONO_NO_LIB)
+
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
+# define BOOST_DYN_LINK
+#endif
+
+#define BOOST_LIB_NAME boost_chrono
+
+#include <boost/config/auto_link.hpp>
+
+#endif // !defined(BOOST_CHRONO_NO_LIB)
+
+#endif // auto-linking disabled
+
+#endif // BOOST_TIMER_CONFIG_HPP
diff --git a/src/third_party/boost-1.69.0/boost/timer/timer.hpp b/src/third_party/boost-1.70.0/boost/timer/timer.hpp
index 3c6492086d4..3c6492086d4 100644
--- a/src/third_party/boost-1.69.0/boost/timer/timer.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/token_functions.hpp
index e6b8bef5916..e6b8bef5916 100644
--- a/src/third_party/boost-1.69.0/boost/token_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/token_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/token_iterator.hpp b/src/third_party/boost-1.70.0/boost/token_iterator.hpp
index 42945d7ee97..42945d7ee97 100644
--- a/src/third_party/boost-1.69.0/boost/token_iterator.hpp
+++ b/src/third_party/boost-1.70.0/boost/token_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/tokenizer.hpp b/src/third_party/boost-1.70.0/boost/tokenizer.hpp
index 081e5ba2f7c..081e5ba2f7c 100644
--- a/src/third_party/boost-1.69.0/boost/tokenizer.hpp
+++ b/src/third_party/boost-1.70.0/boost/tokenizer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/tuple/detail/tuple_basic.hpp b/src/third_party/boost-1.70.0/boost/tuple/detail/tuple_basic.hpp
index 879f0e90a98..879f0e90a98 100644
--- a/src/third_party/boost-1.69.0/boost/tuple/detail/tuple_basic.hpp
+++ b/src/third_party/boost-1.70.0/boost/tuple/detail/tuple_basic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/tuple/tuple.hpp b/src/third_party/boost-1.70.0/boost/tuple/tuple.hpp
index d71e7df0afe..d71e7df0afe 100644
--- a/src/third_party/boost-1.69.0/boost/tuple/tuple.hpp
+++ b/src/third_party/boost-1.70.0/boost/tuple/tuple.hpp
diff --git a/src/third_party/boost-1.69.0/boost/tuple/tuple_comparison.hpp b/src/third_party/boost-1.70.0/boost/tuple/tuple_comparison.hpp
index 0a61952a789..0a61952a789 100644
--- a/src/third_party/boost-1.69.0/boost/tuple/tuple_comparison.hpp
+++ b/src/third_party/boost-1.70.0/boost/tuple/tuple_comparison.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type.hpp b/src/third_party/boost-1.70.0/boost/type.hpp
index ab81c916d77..ab81c916d77 100644
--- a/src/third_party/boost-1.69.0/boost/type.hpp
+++ b/src/third_party/boost-1.70.0/boost/type.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_index.hpp b/src/third_party/boost-1.70.0/boost/type_index.hpp
new file mode 100644
index 00000000000..6fccf6ee6fd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index.hpp
@@ -0,0 +1,265 @@
+//
+// Copyright (c) 2012-2019 Antony Polukhin.
+//
+// Distributed under the 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_HPP
+#define BOOST_TYPE_INDEX_HPP
+
+/// \file boost/type_index.hpp
+/// \brief Includes minimal set of headers required to use the Boost.TypeIndex library.
+///
+/// By inclusion of this file most optimal type index classes will be included and used
+/// as a boost::typeindex::type_index and boost::typeindex::type_info.
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
+# include BOOST_TYPE_INDEX_USER_TYPEINDEX
+# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
+# pragma detect_mismatch( "boost__type_index__abi", "user defined type_index class is used: " BOOST_STRINGIZE(BOOST_TYPE_INDEX_USER_TYPEINDEX))
+# endif
+#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
+# include <boost/type_index/stl_type_index.hpp>
+# if defined(BOOST_NO_RTTI) || defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)
+# include <boost/type_index/detail/stl_register_class.hpp>
+# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
+# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - typeid() is used only for templates")
+# endif
+# else
+# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
+# pragma detect_mismatch( "boost__type_index__abi", "RTTI is used")
+# endif
+# endif
+#else
+# include <boost/type_index/ctti_type_index.hpp>
+# include <boost/type_index/detail/ctti_register_class.hpp>
+# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
+# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - using CTTI")
+# endif
+#endif
+
+#ifndef BOOST_TYPE_INDEX_REGISTER_CLASS
+#define BOOST_TYPE_INDEX_REGISTER_CLASS
+#endif
+
+namespace boost { namespace typeindex {
+
+#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
+
+/// \def BOOST_TYPE_INDEX_FUNCTION_SIGNATURE
+/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is used by boost::typeindex::ctti_type_index class to
+/// deduce the name of a type. If your compiler is not recognized
+/// by the TypeIndex library and you wish to work with boost::typeindex::ctti_type_index, you may
+/// define this macro by yourself.
+///
+/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE must be defined to a compiler specific macro
+/// that outputs the \b whole function signature \b including \b template \b parameters.
+///
+/// If your compiler is not recognised and BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is not defined,
+/// then a compile-time error will arise at any attempt to use boost::typeindex::ctti_type_index classes.
+///
+/// See BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS and BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING
+/// for an information of how to tune the implementation to make a nice pretty_name() output.
+#define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE BOOST_CURRENT_FUNCTION
+
+/// \def BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING
+/// This is a helper macro for making correct pretty_names() with RTTI off.
+///
+/// BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING macro may be defined to
+/// '(begin_skip, end_skip, runtime_skip, runtime_skip_until)' with parameters for adding a
+/// support for compilers, that by default are not recognized by TypeIndex library.
+///
+/// \b Example:
+///
+/// Imagine the situation when
+/// \code boost::typeindex::ctti_type_index::type_id<int>().pretty_name() \endcode
+/// returns the following string:
+/// \code "static const char *boost::detail::ctti<int>::n() [T = int]" \endcode
+/// and \code boost::typeindex::ctti_type_index::type_id<short>().pretty_name() \endcode returns the following:
+/// \code "static const char *boost::detail::ctti<short>::n() [T = short]" \endcode
+///
+/// As we may see first 39 characters are "static const char *boost::detail::ctti<" and they do not depend on
+/// the type T. After first 39 characters we have a human readable type name which is duplicated at the end
+/// of a string. String always ends on ']', which consumes 1 character.
+///
+/// Now if we define `BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING` to
+/// `(39, 1, false, "")` we'll be getting \code "int>::n() [T = int" \endcode
+/// for `boost::typeindex::ctti_type_index::type_id<int>().pretty_name()` and \code "short>::n() [T = short" \endcode
+/// for `boost::typeindex::ctti_type_index::type_id<short>().pretty_name()`.
+///
+/// Now we need to take additional care of the characters that go before the last mention of our type. We'll
+/// do that by telling the macro that we need to cut off everything that goes before the "T = " including the "T = "
+/// itself:
+///
+/// \code (39, 1, true, "T = ") \endcode
+///
+/// In case of GCC or Clang command line we need to add the following line while compiling all the sources:
+///
+/// \code
+/// -DBOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING='(39, 1, true, "T = ")'
+/// \endcode
+/// \param begin_skip How many characters must be skipped at the beginning of the type holding string.
+/// Must be a compile time constant.
+/// \param end_skip How many characters must be skipped at the end of the type holding string.
+/// Must be a compile time constant.
+/// \param runtime_skip Do we need additional checks at runtime to cut off the more characters.
+/// Must be `true` or `false`.
+/// \param runtime_skip_until Skip all the characters before the following string (including the string itself).
+/// Must be a compile time array of characters.
+///
+/// See [RTTI emulation limitations](boost_typeindex/rtti_emulation_limitations.html) for more info.
+#define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0, 0, false, "")
+
+
+ /// Depending on a compiler flags, optimal implementation of type_index will be used
+ /// as a default boost::typeindex::type_index.
+ ///
+ /// Could be a boost::typeindex::stl_type_index, boost::typeindex::ctti_type_index or
+ /// user defined type_index class.
+ ///
+ /// \b See boost::typeindex::type_index_facade for a full description of type_index functions.
+ typedef platform_specific type_index;
+#elif defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
+ // Nothing to do
+#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
+ typedef boost::typeindex::stl_type_index type_index;
+#else
+ typedef boost::typeindex::ctti_type_index type_index;
+#endif
+
+/// Depending on a compiler flags, optimal implementation of type_info will be used
+/// as a default boost::typeindex::type_info.
+///
+/// Could be a std::type_info, boost::typeindex::detail::ctti_data or
+/// some user defined class.
+///
+/// type_info \b is \b not copyable or default constructible. It is \b not assignable too!
+typedef type_index::type_info_t type_info;
+
+#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
+
+/// \def BOOST_TYPE_INDEX_USER_TYPEINDEX
+/// BOOST_TYPE_INDEX_USER_TYPEINDEX can be defined to the path to header file
+/// with user provided implementation of type_index.
+///
+/// See [Making a custom type_index](boost_typeindex/making_a_custom_type_index.html) section
+/// of documentation for usage example.
+#define BOOST_TYPE_INDEX_USER_TYPEINDEX <full/absolute/path/to/header/with/type_index.hpp>
+
+
+/// \def BOOST_TYPE_INDEX_REGISTER_CLASS
+/// BOOST_TYPE_INDEX_REGISTER_CLASS is used to help to emulate RTTI.
+/// Put this macro into the public section of polymorphic class to allow runtime type detection.
+///
+/// Depending on the typeid() availability this macro will expand to nothing or to virtual helper function
+/// `virtual const type_info& boost_type_info_type_id_runtime_() const noexcept`.
+///
+/// \b Example:
+/// \code
+/// class A {
+/// public:
+/// BOOST_TYPE_INDEX_REGISTER_CLASS
+/// virtual ~A(){}
+/// };
+///
+/// struct B: public A {
+/// BOOST_TYPE_INDEX_REGISTER_CLASS
+/// };
+///
+/// struct C: public B {
+/// BOOST_TYPE_INDEX_REGISTER_CLASS
+/// };
+///
+/// ...
+///
+/// C c1;
+/// A* pc1 = &c1;
+/// assert(boost::typeindex::type_id<C>() == boost::typeindex::type_id_runtime(*pc1));
+/// \endcode
+#define BOOST_TYPE_INDEX_REGISTER_CLASS nothing-or-some-virtual-functions
+
+/// \def BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
+/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY is a helper macro that must be defined if mixing
+/// RTTI on/off modules. See
+/// [Mixing sources with RTTI on and RTTI off](boost_typeindex/mixing_sources_with_rtti_on_and_.html)
+/// section of documentation for more info.
+#define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
+
+#endif // defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
+
+
+/// Function to get boost::typeindex::type_index for a type T.
+/// Removes const, volatile && and & modifiers from T.
+///
+/// \b Example:
+/// \code
+/// type_index ti = type_id<int&>();
+/// std::cout << ti.pretty_name(); // Outputs 'int'
+/// \endcode
+///
+/// \tparam T Type for which type_index must be created.
+/// \throw Nothing.
+/// \return boost::typeindex::type_index with information about the specified type T.
+template <class T>
+inline type_index type_id() BOOST_NOEXCEPT {
+ return type_index::type_id<T>();
+}
+
+/// Function for constructing boost::typeindex::type_index instance for type T.
+/// Does not remove const, volatile, & and && modifiers from T.
+///
+/// If T has no const, volatile, & and && modifiers, then returns exactly
+/// the same result as in case of calling `type_id<T>()`.
+///
+/// \b Example:
+/// \code
+/// type_index ti = type_id_with_cvr<int&>();
+/// std::cout << ti.pretty_name(); // Outputs 'int&'
+/// \endcode
+///
+/// \tparam T Type for which type_index must be created.
+/// \throw Nothing.
+/// \return boost::typeindex::type_index with information about the specified type T.
+template <class T>
+inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
+ return type_index::type_id_with_cvr<T>();
+}
+
+/// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index.
+///
+/// Returns runtime information about specified type.
+///
+/// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS.
+///
+/// \b Example:
+/// \code
+/// struct Base { virtual ~Base(){} };
+/// struct Derived: public Base {};
+/// ...
+/// Derived d;
+/// Base& b = d;
+/// type_index ti = type_id_runtime(b);
+/// std::cout << ti.pretty_name(); // Outputs 'Derived'
+/// \endcode
+///
+/// \param runtime_val Variable which runtime type must be returned.
+/// \throw Nothing.
+/// \return boost::typeindex::type_index with information about the specified variable.
+template <class T>
+inline type_index type_id_runtime(const T& runtime_val) BOOST_NOEXCEPT {
+ return type_index::type_id_runtime(runtime_val);
+}
+
+}} // namespace boost::typeindex
+
+
+
+#endif // BOOST_TYPE_INDEX_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/type_index/ctti_type_index.hpp b/src/third_party/boost-1.70.0/boost/type_index/ctti_type_index.hpp
new file mode 100644
index 00000000000..27143c48456
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index/ctti_type_index.hpp
@@ -0,0 +1,213 @@
+//
+// Copyright (c) 2013-2019 Antony Polukhin.
+//
+//
+// Distributed under the 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_CTTI_TYPE_INDEX_HPP
+#define BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP
+
+/// \file ctti_type_index.hpp
+/// \brief Contains boost::typeindex::ctti_type_index class that is constexpr if C++14 constexpr is supported by compiler.
+///
+/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement
+/// for std::type_index.
+///
+/// It is used in situations when typeid() method is not available or
+/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined.
+
+#include <boost/type_index/type_index_facade.hpp>
+#include <boost/type_index/detail/compile_time_type_info.hpp>
+
+#include <cstring>
+#include <boost/container_hash/hash.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace typeindex {
+
+namespace detail {
+
+// That's the most trickiest part of the TypeIndex library:
+// 1) we do not want to give user ability to manually construct and compare `struct-that-represents-type`
+// 2) we need to distinguish between `struct-that-represents-type` and `const char*`
+// 3) we need a thread-safe way to have references to instances `struct-that-represents-type`
+// 4) we need a compile-time control to make sure that user does not copy or
+// default construct `struct-that-represents-type`
+//
+// Solution would be the following:
+
+/// \class ctti_data
+/// Standard-layout class with private constructors and assignment operators.
+///
+/// You can not work with this class directly. The purpose of this class is to hold type info
+/// \b when \b RTTI \b is \b off and allow ctti_type_index construction from itself.
+///
+/// \b Example:
+/// \code
+/// const detail::ctti_data& foo();
+/// ...
+/// type_index ti = type_index(foo());
+/// std::cout << ti.pretty_name();
+/// \endcode
+class ctti_data {
+#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
+public:
+ ctti_data() = delete;
+ ctti_data(const ctti_data&) = delete;
+ ctti_data& operator=(const ctti_data&) = delete;
+#else
+private:
+ ctti_data();
+ ctti_data(const ctti_data&);
+ ctti_data& operator=(const ctti_data&);
+#endif
+};
+
+} // namespace detail
+
+/// Helper method for getting detail::ctti_data of a template parameter T.
+template <class T>
+inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT {
+ // Standard C++11, 5.2.10 Reinterpret cast:
+ // An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue
+ // v of type "pointer to T1" is converted to the type "pointer to cv T2", the result is static_cast<cv
+ // T2*>(static_cast<cv void*>(v)) if both T1 and T2 are standard-layout types (3.9) and the alignment
+ // requirements of T2 are no stricter than those of T1, or if either type is void. Converting a prvalue of type
+ // "pointer to T1" to the type "pointer to T2" (where T1 and T2 are object types and where the alignment
+ // requirements of T2 are no stricter than those of T1) and back to its original type yields the original pointer
+ // value.
+ //
+ // Alignments are checked in `type_index_test_ctti_alignment.cpp` test.
+ return *reinterpret_cast<const detail::ctti_data*>(boost::detail::ctti<T>::n());
+}
+
+/// \class ctti_type_index
+/// This class is a wrapper that pretends to work exactly like stl_type_index, but does
+/// not require RTTI support. \b For \b description \b of \b functions \b see type_index_facade.
+///
+/// This class on C++14 compatible compilers has following functions marked as constexpr:
+/// * default constructor
+/// * copy constructors and assignemnt operations
+/// * class methods: name(), before(const ctti_type_index& rhs), equal(const ctti_type_index& rhs)
+/// * static methods type_id<T>(), type_id_with_cvr<T>()
+/// * comparison operators
+///
+/// This class produces slightly longer type names, so consider using stl_type_index
+/// in situations when typeid() is working.
+class ctti_type_index: public type_index_facade<ctti_type_index, detail::ctti_data> {
+ const char* data_;
+
+ inline std::size_t get_raw_name_length() const BOOST_NOEXCEPT;
+
+ BOOST_CXX14_CONSTEXPR inline explicit ctti_type_index(const char* data) BOOST_NOEXCEPT
+ : data_(data)
+ {}
+
+public:
+ typedef detail::ctti_data type_info_t;
+
+ BOOST_CXX14_CONSTEXPR inline ctti_type_index() BOOST_NOEXCEPT
+ : data_(boost::detail::ctti<void>::n())
+ {}
+
+ inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT
+ : data_(reinterpret_cast<const char*>(&data))
+ {}
+
+ inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline const char* raw_name() const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline const char* name() const BOOST_NOEXCEPT;
+ inline std::string pretty_name() const;
+ inline std::size_t hash_code() const BOOST_NOEXCEPT;
+
+ BOOST_CXX14_CONSTEXPR inline bool equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline bool before(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+
+ template <class T>
+ BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() BOOST_NOEXCEPT;
+
+ template <class T>
+ BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
+
+ template <class T>
+ inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT;
+};
+
+
+inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT {
+ return *reinterpret_cast<const detail::ctti_data*>(data_);
+}
+
+
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+ const char* const left = raw_name();
+ const char* const right = rhs.raw_name();
+ return /*left == right ||*/ !boost::typeindex::detail::constexpr_strcmp(left, right);
+}
+
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+ const char* const left = raw_name();
+ const char* const right = rhs.raw_name();
+ return /*left != right &&*/ boost::typeindex::detail::constexpr_strcmp(left, right) < 0;
+}
+
+
+template <class T>
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_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_t;
+ return ctti_type_index(boost::detail::ctti<no_cvr_t>::n());
+}
+
+
+
+template <class T>
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
+ return ctti_type_index(boost::detail::ctti<T>::n());
+}
+
+
+template <class T>
+inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST_NOEXCEPT {
+ return variable.boost_type_index_type_id_runtime_();
+}
+
+
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
+ return data_;
+}
+
+
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::name() const BOOST_NOEXCEPT {
+ return data_;
+}
+
+inline std::size_t ctti_type_index::get_raw_name_length() const BOOST_NOEXCEPT {
+ return std::strlen(raw_name() + detail::ctti_skip_size_at_end);
+}
+
+
+inline std::string ctti_type_index::pretty_name() const {
+ std::size_t len = get_raw_name_length();
+ while (raw_name()[len - 1] == ' ') --len; // MSVC sometimes adds whitespaces
+ return std::string(raw_name(), len);
+}
+
+
+inline std::size_t ctti_type_index::hash_code() const BOOST_NOEXCEPT {
+ return boost::hash_range(raw_name(), raw_name() + get_raw_name_length());
+}
+
+
+}} // namespace boost::typeindex
+
+#endif // BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/type_index/detail/compile_time_type_info.hpp b/src/third_party/boost-1.70.0/boost/type_index/detail/compile_time_type_info.hpp
new file mode 100644
index 00000000000..0197a0170d4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index/detail/compile_time_type_info.hpp
@@ -0,0 +1,339 @@
+//
+// Copyright (c) 2012-2019 Antony Polukhin.
+//
+//
+// Distributed under the 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_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
+#define BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
+
+/// \file compile_time_type_info.hpp
+/// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index.
+/// Not intended for inclusion from user's code.
+
+#include <cstring>
+#include <boost/config.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+/// @cond
+#if defined(__has_builtin)
+#if __has_builtin(__builtin_constant_p)
+#define BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(x) __builtin_constant_p(x)
+#endif
+#if __has_builtin(__builtin_strcmp)
+#define BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(str1, str2) __builtin_strcmp(str1, str2)
+#endif
+#elif defined(__GNUC__)
+#define BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(x) __builtin_constant_p(x)
+#define BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(str1, str2) __builtin_strcmp(str1, str2)
+#endif
+
+#define BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(begin_skip, end_skip, runtime_skip, runtime_skip_until) \
+ namespace boost { namespace typeindex { namespace detail { \
+ BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_begin = begin_skip; \
+ BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_end = end_skip; \
+ BOOST_STATIC_CONSTEXPR bool ctti_skip_more_at_runtime = runtime_skip; \
+ BOOST_STATIC_CONSTEXPR char ctti_skip_until_runtime[] = runtime_skip_until; \
+ }}} /* namespace boost::typeindex::detail */ \
+ /**/
+/// @endcond
+
+
+#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
+ /* Nothing to document. All the macro docs are moved to <boost/type_index.hpp> */
+#elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING)
+# include <boost/preprocessor/facilities/expand.hpp>
+ BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING )
+#elif defined(_MSC_VER) && !defined(__clang__) && defined (BOOST_NO_CXX11_NOEXCEPT)
+ // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, "")
+#elif defined(_MSC_VER) && !defined(__clang__) && !defined (BOOST_NO_CXX11_NOEXCEPT)
+ // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void) noexcept") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 19, false, "")
+#elif defined(__clang__) && defined(__APPLE__)
+ // Someone made __clang_major__ equal to LLVM version rather than compiler version
+ // on APPLE platform.
+ //
+ // Using less efficient solution because there is no good way to detect real version of Clang.
+ // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "???????????>::n() [T = int"
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
+#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ == 0))
+ // sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1
+ // note: checked on 3.0
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, "")
+#elif defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ > 0))
+ // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int"
+ // note: checked on 3.1, 3.4
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
+#elif defined(__EDG__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static cha boost::detail::ctti<T>::s() [with I = 40U, T = ") - 1, sizeof("]") - 1
+ // note: checked on 4.14
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(58, 1, false, "")
+#elif defined(__EDG__) && defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static const char *boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
+ // note: checked on 4.14
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
+#elif defined(__GNUC__) && (__GNUC__ < 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0u; T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(81, 1, false, "")
+#elif defined(__GNUC__) && (__GNUC__ >= 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0; T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(80, 1, false, "")
+#elif defined(__GNUC__) && defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static const char* boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
+#elif defined(__ghs__)
+ // sizeof("static const char *boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
+#else
+ // Deafult code for other platforms... Just skip nothing!
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(0, 0, false, "")
+#endif
+
+#undef BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS
+
+namespace boost { namespace typeindex { namespace detail {
+ template <bool Condition>
+ BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(
+ Condition,
+ "TypeIndex library is misconfigured for your compiler. "
+ "Please define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct values. See section "
+ "'RTTI emulation limitations' of the documentation for more information."
+ );
+ }
+
+ template <class T>
+ BOOST_CXX14_CONSTEXPR inline void failed_to_get_function_name() BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(
+ sizeof(T) && false,
+ "TypeIndex library could not detect your compiler. "
+ "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
+ "correct compiler macro for getting the whole function name. "
+ "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that."
+ );
+ }
+
+#if defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT)
+ BOOST_CXX14_CONSTEXPR BOOST_FORCEINLINE bool is_constant_string(const char* str) BOOST_NOEXCEPT {
+ while (BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(*str)) {
+ if (*str == '\0')
+ return true;
+ ++str;
+ }
+ return false;
+ }
+#endif // defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT)
+
+ template <unsigned int ArrayLength>
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::false_type) BOOST_NOEXCEPT {
+ return begin;
+ }
+
+ template<class ForwardIterator1, class ForwardIterator2>
+ BOOST_CXX14_CONSTEXPR inline ForwardIterator1 constexpr_search(
+ ForwardIterator1 first1,
+ ForwardIterator1 last1,
+ ForwardIterator2 first2,
+ ForwardIterator2 last2) BOOST_NOEXCEPT
+ {
+ if (first2 == last2) {
+ return first1; // specified in C++11
+ }
+
+ while (first1 != last1) {
+ ForwardIterator1 it1 = first1;
+ ForwardIterator2 it2 = first2;
+
+ while (*it1 == *it2) {
+ ++it1;
+ ++it2;
+ if (it2 == last2) return first1;
+ if (it1 == last1) return last1;
+ }
+
+ ++first1;
+ }
+
+ return last1;
+ }
+
+ BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp_loop(const char *v1, const char *v2) BOOST_NOEXCEPT {
+ while (*v1 != '\0' && *v1 == *v2) {
+ ++v1;
+ ++v2;
+ }
+
+ return static_cast<int>(*v1) - *v2;
+ }
+
+ BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) BOOST_NOEXCEPT {
+#if !defined(BOOST_NO_CXX14_CONSTEXPR) && defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT) && defined(BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP)
+ if (boost::typeindex::detail::is_constant_string(v1) && boost::typeindex::detail::is_constant_string(v2))
+ return boost::typeindex::detail::constexpr_strcmp_loop(v1, v2);
+ return BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(v1, v2);
+#elif !defined(BOOST_NO_CXX14_CONSTEXPR)
+ return boost::typeindex::detail::constexpr_strcmp_loop(v1, v2);
+#else
+ return std::strcmp(v1, v2);
+#endif
+ }
+
+ template <unsigned int ArrayLength>
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::true_type) BOOST_NOEXCEPT {
+ const char* const it = constexpr_search(
+ begin, begin + ArrayLength,
+ ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1
+ );
+ return (it == begin + ArrayLength ? begin : it + sizeof(ctti_skip_until_runtime) - 1);
+ }
+
+ template <unsigned int ArrayLength>
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
+ assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>();
+ return skip_begining_runtime<ArrayLength - ctti_skip_size_at_begin>(
+ begin + ctti_skip_size_at_begin,
+ boost::integral_constant<bool, ctti_skip_more_at_runtime>()
+ );
+ }
+
+#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ template <unsigned int... I>
+ struct index_seq {};
+
+ template <typename Left, typename Right>
+ struct make_index_sequence_join;
+
+ template <unsigned int... Left, unsigned int... Right>
+ struct make_index_sequence_join<index_seq<Left...>, index_seq<Right...> > {
+ typedef index_seq<Left..., Right...> type;
+ };
+
+ template <unsigned int C, unsigned int D>
+ struct make_index_seq_impl {
+ typedef typename make_index_sequence_join<
+ typename make_index_seq_impl<C, D / 2>::type,
+ typename make_index_seq_impl<C + D / 2, (D + 1) / 2>::type
+ >::type type;
+ };
+
+ template <unsigned int C>
+ struct make_index_seq_impl<C, 0> {
+ typedef index_seq<> type;
+ };
+
+ template <unsigned int C>
+ struct make_index_seq_impl<C, 1> {
+ typedef index_seq<C> type;
+ };
+
+ template <char... C>
+ struct cstring {
+ static constexpr unsigned int size_ = sizeof...(C);
+ static constexpr char data_[size_] = { C... };
+ };
+
+ template <char... C>
+ constexpr char cstring<C...>::data_[];
+#endif
+
+}}} // namespace boost::typeindex::detail
+
+namespace boost { namespace detail {
+
+/// Noncopyable type_info that does not require RTTI.
+/// CTTI == Compile Time Type Info.
+/// This name must be as short as possible, to avoid code bloat
+template <class T>
+struct ctti {
+
+#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ //helper functions
+ template <unsigned int I>
+ constexpr static char s() BOOST_NOEXCEPT { // step
+ constexpr unsigned int offset =
+ (I >= 10u ? 1u : 0u)
+ + (I >= 100u ? 1u : 0u)
+ + (I >= 1000u ? 1u : 0u)
+ + (I >= 10000u ? 1u : 0u)
+ + (I >= 100000u ? 1u : 0u)
+ + (I >= 1000000u ? 1u : 0u)
+ ;
+
+ #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
+ return BOOST_TYPE_INDEX_FUNCTION_SIGNATURE[I + offset];
+ #elif defined(__FUNCSIG__)
+ return __FUNCSIG__[I + offset];
+ #else
+ return __PRETTY_FUNCTION__[I + offset];
+ #endif
+ }
+
+ template <unsigned int ...Indexes>
+ constexpr static const char* impl(::boost::typeindex::detail::index_seq<Indexes...> ) BOOST_NOEXCEPT {
+ return ::boost::typeindex::detail::cstring<s<Indexes>()...>::data_;
+ }
+
+ template <unsigned int D = 0> // `D` means `Dummy`
+ constexpr static const char* n() BOOST_NOEXCEPT {
+ #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
+ constexpr unsigned int size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
+ #elif defined(__FUNCSIG__)
+ constexpr unsigned int size = sizeof(__FUNCSIG__);
+ #elif defined(__PRETTY_FUNCTION__) \
+ || defined(__GNUC__) \
+ || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
+ || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
+ || (defined(__ICC) && (__ICC >= 600)) \
+ || defined(__ghs__) \
+ || defined(__DMC__)
+ constexpr unsigned int size = sizeof(__PRETTY_FUNCTION__);
+ #else
+ boost::typeindex::detail::failed_to_get_function_name<T>();
+ #endif
+
+ boost::typeindex::detail::assert_compile_time_legths<
+ (size > boost::typeindex::detail::ctti_skip_size_at_begin + boost::typeindex::detail::ctti_skip_size_at_end + sizeof("const *") - 1)
+ >();
+ static_assert(!boost::typeindex::detail::ctti_skip_more_at_runtime, "Skipping for GCC in C++14 mode is unsupported");
+
+ typedef typename boost::typeindex::detail::make_index_seq_impl<
+ boost::typeindex::detail::ctti_skip_size_at_begin,
+ size - sizeof("const *") + 1 - boost::typeindex::detail::ctti_skip_size_at_begin
+ >::type idx_seq;
+ return impl(idx_seq());
+ }
+#else
+ /// Returns raw name. Must be as short, as possible, to avoid code bloat
+ BOOST_CXX14_CONSTEXPR static const char* n() BOOST_NOEXCEPT {
+ #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
+ return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
+ #elif defined(__FUNCSIG__)
+ return boost::typeindex::detail::skip_begining< sizeof(__FUNCSIG__) >(__FUNCSIG__);
+ #elif defined(__PRETTY_FUNCTION__) \
+ || defined(__GNUC__) \
+ || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
+ || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
+ || (defined(__ICC) && (__ICC >= 600)) \
+ || defined(__ghs__) \
+ || defined(__DMC__) \
+ || defined(__clang__)
+ return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__);
+ #else
+ boost::typeindex::detail::failed_to_get_function_name<T>();
+ return "";
+ #endif
+ }
+#endif
+};
+
+}} // namespace boost::detail
+
+#endif // BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
diff --git a/src/third_party/boost-1.70.0/boost/type_index/detail/ctti_register_class.hpp b/src/third_party/boost-1.70.0/boost/type_index/detail/ctti_register_class.hpp
new file mode 100644
index 00000000000..4879cea2965
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index/detail/ctti_register_class.hpp
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2013-2019 Antony Polukhin.
+//
+//
+// Distributed under the 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_CTTI_REGISTER_CLASS_HPP
+#define BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
+
+/// \file ctti_register_class.hpp
+/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::ctti_type_index.
+/// Not intended for inclusion from user's code.
+
+#include <boost/type_index/ctti_type_index.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace typeindex { namespace detail {
+
+template <class T>
+inline const ctti_data& ctti_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
+ return ctti_construct<T>();
+}
+
+}}} // namespace boost::typeindex::detail
+
+/// @cond
+#define BOOST_TYPE_INDEX_REGISTER_CLASS \
+ virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
+ return boost::typeindex::detail::ctti_construct_typeid_ref(this); \
+ } \
+/**/
+/// @endcond
+
+#endif // BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/type_index/detail/stl_register_class.hpp b/src/third_party/boost-1.70.0/boost/type_index/detail/stl_register_class.hpp
new file mode 100644
index 00000000000..ab6c7cfb60a
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index/detail/stl_register_class.hpp
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2013-2019 Antony Polukhin.
+//
+//
+// Distributed under the 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_REGISTER_CLASS_HPP
+#define BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP
+
+/// \file stl_register_class.hpp
+/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::stl_type_index.
+/// Not intended for inclusion from user's code.
+
+#include <boost/type_index/stl_type_index.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace typeindex { namespace detail {
+
+template <class T>
+inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
+ return typeid(T);
+}
+
+}}} // namespace boost::typeindex::detail
+
+/// @cond
+#define BOOST_TYPE_INDEX_REGISTER_CLASS \
+ virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
+ return boost::typeindex::detail::stl_construct_typeid_ref(this); \
+ } \
+/**/
+/// @endcond
+
+#endif // BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/type_index/stl_type_index.hpp b/src/third_party/boost-1.70.0/boost/type_index/stl_type_index.hpp
new file mode 100644
index 00000000000..7d39cd09350
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index/stl_type_index.hpp
@@ -0,0 +1,278 @@
+//
+// Copyright (c) 2013-2019 Antony Polukhin.
+//
+//
+// Distributed under the 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.70.0/boost/type_index/type_index_facade.hpp b/src/third_party/boost-1.70.0/boost/type_index/type_index_facade.hpp
new file mode 100644
index 00000000000..1cb929f6201
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_index/type_index_facade.hpp
@@ -0,0 +1,297 @@
+//
+// Copyright (c) 2013-2019 Antony Polukhin.
+//
+//
+// Distributed under the 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_TYPE_INDEX_FACADE_HPP
+#define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
+
+#include <boost/config.hpp>
+#include <boost/container_hash/hash_fwd.hpp>
+#include <string>
+#include <cstring>
+
+#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_NO_IOSFWD)
+#include <iosfwd> // for std::basic_ostream
+#else
+#include <ostream>
+#endif
+#endif
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace typeindex {
+
+/// \class type_index_facade
+///
+/// This class takes care about the comparison operators, hash functions and
+/// ostream operators. Use this class as a public base class for defining new
+/// type_info-conforming classes.
+///
+/// \b Example:
+/// \code
+/// class stl_type_index: public type_index_facade<stl_type_index, std::type_info>
+/// {
+/// public:
+/// typedef std::type_info type_info_t;
+/// private:
+/// const type_info_t* data_;
+///
+/// public:
+/// stl_type_index(const type_info_t& data) noexcept
+/// : data_(&data)
+/// {}
+/// // ...
+/// };
+/// \endcode
+///
+/// \tparam Derived Class derived from type_index_facade.
+/// \tparam TypeInfo Class that will be used as a base type_info class.
+/// \note Take a look at the protected methods. They are \b not \b defined in type_index_facade.
+/// Protected member functions raw_name() \b must be defined in Derived class. All the other
+/// methods are mandatory.
+/// \see 'Making a custom type_index' section for more information about
+/// creating your own type_index using type_index_facade.
+template <class Derived, class TypeInfo>
+class type_index_facade {
+private:
+ /// @cond
+ BOOST_CXX14_CONSTEXPR const Derived & derived() const BOOST_NOEXCEPT {
+ return *static_cast<Derived const*>(this);
+ }
+ /// @endcond
+public:
+ typedef TypeInfo type_info_t;
+
+ /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
+ /// \return Name of a type. By default returns Derived::raw_name().
+ inline const char* name() const BOOST_NOEXCEPT {
+ return derived().raw_name();
+ }
+
+ /// \b Override: This function \b may be redefined in Derived class. Overrides may throw.
+ /// \return Human readable type name. By default returns Derived::name().
+ inline std::string pretty_name() const {
+ return derived().name();
+ }
+
+ /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
+ /// \return True if two types are equal. By default compares types by raw_name().
+ inline bool equal(const Derived& rhs) const BOOST_NOEXCEPT {
+ const char* const left = derived().raw_name();
+ const char* const right = rhs.raw_name();
+ return left == right || !std::strcmp(left, right);
+ }
+
+ /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
+ /// \return True if rhs is greater than this. By default compares types by raw_name().
+ inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
+ const char* const left = derived().raw_name();
+ const char* const right = rhs.raw_name();
+ return left != right && std::strcmp(left, right) < 0;
+ }
+
+ /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
+ /// \return Hash code of a type. By default hashes types by raw_name().
+ /// \note Derived class header \b must include <boost/container_hash/hash.hpp>, \b unless this function is redefined in
+ /// Derived class to not use boost::hash_range().
+ inline std::size_t hash_code() const BOOST_NOEXCEPT {
+ const char* const name_raw = derived().raw_name();
+ return boost::hash_range(name_raw, name_raw + std::strlen(name_raw));
+ }
+
+#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
+protected:
+ /// \b Override: This function \b must be redefined in Derived class. Overrides \b must not throw.
+ /// \return Pointer to unredable/raw type name.
+ inline const char* raw_name() const BOOST_NOEXCEPT;
+
+ /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
+ /// \return Const reference to underlying low level type_info_t.
+ inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+
+ /// This is a factory method that is used to create instances of Derived classes.
+ /// boost::typeindex::type_id() will call this method, if Derived has same type as boost::typeindex::type_index.
+ ///
+ /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw.
+ /// Overrides \b must remove const, volatile && and & modifiers from T.
+ /// \tparam T Type for which type_index must be created.
+ /// \return type_index for type T.
+ template <class T>
+ static Derived type_id() BOOST_NOEXCEPT;
+
+ /// This is a factory method that is used to create instances of Derived classes.
+ /// boost::typeindex::type_id_with_cvr() will call this method, if Derived has same type as boost::typeindex::type_index.
+ ///
+ /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw.
+ /// Overrides \b must \b not remove const, volatile && and & modifiers from T.
+ /// \tparam T Type for which type_index must be created.
+ /// \return type_index for type T.
+ template <class T>
+ static Derived type_id_with_cvr() BOOST_NOEXCEPT;
+
+ /// This is a factory method that is used to create instances of Derived classes.
+ /// boost::typeindex::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeindex::type_index.
+ ///
+ /// \b Override: This function \b may be redefined and made public in Derived class.
+ /// \param variable Variable which runtime type will be stored in type_index.
+ /// \return type_index with runtime type of variable.
+ template <class T>
+ static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT;
+
+#endif
+
+};
+
+/// @cond
+template <class Derived, class TypeInfo>
+BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return static_cast<Derived const&>(lhs).equal(static_cast<Derived const&>(rhs));
+}
+
+template <class Derived, class TypeInfo>
+BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));
+}
+
+
+
+template <class Derived, class TypeInfo>
+BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return rhs < lhs;
+}
+
+template <class Derived, class TypeInfo>
+BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return !(lhs > rhs);
+}
+
+template <class Derived, class TypeInfo>
+BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return !(lhs < rhs);
+}
+
+template <class Derived, class TypeInfo>
+BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return !(lhs == rhs);
+}
+
+// ######################### COMPARISONS with Derived ############################ //
+template <class Derived, class TypeInfo>
+inline bool operator == (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return Derived(lhs) == rhs;
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator < (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return Derived(lhs) < rhs;
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator > (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return rhs < Derived(lhs);
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator <= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return !(Derived(lhs) > rhs);
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator >= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return !(Derived(lhs) < rhs);
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator != (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return !(Derived(lhs) == rhs);
+}
+
+
+template <class Derived, class TypeInfo>
+inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+ return lhs == Derived(rhs);
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+ return lhs < Derived(rhs);
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+ return Derived(rhs) < lhs;
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+ return !(lhs > Derived(rhs));
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+ return !(lhs < Derived(rhs));
+}
+
+template <class Derived, class TypeInfo>
+inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+ return !(lhs == Derived(rhs));
+}
+
+// ######################### COMPARISONS with Derived END ############################ //
+
+/// @endcond
+
+#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
+
+/// noexcept comparison operators for type_index_facade classes.
+bool operator ==, !=, <, ... (const type_index_facade& lhs, const type_index_facade& rhs) noexcept;
+
+/// noexcept comparison operators for type_index_facade and it's TypeInfo classes.
+bool operator ==, !=, <, ... (const type_index_facade& lhs, const TypeInfo& rhs) noexcept;
+
+/// noexcept comparison operators for type_index_facade's TypeInfo and type_index_facade classes.
+bool operator ==, !=, <, ... (const TypeInfo& lhs, const type_index_facade& rhs) noexcept;
+
+#endif
+
+#ifndef BOOST_NO_IOSTREAM
+#ifdef BOOST_NO_TEMPLATED_IOSTREAMS
+/// @cond
+/// Ostream operator that will output demangled name
+template <class Derived, class TypeInfo>
+inline std::ostream& operator<<(std::ostream& ostr, const type_index_facade<Derived, TypeInfo>& ind) {
+ ostr << static_cast<Derived const&>(ind).pretty_name();
+ return ostr;
+}
+/// @endcond
+#else
+/// Ostream operator that will output demangled name.
+template <class CharT, class TriatT, class Derived, class TypeInfo>
+inline std::basic_ostream<CharT, TriatT>& operator<<(
+ std::basic_ostream<CharT, TriatT>& ostr,
+ const type_index_facade<Derived, TypeInfo>& ind)
+{
+ ostr << static_cast<Derived const&>(ind).pretty_name();
+ return ostr;
+}
+#endif // BOOST_NO_TEMPLATED_IOSTREAMS
+#endif // BOOST_NO_IOSTREAM
+
+/// This free function is used by Boost's unordered containers.
+/// \note <boost/container_hash/hash.hpp> has to be included if this function is used.
+template <class Derived, class TypeInfo>
+inline std::size_t hash_value(const type_index_facade<Derived, TypeInfo>& lhs) BOOST_NOEXCEPT {
+ return static_cast<Derived const&>(lhs).hash_code();
+}
+
+}} // namespace boost::typeindex
+
+#endif // BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
+
diff --git a/src/third_party/boost-1.70.0/boost/type_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits.hpp
new file mode 100644
index 00000000000..d61d5d73b70
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits.hpp
@@ -0,0 +1,157 @@
+// (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/copy_cv_ref.hpp>
+#include <boost/type_traits/copy_reference.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.69.0/boost/type_traits/add_const.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_const.hpp
index 2d60118276c..2d60118276c 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_const.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_const.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/add_cv.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_cv.hpp
index 425d019bf6c..425d019bf6c 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_cv.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_cv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/add_lvalue_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_lvalue_reference.hpp
index 26b74e67ca3..26b74e67ca3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_lvalue_reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_lvalue_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/add_pointer.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_pointer.hpp
index 85ad33a8d97..85ad33a8d97 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/add_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_reference.hpp
index 33e9bc79bea..33e9bc79bea 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/add_rvalue_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_rvalue_reference.hpp
index ad64894f777..ad64894f777 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_rvalue_reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_rvalue_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/add_volatile.hpp b/src/third_party/boost-1.70.0/boost/type_traits/add_volatile.hpp
index 253751a578e..253751a578e 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/add_volatile.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/add_volatile.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/aligned_storage.hpp b/src/third_party/boost-1.70.0/boost/type_traits/aligned_storage.hpp
index 171f5d450b0..171f5d450b0 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/aligned_storage.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/aligned_storage.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/alignment_of.hpp b/src/third_party/boost-1.70.0/boost/type_traits/alignment_of.hpp
index 7d960e31840..7d960e31840 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/alignment_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/alignment_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/common_type.hpp b/src/third_party/boost-1.70.0/boost/type_traits/common_type.hpp
index 7136d3eed26..7136d3eed26 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/common_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/common_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/composite_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/composite_traits.hpp
index 985a4c51d32..985a4c51d32 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/composite_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/composite_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/conditional.hpp b/src/third_party/boost-1.70.0/boost/type_traits/conditional.hpp
index ec31d8b0bbf..ec31d8b0bbf 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/conditional.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/conditional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/conversion_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/conversion_traits.hpp
index c8e5139b30d..c8e5139b30d 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/conversion_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/conversion_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/copy_cv.hpp b/src/third_party/boost-1.70.0/boost/type_traits/copy_cv.hpp
index 2f3dc37adc2..2f3dc37adc2 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/copy_cv.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/copy_cv.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/copy_cv_ref.hpp b/src/third_party/boost-1.70.0/boost/type_traits/copy_cv_ref.hpp
new file mode 100644
index 00000000000..59cbc66e998
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/copy_cv_ref.hpp
@@ -0,0 +1,31 @@
+/*
+Copyright 2019 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_COPY_CV_REF_HPP_INCLUDED
+#define BOOST_TT_COPY_CV_REF_HPP_INCLUDED
+
+#include <boost/type_traits/copy_cv.hpp>
+#include <boost/type_traits/copy_reference.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost {
+
+template<class T, class U>
+struct copy_cv_ref {
+ typedef typename copy_reference<typename copy_cv<T,
+ typename remove_reference<U>::type >::type, U>::type type;
+};
+
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+template<class T, class U>
+using copy_cv_ref_t = typename copy_cv_ref<T, U>::type;
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/copy_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/copy_reference.hpp
new file mode 100644
index 00000000000..005668142a4
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/copy_reference.hpp
@@ -0,0 +1,35 @@
+/*
+Copyright 2019 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_COPY_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_COPY_REFERENCE_HPP_INCLUDED
+
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/type_traits/add_rvalue_reference.hpp>
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/conditional.hpp>
+
+namespace boost {
+
+template<class T, class U>
+struct copy_reference {
+ typedef typename conditional<is_rvalue_reference<U>::value,
+ typename add_rvalue_reference<T>::type,
+ typename conditional<is_lvalue_reference<U>::value,
+ typename add_lvalue_reference<T>::type, T>::type>::type type;
+};
+
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+template<class T, class U>
+using copy_reference_t = typename copy_reference<T, U>::type;
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/cv_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/cv_traits.hpp
index 5bd6c4f0666..5bd6c4f0666 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/cv_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/cv_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/decay.hpp b/src/third_party/boost-1.70.0/boost/type_traits/decay.hpp
index 5b28d052fcd..5b28d052fcd 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/decay.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/decay.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/declval.hpp b/src/third_party/boost-1.70.0/boost/type_traits/declval.hpp
index a050012eb55..a050012eb55 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/declval.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/declval.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/bool_trait_undef.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/bool_trait_undef.hpp
index 4ac61ef2e72..4ac61ef2e72 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/bool_trait_undef.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/bool_trait_undef.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/common_arithmetic_type.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/common_arithmetic_type.hpp
index 1a76e16d3ff..1a76e16d3ff 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/common_arithmetic_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/common_arithmetic_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/common_type_impl.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/common_type_impl.hpp
index 53a634d4dfe..53a634d4dfe 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/common_type_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/common_type_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_member_pointer_type.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/composite_member_pointer_type.hpp
index a747ee4db64..a747ee4db64 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_member_pointer_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/composite_member_pointer_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_pointer_type.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/composite_pointer_type.hpp
index ae21e18adee..ae21e18adee 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_pointer_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/composite_pointer_type.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/config.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/config.hpp
new file mode 100644
index 00000000000..00970f214f3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/config.hpp
@@ -0,0 +1,99 @@
+
+// (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, < 40805)\
+ && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
+# define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
+#endif
+
+#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
+# define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM
+#endif
+#if defined(__APPLE_CC__) && defined(__clang_major__) && (__clang_major__ == 9) && (__clang_minor__ == 0)
+# define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM
+# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
+#endif
+
+#endif // BOOST_TT_CONFIG_HPP_INCLUDED
+
+
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/detector.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/detector.hpp
new file mode 100644
index 00000000000..f13a1f94270
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/detector.hpp
@@ -0,0 +1,37 @@
+/*
+Copyright 2017-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_DETAIL_DETECTOR_HPP_INCLUDED
+#define BOOST_TT_DETAIL_DETECTOR_HPP_INCLUDED
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/make_void.hpp>
+
+namespace boost {
+namespace detail {
+
+template<class T>
+using detector_t = typename boost::make_void<T>::type;
+
+template<class Default, class, template<class...> class, class...>
+struct detector {
+ using value_t = boost::false_type;
+ using type = Default;
+};
+
+template<class Default, template<class...> class Op, class... Args>
+struct detector<Default, detector_t<Op<Args...> >, Op, Args...> {
+ using value_t = boost::true_type;
+ using type = Op<Args...>;
+};
+
+} /* detail */
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/has_binary_operator.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/has_binary_operator.hpp
new file mode 100644
index 00000000000..7e74705eb35
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/has_binary_operator.hpp
@@ -0,0 +1,279 @@
+// (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>
+
+// 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 C4018: '<' : signed/unsigned mismatch
+// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+// warning C4804: '<' : unsafe use of type 'bool' in operation
+// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
+# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+# pragma warning ( disable : 6334)
+# endif
+#endif
+
+#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 U, class Ret, class = void>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {};
+
+ template <class T, class U, class Ret>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>()), Ret>::value> {};
+
+ template <class T, class U, class = void >
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {};
+
+ template <class T, class U>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())>::value> {};
+
+ template <class T, class U, class = void>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {};
+
+ template <class T, class U>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::true_type {};
+
+ }
+
+ template <class T, class U = 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, U, Ret> {};
+ template <class T, class U>
+ struct BOOST_TT_TRAIT_NAME<T, U, void> : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) <T, U> {};
+ template <class T, class U>
+ struct BOOST_TT_TRAIT_NAME<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) <T, U> {};
+
+
+}
+
+#else
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_convertible.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>
+#include <boost/type_traits/detail/is_likely_lambda.hpp>
+
+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&, const any&);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Lhs!=void and 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
+// (lhs 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 -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs 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 Lhs, 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((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Lhs!=void and Rhs!=void
+
+struct dont_care { };
+
+template < typename Lhs, typename Rhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, dont_care, true > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, dont_care, false > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, void, true > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, void, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct operator_returns_Ret < Lhs, 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 Lhs, typename Rhs, typename Ret >
+struct operator_returns_Ret < Lhs, 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(make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Lhs!=void and 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 Lhs, 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(((make<Lhs>() 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(Lhs, Rhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
+// (would yield compilation error if used)
+// - false otherwise
+template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl1 < Lhs, Rhs, Ret, true > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl1 < Lhs, Rhs, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool,
+ value = (operator_exists < Lhs, Rhs >::value && operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value));
+};
+
+// some specializations needs to be declared for the special void case
+template < typename Rhs, typename Ret >
+struct trait_impl1 < void, Rhs, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, void, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Ret >
+struct trait_impl1 < void, void, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl {
+ typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
+ typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
+ typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
+ typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
+ typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
+ 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 < Lhs_noref, 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 Lhs, class Rhs=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, Rhs, Ret >::value)>{};
+
+} // namespace boost
+
+#endif
+
+#if defined(BOOST_MSVC)
+# pragma warning ( pop )
+#endif
+
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/has_postfix_operator.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/has_postfix_operator.hpp
new file mode 100644
index 00000000000..d900acd3d43
--- /dev/null
+++ b/src/third_party/boost-1.70.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 = void>
+ 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, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP) >::type>
+ : 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 = void >
+ 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, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>()BOOST_TT_TRAIT_OP)>::type>
+ : 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 = void>
+ 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, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP)>::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> {};
+
+
+}
+
+#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.70.0/boost/type_traits/detail/has_prefix_operator.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/has_prefix_operator.hpp
new file mode 100644
index 00000000000..77818c20fb6
--- /dev/null
+++ b/src/third_party/boost-1.70.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 = void>
+ 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, typename boost::make_void<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>()) >::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 = void >
+ 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, typename boost::make_void<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>())>::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 = void>
+ 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, typename boost::make_void<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>() )>::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.70.0/boost/type_traits/detail/is_function_cxx_03.hpp
index d3e4f936591..d3e4f936591 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_03.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_cxx_03.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_cxx_11.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_cxx_11.hpp
new file mode 100644
index 00000000000..432af4eccdb
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_cxx_11.hpp
@@ -0,0 +1,573 @@
+
+// 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(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM)
+#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 {};
+
+#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
+#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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ 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
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ 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
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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 {};
+#ifndef __CLR_VER
+ 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
+#endif
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+#endif // _MSC_VER
+
+ // All over again for msvc with noexcept:
+
+#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE)
+
+#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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ // 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+#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.70.0/boost/type_traits/detail/is_function_msvc10_fix.hpp
index ec8ba9ad32e..ec8ba9ad32e 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_msvc10_fix.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_msvc10_fix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_helper.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_helper.hpp
index 73a705cc33a..73a705cc33a 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_helper.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_helper.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_tester.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_tester.hpp
new file mode 100644
index 00000000000..41ddd2260f2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_function_ptr_tester.hpp
@@ -0,0 +1,609 @@
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
+// Aleksey Gurtovoy, 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.
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
+#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+
+#if defined(BOOST_TT_PREPROCESSING_MODE)
+//
+// Hide include dependencies from analysers since they're
+// only require in maintenance mode:
+//
+#define PP1 <boost/preprocessor/iterate.hpp>
+#define PP2 <boost/preprocessor/enum_params.hpp>
+#define PP3 <boost/preprocessor/comma_if.hpp>
+#include PP1
+#include PP2
+#include PP3
+#undef PP1
+#undef PP2
+#undef PP3
+#endif
+
+namespace boost {
+namespace type_traits {
+
+// Note it is acceptable to use ellipsis here, since the argument will
+// always be a pointer type of some sort (JM 2005/06/04):
+no_type BOOST_TT_DECL is_function_ptr_tester(...);
+
+#if !defined(BOOST_TT_PREPROCESSING_MODE)
+// pre-processed code, don't edit, try GNU cpp with
+// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename
+
+template <class R >
+yes_type is_function_ptr_tester(R(*)());
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R >
+yes_type is_function_ptr_tester(R(*)(...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R >
+yes_type is_function_ptr_tester(R(__stdcall*)());
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R >
+yes_type is_function_ptr_tester(R(__vectorcall*)());
+#endif
+#ifndef _MANAGED
+template <class R >
+yes_type is_function_ptr_tester(R(__fastcall*)());
+#endif
+template <class R >
+yes_type is_function_ptr_tester(R(__cdecl*)());
+#endif
+template <class R, class T0 >
+yes_type is_function_ptr_tester(R(*)(T0));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0 >
+yes_type is_function_ptr_tester(R(*)(T0 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0));
+#endif
+#ifndef _MANAGED
+template <class R, class T0 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0));
+#endif
+template <class R, class T0 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0));
+#endif
+template <class R, class T0, class T1 >
+yes_type is_function_ptr_tester(R(*)(T0, T1));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1 >
+yes_type is_function_ptr_tester(R(*)(T0, T1 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1));
+#endif
+template <class R, class T0, class T1 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1));
+#endif
+template <class R, class T0, class T1, class T2 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2));
+#endif
+template <class R, class T0, class T1, class T2 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2));
+#endif
+template <class R, class T0, class T1, class T2, class T3 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3));
+#endif
+template <class R, class T0, class T1, class T2, class T3 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...));
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+#endif
+#ifndef _MANAGED
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+#endif
+template <class R, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+#endif
+#else
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+ (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp"))
+#include BOOST_PP_ITERATE()
+
+#endif // BOOST_TT_PREPROCESSING_MODE
+
+} // namespace type_traits
+} // namespace boost
+
+#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED
+
+///// iteration
+
+#else
+#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1)
+#undef __stdcall
+#undef __fastcall
+#undef __cdecl
+
+template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...));
+@#endif
+@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+@#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, class T) >
+yes_type is_function_ptr_tester(R(__vectorcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, T)));
+@#endif
+@#ifndef _MANAGED
+template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+@#endif
+template <class R BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+@#endif
+
+#undef BOOST_PP_COUNTER
+#endif // BOOST_PP_IS_ITERATING
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/is_likely_lambda.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_likely_lambda.hpp
new file mode 100644
index 00000000000..21810dda40f
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_likely_lambda.hpp
@@ -0,0 +1,95 @@
+/* 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)\
+ && !(BOOST_WORKAROUND(BOOST_MSVC, == 1900) && defined(__CLR_VER))
+
+#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.69.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
index dcc6e2a0a1a..dcc6e2a0a1a 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
new file mode 100644
index 00000000000..2de883ffb1c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
@@ -0,0 +1,1603 @@
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes,
+// Aleksey Gurtovoy, 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.
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
+#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/detail/config.hpp>
+
+#if defined(BOOST_TT_PREPROCESSING_MODE)
+//
+// Maintentance mode, hide include dependencies
+// from dependency trackers:
+//
+#define PPI <boost/preprocessor/iterate.hpp>
+#include PPI
+#undef PPI
+#define PPI <boost/preprocessor/enum_params.hpp>
+#include PPI
+#undef PPI
+#define PPI <boost/preprocessor/comma_if.hpp>
+#include PPI
+#undef PPI
+#endif
+
+namespace boost {
+namespace type_traits {
+
+no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...);
+
+#if !defined(BOOST_TT_PREPROCESSING_MODE)
+// pre-processed code, don't edit, try GNU cpp with
+// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename
+
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)());
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)() const);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)() volatile);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)() const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...));
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...) const);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...) volatile);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)());
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)() const);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)() volatile);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)() const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)());
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)() const);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)() volatile);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)() const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)());
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)() const);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)() volatile);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)() const volatile);
+#endif
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)());
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)() const);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)() volatile);
+template <class R, class T >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)() const volatile);
+#endif
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0));
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0) const);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0) volatile);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...));
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...) const);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...) volatile);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0));
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0) const);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0) volatile);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0));
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0) const);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0) volatile);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0));
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0) const);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0) volatile);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0) const volatile);
+#endif
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0));
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0) const);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0) volatile);
+template <class R, class T, class T0 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0) const volatile);
+#endif
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1));
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1) const);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1) volatile);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...));
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...) const);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...) volatile);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1));
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1) const);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1) volatile);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1));
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1) const);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1) volatile);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1));
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1) const);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1) volatile);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1) const volatile);
+#endif
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1));
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1) const);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1) volatile);
+template <class R, class T, class T0, class T1 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2));
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2) const);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2) volatile);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...));
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...) const);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...) volatile);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2));
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2) const);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2) volatile);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2));
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2) const);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2) volatile);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2));
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2) const);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2) volatile);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2));
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2) const);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2) volatile);
+template <class R, class T, class T0, class T1, class T2 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3));
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3) const);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...));
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3));
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3) const);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3));
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3) const);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3));
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3) const);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3));
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3) const);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile);
+#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) const volatile);
+#endif
+#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile);
+#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile);
+#endif
+#ifndef _MANAGED
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile);
+#endif
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24));
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile);
+template <class R, class T, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16, class T17, class T18, class T19, class T20, class T21, class T22, class T23, class T24 >
+yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile);
+#endif
+
+#else
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+ (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp"))
+#include BOOST_PP_ITERATE()
+
+#endif // BOOST_TT_PREPROCESSING_MODE
+
+} // namespace type_traits
+} // namespace boost
+
+#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED
+
+///// iteration
+
+#else
+#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1)
+#undef __stdcall
+#undef __fastcall
+#undef __cdecl
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
+
+@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...));
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile);
+@#endif
+@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers:
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
+@#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
+@#endif
+@#ifndef _MANAGED
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
+
+@#endif
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)));
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile);
+
+template <class R, class T BOOST_PP_COMMA_IF(BOOST_PP_COUNTER) BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,class T) >
+yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile);
+
+@#endif
+
+#undef BOOST_PP_COUNTER
+#endif // BOOST_PP_IS_ITERATING
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.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp
index 3df5b4e7f07..3df5b4e7f07 100644
--- 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.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp
new file mode 100644
index 00000000000..d88a004b2c3
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp
@@ -0,0 +1,672 @@
+
+// (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(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM)
+ // 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 {};
+
+#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // rvalue reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+
+#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE)
+
+#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 C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+ // rvalue reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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 {};
+#endif
+
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__clrcall C::*)(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 {};
+#ifndef __CLR_VER
+ 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 {};
+#endif
+ 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
+#if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64))
+ 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
+
+
+#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.70.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp
index d5707359b1b..d5707359b1b 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/mp_defer.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/mp_defer.hpp
index f3beeb21bba..f3beeb21bba 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/mp_defer.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/detail/mp_defer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/yes_no_type.hpp b/src/third_party/boost-1.70.0/boost/type_traits/detail/yes_no_type.hpp
index f583730220e..f583730220e 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/detail/yes_no_type.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/enable_if.hpp
index 3cdc2816f80..3cdc2816f80 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/enable_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/enable_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/extent.hpp b/src/third_party/boost-1.70.0/boost/type_traits/extent.hpp
index 124257878bd..124257878bd 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/extent.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/extent.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/floating_point_promotion.hpp b/src/third_party/boost-1.70.0/boost/type_traits/floating_point_promotion.hpp
index 9110f24a4e0..9110f24a4e0 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/floating_point_promotion.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/floating_point_promotion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/function_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/function_traits.hpp
index 26d7e05c5f4..26d7e05c5f4 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/function_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/function_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_and.hpp
index a16c71a48db..a16c71a48db 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_and_assign.hpp
index 01e25e318f0..01e25e318f0 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_and_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_or.hpp
index 6e76929fdaa..6e76929fdaa 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_or.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_or_assign.hpp
index 891c39c51b8..891c39c51b8 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_or_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_xor.hpp
index 05173ac11d3..05173ac11d3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_xor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_xor_assign.hpp
index 3866b7ac482..3866b7ac482 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_bit_xor_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_complement.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_complement.hpp
index d323e129368..d323e129368 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_complement.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/has_dereference.hpp
index 3275348b717..3275348b717 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_dereference.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_dereference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_divides.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_divides.hpp
index 869e907f6a3..869e907f6a3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_divides.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_divides.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_divides_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_divides_assign.hpp
index 1a8e3c1e63b..1a8e3c1e63b 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_divides_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_divides_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_equal_to.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_equal_to.hpp
index 3405d34099d..3405d34099d 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_greater.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_greater.hpp
index 1a9fda6f326..1a9fda6f326 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_greater.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_greater.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_greater_equal.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_greater_equal.hpp
index c87f0639481..c87f0639481 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_greater_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_greater_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_left_shift.hpp
index e95c12a80a6..e95c12a80a6 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_left_shift.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_left_shift_assign.hpp
index 74e0df95806..74e0df95806 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_left_shift_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_less.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_less.hpp
index 1326a184b0f..1326a184b0f 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_less.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_less.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_less_equal.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_less_equal.hpp
index 607b71ce919..607b71ce919 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_less_equal.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_less_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_logical_and.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_logical_and.hpp
index 3bb1733d54e..3bb1733d54e 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_logical_and.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_logical_and.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_logical_not.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_logical_not.hpp
index d36858e1ec1..d36858e1ec1 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_logical_not.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_logical_not.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_logical_or.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_logical_or.hpp
index a188726e152..a188726e152 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_logical_or.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_logical_or.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/has_minus.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_minus.hpp
new file mode 100644
index 00000000000..fcd5d947794
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_minus.hpp
@@ -0,0 +1,158 @@
+// (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_MINUS_HPP_INCLUDED
+#define BOOST_TT_HAS_MINUS_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/detail/config.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 C4018: '<' : signed/unsigned mismatch
+// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+// warning C4804: '<' : unsafe use of type 'bool' in operation
+// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
+# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+# pragma warning ( disable : 6334)
+# endif
+#endif
+
+#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 <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <utility>
+
+namespace boost
+{
+
+ namespace binary_op_detail {
+
+ struct dont_care;
+
+ template <class T, class U, class Ret, class = void>
+ struct has_minus_ret_imp : public boost::false_type {};
+
+ template <class T, class U, class Ret>
+ struct has_minus_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>()), Ret>::value> {};
+
+ template <class T, class U, class = void >
+ struct has_minus_void_imp : public boost::false_type {};
+
+ template <class T, class U>
+ struct has_minus_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::value> {};
+
+ template <class T, class U, class = void>
+ struct has_minus_dc_imp : public boost::false_type {};
+
+ template <class T, class U>
+ struct has_minus_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::true_type {};
+
+ template <class T, class U, class Ret>
+ struct has_minus_ret_filter : public boost::binary_op_detail::has_minus_ret_imp <T, U, Ret> {};
+ template <class T, class U>
+ struct has_minus_ret_filter<T, U, void> : public boost::binary_op_detail::has_minus_void_imp <T, U> {};
+ template <class T, class U>
+ struct has_minus_ret_filter<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::has_minus_dc_imp <T, U> {};
+
+ template <class T, class U, class Ret, bool b>
+ struct has_minus_void_ptr_filter : public boost::binary_op_detail::has_minus_ret_filter <T, U, Ret> {};
+ template <class T, class U, class Ret>
+ struct has_minus_void_ptr_filter<T, U, Ret, true> : public boost::false_type {};
+
+ }
+
+ template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care>
+ struct has_minus :
+ public boost::binary_op_detail::has_minus_void_ptr_filter<
+ T, U, Ret,
+ boost::is_void<typename remove_pointer<typename remove_reference<T>::type>::type>::value
+ || boost::is_void<typename remove_pointer<typename remove_reference<U>::type>::type>::value> {};
+
+
+}
+
+#else
+
+
+#define BOOST_TT_TRAIT_NAME has_minus
+#define BOOST_TT_TRAIT_OP -
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_fundamental< Rhs_nocv >::value && \
+ (! ::boost::is_integral< Rhs_noref >::value )\
+ ) || \
+ /* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_void< Lhs_noptr >::value && \
+ ( \
+ ::boost::is_fundamental< Rhs_nocv >::value || \
+ ::boost::is_pointer< Rhs_noref >::value\
+ )\
+ ) || \
+ /* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_void< Rhs_noptr >::value && \
+ (\
+ ::boost::is_fundamental< Lhs_nocv >::value || \
+ ::boost::is_pointer< Lhs_noref >::value\
+ )\
+ ) ||\
+ /* Lhs=fundamental and Rhs=pointer */\
+ (\
+ ::boost::is_fundamental< Lhs_nocv >::value && \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) ||\
+ /* two different pointers */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_pointer< Rhs_noref >::value && \
+ (! ::boost::is_same< Lhs_nocv, Rhs_nocv >::value )\
+ )\
+ )
+
+#define BOOST_TT_FORBIDDEN_IF_NEW (boost::is_void<typename remove_pointer<typename boost::remove_reference<T>::type>::type>::value || boost::is_void<typename remove_pointer<typename boost::remove_reference<U>::type>::type>::value)
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
+
+#if defined(BOOST_MSVC)
+# pragma warning (pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/has_minus_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_minus_assign.hpp
new file mode 100644
index 00000000000..ea3169e0bd6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_minus_assign.hpp
@@ -0,0 +1,163 @@
+// (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_minus_assign_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_has_minus_assign_ASSIGN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/detail/config.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 C4018: '<' : signed/unsigned mismatch
+// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+// warning C4804: '<' : unsafe use of type 'bool' in operation
+// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
+# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+# pragma warning ( disable : 6334)
+# endif
+#endif
+
+#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/is_pointer.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <utility>
+
+namespace boost
+{
+
+ namespace binary_op_detail {
+
+ struct dont_care;
+
+ template <class T, class U, class Ret, class = void>
+ struct has_minus_assign_ret_imp : public boost::false_type {};
+
+ template <class T, class U, class Ret>
+ struct has_minus_assign_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>()), Ret>::value> {};
+
+ template <class T, class U, class = void >
+ struct has_minus_assign_void_imp : public boost::false_type {};
+
+ template <class T, class U>
+ struct has_minus_assign_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::value> {};
+
+ template <class T, class U, class = void>
+ struct has_minus_assign_dc_imp : public boost::false_type {};
+
+ template <class T, class U>
+ struct has_minus_assign_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::true_type {};
+
+ template <class T, class U, class Ret>
+ struct has_minus_assign_ret_filter : public boost::binary_op_detail::has_minus_assign_ret_imp <T, U, Ret> {};
+ template <class T, class U>
+ struct has_minus_assign_ret_filter<T, U, void> : public boost::binary_op_detail::has_minus_assign_void_imp <T, U> {};
+ template <class T, class U>
+ struct has_minus_assign_ret_filter<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::has_minus_assign_dc_imp <T, U> {};
+
+ template <class T, class U, class Ret, bool b>
+ struct has_minus_assign_void_ptr_filter : public boost::binary_op_detail::has_minus_assign_ret_filter <T, U, Ret> {};
+ template <class T, class U, class Ret>
+ struct has_minus_assign_void_ptr_filter<T, U, Ret, true> : public boost::false_type {};
+
+ }
+
+ template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care>
+ struct has_minus_assign :
+ public boost::binary_op_detail::has_minus_assign_void_ptr_filter<
+ T, U, Ret,
+ boost::is_void<typename remove_pointer<typename remove_reference<T>::type>::type>::value
+ || boost::is_void<typename remove_pointer<typename remove_reference<U>::type>::type>::value
+ || (boost::is_pointer<typename remove_reference<T>::type>::value && boost::is_pointer<typename remove_reference<U>::type>::value)> {};
+
+
+}
+
+#else
+
+#define BOOST_TT_TRAIT_NAME has_minus_assign
+#define BOOST_TT_TRAIT_OP -=
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_fundamental< Rhs_nocv >::value && \
+ (! ::boost::is_integral< Rhs_noref >::value )\
+ ) || \
+ /* Lhs==void* and Rhs==fundamental */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_void< Lhs_noptr >::value && \
+ ::boost::is_fundamental< Rhs_nocv >::value\
+ ) || \
+ /* Rhs==void* and Lhs==fundamental */\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_void< Rhs_noptr >::value && \
+ ::boost::is_fundamental< Lhs_nocv >::value\
+ ) || \
+ /* Lhs=fundamental and Rhs=pointer */\
+ (\
+ ::boost::is_fundamental< Lhs_nocv >::value && \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) || \
+ /* Lhs==pointer and Rhs==pointer */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) || \
+ /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
+ (\
+ (\
+ ::boost::is_fundamental< Lhs_nocv >::value || \
+ ::boost::is_pointer< Lhs_noref >::value\
+ ) && \
+ (\
+ ::boost::is_fundamental< Rhs_nocv >::value || \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) && \
+ ::boost::is_const< Lhs_noref >::value\
+ )\
+ )
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
+
+#if defined(BOOST_MSVC)
+# pragma warning (pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_modulus.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_modulus.hpp
index 24a815f3df2..24a815f3df2 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_modulus.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_modulus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_modulus_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_modulus_assign.hpp
index 5e3e83fa076..5e3e83fa076 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_modulus_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_modulus_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_multiplies.hpp
index 591a0ceae82..591a0ceae82 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_multiplies.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_multiplies_assign.hpp
index b24f87944e7..b24f87944e7 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_multiplies_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_negate.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_negate.hpp
index 452e54ab41c..452e54ab41c 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_negate.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_negate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_new_operator.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_new_operator.hpp
index 4def872ddf8..4def872ddf8 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_new_operator.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_new_operator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_not_equal_to.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_not_equal_to.hpp
index 5f2c39a43e2..5f2c39a43e2 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_not_equal_to.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_not_equal_to.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_assign.hpp
index 7517fa804bf..7517fa804bf 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_constructor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_constructor.hpp
index fa47b1db3cd..fa47b1db3cd 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_constructor.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_constructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_copy.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_copy.hpp
index 0d9bb183790..0d9bb183790 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_destructor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_destructor.hpp
index 74dd9e7e295..74dd9e7e295 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_destructor.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_nothrow_destructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_plus.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_plus.hpp
index 2d7932884d2..2d7932884d2 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_plus.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/has_plus_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_plus_assign.hpp
new file mode 100644
index 00000000000..161ca158152
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_plus_assign.hpp
@@ -0,0 +1,161 @@
+// (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_PLUS_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/detail/config.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 C4018: '<' : signed/unsigned mismatch
+// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+// warning C4804: '<' : unsafe use of type 'bool' in operation
+// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' 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 : 4018 4244 4547 4800 4804 4805 4913 4133)
+# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+# pragma warning ( disable : 6334)
+# endif
+#endif
+
+#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/is_same.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <utility>
+
+namespace boost
+{
+
+ namespace binary_op_detail {
+
+ struct dont_care;
+
+ template <class T, class U, class Ret, class = void>
+ struct has_plus_assign_ret_imp : public boost::false_type {};
+
+ template <class T, class U, class Ret>
+ struct has_plus_assign_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>()), Ret>::value> {};
+
+ template <class T, class U, class = void >
+ struct has_plus_assign_void_imp : public boost::false_type {};
+
+ template <class T, class U>
+ struct has_plus_assign_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::value> {};
+
+ template <class T, class U, class = void>
+ struct has_plus_assign_dc_imp : public boost::false_type {};
+
+ template <class T, class U>
+ struct has_plus_assign_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::type>
+ : public boost::true_type {};
+
+ template <class T, class U, class Ret>
+ struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_ret_imp <T, U, Ret> {};
+ template <class T, class U>
+ struct has_plus_assign_filter_ret<T, U, void> : public boost::binary_op_detail:: has_plus_assign_void_imp <T, U> {};
+ template <class T, class U>
+ struct has_plus_assign_filter_ret<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: has_plus_assign_dc_imp <T, U> {};
+
+ template <class T, class U, class Ret, bool f>
+ struct has_plus_assign_filter_impossible : public boost::binary_op_detail:: has_plus_assign_filter_ret <T, U, Ret> {};
+ template <class T, class U, class Ret>
+ struct has_plus_assign_filter_impossible<T, U, Ret, true> : public boost::false_type {};
+
+ }
+
+ template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care>
+ struct has_plus_assign : public boost::binary_op_detail:: has_plus_assign_filter_impossible <T, U, Ret, boost::is_arithmetic<typename boost::remove_reference<T>::type>::value && boost::is_pointer<typename remove_reference<U>::type>::value && !boost::is_same<bool, typename boost::remove_cv<typename remove_reference<T>::type>::type>::value> {};
+
+}
+
+#else
+
+#define BOOST_TT_TRAIT_NAME has_plus_assign
+#define BOOST_TT_TRAIT_OP +=
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* Lhs==pointer and Rhs==pointer */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) || \
+ /* Lhs==void* and Rhs==fundamental */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_void< Lhs_noptr >::value && \
+ ::boost::is_fundamental< Rhs_nocv >::value\
+ ) || \
+ /* Rhs==void* and Lhs==fundamental */\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_void< Rhs_noptr >::value && \
+ ::boost::is_fundamental< Lhs_nocv >::value\
+ ) || \
+ /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_fundamental< Rhs_nocv >::value && \
+ (! ::boost::is_integral< Rhs_noref >::value )\
+ ) || \
+ /* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_fundamental< Lhs_nocv >::value && \
+ (! ::boost::is_same< Lhs_nocv, bool >::value )\
+ ) || \
+ /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
+ (\
+ (\
+ ::boost::is_fundamental< Lhs_nocv >::value || \
+ ::boost::is_pointer< Lhs_noref >::value\
+ ) && \
+ ( \
+ ::boost::is_fundamental< Rhs_nocv >::value || \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) && \
+ ::boost::is_const< Lhs_noref >::value\
+ )\
+ )
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
+
+#if defined(BOOST_MSVC)
+# pragma warning (pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_post_decrement.hpp
index fc1c430a547..fc1c430a547 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_post_decrement.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_post_increment.hpp
index e83afd1c312..e83afd1c312 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_post_increment.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_pre_decrement.hpp
index 5ce50e9003d..5ce50e9003d 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_pre_decrement.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_pre_increment.hpp
index 9361cc8bee9..9361cc8bee9 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_pre_increment.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_right_shift.hpp
index 55629112332..55629112332 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_right_shift.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_right_shift_assign.hpp
index 0e2c263559f..0e2c263559f 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_right_shift_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_assign.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_assign.hpp
index 15b917e7169..15b917e7169 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_constructor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_constructor.hpp
index 06c137d1dec..06c137d1dec 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_constructor.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_constructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_copy.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_copy.hpp
index fd6ad2d03b3..fd6ad2d03b3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_copy.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_copy.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_destructor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_destructor.hpp
index 9a3a61ff97a..9a3a61ff97a 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_destructor.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/has_trivial_move_assign.hpp
index 7b392697f31..7b392697f31 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_assign.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_move_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_move_constructor.hpp
index ce85dc2d79c..ce85dc2d79c 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_trivial_move_constructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_unary_minus.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_unary_minus.hpp
index 6b3157f42c5..6b3157f42c5 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_unary_minus.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_unary_minus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_unary_plus.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_unary_plus.hpp
index a61770f8585..a61770f8585 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_unary_plus.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_unary_plus.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_virtual_destructor.hpp b/src/third_party/boost-1.70.0/boost/type_traits/has_virtual_destructor.hpp
index 4b0f38368ad..4b0f38368ad 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/has_virtual_destructor.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/has_virtual_destructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/integral_constant.hpp b/src/third_party/boost-1.70.0/boost/type_traits/integral_constant.hpp
index 1b36dbd2c33..1b36dbd2c33 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/integral_constant.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/integral_constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/integral_promotion.hpp b/src/third_party/boost-1.70.0/boost/type_traits/integral_promotion.hpp
index 526f90ca993..526f90ca993 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/integral_promotion.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/integral_promotion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/intrinsics.hpp b/src/third_party/boost-1.70.0/boost/type_traits/intrinsics.hpp
index d41a61ec9af..d41a61ec9af 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/intrinsics.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/intrinsics.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_abstract.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_abstract.hpp
index 781d94a4795..781d94a4795 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_abstract.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_abstract.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_arithmetic.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_arithmetic.hpp
index c23811ebea3..c23811ebea3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_arithmetic.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_arithmetic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_array.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_array.hpp
index 53e1613ab6e..53e1613ab6e 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_array.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_array.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_assignable.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_assignable.hpp
index 6a9474b2fde..6a9474b2fde 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_assignable.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_assignable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_base_and_derived.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_base_and_derived.hpp
index ee3dce597c1..ee3dce597c1 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_base_and_derived.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_base_and_derived.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_base_of.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_base_of.hpp
index 89f2f679802..89f2f679802 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_base_of.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_base_of.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_bounded_array.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_bounded_array.hpp
new file mode 100644
index 00000000000..5aeca6f98e7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_bounded_array.hpp
@@ -0,0 +1,42 @@
+/*
+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_IS_BOUNDED_ARRAY_HPP_INCLUDED
+#define BOOST_TT_IS_BOUNDED_ARRAY_HPP_INCLUDED
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <cstddef>
+
+namespace boost {
+
+template<class T>
+struct is_bounded_array
+ : false_type { };
+
+#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
+template<class T, std::size_t N>
+struct is_bounded_array<T[N]>
+ : true_type { };
+
+template<class T, std::size_t N>
+struct is_bounded_array<const T[N]>
+ : true_type { };
+
+template<class T, std::size_t N>
+struct is_bounded_array<volatile T[N]>
+ : true_type { };
+
+template<class T, std::size_t N>
+struct is_bounded_array<const volatile T[N]>
+ : true_type { };
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_class.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_class.hpp
index e3a22d2b639..e3a22d2b639 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_class.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_class.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_complete.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_complete.hpp
new file mode 100644
index 00000000000..07cb89749d0
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_complete.hpp
@@ -0,0 +1,92 @@
+
+// (C) Copyright John Maddock 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_COMPLETE_HPP_INCLUDED
+#define BOOST_TT_IS_COMPLETE_HPP_INCLUDED
+
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/config/workaround.hpp>
+
+/*
+ * CAUTION:
+ * ~~~~~~~~
+ *
+ * THIS TRAIT EXISTS SOLELY TO GENERATE HARD ERRORS WHEN A ANOTHER TRAIT
+ * WHICH REQUIRES COMPLETE TYPES AS ARGUMENTS IS PASSED AN INCOMPLETE TYPE
+ *
+ * DO NOT MAKE GENERAL USE OF THIS TRAIT, AS THE COMPLETENESS OF A TYPE
+ * VARIES ACROSS TRANSLATION UNITS AS WELL AS WITHIN A SINGLE UNIT.
+ *
+*/
+
+namespace boost {
+
+
+//
+// We will undef this if the trait isn't fully functional:
+//
+#define BOOST_TT_HAS_WORKING_IS_COMPLETE
+
+#if !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1900) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40600)
+
+ namespace detail{
+
+ template <unsigned N>
+ struct ok_tag { double d; char c[N]; };
+
+ template <class T>
+ ok_tag<sizeof(T)> check_is_complete(int);
+ template <class T>
+ char check_is_complete(...);
+ }
+
+ template <class T> struct is_complete
+ : public integral_constant<bool, ::boost::is_function<typename boost::remove_reference<T>::type>::value || (sizeof(boost::detail::check_is_complete<T>(0)) != sizeof(char))> {};
+
+#elif !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
+
+ namespace detail
+ {
+
+ template <class T>
+ struct is_complete_imp
+ {
+ template <class U, class = decltype(sizeof(boost::declval< U >())) >
+ static type_traits::yes_type check(U*);
+
+ template <class U>
+ static type_traits::no_type check(...);
+
+ static const bool value = sizeof(check<T>(0)) == sizeof(type_traits::yes_type);
+ };
+
+} // namespace detail
+
+
+ template <class T>
+ struct is_complete : boost::integral_constant<bool, ::boost::is_function<typename boost::remove_reference<T>::type>::value || ::boost::detail::is_complete_imp<T>::value>
+ {};
+ template <class T>
+ struct is_complete<T&> : boost::is_complete<T> {};
+
+#else
+
+ template <class T> struct is_complete
+ : public boost::integral_constant<bool, true> {};
+
+#undef BOOST_TT_HAS_WORKING_IS_COMPLETE
+
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_COMPLETE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_complex.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_complex.hpp
index c4554cea081..c4554cea081 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_complex.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_complex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_compound.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_compound.hpp
index 7995eb8a237..7995eb8a237 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_compound.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_compound.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_const.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_const.hpp
index e0ed88a34b3..e0ed88a34b3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_const.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_const.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_constructible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_constructible.hpp
new file mode 100644
index 00000000000..6969cd63bea
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_constructible.hpp
@@ -0,0 +1,90 @@
+
+// (C) Copyright John Maddock 2015.
+// 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_CONSTRUCTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
+
+#include <boost/type_traits/integral_constant.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, < 40500)
+
+#include <boost/type_traits/is_destructible.hpp>
+#include <boost/type_traits/is_default_constructible.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/is_complete.hpp>
+#include <boost/static_assert.hpp>
+
+#define BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING 1
+
+namespace boost{
+
+ namespace detail{
+
+ struct is_constructible_imp
+ {
+ template<typename T, typename ...TheArgs, typename = decltype(T(boost::declval<TheArgs>()...))>
+ static boost::type_traits::yes_type test(int);
+ template<typename, typename...>
+ static boost::type_traits::no_type test(...);
+
+ template<typename T, typename Arg, typename = decltype(::new T(boost::declval<Arg>()))>
+ static boost::type_traits::yes_type test1(int);
+ template<typename, typename>
+ static boost::type_traits::no_type test1(...);
+
+ template <typename T>
+ static boost::type_traits::yes_type ref_test(T);
+ template <typename T>
+ static boost::type_traits::no_type ref_test(...);
+ };
+
+ }
+
+ template <class T, class ...Args> struct is_constructible : public integral_constant<bool, sizeof(detail::is_constructible_imp::test<T, Args...>(0)) == sizeof(boost::type_traits::yes_type)>
+ {
+ BOOST_STATIC_ASSERT_MSG(::boost::is_complete<T>::value, "The target type must be complete in order to test for constructibility");
+ };
+ template <class T, class Arg> struct is_constructible<T, Arg> : public integral_constant<bool, is_destructible<T>::value && sizeof(boost::detail::is_constructible_imp::test1<T, Arg>(0)) == sizeof(boost::type_traits::yes_type)>
+ {
+ BOOST_STATIC_ASSERT_MSG(::boost::is_complete<T>::value, "The target type must be complete in order to test for constructibility");
+ };
+ template <class Ref, class Arg> struct is_constructible<Ref&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
+ template <class Ref, class Arg> struct is_constructible<Ref&&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
+
+ template <> struct is_constructible<void> : public false_type{};
+ template <> struct is_constructible<void const> : public false_type{};
+ template <> struct is_constructible<void const volatile> : public false_type{};
+ template <> struct is_constructible<void volatile> : public false_type{};
+
+ template <class T> struct is_constructible<T> : public is_default_constructible<T>{};
+
+#else
+
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_default_constructible.hpp>
+
+namespace boost{
+
+ // We don't know how to implement this:
+ template <class T, class U = void> struct is_constructible : public is_convertible<U, T>{};
+ template <class T> struct is_constructible<T, void> : public is_default_constructible<T>{};
+ template <> struct is_constructible<void, void> : public false_type{};
+ template <> struct is_constructible<void const, void> : public false_type{};
+ template <> struct is_constructible<void const volatile, void> : public false_type{};
+ template <> struct is_constructible<void volatile, void> : public false_type{};
+ template <class Ref> struct is_constructible<Ref&, void> : public false_type{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class Ref> struct is_constructible<Ref&&, void> : public false_type{};
+#endif
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_convertible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_convertible.hpp
index bf648fc46ea..bf648fc46ea 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_convertible.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/is_copy_assignable.hpp
index ed04927b603..ed04927b603 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_copy_assignable.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_copy_assignable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_copy_constructible.hpp
index ef97e18eb56..ef97e18eb56 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_copy_constructible.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_default_constructible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_default_constructible.hpp
new file mode 100644
index 00000000000..04c023fe68c
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_default_constructible.hpp
@@ -0,0 +1,98 @@
+
+// (C) Copyright John Maddock 2015.
+// 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_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
+
+#include <cstddef> // size_t
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/is_complete.hpp>
+#include <boost/static_assert.hpp>
+
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+#include <boost/type_traits/is_abstract.hpp>
+#endif
+#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ <= 5)) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1800))
+#include <utility> // std::pair
+#endif
+
+#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+
+namespace boost{
+
+ namespace detail{
+
+ struct is_default_constructible_imp
+ {
+ template<typename _Tp, typename = decltype(_Tp())>
+ static boost::type_traits::yes_type test(int);
+
+ template<typename>
+ static boost::type_traits::no_type test(...);
+ };
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+ template<class T, bool b>
+ struct is_default_constructible_abstract_filter
+ {
+ static const bool value = sizeof(is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type);
+ };
+ template<class T>
+ struct is_default_constructible_abstract_filter<T, true>
+ {
+ static const bool value = false;
+ };
+#endif
+ }
+
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+ template <class T> struct is_default_constructible : public integral_constant<bool, detail::is_default_constructible_abstract_filter<T, boost::is_abstract<T>::value>::value>
+ {
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_default_constructible must be complete types");
+ };
+#else
+ template <class T> struct is_default_constructible : public integral_constant<bool, sizeof(boost::detail::is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>
+ {
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_default_constructible must be complete types");
+ };
+#endif
+ template <class T, std::size_t N> struct is_default_constructible<T[N]> : public is_default_constructible<T>{};
+ template <class T> struct is_default_constructible<T[]> : public is_default_constructible<T>{};
+ template <class T> struct is_default_constructible<T&> : public integral_constant<bool, false>{};
+#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ <= 5))|| (defined(BOOST_MSVC) && (BOOST_MSVC == 1800))
+ template <class T, class U> struct is_default_constructible<std::pair<T,U> > : public integral_constant<bool, is_default_constructible<T>::value && is_default_constructible<U>::value>{};
+#endif
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template <class T> struct is_default_constructible<T&&> : public integral_constant<bool, false>{};
+#endif
+ template <> struct is_default_constructible<void> : public integral_constant<bool, false>{};
+ template <> struct is_default_constructible<void const> : public integral_constant<bool, false>{};
+ template <> struct is_default_constructible<void volatile> : public integral_constant<bool, false>{};
+ template <> struct is_default_constructible<void const volatile> : public integral_constant<bool, false>{};
+
+#else
+
+#include <boost/type_traits/is_pod.hpp>
+
+namespace boost{
+
+ // We don't know how to implement this, note we can not use has_trivial_constructor here
+ // because the correct implementation of that trait requires this one:
+ template <class T> struct is_default_constructible : public is_pod<T>{};
+ template <> struct is_default_constructible<void> : public integral_constant<bool, false>{};
+ template <> struct is_default_constructible<void const> : public integral_constant<bool, false>{};
+ template <> struct is_default_constructible<void volatile> : public integral_constant<bool, false>{};
+ template <> struct is_default_constructible<void const volatile> : public integral_constant<bool, false>{};
+
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_destructible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_destructible.hpp
new file mode 100644
index 00000000000..c32e758c6cf
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_destructible.hpp
@@ -0,0 +1,69 @@
+
+// (C) Copyright John Maddock 2015.
+// 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_DESTRUCTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
+
+#include <cstddef> // size_t
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/is_complete.hpp>
+#include <boost/static_assert.hpp>
+
+#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800)
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/declval.hpp>
+
+namespace boost{
+
+ namespace detail{
+
+ struct is_destructible_imp
+ {
+ template<typename T, typename = decltype(boost::declval<T&>().~T())>
+ static boost::type_traits::yes_type test(int);
+ template<typename>
+ static boost::type_traits::no_type test(...);
+ };
+
+ }
+
+ template <class T> struct is_destructible : public integral_constant<bool, sizeof(boost::detail::is_destructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>
+ {
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_destructible must be complete types");
+ };
+
+#else
+
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_class.hpp>
+
+namespace boost{
+
+ // We don't know how to implement this:
+ template <class T> struct is_destructible : public integral_constant<bool, is_pod<T>::value || is_class<T>::value>
+ {
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_destructible must be complete types");
+ };
+#endif
+
+ template <> struct is_destructible<void> : public false_type{};
+ template <> struct is_destructible<void const> : public false_type{};
+ template <> struct is_destructible<void volatile> : public false_type{};
+ template <> struct is_destructible<void const volatile> : public false_type{};
+ template <class T> struct is_destructible<T&> : public is_destructible<T>{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class T> struct is_destructible<T&&> : public is_destructible<T>{};
+#endif
+ template <class T, std::size_t N> struct is_destructible<T[N]> : public is_destructible<T>{};
+ template <class T> struct is_destructible<T[]> : public is_destructible<T>{};
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_detected.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_detected.hpp
new file mode 100644
index 00000000000..25dfa848905
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_detected.hpp
@@ -0,0 +1,29 @@
+/*
+Copyright 2017-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_IS_DETECTED_HPP_INCLUDED
+#define BOOST_TT_IS_DETECTED_HPP_INCLUDED
+
+#include <boost/type_traits/detail/detector.hpp>
+#include <boost/type_traits/nonesuch.hpp>
+
+namespace boost {
+
+template<template<class...> class Op, class... Args>
+using is_detected = typename
+ detail::detector<nonesuch, void, Op, Args...>::value_t;
+
+#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
+template<template<class...> class Op, class... Args>
+constexpr bool is_detected_v = is_detected<Op, Args...>::value;
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_empty.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_empty.hpp
index ef288c518b1..ef288c518b1 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_empty.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_enum.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_enum.hpp
index eada480a658..eada480a658 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_enum.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_final.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_final.hpp
index 21ac93f3410..21ac93f3410 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_final.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_final.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_float.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_float.hpp
index 7bf7d1f8207..7bf7d1f8207 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_float.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_float.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_floating_point.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_floating_point.hpp
index 196c900cf93..196c900cf93 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_floating_point.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/is_function.hpp
index 8556235a437..8556235a437 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_function.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_function.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_fundamental.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_fundamental.hpp
index f58767a4890..f58767a4890 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_fundamental.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_fundamental.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_integral.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_integral.hpp
index 7a7e54bb701..7a7e54bb701 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_integral.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_integral.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_list_constructible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_list_constructible.hpp
index 4a9f84ad3c1..4a9f84ad3c1 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_list_constructible.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_list_constructible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_lvalue_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_lvalue_reference.hpp
index e94d7874817..e94d7874817 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_lvalue_reference.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/is_member_function_pointer.hpp
index 9b5dbbf228b..9b5dbbf228b 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_member_function_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_member_function_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_member_object_pointer.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_member_object_pointer.hpp
index cb7cf14abfc..cb7cf14abfc 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_member_object_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_member_object_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_member_pointer.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_member_pointer.hpp
index 9757afc950a..9757afc950a 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_member_pointer.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/is_noncopyable.hpp
index 787103ea710..787103ea710 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_noncopyable.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_noncopyable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_move_assignable.hpp
index c6194de8e81..c6194de8e81 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_move_assignable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_move_constructible.hpp
index 60c2994d054..60c2994d054 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_move_constructible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_swappable.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_swappable.hpp
index 10ad9239a92..10ad9239a92 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_swappable.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_nothrow_swappable.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_object.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_object.hpp
index fc9d2f25d32..fc9d2f25d32 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_object.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_object.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_pod.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_pod.hpp
index 9bd196257ac..9bd196257ac 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_pod.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_pod.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_pointer.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_pointer.hpp
index 44b06c227ed..44b06c227ed 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_polymorphic.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_polymorphic.hpp
index 722d8b46b2d..722d8b46b2d 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_polymorphic.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_polymorphic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_reference.hpp
index 85f0a63204e..85f0a63204e 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_reference.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/is_rvalue_reference.hpp
index 37d33c95a40..37d33c95a40 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_rvalue_reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_rvalue_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_same.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_same.hpp
index d16f4b2b1a3..d16f4b2b1a3 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_same.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_same.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_scalar.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_scalar.hpp
index 30314405965..30314405965 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_scalar.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_scalar.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_signed.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_signed.hpp
index 70ca2e47967..70ca2e47967 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_signed.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_signed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_stateless.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_stateless.hpp
index f9266da5b8c..f9266da5b8c 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_stateless.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_stateless.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_unbounded_array.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_unbounded_array.hpp
new file mode 100644
index 00000000000..1bacfdca1d6
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_unbounded_array.hpp
@@ -0,0 +1,41 @@
+/*
+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_IS_UNBOUNDED_ARRAY_HPP_INCLUDED
+#define BOOST_TT_IS_UNBOUNDED_ARRAY_HPP_INCLUDED
+
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost {
+
+template<class T>
+struct is_unbounded_array
+ : false_type { };
+
+#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
+template<class T>
+struct is_unbounded_array<T[]>
+ : true_type { };
+
+template<class T>
+struct is_unbounded_array<const T[]>
+ : true_type { };
+
+template<class T>
+struct is_unbounded_array<volatile T[]>
+ : true_type { };
+
+template<class T>
+struct is_unbounded_array<const volatile T[]>
+ : true_type { };
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_union.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_union.hpp
index c5e1a960196..c5e1a960196 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_union.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_union.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_unsigned.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_unsigned.hpp
index c4c54af7b36..c4c54af7b36 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_unsigned.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_unsigned.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/is_virtual_base_of.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_virtual_base_of.hpp
new file mode 100644
index 00000000000..fe2cdcfcc00
--- /dev/null
+++ b/src/third_party/boost-1.70.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,
+ typename boost::make_void<decltype((U*)(std::declval<T*>()))>::type* =
+ 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.69.0/boost/type_traits/is_void.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_void.hpp
index 183f8abf562..183f8abf562 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_void.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_void.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_volatile.hpp b/src/third_party/boost-1.70.0/boost/type_traits/is_volatile.hpp
index 5b8e716b473..5b8e716b473 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/is_volatile.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/is_volatile.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/make_signed.hpp b/src/third_party/boost-1.70.0/boost/type_traits/make_signed.hpp
index 6d8b1fb8d4b..6d8b1fb8d4b 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/make_signed.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/make_signed.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/make_unsigned.hpp b/src/third_party/boost-1.70.0/boost/type_traits/make_unsigned.hpp
index 17a8a5b9296..17a8a5b9296 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/make_unsigned.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/type_traits/make_void.hpp
index b8a72ef5716..b8a72ef5716 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/make_void.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/make_void.hpp
diff --git a/src/third_party/boost-1.70.0/boost/type_traits/nonesuch.hpp b/src/third_party/boost-1.70.0/boost/type_traits/nonesuch.hpp
new file mode 100644
index 00000000000..7ba98c4bce8
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/type_traits/nonesuch.hpp
@@ -0,0 +1,35 @@
+/*
+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_NONESUCH_HPP_INCLUDED
+#define BOOST_TT_NONESUCH_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+namespace boost {
+
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+struct nonesuch {
+ nonesuch() = delete;
+ ~nonesuch() = delete;
+ nonesuch(const nonesuch&) = delete;
+ void operator=(const nonesuch&) = delete;
+};
+#else
+class nonesuch {
+ nonesuch();
+ ~nonesuch();
+ nonesuch(const nonesuch&);
+ void operator=(const nonesuch&);
+};
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/object_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/object_traits.hpp
index c812a62e25b..c812a62e25b 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/object_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/object_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/promote.hpp b/src/third_party/boost-1.70.0/boost/type_traits/promote.hpp
index 1678e1ca3ec..1678e1ca3ec 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/promote.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/promote.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/rank.hpp b/src/third_party/boost-1.70.0/boost/type_traits/rank.hpp
index 1f820f1a55d..1f820f1a55d 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/rank.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/rank.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_all_extents.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_all_extents.hpp
index b9736db57e7..b9736db57e7 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_all_extents.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_all_extents.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_bounds.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_bounds.hpp
index cd0565d28f1..cd0565d28f1 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_bounds.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_bounds.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_const.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_const.hpp
index 6f1a193740b..6f1a193740b 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_const.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_const.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_cv.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_cv.hpp
index 57a96f29d63..57a96f29d63 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_cv.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_cv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_cv_ref.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_cv_ref.hpp
index 118945a6a05..118945a6a05 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_cv_ref.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_cv_ref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_extent.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_extent.hpp
index 55d57301b70..55d57301b70 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_extent.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_extent.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_pointer.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_pointer.hpp
index ce32f186aee..ce32f186aee 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_pointer.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_reference.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_reference.hpp
index 70949fbb2a9..70949fbb2a9 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_reference.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/remove_volatile.hpp b/src/third_party/boost-1.70.0/boost/type_traits/remove_volatile.hpp
index bf2c55796a1..bf2c55796a1 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/remove_volatile.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/remove_volatile.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/same_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/same_traits.hpp
index dab7dac7830..dab7dac7830 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/same_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/same_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/transform_traits.hpp b/src/third_party/boost-1.70.0/boost/type_traits/transform_traits.hpp
index 7a82f1ca919..7a82f1ca919 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/transform_traits.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/transform_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/type_identity.hpp b/src/third_party/boost-1.70.0/boost/type_traits/type_identity.hpp
index 4a03a13a391..4a03a13a391 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/type_identity.hpp
+++ b/src/third_party/boost-1.70.0/boost/type_traits/type_identity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/type_with_alignment.hpp b/src/third_party/boost-1.70.0/boost/type_traits/type_with_alignment.hpp
index 8da51231893..8da51231893 100644
--- a/src/third_party/boost-1.69.0/boost/type_traits/type_with_alignment.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/constant.hpp
index ed0f2cd47c3..ed0f2cd47c3 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/constant.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/decltype.hpp b/src/third_party/boost-1.70.0/boost/typeof/decltype.hpp
index 7e990a8cef9..7e990a8cef9 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/decltype.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/encode_decode.hpp
index 97fcab9b886..97fcab9b886 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/encode_decode.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/encode_decode.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp b/src/third_party/boost-1.70.0/boost/typeof/encode_decode_params.hpp
index 1218d72e57e..1218d72e57e 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/encode_decode_params.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp b/src/third_party/boost-1.70.0/boost/typeof/int_encoding.hpp
index 3984174f7d6..3984174f7d6 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/int_encoding.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/integral_template_param.hpp b/src/third_party/boost-1.70.0/boost/typeof/integral_template_param.hpp
index 8543be7f080..8543be7f080 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/integral_template_param.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/integral_template_param.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/message.hpp b/src/third_party/boost-1.70.0/boost/typeof/message.hpp
index cabbb828c30..cabbb828c30 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/message.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/modifiers.hpp
index 104af7c3f25..104af7c3f25 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/modifiers.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/modifiers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp b/src/third_party/boost-1.70.0/boost/typeof/msvc/typeof_impl.hpp
index 87bf3d1ce38..87bf3d1ce38 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/msvc/typeof_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/native.hpp b/src/third_party/boost-1.70.0/boost/typeof/native.hpp
index f051235f8ad..f051235f8ad 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/native.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/native.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp b/src/third_party/boost-1.70.0/boost/typeof/pointers_data_members.hpp
index 096980da31d..096980da31d 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/pointers_data_members.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/register_functions.hpp b/src/third_party/boost-1.70.0/boost/typeof/register_functions.hpp
index 407bba39091..407bba39091 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/register_functions.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/register_functions_iterate.hpp
index d3a3d237f01..d3a3d237f01 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/register_functions_iterate.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/register_functions_iterate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/register_fundamental.hpp b/src/third_party/boost-1.70.0/boost/typeof/register_fundamental.hpp
index a6164bafa39..a6164bafa39 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/register_fundamental.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/register_mem_functions.hpp
index f4a42d78f39..f4a42d78f39 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/register_mem_functions.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/register_mem_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp b/src/third_party/boost-1.70.0/boost/typeof/template_encoding.hpp
index 0bb7ed36a2d..0bb7ed36a2d 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/template_encoding.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp b/src/third_party/boost-1.70.0/boost/typeof/template_template_param.hpp
index 6f0a329aa98..6f0a329aa98 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/template_template_param.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp b/src/third_party/boost-1.70.0/boost/typeof/type_encoding.hpp
index adc4b5eb452..adc4b5eb452 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/type_encoding.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/type_template_param.hpp b/src/third_party/boost-1.70.0/boost/typeof/type_template_param.hpp
index 28a860c9fa5..28a860c9fa5 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/type_template_param.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/type_template_param.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/typeof.hpp b/src/third_party/boost-1.70.0/boost/typeof/typeof.hpp
index d2c49fbcc19..d2c49fbcc19 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/typeof.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/typeof_impl.hpp
index f5397e6ab12..f5397e6ab12 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/typeof_impl.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/typeof_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/unsupported.hpp b/src/third_party/boost-1.70.0/boost/typeof/unsupported.hpp
index 83d3a559fed..83d3a559fed 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/unsupported.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/typeof/vector.hpp
index e75b57ee5a0..e75b57ee5a0 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/vector.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/vector.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/vector50.hpp b/src/third_party/boost-1.70.0/boost/typeof/vector50.hpp
index 438cd43b2f2..438cd43b2f2 100644
--- a/src/third_party/boost-1.69.0/boost/typeof/vector50.hpp
+++ b/src/third_party/boost-1.70.0/boost/typeof/vector50.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/detail/fwd.hpp b/src/third_party/boost-1.70.0/boost/unordered/detail/fwd.hpp
index e749ce67bb6..e749ce67bb6 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/detail/fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/detail/fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/detail/implementation.hpp b/src/third_party/boost-1.70.0/boost/unordered/detail/implementation.hpp
index 9dffde159df..9dffde159df 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/detail/implementation.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/detail/implementation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/detail/map.hpp b/src/third_party/boost-1.70.0/boost/unordered/detail/map.hpp
index 8025de80d3d..8025de80d3d 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/detail/map.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/detail/map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/detail/set.hpp b/src/third_party/boost-1.70.0/boost/unordered/detail/set.hpp
index b7869e3c511..b7869e3c511 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/detail/set.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/detail/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/unordered_map.hpp b/src/third_party/boost-1.70.0/boost/unordered/unordered_map.hpp
index 1910219ccb2..1910219ccb2 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/unordered_map.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/unordered_map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/unordered_map_fwd.hpp b/src/third_party/boost-1.70.0/boost/unordered/unordered_map_fwd.hpp
index 794b7042585..794b7042585 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/unordered_map_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/unordered_map_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/unordered_set.hpp b/src/third_party/boost-1.70.0/boost/unordered/unordered_set.hpp
index dfc24e85e5d..dfc24e85e5d 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/unordered_set.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/unordered_set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered/unordered_set_fwd.hpp b/src/third_party/boost-1.70.0/boost/unordered/unordered_set_fwd.hpp
index 35e2820f95f..35e2820f95f 100644
--- a/src/third_party/boost-1.69.0/boost/unordered/unordered_set_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered/unordered_set_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered_map.hpp b/src/third_party/boost-1.70.0/boost/unordered_map.hpp
index 92ef4d601ae..92ef4d601ae 100644
--- a/src/third_party/boost-1.69.0/boost/unordered_map.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered_map.hpp
diff --git a/src/third_party/boost-1.69.0/boost/unordered_set.hpp b/src/third_party/boost-1.70.0/boost/unordered_set.hpp
index 1c83c02b28a..1c83c02b28a 100644
--- a/src/third_party/boost-1.69.0/boost/unordered_set.hpp
+++ b/src/third_party/boost-1.70.0/boost/unordered_set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility.hpp b/src/third_party/boost-1.70.0/boost/utility.hpp
index 5ac9ecbd853..5ac9ecbd853 100644
--- a/src/third_party/boost-1.69.0/boost/utility.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/addressof.hpp b/src/third_party/boost-1.70.0/boost/utility/addressof.hpp
index db4da804218..db4da804218 100644
--- a/src/third_party/boost-1.69.0/boost/utility/addressof.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/addressof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/base_from_member.hpp b/src/third_party/boost-1.70.0/boost/utility/base_from_member.hpp
index 604541d19ac..604541d19ac 100644
--- a/src/third_party/boost-1.69.0/boost/utility/base_from_member.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/base_from_member.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/binary.hpp b/src/third_party/boost-1.70.0/boost/utility/binary.hpp
index 8cef1468e5b..8cef1468e5b 100644
--- a/src/third_party/boost-1.69.0/boost/utility/binary.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/binary.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/compare_pointees.hpp b/src/third_party/boost-1.70.0/boost/utility/compare_pointees.hpp
index 5ab21cdee27..5ab21cdee27 100644
--- a/src/third_party/boost-1.69.0/boost/utility/compare_pointees.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/compare_pointees.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/declval.hpp b/src/third_party/boost-1.70.0/boost/utility/declval.hpp
index 229e9a34a56..229e9a34a56 100644
--- a/src/third_party/boost-1.69.0/boost/utility/declval.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/declval.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_prefix.hpp b/src/third_party/boost-1.70.0/boost/utility/detail/in_place_factory_prefix.hpp
index afd76b5a859..afd76b5a859 100644
--- a/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_prefix.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/detail/in_place_factory_prefix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_suffix.hpp b/src/third_party/boost-1.70.0/boost/utility/detail/in_place_factory_suffix.hpp
index 58f48c708c2..58f48c708c2 100644
--- a/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_suffix.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/detail/in_place_factory_suffix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/detail/minstd_rand.hpp b/src/third_party/boost-1.70.0/boost/utility/detail/minstd_rand.hpp
index 95efb21a325..95efb21a325 100644
--- a/src/third_party/boost-1.69.0/boost/utility/detail/minstd_rand.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/detail/minstd_rand.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/detail/result_of_iterate.hpp b/src/third_party/boost-1.70.0/boost/utility/detail/result_of_iterate.hpp
index d6538447b1a..d6538447b1a 100644
--- a/src/third_party/boost-1.69.0/boost/utility/detail/result_of_iterate.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/detail/result_of_iterate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/enable_if.hpp b/src/third_party/boost-1.70.0/boost/utility/enable_if.hpp
index 803bfca5e25..803bfca5e25 100644
--- a/src/third_party/boost-1.69.0/boost/utility/enable_if.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/enable_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/explicit_operator_bool.hpp b/src/third_party/boost-1.70.0/boost/utility/explicit_operator_bool.hpp
index 9b625cd6897..9b625cd6897 100644
--- a/src/third_party/boost-1.69.0/boost/utility/explicit_operator_bool.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/explicit_operator_bool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/identity_type.hpp b/src/third_party/boost-1.70.0/boost/utility/identity_type.hpp
index 4a1f6c4de53..4a1f6c4de53 100644
--- a/src/third_party/boost-1.69.0/boost/utility/identity_type.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/identity_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/in_place_factory.hpp b/src/third_party/boost-1.70.0/boost/utility/in_place_factory.hpp
index 1a62ace10a4..1a62ace10a4 100644
--- a/src/third_party/boost-1.69.0/boost/utility/in_place_factory.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/in_place_factory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/result_of.hpp b/src/third_party/boost-1.70.0/boost/utility/result_of.hpp
index 2b652ba0ca2..2b652ba0ca2 100644
--- a/src/third_party/boost-1.69.0/boost/utility/result_of.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/utility/string_ref.hpp
index 4b36ffc0d86..4b36ffc0d86 100644
--- a/src/third_party/boost-1.69.0/boost/utility/string_ref.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/string_ref.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/string_ref_fwd.hpp b/src/third_party/boost-1.70.0/boost/utility/string_ref_fwd.hpp
index f58b98c1fb4..f58b98c1fb4 100644
--- a/src/third_party/boost-1.69.0/boost/utility/string_ref_fwd.hpp
+++ b/src/third_party/boost-1.70.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.70.0/boost/utility/string_view.hpp
index 11aa801e294..11aa801e294 100644
--- a/src/third_party/boost-1.69.0/boost/utility/string_view.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/string_view.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/string_view_fwd.hpp b/src/third_party/boost-1.70.0/boost/utility/string_view_fwd.hpp
index dbda0de46aa..dbda0de46aa 100644
--- a/src/third_party/boost-1.69.0/boost/utility/string_view_fwd.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/string_view_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/swap.hpp b/src/third_party/boost-1.70.0/boost/utility/swap.hpp
index dd9ecd90701..dd9ecd90701 100644
--- a/src/third_party/boost-1.69.0/boost/utility/swap.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/swap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/typed_in_place_factory.hpp b/src/third_party/boost-1.70.0/boost/utility/typed_in_place_factory.hpp
index 833a34692d0..833a34692d0 100644
--- a/src/third_party/boost-1.69.0/boost/utility/typed_in_place_factory.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/typed_in_place_factory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/value_init.hpp b/src/third_party/boost-1.70.0/boost/utility/value_init.hpp
index 9d8de70733a..9d8de70733a 100644
--- a/src/third_party/boost-1.69.0/boost/utility/value_init.hpp
+++ b/src/third_party/boost-1.70.0/boost/utility/value_init.hpp
diff --git a/src/third_party/boost-1.70.0/boost/version.hpp b/src/third_party/boost-1.70.0/boost/version.hpp
new file mode 100644
index 00000000000..98ce61a15e6
--- /dev/null
+++ b/src/third_party/boost-1.70.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 107000
+
+//
+// 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_70"
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/visit_each.hpp b/src/third_party/boost-1.70.0/boost/visit_each.hpp
index 6463ca9c2f6..6463ca9c2f6 100644
--- a/src/third_party/boost-1.69.0/boost/visit_each.hpp
+++ b/src/third_party/boost-1.70.0/boost/visit_each.hpp
diff --git a/src/third_party/boost-1.69.0/boost/weak_ptr.hpp b/src/third_party/boost-1.70.0/boost/weak_ptr.hpp
index fa8574beac4..fa8574beac4 100644
--- a/src/third_party/boost-1.69.0/boost/weak_ptr.hpp
+++ b/src/third_party/boost-1.70.0/boost/weak_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/access_rights.hpp b/src/third_party/boost-1.70.0/boost/winapi/access_rights.hpp
index bf8d287f9f1..bf8d287f9f1 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/access_rights.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/access_rights.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/basic_types.hpp b/src/third_party/boost-1.70.0/boost/winapi/basic_types.hpp
index 1168054cd92..1168054cd92 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/basic_types.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/basic_types.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/character_code_conversion.hpp b/src/third_party/boost-1.70.0/boost/winapi/character_code_conversion.hpp
index af5148609c9..af5148609c9 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/character_code_conversion.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/character_code_conversion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/config.hpp b/src/third_party/boost-1.70.0/boost/winapi/config.hpp
index 2de79cfb0e9..2de79cfb0e9 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/config.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/dll.hpp b/src/third_party/boost-1.70.0/boost/winapi/dll.hpp
index b42301e5412..b42301e5412 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/dll.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/dll.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/error_codes.hpp b/src/third_party/boost-1.70.0/boost/winapi/error_codes.hpp
index 2226b0dc1b9..2226b0dc1b9 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/error_codes.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/error_codes.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/error_handling.hpp b/src/third_party/boost-1.70.0/boost/winapi/error_handling.hpp
index 7636d0d64a8..7636d0d64a8 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/error_handling.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/error_handling.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/event.hpp b/src/third_party/boost-1.70.0/boost/winapi/event.hpp
index 1ec611f8908..1ec611f8908 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/event.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/event.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_current_process.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_current_process.hpp
index a56118cce86..a56118cce86 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_current_process.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_current_process.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_current_process_id.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_current_process_id.hpp
index 488318001d8..488318001d8 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_current_process_id.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_current_process_id.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_current_thread.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_current_thread.hpp
index efc7d82fe8f..efc7d82fe8f 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_current_thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_current_thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_current_thread_id.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_current_thread_id.hpp
index c488e4bcdda..c488e4bcdda 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_current_thread_id.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_current_thread_id.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_last_error.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_last_error.hpp
index b53a6a721f1..b53a6a721f1 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_last_error.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_last_error.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_process_times.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_process_times.hpp
index 88df6df40dc..88df6df40dc 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_process_times.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_process_times.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/get_thread_times.hpp b/src/third_party/boost-1.70.0/boost/winapi/get_thread_times.hpp
index 7b8d04a41c7..7b8d04a41c7 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/get_thread_times.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/get_thread_times.hpp
diff --git a/src/third_party/boost-1.70.0/boost/winapi/handles.hpp b/src/third_party/boost-1.70.0/boost/winapi/handles.hpp
new file mode 100644
index 00000000000..91054eeb2e7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/boost/winapi/handles.hpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2010 Vicente J. Botet Escriba
+ * Copyright 2015 Andrey Semashev
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * See http://www.boost.org/LICENSE_1_0.txt
+ */
+
+#ifndef BOOST_WINAPI_HANDLES_HPP_INCLUDED_
+#define BOOST_WINAPI_HANDLES_HPP_INCLUDED_
+
+#include <boost/winapi/basic_types.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+#if !defined( BOOST_USE_WINDOWS_H )
+extern "C" {
+BOOST_SYMBOL_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
+CloseHandle(boost::winapi::HANDLE_ handle);
+
+BOOST_SYMBOL_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
+DuplicateHandle(
+ boost::winapi::HANDLE_ hSourceProcessHandle,
+ boost::winapi::HANDLE_ hSourceHandle,
+ boost::winapi::HANDLE_ hTargetProcessHandle,
+ boost::winapi::HANDLE_* lpTargetHandle,
+ boost::winapi::DWORD_ dwDesiredAccess,
+ boost::winapi::BOOL_ bInheritHandle,
+ boost::winapi::DWORD_ dwOptions);
+
+#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
+BOOST_SYMBOL_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
+CompareObjectHandles(
+ boost::winapi::HANDLE_ hFirstObjectHandle,
+ boost::winapi::HANDLE_ hSecondObjectHandle);
+#endif
+} // extern "C"
+#endif
+
+namespace boost {
+namespace winapi {
+
+using ::CloseHandle;
+using ::DuplicateHandle;
+
+#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
+using ::CompareObjectHandles;
+#endif
+
+// Note: MSVC-14.1 does not interpret INVALID_HANDLE_VALUE_ initializer as a constant expression
+#if defined( BOOST_USE_WINDOWS_H )
+BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_CLOSE_SOURCE_ = DUPLICATE_CLOSE_SOURCE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_SAME_ACCESS_ = DUPLICATE_SAME_ACCESS;
+const HANDLE_ INVALID_HANDLE_VALUE_ = INVALID_HANDLE_VALUE;
+#else
+BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_CLOSE_SOURCE_ = 1;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_SAME_ACCESS_ = 2;
+const HANDLE_ INVALID_HANDLE_VALUE_ = (HANDLE_)(-1);
+#endif
+
+BOOST_CONSTEXPR_OR_CONST DWORD_ duplicate_close_source = DUPLICATE_CLOSE_SOURCE_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ duplicate_same_access = DUPLICATE_SAME_ACCESS_;
+// Note: The "unused" attribute here should not be necessary because the variable is a constant.
+// However, MinGW gcc 5.3 spams warnings about this particular constant.
+const HANDLE_ invalid_handle_value BOOST_ATTRIBUTE_UNUSED = INVALID_HANDLE_VALUE_;
+
+}
+}
+
+#endif // BOOST_WINAPI_HANDLES_HPP_INCLUDED_
diff --git a/src/third_party/boost-1.69.0/boost/winapi/heap_memory.hpp b/src/third_party/boost-1.70.0/boost/winapi/heap_memory.hpp
index fcc61536686..fcc61536686 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/heap_memory.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/heap_memory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/local_memory.hpp b/src/third_party/boost-1.70.0/boost/winapi/local_memory.hpp
index 31241e4e824..31241e4e824 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/local_memory.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/local_memory.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/semaphore.hpp b/src/third_party/boost-1.70.0/boost/winapi/semaphore.hpp
index 44a2981fda8..44a2981fda8 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/semaphore.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/semaphore.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/system.hpp b/src/third_party/boost-1.70.0/boost/winapi/system.hpp
index 118e0c9890b..118e0c9890b 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/system.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/system.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/thread.hpp b/src/third_party/boost-1.70.0/boost/winapi/thread.hpp
index c326aab4f31..c326aab4f31 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/thread.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/thread_pool.hpp b/src/third_party/boost-1.70.0/boost/winapi/thread_pool.hpp
index eebf298d9ff..eebf298d9ff 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/thread_pool.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/thread_pool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/time.hpp b/src/third_party/boost-1.70.0/boost/winapi/time.hpp
index 70b0260fb57..70b0260fb57 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/time.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/timers.hpp b/src/third_party/boost-1.70.0/boost/winapi/timers.hpp
index a036d689e75..a036d689e75 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/timers.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/timers.hpp
diff --git a/src/third_party/boost-1.69.0/boost/winapi/wait.hpp b/src/third_party/boost-1.70.0/boost/winapi/wait.hpp
index 15b4094cca7..15b4094cca7 100644
--- a/src/third_party/boost-1.69.0/boost/winapi/wait.hpp
+++ b/src/third_party/boost-1.70.0/boost/winapi/wait.hpp
diff --git a/src/third_party/boost-1.69.0/libs/align/README.md b/src/third_party/boost-1.70.0/libs/align/README.md
index 983b806f18a..983b806f18a 100644
--- a/src/third_party/boost-1.69.0/libs/align/README.md
+++ b/src/third_party/boost-1.70.0/libs/align/README.md
diff --git a/src/third_party/boost-1.69.0/libs/atomic/src/lockpool.cpp b/src/third_party/boost-1.70.0/libs/atomic/src/lockpool.cpp
index a1292fa7bb7..a1292fa7bb7 100644
--- a/src/third_party/boost-1.69.0/libs/atomic/src/lockpool.cpp
+++ b/src/third_party/boost-1.70.0/libs/atomic/src/lockpool.cpp
diff --git a/src/third_party/boost-1.69.0/libs/bind/README.md b/src/third_party/boost-1.70.0/libs/bind/README.md
index ebe55532af2..ebe55532af2 100644
--- a/src/third_party/boost-1.69.0/libs/bind/README.md
+++ b/src/third_party/boost-1.70.0/libs/bind/README.md
diff --git a/src/third_party/boost-1.69.0/libs/bind/bind_as_compose.cpp b/src/third_party/boost-1.70.0/libs/bind/bind_as_compose.cpp
index 999856cf280..999856cf280 100644
--- a/src/third_party/boost-1.69.0/libs/bind/bind_as_compose.cpp
+++ b/src/third_party/boost-1.70.0/libs/bind/bind_as_compose.cpp
diff --git a/src/third_party/boost-1.69.0/libs/bind/bind_visitor.cpp b/src/third_party/boost-1.70.0/libs/bind/bind_visitor.cpp
index 1ce7b53f78f..1ce7b53f78f 100644
--- a/src/third_party/boost-1.69.0/libs/bind/bind_visitor.cpp
+++ b/src/third_party/boost-1.70.0/libs/bind/bind_visitor.cpp
diff --git a/src/third_party/boost-1.69.0/libs/chrono/src/chrono.cpp b/src/third_party/boost-1.70.0/libs/chrono/src/chrono.cpp
index f500a796c81..f500a796c81 100644
--- a/src/third_party/boost-1.69.0/libs/chrono/src/chrono.cpp
+++ b/src/third_party/boost-1.70.0/libs/chrono/src/chrono.cpp
diff --git a/src/third_party/boost-1.69.0/libs/chrono/src/process_cpu_clocks.cpp b/src/third_party/boost-1.70.0/libs/chrono/src/process_cpu_clocks.cpp
index c21cab3b8b6..c21cab3b8b6 100644
--- a/src/third_party/boost-1.69.0/libs/chrono/src/process_cpu_clocks.cpp
+++ b/src/third_party/boost-1.70.0/libs/chrono/src/process_cpu_clocks.cpp
diff --git a/src/third_party/boost-1.69.0/libs/chrono/src/thread_clock.cpp b/src/third_party/boost-1.70.0/libs/chrono/src/thread_clock.cpp
index c21b114c0d6..c21b114c0d6 100644
--- a/src/third_party/boost-1.69.0/libs/chrono/src/thread_clock.cpp
+++ b/src/third_party/boost-1.70.0/libs/chrono/src/thread_clock.cpp
diff --git a/src/third_party/boost-1.69.0/libs/container/Jamfile b/src/third_party/boost-1.70.0/libs/container/Jamfile
index c55393e39b7..c55393e39b7 100644
--- a/src/third_party/boost-1.69.0/libs/container/Jamfile
+++ b/src/third_party/boost-1.70.0/libs/container/Jamfile
diff --git a/src/third_party/boost-1.69.0/libs/container/src/alloc_lib.c b/src/third_party/boost-1.70.0/libs/container/src/alloc_lib.c
index 077768b9462..077768b9462 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/alloc_lib.c
+++ b/src/third_party/boost-1.70.0/libs/container/src/alloc_lib.c
diff --git a/src/third_party/boost-1.69.0/libs/container/src/dlmalloc.cpp b/src/third_party/boost-1.70.0/libs/container/src/dlmalloc.cpp
index 6ab6de3a533..6ab6de3a533 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/dlmalloc.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/container/src/dlmalloc_2_8_6.c
index 7a53d3535b7..7a53d3535b7 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_2_8_6.c
+++ b/src/third_party/boost-1.70.0/libs/container/src/dlmalloc_2_8_6.c
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.70.0/libs/container/src/dlmalloc_ext_2_8_6.c
index 918ce020b4f..918ce020b4f 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_ext_2_8_6.c
+++ b/src/third_party/boost-1.70.0/libs/container/src/dlmalloc_ext_2_8_6.c
diff --git a/src/third_party/boost-1.70.0/libs/container/src/global_resource.cpp b/src/third_party/boost-1.70.0/libs/container/src/global_resource.cpp
new file mode 100644
index 00000000000..df9c688bbb7
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/container/src/global_resource.cpp
@@ -0,0 +1,106 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (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.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#define BOOST_CONTAINER_SOURCE
+#include <boost/container/pmr/memory_resource.hpp>
+#include <boost/container/pmr/global_resource.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/container/throw_exception.hpp>
+#include <boost/container/detail/dlmalloc.hpp> //For global lock
+
+#include <cstddef>
+#include <new>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+class new_delete_resource_imp
+ : public memory_resource
+{
+ public:
+
+ virtual ~new_delete_resource_imp()
+ {}
+
+ virtual void* do_allocate(std::size_t bytes, std::size_t alignment)
+ { (void)bytes; (void)alignment; return new char[bytes]; }
+
+ virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
+ { (void)bytes; (void)alignment; delete[]((char*)p); }
+
+ virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
+ { return &other == this; }
+} new_delete_resource_instance;
+
+struct null_memory_resource_imp
+ : public memory_resource
+{
+ public:
+
+ virtual ~null_memory_resource_imp()
+ {}
+
+ virtual void* do_allocate(std::size_t bytes, std::size_t alignment)
+ {
+ (void)bytes; (void)alignment;
+ throw_bad_alloc();
+ return 0;
+ }
+
+ virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
+ { (void)p; (void)bytes; (void)alignment; }
+
+ virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
+ { return &other == this; }
+} null_memory_resource_instance;
+
+BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT
+{
+ return &new_delete_resource_instance;
+}
+
+BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT
+{
+ return &null_memory_resource_instance;
+}
+
+static memory_resource *default_memory_resource = &new_delete_resource_instance;
+
+BOOST_CONTAINER_DECL memory_resource* set_default_resource(memory_resource* r) BOOST_NOEXCEPT
+{
+ //TO-DO: synchronizes-with part using atomics
+ if(dlmalloc_global_sync_lock()){
+ memory_resource *previous = default_memory_resource;
+ default_memory_resource = r ? r : new_delete_resource();
+ dlmalloc_global_sync_unlock();
+ return previous;
+ }
+ else{
+ return new_delete_resource();
+ }
+}
+
+BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT
+{
+ //TO-DO: synchronizes-with part using atomics
+ if(dlmalloc_global_sync_lock()){
+ memory_resource *current = default_memory_resource;
+ dlmalloc_global_sync_unlock();
+ return current;
+ }
+ else{
+ return new_delete_resource();
+ }
+}
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
diff --git a/src/third_party/boost-1.69.0/libs/container/src/monotonic_buffer_resource.cpp b/src/third_party/boost-1.70.0/libs/container/src/monotonic_buffer_resource.cpp
index 29ffde1db2a..29ffde1db2a 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/monotonic_buffer_resource.cpp
+++ b/src/third_party/boost-1.70.0/libs/container/src/monotonic_buffer_resource.cpp
diff --git a/src/third_party/boost-1.69.0/libs/container/src/pool_resource.cpp b/src/third_party/boost-1.70.0/libs/container/src/pool_resource.cpp
index e6829e28e7b..e6829e28e7b 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/pool_resource.cpp
+++ b/src/third_party/boost-1.70.0/libs/container/src/pool_resource.cpp
diff --git a/src/third_party/boost-1.69.0/libs/container/src/synchronized_pool_resource.cpp b/src/third_party/boost-1.70.0/libs/container/src/synchronized_pool_resource.cpp
index 0a725e9ffda..0a725e9ffda 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/synchronized_pool_resource.cpp
+++ b/src/third_party/boost-1.70.0/libs/container/src/synchronized_pool_resource.cpp
diff --git a/src/third_party/boost-1.69.0/libs/container/src/unsynchronized_pool_resource.cpp b/src/third_party/boost-1.70.0/libs/container/src/unsynchronized_pool_resource.cpp
index 0c84f694a33..0c84f694a33 100644
--- a/src/third_party/boost-1.69.0/libs/container/src/unsynchronized_pool_resource.cpp
+++ b/src/third_party/boost-1.70.0/libs/container/src/unsynchronized_pool_resource.cpp
diff --git a/src/third_party/boost-1.69.0/libs/coroutine/src/detail/coroutine_context.cpp b/src/third_party/boost-1.70.0/libs/coroutine/src/detail/coroutine_context.cpp
index 6a6d5248338..6a6d5248338 100644
--- a/src/third_party/boost-1.69.0/libs/coroutine/src/detail/coroutine_context.cpp
+++ b/src/third_party/boost-1.70.0/libs/coroutine/src/detail/coroutine_context.cpp
diff --git a/src/third_party/boost-1.69.0/libs/coroutine/src/exceptions.cpp b/src/third_party/boost-1.70.0/libs/coroutine/src/exceptions.cpp
index d32eb546838..d32eb546838 100644
--- a/src/third_party/boost-1.69.0/libs/coroutine/src/exceptions.cpp
+++ b/src/third_party/boost-1.70.0/libs/coroutine/src/exceptions.cpp
diff --git a/src/third_party/boost-1.69.0/libs/coroutine/src/posix/stack_traits.cpp b/src/third_party/boost-1.70.0/libs/coroutine/src/posix/stack_traits.cpp
index b629943221f..b629943221f 100644
--- a/src/third_party/boost-1.69.0/libs/coroutine/src/posix/stack_traits.cpp
+++ b/src/third_party/boost-1.70.0/libs/coroutine/src/posix/stack_traits.cpp
diff --git a/src/third_party/boost-1.69.0/libs/coroutine/src/windows/stack_traits.cpp b/src/third_party/boost-1.70.0/libs/coroutine/src/windows/stack_traits.cpp
index bdf417a7453..bdf417a7453 100644
--- a/src/third_party/boost-1.69.0/libs/coroutine/src/windows/stack_traits.cpp
+++ b/src/third_party/boost-1.70.0/libs/coroutine/src/windows/stack_traits.cpp
diff --git a/src/third_party/boost-1.69.0/libs/date_time/Jamfile b/src/third_party/boost-1.70.0/libs/date_time/Jamfile
index c8fe54779f1..c8fe54779f1 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/Jamfile
+++ b/src/third_party/boost-1.70.0/libs/date_time/Jamfile
diff --git a/src/third_party/boost-1.69.0/libs/date_time/LICENSE b/src/third_party/boost-1.70.0/libs/date_time/LICENSE
index 36b7cd93cdf..36b7cd93cdf 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/LICENSE
+++ b/src/third_party/boost-1.70.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.70.0/libs/date_time/README.md
index c3479a2a350..c3479a2a350 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/README.md
+++ b/src/third_party/boost-1.70.0/libs/date_time/README.md
diff --git a/src/third_party/boost-1.69.0/libs/date_time/data/README.zone_spec_csv_file b/src/third_party/boost-1.70.0/libs/date_time/data/README.zone_spec_csv_file
index 069cac21950..069cac21950 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/data/README.zone_spec_csv_file
+++ b/src/third_party/boost-1.70.0/libs/date_time/data/README.zone_spec_csv_file
diff --git a/src/third_party/boost-1.69.0/libs/date_time/data/date_time_zonespec.csv b/src/third_party/boost-1.70.0/libs/date_time/data/date_time_zonespec.csv
index c528d57d1a7..c528d57d1a7 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/data/date_time_zonespec.csv
+++ b/src/third_party/boost-1.70.0/libs/date_time/data/date_time_zonespec.csv
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/date_time.doc b/src/third_party/boost-1.70.0/libs/date_time/src/date_time.doc
index 920fac2e58a..920fac2e58a 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/date_time.doc
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/date_time.doc
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/date_generators.cpp b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/date_generators.cpp
index 32a58c17921..32a58c17921 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/date_generators.cpp
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/date_generators.cpp
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_month.cpp b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_month.cpp
index 8232378c0d3..8232378c0d3 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_month.cpp
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_month.cpp
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_names.hpp b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_names.hpp
index f20b320d174..f20b320d174 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_names.hpp
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_names.hpp
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_weekday.cpp b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_weekday.cpp
index ffdc96f8ebf..ffdc96f8ebf 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_weekday.cpp
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/greg_weekday.cpp
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/gregorian_types.cpp b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/gregorian_types.cpp
index 7dd7f22bfc0..7dd7f22bfc0 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/gregorian_types.cpp
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/gregorian/gregorian_types.cpp
diff --git a/src/third_party/boost-1.69.0/libs/date_time/src/posix_time/posix_time_types.cpp b/src/third_party/boost-1.70.0/libs/date_time/src/posix_time/posix_time_types.cpp
index 43953010405..43953010405 100644
--- a/src/third_party/boost-1.69.0/libs/date_time/src/posix_time/posix_time_types.cpp
+++ b/src/third_party/boost-1.70.0/libs/date_time/src/posix_time/posix_time_types.cpp
diff --git a/src/third_party/boost-1.69.0/libs/exception/src/clone_current_exception_non_intrusive.cpp b/src/third_party/boost-1.70.0/libs/exception/src/clone_current_exception_non_intrusive.cpp
index 7ebd7b5894e..7ebd7b5894e 100644
--- a/src/third_party/boost-1.69.0/libs/exception/src/clone_current_exception_non_intrusive.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/filesystem/README.md
index f31d689b7e6..f31d689b7e6 100644
--- a/src/third_party/boost-1.69.0/libs/filesystem/README.md
+++ b/src/third_party/boost-1.70.0/libs/filesystem/README.md
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/codecvt_error_category.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/codecvt_error_category.cpp
new file mode 100644
index 00000000000..cabd4f00765
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/codecvt_error_category.cpp
@@ -0,0 +1,84 @@
+// codecvt_error_category implementation file ----------------------------------------//
+
+// 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 at http://www.boost.org/libs/filesystem
+
+//--------------------------------------------------------------------------------------//
+
+#include <boost/config/warning_disable.hpp>
+
+// 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/config.hpp>
+#include <boost/filesystem/path_traits.hpp>
+#include <boost/system/error_code.hpp>
+#include <locale>
+#include <vector>
+#include <cstdlib>
+#include <cassert>
+
+//--------------------------------------------------------------------------------------//
+
+namespace
+{
+ class codecvt_error_cat : public boost::system::error_category
+ {
+ public:
+ codecvt_error_cat(){}
+ const char* name() const BOOST_SYSTEM_NOEXCEPT;
+ std::string message(int ev) const;
+ };
+
+ const char* codecvt_error_cat::name() const BOOST_SYSTEM_NOEXCEPT
+ {
+ return "codecvt";
+ }
+
+ std::string codecvt_error_cat::message(int ev) const
+ {
+ std::string str;
+ switch (ev)
+ {
+ case std::codecvt_base::ok:
+ str = "ok";
+ break;
+ case std::codecvt_base::partial:
+ str = "partial";
+ break;
+ case std::codecvt_base::error:
+ str = "error";
+ break;
+ case std::codecvt_base::noconv:
+ str = "noconv";
+ break;
+ default:
+ str = "unknown error";
+ }
+ return str;
+ }
+
+} // unnamed namespace
+
+namespace boost
+{
+ namespace filesystem
+ {
+
+ BOOST_FILESYSTEM_DECL const boost::system::error_category& codecvt_error_category()
+ {
+ static const codecvt_error_cat codecvt_error_cat_const;
+ return codecvt_error_cat_const;
+ }
+
+ } // namespace filesystem
+} // namespace boost
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/operations.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/operations.cpp
new file mode 100644
index 00000000000..91fe4d5c3fd
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/operations.cpp
@@ -0,0 +1,2675 @@
+// 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/system/error_code.hpp>
+#include <boost/smart_ptr/scoped_array.hpp>
+#include <boost/smart_ptr/intrusive_ptr.hpp>
+#include <boost/detail/workaround.hpp>
+#include <new> // std::bad_alloc
+#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 <boost/winapi/dll.hpp> // get_proc_address, GetModuleHandleW
+# 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
+{
+
+ // Absolute maximum path length, in bytes, that we're willing to accept from various system calls.
+ // This value is arbitrary, it is supposed to be a hard limit to avoid memory exhaustion
+ // in some of the algorithms below in case of some corrupted or maliciously broken filesystem.
+ BOOST_CONSTEXPR_OR_CONST std::size_t absolute_path_max = 16u * 1024u * 1024u;
+
+ 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) BOOST_NOEXCEPT; // 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 //
+// //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_CONSTEXPR_OR_CONST char dot = '.';
+ BOOST_CONSTEXPR_OR_CONST char end_of_string = '\0';
+
+ inline bool not_found_error(int errval) BOOST_NOEXCEPT
+ {
+ return errval == ENOENT || errval == ENOTDIR;
+ }
+
+ bool // true if ok
+ copy_file_api(const std::string& from_p,
+ const std::string& to_p, bool fail_if_exists)
+ {
+ BOOST_CONSTEXPR_OR_CONST std::size_t buf_sz = 65536;
+ 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)
+ {
+ const 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 //
+// //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_CONSTEXPR_OR_CONST std::size_t buf_size=128;
+
+ BOOST_CONSTEXPR_OR_CONST wchar_t dot = L'.';
+ BOOST_CONSTEXPR_OR_CONST wchar_t end_of_string = L'\0';
+
+ inline bool not_found_error(int errval) BOOST_NOEXCEPT
+ {
+ 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(
+ boost::winapi::get_proc_address(
+ boost::winapi::GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW"));
+
+ typedef BOOLEAN (WINAPI *PtrCreateSymbolicLinkW)(
+ /*__in*/ LPCWSTR lpSymlinkFileName,
+ /*__in*/ LPCWSTR lpTargetFileName,
+ /*__in*/ DWORD dwFlags
+ );
+
+ PtrCreateSymbolicLinkW create_symbolic_link_api = PtrCreateSymbolicLinkW(
+ boost::winapi::get_proc_address(
+ boost::winapi::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
+ struct local
+ {
+ static bool getcwd_error(error_code* ec)
+ {
+ const int err = errno;
+ return error((err != ERANGE
+ // 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__))
+ && err != 0
+# endif
+ ) ? err : 0, ec, "boost::filesystem::current_path");
+ }
+ };
+
+ path cur;
+ char small_buf[1024];
+ const char* p = ::getcwd(small_buf, sizeof(small_buf));
+ if (BOOST_LIKELY(!!p))
+ {
+ cur = p;
+ if (ec != 0) ec->clear();
+ }
+ else if (BOOST_LIKELY(!local::getcwd_error(ec)))
+ {
+ for (std::size_t path_max = sizeof(small_buf);; path_max *= 2u) // loop 'til buffer large enough
+ {
+ if (BOOST_UNLIKELY(path_max > absolute_path_max))
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::current_path",
+ error_code(ENAMETOOLONG, system_category())));
+ else
+ ec->assign(ENAMETOOLONG, system_category());
+ break;
+ }
+
+ boost::scoped_array<char> buf(new char[path_max]);
+ p = ::getcwd(buf.get(), path_max);
+ if (BOOST_LIKELY(!!p))
+ {
+ cur = buf.get();
+ if (ec != 0)
+ ec->clear();
+ break;
+ }
+ else if (BOOST_UNLIKELY(local::getcwd_error(ec)))
+ {
+ 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
+ {
+ const int err = errno;
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::permissions", p,
+ error_code(err, system::generic_category())));
+ else
+ ec->assign(err, 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
+ const char* const path_str = p.c_str();
+ char small_buf[1024];
+ ssize_t result = ::readlink(path_str, small_buf, sizeof(small_buf));
+ if (BOOST_UNLIKELY(result < 0))
+ {
+ fail:
+ const int err = errno;
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::read_symlink",
+ p, error_code(err, system_category())));
+ else
+ ec->assign(err, system_category());
+ }
+ else if (BOOST_LIKELY(static_cast< std::size_t >(result) < sizeof(small_buf)))
+ {
+ symlink_path.assign(small_buf, small_buf + result);
+ if (ec != 0)
+ ec->clear();
+ }
+ else
+ {
+ for (std::size_t path_max = sizeof(small_buf) * 2u;; path_max *= 2u) // loop 'til buffer large enough
+ {
+ if (BOOST_UNLIKELY(path_max > absolute_path_max))
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::read_symlink",
+ p, error_code(ENAMETOOLONG, system_category())));
+ else
+ ec->assign(ENAMETOOLONG, system_category());
+ break;
+ }
+
+ boost::scoped_array<char> buf(new char[path_max]);
+ result = ::readlink(path_str, buf.get(), path_max);
+ if (BOOST_UNLIKELY(result < 0))
+ {
+ goto fail;
+ }
+ else if (BOOST_LIKELY(static_cast< std::size_t >(result) < 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)
+ {
+ const int err = errno;
+ if (ec != 0) // always report errno, even though some
+ ec->assign(err, system_category()); // errno values are not status_errors
+
+ if (not_found_error(err))
+ {
+ 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(err, 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)
+ {
+ const int err = errno;
+ if (ec != 0) // always report errno, even though some
+ ec->assign(err, system_category()); // errno values are not status_errors
+
+ if (not_found_error(err)) // 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(err, 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 //
+// //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL
+ 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;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ 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)
+ {
+ const int err = errno;
+ if (err == 0)// indeterminate
+ max = 4096; // guess
+ else
+ return error_code(err, 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)
+ {
+ const int err = errno;
+ return error_code(err, 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;
+ const std::size_t buffer_size = (sizeof(dirent) - sizeof(dirent().d_name))
+ + path_size + 1; // + 1 for "\0"
+ buffer = std::malloc(buffer_size);
+ if (BOOST_UNLIKELY(!buffer))
+ return make_error_code(boost::system::errc::not_enough_memory);
+ std::memset(buffer, 0, buffer_size);
+ return ok;
+ }
+
+ // warning: the only dirent members updated are d_name and d_type
+ 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;
+# ifdef BOOST_FILESYSTEM_STATUS_CACHE
+ entry->d_type = p->d_type;
+# endif
+ 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)
+ {
+ const int err = errno;
+ return error_code(err, 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;
+ int err = 0;
+ if (::closedir(h) != 0)
+ err = errno;
+ return error_code(err, 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;
+
+ try
+ {
+ 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);
+ const path::string_type::value_type* filename_str = filename.c_str();
+ if (filename_str[0] == dot // dot or dot-dot
+ && (filename_str[1] == end_of_string ||
+ (filename_str[1] == dot && filename_str[2] == end_of_string)))
+ { detail::directory_iterator_increment(it, ec); }
+ }
+ }
+ catch (std::bad_alloc&)
+ {
+ if (!ec)
+ throw;
+
+ *ec = make_error_code(boost::system::errc::not_enough_memory);
+ it.m_imp.reset();
+ }
+ }
+
+ 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");
+
+ if (ec != 0)
+ ec->clear();
+
+ try
+ {
+ path::string_type filename;
+ file_status file_stat, symlink_file_stat;
+ system::error_code increment_ec;
+
+ for (;;)
+ {
+ increment_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 (increment_ec) // happens if filesystem is corrupt, such as on a damaged optical disc
+ {
+ boost::intrusive_ptr< detail::dir_itr_imp > imp;
+ imp.swap(it.m_imp);
+ path error_path(imp->dir_entry.path().parent_path()); // fix ticket #5900
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(
+ filesystem_error("boost::filesystem::directory_iterator::operator++",
+ error_path,
+ increment_ec));
+ *ec = increment_ec;
+ return;
+ }
+
+ if (it.m_imp->handle == 0) // eof, make end
+ {
+ it.m_imp.reset();
+ return;
+ }
+
+ const path::string_type::value_type* filename_str = filename.c_str();
+ if (!(filename_str[0] == dot // !(dot or dot-dot)
+ && (filename_str[1] == end_of_string ||
+ (filename_str[1] == dot && filename_str[2] == end_of_string))))
+ {
+ it.m_imp->dir_entry.replace_filename(
+ filename, file_stat, symlink_file_stat);
+ return;
+ }
+ }
+ }
+ catch (std::bad_alloc&)
+ {
+ if (!ec)
+ throw;
+
+ *ec = make_error_code(boost::system::errc::not_enough_memory);
+ }
+ }
+
+//--------------------------------------------------------------------------------------//
+// //
+// recursive_directory_iterator //
+// //
+//--------------------------------------------------------------------------------------//
+
+ // Returns: true if push occurs, otherwise false. Always returns false on error.
+ BOOST_FILESYSTEM_DECL
+ bool recur_dir_itr_imp::push_directory(system::error_code& ec) BOOST_NOEXCEPT
+ {
+ ec.clear();
+
+ try
+ {
+ // Discover if the iterator is for a directory that needs to be recursed into,
+ // taking symlinks and options into account.
+
+ if ((m_options & static_cast< unsigned int >(symlink_option::_detail_no_push)) == static_cast< unsigned int >(symlink_option::_detail_no_push))
+ {
+ m_options &= ~static_cast< unsigned int >(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 & static_cast< unsigned int >(symlink_option::recurse)) != static_cast< unsigned int >(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 & static_cast< unsigned int >(symlink_option::recurse)) == static_cast< unsigned int >(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())
+ {
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ m_stack.push(std::move(next)); // may throw
+#else
+ m_stack.push(next); // may throw
+#endif
+ ++m_level;
+ return true;
+ }
+ }
+ }
+ catch (std::bad_alloc&)
+ {
+ ec = make_error_code(system::errc::not_enough_memory);
+ }
+
+ return false;
+ }
+
+ // 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.
+ BOOST_FILESYSTEM_DECL
+ void recur_dir_itr_imp::increment(system::error_code* ec)
+ {
+ 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;
+ }
+
+ // report errors if any
+ if (ec_push_directory)
+ {
+ if (ec)
+ {
+ *ec = ec_push_directory;
+ return;
+ }
+ else
+ {
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "filesystem::recursive_directory_iterator directory error",
+ ec_push_directory));
+ }
+ }
+
+ // 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())
+ {
+ directory_iterator& it = m_stack.top();
+ detail::directory_iterator_increment(it, ec);
+ if (ec && *ec)
+ return;
+ if (it != directory_iterator())
+ break;
+
+ m_stack.pop();
+ --m_level;
+ }
+
+ if (ec)
+ ec->clear();
+ }
+
+ // ec == 0 means throw on error
+ BOOST_FILESYSTEM_DECL
+ void recur_dir_itr_imp::pop(system::error_code* ec)
+ {
+ BOOST_ASSERT_MSG(m_level > 0,
+ "pop() on recursive_directory_iterator with level < 1");
+
+ if (ec)
+ ec->clear();
+
+ while (true)
+ {
+ m_stack.pop();
+ --m_level;
+
+ if (m_stack.empty())
+ break;
+
+ directory_iterator& it = m_stack.top();
+ detail::directory_iterator_increment(it, ec);
+ if (ec && *ec)
+ break;
+ if (it != directory_iterator())
+ break;
+ }
+ }
+
+} // namespace detail
+} // namespace filesystem
+} // namespace boost
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/path.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/path.cpp
new file mode 100644
index 00000000000..497f4d563ff
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/path.cpp
@@ -0,0 +1,940 @@
+// filesystem path.cpp ------------------------------------------------------------- //
+
+// Copyright Beman Dawes 2008
+
+// 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
+
+// Old standard library configurations, particularly MingGW, don't support wide strings.
+// Report this with an explicit error message.
+#include <boost/config.hpp>
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
+// 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 <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp> // for filesystem_error
+#include <boost/scoped_array.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/assert.hpp>
+#include <algorithm>
+#include <iterator>
+#include <cstddef>
+#include <cstring>
+#include <cassert>
+
+#ifdef BOOST_WINDOWS_API
+# include "windows_file_codecvt.hpp"
+# include <windows.h>
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
+ || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
+# include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
+#endif
+
+#ifdef BOOST_FILESYSTEM_DEBUG
+# include <iostream>
+# include <iomanip>
+#endif
+
+namespace fs = boost::filesystem;
+
+using boost::filesystem::path;
+
+using std::string;
+using std::wstring;
+
+using boost::system::error_code;
+
+//--------------------------------------------------------------------------------------//
+// //
+// class path helpers //
+// //
+//--------------------------------------------------------------------------------------//
+
+namespace
+{
+ //------------------------------------------------------------------------------------//
+ // miscellaneous class path helpers //
+ //------------------------------------------------------------------------------------//
+
+ typedef path::value_type value_type;
+ typedef path::string_type string_type;
+ typedef string_type::size_type size_type;
+
+# ifdef BOOST_WINDOWS_API
+
+ const wchar_t* const separators = L"/\\";
+ const wchar_t* separator_string = L"/";
+ const wchar_t* preferred_separator_string = L"\\";
+ const wchar_t colon = L':';
+ const wchar_t questionmark = L'?';
+
+ inline bool is_letter(wchar_t c)
+ {
+ return (c >= L'a' && c <=L'z') || (c >= L'A' && c <=L'Z');
+ }
+
+# else
+
+ const char* const separators = "/";
+ const char* separator_string = "/";
+ const char* preferred_separator_string = "/";
+
+# endif
+
+ bool is_root_separator(const string_type& str, size_type pos);
+ // pos is position of the separator
+
+ size_type filename_pos(const string_type& str,
+ size_type end_pos); // end_pos is past-the-end position
+ // Returns: 0 if str itself is filename (or empty)
+
+ size_type root_directory_start(const string_type& path, size_type size);
+ // Returns: npos if no root_directory found
+
+ void first_element(
+ const string_type& src,
+ size_type& element_pos,
+ size_type& element_size,
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) // VC++ 7.1
+ size_type size = string_type::npos
+# else
+ size_type size = -1
+# endif
+ );
+
+} // unnamed namespace
+
+//--------------------------------------------------------------------------------------//
+// //
+// class path implementation //
+// //
+//--------------------------------------------------------------------------------------//
+
+namespace boost
+{
+namespace filesystem
+{
+
+ BOOST_FILESYSTEM_DECL path& path::operator/=(const path& p)
+ {
+ if (p.empty())
+ return *this;
+ if (this == &p) // self-append
+ {
+ path rhs(p);
+ if (!detail::is_directory_separator(rhs.m_pathname[0]))
+ m_append_separator_if_needed();
+ m_pathname += rhs.m_pathname;
+ }
+ else
+ {
+ if (!detail::is_directory_separator(*p.m_pathname.begin()))
+ m_append_separator_if_needed();
+ m_pathname += p.m_pathname;
+ }
+ return *this;
+ }
+
+ BOOST_FILESYSTEM_DECL path& path::operator/=(const value_type* ptr)
+ {
+ if (!*ptr)
+ return *this;
+ if (ptr >= m_pathname.data()
+ && ptr < m_pathname.data() + m_pathname.size()) // overlapping source
+ {
+ path rhs(ptr);
+ if (!detail::is_directory_separator(rhs.m_pathname[0]))
+ m_append_separator_if_needed();
+ m_pathname += rhs.m_pathname;
+ }
+ else
+ {
+ if (!detail::is_directory_separator(*ptr))
+ m_append_separator_if_needed();
+ m_pathname += ptr;
+ }
+ return *this;
+ }
+
+# ifdef BOOST_WINDOWS_API
+
+ BOOST_FILESYSTEM_DECL path path::generic_path() const
+ {
+ path tmp(*this);
+ std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/');
+ return tmp;
+ }
+
+# endif // BOOST_WINDOWS_API
+
+ BOOST_FILESYSTEM_DECL int path::compare(const path& p) const BOOST_NOEXCEPT
+ {
+ return detail::lex_compare(begin(), end(), p.begin(), p.end());
+ }
+
+ // m_append_separator_if_needed ----------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL path::string_type::size_type path::m_append_separator_if_needed()
+ {
+ if (!m_pathname.empty() &&
+# ifdef BOOST_WINDOWS_API
+ *(m_pathname.end()-1) != colon &&
+# endif
+ !detail::is_directory_separator(*(m_pathname.end()-1)))
+ {
+ string_type::size_type tmp(m_pathname.size());
+ m_pathname += preferred_separator;
+ return tmp;
+ }
+ return 0;
+ }
+
+ // m_erase_redundant_separator -----------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL void path::m_erase_redundant_separator(string_type::size_type sep_pos)
+ {
+ if (sep_pos // a separator was added
+ && sep_pos < m_pathname.size() // and something was appended
+ && (m_pathname[sep_pos+1] == separator // and it was also separator
+# ifdef BOOST_WINDOWS_API
+ || m_pathname[sep_pos+1] == preferred_separator // or preferred_separator
+# endif
+)) { m_pathname.erase(sep_pos, 1); } // erase the added separator
+ }
+
+ // modifiers -----------------------------------------------------------------------//
+
+# ifdef BOOST_WINDOWS_API
+ BOOST_FILESYSTEM_DECL path& path::make_preferred()
+ {
+ std::replace(m_pathname.begin(), m_pathname.end(), L'/', L'\\');
+ return *this;
+ }
+# endif
+
+ BOOST_FILESYSTEM_DECL path& path::remove_filename()
+ {
+ m_pathname.erase(m_parent_path_end());
+ return *this;
+ }
+
+ BOOST_FILESYSTEM_DECL path& path::remove_trailing_separator()
+ {
+ if (!m_pathname.empty()
+ && detail::is_directory_separator(m_pathname[m_pathname.size() - 1]))
+ m_pathname.erase(m_pathname.size() - 1);
+ return *this;
+ }
+
+ BOOST_FILESYSTEM_DECL path& path::replace_extension(const path& new_extension)
+ {
+ // erase existing extension, including the dot, if any
+ m_pathname.erase(m_pathname.size()-extension().m_pathname.size());
+
+ if (!new_extension.empty())
+ {
+ // append new_extension, adding the dot if necessary
+ if (new_extension.m_pathname[0] != dot)
+ m_pathname.push_back(dot);
+ m_pathname.append(new_extension.m_pathname);
+ }
+
+ return *this;
+ }
+
+ // decomposition -------------------------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL path path::root_path() const
+ {
+ path temp(root_name());
+ if (!root_directory().empty()) temp.m_pathname += root_directory().c_str();
+ return temp;
+ }
+
+ BOOST_FILESYSTEM_DECL path path::root_name() const
+ {
+ iterator itr(begin());
+
+ return (itr.m_pos != m_pathname.size()
+ && (
+ (itr.m_element.m_pathname.size() > 1
+ && detail::is_directory_separator(itr.m_element.m_pathname[0])
+ && detail::is_directory_separator(itr.m_element.m_pathname[1]))
+# ifdef BOOST_WINDOWS_API
+ || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon
+# endif
+ ))
+ ? itr.m_element
+ : path();
+ }
+
+ BOOST_FILESYSTEM_DECL path path::root_directory() const
+ {
+ size_type pos(root_directory_start(m_pathname, m_pathname.size()));
+
+ return pos == string_type::npos
+ ? path()
+ : path(m_pathname.c_str() + pos, m_pathname.c_str() + pos + 1);
+ }
+
+ BOOST_FILESYSTEM_DECL path path::relative_path() const
+ {
+ iterator itr(begin());
+
+ for (; itr.m_pos != m_pathname.size()
+ && (detail::is_directory_separator(itr.m_element.m_pathname[0])
+# ifdef BOOST_WINDOWS_API
+ || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon
+# endif
+ ); ++itr) {}
+
+ return path(m_pathname.c_str() + itr.m_pos);
+ }
+
+ BOOST_FILESYSTEM_DECL string_type::size_type path::m_parent_path_end() const
+ {
+ size_type end_pos(filename_pos(m_pathname, m_pathname.size()));
+
+ bool filename_was_separator(m_pathname.size()
+ && detail::is_directory_separator(m_pathname[end_pos]));
+
+ // skip separators unless root directory
+ size_type root_dir_pos(root_directory_start(m_pathname, end_pos));
+ for (;
+ end_pos > 0
+ && (end_pos-1) != root_dir_pos
+ && detail::is_directory_separator(m_pathname[end_pos-1])
+ ;
+ --end_pos) {}
+
+ return (end_pos == 1 && root_dir_pos == 0 && filename_was_separator)
+ ? string_type::npos
+ : end_pos;
+ }
+
+ BOOST_FILESYSTEM_DECL path path::parent_path() const
+ {
+ size_type end_pos(m_parent_path_end());
+ return end_pos == string_type::npos
+ ? path()
+ : path(m_pathname.c_str(), m_pathname.c_str() + end_pos);
+ }
+
+ BOOST_FILESYSTEM_DECL path path::filename() const
+ {
+ size_type pos(filename_pos(m_pathname, m_pathname.size()));
+ return (m_pathname.size()
+ && pos
+ && detail::is_directory_separator(m_pathname[pos])
+ && !is_root_separator(m_pathname, pos))
+ ? detail::dot_path()
+ : path(m_pathname.c_str() + pos);
+ }
+
+ BOOST_FILESYSTEM_DECL path path::stem() const
+ {
+ path name(filename());
+ if (name == detail::dot_path() || name == detail::dot_dot_path()) return name;
+ size_type pos(name.m_pathname.rfind(dot));
+ return pos == string_type::npos
+ ? name
+ : path(name.m_pathname.c_str(), name.m_pathname.c_str() + pos);
+ }
+
+ BOOST_FILESYSTEM_DECL path path::extension() const
+ {
+ path name(filename());
+ if (name == detail::dot_path() || name == detail::dot_dot_path()) return path();
+ size_type pos(name.m_pathname.rfind(dot));
+ return pos == string_type::npos
+ ? path()
+ : path(name.m_pathname.c_str() + pos);
+ }
+
+ // lexical operations --------------------------------------------------------------//
+
+ namespace detail
+ {
+ // C++14 provides a mismatch algorithm with four iterator arguments(), but earlier
+ // standard libraries didn't, so provide this needed functionality.
+ inline
+ std::pair<path::iterator, path::iterator> mismatch(path::iterator it1,
+ path::iterator it1end, path::iterator it2, path::iterator it2end)
+ {
+ for (; it1 != it1end && it2 != it2end && *it1 == *it2;)
+ {
+ ++it1;
+ ++it2;
+ }
+ return std::make_pair(it1, it2);
+ }
+ }
+
+ BOOST_FILESYSTEM_DECL path path::lexically_relative(const path& base) const
+ {
+ std::pair<path::iterator, path::iterator> mm
+ = detail::mismatch(begin(), end(), base.begin(), base.end());
+ if (mm.first == begin() && mm.second == base.begin())
+ return path();
+ if (mm.first == end() && mm.second == base.end())
+ return detail::dot_path();
+ path tmp;
+ for (; mm.second != base.end(); ++mm.second)
+ tmp /= detail::dot_dot_path();
+ for (; mm.first != end(); ++mm.first)
+ tmp /= *mm.first;
+ return tmp;
+ }
+
+ // normal --------------------------------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL path path::lexically_normal() const
+ {
+ if (m_pathname.empty())
+ return *this;
+
+ path temp;
+ iterator start(begin());
+ iterator last(end());
+ iterator stop(last--);
+ for (iterator itr(start); itr != stop; ++itr)
+ {
+ // ignore "." except at start and last
+ if (itr->native().size() == 1
+ && (itr->native())[0] == dot
+ && itr != start
+ && itr != last) continue;
+
+ // ignore a name and following ".."
+ if (!temp.empty()
+ && itr->native().size() == 2
+ && (itr->native())[0] == dot
+ && (itr->native())[1] == dot) // dot dot
+ {
+ string_type lf(temp.filename().native());
+ if (lf.size() > 0
+ && (lf.size() != 1
+ || (lf[0] != dot
+ && lf[0] != separator))
+ && (lf.size() != 2
+ || (lf[0] != dot
+ && lf[1] != dot
+# ifdef BOOST_WINDOWS_API
+ && lf[1] != colon
+# endif
+ )
+ )
+ )
+ {
+ temp.remove_filename();
+ //// if not root directory, must also remove "/" if any
+ //if (temp.native().size() > 0
+ // && temp.native()[temp.native().size()-1]
+ // == separator)
+ //{
+ // string_type::size_type rds(
+ // root_directory_start(temp.native(), temp.native().size()));
+ // if (rds == string_type::npos
+ // || rds != temp.native().size()-1)
+ // {
+ // temp.m_pathname.erase(temp.native().size()-1);
+ // }
+ //}
+
+ iterator next(itr);
+ if (temp.empty() && ++next != stop
+ && next == last && *last == detail::dot_path())
+ {
+ temp /= detail::dot_path();
+ }
+ continue;
+ }
+ }
+
+ temp /= *itr;
+ };
+
+ if (temp.empty())
+ temp /= detail::dot_path();
+ return temp;
+ }
+
+} // namespace filesystem
+} // namespace boost
+
+//--------------------------------------------------------------------------------------//
+// //
+// class path helpers implementation //
+// //
+//--------------------------------------------------------------------------------------//
+
+namespace
+{
+
+ // is_root_separator ---------------------------------------------------------------//
+
+ bool is_root_separator(const string_type & str, size_type pos)
+ // pos is position of the separator
+ {
+ BOOST_ASSERT_MSG(!str.empty() && fs::detail::is_directory_separator(str[pos]),
+ "precondition violation");
+
+ // subsequent logic expects pos to be for leftmost slash of a set
+ while (pos > 0 && fs::detail::is_directory_separator(str[pos-1]))
+ --pos;
+
+ // "/" [...]
+ if (pos == 0)
+ return true;
+
+# ifdef BOOST_WINDOWS_API
+ // "c:/" [...]
+ if (pos == 2 && is_letter(str[0]) && str[1] == colon)
+ return true;
+# endif
+
+ // "//" name "/"
+ if (pos < 3 || !fs::detail::is_directory_separator(str[0])
+ || !fs::detail::is_directory_separator(str[1]))
+ return false;
+
+ return str.find_first_of(separators, 2) == pos;
+ }
+
+ // filename_pos --------------------------------------------------------------------//
+
+ size_type filename_pos(const string_type & str,
+ size_type end_pos) // end_pos is past-the-end position
+ // return 0 if str itself is filename (or empty)
+ {
+ // case: "//"
+ if (end_pos == 2
+ && fs::detail::is_directory_separator(str[0])
+ && fs::detail::is_directory_separator(str[1])) return 0;
+
+ // case: ends in "/"
+ if (end_pos && fs::detail::is_directory_separator(str[end_pos-1]))
+ return end_pos-1;
+
+ // set pos to start of last element
+ size_type pos(str.find_last_of(separators, end_pos-1));
+
+# ifdef BOOST_WINDOWS_API
+ if (pos == string_type::npos && end_pos > 1)
+ pos = str.find_last_of(colon, end_pos-2);
+# endif
+
+ return (pos == string_type::npos // path itself must be a filename (or empty)
+ || (pos == 1 && fs::detail::is_directory_separator(str[0]))) // or net
+ ? 0 // so filename is entire string
+ : pos + 1; // or starts after delimiter
+ }
+
+ // root_directory_start ------------------------------------------------------------//
+
+ size_type root_directory_start(const string_type & path, size_type size)
+ // return npos if no root_directory found
+ {
+
+# ifdef BOOST_WINDOWS_API
+ // case "c:/"
+ if (size > 2
+ && path[1] == colon
+ && fs::detail::is_directory_separator(path[2])) return 2;
+# endif
+
+ // case "//"
+ if (size == 2
+ && fs::detail::is_directory_separator(path[0])
+ && fs::detail::is_directory_separator(path[1])) return string_type::npos;
+
+# ifdef BOOST_WINDOWS_API
+ // case "\\?\"
+ if (size > 4
+ && fs::detail::is_directory_separator(path[0])
+ && fs::detail::is_directory_separator(path[1])
+ && path[2] == questionmark
+ && fs::detail::is_directory_separator(path[3]))
+ {
+ string_type::size_type pos(path.find_first_of(separators, 4));
+ return pos < size ? pos : string_type::npos;
+ }
+# endif
+
+ // case "//net {/}"
+ if (size > 3
+ && fs::detail::is_directory_separator(path[0])
+ && fs::detail::is_directory_separator(path[1])
+ && !fs::detail::is_directory_separator(path[2]))
+ {
+ string_type::size_type pos(path.find_first_of(separators, 2));
+ return pos < size ? pos : string_type::npos;
+ }
+
+ // case "/"
+ if (size > 0 && fs::detail::is_directory_separator(path[0])) return 0;
+
+ return string_type::npos;
+ }
+
+ // first_element --------------------------------------------------------------------//
+ // sets pos and len of first element, excluding extra separators
+ // if src.empty(), sets pos,len, to 0,0.
+
+ void first_element(
+ const string_type & src,
+ size_type & element_pos,
+ size_type & element_size,
+ size_type size
+)
+ {
+ if (size == string_type::npos) size = src.size();
+ element_pos = 0;
+ element_size = 0;
+ if (src.empty()) return;
+
+ string_type::size_type cur(0);
+
+ // deal with // [network]
+ if (size >= 2 && fs::detail::is_directory_separator(src[0])
+ && fs::detail::is_directory_separator(src[1])
+ && (size == 2
+ || !fs::detail::is_directory_separator(src[2])))
+ {
+ cur += 2;
+ element_size += 2;
+ }
+
+ // leading (not non-network) separator
+ else if (fs::detail::is_directory_separator(src[0]))
+ {
+ ++element_size;
+ // bypass extra leading separators
+ while (cur+1 < size
+ && fs::detail::is_directory_separator(src[cur+1]))
+ {
+ ++cur;
+ ++element_pos;
+ }
+ return;
+ }
+
+ // at this point, we have either a plain name, a network name,
+ // or (on Windows only) a device name
+
+ // find the end
+ while (cur < size
+# ifdef BOOST_WINDOWS_API
+ && src[cur] != colon
+# endif
+ && !fs::detail::is_directory_separator(src[cur]))
+ {
+ ++cur;
+ ++element_size;
+ }
+
+# ifdef BOOST_WINDOWS_API
+ if (cur == size) return;
+ // include device delimiter
+ if (src[cur] == colon)
+ { ++element_size; }
+# endif
+
+ return;
+ }
+
+} // unnamed namespace
+
+
+namespace boost
+{
+namespace filesystem
+{
+ namespace detail
+ {
+ BOOST_FILESYSTEM_DECL
+ int lex_compare(path::iterator first1, path::iterator last1,
+ path::iterator first2, path::iterator last2)
+ {
+ for (; first1 != last1 && first2 != last2;)
+ {
+ if (first1->native() < first2->native()) return -1;
+ if (first2->native() < first1->native()) return 1;
+ BOOST_ASSERT(first2->native() == first1->native());
+ ++first1;
+ ++first2;
+ }
+ if (first1 == last1 && first2 == last2)
+ return 0;
+ return first1 == last1 ? -1 : 1;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ const path& dot_path()
+ {
+# ifdef BOOST_WINDOWS_API
+ static const fs::path dot_pth(L".");
+# else
+ static const fs::path dot_pth(".");
+# endif
+ return dot_pth;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ const path& dot_dot_path()
+ {
+# ifdef BOOST_WINDOWS_API
+ static const fs::path dot_dot(L"..");
+# else
+ static const fs::path dot_dot("..");
+# endif
+ return dot_dot;
+ }
+ }
+
+//--------------------------------------------------------------------------------------//
+// //
+// class path::iterator implementation //
+// //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL path::iterator path::begin() const
+ {
+ iterator itr;
+ itr.m_path_ptr = this;
+ size_type element_size;
+ first_element(m_pathname, itr.m_pos, element_size);
+ itr.m_element = m_pathname.substr(itr.m_pos, element_size);
+ if (itr.m_element.m_pathname == preferred_separator_string)
+ itr.m_element.m_pathname = separator_string; // needed for Windows, harmless on POSIX
+ return itr;
+ }
+
+ BOOST_FILESYSTEM_DECL path::iterator path::end() const
+ {
+ iterator itr;
+ itr.m_path_ptr = this;
+ itr.m_pos = m_pathname.size();
+ return itr;
+ }
+
+ BOOST_FILESYSTEM_DECL void path::m_path_iterator_increment(path::iterator & it)
+ {
+ BOOST_ASSERT_MSG(it.m_pos < it.m_path_ptr->m_pathname.size(),
+ "path::basic_iterator increment past end()");
+
+ // increment to position past current element; if current element is implicit dot,
+ // this will cause it.m_pos to represent the end iterator
+ it.m_pos += it.m_element.m_pathname.size();
+
+ // if the end is reached, we are done
+ if (it.m_pos == it.m_path_ptr->m_pathname.size())
+ {
+ it.m_element.clear(); // aids debugging, may release unneeded memory
+ return;
+ }
+
+ // both POSIX and Windows treat paths that begin with exactly two separators specially
+ bool was_net(it.m_element.m_pathname.size() > 2
+ && detail::is_directory_separator(it.m_element.m_pathname[0])
+ && detail::is_directory_separator(it.m_element.m_pathname[1])
+ && !detail::is_directory_separator(it.m_element.m_pathname[2]));
+
+ // process separator (Windows drive spec is only case not a separator)
+ if (detail::is_directory_separator(it.m_path_ptr->m_pathname[it.m_pos]))
+ {
+ // detect root directory
+ if (was_net
+# ifdef BOOST_WINDOWS_API
+ // case "c:/"
+ || it.m_element.m_pathname[it.m_element.m_pathname.size()-1] == colon
+# endif
+ )
+ {
+ it.m_element.m_pathname = separator; // generic format; see docs
+ return;
+ }
+
+ // skip separators until it.m_pos points to the start of the next element
+ while (it.m_pos != it.m_path_ptr->m_pathname.size()
+ && detail::is_directory_separator(it.m_path_ptr->m_pathname[it.m_pos]))
+ { ++it.m_pos; }
+
+ // detect trailing separator, and treat it as ".", per POSIX spec
+ if (it.m_pos == it.m_path_ptr->m_pathname.size()
+ && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1))
+ {
+ --it.m_pos;
+ it.m_element = detail::dot_path();
+ return;
+ }
+ }
+
+ // get m_element
+ size_type end_pos(it.m_path_ptr->m_pathname.find_first_of(separators, it.m_pos));
+ if (end_pos == string_type::npos)
+ end_pos = it.m_path_ptr->m_pathname.size();
+ it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
+ }
+
+ BOOST_FILESYSTEM_DECL void path::m_path_iterator_decrement(path::iterator & it)
+ {
+ BOOST_ASSERT_MSG(it.m_pos, "path::iterator decrement past begin()");
+
+ size_type end_pos(it.m_pos);
+
+ // if at end and there was a trailing non-root '/', return "."
+ if (it.m_pos == it.m_path_ptr->m_pathname.size()
+ && it.m_path_ptr->m_pathname.size() > 1
+ && detail::is_directory_separator(it.m_path_ptr->m_pathname[it.m_pos-1])
+ && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1)
+ )
+ {
+ --it.m_pos;
+ it.m_element = detail::dot_path();
+ return;
+ }
+
+ size_type root_dir_pos(root_directory_start(it.m_path_ptr->m_pathname, end_pos));
+
+ // skip separators unless root directory
+ for (
+ ;
+ end_pos > 0
+ && (end_pos-1) != root_dir_pos
+ && detail::is_directory_separator(it.m_path_ptr->m_pathname[end_pos-1])
+ ;
+ --end_pos) {}
+
+ it.m_pos = filename_pos(it.m_path_ptr->m_pathname, end_pos);
+ it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
+ if (it.m_element.m_pathname == preferred_separator_string) // needed for Windows, harmless on POSIX
+ it.m_element.m_pathname = separator_string; // generic format; see docs
+ }
+
+} // namespace filesystem
+} // namespace boost
+
+namespace
+{
+
+ //------------------------------------------------------------------------------------//
+ // locale helpers //
+ //------------------------------------------------------------------------------------//
+
+ // Prior versions of these locale and codecvt implementations tried to take advantage
+ // of static initialization where possible, kept a local copy of the current codecvt
+ // facet (to avoid codecvt() having to call use_facet()), and was not multi-threading
+ // safe (again for efficiency).
+ //
+ // This was error prone, and required different implementation techniques depending
+ // on the compiler and also whether static or dynamic linking was used. Furthermore,
+ // users could not easily provide their multi-threading safe wrappers because the
+ // path interface requires the implementation itself to call codecvt() to obtain the
+ // default facet, and the initialization of the static within path_locale() could race.
+ //
+ // The code below is portable to all platforms, is much simpler, and hopefully will be
+ // much more robust. Timing tests (on Windows, using a Visual C++ release build)
+ // indicated the current code is roughly 9% slower than the previous code, and that
+ // seems a small price to pay for better code that is easier to use.
+
+ std::locale default_locale()
+ {
+# if defined(BOOST_WINDOWS_API)
+ std::locale global_loc = std::locale();
+ return std::locale(global_loc, new windows_file_codecvt);
+# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
+ || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
+ // "All BSD system functions expect their string parameters to be in UTF-8 encoding
+ // and nothing else." See
+ // http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html
+ //
+ // "The kernel will reject any filename that is not a valid UTF-8 string, and it will
+ // even be normalized (to Unicode NFD) before stored on disk, at least when using HFS.
+ // The right way to deal with it would be to always convert the filename to UTF-8
+ // before trying to open/create a file." See
+ // http://lists.apple.com/archives/unix-porting/2007/Sep/msg00023.html
+ //
+ // "How a file name looks at the API level depends on the API. Current Carbon APIs
+ // handle file names as an array of UTF-16 characters; POSIX ones handle them as an
+ // array of UTF-8, which is why UTF-8 works well in Terminal. How it's stored on disk
+ // depends on the disk format; HFS+ uses UTF-16, but that's not important in most
+ // cases." See
+ // http://lists.apple.com/archives/applescript-users/2002/Sep/msg00319.html
+ //
+ // Many thanks to Peter Dimov for digging out the above references!
+
+ std::locale global_loc = std::locale();
+ return std::locale(global_loc, new boost::filesystem::detail::utf8_codecvt_facet);
+# else // Other POSIX
+ // ISO C calls std::locale("") "the locale-specific native environment", and this
+ // locale is the default for many POSIX-based operating systems such as Linux.
+ return std::locale("");
+# endif
+ }
+
+ std::locale& path_locale()
+ // std::locale("") construction, needed on non-Apple POSIX systems, can throw
+ // (if environmental variables LC_MESSAGES or LANG are wrong, for example), so
+ // path_locale() provides lazy initialization via a local static to ensure that any
+ // exceptions occur after main() starts and so can be caught. Furthermore,
+ // path_locale() is only called if path::codecvt() or path::imbue() are themselves
+ // actually called, ensuring that an exception will only be thrown if std::locale("")
+ // is really needed.
+ {
+ // [locale] paragraph 6: Once a facet reference is obtained from a locale object by
+ // calling use_facet<>, that reference remains usable, and the results from member
+ // functions of it may be cached and re-used, as long as some locale object refers
+ // to that facet.
+ static std::locale loc(default_locale());
+#ifdef BOOST_FILESYSTEM_DEBUG
+ std::cout << "***** path_locale() called" << std::endl;
+#endif
+ return loc;
+ }
+} // unnamed namespace
+
+//--------------------------------------------------------------------------------------//
+// path::codecvt() and path::imbue() implementation //
+//--------------------------------------------------------------------------------------//
+
+namespace boost
+{
+namespace filesystem
+{
+ // See comments above
+
+ BOOST_FILESYSTEM_DECL const path::codecvt_type& path::codecvt()
+ {
+#ifdef BOOST_FILESYSTEM_DEBUG
+ std::cout << "***** path::codecvt() called" << std::endl;
+#endif
+ BOOST_ASSERT_MSG(&path_locale(), "boost::filesystem::path locale initialization error");
+
+ return std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t> >(path_locale());
+ }
+
+ BOOST_FILESYSTEM_DECL std::locale path::imbue(const std::locale& loc)
+ {
+#ifdef BOOST_FILESYSTEM_DEBUG
+ std::cout << "***** path::imbue() called" << std::endl;
+#endif
+ std::locale temp(path_locale());
+ path_locale() = loc;
+ return temp;
+ }
+
+} // namespace filesystem
+} // namespace boost
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/path_traits.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/path_traits.cpp
new file mode 100644
index 00000000000..58c8269b83d
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/path_traits.cpp
@@ -0,0 +1,200 @@
+// filesystem path_traits.cpp --------------------------------------------------------//
+
+// Copyright Beman Dawes 2008, 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 <boost/filesystem/path_traits.hpp>
+#include <boost/system/system_error.hpp>
+#include <boost/scoped_array.hpp>
+#include <locale> // for codecvt_base::result
+#include <cstring> // for strlen
+#include <cwchar> // for wcslen
+
+namespace pt = boost::filesystem::path_traits;
+namespace fs = boost::filesystem;
+namespace bs = boost::system;
+
+//--------------------------------------------------------------------------------------//
+// configuration //
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_FILESYSTEM_CODECVT_BUF_SIZE
+# define BOOST_FILESYSTEM_CODECVT_BUF_SIZE 256
+#endif
+
+namespace {
+
+ const std::size_t default_codecvt_buf_size = BOOST_FILESYSTEM_CODECVT_BUF_SIZE;
+
+
+//--------------------------------------------------------------------------------------//
+// //
+// The public convert() functions do buffer management, and then forward to the //
+// convert_aux() functions for the actual call to the codecvt facet. //
+// //
+//--------------------------------------------------------------------------------------//
+
+//--------------------------------------------------------------------------------------//
+// convert_aux const char* to wstring //
+//--------------------------------------------------------------------------------------//
+
+ void convert_aux(
+ const char* from,
+ const char* from_end,
+ wchar_t* to, wchar_t* to_end,
+ std::wstring & target,
+ const pt::codecvt_type & cvt)
+ {
+ //std::cout << std::hex
+ // << " from=" << std::size_t(from)
+ // << " from_end=" << std::size_t(from_end)
+ // << " to=" << std::size_t(to)
+ // << " to_end=" << std::size_t(to_end)
+ // << std::endl;
+
+ std::mbstate_t state = std::mbstate_t(); // perhaps unneeded, but cuts bug reports
+ const char* from_next;
+ wchar_t* to_next;
+
+ std::codecvt_base::result res;
+
+ if ((res=cvt.in(state, from, from_end, from_next,
+ to, to_end, to_next)) != std::codecvt_base::ok)
+ {
+ //std::cout << " result is " << static_cast<int>(res) << std::endl;
+ BOOST_FILESYSTEM_THROW(bs::system_error(res, fs::codecvt_error_category(),
+ "boost::filesystem::path codecvt to wstring"));
+ }
+ target.append(to, to_next);
+ }
+
+//--------------------------------------------------------------------------------------//
+// convert_aux const wchar_t* to string //
+//--------------------------------------------------------------------------------------//
+
+ void convert_aux(
+ const wchar_t* from,
+ const wchar_t* from_end,
+ char* to, char* to_end,
+ std::string & target,
+ const pt::codecvt_type & cvt)
+ {
+ //std::cout << std::hex
+ // << " from=" << std::size_t(from)
+ // << " from_end=" << std::size_t(from_end)
+ // << " to=" << std::size_t(to)
+ // << " to_end=" << std::size_t(to_end)
+ // << std::endl;
+
+ std::mbstate_t state = std::mbstate_t(); // perhaps unneeded, but cuts bug reports
+ const wchar_t* from_next;
+ char* to_next;
+
+ std::codecvt_base::result res;
+
+ if ((res=cvt.out(state, from, from_end, from_next,
+ to, to_end, to_next)) != std::codecvt_base::ok)
+ {
+ //std::cout << " result is " << static_cast<int>(res) << std::endl;
+ BOOST_FILESYSTEM_THROW(bs::system_error(res, fs::codecvt_error_category(),
+ "boost::filesystem::path codecvt to string"));
+ }
+ target.append(to, to_next);
+ }
+
+} // unnamed namespace
+
+//--------------------------------------------------------------------------------------//
+// path_traits //
+//--------------------------------------------------------------------------------------//
+
+namespace boost { namespace filesystem { namespace path_traits {
+
+//--------------------------------------------------------------------------------------//
+// convert const char* to wstring //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL
+ void convert(const char* from,
+ const char* from_end, // 0 for null terminated MBCS
+ std::wstring & to,
+ const codecvt_type & cvt)
+ {
+ BOOST_ASSERT(from);
+
+ if (!from_end) // null terminated
+ {
+ from_end = from + std::strlen(from);
+ }
+
+ if (from == from_end) return;
+
+ std::size_t buf_size = (from_end - from) * 3; // perhaps too large, but that's OK
+
+ // dynamically allocate a buffer only if source is unusually large
+ if (buf_size > default_codecvt_buf_size)
+ {
+ boost::scoped_array< wchar_t > buf(new wchar_t [buf_size]);
+ convert_aux(from, from_end, buf.get(), buf.get()+buf_size, to, cvt);
+ }
+ else
+ {
+ wchar_t buf[default_codecvt_buf_size];
+ convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt);
+ }
+ }
+
+//--------------------------------------------------------------------------------------//
+// convert const wchar_t* to string //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_FILESYSTEM_DECL
+ void convert(const wchar_t* from,
+ const wchar_t* from_end, // 0 for null terminated MBCS
+ std::string & to,
+ const codecvt_type & cvt)
+ {
+ BOOST_ASSERT(from);
+
+ if (!from_end) // null terminated
+ {
+ from_end = from + std::wcslen(from);
+ }
+
+ if (from == from_end) return;
+
+ // The codecvt length functions may not be implemented, and I don't really
+ // understand them either. Thus this code is just a guess; if it turns
+ // out the buffer is too small then an error will be reported and the code
+ // will have to be fixed.
+ std::size_t buf_size = (from_end - from) * 4; // perhaps too large, but that's OK
+ buf_size += 4; // encodings like shift-JIS need some prefix space
+
+ // dynamically allocate a buffer only if source is unusually large
+ if (buf_size > default_codecvt_buf_size)
+ {
+ boost::scoped_array< char > buf(new char [buf_size]);
+ convert_aux(from, from_end, buf.get(), buf.get()+buf_size, to, cvt);
+ }
+ else
+ {
+ char buf[default_codecvt_buf_size];
+ convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt);
+ }
+ }
+}}} // namespace boost::filesystem::path_traits
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/portability.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/portability.cpp
new file mode 100644
index 00000000000..152840c4f99
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/portability.cpp
@@ -0,0 +1,119 @@
+// portability.cpp -------------------------------------------------------------------//
+
+// Copyright 2002-2005 Beman Dawes
+// 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 library home page at 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/config.hpp>
+#include <boost/filesystem/path.hpp>
+
+namespace fs = boost::filesystem;
+
+#include <cstring> // SGI MIPSpro compilers need this
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+ namespace std { using ::strerror; }
+# endif
+
+//--------------------------------------------------------------------------------------//
+
+namespace
+{
+ const char invalid_chars[] =
+ "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"
+ "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"
+ "<>:\"/\\|";
+ // note that the terminating '\0' is part of the string - thus the size below
+ // is sizeof(invalid_chars) rather than sizeof(invalid_chars)-1. I
+ const std::string windows_invalid_chars(invalid_chars, sizeof(invalid_chars));
+
+ const std::string valid_posix(
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-");
+
+} // unnamed namespace
+
+namespace boost
+{
+ namespace filesystem
+ {
+
+ // name_check functions ----------------------------------------------//
+
+# ifdef BOOST_WINDOWS
+ BOOST_FILESYSTEM_DECL bool native(const std::string & name)
+ {
+ return windows_name(name);
+ }
+# else
+ BOOST_FILESYSTEM_DECL bool native(const std::string & name)
+ {
+ return name.size() != 0
+ && name[0] != ' '
+ && name.find('/') == std::string::npos;
+ }
+# endif
+
+ BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name)
+ {
+ return name.size() != 0
+ && name.find_first_not_of(valid_posix) == std::string::npos;
+ }
+
+ BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name)
+ {
+ return name.size() != 0
+ && name[0] != ' '
+ && name.find_first_of(windows_invalid_chars) == std::string::npos
+ && *(name.end()-1) != ' '
+ && (*(name.end()-1) != '.'
+ || name.length() == 1 || name == "..");
+ }
+
+ BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name)
+ {
+ return
+ name.size() != 0
+ && (name == "."
+ || name == ".."
+ || (windows_name(name)
+ && portable_posix_name(name)
+ && name[0] != '.' && name[0] != '-'));
+ }
+
+ BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name)
+ {
+ return
+ name == "."
+ || name == ".."
+ || (portable_name(name)
+ && name.find('.') == std::string::npos);
+ }
+
+ BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name)
+ {
+ std::string::size_type pos;
+ return
+ portable_name(name)
+ && name != "."
+ && name != ".."
+ && ((pos = name.find('.')) == std::string::npos
+ || (name.find('.', pos+1) == std::string::npos
+ && (pos + 5) > name.length()))
+ ;
+ }
+
+ } // namespace filesystem
+} // namespace boost
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/unique_path.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/unique_path.cpp
new file mode 100644
index 00000000000..e8aac937d1a
--- /dev/null
+++ b/src/third_party/boost-1.70.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.70.0/libs/filesystem/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/utf8_codecvt_facet.cpp
new file mode 100644
index 00000000000..9d159d847a2
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/utf8_codecvt_facet.cpp
@@ -0,0 +1,27 @@
+// Copyright Vladimir Prus 2004.
+// Distributed under the 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 HP-UX, request that WCHAR_MAX and WCHAR_MIN be defined as macros,
+// not casts. See ticket 5048
+#define _INCLUDE_STDCSOURCE_199901
+
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#define BOOST_FILESYSTEM_SOURCE
+#include <boost/filesystem/config.hpp>
+
+#define BOOST_UTF8_BEGIN_NAMESPACE \
+ namespace boost { namespace filesystem { namespace detail {
+
+#define BOOST_UTF8_END_NAMESPACE }}}
+#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL
+
+#include <boost/detail/utf8_codecvt_facet.ipp>
+
+#undef BOOST_UTF8_BEGIN_NAMESPACE
+#undef BOOST_UTF8_END_NAMESPACE
+#undef BOOST_UTF8_DECL
diff --git a/src/third_party/boost-1.70.0/libs/filesystem/src/windows_file_codecvt.cpp b/src/third_party/boost-1.70.0/libs/filesystem/src/windows_file_codecvt.cpp
new file mode 100644
index 00000000000..ad4d43189a6
--- /dev/null
+++ b/src/third_party/boost-1.70.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.70.0/libs/filesystem/src/windows_file_codecvt.hpp b/src/third_party/boost-1.70.0/libs/filesystem/src/windows_file_codecvt.hpp
new file mode 100644
index 00000000000..97cbf161ad1
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/filesystem/src/windows_file_codecvt.hpp
@@ -0,0 +1,56 @@
+// filesystem windows_file_codecvt.hpp -----------------------------------------------//
+
+// 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
+
+#ifndef BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
+#define BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
+
+#include <boost/filesystem/config.hpp>
+#include <locale>
+
+ //------------------------------------------------------------------------------------//
+ // //
+ // class windows_file_codecvt //
+ // //
+ // Warning: partial implementation; even do_in and do_out only partially meet the //
+ // standard library specifications as the "to" buffer must hold the entire result. //
+ // //
+ //------------------------------------------------------------------------------------//
+
+ class BOOST_FILESYSTEM_DECL windows_file_codecvt
+ : public std::codecvt< wchar_t, char, std::mbstate_t >
+ {
+ public:
+ explicit windows_file_codecvt(std::size_t refs = 0)
+ : std::codecvt<wchar_t, char, std::mbstate_t>(refs) {}
+ protected:
+
+ virtual bool do_always_noconv() const throw() { return false; }
+
+ // seems safest to assume variable number of characters since we don't
+ // actually know what codepage is active
+ virtual int do_encoding() const throw() { return 0; }
+
+ 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;
+
+ virtual std::codecvt_base::result do_unshift(std::mbstate_t&,
+ char* /*from*/, char* /*to*/, char* & /*next*/) const { return ok; }
+
+ virtual int do_length(std::mbstate_t&,
+ const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const { return 0; }
+
+ virtual int do_max_length() const throw () { return 0; }
+ };
+
+#endif // BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
diff --git a/src/third_party/boost-1.69.0/libs/function/README.md b/src/third_party/boost-1.70.0/libs/function/README.md
index 749d5ed8847..749d5ed8847 100644
--- a/src/third_party/boost-1.69.0/libs/function/README.md
+++ b/src/third_party/boost-1.70.0/libs/function/README.md
diff --git a/src/third_party/boost-1.69.0/libs/integer/README.md b/src/third_party/boost-1.70.0/libs/integer/README.md
index 05c1270ea32..05c1270ea32 100644
--- a/src/third_party/boost-1.69.0/libs/integer/README.md
+++ b/src/third_party/boost-1.70.0/libs/integer/README.md
diff --git a/src/third_party/boost-1.69.0/libs/intrusive/Jamfile b/src/third_party/boost-1.70.0/libs/intrusive/Jamfile
index e43cebe5c61..e43cebe5c61 100644
--- a/src/third_party/boost-1.69.0/libs/intrusive/Jamfile
+++ b/src/third_party/boost-1.70.0/libs/intrusive/Jamfile
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/Jamfile b/src/third_party/boost-1.70.0/libs/iostreams/Jamfile
index afe2fcf1c70..afe2fcf1c70 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/Jamfile
+++ b/src/third_party/boost-1.70.0/libs/iostreams/Jamfile
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/LICENSE b/src/third_party/boost-1.70.0/libs/iostreams/LICENSE
index 36b7cd93cdf..36b7cd93cdf 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/LICENSE
+++ b/src/third_party/boost-1.70.0/libs/iostreams/LICENSE
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/README.md b/src/third_party/boost-1.70.0/libs/iostreams/README.md
index 5bdc70d40a6..5bdc70d40a6 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/README.md
+++ b/src/third_party/boost-1.70.0/libs/iostreams/README.md
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp b/src/third_party/boost-1.70.0/libs/iostreams/src/bzip2.cpp
index 195b57d8a90..195b57d8a90 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp
+++ b/src/third_party/boost-1.70.0/libs/iostreams/src/bzip2.cpp
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/file_descriptor.cpp b/src/third_party/boost-1.70.0/libs/iostreams/src/file_descriptor.cpp
index 288e2c64013..288e2c64013 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/file_descriptor.cpp
+++ b/src/third_party/boost-1.70.0/libs/iostreams/src/file_descriptor.cpp
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/gzip.cpp b/src/third_party/boost-1.70.0/libs/iostreams/src/gzip.cpp
index 94830e5b8cb..94830e5b8cb 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/gzip.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/iostreams/src/lzma.cpp
index 8d41cca8c08..8d41cca8c08 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/lzma.cpp
+++ b/src/third_party/boost-1.70.0/libs/iostreams/src/lzma.cpp
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp b/src/third_party/boost-1.70.0/libs/iostreams/src/mapped_file.cpp
index 918a5d4c620..918a5d4c620 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp
+++ b/src/third_party/boost-1.70.0/libs/iostreams/src/mapped_file.cpp
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp b/src/third_party/boost-1.70.0/libs/iostreams/src/zlib.cpp
index 66380689bc6..66380689bc6 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp
+++ b/src/third_party/boost-1.70.0/libs/iostreams/src/zlib.cpp
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp b/src/third_party/boost-1.70.0/libs/iostreams/src/zstd.cpp
index 20cc009804f..20cc009804f 100644
--- a/src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp
+++ b/src/third_party/boost-1.70.0/libs/iostreams/src/zstd.cpp
diff --git a/src/third_party/boost-1.70.0/libs/multi_index/README.md b/src/third_party/boost-1.70.0/libs/multi_index/README.md
new file mode 100644
index 00000000000..93a9f2faa61
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/multi_index/README.md
@@ -0,0 +1,10 @@
+# Boost Multi-index Containers Library
+
+Branch | Travis | AppVeyor | Regression tests
+---------|--------|----------|-----------------
+develop | [![Build Status](https://travis-ci.com/boostorg/multi_index.svg?branch=develop)](https://travis-ci.com/boostorg/multi_index) | [![Build Status](https://ci.appveyor.com/api/projects/status/github/boostorg/multi_index?branch=develop&svg=true)](https://ci.appveyor.com/project/joaquintides/multi-index) | [![Test Results](./test_results.svg)](https://www.boost.org/development/tests/develop/developer/multi_index.html)
+master | [![Build Status](https://travis-ci.com/boostorg/multi_index.svg?branch=master)](https://travis-ci.com/boostorg/multi_index) | [![Build Status](https://ci.appveyor.com/api/projects/status/github/boostorg/multi_index?branch=master&svg=true)](https://ci.appveyor.com/project/joaquintides/multi-index) | [![Test Results](./test_results.svg)](https://www.boost.org/development/tests/master/developer/multi_index.html)
+
+[Boost.MultiIndex](http://boost.org/libs/multi_index) provides a class template
+named `multi_index_container` which enables the construction of containers
+maintaining one or more indices with different sorting and access semantics.
diff --git a/src/third_party/boost-1.70.0/libs/multi_index/test_results.svg b/src/third_party/boost-1.70.0/libs/multi_index/test_results.svg
new file mode 100644
index 00000000000..d3d613ffd70
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/multi_index/test_results.svg
@@ -0,0 +1,26 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="95" height="20">
+ <linearGradient id="b" x2="0" y2="100%">
+ <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
+ <stop offset="1" stop-opacity=".1"/>
+ </linearGradient>
+ <clipPath id="a">
+ <rect width="95" height="20" rx="3" fill="#fff"/>
+ </clipPath>
+ <g clip-path="url(#a)">
+ <path fill="#555" d="M0 0h48v20H0z"/>
+ <path fill="#4c1" d="M48 0h47v20H48z"/>
+ <path fill="url(#b)" d="M0 0h95v20H0z"/>
+ </g>
+ <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
+ <path fill="#fff" d="M 10.8566 9.70598 l -3.60307 0 l -0.0903426 0.15447 l -1.63598 2.79514 l -0.0919027 0.156812 l 0.0912783 0.157278 l 1.63599 2.82198 l 0.0901858 0.155564 l 3.60291 0 l 0.090498 -0.153378 l 1.64956 -2.79498 l 0.093151 -0.157907 l -0.0923709 -0.158212 l -1.64956 -2.82213 l -0.0903415 -0.154627 z m -5.06008 3.1072 l 1.63598 -2.79514 l 3.24498 0 l 1.64956 2.82213 l -1.64956 2.79498 l -3.24498 0 l -1.63598 -2.82198 z"/>
+ <path fill="#fff" d="M 16.6973 6.54947 l -3.6026 0 l -0.090185 0.155562 l -1.54689 2.67 l -0.0906544 0.156655 l 0.0908101 0.1565 l 1.72508 2.97067 l 0.0908101 0.156188 l 0.180528 -0.000780746 l 3.06679 -0.0137328 l 0.178187 -0.000780746 l 0.0898736 -0.153845 l 1.65658 -2.83383 l 0.0926823 -0.158528 l -0.093773 -0.15806 l -1.65658 -2.79311 l -0.0906529 -0.15291 z m -4.96959 2.98206 l 1.54689 -2.67 l 3.24498 0 l 1.65658 2.79311 l -1.65658 2.83383 l -3.06679 0.0137328 l -1.72508 -2.97067 z"/>
+ <path fill="#fff" d="M 12.4576 4.03269 l -3.56874 0 l -0.0898744 0.156967 l -1.61336 2.81683 l -0.0875335 0.152755 l 0.0855053 0.153848 l 0.991265 1.78437 l 0.0887818 0.160088 l 0.183024 0.000468606 l 2.38603 0.00686454 l 0.178812 0.000468606 l 0.0909666 -0.154003 l 1.72804 -2.92995 l 0.850837 0 l -0.265721 -0.466534 l -0.868311 -1.52458 l -0.0897187 -0.15759 z m -5.00126 3.12889 l 1.61336 -2.81683 l 3.20644 0 l 0.868313 1.52458 l -0.492278 0 l -1.81854 3.08348 l -2.38603 -0.00686454 l -0.991265 -1.78437 z"/>
+ <path fill="#cccccc" d="M 10.8566 9.70598 m -5.06008 3.1072 l 1.63598 -2.79514 l 3.24498 0 l 1.64956 2.82213 l -1.64956 2.79498 l -3.24498 0 l -1.63598 -2.82198 z"/>
+ <path fill="#cccccc" d="M 16.6973 6.54947 m -4.96959 2.98206 l 1.54689 -2.67 l 3.24498 0 l 1.65658 2.79311 l -1.65658 2.83383 l -3.06679 0.0137328 l -1.72508 -2.97067 z"/>
+ <path fill="#cccccc" d="M 12.4576 4.03269 m -5.00126 3.12889 l 1.61336 -2.81683 l 3.20644 0 l 0.868313 1.52458 l -0.492278 0 l -1.81854 3.08348 l -2.38603 -0.00686454 l -0.991265 -1.78437 z"/>
+ <text x="335" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">test</text>
+ <text x="335" y="140" transform="scale(.1)" textLength="210">test</text>
+ <text x="705" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">results</text>
+ <text x="705" y="140" transform="scale(.1)" textLength="370">results</text>
+ </g>
+</svg> \ No newline at end of file
diff --git a/src/third_party/boost-1.69.0/libs/optional/README.md b/src/third_party/boost-1.70.0/libs/optional/README.md
index 4f73388d1ca..4f73388d1ca 100644
--- a/src/third_party/boost-1.69.0/libs/optional/README.md
+++ b/src/third_party/boost-1.70.0/libs/optional/README.md
diff --git a/src/third_party/boost-1.69.0/libs/program_options/Jamfile b/src/third_party/boost-1.70.0/libs/program_options/Jamfile
index f0de2e0bc8d..f0de2e0bc8d 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/Jamfile
+++ b/src/third_party/boost-1.70.0/libs/program_options/Jamfile
diff --git a/src/third_party/boost-1.69.0/libs/program_options/README.md b/src/third_party/boost-1.70.0/libs/program_options/README.md
index b2bd595ed85..b2bd595ed85 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/README.md
+++ b/src/third_party/boost-1.70.0/libs/program_options/README.md
diff --git a/src/third_party/boost-1.69.0/libs/program_options/ci/build.sh b/src/third_party/boost-1.70.0/libs/program_options/ci/build.sh
index 49dd24aece7..49dd24aece7 100755
--- a/src/third_party/boost-1.69.0/libs/program_options/ci/build.sh
+++ b/src/third_party/boost-1.70.0/libs/program_options/ci/build.sh
diff --git a/src/third_party/boost-1.69.0/libs/program_options/ci/codecov.sh b/src/third_party/boost-1.70.0/libs/program_options/ci/codecov.sh
index 2f7ea10f628..2f7ea10f628 100755
--- a/src/third_party/boost-1.69.0/libs/program_options/ci/codecov.sh
+++ b/src/third_party/boost-1.70.0/libs/program_options/ci/codecov.sh
diff --git a/src/third_party/boost-1.69.0/libs/program_options/ci/coverity.sh b/src/third_party/boost-1.70.0/libs/program_options/ci/coverity.sh
index 0de08a4ce4e..0de08a4ce4e 100755
--- a/src/third_party/boost-1.69.0/libs/program_options/ci/coverity.sh
+++ b/src/third_party/boost-1.70.0/libs/program_options/ci/coverity.sh
diff --git a/src/third_party/boost-1.69.0/libs/program_options/ci/cppcheck.sh b/src/third_party/boost-1.70.0/libs/program_options/ci/cppcheck.sh
index 7734ffcc190..7734ffcc190 100755
--- a/src/third_party/boost-1.69.0/libs/program_options/ci/cppcheck.sh
+++ b/src/third_party/boost-1.70.0/libs/program_options/ci/cppcheck.sh
diff --git a/src/third_party/boost-1.69.0/libs/program_options/ci/mingw.bat b/src/third_party/boost-1.70.0/libs/program_options/ci/mingw.bat
index bc189fdb7cd..bc189fdb7cd 100755
--- a/src/third_party/boost-1.69.0/libs/program_options/ci/mingw.bat
+++ b/src/third_party/boost-1.70.0/libs/program_options/ci/mingw.bat
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/cmdline.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/cmdline.cpp
index c2cf1da11f3..c2cf1da11f3 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/cmdline.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/cmdline.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/config_file.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/config_file.cpp
index f2a57b4b829..f2a57b4b829 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/config_file.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/config_file.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/convert.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/convert.cpp
index 9be759e2603..9be759e2603 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/convert.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/convert.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/options_description.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/options_description.cpp
index dc0eae87447..dc0eae87447 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/options_description.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/options_description.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/parsers.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/parsers.cpp
index 3e435eea3fe..3e435eea3fe 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/parsers.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/parsers.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/positional_options.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/positional_options.cpp
index 72dc0d6b0dd..72dc0d6b0dd 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/positional_options.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/positional_options.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/split.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/split.cpp
index 96da068b824..96da068b824 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/split.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/split.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/utf8_codecvt_facet.cpp
index 2e4c532c356..2e4c532c356 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/utf8_codecvt_facet.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/utf8_codecvt_facet.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/value_semantic.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/value_semantic.cpp
index a7366d43865..a7366d43865 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/value_semantic.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/value_semantic.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/variables_map.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/variables_map.cpp
index bc85f7e34b6..bc85f7e34b6 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/variables_map.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/variables_map.cpp
diff --git a/src/third_party/boost-1.69.0/libs/program_options/src/winmain.cpp b/src/third_party/boost-1.70.0/libs/program_options/src/winmain.cpp
index 6220043f6c8..6220043f6c8 100644
--- a/src/third_party/boost-1.69.0/libs/program_options/src/winmain.cpp
+++ b/src/third_party/boost-1.70.0/libs/program_options/src/winmain.cpp
diff --git a/src/third_party/boost-1.69.0/libs/random/src/random_device.cpp b/src/third_party/boost-1.70.0/libs/random/src/random_device.cpp
index 8ec38631072..8ec38631072 100644
--- a/src/third_party/boost-1.69.0/libs/random/src/random_device.cpp
+++ b/src/third_party/boost-1.70.0/libs/random/src/random_device.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/c_regex_traits.cpp b/src/third_party/boost-1.70.0/libs/regex/src/c_regex_traits.cpp
index a0b52ee4e93..a0b52ee4e93 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/c_regex_traits.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/c_regex_traits.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/cpp_regex_traits.cpp b/src/third_party/boost-1.70.0/libs/regex/src/cpp_regex_traits.cpp
index 05bbc50d725..05bbc50d725 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/cpp_regex_traits.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/regex/src/cregex.cpp
index a1ae3b087cd..a1ae3b087cd 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/cregex.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/cregex.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp b/src/third_party/boost-1.70.0/libs/regex/src/fileiter.cpp
index c80459b8669..c80459b8669 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/fileiter.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/icu.cpp b/src/third_party/boost-1.70.0/libs/regex/src/icu.cpp
index 5f249e2d8df..5f249e2d8df 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/icu.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/icu.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/instances.cpp b/src/third_party/boost-1.70.0/libs/regex/src/instances.cpp
index 69d72ad6e15..69d72ad6e15 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/instances.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/instances.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/internals.hpp b/src/third_party/boost-1.70.0/libs/regex/src/internals.hpp
index 3a15cc67cb1..3a15cc67cb1 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/internals.hpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/internals.hpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/posix_api.cpp b/src/third_party/boost-1.70.0/libs/regex/src/posix_api.cpp
index 1531d948a0b..1531d948a0b 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/posix_api.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/posix_api.cpp
diff --git a/src/third_party/boost-1.70.0/libs/regex/src/regex.cpp b/src/third_party/boost-1.70.0/libs/regex/src/regex.cpp
new file mode 100644
index 00000000000..5a8bbdc04e5
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/regex/src/regex.cpp
@@ -0,0 +1,231 @@
+/*
+ *
+ * Copyright (c) 1998-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.cpp
+ * VERSION: see <boost/version.hpp>
+ * DESCRIPTION: Misc boost::regbase member funnctions.
+ */
+
+
+#define BOOST_REGEX_SOURCE
+
+#include <boost/config.hpp>
+#include <new>
+#include <boost/regex.hpp>
+#include <boost/throw_exception.hpp>
+
+#if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300)
+# include <malloc.h>
+#endif
+#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef NOMINMAX
+# define NOMINMAX
+#endif
+#define NOGDI
+#define NOUSER
+#include <windows.h>
+#endif
+
+#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_REGEX_V3)
+#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
+#include <new>
+#else
+#include <boost/regex/v4/mem_block_cache.hpp>
+#endif
+#endif
+
+#ifdef BOOST_INTEL
+#pragma warning(disable:383)
+#endif
+
+namespace boost{
+
+//
+// fix: these are declared out of line here to ensure
+// that dll builds contain the Virtual table for these
+// types - this ensures that exceptions can be thrown
+// from the dll and caught in an exe.
+regex_error::regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos)
+ : std::runtime_error(s)
+ , m_error_code(err)
+ , m_position(pos)
+{
+}
+
+regex_error::regex_error(regex_constants::error_type err)
+ : std::runtime_error(::boost::BOOST_REGEX_DETAIL_NS::get_default_error_string(err))
+ , m_error_code(err)
+ , m_position(0)
+{
+}
+
+regex_error::~regex_error() throw()
+{
+}
+
+void regex_error::raise()const
+{
+#ifndef BOOST_NO_EXCEPTIONS
+ ::boost::throw_exception(*this);
+#endif
+}
+
+
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex)
+{
+ ::boost::throw_exception(ex);
+}
+//
+// error checking API:
+//
+BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex::flag_type /*ef*/, match_flag_type mf)
+{
+#ifndef BOOST_REGEX_V3
+ //
+ // can't mix match_extra with POSIX matching rules:
+ //
+ if((mf & match_extra) && (mf & match_posix))
+ {
+ std::logic_error msg("Usage Error: Can't mix regular expression captures with POSIX matching rules");
+ throw_exception(msg);
+ }
+#endif
+}
+
+#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+
+static void execute_eror()
+{
+ // we only get here after a stack overflow,
+ // this has to be a separate proceedure because we
+ // can't mix __try{}__except block with local objects
+ // that have destructors:
+ reset_stack_guard_page();
+ std::runtime_error err("Out of stack space, while attempting to match a regular expression.");
+ raise_runtime_error(err);
+}
+
+bool BOOST_REGEX_CALL abstract_protected_call::execute()const
+{
+ __try{
+ return this->call();
+ }__except(EXCEPTION_STACK_OVERFLOW == GetExceptionCode())
+ {
+ execute_eror();
+ }
+ // We never really get here at all:
+ return false;
+}
+
+BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page()
+{
+#if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300)
+ _resetstkoflw();
+#else
+ //
+ // We need to locate the current page being used by the stack,
+ // move to the page below it and then deallocate and protect
+ // that page. Note that ideally we would protect only the lowest
+ // stack page that has been allocated: in practice there
+ // seems to be no easy way to locate this page, in any case as
+ // long as the next page is protected, then Windows will figure
+ // the rest out for us...
+ //
+ SYSTEM_INFO si;
+ GetSystemInfo(&si);
+ MEMORY_BASIC_INFORMATION mi;
+ DWORD previous_protection_status;
+ //
+ // this is an address in our stack space:
+ //
+ LPBYTE page = (LPBYTE)&page;
+ //
+ // Get the current memory page in use:
+ //
+ VirtualQuery(page, &mi, sizeof(mi));
+ //
+ // Go to the page one below this:
+ //
+ page = (LPBYTE)(mi.BaseAddress)-si.dwPageSize;
+ //
+ // Free and protect everything from the start of the
+ // allocation range, to the end of the page below the
+ // one in use:
+ //
+ if (!VirtualFree(mi.AllocationBase, (LPBYTE)page - (LPBYTE)mi.AllocationBase, MEM_DECOMMIT)
+ || !VirtualProtect(page, si.dwPageSize, PAGE_GUARD | PAGE_READWRITE, &previous_protection_status))
+ {
+ throw std::bad_exception();
+ }
+#endif
+}
+#endif
+
+#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_REGEX_V3)
+
+#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
+
+BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block()
+{
+ return ::operator new(BOOST_REGEX_BLOCKSIZE);
+}
+
+BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
+{
+ ::operator delete(p);
+}
+
+#else
+
+#if defined(BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE)
+mem_block_cache block_cache = { { {nullptr} } } ;
+#elif defined(BOOST_HAS_THREADS)
+mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
+#else
+mem_block_cache block_cache = { 0, 0, };
+#endif
+
+BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block()
+{
+ return block_cache.get();
+}
+
+BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
+{
+ block_cache.put(p);
+}
+
+#endif
+
+#endif
+
+} // namespace BOOST_REGEX_DETAIL_NS
+
+
+
+} // namespace boost
+
+#if defined(BOOST_RE_USE_VCL) && defined(BOOST_REGEX_DYN_LINK)
+
+int WINAPI DllEntryPoint(HINSTANCE , unsigned long , void*)
+{
+ return 1;
+}
+#endif
+
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/regex_debug.cpp b/src/third_party/boost-1.70.0/libs/regex/src/regex_debug.cpp
index 9306a82e7ef..9306a82e7ef 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/regex_debug.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/regex_debug.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/regex_raw_buffer.cpp b/src/third_party/boost-1.70.0/libs/regex/src/regex_raw_buffer.cpp
index bb492297746..bb492297746 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/regex_raw_buffer.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/regex_raw_buffer.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/regex_traits_defaults.cpp b/src/third_party/boost-1.70.0/libs/regex/src/regex_traits_defaults.cpp
index 0b66c68dc70..0b66c68dc70 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/regex_traits_defaults.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/regex_traits_defaults.cpp
diff --git a/src/third_party/boost-1.70.0/libs/regex/src/static_mutex.cpp b/src/third_party/boost-1.70.0/libs/regex/src/static_mutex.cpp
new file mode 100644
index 00000000000..35dd0c79053
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/regex/src/static_mutex.cpp
@@ -0,0 +1,185 @@
+/*
+ *
+ * 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 static_mutex.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares static_mutex lock type.
+ */
+
+#define BOOST_REGEX_SOURCE
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+
+#ifdef BOOST_HAS_THREADS
+
+#include <boost/regex/pending/static_mutex.hpp>
+
+#if defined(BOOST_HAS_WINTHREADS)
+#ifndef NOMINMAX
+# define NOMINMAX
+#endif
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <boost/static_assert.hpp>
+#endif
+
+
+namespace boost{
+
+#if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER)
+
+scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk)
+: m_mutex(m), m_have_lock(false)
+{
+ if(lk)
+ lock();
+}
+
+scoped_static_mutex_lock::~scoped_static_mutex_lock()
+{
+ if(m_have_lock)
+ unlock();
+}
+
+void scoped_static_mutex_lock::lock()
+{
+ if(0 == m_have_lock)
+ {
+ // Client code will throw if this fails:
+ m_have_lock = (pthread_mutex_lock(&(m_mutex.m_mutex)) == 0);
+ }
+}
+
+void scoped_static_mutex_lock::unlock()
+{
+ if(m_have_lock)
+ {
+ // If this fails there's nothing we can do except assert,
+ // exceptions are out of the question as this code is called
+ // from the lock's destructor:
+ BOOST_VERIFY(pthread_mutex_unlock(&(m_mutex.m_mutex)) == 0);
+ m_have_lock = false;
+ }
+}
+
+#elif defined(BOOST_HAS_WINTHREADS)
+
+BOOST_STATIC_ASSERT(sizeof(LONG) == sizeof(boost::int32_t));
+
+scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk)
+: m_mutex(m), m_have_lock(false)
+{
+ if(lk)
+ lock();
+}
+
+scoped_static_mutex_lock::~scoped_static_mutex_lock()
+{
+ if(m_have_lock)
+ unlock();
+}
+
+void scoped_static_mutex_lock::lock()
+{
+ if(0 == m_have_lock)
+ {
+#if !defined(InterlockedCompareExchangePointer)
+ while(0 != InterlockedCompareExchange(reinterpret_cast<void**>((boost::uint_least16_t*)&(m_mutex.m_mutex)), (void*)1, 0))
+#else
+ while(0 != InterlockedCompareExchange(reinterpret_cast<LONG*>(&(m_mutex.m_mutex)), 1, 0))
+#endif
+ {
+ Sleep(0);
+ }
+ m_have_lock = true;
+ }
+}
+
+void scoped_static_mutex_lock::unlock()
+{
+ if(m_have_lock)
+ {
+#if !defined(InterlockedCompareExchangePointer)
+ InterlockedExchange((LONG*)&(m_mutex.m_mutex), 0);
+#else
+ InterlockedExchange(reinterpret_cast<LONG*>(&(m_mutex.m_mutex)), 0);
+#endif
+ m_have_lock = false;
+ }
+}
+
+#else
+//
+// Portable version of a static mutex based on Boost.Thread library:
+//
+#include <stdlib.h>
+#include <boost/assert.hpp>
+
+boost::recursive_mutex* static_mutex::m_pmutex = 0;
+boost::once_flag static_mutex::m_once = BOOST_ONCE_INIT;
+
+extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex()
+{
+ delete static_mutex::m_pmutex;
+ static_mutex::m_pmutex = 0;
+}
+
+void static_mutex::init()
+{
+ m_pmutex = new boost::recursive_mutex();
+ int r = atexit(boost_regex_free_static_mutex);
+ BOOST_ASSERT(0 == r);
+}
+
+scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& , bool lk)
+: m_plock(0), m_have_lock(false)
+{
+ if(lk)
+ lock();
+}
+
+scoped_static_mutex_lock::~scoped_static_mutex_lock()
+{
+ if(m_have_lock)
+ unlock();
+ delete m_plock;
+}
+
+void scoped_static_mutex_lock::lock()
+{
+ if(0 == m_have_lock)
+ {
+ boost::call_once(static_mutex::m_once,&static_mutex::init);
+ if(0 == m_plock)
+ m_plock = new boost::unique_lock<boost::recursive_mutex>(*static_mutex::m_pmutex, boost::defer_lock);
+ m_plock->lock();
+ m_have_lock = true;
+ }
+}
+
+void scoped_static_mutex_lock::unlock()
+{
+ if(m_have_lock)
+ {
+ m_plock->unlock();
+ m_have_lock = false;
+ }
+}
+
+#endif
+
+}
+
+#endif // BOOST_HAS_THREADS
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/usinstances.cpp b/src/third_party/boost-1.70.0/libs/regex/src/usinstances.cpp
index 44ebd28dfb5..44ebd28dfb5 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/usinstances.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/usinstances.cpp
diff --git a/src/third_party/boost-1.70.0/libs/regex/src/w32_regex_traits.cpp b/src/third_party/boost-1.70.0/libs/regex/src/w32_regex_traits.cpp
new file mode 100644
index 00000000000..5b5236aa884
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/regex/src/w32_regex_traits.cpp
@@ -0,0 +1,654 @@
+/*
+ *
+ * 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.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Implements w32_regex_traits<char> (and associated helper classes).
+ */
+
+#define BOOST_REGEX_SOURCE
+#include <boost/regex/config.hpp>
+
+#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_NO_WIN32_LOCALE)
+#include <boost/regex/regex_traits.hpp>
+#include <boost/regex/pattern_except.hpp>
+
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef NOMINMAX
+# define NOMINMAX
+#endif
+#define NOGDI
+#include <windows.h>
+
+#if defined(_MSC_VER) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
+#pragma comment(lib, "user32.lib")
+#endif
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std{
+ using ::memset;
+}
+#endif
+
+namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
+
+#ifdef BOOST_NO_ANSI_APIS
+UINT get_code_page_for_locale_id(lcid_type idx)
+{
+ WCHAR code_page_string[7];
+ if (::GetLocaleInfoW(idx, LOCALE_IDEFAULTANSICODEPAGE, code_page_string, 7) == 0)
+ return 0;
+
+ return static_cast<UINT>(_wtol(code_page_string));
+}
+#endif
+
+
+void w32_regex_traits_char_layer<char>::init()
+{
+ // we need to start by initialising our syntax map so we know which
+ // character is used for which purpose:
+ std::memset(m_char_map, 0, sizeof(m_char_map));
+ cat_type cat;
+ std::string cat_name(w32_regex_traits<char>::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_syntax(i));
+ for(string_type::size_type j = 0; j < mss.size(); ++j)
+ {
+ m_char_map[static_cast<unsigned char>(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)
+ {
+ m_char_map[static_cast<unsigned char>(*ptr)] = i;
+ ++ptr;
+ }
+ }
+ }
+ //
+ // finish off by calculating our escape types:
+ //
+ unsigned char i = 'A';
+ do
+ {
+ if(m_char_map[i] == 0)
+ {
+ if(::boost::BOOST_REGEX_DETAIL_NS::w32_is(this->m_locale, 0x0002u, (char)i))
+ m_char_map[i] = regex_constants::escape_type_class;
+ else if(::boost::BOOST_REGEX_DETAIL_NS::w32_is(this->m_locale, 0x0001u, (char)i))
+ m_char_map[i] = regex_constants::escape_type_not_class;
+ }
+ }while(0xFF != i++);
+
+ //
+ // fill in lower case map:
+ //
+ char char_map[1 << CHAR_BIT];
+ for(int ii = 0; ii < (1 << CHAR_BIT); ++ii)
+ char_map[ii] = static_cast<char>(ii);
+#ifndef BOOST_NO_ANSI_APIS
+ int r = ::LCMapStringA(this->m_locale, LCMAP_LOWERCASE, char_map, 1 << CHAR_BIT, this->m_lower_map, 1 << CHAR_BIT);
+ BOOST_ASSERT(r != 0);
+#else
+ UINT code_page = get_code_page_for_locale_id(this->m_locale);
+ BOOST_ASSERT(code_page != 0);
+
+ WCHAR wide_char_map[1 << CHAR_BIT];
+ int conv_r = ::MultiByteToWideChar(code_page, 0, char_map, 1 << CHAR_BIT, wide_char_map, 1 << CHAR_BIT);
+ BOOST_ASSERT(conv_r != 0);
+
+ WCHAR wide_lower_map[1 << CHAR_BIT];
+ int r = ::LCMapStringW(this->m_locale, LCMAP_LOWERCASE, wide_char_map, 1 << CHAR_BIT, wide_lower_map, 1 << CHAR_BIT);
+ BOOST_ASSERT(r != 0);
+
+ conv_r = ::WideCharToMultiByte(code_page, 0, wide_lower_map, r, this->m_lower_map, 1 << CHAR_BIT, NULL, NULL);
+ BOOST_ASSERT(conv_r != 0);
+#endif
+ if(r < (1 << CHAR_BIT))
+ {
+ // if we have multibyte characters then not all may have been given
+ // a lower case mapping:
+ for(int jj = r; jj < (1 << CHAR_BIT); ++jj)
+ this->m_lower_map[jj] = static_cast<char>(jj);
+ }
+
+#ifndef BOOST_NO_ANSI_APIS
+ r = ::GetStringTypeExA(this->m_locale, CT_CTYPE1, char_map, 1 << CHAR_BIT, this->m_type_map);
+#else
+ r = ::GetStringTypeExW(this->m_locale, CT_CTYPE1, wide_char_map, 1 << CHAR_BIT, this->m_type_map);
+#endif
+ BOOST_ASSERT(0 != r);
+}
+
+BOOST_REGEX_DECL lcid_type BOOST_REGEX_CALL w32_get_default_locale()
+{
+ return ::GetUserDefaultLCID();
+}
+
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char c, lcid_type idx)
+{
+#ifndef BOOST_NO_ANSI_APIS
+ WORD mask;
+ if(::GetStringTypeExA(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
+ return true;
+ return false;
+#else
+ UINT code_page = get_code_page_for_locale_id(idx);
+ if (code_page == 0)
+ return false;
+
+ WCHAR wide_c;
+ if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
+ return false;
+
+ WORD mask;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &wide_c, 1, &mask) && (mask & C1_LOWER))
+ return true;
+ return false;
+#endif
+}
+
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t c, lcid_type idx)
+{
+ WORD mask;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
+ return true;
+ return false;
+}
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type idx)
+{
+ WORD mask;
+ wchar_t c = ca;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
+ return true;
+ return false;
+}
+#endif
+
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char c, lcid_type idx)
+{
+#ifndef BOOST_NO_ANSI_APIS
+ WORD mask;
+ if(::GetStringTypeExA(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
+ return true;
+ return false;
+#else
+ UINT code_page = get_code_page_for_locale_id(idx);
+ if (code_page == 0)
+ return false;
+
+ WCHAR wide_c;
+ if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
+ return false;
+
+ WORD mask;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &wide_c, 1, &mask) && (mask & C1_UPPER))
+ return true;
+ return false;
+#endif
+}
+
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t c, lcid_type idx)
+{
+ WORD mask;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
+ return true;
+ return false;
+}
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(unsigned short ca, lcid_type idx)
+{
+ WORD mask;
+ wchar_t c = ca;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
+ return true;
+ return false;
+}
+#endif
+
+void free_module(void* mod)
+{
+ ::FreeLibrary(static_cast<HMODULE>(mod));
+}
+
+BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name)
+{
+#ifndef BOOST_NO_ANSI_APIS
+ cat_type result(::LoadLibraryA(name.c_str()), &free_module);
+ return result;
+#else
+ LPWSTR wide_name = (LPWSTR)_alloca( (name.size() + 1) * sizeof(WCHAR) );
+ if (::MultiByteToWideChar(CP_ACP, 0, name.c_str(), name.size(), wide_name, name.size() + 1) == 0)
+ return cat_type();
+
+ cat_type result(::LoadLibraryW(wide_name), &free_module);
+ return result;
+#endif
+}
+
+BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::string& def)
+{
+#ifndef BOOST_NO_ANSI_APIS
+ char buf[256];
+ if(0 == ::LoadStringA(
+ static_cast<HMODULE>(cat.get()),
+ i,
+ buf,
+ 256
+ ))
+ {
+ return def;
+ }
+#else
+ WCHAR wbuf[256];
+ int r = ::LoadStringW(
+ static_cast<HMODULE>(cat.get()),
+ i,
+ wbuf,
+ 256
+ );
+ if (r == 0)
+ return def;
+
+
+ int buf_size = 1 + ::WideCharToMultiByte(CP_ACP, 0, wbuf, r, NULL, 0, NULL, NULL);
+ LPSTR buf = (LPSTR)_alloca(buf_size);
+ if (::WideCharToMultiByte(CP_ACP, 0, wbuf, r, buf, buf_size, NULL, NULL) == 0)
+ return def; // failed conversion.
+#endif
+ return std::string(buf);
+}
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::wstring& def)
+{
+ wchar_t buf[256];
+ if(0 == ::LoadStringW(
+ static_cast<HMODULE>(cat.get()),
+ i,
+ buf,
+ 256
+ ))
+ {
+ return def;
+ }
+ return std::wstring(buf);
+}
+#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)
+{
+ unsigned short buf[256];
+ if(0 == ::LoadStringW(
+ static_cast<HMODULE>(cat.get()),
+ i,
+ (LPWSTR)buf,
+ 256
+ ))
+ {
+ return def;
+ }
+ return std::basic_string<unsigned short>(buf);
+}
+#endif
+#endif
+BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type idx, const char* p1, const char* p2)
+{
+#ifndef BOOST_NO_ANSI_APIS
+ int bytes = ::LCMapStringA(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ p1, // source string
+ static_cast<int>(p2 - p1), // number of characters in source string
+ 0, // destination buffer
+ 0 // size of destination buffer
+ );
+ if(!bytes)
+ return std::string(p1, p2);
+ std::string result(++bytes, '\0');
+ bytes = ::LCMapStringA(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ p1, // source string
+ static_cast<int>(p2 - p1), // number of characters in source string
+ &*result.begin(), // destination buffer
+ bytes // size of destination buffer
+ );
+#else
+ UINT code_page = get_code_page_for_locale_id(idx);
+ if(code_page == 0)
+ return std::string(p1, p2);
+
+ int src_len = static_cast<int>(p2 - p1);
+ LPWSTR wide_p1 = (LPWSTR)_alloca( (src_len + 1) * 2 );
+ if(::MultiByteToWideChar(code_page, 0, p1, src_len, wide_p1, src_len + 1) == 0)
+ return std::string(p1, p2);
+
+ int bytes = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ wide_p1, // source string
+ src_len, // number of characters in source string
+ 0, // destination buffer
+ 0 // size of destination buffer
+ );
+ if(!bytes)
+ return std::string(p1, p2);
+ std::string result(++bytes, '\0');
+ bytes = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ wide_p1, // source string
+ src_len, // number of characters in source string
+ (LPWSTR)&*result.begin(), // destination buffer
+ bytes // size of destination buffer
+ );
+#endif
+ if(bytes > static_cast<int>(result.size()))
+ return std::string(p1, p2);
+ while(result.size() && result[result.size()-1] == '\0')
+ {
+ result.erase(result.size()-1);
+ }
+ return result;
+}
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type idx, const wchar_t* p1, const wchar_t* p2)
+{
+ int bytes = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ p1, // source string
+ static_cast<int>(p2 - p1), // number of characters in source string
+ 0, // destination buffer
+ 0 // size of destination buffer
+ );
+ if(!bytes)
+ return std::wstring(p1, p2);
+ std::string result(++bytes, '\0');
+ bytes = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ p1, // source string
+ static_cast<int>(p2 - p1), // number of characters in source string
+ reinterpret_cast<wchar_t*>(&*result.begin()), // destination buffer *of bytes*
+ bytes // size of destination buffer
+ );
+ if(bytes > static_cast<int>(result.size()))
+ return std::wstring(p1, p2);
+ while(result.size() && result[result.size()-1] == L'\0')
+ {
+ result.erase(result.size()-1);
+ }
+ std::wstring r2;
+ for(std::string::size_type i = 0; i < result.size(); ++i)
+ r2.append(1, static_cast<wchar_t>(static_cast<unsigned char>(result[i])));
+ return r2;
+}
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_transform(lcid_type idx, const unsigned short* p1, const unsigned short* p2)
+{
+ int bytes = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ (LPCWSTR)p1, // source string
+ static_cast<int>(p2 - p1), // number of characters in source string
+ 0, // destination buffer
+ 0 // size of destination buffer
+ );
+ if(!bytes)
+ return std::basic_string<unsigned short>(p1, p2);
+ std::string result(++bytes, '\0');
+ bytes = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_SORTKEY, // mapping transformation type
+ (LPCWSTR)p1, // source string
+ static_cast<int>(p2 - p1), // number of characters in source string
+ reinterpret_cast<wchar_t*>(&*result.begin()), // destination buffer *of bytes*
+ bytes // size of destination buffer
+ );
+ if(bytes > static_cast<int>(result.size()))
+ return std::basic_string<unsigned short>(p1, p2);
+ while(result.size() && result[result.size()-1] == L'\0')
+ {
+ result.erase(result.size()-1);
+ }
+ std::basic_string<unsigned short> r2;
+ for(std::string::size_type i = 0; i < result.size(); ++i)
+ r2.append(1, static_cast<unsigned short>(static_cast<unsigned char>(result[i])));
+ return r2;
+}
+#endif
+#endif
+BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type idx)
+{
+ char result[2];
+#ifndef BOOST_NO_ANSI_APIS
+ int b = ::LCMapStringA(
+ idx, // locale identifier
+ LCMAP_LOWERCASE, // mapping transformation type
+ &c, // source string
+ 1, // number of characters in source string
+ result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+#else
+ UINT code_page = get_code_page_for_locale_id(idx);
+ if (code_page == 0)
+ return c;
+
+ WCHAR wide_c;
+ if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
+ return c;
+
+ WCHAR wide_result;
+ int b = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_LOWERCASE, // mapping transformation type
+ &wide_c, // source string
+ 1, // number of characters in source string
+ &wide_result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+
+ if (::WideCharToMultiByte(code_page, 0, &wide_result, 1, result, 2, NULL, NULL) == 0)
+ return c; // No single byte lower case equivalent available
+#endif
+ return result[0];
+}
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type idx)
+{
+ wchar_t result[2];
+ int b = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_LOWERCASE, // mapping transformation type
+ &c, // source string
+ 1, // number of characters in source string
+ result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+ return result[0];
+}
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_tolower(unsigned short c, lcid_type idx)
+{
+ wchar_t result[2];
+ int b = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_LOWERCASE, // mapping transformation type
+ (wchar_t const*)&c, // source string
+ 1, // number of characters in source string
+ result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+ return result[0];
+}
+#endif
+#endif
+BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type idx)
+{
+ char result[2];
+#ifndef BOOST_NO_ANSI_APIS
+ int b = ::LCMapStringA(
+ idx, // locale identifier
+ LCMAP_UPPERCASE, // mapping transformation type
+ &c, // source string
+ 1, // number of characters in source string
+ result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+#else
+ UINT code_page = get_code_page_for_locale_id(idx);
+ if(code_page == 0)
+ return c;
+
+ WCHAR wide_c;
+ if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
+ return c;
+
+ WCHAR wide_result;
+ int b = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_UPPERCASE, // mapping transformation type
+ &wide_c, // source string
+ 1, // number of characters in source string
+ &wide_result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+
+ if (::WideCharToMultiByte(code_page, 0, &wide_result, 1, result, 2, NULL, NULL) == 0)
+ return c; // No single byte upper case equivalent available.
+#endif
+ return result[0];
+}
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type idx)
+{
+ wchar_t result[2];
+ int b = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_UPPERCASE, // mapping transformation type
+ &c, // source string
+ 1, // number of characters in source string
+ result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+ return result[0];
+}
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_toupper(unsigned short c, lcid_type idx)
+{
+ wchar_t result[2];
+ int b = ::LCMapStringW(
+ idx, // locale identifier
+ LCMAP_UPPERCASE, // mapping transformation type
+ (wchar_t const*)&c, // source string
+ 1, // number of characters in source string
+ result, // destination buffer
+ 1); // size of destination buffer
+ if(b == 0)
+ return c;
+ return result[0];
+}
+#endif
+#endif
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, char c)
+{
+ WORD mask;
+#ifndef BOOST_NO_ANSI_APIS
+ if(::GetStringTypeExA(idx, CT_CTYPE1, &c, 1, &mask) && (mask & m & w32_regex_traits_implementation<char>::mask_base))
+ return true;
+#else
+ UINT code_page = get_code_page_for_locale_id(idx);
+ if(code_page == 0)
+ return false;
+
+ WCHAR wide_c;
+ if (::MultiByteToWideChar(code_page, 0, &c, 1, &wide_c, 1) == 0)
+ return false;
+
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &wide_c, 1, &mask) && (mask & m & w32_regex_traits_implementation<char>::mask_base))
+ return true;
+#endif
+ if((m & w32_regex_traits_implementation<char>::mask_word) && (c == '_'))
+ return true;
+ return false;
+}
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, wchar_t c)
+{
+ WORD mask;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & m & w32_regex_traits_implementation<wchar_t>::mask_base))
+ return true;
+ if((m & w32_regex_traits_implementation<wchar_t>::mask_word) && (c == '_'))
+ return true;
+ if((m & w32_regex_traits_implementation<wchar_t>::mask_unicode) && (c > 0xff))
+ return true;
+ return false;
+}
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, unsigned short c)
+{
+ WORD mask;
+ if(::GetStringTypeExW(idx, CT_CTYPE1, (wchar_t const*)&c, 1, &mask) && (mask & m & w32_regex_traits_implementation<wchar_t>::mask_base))
+ return true;
+ if((m & w32_regex_traits_implementation<wchar_t>::mask_word) && (c == '_'))
+ return true;
+ if((m & w32_regex_traits_implementation<wchar_t>::mask_unicode) && (c > 0xff))
+ return true;
+ return false;
+}
+#endif
+#endif
+
+} // BOOST_REGEX_DETAIL_NS
+} // boost
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/wc_regex_traits.cpp b/src/third_party/boost-1.70.0/libs/regex/src/wc_regex_traits.cpp
index e7fcfb8ea87..e7fcfb8ea87 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/wc_regex_traits.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/wc_regex_traits.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/wide_posix_api.cpp b/src/third_party/boost-1.70.0/libs/regex/src/wide_posix_api.cpp
index bc1c0af2ae8..bc1c0af2ae8 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/wide_posix_api.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/wide_posix_api.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/winstances.cpp b/src/third_party/boost-1.70.0/libs/regex/src/winstances.cpp
index 1e0b859628d..1e0b859628d 100644
--- a/src/third_party/boost-1.69.0/libs/regex/src/winstances.cpp
+++ b/src/third_party/boost-1.70.0/libs/regex/src/winstances.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/archive_exception.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/archive_exception.cpp
index 729a4edb255..729a4edb255 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/archive_exception.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/archive_exception.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_archive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_archive.cpp
index 42da5d2e201..42da5d2e201 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_archive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_archive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_iarchive.cpp
index a5455a530ab..a5455a530ab 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_iserializer.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_iserializer.cpp
index 3898a6a7239..3898a6a7239 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_iserializer.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_iserializer.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_oarchive.cpp
index 653260c33b3..653260c33b3 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_oserializer.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_oserializer.cpp
index afe08c4bb88..afe08c4bb88 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_oserializer.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_oserializer.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_iserializer.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_pointer_iserializer.cpp
index 7cf63f306e4..7cf63f306e4 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_iserializer.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_pointer_iserializer.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_oserializer.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_pointer_oserializer.cpp
index e86f7b78edc..e86f7b78edc 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_oserializer.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_pointer_oserializer.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_serializer_map.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_serializer_map.cpp
index 5b79107728e..5b79107728e 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_serializer_map.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_serializer_map.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_iprimitive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_iprimitive.cpp
index c0b7f766820..c0b7f766820 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_iprimitive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_iprimitive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_oprimitive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_oprimitive.cpp
index 601662294e0..601662294e0 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_oprimitive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_oprimitive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_wiprimitive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_wiprimitive.cpp
index 28250007bd1..28250007bd1 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_wiprimitive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_wiprimitive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_woprimitive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_woprimitive.cpp
index 6c0caa9793a..6c0caa9793a 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_woprimitive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_text_woprimitive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_archive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_xml_archive.cpp
index 23ab1819d11..23ab1819d11 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_archive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_xml_archive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_grammar.ipp b/src/third_party/boost-1.70.0/libs/serialization/src/basic_xml_grammar.ipp
index dcec1cc6bee..dcec1cc6bee 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_grammar.ipp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/basic_xml_grammar.ipp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/binary_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/binary_iarchive.cpp
index 41aad8413e4..41aad8413e4 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/binary_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/binary_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/binary_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/binary_oarchive.cpp
index 8b86d2cb385..8b86d2cb385 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/binary_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/binary_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/binary_wiarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/binary_wiarchive.cpp
index 720d469d702..720d469d702 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/binary_wiarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/binary_wiarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/binary_woarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/binary_woarchive.cpp
index 905a319d664..905a319d664 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/binary_woarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/binary_woarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/codecvt_null.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/codecvt_null.cpp
index 624afc21618..624afc21618 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/codecvt_null.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/serialization/src/extended_type_info.cpp
index 573336c8642..573336c8642 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/extended_type_info.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_no_rtti.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/extended_type_info_no_rtti.cpp
index 0a8d2a078c7..0a8d2a078c7 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_no_rtti.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/serialization/src/extended_type_info_typeid.cpp
index 91ace4c36ed..91ace4c36ed 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_typeid.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/extended_type_info_typeid.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_binary_iarchive.cpp
index 7fcca705a88..7fcca705a88 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_binary_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_binary_oarchive.cpp
index 8b66c5cb53f..8b66c5cb53f 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_binary_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_iarchive.cpp
index 249363b8ea6..249363b8ea6 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_oarchive.cpp
index f63296be5b0..f63296be5b0 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_oarchive.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/serialization/src/polymorphic_text_iarchive.cpp
index 6404ec83b80..6404ec83b80 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_oarchive.cpp
index 4160a621a8e..4160a621a8e 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_wiarchive.cpp
index 2089195a378..2089195a378 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_wiarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_woarchive.cpp
index 514f1447785..514f1447785 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_text_woarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_iarchive.cpp
index 17ec7917dcf..17ec7917dcf 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_oarchive.cpp
index 124f899f926..124f899f926 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp
index 1548c9ed94e..1548c9ed94e 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_woarchive.cpp
index 4798945665b..4798945665b 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/polymorphic_xml_woarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/stl_port.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/stl_port.cpp
index 343faa6d16f..343faa6d16f 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/stl_port.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/stl_port.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/text_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/text_iarchive.cpp
index dfcff4e149e..dfcff4e149e 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/text_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/text_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/text_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/text_oarchive.cpp
index ae24a0bf748..ae24a0bf748 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/text_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/text_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/text_wiarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/text_wiarchive.cpp
index 6b6e592f74a..6b6e592f74a 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/text_wiarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/text_wiarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/text_woarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/text_woarchive.cpp
index 46441694ef6..46441694ef6 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/text_woarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/text_woarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/utf8_codecvt_facet.cpp
index f6550d07dee..f6550d07dee 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/utf8_codecvt_facet.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/serialization/src/void_cast.cpp
index 535988f8623..535988f8623 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/void_cast.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/void_cast.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_archive_exception.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_archive_exception.cpp
index f4ca98c0869..f4ca98c0869 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_archive_exception.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_archive_exception.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_grammar.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_grammar.cpp
index ae48f70decc..ae48f70decc 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_grammar.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_grammar.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_iarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_iarchive.cpp
index 0a19a8e8e69..0a19a8e8e69 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_iarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_iarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_oarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_oarchive.cpp
index c238845d634..c238845d634 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_oarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_wgrammar.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_wgrammar.cpp
index 7c053e80984..7c053e80984 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_wgrammar.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_wgrammar.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_wiarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_wiarchive.cpp
index 8c60abf733b..8c60abf733b 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_wiarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_wiarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/xml_woarchive.cpp b/src/third_party/boost-1.70.0/libs/serialization/src/xml_woarchive.cpp
index f9b6ba389ef..f9b6ba389ef 100644
--- a/src/third_party/boost-1.69.0/libs/serialization/src/xml_woarchive.cpp
+++ b/src/third_party/boost-1.70.0/libs/serialization/src/xml_woarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/smart_ptr/README.md b/src/third_party/boost-1.70.0/libs/smart_ptr/README.md
index 1301e79c437..1301e79c437 100644
--- a/src/third_party/boost-1.69.0/libs/smart_ptr/README.md
+++ b/src/third_party/boost-1.70.0/libs/smart_ptr/README.md
diff --git a/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_collector.cpp b/src/third_party/boost-1.70.0/libs/smart_ptr/extras/src/sp_collector.cpp
index bb69ae88bdc..bb69ae88bdc 100644
--- a/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_collector.cpp
+++ b/src/third_party/boost-1.70.0/libs/smart_ptr/extras/src/sp_collector.cpp
diff --git a/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp b/src/third_party/boost-1.70.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp
index 31939363bad..31939363bad 100644
--- a/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp
+++ b/src/third_party/boost-1.70.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.70.0/libs/system/src/error_code.cpp
index b86a38c589d..b86a38c589d 100644
--- a/src/third_party/boost-1.69.0/libs/system/src/error_code.cpp
+++ b/src/third_party/boost-1.70.0/libs/system/src/error_code.cpp
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/future.cpp b/src/third_party/boost-1.70.0/libs/thread/src/future.cpp
index a477e709ac2..a477e709ac2 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/future.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/future.cpp
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/pthread/once.cpp b/src/third_party/boost-1.70.0/libs/thread/src/pthread/once.cpp
index 2395cff6dd1..2395cff6dd1 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/pthread/once.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/pthread/once.cpp
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/pthread/once_atomic.cpp b/src/third_party/boost-1.70.0/libs/thread/src/pthread/once_atomic.cpp
index 595ad7f1b3d..595ad7f1b3d 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/pthread/once_atomic.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/pthread/once_atomic.cpp
diff --git a/src/third_party/boost-1.70.0/libs/thread/src/pthread/thread.cpp b/src/third_party/boost-1.70.0/libs/thread/src/pthread/thread.cpp
new file mode 100644
index 00000000000..f318635dd55
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/thread/src/pthread/thread.cpp
@@ -0,0 +1,799 @@
+// 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.caller)(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,
+ detail::tss_data_node::cleanup_caller_t caller,
+ detail::tss_data_node::cleanup_func_t 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(caller,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,
+ detail::tss_data_node::cleanup_caller_t caller,
+ detail::tss_data_node::cleanup_func_t 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->caller)(current_node->func,current_node->value);
+ }
+ if(func || (tss_data!=0))
+ {
+ current_node->caller=caller;
+ 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,caller,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.70.0/libs/thread/src/tss_null.cpp
index e5e81512169..e5e81512169 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/tss_null.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/tss_null.cpp
diff --git a/src/third_party/boost-1.70.0/libs/thread/src/win32/thread.cpp b/src/third_party/boost-1.70.0/libs/thread/src/win32/thread.cpp
new file mode 100644
index 00000000000..e1ae050bd9b
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/thread/src/win32/thread.cpp
@@ -0,0 +1,980 @@
+// Distributed under the 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.caller)(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,
+ detail::tss_data_node::cleanup_caller_t caller,
+ detail::tss_data_node::cleanup_func_t 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(caller,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,
+ detail::tss_data_node::cleanup_caller_t caller,
+ detail::tss_data_node::cleanup_func_t 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->caller)(current_node->func,current_node->value);
+ }
+ if(func || (tss_data!=0))
+ {
+ current_node->caller=caller;
+ 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,caller,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.70.0/libs/thread/src/win32/thread_primitives.cpp
index 5f6e6f03a60..5f6e6f03a60 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/win32/thread_primitives.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/win32/thread_primitives.cpp
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp b/src/third_party/boost-1.70.0/libs/thread/src/win32/tss_dll.cpp
index caddabf0b33..caddabf0b33 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/win32/tss_dll.cpp
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp b/src/third_party/boost-1.70.0/libs/thread/src/win32/tss_pe.cpp
index e7fafea96ba..e7fafea96ba 100644
--- a/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp
+++ b/src/third_party/boost-1.70.0/libs/thread/src/win32/tss_pe.cpp
diff --git a/src/third_party/boost-1.69.0/libs/timer/src/auto_timers_construction.cpp b/src/third_party/boost-1.70.0/libs/timer/src/auto_timers_construction.cpp
index b23b54674f7..b23b54674f7 100644
--- a/src/third_party/boost-1.69.0/libs/timer/src/auto_timers_construction.cpp
+++ b/src/third_party/boost-1.70.0/libs/timer/src/auto_timers_construction.cpp
diff --git a/src/third_party/boost-1.70.0/libs/timer/src/cpu_timer.cpp b/src/third_party/boost-1.70.0/libs/timer/src/cpu_timer.cpp
new file mode 100644
index 00000000000..82a8d7b1a72
--- /dev/null
+++ b/src/third_party/boost-1.70.0/libs/timer/src/cpu_timer.cpp
@@ -0,0 +1,267 @@
+// boost cpu_timer.cpp ---------------------------------------------------------------//
+
+// Copyright Beman Dawes 1994-2006, 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/libs/timer for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+// define BOOST_TIMER_SOURCE so that <boost/timer/config.hpp> knows
+// the library is being built (possibly exporting rather than importing code)
+#define BOOST_TIMER_SOURCE
+
+#include <boost/timer/timer.hpp>
+#include <boost/chrono/chrono.hpp>
+#include <boost/io/ios_state.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/cerrno.hpp>
+#include <boost/predef.h>
+#include <cstring>
+#include <sstream>
+#include <cassert>
+
+# if defined(BOOST_WINDOWS_API)
+# include <windows.h>
+# elif defined(BOOST_POSIX_API)
+# include <unistd.h>
+# include <sys/times.h>
+# else
+# error unknown API
+# endif
+
+using boost::timer::nanosecond_type;
+using boost::timer::cpu_times;
+using boost::system::error_code;
+
+namespace
+{
+
+ void show_time(const cpu_times& times,
+ std::ostream& os, const std::string& fmt, short places)
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ if (places > 9)
+ places = 9;
+ else if (places < 0)
+ places = boost::timer::default_places;
+
+ boost::io::ios_flags_saver ifs(os);
+ boost::io::ios_precision_saver ips(os);
+ os.setf(std::ios_base::fixed, std::ios_base::floatfield);
+ os.precision(places);
+
+ const double sec = 1000000000.0L;
+ nanosecond_type total = times.system + times.user;
+ double wall_sec = static_cast<double>(times.wall) / sec;
+ double total_sec = static_cast<double>(total) / sec;
+
+ for (const char* format = fmt.c_str(); *format; ++format)
+ {
+ if (*format != '%' || !*(format+1) || !std::strchr("wustp", *(format+1)))
+ os << *format; // anything except % followed by a valid format character
+ // gets sent to the output stream
+ else
+ {
+ ++format;
+ switch (*format)
+ {
+ case 'w':
+ os << wall_sec;
+ break;
+ case 'u':
+ os << static_cast<double>(times.user) / sec;
+ break;
+ case 's':
+ os << static_cast<double>(times.system) / sec;
+ break;
+ case 't':
+ os << total_sec;
+ break;
+ case 'p':
+ os.precision(1);
+ if (wall_sec > 0.001L && total_sec > 0.001L)
+ os << (total_sec/wall_sec) * 100.0;
+ else
+ os << "n/a";
+ os.precision(places);
+ break;
+ }
+ }
+ }
+ }
+
+# if defined(BOOST_POSIX_API)
+ boost::int_least64_t tick_factor() // multiplier to convert ticks
+ // to nanoseconds; -1 if unknown
+ {
+ static boost::int_least64_t tick_factor = 0;
+ if (!tick_factor)
+ {
+ if ((tick_factor = ::sysconf(_SC_CLK_TCK)) <= 0)
+ tick_factor = -1;
+ else
+ {
+ tick_factor = INT64_C(1000000000) / tick_factor; // compute factor
+ if (!tick_factor)
+ tick_factor = -1;
+ }
+ }
+ return tick_factor;
+ }
+# endif
+
+ void get_cpu_times(boost::timer::cpu_times& current)
+ {
+ boost::chrono::duration<boost::int64_t, boost::nano>
+ x (boost::chrono::high_resolution_clock::now().time_since_epoch());
+ current.wall = x.count();
+
+# if defined(BOOST_WINDOWS_API)
+
+# if BOOST_PLAT_WINDOWS_DESKTOP || defined(__CYGWIN__)
+ FILETIME creation, exit;
+ if (::GetProcessTimes(::GetCurrentProcess(), &creation, &exit,
+ (LPFILETIME)&current.system, (LPFILETIME)&current.user))
+ {
+ current.user *= 100; // Windows uses 100 nanosecond ticks
+ current.system *= 100;
+ }
+ else
+# endif
+ {
+ current.system = current.user = boost::timer::nanosecond_type(-1);
+ }
+# else
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == static_cast<clock_t>(-1)) // error
+ {
+ current.system = current.user = boost::timer::nanosecond_type(-1);
+ }
+ else
+ {
+ current.system = boost::timer::nanosecond_type(tm.tms_stime + tm.tms_cstime);
+ current.user = boost::timer::nanosecond_type(tm.tms_utime + tm.tms_cutime);
+ boost::int_least64_t factor;
+ if ((factor = tick_factor()) != -1)
+ {
+ current.user *= factor;
+ current.system *= factor;
+ }
+ else
+ {
+ current.user = current.system = boost::timer::nanosecond_type(-1);
+ }
+ }
+# endif
+ }
+
+ // CAUTION: must be identical to same constant in auto_timers_construction.cpp
+ const std::string default_fmt(" %ws wall, %us user + %ss system = %ts CPU (%p%)\n");
+
+} // unnamed namespace
+
+namespace boost
+{
+ namespace timer
+ {
+ // format ------------------------------------------------------------------------//
+
+ BOOST_TIMER_DECL
+ std::string format(const cpu_times& times, short places, const std::string& fmt)
+ {
+ std::stringstream ss;
+ ss.exceptions(std::ios_base::badbit | std::ios_base::failbit);
+ show_time(times, ss, fmt, places);
+ return ss.str();
+ }
+
+ BOOST_TIMER_DECL
+ std::string format(const cpu_times& times, short places)
+ {
+ return format(times, places, default_fmt);
+ }
+
+ // cpu_timer ---------------------------------------------------------------------//
+
+ void cpu_timer::start() BOOST_NOEXCEPT
+ {
+ m_is_stopped = false;
+ get_cpu_times(m_times);
+ }
+
+ void cpu_timer::stop() BOOST_NOEXCEPT
+ {
+ if (is_stopped())
+ return;
+ m_is_stopped = true;
+
+ cpu_times current;
+ get_cpu_times(current);
+ m_times.wall = (current.wall - m_times.wall);
+ m_times.user = (current.user - m_times.user);
+ m_times.system = (current.system - m_times.system);
+ }
+
+ cpu_times cpu_timer::elapsed() const BOOST_NOEXCEPT
+ {
+ if (is_stopped())
+ return m_times;
+ cpu_times current;
+ get_cpu_times(current);
+ current.wall -= m_times.wall;
+ current.user -= m_times.user;
+ current.system -= m_times.system;
+ return current;
+ }
+
+ void cpu_timer::resume() BOOST_NOEXCEPT
+ {
+ if (is_stopped())
+ {
+ cpu_times current (m_times);
+ start();
+ m_times.wall -= current.wall;
+ m_times.user -= current.user;
+ m_times.system -= current.system;
+ }
+ }
+
+ // auto_cpu_timer ----------------------------------------------------------------//
+
+ auto_cpu_timer::auto_cpu_timer(std::ostream& os, short places) // #5
+ : m_places(places), m_os(&os), m_format(default_fmt)
+ {
+ start();
+ }
+
+ void auto_cpu_timer::report()
+ {
+ show_time(elapsed(), ostream(), format_string(), places());
+ }
+
+ auto_cpu_timer::~auto_cpu_timer()
+ {
+ if (!is_stopped())
+ {
+ stop(); // the sooner we stop(), the better
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ report();
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch (...) // eat any exceptions
+ {
+ }
+#endif
+ }
+ }
+
+ } // namespace timer
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/libs/unordered/_clang-format b/src/third_party/boost-1.70.0/libs/unordered/_clang-format
index d892b414c54..d892b414c54 100644
--- a/src/third_party/boost-1.69.0/libs/unordered/_clang-format
+++ b/src/third_party/boost-1.70.0/libs/unordered/_clang-format
diff --git a/src/third_party/boost-1.69.0/libs/unordered/ci/download-boost-snapshot.py b/src/third_party/boost-1.70.0/libs/unordered/ci/download-boost-snapshot.py
index a9d8ba98fa3..a9d8ba98fa3 100644
--- a/src/third_party/boost-1.69.0/libs/unordered/ci/download-boost-snapshot.py
+++ b/src/third_party/boost-1.70.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.70.0/libs/utility/README.md
index 49d3c288d01..49d3c288d01 100644
--- a/src/third_party/boost-1.69.0/libs/utility/README.md
+++ b/src/third_party/boost-1.70.0/libs/utility/README.md
diff --git a/src/third_party/boost-1.69.0/libs/utility/sublibs b/src/third_party/boost-1.70.0/libs/utility/sublibs
index 721d7c4a928..721d7c4a928 100644
--- a/src/third_party/boost-1.69.0/libs/utility/sublibs
+++ b/src/third_party/boost-1.70.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 15e690d4894..f8715b408fb 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.69.0
+VERSION=1.70.0
VERSION_UNDERSCORE=$(echo $VERSION | tr . _)
SRC_ROOT=$(mktemp -d /tmp/boost.XXXXXX)
trap "rm -rf $SRC_ROOT" EXIT